From 8565e68b53aa44a41c29f7fa8b1c1d264ddc6153 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 24 Sep 2015 10:31:27 +0800 Subject: [PATCH 0001/1710] [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 53ac741caea1b4c71c9b66e1332ed29fc18268ef Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Sat, 26 Sep 2015 11:10:27 +0800 Subject: [PATCH 0002/1710] 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 0003/1710] 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 0004/1710] 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 0005/1710] [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 0006/1710] [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 0007/1710] [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 0008/1710] =?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 0009/1710] [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 0010/1710] 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 0011/1710] 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 0012/1710] [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 0013/1710] 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 0014/1710] 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 0015/1710] 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 0016/1710] 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 0017/1710] 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 0018/1710] 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 0019/1710] 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 0020/1710] 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 0021/1710] =?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 0022/1710] =?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 0023/1710] [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 0024/1710] =?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 0025/1710] =?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 0026/1710] 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 0027/1710] 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 0028/1710] 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 0029/1710] 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 0030/1710] =?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 0031/1710] 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 0032/1710] 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 0033/1710] [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 0034/1710] 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 0035/1710] [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 0036/1710] 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 0037/1710] 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 0038/1710] 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 0039/1710] 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 0040/1710] 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 0041/1710] 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 0042/1710] 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 0043/1710] [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 0044/1710] 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 0045/1710] =?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 0046/1710] 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 0047/1710] 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 0048/1710] =?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 0049/1710] 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 0050/1710] 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 0051/1710] 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 0052/1710] 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 0053/1710] 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 0054/1710] 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 0055/1710] =?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 0056/1710] 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 0057/1710] 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 0058/1710] [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 0059/1710] [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 0060/1710] 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 0061/1710] =?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 0062/1710] 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 0063/1710] 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 0064/1710] [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 0065/1710] =?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 0066/1710] 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 0067/1710] 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 0068/1710] 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 0069/1710] 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 0070/1710] 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 0071/1710] [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 0072/1710] 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 0073/1710] 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 0074/1710] 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 0075/1710] 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 0076/1710] 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 0077/1710] 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 0078/1710] 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 0079/1710] 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 0080/1710] 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 0081/1710] 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 0082/1710] =?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 0083/1710] =?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 0084/1710] =?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 0085/1710] =?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 0086/1710] =?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 0087/1710] 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 0088/1710] [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 0089/1710] 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 0090/1710] 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 0091/1710] 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 0092/1710] 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 0093/1710] 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 0094/1710] 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 0095/1710] 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 0096/1710] =?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 0097/1710] [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 0098/1710] 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 0099/1710] 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 0100/1710] =?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 0101/1710] 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 0102/1710] =?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 0103/1710] 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 0104/1710] 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 0105/1710] 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 0106/1710] 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 0107/1710] =?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 0108/1710] [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 0109/1710] 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 0110/1710] 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 0111/1710] 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 0112/1710] =?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 0113/1710] 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 0114/1710] =?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 0115/1710] 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 0116/1710] 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 0117/1710] 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 0118/1710] 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 0119/1710] =?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 0120/1710] 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 0121/1710] 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 0122/1710] 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 0123/1710] 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 0124/1710] 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 0125/1710] 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 0126/1710] 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 0127/1710] 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 0128/1710] 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 0129/1710] 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 0130/1710] 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 0131/1710] 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 0132/1710] 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 0133/1710] =?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 0134/1710] =?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 0135/1710] =?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 0136/1710] 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 0137/1710] 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 0138/1710] 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 0139/1710] 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 0140/1710] 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 0141/1710] =?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 0142/1710] 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 0143/1710] 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 0144/1710] 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 0145/1710] 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 0146/1710] 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 0147/1710] 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 0148/1710] =?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 0149/1710] 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 0150/1710] 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 0151/1710] 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 0152/1710] 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 0153/1710] =?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 0154/1710] =?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 0155/1710] 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 0156/1710] 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 0157/1710] 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 0158/1710] 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 0159/1710] 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 0160/1710] 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 0161/1710] =?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 0162/1710] 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 0163/1710] =?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 0164/1710] 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 0165/1710] 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 0166/1710] 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 0167/1710] 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 0168/1710] 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 0169/1710] =?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 0170/1710] 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 0171/1710] 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 0172/1710] 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 0173/1710] 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 0174/1710] 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 0175/1710] 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 0176/1710] 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 0177/1710] 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 0178/1710] 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 0179/1710] 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 0180/1710] [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 0181/1710] 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 0182/1710] 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 0183/1710] 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 0184/1710] 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 0185/1710] 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 0186/1710] 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 0187/1710] 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 0188/1710] =?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 0189/1710] =?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 0190/1710] =?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 0191/1710] =?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 0192/1710] 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 0193/1710] 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 0194/1710] 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 0195/1710] 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 0196/1710] 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 0197/1710] =?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 0198/1710] =?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 0199/1710] =?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 0200/1710] 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 0201/1710] 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 0202/1710] 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 0203/1710] 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 0204/1710] 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 0205/1710] 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 0206/1710] 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 0207/1710] [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 0208/1710] =?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 0209/1710] =?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 0210/1710] 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 0211/1710] 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 0212/1710] 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 0213/1710] 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 0214/1710] 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 0215/1710] 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 0216/1710] =?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 0217/1710] 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 0218/1710] 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 0219/1710] 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 0220/1710] 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 0221/1710] 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 0222/1710] =?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 0223/1710] 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 0224/1710] =?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 0225/1710] 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 0226/1710] 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 0227/1710] 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 0228/1710] 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 0229/1710] 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 0230/1710] =?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 0231/1710] =?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 0232/1710] 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 0233/1710] 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 0234/1710] =?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 0235/1710] 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 0236/1710] 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 0237/1710] =?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 0238/1710] =?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 0239/1710] =?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 0240/1710] [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 0241/1710] 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 0242/1710] 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 0243/1710] 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 0244/1710] 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 0245/1710] 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 0246/1710] 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 0247/1710] [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 0248/1710] 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 0249/1710] 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 0250/1710] 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 0251/1710] 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 0252/1710] 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 0253/1710] 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 0254/1710] 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 0255/1710] 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 0256/1710] 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 0257/1710] 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 0258/1710] 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 0259/1710] 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 0260/1710] 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 0261/1710] 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 0262/1710] =?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 0263/1710] =?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 0264/1710] 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 0265/1710] 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 0266/1710] 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 0267/1710] 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 0268/1710] 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 0269/1710] [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 0270/1710] 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 0271/1710] =?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 0272/1710] 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 0273/1710] [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 0274/1710] 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 0275/1710] [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 0276/1710] 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 0277/1710] 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 0278/1710] 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 0279/1710] 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 0280/1710] 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 0281/1710] 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 0282/1710] 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 0283/1710] =?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 0284/1710] 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 0285/1710] 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 0286/1710] 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 0287/1710] 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 0288/1710] 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 0289/1710] 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 0290/1710] 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 0291/1710] 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 0292/1710] [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 0293/1710] 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 0294/1710] 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 0295/1710] =?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 0296/1710] =?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 0297/1710] 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 0298/1710] 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 0299/1710] 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 0300/1710] =?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 0301/1710] =?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 0302/1710] 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 0303/1710] 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 0304/1710] 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 0305/1710] =?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 0306/1710] 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 0307/1710] =?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 0308/1710] =?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 0309/1710] 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 0310/1710] =?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 0311/1710] =?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 0312/1710] 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 0313/1710] =?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 0314/1710] 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 0315/1710] 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 0316/1710] =?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 0317/1710] =?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 0318/1710] =?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 0319/1710] 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 0320/1710] 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 0321/1710] 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 0322/1710] =?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 0323/1710] 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 0324/1710] =?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 0325/1710] 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 0326/1710] 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 0327/1710] 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 0328/1710] =?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 0329/1710] 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 0330/1710] 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 0331/1710] 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 0332/1710] 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 0333/1710] =?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 0334/1710] 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 0335/1710] 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 0336/1710] =?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 0337/1710] 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 0338/1710] 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 0339/1710] 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 0340/1710] 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 0341/1710] 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 0342/1710] 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 0343/1710] 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 0344/1710] 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 0345/1710] 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 0346/1710] =?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 0347/1710] 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 0348/1710] 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 0349/1710] 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 0350/1710] 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 0351/1710] 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 0352/1710] =?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 0353/1710] 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 0354/1710] 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 3fadc7eaceee5d6dde121184b7b7af16f6e6ce62 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 22 Nov 2015 21:43:31 +0800 Subject: [PATCH 0355/1710] Update 20151028 10 Tips for 10x Application Performance.md --- ...10 Tips for 10x Application Performance.md | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) 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 99086f1163..9765949a2e 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -1,16 +1,20 @@ -translating by ezio - 10 Tips for 10x Application Performance + +将程序性能提高十倍的10条建议 ================================================================================ 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. +提高web 应用的性能从来没有比现在更关键过。网络经济的比重一直在增长;全球经济超过5% 的价值是在因特网上产生的(数据参见下面的资料)。我们的永远在线、超级连接的世界意味着用户的期望值也处于历史上的最高点。如果你的网站不能及时的响应,或者你的app 不能无延时的工作,用户会很快的投奔到你的竞争对手那里。 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. +举一个例子,一份亚马逊十年前做过的研究可以证明,甚至在那个时候,网页加载时间每减少100毫秒,收入就会增加1%。另一个最近的研究特别强调一个事实,即超过一半的网站拥有着在调查中说他们会因为应用程序性能的问题流失用户。 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. +网站到底需要多块呢?对于页面加载,每增加1秒钟就有4%的用户放弃使用。顶级的电子商务站点的页面在第一次交互时可以做到1秒到3秒加载时间,而这是提供最高舒适度的速度。很明显这种利害关系对于web 应用来说很高,而且在不断的增加。 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. +想要提高效率很简单,但是看到实际结果很难。要在旅途上帮助你,这篇blog 会给你提供10条最高可以10倍的提升网站性能的建议。这是系列介绍提高应用程序性能的第一篇文章,包括测试充分的优化技术和一点NGIX 的帮助。这个系列给出了潜在的提高安全性的帮助。 -### Tip #1: Accelerate and Secure Applications with a Reverse Proxy Server ### +### Tip #1: 通过反向代理来提高性能和增加安全性 ### 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.) @@ -32,7 +36,7 @@ NGINX software is specifically designed for use as a reverse proxy server, with ![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 ### +### Tip #2: 添加负载平衡 ### 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. @@ -46,7 +50,7 @@ The same server or servers used for load balancing can also handle several other 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 ### +### Tip #3: 缓存静态和动态的内容 ### 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. @@ -75,7 +79,7 @@ For more information on caching with NGINX, see the [reference documentation][20 **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 ### +### Tip #4: 压缩数据 ### 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. @@ -87,7 +91,7 @@ If you use SSL, compression reduces the amount of data that has to be SSL-encode 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 ### +### Tip #5: 优化 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. @@ -108,7 +112,7 @@ In addition, see [this blog post][30] for details on ways to increase SSL/TLS pe 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 ### +### Tip #6: 使用 HTTP/2 或 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. @@ -128,7 +132,7 @@ As an example of support for these protocols, NGINX has supported SPDY from earl 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 ### +### Tip #7: 升级软件版本 ### 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. @@ -138,7 +142,7 @@ Staying with older software can also prevent you from taking advantage of new ca 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 ### +### Tip #8: linux 系统性能调优 ### 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. @@ -150,7 +154,7 @@ Linux optimizations are web server-specific. Using NGINX as an example, here are 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 ### +### Tip #9: web 服务器性能调优 ### 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: @@ -169,7 +173,7 @@ Whatever web server you use, you need to tune it for web application performance See this [blog post][45] for more details on tuning NGINX. -### Tip #10: Monitor Live Activity to Resolve Issues and Bottlenecks ### +### Tip #10: 监视系统活动来解决问题和瓶颈 ### 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. From d4764701e186dc6a846e0540928ff9a026bc42e4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 22 Nov 2015 22:12:25 +0800 Subject: [PATCH 0356/1710] Update 20151028 10 Tips for 10x Application Performance.md --- ...10 Tips for 10x Application Performance.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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 9765949a2e..84a046c682 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -17,20 +17,33 @@ Wanting to improve performance is easy, but actually seeing results is difficult ### Tip #1: 通过反向代理来提高性能和增加安全性 ### 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.) +如果你的web 应用运行在单个机器上,那么这个办法会明显的提升性能:只需要添加一个更快的机器,更好的处理器,更多的内存,更快的磁盘阵列,等等。然后新机器就可以更快的运行你的WordPress 服务器, Node.js 程序, Java 程序,以及其它程序。(如果你的程序要访问数据库服务器,那么这个办法还是很简单:添加两个更快的机器,以及在两台电脑之间使用一个更快的链路。) 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. +问题是,机器速度可能并不是问题。web 程序运行慢经常是因为计算机一直在不同的任务之间切换:和用户的成千上万的连接,从磁盘访问文件,运行代码,等等。应用服务器可能会抖动-内存不足,将内存数据写会磁盘,以及多个请求等待一个任务完成,如磁盘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. +你可以采取一个完全不同的方案来替代升级硬件:添加一个反向代理服务器来分担部分任务。[反向代理服务器][1] 位于运行应用的机器的前端,是用来处理网络流量的。只有反向代理服务器是直接连接到互联网的;和程序的通讯都是通过一个快速的内部网络完成的。 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. +使用反向代理服务器可以将应用服务器从等待用户与web 程序交互解放出来,这样应用服务器就可以专注于为反向代理服务器构建网页,让其能够传输到互联网上。而应用服务器就不需要在能带客户端的响应,可以运行与接近优化过的性能水平。 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. +添加方向代理服务器还可以给你的web 服务器安装带来灵活性。比如,一个已知类型的服务器已经超载了,那么就可以轻松的添加另一个相同的服务器;如果某个机器宕机了,也可以很容易的被替代。 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. +- **Load balancing** (参见 [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** (参见 [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. From 50438a3535f4260c330f74586fec2f22e01b12bf Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 22 Nov 2015 22:14:03 +0800 Subject: [PATCH 0357/1710] Update 20151028 10 Tips for 10x Application Performance.md --- .../tech/20151028 10 Tips for 10x Application Performance.md | 2 +- 1 file changed, 1 insertion(+), 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 84a046c682..8e696a12ae 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -235,7 +235,7 @@ We hope you try out these techniques for yourself. We want to hear the kind of a 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) +译者:[Ezio]](https://github.com/oska874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 053330a32942b937892fb5d7675d2edc13e2d2f6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Nov 2015 23:23:49 +0800 Subject: [PATCH 0358/1710] 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 0359/1710] 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 3d6c93c457e15e06b9f84951e2efc18d6e506b81 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 22 Nov 2015 23:45:35 +0800 Subject: [PATCH 0360/1710] tips 1 done --- .../20151028 10 Tips for 10x Application Performance.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 8e696a12ae..e967a94e02 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -34,18 +34,19 @@ Adding a reverse proxy server also adds flexibility to your web server setup. Fo Because of the flexibility it provides, a reverse proxy server is also a prerequisite for many other performance-boosting capabilities, such as: 因为反向代理带来的灵活性,所以方向代理也是一些性能加速功能的必要前提,比如: -- **Load balancing** (参见 [Tip #2][2]) – 负载均衡运行在方向代理服务器上,用来将流量均衡分配给一批应用。有了合适的负载均衡,你就可以在不改变程序的前提下添加应用服务器。 +- **负载均衡** (参见 [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** (参见 [Tip #3][3]) – 直接读取的文件,比如图像或者代码,可以保存在方向代理服务器,然后直接发给客户端,这样就可以提高速度、分担应用服务器的负载,可以让应用运行的更快 +- **缓存静态文件** (参见 [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 软件是一个专门设计的反响代理服务器,也包含了上述的多种功能。NGINX 使用事件驱动的方式处理问题,着回避传统的服务器更加有效率。NGINX plus 天价了更多高级的反向代理特性,比如程序[健康度检查][4],专门用来处理request 路由,高级缓冲和相关支持。 ![NGINX Worker Process helps increase application performance](https://www.nginx.com/wp-content/uploads/2015/10/Graph-11.png) From 838a0e1353f06b48636b28aa2162887a7936f6a9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Nov 2015 23:50:15 +0800 Subject: [PATCH 0361/1710] 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 From 7feb1a38e32e9b146ffc71aa6f149278b40ee84f Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 23 Nov 2015 00:09:51 +0800 Subject: [PATCH 0362/1710] tips 2 done --- .../20151028 10 Tips for 10x Application Performance.md | 7 +++++++ 1 file changed, 7 insertions(+) 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 e967a94e02..e40c6bdc5b 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -53,16 +53,22 @@ NGINX 软件是一个专门设计的反响代理服务器,也包含了上述 ### Tip #2: 添加负载平衡 ### 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. +添加一个[负载均衡服务器][5] 是一个相当简单的用来提高性能和网站安全性的的方法。使用负载均衡讲流量分配到多个服务器,是用来替代只使用一个巨大且高性能web 服务器的方案。即使程序写的不好,或者在扩容方面有困难,只使用负载均衡服务器就可以很好的提高用户体验。 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. +负载均衡服务器首先是一个反响代理服务器(参见[Tip #1][6])——它接收来自互联网的流量,然后转发请求给另一个服务器。小戏法是负载均衡服务器支持两个或多个应用服务器,使用[分配算法][7]将请求转发给不同服务器。最简单的负载均衡方法是轮转法,只需要将新的请求发给列表里的下一个服务器。其它的方法包括将请求发给负载最小的活动连接。NGINX plus 拥有将特定用户的会话分配给同一个服务器的[能力][8]. 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. +可以进行负载均衡的协议包括HTTP, HTTPS, SPDY, HTTP/2, WebSocket,[FastCGI][9],SCGI,uwsgi, memcached,以及集中其它的应用类型,包括采用TCP 第4层协议的程序。分析你的web 应用来决定那些你要使用以及那些地方的性能不足。 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. +相同的服务器或服务器群可以被用来进行负载均衡,也可以用来处理其它的任务,如SSL 终止,提供对客户端使用的HTTP/1/x 和 HTTP/2 ,以及缓存静态文件。 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. +NGINX 经常被用来进行负载均衡;要想了解更多的情况可以访问我们的[overview blog post][10], [configuration blog post][11], [ebook][12] 以及相关网站 [webinar][13], 和 [documentation][14]。我们的商业版本 [NGINX Plus][15] 支持更多优化了的负载均衡特性,如基于服务器响应时间的加载路由和Microsoft’s NTLM 协议上的负载均衡。 ### Tip #3: 缓存静态和动态的内容 ### @@ -295,3 +301,4 @@ via: https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=to [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/ + From 4b96693e9fe5991d1d36c564dfc288fbb145f4d0 Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 23 Nov 2015 00:35:01 +0800 Subject: [PATCH 0363/1710] update --- .../20151028 10 Tips for 10x Application Performance.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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 e40c6bdc5b..27881a2b5b 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -73,19 +73,28 @@ NGINX 经常被用来进行负载均衡;要想了解更多的情况可以访 ### Tip #3: 缓存静态和动态的内容 ### 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. +缓存通过加速内容的传输速度来提高web 应用的性能。它可以采用一下集中策略:当需要的时候预处理要传输的内容,保存数据到速度更快的设备,把数据存储在距离客户端更近的位置,或者结合起来使用。 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. +- **静态内容缓存**。不经常变化的文件,比如图像(JPEG,PNG) 和代码(CSS,JavaScript),可以保存在边缘服务器,这样就可以快速的从内存和磁盘上提取。 - **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. +- **动态内容缓存**。很多web 应用回针对每个网页请求生成不同的HTML 页面。在短时间内简单的缓存每个生成HTML 内容,就可以很好的减少要生成的内容的数量,这完全可以达到你的要求。 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. +举个例子,如果一个页面每秒会被浏览10次,你将它缓存1 秒,99%请求的页面都会直接从缓存提取。如果你将将数据分成静态内容,甚至新生成的页面可能都是由这些缓存构成的。 There are three main techniques for caching content generated by web applications: +下面由是web 应用发明的三种主要的缓存技术: - **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. From 98e4c3d9f04783565e992d4c41a7f93d6462f606 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Nov 2015 09:50:30 +0800 Subject: [PATCH 0364/1710] =?UTF-8?q?20151123-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ve Adserver on Ubuntu 15.04 or CentOS 7.md | 242 ++++++++++++++++++ ... Fedora or CentOS or RHEL or Arch Linux.md | 148 +++++++++++ 2 files changed, 390 insertions(+) create mode 100644 sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md create mode 100644 sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md diff --git a/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..3b6277da80 --- /dev/null +++ b/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,242 @@ +How to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 +================================================================================ +Revive AdserverHow to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 is a free and open source advertisement management system that enables publishers, ad networks and advertisers to serve ads on websites, apps, videos and manage campaigns for multiple advertiser with many features. Revive Adserver is licensed under GNU Public License which is also known as OpenX Source. It features an integrated banner management interface, URL targeting, geo-targeting and tracking system for gathering statistics. This application enables website owners to manage banners from both in-house advertisement campaigns as well as from paid or third-party sources, such as Google's AdSense. Here, in this tutorial, we'll gonna install Revive Adserver in our machine running Ubuntu 15.04 or CentOS 7. + +### 1. Installing LAMP Stack ### + +First of all, as Revive Adserver requires a complete LAMP Stack to work, we'll gonna install it. LAMP Stack is the combination of Apache Web Server, MySQL/MariaDB Database Server and PHP modules. To run Revive properly, we'll need to install some PHP modules like apc, zlib, xml, pcre, mysql and mbstring. To setup LAMP Stack, we'll need to run the following command with respect to the distribution of linux we are currently running. + +#### On Ubuntu 15.04 #### + + # apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libapache2-mod-php5 zip + +#### On CentOS 7 #### + + # yum install httpd mariadb php php-gd php-mysql php-curl php-mbstring php-xml php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev zip + +### 2. Starting Apache and MariaDB server ### + +We’ll now start our newly installed Apache web server and MariaDB database server in our linux machine. To do so, we'll need to execute the following commands. + +#### On Ubuntu 15.04 #### + +Ubuntu 15.04 is shipped with Systemd as its default init system, so we'll need to execute the following commands to start apache and mariadb daemons. + + # systemctl start apache2 mysql + +After its started, we'll now make it able to start automatically in every system boot by running the following command. + + # systemctl enable apache2 mysql + + Synchronizing state for apache2.service with sysvinit using update-rc.d... + Executing /usr/sbin/update-rc.d apache2 defaults + Executing /usr/sbin/update-rc.d apache2 enable + Synchronizing state for mysql.service with sysvinit using update-rc.d... + Executing /usr/sbin/update-rc.d mysql defaults + Executing /usr/sbin/update-rc.d mysql enable + +#### On CentOS 7 #### + +Also in CentOS 7, systemd is the default init system so, we'll run the following command to start them. + + # systemctl start httpd mariadb + +Next, we'll enable them to start automatically in every startup of init system using the following command. + + # systemctl enable httpd mariadb + + ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' + ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' + +### 3. Configuring MariaDB ### + +#### On CentOS 7/Ubuntu 15.04 #### + +Now, as we are starting MariaDB for the first time and no password has been assigned for MariaDB so, we’ll first need to configure a root password for it. Then, we’ll gonna create a new database so that it can store data for our Revive Adserver installation. + +To configure MariaDB and assign a root password, we’ll need to run the following command. + + # mysql_secure_installation + +This will ask us to enter the password for root but as we haven’t set any password before and its our first time we’ve installed mariadb, we’ll simply press enter and go further. Then, we’ll be asked to set root password, here we’ll hit Y and enter our password for root of MariaDB. Then, we’ll simply hit enter to set the default values for the further configurations. + + …. + so you should just press enter here. + + 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! + … + installation should now be secure. + Thanks for using MariaDB! + +![Configuring MariaDB](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-mariadb.png) + +### 4. Creating new Database ### + +After we have assigned the password to our root user of mariadb server, we'll now create a new database for Revive Adserver application so that it can store its data into the database server. To do so, first we'll need to login to our MariaDB console by running the following command. + + # mysql -u root -p + +Then, it will ask us to enter the password of root user which we had just set in the above step. Then, we'll be welcomed into the MariaDB console in which we'll create our new database, database user and assign its password and grant all privileges to create, remove and edit the tables and data stored in it. + + > CREATE DATABASE revivedb; + > CREATE USER 'reviveuser'@'localhost' IDENTIFIED BY 'Pa$$worD123'; + > GRANT ALL PRIVILEGES ON revivedb.* TO 'reviveuser'@'localhost'; + > FLUSH PRIVILEGES; + > EXIT; + +![Creating Mariadb Revive Database](http://blog.linoxide.com/wp-content/uploads/2015/11/creating-mariadb-revive-database.png) + +### 5. Downloading Revive Adserver Package ### + +Next, we'll download the latest release of Revive Adserver ie version 3.2.2 in the time of writing this article. So, we'll first get the download link from the official Download Page of Revive Adserver ie [http://www.revive-adserver.com/download/][1] then we'll download the compressed zip file using wget command under /tmp/ directory as shown bellow. + + # cd /tmp/ + # wget http://download.revive-adserver.com/revive-adserver-3.2.2.zip + + --2015-11-09 17:03:48-- http://download.revive-adserver.com/revive-adserver-3.2.2.zip + Resolving download.revive-adserver.com (download.revive-adserver.com)... 54.230.119.219, 54.239.132.177, 54.230.116.214, ... + Connecting to download.revive-adserver.com (download.revive-adserver.com)|54.230.119.219|:80... connected. + HTTP request sent, awaiting response... 200 OK + Length: 11663620 (11M) [application/zip] + Saving to: 'revive-adserver-3.2.2.zip' + revive-adserver-3.2 100%[=====================>] 11.12M 1.80MB/s in 13s + 2015-11-09 17:04:02 (906 KB/s) - 'revive-adserver-3.2.2.zip' saved [11663620/11663620] + +After the file is downloaded, we'll simply extract its files and directories using unzip command. + + # unzip revive-adserver-3.2.2.zip + +Then, we'll gonna move the entire Revive directories including every files from /tmp to the default webroot of Apache Web Server ie /var/www/html/ directory. + + # mv revive-adserver-3.2.2 /var/www/html/reviveads + +### 6. Configuring Apache Web Server ### + +We'll now configure our Apache Server so that revive will run with proper configuration. To do so, we'll create a new virtualhost by creating a new configuration file named reviveads.conf . The directory here may differ from one distribution to another, here is how we create in the following distributions of linux. + +#### On Ubuntu 15.04 #### + + # touch /etc/apache2/sites-available/reviveads.conf + # ln -s /etc/apache2/sites-available/reviveads.conf /etc/apache2/sites-enabled/reviveads.conf + # nano /etc/apache2/sites-available/reviveads.conf + +Now, we'll gonna add the following lines of configuration into this file using our favorite text editor. + + + ServerAdmin info@reviveads.linoxide.com + DocumentRoot /var/www/html/reviveads/ + ServerName reviveads.linoxide.com + ServerAlias www.reviveads.linoxide.com + + Options FollowSymLinks + AllowOverride All + + ErrorLog /var/log/apache2/reviveads.linoxide.com-error_log + CustomLog /var/log/apache2/reviveads.linoxide.com-access_log common + + +![Configuring Apache2 Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-apache2-ubuntu.png) + +After done, we'll gonna save the file and exit our text editor. Then, we'll restart our Apache Web server. + + # systemctl restart apache2 + +#### On CentOS 7 #### + +In CentOS, we'll directly create the file reviveads.conf under /etc/httpd/conf.d/ directory using our favorite text editor. + + # nano /etc/httpd/conf.d/reviveads.conf + +Then, we'll gonna add the following lines of configuration into the file. + + + ServerAdmin info@reviveads.linoxide.com + DocumentRoot /var/www/html/reviveads/ + ServerName reviveads.linoxide.com + ServerAlias www.reviveads.linoxide.com + + Options FollowSymLinks + AllowOverride All + + ErrorLog /var/log/httpd/reviveads.linoxide.com-error_log + CustomLog /var/log/httpd/reviveads.linoxide.com-access_log common + + +![Configuring httpd Centos](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-httpd-centos.png) + +Once done, we'll simply save the file and exit the editor. And then, we'll gonna restart our apache web server. + + # systemctl restart httpd + +### 7. Fixing Permissions and Ownership ### + +Now, we'll gonna fix some file permissions and ownership of the installation path. First, we'll gonna set the ownership of the installation directory to Apache process owner so that apache web server will have full access of the files and directories to edit, create and delete. + +#### On Ubuntu 15.04 #### + + # chown www-data: -R /var/www/html/reviveads + +#### On CentOS 7 #### + + # chown apache: -R /var/www/html/reviveads + +### 8. Allowing Firewall ### + +Now, we'll gonna configure our firewall programs to allow port 80 (http) so that our apache web server running Revive Adserver will be accessible from other machines in the network across the default http port ie 80. + +#### On Ubuntu 15.04/CentOS 7 #### + +As CentOS 7 and Ubuntu 15.04 both 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 following commands. + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 9. Web Installation ### + +Finally, after everything is done as expected, we'll now be able to access the web interface of the application using a web browser. We can go further towards the web installation, by pointing the web browser to the web server we are running in our linux machine. To do so, we'll need to point our web browser to http://ip-address/ or http://domain.com assigned to our linux machine. Here, in this tutorial, we'll point our browser to http://reviveads.linoxide.com/ . + +Here, we'll see the Welcome page of the installation of Revive Adserver with the GNU General Public License V2 as Revive Adserver is released under this license. Then, we'll simply click on I agree button in order to continue the installation. + +In the next page, we'll need to enter the required database information in order to connect Revive Adserver with the MariaDB database server. Here, we'll need to enter the database name, user and password that we had set in the above step. In this tutorial, we entered database name, user and password as revivedb, reviveuser and Pa$$worD123 respectively then, we set the hostname as localhost and continue further. + +![Configuring Revive Adserver](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-revive-adserver.png) + +We'll now enter the required information like administration username, password and email address so that we can use these information to login to the dashboard of our Adserver. After done, we'll head towards the Finish page in which we'll see that we have successfully installed Revive Adserver in our server. + +Next, we'll be redirected to the Adverstiser page where we'll add new Advertisers and manage them. Then, we'll be able to navigate to our Dashboard, add new users to the adserver, add new campaign for our advertisers, banners, websites, video ads and everything that its built with. + +For enabling more configurations and access towards the administrative settings, we can switch our Dashboard user to the Administrator account. This will add new administrative menus in the dashboard like Plugins, Configuration through which we can add and manage plugins and configure many features and elements of Revive Adserver. + +### Conclusion ### + +In this article, we learned some information on what is Revive Adserver and how we can setup on linux machine running Ubuntu 15.04 and CentOS 7 distributions. Though Revive Adserver's initial source code was bought from OpenX, currently the code base for OpenX Enterprise and Revive Adserver are completely separate. To extend more features, we can install more plugins which we can also find from [http://www.adserverplugins.com/][2] . Really, this piece of software has changed the way of managing the ads for websites, apps, videos and made it very easy and efficient. 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-revive-adserver-ubuntu-15-04-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.revive-adserver.com/download/ +[2]:http://www.adserverplugins.com/ \ No newline at end of file diff --git a/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md b/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md new file mode 100644 index 0000000000..3f2f392efb --- /dev/null +++ b/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md @@ -0,0 +1,148 @@ +How to Install Cockpit in Fedora / CentOS / RHEL/ Arch Linux +================================================================================ +Cockpit is a free and open source server management software that makes us easy to administer our GNU/Linux servers via its beautiful web interface frontend. Cockpit helps make linux system administrator, system maintainers and DevOps easy to manage their server and to perform simple tasks, such as administering storage, inspecting journals, starting and stopping services and more. Its journal interface adds aroma in flower making people easy to switch between the terminal and web interface. And moreover, it makes easy to manage not only one server but several multiple networked servers from a single place at the same time with just a single click. It is very light weight and has easy to use web based interface. In this tutorial, we'll learn how we can setup Cockpit and use it to manage our server running Fedora, CentOS, Arch Linux and RHEL distributions as their operating system software. Some of the awesome benefits of Cockpit in our GNU/Linux servers are as follows: + +1. It consist of systemd service manager for ease. +1. It has a Journal log viewer to perform troubleshoots and log analysis. +1. Storage setup including LVM was never easier before. +1. Basic Network configuration can be applied with Cockpit +1. We can easily add and remove local users and manage multiple servers. + +### 1. Installing Cockpit ### + +First of all, we'll need to setup Cockpit in our linux based server. In most of the distributions, the cockpit package is already available in their official repositories. Here, in this tutorial, we'll setup Cockpit in Fedora 22, CentOS 7, Arch Linux and RHEL 7 from their official repositories. + +#### On CentOS / RHEL #### + +Cockpit is available in the official repository of CenOS and RHEL. So, we'll simply install it using yum manager. To do so, we'll simply run the following command under sudo/root access. + + # yum install cockpit + +![Install Cockpit Centos](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-centos.png) + +#### On Fedora 22/21 #### + +Alike, CentOS, it is also available by default in Fedora's official repository, we'll simply install cockpit using dnf package manager. + + # dnf install cockpit + +![Install Cockpit Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-fedora.png) + +#### On Arch Linux #### + +Cockpit is currently not available in the official repository of Arch Linux but it is available in the Arch User Repository also know as AUR. So, we'll simply run the following yaourt command to install it. + + # yaourt cockpit + +![Install Cockpit Archlinux](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-archlinux.png) + +### 2. Starting and Enabling Cockpit ### + +After we have successfully installed it, we'll gonna start the cockpit server with our service/daemon manager. As of 2015, most of the linux distributions have adopted Systemd whereas some of the linux distributions still run SysVinit to manage daemon, but Cockpit uses systemd for almost everything from running daemons to services. So, we can only setup Cockpit in the latest releases of linux distributions running Systemd. In order to start Cockpit and make it start in every boot of the system, we'll need to run the following command in a terminal or a console. + + # systemctl start cockpit + + # systemctl enable cockpit.socket + + Created symlink from /etc/systemd/system/sockets.target.wants/cockpit.socket to /usr/lib/systemd/system/cockpit.socket. + +### 3. Allowing Firewall ### + +After we have started our cockpit server and enable it to start in every boot, we'll now go for configuring firewall. As we have firewall programs running in our server, we'll need to allow ports in order to make cockpit accessible outside of the server. + +#### On Firewalld #### + + # firewall-cmd --add-service=cockpit --permanent + + success + + # firewall-cmd --reload + + success + +![Cockpit Allowing Firewalld](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-allowing-firewalld.png) + +#### On Iptables #### + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + + # service iptables save + +### 4. Accessing Cockpit Web Interface ### + +Next, we'll gonna finally access the Cockpit web interface using a web browser. We'll simply need to point our web browser to https://ip-address:9090 or https://server.domain.com:9090 according to the configuration. Here, in our tutorial, we'll gonna point our browser to https://128.199.114.17:9090 as shown in the image below. + +![Cockpit Webserver SSL Proceed](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-webserver-ssl-proceed.png) + +We'll be displayed an SSL certification warning as we are using a self-signed SSL certificate. So, we'll simply ignore it and go forward towards the login page, in chrome/chromium, we'll need to click on Show Advanced and then we'll need to click on **Proceed to 128.199.114.17 (unsafe)** . + +![Cockpit Login Screen](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-login-screen.png) + +Now, we'll be asked to enter the login details in order to enter into the dashboard. Here, the username and password is the same as that of the login details we use to login to our linux server. After we enter the login details and click on Log In button, we will be welcomed into the Cockpit Dashboard. + +![Cockpit Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-dashboard.png) + +Here, we'll see all the menu and visualization of CPU, Disk, Network, Storage usages of the server. We'll see the dashboard as shown above. + +#### Services #### + +To manage services, we'll need to click on Services button on the menu situated in the right side of the web page. Then, we'll see the services under 5 categories, Targets, System Services, Sockets, Timers and Paths. + +![Cockpit Services](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-services.png) + +#### Docker Containers #### + +We can even manage docker containers with Cockpit. It is pretty easy to monitor and administer Docker containers with Cockpit. As docker isn't installed and running in our server, we'll need to click on Start Docker. + +![Cockpit Container](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-container.png) + +Cockpit will automatically install and run docker in our server. After its running, we see the following screen. Then, we can manage the docker images, containers as per our requirement. + +![Cockpit Containers Mangement](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-containers-mangement.png) + +#### Journal Log Viewer #### + +Cockpit has a managed log viewer which separates the Errors, Warnings, Notices into different tabs. And we also have a tab All where we can see them all in a single place. + +![Cockpit Journal Logs](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-journal-logs.png) + +#### Networking #### + +Under the networking section, we see two graphs in which there is the visualization of Sending and Receiving speed. And we can see there the list of available interfaces with option to Add Bond, Bridge, VLAN. If we need to configure an interface, we can do so by simply clicking on the interface name. Below everything, we can see the Journal Log Viewer for Networking. + +![Cockpit Network](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-network.png) + +#### Storage #### + +Now, its easy with Cockpit to see the R/W speed of our hard disk. We can see the Journal log of the Storage in order to perform troubleshoot and fixes. A clear visualization bar of how much space is occupied is shown in the page. We can even Unmount, Format, Delete a partition of a Hard Disk and more. Features like creating RAID Device, Volume Group is also available in it. + +![Cockpit Storage](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-storage.png) + +#### Account Management #### + +We can easily create new accounts with Cockpit Web Interface. The accounts created in it is applied to the system's user account. We can change password, specify roles, delete, rename user accounts with it. + +![Cockpit Accounts](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-accounts.png) + +#### Live Terminal #### + +This is an awesome feature built-in with Cockpit. Yes, we can execute commands, do stuffs with the live terminal provided by Cockpit interface. This makes us really easy to switch between the web interface and terminal according to our need. + +![Cockpit Terminal](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-terminal.png) + +### Conclusion ### + +Cockpit is a good free and open source software developed by [Red Hat][1] for making the server management easy and simple. It is best for performing simple system administration tasks and is good for the new system administrators. It is still under pre-release as its stable release hasn't been released yet. So, it is not suitable for production. It is currently developed on the latest release of Fedora, CentOS, Arch Linux, RHEL where systemd is installed by default. If you are willing to install Cockpit in Ubuntu, you can get the PPA access but is currently outdated. 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-cockpit-fedora-centos-rhel-arch-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://www.redhat.com/ \ No newline at end of file From ff441bdb17853306475eae063526f4e49c07634a Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 23 Nov 2015 10:01:57 +0800 Subject: [PATCH 0365/1710] tip 3 done --- .../20151028 10 Tips for 10x Application Performance.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 27881a2b5b..143528a16f 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -97,16 +97,22 @@ There are three main techniques for caching content generated by web application - **从过载服务器拿走数据**。机器经常因为要完成某些其它的任务而造成某个任务的执行速度比测试结果要差。将数据缓存在不同的机器上可以提高缓存资源和非缓存资源的效率,而这知识因为主机没有被过度使用。 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. +对web 应用的缓存机制可以web 应用服务器内部实现。第一,缓存动态内容是用来减少应用服务器加载动态内容的时间。然后,缓存静态内容(包括动态内容的临时拷贝)是为了更进一步的分担应用服务器的负载。而且缓存之后会从应用服务器转移到对用户而言更快、更近的机器,从而减少应用服务器的压力,减少提取数据和传输数据的时间。 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. +改进过的缓存方案可以极大的提高应用的速度。对于大多数网页来说,静态数据,比如大图像文件,构成了超过一半的内容。如果没有缓存,那么这可能会花费几秒的时间来提取和传输这类数据,但是采用了缓存之后不到1秒就可以完成。 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 和NGINX Plus使用了两条指令来[设置缓存机制][16]:proxy_cache_path 和 proxy_cache。你可以指定缓存的位置和大小,文件在缓存中保存的最长时间和其他一些参数。使用第三条(而且是相当受欢迎的一条)指令,proxy_cache_use_stale,如果服务器提供新鲜内容是忙或者挂掉之类的信息,你甚至可以让缓存提供旧的内容,这样客户端就不会一无所得。从用户的角度来看这可以很好的提高你的网站或者应用的上线时间。 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. +NGINX plus 拥有[高级缓存特性][17],包括对[缓存清除][18]的支持和在[仪表盘][19]上显示缓存状态信息。 For more information on caching with NGINX, see the [reference documentation][20] and [NGINX Content Caching][21] in the NGINX Plus Admin Guide. +要想获得更多关于NGINX 的缓存机制的信息可以浏览NGINX Plus 管理员指南中的 [reference documentation][20] 和 [NGINX Content Caching][21] 。 -**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. +**Note**: Caching crosses 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. +**注意**:缓存机制分布于应用开发者、投资决策者以及实际的系统运维人员之间。本文提到的一些复杂的缓存机制从[DevOps 的角度][22]来看很具有价值,即对集应用开发者、架构师以及运维操作人员的功能为一体的工程师来说可以满足他们对站点功能性、响应时间、安全性和商业结果,如完成的交易数。 ### Tip #4: 压缩数据 ### @@ -310,4 +316,3 @@ via: https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=to [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/ - From b0a0b404e9de349ad4099e5ad6cf7b26803159ee Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Nov 2015 10:24:25 +0800 Subject: [PATCH 0366/1710] =?UTF-8?q?20151123-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...onfigure Apache Solr on Ubuntu 14 or 15.md | 133 +++++++++++++++++ ...roid Studio on Ubuntu 15.04 or CentOS 7.md | 139 ++++++++++++++++++ 2 files changed, 272 insertions(+) create mode 100644 sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md create mode 100644 sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md diff --git a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md new file mode 100644 index 0000000000..e73bdbeb0a --- /dev/null +++ b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md @@ -0,0 +1,133 @@ +How to Configure Apache Solr on Ubuntu 14 / 15 +================================================================================ +Hello and welcome to our today's article on Apache Solr. The brief description about Apache Solr is that it is an Open Source most famous search platform with Apache Lucene at the back end for Web sites that enables you to easily create search engines which searches websites, databases and files. It can index and search multiple sites and return recommendations for related contents based on the searched text. + +Solr works with HTTP Extensible Markup Language (XML) that offers application program interfaces (APIs) for Javascript Object Notation, Python, and Ruby. According to the Apache Lucene Project, Solr offers capabilities that have made it popular with administrators including it many featuring like: + +- Full Text Search +- Faceted Navigation +- Snippet generation/highting +- Spell Suggestion/Auto complete +- Custom document ranking/ordering + +#### Prerequisites: #### + +On a fresh Linux Ubuntu 14/15 with minimal packages installed, you only have to take care of few prerequisites in order to install Apache Solr. + +### 1)System Update ### + +Login to your Ubuntu server with a non-root sudo user that will be used to perform all the steps to install and use Solr. + +After successful login, issue the following command to update your system with latest updates and patches. + + $ sudo apt-get update + +### 2) JRE Setup ### + +The Solr setup needs Java Runtime Environment to be installed on the system as its basic requirement because solr and tomcat both are the Java based applications. So, we need to install and configure its home environment with latest Java. + +To install the latest version on Oracle Java 8, we need to install Python Software Properties using the below command. + + $ sudo apt-get install python-software-properties + +Upon completion, run the setup its the repository for the latest version of Java 8. + + $ sudo add-apt-repository ppa:webupd8team/java + +Now you are able to install the latest version of Oracle Java 8 with 'wget' by issuing the below commands to update the packages source list and then to install Java. + + $ sudo apt-get update + +---------- + + $ sudo apt-get install oracle-java8-installer + +Accept the Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX as you will be asked during the Java installation and configuration process by a click on the 'OK' button. + +When the installation process complete, run the below command to test the successful installation of Java and check its version. + + kash@solr:~$ java -version + java version "1.8.0_66" + Java(TM) SE Runtime Environment (build 1.8.0_66-b17) + Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) + +The output indicates that we have successfully fulfilled the basic requirement of Solr by installing the Java. Now move to the next step to install Solr. + +### Installing Solr ### + +Installing Solr on Ubuntu can be done by using two different ways but in this article we prefer to install its latest package from the source. + +To install Solr from its source, download its available package with latest version from there Official [Web Page][1], copy the link address and get it using 'wget' command. + + $ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz + +Run the command below to extract the archived service into '/bin' folder. + + $ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2 + +Then run the script to start Solr service that will creates a new 'solr' user and then installs solr as a service. + + $ sudo bash ./install_solr_service.sh solr-5.3.1.tgz + +![Solr Installation](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) + +To check the status of Solr service, you use the below command. + + $ service solr status + +![Solr Status](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) + +### Creating Solr Collection: ### + +Now we can create multiple collections using Solr user. To do so just run the below command by mentioning the name of the collection you want to create and by specifying its configuration set as shown. + + $ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs" + +![creating collection](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) + +We have successfully created the new core instance directory for our our first collection where we can add new data in it. To view its default schema file in directory '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' . + +### Using Solr Web ### + +Apache Solr can be accessible on the default port of Solr that 8983. Open your favorite browser and navigate to http://your_server_ip:8983/solr or http://your-domain.com:8983/solr. Make sure that the port is allowed in your firewall. + + http://172.25.10.171:8983/solr/ + +![Solr Web Access](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) + +From the Solr Web Console click on the 'Core Admin' button from the left bar, then you will see your first collection that we created earlier using CLI. While you can also create new cores by pointing on the 'Add Core' button. + +![Adding Core](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) + +You can also add the document and query from the document as shown in below image by selecting your particular collection and pointing the document. Add the data in the specified format as shown in the box. + + { + "number": 1, + "Name": "George Washington", + "birth_year": 1989, + "Starting_Job": 2002, + "End_Job": "2009-04-30", + "Qualification": "Graduation", + "skills": "Linux and Virtualization" + } + +After adding the document click on the 'Submit Document' button. + +![adding Document](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) + +### Conclusion ### + +You are now able to insert and query data using the Solr web interface after its successful installation on Ubuntu. Now add more collections and insert you own data and documents that you wish to put and manage through Solr. We hope you have got this article much helpful and enjoyed reading this. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ + +作者:[Kashif][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://lucene.apache.org/solr/ \ No newline at end of file diff --git a/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..29569329c9 --- /dev/null +++ b/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,139 @@ +How to install Android Studio on Ubuntu 15.04 / CentOS 7 +================================================================================ +With the advancement of smart phones in the recent years, Android has become one of the biggest phone platforms and all the tools required to build Android applications are also freely available. Android Studio is an Integrated Development Environment (IDE) for developing Android applications based on [IntelliJ IDEA][1]. It is a free and open source software by Google released in 2014 and succeeds Eclipse as the main IDE. + +In this article, we will learn how to install Android Studio on Ubuntu 15.04 and CentOS 7. + +### Installation on Ubuntu 15.04 ### + +We can install Android Studio in two ways. One is to set up the required repository and install it; other is to download it from the official Android site and install it locally. In the following example, we will be setting up the repo using command line and install it. Before proceeding, we need to make sure that we have JDK version1.6 or greater installed. + +Here, I'm installing JDK 1.8. + + $ sudo add-apt-repository ppa:webupd8team/java + + $ sudo apt-get update + + $ sudo apt-get install oracle-java8-installer oracle-java8-set-default + +Verify if java installation was successful: + + poornima@poornima-Lenovo:~$ java -version + +Now, setup the repo for installing Android Studio + + $ sudo apt-add-repository ppa:paolorotolo/android-studio + +![Android-Studio-repo](http://blog.linoxide.com/wp-content/uploads/2015/11/Android-studio-repo.png) + + $ sudo apt-get update + + $ sudo apt-get install android-studio + +Above install command will install android-studio in the directory /opt. + +Now, run the following command to start the setup wizard: + + $ /opt/android-studio/bin/studio.sh + +This will invoke the setup screen. Following are the screen shots that follow to set up Android studio: + +![Android Studio setup](http://blog.linoxide.com/wp-content/uploads/2015/11/Studio-setup.png) + +![Install-type](Android Studio setup) + +![Emulator Settings](http://blog.linoxide.com/wp-content/uploads/2015/11/Emulator-settings.png) + +Once you press the Finish button, Licence agreement will be displayed. After you accept the licence, it starts downloading the required components. + +![Download components](http://blog.linoxide.com/wp-content/uploads/2015/11/Download.png) + +Android studio installation will be complete after this step. When you relaunch Android studio, you will be shown the following welcome screen from where you will be able to start working with your Android Studio. + +![Welcome screen](http://blog.linoxide.com/wp-content/uploads/2015/11/Welcome-screen.png) + +### Installation on CentOS 7 ### + +Let us now learn how to install Android Studio on CentOS 7. Here also, you need to install JDK 1.6 or later. Remember to use 'sudo' before the commands if you are not a root user. You can download the [latest version][2] of JDK. In case you already have an older version installed, remove the same before installing the new one. In the below example, I will be installing JDK version 1.8.0_65 by downloading the required rpm. + + [root@li1260-39 ~]# rpm -ivh jdk-8u65-linux-x64.rpm + Preparing... ################################# [100%] + Updating / installing... + 1:jdk1.8.0_65-2000:1.8.0_65-fcs ################################# [100%] + Unpacking JAR files... + tools.jar... + plugin.jar... + javaws.jar... + deploy.jar... + rt.jar... + jsse.jar... + charsets.jar... + localedata.jar... + jfxrt.jar... + +If Java path is not set properly, you will get error messages. Hence, set the correct path: + + export JAVA_HOME=/usr/java/jdk1.8.0_25/ + export PATH=$PATH:$JAVA_HOME + +Check if the correct version has been installed: + + [root@li1260-39 ~]# java -version + java version "1.8.0_65" + Java(TM) SE Runtime Environment (build 1.8.0_65-b17) + Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode) + +If you notice any error message of the sort "unable-to-run-mksdcard-sdk-tool:" while trying to install Android Studio, you might also have to install the following packages on CentOS 7 64-bit: + + glibc.i686 + + glibc-devel.i686 + + libstdc++.i686 + + zlib-devel.i686 + + ncurses-devel.i686 + + libX11-devel.i686 + + libXrender.i686 + + libXrandr.i686 + +Let us know install studio by downloading the ide file from [Android site][3] and unzipping the same. + + [root@li1260-39 tmp]# unzip android-studio-ide-141.2343393-linux.zip + +Move android-studio directory to /opt directory + + [root@li1260-39 tmp]# mv /tmp/android-studio/ /opt/ + +You can create a simlink to the studio executable to quickly start it whenever you need it. + + [root@li1260-39 tmp]# ln -s /opt/android-studio/bin/studio.sh /usr/local/bin/android-studio + +Now launch the studio from a terminal: + + [root@localhost ~]#studio + +The screens that follow for completing the installation are same as the ones shown above for Ubuntu. When the installation completes, you can start creating your own Android applications. + +### Conclusion ### + +Within a year of its release, Android Studio has taken over as the primary IDE for Android development by eclipsing Eclipse. It is the only official IDE tool that will support future Android SDKs and other Android features that will be provided by Google. So, what are you waiting for? Go install Android Studio and have fun developing Android apps. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-android-studio-ubuntu-15-04-centos-7/ + +作者:[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://www.jetbrains.com/idea/ +[2]:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html +[3]:http://developer.android.com/sdk/index.html \ No newline at end of file From 96c9448df87ff6a989c6787855dd03c8f682f218 Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 23 Nov 2015 10:24:25 +0800 Subject: [PATCH 0367/1710] tip 4 done --- .../20151028 10 Tips for 10x Application Performance.md | 7 ++++++- 1 file changed, 6 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 143528a16f..195cb781c2 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -112,19 +112,24 @@ For more information on caching with NGINX, see the [reference documentation][20 要想获得更多关于NGINX 的缓存机制的信息可以浏览NGINX Plus 管理员指南中的 [reference documentation][20] 和 [NGINX Content Caching][21] 。 **Note**: Caching crosses 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. -**注意**:缓存机制分布于应用开发者、投资决策者以及实际的系统运维人员之间。本文提到的一些复杂的缓存机制从[DevOps 的角度][22]来看很具有价值,即对集应用开发者、架构师以及运维操作人员的功能为一体的工程师来说可以满足他们对站点功能性、响应时间、安全性和商业结果,如完成的交易数。 +**注意**:缓存机制分布于应用开发者、投资决策者以及实际的系统运维人员之间。本文提到的一些复杂的缓存机制从[DevOps 的角度][23]来看很具有价值,即对集应用开发者、架构师以及运维操作人员的功能为一体的工程师来说可以满足他们对站点功能性、响应时间、安全性和商业结果,如完成的交易数。 ### Tip #4: 压缩数据 ### 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. +压缩是一个具有很大潜力的提高性能的加速方法。现在已经有一些针对照片(JPEG 和PNG)、视频(MPEG-4)和音乐(MP3)等各类文件精心设计和高压缩率的标准。每一个标准都或多或少的减少了文件的大小。 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. +文本数据 —— 包括HTML(包含了纯文本和HTL 标签),CSS和代码,比如Javascript —— 经常是未经压缩就传输的。压缩这类数据会在对应用程序性能的感觉上,特别是处于慢速或受限的移动网络的客户端,产生不成比例的影响。 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. +这是因为文本数据经常是用户与网页交互的有效数据,而多媒体数据可能更多的是起提供支持或者装饰的作用。聪明的内容压缩可以减少HTML,Javascript,CSS和其他文本内容对贷款的要求,通常可以减少30% 甚至更多的带宽和相应的页面加载时间。 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. +如果你是用SSL,压缩可以减少需要进行SSL 编码的的数据量,而这些编码操作会占用一些CPU时间而抵消了压缩数据减少的时间。 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. +压缩文本数据的方法很多,举个例子,在定义小说文本压缩模式的[HTTP/2 部分]就专门为适应头数据。另一个例子是可以在NGINX 里打开使用GZIP 压缩文本。你在你的服务里[预压缩文本数据][25]之后,你就可以直接使用gzip_static 指令来处理压缩过的.gz 版本。 ### Tip #5: 优化 SSL/TLS ### From 9ff96f3d364d5933e381aca5c454a289e8135848 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Nov 2015 11:21:45 +0800 Subject: [PATCH 0368/1710] =?UTF-8?q?20151123-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...l Microsoft Visual Studio Code on Linux.md | 113 ++++++++++++++++++ ...123 LNAV--Ncurses based log file viewer.md | 83 +++++++++++++ 2 files changed, 196 insertions(+) create mode 100644 sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md create mode 100644 sources/tech/20151123 LNAV--Ncurses based log file viewer.md diff --git a/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md b/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md new file mode 100644 index 0000000000..30257ba0cd --- /dev/null +++ b/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md @@ -0,0 +1,113 @@ +How To Install Microsoft Visual Studio Code on Linux +================================================================================ +Visual Studio code (VScode) is the cross-platform Chromium-based code editor is being open sourced today by Microsoft. How do I install Microsoft Visual Studio Code on a Debian or Ubuntu or Fedora Linux desktop? + +Visual Studio supports debugging Linux apps and code editor now open source by Microsoft. It is a preview (beta) version but you can test it and use it on your own Linux based desktop. + +### Why use Visual Studio Code? ### + +From the project website: + +> Visual Studio Code provides developers with a new choice of developer tool that combines the simplicity and streamlined experience of a code editor with the best of what developers need for their core code-edit-debug cycle. Visual Studio Code is the first code editor, and first cross-platform development tool - supporting OS X, Linux, and Windows - in the Visual Studio family. If you use Unity, ASP.NET 5, NODE.JS or related tool, give it a try. + +### Requirements for Visual Studio Code on Linux ### + +1. Ubuntu Desktop version 14.04 +1. GLIBCXX version 3.4.15 or later +1. GLIBC version 2.15 or later + +The following installation instructions are tested on: + +1. Fedora Linux 22 and 23 +1. Debian Linux 8 +1. Ubuntu Linux 14.04 LTS + +### Download Visual Studio Code ### + +Visit [this page][1] to grab the latest version and save it to ~/Downloads/ folder on Linux desktop: + +![Fig.01: Download Visual Studio Code For Linux](http://s0.cyberciti.org/uploads/faq/2015/11/download-visual-studio-code.jpg) + +Fig.01: Download Visual Studio Code For Linux + +Make a new folder (say $HOME/VSCode) and extract VSCode-linux-x64.zip inside that folder or in /usr/local/ folder. Unzip VSCode-linux64.zip to that folder. + +Make a new folder (say $HOME/VSCode) and extract VSCode-linux-x64.zip inside that folder or in /usr/local/ folder. Unzip VSCode-linux64.zip to that folder. + +### Alternate install method ### + +You can use the wget command to download VScode as follows: + + $ wget 'https://az764295.vo.msecnd.net/public/0.10.1-release/VSCode-linux64.zip' + +Sample outputs: + + --2015-11-18 13:55:23-- https://az764295.vo.msecnd.net/public/0.10.1-release/VSCode-linux64.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: 64638315 (62M) [application/octet-stream] + Saving to: 'VSCode-linux64.zip' + + 100%[======================================>] 64,638,315 84.9MB/s in 0.7s + + 2015-11-18 13:55:23 (84.9 MB/s) - 'VSCode-linux64.zip' saved [64638315/64638315] + +### Install VScode using the command line ### + +Cd to ~/Download/ location, enter: + + $ cd ~/Download/ + $ ls -l + +Sample outputs: + +![Fig.02: VSCode downloaded to my ~/Downloads/ folder](http://s0.cyberciti.org/uploads/faq/2015/11/list-vscode-linux.jpg) + +Fig.02: VSCode downloaded to my ~/Downloads/ folder + +Unzip VSCode-linux64.zip in /usr/local/ directory, enter: + + $ sudo unzip VSCode-linux64.zip -d /usr/local/ + +Cd into /usr/local/ to create the soft-link as follows using the ln command for the Code executable. This is useful to run VSCode from the terminal application: + + $ su - + # cd /usr/local/ + # ls -l + # cd bin/ + # ln -s ../VSCode-linux-x64/Code code + # exit + +Sample session: + +![Fig.03 Create the sym-link with the absolute path to the Code executable](http://s0.cyberciti.org/uploads/faq/2015/11/verify-and-ln-vscode.jpg) + +Fig.03 Create the sym-link with the absolute path to the Code executable + +### How do I use VSCode on Linux? ### + +Open the Terminal app and type the following command: + + $ /usr/local/bin/code + +Sample outputs: + +![Fig.04: VSCode in action on Linux](http://s0.cyberciti.org/uploads/faq/2015/11/vscode-welcome.jpg) + +Fig.04: VSCode in action on Linux + +And, there you have it, the VSCode installed and working correctly on the latest version of Debian, Ubuntu and Fedora Linux. I suggest that you read [getting started pages from Microsoft][2] to understand the core concepts that will make you more productive writing and navigating your code. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/debian-ubuntu-fedora-linux-installing-visual-studio-code/ + +作者:Vivek Gite +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://code.visualstudio.com/Download +[2]:https://code.visualstudio.com/docs \ No newline at end of file diff --git a/sources/tech/20151123 LNAV--Ncurses based log file viewer.md b/sources/tech/20151123 LNAV--Ncurses based log file viewer.md new file mode 100644 index 0000000000..0ceb06c252 --- /dev/null +++ b/sources/tech/20151123 LNAV--Ncurses based log file viewer.md @@ -0,0 +1,83 @@ +LNAV – Ncurses based log file viewer +================================================================================ +The Logfile Navigator, lnav for short, is a curses-based tool for viewing and analyzing log files. The value added by lnav over text viewers / editors is that it takes advantage of any semantic information that can be gleaned from the log file, such as timestamps and log levels. Using this extra semantic information, lnav can do things like: interleaving messages from different files; generate histograms of messages over time; and providing hotkeys for navigating through the file. It is hoped that these features will allow the user to quickly and efficiently zero-in on problems. + +### lnav Features ### + +#### Support for the following log file formats: #### + +Syslog, Apache access log, strace, tcsh history, and generic log files with timestamps. The file format is automatically detected when the file is read in. + +#### Histogram view: #### + +Displays the number of log messages per bucket-of-time. Useful for getting an overview of what was happening over a long period of time. + +#### Filters: #### + +Display only lines that match or do not match a set of regular expressions. Useful for removing extraneous log lines that you are not interested in. + +#### "Live" operation: #### + +Searches are done as you type; new log lines are automatically loaded and searched as they are added; filters apply to lines as they are loaded; and, SQL queries are checked for correctness as you type. + +#### Automatic tailing: #### + +The log file view automatically scrolls down to follow new lines that are added to files. Simply scroll up to lock the view in place and then scroll down to the bottom to resume tailing. + +#### Time-of-day ordering of lines: #### + +The log lines from all the files are loaded and then sorted by time-of-day. Relieves you of having to manually line up log messages from different files. + +#### Syntax highlighting: #### + +Errors and warnings are colored in red and yellow, respectively. Highlights are also applied to: SQL keywords, XML tags, file and line numbers in Java backtraces, and quoted strings. + +#### Navigation: #### + +There are hotkeys for jumping to the next or previous error or warning and moving forward or backward by an amount of time. + +#### Use SQL to query logs: #### + +Each log file line is treated as a row in a database that can be queried using SQL. The columns that are available depend on logs file types being viewed. + +#### Command and search history: #### + +Your previously entered commands and searches are saved so you can access them between sessions. + +#### Compressed files: #### + +Compressed log files are automatically detected and uncompressed on the fly. + +### Install lnav on ubuntu 15.10 ### + +Open the terminal and run the following command + + sudo apt-get install lnav + +### Using lnav ### + +If you want to view logs using lnav you can do using the following command by default it shows syslogs + + lnav + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/11/51.png) + +If you want to view specific logs provide the path + +If you want to view CUPS logs run the following command from your terminal + + lnav /var/log/cups + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/11/6.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/lnav-ncurses-based-log-file-viewer.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 12593961ca71ca4db1ddc19f1bfc2a6a9316e91a Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 23 Nov 2015 14:00:55 +0800 Subject: [PATCH 0369/1710] tip 5 done --- ...0151028 10 Tips for 10x Application Performance.md | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 195cb781c2..5c5d232017 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -134,23 +134,34 @@ Methods for compressing text data vary. For example, see the [section on HTTP/2] ### Tip #5: 优化 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. +安全套接字([SSL][26]) 协议和它的继承者,传输层安全(TLS)协议正在被越来越多的网站采用。SSL/TLS 对从原始服务器发往用户的数据进行加密提高了网站的安全性。影响这个趋势的部分原因是Google 正在使用SSL/TLS,这在搜索引擎排名上是一个正面的影响因素。 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: +尽管SSL/TLS 越来越流行,但是使用加密对速度的影响也让很多网站望而却步。SSL/TLS 之所以让网站变的更慢,原因有二: 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. 任何一个连接第一次连接时的握手过程都需要传递密钥。而采用HTTP/1.x 协议的浏览器在建立多个连接时会对每个连接重复上述操作。 1. Ongoing overhead from encrypting data on the server and decrypting it on the client. +2. 数据在传输过程中需要不断的在服务器加密、在客户端解密。 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. +要鼓励使用SSL/TLS,HTTP/2 和SPDY(在[下一章][27]会描述)的作者设计新的协议来让浏览器只需要对一个浏览器会话使用一个连接。这会大大的减少上述两个原因中的一个浪费的时间。然而现在可以用来提高应用程序使用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. +web 服务器有对应的机制优化SSL/TLS 传输。举个例子,NGINX 使用[OpenSSL][28]运行在普通的硬件上提供接近专用硬件的传输性能。NGINX [SSL 性能][29] 有详细的文档,而且把对SSL/TLS 数据进行加解密的时间和CPU 占用率降低了很多。 In addition, see [this blog post][30] for details on ways to increase SSL/TLS performance. To summarize briefly, the techniques are: +更进一步,在这篇[blog][30]有详细的说明如何提高SSL/TLS 性能,可以总结为一下几点: - **Session caching**. Uses the [ssl_session_cache][31] directive to cache the parameters used when securing each new connection with SSL/TLS. +- **会话缓冲**。使用指令[ssl_session_cache][31]可以缓存每个新的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. +- **会话票据或者ID**。把SSL/TLS 的信息保存在一个票据或者ID 里可以流畅的复用而不需要重新握手。 - **OCSP stapling**. Cuts handshaking time by caching SSL/TLS certificate information. +- **OCSP 分割**。通过缓存SSL/TLS 证书信息来减少握手时间。 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. +NGINX 和NGINX Plus 可以被用作SSL/TLS 终结——处理客户端流量的加密和解密,而同时和其他服务器进行明文通信。使用[这几步][32] 来设置NGINX 和NGINX Plus 处理SSL/TLS 终止。同时,这里还有一些NGINX Plus 和接收TCP 连接的服务器一起使用时的[特有的步骤][33] ### Tip #6: 使用 HTTP/2 或 SPDY ### From c3edee6f88d293946b3c1631f53d38e50d7e4fe1 Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 23 Nov 2015 14:05:08 +0800 Subject: [PATCH 0370/1710] clear --- ...10 Tips for 10x Application Performance.md | 56 +------------------ 1 file changed, 1 insertion(+), 55 deletions(-) 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 5c5d232017..9fa6a98bc2 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -2,165 +2,111 @@ 将程序性能提高十倍的10条建议 ================================================================================ -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. + 提高web 应用的性能从来没有比现在更关键过。网络经济的比重一直在增长;全球经济超过5% 的价值是在因特网上产生的(数据参见下面的资料)。我们的永远在线、超级连接的世界意味着用户的期望值也处于历史上的最高点。如果你的网站不能及时的响应,或者你的app 不能无延时的工作,用户会很快的投奔到你的竞争对手那里。 -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. 举一个例子,一份亚马逊十年前做过的研究可以证明,甚至在那个时候,网页加载时间每减少100毫秒,收入就会增加1%。另一个最近的研究特别强调一个事实,即超过一半的网站拥有着在调查中说他们会因为应用程序性能的问题流失用户。 -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. 网站到底需要多块呢?对于页面加载,每增加1秒钟就有4%的用户放弃使用。顶级的电子商务站点的页面在第一次交互时可以做到1秒到3秒加载时间,而这是提供最高舒适度的速度。很明显这种利害关系对于web 应用来说很高,而且在不断的增加。 -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. 想要提高效率很简单,但是看到实际结果很难。要在旅途上帮助你,这篇blog 会给你提供10条最高可以10倍的提升网站性能的建议。这是系列介绍提高应用程序性能的第一篇文章,包括测试充分的优化技术和一点NGIX 的帮助。这个系列给出了潜在的提高安全性的帮助。 ### Tip #1: 通过反向代理来提高性能和增加安全性 ### -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.) 如果你的web 应用运行在单个机器上,那么这个办法会明显的提升性能:只需要添加一个更快的机器,更好的处理器,更多的内存,更快的磁盘阵列,等等。然后新机器就可以更快的运行你的WordPress 服务器, Node.js 程序, Java 程序,以及其它程序。(如果你的程序要访问数据库服务器,那么这个办法还是很简单:添加两个更快的机器,以及在两台电脑之间使用一个更快的链路。) -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. 问题是,机器速度可能并不是问题。web 程序运行慢经常是因为计算机一直在不同的任务之间切换:和用户的成千上万的连接,从磁盘访问文件,运行代码,等等。应用服务器可能会抖动-内存不足,将内存数据写会磁盘,以及多个请求等待一个任务完成,如磁盘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. 你可以采取一个完全不同的方案来替代升级硬件:添加一个反向代理服务器来分担部分任务。[反向代理服务器][1] 位于运行应用的机器的前端,是用来处理网络流量的。只有反向代理服务器是直接连接到互联网的;和程序的通讯都是通过一个快速的内部网络完成的。 -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. 使用反向代理服务器可以将应用服务器从等待用户与web 程序交互解放出来,这样应用服务器就可以专注于为反向代理服务器构建网页,让其能够传输到互联网上。而应用服务器就不需要在能带客户端的响应,可以运行与接近优化过的性能水平。 -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. 添加方向代理服务器还可以给你的web 服务器安装带来灵活性。比如,一个已知类型的服务器已经超载了,那么就可以轻松的添加另一个相同的服务器;如果某个机器宕机了,也可以很容易的被替代。 -Because of the flexibility it provides, a reverse proxy server is also a prerequisite for many other performance-boosting capabilities, such as: 因为反向代理带来的灵活性,所以方向代理也是一些性能加速功能的必要前提,比如: - **负载均衡** (参见 [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. - - **缓存静态文件** (参见 [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. - - **网站安全** – 反响代理服务器可以提高网站安全性,以及快速的发现和响应攻击,保证应用服务器处于被保护状态。 -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 软件是一个专门设计的反响代理服务器,也包含了上述的多种功能。NGINX 使用事件驱动的方式处理问题,着回避传统的服务器更加有效率。NGINX plus 天价了更多高级的反向代理特性,比如程序[健康度检查][4],专门用来处理request 路由,高级缓冲和相关支持。 ![NGINX Worker Process helps increase application performance](https://www.nginx.com/wp-content/uploads/2015/10/Graph-11.png) ### Tip #2: 添加负载平衡 ### -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. 添加一个[负载均衡服务器][5] 是一个相当简单的用来提高性能和网站安全性的的方法。使用负载均衡讲流量分配到多个服务器,是用来替代只使用一个巨大且高性能web 服务器的方案。即使程序写的不好,或者在扩容方面有困难,只使用负载均衡服务器就可以很好的提高用户体验。 -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. 负载均衡服务器首先是一个反响代理服务器(参见[Tip #1][6])——它接收来自互联网的流量,然后转发请求给另一个服务器。小戏法是负载均衡服务器支持两个或多个应用服务器,使用[分配算法][7]将请求转发给不同服务器。最简单的负载均衡方法是轮转法,只需要将新的请求发给列表里的下一个服务器。其它的方法包括将请求发给负载最小的活动连接。NGINX plus 拥有将特定用户的会话分配给同一个服务器的[能力][8]. -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. 可以进行负载均衡的协议包括HTTP, HTTPS, SPDY, HTTP/2, WebSocket,[FastCGI][9],SCGI,uwsgi, memcached,以及集中其它的应用类型,包括采用TCP 第4层协议的程序。分析你的web 应用来决定那些你要使用以及那些地方的性能不足。 -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. 相同的服务器或服务器群可以被用来进行负载均衡,也可以用来处理其它的任务,如SSL 终止,提供对客户端使用的HTTP/1/x 和 HTTP/2 ,以及缓存静态文件。 -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. NGINX 经常被用来进行负载均衡;要想了解更多的情况可以访问我们的[overview blog post][10], [configuration blog post][11], [ebook][12] 以及相关网站 [webinar][13], 和 [documentation][14]。我们的商业版本 [NGINX Plus][15] 支持更多优化了的负载均衡特性,如基于服务器响应时间的加载路由和Microsoft’s NTLM 协议上的负载均衡。 ### Tip #3: 缓存静态和动态的内容 ### -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. 缓存通过加速内容的传输速度来提高web 应用的性能。它可以采用一下集中策略:当需要的时候预处理要传输的内容,保存数据到速度更快的设备,把数据存储在距离客户端更近的位置,或者结合起来使用。 -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. - **静态内容缓存**。不经常变化的文件,比如图像(JPEG,PNG) 和代码(CSS,JavaScript),可以保存在边缘服务器,这样就可以快速的从内存和磁盘上提取。 -- **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. - **动态内容缓存**。很多web 应用回针对每个网页请求生成不同的HTML 页面。在短时间内简单的缓存每个生成HTML 内容,就可以很好的减少要生成的内容的数量,这完全可以达到你的要求。 -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. 举个例子,如果一个页面每秒会被浏览10次,你将它缓存1 秒,99%请求的页面都会直接从缓存提取。如果你将将数据分成静态内容,甚至新生成的页面可能都是由这些缓存构成的。 -There are three main techniques for caching content generated by web applications: 下面由是web 应用发明的三种主要的缓存技术: -- **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. 对web 应用的缓存机制可以web 应用服务器内部实现。第一,缓存动态内容是用来减少应用服务器加载动态内容的时间。然后,缓存静态内容(包括动态内容的临时拷贝)是为了更进一步的分担应用服务器的负载。而且缓存之后会从应用服务器转移到对用户而言更快、更近的机器,从而减少应用服务器的压力,减少提取数据和传输数据的时间。 -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. 改进过的缓存方案可以极大的提高应用的速度。对于大多数网页来说,静态数据,比如大图像文件,构成了超过一半的内容。如果没有缓存,那么这可能会花费几秒的时间来提取和传输这类数据,但是采用了缓存之后不到1秒就可以完成。 -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 和NGINX Plus使用了两条指令来[设置缓存机制][16]:proxy_cache_path 和 proxy_cache。你可以指定缓存的位置和大小,文件在缓存中保存的最长时间和其他一些参数。使用第三条(而且是相当受欢迎的一条)指令,proxy_cache_use_stale,如果服务器提供新鲜内容是忙或者挂掉之类的信息,你甚至可以让缓存提供旧的内容,这样客户端就不会一无所得。从用户的角度来看这可以很好的提高你的网站或者应用的上线时间。 -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. NGINX plus 拥有[高级缓存特性][17],包括对[缓存清除][18]的支持和在[仪表盘][19]上显示缓存状态信息。 -For more information on caching with NGINX, see the [reference documentation][20] and [NGINX Content Caching][21] in the NGINX Plus Admin Guide. 要想获得更多关于NGINX 的缓存机制的信息可以浏览NGINX Plus 管理员指南中的 [reference documentation][20] 和 [NGINX Content Caching][21] 。 -**Note**: Caching crosses 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. **注意**:缓存机制分布于应用开发者、投资决策者以及实际的系统运维人员之间。本文提到的一些复杂的缓存机制从[DevOps 的角度][23]来看很具有价值,即对集应用开发者、架构师以及运维操作人员的功能为一体的工程师来说可以满足他们对站点功能性、响应时间、安全性和商业结果,如完成的交易数。 ### Tip #4: 压缩数据 ### -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. 压缩是一个具有很大潜力的提高性能的加速方法。现在已经有一些针对照片(JPEG 和PNG)、视频(MPEG-4)和音乐(MP3)等各类文件精心设计和高压缩率的标准。每一个标准都或多或少的减少了文件的大小。 -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. 文本数据 —— 包括HTML(包含了纯文本和HTL 标签),CSS和代码,比如Javascript —— 经常是未经压缩就传输的。压缩这类数据会在对应用程序性能的感觉上,特别是处于慢速或受限的移动网络的客户端,产生不成比例的影响。 -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. 这是因为文本数据经常是用户与网页交互的有效数据,而多媒体数据可能更多的是起提供支持或者装饰的作用。聪明的内容压缩可以减少HTML,Javascript,CSS和其他文本内容对贷款的要求,通常可以减少30% 甚至更多的带宽和相应的页面加载时间。 -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. 如果你是用SSL,压缩可以减少需要进行SSL 编码的的数据量,而这些编码操作会占用一些CPU时间而抵消了压缩数据减少的时间。 -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. 压缩文本数据的方法很多,举个例子,在定义小说文本压缩模式的[HTTP/2 部分]就专门为适应头数据。另一个例子是可以在NGINX 里打开使用GZIP 压缩文本。你在你的服务里[预压缩文本数据][25]之后,你就可以直接使用gzip_static 指令来处理压缩过的.gz 版本。 ### Tip #5: 优化 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. 安全套接字([SSL][26]) 协议和它的继承者,传输层安全(TLS)协议正在被越来越多的网站采用。SSL/TLS 对从原始服务器发往用户的数据进行加密提高了网站的安全性。影响这个趋势的部分原因是Google 正在使用SSL/TLS,这在搜索引擎排名上是一个正面的影响因素。 -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: 尽管SSL/TLS 越来越流行,但是使用加密对速度的影响也让很多网站望而却步。SSL/TLS 之所以让网站变的更慢,原因有二: -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. 任何一个连接第一次连接时的握手过程都需要传递密钥。而采用HTTP/1.x 协议的浏览器在建立多个连接时会对每个连接重复上述操作。 -1. Ongoing overhead from encrypting data on the server and decrypting it on the client. 2. 数据在传输过程中需要不断的在服务器加密、在客户端解密。 -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. 要鼓励使用SSL/TLS,HTTP/2 和SPDY(在[下一章][27]会描述)的作者设计新的协议来让浏览器只需要对一个浏览器会话使用一个连接。这会大大的减少上述两个原因中的一个浪费的时间。然而现在可以用来提高应用程序使用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. web 服务器有对应的机制优化SSL/TLS 传输。举个例子,NGINX 使用[OpenSSL][28]运行在普通的硬件上提供接近专用硬件的传输性能。NGINX [SSL 性能][29] 有详细的文档,而且把对SSL/TLS 数据进行加解密的时间和CPU 占用率降低了很多。 -In addition, see [this blog post][30] for details on ways to increase SSL/TLS performance. To summarize briefly, the techniques are: 更进一步,在这篇[blog][30]有详细的说明如何提高SSL/TLS 性能,可以总结为一下几点: -- **Session caching**. Uses the [ssl_session_cache][31] directive to cache the parameters used when securing each new connection with SSL/TLS. - **会话缓冲**。使用指令[ssl_session_cache][31]可以缓存每个新的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. - **会话票据或者ID**。把SSL/TLS 的信息保存在一个票据或者ID 里可以流畅的复用而不需要重新握手。 -- **OCSP stapling**. Cuts handshaking time by caching SSL/TLS certificate information. - **OCSP 分割**。通过缓存SSL/TLS 证书信息来减少握手时间。 -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. NGINX 和NGINX Plus 可以被用作SSL/TLS 终结——处理客户端流量的加密和解密,而同时和其他服务器进行明文通信。使用[这几步][32] 来设置NGINX 和NGINX Plus 处理SSL/TLS 终止。同时,这里还有一些NGINX Plus 和接收TCP 连接的服务器一起使用时的[特有的步骤][33] ### Tip #6: 使用 HTTP/2 或 SPDY ### From 24be9bf8ac91bad5236f3b0dc2569ea9a989f622 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Nov 2015 14:13:14 +0800 Subject: [PATCH 0371/1710] =?UTF-8?q?20151123-4=20=E9=80=89=E9=A2=98(?= =?UTF-8?q?=E9=80=9F=E7=BF=BB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20 Years of GIMP release of GIMP 2.8.16.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sources/news/20151123 20 Years of GIMP release of GIMP 2.8.16.md diff --git a/sources/news/20151123 20 Years of GIMP release of GIMP 2.8.16.md b/sources/news/20151123 20 Years of GIMP release of GIMP 2.8.16.md new file mode 100644 index 0000000000..ed6bf9ac3d --- /dev/null +++ b/sources/news/20151123 20 Years of GIMP release of GIMP 2.8.16.md @@ -0,0 +1,53 @@ +20 Years of GIMP, release of GIMP 2.8.16 +================================================================================ +This week the GIMP project celebrates its 20th anniversary. + +Back in 1995, University of California students, Peter Mattis and Kimball Spencer, were members of the eXperimental Computing Facility, a Berkeley campus organization of undergraduate students enthusiastic about computers and programming. In June of that year, the two hinted at their intentions to write a free graphical image manipulation program as a means of giving back to the free software community. + +On November 21st, 20 years ago today, Peter Mattis [announced the availability][1] of the “General Image Manipulation Program” on Usenet (later on, the acronym would be redefined to stand for the “GNU Image Manipulation Program”). + +![Wilber Birthday Strip](http://www.gimp.org/news/images/201512birthday_975.png) + +Since its public release the project has been evolving in many ways as a testbed for new ideas, which was considerably assisted by adding plug-in architecture. Over the years, GIMP amassed a huge amount of new features designed for all kinds of users and practical applications: general image editing, retouching and color grading, digital painting, graphic design, science imaging etc. + +Between 2006 and 2012, the team collaborated with Peter Sikking of man+machine works to define [product vision][2] and improve user experience. Thanks to this collaboration GIMP’s user interface has become more conventional for professional users, and various tools have become more powerful and easy to use. But more importantly, we got a much better idea how to design good interfaces. + +In the past several years we’ve been working hard on porting GIMP to a newer image processing engine called GEGL. The switch to GEGL made us rewrite or at least tweak pretty much every part of GIMP’s source code. Fortunately, this work is nearing completion, and you’ll soon be able to benefit from all the changes that it’s bringing. + +### New Releases and The Future ### + +To celebrate the 20th anniversary, we released an update of the current stable version of GIMP. Newly released [GIMP 2.8.16][3] features support for layer groups in OpenRaster files, fixes for layer groups support in PSD, various user inrterface improvements, OSX build system fixes, translation updates, and more changes. + +Our immediate future plans are to release first public version in the unstable 2.9.x series that will feature fully functional GEGL port, 16/32bit per channel processing, basic OpenEXR support, vastly improved color management implementation, new tools, on-canvas preview for many filters, and more. This release will encompass over three years of work and become the first milestone towards 2.10. + +Following v2.10 release, we shall complete the GTK+3 port that is required to bring back state of the art Wacom support for Windows users. When it’s done and GIMP 3.0 is out, we shall finally be able to get started on some very exciting and much anticipated features like non-destructive editing. Please refer to [Roadmap][4] for more details. + +### New website ### + +In conjunction with the 20th anniversary we have updated and revamped the website. The vast majority of the work on the new website was done by [Pat David][5]. + +The update (finally) includes some much needed improvements such as [news items][6] with permalinks and [full RSS/Atom feeds][7]. The site is also now responsive to adapt to various screen sizes. Try it on a mobile device or tablet! + +![Wilber Birthday Snapshot ](http://www.gimp.org/news/images/birthday2_500.png) + +Wilber & Co. comics courtesy of [Aryeom & Jehan][8]. + +-------------------------------------------------------------------------------- + +via: http://www.gimp.org/news/2015/11/22/20-years-of-gimp-release-of-gimp-2816/ + +作者:[Wilber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.gimp.org/author/wilber.html +[1]:http://www.gimp.org/about/prehistory.html#november-1995-an-announcement +[2]:http://gui.gimp.org/index.php/GIMP_UI_Redesign#product_vision +[3]:http://www.gimp.org/downloads/ +[4]:http://wiki.gimp.org/wiki/Roadmap +[5]:http://blog.patdavid.net/ +[6]:http://www.gimp.org/news/ +[7]:http://www.gimp.org/feeds/atom.xml +[8]:http://libreart.info/ \ No newline at end of file From 6d681a315bc337828050f382c2b9bca847127840 Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 23 Nov 2015 14:19:08 +0800 Subject: [PATCH 0372/1710] tip 7 done(6 not done) --- .../tech/20151028 10 Tips for 10x Application Performance.md | 4 ++++ 1 file changed, 4 insertions(+) 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 9fa6a98bc2..1bbc4870c8 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -132,12 +132,16 @@ Over time, we at NGINX expect most sites to fully enable SSL and to move to HTTP ### Tip #7: 升级软件版本 ### 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. +一个提高应用性能的简单办法是根据软件的稳定性和性能的评价来选在你的软件栈。进一步说,因为高性能组件的开发者更愿意追求更高的性能和解决bug ,所以值得使用最新版本的软件。新版本往往更受开发者和用户社区的关注。更新的版本往往会利用到新的编译器优化,包括对新硬件的调优。 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. +稳定的新版本通常比旧版本具有更好的兼容性和更高的性能。一直进行软件更新,可以非常简单的保持软件保持最佳的优化,解决掉bug,以及安全性的提高。 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. +一直使用旧版软件也会组织你利用新的特性。比如上面说到的HTTP/2,目前要求OpenSSL 1.0.1.在2016 年中期开始将会要求1.0.2 ,而这是在2015年1月才发布的。 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. +NGINX 用户可以开始迁移到[NGINX 最新的开源软件][38] 或者[NGINX Plus][39];他们都包含了罪行的能力,如socket分区和线程池(见下文),这些都已经为性能优化过了。然后好好看看的你软件栈,把他们升级到你能能升级道德最新版本吧。 ### Tip #8: linux 系统性能调优 ### From a23af842e0f30f90623aabd35cdc4445028d9db2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Nov 2015 14:35:23 +0800 Subject: [PATCH 0373/1710] =?UTF-8?q?20151123-4=20=E9=80=89=E9=A2=98?= =?UTF-8?q?=E6=92=A4=E9=94=80=EF=BC=88=E5=B7=B2=E5=8F=91=E5=B8=83=E6=96=87?= =?UTF-8?q?=E7=AB=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20 Years of GIMP release of GIMP 2.8.16.md | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 sources/news/20151123 20 Years of GIMP release of GIMP 2.8.16.md diff --git a/sources/news/20151123 20 Years of GIMP release of GIMP 2.8.16.md b/sources/news/20151123 20 Years of GIMP release of GIMP 2.8.16.md deleted file mode 100644 index ed6bf9ac3d..0000000000 --- a/sources/news/20151123 20 Years of GIMP release of GIMP 2.8.16.md +++ /dev/null @@ -1,53 +0,0 @@ -20 Years of GIMP, release of GIMP 2.8.16 -================================================================================ -This week the GIMP project celebrates its 20th anniversary. - -Back in 1995, University of California students, Peter Mattis and Kimball Spencer, were members of the eXperimental Computing Facility, a Berkeley campus organization of undergraduate students enthusiastic about computers and programming. In June of that year, the two hinted at their intentions to write a free graphical image manipulation program as a means of giving back to the free software community. - -On November 21st, 20 years ago today, Peter Mattis [announced the availability][1] of the “General Image Manipulation Program” on Usenet (later on, the acronym would be redefined to stand for the “GNU Image Manipulation Program”). - -![Wilber Birthday Strip](http://www.gimp.org/news/images/201512birthday_975.png) - -Since its public release the project has been evolving in many ways as a testbed for new ideas, which was considerably assisted by adding plug-in architecture. Over the years, GIMP amassed a huge amount of new features designed for all kinds of users and practical applications: general image editing, retouching and color grading, digital painting, graphic design, science imaging etc. - -Between 2006 and 2012, the team collaborated with Peter Sikking of man+machine works to define [product vision][2] and improve user experience. Thanks to this collaboration GIMP’s user interface has become more conventional for professional users, and various tools have become more powerful and easy to use. But more importantly, we got a much better idea how to design good interfaces. - -In the past several years we’ve been working hard on porting GIMP to a newer image processing engine called GEGL. The switch to GEGL made us rewrite or at least tweak pretty much every part of GIMP’s source code. Fortunately, this work is nearing completion, and you’ll soon be able to benefit from all the changes that it’s bringing. - -### New Releases and The Future ### - -To celebrate the 20th anniversary, we released an update of the current stable version of GIMP. Newly released [GIMP 2.8.16][3] features support for layer groups in OpenRaster files, fixes for layer groups support in PSD, various user inrterface improvements, OSX build system fixes, translation updates, and more changes. - -Our immediate future plans are to release first public version in the unstable 2.9.x series that will feature fully functional GEGL port, 16/32bit per channel processing, basic OpenEXR support, vastly improved color management implementation, new tools, on-canvas preview for many filters, and more. This release will encompass over three years of work and become the first milestone towards 2.10. - -Following v2.10 release, we shall complete the GTK+3 port that is required to bring back state of the art Wacom support for Windows users. When it’s done and GIMP 3.0 is out, we shall finally be able to get started on some very exciting and much anticipated features like non-destructive editing. Please refer to [Roadmap][4] for more details. - -### New website ### - -In conjunction with the 20th anniversary we have updated and revamped the website. The vast majority of the work on the new website was done by [Pat David][5]. - -The update (finally) includes some much needed improvements such as [news items][6] with permalinks and [full RSS/Atom feeds][7]. The site is also now responsive to adapt to various screen sizes. Try it on a mobile device or tablet! - -![Wilber Birthday Snapshot ](http://www.gimp.org/news/images/birthday2_500.png) - -Wilber & Co. comics courtesy of [Aryeom & Jehan][8]. - --------------------------------------------------------------------------------- - -via: http://www.gimp.org/news/2015/11/22/20-years-of-gimp-release-of-gimp-2816/ - -作者:[Wilber][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.gimp.org/author/wilber.html -[1]:http://www.gimp.org/about/prehistory.html#november-1995-an-announcement -[2]:http://gui.gimp.org/index.php/GIMP_UI_Redesign#product_vision -[3]:http://www.gimp.org/downloads/ -[4]:http://wiki.gimp.org/wiki/Roadmap -[5]:http://blog.patdavid.net/ -[6]:http://www.gimp.org/news/ -[7]:http://www.gimp.org/feeds/atom.xml -[8]:http://libreart.info/ \ No newline at end of file From c8e4fb274f325e3e65aa99c332d2935512a0ed65 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Nov 2015 16:30:51 +0800 Subject: [PATCH 0374/1710] =?UTF-8?q?20151123-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... ways hackers can use Wi-Fi against you.md | 69 +++++ ...resses To One Interface On Ubuntu 15.10.md | 235 ++++++++++++++++++ ... 358.16 Driver in Ubuntu 15.10 or 14.04.md | 68 +++++ ...ntel Graphics Installer in Ubuntu 15.10.md | 46 ++++ 4 files changed, 418 insertions(+) create mode 100644 sources/share/20151123 7 ways hackers can use Wi-Fi against you.md create mode 100644 sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md create mode 100644 sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md create mode 100644 sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md new file mode 100644 index 0000000000..cd39f6a5c1 --- /dev/null +++ b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -0,0 +1,69 @@ +7 ways hackers can use Wi-Fi against you +================================================================================ +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/intro_title-100626673-orig.jpg) + +### 7 ways hackers can use Wi-Fi against you ### + +Wi-Fi — oh so convenient, yet oh so dangerous. Here are seven ways you could be giving away your identity through a Wi-Fi connection and what to do instead. + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/1_free-hotspots-100626674-orig.jpg) + +### Using free hotspots ### + +They seem to be everywhere, and their numbers are expected to [quadruple over the next four years][1]. But many of them are untrustworthy, created just so your login credentials, to email or even more sensitive accounts, can be picked up by hackers using “sniffers” — software that captures any information you submit over the connection. The best defense against sniffing hackers is to use a VPN (virtual private network). A VPN keeps your private data protected because it encrypts what you input. + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/2_online-banking-100626675-orig.jpg) + +### Banking online ### + +You might think that no one needs to be warned against banking online using free Wi-Fi, but cybersecurity firm Kaspersky Lab says that [more than 100 banks worldwide have lost $900 million][2] from cyberhacking, so it would seem that a lot of people are doing it. If you want to use the free Wi-Fi in a coffee shop because you’re confident it will be legitimate, confirm the exact network name with the barista. It’s pretty easy for [someone else in the shop with a router to set up an open connection][3] with a name that seems like it would be the name of the shop’s Wi-Fi. + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/3_keeping-wifi-on-100626676-orig.jpg) + +### Keeping Wi-Fi on all the time ### + +When your phone’s Wi-Fi is automatically enabled, you can be connected to an unsecure network without even realizing it. Use your phone’s [location-based Wi-Fi feature][4], if it’s available. It will turn off your Wi-Fi when you’re away from your saved networks and will turn back on when you’re within range. + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/4_not-using-firewall-100626677-orig.jpg) + +### Not using a firewall ### + +A firewall is your first line of defense against malicious intruders. It’s meant to let good traffic through your computer on a network and keep hackers and malware out. You should turn it off only when your antivirus software has its own firewall. + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/5_browsing-unencrypted-sites-100626678-orig.jpg) + +### Browsing unencrypted websites ### + +Sad to say, [55% of the Web’s top 1 million sites don’t offer encryption][5]. An unencrypted website allows all data transmissions to be viewed by the prying eyes of hackers. Your browser will indicate when a site is secure (you’ll see a gray padlock with Mozilla Firefox, for example, and a green lock icon with Chrome). But even a secure website can’t protect you from sidejackers, who can steal the cookies from a website you visited, whether it’s a valid site or not, through a public network. + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/6_updating-security-software-100626679-orig.jpg) + +### Not updating your security software ### + +If you want to ensure that your own network is well protected, upgrade the firmware of your router. All you have to do is go to your router’s administration page to check. Normally, you can download the newest firmware right from the manufacturer’s site. + +![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/7_securing-home-wifi-100626680-orig.jpg) + +### Not securing your home Wi-Fi ### + +Needless to say, it is important to set up a password that is not too easy to guess, and change your connection’s default name. You can also filter your MAC address so your router will recognize only certain devices. + +**Josh Althuser** is an open software advocate, Web architect and tech entrepreneur. Over the past 12 years, he has spent most of his time advocating for open-source software and managing teams and projects, as well as providing enterprise-level consultancy for Web applications and helping bring their products to the market. You may connect with him on [Twitter][6]. + +-------------------------------------------------------------------------------- + +via: http://www.networkworld.com/article/3003170/mobile-security/7-ways-hackers-can-use-wi-fi-against-you.html + +作者:[Josh Althuser][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://twitter.com/JoshAlthuser +[1]:http://www.pcworld.com/article/243464/number_of_wifi_hotspots_to_quadruple_by_2015_says_study.html +[2]:http://www.nytimes.com/2015/02/15/world/bank-hackers-steal-millions-via-malware.html?hp&action=click&pgtype=Homepage&module=first-column-region%C2%AEion=top-news&WT.nav=top-news&_r=3 +[3]:http://news.yahoo.com/blogs/upgrade-your-life/banking-online-not-hacked-182159934.html +[4]:http://pocketnow.com/2014/10/15/should-you-leave-your-smartphones-wifi-on-or-turn-it-off +[5]:http://www.cnet.com/news/chrome-becoming-tool-in-googles-push-for-encrypted-web/ +[6]:https://twitter.com/JoshAlthuser \ No newline at end of file diff --git a/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md new file mode 100644 index 0000000000..3440a99876 --- /dev/null +++ b/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md @@ -0,0 +1,235 @@ +Assign Multiple IP Addresses To One Interface On Ubuntu 15.10 +================================================================================ +Some times you might want to use more than one IP address for your network interface card. What will you do in such cases? Buy an extra network card and assign new IP? No, It’s not necessary(at least in the small networks). We can now assign multiple IP addresses to one interface on Ubuntu systems. Curious to know how? Well, Follow me, It is not that difficult. + +This method will work on Debian and it’s derivatives too. + +### Add additional IP addresses temporarily ### + +First, let us find the IP address of the network card. In my Ubuntu 15.10 server, I use only one network card. + +Run the following command to find out the IP address: + + sudo ip addr + +**Sample output:** + + 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default + 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: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 + link/ether 08:00:27:2a:03:4b brd ff:ff:ff:ff:ff:ff + inet 192.168.1.103/24 brd 192.168.1.255 scope global enp0s3 + valid_lft forever preferred_lft forever + inet6 fe80::a00:27ff:fe2a:34e/64 scope link + valid_lft forever preferred_lft forever + +Or + + sudo ifconfig + +**Sample output:** + + enp0s3 Link encap:Ethernet HWaddr 08:00:27:2a:03:4b + inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0 + inet6 addr: fe80::a00:27ff:fe2a:34e/64 Scope:Link + UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 + RX packets:186 errors:0 dropped:0 overruns:0 frame:0 + TX packets:70 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:1000 + RX bytes:21872 (21.8 KB) TX bytes:9666 (9.6 KB) + 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:65536 Metric:1 + RX packets:217 errors:0 dropped:0 overruns:0 frame:0 + TX packets:217 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:0 + RX bytes:38793 (38.7 KB) TX bytes:38793 (38.7 KB) + +As you see in the above output, my network card name is **enp0s3**, and its IP address is **192.168.1.103**. + +Now let us add an additional IP address, for example **192.168.1.104**, to the Interface card. + +Open your Terminal and run the following command to add additional IP. + + sudo ip addr add 192.168.1.104/24 dev enp0s3 + +Now, let us check if the IP is added using command: + + sudo ip address show enp0s3 + +**Sample output:** + + 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 + link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff + inet 192.168.1.103/24 brd 192.168.1.255 scope global enp0s3 + valid_lft forever preferred_lft forever + inet 192.168.1.104/24 scope global secondary enp0s3 + valid_lft forever preferred_lft forever + inet6 fe80::a00:27ff:fe2a:34e/64 scope link + valid_lft forever preferred_lft forever + +Similarly, you can add as many IP addresses as you want. + +Let us ping the IP address to verify it. + + sudo ping 192.168.1.104 + +**Sample output:** + + PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data. + 64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=0.901 ms + 64 bytes from 192.168.1.104: icmp_seq=2 ttl=64 time=0.571 ms + 64 bytes from 192.168.1.104: icmp_seq=3 ttl=64 time=0.521 ms + 64 bytes from 192.168.1.104: icmp_seq=4 ttl=64 time=0.524 ms + +Yeah, It’s working!! + +To remove the IP, just run: + + sudo ip addr del 192.168.1.104/24 dev enp0s3 + +Let us check if it is removed. + + sudo ip address show enp0s3 + +**Sample output:** + + 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 + link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff + inet 192.168.1.103/24 brd 192.168.1.255 scope global enp0s3 + valid_lft forever preferred_lft forever + inet6 fe80::a00:27ff:fe2a:34e/64 scope link + valid_lft forever preferred_lft forever + +See, It’s gone!! + +Well, as you may know, the changes will lost after you reboot your system. How do I make it permanent? That’s easy too. + +### Add additional IP addresses permanently ### + +The network card configuration file of your Ubuntu system is **/etc/network/interfaces**. + +Let us check the details of the above file. + + sudo cat /etc/network/interfaces + +**Sample output:** + + # This file describes the network interfaces available on your system + # and how to activate them. For more information, see interfaces(5). + source /etc/network/interfaces.d/* + # The loopback network interface + auto lo + iface lo inet loopback + # The primary network interface + auto enp0s3 + iface enp0s3 inet dhcp + +As you see in the above output, the Interface is DHCP enabled. + +Okay, now we will assign an additional address, for example **192.168.1.104/24**. + +Edit file **/etc/network/interfaces**: + + sudo nano /etc/network/interfaces + +Add additional IP address as shown in the black letters. + + # This file describes the network interfaces available on your system + # and how to activate them. For more information, see interfaces(5). + source /etc/network/interfaces.d/* + # The loopback network interface + auto lo + iface lo inet loopback + # The primary network interface + auto enp0s3 + iface enp0s3 inet dhcp + iface enp0s3 inet static + address 192.168.1.104/24 + +Save and close the file. + +Run the following file to take effect the changes without rebooting. + + sudo ifdown enp0s3 && sudo ifup enp0s3 + +**Sample output:** + + Killed old client process + Internet Systems Consortium DHCP Client 4.3.1 + Copyright 2004-2014 Internet Systems Consortium. + All rights reserved. + For info, please visit https://www.isc.org/software/dhcp/ + Listening on LPF/enp0s3/08:00:27:2a:03:4e + Sending on LPF/enp0s3/08:00:27:2a:03:4e + Sending on Socket/fallback + DHCPRELEASE on enp0s3 to 192.168.1.1 port 67 (xid=0x225f35) + Internet Systems Consortium DHCP Client 4.3.1 + Copyright 2004-2014 Internet Systems Consortium. + All rights reserved. + For info, please visit https://www.isc.org/software/dhcp/ + Listening on LPF/enp0s3/08:00:27:2a:03:4e + Sending on LPF/enp0s3/08:00:27:2a:03:4e + Sending on Socket/fallback + DHCPDISCOVER on enp0s3 to 255.255.255.255 port 67 interval 3 (xid=0xdfb94764) + DHCPREQUEST of 192.168.1.103 on enp0s3 to 255.255.255.255 port 67 (xid=0x6447b9df) + DHCPOFFER of 192.168.1.103 from 192.168.1.1 + DHCPACK of 192.168.1.103 from 192.168.1.1 + bound to 192.168.1.103 -- renewal in 35146 seconds. + +**Note**: It is **very important** to run the above two commands into **one** line if you are remoting into the server because the first one will drop your connection. Given in this way the ssh-session will survive. + +Now, let us check if IP is added using command: + + sudo ip address show enp0s3 + +**Sample output:** + + 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 + link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff + inet 192.168.1.103/24 brd 192.168.1.255 scope global enp0s3 + valid_lft forever preferred_lft forever + inet 192.168.1.104/24 brd 192.168.1.255 scope global secondary enp0s3 + valid_lft forever preferred_lft forever + inet6 fe80::a00:27ff:fe2a:34e/64 scope link + valid_lft forever preferred_lft forever + +Cool! Additional IP has been added. + +Well then let us ping the IP address to verify. + + sudo ping 192.168.1.104 + +**Sample output:** + + PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data. + 64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=0.137 ms + 64 bytes from 192.168.1.104: icmp_seq=2 ttl=64 time=0.050 ms + 64 bytes from 192.168.1.104: icmp_seq=3 ttl=64 time=0.054 ms + 64 bytes from 192.168.1.104: icmp_seq=4 ttl=64 time=0.067 ms + +Voila! It’s working. That’s it. + +Want to know how to add additional IP addresses on CentOS/RHEL/Scientific Linux/Fedora systems, check the following link. + +- [Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7][1] + +Happy weekend! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/assign-multiple-ip-addresses-to-one-interface-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.unixmen.com/author/sk/ +[1]:http://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-network-interface-card-centos-7/ \ No newline at end of file diff --git a/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md b/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md new file mode 100644 index 0000000000..4610917275 --- /dev/null +++ b/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md @@ -0,0 +1,68 @@ +How to Install NVIDIA 358.16 Driver in Ubuntu 15.10, 14.04 +================================================================================ +![nvidia-logo-1](http://ubuntuhandbook.org/wp-content/uploads/2015/06/nvidia-logo-1.png) + +[NVIDIA 358.16][1], the first stable release in NVIDIA 358 series, has been announced with some fixes to 358.09 (Beta) and other small features. + +NVIDIA 358 added a new **nvidia-modeset.ko** kernel module that works in conjunction with the nvidia.ko kernel module to program the display engine of the GPU. In a later driver release, the **nvidia-modeset.ko** kernel driver will be used as a basis for the mode-setting interface provided by the kernel’s direct rendering manager (DRM). + +Thew new driver also has new GLX protocol extensions and a new system memory allocation mechanism for large allocations in the OpenGL driver. New GPUs **GeForce 805A** and **GeForce GTX 960A** are supported. NVIDIA 358.16 also supports X.Org Server 1.18 and OpenGL 4.3 + +### How to Install NVIDIA 358.16 in Ubuntu: ### + +> Please don’t do it on production machines unless you know what you’re doing and how to undo it. + +For the official binaries, please go to [nvidia.com/object/unix.html][1]. + +For those who prefer an Ubuntu PPA, I’d recommend the [Graphics Drivers PPA][2]. So far, Ubuntu 16.04, Ubuntu 15.10, Ubuntu 15.04, Ubuntu 14.04 are supported. + +**1. Add PPA.** + +Open terminal from Unity Dash, App Launcher, or via Ctrl+Alt+T shortcut key. When it opens, paste below command and hit enter: + + sudo add-apt-repository ppa:graphics-drivers/ppa + +![nvidia-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/08/nvidia-ppa.jpg) + +Type your password when it asks. No visual feedback, just type in mind and hit Enter to continue. + +**2. Refresh and install new driver.** + +After adding PPA, run below commands one by one to refresh repository cache and install new driver packages: + + sudo apt-get update + + sudo apt-get install nvidia-358 nvidia-settings + +### (Optional) Uninstall: ### + +Boot into the recovery mode from the grub menu, and drop into root console. Then run below commands one by one: + +Remount the file system as writable: + + mount -o remount,rw / + +Remove all nvidia packages: + + apt-get purge nvidia* + +Finally back to menu and reboot: + + reboot + +To disable/remove the graphics driver PPA, launch **Software & Updates** and navigate to **Other Software** tab. + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/install-nvidia-358-16-driver-ubuntu-15-10/ + +作者:[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.nvidia.com/Download/driverResults.aspx/95921/en-us +[2]:http://www.nvidia.com/object/unix.html +[3]:https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa \ No newline at end of file diff --git a/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md b/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md new file mode 100644 index 0000000000..d9b8554c4e --- /dev/null +++ b/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md @@ -0,0 +1,46 @@ +Install Intel Graphics Installer in Ubuntu 15.10 +================================================================================ +![Intel graphics installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel_logo.jpg) + +Intel has announced a new release of its Linux graphics installer recently. Ubuntu 15.10 Wily is required and support for Ubuntu 15.04 is deprecated in the new release. + +> The Intel® Graphics Installer for Linux* allows you to easily install the latest graphics and video drivers for your Intel graphics hardware. This allows you to stay current with the latest enhancements, optimizations, and fixes to the Intel® Graphics Stack to ensure the best user experience with your Intel® graphics hardware. The Intel® Graphics Installer for Linux* is available for the latest version of Ubuntu*. + +![intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel-graphics-installer.jpg) + +### How to Install: ### + +**1.** Download the installer from [the link page][1]. The current is version 1.2.1 for Ubuntu 15.10. Check your OS type, 32-bit or 64-bit, via **System Settings -> Details**. + +![download-intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/download-intel-graphics-installer.jpg) + +**2.** Once the download process finished, go to your Download folder and click open the .deb package with Ubuntu Software Center and finally click the install button. + +![install-via-software-center](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-via-software-center.jpg) + +**3.** In order to trust the Intel Graphics Installer, you will need to add keys via below commands. + +Open terminal from Unity Dash, App Launcher, or via Ctrl+Alt+T shortcut key. When it opens, paste below commands and run one by one: + + wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg -O - | sudo apt-key add - + + wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-2 -O - | sudo apt-key add - + +![trust-intel](http://ubuntuhandbook.org/wp-content/uploads/2015/11/trust-intel.jpg) + +NOTE: While running the first command, if the cursor is stuck and blinking after downloading the key, as above picture shows, type your password (no visual feedback) and hit enter to continue. + +Finally launch Intel Graphics Installer via Unity Dash or Application launcher. + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/install-intel-graphics-installer-in-ubuntu-15-10/ + +作者:[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://01.org/linuxgraphics/downloads \ No newline at end of file From c57500862157b16b44070bcbb2518f33688cba4d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Nov 2015 16:34:32 +0800 Subject: [PATCH 0375/1710] =?UTF-8?q?20151123-5=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 --- ...ign Multiple IP Addresses To One Interface On Ubuntu 15.10.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md index 3440a99876..a045ab953f 100644 --- a/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md +++ b/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md @@ -217,6 +217,7 @@ Voila! It’s working. That’s it. Want to know how to add additional IP addresses on CentOS/RHEL/Scientific Linux/Fedora systems, check the following link. +注:此篇文章以前做过选题:20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md - [Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7][1] Happy weekend! From f664fe0193898f821bde0b07ee771f9610ec29fd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Nov 2015 16:45:50 +0800 Subject: [PATCH 0376/1710] =?UTF-8?q?20151123-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Dropbox from the command line in Linux.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20151123 How to access Dropbox from the command line in Linux.md diff --git a/sources/tech/20151123 How to access Dropbox from the command line in Linux.md b/sources/tech/20151123 How to access Dropbox from the command line in Linux.md new file mode 100644 index 0000000000..d4d2c8af3a --- /dev/null +++ b/sources/tech/20151123 How to access Dropbox from the command line in Linux.md @@ -0,0 +1,97 @@ +How to access Dropbox from the command line in Linux +================================================================================ +Cloud storage is everywhere in today's multi-device environment, where people want to access content across multiple devices wherever they go. Dropbox is the most widely used cloud storage service thanks to its elegant UI and flawless multi-platform compatibility. The popularity of Dropbox has led to a flurry of official or unofficial Dropbox clients that are available across different operating system platforms. + +Linux has its own share of Dropbox clients: CLI clients as well as GUI-based clients. [Dropbox Uploader][1] is an easy-to-use Dropbox CLI client written in BASH scripting language. In this tutorial, I describe** how to access Dropbox from the command line in Linux by using Dropbox Uploader**. + +### Install and Configure Dropbox Uploader on Linux ### + +To use Dropbox Uploader, download the script and make it executable. + + $ wget https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh + $ chmod +x dropbox_uploader.sh + +Make sure that you have installed curl on your system, since Dropbox Uploader runs Dropbox APIs via curl. + +To configure Dropbox Uploader, simply run dropbox_uploader.sh. When you run the script for the first time, it will ask you to grant the script access to your Dropbox account. + + $ ./dropbox_uploader.sh + +![](https://c2.staticflickr.com/6/5739/22860931599_10c08ff15f_c.jpg) + +As instructed above, go to [https://www.dropbox.com/developers/apps][2] on your web browser, and create a new Dropbox app. Fill in the information of the new app as shown below, and enter the app name as generated by Dropbox Uploader. + +![](https://c2.staticflickr.com/6/5745/22932921350_4123d2dbee_c.jpg) + +After you have created a new app, you will see app key/secret on the next page. Make a note of them. + +![](https://c1.staticflickr.com/1/736/22932962610_7db51aa718_c.jpg) + +Enter the app key and secret in the terminal window where dropbox_uploader.sh is running. dropbox_uploader.sh will then generate an oAUTH URL (e.g., https://www.dropbox.com/1/oauth/authorize?oauth_token=XXXXXXXXXXXX). + +![](https://c1.staticflickr.com/1/563/22601635533_423738baed_c.jpg) + +Go to the oAUTH URL generated above on your web browser, and allow access to your Dropbox account. + +![](https://c1.staticflickr.com/1/675/23202598606_6110c1a31b_c.jpg) + +This completes Dropbox Uploader configuration. To check whether Dropbox Uploader is successfully authenticated, run the following command. + + $ ./dropbox_uploader.sh info + +---------- + + Dropbox Uploader v0.12 + + > Getting info... + + Name: Dan Nanni + UID: XXXXXXXXXX + Email: my@email_address + Quota: 2048 Mb + Used: 13 Mb + Free: 2034 Mb + +### Dropbox Uploader Examples ### + +To list all contents in the top-level directory: + + $ ./dropbox_uploader.sh list + +To list all contents in a specific folder: + + $ ./dropbox_uploader.sh list Documents/manuals + +To upload a local file to a remote Dropbox folder: + + $ ./dropbox_uploader.sh upload snort.pdf Documents/manuals + +To download a remote file from Dropbox to a local file: + + $ ./dropbox_uploader.sh download Documents/manuals/mysql.pdf ./mysql.pdf + +To download an entire remote folder from Dropbox to a local folder: + + $ ./dropbox_uploader.sh download Documents/manuals ./manuals + +To create a new remote folder on Dropbox: + + $ ./dropbox_uploader.sh mkdir Documents/whitepapers + +To delete an entire remote folder (including all its contents) on Dropbox: + + $ ./dropbox_uploader.sh delete Documents/manuals + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/access-dropbox-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]:http://www.andreafabrizi.it/?dropbox_uploader +[2]:https://www.dropbox.com/developers/apps \ No newline at end of file From 3903a528232bde37a9baf05eed8f99c89d8fc3c9 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 23 Nov 2015 17:32:06 +0800 Subject: [PATCH 0377/1710] Update 20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md --- ...o Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md b/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md index 4610917275..93e3985d53 100644 --- a/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md +++ b/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md @@ -1,3 +1,5 @@ +translation by strugglingyouth + How to Install NVIDIA 358.16 Driver in Ubuntu 15.10, 14.04 ================================================================================ ![nvidia-logo-1](http://ubuntuhandbook.org/wp-content/uploads/2015/06/nvidia-logo-1.png) @@ -65,4 +67,4 @@ via: http://ubuntuhandbook.org/index.php/2015/11/install-nvidia-358-16-driver-ub [a]:http://ubuntuhandbook.org/index.php/about/ [1]:http://www.nvidia.com/Download/driverResults.aspx/95921/en-us [2]:http://www.nvidia.com/object/unix.html -[3]:https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa \ No newline at end of file +[3]:https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa From 165237a1651783e78b81bc5b533b352a3d5f3ce9 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 23 Nov 2015 22:21:09 +0800 Subject: [PATCH 0378/1710] tip 6 done --- .../20151028 10 Tips for 10x Application Performance.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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 1bbc4870c8..c570706ef4 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -112,22 +112,30 @@ NGINX 和NGINX Plus 可以被用作SSL/TLS 终结——处理客户端流量的 ### Tip #6: 使用 HTTP/2 或 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. +对于已经使用了SSL/TLS 的站点,HTTP/2 和SPDY 可以很好的提高性能,因为每个连接只需要一次握手。而对于没有使用SSL/TLS 的站点来说,HTTP/2 和SPDY会在响应速度上有些影响(通常会将度效率)。 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. +Google 在2012年开始把SPDY 作为一个比HTTP/1.x 更快速的协议来推荐。HTTP/2 是目前IETF 标准,他也基于SPDY。SPDY 已经被广泛的支持了,但是很快就会被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. +SPDY 和HTTP/2 的关键是用单连接来替代多路连接。单个连接是被复用的,所以它可以同时携带多个请求和响应的分片。 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. +通过使用一个连接这些协议可以避免过多的设置和管理多个连接,就像浏览器实现了HTTP/1.x 一样。单连接在对SSL 特别有效,这是因为它可以最小化SSL/TLS 建立安全链接时的握手时间。 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. +SPDY 协议需要使用SSL/TLS, 而HTTP/2 官方并不需要,但是目前所有支持HTTP/2的浏览器只有在使能了SSL/TLS 的情况下才会使用它。这就意味着支持HTTP/2 的浏览器只有在网站使用了SSL 并且服务器接收HTTP/2 流量的情况下才会启用HTTP/2。否则的话浏览器就会使用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]. +当你实现SPDY 或者HTTP/2时,你不再需要通常的HTTP 性能优化方案,比如域分隔资源聚合,以及图像登记。这些改变可以让你的代码和部署变得更简单和更易于管理。要了解HTTP/2 带来的这些变化可以浏览我们的[白皮书][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. +作为支持这些协议的一个样例,NGINX 已经从一开始就支持了SPDY,而且[大部分使用SPDY 协议的网站][35]都运行的是NGINX。NGINX 同时也[很早][36]对HTTP/2 的提供了支持,从2015 年9月开始开源NGINX 和NGINX Plus 就[支持][37]它了。 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. +经过一段时间,我们NGINX 希望更多的站点完全是能SSL 并且向HTTP/2 迁移。这将会提高安全性,同时新的优化手段也会被发现和实现,更简单的代码表现的更加优异。 ### Tip #7: 升级软件版本 ### From 3fd404a802f7983527f48fddfabbe8a07f003627 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 23 Nov 2015 22:39:09 +0800 Subject: [PATCH 0379/1710] tip 8 done --- .../20151028 10 Tips for 10x Application Performance.md | 6 ++++++ 1 file changed, 6 insertions(+) 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 c570706ef4..7fc96c65ea 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -154,14 +154,20 @@ NGINX 用户可以开始迁移到[NGINX 最新的开源软件][38] 或者[NGINX ### Tip #8: linux 系统性能调优 ### 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 是大多数web 服务器使用操作系统,而且作为你的架构的基础,Linux 表现出明显可以提高性能的机会。默认情况下,很多linux 系统都被设置为使用很少的资源,匹配典型的桌面应用负载。这就意味着web 应用需要最少一些等级的调优才能达到最大效能。 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: +Linux 优化是转变们针对web 服务器方面的。以NGINX 为例,这里有一些在加速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. +- **缓冲队列**。如果你有挂起的连接,那么你应该考虑增加net.core.somaxconn 的值,它代表了可以缓存的连接的最大数量。如果连接线直太小,那么你将会看到错误信息,而你可以逐渐的增加这个参数知道错误信息停止出现。 - **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. +- **文件描述符**。NGINX 对一个连接使用最多2个文件描述符。如果你的系统有很多连接,你可能就需要提高sys.fs.file_max ,增加系统对文件描述符数量整体的限制,这样子才能支持不断增加的负载需求。 - **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. +- **短暂端口**。当使用代理时,NGINX 会为每个上游服务器创建临时端口。你可以设置net.ipv4.ip_local_port_range 来提高这些端口的范围,增加可用的端口。你也可以减少非活动的端口的超时判断来重复使用端口,这可以通过net.ipv4.tcp_fin_timeout 来设置,这可以快速的提高流量。 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! +对于NGINX 来说,可以查阅[NGINX 性能调优指南][40]来学习如果优化你的Linux 系统,这样子它就可以很好的适应大规模网络流量而不会超过工作极限。 ### Tip #9: web 服务器性能调优 ### From 3d653e9bef89192b05da09cc3ea711430974c7d4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 23 Nov 2015 22:52:31 +0800 Subject: [PATCH 0380/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=B4=AF=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E4=BC=91=E6=81=AF=E4=B8=80=E4=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20151028 10 Tips for 10x Application Performance.md | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 7fc96c65ea..62891f33d9 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -172,19 +172,29 @@ For NGINX, check out the [NGINX performance tuning guides][40] to learn how to o ### Tip #9: web 服务器性能调优 ### 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: +无论你是用哪种web 服务器,你都需要对它进行优化来提高性能。下面的推荐手段可以用于任何web 服务器,但是一些设置是针对NGINX的。关键的优化手段包括: - **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. +- **f访问日志**。不要把每个请求的日志都直接写回磁盘,你可以在内存将日志缓存起来然后一批写回磁盘。对于NGINX 来说添加给指令*access_log* 添加参数 *buffer=size* 可以让系统在缓存满了的情况下才把日志写到此哦按。如果你添加了参数**flush=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. +- **缓存**。缓存掌握了内存中的部分资源知道满了位置,这可以让与客户端的通信更加高效。与内存中缓存不匹配的响应会写回磁盘,而这就会降低效能。当NGINX [启用][42]了缓存机制后,你可以使用指令*proxy_buffer_size* 和 *proxy_buffers* 来管理缓存。 - **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. From 5d3504c14e8be6954950bd29595426989dcf32a4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 23 Nov 2015 22:59:54 +0800 Subject: [PATCH 0381/1710] =?UTF-8?q?20151123=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 多一些硬文。 --- ...123 Data Structures in the Linux Kernel.md | 201 ++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 sources/tech/20151123 Data Structures in the Linux Kernel.md diff --git a/sources/tech/20151123 Data Structures in the Linux Kernel.md b/sources/tech/20151123 Data Structures in the Linux Kernel.md new file mode 100644 index 0000000000..187b3ce9cd --- /dev/null +++ b/sources/tech/20151123 Data Structures in the Linux Kernel.md @@ -0,0 +1,201 @@ +Data Structures in the Linux Kernel +================================================================================ + +Radix tree +-------------------------------------------------------------------------------- + +As you already know linux kernel provides many different libraries and functions which implement different data structures and algorithms. In this part we will consider one of these data structures - [Radix tree](http://en.wikipedia.org/wiki/Radix_tree). There are two files which are related to `radix tree` implementation and API in the linux kernel: + +* [include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h) +* [lib/radix-tree.c](https://github.com/torvalds/linux/blob/master/lib/radix-tree.c) + +Lets talk about what a `radix tree` is. Radix tree is a `compressed trie` where a [trie](http://en.wikipedia.org/wiki/Trie) is a data structure which implements an interface of an associative array and allows to store values as `key-value`. The keys are usually strings, but any data type can be used. A trie is different from an `n-tree` because of its nodes. Nodes of a trie do not store keys; instead, a node of a trie stores single character labels. The key which is related to a given node is derived by traversing from the root of the tree to this node. For example: + + +``` +               +-----------+ +               |           | +               |    " "    | + | | +        +------+-----------+------+ +        |                         | +        |                         | +   +----v------+            +-----v-----+ +   |           |            |           | +   |    g      |            |     c     | + | | | | +   +-----------+            +-----------+ +        |                         | +        |                         | +   +----v------+            +-----v-----+ +   |           |            |           | +   |    o      |            |     a     | + | | | | +   +-----------+            +-----------+ +                                  | +                                  | +                            +-----v-----+ +                            |           | +                            |     t     | + | | +                            +-----------+ +``` + +So in this example, we can see the `trie` with keys, `go` and `cat`. The compressed trie or `radix tree` differs from `trie` in that all intermediates nodes which have only one child are removed. + +Radix tree in linux kernel is the datastructure which maps values to integer keys. It is represented by the following structures from the file [include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h): + +```C +struct radix_tree_root { + unsigned int height; + gfp_t gfp_mask; + struct radix_tree_node __rcu *rnode; +}; +``` + +This structure presents the root of a radix tree and contains three fields: + +* `height` - height of the tree; +* `gfp_mask` - tells how memory allocations will be performed; +* `rnode` - pointer to the child node. + +The first field we will discuss is `gfp_mask`: + +Low-level kernel memory allocation functions take a set of flags as - `gfp_mask`, which describes how that allocation is to be performed. These `GFP_` flags which control the allocation process can have following values: (`GF_NOIO` flag) means sleep and wait for memory, (`__GFP_HIGHMEM` flag) means high memory can be used, (`GFP_ATOMIC` flag) means the allocation process has high-priority and can't sleep etc. + +* `GFP_NOIO` - can sleep and wait for memory; +* `__GFP_HIGHMEM` - high memory can be used; +* `GFP_ATOMIC` - allocation process is high-priority and can't sleep; + +etc. + +The next field is `rnode`: + +```C +struct radix_tree_node { + unsigned int path; + unsigned int count; + union { + struct { + struct radix_tree_node *parent; + void *private_data; + }; + struct rcu_head rcu_head; + }; + /* For tree user */ + struct list_head private_list; + void __rcu *slots[RADIX_TREE_MAP_SIZE]; + unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; +}; +``` + +This structure contains information about the offset in a parent and height from the bottom, count of the child nodes and fields for accessing and freeing a node. This fields are described below: + +* `path` - offset in parent & height from the bottom; +* `count` - count of the child nodes; +* `parent` - pointer to the parent node; +* `private_data` - used by the user of a tree; +* `rcu_head` - used for freeing a node; +* `private_list` - used by the user of a tree; + +The two last fields of the `radix_tree_node` - `tags` and `slots` are important and interesting. Every node can contains a set of slots which are store pointers to the data. Empty slots in the linux kernel radix tree implementation store `NULL`. Radix trees in the linux kernel also supports tags which are associated with the `tags` fields in the `radix_tree_node` structure. Tags allow individual bits to be set on records which are stored in the radix tree. + +Now that we know about radix tree structure, it is time to look on its API. + +Linux kernel radix tree API +--------------------------------------------------------------------------------- + +We start from the datastructure initialization. There are two ways to initialize a new radix tree. The first is to use `RADIX_TREE` macro: + +```C +RADIX_TREE(name, gfp_mask); +```` + +As you can see we pass the `name` parameter, so with the `RADIX_TREE` macro we can define and initialize radix tree with the given name. Implementation of the `RADIX_TREE` is easy: + +```C +#define RADIX_TREE(name, mask) \ + struct radix_tree_root name = RADIX_TREE_INIT(mask) + +#define RADIX_TREE_INIT(mask) { \ + .height = 0, \ + .gfp_mask = (mask), \ + .rnode = NULL, \ +} +``` + +At the beginning of the `RADIX_TREE` macro we define instance of the `radix_tree_root` structure with the given name and call `RADIX_TREE_INIT` macro with the given mask. The `RADIX_TREE_INIT` macro just initializes `radix_tree_root` structure with the default values and the given mask. + +The second way is to define `radix_tree_root` structure by hand and pass it with mask to the `INIT_RADIX_TREE` macro: + +```C +struct radix_tree_root my_radix_tree; +INIT_RADIX_TREE(my_tree, gfp_mask_for_my_radix_tree); +``` + +where: + +```C +#define INIT_RADIX_TREE(root, mask) \ +do { \ + (root)->height = 0; \ + (root)->gfp_mask = (mask); \ + (root)->rnode = NULL; \ +} while (0) +``` + +makes the same initialziation with default values as it does `RADIX_TREE_INIT` macro. + +The next are two functions for inserting and deleting records to/from a radix tree: + +* `radix_tree_insert`; +* `radix_tree_delete`; + +The first `radix_tree_insert` function takes three parameters: + +* root of a radix tree; +* index key; +* data to insert; + +The `radix_tree_delete` function takes the same set of parameters as the `radix_tree_insert`, but without data. + +The search in a radix tree implemented in two ways: + +* `radix_tree_lookup`; +* `radix_tree_gang_lookup`; +* `radix_tree_lookup_slot`. + +The first `radix_tree_lookup` function takes two parameters: + +* root of a radix tree; +* index key; + +This function tries to find the given key in the tree and return the record associated with this key. The second `radix_tree_gang_lookup` function have the following signature + +```C +unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, + void **results, + unsigned long first_index, + unsigned int max_items); +``` + +and returns number of records, sorted by the keys, starting from the first index. Number of the returned records will not be greater than `max_items` value. + +And the last `radix_tree_lookup_slot` function will return the slot which will contain the data. + +Links +--------------------------------------------------------------------------------- + +* [Radix tree](http://en.wikipedia.org/wiki/Radix_tree) +* [Trie](http://en.wikipedia.org/wiki/Trie) + +-------------------------------------------------------------------------------- + +via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/radix-tree.md + +作者:[0xAX] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + From 1b51f163156a8d4c53555f9415ff161bcba7b06d Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 23 Nov 2015 23:30:24 +0800 Subject: [PATCH 0382/1710] Translated sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md --- ...eSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md | 319 ------------------ ...eSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md | 317 +++++++++++++++++ 2 files changed, 317 insertions(+), 319 deletions(-) delete mode 100644 sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md create mode 100644 translated/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md 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 deleted file mode 100644 index de05f067b5..0000000000 --- a/sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md +++ /dev/null @@ -1,319 +0,0 @@ -ictlyh Translating -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 diff --git a/translated/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md b/translated/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md new file mode 100644 index 0000000000..7fd4414127 --- /dev/null +++ b/translated/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md @@ -0,0 +1,317 @@ +在 Ubuntu 15.10 上安装 PostgreSQL 9.4 和 phpPgAdmin +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/05/postgresql.png) + +### 简介 ### + +[PostgreSQL][1] 是一款强大的,开源对象关系型数据库系统。它支持所有的主流操作系统,包括 Linux、Unix(AIX、BSD、HP-UX,SGI IRIX、Mac OS、Solaris、Tru64) 以及 Windows 操作系统。 + +下面是 **Ubuntu** 发起者 **Mark Shuttleworth** 对 PostgreSQL 的一段评价。 + +> PostgreSQL 真的是一款很好的数据库系统。刚开始我们使用它的时候,并不确定它能否胜任工作。但我错的太离谱了。它很强壮、快速,在各个方面都很专业。 +> +> — Mark Shuttleworth. + +在这篇简短的指南中,让我们来看看如何在 Ubuntu 15.10 服务器中安装 PostgreSQL 9.4。 + +### 安装 PostgreSQL ### + +默认仓库中就有可用的 PostgreSQL。在终端中输入下面的命令安装它。 + + sudo apt-get install postgresql postgresql-contrib + +如果你需要其它的版本,按照下面那样先添加 PostgreSQL 仓库然后再安装。 + +**PostgreSQL apt 仓库** 支持 amd64 和 i386 架构的 Ubuntu 长期支持版(10.04、12.04 和 14.04),以及非长期支持版(14.04)。对于其它非长期支持版,该软件包虽然不能完全支持,但使用和 LTS 版本近似的也能正常工作。 + +#### Ubuntu 14.10 系统: #### + +新建文件**/etc/apt/sources.list.d/pgdg.list**; + + sudo vi /etc/apt/sources.list.d/pgdg.list + +用下面一行添加仓库: + + deb http://apt.postgresql.org/pub/repos/apt/ utopic-pgdg main + +**注意**: 上面的库只能用于 Ubuntu 14.10。还没有升级到 Ubuntu 15.04 和 15.10。 + +**Ubuntu 14.04**,添加下面一行: + + deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main + +**Ubuntu 12.04**,添加下面一行: + + deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main + +导入库签名密钥: + + wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc + +---------- + + sudo apt-key add - + +更新软件包列表: + + sudo apt-get update + +然后安装需要的版本。 + + sudo apt-get install postgresql-9.4 + +### 访问 PostgreSQL 命令窗口 ### + +默认的数据库名称和数据库用户名称都是 “**postgres**”。切换到 postgres 用户进行 postgresql 相关的操作: + + sudo -u postgres psql postgres + +#### 事例输出: #### + + psql (9.4.5) + Type "help" for help. + postgres=# + +要退出 postgresql 窗口,在 **psql** 窗口输入 **\q** 退出到终端。 + +### 设置 “postgres” 用户密码 ### + +登录到 postgresql 窗口, + + sudo -u postgres psql postgres + +用下面的命令为用户 postgres 设置密码: + + postgres=# \password postgres + Enter new password: + Enter it again: + postgres=# \q + +要安装 PostgreSQL Adminpack,在 postgresql 窗口输入下面的命令: + + sudo -u postgres psql postgres + +---------- + + postgres=# CREATE EXTENSION adminpack; + CREATE EXTENSION + +在 **psql** 窗口输入 **\q** 从 postgresql 窗口退回到终端。 + +### 创建新用户和数据库 ### + +例如,让我们创建一个新的用户,名为 “**senthil**”,密码是 “**ubuntu**”,以及名为 “**mydb**” 的数据库。 + + sudo -u postgres createuser -D -A -P senthil + +---------- + + sudo -u postgres createdb -O senthil mydb + +### 删除用户和数据库 ### + +要删除数据库,首先切换到 postgres 用户: + + sudo -u postgres psql postgres + +输入命令: + + $ drop database + +要删除一个用户,输入下面的命令: + + $ drop user + +### 配置 PostgreSQL-MD5 验证 ### + +**MD5 验证** 要求用户提供一个 MD5 加密的密码用于认证。首先编辑 **/etc/postgresql/9.4/main/pg_hba.conf** 文件: + + sudo vi /etc/postgresql/9.4/main/pg_hba.conf + +按照下面所示添加或修改行 + + [...] + # 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 + [...] + +其中, 192.168.1.0/24 是我的本地网络 IP 地址。用你自己的地址替换。 + +重启 postgresql 服务以使更改生效: + + sudo systemctl restart postgresql + +或者, + + sudo service postgresql restart + +### 配置 PostgreSQL TCP/IP 配置 ### + +默认情况下,没有启用 TCP/IP 连接,因此其它计算机的用户不能访问 postgresql。为了允许其它计算机的用户访问,编辑文件 **/etc/postgresql/9.4/main/postgresql.conf:** + + sudo vi /etc/postgresql/9.4/main/postgresql.conf + +找到下面一行: + + [...] + #listen_addresses = 'localhost' + [...] + #port = 5432 + [...] + +取消改行的注释,然后设置你 postgresql 服务器的 IP 地址,或者设置为 ‘*’ 监听所有用户。你应该谨慎设置所有远程用户都可以访问 PostgreSQL。 + + [...] + listen_addresses = '*' + [...] + port = 5432 + [...] + +重启 postgresql 服务保存更改: + + sudo systemctl restart postgresql + +或者, + + sudo service postgresql restart + +### 用 phpPgAdmin 管理 PostgreSQL ### + +[**phpPgAdmin**][2] 是基于 web 用 PHP 写的 PostgreSQL 管理工具。 + +默认仓库中有可用的 phpPgAdmin。用下面的命令安装 phpPgAdmin: + + sudo apt-get install phppgadmin + +默认情况下,你可以在本地系统的 web 浏览器用 **http://localhost/phppgadmin** 访问 phppgadmin。 + +要访问远程系统,在 Ubuntu 15.10 上做如下操作: + +编辑文件 **/etc/apache2/conf-available/phppgadmin.conf**, + + sudo vi /etc/apache2/conf-available/phppgadmin.conf + +找到 **Require local** 的一行在这行前面添加 **#** 注释掉它。 + + #Require local + +添加下面的一行: + + allow from all + +保存并退出文件。 + +然后重启 apache 服务。 + + sudo systemctl restart apache2 + +对于 Ubuntu 14.10 及之前版本: + +编辑 **/etc/apache2/conf.d/phppgadmin**: + + sudo nano /etc/apache2/conf.d/phppgadmin + +注释掉下面一行: + + [...] + #allow from 127.0.0.0/255.0.0.0 ::1/128 + +取消下面一行的注释使所有系统都可以访问 phppgadmin。 + + allow from all + +编辑 **/etc/apache2/apache2.conf**: + + sudo vi /etc/apache2/apache2.conf + +添加下面一行: + + Include /etc/apache2/conf.d/phppgadmin + +然后重启 apache 服务。 + + sudo service apache2 restart + +### 配置 phpPgAdmin ### + +编辑文件 **/etc/phppgadmin/config.inc.php**, 做以下更改。下面大部分选项都带有解释。认真阅读以便了解为什么要更改这些值。 + + sudo nano /etc/phppgadmin/config.inc.php + +找到下面一行: + + $conf['servers'][0]['host'] = ''; + +按照下面这样更改: + + $conf['servers'][0]['host'] = 'localhost'; + +找到这一行: + + $conf['extra_login_security'] = true; + +更改值为 **false**。 + + $conf['extra_login_security'] = false; + +找到这一行: + + $conf['owned_only'] = false; + +更改值为 **true**。 + + $conf['owned_only'] = true; + +保存并关闭文件。重启 postgresql 服务和 Apache 服务。 + + sudo systemctl restart postgresql + +---------- + + sudo systemctl restart apache2 + +或者, + + sudo service postgresql restart + + sudo service apache2 restart + +现在打开你的浏览器并导航到 **http://ip-address/phppgadmin**。你会看到以下截图。 + +![phpPgAdmin – Google Chrome_001](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_001.jpg) + +用你之前创建的用户登录。我之前已经创建了一个名为 “**senthil**” 的用户,密码是 “**ubuntu**”,因此我以 “senthil” 用户登录。 + +![phpPgAdmin – Google Chrome_002](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_002.jpg) + +然后你就可以访问 phppgadmin 面板了。 + +![phpPgAdmin – Google Chrome_003](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_003.jpg) + +用 postgres 用户登录: + +![phpPgAdmin – Google Chrome_004](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_004.jpg) + +就是这样。现在你可以用 phppgadmin 可视化创建、删除或者更改数据库了。 + +加油! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-postgresql-9-4-and-phppgadmin-on-ubuntu-15-10/ + +作者:[SK][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者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 b4c9b68050e335a1703dad32cb7f291418c7a374 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Nov 2015 02:02:10 +0800 Subject: [PATCH 0383/1710] PUB:20150909 Superclass--15 of the world's best living programmers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @martin2011qi 翻译这篇辛苦啦! --- ... of the world's best living programmers.md | 427 ++++++++++++++++++ ... of the world's best living programmers.md | 389 ---------------- 2 files changed, 427 insertions(+), 389 deletions(-) create mode 100644 published/20150909 Superclass--15 of the world's best living programmers.md delete mode 100644 translated/talk/20150909 Superclass--15 of the world's best living programmers.md diff --git a/published/20150909 Superclass--15 of the world's best living programmers.md b/published/20150909 Superclass--15 of the world's best living programmers.md new file mode 100644 index 0000000000..89a42d29d7 --- /dev/null +++ b/published/20150909 Superclass--15 of the world's best living programmers.md @@ -0,0 +1,427 @@ +超神们:15 位健在的世界级程序员! +================================================================================ + +当开发人员说起世界顶级程序员时,他们的名字往往会被提及。 + +好像现在程序员有很多,其中不乏有许多优秀的程序员。但是哪些程序员更好呢? + +虽然这很难客观评价,不过在这个话题确实是开发者们津津乐道的。ITworld 深入程序员社区,避开四溅的争执口水,试图找出可能存在的所谓共识。事实证明,屈指可数的某些名字经常是讨论的焦点。 + +![](http://images.techhive.com/images/article/2015/09/superman-620x465-100611650-orig.jpg) + +*图片来源: [tom_bullock CC BY 2.0][1]* + +下面就让我们来看看这些世界顶级的程序员吧! + +### 玛格丽特·汉密尔顿(Margaret Hamilton) ### + +![](http://images.techhive.com/images/article/2015/09/margaret_hamilton-620x465-100611764-orig.jpg) + +*图片来源: [NASA][2]* + +**成就: 阿波罗飞行控制软件背后的大脑** + +生平: 查尔斯·斯塔克·德雷珀实验室(Charles Stark Draper Laboratory)软件工程部的主任,以她为首的团队负责设计和打造 NASA 的阿波罗的舰载飞行控制器软件和空间实验室(Skylab)的任务。基于阿波罗这段的工作经历,她又后续开发了[通用系统语言(Universal Systems Language)][5]和[开发先于事实( Development Before the Fact)][6]的范例。开创了[异步软件、优先调度和超可靠的软件设计][7]理念。被认为发明了“[软件工程( software engineering)][8]”一词。1986年获[奥古斯塔·埃达·洛夫莱斯奖(Augusta Ada Lovelace Award)][9],2003年获 [NASA 杰出太空行动奖(Exceptional Space Act Award)][10]。 + +评论: + +> “汉密尔顿发明了测试,使美国计算机工程规范了很多” —— [ford_beeblebrox][11] + +> “我认为在她之前(不敬地说,包括高德纳(Knuth)在内的)计算机编程是(另一种形式上留存的)数学分支。然而这个宇宙飞船的飞行控制系统明确地将编程带入了一个崭新的领域。” —— [Dan Allen][12] + +> “... 她引入了‘软件工程’这个术语 — 并作出了最好的示范。” —— [David Hamilton][13] + +> “真是个坏家伙” [Drukered][14] + + +### 唐纳德·克努斯(Donald Knuth),即 高德纳 ### + +![](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]* + +**成就: 《计算机程序设计艺术(The Art of Computer Programming,TAOCP)》 作者** + +生平: 撰写了[编程理论的权威书籍][16]。发明了数字排版系统 Tex。1971年,[ACM(美国计算机协会)葛丽丝·穆雷·霍普奖(Grace Murray Hopper Award)][17] 的首位获奖者。1974年获 ACM [图灵奖(A. M. Turing)][18],1979年获[美国国家科学奖章(National Medal of Science)][19],1995年获IEEE[约翰·冯·诺依曼奖章(John von Neumann Medal)][20]。1998年入选[计算机历史博物馆(Computer History Museum)名人录(Hall of Fellows)][21]。 + +评论: + +> “... 写的计算机编程艺术(The Art of Computer Programming,TAOCP)可能是有史以来计算机编程方面最大的贡献。”—— [佚名][22] + +> “唐·克努斯的 TeX 是我所用过的计算机程序中唯一一个几乎没有 bug 的。真是让人印象深刻!”—— [Jaap Weel][23] + +> “如果你要问我的话,我只能说太棒了!” —— [Mitch Rees-Jones][24] + +### 肯·汤普逊(Ken Thompson) ### + +![](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 之父** + +生平:与[丹尼斯·里奇(Dennis Ritchie)][26]共同创造了 Unix。创造了 [B 语言][27]、[UTF-8 字符编码方案][28]、[ed 文本编辑器][29],同时也是 Go 语言的共同开发者。(和里奇)共同获得1983年的[图灵奖(A.M. Turing Award )][30],1994年获 [IEEE 计算机先驱奖( IEEE Computer Pioneer Award)][31],1998年获颁[美国国家科技奖章( National Medal of Technology )][32]。在1997年入选[计算机历史博物馆(Computer History Museum)名人录(Hall of Fellows)][33]。 + +评论: + +> “... 可能是有史以来最能成事的程序员了。Unix 内核,Unix 工具,国际象棋程序世界冠军 Belle,Plan 9,Go 语言。” —— [Pete Prokopowicz][34] + +> “肯所做出的贡献,据我所知无人能及,是如此的根本、实用、经得住时间的考验,时至今日仍在使用。” —— [Jan Jannink][35] + + +### 理查德·斯托曼(Richard Stallman) ### + +![](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][135]* + +**成就: Emacs 和 GCC 缔造者** + +生平: 成立了 [GNU 工程(GNU Project)] [36],并创造了它的许多核心工具,如 [Emacs、GCC、GDB][37] 和 [GNU Make][38]。还创办了[自由软件基金会(Free Software Foundation)] [39]。1990年荣获 ACM 的[葛丽丝·穆雷·霍普奖( Grace Murray Hopper Award)][40],1998年获 [EFF 先驱奖(Pioneer Award)][41]. + +评论: + +> “... 在 Symbolics 对阵 LMI 的战斗中,独自一人与一众 Lisp 黑客好手对码。” —— [Srinivasan Krishnan][42] + +> “通过他在编程上的精湛造诣与强大信念,开辟了一整套编程与计算机的亚文化。” —— [Dan Dunay][43] + +> “我可以不赞同这位伟人的很多方面,不必盖棺论定,他不可否认都已经是一位伟大的程序员了。” —— [Marko Poutiainen][44] + +> “试想 Linux 如果没有 GNU 工程的前期工作会怎么样。(多亏了)斯托曼的炸弹!” —— [John Burnette][45] + +### 安德斯·海尔斯伯格(Anders Hejlsberg) ### + +![](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 编译器和第一个集成开发环境。而后,[领导了 Turbo Pascal 的继任者 Delphi][48] 的构建。[C# 的主要设计师和架构师][49]。2001年荣获[ Dr. Dobb 的杰出编程奖(Dr. Dobb's Excellence in Programming Award )][50]。 + +评论: + +> “他用汇编语言为当时两个主流的 PC 操作系统(DOS 和 CPM)编写了 [Pascal] 编译器。用它来编译、链接并运行仅需几秒钟而不是几分钟。” —— [Steve Wood][51] + +> “我佩服他 - 他创造了我最喜欢的开发工具,陪伴着我度过了三个关键的时期直至我成为一位专业的软件工程师。” —— [Stefan Kiryazov][52] + +### Doug Cutting ### + +![](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] + +**成就: 创造了 Lucene** + +生平: [开发了 Lucene 搜索引擎以及 Web 爬虫 Nutch][54] 和用于大型数据集的分布式处理套件 [Hadoop][55]。一位强有力的开源支持者(Lucene、Nutch 以及 Hadoop 都是开源的)。前 [Apache 软件基金(Apache Software Foundation)的理事][56]。 + +评论: + + +> “...他就是那个既写出了优秀搜索框架(lucene/solr),又为世界开启大数据之门(hadoop)的男人。” —— [Rajesh Rao][57] + +> “他在 Lucene 和 Hadoop(及其它工程)的创造/工作中为世界创造了巨大的财富和就业...” —— [Amit Nithianandan][58] + +### Sanjay Ghemawat ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_sanjay_ghemawat-620x465-100502876-orig.jpg) + +*图片来源: [Association for Computing Machinery][59]* + +**成就: 谷歌核心架构师** + +生平: [协助设计和实现了一些谷歌大型分布式系统的功能][60],包括 MapReduce、BigTable、Spanner 和谷歌文件系统(Google File System)。[创造了 Unix 的 ical ][61]日历系统。2009年入选[美国国家工程院(National Academy of Engineering)][62]。2012年荣获 [ACM-Infosys 基金计算机科学奖( ACM-Infosys Foundation Award in the Computing Sciences)][63]。 + +评论: + + +> “Jeff Dean的僚机。” —— [Ahmet Alp Balkan][64] + +### Jeff Dean ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_jeff_dean-620x465-100502866-orig.jpg) + +*图片来源: [Google][65]* + +**成就: 谷歌搜索索引背后的大脑** + +生平:协助设计和实现了[许多谷歌大型分布式系统的功能][66],包括网页爬虫,索引搜索,AdSense,MapReduce,BigTable 和 Spanner。2009年入选[美国国家工程院( National Academy of Engineering)][67]。2012年荣获ACM 的[SIGOPS 马克·维瑟奖( SIGOPS Mark Weiser Award)][68]及[ACM-Infosys基金计算机科学奖( ACM-Infosys Foundation Award in the Computing Sciences)][69]。 + +评论: + +> “... 带来了在数据挖掘(GFS、MapReduce、BigTable)上的突破。” —— [Natu Lauchande][70] + +> “... 设计、构建并部署 MapReduce 和 BigTable,和以及数不清的其它东西” —— [Erik Goldman][71] + +### 林纳斯·托瓦兹(Linus Torvalds) ### + +![](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 先驱奖(EFF Pioneer Award)][75],2000年荣获[英国电脑学会(British Computer Society)授予的洛夫莱斯勋章(Lovelace Medal)][76],2012年荣获[千禧技术奖(Millenium Technology Prize)][77]还有2014年[IEEE计算机学会( IEEE Computer Society)授予的计算机先驱奖(Computer Pioneer Award)][78]。同样入选了2008年的[计算机历史博物馆( Computer History Museum)名人录(Hall of Fellows)][79]与2012年的[互联网名人堂(Internet Hall of Fame )][80]。 + +评论: + +> “他只用了几年的时间就写出了 Linux 内核,而 GNU Hurd(GNU 开发的内核)历经25年的开发却丝毫没有准备发布的意思。他的成就就是带来了希望。” —— [Erich Ficker][81] + +> “托沃兹可能是程序员的程序员。” —— [Dan Allen][82] + +> “他真的很棒。” —— [Alok Tripathy][83] + +### 约翰·卡马克(John Carmack) ### + +![](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(Wolfenstein 3D)、毁灭战士(Doom)和雷神之锤(Quake)等所谓的即时 FPS 游戏。引领了[切片适配刷新(adaptive tile refresh)][86], [二叉空间分割(binary space partitioning)][87],表面缓存(surface caching)等开创性的计算机图像技术。2001年入选[互动艺术与科学学会名人堂(Academy of Interactive Arts and Sciences Hall of Fame)][88],2007年和2008年荣获工程技术类[艾美奖(Emmy awards)][89]并于2010年由[游戏开发者甄选奖( Game Developers Choice Awards)][90]授予终生成就奖。 + +评论: + +> “他在写第一个渲染引擎的时候不到20岁。这家伙这是个天才。我若有他四分之一的天赋便心满意足了。” —— [Alex Dolinsky][91] + +> “... 德军总部3D(Wolfenstein 3D)、毁灭战士(Doom)还有雷神之锤(Quake)在那时都是革命性的,影响了一代游戏设计师。” —— [dniblock][92] + +> “一个周末他几乎可以写出任何东西....” —— [Greg Naughton][93] + +> “他是编程界的莫扎特... ” —— [Chris Morris][94] + +### 法布里斯·贝拉(Fabrice Bellard) ### + +![](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编译器(Tiny C Compiler)和 一个可执行文件压缩软件 LZEXE。2000年和2001年[C语言混乱代码大赛(Obfuscated C Code Contest)的获胜者][97]并在2011年荣获[Google-O'Reilly 开源奖(Google-O'Reilly Open Source Award )][98]。[计算 Pi 最多位数][99]的前世界纪录保持着。 + +评论: + + +> “我觉得法布里斯·贝拉做的每一件事都是那么显著而又震撼。” —— [raphinou][100] + +> “法布里斯·贝拉是世界上最高产的程序员...” —— [Pavan Yara][101] + +> “他就像软件工程界的尼古拉·特斯拉(Nikola Tesla)。” —— [Michael Valladolid][102] + +> “自80年代以来,他一直高产出一系列的成功作品。” —— [Michael Biggins][103] + +### Jon Skeet ### + +![](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]* + +**成就: Stack Overflow 的传说级贡献者** + +生平: Google 工程师,[深入解析C#(C# in Depth)][105]的作者。保持着[有史以来在 Stack Overflow 上最高的声誉][106],平均每月解答390个问题。 + +评论: + + +> “他根本不需要调试器,只要他盯一下代码,错误之处自会原形毕露。” —— [Steven A. Lowe][107] + +> “如果他的代码没有通过编译,那编译器应该道歉。” —— [Dan Dyer][108] + +> “他根本不需要什么编程规范,他的代码就是编程规范。” —— [佚名][109] + +### 亚当·安捷罗(Adam D'Angelo) ### + +![](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年以高中生的身份在[美国计算机奥林匹克(USA Computing Olympiad)上第八位完成比赛][112]。2004年ACM国际大学生编程大赛(International Collegiate Programming Contest)[获得银牌的团队 - 加利福尼亚技术研究所( California Institute of Technology)][113]的成员。2005年入围 Topcoder 大学生[算法编程挑战赛(Algorithm Coding Competition)][114]。 + +评论: + +> “一位程序设计全才。” —— [佚名][115] + +> "我做的每个好东西,他都已有了六个。" —— [马克.扎克伯格(Mark Zuckerberg)][116] + +### Petr Mitrechev ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_petr_mitrichev-620x465-100502869-orig.jpg) + +*图片来源: [Facebook][117]* + +**成就: 有史以来最具竞技能力的程序员之一** + +生平: 在国际信息学奥林匹克(International Olympiad in Informatics)中[两次获得金牌][118](2000,2002)。在2006,[赢得 Google Code Jam][119] 同时也是[TopCoder Open 算法大赛冠军][120]。也同样,两次赢得 Facebook黑客杯(Facebook Hacker Cup)([2011][121],[2013][122])。写这篇文章的时候,[TopCoder 榜中排第二][123] (即:Petr)、在 [Codeforces 榜同样排第二][124]。 + +评论: + +> “他是竞技程序员的偶像,即使在印度也是如此...” —— [Kavish Dwivedi][125] + +### Gennady Korotkevich ### + +![](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]* + +**成就: 竞技编程小神童** + +生平: 国际信息学奥林匹克(International Olympiad in Informatics)中最小参赛者(11岁),[6次获得金牌][127] (2007-2012)。2013年 ACM 国际大学生编程大赛(International Collegiate Programming Contest)[获胜队伍][128]成员及[2014 Facebook 黑客杯(Facebook Hacker Cup)][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) +校对:[wxy](https://github.com/wxy) + +本文由 [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 +[135]:http://commons.wikimedia.org/wiki/File:Jielbeaumadier_richard_stallman_2010.jpg \ No newline at end of file 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 deleted file mode 100644 index 6f59aa13d9..0000000000 --- a/translated/talk/20150909 Superclass--15 of the world's best living programmers.md +++ /dev/null @@ -1,389 +0,0 @@ -教父们: 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 66916e81bc287c57b520847a9873100e2037bffd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 24 Nov 2015 11:35:31 +0800 Subject: [PATCH 0384/1710] =?UTF-8?q?20151124-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ew--5 memory debuggers for Linux coding.md | 284 ++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 sources/talk/20151124 Review--5 memory debuggers for Linux coding.md diff --git a/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md b/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md new file mode 100644 index 0000000000..db465e47cd --- /dev/null +++ b/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md @@ -0,0 +1,284 @@ +Review: 5 memory debuggers for Linux coding +================================================================================ +![](http://images.techhive.com/images/article/2015/11/penguinadmin-2400px-100627186-primary.idge.jpg) +Credit: [Moini][1] + +As a programmer, I'm aware that I tend to make mistakes -- and why not? Even programmers are human. Some errors are detected during code compilation, while others get caught during software testing. However, a category of error exists that usually does not get detected at either of these stages and that may cause the software to behave unexpectedly -- or worse, terminate prematurely. + +If you haven't already guessed it, I am talking about memory-related errors. Manually debugging these errors can be not only time-consuming but difficult to find and correct. Also, it's worth mentioning that these errors are surprisingly common, especially in software written in programming languages like C and C++, which were designed for use with [manual memory management][2]. + +Thankfully, several programming tools exist that can help you find memory errors in your software programs. In this roundup, I assess five popular, free and open-source memory debuggers that are available for Linux: Dmalloc, Electric Fence, Memcheck, Memwatch and Mtrace. I've used all five in my day-to-day programming, and so these reviews are based on practical experience. + +eviews are based on practical experience. + +### [Dmalloc][3] ### + +**Developer**: Gray Watson +**Reviewed version**: 5.5.2 +**Linux support**: All flavors +**License**: Creative Commons Attribution-Share Alike 3.0 License + +Dmalloc is a memory-debugging tool developed by Gray Watson. It is implemented as a library that provides wrappers around standard memory management functions like **malloc(), calloc(), free()** and more, enabling programmers to detect problematic code. + +![cw dmalloc output](http://images.techhive.com/images/article/2015/11/cw_dmalloc-output-100627040-large.idge.png) +Dmalloc + +As listed on the tool's Web page, the debugging features it provides includes memory-leak tracking, [double free][4] error tracking and [fence-post write detection][5]. Other features include file/line number reporting, and general logging of statistics. + +#### What's new #### + +Version 5.5.2 is primarily a [bug-fix release][6] containing corrections for a couple of build and install problems. + +#### What's good about it #### + +The best part about Dmalloc is that it's extremely configurable. For example, you can configure it to include support for C++ programs as well as threaded applications. A useful functionality it provides is runtime configurability, which means that you can easily enable/disable the features the tool provides while it is being executed. + +You can also use Dmalloc with the [GNU Project Debugger (GDB)][7] -- just add the contents of the dmalloc.gdb file (located in the contrib subdirectory in Dmalloc's source package) to the .gdbinit file in your home directory. + +Another thing that I really like about Dmalloc is its extensive documentation. Just head to the [documentation section][8] on its official website, and you'll get everything from how to download, install, run and use the library to detailed descriptions of the features it provides and an explanation of the output file it produces. There's also a section containing solutions to some common problems. + +#### Other considerations #### + +Like Mtrace, Dmalloc requires programmers to make changes to their program's source code. In this case you may, at the very least, want to add the **dmalloc.h** header, because it allows the tool to report the file/line numbers of calls that generate problems, something that is very useful as it saves time while debugging. + +In addition, the Dmalloc library, which is produced after the package is compiled, needs to be linked with your program while the program is being compiled. + +However, complicating things somewhat is the fact that you also need to set an environment variable, dubbed **DMALLOC_OPTION**, that the debugging tool uses to configure the memory debugging features -- as well as the location of the output file -- at runtime. While you can manually assign a value to the environment variable, beginners may find that process a bit tough, given that the Dmalloc features you want to enable are listed as part of that value, and are actually represented as a sum of their respective hexadecimal values -- you can read more about it [here][9]. + +An easier way to set the environment variable is to use the [Dmalloc Utility Program][10], which was designed for just that purpose. + +#### Bottom line #### + +Dmalloc's real strength lies in the configurability options it provides. It is also highly portable, having being successfully ported to many OSes, including AIX, BSD/OS, DG/UX, Free/Net/OpenBSD, GNU/Hurd, HPUX, Irix, Linux, MS-DOG, NeXT, OSF, SCO, Solaris, SunOS, Ultrix, Unixware and even Unicos (on a Cray T3E). Although the tool has a bit of a learning curve associated with it, the features it provides are worth it. + +### [Electric Fence][15] ### + +**Developer**: Bruce Perens +**Reviewed version**: 2.2.3 +**Linux support**: All flavors +**License**: GNU GPL (version 2) + +Electric Fence is a memory-debugging tool developed by Bruce Perens. It is implemented in the form of a library that your program needs to link to, and is capable of detecting overruns of memory allocated on a [heap][11] ) as well as memory accesses that have already been released. + +![cw electric fence output](http://images.techhive.com/images/article/2015/11/cw_electric-fence-output-100627041-large.idge.png) +Electric Fence + +As the name suggests, Electric Fence creates a virtual fence around each allocated buffer in a way that any illegal memory access results in a [segmentation fault][12]. The tool supports both C and C++ programs. + +#### What's new #### + +Version 2.2.3 contains a fix for the tool's build system, allowing it to actually pass the -fno-builtin-malloc option to the [GNU Compiler Collection (GCC)][13]. + +#### What's good about it #### + +The first thing that I liked about Electric Fence is that -- unlike Memwatch, Dmalloc and Mtrace -- it doesn't require you to make any changes in the source code of your program. You just need to link your program with the tool's library during compilation. + +Secondly, the way the debugging tool is implemented makes sure that a segmentation fault is generated on the very first instruction that causes a bounds violation, which is always better than having the problem detected at a later stage. + +Electric Fence always produces a copyright message in output irrespective of whether an error was detected or not. This behavior is quite useful, as it also acts as a confirmation that you are actually running an Electric Fence-enabled version of your program. + +#### Other considerations #### + +On the other hand, what I really miss in Electric Fence is the ability to detect memory leaks, as it is one of the most common and potentially serious problems that software written in C/C++ has. In addition, the tool cannot detect overruns of memory allocated on the stack, and is not thread-safe. + +Given that the tool allocates an inaccessible virtual memory page both before and after a user-allocated memory buffer, it ends up consuming a lot of extra memory if your program makes too many dynamic memory allocations. + +Another limitation of the tool is that it cannot explicitly tell exactly where the problem lies in your programs' code -- all it does is produce a segmentation fault whenever it detects a memory-related error. To find out the exact line number, you'll have to debug your Electric Fence-enabled program with a tool like [The Gnu Project Debugger (GDB)][14], which in turn depends on the -g compiler option to produce line numbers in output. + +Finally, although Electric Fence is capable of detecting most buffer overruns, an exception is the scenario where the allocated buffer size is not a multiple of the word size of the system -- in that case, an overrun (even if it's only a few bytes) won't be detected. + +#### Bottom line #### + +Despite all its limitations, where Electric Fence scores is the ease of use -- just link your program with the tool once, and it'll alert you every time it detects a memory issue it's capable of detecting. However, as already mentioned, the tool requires you to use a source-code debugger like GDB. + +### [Memcheck][16] ### + +**Developer**: [Valgrind Developers][17] +**Reviewed version**: 3.10.1 +**Linux support**: All flavors +**License**: GPL + +[Valgrind][18] is a suite that provides several tools for debugging and profiling Linux programs. Although it works with programs written in many different languages -- such as Java, Perl, Python, Assembly code, Fortran, Ada and more -- the tools it provides are largely aimed at programs written in C and C++. + +The most popular Valgrind tool is Memcheck, a memory-error detector that can detect issues such as memory leaks, invalid memory access, uses of undefined values and problems related to allocation and deallocation of heap memory. + +#### What's new #### + +This [release][19] of the suite (3.10.1) is a minor one that primarily contains fixes to bugs reported in version 3.10.0. In addition, it also "backports fixes for all reported missing AArch64 ARMv8 instructions and syscalls from the trunk." + +#### What's good about it #### + +Memcheck, like all other Valgrind tools, is basically a command line utility. It's very easy to use: If you normally run your program on the command line in a form such as prog arg1 arg2, you just need to add a few values, like this: valgrind --leak-check=full prog arg1 arg2. + +![cw memcheck output](http://images.techhive.com/images/article/2015/11/cw_memcheck-output-100627037-large.idge.png) +Memcheck + +(Note: You don't need to mention Memcheck anywhere in the command line because it's the default Valgrind tool. However, you do need to initially compile your program with the -g option -- which adds debugging information -- so that Memcheck's error messages include exact line numbers.) + +What I really like about Memcheck is that it provides a lot of command line options (such as the --leak-check option mentioned above), allowing you to not only control how the tool works but also how it produces the output. + +For example, you can enable the --track-origins option to see information on the sources of uninitialized data in your program. Enabling the --show-mismatched-frees option will let Memcheck match the memory allocation and deallocation techniques. For code written in C language, Memcheck will make sure that only the free() function is used to deallocate memory allocated by malloc(), while for code written in C++, the tool will check whether or not the delete and delete[] operators are used to deallocate memory allocated by new and new[], respectively. If a mismatch is detected, an error is reported. + +But the best part, especially for beginners, is that the tool even produces suggestions about which command line option the user should use to make the output more meaningful. For example, if you do not use the basic --leak-check option, it will produce an output suggesting: "Rerun with --leak-check=full to see details of leaked memory." And if there are uninitialized variables in the program, the tool will generate a message that says, "Use --track-origins=yes to see where uninitialized values come from." + +Another useful feature of Memcheck is that it lets you [create suppression files][20], allowing you to suppress certain errors that you can't fix at the moment -- this way you won't be reminded of them every time the tool is run. It's worth mentioning that there already exists a default suppression file that Memcheck reads to suppress errors in the system libraries, such as the C library, that come pre-installed with your OS. You can either create a new suppression file for your use, or edit the existing one (usually /usr/lib/valgrind/default.supp). + +For those seeking advanced functionality, it's worth knowing that Memcheck can also [detect memory errors][21] in programs that use [custom memory allocators][22]. In addition, it also provides [monitor commands][23] that can be used while working with Valgrind's built-in gdbserver, as well as a [client request mechanism][24] that allows you not only to tell the tool facts about the behavior of your program, but make queries as well. + +#### Other considerations #### + +While there's no denying that Memcheck can save you a lot of debugging time and frustration, the tool uses a lot of memory, and so can make your program execution significantly slower (around 20 to 30 times, [according to the documentation][25]). + +Aside from this, there are some other limitations, too. According to some user comments, Memcheck apparently isn't [thread-safe][26]; it doesn't detect [static buffer overruns][27]). Also, there are some Linux programs, like [GNU Emacs][28], that currently do not work with Memcheck. + +If you're interested in taking a look, an exhaustive list of Valgrind's limitations can be found [here][29]. + +#### Bottom line #### + +Memcheck is a handy memory-debugging tool for both beginners as well as those looking for advanced features. While it's very easy to use if all you need is basic debugging and error checking, there's a bit of learning curve if you want to use features like suppression files or monitor commands. + +Although it has a long list of limitations, Valgrind (and hence Memcheck) claims on its site that it is used by [thousands of programmers][30] across the world -- the team behind the tool says it's received feedback from users in over 30 countries, with some of them working on projects with up to a whopping 25 million lines of code. + +### [Memwatch][31] ### + +**Developer**: Johan Lindh +**Reviewed version**: 2.71 +**Linux support**: All flavors +**License**: GNU GPL + +Memwatch is a memory-debugging tool developed by Johan Lindh. Although it's primarily a memory-leak detector, it is also capable (according to its Web page) of detecting other memory-related issues like [double-free error tracking and erroneous frees][32], buffer overflow and underflow, [wild pointer][33] writes, and more. + +The tool works with programs written in C. Although you can also use it with C++ programs, it's not recommended (according to the Q&A file that comes with the tool's source package). + +#### What's new #### + +This version adds ULONG_LONG_MAX to detect whether a program is 32-bit or 64-bit. + +#### What's good about it #### + +Like Dmalloc, Memwatch comes with good documentation. You can refer to the USING file if you want to learn things like how the tool works; how it performs initialization, cleanup and I/O operations; and more. Then there is a FAQ file that is aimed at helping users in case they face any common error while using Memcheck. Finally, there is a test.c file that contains a working example of the tool for your reference. + +![cw memwatch output](http://images.techhive.com/images/article/2015/11/cw_memwatch_output-100627038-large.idge.png) +Memwatch + +Unlike Mtrace, the log file to which Memwatch writes the output (usually memwatch.log) is in human-readable form. Also, instead of truncating, Memwatch appends the memory-debugging output to the file each time the tool is run, allowing you to easily refer to the previous outputs should the need arise. + +It's also worth mentioning that when you execute your program with Memwatch enabled, the tool produces a one-line output on [stdout][34] informing you that some errors were found -- you can then head to the log file for details. If no such error message is produced, you can rest assured that the log file won't contain any mistakes -- this actually saves time if you're running the tool several times. + +Another thing that I liked about Memwatch is that it also provides a way through which you can capture the tool's output from within the code, and handle it the way you like (refer to the mwSetOutFunc() function in the Memwatch source code for more on this). + +#### Other considerations #### + +Like Mtrace and Dmalloc, Memwatch requires you to add extra code to your source file -- you have to include the memwatch.h header file in your code. Also, while compiling your program, you need to either compile memwatch.c along with your program's source files or include the object module from the compile of the file, as well as define the MEMWATCH and MW_STDIO variables on the command line. Needless to say, the -g compiler option is also required for your program if you want exact line numbers in the output. + +There are some features that it doesn't contain. For example, the tool cannot detect attempts to write to an address that has already been freed or read data from outside the allocated memory. Also, it's not thread-safe. Finally, as I've already pointed out in the beginning, there is no guarantee on how the tool will behave if you use it with programs written in C++. + +#### Bottom line #### + +Memcheck can detect many memory-related problems, making it a handy debugging tool when dealing with projects written in C. Given that it has a very small source code, you can learn how the tool works, debug it if the need arises, and even extend or update its functionality as per your requirements. + +### [Mtrace][35] ### + +**Developers**: Roland McGrath and Ulrich Drepper +**Reviewed version**: 2.21 +**Linux support**: All flavors +**License**: GNU LGPL + +Mtrace is a memory-debugging tool included in [the GNU C library][36]. It works with both C and C++ programs on Linux, and detects memory leaks caused by unbalanced calls to the malloc() and free() functions. + +![cw mtrace output](http://images.techhive.com/images/article/2015/11/cw_mtrace-output-100627039-large.idge.png) +Mtrace + +The tool is implemented in the form of a function called mtrace(), which traces all malloc/free calls made by a program and logs the information in a user-specified file. Because the file contains data in computer-readable format, a Perl script -- also named mtrace -- is used to convert and display it in human-readable form. + +#### What's new #### + +[The Mtrace source][37] and [the Perl file][38] that now come with the GNU C library (version 2.21) add nothing new to the tool aside from an update to the copyright dates. + +#### What's good about it #### + +The best part about Mtrace is that the learning curve for it isn't steep; all you need to understand is how and where to add the mtrace() -- and the corresponding muntrace() -- function in your code, and how to use the Mtrace Perl script. The latter is very straightforward -- all you have to do is run the mtrace() command. (For an example, see the last command in the screenshot above.) + +Another thing that I like about Mtrace is that it's scalable -- which means that you can not only use it to debug a complete program, but can also use it to detect memory leaks in individual modules of the program. Just call the mtrace() and muntrace() functions within each module. + +Finally, since the tool is triggered when the mtrace() function -- which you add in your program's source code -- is executed, you have the flexibility to enable the tool dynamically (during program execution) [using signals][39]. + +#### Other considerations #### + +Because the calls to mtrace() and mauntrace() functions -- which are declared in the mcheck.h file that you need to include in your program's source -- are fundamental to Mtrace's operation (the mauntrace() function is not [always required][40]), the tool requires programmers to make changes in their code at least once. + +Be aware that you need to compile your program with the -g option (provided by both the [GCC][41] and [G++][42] compilers), which enables the debugging tool to display exact line numbers in the output. In addition, some programs (depending on how big their source code is) can take a long time to compile. Finally, compiling with -g increases the size of the executable (because it produces extra information for debugging), so you have to remember that the program needs to be recompiled without -g after the testing has been completed. + +To use Mtrace, you need to have some basic knowledge of environment variables in Linux, given that the path to the user-specified file -- which the mtrace() function uses to log all the information -- has to be set as a value for the MALLOC_TRACE environment variable before the program is executed. + +Feature-wise, Mtrace is limited to detecting memory leaks and attempts to free up memory that was never allocated. It can't detect other memory-related issues such as illegal memory access or use of uninitialized memory. Also, [there have been complaints][43] that it's not [thread-safe][44]. + +### Conclusions ### + +Needless to say, each memory debugger that I've discussed here has its own qualities and limitations. So, which one is best suited for you mostly depends on what features you require, although ease of setup and use might also be a deciding factor in some cases. + +Mtrace is best suited for cases where you just want to catch memory leaks in your software program. It can save you some time, too, since the tool comes pre-installed on your Linux system, something which is also helpful in situations where the development machines aren't connected to the Internet or you aren't allowed to download a third party tool for any kind of debugging. + +Dmalloc, on the other hand, can not only detect more error types compared to Mtrace, but also provides more features, such as runtime configurability and GDB integration. Also, unlike any other tool discussed here, Dmalloc is thread-safe. Not to mention that it comes with detailed documentation, making it ideal for beginners. + +Although Memwatch comes with even more comprehensive documentation than Dmalloc, and can detect even more error types, you can only use it with software written in the C programming language. One of its features that stands out is that it lets you handle its output from within the code of your program, something that is helpful in case you want to customize the format of the output. + +If making changes to your program's source code is not what you want, you can use Electric Fence. However, keep in mind that it can only detect a couple of error types, and that doesn't include memory leaks. Plus, you also need to know GDB basics to make the most out of this memory-debugging tool. + +Memcheck is probably the most comprehensive of them all. It detects more error types and provides more features than any other tool discussed here -- and it doesn't require you to make any changes in your program's source code.But be aware that, while the learning curve is not very high for basic usage, if you want to use its advanced features, a level of expertise is definitely required. + +-------------------------------------------------------------------------------- + +via: http://www.computerworld.com/article/3003957/linux/review-5-memory-debuggers-for-linux-coding.html + +作者:[Himanshu Arora][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/Himanshu-Arora/ +[1]:https://openclipart.org/detail/132427/penguin-admin +[2]:https://en.wikipedia.org/wiki/Manual_memory_management +[3]:http://dmalloc.com/ +[4]:https://www.owasp.org/index.php/Double_Free +[5]:https://stuff.mit.edu/afs/sipb/project/gnucash-test/src/dmalloc-4.8.2/dmalloc.html#Fence-Post%20Overruns +[6]:http://dmalloc.com/releases/notes/dmalloc-5.5.2.html +[7]:http://www.gnu.org/software/gdb/ +[8]:http://dmalloc.com/docs/ +[9]:http://dmalloc.com/docs/latest/online/dmalloc_26.html#SEC32 +[10]:http://dmalloc.com/docs/latest/online/dmalloc_23.html#SEC29 +[11]:https://en.wikipedia.org/wiki/Memory_management#Dynamic_memory_allocation +[12]:https://en.wikipedia.org/wiki/Segmentation_fault +[13]:https://en.wikipedia.org/wiki/GNU_Compiler_Collection +[14]:http://www.gnu.org/software/gdb/ +[15]:https://launchpad.net/ubuntu/+source/electric-fence/2.2.3 +[16]:http://valgrind.org/docs/manual/mc-manual.html +[17]:http://valgrind.org/info/developers.html +[18]:http://valgrind.org/ +[19]:http://valgrind.org/docs/manual/dist.news.html +[20]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles +[21]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.mempools +[22]:http://stackoverflow.com/questions/4642671/c-memory-allocators +[23]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.monitor-commands +[24]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs +[25]:http://valgrind.org/docs/manual/valgrind_manual.pdf +[26]:http://sourceforge.net/p/valgrind/mailman/message/30292453/ +[27]:https://msdn.microsoft.com/en-us/library/ee798431%28v=cs.20%29.aspx +[28]:http://www.computerworld.com/article/2484425/linux/5-free-linux-text-editors-for-programming-and-word-processing.html?nsdr=true&page=2 +[29]:http://valgrind.org/docs/manual/manual-core.html#manual-core.limits +[30]:http://valgrind.org/info/ +[31]:http://www.linkdata.se/sourcecode/memwatch/ +[32]:http://www.cecalc.ula.ve/documentacion/tutoriales/WorkshopDebugger/007-2579-007/sgi_html/ch09.html +[33]:http://c2.com/cgi/wiki?WildPointer +[34]:https://en.wikipedia.org/wiki/Standard_streams#Standard_output_.28stdout.29 +[35]:http://www.gnu.org/software/libc/manual/html_node/Tracing-malloc.html +[36]:https://www.gnu.org/software/libc/ +[37]:https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/mtrace.c;h=df10128b872b4adc4086cf74e5d965c1c11d35d2;hb=HEAD +[38]:https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/mtrace.pl;h=0737890510e9837f26ebee2ba36c9058affb0bf1;hb=HEAD +[39]:http://webcache.googleusercontent.com/search?q=cache:s6ywlLtkSqQJ:www.gnu.org/s/libc/manual/html_node/Tips-for-the-Memory-Debugger.html+&cd=1&hl=en&ct=clnk&gl=in&client=Ubuntu +[40]:http://www.gnu.org/software/libc/manual/html_node/Using-the-Memory-Debugger.html#Using-the-Memory-Debugger +[41]:http://linux.die.net/man/1/gcc +[42]:http://linux.die.net/man/1/g++ +[43]:https://sourceware.org/ml/libc-help/2014-05/msg00008.html +[44]:https://en.wikipedia.org/wiki/Thread_safety \ No newline at end of file From eefcb0e5e64ca2bcd4388324c4c8c9ef5ef255ab Mon Sep 17 00:00:00 2001 From: chenj zhang <1134386961@qq.com> Date: Tue, 24 Nov 2015 17:03:41 +0800 Subject: [PATCH 0385/1710] Update 20151123 LNAV--Ncurses based log file viewer.md --- sources/tech/20151123 LNAV--Ncurses based log file viewer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20151123 LNAV--Ncurses based log file viewer.md b/sources/tech/20151123 LNAV--Ncurses based log file viewer.md index 0ceb06c252..08b7ee011a 100644 --- a/sources/tech/20151123 LNAV--Ncurses based log file viewer.md +++ b/sources/tech/20151123 LNAV--Ncurses based log file viewer.md @@ -75,9 +75,9 @@ If you want to view CUPS logs run the following command from your terminal via: http://www.ubuntugeek.com/lnav-ncurses-based-log-file-viewer.html 作者:[ruchi][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://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file +[a]:http://www.ubuntugeek.com/author/ubuntufix From 80e6360096c5568ae19db1e00b4f78914bdafb82 Mon Sep 17 00:00:00 2001 From: ezio Date: Tue, 24 Nov 2015 22:40:47 +0800 Subject: [PATCH 0386/1710] tip 9 done --- ...51028 10 Tips for 10x Application Performance.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 62891f33d9..b27db20846 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -181,22 +181,23 @@ Whatever web server you use, you need to tune it for web application performance - **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]. -- **上游保活**。 +- **上游保活**。上游的连接——即连接到应用服务器、数据库服务器等机器的连接——同样也会收益于连接保活。对于上游连接老说,你可以增加*保活时间*,即每个工人进程的空闲保活连接个数。这就可以提高连接的复用次数,减少需要重新打开全新的连接次数。更多关于保活连接的信息可以参见[blog][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. -- **限制**。 +- **限制**。限制客户端使用的资源可以提高性能和安全性。对于NGINX 来说指令*limit_conn* 和 *limit_conn_zone* 限制了每个源的连接数量,而*limit_rate* 限制了带宽。这些限制都可以阻止合法用户*攫取* 资源,同时夜避免了攻击。指令*limit_req* 和 *limit_req_zone* 限制了客户端请求。对于上游服务器来说,可以在上游服务器的配置块里使用max_conns 可以限制连接到上游服务器的连接。 这样可以避免服务器过载。关联的队列指令会创建一个队列来在连接数抵达*max_conn* 限制时在指定的长度的时间内保存特定数量的请求。 - **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. -- **工人进程**。 +- **工人进程**。工人进程负责处理请求。NGINX 采用事件驱动模型和依赖操作系统的机制来有效的讲请求分发给不同的工人进程。这条建议推荐设置每个CPU 的参数*worker_processes* 。如果需要的话,工人连接的最大数(默认512)可以安全在大部分系统增加,是指找到最适合你的系统的值。 - **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. -- **套接字分割**。 +- **套接字分割**。通常一个套接字监听器会把新连接分配给所有工人进程。套接字分割会未每个工人进程创建一个套接字监听器,这样一来以内核分配连接给套接字就成为可能了。折可以减少锁竞争,并且提高多核系统的性能,要使能[套接字分隔][43]需要在监听指令里面加上复用端口参数。 - **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]. -- **线程池**。 +- **线程池**。一个计算机进程可以处理一个缓慢的操作。对于web 服务器软件来说磁盘访问会影响很多更快的操作,比如计算或者在内存中拷贝。使用了线程池之后慢操作可以分配到不同的任务集,而主进程可以一直运行快速操作。当磁盘操作完成后结果会返回给主进程的循环。在NGINX理有两个操作——read()系统调用和sendfile() ——被分配到了[线程池][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. +在[blog][45]可以看到更详细的NGINX 调优方法。 ### Tip #10: 监视系统活动来解决问题和瓶颈 ### From 6d222a5ade91ecfc291963e00e4f5c454c685f47 Mon Sep 17 00:00:00 2001 From: ezio Date: Tue, 24 Nov 2015 23:03:09 +0800 Subject: [PATCH 0387/1710] tip 10 done --- .../20151028 10 Tips for 10x Application Performance.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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 b27db20846..b8e88b3b5c 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -202,19 +202,28 @@ See this [blog post][45] for more details on tuning NGINX. ### Tip #10: 监视系统活动来解决问题和瓶颈 ### 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. +在应用开发中要使得系统变得非常高效的关键是监视你的系统在现实世界运行的性能。你必须能通过特定的设备和你的web 基础设施上监控程序活动。 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. +应用的总体性能监控工具,比如New Relic 和Dynatrace,可以帮助你监控到从远处加载网页的时间,二NGINX 可以帮助你监控到应用发送的时 间。当你需要考虑为基础设施添加容量以满足流量需求时,应用性能数据可以告诉你你的优化措施的确起作用了。 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. +为了帮助开发者快速的发现、解决问题,NGINX Plus 增加了[应用感知健康度检查][46] ——对重复出现的常规事件进行综合分析并在问题出现时向你发出警告。NGINX Plus 同时提供[会话过滤][47] 功能,折可以组织当前任务未完成之前不接受新的连接,另一个功能是慢启动,允许一个从错误恢复过来的服务器追赶上负载均衡服务器群的速度。当有使用得当时,健康度检查可以让你在问题变得严重到影响用户体验前就发现它,而会话过滤和慢启动可以让你替换服务器,并且这个过程不会对性能和正常运行时间产生负面影响。这个表格就展示了NGINX Plus 内建模块在web 基础设施[监视活活动][48]的仪表盘,包括了服务器群,TCP 连接和缓存等信息。 ![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) From e239ea75c1c33c85b2a29851547e8e9b2a8544fd Mon Sep 17 00:00:00 2001 From: ezio Date: Tue, 24 Nov 2015 23:32:29 +0800 Subject: [PATCH 0388/1710] translation done --- ...1028 10 Tips for 10x Application Performance.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 b8e88b3b5c..cacfb2abc6 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -227,22 +227,30 @@ To help identify and resolve issues quickly, NGINX Plus adds [application-aware ![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 ### +### 总结: 看看10倍性能提升的效果 ### 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? +这些性能提升方案对任何一个web 应用都可用并且效果都很好,而实际效果取决于你的预算,如你能花费的时间,目前实现方案的差距。所以你该如何对你自己的应用实现10倍性能提升? 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. +- **反向代理服务器和负载均衡**。没有负载均衡或者负载均衡很差都会造成间断的极低性能。增加一个反向代理,比如NGINX可以避免web应用程序在内存和磁盘之间抖动。负载均衡可以将过载服务器的任务转移到空闲的服务器,还可以轻松的进行扩容。这些改变都可以产生巨大的性能提升,很容易就可以比你现在的实现方案的最差性能提高10倍,对于总体性能来说可能提高的不多,但是也是有实质性的提升。 - **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. +- **缓存动态和静态数据**。如果你又一个web 服务器负担过重,那么毫无疑问肯定是你的应用服务器,只通过缓存动态数据就可以在峰值时间提高10倍的性能。缓存静态文件可以提高个位数倍的性能。 - **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. +- **压缩数据**。使用媒体文件压缩格式,比如图像格式JPEG,图形格式PNG,视频格式MPEG-4,音乐文件格式MP3可以极大的提高性能。一旦这些都用上了,然后压缩文件数据可以提高初始页面加载速度提高两倍。 - **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. +- **优化SSL/TLS**。安全握手会对性能产生巨大的影响,对他们的优化可能会对初始响应特别是重文本站点产生2倍的提升。优化SSL/TLS 下媒体文件只会产生很小的性能提升。 - **Implementing HTTP/2 and SPDY**. When used with SSL/TLS, these protocols are likely to result in incremental improvements for overall site performance. +- **使用HTTP/2 和SPDY*。当你使用了SSL/TLS,这些协议就可以提高整个站点的性能。 - **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]. +- **对linux 和web 服务器软件进行调优**。比如优化缓存机制,使用保活连接,分配时间敏感型任务到不同的线程池可以明显的提高性能;举个例子,线程池可以加速对磁盘敏感的任务[近一个数量级][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 ### +我们希望你亲自尝试这些技术。我们希望这些提高应用性能的手段可以被你实现。请在下面评论栏分享你的结果 或者在标签#NGINX 和#webperf 下tweet 你的故事。 +### 网上资源 ### [Statista.com – Share of the internet economy in the gross domestic product in G-20 countries in 2016][50] From b0555ecbb4208c4b52cbdd168e82efcb5bae01f8 Mon Sep 17 00:00:00 2001 From: ezio Date: Tue, 24 Nov 2015 23:45:49 +0800 Subject: [PATCH 0389/1710] =?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 --- ...10 Tips for 10x Application Performance.md | 51 +------------------ 1 file changed, 2 insertions(+), 49 deletions(-) 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 cacfb2abc6..55cd24bd9a 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -111,144 +111,97 @@ NGINX 和NGINX Plus 可以被用作SSL/TLS 终结——处理客户端流量的 ### Tip #6: 使用 HTTP/2 或 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. 对于已经使用了SSL/TLS 的站点,HTTP/2 和SPDY 可以很好的提高性能,因为每个连接只需要一次握手。而对于没有使用SSL/TLS 的站点来说,HTTP/2 和SPDY会在响应速度上有些影响(通常会将度效率)。 -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. Google 在2012年开始把SPDY 作为一个比HTTP/1.x 更快速的协议来推荐。HTTP/2 是目前IETF 标准,他也基于SPDY。SPDY 已经被广泛的支持了,但是很快就会被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. SPDY 和HTTP/2 的关键是用单连接来替代多路连接。单个连接是被复用的,所以它可以同时携带多个请求和响应的分片。 -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. 通过使用一个连接这些协议可以避免过多的设置和管理多个连接,就像浏览器实现了HTTP/1.x 一样。单连接在对SSL 特别有效,这是因为它可以最小化SSL/TLS 建立安全链接时的握手时间。 -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. SPDY 协议需要使用SSL/TLS, 而HTTP/2 官方并不需要,但是目前所有支持HTTP/2的浏览器只有在使能了SSL/TLS 的情况下才会使用它。这就意味着支持HTTP/2 的浏览器只有在网站使用了SSL 并且服务器接收HTTP/2 流量的情况下才会启用HTTP/2。否则的话浏览器就会使用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]. 当你实现SPDY 或者HTTP/2时,你不再需要通常的HTTP 性能优化方案,比如域分隔资源聚合,以及图像登记。这些改变可以让你的代码和部署变得更简单和更易于管理。要了解HTTP/2 带来的这些变化可以浏览我们的[白皮书][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. 作为支持这些协议的一个样例,NGINX 已经从一开始就支持了SPDY,而且[大部分使用SPDY 协议的网站][35]都运行的是NGINX。NGINX 同时也[很早][36]对HTTP/2 的提供了支持,从2015 年9月开始开源NGINX 和NGINX Plus 就[支持][37]它了。 -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. 经过一段时间,我们NGINX 希望更多的站点完全是能SSL 并且向HTTP/2 迁移。这将会提高安全性,同时新的优化手段也会被发现和实现,更简单的代码表现的更加优异。 ### Tip #7: 升级软件版本 ### -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. 一个提高应用性能的简单办法是根据软件的稳定性和性能的评价来选在你的软件栈。进一步说,因为高性能组件的开发者更愿意追求更高的性能和解决bug ,所以值得使用最新版本的软件。新版本往往更受开发者和用户社区的关注。更新的版本往往会利用到新的编译器优化,包括对新硬件的调优。 -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. 稳定的新版本通常比旧版本具有更好的兼容性和更高的性能。一直进行软件更新,可以非常简单的保持软件保持最佳的优化,解决掉bug,以及安全性的提高。 -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. 一直使用旧版软件也会组织你利用新的特性。比如上面说到的HTTP/2,目前要求OpenSSL 1.0.1.在2016 年中期开始将会要求1.0.2 ,而这是在2015年1月才发布的。 -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. NGINX 用户可以开始迁移到[NGINX 最新的开源软件][38] 或者[NGINX Plus][39];他们都包含了罪行的能力,如socket分区和线程池(见下文),这些都已经为性能优化过了。然后好好看看的你软件栈,把他们升级到你能能升级道德最新版本吧。 ### Tip #8: linux 系统性能调优 ### -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 是大多数web 服务器使用操作系统,而且作为你的架构的基础,Linux 表现出明显可以提高性能的机会。默认情况下,很多linux 系统都被设置为使用很少的资源,匹配典型的桌面应用负载。这就意味着web 应用需要最少一些等级的调优才能达到最大效能。 -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: Linux 优化是转变们针对web 服务器方面的。以NGINX 为例,这里有一些在加速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. - **缓冲队列**。如果你有挂起的连接,那么你应该考虑增加net.core.somaxconn 的值,它代表了可以缓存的连接的最大数量。如果连接线直太小,那么你将会看到错误信息,而你可以逐渐的增加这个参数知道错误信息停止出现。 -- **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. - **文件描述符**。NGINX 对一个连接使用最多2个文件描述符。如果你的系统有很多连接,你可能就需要提高sys.fs.file_max ,增加系统对文件描述符数量整体的限制,这样子才能支持不断增加的负载需求。 -- **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. -- **短暂端口**。当使用代理时,NGINX 会为每个上游服务器创建临时端口。你可以设置net.ipv4.ip_local_port_range 来提高这些端口的范围,增加可用的端口。你也可以减少非活动的端口的超时判断来重复使用端口,这可以通过net.ipv4.tcp_fin_timeout 来设置,这可以快速的提高流量。 +- **临时端口**。当使用代理时,NGINX 会为每个上游服务器创建临时端口。你可以设置net.ipv4.ip_local_port_range 来提高这些端口的范围,增加可用的端口。你也可以减少非活动的端口的超时判断来重复使用端口,这可以通过net.ipv4.tcp_fin_timeout 来设置,这可以快速的提高流量。 -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! 对于NGINX 来说,可以查阅[NGINX 性能调优指南][40]来学习如果优化你的Linux 系统,这样子它就可以很好的适应大规模网络流量而不会超过工作极限。 ### Tip #9: web 服务器性能调优 ### -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: 无论你是用哪种web 服务器,你都需要对它进行优化来提高性能。下面的推荐手段可以用于任何web 服务器,但是一些设置是针对NGINX的。关键的优化手段包括: -- **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. - **f访问日志**。不要把每个请求的日志都直接写回磁盘,你可以在内存将日志缓存起来然后一批写回磁盘。对于NGINX 来说添加给指令*access_log* 添加参数 *buffer=size* 可以让系统在缓存满了的情况下才把日志写到此哦按。如果你添加了参数**flush=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. - **缓存**。缓存掌握了内存中的部分资源知道满了位置,这可以让与客户端的通信更加高效。与内存中缓存不匹配的响应会写回磁盘,而这就会降低效能。当NGINX [启用][42]了缓存机制后,你可以使用指令*proxy_buffer_size* 和 *proxy_buffers* 来管理缓存。 -- **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]. +- **客户端保活**。保活连接可以减少开销,特别是使用SSL/TLS时。对于NGINX 来说,你可以增加*keepalive_requests* 的值,从默认值100 开始修改,这样一个客户端就可以转交一个指定的连接,而且你也可以通过增加*keepalive_timeout* 的值来允许保活连接存活更长时间,结果就是让后来的请求处理的更快速。 - **上游保活**。上游的连接——即连接到应用服务器、数据库服务器等机器的连接——同样也会收益于连接保活。对于上游连接老说,你可以增加*保活时间*,即每个工人进程的空闲保活连接个数。这就可以提高连接的复用次数,减少需要重新打开全新的连接次数。更多关于保活连接的信息可以参见[blog][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. - **限制**。限制客户端使用的资源可以提高性能和安全性。对于NGINX 来说指令*limit_conn* 和 *limit_conn_zone* 限制了每个源的连接数量,而*limit_rate* 限制了带宽。这些限制都可以阻止合法用户*攫取* 资源,同时夜避免了攻击。指令*limit_req* 和 *limit_req_zone* 限制了客户端请求。对于上游服务器来说,可以在上游服务器的配置块里使用max_conns 可以限制连接到上游服务器的连接。 这样可以避免服务器过载。关联的队列指令会创建一个队列来在连接数抵达*max_conn* 限制时在指定的长度的时间内保存特定数量的请求。 -- **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. - **工人进程**。工人进程负责处理请求。NGINX 采用事件驱动模型和依赖操作系统的机制来有效的讲请求分发给不同的工人进程。这条建议推荐设置每个CPU 的参数*worker_processes* 。如果需要的话,工人连接的最大数(默认512)可以安全在大部分系统增加,是指找到最适合你的系统的值。 -- **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. - **套接字分割**。通常一个套接字监听器会把新连接分配给所有工人进程。套接字分割会未每个工人进程创建一个套接字监听器,这样一来以内核分配连接给套接字就成为可能了。折可以减少锁竞争,并且提高多核系统的性能,要使能[套接字分隔][43]需要在监听指令里面加上复用端口参数。 -- **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]. - **线程池**。一个计算机进程可以处理一个缓慢的操作。对于web 服务器软件来说磁盘访问会影响很多更快的操作,比如计算或者在内存中拷贝。使用了线程池之后慢操作可以分配到不同的任务集,而主进程可以一直运行快速操作。当磁盘操作完成后结果会返回给主进程的循环。在NGINX理有两个操作——read()系统调用和sendfile() ——被分配到了[线程池][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. 在[blog][45]可以看到更详细的NGINX 调优方法。 ### Tip #10: 监视系统活动来解决问题和瓶颈 ### -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. 在应用开发中要使得系统变得非常高效的关键是监视你的系统在现实世界运行的性能。你必须能通过特定的设备和你的web 基础设施上监控程序活动。 -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. 应用的总体性能监控工具,比如New Relic 和Dynatrace,可以帮助你监控到从远处加载网页的时间,二NGINX 可以帮助你监控到应用发送的时 间。当你需要考虑为基础设施添加容量以满足流量需求时,应用性能数据可以告诉你你的优化措施的确起作用了。 -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. 为了帮助开发者快速的发现、解决问题,NGINX Plus 增加了[应用感知健康度检查][46] ——对重复出现的常规事件进行综合分析并在问题出现时向你发出警告。NGINX Plus 同时提供[会话过滤][47] 功能,折可以组织当前任务未完成之前不接受新的连接,另一个功能是慢启动,允许一个从错误恢复过来的服务器追赶上负载均衡服务器群的速度。当有使用得当时,健康度检查可以让你在问题变得严重到影响用户体验前就发现它,而会话过滤和慢启动可以让你替换服务器,并且这个过程不会对性能和正常运行时间产生负面影响。这个表格就展示了NGINX Plus 内建模块在web 基础设施[监视活活动][48]的仪表盘,包括了服务器群,TCP 连接和缓存等信息。 ![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) ### 总结: 看看10倍性能提升的效果 ### -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? 这些性能提升方案对任何一个web 应用都可用并且效果都很好,而实际效果取决于你的预算,如你能花费的时间,目前实现方案的差距。所以你该如何对你自己的应用实现10倍性能提升? -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. - **反向代理服务器和负载均衡**。没有负载均衡或者负载均衡很差都会造成间断的极低性能。增加一个反向代理,比如NGINX可以避免web应用程序在内存和磁盘之间抖动。负载均衡可以将过载服务器的任务转移到空闲的服务器,还可以轻松的进行扩容。这些改变都可以产生巨大的性能提升,很容易就可以比你现在的实现方案的最差性能提高10倍,对于总体性能来说可能提高的不多,但是也是有实质性的提升。 -- **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. - **缓存动态和静态数据**。如果你又一个web 服务器负担过重,那么毫无疑问肯定是你的应用服务器,只通过缓存动态数据就可以在峰值时间提高10倍的性能。缓存静态文件可以提高个位数倍的性能。 -- **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. - **压缩数据**。使用媒体文件压缩格式,比如图像格式JPEG,图形格式PNG,视频格式MPEG-4,音乐文件格式MP3可以极大的提高性能。一旦这些都用上了,然后压缩文件数据可以提高初始页面加载速度提高两倍。 -- **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. - **优化SSL/TLS**。安全握手会对性能产生巨大的影响,对他们的优化可能会对初始响应特别是重文本站点产生2倍的提升。优化SSL/TLS 下媒体文件只会产生很小的性能提升。 -- **Implementing HTTP/2 and SPDY**. When used with SSL/TLS, these protocols are likely to result in incremental improvements for overall site performance. - **使用HTTP/2 和SPDY*。当你使用了SSL/TLS,这些协议就可以提高整个站点的性能。 -- **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]. - **对linux 和web 服务器软件进行调优**。比如优化缓存机制,使用保活连接,分配时间敏感型任务到不同的线程池可以明显的提高性能;举个例子,线程池可以加速对磁盘敏感的任务[近一个数量级][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! 我们希望你亲自尝试这些技术。我们希望这些提高应用性能的手段可以被你实现。请在下面评论栏分享你的结果 或者在标签#NGINX 和#webperf 下tweet 你的故事。 ### 网上资源 ### From ae1c5b3663902bb06d0402bbc698c38e81780ba5 Mon Sep 17 00:00:00 2001 From: ezio Date: Tue, 24 Nov 2015 23:48:08 +0800 Subject: [PATCH 0390/1710] =?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 --- .../tech/20151028 10 Tips for 10x Application Performance.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151028 10 Tips for 10x Application Performance.md (100%) diff --git a/sources/tech/20151028 10 Tips for 10x Application Performance.md b/translated/tech/20151028 10 Tips for 10x Application Performance.md similarity index 100% rename from sources/tech/20151028 10 Tips for 10x Application Performance.md rename to translated/tech/20151028 10 Tips for 10x Application Performance.md From 84ae23b98281a6ec70c34b88699c6f931ff96be6 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 25 Nov 2015 00:32:41 +0800 Subject: [PATCH 0391/1710] Create 20151125 Running a mainline kernel on a cellphone.md --- ...unning a mainline kernel on a cellphone.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sources/tech/20151125 Running a mainline kernel on a cellphone.md diff --git a/sources/tech/20151125 Running a mainline kernel on a cellphone.md b/sources/tech/20151125 Running a mainline kernel on a cellphone.md new file mode 100644 index 0000000000..8607db3bb6 --- /dev/null +++ b/sources/tech/20151125 Running a mainline kernel on a cellphone.md @@ -0,0 +1,29 @@ +Running a mainline kernel on a cellphone + +By Jonathan Corbet + +2015 Kernel Summit One of the biggest freedoms associated with free software is the ability to replace a program with an updated or modified version. Even so, of the many millions of people using Linux-powered phones, few are able to run a mainline kernel on those phones, even if they have the technical skills to do the replacement. The sad fact is that no mainstream phone available runs mainline kernels. A session at the 2015 Kernel Summit, led by Rob Herring, explored this problem and what might be done to address it. + +When asked, most of the developers in the room indicated that they would prefer to be able to run mainline kernels on their phones — though a handful did say that they would rather not do so. Rob has been working on this problem for the last year and a half in support of Project Ara (mentioned in this article). But the news is not good. + +There is, he said, too much out-of-tree code running on a typical handset; mainline kernels simply lack the drivers needed to make that handset work. A typical phone is running 1-3 million lines of out-of-tree code. Almost all of those phones are stuck on the 3.10 kernel — or something even older. There are all kinds of reasons for this, but the simple fact is that things seem to move too quickly in the handset world for the kernel community to keep up. Is that, he asked, something that we care about? + +Tim Bird noted that the Nexus 1, one of the original Android phones, never ran a mainline kernel and never will. It broke the promise of open source, making it impossible for users to put a new kernel onto their devices. At this point, no phone supports that ability. Peter Zijlstra wondered about how much of that out-of-tree code was duplicated functionality from one handset to the next; Rob noted that he has run into three independently developed hotplug governors so far. + +Dirk Hohndel suggested that few people care. Of the billion phones out there, he said, approximately 27 of them have owners who care about running mainline kernels. The rest just want to get the phone to work. Perhaps developers who are concerned about running mainline kernels are trying to solve the wrong problem. + +Chris Mason said that handset vendors are currently facing the same sorts of problems that distributors dealt with many years ago. They are coping with a lot of inefficient, repeated, duplicated work. Once the distributors [Rob Herring] decided to put their work into the mainline instead of carrying it themselves, things got a lot better. The key is to help the phone manufacturers to realize that they can benefit in the same way; that, rather than pressure from users, is how the problem will be solved. + +Grant Likely raised concerns about security in a world where phones cannot be upgraded. What we need is a real distribution market for phones. But, as long as the vendors are in charge of the operating software, phones will not be upgradeable. We have a big security mess coming, he said. Peter added that, with Stagefright, that mess is already upon us. + +Ted Ts'o said that running mainline kernels is not his biggest concern. He would be happy if the phones on sale this holiday season would be running a 3.18 or 4.1 kernel, rather than being stuck on 3.10. That, he suggested, is a more solvable problem. Steve Rostedt said that would not solve the security problem, but Ted remarked that a newer kernel would at least make it easier to backport fixes. Grant replied that, one year from now, it would all just happen again; shipping newer kernels is just an incremental fix. Kees Cook added that there is not much to be gained from backporting fixes; the real problem is that there are no defenses from bugs (he would expand on this theme in a separate session later in the day). + +Rob said that any kind of solution would require getting the vendors on board. That, though, will likely run into trouble with the sort of lockdown that vendors like to apply to their devices. Paolo Bonzini asked whether it would be possible to sue vendors over unfixed security vulnerabilities, especially when the devices are still under warranty. Grant said that upgradeability had to become a market requirement or it simply wasn't going to happen. It might be a nasty security issue that causes this to happen, or carriers might start requiring it. Meanwhile, kernel developers need to keep pushing in that direction. Rob noted that, beyond the advantages noted thus far, the ability to run mainline kernels would help developers to test and validate new features on Android devices. + +Josh Triplett asked whether the community would be prepared to do what it would take if the industry were to come around to the idea of mainline kernel support. There would be lots of testing and validation of kernels on handsets required; Android Compatibility Test Suite failures would have to be treated as regressions. Rob suggested that this could be discussed next year, after the basic functionality is in place, but Josh insisted that, if the demand were to show up, we would have to be able to give a good answer. + +Tim said that there is currently a big disconnect with the vendor world; vendors are not reporting or contributing anything back to the community at all. They are completely disconnected, so there is no forward progress ever. Josh noted that when vendors do report bugs with the old kernels they are using, the reception tends to be less than friendly. Arnd Bergmann said that what was needed was to get one of the big silicon vendors to commit to the idea and get its hardware to a point where running mainline kernels was possible; that would put pressure on the others. But, he added, that would require the existence of one free GPU driver that got shipped with the hardware — something that does not exist currently. + +Rob put up a list of problem areas, but there was not much time for discussion of the particulars. WiFi drivers continue to be an issue, especially with the new features being added in the Android world. Johannes Berg agreed that the new features are an issue; the Android developers do not even talk about them until they ship with the hardware. Support for most of those features does eventually land in the mainline kernel, though. + +As things wound down, Ben Herrenschmidt reiterated that the key was to get vendors to realize that working with the mainline kernel is in their own best interest; it saves work in the long run. Mark Brown said that, in past years when the kernel version shipped with Android moved forward more reliably, the benefits of working upstream were more apparent to vendors. Now that things seem to be stuck on 3.10, that pressure is not there in the same way. The session ended with developers determined to improve the situation, but without any clear plan for getting there. From abe55d640a56ac813b961da499f4b4ea5c15f0ca Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 25 Nov 2015 09:35:09 +0800 Subject: [PATCH 0392/1710] Delete 20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md --- ... 358.16 Driver in Ubuntu 15.10 or 14.04.md | 70 ------------------- 1 file changed, 70 deletions(-) delete mode 100644 sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md diff --git a/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md b/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md deleted file mode 100644 index 93e3985d53..0000000000 --- a/sources/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md +++ /dev/null @@ -1,70 +0,0 @@ -translation by strugglingyouth - -How to Install NVIDIA 358.16 Driver in Ubuntu 15.10, 14.04 -================================================================================ -![nvidia-logo-1](http://ubuntuhandbook.org/wp-content/uploads/2015/06/nvidia-logo-1.png) - -[NVIDIA 358.16][1], the first stable release in NVIDIA 358 series, has been announced with some fixes to 358.09 (Beta) and other small features. - -NVIDIA 358 added a new **nvidia-modeset.ko** kernel module that works in conjunction with the nvidia.ko kernel module to program the display engine of the GPU. In a later driver release, the **nvidia-modeset.ko** kernel driver will be used as a basis for the mode-setting interface provided by the kernel’s direct rendering manager (DRM). - -Thew new driver also has new GLX protocol extensions and a new system memory allocation mechanism for large allocations in the OpenGL driver. New GPUs **GeForce 805A** and **GeForce GTX 960A** are supported. NVIDIA 358.16 also supports X.Org Server 1.18 and OpenGL 4.3 - -### How to Install NVIDIA 358.16 in Ubuntu: ### - -> Please don’t do it on production machines unless you know what you’re doing and how to undo it. - -For the official binaries, please go to [nvidia.com/object/unix.html][1]. - -For those who prefer an Ubuntu PPA, I’d recommend the [Graphics Drivers PPA][2]. So far, Ubuntu 16.04, Ubuntu 15.10, Ubuntu 15.04, Ubuntu 14.04 are supported. - -**1. Add PPA.** - -Open terminal from Unity Dash, App Launcher, or via Ctrl+Alt+T shortcut key. When it opens, paste below command and hit enter: - - sudo add-apt-repository ppa:graphics-drivers/ppa - -![nvidia-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/08/nvidia-ppa.jpg) - -Type your password when it asks. No visual feedback, just type in mind and hit Enter to continue. - -**2. Refresh and install new driver.** - -After adding PPA, run below commands one by one to refresh repository cache and install new driver packages: - - sudo apt-get update - - sudo apt-get install nvidia-358 nvidia-settings - -### (Optional) Uninstall: ### - -Boot into the recovery mode from the grub menu, and drop into root console. Then run below commands one by one: - -Remount the file system as writable: - - mount -o remount,rw / - -Remove all nvidia packages: - - apt-get purge nvidia* - -Finally back to menu and reboot: - - reboot - -To disable/remove the graphics driver PPA, launch **Software & Updates** and navigate to **Other Software** tab. - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/11/install-nvidia-358-16-driver-ubuntu-15-10/ - -作者:[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.nvidia.com/Download/driverResults.aspx/95921/en-us -[2]:http://www.nvidia.com/object/unix.html -[3]:https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa From 4a0b4f4ab2545f26b0a7df7703d90f0ff4478cb1 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 25 Nov 2015 09:35:56 +0800 Subject: [PATCH 0393/1710] Create 20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md --- ... 358.16 Driver in Ubuntu 15.10 or 14.04.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 translated/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md diff --git a/translated/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md b/translated/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md new file mode 100644 index 0000000000..18684f6eee --- /dev/null +++ b/translated/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md @@ -0,0 +1,69 @@ + +如何在 Ubuntu 15.10,14.04 中安装 NVIDIA 358.16 驱动程序 +================================================================================ +![nvidia-logo-1](http://ubuntuhandbook.org/wp-content/uploads/2015/06/nvidia-logo-1.png) + +[NVIDIA 358.16][1], NVIDIA 358 系列的第一个稳定版本已经发布并在 358.09 中(测试版)做了一些修正,以及一些小的改进。 + +NVIDIA 358 增加了一个新的 **nvidia-modeset.ko** 内核模块并配合 nvidia.ko 内核模块工作来显示 GPU 引擎。在以后发布版本中,**nvidia-modeset.ko** 内核驱动程序将被用于基本的模式接口,由内核直接传递管理(DRM)。 + +在 OpenGL 驱动中,新的驱动程序也有了新的 GLX 扩展协议,对于分配大量内存也有了一种新的系统内存分配机制。新的 GPU **GeForce 805A** 和 **GeForce GTX 960A** 也被支持了。NVIDIA 358.16 也支持 X.Org 1.18 服务器和 OpenGL 4.3。 + +### 如何在 Ubuntu 中安装 NVIDIA 358.16 : ### + +> 请不要在生产设备上安装,除非你知道自己在做什么以及如何才能恢复。 + +对于官方的二进制文件,请到 [nvidia.com/object/unix.html][1] 查看。 + +对于那些喜欢 Ubuntu PPA 的,我建议你使用 [显卡驱动 PPA][2]。到目前为止,支持 Ubuntu 16.04, Ubuntu 15.10, Ubuntu 15.04, Ubuntu 14.04。 + +**1. 添加 PPA.** + +通过按 Ctrl+Alt+T 快捷键来从 Unity 桌面打开终端。当打启动应用后,粘贴下面的命令并按回车键: + + sudo add-apt-repository ppa:graphics-drivers/ppa + +![nvidia-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/08/nvidia-ppa.jpg) + +它会要求你输入密码。输入密码后,密码不会显示在屏幕上,按 Enter 继续。 + +**2. 刷新并安装新的驱动程序** + +添加 PPA 后,逐一运行下面的命令刷新软件库并安装新的驱动程序: + + sudo apt-get update + + sudo apt-get install nvidia-358 nvidia-settings + +### (可选) 卸载: ### + +开机从 GRUB 菜单进入恢复模式,进入根控制台。然后逐一运行下面的命令: + +重新挂载文件系统为可写: + + mount -o remount,rw / + +删除所有的 nvidia 包: + + apt-get purge nvidia* + +最后返回菜单并重新启动: + + reboot + +要禁用/删除显卡驱动 PPA,点击系统设置下的**软件和更新**,然后导航到**其他软件**标签。 + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/install-nvidia-358-16-driver-ubuntu-15-10/ + +作者:[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]:http://www.nvidia.com/Download/driverResults.aspx/95921/en-us +[2]:http://www.nvidia.com/object/unix.html +[3]:https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa From b060849a467ceb76908660c95fdba148270c0ddd Mon Sep 17 00:00:00 2001 From: XLCYun Date: Wed, 25 Nov 2015 11:47:34 +0800 Subject: [PATCH 0394/1710] Translating by XLCYun 20151123 Install Intel Gr... Translating by XLCYun --- ...0151123 Install Intel Graphics Installer in Ubuntu 15.10.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md b/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md index d9b8554c4e..2d9183ebd5 100644 --- a/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md +++ b/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md @@ -1,3 +1,4 @@ +Translating by XLCYun Install Intel Graphics Installer in Ubuntu 15.10 ================================================================================ ![Intel graphics installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel_logo.jpg) @@ -43,4 +44,4 @@ via: http://ubuntuhandbook.org/index.php/2015/11/install-intel-graphics-installe 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ubuntuhandbook.org/index.php/about/ -[1]:https://01.org/linuxgraphics/downloads \ No newline at end of file +[1]:https://01.org/linuxgraphics/downloads From c047411fb68a5f6856c84a49bc80905e5a0d43d0 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 25 Nov 2015 13:56:35 +0800 Subject: [PATCH 0395/1710] =?UTF-8?q?20151125=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Running a mainline kernel on a cellphone.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sources/tech/20151125 Running a mainline kernel on a cellphone.md b/sources/tech/20151125 Running a mainline kernel on a cellphone.md index 8607db3bb6..c247051def 100644 --- a/sources/tech/20151125 Running a mainline kernel on a cellphone.md +++ b/sources/tech/20151125 Running a mainline kernel on a cellphone.md @@ -1,8 +1,7 @@ Running a mainline kernel on a cellphone +================================================================================ -By Jonathan Corbet - -2015 Kernel Summit One of the biggest freedoms associated with free software is the ability to replace a program with an updated or modified version. Even so, of the many millions of people using Linux-powered phones, few are able to run a mainline kernel on those phones, even if they have the technical skills to do the replacement. The sad fact is that no mainstream phone available runs mainline kernels. A session at the 2015 Kernel Summit, led by Rob Herring, explored this problem and what might be done to address it. +One of the biggest freedoms associated with free software is the ability to replace a program with an updated or modified version. Even so, of the many millions of people using Linux-powered phones, few are able to run a mainline kernel on those phones, even if they have the technical skills to do the replacement. The sad fact is that no mainstream phone available runs mainline kernels. A session at the 2015 Kernel Summit, led by Rob Herring, explored this problem and what might be done to address it. When asked, most of the developers in the room indicated that they would prefer to be able to run mainline kernels on their phones — though a handful did say that they would rather not do so. Rob has been working on this problem for the last year and a half in support of Project Ara (mentioned in this article). But the news is not good. @@ -27,3 +26,15 @@ Tim said that there is currently a big disconnect with the vendor world; vendors Rob put up a list of problem areas, but there was not much time for discussion of the particulars. WiFi drivers continue to be an issue, especially with the new features being added in the Android world. Johannes Berg agreed that the new features are an issue; the Android developers do not even talk about them until they ship with the hardware. Support for most of those features does eventually land in the mainline kernel, though. As things wound down, Ben Herrenschmidt reiterated that the key was to get vendors to realize that working with the mainline kernel is in their own best interest; it saves work in the long run. Mark Brown said that, in past years when the kernel version shipped with Android moved forward more reliably, the benefits of working upstream were more apparent to vendors. Now that things seem to be stuck on 3.10, that pressure is not there in the same way. The session ended with developers determined to improve the situation, but without any clear plan for getting there. + +-------------------------------------------------------------------------------- + +via: https://lwn.net/Articles/662147/ + +作者:[Jonathan Corbet][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://lwn.net/Articles/KernelSummit2015/ From cf015998cf378efda7cd340ad471bc407eb0a327 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Nov 2015 16:17:43 +0800 Subject: [PATCH 0396/1710] =?UTF-8?q?20151125-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ....8.16 in Ubuntu 16.04 or 15.10 or 14.04.md | 59 ++++++++ .../20151125 The tar command explained.md | 137 ++++++++++++++++++ 2 files changed, 196 insertions(+) create mode 100644 sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md create mode 100644 sources/tech/20151125 The tar command explained.md diff --git a/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md b/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md new file mode 100644 index 0000000000..b467e555af --- /dev/null +++ b/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md @@ -0,0 +1,59 @@ +How to Install GIMP 2.8.16 in Ubuntu 16.04, 15.10, 14.04 +================================================================================ +![GIMP 2.8.16](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-icon.png) + +GIMP image editor 2.8.16 was released on its 20th birthday. Here’s how to install or upgrade in Ubuntu 16.04, Ubuntu 15.10, Ubuntu 14.04, Ubuntu 12.04 and their derivatives, e.g., Linux Mint 17.x/13, Elementary OS Freya. + +GIMP 2.8.16 features support for layer groups in OpenRaster files, fixes for layer groups support in PSD, various user inrterface improvements, OSX build system fixes, translation updates, and more changes. Read the [official announcement][1]. + +![GIMP image editor 2.8,16](http://ubuntuhandbook.org/wp-content/uploads/2014/08/gimp-2-8-14.jpg) + +### How to Install or Upgrade: ### + +Thanks to Otto Meier, an [Ubuntu PPA][2] with latest GIMP packages is available for all current Ubuntu releases and derivatives. + +**1. Add GIMP PPA** + +Open terminal from Unity Dash, App launcher, or via Ctrl+Alt+T shortcut key. When it opens, paste below command and hit Enter: + + sudo add-apt-repository ppa:otto-kesselgulasch/gimp + +![add GIMP PPA](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-ppa.jpg) + +Type in your password when it asks, no visual feedback so just type in mind, and hit enter to continue. + +**2. Install or Upgrade the editor.** + +After added the PPA, launch **Software Updater** (or Software Manager in Mint). After checking for updates, you’ll see GIMP in the update list. Click “Install Now” to upgrade it. + +![upgrade-gimp2816](http://ubuntuhandbook.org/wp-content/uploads/2015/11/upgrade-gimp2816.jpg) + +For those who prefer Linux commands, run below commands one by one to refresh your repository caches and install GIMP: + + sudo apt-get update + + sudo apt-get install gimp + +**3. (Optional) Uninstall.** + +Just in case you want to uninstall or downgrade GIMP image editor. Use Software Center to remove it, or run below commands one by one to purge PPA as well as downgrade the software: + + sudo apt-get install ppa-purge + + sudo ppa-purge ppa:otto-kesselgulasch/gimp + +That’s it. Enjoy! + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/how-to-install-gimp-2-8-16-in-ubuntu-16-04-15-10-14-04/ + +作者:[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.gimp.org/news/2015/11/22/20-years-of-gimp-release-of-gimp-2816/ +[2]:https://launchpad.net/~otto-kesselgulasch/+archive/ubuntu/gimp \ No newline at end of file diff --git a/sources/tech/20151125 The tar command explained.md b/sources/tech/20151125 The tar command explained.md new file mode 100644 index 0000000000..cc13a25dd2 --- /dev/null +++ b/sources/tech/20151125 The tar command explained.md @@ -0,0 +1,137 @@ +The tar command explained +================================================================================ +The Linux [tar][1] command is the swiss army of the Linux admin when it comes to archiving or distributing files. Gnu Tar archives can contain multiple files and directories, file permissions can be preserved and it supports multiple compression formats. The name tar stands for "**T**ape **Ar**chiver", the format is an official POSIX standard. + +### Tar file formats ### + +A short introduction into tar compression levels. + +- **No compression** Uncompressed files have the file ending .tar. +- **Gzip Compression** The Gzip format is the most widely used compression format for tar, it is fast for creating and extracting files. Files with gz compression have normally the file ending .tar.gz or .tgz. Here some examples on how to [create][2] and [extract][3] a tar.gz file. +- **Bzip2 Compression** The Bzip2 format offers a better compression then the Gzip format. Creating files is slower, the file ending is usually .tar.bz2. +- **Lzip (LZMA) Compression** The Lzip compression combines the speed of Gzip with a compression level that is similar to Bzip2 (or even better). Independently from these good attributes, this format is not widely used. +- **Lzop Compression** This compress option is probably the fastest compression format for tar, it has a compression level similar to gzip and is not widely used. + +The common formats are tar.gz and tar.bz2. If you goal is fast compression, then use gzip. When the archive file size is critical, then use tar.bz2. + +### What is the tar command used for? ### + +Here a few common use cases of the tar command. + +- Backup of Servers and Desktops. +- Document archiving. +- Software Distribution. + +### Installing tar ### + +The command is installed on most Linux Systems by default. Here are the instructions to install tar in case that the command is missing. + +#### CentOS #### + +Execute the following command as root user on the shell to install tar on CentOS. + + yum install tar + +#### Ubuntu #### + +This command will install tar on Ubuntu. The "sudo" command ensures that the apt command is run with root privileges. + + sudo apt-get install tar + +#### Debian #### + +The following apt command installs tar on Debian. + + apt-get install tar + +#### Windows #### + +The tar command is available for Windows as well, you can download it from the Gunwin project. [http://gnuwin32.sourceforge.net/packages/gtar.htm][4] + +### Create tar.gz Files ### + +Here is the [tar command][5] that has to be run on the shell. I will explain the command line options below. + + tar pczf myarchive.tar.gz /home/till/mydocuments + +This command creates the archive myarchive.tar.gz which contains the files and folders from the path /home/till/mydocuments. **The command line options explained**: + +- **[p]** This option stand for "preserve", it instructs tar to store details on file owner and file permissions in the archive. +- **[c]** Stands for create. This option is mandatory when a file is created. +- **[z]** The z option enables gzip compression. +- **[f]** The file option tells tar to create an archive file. Tar will send the output to stdout if this option is omitted. + +#### Tar command examples #### + +**Example 1: Backup the /etc Directory** Create a backup of the /etc config directory. The backup is stored in the root folder. + + tar pczvf /root/etc.tar.gz /etc + +![Backup the /etc directory with tar.](https://www.howtoforge.com/images/linux-tar-command/big/create-tar.png) + +The command should be run as root to ensure that all files in /etc are included in the backup. This time, I've added the [v] option in the command. This option stands for verbose, it tells tar to show all file names that get added into the archive. + +**Example 2: Backup your /home directory** Create a backup of your home directory. The backup will be stored in a directory /backup. + + tar czf /backup/myuser.tar.gz /home/myuser + +Replace myuser with your username. In this command, I've omitted the [p] switch, so the permissions get not preserved. + +**Example 3: A file-based backup of MySQL databases** The MySQL databases are stored in /var/lib/mysql on most Linux distributions. You can check that with the command: + + ls /var/lib/mysql + +![File based MySQL backup with tar.](https://www.howtoforge.com/images/linux-tar-command/big/tar_backup_mysql.png) + +Stop the database server to get a consistent MySQL file backup with tar. The backup will be written to the /backup folder. + +1) Create the backup folder + + mkdir /backup + chmod 600 /backup + +2) Stop MySQL, run the backup with tar and start the database server again. + + service mysql stop + tar pczf /backup/mysql.tar.gz /var/lib/mysql + service mysql start + ls -lah /backup + +![File based MySQL backup.](https://www.howtoforge.com/images/linux-tar-command/big/tar-backup-mysql2.png) + +### Extract tar.gz Files ### + +The command to extract tar.gz files is: + + tar xzf myarchive.tar.gz + +#### The tar command options explained #### + +- **[x]** The x stand for extract, it is mandatory when a tar file shall be extracted. +- **[z]** The z option tells tar that the archive that shall be unpacked is in gzip format. +- **[f]** This option instructs tar to read the archive content from a file, in this case the file myarchive.tar.gz. + +The above tar command will silently extract that tar.gz file, it will show only error messages. If you like to see which files get extracted, then add the "v" option. + + tar xzvf myarchive.tar.gz + +The **[v]** option stands for verbose, it will show the file names while they get unpacked. + +![Extract a tar.gz file.](https://www.howtoforge.com/images/linux-tar-command/big/tar-xfz.png) + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/linux-tar-command/ + +作者:[howtoforge][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.howtoforge.com/ +[1]:https://en.wikipedia.org/wiki/Tar_(computing) +[2]:http://www.faqforge.com/linux/create-tar-gz/ +[3]:http://www.faqforge.com/linux/extract-tar-gz/ +[4]:http://gnuwin32.sourceforge.net/packages/gtar.htm +[5]:http://www.faqforge.com/linux/tar-command/ \ No newline at end of file From e458866204a02944d0c7f251e18d5cc230312dde Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Nov 2015 17:20:08 +0800 Subject: [PATCH 0397/1710] =?UTF-8?q?20151125-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0 Years of GIMP Evolution--Step by Step.md | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md diff --git a/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md b/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md new file mode 100644 index 0000000000..edcef22d7f --- /dev/null +++ b/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md @@ -0,0 +1,171 @@ +20 Years of GIMP Evolution: Step by Step +================================================================================ +注:youtube 视频 + + +[GIMP][1] (GNU Image Manipulation Program) – superb open source and free graphics editor. Development began in 1995 as students project of the University of California, Berkeley by Peter Mattis and Spencer Kimball. In 1997 the project was renamed in “GIMP” and became an official part of [GNU Project][2]. During these years the GIMP is one of the best graphics editor and platinum holy wars “GIMP vs Photoshop” – one of the most popular. + +The first announce, 21.11.1995: + +> From: Peter Mattis +> +> Subject: ANNOUNCE: The GIMP +> +> Date: 1995-11-21 +> +> Message-ID: <48s543$r7b@agate.berkeley.edu> +> +> Newsgroups: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps +> +> The GIMP: the General Image Manipulation Program +> ------------------------------------------------ +> +> The GIMP is designed to provide an intuitive graphical interface to a +> variety of image editing operations. Here is a list of the GIMP's +> major features: +> +> Image viewing +> ------------- +> +> * Supports 8, 15, 16 and 24 bit color. +> * Ordered and Floyd-Steinberg dithering for 8 bit displays. +> * View images as rgb color, grayscale or indexed color. +> * Simultaneously edit multiple images. +> * Zoom and pan in real-time. +> * GIF, JPEG, PNG, TIFF and XPM support. +> +> Image editing +> ------------- +> +> * Selection tools including rectangle, ellipse, free, fuzzy, bezier +> and intelligent. +> * Transformation tools including rotate, scale, shear and flip. +> * Painting tools including bucket, brush, airbrush, clone, convolve, +> blend and text. +> * Effects filters (such as blur, edge detect). +> * Channel & color operations (such as add, composite, decompose). +> * Plug-ins which allow for the easy addition of new file formats and +> new effect filters. +> * Multiple undo/redo. + +GIMP 0.54, 1996 + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/054.png) + +GIMP 0.54 was required X11 displays, X-server and Motif 1.2 wigdets and supported 8, 15, 16 & 24 color depths with RGB & grayscale colors. Supported images format: GIF, JPEG, PNG, TIFF and XPM. + +Basic functionality: rectangle, ellipse, free, fuzzy, bezier, intelligent selection tools, and rotate, scale, shear, clone, blend and flip images. + +Extended tools: text operations, effects filters, tools for channel and colors manipulation, undo and redo operations. Since the first version GIMP support the plugin system. + +GIMP 0.54 can be ran in Linux, HP-UX, Solaris, SGI IRIX. + +### GIMP 0.60, 1997 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/060.gif) + +This is development release, not for all users. GIMP has the new toolkits – GDK (GIMP Drawing Kit) and GTK (GIMP Toolkit), Motif support is deprecated. GIMP Toolkit is also begin of the GTK+ cross-platform widget toolkit. New features: + +- basic layers +- sub-pixel sampling +- brush spacing +- improver airbrush +- paint modes + +### GIMP 0.99, 1997 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/099.png) + +Since 0.99 version GIMP has the scripts add macros (Script-Fus) support. GTK and GDK with some improvements has now the new name – GTK+. Other improvements: + +- support big images (rather than 100 MB) +- new native format – XCF +- new API – write plugins and extensions is easy + +### GIMP 1.0, 1998 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/100.gif) + +GIMP and GTK+ was splitted into separate projects. The GIMP official website has +reconstructed and contained new tutorials, plugins and documentation. New features: + +- tile-based memory management +- massive changes in plugin API +- XFC format now support layers, guides and selections +- web interface +- online graphics generation + +### GIMP 1.2, 2000 ### + +New features: + +- translation for non-english languages +- fixed many bugs in GTK+ and GIMP +- many new plugins +- image map +- new toolbox: resize, measure, dodge, burn, smugle, samle colorize and curve bend +- image pipes +- images preview before saving +- scaled brush preview +- recursive selection by path +- new navigation window +- drag’n’drop +- watermarks support + +### GIMP 2.0, 2004 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/200.png) + +The biggest change – new GTK+ 2.x toolkit. + +### GIMP 2.2, 2004 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/220.png) + +Many bugfixes and drag’n’drop support. + +### GIMP 2.4, 2007 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/240.png) + +New features: + +- better drag’n’drop support +- Ti-Fu was replaced to Script-Fu – the new script interpreter +- new plugins: photocopy, softglow, neon, cartoon, dog, glob and others + +### GIMP 2.6, 2008 ### + +New features: + +- renew graphics interface +- new select and tool +- GEGL (GEneric Graphics Library) integration +- “The Utility Window Hint” for MDI behavior + +### GIMP 2.8, 2012 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/280.png) + +New features: + +- GUI has some visual changes +- new save and export menu +- renew text editor +- layers group support +- JPEG2000 and export to PDF support +- webpage screenshot tool + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/20-years-of-gimp-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://gimp.org/ +[2]:http://www.gnu.org/ \ No newline at end of file From d59d67258100f352c367c23c8dbc8f2ec61b0bf8 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 25 Nov 2015 19:36:06 +0800 Subject: [PATCH 0398/1710] Update 20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md --- ...to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md b/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md index b467e555af..8465520fc5 100644 --- a/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md +++ b/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to Install GIMP 2.8.16 in Ubuntu 16.04, 15.10, 14.04 ================================================================================ ![GIMP 2.8.16](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-icon.png) @@ -56,4 +57,4 @@ via: http://ubuntuhandbook.org/index.php/2015/11/how-to-install-gimp-2-8-16-in-u [a]:http://ubuntuhandbook.org/index.php/about/ [1]:http://www.gimp.org/news/2015/11/22/20-years-of-gimp-release-of-gimp-2816/ -[2]:https://launchpad.net/~otto-kesselgulasch/+archive/ubuntu/gimp \ No newline at end of file +[2]:https://launchpad.net/~otto-kesselgulasch/+archive/ubuntu/gimp From aa6fdc6c9a1d4b1c5ac4e1a9c973e27be261dc50 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 26 Nov 2015 15:22:23 +0800 Subject: [PATCH 0399/1710] =?UTF-8?q?20151126-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...a 'World without Linux' and Open Source.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md diff --git a/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md new file mode 100644 index 0000000000..90f8b22e32 --- /dev/null +++ b/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md @@ -0,0 +1,51 @@ +Linux Foundation Explains a "World without Linux" and Open Source +================================================================================ +> The Linux Foundation responds to questions about its "World without Linux" movies, including what the Internet would be like without Linux and other open source software. + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/hey_22.png) + +Would the world really be tremendously different if Linux, the open source operating system kernel, did not exist? Would there be no Internet or movies? Those are the questions some viewers of the [Linux Foundation's][1] ongoing "[World without Linux][2]" video series are asking. Here are some answers. + +In case you've missed it, the "World without Linux" series is a collection of quirky short films that depict, well, a world without Linux (and open source software more generally). They have emphasized themes like [Linux's role in movie-making][3] and in [serving the Internet][4]. + +To offer perspective on the series's claims, direction and hidden symbols, Jennifer Cloer, vice president of communications at The Linux Foundation, recently sent The VAR Guy responses to some common queries about the movies. Below are the answers, in her own words. + +### The latest episode takes Sam and Annie to the movies. Would today's graphics really be that much different without Linux? ### + +In episode #4, we do a bit of a parody on "Avatar." Love it or hate it, the graphics in the real "Avatar" are pretty impressive. In a world without Linux, the graphics would be horrible but we wouldn't even know it because we wouldn't know any better. But in fact, "Avatar" was created using Linux. Weta Digital used one of the world's largest Linux clusters to render the film and do 3D modeling. It's also been reported that "Lord of the Rings," "Fantastic Four" and "King Kong," among others, have used Linux. We hope this episode can bring attention to that work, which hasn't been widely reported. + +### Some people criticized the original episode for concluding there would be no Internet without Linux. What's your reaction? ### + +We enjoyed the debate that resulted from the debut episode. With more than 100,000 views to date of that episode alone, it brought awareness to the role that Linux plays in society and to the worldwide community of contributors and supporters. Of course the Internet would exist without Linux but it wouldn't be the Internet we know today and it wouldn't have matured at the pace it has. Each episode makes a bold and fun statement about Linux's role in our every day lives. We hope this can help extend the story of Linux to more people around the world. + +### Why is Sam and Annie's cat named String? ### + +Nothing in the series is a coincidence. Look closely and you'll find all kinds of inside Linux and geek jokes. String is named after String theory and was named by our Linux.com Editor Libby Clark. In physics, string theory is a theoretical framework in which the point-like particles of particle physics are replaced by one-dimensional objects called strings. String theory describes how these strings propagate through space and interact with each other. Kind of like Sam, Annie and String in a World Without Linux. + +### What can we expect from the next two episodes and, in particular, the finale? When will it air? ### + +In episode #5, we'll go to space and experience what a world without Linux would mean to exploration. It's a wild ride. In the finale, we finally get to see Linus in a world without Linux. There have been clues throughout the series as to what this finale will include but I can't give more than that away since there are ongoing contests to find the clues. And I can't give away the air date for the finale! You'll have to follow #WorldWithoutLinux to learn more. + +### Can you give us a hint on the clues in episode #4? ### + +There is another reference to the Free Burger Restaurant in this episode. Linux also actually does appear in this world without Linux but in a very covert way; you could say it's like reading Linux in another language. And, of course, just for fun, String makes another appearance. + +### Is the series achieving what you hoped? ### + +Yes. We're really happy to see people share and engage with these stories. We hope that it's reaching people who might not otherwise know the story of Linux or understand its pervasiveness in the world today. It's really about surfacing this to a broader audience and giving thanks to the worldwide community of developers and companies that support Linux and all the things it makes possible. + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/linux-foundation-explains-world-without-linux-and-open-so + +作者:[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://linuxfoundation.org/ +[2]:http://www.linuxfoundation.org/world-without-linux +[3]:http://thevarguy.com/open-source-application-software-companies/new-linux-foundation-video-highlights-role-open-source-3d +[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc \ No newline at end of file From 8bcd03273de45bbb08b6ab3fe3fb8f5125e8fbd5 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 26 Nov 2015 15:55:59 +0800 Subject: [PATCH 0400/1710] =?UTF-8?q?20151126-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t and Linux--True Romance or Toxic Love.md | 77 +++++ ...everse Proxy for Apache on FreeBSD 10.2.md | 326 ++++++++++++++++++ ...trailing whitespaces in a file on Linux.md | 53 +++ 3 files changed, 456 insertions(+) create mode 100644 sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md create mode 100644 sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md create mode 100644 sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md diff --git a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md new file mode 100644 index 0000000000..92705b4b5c --- /dev/null +++ b/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md @@ -0,0 +1,77 @@ +Microsoft and Linux: True Romance or Toxic Love? +================================================================================ +Every now and then, you come across a news story that makes you choke on your coffee or splutter hot latte all over your monitor. Microsoft's recent proclamations of love for Linux is an outstanding example of such a story. + +Common sense says that Microsoft and the FOSS movement should be perpetual enemies. In the eyes of many, Microsoft embodies most of the greedy excesses that the Free Software movement rejects. In addition, Microsoft previously has labeled Linux as a cancer and the FOSS community as a "pack of thieves". + +We can understand why Microsoft has been afraid of a free operating system. When combined with open-source applications that challenge Microsoft's core line, it threatens Microsoft's grip on the desktop/laptop market. + +In spite of Microsoft's fears over its desktop dominance, the Web server marketplace is one arena where Linux has had the greatest impact. Today, the majority of Web servers are Linux boxes. This includes most of the world's busiest sites. The sight of so much unclaimed licensing revenue must be painful indeed for Microsoft. + +Handheld devices are another realm where Microsoft has lost ground to free software. At one point, its Windows CE and Pocket PC operating systems were at the forefront of mobile computing. Windows-powered PDA devices were the shiniest and flashiest gadgets around. But, that all ended when Apple released its iPhone. Since then, Android has stepped into the limelight, with Windows Mobile largely ignored and forgotten. The Android platform is built on free and open-source components. + +The rapid expansion in Android's market share is due to the open nature of the platform. Unlike with iOS, any phone manufacturer can release an Android handset. And, unlike with Windows Mobile, there are no licensing fees. This has been really good news for consumers. It has led to lots of powerful and cheap handsets appearing from manufacturers all over the world. It's a very definite vindication of the value of FOSS software. + +Losing the battle for the Web and mobile computing is a brutal loss for Microsoft. When you consider the size of those two markets combined, the desktop market seems like a stagnant backwater. Nobody likes to lose, especially when money is on the line. And, Microsoft does have a lot to lose. You would expect Microsoft to be bitter about it. And in the past, it has been. + +Microsoft has fought back against Linux and FOSS using every weapon at its disposal, from propaganda to patent threats, and although these attacks have slowed the adoption of Linux, they haven't stopped it. + +So, you can forgive us for being shocked when Microsoft starts handing out t-shirts and badges that say "Microsoft Loves Linux" at open-source conferences and events. Could it be true? Does Microsoft really love Linux? + +Of course, PR slogans and free t-shirts do not equal truth. Actions speak louder than words. And when you consider Microsoft's actions, Microsoft's stance becomes a little more ambiguous. + +On the one hand, Microsoft is recruiting hundreds of Linux developers and sysadmins. It's releasing its .NET Core framework as an open-source project with cross-platform support (so that .NET apps can run on OS X and Linux). And, it is partnering with Linux companies to bring popular distros to its Azure platform. In fact, Microsoft even has gone so far as to create its own Linux distro for its Azure data center. + +On the other hand, Microsoft continues to launch legal attacks on open-source projects directly and through puppet corporations. It's clear that Microsoft hasn't had some big moral change of heart over proprietary vs. free software, so why the public declarations of adoration? + +To state the obvious, Microsoft is a profit-making entity. It's an investment vehicle for its shareholders and a source of income for its employees. Everything it does has a single ultimate goal: revenue. Microsoft doesn't act out of love or even hate (although that's a common accusation). + +So the question shouldn't be "does Microsoft really love Linux?" Instead, we should ask how Microsoft is going to profit from all this. + +Let's take the open-source release of .NET Core. This move makes it easy to port the .NET runtime to any platform. That extends the reach of Microsoft's .NET framework far beyond the Windows platform. + +Opening .NET Core ultimately will make it possible for .NET developers to produce cross-platform apps for OS X, Linux, iOS and even Android--all from a single codebase. + +From a developer's perspective, this makes the .NET framework much more attractive than before. Being able to reach many platforms from a single codebase dramatically increases the potential target market for any app developed using the .NET framework. + +What's more, a strong Open Source community would provide developers with lots of code to reuse in their own projects. So, the availability of open-source projects would make the .NET framework. + +On the plus side, opening .NET Core reduces fragmentation across different platforms and means a wider choice of apps for consumers. That means more choice, both in terms of open-source software and proprietary apps. + +From Microsoft's point of view, it would gain a huge army of developers. Microsoft profits by selling training, certification, technical support, development tools (including Visual Studio) and proprietary extensions. + +The question we should ask ourselves is does this benefit or hurt the Free Software community? + +Widespread adoption of the .NET framework could mean the eventual death of competing open-source projects, forcing us all to dance to Microsoft's tune. + +Moving beyond .NET, Microsoft is drawing a lot of attention to its Linux support on its Azure cloud computing platform. Remember, Azure originally was Windows Azure. That's because Windows Server was the only supported operating system. Today, Azure offers support for a number of Linux distros too. + +There's one reason for this: paying customers who need and want Linux services. If Microsoft didn't offer Linux virtual machines, those customers would do business with someone else. + +It looks like Microsoft is waking up to the fact that Linux is here to stay. Microsoft cannot feasibly wipe it out, so it has to embrace it. + +This brings us back to the question of why there is so much buzz about Microsoft and Linux. We're all talking about it, because Microsoft wants us to think about it. After all, all these stories trace back to Microsoft, whether it's through press releases, blog posts or public announcements at conferences. The company is working hard to draw attention to its Linux expertise. + +What other possible purpose could be behind Chief Architect Kamala Subramaniam's blog post announcing Azure Cloud Switch? ACS is a custom Linux distro that Microsoft uses to automate the configuration of its switch hardware in the Azure data centers. + +ACS is not publicly available. It's intended for internal use in the Azure data center, and it's unlikely that anyone else would be able to find a use for it. In fact, Subramaniam states the same thing herself in her post. + +So, Microsoft won't be making any money from selling ACS, and it won't attract a user base by giving it away. Instead, Microsoft gets to draw attention to Linux and Azure, strengthening its position as a Linux cloud computing platform. + +Is Microsoft's new-found love for Linux good news for the community? + +We shouldn't be slow to forget Microsoft's mantra of Embrace, Extend and Exterminate. Right now, Microsoft is very much in the early stages of embracing Linux. Will Microsoft seek to splinter the community through custom extensions and proprietary "standards"? + +Let us know what you think in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/microsoft-and-linux-true-romance-or-toxic-love-0 + +作者:[James Darvell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/james-darvell \ No newline at end of file diff --git a/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md new file mode 100644 index 0000000000..d9829e9daa --- /dev/null +++ b/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md @@ -0,0 +1,326 @@ +How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2 +================================================================================ +Nginx is free and open source HTTP server and reverse proxy, as well as an mail proxy server for IMAP/POP3. Nginx is high performance web server with rich of features, simple configuration and low memory usage. Originally written by Igor Sysoev on 2002, and until now has been used by a big technology company including Netflix, Github, Cloudflare, WordPress.com etc. + +In this tutorial we will "**install and configure nginx web server as reverse proxy for apache on freebsd 10.2**". Apache will run with php on port 8080, and then we need to configure nginx run on port 80 to receive a request from user/visitor. If user request for web page from the browser on port 80, then nginx will pass the request to apache webserver and PHP that running on port 8080. + +#### Prerequisite #### + +- FreeBSD 10.2. +- Root privileges. + +### Step 1 - Update the System ### + +Log in to your freebsd server with ssh credential and update system with command below : + + freebsd-update fetch + freebsd-update install + +### Step 2 - Install Apache ### + +pache is open source HTTP server and the most widely used web server. Apache is not installed by default on freebsd, but we can install it from the ports or package on "/usr/ports/www/apache24" or install it from freebsd repository with pkg command. In this tutorial we will use pkg command to install from the freebsd repository : + + pkg install apache24 + +### Step 3 - Install PHP ### + +Once apache is installed, followed with installing php for handling a PHP file request by a user. We will install php with pkg command as below : + + pkg install php56 mod_php56 php56-mysql php56-mysqli + +### Step 4 - Configure Apache and PHP ### + +Once all is installed, we will configure apache to run on port 8080, and php working with apache. To configure apache, we can edit the configuration file "httpd.conf", and for PHP we just need to copy the php configuration file php.ini on "/usr/local/etc/" directory. + +Go to "/usr/local/etc/" directory and copy php.ini-production file to php.ini : + + cd /usr/local/etc/ + cp php.ini-production php.ini + +Next, configure apache by editing file "httpd.conf" on apache directory : + + cd /usr/local/etc/apache24 + nano -c httpd.conf + +Port configuration on line **52** : + + Listen 8080 + +ServerName configuration on line **219** : + + ServerName 127.0.0.1:8080 + +Add DirectoryIndex file that apache will serve it if a directory requested on line **277** : + + DirectoryIndex index.php index.html + +Configure apache to work with php by adding script below under line **287** : + + + SetHandler application/x-httpd-php + + + SetHandler application/x-httpd-php-source + + +Save and exit. + +Now add apache to start at boot time with sysrc command : + + sysrc apache24_enable=yes + +And test apache configuration with command below : + + apachectl configtest + +If there is no error, start apache : + + service apache24 start + +If all is done, verify that php is running well with apache by creating phpinfo file on "/usr/local/www/apache24/data" directory : + + cd /usr/local/www/apache24/data + echo "" > info.php + +Now visit the freebsd server IP : 192.168.1.123:8080/info.php. + +![Apache and PHP on Port 8080](http://blog.linoxide.com/wp-content/uploads/2015/11/Apache-and-PHP-on-Port-8080.png) + +Apache is working with php on port 8080. + +### Step 5 - Install Nginx ### + +Nginx high performance web server and reverse proxy with low memory consumption. In this step we will use nginx as reverse proxy for apache, so let's install it with pkg command : + + pkg install nginx + +### Step 6 - Configure Nginx ### + +Once nginx is installed, we must configure it by replacing nginx file "**nginx.conf**" with new configuration below. Change the directory to "/usr/local/etc/nginx/" and backup default nginx.conf : + + cd /usr/local/etc/nginx/ + mv nginx.conf nginx.conf.oroginal + +Now create new nginx configuration file : + + nano -c nginx.conf + +and paste configuration below : + + user www; + worker_processes 1; + error_log /var/log/nginx/error.log; + + events { + worker_connections 1024; + } + + http { + include 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; + + sendfile on; + keepalive_timeout 65; + + # Nginx cache configuration + proxy_cache_path /var/nginx/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m; + proxy_temp_path /var/nginx/cache/tmp; + proxy_cache_key "$scheme$host$request_uri"; + + gzip on; + + server { + #listen 80; + server_name _; + + location /nginx_status { + + stub_status on; + access_log off; + } + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/local/www/nginx-dist; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:8080 + # + location ~ \.php$ { + proxy_pass http://127.0.0.1:8080; + include /usr/local/etc/nginx/proxy.conf; + } + } + + include /usr/local/etc/nginx/vhost/*; + + } + +Save and exit. + +Next, create new file called **proxy.conf** for reverse proxy configuration on nginx directory : + + cd /usr/local/etc/nginx/ + nano -c proxy.conf + +Paste configuration below : + + proxy_buffering on; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + client_max_body_size 10m; + client_body_buffer_size 128k; + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + proxy_buffers 100 8k; + add_header X-Cache $upstream_cache_status; + +Save and exit. + +And the last, create new directory for nginx cache on "/var/nginx/cache" : + + mkdir -p /var/nginx/cache + +### Step 7 - Configure Nginx VirtualHost ### + +In this step we will create new virtualhost for domain "saitama.me", with document root on "/usr/local/www/saitama.me" and the log file on "/var/log/nginx" directory. + +First thing we must do is creating new directory to store the virtualhost file, we here use new directory called "**vhost**". Let's create it : + + cd /usr/local/etc/nginx/ + mkdir vhost + +vhost directory has been created, now go to the directory and create new file virtualhost. I'me here will create new file "**saitama.conf**" : + + cd vhost/ + nano -c saitama.conf + +Paste virtualhost configuration below : + + server { + # Replace with your freebsd IP + listen 192.168.1.123:80; + + # Document Root + root /usr/local/www/saitama.me; + index index.php index.html index.htm; + + # Domain + server_name www.saitama.me saitama.me; + + # Error and Access log file + error_log /var/log/nginx/saitama-error.log; + access_log /var/log/nginx/saitama-access.log main; + + # Reverse Proxy Configuration + location ~ \.php$ { + proxy_pass http://127.0.0.1:8080; + include /usr/local/etc/nginx/proxy.conf; + + # Cache configuration + proxy_cache my-cache; + proxy_cache_valid 10s; + proxy_no_cache $cookie_PHPSESSID; + proxy_cache_bypass $cookie_PHPSESSID; + proxy_cache_key "$scheme$host$request_uri"; + + } + + # Disable Cache for the file type html, json + location ~* .(?:manifest|appcache|html?|xml|json)$ { + expires -1; + } + + # Enable Cache the file 30 days + location ~* .(jpg|png|gif|jpeg|css|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ { + proxy_cache_valid 200 120m; + expires 30d; + proxy_cache my-cache; + access_log off; + } + + } + +Save and exit. + +Next, create new log directory for nginx and virtualhost on "/var/log/" : + + mkdir -p /var/log/nginx/ + +If all is done, let's create a directory for document root for saitama.me : + + cd /usr/local/www/ + mkdir saitama.me + +### Step 8 - Testing ### + +This step is just test our nginx configuration and test the nginx virtualhost. + +Test nginx configuration with command below : + + nginx -t + +If there is no problem, add nginx to boot time with sysrc command, and then start it and restart apache: + + sysrc nginx_enable=yes + service nginx start + service apache24 restart + +All is done, now verify the the php is working by adding new file phpinfo on saitama.me directory : + + cd /usr/local/www/saitama.me + echo "" > info.php + +Visit the domain : **www.saitama.me/info.php**. + +![Virtualhost Configured saitamame](http://blog.linoxide.com/wp-content/uploads/2015/11/Virtualhost-Configured-saitamame.png) + +Nginx as reverse proxy for apache is working, and php is working too. + +And this is another results : + +Test .html file with no-cache. + + curl -I www.saitama.me + +![html with no-cache](http://blog.linoxide.com/wp-content/uploads/2015/11/html-with-no-cache.png) + +Test .css file with 30day cache. + + curl -I www.saitama.me/test.css + +![css file 30day cache](http://blog.linoxide.com/wp-content/uploads/2015/11/css-file-30day-cache.png) + +Test .php file with cache : + + curl -I www.saitama.me/info.php + +![PHP file cached](http://blog.linoxide.com/wp-content/uploads/2015/11/PHP-file-cached.png) + +All is done. + +### Conclusion ### + +Nginx is most popular HTTP server and reverse proxy. Has a rich of features with high performance and low memory/RAM usage. Nginx use too for caching, we can cache a static file on the web to make the web fast load, and cache for php file if a user request for it. Nginx is easy to configure and use, use for HTTP server or act as reverse proxy for apache. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-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/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md b/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md new file mode 100644 index 0000000000..84c04e7436 --- /dev/null +++ b/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md @@ -0,0 +1,53 @@ +Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux +================================================================================ +> Question: I have a text file in which I need to remove all trailing whitespsaces (e.g., spaces and tabs) in each line for formatting purpose. Is there a quick and easy Linux command line tool I can use for this? + +When you are writing code for your program, you must understand that there are standard coding styles to follow. For example, "trailing whitespaces" are typically considered evil because when they get into a code repository for revision control, they can cause a lot of problems and confusion (e.g., "false diffs"). Many IDEs and text editors are capable of highlighting and automatically trimming trailing whitepsaces at the end of each line. + +Here are a few ways to **remove trailing whitespaces in Linux command-line environment**. + +### Method One ### + +A simple command line approach to remove unwanted whitespaces is via sed. + +The following command deletes all spaces and tabs at the end of each line in input.java. + + $ sed -i 's/[[:space:]]*$//' input.java + +If there are multiple files that need trailing whitespaces removed, you can use a combination of find and sed. For example, the following command deletes trailing whitespaces in all *.java files recursively found in the current directory as well as all its sub-directories. + + $ find . -name "*.java" -type f -print0 | xargs -0 sed -i 's/[[:space:]]*$//' + +### Method Two ### + +Vim text editor is able to highlight and trim whitespaces in a file as well. + +To highlight all trailing whitespaces in a file, open the file with Vim editor and enable text highlighting by typing the following in Vim command line mode. + + :set hlsearch + +Then search for trailing whitespaces by typing: + + /\s\+$ + +This will show all trailing spaces and tabs found throughout the file. + +![](https://c1.staticflickr.com/1/757/23198657732_bc40e757b4_b.jpg) + +Then to clean up all trailing whitespaces in a file with Vim, type the following Vim command. + + :%s/\s\+$// + +This command means substituting all whitespace characters found at the end of the line (\s\+$) with no character. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/remove-trailing-whitespaces-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 58a6def9177e8da705a6cc90f52d841e2481417c Mon Sep 17 00:00:00 2001 From: XLCYun Date: Thu, 26 Nov 2015 22:27:05 +0800 Subject: [PATCH 0401/1710] =?UTF-8?q?XLCYun=20=E5=88=A0=E9=99=A4=E5=8E=9F?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XLCYun 删除原文 --- ...ntel Graphics Installer in Ubuntu 15.10.md | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md diff --git a/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md b/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md deleted file mode 100644 index 2d9183ebd5..0000000000 --- a/sources/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md +++ /dev/null @@ -1,47 +0,0 @@ -Translating by XLCYun -Install Intel Graphics Installer in Ubuntu 15.10 -================================================================================ -![Intel graphics installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel_logo.jpg) - -Intel has announced a new release of its Linux graphics installer recently. Ubuntu 15.10 Wily is required and support for Ubuntu 15.04 is deprecated in the new release. - -> The Intel® Graphics Installer for Linux* allows you to easily install the latest graphics and video drivers for your Intel graphics hardware. This allows you to stay current with the latest enhancements, optimizations, and fixes to the Intel® Graphics Stack to ensure the best user experience with your Intel® graphics hardware. The Intel® Graphics Installer for Linux* is available for the latest version of Ubuntu*. - -![intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel-graphics-installer.jpg) - -### How to Install: ### - -**1.** Download the installer from [the link page][1]. The current is version 1.2.1 for Ubuntu 15.10. Check your OS type, 32-bit or 64-bit, via **System Settings -> Details**. - -![download-intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/download-intel-graphics-installer.jpg) - -**2.** Once the download process finished, go to your Download folder and click open the .deb package with Ubuntu Software Center and finally click the install button. - -![install-via-software-center](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-via-software-center.jpg) - -**3.** In order to trust the Intel Graphics Installer, you will need to add keys via below commands. - -Open terminal from Unity Dash, App Launcher, or via Ctrl+Alt+T shortcut key. When it opens, paste below commands and run one by one: - - wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg -O - | sudo apt-key add - - - wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-2 -O - | sudo apt-key add - - -![trust-intel](http://ubuntuhandbook.org/wp-content/uploads/2015/11/trust-intel.jpg) - -NOTE: While running the first command, if the cursor is stuck and blinking after downloading the key, as above picture shows, type your password (no visual feedback) and hit enter to continue. - -Finally launch Intel Graphics Installer via Unity Dash or Application launcher. - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/11/install-intel-graphics-installer-in-ubuntu-15-10/ - -作者:[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://01.org/linuxgraphics/downloads From 60247119fa15341434da793aeb1212d4784db6aa Mon Sep 17 00:00:00 2001 From: XLCYun Date: Thu, 26 Nov 2015 22:28:12 +0800 Subject: [PATCH 0402/1710] Create 20151123 Install Intel Graphics Installer in Ubuntu 15.10.md --- ...ntel Graphics Installer in Ubuntu 15.10.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 translated/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md diff --git a/translated/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md b/translated/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md new file mode 100644 index 0000000000..be91927f24 --- /dev/null +++ b/translated/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md @@ -0,0 +1,47 @@ +在Ubuntu 15.10上安装Intel图形安装器 +================================================================================ +![Intel graphics installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel_logo.jpg) + +Intel最近发布了一个新版本的Linux图型安装器。在新版本中,Ubuntu 15.04将不被支持而必须用Ubuntu 15.10 Wily。 + + +> Linux版Intel®图形安装器可以让你很容易的安装最新版的图形与视频驱动。它能保证你一直使用最新的增强与优化功能,并能够安装到Intel图形堆栈中,来保证你在你的Intel图形硬件下,享受到最佳的用户体验。*现在的Linux版的Intel®图形安装器支持最新版的Ubuntu。* + +![intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel-graphics-installer.jpg) + +### 安装 ### + +**1.** 从[链接页面][1]中下载安装器。当前支持Ubuntu 15.10的版本是1.2.1版。你可以在**系统设置 -> 详细信息**中检查你的操作系统(32位或64位)的类型。 + +![download-intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/download-intel-graphics-installer.jpg) + +**2.** 一旦下载完成,到下载目录中点击.deb安装包用Ubuntu软件中心打开它,然最后点击“安装”按钮。 + +![install-via-software-center](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-via-software-center.jpg) + +**3.** 为了让系统信任Intel图形安装器,你需要通过下面的命令来为它添加钥匙。 + +用快捷键Ctrl+Alt+T或者在Unity Dash中的“应用程序启动器”中打开终端。依次粘贴运行下面的命令。 + + wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg -O - | sudo apt-key add - + + wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-2 -O - | sudo apt-key add - + +![trust-intel](http://ubuntuhandbook.org/wp-content/uploads/2015/11/trust-intel.jpg) + +注意:在运行第一个命令的过程中,如果钥匙下载完成后光标停住不动并且一直闪烁的话,就像上面图片显示的那样,输入你的密码(输入时不会看到什么有变化)然后回车就行了。 + +最后通过Unity Dash或应用程序启动器打开Intel图形安装器。 + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/install-intel-graphics-installer-in-ubuntu-15-10/ + +作者:[Ji m][a] +译者:[XLCYun](https://github.com/XLCYun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuhandbook.org/index.php/about/ +[1]:https://01.org/linuxgraphics/downloads From 92f5eb379241b9c273511177152ebc93bb7ae5a9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Nov 2015 06:41:08 +0800 Subject: [PATCH 0403/1710] PUB:20151012 Curious about Linux Try Linux Desktop on the Cloud @sevenot --- ...ut Linux Try Linux Desktop on the Cloud.md | 44 +++++++++++++++++++ ...ut Linux Try Linux Desktop on the Cloud.md | 43 ------------------ 2 files changed, 44 insertions(+), 43 deletions(-) create mode 100644 published/20151012 Curious about Linux Try Linux Desktop on the Cloud.md delete mode 100644 translated/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md diff --git a/published/20151012 Curious about Linux Try Linux Desktop on the Cloud.md b/published/20151012 Curious about Linux Try Linux Desktop on the Cloud.md new file mode 100644 index 0000000000..2d2985bc34 --- /dev/null +++ b/published/20151012 Curious about Linux Try Linux Desktop on the Cloud.md @@ -0,0 +1,44 @@ +好奇 Linux?试试云端的 Linux 桌面 +================================================================================ +Linux 在桌面操作系统市场上只占据了非常小的份额,从目前的调查结果来看,估计只有2%的市场份额;对比来看,丰富多变的 Windows 系统占据了接近90%的市场份额。对于 Linux 来说,要挑战 Windows 在桌面操作系统市场的垄断,需要有一个让用户学习不同的操作系统的简单方式。如果你相信传统的 Windows 用户会再买一台机器来使用 Linux,那你就太天真了。我们只能去试想用户重新分区,设置引导程序来使用双系统,或者跳过所有步骤回到一个最简单的方法。 + +![](http://www.linuxlinks.com/portal/content/reviews/Cloud/CloudComputing.png) + +我们实验过一系列让用户试操作 Linux 的无风险的使用方法,不涉及任何分区管理,包括 CD/DVD 光盘、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 提供了一个免费服务,方便广大用户通过浏览器来访问远程 Linux 桌面。开发者将其加强为一个用户个人远程实验室(用户可以在系统里运行、开发任何程序),用户可以在任何地方通过互联网登入远程实验室。 + +这项服务现在可以为个人用户提供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) +校对:[wxy](https://github.com/wxy) + +本文由 [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 deleted file mode 100644 index 016429d92d..0000000000 --- a/translated/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md +++ /dev/null @@ -1,43 +0,0 @@ -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 8097a41813f672272eeb20ca24f9bd8c906b94d4 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Nov 2015 06:53:35 +0800 Subject: [PATCH 0404/1710] PUB:20151105 Linux FAQs with Answers--How to find which shell I am using on Linux @strugglingyouth --- ...to find which shell I am using on Linux.md | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) rename {translated/tech => published}/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md (66%) diff --git a/translated/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md b/published/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md similarity index 66% rename from translated/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md rename to published/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md index 675ef43d94..e9e3aeabcc 100644 --- a/translated/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md +++ b/published/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md @@ -1,5 +1,4 @@ - -Linux 有问必答 - 如何在 Linux 上找到当前正在使用的 shell +Linux 有问必答:如何知道当前正在使用的 shell 是哪个? ================================================================================ > **问题**: 我经常在命令行中切换 shell。是否有一个快速简便的方法来找出我当前正在使用的 shell 呢?此外,我怎么能找到当前 shell 的版本? @@ -7,36 +6,30 @@ Linux 有问必答 - 如何在 Linux 上找到当前正在使用的 shell 有多种方式可以查看你目前在使用什么 shell,最简单的方法就是通过使用 shell 的特殊参数。 -其一,[一个名为 "$$" 的特殊参数][1] 表示当前你正在运行的 shell 的 PID。此参数是只读的,不能被修改。所以,下面的命令也将显示你正在运行的 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 的名称。 +如果你不使用 csh,找到当前使用的 shell 的另外一个办法是使用特殊参数 “$0” ,它表示当前正在运行的 shell 或 shell 脚本的名称。这是 Bash 的一个特殊参数,但也可用在其他 shell 中,如 sh、zsh、tcsh 或 dash。使用 echo 命令可以查看你目前正在使用的 shell 的名称。 $ echo $0 ----------- - bash -不要将 $SHELL 看成是一个单独的环境变量,它被设置为整个路径下的默认 shell。因此,这个变量并不一定指向你当前使用的 shell。例如,即使你在终端中调用不同的 shell,$SHELL 也保持不变。 +不要被一个叫做 $SHELL 的单独的环境变量所迷惑,它被设置为你的默认 shell 的完整路径。因此,这个变量并不一定指向你当前使用的 shell。例如,即使你在终端中调用不同的 shell,$SHELL 也保持不变。 $ echo $SHELL ----------- - /bin/shell ![](https://c2.staticflickr.com/6/5688/22544087680_4a9c180485_c.jpg) -因此,找出当前的shell,你应该使用 $$ 或 $0,但不是 $ SHELL。 +因此,找出当前的shell,你应该使用 $$ 或 $0,但不是 $SHELL。 ### 找出当前 Shell 的版本 ### @@ -46,8 +39,6 @@ Linux 有问必答 - 如何在 Linux 上找到当前正在使用的 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 @@ -59,23 +50,17 @@ Linux 有问必答 - 如何在 Linux 上找到当前正在使用的 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)。 +对于某些 shell,你还可以使用 shell 特定的变量(例如,$BASH_VERSION 或 $ZSH_VERSION)。 $ echo $BASH_VERSION ----------- - 4.3.8(1)-release -------------------------------------------------------------------------------- @@ -84,7 +69,7 @@ via: http://ask.xmodulo.com/which-shell-am-i-using.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/) 荣誉推出 From 57b040f06e3320fdf2fbaabf0ca03ee2b00717c4 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 27 Nov 2015 14:44:02 +0800 Subject: [PATCH 0405/1710] =?UTF-8?q?20151127-1=20=E9=80=89=E9=A2=98=20Lin?= =?UTF-8?q?ux=20or=20UNIX=20grep=20Command=20Tutorial=20series?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...grep Command In Linux or UNIX--Examples.md | 151 +++++++++ ...l series 2--Regular Expressions In grep.md | 289 ++++++++++++++++++ ...ds or String Pattern Using grep Command.md | 41 +++ ...Count Lines If a String or Word Matches.md | 33 ++ ...ep From Files and Display the File Name.md | 67 ++++ ...How To Find Files by Content Under UNIX.md | 66 ++++ ...ives Uncommented Lines of a Config File.md | 151 +++++++++ 7 files changed, 798 insertions(+) create mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md create mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md create mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md create mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md create mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md create mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md create mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md new file mode 100644 index 0000000000..b18b40e04c --- /dev/null +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md @@ -0,0 +1,151 @@ +HowTo: Use grep Command In Linux / UNIX – Examples +================================================================================ +How do I use grep command on Linux, Apple OS X, and Unix-like operating systems? Can you give me a simple examples of the grep command? + +The grep command is used to search text or searches the given file for lines containing a match to the given strings or words. By default, grep displays the matching lines. Use grep to search for lines of text that match one or many regular expressions, and outputs only the matching lines. grep is considered as one of the most useful commands on Linux and Unix-like operating systems. + +### Did you know? ### + +The name, "grep", derives from the command used to perform a similar operation, using the Unix/Linux text editor ed: + + g/re/p + +### The grep command syntax ### + +The syntax is as follows: + + grep 'word' filename + grep 'word' file1 file2 file3 + grep 'string1 string2' filename + cat otherfile | grep 'something' + command | grep 'something' + command option1 | grep 'data' + grep --color 'data' fileName + +### How do I use grep command to search a file? ### + +Search /etc/passwd file for boo user, enter: + + $ grep boo /etc/passwd + +Sample outputs: + + foo:x:1000:1000:foo,,,:/home/foo:/bin/ksh + +You can force grep to ignore word case i.e match boo, Boo, BOO and all other combination with the -i option: + + $ grep -i "boo" /etc/passwd + +### Use grep recursively ### + +You can search recursively i.e. read all files under each directory for a string "192.168.1.5" + + $ grep -r "192.168.1.5" /etc/ + +OR + + $ grep -R "192.168.1.5" /etc/ + +Sample outputs: + + /etc/ppp/options:# ms-wins 192.168.1.50 + /etc/ppp/options:# ms-wins 192.168.1.51 + /etc/NetworkManager/system-connections/Wired connection 1:addresses1=192.168.1.5;24;192.168.1.2; + +You will see result for 192.168.1.5 on a separate line preceded by the name of the file (such as /etc/ppp/options) in which it was found. The inclusion of the file names in the output data can be suppressed by using the -h option as follows: + + $ grep -h -R "192.168.1.5" /etc/ + +OR + + $ grep -hR "192.168.1.5" /etc/ + +Sample outputs: + + # ms-wins 192.168.1.50 + # ms-wins 192.168.1.51 + addresses1=192.168.1.5;24;192.168.1.2; + +### Use grep to search words only ### + +When you search for boo, grep will match fooboo, boo123, barfoo35 and more. You can force the grep command to select only those lines containing matches that form whole words i.e. match only boo word: + + $ grep -w "boo" file + +### Use grep to search 2 different words ### + +Use the egrep command as follows: + + $ egrep -w 'word1|word2' /path/to/file + +### Count line when words has been matched ### + +The grep can report the number of times that the pattern has been matched for each file using -c (count) option: + + $ grep -c 'word' /path/to/file + +Pass the -n option to precede each line of output with the number of the line in the text file from which it was obtained: + + $ grep -n 'root' /etc/passwd + +Sample outputs: + + 1:root:x:0:0:root:/root:/bin/bash + 1042:rootdoor:x:0:0:rootdoor:/home/rootdoor:/bin/csh + 3319:initrootapp:x:0:0:initrootapp:/home/initroot:/bin/ksh + +### Grep invert match ### + +You can use -v option to print inverts the match; that is, it matches only those lines that do not contain the given word. For example print all line that do not contain the word bar: + + $ grep -v bar /path/to/file + +### UNIX / Linux pipes and grep command ### + +grep command often used with [shell pipes][1]. In this example, show the name of the hard disk devices: + + # dmesg | egrep '(s|h)d[a-z]' + +Display cpu model name: + + # cat /proc/cpuinfo | grep -i 'Model' + +However, above command can be also used as follows without shell pipe: + + # grep -i 'Model' /proc/cpuinfo + +Sample outputs: + + model : 30 + model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz + model : 30 + model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz + +### How do I list just the names of matching files? ### + +Use the -l option to list file name whose contents mention main(): + + $ grep -l 'main' *.c + +Finally, you can force grep to display output in colors, enter: + + $ grep --color vivek /etc/passwd + +Sample outputs: + +![Grep command in action](http://files.cyberciti.biz/uploads/faq/2007/08/grep_command_examples.png) + +Grep command in action + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/ + +作者:Vivek Gite +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[1]:http://bash.cyberciti.biz/guide/Pipes \ No newline at end of file diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md new file mode 100644 index 0000000000..506719d8aa --- /dev/null +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md @@ -0,0 +1,289 @@ +Regular Expressions In grep +================================================================================ +How do I use the Grep command with regular expressions on a Linux and Unix-like operating systems? + +Linux comes with GNU grep, which supports extended regular expressions. GNU grep is the default on all Linux systems. The grep command is used to locate information stored anywhere on your server or workstation. + +### Regular Expressions ### + +Regular Expressions is nothing but a pattern to match for each input line. A pattern is a sequence of characters. Following all are examples of pattern: + + ^w1 + w1|w2 + [^ ] + +#### grep Regular Expressions Examples #### + +Search for 'vivek' in /etc/passswd + + grep vivek /etc/passwd + +Sample outputs: + + vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash + vivekgite:x:1001:1001::/home/vivekgite:/bin/sh + gitevivek:x:1002:1002::/home/gitevivek:/bin/sh + +Search vivek in any case (i.e. case insensitive search) + + grep -i -w vivek /etc/passwd + +Search vivek or raj in any case + + grep -E -i -w 'vivek|raj' /etc/passwd + +The PATTERN in last example, used as an extended regular expression. + +### Anchors ### + +You can use ^ and $ to force a regex to match only at the start or end of a line, respectively. The following example displays lines starting with the vivek only: + + grep ^vivek /etc/passwd + +Sample outputs: + + vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash + vivekgite:x:1001:1001::/home/vivekgite:/bin/sh + +You can display only lines starting with the word vivek only i.e. do not display vivekgite, vivekg etc: + + grep -w ^vivek /etc/passwd + +Find lines ending with word foo: +grep 'foo$' filename + +Match line only containing foo: + + grep '^foo$' filename + +You can search for blank lines with the following examples: + + grep '^$' filename + +### Character Class ### + +Match Vivek or vivek: + + grep '[vV]ivek' filename + +OR + + grep '[vV][iI][Vv][Ee][kK]' filename + +You can also match digits (i.e match vivek1 or Vivek2 etc): + + grep -w '[vV]ivek[0-9]' filename + +You can match two numeric digits (i.e. match foo11, foo12 etc): + + grep 'foo[0-9][0-9]' filename + +You are not limited to digits, you can match at least one letter: + + grep '[A-Za-z]' filename + +Display all the lines containing either a "w" or "n" character: + + grep [wn] filename + +Within a bracket expression, the name of a character class enclosed in "[:" and ":]" stands for the list of all characters belonging to that class. Standard character class names are: + +- [:alnum:] - Alphanumeric characters. +- [:alpha:] - Alphabetic characters +- [:blank:] - Blank characters: space and tab. +- [:digit:] - Digits: '0 1 2 3 4 5 6 7 8 9'. +- [:lower:] - Lower-case letters: 'a b c d e f g h i j k l m n o p q r s t u v w x y z'. +- [:space:] - Space characters: tab, newline, vertical tab, form feed, carriage return, and space. +- [:upper:] - Upper-case letters: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'. + +In this example match all upper case letters: + + grep '[:upper:]' filename + +### Wildcards ### + +You can use the "." for a single character match. In this example match all 3 character word starting with "b" and ending in "t": + + grep '\' filename + +Where, + +- \< Match the empty string at the beginning of word +- \> Match the empty string at the end of word. + +Print all lines with exactly two characters: + + grep '^..$' filename + +Display any lines starting with a dot and digit: + + grep '^\.[0-9]' filename + +#### Escaping the dot #### + +The following regex to find an IP address 192.168.1.254 will not work: + + grep '192.168.1.254' /etc/hosts + +All three dots need to be escaped: + + grep '192\.168\.1\.254' /etc/hosts + +The following example will only match an IP address: + + egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' filename + +The following will match word Linux or UNIX in any case: + + egrep -i '^(linux|unix)' filename + +### How Do I Search a Pattern Which Has a Leading - Symbol? ### + +Searches for all lines matching '--test--' using -e option Without -e, grep would attempt to parse '--test--' as a list of options: + + grep -e '--test--' filename + +### How Do I do OR with grep? ### + +Use the following syntax: + + grep 'word1|word2' filename + +OR + + grep 'word1\|word2' filename + +### How Do I do AND with grep? ### + +Use the following syntax to display all lines that contain both 'word1' and 'word2' + + grep 'word1' filename | grep 'word2' + +### How Do I Test Sequence? ### + +You can test how often a character must be repeated in sequence using the following syntax: + + {N} + {N,} + {min,max} + +Match a character "v" two times: + + egrep "v{2}" filename + +The following will match both "col" and "cool": + + egrep 'co{1,2}l' filename + +The following will match any row of at least three letters 'c'. + + egrep 'c{3,}' filename + +The following example will match mobile number which is in the following format 91-1234567890 (i.e twodigit-tendigit) + + grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" filename + +### How Do I Hightlight with grep? ### + +Use the following syntax: + + grep --color regex filename + +How Do I Show Only The Matches, Not The Lines? + +Use the following syntax: + + grep -o regex filename + +### Regular Expression Operator ### + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Regex operatorMeaning
.Matches any single character.
?The preceding item is optional and will be matched, at most, once.
*The preceding item will be matched zero or more times.
+The preceding item will be matched one or more times.
{N}The preceding item is matched exactly N times.
{N,}The preceding item is matched N or more times.
{N,M}The preceding item is matched at least N times, but not more than M times.
-Represents the range if it's not first or last in a list or the ending point of a range in a list.
^Matches the empty string at the beginning of a line; also represents the characters not in the range of a list.
$Matches the empty string at the end of a line.
\bMatches the empty string at the edge of a word.
\BMatches the empty string provided it's not at the edge of a word.
\<Match the empty string at the beginning of word.
\> Match the empty string at the end of word.
+ +#### grep vs egrep #### + +egrep is the same as **grep -E**. It interpret PATTERN as an extended regular expression. From the grep man page: + + In basic regular expressions the meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the backslashed versions \?, \+, \{, + \|, \(, and \). + Traditional egrep did not support the { meta-character, and some egrep implementations support \{ instead, so portable scripts should avoid { in + grep -E patterns and should use [{] to match a literal {. + GNU grep -E attempts to support traditional usage by assuming that { is not special if it would be the start of an invalid interval specification. + For example, the command grep -E '{1' searches for the two-character string {1 instead of reporting a syntax error in the regular expression. + POSIX.2 allows this behavior as an extension, but portable scripts should avoid it. + +References: + +- man page grep and regex(7) +- info page grep` + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/grep-regular-expressions/ + +作者: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 diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md new file mode 100644 index 0000000000..bb12d2e1b3 --- /dev/null +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md @@ -0,0 +1,41 @@ +Search Multiple Words / String Pattern Using grep Command +================================================================================ +How do I search multiple strings or words using the grep command? For example I'd like to search word1, word2, word3 and so on within /path/to/file. How do I force grep to search multiple words? + +The [grep command supports regular expression][1] pattern. To search multiple words, use following syntax: + + grep 'word1\|word2\|word3' /path/to/file + +In this example, search warning, error, and critical words in a text log file called /var/log/messages, enter: + + $ grep 'warning\|error\|critical' /var/log/messages + +To just match words, add -w swith: + + $ grep -w 'warning\|error\|critical' /var/log/messages + +egrep command can skip the above syntax and use the following syntax: + + $ egrep -w 'warning|error|critical' /var/log/messages + +I recommend that you pass the -i (ignore case) and --color option as follows: + + $ egrep -wi --color 'warning|error|critical' /var/log/messages + +Sample outputs: + +![Fig.01: Linux / Unix egrep Command Search Multiple Words Demo Output](http://s0.cyberciti.org/uploads/faq/2008/04/egrep-words-output.png) + +Fig.01: Linux / Unix egrep Command Search Multiple Words Demo Output + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/ + +作者: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/faq/grep-regular-expressions/ \ No newline at end of file diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md new file mode 100644 index 0000000000..cc11cf85c2 --- /dev/null +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md @@ -0,0 +1,33 @@ +Grep Count Lines If a String / Word Matches +================================================================================ +How do I count lines if given word or string matches for each input file under Linux or UNIX operating systems? + +You need to pass the -c or --count option to suppress normal output. It will display a count of matching lines for each input file: + + $ grep -c vivek /etc/passwd + +OR + + $ grep -w -c vivek /etc/passwd + +Sample outputs: + + 1 + +However, with the -v or --invert-match option it will count non-matching lines, enter: + + $ grep -c vivek /etc/passwd + +Sample outputs: + + 45 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/grep-count-lines-if-a-string-word-matches/ + +作者: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 diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md new file mode 100644 index 0000000000..6fa9dc7a27 --- /dev/null +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md @@ -0,0 +1,67 @@ +Grep From Files and Display the File Name +================================================================================ +How do I grep from a number of files and display the file name only? + +When there is more than one file to search it will display file name by default: + + grep "word" filename + grep root /etc/* + +Sample outputs: + + /etc/bash.bashrc: See "man sudo_root" for details. + /etc/crontab:17 * * * * root cd / && run-parts --report /etc/cron.hourly + /etc/crontab:25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) + /etc/crontab:47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) + /etc/crontab:52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) + /etc/group:root:x:0: + grep: /etc/gshadow: Permission denied + /etc/logrotate.conf: create 0664 root utmp + /etc/logrotate.conf: create 0660 root utmp + +The first name is file name (e.g., /etc/crontab, /etc/group). The -l option will only print filename if th + + grep -l "string" filename + grep -l root /etc/* + +Sample outputs: + + /etc/aliases + /etc/arpwatch.conf + grep: /etc/at.deny: Permission denied + /etc/bash.bashrc + /etc/bash_completion + /etc/ca-certificates.conf + /etc/crontab + /etc/group + +You can suppress normal output; instead print the name of each input file from **which no output would normally have been** printed: + + grep -L "word" filename + grep -L root /etc/* + +Sample outputs: + + /etc/apm + /etc/apparmor + /etc/apparmor.d + /etc/apport + /etc/apt + /etc/avahi + /etc/bash_completion.d + /etc/bindresvport.blacklist + /etc/blkid.conf + /etc/bluetooth + /etc/bogofilter.cf + /etc/bonobo-activation + /etc/brlapi.key + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/grep-from-files-and-display-the-file-name/ + +作者: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 diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md new file mode 100644 index 0000000000..3d5943fc07 --- /dev/null +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md @@ -0,0 +1,66 @@ +How To Find Files by Content Under UNIX +================================================================================ +I had written lots of code in C for my school work and saved it as source code under /home/user/c/*.c and *.h. How do I find files by content such as string or words (function name such as main() under UNIX shell prompt? + +You need to use the following tools: + +[a] **grep command** : print lines matching a pattern. + +[b] **find command**: search for files in a directory hierarchy. + +### [grep Command To Find Files By][1] Content ### + +Type the command as follows: + + grep 'string' *.txt + grep 'main(' *.c + grep '#include' *.c + grep 'getChar*' *.c + grep -i 'ultra' *.conf + grep -iR 'ultra' *.conf + +Where + +- **-i** : Ignore case distinctions in both the PATTERN (match valid, VALID, ValID string) and the input files (math file.c FILE.c FILE.C filename). +- **-R** : Read all files under each directory, recursively + +### Highlighting searched patterns ### + +You can highlight patterns easily while searching large number of files: + + $ grep --color=auto -iR 'getChar();' *.c + +### Displaying file names and line number for searched patterns ### + +You may also need to display filenames and numbers: + + $ grep --color=auto -iRnH 'getChar();' *.c + +Where, + +- **-n** : Prefix each line of output with the 1-based line number within its input file. +- **-H** Print the file name for each match. This is the default when there is more than one file to search. + + $grep --color=auto -nH 'DIR' * + +Sample output: + +![Fig.01: grep command displaying searched pattern](http://www.cyberciti.biz/faq/wp-content/uploads/2008/09/grep-command.png) + +Fig.01: grep command displaying searched pattern + +You can also use find command: + + $ find . -name "*.c" -print | xargs grep "main(" + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/ + +作者: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/faq/howto-search-find-file-for-text-string/ \ No newline at end of file diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md new file mode 100644 index 0000000000..d7d520326e --- /dev/null +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md @@ -0,0 +1,151 @@ +Linux / UNIX View Only Configuration File Directives ( Uncommented Lines of a Config File ) +================================================================================ +Most Linux and UNIX-like system configuration files are documented using comments, but some time I just need to see line of configuration text in a config file. How can I view just the uncommented configuration file directives from squid.conf or httpd.conf file? How can I strip out comments and blank lines on a Linux or Unix-like systems? + +To view just the uncommented lines of text in a config file use the grep, sed, awk, perl or any other text processing utility provided by UNIX / BSD / OS X / Linux operating systems. + +### grep command example to strip out command ### + +You can use the gerp command as follows: + + $ grep -v "^#" /path/to/config/file + $ grep -v "^#" /etc/apache2/apache2.conf + +Sample outputs: + + ServerRoot "/etc/apache2" + + LockFile /var/lock/apache2/accept.lock + + PidFile ${APACHE_PID_FILE} + + Timeout 300 + + KeepAlive On + + MaxKeepAliveRequests 100 + + KeepAliveTimeout 15 + + + + StartServers 5 + MinSpareServers 5 + MaxSpareServers 10 + MaxClients 150 + MaxRequestsPerChild 0 + + + + StartServers 2 + MinSpareThreads 25 + MaxSpareThreads 75 + ThreadLimit 64 + ThreadsPerChild 25 + MaxClients 150 + MaxRequestsPerChild 0 + + + + StartServers 2 + MaxClients 150 + MinSpareThreads 25 + MaxSpareThreads 75 + ThreadLimit 64 + ThreadsPerChild 25 + MaxRequestsPerChild 0 + + + User ${APACHE_RUN_USER} + Group ${APACHE_RUN_GROUP} + + + AccessFileName .htaccess + + + Order allow,deny + Deny from all + Satisfy all + + + DefaultType text/plain + + + HostnameLookups Off + + ErrorLog /var/log/apache2/error.log + + LogLevel warn + + Include /etc/apache2/mods-enabled/*.load + Include /etc/apache2/mods-enabled/*.conf + + Include /etc/apache2/httpd.conf + + Include /etc/apache2/ports.conf + + LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined + LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined + LogFormat "%h %l %u %t \"%r\" %>s %O" common + LogFormat "%{Referer}i -> %U" referer + LogFormat "%{User-agent}i" agent + + CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined + + + + Include /etc/apache2/conf.d/ + + Include /etc/apache2/sites-enabled/ + +To suppress blank lines use [egrep command][1], run: + + egrep -v "^#|^$" /etc/apache2/apache2.conf + ## or pass it to the page such as more or less ## + egrep -v "^#|^$" /etc/apache2/apache2.conf | less + + ## Bash function ###################################### + ## or create function or alias and use it as follows ## + ## viewconfig /etc/squid/squid.conf ## + ####################################################### + viewconfig(){ + local f="$1" + [ -f "$1" ] && command egrep -v "^#|^$" "$f" || echo "Error $1 file not found." + } + +Sample output: + +![Fig.01: Unix/Linux Egrep Strip Out Comments Blank Lines](http://s0.cyberciti.org/uploads/faq/2008/05/grep-strip-out-comments-blank-lines.jpg) + +Fig.01: Unix/Linux Egrep Strip Out Comments Blank Lines + +### Understanding grep/egrep command line options ### + +The -v option invert the sense of matching, to select non-matching lines. This option should work under all posix based systems. The regex ^$ matches and removes all blank lines and ^# matches and removes all comments that starts with a "#". + +### sed Command example ### + +GNU / sed command can be used as follows: + + $ sed '/ *#/d; /^ *$/d' /path/to/file + $ sed '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf + +GNU or BSD sed can update your config file too. The syntax is as follows to edit files in-place, saving backups with the specified extension such as .bak: + + sed -i'.bak.2015.12.27' '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf + +For more info see man pages - [grep(1)][2], [sed(1)][3] + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/shell-display-uncommented-lines-only/ + +作者: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/faq/grep-regular-expressions/ +[2]:http://www.manpager.com/linux/man1/grep.1.html +[3]:http://www.manpager.com/linux/man1/sed.1.html \ No newline at end of file From 33ae7000e58b92099dd70ec929efa286e940bec1 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 28 Nov 2015 12:01:02 +0800 Subject: [PATCH 0406/1710] Translating sources/tech/20151123 LNAV--Ncurses based log file viewer.md sources/tech/20151125 The tar command explained.md --- sources/tech/20151123 LNAV--Ncurses based log file viewer.md | 1 + sources/tech/20151125 The tar command explained.md | 1 + 2 files changed, 2 insertions(+) diff --git a/sources/tech/20151123 LNAV--Ncurses based log file viewer.md b/sources/tech/20151123 LNAV--Ncurses based log file viewer.md index 08b7ee011a..b6b6ca3c6d 100644 --- a/sources/tech/20151123 LNAV--Ncurses based log file viewer.md +++ b/sources/tech/20151123 LNAV--Ncurses based log file viewer.md @@ -1,3 +1,4 @@ +ictlyh Translating LNAV – Ncurses based log file viewer ================================================================================ The Logfile Navigator, lnav for short, is a curses-based tool for viewing and analyzing log files. The value added by lnav over text viewers / editors is that it takes advantage of any semantic information that can be gleaned from the log file, such as timestamps and log levels. Using this extra semantic information, lnav can do things like: interleaving messages from different files; generate histograms of messages over time; and providing hotkeys for navigating through the file. It is hoped that these features will allow the user to quickly and efficiently zero-in on problems. diff --git a/sources/tech/20151125 The tar command explained.md b/sources/tech/20151125 The tar command explained.md index cc13a25dd2..7911dbd1f6 100644 --- a/sources/tech/20151125 The tar command explained.md +++ b/sources/tech/20151125 The tar command explained.md @@ -1,3 +1,4 @@ +ictlyh Translating The tar command explained ================================================================================ The Linux [tar][1] command is the swiss army of the Linux admin when it comes to archiving or distributing files. Gnu Tar archives can contain multiple files and directories, file permissions can be preserved and it supports multiple compression formats. The name tar stands for "**T**ape **Ar**chiver", the format is an official POSIX standard. From f0d475ebf6ebeb1240129eb8edea815f8c6d9a91 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 28 Nov 2015 13:36:04 +0800 Subject: [PATCH 0407/1710] Translated sources/tech/20151125 The tar command explained.md --- .../20151125 The tar command explained.md | 138 ------------------ .../20151125 The tar command explained.md | 137 +++++++++++++++++ 2 files changed, 137 insertions(+), 138 deletions(-) delete mode 100644 sources/tech/20151125 The tar command explained.md create mode 100644 translated/tech/20151125 The tar command explained.md diff --git a/sources/tech/20151125 The tar command explained.md b/sources/tech/20151125 The tar command explained.md deleted file mode 100644 index 7911dbd1f6..0000000000 --- a/sources/tech/20151125 The tar command explained.md +++ /dev/null @@ -1,138 +0,0 @@ -ictlyh Translating -The tar command explained -================================================================================ -The Linux [tar][1] command is the swiss army of the Linux admin when it comes to archiving or distributing files. Gnu Tar archives can contain multiple files and directories, file permissions can be preserved and it supports multiple compression formats. The name tar stands for "**T**ape **Ar**chiver", the format is an official POSIX standard. - -### Tar file formats ### - -A short introduction into tar compression levels. - -- **No compression** Uncompressed files have the file ending .tar. -- **Gzip Compression** The Gzip format is the most widely used compression format for tar, it is fast for creating and extracting files. Files with gz compression have normally the file ending .tar.gz or .tgz. Here some examples on how to [create][2] and [extract][3] a tar.gz file. -- **Bzip2 Compression** The Bzip2 format offers a better compression then the Gzip format. Creating files is slower, the file ending is usually .tar.bz2. -- **Lzip (LZMA) Compression** The Lzip compression combines the speed of Gzip with a compression level that is similar to Bzip2 (or even better). Independently from these good attributes, this format is not widely used. -- **Lzop Compression** This compress option is probably the fastest compression format for tar, it has a compression level similar to gzip and is not widely used. - -The common formats are tar.gz and tar.bz2. If you goal is fast compression, then use gzip. When the archive file size is critical, then use tar.bz2. - -### What is the tar command used for? ### - -Here a few common use cases of the tar command. - -- Backup of Servers and Desktops. -- Document archiving. -- Software Distribution. - -### Installing tar ### - -The command is installed on most Linux Systems by default. Here are the instructions to install tar in case that the command is missing. - -#### CentOS #### - -Execute the following command as root user on the shell to install tar on CentOS. - - yum install tar - -#### Ubuntu #### - -This command will install tar on Ubuntu. The "sudo" command ensures that the apt command is run with root privileges. - - sudo apt-get install tar - -#### Debian #### - -The following apt command installs tar on Debian. - - apt-get install tar - -#### Windows #### - -The tar command is available for Windows as well, you can download it from the Gunwin project. [http://gnuwin32.sourceforge.net/packages/gtar.htm][4] - -### Create tar.gz Files ### - -Here is the [tar command][5] that has to be run on the shell. I will explain the command line options below. - - tar pczf myarchive.tar.gz /home/till/mydocuments - -This command creates the archive myarchive.tar.gz which contains the files and folders from the path /home/till/mydocuments. **The command line options explained**: - -- **[p]** This option stand for "preserve", it instructs tar to store details on file owner and file permissions in the archive. -- **[c]** Stands for create. This option is mandatory when a file is created. -- **[z]** The z option enables gzip compression. -- **[f]** The file option tells tar to create an archive file. Tar will send the output to stdout if this option is omitted. - -#### Tar command examples #### - -**Example 1: Backup the /etc Directory** Create a backup of the /etc config directory. The backup is stored in the root folder. - - tar pczvf /root/etc.tar.gz /etc - -![Backup the /etc directory with tar.](https://www.howtoforge.com/images/linux-tar-command/big/create-tar.png) - -The command should be run as root to ensure that all files in /etc are included in the backup. This time, I've added the [v] option in the command. This option stands for verbose, it tells tar to show all file names that get added into the archive. - -**Example 2: Backup your /home directory** Create a backup of your home directory. The backup will be stored in a directory /backup. - - tar czf /backup/myuser.tar.gz /home/myuser - -Replace myuser with your username. In this command, I've omitted the [p] switch, so the permissions get not preserved. - -**Example 3: A file-based backup of MySQL databases** The MySQL databases are stored in /var/lib/mysql on most Linux distributions. You can check that with the command: - - ls /var/lib/mysql - -![File based MySQL backup with tar.](https://www.howtoforge.com/images/linux-tar-command/big/tar_backup_mysql.png) - -Stop the database server to get a consistent MySQL file backup with tar. The backup will be written to the /backup folder. - -1) Create the backup folder - - mkdir /backup - chmod 600 /backup - -2) Stop MySQL, run the backup with tar and start the database server again. - - service mysql stop - tar pczf /backup/mysql.tar.gz /var/lib/mysql - service mysql start - ls -lah /backup - -![File based MySQL backup.](https://www.howtoforge.com/images/linux-tar-command/big/tar-backup-mysql2.png) - -### Extract tar.gz Files ### - -The command to extract tar.gz files is: - - tar xzf myarchive.tar.gz - -#### The tar command options explained #### - -- **[x]** The x stand for extract, it is mandatory when a tar file shall be extracted. -- **[z]** The z option tells tar that the archive that shall be unpacked is in gzip format. -- **[f]** This option instructs tar to read the archive content from a file, in this case the file myarchive.tar.gz. - -The above tar command will silently extract that tar.gz file, it will show only error messages. If you like to see which files get extracted, then add the "v" option. - - tar xzvf myarchive.tar.gz - -The **[v]** option stands for verbose, it will show the file names while they get unpacked. - -![Extract a tar.gz file.](https://www.howtoforge.com/images/linux-tar-command/big/tar-xfz.png) - --------------------------------------------------------------------------------- - -via: https://www.howtoforge.com/tutorial/linux-tar-command/ - -作者:[howtoforge][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.howtoforge.com/ -[1]:https://en.wikipedia.org/wiki/Tar_(computing) -[2]:http://www.faqforge.com/linux/create-tar-gz/ -[3]:http://www.faqforge.com/linux/extract-tar-gz/ -[4]:http://gnuwin32.sourceforge.net/packages/gtar.htm -[5]:http://www.faqforge.com/linux/tar-command/ \ No newline at end of file diff --git a/translated/tech/20151125 The tar command explained.md b/translated/tech/20151125 The tar command explained.md new file mode 100644 index 0000000000..a3d19ac34f --- /dev/null +++ b/translated/tech/20151125 The tar command explained.md @@ -0,0 +1,137 @@ +tar 命令详解 +================================================================================ +Linux [tar][1] 命令是归档或分发文件时的强大武器。GNU tar 归档包可以包含多个文件和目录,还能保留权限,它还支持多种压缩格式。Tar 表示 "**T**ape **Ar**chiver",这是一种 POSIX 标准。 + +### Tar 文件格式 ### + +tar 压缩等级简介。 + +- **无压缩** 没有压缩的文件用 .tar 结尾。 +- **Gzip 压缩** Gzip 格式是 tar 使用最广泛的压缩格式,它能快速压缩和提取文件。用 gzip 压缩的文件通常用 .tar.gz 或 .tgz 结尾。这里有一些如何[创建][2]和[解压][3] tar.gz 文件的例子。 +- **Bzip2 压缩** 和 Gzip格式相比 Bzip2 提供了更好的压缩比。创建压缩文件也比较慢,通常采用 .tar.bz2 结尾。 +- **Lzip(LAMA)压缩** Lizp 压缩结合了 Gzip 快速的优势,以及和 Bzip2 类似(甚至更好) 的压缩率。尽管有这些好处,这个格式并没有得到广泛使用。 +- **Lzop 压缩** 这个压缩选项也许是 tar 最快的压缩格式,它的压缩率和 gzip 类似,也没有广泛使用。 + +常见的格式是 tar.gz 和 tar.bz2。如果你想快速压缩,那么就是用 gzip。如果归档文件大小比较重要,就是用 tar.bz2。 + +### tar 命令用来干什么? ### + +下面是一些使用 tar 命令的常见情形。 + +- 备份服务器或桌面系统 +- 文档归档 +- 软件分发 + +### 安装 tar ### + +大部分 Linux 系统默认都安装了 tar。如果没有,这里有安装 tar 的命令。 + +#### CentOS #### + +在 CentOS 中,以 root 用户在 shell 中执行下面的命令安装 tar。 + + yum install tar + +#### Ubuntu #### + +下面的命令会在 Ubuntu 上安装 tar。“sudo” 命令确保 apt 命令是以 root 权限运行的。 + + sudo apt-get install tar + +#### Debian #### + +下面的 apt 命令在 Debian 上安装 tar。 + + apt-get install tar + +#### Windows #### + +tar 命令在 Windows 也可以使用,你可以从 Gunwin 项目[http://gnuwin32.sourceforge.net/packages/gtar.htm][4]中下载它。 + +### 创建 tar.gz 文件 ### + +下面是在 shell 中运行 [tar 命令][5] 的一些例子。下面我会解释这些命令行选项。 + + tar pczf myarchive.tar.gz /home/till/mydocuments + +这个命令会创建归档文件 myarchive.tar.gz,其中包括了路径 /home/till/mydocuments 中的文件和目录。**命令行选项解释**: + +- **[p]** 这个选项表示 “preserve”,它指示 tar 在归档文件中保留文件属主和权限信息。 +- **[c]** 表示创建。要创建文件时不能缺少这个选项。 +- **[z]** z 选项启用 gzip 压缩。 +- **[f]** file 选项告诉 tar 创建一个归档文件。如果没有这个选项 tar 会把输出发送到 stdout。 + +#### Tar 命令事例 #### + +**事例 1: 备份 /etc 目录** 创建 /etc 配置目录的一个备份。备份保存在 root 目录。 + + tar pczvf /root/etc.tar.gz /etc + +![用 tar 备份 /etc 目录](https://www.howtoforge.com/images/linux-tar-command/big/create-tar.png) + +要以 root 用户运行命令确保 /etc 中的所有文件都会被包含在备份中。这次,我在命令中添加了 [v] 选项。这个选项表示 verbose,它告诉 tar 显示所有被包含到归档文件中的文件名。 + +**事例 2: 备份你的 /home 目录** 创建你的 home 目录的备份。备份会被保存到 /backup 目录。 + + tar czf /backup/myuser.tar.gz /home/myuser + +用你的用户名替换 myuser。这个命令中,我省略了 [p] 选项,也就不会保存权限。 + +**事例 3: 基于文件的 MySQL 数据库备份** 在大部分 Linux 发行版中,MySQL 数据库保存在 /var/lib/mysql。你可以使用下面的命令检查: + + ls /var/lib/mysql + +![使用 tar 基于文件备份 MySQL](https://www.howtoforge.com/images/linux-tar-command/big/tar_backup_mysql.png) + +用 tar 备份 MySQL 文件时为了保持一致性,首先停用数据库服务器。备份会被写到 /backup 目录。 + +1) 创建 backup 目录 + + mkdir /backup + chmod 600 /backup + +2) 停止 MySQL,用 tar 进行备份并重新启动数据库。 + + service mysql stop + tar pczf /backup/mysql.tar.gz /var/lib/mysql + service mysql start + ls -lah /backup + +![基于文件的 MySQL 备份](https://www.howtoforge.com/images/linux-tar-command/big/tar-backup-mysql2.png) + +### 提取 tar.gz 文件### + +提取 tar.gz 文件的命令是: + + tar xzf myarchive.tar.gz + +#### tar 命令选项解释 #### + +- **[x]** x 表示提取,提取 tar 文件时这个命令不可缺少。 +- **[z]** z 选项告诉 tar 要解压的归档文件时 gzip 格式。 +- **[f]** 该选项告诉 tar 从一个文件中读取归档内容,本例中是 myarchive.tar.gz。 + +上面的 tar 命令会安静地提取 tar.gz 文件,它只会显示错误信息。如果你想要看提取了哪些文件,那么添加 “v” 选项。 + + tar xzvf myarchive.tar.gz + +**[v]** 选项表示 verbose,它会向你显示解压的文件名。 + +![提取 tar.gz 文件](https://www.howtoforge.com/images/linux-tar-command/big/tar-xfz.png) + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/linux-tar-command/ + +作者:[howtoforge][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.howtoforge.com/ +[1]:https://en.wikipedia.org/wiki/Tar_(computing) +[2]:http://www.faqforge.com/linux/create-tar-gz/ +[3]:http://www.faqforge.com/linux/extract-tar-gz/ +[4]:http://gnuwin32.sourceforge.net/packages/gtar.htm +[5]:http://www.faqforge.com/linux/tar-command/ \ No newline at end of file From e1bc4750ebaf10f614f5ac79e61ebb114cf2f297 Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Sat, 28 Nov 2015 22:39:01 +0800 Subject: [PATCH 0408/1710] Translating --- ... Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md index d9829e9daa..b3638a61ea 100644 --- a/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md +++ b/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md @@ -1,3 +1,4 @@ +Translating by KnightJoker How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2 ================================================================================ Nginx is free and open source HTTP server and reverse proxy, as well as an mail proxy server for IMAP/POP3. Nginx is high performance web server with rich of features, simple configuration and low memory usage. Originally written by Igor Sysoev on 2002, and until now has been used by a big technology company including Netflix, Github, Cloudflare, WordPress.com etc. From 20cc91897584c156ea3fe785ce014c4c4c1d29e3 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 28 Nov 2015 22:52:23 +0800 Subject: [PATCH 0409/1710] Update 20151123 How to access Dropbox from the command line in Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...23 How to access Dropbox from the command line in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151123 How to access Dropbox from the command line in Linux.md b/sources/tech/20151123 How to access Dropbox from the command line in Linux.md index d4d2c8af3a..927a046615 100644 --- a/sources/tech/20151123 How to access Dropbox from the command line in Linux.md +++ b/sources/tech/20151123 How to access Dropbox from the command line in Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + How to access Dropbox from the command line in Linux ================================================================================ Cloud storage is everywhere in today's multi-device environment, where people want to access content across multiple devices wherever they go. Dropbox is the most widely used cloud storage service thanks to its elegant UI and flawless multi-platform compatibility. The popularity of Dropbox has led to a flurry of official or unofficial Dropbox clients that are available across different operating system platforms. @@ -94,4 +96,4 @@ via: http://xmodulo.com/access-dropbox-command-line-linux.html [a]:http://xmodulo.com/author/nanni [1]:http://www.andreafabrizi.it/?dropbox_uploader -[2]:https://www.dropbox.com/developers/apps \ No newline at end of file +[2]:https://www.dropbox.com/developers/apps From aa186ea0d700dd245f89c9b50c662a6094194ca5 Mon Sep 17 00:00:00 2001 From: Flowsnow Date: Sun, 29 Nov 2015 01:34:17 +0800 Subject: [PATCH 0410/1710] Update Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md --- ...age Management with Yum RPM Apt Dpkg Aptitude and Zypper.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 6d0f65223f..af967e18d4 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,4 @@ +Flowsnow translating... 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. @@ -226,4 +227,4 @@ via: http://www.tecmint.com/linux-package-management/ [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 +[5]:http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ From da05b0d2f6bd33a619fb59b18615452655bf53cc Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 29 Nov 2015 11:47:54 +0800 Subject: [PATCH 0411/1710] Translated sources/tech/20151123 LNAV--Ncurses based log file viewer.md --- ...123 LNAV--Ncurses based log file viewer.md | 84 ------------------- ...123 LNAV--Ncurses based log file viewer.md | 83 ++++++++++++++++++ 2 files changed, 83 insertions(+), 84 deletions(-) delete mode 100644 sources/tech/20151123 LNAV--Ncurses based log file viewer.md create mode 100644 translated/tech/20151123 LNAV--Ncurses based log file viewer.md diff --git a/sources/tech/20151123 LNAV--Ncurses based log file viewer.md b/sources/tech/20151123 LNAV--Ncurses based log file viewer.md deleted file mode 100644 index b6b6ca3c6d..0000000000 --- a/sources/tech/20151123 LNAV--Ncurses based log file viewer.md +++ /dev/null @@ -1,84 +0,0 @@ -ictlyh Translating -LNAV – Ncurses based log file viewer -================================================================================ -The Logfile Navigator, lnav for short, is a curses-based tool for viewing and analyzing log files. The value added by lnav over text viewers / editors is that it takes advantage of any semantic information that can be gleaned from the log file, such as timestamps and log levels. Using this extra semantic information, lnav can do things like: interleaving messages from different files; generate histograms of messages over time; and providing hotkeys for navigating through the file. It is hoped that these features will allow the user to quickly and efficiently zero-in on problems. - -### lnav Features ### - -#### Support for the following log file formats: #### - -Syslog, Apache access log, strace, tcsh history, and generic log files with timestamps. The file format is automatically detected when the file is read in. - -#### Histogram view: #### - -Displays the number of log messages per bucket-of-time. Useful for getting an overview of what was happening over a long period of time. - -#### Filters: #### - -Display only lines that match or do not match a set of regular expressions. Useful for removing extraneous log lines that you are not interested in. - -#### "Live" operation: #### - -Searches are done as you type; new log lines are automatically loaded and searched as they are added; filters apply to lines as they are loaded; and, SQL queries are checked for correctness as you type. - -#### Automatic tailing: #### - -The log file view automatically scrolls down to follow new lines that are added to files. Simply scroll up to lock the view in place and then scroll down to the bottom to resume tailing. - -#### Time-of-day ordering of lines: #### - -The log lines from all the files are loaded and then sorted by time-of-day. Relieves you of having to manually line up log messages from different files. - -#### Syntax highlighting: #### - -Errors and warnings are colored in red and yellow, respectively. Highlights are also applied to: SQL keywords, XML tags, file and line numbers in Java backtraces, and quoted strings. - -#### Navigation: #### - -There are hotkeys for jumping to the next or previous error or warning and moving forward or backward by an amount of time. - -#### Use SQL to query logs: #### - -Each log file line is treated as a row in a database that can be queried using SQL. The columns that are available depend on logs file types being viewed. - -#### Command and search history: #### - -Your previously entered commands and searches are saved so you can access them between sessions. - -#### Compressed files: #### - -Compressed log files are automatically detected and uncompressed on the fly. - -### Install lnav on ubuntu 15.10 ### - -Open the terminal and run the following command - - sudo apt-get install lnav - -### Using lnav ### - -If you want to view logs using lnav you can do using the following command by default it shows syslogs - - lnav - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/11/51.png) - -If you want to view specific logs provide the path - -If you want to view CUPS logs run the following command from your terminal - - lnav /var/log/cups - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/11/6.png) - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/lnav-ncurses-based-log-file-viewer.html - -作者:[ruchi][a] -译者:[zky001](https://github.com/zky001) -校对:[校对者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/20151123 LNAV--Ncurses based log file viewer.md b/translated/tech/20151123 LNAV--Ncurses based log file viewer.md new file mode 100644 index 0000000000..e1f99eb07c --- /dev/null +++ b/translated/tech/20151123 LNAV--Ncurses based log file viewer.md @@ -0,0 +1,83 @@ +LNAV - 基于 Ncurses 的日志文件阅读器 +================================================================================ +日志文件导航器(Logfile Navigator,简称 lnav),是一个基于 curses 用于查看和分析日志文件的工具。和文本阅读器/编辑器相比, lnav 的好处是它充分利用了可以从日志文件中获取的语义信息,例如时间戳和日志等级。利用这些额外的语义信息, lnav 可以处理类似事情:来自不同文件的交错信息;按照时间生成信息直方图;提供在文件中导航的关键字。它希望使用这些功能可以使得用户可以快速有效地定位和解决问题。 + +### lnav 功能 ### + +#### 支持以下日志文件格式: #### + +Syslog、Apache 访问日志、strace、tcsh 历史以及常见的带时间戳的日志文件。读入文件的时候回自动检测文件格式。 + +#### 直方图视图: #### + +以时间为桶显示日志信息数量。这对于在一段长时间内大概了解发生了什么非常有用。 + +#### 过滤器: #### + +只显示那些匹配或不匹配一些正则表达式的行。对于移除大量你不感兴趣的日志行非常有用。 + +#### 及时操作: #### + +在你输入到时候会同时完成检索;当添加新日志行的时候回自动加载和搜索;加载行的时候会应用过滤器;另外,还会在你输入 SQL 查询的时候检查正确性。 + +#### 自动显示后文: #### + +日志文件视图会自动往下滚动到新添加到文件中的行。只需要向上滚动就可以锁定当前视图,然后向下滚动到底部恢复显示后文。 + +#### 按照日期顺序排序行: #### + +从所有文件中加载的日志行会按照日期进行排序。使得你不需要手动从不同文件中收集日志信息。 + +#### 语法高亮: #### + +错误和警告会用红色和黄色显示。高亮还可用于: SQL 关键字、XML 标签、Java 文件行号和括起来的字符串。 + +#### 导航: #### + +有快捷键用于跳转到下一个或上一个错误或警告,按照一定的时间向后或向前移动。 + +#### 用 SQL 查询日志: #### + +每个日志文件行都被认为是数据库中可以使用 SQL 查询的一行。可以使用的列取决于查看的日志文件类型。 + +#### 命令和搜索历史: #### + +会自动保存你之前输入的命令和搜素,因此你可以在会话之间使用它们。 + +#### 压缩文件: #### + +会实时自动检测和解压压缩的日志文件。 + +### 在 ubuntu 15.10 上安装 lnav #### + +打开终端运行下面的命令 + + sudo apt-get install lnav + +### 使用 lnav ### + +如果你想使用 lnav 查看日志,你可以使用下面的命令,默认它会显示 syslogs + + lnav + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/11/51.png) + +如果你想查看特定的日志,那么需要指定路径 + +如果你想看 CPU 日志,在你的终端里运行下面的命令 + + lnav /var/log/cups + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/11/6.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/lnav-ncurses-based-log-file-viewer.html + +作者:[ruchi][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix From 9dd2e0075b98d8167ad1ad9590f7d1675d9da1eb Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 Nov 2015 22:43:44 +0800 Subject: [PATCH 0412/1710] PUB:20151012 How to Setup DockerUI--a Web Interface for Docker @oska874 --- ...up DockerUI--a Web Interface for Docker.md | 113 ++++++++++++++++++ ...up DockerUI--a Web Interface for Docker.md | 111 ----------------- 2 files changed, 113 insertions(+), 111 deletions(-) create mode 100644 published/20151012 How to Setup DockerUI--a Web Interface for Docker.md delete mode 100644 translated/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md diff --git a/published/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/published/20151012 How to Setup DockerUI--a Web Interface for Docker.md new file mode 100644 index 0000000000..10ead7542e --- /dev/null +++ b/published/20151012 How to Setup DockerUI--a Web Interface for Docker.md @@ -0,0 +1,113 @@ +用浏览器管理 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) +校对:[wxy](https://github.com/wxy) + +本文由 [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/ 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 deleted file mode 100644 index 52d63d6ac9..0000000000 --- a/translated/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 9b4c18c91eacf22737b481fcee20d0bd08f426e7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 Nov 2015 23:12:21 +0800 Subject: [PATCH 0413/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 188 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 96 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 968c8434a1..68b579d9fc 100644 --- a/README.md +++ b/README.md @@ -51,113 +51,117 @@ LCTT的组成 * 2014/12/25 提升runningwater为Core Translators成员。 * 2015/04/19 发起 LFS-BOOK-7.7-systemd 项目。 * 2015/06/09 提升ictlyh和dongfengweixiao为Core Translators成员。 +* 2015/11/10 提升strugglingyouth、FSSlc、Vic020、alim0x为Core Translators成员。 活跃成员 ------------------------------- 目前 TP 活跃成员有: - CORE @wxy, -- CORE @carolinewuyan, - CORE @DeadFire, - CORE @geekpi, - CORE @GOLinux, -- CORE @reinoir, -- CORE @bazz2, -- CORE @zpl1025, - CORE @ictlyh, -- CORE @dongfengweixiao +- CORE @carolinewuyan, +- CORE @strugglingyouth, +- CORE @FSSlc +- CORE @zpl1025, +- CORE @bazz2, +- CORE @Vic020, +- CORE @dongfengweixiao, +- CORE @alim0x, +- Senior @reinoir, - Senior @tinyeyeser, - Senior @vito-L, - Senior @jasminepeng, - Senior @willqian, - Senior @vizv, -- @ZTinoZ, -- @Vic020, -- @runningwater, -- @KayGuoWhu, -- @luoxcat, -- @alim0x, -- @2q1w2007, -- @theo-l, -- @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, +- runningwater, +- ZTinoZ, +- theo-l, +- luoxcat, +- disylee, +- wi-cuckoo, +- haimingfg, +- KayGuoWhu, +- wwy-hust, +- martin2011qi, +- cvsher, +- su-kaiyao, +- flsf, +- SPccman, +- Stevearzh +- Linchenguang, +- oska874 +- Linux-pdz, +- 2q1w2007, +- felixonmars, +- wyangsun, +- MikeCoder, +- mr-ping, +- xiqingongzi +- H-mudcup, +- zhangboyue, +- goreliu, +- DongShuaike, +- TxmszLou, +- ZhouJ-sh, +- wangjiezhe, +- NearTan, +- icybreaker, +- shipsw, +- johnhoow, +- linuhap, +- boredivan, +- blueabysm, +- liaoishere, +- yechunxiao19, +- l3b2w1, +- XLCYun, +- KevinSJ, +- tenght, +- coloka, +- luoyutiantang, +- yupmoon, +- jiajia9linuxer, +- scusjs, +- tnuoccalanosrep, +- woodboow, +- 1w2b3l, +- crowner, +- mtunique, +- dingdongnigetou, +- CNprober, +- JonathanKang, +- Medusar, +- hyaocuk, +- szrlee, +- Xuanwo, +- nd0104, +- xiaoyu33, +- guodongxiaren, +- zzlyzq, +- yujianxuechuan, +- ailurus1991, +- ggaaooppeenngg, +- Ricky-Gong, +- lfzark, +- 213edu, +- Tanete, +- liuaiping, +- jerryling315, +- tomatoKiller, +- stduolc, +- shaohaolin, +- Timeszoro, +- rogetfan, +- FineFan, +- kingname, +- jasminepeng, +- JeffDing, +- CHINAANSHE, +(按提交行数排名前百) LFS 项目活跃成员有: @@ -169,7 +173,7 @@ LFS 项目活跃成员有: - @KevinSJ - @Yuking-net -(更新于2015/06/09,以Github contributors列表排名) +(更新于2015/11/29) 谢谢大家的支持! From c0d808bba46af4d388fb60e53b757220e1abd1c8 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 30 Nov 2015 00:34:19 +0800 Subject: [PATCH 0414/1710] PUB:20151123 Install Intel Graphics Installer in Ubuntu 15.10 @XLCYun --- ...ntel Graphics Installer in Ubuntu 15.10.md | 46 ++++++++++++++++++ ...ntel Graphics Installer in Ubuntu 15.10.md | 47 ------------------- 2 files changed, 46 insertions(+), 47 deletions(-) create mode 100644 published/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md delete mode 100644 translated/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md diff --git a/published/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md b/published/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md new file mode 100644 index 0000000000..bf6b5c3b11 --- /dev/null +++ b/published/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md @@ -0,0 +1,46 @@ +在 Ubuntu 15.10 上安装 Intel Graphics 安装器 +================================================================================ +![Intel graphics installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel_logo.jpg) + +Intel 最近发布了一个新版本的 Linux Graphics 安装器。在新版本中,将不支持 Ubuntu 15.04,而必须用 Ubuntu 15.10 Wily。 + +> Linux 版 Intel® Graphics 安装器可以让你很容易的为你的 Intel Graphics 硬件安装最新版的图形与视频驱动。它能保证你一直使用最新的增强与优化功能,并能够安装到 Intel Graphics Stack 中,来保证你在你的 Intel 图形硬件下,享受到最佳的用户体验。*现在 Linux 版的 Intel® Graphics 安装器支持最新版的 Ubuntu。* + +![intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel-graphics-installer.jpg) + +### 安装 ### + +**1.** 从[这个链接页面][1]中下载该安装器。当前支持 Ubuntu 15.10 的版本是1.2.1版。你可以在**系统设置 -> 详细信息**中检查你的操作系统(32位或64位)的类型。 + +![download-intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/download-intel-graphics-installer.jpg) + +**2.** 一旦下载完成,到下载目录中点击 .deb 安装包,用 Ubuntu 软件中心打开它,然最后点击“安装”按钮。 + +![install-via-software-center](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-via-software-center.jpg) + +**3.** 为了让系统信任 Intel Graphics 安装器,你需要通过下面的命令来为它添加密钥。 + +用快捷键`Ctrl+Alt+T`或者在 Unity Dash 中的“应用程序启动器”中打开终端。依次粘贴运行下面的命令。 + + wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg -O - | sudo apt-key add - + + wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-2 -O - | sudo apt-key add - + +![trust-intel](http://ubuntuhandbook.org/wp-content/uploads/2015/11/trust-intel.jpg) + +注意:在运行第一个命令的过程中,如果密钥下载完成后,光标停住不动并且一直闪烁的话,就像上面图片显示的那样,输入你的密码(输入时不会看到什么有变化)然后回车就行了。 + +最后通过 Unity Dash 或应用程序启动器打开 Intel Graphics 安装器。 + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/install-intel-graphics-installer-in-ubuntu-15-10/ + +作者:[Ji m][a] +译者:[XLCYun](https://github.com/XLCYun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuhandbook.org/index.php/about/ +[1]:https://01.org/linuxgraphics/downloads diff --git a/translated/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md b/translated/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md deleted file mode 100644 index be91927f24..0000000000 --- a/translated/tech/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md +++ /dev/null @@ -1,47 +0,0 @@ -在Ubuntu 15.10上安装Intel图形安装器 -================================================================================ -![Intel graphics installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel_logo.jpg) - -Intel最近发布了一个新版本的Linux图型安装器。在新版本中,Ubuntu 15.04将不被支持而必须用Ubuntu 15.10 Wily。 - - -> Linux版Intel®图形安装器可以让你很容易的安装最新版的图形与视频驱动。它能保证你一直使用最新的增强与优化功能,并能够安装到Intel图形堆栈中,来保证你在你的Intel图形硬件下,享受到最佳的用户体验。*现在的Linux版的Intel®图形安装器支持最新版的Ubuntu。* - -![intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/intel-graphics-installer.jpg) - -### 安装 ### - -**1.** 从[链接页面][1]中下载安装器。当前支持Ubuntu 15.10的版本是1.2.1版。你可以在**系统设置 -> 详细信息**中检查你的操作系统(32位或64位)的类型。 - -![download-intel-graphics-installer](http://ubuntuhandbook.org/wp-content/uploads/2015/11/download-intel-graphics-installer.jpg) - -**2.** 一旦下载完成,到下载目录中点击.deb安装包用Ubuntu软件中心打开它,然最后点击“安装”按钮。 - -![install-via-software-center](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-via-software-center.jpg) - -**3.** 为了让系统信任Intel图形安装器,你需要通过下面的命令来为它添加钥匙。 - -用快捷键Ctrl+Alt+T或者在Unity Dash中的“应用程序启动器”中打开终端。依次粘贴运行下面的命令。 - - wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg -O - | sudo apt-key add - - - wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-2 -O - | sudo apt-key add - - -![trust-intel](http://ubuntuhandbook.org/wp-content/uploads/2015/11/trust-intel.jpg) - -注意:在运行第一个命令的过程中,如果钥匙下载完成后光标停住不动并且一直闪烁的话,就像上面图片显示的那样,输入你的密码(输入时不会看到什么有变化)然后回车就行了。 - -最后通过Unity Dash或应用程序启动器打开Intel图形安装器。 - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/11/install-intel-graphics-installer-in-ubuntu-15-10/ - -作者:[Ji m][a] -译者:[XLCYun](https://github.com/XLCYun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://ubuntuhandbook.org/index.php/about/ -[1]:https://01.org/linuxgraphics/downloads From 9cce4556611d28b5ecd1bf778c15687f6236cb89 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 30 Nov 2015 00:46:47 +0800 Subject: [PATCH 0415/1710] PUB:20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04 @strugglingyouth --- ...IDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename {translated/tech => published}/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md (67%) diff --git a/translated/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md b/published/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md similarity index 67% rename from translated/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md rename to published/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md index 18684f6eee..6ec1bdc1ec 100644 --- a/translated/tech/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md +++ b/published/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md @@ -1,17 +1,16 @@ - 如何在 Ubuntu 15.10,14.04 中安装 NVIDIA 358.16 驱动程序 ================================================================================ ![nvidia-logo-1](http://ubuntuhandbook.org/wp-content/uploads/2015/06/nvidia-logo-1.png) -[NVIDIA 358.16][1], NVIDIA 358 系列的第一个稳定版本已经发布并在 358.09 中(测试版)做了一些修正,以及一些小的改进。 +[NVIDIA 358.16][1] —— NVIDIA 358 系列的第一个稳定版本已经发布,并对 358.09 中(测试版)做了一些修正,以及一些小的改进。 -NVIDIA 358 增加了一个新的 **nvidia-modeset.ko** 内核模块并配合 nvidia.ko 内核模块工作来显示 GPU 引擎。在以后发布版本中,**nvidia-modeset.ko** 内核驱动程序将被用于基本的模式接口,由内核直接传递管理(DRM)。 +NVIDIA 358 增加了一个新的 **nvidia-modeset.ko** 内核模块,可以配合 nvidia.ko 内核模块工作来调用 GPU 显示引擎。在以后发布版本中,**nvidia-modeset.ko** 内核驱动程序将被用于模式设置接口的基础,该接口由内核的直接渲染管理器(DRM)所提供。 -在 OpenGL 驱动中,新的驱动程序也有了新的 GLX 扩展协议,对于分配大量内存也有了一种新的系统内存分配机制。新的 GPU **GeForce 805A** 和 **GeForce GTX 960A** 也被支持了。NVIDIA 358.16 也支持 X.Org 1.18 服务器和 OpenGL 4.3。 +新的驱动程序也有新的 GLX 协议扩展,以及在 OpenGL 驱动中分配大量内存的系统内存分配新机制。新的 GPU **GeForce 805A** 和 **GeForce GTX 960A** 都支持。NVIDIA 358.16 也支持 X.Org 1.18 服务器和 OpenGL 4.3。 ### 如何在 Ubuntu 中安装 NVIDIA 358.16 : ### -> 请不要在生产设备上安装,除非你知道自己在做什么以及如何才能恢复。 +> **请不要在生产设备上安装,除非你知道自己在做什么以及如何才能恢复。** 对于官方的二进制文件,请到 [nvidia.com/object/unix.html][1] 查看。 @@ -19,7 +18,7 @@ NVIDIA 358 增加了一个新的 **nvidia-modeset.ko** 内核模块并配合 nvi **1. 添加 PPA.** -通过按 Ctrl+Alt+T 快捷键来从 Unity 桌面打开终端。当打启动应用后,粘贴下面的命令并按回车键: +通过按 `Ctrl+Alt+T` 快捷键来从 Unity 桌面打开终端。当打启动应用后,粘贴下面的命令并按回车键: sudo add-apt-repository ppa:graphics-drivers/ppa @@ -35,7 +34,7 @@ NVIDIA 358 增加了一个新的 **nvidia-modeset.ko** 内核模块并配合 nvi sudo apt-get install nvidia-358 nvidia-settings -### (可选) 卸载: ### +### (如果需要的话,) 卸载: ### 开机从 GRUB 菜单进入恢复模式,进入根控制台。然后逐一运行下面的命令: @@ -59,7 +58,7 @@ via: http://ubuntuhandbook.org/index.php/2015/11/install-nvidia-358-16-driver-ub 作者:[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 926598f2f275a7855bc104faa21860c10c7d58ad Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 30 Nov 2015 01:02:49 +0800 Subject: [PATCH 0416/1710] PUB:20151104 How to Create New File Systems or Partitions in the Terminal on Linux @strugglingyouth --- ... or Partitions in the Terminal on Linux.md | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) rename {translated/tech => published}/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md (74%) diff --git a/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md b/published/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md similarity index 74% rename from translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md rename to published/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md index 2948e8de61..cce93c0d02 100644 --- a/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md +++ b/published/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md @@ -1,4 +1,3 @@ - 如何在 Linux 终端下创建新的文件系统/分区 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-feature-image.png) @@ -13,8 +12,7 @@ ![cfdisk-lsblk](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-lsblk.png) - -一旦你运行了 `lsblk`,你应该会看到当前系统上每个磁盘的详细列表。看看这个列表,然后找出你想要使用的磁盘。在本文中,我将使用 `sdb` 来进行演示。 +当你运行了 `lsblk`,你应该会看到当前系统上每个磁盘的详细列表。看看这个列表,然后找出你想要使用的磁盘。在本文中,我将使用 `sdb` 来进行演示。 在终端输入这个命令。它会显示一个功能强大的基于终端的分区编辑程序。 @@ -26,9 +24,7 @@ 当输入此命令后,你将进入分区编辑器中,然后访问你想改变的磁盘。 -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 文件分区**。 +由于磁盘分区的不同,这取决于用户的需求,这部分的指南将在 **如何建立一个分离的 Linux home/root 分区布局**。 首先,需要创建根分区。这需要根据磁盘的字节数来进行分割。我测试的磁盘是 32 GB。 @@ -38,7 +34,7 @@ Since hard drive partitions are different, depending on a user’s needs, this p 该程序会要求你输入分区大小。一旦你指定好大小后,按 Enter 键。这将被称为根分区(或 /dev/sdb1)。 -接下来该创建用户分区(/dev/sdb2)了。你需要在 CFdisk 中再选择一些空闲分区。使用箭头选择 [ NEW ] 选项,然后按 Enter 键。输入你用户分区的大小,然后按 Enter 键来创建它。 +接下来该创建 home 分区(/dev/sdb2)了。你需要在 CFdisk 中再选择一些空闲分区。使用箭头选择 [ NEW ] 选项,然后按 Enter 键。输入你的 home 分区的大小,然后按 Enter 键来创建它。 ![cfdisk-create-home-partition](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-create-home-partition.png) @@ -48,7 +44,7 @@ Since hard drive partitions are different, depending on a user’s needs, this p ![cfdisk-specify-partition-type-swap](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-specify-partition-type-swap.png) -现在,交换分区被创建了,该指定其类型。使用上下箭头来选择它。之后,使用左右箭头选择 [ TYPE ] 。找到 Linux swap 选项,然后按 Enter 键。 +现在,创建了交换分区,该指定其类型。使用上下箭头来选择它。之后,使用左右箭头选择 [ TYPE ] 。找到 Linux swap 选项,然后按 Enter 键。 ![cfdisk-write-partition-table](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-write-partition-table.jpg) @@ -56,13 +52,13 @@ 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) -首先,找出你要使用的磁盘。在终端输入 `lsblk` 找出来。它会打印出列表,之后只要找到你想制作文件系统的分区或盘符。 +首先,找出你要使用的磁盘。在终端输入 `lsblk` 找出来。它会打印出列表,之后只要找到你想创建文件系统的分区或盘符。 -在这个例子中,我将使用 `/dev/sdb1` 的第一个分区。只对 `/dev/sdb` 使用 mkfs(将会使用整个分区)。 +在这个例子中,我将使用第二个硬盘的 `/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) @@ -70,13 +66,13 @@ Since hard drive partitions are different, depending on a user’s needs, this p sudo mkfs.ext4 /dev/sdb1 -在终端。应当指出的是,`mkfs.ext4` 可以将你指定的任何文件系统改变。 +在终端。应当指出的是,`mkfs.ext4` 可以换成任何你想要使用的的文件系统。 ### 结论 ### 虽然使用图形工具编辑文件系统和分区更容易,但终端可以说是更有效的。终端的加载速度更快,点击几个按钮即可。GParted 和其它工具一样,它也是一个完整的工具。我希望在本教程的帮助下,你会明白如何在终端中高效的编辑文件系统。 -你是否更喜欢使用基于终端的方法在 Linux 上编辑分区?为什么或为什么不?在下面告诉我们! +你是否更喜欢使用基于终端的方法在 Linux 上编辑分区?不管是不是,请在下面告诉我们。 -------------------------------------------------------------------------------- @@ -84,7 +80,7 @@ via: https://www.maketecheasier.com/create-file-systems-partitions-terminal-linu 作者:[Derrik Diener][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 6fbd1e396bfedc13e4e7e913a7bb5f721d5988c3 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 30 Nov 2015 14:41:47 +0800 Subject: [PATCH 0417/1710] Update 20151123 How To Install Microsoft Visual Studio Code on Linux.md --- ...123 How To Install Microsoft Visual Studio Code on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md b/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md index 30257ba0cd..96fba9ff33 100644 --- a/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md +++ b/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ How To Install Microsoft Visual Studio Code on Linux ================================================================================ Visual Studio code (VScode) is the cross-platform Chromium-based code editor is being open sourced today by Microsoft. How do I install Microsoft Visual Studio Code on a Debian or Ubuntu or Fedora Linux desktop? @@ -110,4 +111,4 @@ via: http://www.cyberciti.biz/faq/debian-ubuntu-fedora-linux-installing-visual-s 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [1]:https://code.visualstudio.com/Download -[2]:https://code.visualstudio.com/docs \ No newline at end of file +[2]:https://code.visualstudio.com/docs From 5bb769f88fd41422a9a40066d3a1518fe33eee65 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 30 Nov 2015 14:50:21 +0800 Subject: [PATCH 0418/1710] =?UTF-8?q?=20=E8=B6=85=E6=9C=9F=E5=9B=9E?= =?UTF-8?q?=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @icybreaker --- .../20150921 14 tips for teaching open source development.md | 1 - 1 file changed, 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 bf8212da70..a580f3b776 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,4 +1,3 @@ -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. From f8d005e49df9e769639f7c1f87e212dbc9ecb64b Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 30 Nov 2015 15:01:18 +0800 Subject: [PATCH 0419/1710] Revert "Translating by ZTinoZ" --- ...123 How To Install Microsoft Visual Studio Code on Linux.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md b/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md index 96fba9ff33..30257ba0cd 100644 --- a/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md +++ b/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md @@ -1,4 +1,3 @@ -Translating by ZTinoZ How To Install Microsoft Visual Studio Code on Linux ================================================================================ Visual Studio code (VScode) is the cross-platform Chromium-based code editor is being open sourced today by Microsoft. How do I install Microsoft Visual Studio Code on a Debian or Ubuntu or Fedora Linux desktop? @@ -111,4 +110,4 @@ via: http://www.cyberciti.biz/faq/debian-ubuntu-fedora-linux-installing-visual-s 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [1]:https://code.visualstudio.com/Download -[2]:https://code.visualstudio.com/docs +[2]:https://code.visualstudio.com/docs \ No newline at end of file From 83715cd4b4a7e27567a2e997507ca3bae3a98515 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 30 Nov 2015 15:04:14 +0800 Subject: [PATCH 0420/1710] =?UTF-8?q?=E6=92=A4=E9=94=80=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...l Microsoft Visual Studio Code on Linux.md | 113 ------------------ 1 file changed, 113 deletions(-) delete mode 100644 sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md diff --git a/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md b/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md deleted file mode 100644 index 30257ba0cd..0000000000 --- a/sources/tech/20151123 How To Install Microsoft Visual Studio Code on Linux.md +++ /dev/null @@ -1,113 +0,0 @@ -How To Install Microsoft Visual Studio Code on Linux -================================================================================ -Visual Studio code (VScode) is the cross-platform Chromium-based code editor is being open sourced today by Microsoft. How do I install Microsoft Visual Studio Code on a Debian or Ubuntu or Fedora Linux desktop? - -Visual Studio supports debugging Linux apps and code editor now open source by Microsoft. It is a preview (beta) version but you can test it and use it on your own Linux based desktop. - -### Why use Visual Studio Code? ### - -From the project website: - -> Visual Studio Code provides developers with a new choice of developer tool that combines the simplicity and streamlined experience of a code editor with the best of what developers need for their core code-edit-debug cycle. Visual Studio Code is the first code editor, and first cross-platform development tool - supporting OS X, Linux, and Windows - in the Visual Studio family. If you use Unity, ASP.NET 5, NODE.JS or related tool, give it a try. - -### Requirements for Visual Studio Code on Linux ### - -1. Ubuntu Desktop version 14.04 -1. GLIBCXX version 3.4.15 or later -1. GLIBC version 2.15 or later - -The following installation instructions are tested on: - -1. Fedora Linux 22 and 23 -1. Debian Linux 8 -1. Ubuntu Linux 14.04 LTS - -### Download Visual Studio Code ### - -Visit [this page][1] to grab the latest version and save it to ~/Downloads/ folder on Linux desktop: - -![Fig.01: Download Visual Studio Code For Linux](http://s0.cyberciti.org/uploads/faq/2015/11/download-visual-studio-code.jpg) - -Fig.01: Download Visual Studio Code For Linux - -Make a new folder (say $HOME/VSCode) and extract VSCode-linux-x64.zip inside that folder or in /usr/local/ folder. Unzip VSCode-linux64.zip to that folder. - -Make a new folder (say $HOME/VSCode) and extract VSCode-linux-x64.zip inside that folder or in /usr/local/ folder. Unzip VSCode-linux64.zip to that folder. - -### Alternate install method ### - -You can use the wget command to download VScode as follows: - - $ wget 'https://az764295.vo.msecnd.net/public/0.10.1-release/VSCode-linux64.zip' - -Sample outputs: - - --2015-11-18 13:55:23-- https://az764295.vo.msecnd.net/public/0.10.1-release/VSCode-linux64.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: 64638315 (62M) [application/octet-stream] - Saving to: 'VSCode-linux64.zip' - - 100%[======================================>] 64,638,315 84.9MB/s in 0.7s - - 2015-11-18 13:55:23 (84.9 MB/s) - 'VSCode-linux64.zip' saved [64638315/64638315] - -### Install VScode using the command line ### - -Cd to ~/Download/ location, enter: - - $ cd ~/Download/ - $ ls -l - -Sample outputs: - -![Fig.02: VSCode downloaded to my ~/Downloads/ folder](http://s0.cyberciti.org/uploads/faq/2015/11/list-vscode-linux.jpg) - -Fig.02: VSCode downloaded to my ~/Downloads/ folder - -Unzip VSCode-linux64.zip in /usr/local/ directory, enter: - - $ sudo unzip VSCode-linux64.zip -d /usr/local/ - -Cd into /usr/local/ to create the soft-link as follows using the ln command for the Code executable. This is useful to run VSCode from the terminal application: - - $ su - - # cd /usr/local/ - # ls -l - # cd bin/ - # ln -s ../VSCode-linux-x64/Code code - # exit - -Sample session: - -![Fig.03 Create the sym-link with the absolute path to the Code executable](http://s0.cyberciti.org/uploads/faq/2015/11/verify-and-ln-vscode.jpg) - -Fig.03 Create the sym-link with the absolute path to the Code executable - -### How do I use VSCode on Linux? ### - -Open the Terminal app and type the following command: - - $ /usr/local/bin/code - -Sample outputs: - -![Fig.04: VSCode in action on Linux](http://s0.cyberciti.org/uploads/faq/2015/11/vscode-welcome.jpg) - -Fig.04: VSCode in action on Linux - -And, there you have it, the VSCode installed and working correctly on the latest version of Debian, Ubuntu and Fedora Linux. I suggest that you read [getting started pages from Microsoft][2] to understand the core concepts that will make you more productive writing and navigating your code. - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/debian-ubuntu-fedora-linux-installing-visual-studio-code/ - -作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://code.visualstudio.com/Download -[2]:https://code.visualstudio.com/docs \ No newline at end of file From 20a8e3e018c683a63da685c6deef2d3dd87c5716 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 30 Nov 2015 15:12:09 +0800 Subject: [PATCH 0421/1710] Update 20151123 7 ways hackers can use Wi-Fi against you.md --- .../share/20151123 7 ways hackers can use Wi-Fi against you.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md index cd39f6a5c1..dbf63d5dce 100644 --- a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ 7 ways hackers can use Wi-Fi against you ================================================================================ ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/intro_title-100626673-orig.jpg) @@ -66,4 +67,4 @@ via: http://www.networkworld.com/article/3003170/mobile-security/7-ways-hackers- [3]:http://news.yahoo.com/blogs/upgrade-your-life/banking-online-not-hacked-182159934.html [4]:http://pocketnow.com/2014/10/15/should-you-leave-your-smartphones-wifi-on-or-turn-it-off [5]:http://www.cnet.com/news/chrome-becoming-tool-in-googles-push-for-encrypted-web/ -[6]:https://twitter.com/JoshAlthuser \ No newline at end of file +[6]:https://twitter.com/JoshAlthuser From 000d5c32bf275002d90206ba44c8b7a855530740 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 30 Nov 2015 15:13:50 +0800 Subject: [PATCH 0422/1710] Translating by ZTinoZ --- .../share/20151123 7 ways hackers can use Wi-Fi against you.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md index dbf63d5dce..1cf33a33dc 100644 --- a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -1,4 +1,4 @@ -Translating by ZTinoZ +Translating by ZTinoZ 7 ways hackers can use Wi-Fi against you ================================================================================ ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/intro_title-100626673-orig.jpg) From 136bf0a9733a5c6784908ce055852048ca8e4ce2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 30 Nov 2015 16:18:36 +0800 Subject: [PATCH 0423/1710] =?UTF-8?q?20151130-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Tape Managements Commands For Sysadmins.md | 425 ++++++++++++++++++ 1 file changed, 425 insertions(+) create mode 100644 sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md diff --git a/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md new file mode 100644 index 0000000000..ff0e0219fb --- /dev/null +++ b/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md @@ -0,0 +1,425 @@ +15 Useful Linux and Unix Tape Managements Commands For Sysadmins +================================================================================ +Tape devices should be used on a regular basis only for archiving files or for transferring data from one server to another. Usually, tape devices are all hooked up to Unix boxes, and controlled with mt or mtx. You must backup all data to both disks (may be in cloud) and tape device. In this tutorial you will learn about: + +- Tape device names +- Basic commands to manage tape drive +- Basic backup and restore commands + +### Why backup? ### + +A backup plant is important: + +- Ability to recover from disk failure +- Accidental file deletion +- File or file system corruption +- Complete server destruction, including destruction of on-site backups due to fire or other problems. + +You can use tape based archives to backup the whole server and move tapes off-site. + +### Understanding tape file marks and block size ### + +![Fig.01: Tape file marks](http://s0.cyberciti.org/uploads/cms/2015/10/tape-format.jpg) + +Fig.01: Tape file marks + +Each tape device can store multiple tape backup files. Tape backup files are created using cpio, tar, dd, and so on. However, tape device can be opened, written data to, and closed by various program. You can store several backups (tapes) on physical tape. Between each tape file is a "tape file mark". This is used to indicate where one tape file ends and another begins on physical tape. You need to use mt command to positions the tape (winds forward and rewinds and marks). + +#### How data is stored on a tape #### + +![Fig.02: How data is stored on a tape](http://s0.cyberciti.org/uploads/cms/2015/10/how-data-is-stored-on-a-tape.jpg) + +Fig.02: How data is stored on a tape + +All data is stored subsequently in sequential tape archive format using tar. The first tape archive will start on the physical beginning of the tape (tar #0). The next will be tar #1 and so on. + +### Tape device names on Unix ### + +1. /dev/rmt/0 or /dev/rmt/1 or /dev/rmt/[0-127] : Regular tape device name on Unix. The tape is rewound. +1. /dev/rmt/0n : This is know as no rewind i.e. after using tape, leaves the tape in current status for next command. +1. /dev/rmt/0b : Use magtape interface i.e. BSD behavior. More-readable by a variety of OS's such as AIX, Windows, Linux, FreeBSD, and more. +1. /dev/rmt/0l : Set density to low. +1. /dev/rmt/0m : Set density to medium. +1. /dev/rmt/0u : Set density to high. +1. /dev/rmt/0c : Set density to compressed. +1. /dev/st[0-9] : Linux specific SCSI tape device name. +1. /dev/sa[0-9] : FreeBSD specific SCSI tape device name. +1. /dev/esa0 : FreeBSD specific SCSI tape device name that eject on close (if capable). + +#### Tape device name examples #### + +- The /dev/rmt/1cn indicate that I'm using unity 1, compressed density and no rewind. +- The /dev/rmt/0hb indicate that I'm using unity 0, high density and BSD behavior. +- The auto rewind SCSI tape device name on Linux : /dev/st0 +- The non-rewind SCSI tape device name on Linux : /dev/nst0 +- The auto rewind SCSI tape device name on FreeBSD: /dev/sa0 +- The non-rewind SCSI tape device name on FreeBSD: /dev/nsa0 + +#### How do I list installed scsi tape devices? #### + +Type the following commands: + + ## Linux (read man pages for more info) ## + lsscsi + lsscsi -g + + ## IBM AIX ## + lsdev -Cc tape + lsdev -Cc adsm + lscfg -vl rmt* + + ## Solaris Unix ## + cfgadm –a + cfgadm -al + luxadm probe + iostat -En + + ## HP-UX Unix ## + ioscan Cf + ioscan -funC tape + ioscan -fnC tape + ioscan -kfC tape + + +Sample outputs from my Linux server: + +![Fig.03: Installed tape devices on Linux server](http://s0.cyberciti.org/uploads/cms/2015/10/linux-find-tape-devices-command.jpg) + +Fig.03: Installed tape devices on Linux server + +### mt command examples ### + +In Linux and Unix-like system, mt command is used to control operations of the tape drive, such as finding status or seeking through files on a tape or writing tape control marks to the tape. You must most of the following command as root user. The syntax is: + + mt -f /tape/device/name operation + +#### Setting up environment #### + +You can set TAPE shell variable. This is the pathname of the tape drive. The default (if the variable is unset, but not if it is null) is /dev/nsa0 on FreeBSD. It may be overridden with the -f option passed to the mt command as explained below. + + ## Add to your shell startup file ## + TAPE=/dev/st1 #Linux + TAPE=/dev/rmt/2 #Unix + TAPE=/dev/nsa3 #FreeBSD + export TAPE + +### 1: Display status of the tape/drive ### + + mt status #Use default + mt -f /dev/rmt/0 status #Unix + mt -f /dev/st0 status #Linux + mt -f /dev/nsa0 status #FreeBSD + mt -f /dev/rmt/1 status #Unix unity 1 i.e. tape device no. 1 + +You can use shell loop as follows to poll a system and locate all of its tape drives: + + for d in 0 1 2 3 4 5 + do + mt -f "/dev/rmt/${d}" status + done + +### 2: Rewinds the tape ### + + mt rew + mt rewind + mt -f /dev/mt/0 rewind + mt -f /dev/st0 rewind + +### 3: Eject the tape ### + + mt off + mt offline + mt eject + mt -f /dev/mt/0 off + mt -f /dev/st0 eject + +### 4: Erase the tape (rewind the tape and, if applicable, unload the tape) ### + + mt erase + mt -f /dev/st0 erase #Linux + mt -f /dev/rmt/0 erase #Unix + +### 5: Retensioning a magnetic tape cartridge ### + +If errors occur when a tape is being read, you can retension the tape, clean the tape drive, and then try again as follows: + + mt retension + mt -f /dev/rmt/1 retension #Unix + mt -f /dev/st0 retension #Linux + +### 6: Writes n EOF marks in the current position of tape ### + + mt eof + mt weof + mt -f /dev/st0 eof + +### 7: Forward space count files i.e. jumps n EOF marks ### + +The tape is positioned on the first block of the next file i.e. tape will position on first block of the field (see fig.01): + + mt fsf + mt -f /dev/rmt/0 fsf + mt -f /dev/rmt/1 fsf 1 #go 1 forward file/tape (see fig.01) + +### 8: Backward space count files i.e. rewinds n EOF marks ### + +The tape is positioned on the first block of the next file i.e. tape positions after EOF mark (see fig.01): + + mt bsf + mt -f /dev/rmt/1 bsf + mt -f /dev/rmt/1 bsf 1 #go 1 backward file/tape (see fig.01) + +Here is a list of the tape position commands: + + fsf Forward space count files. The tape is positioned on the first block of the next file. + + fsfm Forward space count files. The tape is positioned on the last block of the previous file. + + bsf Backward space count files. The tape is positioned on the last block of the previous file. + + bsfm Backward space count files. The tape is positioned on the first block of the next file. + + asf The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks. + + fsr Forward space count records. + + bsr Backward space count records. + + fss (SCSI tapes) Forward space count setmarks. + + bss (SCSI tapes) Backward space count setmarks. + +### Basic backup commands ### + +Let us see commands to backup and restore files + +### 9: To backup directory (tar format) ### + + tar cvf /dev/rmt/0n /etc + tar cvf /dev/st0 /etc + +### 10: To restore directory (tar format) ### + + tar xvf /dev/rmt/0n -C /path/to/restore + tar xvf /dev/st0 -C /tmp + +### 11: List or check tape contents (tar format) ### + + mt -f /dev/st0 rewind; dd if=/dev/st0 of=- + + ## tar format ## + tar tvf {DEVICE} {Directory-FileName} + tar tvf /dev/st0 + tar tvf /dev/st0 desktop + tar tvf /dev/rmt/0 foo > list.txt + +### 12: Backup partition with dump or ufsdump ### + + ## Unix backup c0t0d0s2 partition ## + ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s2 + + ## Linux backup /home partition ## + dump 0uf /dev/nst0 /dev/sda5 + dump 0uf /dev/nst0 /home + + ## FreeBSD backup /usr partition ## + dump -0aL -b64 -f /dev/nsa0 /usr + +### 12: Restore partition with ufsrestore or restore ### + + ## Unix ## + ufsrestore xf /dev/rmt/0 + ## Unix interactive restore ## + ufsrestore if /dev/rmt/0 + + ## Linux ## + restore rf /dev/nst0 + ## Restore interactive from the 6th backup on the tape media ## + restore isf 6 /dev/nst0 + + ## FreeBSD restore ufsdump format ## + restore -i -f /dev/nsa0 + +### 13: Start writing at the beginning of the tape (see fig.02) ### + + ## This will overwrite all data on tape ## + mt -f /dev/st1 rewind + + ### Backup home ## + tar cvf /dev/st1 /home + + ## Offline and unload tape ## + mt -f /dev/st0 offline + +To restore from the beginning of the tape: + + mt -f /dev/st0 rewind + tar xvf /dev/st0 + mt -f /dev/st0 offline + +### 14: Start writing after the last tar (see fig.02) ### + + ## This will kee all data written so far ## + mt -f /dev/st1 eom + + ### Backup home ## + tar cvf /dev/st1 /home + + ## Unload ## + mt -f /dev/st0 offline + +### 15: Start writing after tar number 2 (see fig.02) ### + + ## To wrtite after tar number 2 (should be 2+1) + mt -f /dev/st0 asf 3 + tar cvf /dev/st0 /usr + + ## asf equivalent command done using fsf ## + mt -f /dev/sf0 rewind + mt -f /dev/st0 fsf 2 + +To restore tar from tar number 2: + + mt -f /dev/st0 asf 3 + tar xvf /dev/st0 + mt -f /dev/st0 offline + +### How do I verify backup tapes created using tar? ### + +It is important that you do regular full system restorations and service testing, it's the only way to know for sure that the entire system is working correctly. See our [tutorial on verifying tar command tape backups][1] for more information. + +### Sample shell script ### + + #!/bin/bash + # A UNIX / Linux shell script to backup dirs to tape device like /dev/st0 (linux) + # This script make both full and incremental backups. + # You need at two sets of five tapes. Label each tape as Mon, Tue, Wed, Thu and Fri. + # You can run script at midnight or early morning each day using cronjons. + # The operator or sys admin can replace the tape every day after the script has done. + # Script must run as root or configure permission via sudo. + # ------------------------------------------------------------------------- + # Copyright (c) 1999 Vivek Gite + # This script is licensed under GNU GPL version 2.0 or above + # ------------------------------------------------------------------------- + # This script is part of nixCraft shell script collection (NSSC) + # Visit http://bash.cyberciti.biz/ for more information. + # ------------------------------------------------------------------------- + # Last updated on : March-2003 - Added log file support. + # Last updated on : Feb-2007 - Added support for excluding files / dirs. + # ------------------------------------------------------------------------- + LOGBASE=/root/backup/log + + # Backup dirs; do not prefix / + BACKUP_ROOT_DIR="home sales" + + # Get todays day like Mon, Tue and so on + NOW=$(date +"%a") + + # Tape devie name + TAPE="/dev/st0" + + # Exclude file + TAR_ARGS="" + EXCLUDE_CONF=/root/.backup.exclude.conf + + # Backup Log file + LOGFIILE=$LOGBASE/$NOW.backup.log + + # Path to binaries + TAR=/bin/tar + MT=/bin/mt + MKDIR=/bin/mkdir + + # ------------------------------------------------------------------------ + # Excluding files when using tar + # Create a file called $EXCLUDE_CONF using a text editor + # Add files matching patterns such as follows (regex allowed): + # home/vivek/iso + # home/vivek/*.cpp~ + # ------------------------------------------------------------------------ + [ -f $EXCLUDE_CONF ] && TAR_ARGS="-X $EXCLUDE_CONF" + + #### Custom functions ##### + # Make a full backup + full_backup(){ + local old=$(pwd) + cd / + $TAR $TAR_ARGS -cvpf $TAPE $BACKUP_ROOT_DIR + $MT -f $TAPE rewind + $MT -f $TAPE offline + cd $old + } + + # Make a partial backup + partial_backup(){ + local old=$(pwd) + cd / + $TAR $TAR_ARGS -cvpf $TAPE -N "$(date -d '1 day ago')" $BACKUP_ROOT_DIR + $MT -f $TAPE rewind + $MT -f $TAPE offline + cd $old + } + + # Make sure all dirs exits + verify_backup_dirs(){ + local s=0 + for d in $BACKUP_ROOT_DIR + do + if [ ! -d /$d ]; + then + echo "Error : /$d directory does not exits!" + s=1 + fi + done + # if not; just die + [ $s -eq 1 ] && exit 1 + } + + #### Main logic #### + + # Make sure log dir exits + [ ! -d $LOGBASE ] && $MKDIR -p $LOGBASE + + # Verify dirs + verify_backup_dirs + + # Okay let us start backup procedure + # If it is Monday make a full backup; + # For Tue to Fri make a partial backup + # Weekend no backups + case $NOW in + Mon) full_backup;; + Tue|Wed|Thu|Fri) partial_backup;; + *) ;; + esac > $LOGFIILE 2>&1 + +### A note about third party backup utilities ### + +Both Linux and Unix-like system provides many third-party utilities which you can use to schedule the creation of backups including tape backups such as: + +- Amanda +- Bacula +- rsync +- duplicity +- rsnapshot + +See also + +- Man pages - [mt(1)][2], [mtx(1)][3], [tar(1)][4], [dump(8)][5], [restore(8)][6] + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands/ + +作者: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/faq/unix-verify-tape-backup/ +[2]:http://www.manpager.com/linux/man1/mt.1.html +[3]:http://www.manpager.com/linux/man1/mtx.1.html +[4]:http://www.manpager.com/linux/man1/tar.1.html +[5]:http://www.manpager.com/linux/man8/dump.8.html +[6]:http://www.manpager.com/linux/man8/restore.8.html \ No newline at end of file From a892d62a5ff2793d82f2c9f335c6b49bfd2509cd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 30 Nov 2015 16:32:37 +0800 Subject: [PATCH 0424/1710] =?UTF-8?q?20151130-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0 eSpeak--Text To Speech Tool For Linux.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md diff --git a/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md b/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md new file mode 100644 index 0000000000..3fc07db228 --- /dev/null +++ b/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md @@ -0,0 +1,64 @@ +eSpeak: Text To Speech Tool For Linux +================================================================================ +![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) + +[eSpeak][1] is a command line tool for Linux that converts text to speech. This is a compact speech synthesizer that provides support to English and many other languages. It is written in C. + +eSpeak reads the text from the standard input or the input file. The voice generated, however, is nowhere close to a human voice. But it is still a compact and handy tool if you want to use it in your projects. + +Some of the main features of eSpeak are: + +- A command line tool for Linux and Windows +- Speaks text from a file or from stdin +- Shared library version for use by other programs +- SAPI5 version for Windows, so it can be used with screen-readers and other programs that support the Windows SAPI5 interface. +- Ported to other platforms, including Android, Mac OSX etc. +- Several voice characteristics to choose from +- speech output can be saved as [.WAV file][2] +- SSML ([Speech Synthesis Markup Language][3]) is supported partially along with HTML +- Tiny in size, the complete program with language support etc is under 2 MB. +- Can translate text into phoneme codes, so it could be adapted as a front end for another speech synthesis engine. +- Development tools available for producing and tuning phoneme data. + +### Install eSpeak ### + +To install eSpeak in Ubuntu based system, use the command below in a terminal: + + sudo apt-get install espeak + +eSpeak is an old tool and I presume that it should be available in the repositories of other Linux distributions such as Arch Linux, Fedora etc. You can install eSpeak easily using dnf, pacman etc. + +To use eSpeak, just use it like: espeak and press enter to hear it aloud. Use Ctrl+C to close the running program. + +![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) + +There are several other options available. You can browse through them through the help section of the program. + +### GUI version: Gespeaker ### + +If you prefer the GUI version over the command line, you can install Gespeaker that provides a GTK front end to eSpeak. + +Use the command below to install Gespeaker: + + sudo apt-get install gespeaker + +The interface is straightforward and easy to use. You can explore it all by yourself. + +![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) + +While such tools might not be useful for general computing need, it could be handy if you are working on some projects where text to speech conversion is required. I let you decide the usage of this speech synthesizer. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/espeak-text-speech-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://espeak.sourceforge.net/ +[2]:http://en.wikipedia.org/wiki/WAV +[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language \ No newline at end of file From ea8a573ce1372bbb5ea343a2220221063f40344a Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 30 Nov 2015 22:39:07 +0800 Subject: [PATCH 0425/1710] [Translated]20151123 How to access Dropbox from the command line in Linux.md --- ... Dropbox from the command line in Linux.md | 99 ------------------- ... Dropbox from the command line in Linux.md | 97 ++++++++++++++++++ 2 files changed, 97 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20151123 How to access Dropbox from the command line in Linux.md create mode 100644 translated/tech/20151123 How to access Dropbox from the command line in Linux.md diff --git a/sources/tech/20151123 How to access Dropbox from the command line in Linux.md b/sources/tech/20151123 How to access Dropbox from the command line in Linux.md deleted file mode 100644 index 927a046615..0000000000 --- a/sources/tech/20151123 How to access Dropbox from the command line in Linux.md +++ /dev/null @@ -1,99 +0,0 @@ -FSSlc translating - -How to access Dropbox from the command line in Linux -================================================================================ -Cloud storage is everywhere in today's multi-device environment, where people want to access content across multiple devices wherever they go. Dropbox is the most widely used cloud storage service thanks to its elegant UI and flawless multi-platform compatibility. The popularity of Dropbox has led to a flurry of official or unofficial Dropbox clients that are available across different operating system platforms. - -Linux has its own share of Dropbox clients: CLI clients as well as GUI-based clients. [Dropbox Uploader][1] is an easy-to-use Dropbox CLI client written in BASH scripting language. In this tutorial, I describe** how to access Dropbox from the command line in Linux by using Dropbox Uploader**. - -### Install and Configure Dropbox Uploader on Linux ### - -To use Dropbox Uploader, download the script and make it executable. - - $ wget https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh - $ chmod +x dropbox_uploader.sh - -Make sure that you have installed curl on your system, since Dropbox Uploader runs Dropbox APIs via curl. - -To configure Dropbox Uploader, simply run dropbox_uploader.sh. When you run the script for the first time, it will ask you to grant the script access to your Dropbox account. - - $ ./dropbox_uploader.sh - -![](https://c2.staticflickr.com/6/5739/22860931599_10c08ff15f_c.jpg) - -As instructed above, go to [https://www.dropbox.com/developers/apps][2] on your web browser, and create a new Dropbox app. Fill in the information of the new app as shown below, and enter the app name as generated by Dropbox Uploader. - -![](https://c2.staticflickr.com/6/5745/22932921350_4123d2dbee_c.jpg) - -After you have created a new app, you will see app key/secret on the next page. Make a note of them. - -![](https://c1.staticflickr.com/1/736/22932962610_7db51aa718_c.jpg) - -Enter the app key and secret in the terminal window where dropbox_uploader.sh is running. dropbox_uploader.sh will then generate an oAUTH URL (e.g., https://www.dropbox.com/1/oauth/authorize?oauth_token=XXXXXXXXXXXX). - -![](https://c1.staticflickr.com/1/563/22601635533_423738baed_c.jpg) - -Go to the oAUTH URL generated above on your web browser, and allow access to your Dropbox account. - -![](https://c1.staticflickr.com/1/675/23202598606_6110c1a31b_c.jpg) - -This completes Dropbox Uploader configuration. To check whether Dropbox Uploader is successfully authenticated, run the following command. - - $ ./dropbox_uploader.sh info - ----------- - - Dropbox Uploader v0.12 - - > Getting info... - - Name: Dan Nanni - UID: XXXXXXXXXX - Email: my@email_address - Quota: 2048 Mb - Used: 13 Mb - Free: 2034 Mb - -### Dropbox Uploader Examples ### - -To list all contents in the top-level directory: - - $ ./dropbox_uploader.sh list - -To list all contents in a specific folder: - - $ ./dropbox_uploader.sh list Documents/manuals - -To upload a local file to a remote Dropbox folder: - - $ ./dropbox_uploader.sh upload snort.pdf Documents/manuals - -To download a remote file from Dropbox to a local file: - - $ ./dropbox_uploader.sh download Documents/manuals/mysql.pdf ./mysql.pdf - -To download an entire remote folder from Dropbox to a local folder: - - $ ./dropbox_uploader.sh download Documents/manuals ./manuals - -To create a new remote folder on Dropbox: - - $ ./dropbox_uploader.sh mkdir Documents/whitepapers - -To delete an entire remote folder (including all its contents) on Dropbox: - - $ ./dropbox_uploader.sh delete Documents/manuals - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/access-dropbox-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]:http://www.andreafabrizi.it/?dropbox_uploader -[2]:https://www.dropbox.com/developers/apps diff --git a/translated/tech/20151123 How to access Dropbox from the command line in Linux.md b/translated/tech/20151123 How to access Dropbox from the command line in Linux.md new file mode 100644 index 0000000000..6c5f73e596 --- /dev/null +++ b/translated/tech/20151123 How to access Dropbox from the command line in Linux.md @@ -0,0 +1,97 @@ +Linux 中如何从命令行访问 Dropbox +================================================================================ +在当今这个多设备的环境下,云存储无处不在。无论身处何方,人们都想通过多种设备来从云存储中获取所需的内容。由于优雅的 UI 和完美的跨平台兼容性,Dropbox 已成为最为广泛使用的云存储服务。 Dropbox 的流行已引发了一系列官方或非官方 Dropbox 客户端的出现,它们支持不同的操作系统平台。 + +当然 Linux 平台下也有着自己的 Dropbox 客户端: 既有命令行的,也有图形界面。[Dropbox Uploader][1] 是一个简单易用的 Dropbox 命令行客户端,它是用 BASH 脚本语言所编写的。在这篇教程中,我将描述 **在 Linux 中如何使用 Dropbox Uploader 通过命令行来访问 Dropbox**。 + +### Linux 中安装和配置 Dropbox Uploader ### + +要使用 Dropbox Uploader,你需要下载该脚本并使其可被执行。 + + $ wget https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh + $ chmod +x dropbox_uploader.sh + +请确保你已经在系统中安装了 `curl`,因为 Dropbox Uploader 通过 curl 来运行 Dropbox 的 API。 + +要配置 Dropbox Uploader,只需运行 dropbox_uploader.sh 即可。当你第一次运行这个脚本时,它将询问你,以使得它可以访问你的 Dropbox 账户。 + + $ ./dropbox_uploader.sh + +![](https://c2.staticflickr.com/6/5739/22860931599_10c08ff15f_c.jpg) + +如上图所指示的那样,你需要通过浏览器访问 [https://www.dropbox.com/developers/apps][2] 页面,并创建一个新的 Dropbox app。接着像下图那样填入新 app 的相关信息,并输入 app 的名称,它与 Dropbox Uploader 所生成的 app 名称类似。 + +![](https://c2.staticflickr.com/6/5745/22932921350_4123d2dbee_c.jpg) + +在你创建好一个新的 app 之后,你将在下一个页面看到 app key 和 app secret。请记住它们。 + +![](https://c1.staticflickr.com/1/736/22932962610_7db51aa718_c.jpg) + +然后在正运行着 dropbox_uploader.sh 的终端窗口中输入 app key 和 app secret。然后 dropbox_uploader.sh 将产生一个 oAUTH 网址(例如,https://www.dropbox.com/1/oauth/authorize?oauth_token=XXXXXXXXXXXX)。 + +![](https://c1.staticflickr.com/1/563/22601635533_423738baed_c.jpg) + +接着通过浏览器访问那个 oAUTH 网址,并同意访问你的 Dropbox 账户。 + +![](https://c1.staticflickr.com/1/675/23202598606_6110c1a31b_c.jpg) + +这便完成了 Dropbox Uploader 的配置。若要确认 Dropbox Uploader 是否真的被成功地认证了,可以运行下面的命令。 + + $ ./dropbox_uploader.sh info + +---------- + + Dropbox Uploader v0.12 + + > Getting info... + + Name: Dan Nanni + UID: XXXXXXXXXX + Email: my@email_address + Quota: 2048 Mb + Used: 13 Mb + Free: 2034 Mb + +### Dropbox Uploader 示例 ### + +要显示根目录中的所有内容,运行: + + $ ./dropbox_uploader.sh list + +要列出某个特定文件夹中的所有内容,运行: + + $ ./dropbox_uploader.sh list Documents/manuals + +要上传一个本地文件到一个远程的 Dropbox 文件夹,使用: + + $ ./dropbox_uploader.sh upload snort.pdf Documents/manuals + +要从 Dropbox 下载一个远程的文件到本地,使用: + + $ ./dropbox_uploader.sh download Documents/manuals/mysql.pdf ./mysql.pdf + +要从 Dropbox 下载一个完整的远程文件夹到一个本地的文件夹,运行: + + $ ./dropbox_uploader.sh download Documents/manuals ./manuals + +要在 Dropbox 上创建一个新的远程文件夹,使用: + + $ ./dropbox_uploader.sh mkdir Documents/whitepapers + +要完全删除 Dropbox 中某个远程的文件夹(包括它所含的所有内容),运行: + + $ ./dropbox_uploader.sh delete Documents/manuals + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/access-dropbox-command-line-linux.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://www.andreafabrizi.it/?dropbox_uploader +[2]:https://www.dropbox.com/developers/apps From 025d3d1d52d85a312e118d276c4a3852c03724bb Mon Sep 17 00:00:00 2001 From: runningwater Date: Tue, 1 Dec 2015 10:43:08 +0800 Subject: [PATCH 0426/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...es 1--HowTo--Use grep Command In Linux or UNIX--Examples.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md index b18b40e04c..1db160d73f 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) HowTo: Use grep Command In Linux / UNIX – Examples ================================================================================ How do I use grep command on Linux, Apple OS X, and Unix-like operating systems? Can you give me a simple examples of the grep command? @@ -142,7 +143,7 @@ Grep command in action via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/ 作者:Vivek Gite -译者:[译者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 c4b3f21b2d9772665e71b156f9bba73708249fc4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 1 Dec 2015 11:58:23 +0800 Subject: [PATCH 0427/1710] Delete 20151030 80 Linux Monitoring Tools for SysAdmins.md --- ...80 Linux Monitoring Tools for SysAdmins.md | 605 ------------------ 1 file changed, 605 deletions(-) delete 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 deleted file mode 100644 index f9384d4635..0000000000 --- a/sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md +++ /dev/null @@ -1,605 +0,0 @@ - -translation by strugglingyouth -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/ From 7e54d84a9c03eff22c306c362dee2c2b7e7b1593 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 1 Dec 2015 11:59:36 +0800 Subject: [PATCH 0428/1710] Create 20151030 80 Linux Monitoring Tools for SysAdmins.md --- ...80 Linux Monitoring Tools for SysAdmins.md | 604 ++++++++++++++++++ 1 file changed, 604 insertions(+) create mode 100644 translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md diff --git a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md b/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md new file mode 100644 index 0000000000..7c16ca9fc8 --- /dev/null +++ b/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md @@ -0,0 +1,604 @@ + +为 Linux 系统管理员准备的80个监控工具 +================================================================================ +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-monitoring.jpg) + +随着行业的不断发展,有许多比你想象中更棒的工具。这里列着网上最全的(工具)。拥有超过80种方式来管理你的机器。在本文中,我们主要讲述以下方面: + +- 命令行工具 +- 与网络相关的 +- 系统相关的监控工具 +- 日志监控工具 +- 基础设施监控工具 + +监控和调试性能问题非常困难,但用对了正确的工具有时也是很容易的。下面是一些你可能听说过的工具,当你使用它们时可能存在一些问题: + +### 十大系统监控工具 ### + +#### 1. Top #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/top.jpg) + +这是一个被预安装在许多 UNIX 系统中的小工具。当你想要查看在系统中运行的进程或线程时:top 是一个很好的工具。你可以对这些进程以不同的标准进行排序,默认是以 CPU 进行排序的。 + +#### 2. [htop][1] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/htop.jpg) + +HTOP 实质上是 top 的增强版本。它更容易对进程排序。它在视觉上更容易理解并且已经内建了许多通用的命令。它也是完全交互的。 + +#### 3. [atop][2] #### + +Atop 和 top,htop 非常相似,它也能监控所有进程,但不同于 top 和 htop 的是,它会记录进程的日志供以后分析。它也能显示所有进程的资源消耗。它还会高亮显示已经达到临界负载的资源。 + +#### 4. [apachetop][3] #### + +Apachetop 会监视 apache 网络服务器的整体性能。它主要是基于 mytop。它会显示当前 reads, writes 的数量以及 requests 进程的总数。 + +#### 5. [ftptop][4] #### + +ftptop 给你提供了当前所有连接到 ftp 服务器的基本信息,如会话总数,正在上传和下载的客户端数量以及客户端信息。 + +#### 6. [mytop][5] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mytop.jpg) + +mytop 是一个很方便的工具,用于监控线程和 mysql 的性能。它给了你一个实时的数据库查询处理结果。 + +#### 7. [powertop][6] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/powertop.jpg) + +powertop 可以帮助你诊断与电量消耗和电源管理相关的问题。它也可以帮你进行电源管理设置,以实现对你服务器最有效的配置。你可以使用 tab 键进行选项切换。 + +#### 8. [iotop][7] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iotop.jpg) + +iotop 用于检查 I/O 的使用情况,并为你提供了一个类似 top 的界面来显示。它每列显示读和写的速率,每行代表一个进程。当出现等待 I/O 交换时,它也显示进程消耗时间的百分比。 + +### 与网络相关的监控 ### + +#### 9. [ntopng][8] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ntopng.jpg) + +ntopng 是 ntop 的升级版,它提供了一个能使用浏览器进行网络监控的图形用户界面。它还有其他用途,如:定位主机,显示网络流量和 ip 流量分布并能进行分析。 + +#### 10. [iftop][9] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iftop.jpg) + +iftop 类似于 top,但它主要不是检查 cpu 的使用率而是监听网卡的流量,并以表格的形式显示当前的使用量。像“为什么我的网速这么慢呢?!”这样的问题它可以直接回答。 + +#### 11. [jnettop][10] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/jnettop.jpg) + +jnettop 以相同的方式来监测网络流量但比 iftop 更形象。它还支持自定义的文本输出并能以友好的交互方式来快速分析日志。 + +#### 12. [bandwidthd][11] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bandwidthd.jpg) + +bandwidthd 可以跟踪 TCP/IP 网络子网的使用情况并能在浏览器中通过 png 图片形象化的构建一个 HTML 页面。它有一个数据库驱动系统,支持搜索,过滤,多传感器和自定义报表。 + +#### 13. [EtherApe][12] #### + +EtherApe 以图形化显示网络流量,可以支持更多的节点。它可以捕获实时流量信息,也可以从 tcpdump 进行读取。也可以使用具有 pcap 语法的网络过滤显示特定信息。 + +#### 14. [ethtool][13] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ethtool.jpg) + +ethtool 用于显示和修改网络接口控制器的一些参数。它也可以用来诊断以太网设备,并获得更多的统计数据。 + +#### 15. [NetHogs][14] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nethogs.jpg) + +NetHogs 打破了网络流量按协议或子网进行统计的原理。它以进程组来计算。所以,当网络流量猛增时,你可以使用 NetHogs 查看是由哪个进程造成的。 + +#### 16. [iptraf][15] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iptraf.jpg) + +iptraf 收集的各种指标,如 TCP 连接数据包和字节数,接口界面和活动指标,TCP/UDP 通信故障,站内数据包和字节数。 + +#### 17. [ngrep][16] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ngrep.jpg) + +ngrep 就是 grep 但是相对于网络层的。pcap 意识到后允许其指定扩展规则或十六进制表达式来匹配数据包。 + +#### 18. [MRTG][17] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mrtg.jpg) + +MRTG 最初被开发来监控路由器的流量,但现在它也能够监控网络相关的东西。它每五分钟收集一次,然后产生一个 HTML 页面。它还具有发送邮件报警的能力。 + +#### 19. [bmon][18] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bmon.jpg) + +Bmon 能监控并帮助你调试网络。它能捕获网络相关的统计数据,并以友好的方式进行展示。你还可以与 bmon 通过脚本进行交互。 + +#### 20. traceroute #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/traceroute.jpg) + +Traceroute 一个内置工具,能测试路由和数据包在网络中的延迟。 + +#### 21. [IPTState][19] #### + +IPTState 可以让你跨越 iptables 来监控流量,并通过你指定的条件来进行排序。该工具还允许你从表中删除状态信息。 + +#### 22. [darkstat][20] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/darkstat.jpg) + +Darkstat 能捕获网络流量并计算统计的数据。该报告需要在浏览器中进行查看,它为你提供了一个非常棒的图形用户界面。 + +#### 23. [vnStat][21] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/vnstat.jpg) + +vnStat 是一个网络流量监控工具,它的数据统计是由内核进行提供的,其消耗的系统资源非常少。系统重新启动后,它收集的数据仍然存在。它具有颜色选项供系统管理员使用。 + +#### 24. netstat #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/netstat.jpg) + +netstat 是一个内置的工具,它能显示 TCP 网络连接,路由表和网络接口数量,被用来在网络中查找问题。 + +#### 25. ss #### + +并非 netstat,最好使用 ss。ss 命令能够显示的信息比 netstat 更多,也更快。如果你想查看统计结果的总信息,你可以使用命令 `ss -s`。 + +#### 26. [nmap][22] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nmap.jpg) + +Nmap 可以扫描你服务器开放的端口并且可以检测正在使用哪个操作系统。但你也可以使用 SQL 注入漏洞,网络发现和渗透测试相关的其他手段。 + +#### 27. [MTR][23] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mtr.jpg) + +MTR 结合了 traceroute 和 ping 的功能到一个网络诊断工具上。当使用该工具时,它会限制单个数据包的跳数,同时也监视它们的到期时间。然后每秒进行重复。 + +#### 28. [Tcpdump][24] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/tcpdump.jpg) + +Tcpdump 将输出一个你在命令中匹配并捕获到的数据包的信息。你还可以将此数据保存并进一步分析。 + +#### 29. [Justniffer][25] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/justniffer.jpg) + +Justniffer 是 tcp 数据包嗅探器。使用此嗅探器你可以选择收集低级别的数据还是高级别的数据。它也可以让你以自定义方式生成日志。比如模仿 Apache 的访问日志。 + +### 与系统有关的监控 ### + +#### 30. [nmon][26] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nmon.jpg) + +nmon 将数据输出到屏幕上的,或将其保存在一个以逗号分隔的文件中。你可以查看 CPU,内存,网络,文件系统,top 进程。数据也可以被添加到 RRD 数据库中用于进一步分析。 + +#### 31. [conky][27] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/cpulimit.jpg) + +Conky 能监视不同操作系统并统计数据。它支持 IMAP 和 POP3, 甚至许多流行的音乐播放器!出于方便不同的人,你可以使用自己的 Lua 脚本或程序来进行扩展。 + +#### 32. [Glances][28] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/glances.jpg) + +使用 Glances 监控你的系统,其旨在使用最小的空间为你呈现最多的信息。它可以在客户端/服务器端模式下运行,也有远程监控的能力。它也有一个 Web 界面。 + +#### 33. [saidar][29] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/saidar.jpg) + +Saidar 是一个非常小的工具,为你提供有关系统资源的基础信息。它将系统资源在全屏进行显示。重点是 saidar 会尽可能的简化。 + +#### 34. [RRDtool][30] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/rrdtool.jpg) + +RRDtool 是用来处理 RRD 数据库的工具。RRDtool 旨在处理时间序列数据,如 CPU 负载,温度等。该工具提供了一种方法来提取 RRD 数据并以图形界面显示。 + +#### 35. [monit][31] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/monit.jpg) + +如果出现故障时,monit 有发送警报以及重新启动服务的功能。它可以对任何类型进行检查,你可以为 monit 写一个脚本,它有一个 Web 用户界面来分担你眼睛的压力。 + +#### 36. [Linux process explorer][32] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-process-monitor.jpg) + +Linux process explorer 是类似 OSX 或 Windows 的在线监视器。它比 top 或 ps 的使用范围更广。你可以查看每个进程的内存消耗以及 CPU 的使用情况。 + +#### 37. df #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/df.jpg) + +df 是 disk free 的缩写,它是所有 UNIX 系统预装的程序,用来显示用户有访问权限的文件系统的可用磁盘空间。 + +#### 38. [discus][33] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/discus.jpg) + +Discus 类似于 df,它的目的是通过使用更吸引人的特性,如颜色,图形和数字来对 df 进行改进。 + +#### 39. [xosview][34] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/xosview.jpg) + +xosview 是一款经典的系统监控工具,它给你提供包括 IRQ 的各个不同部分的总览。 + +#### 40. [Dstat][35] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/dstat.jpg) + +Dstat 旨在替代 vmstat,iostat,netstat 和 ifstat。它可以让你查实时查看所有的系统资源。这些数据可以导出为 CSV。最重要的是 dstat 允许使用插件,因此其可以扩展到更多领域。 + +#### 41. [Net-SNMP][36] #### + +SNMP 是“简单网络管理协议”,Net-SNMP 工具套件使用该协议可帮助你收集服务器的准确信息。 + +#### 42. [incron][37] #### + +Incron 允许你监控一个目录树,然后对这些变化采取措施。如果你想将目录‘a’中的新文件复制到目录‘b’,这正是 incron 能做的。 + +#### 43. [monitorix][38] #### + +Monitorix 是轻量级的系统监控工具。它可以帮助你监控一台机器,并为你提供丰富的指标。它也有一个内置的 HTTP 服务器,来查看图表和所有指标的报告。 + +#### 44. vmstat #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/vmstat.jpg) + +vmstat(virtual memory statistics)是一个小的内置工具,能监控和显示机器的内存。 + +#### 45. uptime #### + +这个小程序能快速显示你机器运行了多久,目前有多少用户登录和系统过去1分钟,5分钟和15分钟的平均负载。 + +#### 46. mpstat #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mpstat.jpg) + +mpstat 是一个内置的工具,能监视 cpu 的使用情况。最常见的使用方法是 `mpstat -P ALL`,它给你提供 cpu 的使用情况。你也可以间隔更新 cpu 的使用情况。 + +#### 47. pmap #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/pmap.jpg) + +pmap 是一个内置的工具,报告一个进程的内存映射。你可以使用这个命令来找出内存瓶颈的原因。 + +#### 48. ps #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ps.jpg) + +该命令将给你当前所有进程的概述。你可以使用 `ps -A` 命令查看所有进程。 + +#### 49. [sar][39] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/sar.jpg) + +sar 是 sysstat 包的一部分,可以帮助你收集,报告和保存不同系统的指标。使用不同的参数,它会给你提供 CPU, 内存 和 I/O 使用情况及其他东西。 + +#### 50. [collectl][40] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/collectl.jpg) + +类似于 sar,collectl 收集你机器的性能指标。默认情况下,显示 cpu,网络和磁盘统计数据,但它实际收集了很多信息。与 sar 不同的是,collectl 能够处理比秒更小的单位,它可以被直接送入绘图工具并且 collectl 的监控过程更广泛。 + +#### 51. [iostat][41] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iostat.jpg) + +iostat 也是 sysstat 包的一部分。此命令用于监控系统的输入/输出。其报告可以用来进行系统调优,以更好地调节你机器上硬盘的输入/输出负载。 + +#### 52. free #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/free.jpg) + +这是一个内置的命令用于显示你机器上可用的内存大小以及已使用的内存大小。它还可以显示某时刻内核所使用的缓冲区大小。 + +#### 53. /Proc 文件系统 #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/procfile.jpg) + +proc 文件系统可以让你查看内核的统计信息。从这些统计数据可以得到你机器上不同硬件设备的详细信息。看看这个 [ proc文件统计的完整列表 ][42]。 + +#### 54. [GKrellM][43] #### + +GKrellm 是一个图形应用程序来监控你硬件的状态信息,像CPU,内存,硬盘,网络接口以及其他的。它也可以监视并启动你所选择的邮件阅读器。 + +#### 55. [Gnome 系统监控器][44] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/gnome-system-monitor.jpg) + +Gnome 系统监控器是一个基本的系统监控工具,其能通过一个树状结构来查看进程的依赖关系,能杀死及调整进程优先级,还能以图表形式显示所有服务器的指标。 + +### 日志监控工具 ### + +#### 56. [GoAccess][45] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/goaccess.jpg) + +GoAccess 是一个实时的网络日志分析器,它能分析 apache, nginx 和 amazon cloudfront 的访问日志。它也可以将数据输出成 HTML,JSON 或 CSV 格式。它会给你一个基本的统计信息,访问量,404页面,访客位置和其他东西。 + +#### 57. [Logwatch][46] #### + +Logwatch 是一个日志分析系统。它通过分析系统的日志,并为你所指定的区域创建一个分析报告。它每天给你一个报告可以让你花费更少的时间来分析日志。 + +#### 58. [Swatch][47] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/swatch.jpg) + +像 Logwatch 一样,Swatch 也监控你的日志,但不是给你一个报告,它会匹配你定义的正则表达式,当匹配到后会通过邮件或控制台通知你。它可用于检测入侵者。 + +#### 59. [MultiTail][48] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/multitail.jpg) + +MultiTail 可帮助你在多窗口下监控日志文件。你可以将这些日志文件合并成一个。它也像正则表达式一样使用不同的颜色来显示日志文件以方便你阅读。 + +#### 系统工具 #### + +#### 60. [acct or psacct][49] #### + +acct 也称 psacct(取决于如果你使用 apt-get 还是 yum)可以监控所有用户执行的命令,包括 CPU 和内存在系统内所使用的时间。一旦安装完成后你可以使用命令 ‘sa’ 来查看。 + +#### 61. [whowatch][50] #### + +类似 acct,这个工具监控系统上所有的用户,并允许你实时查看他们正在执行的命令及运行的进程。它将所有进程以树状结构输出,这样你就可以清楚地看到到底发生了什么。 + +#### 62. [strace][51] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/strace.jpg) + +strace 被用于诊断,调试和监控程序之间的相互调用过程。最常见的做法是用 strace 打印系统调用的程序列表,其可以看出程序是否像预期那样被执行了。 + +#### 63. [DTrace][52] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/dtrace.jpg) + +DTrace 可以说是 strace 的大哥。它动态地跟踪与检测代码实时运行的指令。它允许你深入分析其性能和诊断故障。但是,它并不简单,大约有1200本书中提到过它。 + +#### 64. [webmin][53] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/webmin.jpg) + +Webmin 是一个基于 Web 的系统管理工具。它不需要手动编辑 UNIX 配置文件,并允许你远程管理系统。它有一对监控模块用于连接它。 + +#### 65. stat #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/stat.jpg) + +Stat 是一个内置的工具,用于显示文件和文件系统的状态信息。它会显示文件被修改,访问或更改的信息。 + +#### 66. ifconfig #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ifconfig.jpg) + +ifconfig 是一个内置的工具用于配置网络接口。大多数网络监控工具背后都使用 ifconfig 将其设置成混乱模式来捕获所有的数据包。你可以手动执行 `ifconfig eth0 promisc` 并使用 `ifconfig eth0 -promisc` 返回正常模式。 + +#### 67. [ulimit][54] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/unlimit.jpg) + +ulimit 是一个内置的工具,可监控系统资源,并可以限制任何监控资源不得超标。比如做一个 fork 炸弹,如果使用 ulimit 正确配置了将完全不受影响。 + +#### 68. [cpulimit][55] #### + +CPULimit 是一个小工具用于监控并限制进程对 CPU 的使用率。其特别有用,能限制批处理作业对 CPU 的使用率保持在一定范围。 + +#### 69. lshw #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/lshw.jpg) + +lshw 是一个小的内置工具能提取关于本机硬件配置的详细信息。它可以输出 CPU 版本和主板配置。 + +#### 70. w #### + +w 是一个内置命令用于显示当前登录用户的信息及他们所运行的进程。 + +#### 71. lsof #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/lsof.jpg) + +lsof 是一个内置的工具可让你列出所有打开的文件和网络连接。从那里你可以看到文件是由哪个进程打开的,基于进程名,可通过一个特定的用户来杀死属于某个用户的所有进程。 + +### 基础架构监控工具 ### + +#### 72. Server Density #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/server-density-monitoring.png) + +我们的 [服务器监控工具][56]!它有一个 web 界面,使你可以进行报警设置并可以通过图表来查看所有系统的网络指标。你还可以设置监控的网站,无论是否在线。Server Density 允许你设置用户的权限,你可以根据我们的插件或 api 来扩展你的监控。该服务已经支持 Nagios 的插件了。 + +#### 73. [OpenNMS][57] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/opennms.jpg) + +OpenNMS 主要有四个功能区:事件管理和通知;发现和配置;服务监控和数据收集。其设计可被在多种网络环境中定制。 + +#### 74. [SysUsage][58] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/sysusage.jpg) + +SysUsage 通过 Sar 和其他系统命令持续监控你的系统。一旦达到阈值它也可以进行报警通知。SysUsage 本身也可以收集所有的统计信息并存储在一个地方。它有一个 Web 界面可以让你查看所有的统计数据。 + +#### 75. [brainypdm][59] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/brainypdm.jpg) + +brainypdm 是一个数据管理和监控工具,它能收集来自 nagios 或其它公共资源的数据并以图表显示。它是跨平台的,其基于 Web 并可自定义图形。 + +#### 76. [PCP][60] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/pcp.jpg) + +PCP 可以收集来自多个主机的指标,并且效率很高。它也有一个插件框架,所以你可以把它收集的对你很重要的指标使用插件来管理。你可以通过任何一个 Web 界面或 GUI 访问图形数据。它比较适合大型监控系统。 + +#### 77. [KDE 系统保护][61] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/kdesystemguard.jpg) + +这个工具既是一个系统监控器也是一个任务管理器。你可以通过工作表来查看多台机器的服务指标,如果一个进程需要被杀死或者你需要启动一个进程,它可以在 KDE 系统保护中来完成。 + +#### 78. [Munin][62] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/munin.jpg) + +Munin 既是一个网络也是系统监控工具,当一个指标超出给定的阈值时它会提供报警机制。它运用 RRDtool 创建图表,并且它也有 Web 界面来显示这些图表。它更强调的是即插即用的功能并且有许多可用的插件。 + +#### 79. [Nagios][63] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nagios.jpg) + +Nagios 是系统和网络监控工具,可帮助你监控多台服务器。当发生错误时它也有报警功能。它的平台也有很多的插件。 + +#### 80. [Zenoss][64] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/zenoss.jpg) + +Zenoss 提供了一个 Web 界面,使你可以监控所有的系统和网络指标。此外,它能自动发现网络资源和修改网络配置。并且会提醒你采取行动,它也支持 Nagios 的插件。 + +#### 81. [Cacti][65] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/cacti.jpg) + +(和上一个一样!) Cacti 是一个网络图形解决方案,其使用 RRDtool 进行数据存储。它允许用户在预定的时间间隔进行投票服务并将结果以图形显示。Cacti 可以通过 shell 脚本扩展来监控你所选择的来源。 + +#### 82. [Zabbix][66] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/zabbix-monitoring.png) + +Zabbix 是一个开源的基础设施监控解决方案。它使用了许多数据库来存放监控统计信息。其核心是用 C 语言编写,并在前端中使用 PHP。如果你不喜欢安装代理,Zabbix 可能是一个最好选择。 + +### 附加部分: ### + +感谢您的建议。这是我们的一个附加部分,由于我们需要重新编排所有的标题,鉴于此,这是在最后的一个简短部分,根据您的建议添加的一些 Linux 监控工具: + +#### 83. [collectd][67] #### + +Collectd 是一个 Unix 守护进程来收集所有的监控数据。它采用了模块化设计并使用插件来填补一些缺陷。这样能使 collectd 保持轻量级并可进行定制。 + +#### 84. [Observium][68] #### + +Observium 是一个自动发现网络的监控平台,支持普通的硬件平台和操作系统。Observium 专注于提供一个优美,功能强大,简单直观的界面来显示网络的健康和状态。 + +#### 85. Nload #### + +这是一个命令行工具来监控网络的吞吐量。它很整洁,因为它使用两个图表和其他一些有用的数据类似传输的数据总量来对进出站流量进行可视化。你可以使用如下方法安装它: + + yum install nload + +或者 + + sudo apt-get install nload + +#### 86. [SmokePing][69] #### + +SmokePing 可以跟踪你网络延迟,并对他们进行可视化。SmokePing 有一个流行的延迟测量插件。如果图形用户界面对你来说非常重要,现在有一个正在开发中的插件来实现此功能。 + +#### 87. [MobaXterm][70] #### + +如果你整天在 windows 环境下工作。你可能会觉得 Windows 下受终端窗口的限制。MobaXterm 正是由此而来的,它允许你使用多个在 Linux 中相似的终端。这将会极大地帮助你在监控方面的需求! + +#### 88. [Shinken monitoring][71] #### + +Shinken 是一个监控框架,其是由 python 对 Nagios 进行完全重写的。它的目的是增强灵活性和管理更大环境。但仍保持所有的 nagios 配置和插件。 + +-------------------------------------------------------------------------------- + +via: https://blog.serverdensity.com/80-linux-monitoring-tools-know/ + +作者:[Jonathan Sundqvist][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者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/ From 1cbef0836a640aebb30360f2d67f563574b2af0e Mon Sep 17 00:00:00 2001 From: runningwater Date: Tue, 1 Dec 2015 12:15:31 +0800 Subject: [PATCH 0429/1710] =?UTF-8?q?=E4=BB=A3zky001=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...grep Command In Linux or UNIX--Examples.md | 152 ------------------ ...grep Command In Linux or UNIX--Examples.md | 143 ++++++++++++++++ 2 files changed, 143 insertions(+), 152 deletions(-) delete mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md create mode 100644 translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md deleted file mode 100644 index 1db160d73f..0000000000 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md +++ /dev/null @@ -1,152 +0,0 @@ -(翻译中 by runningwater) -HowTo: Use grep Command In Linux / UNIX – Examples -================================================================================ -How do I use grep command on Linux, Apple OS X, and Unix-like operating systems? Can you give me a simple examples of the grep command? - -The grep command is used to search text or searches the given file for lines containing a match to the given strings or words. By default, grep displays the matching lines. Use grep to search for lines of text that match one or many regular expressions, and outputs only the matching lines. grep is considered as one of the most useful commands on Linux and Unix-like operating systems. - -### Did you know? ### - -The name, "grep", derives from the command used to perform a similar operation, using the Unix/Linux text editor ed: - - g/re/p - -### The grep command syntax ### - -The syntax is as follows: - - grep 'word' filename - grep 'word' file1 file2 file3 - grep 'string1 string2' filename - cat otherfile | grep 'something' - command | grep 'something' - command option1 | grep 'data' - grep --color 'data' fileName - -### How do I use grep command to search a file? ### - -Search /etc/passwd file for boo user, enter: - - $ grep boo /etc/passwd - -Sample outputs: - - foo:x:1000:1000:foo,,,:/home/foo:/bin/ksh - -You can force grep to ignore word case i.e match boo, Boo, BOO and all other combination with the -i option: - - $ grep -i "boo" /etc/passwd - -### Use grep recursively ### - -You can search recursively i.e. read all files under each directory for a string "192.168.1.5" - - $ grep -r "192.168.1.5" /etc/ - -OR - - $ grep -R "192.168.1.5" /etc/ - -Sample outputs: - - /etc/ppp/options:# ms-wins 192.168.1.50 - /etc/ppp/options:# ms-wins 192.168.1.51 - /etc/NetworkManager/system-connections/Wired connection 1:addresses1=192.168.1.5;24;192.168.1.2; - -You will see result for 192.168.1.5 on a separate line preceded by the name of the file (such as /etc/ppp/options) in which it was found. The inclusion of the file names in the output data can be suppressed by using the -h option as follows: - - $ grep -h -R "192.168.1.5" /etc/ - -OR - - $ grep -hR "192.168.1.5" /etc/ - -Sample outputs: - - # ms-wins 192.168.1.50 - # ms-wins 192.168.1.51 - addresses1=192.168.1.5;24;192.168.1.2; - -### Use grep to search words only ### - -When you search for boo, grep will match fooboo, boo123, barfoo35 and more. You can force the grep command to select only those lines containing matches that form whole words i.e. match only boo word: - - $ grep -w "boo" file - -### Use grep to search 2 different words ### - -Use the egrep command as follows: - - $ egrep -w 'word1|word2' /path/to/file - -### Count line when words has been matched ### - -The grep can report the number of times that the pattern has been matched for each file using -c (count) option: - - $ grep -c 'word' /path/to/file - -Pass the -n option to precede each line of output with the number of the line in the text file from which it was obtained: - - $ grep -n 'root' /etc/passwd - -Sample outputs: - - 1:root:x:0:0:root:/root:/bin/bash - 1042:rootdoor:x:0:0:rootdoor:/home/rootdoor:/bin/csh - 3319:initrootapp:x:0:0:initrootapp:/home/initroot:/bin/ksh - -### Grep invert match ### - -You can use -v option to print inverts the match; that is, it matches only those lines that do not contain the given word. For example print all line that do not contain the word bar: - - $ grep -v bar /path/to/file - -### UNIX / Linux pipes and grep command ### - -grep command often used with [shell pipes][1]. In this example, show the name of the hard disk devices: - - # dmesg | egrep '(s|h)d[a-z]' - -Display cpu model name: - - # cat /proc/cpuinfo | grep -i 'Model' - -However, above command can be also used as follows without shell pipe: - - # grep -i 'Model' /proc/cpuinfo - -Sample outputs: - - model : 30 - model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz - model : 30 - model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz - -### How do I list just the names of matching files? ### - -Use the -l option to list file name whose contents mention main(): - - $ grep -l 'main' *.c - -Finally, you can force grep to display output in colors, enter: - - $ grep --color vivek /etc/passwd - -Sample outputs: - -![Grep command in action](http://files.cyberciti.biz/uploads/faq/2007/08/grep_command_examples.png) - -Grep command in action - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/ - -作者:Vivek Gite -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - - -[1]:http://bash.cyberciti.biz/guide/Pipes \ No newline at end of file diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md new file mode 100644 index 0000000000..b539b9a4a8 --- /dev/null +++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md @@ -0,0 +1,143 @@ +grepƥַ򵥴ʸʽļļͨ˵grep ʾƥ䵽Уʹgrepһʽƥ䵽УֻʾʵУgrepΪLinuxUnixϵͳõ +### ֪ ### +grep֣ԴڱʾһƵΪgrepUnixLinuxı༭ǣ + + g/re/p + +### grep﷨ ### + +﷨ʾ: + + grep 'word' filename + grep 'word' file1 file2 file3 + grep 'string1 string2' filename + cat otherfile | grep 'something' + command | grep 'something' + command option1 | grep 'data' + grep --color 'data' fileName + +###ôʹgrepһļ### + + /etc/passwd ļµbooû,: + + $ grep boo /etc/passwd + +: + + foo:x:1000:1000:foo,,,:/home/foo:/bin/ksh + +ʹgrepȥǿƺԴСд i.e ʹ-iƥ boo, Boo, BOO ѡ: + + $ grep -i "boo" /etc/passwd + +### ݹʹgrep ### + +ʹgrepݹ i.e. ļĿ¼аַ192.168.1.5ļ + + $ grep -r "192.168.1.5" /etc/ + +ǣ + + $ grep -R "192.168.1.5" /etc/ + +ʾ: + + /etc/ppp/options:# ms-wins 192.168.1.50 + /etc/ppp/options:# ms-wins 192.168.1.51 + /etc/NetworkManager/system-connections/Wired connection 1:addresses1=192.168.1.5;24;192.168.1.2; + +ῴҵ 192.168.1.5 ĽļΪʾڵ棬֮аļԼ-hѡֹ + $ grep -h -R "192.168.1.5" /etc/ + + + + $ grep -hR "192.168.1.5" /etc/ + +ʾ: + + # ms-wins 192.168.1.50 + # ms-wins 192.168.1.51 + addresses1=192.168.1.5;24;192.168.1.2; + +### ʹgrepȥı ### + +boogrepƥfoobooboo123, barfoo35 booַʹ-wѡȥǿѡЩǸʵС + + $ grep -w "boo" file + +### ʹegrepȥȽϲͬ ### + +ʹegrep: + + $ egrep -w 'word1|word2' /path/to/file + +### ıƥʱͳ ### + +grepͨ-cʾÿļƥ䵽Ĵ + + $ grep -c 'word' /path/to/file + +-nѡȥʾǰƥ䵽ļ + + $ grep -n 'root' /etc/passwd + +ʾ: + + 1:root:x:0:0:root:/root:/bin/bash + 1042:rootdoor:x:0:0:rootdoor:/home/rootdoor:/bin/csh + 3319:initrootapp:x:0:0:initrootapp:/home/initroot:/bin/ksh + +### תƥ ### + +ʹ-vѡȥӡƥݣݽЩʵУɾbarʵУ + + $ grep -v bar /path/to/file + +### UNIX / Linux ܵ grep ### + +grep ܵһʹãУʾӲ֣ + + # dmesg | egrep '(s|h)d[a-z]' + +ʾCPUģ + + # cat /proc/cpuinfo | grep -i 'Model' + +Ȼ԰·ʹõͬʱʹùܵ: + + # grep -i 'Model' /proc/cpuinfo + +ʾ: + + model : 30 + model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz + model : 30 + model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz + +### νʾƥ䵽ݵļ? ### + +ʹ-lѡȥʾЩļаmainļ: + + $ grep -l 'main' *.c + +ʹgrepɫʵʾ: + + $ grep --color vivek /etc/passwd + +ʾ: + +![Grep command in action](http://files.cyberciti.biz/uploads/faq/2007/08/grep_command_examples.png) + + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/ + +ߣVivek Gite +ߣ[zky001](https://github.com/zky001) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +УID +[1]:http://bash.cyberciti.biz/guide/Pipes \ No newline at end of file From d0b87ae38da96d21c64ea1f2329ed95b11a29743 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 1 Dec 2015 12:44:45 +0800 Subject: [PATCH 0430/1710] Translating by ZTinoZ --- ... ways hackers can use Wi-Fi against you.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md index 1cf33a33dc..09e33c4e53 100644 --- a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -1,51 +1,50 @@ -Translating by ZTinoZ -7 ways hackers can use Wi-Fi against you +黑客利用Wi-Fi侵犯你隐私的七种方法 ================================================================================ ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/intro_title-100626673-orig.jpg) -### 7 ways hackers can use Wi-Fi against you ### +### 黑客利用Wi-Fi侵犯你隐私的七种方法 ### -Wi-Fi — oh so convenient, yet oh so dangerous. Here are seven ways you could be giving away your identity through a Wi-Fi connection and what to do instead. +Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-Fi连接泄露身份信息的七种方法和预防措施。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/1_free-hotspots-100626674-orig.jpg) -### Using free hotspots ### +### 利用免费热点 ### They seem to be everywhere, and their numbers are expected to [quadruple over the next four years][1]. But many of them are untrustworthy, created just so your login credentials, to email or even more sensitive accounts, can be picked up by hackers using “sniffers” — software that captures any information you submit over the connection. The best defense against sniffing hackers is to use a VPN (virtual private network). A VPN keeps your private data protected because it encrypts what you input. ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/2_online-banking-100626675-orig.jpg) -### Banking online ### +### 网上银行 ### You might think that no one needs to be warned against banking online using free Wi-Fi, but cybersecurity firm Kaspersky Lab says that [more than 100 banks worldwide have lost $900 million][2] from cyberhacking, so it would seem that a lot of people are doing it. If you want to use the free Wi-Fi in a coffee shop because you’re confident it will be legitimate, confirm the exact network name with the barista. It’s pretty easy for [someone else in the shop with a router to set up an open connection][3] with a name that seems like it would be the name of the shop’s Wi-Fi. ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/3_keeping-wifi-on-100626676-orig.jpg) -### Keeping Wi-Fi on all the time ### +### 始终开着Wi-Fi开关 ### -When your phone’s Wi-Fi is automatically enabled, you can be connected to an unsecure network without even realizing it. Use your phone’s [location-based Wi-Fi feature][4], if it’s available. It will turn off your Wi-Fi when you’re away from your saved networks and will turn back on when you’re within range. +如果你手机的Wi-Fi开关一直开着的,你会自动被连接到一个不安全的网络中去,你甚至都没有意识到。你可以利用你手机的[基于位置的Wi-Fi功能][4],如果它是可用的,那它会在你离开你所保存的网络范围后自动关闭你的Wi-Fi开关并在你回去之后再次开启。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/4_not-using-firewall-100626677-orig.jpg) -### Not using a firewall ### +### 不使用防火墙 ### A firewall is your first line of defense against malicious intruders. It’s meant to let good traffic through your computer on a network and keep hackers and malware out. You should turn it off only when your antivirus software has its own firewall. ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/5_browsing-unencrypted-sites-100626678-orig.jpg) -### Browsing unencrypted websites ### +### 浏览非加密网页 ### Sad to say, [55% of the Web’s top 1 million sites don’t offer encryption][5]. An unencrypted website allows all data transmissions to be viewed by the prying eyes of hackers. Your browser will indicate when a site is secure (you’ll see a gray padlock with Mozilla Firefox, for example, and a green lock icon with Chrome). But even a secure website can’t protect you from sidejackers, who can steal the cookies from a website you visited, whether it’s a valid site or not, through a public network. ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/6_updating-security-software-100626679-orig.jpg) -### Not updating your security software ### +### 不更新你的安全防护软件 ### If you want to ensure that your own network is well protected, upgrade the firmware of your router. All you have to do is go to your router’s administration page to check. Normally, you can download the newest firmware right from the manufacturer’s site. ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/7_securing-home-wifi-100626680-orig.jpg) -### Not securing your home Wi-Fi ### +### 不保护你的家用Wi-Fi ### Needless to say, it is important to set up a password that is not too easy to guess, and change your connection’s default name. You can also filter your MAC address so your router will recognize only certain devices. @@ -56,7 +55,7 @@ Needless to say, it is important to set up a password that is not too easy to gu via: http://www.networkworld.com/article/3003170/mobile-security/7-ways-hackers-can-use-wi-fi-against-you.html 作者:[Josh Althuser][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 ba5bfaf18d7d1e34359756f585292b4302b29b59 Mon Sep 17 00:00:00 2001 From: runningwater Date: Tue, 1 Dec 2015 13:34:52 +0800 Subject: [PATCH 0431/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20ru?= =?UTF-8?q?nningwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...p Command Tutorial series 2--Regular Expressions In grep.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md index 506719d8aa..8bac50fe25 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md @@ -1,3 +1,4 @@ +(translating by runningwater) Regular Expressions In grep ================================================================================ How do I use the Grep command with regular expressions on a Linux and Unix-like operating systems? @@ -283,7 +284,7 @@ References: via: http://www.cyberciti.biz/faq/grep-regular-expressions/ 作者:Vivek Gite -译者:[译者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/) 荣誉推出 \ No newline at end of file From 9b76b5c997145d0e61f5b233adfd953ca3727836 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 1 Dec 2015 14:46:17 +0800 Subject: [PATCH 0432/1710] =?UTF-8?q?=E5=BD=92=E6=A1=A3201511?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... data structures and algorithms make you a better developer.md | 0 .../20150827 The Strangest Most Unique Linux Distros.md | 0 ... to switch from NetworkManager to systemd-networkd on Linux.md | 0 ...50909 Superclass--15 of the world's best living programmers.md | 0 ... Basic Hardware Info Using screenfetch and linux_logo Tools.md | 0 .../{ => 201511}/20150921 Configure PXE Server In Ubuntu 14.04.md | 0 .../20150929 A Developer's Journey into Linux Containers.md | 0 .../20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md | 0 ...20151012 Curious about Linux Try Linux Desktop on the Cloud.md | 0 .../{ => 201511}/20151012 How To Use iPhone In Antergos Linux.md | 0 ... to Monitor Stock Prices from Ubuntu Command Line Using Mop.md | 0 .../20151012 How to Setup DockerUI--a Web Interface for Docker.md | 0 .../20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md | 0 ... to find information about built-in kernel modules on Linux.md | 0 .../{ => 201511}/20151012 What is a good IDE for R on Linux.md | 0 ... with Answers--How to install Ubuntu desktop behind a proxy.md | 0 ...0151019 Nautilus File Search Is About To Get A Big Power Up.md | 0 .../20151027 How To Install Retro Terminal In Linux.md | 0 published/{ => 201511}/20151027 How To Show Desktop In GNOME 3.md | 0 ...1027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md | 0 ...ate New File Systems or Partitions in the Terminal on Linux.md | 0 ...20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md | 0 ...nage Your To-Do Lists in Ubuntu Using Go For It Application.md | 0 ...s with Answers--How to change default Java version on Linux.md | 0 ...s with Answers--How to find which shell I am using on Linux.md | 0 .../{ => 201511}/20151109 Open Source Alternatives to LastPass.md | 0 ...o set JAVA_HOME environment variable automatically on Linux.md | 0 .../20151117 N1--The Next Generation Open Source Email Client.md | 0 ...ow to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md | 0 .../20151123 Install Intel Graphics Installer in Ubuntu 15.10.md | 0 .../Learn with Linux--Master Your Math with These Linux Apps.md | 0 published/{ => 201511}/LetsEncrypt.md | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201511}/20150823 How learning data structures and algorithms make you a better developer.md (100%) rename published/{ => 201511}/20150827 The Strangest Most Unique Linux Distros.md (100%) rename published/{ => 201511}/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md (100%) rename published/{ => 201511}/20150909 Superclass--15 of the world's best living programmers.md (100%) rename published/{ => 201511}/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md (100%) rename published/{ => 201511}/20150921 Configure PXE Server In Ubuntu 14.04.md (100%) rename published/{ => 201511}/20150929 A Developer's Journey into Linux Containers.md (100%) rename published/{ => 201511}/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md (100%) rename published/{ => 201511}/20151012 Curious about Linux Try Linux Desktop on the Cloud.md (100%) rename published/{ => 201511}/20151012 How To Use iPhone In Antergos Linux.md (100%) rename published/{ => 201511}/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md (100%) rename published/{ => 201511}/20151012 How to Setup DockerUI--a Web Interface for Docker.md (100%) rename published/{ => 201511}/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md (100%) rename published/{ => 201511}/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md (100%) rename published/{ => 201511}/20151012 What is a good IDE for R on Linux.md (100%) rename published/{ => 201511}/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md (100%) rename published/{ => 201511}/20151019 Nautilus File Search Is About To Get A Big Power Up.md (100%) rename published/{ => 201511}/20151027 How To Install Retro Terminal In Linux.md (100%) rename published/{ => 201511}/20151027 How To Show Desktop In GNOME 3.md (100%) rename published/{ => 201511}/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md (100%) rename published/{ => 201511}/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md (100%) rename published/{ => 201511}/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md (100%) rename published/{ => 201511}/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md (100%) rename published/{ => 201511}/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md (100%) rename published/{ => 201511}/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md (100%) rename published/{ => 201511}/20151109 Open Source Alternatives to LastPass.md (100%) rename published/{ => 201511}/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md (100%) rename published/{ => 201511}/20151117 N1--The Next Generation Open Source Email Client.md (100%) rename published/{ => 201511}/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md (100%) rename published/{ => 201511}/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md (100%) rename published/{ => 201511}/Learn with Linux--Master Your Math with These Linux Apps.md (100%) rename published/{ => 201511}/LetsEncrypt.md (100%) diff --git a/published/20150823 How learning data structures and algorithms make you a better developer.md b/published/201511/20150823 How learning data structures and algorithms make you a better developer.md similarity index 100% rename from published/20150823 How learning data structures and algorithms make you a better developer.md rename to published/201511/20150823 How learning data structures and algorithms make you a better developer.md diff --git a/published/20150827 The Strangest Most Unique Linux Distros.md b/published/201511/20150827 The Strangest Most Unique Linux Distros.md similarity index 100% rename from published/20150827 The Strangest Most Unique Linux Distros.md rename to published/201511/20150827 The Strangest Most Unique Linux Distros.md diff --git a/published/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md b/published/201511/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md similarity index 100% rename from published/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md rename to published/201511/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md diff --git a/published/20150909 Superclass--15 of the world's best living programmers.md b/published/201511/20150909 Superclass--15 of the world's best living programmers.md similarity index 100% rename from published/20150909 Superclass--15 of the world's best living programmers.md rename to published/201511/20150909 Superclass--15 of the world's best living programmers.md diff --git a/published/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md b/published/201511/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md similarity index 100% rename from published/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md rename to published/201511/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md diff --git a/published/20150921 Configure PXE Server In Ubuntu 14.04.md b/published/201511/20150921 Configure PXE Server In Ubuntu 14.04.md similarity index 100% rename from published/20150921 Configure PXE Server In Ubuntu 14.04.md rename to published/201511/20150921 Configure PXE Server In Ubuntu 14.04.md diff --git a/published/20150929 A Developer's Journey into Linux Containers.md b/published/201511/20150929 A Developer's Journey into Linux Containers.md similarity index 100% rename from published/20150929 A Developer's Journey into Linux Containers.md rename to published/201511/20150929 A Developer's Journey into Linux Containers.md diff --git a/published/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md b/published/201511/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md similarity index 100% rename from published/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md rename to published/201511/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md diff --git a/published/20151012 Curious about Linux Try Linux Desktop on the Cloud.md b/published/201511/20151012 Curious about Linux Try Linux Desktop on the Cloud.md similarity index 100% rename from published/20151012 Curious about Linux Try Linux Desktop on the Cloud.md rename to published/201511/20151012 Curious about Linux Try Linux Desktop on the Cloud.md diff --git a/published/20151012 How To Use iPhone In Antergos Linux.md b/published/201511/20151012 How To Use iPhone In Antergos Linux.md similarity index 100% rename from published/20151012 How To Use iPhone In Antergos Linux.md rename to published/201511/20151012 How To Use iPhone In Antergos Linux.md diff --git a/published/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md b/published/201511/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md similarity index 100% rename from published/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md rename to published/201511/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md diff --git a/published/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/published/201511/20151012 How to Setup DockerUI--a Web Interface for Docker.md similarity index 100% rename from published/20151012 How to Setup DockerUI--a Web Interface for Docker.md rename to published/201511/20151012 How to Setup DockerUI--a Web Interface for Docker.md diff --git a/published/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md b/published/201511/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md similarity index 100% rename from published/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md rename to published/201511/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md diff --git a/published/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md b/published/201511/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md similarity index 100% rename from published/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md rename to published/201511/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md diff --git a/published/20151012 What is a good IDE for R on Linux.md b/published/201511/20151012 What is a good IDE for R on Linux.md similarity index 100% rename from published/20151012 What is a good IDE for R on Linux.md rename to published/201511/20151012 What is a good IDE for R on Linux.md diff --git a/published/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/published/201511/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md similarity index 100% rename from published/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md rename to published/201511/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md diff --git a/published/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/published/201511/20151019 Nautilus File Search Is About To Get A Big Power Up.md similarity index 100% rename from published/20151019 Nautilus File Search Is About To Get A Big Power Up.md rename to published/201511/20151019 Nautilus File Search Is About To Get A Big Power Up.md diff --git a/published/20151027 How To Install Retro Terminal In Linux.md b/published/201511/20151027 How To Install Retro Terminal In Linux.md similarity index 100% rename from published/20151027 How To Install Retro Terminal In Linux.md rename to published/201511/20151027 How To Install Retro Terminal In Linux.md diff --git a/published/20151027 How To Show Desktop In GNOME 3.md b/published/201511/20151027 How To Show Desktop In GNOME 3.md similarity index 100% rename from published/20151027 How To Show Desktop In GNOME 3.md rename to published/201511/20151027 How To Show Desktop In GNOME 3.md diff --git a/published/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md b/published/201511/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md similarity index 100% rename from published/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md rename to published/201511/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md diff --git a/published/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md b/published/201511/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md similarity index 100% rename from published/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md rename to published/201511/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md diff --git a/published/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md b/published/201511/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md similarity index 100% rename from published/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md rename to published/201511/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md diff --git a/published/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md b/published/201511/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md similarity index 100% rename from published/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md rename to published/201511/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md diff --git a/published/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md b/published/201511/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md similarity index 100% rename from published/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md rename to published/201511/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md diff --git a/published/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md b/published/201511/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md similarity index 100% rename from published/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md rename to published/201511/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md diff --git a/published/20151109 Open Source Alternatives to LastPass.md b/published/201511/20151109 Open Source Alternatives to LastPass.md similarity index 100% rename from published/20151109 Open Source Alternatives to LastPass.md rename to published/201511/20151109 Open Source Alternatives to LastPass.md diff --git a/published/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md b/published/201511/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md similarity index 100% rename from published/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md rename to published/201511/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md diff --git a/published/20151117 N1--The Next Generation Open Source Email Client.md b/published/201511/20151117 N1--The Next Generation Open Source Email Client.md similarity index 100% rename from published/20151117 N1--The Next Generation Open Source Email Client.md rename to published/201511/20151117 N1--The Next Generation Open Source Email Client.md diff --git a/published/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md b/published/201511/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md similarity index 100% rename from published/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md rename to published/201511/20151123 How to Install NVIDIA 358.16 Driver in Ubuntu 15.10 or 14.04.md diff --git a/published/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md b/published/201511/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md similarity index 100% rename from published/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md rename to published/201511/20151123 Install Intel Graphics Installer in Ubuntu 15.10.md diff --git a/published/Learn with Linux--Master Your Math with These Linux Apps.md b/published/201511/Learn with Linux--Master Your Math with These Linux Apps.md similarity index 100% rename from published/Learn with Linux--Master Your Math with These Linux Apps.md rename to published/201511/Learn with Linux--Master Your Math with These Linux Apps.md diff --git a/published/LetsEncrypt.md b/published/201511/LetsEncrypt.md similarity index 100% rename from published/LetsEncrypt.md rename to published/201511/LetsEncrypt.md From 82524b6d174cf8e8cdfed4040eae0f1dbfad271f Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 1 Dec 2015 14:46:45 +0800 Subject: [PATCH 0433/1710] PUB:20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX @zpl1025 --- ...tory Of Aix HP-UX Solaris BSD And LINUX.md | 101 ++++++++++++++++++ ...tory Of Aix HP-UX Solaris BSD And LINUX.md | 101 ------------------ 2 files changed, 101 insertions(+), 101 deletions(-) create mode 100644 published/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md delete mode 100644 translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md diff --git a/published/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/published/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md new file mode 100644 index 0000000000..2f6780cdc2 --- /dev/null +++ b/published/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md @@ -0,0 +1,101 @@ +UNIX 家族小史 +================================================================================ +![](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),这个系统能支持大量用户通过交互式分时(timesharing)的方式使用大型机。 + +UNIX 诞生于 **1969** 年,由**肯·汤普森**以及后来加入的**丹尼斯·里奇**共同完成。这两位优秀的研究员和科学家在一个**通用电器 GE**和**麻省理工学院**的合作项目里工作,项目目标是开发一个叫 Multics 的交互式分时系统。 + +Multics 的目标是整合分时技术以及当时其他先进技术,允许用户在远程终端通过电话(拨号)登录到主机,然后可以编辑文档,阅读电子邮件,运行计算器,等等。 + +在之后的五年里,AT&T 公司为 Multics 项目投入了数百万美元。他们购买了 GE-645 大型机,聚集了贝尔实验室的顶级研究人员,例如肯·汤普森、 Stuart Feldman、丹尼斯·里奇、道格拉斯·麦克罗伊(M. Douglas McIlroy)、 Joseph F. Ossanna 以及 Robert Morris。但是项目目标太过激进,进度严重滞后。最后,AT&T 高层决定放弃这个项目。 + +贝尔实验室的管理层决定停止这个让许多研究人员无比纠结的操作系统上的所有遗留工作。不过要感谢汤普森,里奇和一些其他研究员,他们把老板的命令丢到一边,并继续在实验室里满怀热心地忘我工作,最终孵化出前无古人后无来者的 UNIX。 + +UNIX 的第一声啼哭是在一台 PDP-7 微型机上,它是汤普森测试自己在操作系统设计上的点子的机器,也是汤普森和 里奇一起玩 Space and Travel 游戏的模拟器。 + +> “我们想要的不仅是一个优秀的编程环境,而是能围绕这个系统形成团体。按我们自己的经验,通过远程访问和分时主机实现的公共计算,本质上不只是用终端输入程序代替打孔机而已,而是鼓励密切沟通。”丹尼斯·里奇说。 + +UNIX 是第一个靠近理想的系统,在这里程序员可以坐在机器前自由摆弄程序,探索各种可能性并随手测试。在 UNIX 整个生命周期里,它吸引了大量因其他操作系统限制而投身过来的高手做出无私贡献,因此它的功能模型一直保持上升趋势。 + +UNIX 在 1970 年因为 PDP-11/20 获得了首次资金注入,之后正式更名为 UNIX 并支持在 PDP-11/20 上运行。UNIX 带来的第一次用于实际场景中是在 1971 年,贝尔实验室的专利部门配备来做文字处理。 + +### UNIX 上的 C 语言革命 ### + +丹尼斯·里奇在 1972 年发明了一种叫 “**C**” 的高级编程语言 ,之后他和肯·汤普森决定用 “C” 重写 UNIX 系统,来支持更好的移植性。他们在那一年里编写和调试了差不多 100,000 行代码。在迁移到 “C” 语言后,系统可移植性非常好,只需要修改一小部分机器相关的代码就可以将 UNIX 移植到其他计算机平台上。 + +UNIX 第一次公开露面是 1973 年丹尼斯·里奇和肯·汤普森在操作系统原理(Operating Systems Principles)上发表的一篇论文,然后 AT&T 发布了 UNIX 系统第 5 版,并授权给教育机构使用,之后在 1975 年第一次以 **$20.000** 的价格授权企业使用 UNIX 第 6 版。应用最广泛的是 1980 年发布的 UNIX 第 7 版,任何人都可以购买授权,只是授权条款非常严格。授权内容包括源代码,以及用 PDP-11 汇编语言写的及其相关内核。反正,各种版本 UNIX 系统完全由它的用户手册确定。 + +### AIX 系统 ### + +在 **1983** 年,**微软**计划开发 **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)** 以及集成逻辑卷管理器 (Logical Volume Manager ,LVM)。IBM 在 1989 年将 AIX 移植到自己的 RS/6000 平台。2001 年发布的 5L 版是一个突破性的版本,提供了 Linux 友好性以及支持 Power4 服务器的逻辑分区。 + +在 2004 年发布的 AIX 5.3 引入了支持高级电源虚拟化( Advanced Power Virtualization,APV)的虚拟化技术,支持对称多线程、微分区,以及共享处理器池。 + +在 2007 年,IBM 同时发布 AIX 6.1 和 Power6 架构,开始加强自己的虚拟化产品。他们还将高级电源虚拟化重新包装成 PowerVM。 + +这次改进包括被称为 WPARs 的负载分区形式,类似于 Solaris 的 zones/Containers,但是功能更强。 + +### HP-UX 系统 ### + +**惠普 UNIX (Hewlett-Packard’s 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 为特定的信息技术用途,引入了操作环境(operating environments)和分级应用(layered applications)的捆绑组(bundled groups)。 + +在 2001 年发布的 11.20 版宣称支持安腾(Itanium)系统。HP-UX 是第一个使用 ACLs(访问控制列表,Access Control Lists)管理文件权限的 UNIX 系统,也是首先支持内建逻辑卷管理器(Logical Volume Manager)的系统之一。 + +如今,HP-UX 因为 HP 和 Veritas 的合作关系使用了 Veritas 作为主文件系统。 + +HP-UX 目前的最新版本是 11iv3, update 4。 + +### Solaris 系统 ### + +Sun 的 UNIX 版本是 **Solaris**,用来接替 1992 年创建的 **SunOS**。SunOS 一开始基于 BSD(伯克利软件发行版,Berkeley Software Distribution)风格的 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 卷管理器(Solaris Volume Manager)。之后,2005 年发布了 Solaris 10,带来许多创新,比如支持 Solaris Containers,新的 ZFS 文件系统,以及逻辑域(Logical Domains)。 + +目前 Solaris 最新的版本是 第 10 版,最后的更新发布于 2008 年。 + +### Linux ### + +到了 1991 年,用来替代商业操作系统的自由(free)操作系统的需求日渐高涨。因此,**Linus Torvalds** 开始构建一个自由的操作系统,最终成为 **Linux**。Linux 最开始只有一些 “C” 文件,并且使用了阻止商业发行的授权。Linux 是一个类 UNIX 系统但又不尽相同。 + +2015 年发布了基于 GNU Public License (GPL)授权的 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) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [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 deleted file mode 100644 index 921f1a57aa..0000000000 --- a/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md +++ /dev/null @@ -1,101 +0,0 @@ -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 年为止,全世界 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 万行开源代码开放给开发者。 - -如今 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) -校对:[Caroline](https://github.com/carolinewuyan) - -本文由 [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 301b0a4ae2a97c9ef1c24849227e988c237314a9 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 1 Dec 2015 14:49:18 +0800 Subject: [PATCH 0434/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68b579d9fc..7fbc7a5f36 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ LCTT的组成 - CORE @strugglingyouth, - CORE @FSSlc - CORE @zpl1025, +- CORE @runningwater, - CORE @bazz2, - CORE @Vic020, - CORE @dongfengweixiao, @@ -76,7 +77,6 @@ LCTT的组成 - Senior @jasminepeng, - Senior @willqian, - Senior @vizv, -- runningwater, - ZTinoZ, - theo-l, - luoxcat, From 8cd0148058c12ff66022c5368419d41ef3667e3f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 1 Dec 2015 15:44:15 +0800 Subject: [PATCH 0435/1710] =?UTF-8?q?20151201-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... The Latest Arduino IDE 1.6.6 in Ubuntu.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md diff --git a/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md b/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md new file mode 100644 index 0000000000..6544ad3919 --- /dev/null +++ b/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md @@ -0,0 +1,77 @@ +How to Install The Latest Arduino IDE 1.6.6 in Ubuntu +================================================================================ +![Install latest Arduino in Ubuntu](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-icon.png) + +> Quick tutorial shows you how to the latest Arduino IDE, so far its version 1.6.6, in all current Ubuntu releases. + +The open-source Arduino IDE has reached the 1.6.6 release recently with lots of changes. The new release has switched to Java 8, which is now both bundled and needed for compiling the IDE. See the [RELEASE NOTE][1] for details. + +![Arduino 1.6.6 in Ubuntu 15.10](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-ubuntu.jpg) + +For those who don’t want to use the old 1.0.5 version available in Software Center, you can always follow below steps to install Arduino in all Ubuntu releases: + +注:下面这个说明下面的代码颜色,这个发布的时候要对照一下原文,写点说明,因为颜色在md里标识不出来 +> **Replace the words in red for future releases** + +**1.** Download the latest packages, **Linux 32-bit or Linux 64-bit**, from the official link below: + +- [www.arduino.cc/en/Main/Software][2] + +Don’t know your OS type? Go and check out System Settings -> Details -> Overview. + +**2.** Open **terminal** from Unity Dash, App Launcher, or via Ctrl+Alt+T keys. When it opens, run below commands one by one: + +Navigate to your downloads folder: + + cd ~/Downloads + +![navigate-downloads](http://ubuntuhandbook.org/wp-content/uploads/2015/11/navigate-downloads.jpg) + +Decompress the downloaded archive with tar command: + +注:arduino-1.6.6-*.tar.xz 为红色部分 + tar -xvf arduino-1.6.6-*.tar.xz + +![extract-archive](http://ubuntuhandbook.org/wp-content/uploads/2015/11/extract-archive.jpg) + +Move the result folder to **/opt/** directory for global use: + +注:arduino-1.6.6 为红色部分 + sudo mv arduino-1.6.6 /opt + +![move-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/11/move-opt.jpg) + +**3.** Now the IDE is ready for use with bundled Java. But it would be good to create desktop icon/launcher for the application: + +Navigate to install folder: + +注:arduino-1.6.6 为红色部分 + cd /opt/arduino-1.6.6/ + +Give executable permission to install.sh script in that folder: + + chmod +x install.sh + +Finally run the script to install both desktop shortcut and launcher icon: + + ./install.sh + +In below picture I’ve combined 3 commands into one via “&&”: + +![install-desktop-icon](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-desktop-icon.jpg) + +Finally, launch Arduino IDE from Unity Dash, Application Launcher, or via Desktop shorcut. + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/install-arduino-ide-1-6-6-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://www.arduino.cc/en/Main/ReleaseNotes +[2]:https://www.arduino.cc/en/Main/Software \ No newline at end of file From dbbc3efa6917508dd1db3057c86a86558fe61fe1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 1 Dec 2015 15:54:33 +0800 Subject: [PATCH 0436/1710] =?UTF-8?q?20151201-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/talk/20151201 Cinnamon 2.8 Review.md | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sources/talk/20151201 Cinnamon 2.8 Review.md diff --git a/sources/talk/20151201 Cinnamon 2.8 Review.md b/sources/talk/20151201 Cinnamon 2.8 Review.md new file mode 100644 index 0000000000..0c44eba14f --- /dev/null +++ b/sources/talk/20151201 Cinnamon 2.8 Review.md @@ -0,0 +1,87 @@ +Cinnamon 2.8 Review +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2-8-featured.jpg) + +Other than Gnome and KDE, Cinnamon is another desktop environment that is used by many people. It is made by the same team that produces Linux Mint (and ships with Linux Mint) and can also be installed on several other distributions. The latest version of this DE – Cinnamon 2.8 – was released earlier this month, and it brings a host of bug fixes and improvements as well as some new features. + +I’m going to go over the major improvements made in this release as well as how to update to Cinnamon 2.8 or install it for the first time. + +### Improvements to Applets ### + +There are several improvements to already existing applets for the panel. + +#### Sound Applet #### + +![cinnamon-28-sound-applet](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-sound-applet.jpg) + +The Sound applet was revamped and now displays track information as well as the media controls on top of the cover art of the audio file. For music players with seeking support (such as Banshee), a progress bar will be displayed in the same region which you can use to change the position of the audio track. Right-clicking on the applet in the panel will display the options to mute input and output devices. + +#### Power Applet #### + +The Power applet now displays the status of each of the connected batteries and devices using the manufacturer’s data instead of generic names. + +#### Window Thumbnails #### + +![cinnamon-2.8-window-thumbnails](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-window-thumbnails.png) + +Cinnamon 2.8 brings the option to show window thumbnails when hovering over the window list in the panel. You can turn it off if you don’t like it, though. + +#### Workspace Switcher Applet #### + +![cinnamon-2.8-workspace-switcher](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-workspace-switcher.png) + +Adding the Workspace switcher applet to your panel will show you a visual representation of your workspaces with little rectangles embedded inside to show the position of your windows. + +#### System Tray #### + +Cinnamon 2.8 brings support for app indicators in the system tray. You can easily disable this in the settings which will force affected apps to fall back to using status icons instead. + +### Visual Improvements ### + +A host of visual improvements were made in Cinnamon 2.8. The classic and preview Alt + Tab switchers were polished with noticeable improvements, while the Alt + F2 dialog received bug fixes and better auto completion for commands. + +Also, the issue with the traditional animation effect for minimizing windows is now sorted and works with multiple panels. + +### Nemo Improvements ### + +![cinnamon-2.8-nemo](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-nemo.jpg) + +The default file manager for Cinnamon also received several bug fixes and has a new “Quick-rename” feature for renaming files and directories. This works by clicking the file or directory twice with a short pause in between to rename the files. + +Nemo also detects issues with thumbnails automatically and prompts you to quickly fix them. + +### Other Notable improvements ### + +- Applets now reload themselves automatically once they are updated. +- Support for multiple monitors was improved significantly. +- Dialog windows have been improved and now attach themselves to their parent windows. +- HiDPI dectection has been improved. +- QT5 applications now look more native and use the default GTK theme. +- Window management and rendering performance has been improved. +- There are various bugfixes. + +### How to Get Cinnamon 2.8 ### + +If you’re running Linux Mint you will get Cinnamon 2.8 as part of the upgrade to Linux Mint 17.3 “Rosa” Cinnamon Edition. The BETA release is already out, so you can grab that if you’d like to get your hands on the new software immediately. + +For Arch users, Cinnamon 2.8 is already in the official Arch repositories, so you can just update your packages and do a system-wide upgrade to get the latest version. + +Finally, for Ubuntu users, you can install or upgrade to Cinnamon 2.8 by running in turn the following commands: + + sudo add-apt-repository -y ppa:moorkai/cinnamon + sudo apt-get update + sudo apt-get install cinnamon + +Have you tried Cinnamon 2.8? What do you think of it? + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/cinnamon-2-8-review/ + +作者:[Ayo Isaiah][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/ayoisaiah/ \ No newline at end of file From ccab0d95067d9880eaee1e3c8d8388b4efd5b16b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 1 Dec 2015 16:01:54 +0800 Subject: [PATCH 0437/1710] =?UTF-8?q?20151201-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t email client with encrypted passwords.md | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 sources/tech/20151201 How to use Mutt email client with encrypted passwords.md diff --git a/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md b/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md new file mode 100644 index 0000000000..5d7414588c --- /dev/null +++ b/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md @@ -0,0 +1,138 @@ +How to use Mutt email client with encrypted passwords +================================================================================ +Mutt is an open-source email client written for Linux/UNIX terminal environment. Together with [Alpine][1], Mutt has the most devoted followers among Linux command-line enthusiasts, and for good reasons. Think of anything you expect from an email client, and Mutt has it: multi-protocol support (e.g., POP3, IMAP and SMTP), S/MIME and PGP/GPG integration, threaded conversation, color coding, customizable macros/keybindings, and so on. Besides, terminal-based Mutt is a lightweight alternative for accessing emails compared to bulky web browser-based (e.g., Gmail, Ymail) or GUI-based email clients (e.g., Thunderbird, MS Outlook). + +When you want to use Mutt to access or send emails via corporate SMTP/IMAP servers or replace web mail services, one concern you may have is how to protect your email credentials (e.g., SMTP/IMAP passwords) stored in a plain-text Mutt configuration file (~/.muttrc). + +For those who are security-conscious, there is actually an easy way to **encrypt Mutt configuration** to prevent such risk. In this tutorial, I describe how you can encrypt sensitive Mutt configuration such as SMTP/IMAP passwords using GnuPG (GPG), an open-source implementation of OpenPGP. + +### Step One (Optional): Create GPG Key ### + +Since we are going to use GPG to encrypt Mutt configuration, the first step is to create a GPG key (public/private keypair) if you don't have one. If you do, skip this step. + +To create a new GPG key, type the following. + + $ gpg --gen-key + +Choose the key type (RSA), keysize (2048 bits), and expiration date (0: no expiration). When prompted for a user ID, type your name (Dan Nanni) and email address (myemail@email.com) to be associated with the private/public keypair. Finally, type a passphrase to protect your private key. + +![](https://c2.staticflickr.com/6/5726/22808727824_7735f11157_c.jpg) + +Generating a GPG key requires a lot of random bytes for entropy, so make sure to perform some random actions on your system (e.g., type on a keyboard, move a mouse or read/write a disk) during key generation. Depending on keysize, it may take a few minutes or more to generate a GPG key. + +![](https://c1.staticflickr.com/1/644/23328597612_6ac5a29944_c.jpg) + +### Step Two: Encrypt Sensitive Mutt Configuration ### + +Next, create a new text file in ~/.mutt directory, and put in the file any sensitive Mutt configuration you want to hide. In this example, I specify SMTP/IMAP passwords. + + $ mkdir ~/.mutt + $ vi ~/.mutt/password + +---------- + + set smtp_pass="XXXXXXX" + set imap_pass="XXXXXXX" + +Now encrypt this file with gpg using your public key as follows. + + $ gpg -r myemail@email.com -e ~/.mutt/password + +This will create ~/.mutt/password.gpg, which is a GPG-encrypted version of the original file. + +Go ahead and remove ~/.mutt/password, leaving only the GPG-encrypted version. + +### Step Three: Create Full Mutt Configuration ### + +Now that you have encrypted sensitive Mutt configuration in a separate file, you can specify the rest of your Mutt configuration in ~/.muttrc. Then add the following line at the end of ~/.muttrc. + + source "gpg -d ~/.mutt/password.gpg |" + +This line will decrypt ~/.mutt/password.gpg when you launch Mutt, and apply the decrypted content to your Mutt configuration. + +The following shows an example of full Mutt configuration which allows you to access Gmail with Mutt, without revealing your SMTP/IMAP passwords. Replace yourgmailaccount with your Gmail ID. + + set from = "yourgmailaccount@gmail.com" + set realname = "Your Name" + set smtp_url = "smtp://yourgmailaccount@smtp.gmail.com:587/" + set imap_user = "yourgmailaccount@gmail.com" + set folder = "imaps://imap.gmail.com:993" + set spoolfile = "+INBOX" + set postponed = "+[Google Mail]/Drafts" + set trash = "+[Google Mail]/Trash" + set header_cache =~/.mutt/cache/headers + set message_cachedir =~/.mutt/cache/bodies + set certificate_file =~/.mutt/certificates + set move = no + set imap_keepalive = 900 + + # encrypted IMAP/SMTP passwords + source "gpg -d ~/.mutt/password.gpg |" + +### Step Four (Optional): Configure GPG-agent ### + +At this point, you will be able to use Mutt with encrypted IMAP/SMTP passwords. However, every time you launch Mutt, you will first be prompted to enter a GPG passphrase in order to decrypt IMAP/SMTP passwords using your private key. + +![](https://c2.staticflickr.com/6/5667/23437064775_20c874940f_c.jpg) + +If you want to avoid such GPG passphrase prompts, you can set up gpg-agent. Running as a daemon, gpg-agent securely caches your GPG passphrase, so that gpg automatically obtains your GPG passphrase from gpg-agent without you typing it manually. If you are using Linux desktop, you can use desktop-specific ways to configure something equivalent to gpg-agent, for example, gnome-keyring-daemon for GNOME desktop. + +You can install gpg-agent on Debian-based systems with: + +$ sudo apt-get install gpg-agent + +gpg-agent comes pre-installed on Red Hat based systems. + +Now add the following to your .bashrc file. + + envfile="$HOME/.gnupg/gpg-agent.env" + if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then + eval "$(cat "$envfile")" + else + eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")" + fi + export GPG_AGENT_INFO + +Reload .bashrc, or simply log out and log back in. + + $ source ~/.bashrc + +Now confirm that GPG_AGENT_INFO environment variable is set properly. + + $ echo $GPG_AGENT_INFO + +---------- + + /tmp/gpg-0SKJw8/S.gpg-agent:942:1 + +Also, when you type gpg-agent command, you should see the following message. + + $ gpg-agent + +---------- + + gpg-agent: gpg-agent running and available + +Once gpg-agent is up and running, it will cache your GPG passphrase the first time you type it at the passphrase prompt. Subsequently when you launch Mutt multiple times, you won't be prompted for a GPG passphrase (as long as gpg-agent is up and the cache entry does not expire). + +![](https://c1.staticflickr.com/1/664/22809928093_3be57698ce_c.jpg) + +### Conclusion ### + +In this tutorial, I presented a way to encrypt sensitive Mutt configuration such as SMTP/IMAP passwords using GnuPG. Note that if you want to use GnuPG within Mutt to encrypt or sign your email message, you can refer to the [official guide][2] on using GPG with Mutt. + +If you know of any security tips for using Mutt, feel free to share it. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/mutt-email-client-encrypted-passwords.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/gmail-command-line-linux-alpine.html +[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG \ No newline at end of file From bdc06bee3ab0c3f6693f110c9f73e7080b778cb6 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 1 Dec 2015 17:26:43 +0800 Subject: [PATCH 0438/1710] Translating by ZTinoZ --- .../share/20151123 7 ways hackers can use Wi-Fi against you.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md index 09e33c4e53..58f4ff00c3 100644 --- a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -10,7 +10,7 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F ### 利用免费热点 ### -They seem to be everywhere, and their numbers are expected to [quadruple over the next four years][1]. But many of them are untrustworthy, created just so your login credentials, to email or even more sensitive accounts, can be picked up by hackers using “sniffers” — software that captures any information you submit over the connection. The best defense against sniffing hackers is to use a VPN (virtual private network). A VPN keeps your private data protected because it encrypts what you input. +它们似乎无处不在,而且它们的数量会在[下一个四年里增加四倍][1]。但是它们当中很多都是不值得信任的But many of them are untrustworthy, created just so your login credentials, to email or even more sensitive accounts, 都能被黑客用一款名叫“sniffers”的软件截获 — 这款软件能截获到任何你通过该连接提交的信息。The best defense against sniffing hackers is to use a VPN (virtual private network). A VPN keeps your private data protected because it encrypts what you input. ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/2_online-banking-100626675-orig.jpg) From 335f3ce78f8e85275ca0b80dfda292e24c1e8d5e Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 1 Dec 2015 18:18:49 +0800 Subject: [PATCH 0439/1710] translating --- ...1 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md b/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md index 6544ad3919..fdfb154aa6 100644 --- a/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md +++ b/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md @@ -1,3 +1,5 @@ +Translating + How to Install The Latest Arduino IDE 1.6.6 in Ubuntu ================================================================================ ![Install latest Arduino in Ubuntu](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-icon.png) @@ -74,4 +76,4 @@ via: http://ubuntuhandbook.org/index.php/2015/11/install-arduino-ide-1-6-6-ubunt [a]:http://ubuntuhandbook.org/index.php/about/ [1]:https://www.arduino.cc/en/Main/ReleaseNotes -[2]:https://www.arduino.cc/en/Main/Software \ No newline at end of file +[2]:https://www.arduino.cc/en/Main/Software From 33e17c80a45338d053e891afb65b2f660ca7e000 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 1 Dec 2015 18:40:52 +0800 Subject: [PATCH 0440/1710] translated --- ... The Latest Arduino IDE 1.6.6 in Ubuntu.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) rename {sources => translated}/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md (55%) diff --git a/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md b/translated/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md similarity index 55% rename from sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md rename to translated/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md index fdfb154aa6..668b9c3a80 100644 --- a/sources/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md +++ b/translated/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md @@ -1,68 +1,67 @@ -Translating - -How to Install The Latest Arduino IDE 1.6.6 in Ubuntu +如何再Ubuntu中安装最新的Arduino IDE 1.6.6 ================================================================================ ![Install latest Arduino in Ubuntu](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-icon.png) -> Quick tutorial shows you how to the latest Arduino IDE, so far its version 1.6.6, in all current Ubuntu releases. +> 本篇教程会教你如何在现在的Ubuntu发布版中安装最新的 Arduino IDE,目前的版本为1.6.6。 -The open-source Arduino IDE has reached the 1.6.6 release recently with lots of changes. The new release has switched to Java 8, which is now both bundled and needed for compiling the IDE. See the [RELEASE NOTE][1] for details. +开源的Arduino IDE发布了1.6.6,并带来了很多的改变。新的发布已经切换到Java 8,它与IDE绑定并且再编译时需要它。具体见[RELEASE NOTE][1]。 ![Arduino 1.6.6 in Ubuntu 15.10](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-ubuntu.jpg) -For those who don’t want to use the old 1.0.5 version available in Software Center, you can always follow below steps to install Arduino in all Ubuntu releases: +对于那些不想使用软件中心的1.0.5旧版本的人而言,你可以使用下面的步骤再所有的Ubuntu发行版中安装Ardunino。 注:下面这个说明下面的代码颜色,这个发布的时候要对照一下原文,写点说明,因为颜色在md里标识不出来 -> **Replace the words in red for future releases** +> **用红字替换将来的版本** **1.** Download the latest packages, **Linux 32-bit or Linux 64-bit**, from the official link below: +**1.** 从下面的官方链接下载最新的包 **Linux 32-bit 或者 Linux 64-bit**。 - [www.arduino.cc/en/Main/Software][2] -Don’t know your OS type? Go and check out System Settings -> Details -> Overview. +不知道你系统的类型?进入系统设置->详细->概览。 -**2.** Open **terminal** from Unity Dash, App Launcher, or via Ctrl+Alt+T keys. When it opens, run below commands one by one: +**2.** 从Unity Dash、App Launcher或者Ctrl+Alt+T打开终端。打开后,一个个运行下面的命令: -Navigate to your downloads folder: +进入下载文件夹: cd ~/Downloads ![navigate-downloads](http://ubuntuhandbook.org/wp-content/uploads/2015/11/navigate-downloads.jpg) -Decompress the downloaded archive with tar command: +使用tar命令解压 注:arduino-1.6.6-*.tar.xz 为红色部分 tar -xvf arduino-1.6.6-*.tar.xz ![extract-archive](http://ubuntuhandbook.org/wp-content/uploads/2015/11/extract-archive.jpg) -Move the result folder to **/opt/** directory for global use: +将解压后的文件移动到**/opt/**下: 注:arduino-1.6.6 为红色部分 sudo mv arduino-1.6.6 /opt ![move-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/11/move-opt.jpg) -**3.** Now the IDE is ready for use with bundled Java. But it would be good to create desktop icon/launcher for the application: +**3.** 现在IDE已经与最新的Java绑定使用了。但是最好位程序设置一个桌面图标/启动方式: -Navigate to install folder: +进入安装目录 注:arduino-1.6.6 为红色部分 cd /opt/arduino-1.6.6/ -Give executable permission to install.sh script in that folder: +在这个目录给install.sh可执行权限 chmod +x install.sh -Finally run the script to install both desktop shortcut and launcher icon: +最后运行脚本同事安装桌面快捷方式和启动图标: ./install.sh -In below picture I’ve combined 3 commands into one via “&&”: +下图中我用“&&”同事运行这三个命令: ![install-desktop-icon](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-desktop-icon.jpg) -Finally, launch Arduino IDE from Unity Dash, Application Launcher, or via Desktop shorcut. +最后从Unity Dash、程序启动器或者桌面快捷方式运行Arduino IDE。 -------------------------------------------------------------------------------- From 48b50dc0b4978074ff98df66adbc0926ac980fa7 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 1 Dec 2015 18:45:51 +0800 Subject: [PATCH 0441/1710] Update 20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md --- ...s--How to remove trailing whitespaces in a file on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md b/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md index 84c04e7436..e7c63a47c4 100644 --- a/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md +++ b/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux ================================================================================ > Question: I have a text file in which I need to remove all trailing whitespsaces (e.g., spaces and tabs) in each line for formatting purpose. Is there a quick and easy Linux command line tool I can use for this? @@ -50,4 +51,4 @@ via: http://ask.xmodulo.com/remove-trailing-whitespaces-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 43ce9400bb4b6cf44a794ae704c4c654f5c9c6c3 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 2 Dec 2015 00:35:14 +0800 Subject: [PATCH 0442/1710] Delete 20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md --- ...trailing whitespaces in a file on Linux.md | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md diff --git a/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md b/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md deleted file mode 100644 index e7c63a47c4..0000000000 --- a/sources/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md +++ /dev/null @@ -1,54 +0,0 @@ -translation by strugglingyouth -Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux -================================================================================ -> Question: I have a text file in which I need to remove all trailing whitespsaces (e.g., spaces and tabs) in each line for formatting purpose. Is there a quick and easy Linux command line tool I can use for this? - -When you are writing code for your program, you must understand that there are standard coding styles to follow. For example, "trailing whitespaces" are typically considered evil because when they get into a code repository for revision control, they can cause a lot of problems and confusion (e.g., "false diffs"). Many IDEs and text editors are capable of highlighting and automatically trimming trailing whitepsaces at the end of each line. - -Here are a few ways to **remove trailing whitespaces in Linux command-line environment**. - -### Method One ### - -A simple command line approach to remove unwanted whitespaces is via sed. - -The following command deletes all spaces and tabs at the end of each line in input.java. - - $ sed -i 's/[[:space:]]*$//' input.java - -If there are multiple files that need trailing whitespaces removed, you can use a combination of find and sed. For example, the following command deletes trailing whitespaces in all *.java files recursively found in the current directory as well as all its sub-directories. - - $ find . -name "*.java" -type f -print0 | xargs -0 sed -i 's/[[:space:]]*$//' - -### Method Two ### - -Vim text editor is able to highlight and trim whitespaces in a file as well. - -To highlight all trailing whitespaces in a file, open the file with Vim editor and enable text highlighting by typing the following in Vim command line mode. - - :set hlsearch - -Then search for trailing whitespaces by typing: - - /\s\+$ - -This will show all trailing spaces and tabs found throughout the file. - -![](https://c1.staticflickr.com/1/757/23198657732_bc40e757b4_b.jpg) - -Then to clean up all trailing whitespaces in a file with Vim, type the following Vim command. - - :%s/\s\+$// - -This command means substituting all whitespace characters found at the end of the line (\s\+$) with no character. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/remove-trailing-whitespaces-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 From 35d59d293cd41e12f1e508a1d9ef08c6b890a3b6 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 2 Dec 2015 00:38:36 +0800 Subject: [PATCH 0443/1710] Create 20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md --- ...trailing whitespaces in a file on Linux.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 translated/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md diff --git a/translated/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md b/translated/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md new file mode 100644 index 0000000000..f7644bcabb --- /dev/null +++ b/translated/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md @@ -0,0 +1,60 @@ + +如何在 Ubuntu 16.04,15.10,14.04 中安装 GIMP 2.8.16 +================================================================================ +![GIMP 2.8.16](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-icon.png) + +GIMP 图像编辑器 2.8.16 版本在其20岁生日时发布了。下面是如何安装或升级 GIMP 在 Ubuntu 16.04, Ubuntu 15.10, Ubuntu 14.04, Ubuntu 12.04 及其衍生版本中,如,Linux Mint 17.x/13, Elementary OS Freya。 + +GIMP 2.8.16 支持层组在 OpenRaster 文件中,修复了在 PSD 中的层组支持以及各种用户接口改进,OSX 系统修复构建并有许多新的变化。请阅读 [官方声明][1]。 + +![GIMP image editor 2.8,16](http://ubuntuhandbook.org/wp-content/uploads/2014/08/gimp-2-8-14.jpg) + +### 如何安装或升级: ### + +多亏了 Otto Meier,[Ubuntu PPA][2] 中最新的 GIMP 包可用于当前所有的 Ubuntu 版本和其衍生版。 + +**1. 添加 GIMP PPA** + +从 Unity Dash 中打开终端,或通过 Ctrl+Alt+T 快捷键。在它打开它后,粘贴下面的命令并回车: + + sudo add-apt-repository ppa:otto-kesselgulasch/gimp + +![add GIMP PPA](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-ppa.jpg) + +输入你的密码,密码不会在终端显示,然后回车继续。 + +**2. 安装或升级编辑器** + +在添加了 PPA 后,启动 **Software Updater**(在 Mint 中是 Software Manager)。检查更新后,你将看到 GIMP 的更新列表。点击 “Install Now” 进行升级。 + +![upgrade-gimp2816](http://ubuntuhandbook.org/wp-content/uploads/2015/11/upgrade-gimp2816.jpg) + +对于那些喜欢 Linux 命令的,按顺序执行下面的命令,刷新仓库的缓存然后安装 GIMP: + + sudo apt-get update + + sudo apt-get install gimp + +**3. (可选的) 卸载** + +如果你想卸载或降级 GIMP 图像编辑器。从软件中心直接删除它,或者按顺序运行下面的命令来将 PPA 清除并降级软件: + + sudo apt-get install ppa-purge + + sudo ppa-purge ppa:otto-kesselgulasch/gimp + +就这样。玩的愉快! + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/how-to-install-gimp-2-8-16-in-ubuntu-16-04-15-10-14-04/ + +作者:[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]:http://www.gimp.org/news/2015/11/22/20-years-of-gimp-release-of-gimp-2816/ +[2]:https://launchpad.net/~otto-kesselgulasch/+archive/ubuntu/gimp From bfba7ad3400da4879bb90de7b7a0dadaa29881e4 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Wed, 2 Dec 2015 00:52:25 +0800 Subject: [PATCH 0444/1710] Update 20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md --- ...tihomed ISC DHCP Server on Debian Linux.md | 91 +++++++++++++++++-- 1 file changed, 85 insertions(+), 6 deletions(-) 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 index 2a8bdb2fbd..8fb67f0697 100644 --- 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 @@ -1,159 +1,238 @@ How to Install and Configure Multihomed ISC DHCP Server on Debian Linux +debian linux上安装配置 ISC DHCP Server ================================================================================ 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. +动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 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. +本节教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),但是它也可以非常简单的用于单一网络。 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. +测试用的网络是通过思科路由器依赖传统的方式来管DHCP租约地址,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP这个责任转移到一个专用的服务器上面,路由器可以回收资源去用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 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. - +另一个将DHCP服务移动到专用服务器的好处,后续会讲到,建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。 ### Step 1: Installing and Configuring ISC DHCP Server ### +### 安装和配置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. +1. 创建这个多宿主服务器的过程中,需要用apt工具来安装Debian软件仓库中的ISC软件。与其他教程一样需要使用root或者sudo访问权限。请适当的修改以使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限) - # 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] + + # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件] + # dpkg --get-selections isc-dhcp-server [确认软件已经成功安装] + # dpkg -s isc-dhcp-server [用另一种方式确认成功安装] ![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: +2. 现在已经确认服务软件安装完毕,现在需要配置服务器,它将分发网络信息。作为管理员你最起码应该了解DHCP的信息如下: - 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 +- DNS服务器IP地址 - 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: +这只是很少一部分能让ISC DHCP server处理的选项。完整的查看所有选项及其描述需要在安装好软件后输入以下命令: # 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. +3. 一旦管理员已经确定了这台服务器需要分发出去的必要信息,那么是时候配置它和分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来监听这台服务器上面的一个接口。 + 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. +在这台特定的服务器上,一个网卡设置好后,DHCP会监听命名为`'bond0'`的接口。请适确保适当的更改服务器以及网络环境。下面默认的配置都是针对于本次教程的。 ![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: +这行指定的是DHCP服务监听接口(一个或多个)上的DHCP流量。修改主要的配置文件分派DHCP池配置在所需要的网络上。主要的配置文件的位置在/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 # 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. +这个配置文件可以配置我们想的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS, ISC-DHCP-Server 将被整合到 BIND9为了能够使主机名更新到IP地址。 + 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. +4. 接下来的部分 是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。想更多地了解所有的选项,阅读man手册dhcpd.conf文件,命令如下: + # 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 “comptech.local”; – 所有使用这台DHCP服务器的主机,将成为DNS域名“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 domain-name-servers 172.27.10.6; DHCP 将向所有配置好的网络主机分发DNS服务器地址172.27.10.6 - 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 +- option subnet-mask 255.255.255.0; – 分派子网掩码到每一个网络设备 255.255.255.0 或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. +- default-lease-time 3600; – 有效的地址租约时间,单位是秒。如果租约时间耗尽主机可以重新申请租约。如果租约完成那么相应的地址也将被尽快回收。 - max-lease-time 86400; – This is the maximum amount of time in seconds a lease can be held by a host. +- max-lease-time 86400; – 这是一个主机最大的租约时间,单位为秒。 - 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-check true; – 这是一个额外的测试,以确保服务器分配出的地址不是一个网络内另一台主机已使用的网络地址。 - 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. +- ping-timeout; – 假设地址以前没有使用,用这个来检测2个ping值回应之间的时间长度。 - 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. +- ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中被禁用,但是当DDNS运行,此选项会忽略一个主机请求的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. +5. 文件中的下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么就取消注释权威节(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. +通过去掉关键字authoritative 前面的‘#’,取消注释全局权威节。那么该服务器将是它管理网络里面的唯一权威。 ![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) Enable ISC Authoritative +开启 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. +默认情况下服务器被假定为不是网络上的权威。这样做的理由是为了安全。如果有人因为不了解DHCP服务的配置导致配置不当或在一个不该出现的网络里面,这都将会造成非常严重的重连接问题。这行还可用在每个网络中单独使用。这意味着如果该服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图显示中的全局配置那样。 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). +6. 下一步是配置所有的服务器将要管理的DHCP地址池/网络。简短起见,这个教程将只配置地址池。作为管理员需要收集所有必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) 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! +以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认网关172.27.60.1,广播地址 172.27.60.255. # 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 +配置DHCP的地址池和网络 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. +这例子是分配IP地址给用VMWare创建的虚拟服务器。第一行标明是该网络的子网掩码。括号里面是DHCP服务器应该提供给当前网络上主机的所有选项。 + 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. +第一节, range 172.27.60.50 172.27.60.254;是DHCP服务在这个网络上能够给主机动态分发的地址范围。 + The second stanza, option routers 172.27.60.1; , hands out the default gateway address for all hosts on this network. +第二节,option routers 172.27.60.1;给网络里面所有的主机分发默认网关地址。 + 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. +最后一节, option broadcast-address 172.27.60.255;,说明当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 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: +7. 如果是创建多个网络,持续的创建它们的相应选项最终保存文本文件。一旦配置完成, ISC-DHCP-Server进程需要重启来使新的更改生效。可以通过下面的命令来完成: # 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]: +这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在监听67端口,命令如下: + # lsof -i :67 ![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) Check DHCP Listening Port +检查DHCP监听端口 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. +这里的输出表明DHCPD(DHCP服务守护进程)正在运行并且监听67端口。由于/etc/services文件中67端口的端口映射,输出中的67端口实际上被转换成了“bootps”。 + 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. +在大多数的系统中这是非常普遍的,此时,服务器应该已经为网络连接做好准备,可以通过将一台主机接入网络请求DHCP地址来验证服务是否正常。 + ### 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. +8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个装置应该预先配置,当接口是活跃的时候来获取DHCP。 + 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. +然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将展示如何做到这一点以及如何查看服务器是否分发地址。 + 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][2]‘工具能够用来检查接口配置。这台设备被用来监测DHCP服务它只有一个网络适配器(网卡),这块网卡被命名为‘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 +检查网络接口IP地址 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. +从输出结果上看,这台设备目前没有一个IPv4地址,很好这样便于测试。让这台设备连接到DHCP服务器并发出一个请求。这台设备上安装了一个名为‘dhclient‘ 的DHCP客户端工具。这个客户端工具会因为系统不同而不同。 # dhclient eth0 ![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) Request IP Address from DHCP +从DHCP请求IP地址 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. +现在 `'inet addr:'` 字段显示了属于172.27.60.0网络地址范围内的IPv4地址。另外要注意:目前该网络配置了正确的子网掩码并且分发了广播地址。 + 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. +看起来还不错,让我们来测试一下,看看它是不是这台设备收到新IP地址的地方。我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,而不是使用一个完整的文本编辑器去查看日志文件。命令如下: + # tail /var/log/syslog ![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) Check DHCP Logs +检查DHCP日志文件 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. +OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。到这里DHCP服务器搭建成功并且运行起来了。配置其他的网络,排查故障,确保安全。 + 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. +更多新的 ISC-DHCP-Server 的功能在以后的Debian教程中会被提及。不久以后将写一篇关于Bind9和DDNS的教程,插入到这篇文章里面。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ 作者:[Rob Turner][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ivo-wang](https://github.com/ivo-wang) 校对:[校对者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 +[2]:http://www.tecmint.com/ifconfig-command-examples/ From b4298a2bb67499c265dee5b7db50c8123b67ead4 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Wed, 2 Dec 2015 00:55:12 +0800 Subject: [PATCH 0445/1710] Delete 20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md --- ...tihomed ISC DHCP Server on Debian Linux.md | 238 ------------------ 1 file changed, 238 deletions(-) delete mode 100644 sources/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md 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 deleted file mode 100644 index 8fb67f0697..0000000000 --- a/sources/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md +++ /dev/null @@ -1,238 +0,0 @@ -How to Install and Configure Multihomed ISC DHCP Server on Debian Linux -debian linux上安装配置 ISC DHCP Server -================================================================================ -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. -动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 - -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. -本节教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),但是它也可以非常简单的用于单一网络。 - -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. -测试用的网络是通过思科路由器依赖传统的方式来管DHCP租约地址,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP这个责任转移到一个专用的服务器上面,路由器可以回收资源去用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 - -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. -另一个将DHCP服务移动到专用服务器的好处,后续会讲到,建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。 -### Step 1: Installing and Configuring ISC DHCP Server ### -### 安装和配置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. -1. 创建这个多宿主服务器的过程中,需要用apt工具来安装Debian软件仓库中的ISC软件。与其他教程一样需要使用root或者sudo访问权限。请适当的修改以使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限) - - - # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件] - # dpkg --get-selections isc-dhcp-server [确认软件已经成功安装] - # dpkg -s isc-dhcp-server [用另一种方式确认成功安装] - -![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: - -2. 现在已经确认服务软件安装完毕,现在需要配置服务器,它将分发网络信息。作为管理员你最起码应该了解DHCP的信息如下: -- 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 -- DNS服务器IP地址 -- 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: - -这只是很少一部分能让ISC DHCP server处理的选项。完整的查看所有选项及其描述需要在安装好软件后输入以下命令: - # 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. - -3. 一旦管理员已经确定了这台服务器需要分发出去的必要信息,那么是时候配置它和分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来监听这台服务器上面的一个接口。 - -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. - -在这台特定的服务器上,一个网卡设置好后,DHCP会监听命名为`'bond0'`的接口。请适确保适当的更改服务器以及网络环境。下面默认的配置都是针对于本次教程的。 -![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: - -这行指定的是DHCP服务监听接口(一个或多个)上的DHCP流量。修改主要的配置文件分派DHCP池配置在所需要的网络上。主要的配置文件的位置在/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 - # 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. - -这个配置文件可以配置我们想的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS, ISC-DHCP-Server 将被整合到 BIND9为了能够使主机名更新到IP地址。 - -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. - -4. 接下来的部分 是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。想更多地了解所有的选项,阅读man手册dhcpd.conf文件,命令如下: - - # 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 “comptech.local”; – 所有使用这台DHCP服务器的主机,将成为DNS域名“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 domain-name-servers 172.27.10.6; DHCP 将向所有配置好的网络主机分发DNS服务器地址172.27.10.6 -- 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 -- option subnet-mask 255.255.255.0; – 分派子网掩码到每一个网络设备 255.255.255.0 或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. -- default-lease-time 3600; – 有效的地址租约时间,单位是秒。如果租约时间耗尽主机可以重新申请租约。如果租约完成那么相应的地址也将被尽快回收。 -- max-lease-time 86400; – This is the maximum amount of time in seconds a lease can be held by a host. -- max-lease-time 86400; – 这是一个主机最大的租约时间,单位为秒。 -- 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-check true; – 这是一个额外的测试,以确保服务器分配出的地址不是一个网络内另一台主机已使用的网络地址。 -- 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. -- ping-timeout; – 假设地址以前没有使用,用这个来检测2个ping值回应之间的时间长度。 -- 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. -- ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中被禁用,但是当DDNS运行,此选项会忽略一个主机请求的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. -5. 文件中的下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么就取消注释权威节(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. - -通过去掉关键字authoritative 前面的‘#’,取消注释全局权威节。那么该服务器将是它管理网络里面的唯一权威。 -![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) -Enable ISC Authoritative -开启 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. -默认情况下服务器被假定为不是网络上的权威。这样做的理由是为了安全。如果有人因为不了解DHCP服务的配置导致配置不当或在一个不该出现的网络里面,这都将会造成非常严重的重连接问题。这行还可用在每个网络中单独使用。这意味着如果该服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图显示中的全局配置那样。 - -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). - -6. 下一步是配置所有的服务器将要管理的DHCP地址池/网络。简短起见,这个教程将只配置地址池。作为管理员需要收集所有必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) -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! - -以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认网关172.27.60.1,广播地址 172.27.60.255. - # 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 -配置DHCP的地址池和网络 - -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. - -这例子是分配IP地址给用VMWare创建的虚拟服务器。第一行标明是该网络的子网掩码。括号里面是DHCP服务器应该提供给当前网络上主机的所有选项。 - -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. - -第一节, range 172.27.60.50 172.27.60.254;是DHCP服务在这个网络上能够给主机动态分发的地址范围。 - -The second stanza, option routers 172.27.60.1; , hands out the default gateway address for all hosts on this network. - -第二节,option routers 172.27.60.1;给网络里面所有的主机分发默认网关地址。 - -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. - -最后一节, option broadcast-address 172.27.60.255;,说明当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 -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: - -7. 如果是创建多个网络,持续的创建它们的相应选项最终保存文本文件。一旦配置完成, ISC-DHCP-Server进程需要重启来使新的更改生效。可以通过下面的命令来完成: - # 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]: - -这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在监听67端口,命令如下: - - # lsof -i :67 - -![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) -Check DHCP Listening Port -检查DHCP监听端口 - -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. - -这里的输出表明DHCPD(DHCP服务守护进程)正在运行并且监听67端口。由于/etc/services文件中67端口的端口映射,输出中的67端口实际上被转换成了“bootps”。 - -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. - -在大多数的系统中这是非常普遍的,此时,服务器应该已经为网络连接做好准备,可以通过将一台主机接入网络请求DHCP地址来验证服务是否正常。 - -### 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. - -8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个装置应该预先配置,当接口是活跃的时候来获取DHCP。 - -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. - -然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将展示如何做到这一点以及如何查看服务器是否分发地址。 - -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][2]‘工具能够用来检查接口配置。这台设备被用来监测DHCP服务它只有一个网络适配器(网卡),这块网卡被命名为‘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 -检查网络接口IP地址 - -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. - -从输出结果上看,这台设备目前没有一个IPv4地址,很好这样便于测试。让这台设备连接到DHCP服务器并发出一个请求。这台设备上安装了一个名为‘dhclient‘ 的DHCP客户端工具。这个客户端工具会因为系统不同而不同。 - # dhclient eth0 - -![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) -Request IP Address from DHCP -从DHCP请求IP地址 - -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. - -现在 `'inet addr:'` 字段显示了属于172.27.60.0网络地址范围内的IPv4地址。另外要注意:目前该网络配置了正确的子网掩码并且分发了广播地址。 - -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. - -看起来还不错,让我们来测试一下,看看它是不是这台设备收到新IP地址的地方。我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,而不是使用一个完整的文本编辑器去查看日志文件。命令如下: - - # tail /var/log/syslog - -![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) -Check DHCP Logs -检查DHCP日志文件 - -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. - -OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。到这里DHCP服务器搭建成功并且运行起来了。配置其他的网络,排查故障,确保安全。 - -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. - -更多新的 ISC-DHCP-Server 的功能在以后的Debian教程中会被提及。不久以后将写一篇关于Bind9和DDNS的教程,插入到这篇文章里面。 --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ - -作者:[Rob Turner][a] -译者:[ivo-wang](https://github.com/ivo-wang) -校对:[校对者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/ From d213569c9b0691f9853c407534d30d19a43f778e Mon Sep 17 00:00:00 2001 From: ivo wang Date: Wed, 2 Dec 2015 00:58:23 +0800 Subject: [PATCH 0446/1710] Create How to Install and Configure Multihomed ISC DHCP Server on Debian Linux --- ...Multihomed ISC DHCP Server on Debian Linux | 238 ++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 translated/tech/How to Install and Configure Multihomed ISC DHCP Server on Debian Linux diff --git a/translated/tech/How to Install and Configure Multihomed ISC DHCP Server on Debian Linux b/translated/tech/How to Install and Configure Multihomed ISC DHCP Server on Debian Linux new file mode 100644 index 0000000000..8fb67f0697 --- /dev/null +++ b/translated/tech/How to Install and Configure Multihomed ISC DHCP Server on Debian Linux @@ -0,0 +1,238 @@ +How to Install and Configure Multihomed ISC DHCP Server on Debian Linux +debian linux上安装配置 ISC DHCP Server +================================================================================ +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. +动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 + +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. +本节教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),但是它也可以非常简单的用于单一网络。 + +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. +测试用的网络是通过思科路由器依赖传统的方式来管DHCP租约地址,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP这个责任转移到一个专用的服务器上面,路由器可以回收资源去用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 + +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. +另一个将DHCP服务移动到专用服务器的好处,后续会讲到,建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。 +### Step 1: Installing and Configuring ISC DHCP Server ### +### 安装和配置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. +1. 创建这个多宿主服务器的过程中,需要用apt工具来安装Debian软件仓库中的ISC软件。与其他教程一样需要使用root或者sudo访问权限。请适当的修改以使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限) + + + # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件] + # dpkg --get-selections isc-dhcp-server [确认软件已经成功安装] + # dpkg -s isc-dhcp-server [用另一种方式确认成功安装] + +![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: + +2. 现在已经确认服务软件安装完毕,现在需要配置服务器,它将分发网络信息。作为管理员你最起码应该了解DHCP的信息如下: +- 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 +- DNS服务器IP地址 +- 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: + +这只是很少一部分能让ISC DHCP server处理的选项。完整的查看所有选项及其描述需要在安装好软件后输入以下命令: + # 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. + +3. 一旦管理员已经确定了这台服务器需要分发出去的必要信息,那么是时候配置它和分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来监听这台服务器上面的一个接口。 + +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. + +在这台特定的服务器上,一个网卡设置好后,DHCP会监听命名为`'bond0'`的接口。请适确保适当的更改服务器以及网络环境。下面默认的配置都是针对于本次教程的。 +![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: + +这行指定的是DHCP服务监听接口(一个或多个)上的DHCP流量。修改主要的配置文件分派DHCP池配置在所需要的网络上。主要的配置文件的位置在/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 + # 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. + +这个配置文件可以配置我们想的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS, ISC-DHCP-Server 将被整合到 BIND9为了能够使主机名更新到IP地址。 + +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. + +4. 接下来的部分 是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。想更多地了解所有的选项,阅读man手册dhcpd.conf文件,命令如下: + + # 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 “comptech.local”; – 所有使用这台DHCP服务器的主机,将成为DNS域名“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 domain-name-servers 172.27.10.6; DHCP 将向所有配置好的网络主机分发DNS服务器地址172.27.10.6 +- 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 +- option subnet-mask 255.255.255.0; – 分派子网掩码到每一个网络设备 255.255.255.0 或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. +- default-lease-time 3600; – 有效的地址租约时间,单位是秒。如果租约时间耗尽主机可以重新申请租约。如果租约完成那么相应的地址也将被尽快回收。 +- max-lease-time 86400; – This is the maximum amount of time in seconds a lease can be held by a host. +- max-lease-time 86400; – 这是一个主机最大的租约时间,单位为秒。 +- 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-check true; – 这是一个额外的测试,以确保服务器分配出的地址不是一个网络内另一台主机已使用的网络地址。 +- 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. +- ping-timeout; – 假设地址以前没有使用,用这个来检测2个ping值回应之间的时间长度。 +- 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. +- ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中被禁用,但是当DDNS运行,此选项会忽略一个主机请求的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. +5. 文件中的下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么就取消注释权威节(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. + +通过去掉关键字authoritative 前面的‘#’,取消注释全局权威节。那么该服务器将是它管理网络里面的唯一权威。 +![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) +Enable ISC Authoritative +开启 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. +默认情况下服务器被假定为不是网络上的权威。这样做的理由是为了安全。如果有人因为不了解DHCP服务的配置导致配置不当或在一个不该出现的网络里面,这都将会造成非常严重的重连接问题。这行还可用在每个网络中单独使用。这意味着如果该服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图显示中的全局配置那样。 + +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). + +6. 下一步是配置所有的服务器将要管理的DHCP地址池/网络。简短起见,这个教程将只配置地址池。作为管理员需要收集所有必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) +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! + +以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认网关172.27.60.1,广播地址 172.27.60.255. + # 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 +配置DHCP的地址池和网络 + +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. + +这例子是分配IP地址给用VMWare创建的虚拟服务器。第一行标明是该网络的子网掩码。括号里面是DHCP服务器应该提供给当前网络上主机的所有选项。 + +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. + +第一节, range 172.27.60.50 172.27.60.254;是DHCP服务在这个网络上能够给主机动态分发的地址范围。 + +The second stanza, option routers 172.27.60.1; , hands out the default gateway address for all hosts on this network. + +第二节,option routers 172.27.60.1;给网络里面所有的主机分发默认网关地址。 + +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. + +最后一节, option broadcast-address 172.27.60.255;,说明当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 +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: + +7. 如果是创建多个网络,持续的创建它们的相应选项最终保存文本文件。一旦配置完成, ISC-DHCP-Server进程需要重启来使新的更改生效。可以通过下面的命令来完成: + # 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]: + +这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在监听67端口,命令如下: + + # lsof -i :67 + +![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) +Check DHCP Listening Port +检查DHCP监听端口 + +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. + +这里的输出表明DHCPD(DHCP服务守护进程)正在运行并且监听67端口。由于/etc/services文件中67端口的端口映射,输出中的67端口实际上被转换成了“bootps”。 + +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. + +在大多数的系统中这是非常普遍的,此时,服务器应该已经为网络连接做好准备,可以通过将一台主机接入网络请求DHCP地址来验证服务是否正常。 + +### 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. + +8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个装置应该预先配置,当接口是活跃的时候来获取DHCP。 + +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. + +然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将展示如何做到这一点以及如何查看服务器是否分发地址。 + +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][2]‘工具能够用来检查接口配置。这台设备被用来监测DHCP服务它只有一个网络适配器(网卡),这块网卡被命名为‘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 +检查网络接口IP地址 + +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. + +从输出结果上看,这台设备目前没有一个IPv4地址,很好这样便于测试。让这台设备连接到DHCP服务器并发出一个请求。这台设备上安装了一个名为‘dhclient‘ 的DHCP客户端工具。这个客户端工具会因为系统不同而不同。 + # dhclient eth0 + +![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) +Request IP Address from DHCP +从DHCP请求IP地址 + +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. + +现在 `'inet addr:'` 字段显示了属于172.27.60.0网络地址范围内的IPv4地址。另外要注意:目前该网络配置了正确的子网掩码并且分发了广播地址。 + +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. + +看起来还不错,让我们来测试一下,看看它是不是这台设备收到新IP地址的地方。我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,而不是使用一个完整的文本编辑器去查看日志文件。命令如下: + + # tail /var/log/syslog + +![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) +Check DHCP Logs +检查DHCP日志文件 + +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. + +OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。到这里DHCP服务器搭建成功并且运行起来了。配置其他的网络,排查故障,确保安全。 + +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. + +更多新的 ISC-DHCP-Server 的功能在以后的Debian教程中会被提及。不久以后将写一篇关于Bind9和DDNS的教程,插入到这篇文章里面。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ + +作者:[Rob Turner][a] +译者:[ivo-wang](https://github.com/ivo-wang) +校对:[校对者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/ From aa181f5e40c147e90a2e99105d63dc0820515b04 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Wed, 2 Dec 2015 00:59:44 +0800 Subject: [PATCH 0447/1710] Rename How to Install and Configure Multihomed ISC DHCP Server on Debian Linux to 20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md --- ...l and Configure Multihomed ISC DHCP Server on Debian Linux.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{How to Install and Configure Multihomed ISC DHCP Server on Debian Linux => 20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md} (100%) diff --git a/translated/tech/How to Install and Configure Multihomed ISC DHCP Server on Debian Linux b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md similarity index 100% rename from translated/tech/How to Install and Configure Multihomed ISC DHCP Server on Debian Linux rename to translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md From b0e82b8011cd4be511214353d91546bfbb8fa83c Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 2 Dec 2015 08:32:45 +0800 Subject: [PATCH 0448/1710] Rename 20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md to 20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md --- ...w to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md => 20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md} (100%) diff --git a/translated/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md b/translated/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md similarity index 100% rename from translated/tech/20151126 Linux FAQs with Answers--How to remove trailing whitespaces in a file on Linux.md rename to translated/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md From 9722476d3f2c3e5183a0369b253ffa7505796942 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 2 Dec 2015 08:33:21 +0800 Subject: [PATCH 0449/1710] Delete 20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md --- ....8.16 in Ubuntu 16.04 or 15.10 or 14.04.md | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md diff --git a/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md b/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md deleted file mode 100644 index 8465520fc5..0000000000 --- a/sources/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md +++ /dev/null @@ -1,60 +0,0 @@ -translation by strugglingyouth -How to Install GIMP 2.8.16 in Ubuntu 16.04, 15.10, 14.04 -================================================================================ -![GIMP 2.8.16](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-icon.png) - -GIMP image editor 2.8.16 was released on its 20th birthday. Here’s how to install or upgrade in Ubuntu 16.04, Ubuntu 15.10, Ubuntu 14.04, Ubuntu 12.04 and their derivatives, e.g., Linux Mint 17.x/13, Elementary OS Freya. - -GIMP 2.8.16 features support for layer groups in OpenRaster files, fixes for layer groups support in PSD, various user inrterface improvements, OSX build system fixes, translation updates, and more changes. Read the [official announcement][1]. - -![GIMP image editor 2.8,16](http://ubuntuhandbook.org/wp-content/uploads/2014/08/gimp-2-8-14.jpg) - -### How to Install or Upgrade: ### - -Thanks to Otto Meier, an [Ubuntu PPA][2] with latest GIMP packages is available for all current Ubuntu releases and derivatives. - -**1. Add GIMP PPA** - -Open terminal from Unity Dash, App launcher, or via Ctrl+Alt+T shortcut key. When it opens, paste below command and hit Enter: - - sudo add-apt-repository ppa:otto-kesselgulasch/gimp - -![add GIMP PPA](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-ppa.jpg) - -Type in your password when it asks, no visual feedback so just type in mind, and hit enter to continue. - -**2. Install or Upgrade the editor.** - -After added the PPA, launch **Software Updater** (or Software Manager in Mint). After checking for updates, you’ll see GIMP in the update list. Click “Install Now” to upgrade it. - -![upgrade-gimp2816](http://ubuntuhandbook.org/wp-content/uploads/2015/11/upgrade-gimp2816.jpg) - -For those who prefer Linux commands, run below commands one by one to refresh your repository caches and install GIMP: - - sudo apt-get update - - sudo apt-get install gimp - -**3. (Optional) Uninstall.** - -Just in case you want to uninstall or downgrade GIMP image editor. Use Software Center to remove it, or run below commands one by one to purge PPA as well as downgrade the software: - - sudo apt-get install ppa-purge - - sudo ppa-purge ppa:otto-kesselgulasch/gimp - -That’s it. Enjoy! - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/11/how-to-install-gimp-2-8-16-in-ubuntu-16-04-15-10-14-04/ - -作者:[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.gimp.org/news/2015/11/22/20-years-of-gimp-release-of-gimp-2816/ -[2]:https://launchpad.net/~otto-kesselgulasch/+archive/ubuntu/gimp From c53445a869b7bbe515c5ce6d9df45e19641e92ec Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 1 Dec 2015 16:19:11 +0800 Subject: [PATCH 0450/1710] =?UTF-8?q?20151201-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ur Ubuntu or Linux Mint with SystemBack.md | 40 ++++++++ ... Port Scanning With netcat [nc] Command.md | 96 +++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md create mode 100644 sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md diff --git a/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md new file mode 100644 index 0000000000..98193a8f72 --- /dev/null +++ b/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md @@ -0,0 +1,40 @@ +Backup (System Restore Point) your Ubuntu/Linux Mint with SystemBack +================================================================================ +System Restore is must have feature for any OS that allows the user to revert their computer's state (including system files, installed applications, and system settings) to that of a previous point in time, which can be used to recover from system malfunctions or other problems. +Sometimes installing a program or driver can make your OS go to blank screen. System Restore can return your PC's system files and programs to a time when everything was working fine, potentially preventing hours of troubleshooting headaches. It won't affect your documents, pictures, or other data. +Simple system backup and restore application with extra features. [Systemback][1] makes it easy to create backups of system and users configuration files. In case of problems you can easily restore the previous state of the system. There are extra features like system copying, system installation and Live system creation. + +Screenshots + +![systemback](http://2.bp.blogspot.com/-2UPS3yl3LHw/VlilgtGAlvI/AAAAAAAAGts/ueRaAghXNvc/s1600/systemback-1.jpg) + +![systemback](http://2.bp.blogspot.com/-7djBLbGenxE/Vlilgk-FZHI/AAAAAAAAGtk/2PVNKlaPO-c/s1600/systemback-2.jpg) + +![](http://3.bp.blogspot.com/-beZYwKrsT4o/VlilgpThziI/AAAAAAAAGto/cwsghXFNGRA/s1600/systemback-3.jpg) + +![](http://1.bp.blogspot.com/-t_gmcoQZrvM/VlilhLP--TI/AAAAAAAAGt0/GWBg6bGeeaI/s1600/systemback-5.jpg) + +**Note**: Using System Restore will not restore documents, music, emails, or personal files of any kind. Depending on your perspective, this is both a positive and negative feature. The bad news is that it won't restore that accidentally deleted file you wish you could get back, though a file recovery program might solve that problem. +If no restore point exists on your computer, System Restore has nothing to revert to so the tool won't work for you. If you're trying to recover from a major problem, you'll need to move on to another troubleshooting step. + +>>> Available for Ubuntu 15.10 Wily/16.04/15.04 Vivid/14.04 Trusty/Linux Mint 17.x/other Ubuntu derivatives +To install SystemBack Application in Ubuntu/Linux Mint open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal: + +Terminal Commands: + + sudo add-apt-repository ppa:nemh/systemback + sudo apt-get update + sudo apt-get install systemback + +That's it + +-------------------------------------------------------------------------------- + +via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://launchpad.net/systemback \ No newline at end of file diff --git a/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md b/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md new file mode 100644 index 0000000000..1358968910 --- /dev/null +++ b/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md @@ -0,0 +1,96 @@ +Linux and Unix Port Scanning With netcat [nc] Command +================================================================================ +How do I find out which ports are opened on my own server? How do I run port scanning using the nc command instead of [the nmap command on a Linux or Unix-like][1] systems? + +The nmap (“Network Mapper”) is an open source tool for network exploration and security auditing. If nmap is not installed and you do not wish to use all of nmap options you can use netcat/nc command for scanning ports. This may useful to know which ports are open and running services on a target machine. You can use [nmap command for port scanning][2] too. + +### How do I use nc to scan Linux, UNIX and Windows server port scanning? ### + +If nmap is not installed try nc / netcat command as follow. The -z flag can be used to tell nc to report open ports, rather than initiate a connection. Run nc command with -z flag. You need to specify host name / ip along with the port range to limit and speedup operation: + + ## syntax ## + nc -z -v {host-name-here} {port-range-here} + nc -z -v host-name-here ssh + nc -z -v host-name-here 22 + nc -w 1 -z -v server-name-here port-Number-her + + ## scan 1 to 1023 ports ## + nc -zv vip-1.vsnl.nixcraft.in 1-1023 + +Sample outputs: + + Connection to localhost 25 port [tcp/smtp] succeeded! + Connection to vip-1.vsnl.nixcraft.in 25 port [tcp/smtp] succeeded! + Connection to vip-1.vsnl.nixcraft.in 80 port [tcp/http] succeeded! + Connection to vip-1.vsnl.nixcraft.in 143 port [tcp/imap] succeeded! + Connection to vip-1.vsnl.nixcraft.in 199 port [tcp/smux] succeeded! + Connection to vip-1.vsnl.nixcraft.in 783 port [tcp/*] succeeded! + Connection to vip-1.vsnl.nixcraft.in 904 port [tcp/vmware-authd] succeeded! + Connection to vip-1.vsnl.nixcraft.in 993 port [tcp/imaps] succeeded! + +You can scan individual port too: + + nc -zv v.txvip1 443 + nc -zv v.txvip1 80 + nc -zv v.txvip1 22 + nc -zv v.txvip1 21 + nc -zv v.txvip1 smtp + nc -zvn v.txvip1 ftp + + ## really fast scanner with 1 timeout value ## + netcat -v -z -n -w 1 v.txvip1 1-1023 + +Sample outputs: + +![Fig.01: Linux/Unix: Use Netcat to Establish and Test TCP and UDP Connections on a Server](http://s0.cyberciti.org/uploads/faq/2007/07/scan-with-nc.jpg) + +Fig.01: Linux/Unix: Use Netcat to Establish and Test TCP and UDP Connections on a Server + +Where, + +1. -z : Port scanning mode i.e. zero I/O mode. +1. -v : Be verbose [use twice -vv to be more verbose]. +1. -n : Use numeric-only IP addresses i.e. do not use DNS to resolve ip addresses. +1. -w 1 : Set time out value to 1. + +More examples: + + $ netcat -z -vv www.cyberciti.biz http + www.cyberciti.biz [75.126.153.206] 80 (http) open + sent 0, rcvd 0 + $ netcat -z -vv google.com https + DNS fwd/rev mismatch: google.com != maa03s16-in-f2.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f6.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f5.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f3.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f8.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f0.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f7.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f4.1e100.net + google.com [74.125.236.162] 443 (https) open + sent 0, rcvd 0 + $ netcat -v -z -n -w 1 192.168.1.254 1-1023 + (UNKNOWN) [192.168.1.254] 989 (ftps-data) open + (UNKNOWN) [192.168.1.254] 443 (https) open + (UNKNOWN) [192.168.1.254] 53 (domain) open + +See also + +- [Scanning network for open ports with the nmap command][3] for more info. +- Man pages - [nc(1)][4], [nmap(1)][5] + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/linux-port-scanning/ + +作者: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/networking/nmap-command-examples-tutorials/ +[2]:http://www.cyberciti.biz/tips/linux-scanning-network-for-open-ports.html +[3]:http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/ +[4]:http://www.manpager.com/linux/man1/nc.1.html +[5]:http://www.manpager.com/linux/man1/nmap.1.html \ No newline at end of file From 6aec0ceb4b364ceb20f1c65cb568063119bfcb44 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 2 Dec 2015 16:10:59 +0800 Subject: [PATCH 0451/1710] =?UTF-8?q?20151202-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20151202 KDE vs GNOME vs XFCE Desktop.md | 53 +++++++ ... to up- and download files on the shell.md | 146 ++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md create mode 100644 sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md diff --git a/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md b/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md new file mode 100644 index 0000000000..5cfbc31ace --- /dev/null +++ b/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md @@ -0,0 +1,53 @@ +KDE vs GNOME vs XFCE Desktop +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2013/07/300px-Xfce_logo.svg_.png) + +Over many years, many people spent a long time with Linux desktop using either KDE or GNOME. These two environments have grown through the previous years and each of these desktops continued to expand their current user-base. For example, sleeper desktop environment has been XFCE as XFCE offers more robustness than LXDE that lacks much of XFCE’s polish in the default configuration. The XFCE provides all benefits which users enjoyed in the GNOME 2, but with some lightweight experiences which made it a hit on the older computers. + +### The Desktop Theming ### + +After the user has fresh installation, the XFCE will be a bit boring, which lacks some certain visual attractiveness to it. So, don’t misunderstand my words here, the XFCE is still having nice looking desktop, but it may be like vanilla in users’ eyes as well as most people who are new to the XFCE desktop environment. The good news here is that while installing new theme to the XFCE, it is a reasonably easy process as you can easily find the right XFCE theme which appeals to you, after that, you can extract that theme to the proper directory. From this point, the XFCE comes with an important tool located under the Appearance for helping the user to select the chosen theme easily throughout the Graphical User Interface (GUID). There’re no other tools that might be required here, and if the user follows the above directions, it will be a bit simple for everyone who is caring to have a try. + +On the GNOME desktop, the user should follow the similar above approach. The main key difference for this point is that users have to download and then install GNOME Tweak Tool before proceeding with anything. It does not have any huge barriers under any means, but it is simple valid oversight when the user consider that the XFCE does not require any tweak tool in order for installing and activating the new desktop themes. By being under the GNOME, and especially after installing that Tweak tool which is mentioned above, you will need to go ahead and also to make sure that you have the extension of User Themes installed. + +The same as with the XFCE, the user will want to search for, and then download the theme which most appeals personally to him. Then, user can revisit to the GNOME Tweak tool, and click on the Appearance option on left side of that Tweak tool. Then, the user can simply look at the bottom of the page and click on file browse button to right of the Shell Theme. User then can browse to the zipped folder, and click open. In case if this process was successfully done, the user will see an alert that tell him that it was installed without any problems. From this point, user can simply use the pull down menu in order for selecting the theme he wants to use. The same as with the XFCE, process of theme activation is very easy, however, a need to download the non-included application for using a new theme will leave much to be desired. + +Finally, there is the process of the KDE desktop theming. The same as with XFCE, there is no need at all to install any extra tools for making it work. This is one area where there is a feeling that the XFCE has to make the KDE the winner. Not only the installing themes in the KDE is accomplished entirely within the Graphical User Interface, but it’s also even possible to click on (Get New Themes) button and user will be able to locate, view, and also install the new themes automatically. + +However, it should be noted that the KDE is a bit more robust desktop environment comparing to the XFCE. Therefore, it is a bit reasonable now to see why such extra functionalities could be missing from the desktops which are mainly designed to be minimalist. So, we all have to give the KDE props for such outstanding functionality. + +### MATE is not Lightweight Desktop ### + +Before continuing with the comparison between the XFCE, the GNOME 3 and the KDE, it should be clear for experts that we can’t touch the MATE desktop as an option in the comparison. MATE can be considered as the GNOME 2 desktop’s next incarnation, but it’s not mainly marketed to be a lightweight or fast desktop. But instead of that, its primary goal is to be more traditional and comfortable desktop environment where the users can feel right at their home to use it. + +On the other hand, the XFCE comes with a completely other goal set. The XFCE offers its users a more lightweight and yet still visually appealing desktop experience. Then, for everyone who points out that MATE is a lightweight desktop too, it isn’t really targeting that lightweight desktop crowd. Both options may be dressed up for looking quite attractive with the proper theme installed. + +### The Navigation of Desktop ### + +The XFCE honestly offers an obvious navigation which is out of the box. Anyone who is used to the traditional Windows or the GNOME 2/MATE desktop experience will be going to have the ability to navigate around the new XFCE installation without any kind of help. Straight away, adding the applets to panel is still very obvious. The same as with locating installed applications, just use the launcher and simply click on any desired application. With an exception of LXDE and MATE, there is no other desktop that can make the navigation that simple. What can be even better is that fact which the control panel is very easy to use, that is a really big benefit to everyone who is new to the desktop environment. If the user prefer older methods to use his desktop, then GNOME is not an option. With the hot corners as well as the no minimize button, plus the other application layout method, it’ll take the most newcomers getting easily used to it. + +If the user is coming from, as an example, Windows environment, then he is going to be put off by the inability to add applets to the top of his workspace simply with just a mere right-click. Just instead of this, it can be handled by using extensions. Installing extensions in the GNOME is granted and is a brain-dead easy, based on the easy to use (on/off) toggle switches located on the extensions page of the GNOME. Users have to know, sadly, to actually visit that page to enjoy this functionality. + +On the other side, the GNOME is sharing its desire for providing a straight forward and an easy to use control panel, which many of you may think that it is not be a big deal, but it is really something that I by myself find commendable and worth to be mentioned. The KDE offers its users a bit more traditional desktop experience, throughout familiar launchers as well as the ability for getting to the software in more familiar way if they are coming from Windows desktop. The process of adding widgets or applets to the KDE desktop is an easy matter of just right-clicking on the bottom of the desktop. Only the problem with the KDE’s approach is to be that, as many things KDE, the feature which users are actually looking for are hidden. The KDE users might berate my opinion for this, but I still stand by my statement. + +In order for adding a Widget, just right-click on “my panel”, just to see the panel options, but not as an immediate method to install Widgets. You will not actually see the Add Widgets until you select the Panel Options, then the Add Widgets. This not a big deal to me, but later for some users, it becomes unnecessary tidbit of confusion. To make things here more convoluted, after the users manage to locate Widgets area they discover later a brand new term called “Activities”. It is in the same area as the Widgets, yet it is somehow in its own area as to what it does. + +Now don’t misunderstand me, the Activities feature in the KDE is totally great and actually valued. But to look at it from the usability standpoint, I think that it would be better suited in another menu option in order to not confuse the newbies. User is welcome to differ, but to test this with newbies for some extended periods of time can prove the correct over and over again. The rant against the Activities placement aside, the KDE approach to add new widgets is really great. The same as with the KDE themes, user can’t browse through and install the Widgets automatically via using the provided Graphical User Interface. It is a bit fantastic of functionality, and also it could be celebrated such way. The control panel of the KDE is not as easy as the user might like it to be, yet it is a bit clear that this’s something that they are still working on. + +### So, the XFCE is the best desktop, right? ### + +I, by myself, actually run GNOME, KDE, and XFCE on my computers in my office and home. I also have some older machines with OpenBox and LXDE too. Each desktop experience can offer something that is a bit useful to me and may help me to use each machine as I see that it is fit. For me, I have a soft spot in my heart for the XFCE as it is one of the desktop environments which I stuck with for years. But in this article, I’m just writing it on my daily use computer which is in fact, GNOME. + +The main idea here is that I still feel that the XFCE provides a bit better user experience for users who are looking for stable, traditional, and easy to understand desktop environment. You are also welcome to share with us your opinion in the comments section. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/kde-vs-gnome-vs-xfce-desktop/ + +作者:[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/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md b/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md new file mode 100644 index 0000000000..54b69555c4 --- /dev/null +++ b/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md @@ -0,0 +1,146 @@ +How to use the Linux ftp command to up- and download files on the shell +================================================================================ +In this tutorial, I will explain how to use the Linux ftp command on the shell. I will show you how to connect to an FTP server, up- and download files and create directories. While there are many nice desktops FTP clients available, the FTP command is still useful when you work remotely on a server over an SSH session and e.g. want to fetch a backup file from your FTP storage. + +### Step 1: Establishing an FTP connection ### + +To connect to the FTP server, we have to type in the terminal window '**ftp**' and then the domain name 'domain.com' or IP address of the FTP server. + +#### Examples: #### + + ftp domain.com + + ftp 192.168.0.1 + + ftp user@ftpdomain.com + +**Note: for this example we used an anonymous server.** + +Replace the IP and domain in the above examples with the IP address or domain of your FTP server. + +![The FTP login.](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/ftpanonymous.png) + +### Step 2: Login with User and Password ### + +Most FTP servers logins are password protected, so the server will ask us for a '**username**' and a '**password**'. + +If you connect to a so-called anonymous FTP server, then try to use "anonymous" as user name and a nempty password: + + Name: anonymous + + Password: + +The terminal will return a message like this: + + 230 Login successful. + Remote system type is UNIX. + Using binary mode to transfer files. + ftp> + +When you are logged in successfully. + +![Successful FTP login.](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/login.png) + +### Step 3: Working with Directories ### + +The commands to list, move and create folders on an FTP server are almost the same as we would use locally on our computer, ls for list, cd to change directories, mkdir to create directories... + +#### Listing directories with security settings: #### + + ftp> ls + +The server will return: + + 200 PORT command successful. Consider using PASV. + 150 Here comes the directory listing. + directory list + .... + .... + 226 Directory send OK. + +![List directories](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/listing.png) + +#### Changing Directories: #### + +To change the directory we can type: + + ftp> cd directory + +The server will return: + + 250 Directory succesfully changed. + +![Change a directory in FTP.](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/directory.png) + +### Step 4: Downloading files with FTP ### + +Before downloading a file, we should set the local ftp file download directory by using 'lcd' command: + + lcd /home/user/yourdirectoryname + +If you dont specify the download directory, the file will be downloaded to the current directory where you were at the time you started the FTP session. + +Now, we can use the command 'get' command to download a file, the usage is: + + get file + +The file will be downloaded to the directory previously set with the 'lcd' command. + +The server will return the next message: + + local: file remote: file + 200 PORT command successful. Consider using PASV. + 150 Opening BINARY mode data connection for file (xxx bytes). + 226 File send OK. + XXX bytes received in x.xx secs (x.xxx MB/s). + +![Download a file with FTP.](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/gettingfile.png) + +To download several files we can use wildcards. In this example I will download all files with the .xls file extension. + + mget *.xls + +### Step 5: Uploading Files with FTP ### + +We can upload files that are in the local directory where we made the FTP connection. + +To upload a file, we can use 'put' command. + + put file + +When the file that you want to upload is not in the local directory, you can use the absolute path starting with "/" as well: + + put /path/file + +To upload several files we can use the mput command similar to the mget example from above: + + mput *.xls + +### Step 6: Closing the FTP connection ### + +Once we have done the FTP work, we should close the connection for security reasons. There are three commands that we can use to close the connection: + + bye + + exit + + quit + +Any of them will disconnect our PC from the FTP server and will return: + + 221 Goodbye + +![](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/goodbye.png) + +If you need some additional help, once you are connected to the FTP server, type 'help' and this will show you all the available FTP commands. + +![](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/helpwindow.png) + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/how-to-use-ftp-on-the-linux-shell/ + +译者:[译者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 8c790538aeb08d65a53ed1aba7138654683216b4 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 2 Dec 2015 16:26:52 +0800 Subject: [PATCH 0452/1710] =?UTF-8?q?20151202-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... do after installing openSUSE Leap 42.1.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md diff --git a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md new file mode 100644 index 0000000000..bbd79c19a3 --- /dev/null +++ b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md @@ -0,0 +1,108 @@ +8 things to do after installing openSUSE Leap 42.1 +================================================================================ +![Credit: Metropolitan Transportation/Flicrk](http://images.techhive.com/images/article/2015/11/things-to-do-100626947-primary.idge.jpg) +Credit: [Metropolitan Transportation/Flicrk][1] + +> You've installed openSUSE on your PC. Here's what to do next. + +[openSUSE Leap is indeed a huge leap][2], allowing users to run a distro that has the same DNA of SUSE Linux Enterprise. Like any other operating system, some work is needed to get it set up for optimal use. + +Following are some of the things that I did after installing openSUSE Leap on my PC (these are not applicable for server installations). None of them are mandatory, and you may be fine with the basic install. But if you need more out of your openSUSE Leap, follow me. + +### 1. Adding Packman repository ### + +Due to software patents and licences, openSUSE, like many Linux distributions, doesn't offer many applications, codecs, and drivers through official repositories (repos). Instead, these are made available through 3rd party or community repos. The first and most important repository is 'Packman'. Since these repos are not enabled by default, we have to add them. You can do so either using YaST (one of the gems of openSUSE) or by command line (instructions below). + +![o42 yast repo](http://images.techhive.com/images/article/2015/11/o42-yast-repo-100626952-large970.idge.png) +Adding Packman repositories. + +Using YaST, go to the Software Repositories section. Click on the 'Add’ button and select 'Community Repositories.' Click 'next.' And once the repos are loaded, select the Packman Repository. Click 'OK,' then import the trusted GnuPG key by clicking on the 'Trust' button. + +Or, using the terminal you can add and enable the Packman repo using the following command: + + zypper ar -f -n packmanhttp://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_42.1/ packman + +Once the repo is added, you have access to many more packages. To install any application or package, open YaST Software Manager, search for the package and install it. + +### 2. Install VLC ### + +VLC is the Swiss Army knife of media players and can play virtually any media file. You can install VLC from YaST Software Manager or from software.opensuse.org. You will need to install two packages: vlc and vlc-codecs. + +If using terminal, run the following command: + + sudo zypper install vlc vlc-codecs + +### 3. Install Handbrake ### + +If you need to transcode or convert your video files from one format to another, [Handbrake is the tools for you][3]. Handbrake is available through repositories we enabled, so just search for it in YaST and install. + +If you are using the terminal, run the following command: + + sudo zypper install handbrake-cli handbrake-gtk + +(Pro tip: VLC can also transcode audio and video files.) + +### 4. Install Chrome ### + +OpenSUSE comes with Firefox as the default browser. But since Firefox isn't capable of playing restricted media such as Netflix, I recommend installing Chrome. This takes some extra work. First you need to import the trusted key from Google. Open the terminal app and run the 'wget' command to download the key: + + wget https://dl.google.com/linux/linux_signing_key.pub + +Then import the key: + + sudo rpm --import linux_signing_key.pub + +Now head over to the [Google Chrome website][4] and download the 64 bit .rpm file. Once downloaded run the following command to install the browser: + + sudo zypper install /PATH_OF_GOOGLE_CHROME.rpm + +### 5. Install Nvidia drivers ### + +OpenSUSE Leap will work out of the box even if you have Nvidia or ATI graphics cards. However, if you do need the proprietary drivers for gaming or any other purpose, you can install such drivers, but some extra work is needed. + +First you need to add the Nvidia repositories; it's the same procedure we used to add Packman repositories using YaST. The only difference is that you will choose Nvidia from the Community Repositories section. Once it's added, go to **Software Management > Extras** and select 'Extras/Install All Matching Recommended Packages'. + +![o42 nvidia](http://images.techhive.com/images/article/2015/11/o42-nvidia-100626950-large.idge.png) + +It will open a dialogue box showing all the packages it's going to install, click OK and follow the instructions. You can also run the following command after adding the Nvidia repository to install the needed Nvidia drivers: + + sudo zypper inr + +(Note: I have never used AMD/ATI cards so I have no experience with them.) + +### 6. Install media codecs ### + +Once you have VLC installed you won't need to install media codecs, but if you are using other apps for media playback you will need to install such codecs. Some developers have written scripts/tools which makes it a much easier process. Just go to [this page][5] and install the entire pack by clicking on the appropriate button. It will open YaST and install the packages automatically (of source you will have to give the root password and trust the GnuPG key, as usual). + +### 7. Install your preferred email client ### + +OpenSUSE comes with Kmail or Evolution, depending on the Desktop Environment you installed on the system. I run Plasma, which comes with Kmail, and this email client leaves a lot to be desired. I suggest trying Thunderbird or Evolution mail. All major email clients are available through official repositories. You can also check my [handpicked list of the best email clients for Linux][7]. + +### 8. Enable Samba services from Firewall ### + +OpenSUSE offers a much more secure system out of the box, compared to other distributions. But it also requires a little bit more work for a new user. If you are using Samba protocol to share files within your local network then you will have to allow that service from the Firewall. + +![o42 firewall](http://images.techhive.com/images/article/2015/11/o42-firewall-100626948-large970.idge.png) +Allow Samba Client and Server from Firewall settings. + +Open YaST and search for Firewall. Once in Firewall settings, go to 'Allowed Services' where you will see a drop down list under 'Service to allow.' Select 'Samba Client,' then click 'Add.' Do the same with the 'Samba Server' option. Once both are added, click 'Next,' then click 'Finish,' and now you will be able to share folders from your openSUSE system and also access other machines over the local network. + +That's pretty much all that I did on my new openSUSE system to set it up just the way I like it. If you have any questions, please feel free to ask in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/3003865/open-source-tools/8-things-to-do-after-installing-opensuse-leap-421.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://www.flickr.com/photos/mtaphotos/11200079265/ +[2]:https://www.linux.com/news/software/applications/865760-opensuse-leap-421-review-the-most-mature-linux-distribution +[3]:https://www.linux.com/learn/tutorials/857788-how-to-convert-videos-in-linux-using-the-command-line +[4]:https://www.google.com/intl/en/chrome/browser/desktop/index.html#brand=CHMB&utm_campaign=en&utm_source=en-ha-na-us-sk&utm_medium=ha +[5]:http://opensuse-community.org/ +[6]:http://www.itworld.com/article/2875981/the-5-best-open-source-email-clients-for-linux.html \ No newline at end of file From 65404bd425548d5a65d95292c40d5d5c1ff1063f Mon Sep 17 00:00:00 2001 From: KS Date: Wed, 2 Dec 2015 17:42:07 +0800 Subject: [PATCH 0453/1710] Update 20151201 How to use Mutt email client with encrypted passwords.md --- ...01 How to use Mutt email client with encrypted passwords.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md b/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md index 5d7414588c..758fe7c8b2 100644 --- a/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md +++ b/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md @@ -1,3 +1,4 @@ +wyangsun translating How to use Mutt email client with encrypted passwords ================================================================================ Mutt is an open-source email client written for Linux/UNIX terminal environment. Together with [Alpine][1], Mutt has the most devoted followers among Linux command-line enthusiasts, and for good reasons. Think of anything you expect from an email client, and Mutt has it: multi-protocol support (e.g., POP3, IMAP and SMTP), S/MIME and PGP/GPG integration, threaded conversation, color coding, customizable macros/keybindings, and so on. Besides, terminal-based Mutt is a lightweight alternative for accessing emails compared to bulky web browser-based (e.g., Gmail, Ymail) or GUI-based email clients (e.g., Thunderbird, MS Outlook). @@ -135,4 +136,4 @@ via: http://xmodulo.com/mutt-email-client-encrypted-passwords.html [a]:http://xmodulo.com/author/nanni [1]:http://xmodulo.com/gmail-command-line-linux-alpine.html -[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG \ No newline at end of file +[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG From 486ffcf4aa6bc7ab449374b95c593614353617b5 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Dec 2015 17:44:12 +0800 Subject: [PATCH 0454/1710] =?UTF-8?q?20151202-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20151202 A new Mindcraft moment.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sources/tech/20151202 A new Mindcraft moment.md diff --git a/sources/tech/20151202 A new Mindcraft moment.md b/sources/tech/20151202 A new Mindcraft moment.md new file mode 100644 index 0000000000..79930e8202 --- /dev/null +++ b/sources/tech/20151202 A new Mindcraft moment.md @@ -0,0 +1,43 @@ +A new Mindcraft moment? +======================= + +Credit:Jonathan Corbet + +It is not often that Linux kernel development attracts the attention of a mainstream newspaper like The Washington Post; lengthy features on the kernel community's approach to security are even more uncommon. So when just such a feature hit the net, it attracted a lot of attention. This article has gotten mixed reactions, with many seeing it as a direct attack on Linux. The motivations behind the article are hard to know, but history suggests that we may look back on it as having given us a much-needed push in a direction we should have been going for some time. + +Think back, a moment, to the dim and distant past — April 1999, to be specific. An analyst company named Mindcraft issued a report showing that Windows NT greatly outperformed Red Hat Linux 5.2 and Apache for web-server workloads. The outcry from the Linux community, including from a very young LWN, was swift and strong. The report was a piece of Microsoft-funded FUD trying to cut off an emerging threat to its world-domination plans. The Linux system had been deliberately configured for poor performance. The hardware chosen was not well supported by Linux at the time. And so on. + +Once people calmed down a bit, though, one other fact came clear: the Mindcraft folks, whatever their motivations, had a point. Linux did, indeed, have performance problems that were reasonably well understood even at the time. The community then did what it does best: we sat down and fixed the problems. The scheduler got exclusive wakeups, for example, to put an end to thethundering-herd problem in the acceptance of connection requests. Numerous other little problems were fixed. Within a year or so, the kernel's performance on this kind of workload had improved considerably. + +The Mindcraft report, in other words, was a much-needed kick in the rear that got the community to deal with issues that had been neglected until then. + +The Washington Post article seems clearly slanted toward a negative view of the Linux kernel and its contributors. It freely mixes kernel problems with other issues (the AshleyMadison.com breakin, for example) that were not kernel vulnerabilities at all. The fact that vendors seem to have little interest in getting security fixes to their customers is danced around like a huge elephant in the room. There are rumors of dark forces that drove the article in the hopes of taking Linux down a notch. All of this could well be true, but it should not be allowed to overshadow the simple fact that the article has a valid point. + +We do a reasonable job of finding and fixing bugs. Problems, whether they are security-related or not, are patched quickly, and the stable-update mechanism makes those patches available to kernel users. Compared to a lot of programs out there (free and proprietary alike), the kernel is quite well supported. But pointing at our ability to fix bugs is missing a crucial point: fixing security bugs is, in the end, a game of whack-a-mole. There will always be more moles, some of which we will not know about (and will thus be unable to whack) for a long time after they are discovered and exploited by attackers. These bugs leave our users vulnerable, even if the commercial side of Linux did a perfect job of getting fixes to users — which it decidedly does not. + +The point that developers concerned about security have been trying to make for a while is that fixing bugs is not enough. We must instead realize that we will never fix them all and focus on making bugs harder to exploit. That means restricting access to information about the kernel, making it impossible for the kernel to execute code in user-space memory, instrumenting the kernel to detect integer overflows, and all the other things laid out in Kees Cook's Kernel Summit talk at the end of October. Many of these techniques are well understood and have been adopted by other operating systems; others will require innovation on our part. But, if we want to adequately defend our users from attackers, these changes need to be made. + +Why hasn't the kernel adopted these technologies already? The Washington Post article puts the blame firmly on the development community, and on Linus Torvalds in particular. The culture of the kernel community prioritizes performance and functionality over security and is unwilling to make compromises if they are needed to improve the security of the kernel. There is some truth to this claim; the good news is that attitudes appear to be shifting as the scope of the problem becomes clear. Kees's talk was well received, and it clearly got developers thinking and talking about the issues. + +The point that has been missed is that we do not just have a case of Linus fending off useful security patches. There simply are not many such patches circulating in the kernel community. In particular, the few developers who are working in this area have never made a serious attempt to get that work integrated upstream. Getting any large, intrusive patch set merged requires working with the kernel community, making the case for the changes, splitting the changes into reviewable pieces, dealing with review comments, and so on. It can be tiresome and frustrating, but it's how the kernel works, and it clearly results in a more generally useful, more maintainable kernel in the long run. + +Almost nobody is doing that work to get new security technologies into the kernel. One might cite a "chilling effect" from the hostile reaction such patches can receive, but that is an inadequate answer: developers have managed to merge many changes over the years despite a difficult initial reaction. Few security developers are even trying. + +Why aren't they trying? One fairly obvious answer is that almost nobody is being paid to try. Almost all of the work going into the kernel is done by paid developers and has been for many years. The areas that companies see fit to support get a lot of work and are well advanced in the kernel. The areas that companies think are not their problem are rather less so. The difficulties in getting support for realtime development are a clear case in point. Other areas, such as documentation, tend to languish as well. Security is clearly one of those areas. There are a lot of reasons why Linux lags behind in defensive security technologies, but one of the key ones is that the companies making money on Linux have not prioritized the development and integration of those technologies. + +There are signs that things might be changing a bit. More developers are showing interest in security-related issues, though commercial support for their work is still less than it should be. The reaction against security-related changes might be less knee-jerk negative than it used to be. Efforts like the Kernel Self Protection Project are starting to work on integrating existing security technologies into the kernel. + +We have a long way to go, but, with some support and the right mindset, a lot of progress can be made in a short time. The kernel community can do amazing things when it sets its mind to it. With luck, the Washington Post article will help to provide the needed impetus for that sort of setting of mind. History suggests that we will eventually see this moment as a turning point, when we were finally embarrassed into doing work that has clearly needed doing for a while. Linux should not have a substandard security story for much longer. + +--------------------------- + +via: https://lwn.net/Articles/663474/ + +作者:Jonathan Corbet + +译者:[译者ID](https://github.com/译者ID) + +校对:[校对者ID](https://github.com/校对者ID) + + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9f46ee570208be4a4da6123098c760442fb3a1e9 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 2 Dec 2015 23:18:14 +0800 Subject: [PATCH 0455/1710] PUB:20151123 LNAV--Ncurses based log file viewer @ictlyh --- ...123 LNAV--Ncurses based log file viewer.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) rename {translated/tech => published}/20151123 LNAV--Ncurses based log file viewer.md (63%) diff --git a/translated/tech/20151123 LNAV--Ncurses based log file viewer.md b/published/20151123 LNAV--Ncurses based log file viewer.md similarity index 63% rename from translated/tech/20151123 LNAV--Ncurses based log file viewer.md rename to published/20151123 LNAV--Ncurses based log file viewer.md index e1f99eb07c..d51ebe8e76 100644 --- a/translated/tech/20151123 LNAV--Ncurses based log file viewer.md +++ b/published/20151123 LNAV--Ncurses based log file viewer.md @@ -1,6 +1,6 @@ -LNAV - 基于 Ncurses 的日志文件阅读器 +LNAV:基于 Ncurses 的日志文件阅读器 ================================================================================ -日志文件导航器(Logfile Navigator,简称 lnav),是一个基于 curses 用于查看和分析日志文件的工具。和文本阅读器/编辑器相比, lnav 的好处是它充分利用了可以从日志文件中获取的语义信息,例如时间戳和日志等级。利用这些额外的语义信息, lnav 可以处理类似事情:来自不同文件的交错信息;按照时间生成信息直方图;提供在文件中导航的关键字。它希望使用这些功能可以使得用户可以快速有效地定位和解决问题。 +日志文件导航器(Logfile Navigator,简称 lnav),是一个基于 curses 的,用于查看和分析日志文件的工具。和文本阅读器/编辑器相比, lnav 的好处是它充分利用了可以从日志文件中获取的语义信息,例如时间戳和日志等级。利用这些额外的语义信息, lnav 可以处理像这样的事情:来自不同文件的交错的信息;按照时间生成信息直方图;支持在文件中导航的快捷键。它希望使用这些功能可以使得用户可以快速有效地定位和解决问题。 ### lnav 功能 ### @@ -10,15 +10,15 @@ Syslog、Apache 访问日志、strace、tcsh 历史以及常见的带时间戳 #### 直方图视图: #### -以时间为桶显示日志信息数量。这对于在一段长时间内大概了解发生了什么非常有用。 +以时间区划来显示日志信息数量。这对于大概了解在一长段时间内发生了什么非常有用。 #### 过滤器: #### 只显示那些匹配或不匹配一些正则表达式的行。对于移除大量你不感兴趣的日志行非常有用。 -#### 及时操作: #### +#### 即时操作: #### -在你输入到时候会同时完成检索;当添加新日志行的时候回自动加载和搜索;加载行的时候会应用过滤器;另外,还会在你输入 SQL 查询的时候检查正确性。 +在你输入到时候会同时完成检索;当添加了新日志行的时候会自动加载和搜索;加载行的时候会应用过滤器;另外,还会在你输入 SQL 查询的时候检查其正确性。 #### 自动显示后文: #### @@ -34,11 +34,11 @@ Syslog、Apache 访问日志、strace、tcsh 历史以及常见的带时间戳 #### 导航: #### -有快捷键用于跳转到下一个或上一个错误或警告,按照一定的时间向后或向前移动。 +有快捷键用于跳转到下一个或上一个错误或警告,按照指定的时间向后或向前翻页。 #### 用 SQL 查询日志: #### -每个日志文件行都被认为是数据库中可以使用 SQL 查询的一行。可以使用的列取决于查看的日志文件类型。 +每个日志文件行都相当于数据库中的一行,可以使用 SQL 进行查询。可以使用的列取决于查看的日志文件类型。 #### 命令和搜索历史: #### @@ -62,9 +62,7 @@ Syslog、Apache 访问日志、strace、tcsh 历史以及常见的带时间戳 ![](http://www.ubuntugeek.com/wp-content/uploads/2015/11/51.png) -如果你想查看特定的日志,那么需要指定路径 - -如果你想看 CPU 日志,在你的终端里运行下面的命令 +如果你想查看特定的日志,那么需要指定路径。如果你想看 CPU 日志,在你的终端里运行下面的命令 lnav /var/log/cups @@ -76,7 +74,7 @@ via: http://www.ubuntugeek.com/lnav-ncurses-based-log-file-viewer.html 作者:[ruchi][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 3d58709c5a4aefb00fb73d1b819bb09db63b3684 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 3 Dec 2015 00:06:59 +0800 Subject: [PATCH 0456/1710] Update 20151201 Linux and Unix Port Scanning With netcat [nc] Command.md --- ...01 Linux and Unix Port Scanning With netcat [nc] Command.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md b/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md index 1358968910..f4019db6eb 100644 --- a/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md +++ b/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux and Unix Port Scanning With netcat [nc] Command ================================================================================ How do I find out which ports are opened on my own server? How do I run port scanning using the nc command instead of [the nmap command on a Linux or Unix-like][1] systems? @@ -93,4 +94,4 @@ via: http://www.cyberciti.biz/faq/linux-port-scanning/ [2]:http://www.cyberciti.biz/tips/linux-scanning-network-for-open-ports.html [3]:http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/ [4]:http://www.manpager.com/linux/man1/nc.1.html -[5]:http://www.manpager.com/linux/man1/nmap.1.html \ No newline at end of file +[5]:http://www.manpager.com/linux/man1/nmap.1.html From 700146203af6d5dcfe1a46757e70289009f527b1 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 3 Dec 2015 02:00:25 +0800 Subject: [PATCH 0457/1710] Create 20151203 Getting started with Docker by Dockerizing this Blog.md --- ...ed with Docker by Dockerizing this Blog.md | 375 ++++++++++++++++++ 1 file changed, 375 insertions(+) create mode 100644 sources/tech/20151203 Getting started with Docker by Dockerizing this Blog.md diff --git a/sources/tech/20151203 Getting started with Docker by Dockerizing this Blog.md b/sources/tech/20151203 Getting started with Docker by Dockerizing this Blog.md new file mode 100644 index 0000000000..1f69a4adba --- /dev/null +++ b/sources/tech/20151203 Getting started with Docker by Dockerizing this Blog.md @@ -0,0 +1,375 @@ +Getting started with Docker by Dockerizing this Blog +====================== +>This article covers the basic concepts of Docker and how to Dockerize an application by creating a custom Dockerfile +>Written by Benjamin Cane on 2015-12-01 10:00:00 + +Docker is an interesting technology that over the past 2 years has gone from an idea, to being used by organizations all over the world to deploy applications. In today's article I am going to cover how to get started with Docker by "Dockerizing" an existing application. The application in question is actually this very blog! + +What is Docker +============ +============ + +Before we dive into learning the basics of Docker let's first understand what Docker is and why it is so popular. Docker, is an operating system container management tool that allows you to easily manage and deploy applications by making it easy to package them within operating system containers. + +### Containers vs. Virtual Machines + +Containers may not be as familiar as virtual machines but they are another method to provide Operating System Virtualization. However, they differ quite a bit from standard virtual machines. + +Standard virtual machines generally include a full Operating System, OS Packages and eventually an Application or two. This is made possible by a Hypervisor which provides hardware virtualization to the virtual machine. This allows for a single server to run many standalone operating systems as virtual guests. + +Containers are similar to virtual machines in that they allow a single server to run multiple operating environments, these environments however, are not full operating systems. Containers generally only include the necessary OS Packages and Applications. They do not generally contain a full operating system or hardware virtualization. This also means that containers have a smaller overhead than traditional virtual machines. + +Containers and Virtual Machines are often seen as conflicting technology, however, this is often a misunderstanding. Virtual Machines are a way to take a physical server and provide a fully functional operating environment that shares those physical resources with other virtual machines. A Container is generally used to isolate a running process within a single host to ensure that the isolated processes cannot interact with other processes within that same system. In fact containers are closer to BSD Jails and chroot'ed processes than full virtual machines. + +### What Docker provides on top of containers + +Docker itself is not a container runtime environment; in fact Docker is actually container technology agnostic with efforts planned for Docker to support Solaris Zones and BSD Jails. What Docker provides is a method of managing, packaging, and deploying containers. While these types of functions may exist to some degree for virtual machines they traditionally have not existed for most container solutions and the ones that existed, were not as easy to use or fully featured as Docker. + +Now that we know what Docker is, let's start learning how Docker works by first installing Docker and deploying a public pre-built container. + +## Starting with Installation +As Docker is not installed by default step 1 will be to install the Docker package; since our example system is running Ubuntu 14.0.4 we will do this using the Apt package manager. + +# apt-get install docker.io +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + aufs-tools cgroup-lite git git-man liberror-perl +Suggested packages: + btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc + git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki + git-svn +The following NEW packages will be installed: + aufs-tools cgroup-lite docker.io git git-man liberror-perl +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +Need to get 7,553 kB of archives. +After this operation, 46.6 MB of additional disk space will be used. +Do you want to continue? [Y/n] y +To check if any containers are running we can execute the docker command using the ps option. + +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +The ps function of the docker command works similar to the Linux ps command. It will show available Docker containers and their current status. Since we have not started any Docker containers yet, the command shows no running containers. + +## Deploying a pre-built nginx Docker container +One of my favorite features of Docker is the ability to deploy a pre-built container in the same way you would deploy a package with yum or apt-get. To explain this better let's deploy a pre-built container running the nginx web server. We can do this by executing the docker command again, however, this time with the run option. + +# docker run -d nginx +Unable to find image 'nginx' locally +Pulling repository nginx +5c82215b03d1: Download complete +e2a4fb18da48: Download complete +58016a5acc80: Download complete +657abfa43d82: Download complete +dcb2fe003d16: Download complete +c79a417d7c6f: Download complete +abb90243122c: Download complete +d6137c9e2964: Download complete +85e566ddc7ef: Download complete +69f100eb42b5: Download complete +cd720b803060: Download complete +7cc81e9a118a: Download complete +The run function of the docker command tells Docker to find a specified Docker image and start a container running that image. By default, Docker containers run in the foreground, meaning when you execute docker run your shell will be bound to the container's console and the process running within the container. In order to launch this Docker container in the background I included the -d (detach) flag. + +By executing docker ps again we can see the nginx container running. + +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f6d31ab01fc9 nginx:latest nginx -g 'daemon off 4 seconds ago Up 3 seconds 443/tcp, 80/tcp desperate_lalande +In the above output we can see the running container desperate_lalande and that this container has been built from the nginx:latest image. + +## Docker Images +Images are one of Docker's key features and is similar to a virtual machine image. Like virtual machine images, a Docker image is a container that has been saved and packaged. Docker however, doesn't just stop with the ability to create images. Docker also includes the ability to distribute those images via Docker repositories which are a similar concept to package repositories. This is what gives Docker the ability to deploy an image like you would deploy a package with yum. To get a better understanding of how this works let's look back at the output of the docker run execution. + +# docker run -d nginx +Unable to find image 'nginx' locally +The first message we see is that docker could not find an image named nginx locally. The reason we see this message is that when we executed docker run we told Docker to startup a container, a container based on an image named nginx. Since Docker is starting a container based on a specified image it needs to first find that image. Before checking any remote repository Docker first checks locally to see if there is a local image with the specified name. + +Since this system is brand new there is no Docker image with the name nginx, which means Docker will need to download it from a Docker repository. + +Pulling repository nginx +5c82215b03d1: Download complete +e2a4fb18da48: Download complete +58016a5acc80: Download complete +657abfa43d82: Download complete +dcb2fe003d16: Download complete +c79a417d7c6f: Download complete +abb90243122c: Download complete +d6137c9e2964: Download complete +85e566ddc7ef: Download complete +69f100eb42b5: Download complete +cd720b803060: Download complete +7cc81e9a118a: Download complete +This is exactly what the second part of the output is showing us. By default, Docker uses the Docker Hub repository, which is a repository service that Docker (the company) runs. + +Like GitHub, Docker Hub is free for public repositories but requires a subscription for private repositories. It is possible however, to deploy your own Docker repository, in fact it is as easy as docker run registry. For this article we will not be deploying a custom registry service. + +## Stopping and Removing the Container +Before moving on to building a custom Docker container let's first clean up our Docker environment. We will do this by stopping the container from earlier and removing it. + +To start a container we executed docker with the run option, in order to stop this same container we simply need to execute the docker with the kill option specifying the container name. + +# docker kill desperate_lalande +desperate_lalande +If we execute docker ps again we will see that the container is no longer running. + +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +However, at this point we have only stopped the container; while it may no longer be running it still exists. By default, docker ps will only show running containers, if we add the -a (all) flag it will show all containers running or not. + +# docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f6d31ab01fc9 5c82215b03d1 nginx -g 'daemon off 4 weeks ago Exited (-1) About a minute ago desperate_lalande +In order to fully remove the container we can use the docker command with the rm option. + +# docker rm desperate_lalande +desperate_lalande +While this container has been removed; we still have a nginx image available. If we were to re-run docker run -d nginx again the container would be started without having to fetch the nginx image again. This is because Docker already has a saved copy on our local system. + +To see a full list of local images we can simply run the docker command with the images option. + +# docker images +REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE +nginx latest 9fab4090484a 5 days ago 132.8 MB +## Building our own custom image +At this point we have used a few basic Docker commands to start, stop and remove a common pre-built image. In order to "Dockerize" this blog however, we are going to have to build our own Docker image and that means creating a Dockerfile. + +With most virtual machine environments if you wish to create an image of a machine you need to first create a new virtual machine, install the OS, install the application and then finally convert it to a template or image. With Docker however, these steps are automated via a Dockerfile. A Dockerfile is a way of providing build instructions to Docker for the creation of a custom image. In this section we are going to build a custom Dockerfile that can be used to deploy this blog. + +### Understanding the Application +Before we can jump into creating a Dockerfile we first need to understand what is required to deploy this blog. + +The blog itself is actually static HTML pages generated by a custom static site generator that I wrote named; hamerkop. The generator is very simple and more about getting the job done for this blog specifically. All the code and source files for this blog are available via a public GitHub repository. In order to deploy this blog we simply need to grab the contents of the GitHub repository, install Python along with some Python modules and execute the hamerkop application. To serve the generated content we will use nginx; which means we will also need nginx to be installed. + +So far this should be a pretty simple Dockerfile, but it will show us quite a bit of the Dockerfile Syntax. To get started we can clone the GitHub repository and creating a Dockerfile with our favorite editor; vi in my case. + +# git clone https://github.com/madflojo/blog.git +Cloning into 'blog'... +remote: Counting objects: 622, done. +remote: Total 622 (delta 0), reused 0 (delta 0), pack-reused 622 +Receiving objects: 100% (622/622), 14.80 MiB | 1.06 MiB/s, done. +Resolving deltas: 100% (242/242), done. +Checking connectivity... done. +# cd blog/ +# vi Dockerfile +### FROM - Inheriting a Docker image +The first instruction of a Dockerfile is the FROM instruction. This is used to specify an existing Docker image to use as our base image. This basically provides us with a way to inherit another Docker image. In this case we will be starting with the same nginx image we were using before, if we wanted to start with a blank slate we could use the Ubuntu Docker image by specifying ubuntu:latest. + +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane +In addition to the FROM instruction, I also included a MAINTAINER instruction which is used to show the Author of the Dockerfile. + +As Docker supports using # as a comment marker, I will be using this syntax quite a bit to explain the sections of this Dockerfile. + +### Running a test build +Since we inherited the nginx Docker image our current Dockerfile also inherited all the instructions within the Dockerfile used to build that nginx image. What this means is even at this point we are able to build a Docker image from this Dockerfile and run a container from that image. The resulting image will essentially be the same as the nginx image but we will run through a build of this Dockerfile now and a few more times as we go to help explain the Docker build process. + +In order to start the build from a Dockerfile we can simply execute the docker command with the build option. + +# docker build -t blog /root/blog +Sending build context to Docker daemon 23.6 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Running in c97f36450343 + ---> 60a44f78d194 +Removing intermediate container c97f36450343 +Successfully built 60a44f78d194 +In the above example I used the -t (tag) flag to "tag" the image as "blog". This essentially allows us to name the image, without specifying a tag the image would only be callable via an Image ID that Docker assigns. In this case the Image ID is 60a44f78d194 which we can see from the docker command's build success message. + +In addition to the -t flag, I also specified the directory /root/blog. This directory is the "build directory", which is the directory that contains the Dockerfile and any other files necessary to build this container. + +Now that we have run through a successful build, let's start customizing this image. + +### Using RUN to execute apt-get +The static site generator used to generate the HTML pages is written in Python and because of this the first custom task we should perform within this Dockerfile is to install Python. To install the Python package we will use the Apt package manager. This means we will need to specify within the Dockerfile that apt-get update and apt-get install python-dev are executed; we can do this with the RUN instruction. + +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip +In the above we are simply using the RUN instruction to tell Docker that when it builds this image it will need to execute the specified apt-get commands. The interesting part of this is that these commands are only executed within the context of this container. What this means is even though python-dev and python-pip are being installed within the container, they are not being installed for the host itself. Or to put it simplier, within the container the pip command will execute, outside the container, the pip command does not exist. + +It is also important to note that the Docker build process does not accept user input during the build. This means that any commands being executed by the RUN instruction must complete without user input. This adds a bit of complexity to the build process as many applications require user input during installation. For our example, none of the commands executed by RUN require user input. + +### Installing Python modules +With Python installed we now need to install some Python modules. To do this outside of Docker, we would generally use the pip command and reference a file within the blog's Git repository named requirements.txt. In an earlier step we used the git command to "clone" the blog's GitHub repository to the /root/blog directory; this directory also happens to be the directory that we have created the Dockerfile. This is important as it means the contents of the Git repository are accessible to Docker during the build process. + +When executing a build, Docker will set the context of the build to the specified "build directory". This means that any files within that directory and below can be used during the build process, files outside of that directory (outside of the build context), are inaccessible. + +In order to install the required Python modules we will need to copy the requirements.txt file from the build directory into the container. We can do this using the COPY instruction within the Dockerfile. + +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip + +## Create a directory for required files +RUN mkdir -p /build/ + +## Add requirements file and run pip +COPY requirements.txt /build/ +RUN pip install -r /build/requirements.txt +Within the Dockerfile we added 3 instructions. The first instruction uses RUN to create a /build/ directory within the container. This directory will be used to copy any application files needed to generate the static HTML pages. The second instruction is the COPY instruction which copies the requirements.txt file from the "build directory" (/root/blog) into the /build directory within the container. The third is using the RUN instruction to execute the pip command; installing all the modules specified within the requirements.txt file. + +COPY is an important instruction to understand when building custom images. Without specifically copying the file within the Dockerfile this Docker image would not contain the requirements.txt file. With Docker containers everything is isolated, unless specifically executed within a Dockerfile a container is not likely to include required dependencies. + +### Re-running a build +Now that we have a few customization tasks for Docker to perform let's try another build of the blog image again. + +# docker build -t blog /root/blog +Sending build context to Docker daemon 19.52 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Using cache + ---> 8e0f1899d1eb +Step 2 : RUN apt-get update + ---> Using cache + ---> 78b36ef1a1a2 +Step 3 : RUN apt-get install -y python-dev python-pip + ---> Using cache + ---> ef4f9382658a +Step 4 : RUN mkdir -p /build/ + ---> Running in bde05cf1e8fe + ---> f4b66e09fa61 +Removing intermediate container bde05cf1e8fe +Step 5 : COPY requirements.txt /build/ + ---> cef11c3fb97c +Removing intermediate container 9aa8ff43f4b0 +Step 6 : RUN pip install -r /build/requirements.txt + ---> Running in c50b15ddd8b1 +Downloading/unpacking jinja2 (from -r /build/requirements.txt (line 1)) +Downloading/unpacking PyYaml (from -r /build/requirements.txt (line 2)) + +Successfully installed jinja2 PyYaml mistune markdown MarkupSafe +Cleaning up... + ---> abab55c20962 +Removing intermediate container c50b15ddd8b1 +Successfully built abab55c20962 +From the above build output we can see the build was successful, but we can also see another interesting message; ---> Using cache. What this message is telling us is that Docker was able to use its build cache during the build of this image. + +#### Docker build cache + +When Docker is building an image, it doesn't just build a single image; it actually builds multiple images throughout the build processes. In fact we can see from the above output that after each "Step" Docker is creating a new image. + + Step 5 : COPY requirements.txt /build/ + ---> cef11c3fb97c +The last line from the above snippet is actually Docker informing us of the creating of a new image, it does this by printing the Image ID; cef11c3fb97c. The useful thing about this approach is that Docker is able to use these images as cache during subsequent builds of the blog image. This is useful because it allows Docker to speed up the build process for new builds of the same container. If we look at the example above we can actually see that rather than installing the python-dev and python-pip packages again, Docker was able to use a cached image. However, since Docker was unable to find a build that executed the mkdir command, each subsequent step was executed. + +The Docker build cache is a bit of a gift and a curse; the reason for this is that the decision to use cache or to rerun the instruction is made within a very narrow scope. For example, if there was a change to the requirements.txt file Docker would detect this change during the build and start fresh from that point forward. It does this because it can view the contents of the requirements.txt file. The execution of the apt-get commands however, are another story. If the Apt repository that provides the Python packages were to contain a newer version of the python-pip package; Docker would not be able to detect the change and would simply use the build cache. This means that an older package may be installed. While this may not be a major issue for the python-pip package it could be a problem if the installation was caching a package with a known vulnerability. + +For this reason it is useful to periodically rebuild the image without using Docker's cache. To do this you can simply specify --no-cache=True when executing a Docker build. + +### Deploying the rest of the blog +With the Python packages and modules installed this leaves us at the point of copying the required application files and running the hamerkop application. To do this we will simply use more COPY and RUN instructions. + +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip + +## Create a directory for required files +RUN mkdir -p /build/ + +## Add requirements file and run pip +COPY requirements.txt /build/ +RUN pip install -r /build/requirements.txt + +## Add blog code nd required files +COPY static /build/static +COPY templates /build/templates +COPY hamerkop /build/ +COPY config.yml /build/ +COPY articles /build/articles + +## Run Generator +RUN /build/hamerkop -c /build/config.yml +Now that we have the rest of the build instructions, let's run through another build and verify that the image builds successfully. + +# docker build -t blog /root/blog/ +Sending build context to Docker daemon 19.52 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Using cache + ---> 8e0f1899d1eb +Step 2 : RUN apt-get update + ---> Using cache + ---> 78b36ef1a1a2 +Step 3 : RUN apt-get install -y python-dev python-pip + ---> Using cache + ---> ef4f9382658a +Step 4 : RUN mkdir -p /build/ + ---> Using cache + ---> f4b66e09fa61 +Step 5 : COPY requirements.txt /build/ + ---> Using cache + ---> cef11c3fb97c +Step 6 : RUN pip install -r /build/requirements.txt + ---> Using cache + ---> abab55c20962 +Step 7 : COPY static /build/static + ---> 15cb91531038 +Removing intermediate container d478b42b7906 +Step 8 : COPY templates /build/templates + ---> ecded5d1a52e +Removing intermediate container ac2390607e9f +Step 9 : COPY hamerkop /build/ + ---> 59efd1ca1771 +Removing intermediate container b5fbf7e817b7 +Step 10 : COPY config.yml /build/ + ---> bfa3db6c05b7 +Removing intermediate container 1aebef300933 +Step 11 : COPY articles /build/articles + ---> 6b61cc9dde27 +Removing intermediate container be78d0eb1213 +Step 12 : RUN /build/hamerkop -c /build/config.yml + ---> Running in fbc0b5e574c5 +Successfully created file /usr/share/nginx/html//2011/06/25/checking-the-number-of-lwp-threads-in-linux +Successfully created file /usr/share/nginx/html//2011/06/checking-the-number-of-lwp-threads-in-linux + +Successfully created file /usr/share/nginx/html//archive.html +Successfully created file /usr/share/nginx/html//sitemap.xml + ---> 3b25263113e1 +Removing intermediate container fbc0b5e574c5 +Successfully built 3b25263113e1 +### Running a custom container +With a successful build we can now start our custom container by running the docker command with the run option, similar to how we started the nginx container earlier. + +# docker run -d -p 80:80 --name=blog blog +5f6c7a2217dcdc0da8af05225c4d1294e3e6bb28a41ea898a1c63fb821989ba1 +Once again the -d (detach) flag was used to tell Docker to run the container in the background. However, there are also two new flags. The first new flag is --name, which is used to give the container a user specified name. In the earlier example we did not specify a name and because of that Docker randomly generated one. The second new flag is -p, this flag allows users to map a port from the host machine to a port within the container. + +The base nginx image we used exposes port 80 for the HTTP service. By default, ports bound within a Docker container are not bound on the host system as a whole. In order for external systems to access ports exposed within a container the ports must be mapped from a host port to a container port using the -p flag. The command above maps port 80 from the host, to port 80 within the container. If we wished to map port 8080 from the host, to port 80 within the container we could do so by specifying the ports in the following syntax -p 8080:80. + +From the above command it appears that our container was started successfully, we can verify this by executing docker ps. + +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d264c7ef92bd blog:latest nginx -g 'daemon off 3 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:80->80/tcp blog +## Wrapping up + +At this point we now have a running custom Docker container. While we touched on a few Dockerfile instructions within this article we have yet to discuss all the instructions. For a full list of Dockerfile instructions you can checkout Docker's reference page, which explains the instructions very well. + +Another good resource is their Dockerfile Best Practices page which contains quite a few best practices for building custom Dockerfiles. Some of these tips are very useful such as strategically ordering the commands within the Dockerfile. In the above examples our Dockerfile has the COPY instruction for the articles directory as the last COPY instruction. The reason for this is that the articles directory will change quite often. It's best to put instructions that will change oftenat the lowest point possible within the Dockerfile to optimize steps that can be cached. + +In this article we covered how to start a pre-built container and how to build, then deploy a custom container. While there is quite a bit to learn about Docker this article should give you a good idea on how to get started. Of course, as always if you think there is anything that should be added drop it in the comments below. From 1d74e9bd5bda27b4937d2bc1f8346b4f45931c3f Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 3 Dec 2015 06:40:27 +0800 Subject: [PATCH 0458/1710] PUB:20151109 How to Set Up AWStats On Ubuntu Server @strugglingyouth --- ...151109 How to Set Up AWStats On Ubuntu Server.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename {translated/tech => published}/20151109 How to Set Up AWStats On Ubuntu Server.md (84%) diff --git a/translated/tech/20151109 How to Set Up AWStats On Ubuntu Server.md b/published/20151109 How to Set Up AWStats On Ubuntu Server.md similarity index 84% rename from translated/tech/20151109 How to Set Up AWStats On Ubuntu Server.md rename to published/20151109 How to Set Up AWStats On Ubuntu Server.md index 11bfdde3ab..7bea4e40d8 100644 --- a/translated/tech/20151109 How to Set Up AWStats On Ubuntu Server.md +++ b/published/20151109 How to Set Up AWStats On Ubuntu Server.md @@ -1,16 +1,14 @@ - 如何在 Ubuntu 服务器中配置 AWStats ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/10/Apache_awstats_featured.jpg) - -AWStats 是一个开源的网站分析报告工具,自带网络,流媒体,FTP 或邮件服务器统计图。此日志分析器以 CGI 或命令行方式进行工作,并在网页中以图表的形式尽可能的显示你日志中所有的信息。它采用的是部分信息文件,以便能够频繁并快速处理大量的日志文件。它支持绝大多数 Web 服务器日志文件格式,包括 Apache,IIS 等。 +AWStats 是一个开源的网站分析报告工具,可以生成强大的网站、流媒体、FTP 或邮件服务器的访问统计图。此日志分析器以 CGI 或命令行方式进行工作,并在网页中以图表的形式尽可能的显示你日志中所有的信息。它可以“部分”读取信息文件,以便能够频繁并快速处理大量的日志文件。它支持绝大多数 Web 服务器日志文件格式,包括 Apache,IIS 等。 本文将帮助你在 Ubuntu 上安装配置 AWStats。 ### 安装 AWStats 包 ### -默认情况下,AWStats 的包在 Ubuntu 仓库中。 +默认情况下,AWStats 的包可以在 Ubuntu 仓库中找到。 可以通过运行下面的命令来安装: @@ -18,7 +16,7 @@ AWStats 是一个开源的网站分析报告工具,自带网络,流媒体,FT 接下来,你需要启用 Apache 的 CGI 模块。 -运行以下命令来启动: +运行以下命令来启动 CGI: sudo a2enmod cgi @@ -38,7 +36,7 @@ AWStats 是一个开源的网站分析报告工具,自带网络,流媒体,FT 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" @@ -73,6 +71,7 @@ AWStats 是一个开源的网站分析报告工具,自带网络,流媒体,FT ### 测试 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) @@ -101,7 +100,7 @@ via: https://www.maketecheasier.com/set-up-awstats-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/) 荣誉推出 From 7669b8bb43f56e6b679a0d084266ac2a88dfbd8f Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 3 Dec 2015 06:52:08 +0800 Subject: [PATCH 0459/1710] PUB:20151125 The tar command explained @ictlyh --- .../20151125 The tar command explained.md | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) rename {translated/tech => published}/20151125 The tar command explained.md (75%) diff --git a/translated/tech/20151125 The tar command explained.md b/published/20151125 The tar command explained.md similarity index 75% rename from translated/tech/20151125 The tar command explained.md rename to published/20151125 The tar command explained.md index a3d19ac34f..22244bf89c 100644 --- a/translated/tech/20151125 The tar command explained.md +++ b/published/20151125 The tar command explained.md @@ -1,16 +1,16 @@ -tar 命令详解 +tar 命令使用介绍 ================================================================================ -Linux [tar][1] 命令是归档或分发文件时的强大武器。GNU tar 归档包可以包含多个文件和目录,还能保留权限,它还支持多种压缩格式。Tar 表示 "**T**ape **Ar**chiver",这是一种 POSIX 标准。 +Linux [tar][1] 命令是归档或分发文件时的强大武器。GNU tar 归档包可以包含多个文件和目录,还能保留其文件权限,它还支持多种压缩格式。Tar 表示 "**T**ape **Ar**chiver",这种格式是 POSIX 标准。 ### Tar 文件格式 ### -tar 压缩等级简介。 +tar 压缩等级简介: - **无压缩** 没有压缩的文件用 .tar 结尾。 - **Gzip 压缩** Gzip 格式是 tar 使用最广泛的压缩格式,它能快速压缩和提取文件。用 gzip 压缩的文件通常用 .tar.gz 或 .tgz 结尾。这里有一些如何[创建][2]和[解压][3] tar.gz 文件的例子。 -- **Bzip2 压缩** 和 Gzip格式相比 Bzip2 提供了更好的压缩比。创建压缩文件也比较慢,通常采用 .tar.bz2 结尾。 +- **Bzip2 压缩** 和 Gzip 格式相比 Bzip2 提供了更好的压缩比。创建压缩文件也比较慢,通常采用 .tar.bz2 结尾。 - **Lzip(LAMA)压缩** Lizp 压缩结合了 Gzip 快速的优势,以及和 Bzip2 类似(甚至更好) 的压缩率。尽管有这些好处,这个格式并没有得到广泛使用。 -- **Lzop 压缩** 这个压缩选项也许是 tar 最快的压缩格式,它的压缩率和 gzip 类似,也没有广泛使用。 +- **Lzop 压缩** 这个压缩选项也许是 tar 最快的压缩格式,它的压缩率和 gzip 类似,但也没有广泛使用。 常见的格式是 tar.gz 和 tar.bz2。如果你想快速压缩,那么就是用 gzip。如果归档文件大小比较重要,就是用 tar.bz2。 @@ -59,11 +59,13 @@ tar 命令在 Windows 也可以使用,你可以从 Gunwin 项目[http://gnuwin - **[p]** 这个选项表示 “preserve”,它指示 tar 在归档文件中保留文件属主和权限信息。 - **[c]** 表示创建。要创建文件时不能缺少这个选项。 - **[z]** z 选项启用 gzip 压缩。 -- **[f]** file 选项告诉 tar 创建一个归档文件。如果没有这个选项 tar 会把输出发送到 stdout。 +- **[f]** file 选项告诉 tar 创建一个归档文件。如果没有这个选项 tar 会把输出发送到标准输出( LCTT 译注:如果没有指定,标准输出默认是屏幕,显然你不会想在屏幕上显示一堆乱码,通常你可以用管道符号送到其它程序去)。 -#### Tar 命令事例 #### +#### Tar 命令示例 #### -**事例 1: 备份 /etc 目录** 创建 /etc 配置目录的一个备份。备份保存在 root 目录。 +**示例 1: 备份 /etc 目录** + +创建 /etc 配置目录的一个备份。备份保存在 root 目录。 tar pczvf /root/etc.tar.gz /etc @@ -71,19 +73,23 @@ tar 命令在 Windows 也可以使用,你可以从 Gunwin 项目[http://gnuwin 要以 root 用户运行命令确保 /etc 中的所有文件都会被包含在备份中。这次,我在命令中添加了 [v] 选项。这个选项表示 verbose,它告诉 tar 显示所有被包含到归档文件中的文件名。 -**事例 2: 备份你的 /home 目录** 创建你的 home 目录的备份。备份会被保存到 /backup 目录。 +**示例 2: 备份你的 /home 目录** + +创建你的 home 目录的备份。备份会被保存到 /backup 目录。 tar czf /backup/myuser.tar.gz /home/myuser 用你的用户名替换 myuser。这个命令中,我省略了 [p] 选项,也就不会保存权限。 -**事例 3: 基于文件的 MySQL 数据库备份** 在大部分 Linux 发行版中,MySQL 数据库保存在 /var/lib/mysql。你可以使用下面的命令检查: +**示例 3: 基于文件的 MySQL 数据库备份** + +在大部分 Linux 发行版中,MySQL 数据库保存在 /var/lib/mysql。你可以使用下面的命令来查看: ls /var/lib/mysql ![使用 tar 基于文件备份 MySQL](https://www.howtoforge.com/images/linux-tar-command/big/tar_backup_mysql.png) -用 tar 备份 MySQL 文件时为了保持一致性,首先停用数据库服务器。备份会被写到 /backup 目录。 +用 tar 备份 MySQL 数据文件时为了保持数据一致性,首先停用数据库服务器。备份会被写到 /backup 目录。 1) 创建 backup 目录 @@ -108,10 +114,10 @@ tar 命令在 Windows 也可以使用,你可以从 Gunwin 项目[http://gnuwin #### tar 命令选项解释 #### - **[x]** x 表示提取,提取 tar 文件时这个命令不可缺少。 -- **[z]** z 选项告诉 tar 要解压的归档文件时 gzip 格式。 +- **[z]** z 选项告诉 tar 要解压的归档文件是 gzip 格式。 - **[f]** 该选项告诉 tar 从一个文件中读取归档内容,本例中是 myarchive.tar.gz。 -上面的 tar 命令会安静地提取 tar.gz 文件,它只会显示错误信息。如果你想要看提取了哪些文件,那么添加 “v” 选项。 +上面的 tar 命令会安静地提取 tar.gz 文件,除非有错误信息。如果你想要看提取了哪些文件,那么添加 “v” 选项。 tar xzvf myarchive.tar.gz @@ -125,7 +131,7 @@ via: https://www.howtoforge.com/tutorial/linux-tar-command/ 作者:[howtoforge][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 943120754f7a3e9637299e80ea234cc77c2803e8 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 3 Dec 2015 07:51:38 +0800 Subject: [PATCH 0460/1710] PUB:20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04 @strugglingyouth --- ....8.16 in Ubuntu 16.04 or 15.10 or 14.04.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename {translated/tech => published}/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md (66%) diff --git a/translated/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md b/published/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md similarity index 66% rename from translated/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md rename to published/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md index f7644bcabb..7c2e304403 100644 --- a/translated/tech/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md +++ b/published/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md @@ -1,11 +1,10 @@ - 如何在 Ubuntu 16.04,15.10,14.04 中安装 GIMP 2.8.16 ================================================================================ ![GIMP 2.8.16](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-icon.png) -GIMP 图像编辑器 2.8.16 版本在其20岁生日时发布了。下面是如何安装或升级 GIMP 在 Ubuntu 16.04, Ubuntu 15.10, Ubuntu 14.04, Ubuntu 12.04 及其衍生版本中,如,Linux Mint 17.x/13, Elementary OS Freya。 +GIMP 图像编辑器 2.8.16 版本在其20岁生日时发布了。下面是如何安装或升级 GIMP 在 Ubuntu 16.04, Ubuntu 15.10, Ubuntu 14.04, Ubuntu 12.04 及其衍生版本中,如 Linux Mint 17.x/13, Elementary OS Freya。 -GIMP 2.8.16 支持层组在 OpenRaster 文件中,修复了在 PSD 中的层组支持以及各种用户接口改进,OSX 系统修复构建并有许多新的变化。请阅读 [官方声明][1]。 +GIMP 2.8.16 支持 OpenRaster 文件中的层组,修复了 PSD 中的层组支持以及各种用户界面改进,修复了 OSX 上的构建系统,以及更多新的变化。请阅读 [官方声明][1]。 ![GIMP image editor 2.8,16](http://ubuntuhandbook.org/wp-content/uploads/2014/08/gimp-2-8-14.jpg) @@ -15,21 +14,21 @@ GIMP 2.8.16 支持层组在 OpenRaster 文件中,修复了在 PSD 中的层组 **1. 添加 GIMP PPA** -从 Unity Dash 中打开终端,或通过 Ctrl+Alt+T 快捷键。在它打开它后,粘贴下面的命令并回车: +从 Unity Dash 中打开终端,或通过 Ctrl+Alt+T 快捷键打开。在它打开它后,粘贴下面的命令并回车: sudo add-apt-repository ppa:otto-kesselgulasch/gimp ![add GIMP PPA](http://ubuntuhandbook.org/wp-content/uploads/2015/11/gimp-ppa.jpg) -输入你的密码,密码不会在终端显示,然后回车继续。 +输入你的密码,密码不会在终端显示,然后回车继续。 **2. 安装或升级编辑器** -在添加了 PPA 后,启动 **Software Updater**(在 Mint 中是 Software Manager)。检查更新后,你将看到 GIMP 的更新列表。点击 “Install Now” 进行升级。 +在添加了 PPA 后,启动 **Software Updater**(在 Mint 中是 Software Manager)。检查更新后,你将看到 GIMP 的更新列表。点击 “Install Now” 进行升级。 ![upgrade-gimp2816](http://ubuntuhandbook.org/wp-content/uploads/2015/11/upgrade-gimp2816.jpg) -对于那些喜欢 Linux 命令的,按顺序执行下面的命令,刷新仓库的缓存然后安装 GIMP: +对于那些喜欢 Linux 命令的,按顺序执行下面的命令,刷新仓库的缓存然后安装 GIMP: sudo apt-get update @@ -37,13 +36,13 @@ GIMP 2.8.16 支持层组在 OpenRaster 文件中,修复了在 PSD 中的层组 **3. (可选的) 卸载** -如果你想卸载或降级 GIMP 图像编辑器。从软件中心直接删除它,或者按顺序运行下面的命令来将 PPA 清除并降级软件: +如果你想卸载或降级 GIMP 图像编辑器。从软件中心直接删除它,或者按顺序运行下面的命令来将 PPA 清除并降级软件: sudo apt-get install ppa-purge sudo ppa-purge ppa:otto-kesselgulasch/gimp -就这样。玩的愉快! +就这样。玩的愉快! -------------------------------------------------------------------------------- @@ -51,8 +50,8 @@ via: http://ubuntuhandbook.org/index.php/2015/11/how-to-install-gimp-2-8-16-in-u 作者:[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/) 荣誉推出 [a]:http://ubuntuhandbook.org/index.php/about/ From 7cd69840281c4048c21d822fcdfeebc9a3f2c376 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Thu, 3 Dec 2015 11:29:59 +0800 Subject: [PATCH 0461/1710] Update 20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 校对来里面的一些错误,修改了一些话的说法 --- ...tihomed ISC DHCP Server on Debian Linux.md | 131 ++++++++++++------ 1 file changed, 86 insertions(+), 45 deletions(-) diff --git a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md index 8fb67f0697..fc45af4db0 100644 --- a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md +++ b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md @@ -2,21 +2,28 @@ How to Install and Configure Multihomed ISC DHCP Server on Debian Linux debian linux上安装配置 ISC DHCP Server ================================================================================ 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. -动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 + +动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 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. -本节教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),但是它也可以非常简单的用于单一网络。 + +本教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),它也可以非常容易的配置的用于单一网络。 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. -测试用的网络是通过思科路由器依赖传统的方式来管DHCP租约地址,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP这个责任转移到一个专用的服务器上面,路由器可以回收资源去用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 + +测试用的网络是通过思科路由器使用传统的方式来管理DHCP租约地址的,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP的任务转移到一个专用的服务器上面,路由器可以收回相应的资源,把资源用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 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. -另一个将DHCP服务移动到专用服务器的好处,后续会讲到,建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。 + +另一个将DHCP服务转移到专用服务器的好处,以后会讲到,它可以建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。 + ### Step 1: Installing and Configuring ISC DHCP Server ### + ### 安装和配置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. -1. 创建这个多宿主服务器的过程中,需要用apt工具来安装Debian软件仓库中的ISC软件。与其他教程一样需要使用root或者sudo访问权限。请适当的修改以使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限) + +1. 使用apt工具用来安装Debian软件仓库中的ISC软件,来创建这个多宿主服务器。与其他教程一样需要使用root或者sudo访问权限。请适当的修改,以便使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限) # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件] @@ -27,7 +34,7 @@ The other benefit to moving DHCP to a dedicated server will, in a later guide, i 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: -2. 现在已经确认服务软件安装完毕,现在需要配置服务器,它将分发网络信息。作为管理员你最起码应该了解DHCP的信息如下: +2. 确认服务软件已经安装完成,现在需要一些网络的需求来配置服务器,这样服务器才能够根据我们的需要来分发网络信息。作为管理员最起码需要了解的DHCP信息如下: - The network addresses - 网络地址 - The subnet masks @@ -37,7 +44,7 @@ The other benefit to moving DHCP to a dedicated server will, in a later guide, i Other useful information to have the server dynamically assign includes: -其他一些使服务器动态分配的有用信息包括: +其他一些服务器动态分配的有用信息包括: - Default gateway - 默认网关 - DNS server IP addresses @@ -51,178 +58,212 @@ Other useful information to have the server dynamically assign includes: 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: -这只是很少一部分能让ISC DHCP server处理的选项。完整的查看所有选项及其描述需要在安装好软件后输入以下命令: +这只是能让ISC DHCP server处理的选项中非常少的一部分。如果你想查看所有选项及其描述需要在安装好软件后输入以下命令: # 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. -3. 一旦管理员已经确定了这台服务器需要分发出去的必要信息,那么是时候配置它和分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来监听这台服务器上面的一个接口。 +3. 一旦管理员已经确定了这台服务器需要分发的需求信息,那么是时候配置服务器并且分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来侦听这台服务器上面的一个接口。 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. -在这台特定的服务器上,一个网卡设置好后,DHCP会监听命名为`'bond0'`的接口。请适确保适当的更改服务器以及网络环境。下面默认的配置都是针对于本次教程的。 +在这台特定的服务器上,设置好网卡后,DHCP会侦听名称名为`'bond0'`的接口。请适根据你的实际情况来更改服务器以及网络环境。下面的配置都是针对本教程的。 + ![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: -这行指定的是DHCP服务监听接口(一个或多个)上的DHCP流量。修改主要的配置文件分派DHCP池配置在所需要的网络上。主要的配置文件的位置在/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 +这行指定的是DHCP服务侦听接口(一个或多个)上的DHCP流量。修改主要的配置文件分配适合的DHCP地址池到所需要的网络上。配置文件所在置/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 # 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. -这个配置文件可以配置我们想的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS, ISC-DHCP-Server 将被整合到 BIND9为了能够使主机名更新到IP地址。 +这个配置文件可以配置我们所需要的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS,ISC-DHCP-Server 将被整合到 BIND9,它能够使主机名更新到IP地址。 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. -4. 接下来的部分 是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。想更多地了解所有的选项,阅读man手册dhcpd.conf文件,命令如下: +4. 接下来的部分是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。如果你想了解所有的选项,请阅读man手册中的dhcpd.conf文件,命令如下: # 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 “comptech.local”; – 所有使用这台DHCP服务器的主机,将成为DNS域名“comptech.local”的一员 + +- option domain-name “comptech.local”; – 所有使用这台DHCP服务器的主机,都将成为DNS域名为“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 domain-name-servers 172.27.10.6; DHCP 将向所有配置好的网络主机分发DNS服务器地址172.27.10.6 + +- option domain-name-servers 172.27.10.6; DHCP向所有配置这台DHCP服务器的的网络主机分发DNS服务器地址为172.27.10.6 + - 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 + - option subnet-mask 255.255.255.0; – 分派子网掩码到每一个网络设备 255.255.255.0 或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. -- default-lease-time 3600; – 有效的地址租约时间,单位是秒。如果租约时间耗尽主机可以重新申请租约。如果租约完成那么相应的地址也将被尽快回收。 + +- 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. + +- default-lease-time 3600; – 默认有效的地址租约时间(单位是秒)。如果租约时间耗尽,那么主机可以重新申请租约。如果租约完成,那么相应的地址也将被尽快回收。 + - max-lease-time 86400; – This is the maximum amount of time in seconds a lease can be held by a host. -- max-lease-time 86400; – 这是一个主机最大的租约时间,单位为秒。 + +- max-lease-time 86400; – 这是一台主机最大的租约时间(单位为秒)。 + - 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-check true; – 这是一个额外的测试,以确保服务器分配出的地址不是一个网络内另一台主机已使用的网络地址。 + +- ping-check true; – 这是一个额外的测试,以确保服务器分发出的网络地址不是当前网络中另一台主机已使用的网络地址。 + - 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. -- ping-timeout; – 假设地址以前没有使用,用这个来检测2个ping值回应之间的时间长度。 + +- ping-timeout; – 如果地址以前没有使用过,可以用这个选项来检测2个ping返回值之间的时间长度。 + - 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. -- ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中被禁用,但是当DDNS运行,此选项会忽略一个主机请求的DNS更新其主机名。 + +- ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中已经被禁用,但是当DDNS运行时,这个选项会忽略更新其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. -5. 文件中的下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么就取消注释权威节(uncomment the authoritative stanza.)。 + +5. 文件中下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么取消注释权威字节(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. -通过去掉关键字authoritative 前面的‘#’,取消注释全局权威节。那么该服务器将是它管理网络里面的唯一权威。 +通过去掉关键字authoritative 前面的‘#’,取消注释全局权威字节。这台服务器将是它所管理网络里面的唯一权威。 + ![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) Enable ISC Authoritative + 开启 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. -默认情况下服务器被假定为不是网络上的权威。这样做的理由是为了安全。如果有人因为不了解DHCP服务的配置导致配置不当或在一个不该出现的网络里面,这都将会造成非常严重的重连接问题。这行还可用在每个网络中单独使用。这意味着如果该服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图显示中的全局配置那样。 + +默认情况下服务器被假定为不是网络上的权威。之所以这样做是出于安全考虑。如果有人因为不了解DHCP服务的配置,导致配置不当或配置到一个不该出现的网络里面,这都将带来非常严重的重连接问题。这行还可用在每个网络中单独配置使用。也就是说如果这台服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图中那样的全局配置。 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). -6. 下一步是配置所有的服务器将要管理的DHCP地址池/网络。简短起见,这个教程将只配置地址池。作为管理员需要收集所有必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) +6. 这一步是配置服务器将要管理的所有DHCP地址池/网络。简短起见,本教程只配置了地址池。作为管理员需要收集一些必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) + 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. + +以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认子网网关172.27.60.1,广播地址 172.27.60.255.0 + 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! -以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认网关172.27.60.1,广播地址 172.27.60.255. +以上这些信息用于构建hcpd.conf文件中新的网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用root或sudo访问权限。网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用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 + 配置DHCP的地址池和网络 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. -这例子是分配IP地址给用VMWare创建的虚拟服务器。第一行标明是该网络的子网掩码。括号里面是DHCP服务器应该提供给当前网络上主机的所有选项。 +当前这个例子是给用VMWare创建的虚拟服务器分配IP地址。第一行显示是该网络的子网掩码。括号里面的内容是DHCP服务器应该提供给网络上面主机的所有选项。 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. -第一节, range 172.27.60.50 172.27.60.254;是DHCP服务在这个网络上能够给主机动态分发的地址范围。 +第一节, range 172.27.60.50 172.27.60.254;这一行显示的是,DHCP服务在这个网络上能够给主机动态分发的地址范围。 The second stanza, option routers 172.27.60.1; , hands out the default gateway address for all hosts on this network. -第二节,option routers 172.27.60.1;给网络里面所有的主机分发默认网关地址。 +第二节,option routers 172.27.60.1;这里显示的是网络里面所有的主机分发默认网关地址。 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. -最后一节, option broadcast-address 172.27.60.255;,说明当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 +最后一节, option broadcast-address 172.27.60.255;,显示当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 + 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: -7. 如果是创建多个网络,持续的创建它们的相应选项最终保存文本文件。一旦配置完成, ISC-DHCP-Server进程需要重启来使新的更改生效。可以通过下面的命令来完成: +7. 如果是创建多个网络,连续的创建完它们的相应选项后保存文本文件即可。配置完成以后如果有更改,ISC-DHCP-Server进程需要重启来使新的更改生效。重启进程可以通过下面的命令来完成: # 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]: -这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在监听67端口,命令如下: +这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在侦听67端口,命令如下: # lsof -i :67 ![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) Check DHCP Listening Port -检查DHCP监听端口 + +检查DHCP侦听端口 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. -这里的输出表明DHCPD(DHCP服务守护进程)正在运行并且监听67端口。由于/etc/services文件中67端口的端口映射,输出中的67端口实际上被转换成了“bootps”。 +这里输出的结果表明DHCPD(DHCP服务守护进程)正在运行并且侦听67端口。由于/etc/services文件中67端口是端口映射,所以输出中的67端口实际上被转换成了“bootps”。 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. -在大多数的系统中这是非常普遍的,此时,服务器应该已经为网络连接做好准备,可以通过将一台主机接入网络请求DHCP地址来验证服务是否正常。 +在大多数的系统中这是非常常见的,现在服务器应该已经为网络连接做好准备,我们可以将一台主机接入网络请求DHCP地址来验证服务是否正常。 ### 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. -8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个装置应该预先配置,当接口是活跃的时候来获取DHCP。 +8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个设备应该预先配置好的,只要对应的接口处于活跃状态就能够获取DHCP。 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. -然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将展示如何做到这一点以及如何查看服务器是否分发地址。 +然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将演示怎样手动获取以及如何查看服务器是否已经按需要分发地址。 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][2]‘工具能够用来检查接口配置。这台设备被用来监测DHCP服务它只有一个网络适配器(网卡),这块网卡被命名为‘eth0‘。 + ‘[ifconfig][2]‘工具能够用来检查接口的配置。这台被用来测试的DHCP服务器的设备,它只有一个网络适配器(网卡),这块网卡被命名为‘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 + 检查网络接口IP地址 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. -从输出结果上看,这台设备目前没有一个IPv4地址,很好这样便于测试。让这台设备连接到DHCP服务器并发出一个请求。这台设备上安装了一个名为‘dhclient‘ 的DHCP客户端工具。这个客户端工具会因为系统不同而不同。 +从输出结果上看,这台设备目前没IPv4地址,这样很好便于测试。我们把这台设备连接到DHCP服务器并发出一个请求。这台设备上已经安装了一个名为‘dhclient‘ 的DHCP客户端工具。因为操作系统各不相同,所以这个客户端软件也是互不一样的。 # dhclient eth0 ![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) Request IP Address from DHCP + 从DHCP请求IP地址 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. -现在 `'inet addr:'` 字段显示了属于172.27.60.0网络地址范围内的IPv4地址。另外要注意:目前该网络配置了正确的子网掩码并且分发了广播地址。 +当前 `'inet addr:'` 字段中显示了属于172.27.60.0网络地址范围内的IPv4地址。值得欣慰的是当前网络还配置了正确的子网掩码并且分发了广播地址。 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. -看起来还不错,让我们来测试一下,看看它是不是这台设备收到新IP地址的地方。我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,而不是使用一个完整的文本编辑器去查看日志文件。命令如下: +到这里看起来还都不错,让我们来测试一下,看看这台设备收到新IP地址是不是由服务器发出的。这里我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,这样我们就可以不用拿一个文本编辑器去查看所有的日志文件了。命令如下: # tail /var/log/syslog ![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) Check DHCP Logs + 检查DHCP日志文件 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. -OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。到这里DHCP服务器搭建成功并且运行起来了。配置其他的网络,排查故障,确保安全。 +OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。至此DHCP服务器搭建成功并且运行。如果有需要你可以继续配置其他的网络,排查故障,确保安全。 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. -更多新的 ISC-DHCP-Server 的功能在以后的Debian教程中会被提及。不久以后将写一篇关于Bind9和DDNS的教程,插入到这篇文章里面。 +在以后的Debian教程中我会讲一些新的 ISC-DHCP-Server 功能。有时间的话我将写一篇关于Bind9和DDNS的教程,融入到这篇文章里面。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ From f3573b61793a1f1ec05a59ff158246c3c38a6cb6 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Thu, 3 Dec 2015 12:13:05 +0800 Subject: [PATCH 0462/1710] Update 20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md delete english --- ...tihomed ISC DHCP Server on Debian Linux.md | 115 ------------------ 1 file changed, 115 deletions(-) diff --git a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md index fc45af4db0..5dcea06611 100644 --- a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md +++ b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md @@ -1,28 +1,15 @@ -How to Install and Configure Multihomed ISC DHCP Server on Debian Linux debian linux上安装配置 ISC DHCP Server ================================================================================ -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. - 动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 -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. - 本教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),它也可以非常容易的配置的用于单一网络。 -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. - 测试用的网络是通过思科路由器使用传统的方式来管理DHCP租约地址的,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP的任务转移到一个专用的服务器上面,路由器可以收回相应的资源,把资源用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 -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. - 另一个将DHCP服务转移到专用服务器的好处,以后会讲到,它可以建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。 -### Step 1: Installing and Configuring ISC DHCP Server ### - ### 安装和配置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. - 1. 使用apt工具用来安装Debian软件仓库中的ISC软件,来创建这个多宿主服务器。与其他教程一样需要使用root或者sudo访问权限。请适当的修改,以便使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限) @@ -32,237 +19,135 @@ The other benefit to moving DHCP to a dedicated server will, in a later guide, i ![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: - 2. 确认服务软件已经安装完成,现在需要一些网络的需求来配置服务器,这样服务器才能够根据我们的需要来分发网络信息。作为管理员最起码需要了解的DHCP信息如下: -- 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 - DNS服务器IP地址 -- 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: 这只是能让ISC DHCP server处理的选项中非常少的一部分。如果你想查看所有选项及其描述需要在安装好软件后输入以下命令: # 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. - 3. 一旦管理员已经确定了这台服务器需要分发的需求信息,那么是时候配置服务器并且分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来侦听这台服务器上面的一个接口。 -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. - 在这台特定的服务器上,设置好网卡后,DHCP会侦听名称名为`'bond0'`的接口。请适根据你的实际情况来更改服务器以及网络环境。下面的配置都是针对本教程的。 ![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: - 这行指定的是DHCP服务侦听接口(一个或多个)上的DHCP流量。修改主要的配置文件分配适合的DHCP地址池到所需要的网络上。配置文件所在置/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 # 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. - 这个配置文件可以配置我们所需要的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS,ISC-DHCP-Server 将被整合到 BIND9,它能够使主机名更新到IP地址。 -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. - 4. 接下来的部分是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。如果你想了解所有的选项,请阅读man手册中的dhcpd.conf文件,命令如下: # 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 “comptech.local”; – 所有使用这台DHCP服务器的主机,都将成为DNS域名为“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 domain-name-servers 172.27.10.6; DHCP向所有配置这台DHCP服务器的的网络主机分发DNS服务器地址为172.27.10.6 -- 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 - - option subnet-mask 255.255.255.0; – 分派子网掩码到每一个网络设备 255.255.255.0 或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. - - default-lease-time 3600; – 默认有效的地址租约时间(单位是秒)。如果租约时间耗尽,那么主机可以重新申请租约。如果租约完成,那么相应的地址也将被尽快回收。 -- max-lease-time 86400; – This is the maximum amount of time in seconds a lease can be held by a host. - - max-lease-time 86400; – 这是一台主机最大的租约时间(单位为秒)。 -- 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-check true; – 这是一个额外的测试,以确保服务器分发出的网络地址不是当前网络中另一台主机已使用的网络地址。 -- 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. - - ping-timeout; – 如果地址以前没有使用过,可以用这个选项来检测2个ping返回值之间的时间长度。 -- 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. - - ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中已经被禁用,但是当DDNS运行时,这个选项会忽略更新其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. - 5. 文件中下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么取消注释权威字节(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. - 通过去掉关键字authoritative 前面的‘#’,取消注释全局权威字节。这台服务器将是它所管理网络里面的唯一权威。 ![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) -Enable ISC Authoritative - 开启 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. - 默认情况下服务器被假定为不是网络上的权威。之所以这样做是出于安全考虑。如果有人因为不了解DHCP服务的配置,导致配置不当或配置到一个不该出现的网络里面,这都将带来非常严重的重连接问题。这行还可用在每个网络中单独配置使用。也就是说如果这台服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图中那样的全局配置。 -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). - 6. 这一步是配置服务器将要管理的所有DHCP地址池/网络。简短起见,本教程只配置了地址池。作为管理员需要收集一些必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) -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. - 以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认子网网关172.27.60.1,广播地址 172.27.60.255.0 -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! - 以上这些信息用于构建hcpd.conf文件中新的网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用root或sudo访问权限。网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用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 - 配置DHCP的地址池和网络 -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. - 当前这个例子是给用VMWare创建的虚拟服务器分配IP地址。第一行显示是该网络的子网掩码。括号里面的内容是DHCP服务器应该提供给网络上面主机的所有选项。 -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. - 第一节, range 172.27.60.50 172.27.60.254;这一行显示的是,DHCP服务在这个网络上能够给主机动态分发的地址范围。 -The second stanza, option routers 172.27.60.1; , hands out the default gateway address for all hosts on this network. - 第二节,option routers 172.27.60.1;这里显示的是网络里面所有的主机分发默认网关地址。 -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. - 最后一节, option broadcast-address 172.27.60.255;,显示当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 -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: - 7. 如果是创建多个网络,连续的创建完它们的相应选项后保存文本文件即可。配置完成以后如果有更改,ISC-DHCP-Server进程需要重启来使新的更改生效。重启进程可以通过下面的命令来完成: # 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]: - 这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在侦听67端口,命令如下: # lsof -i :67 ![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) -Check DHCP Listening Port - 检查DHCP侦听端口 -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. - 这里输出的结果表明DHCPD(DHCP服务守护进程)正在运行并且侦听67端口。由于/etc/services文件中67端口是端口映射,所以输出中的67端口实际上被转换成了“bootps”。 -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. - 在大多数的系统中这是非常常见的,现在服务器应该已经为网络连接做好准备,我们可以将一台主机接入网络请求DHCP地址来验证服务是否正常。 -### 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. - 8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个设备应该预先配置好的,只要对应的接口处于活跃状态就能够获取DHCP。 -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. - 然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将演示怎样手动获取以及如何查看服务器是否已经按需要分发地址。 -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][2]‘工具能够用来检查接口的配置。这台被用来测试的DHCP服务器的设备,它只有一个网络适配器(网卡),这块网卡被命名为‘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 - 检查网络接口IP地址 -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. - 从输出结果上看,这台设备目前没IPv4地址,这样很好便于测试。我们把这台设备连接到DHCP服务器并发出一个请求。这台设备上已经安装了一个名为‘dhclient‘ 的DHCP客户端工具。因为操作系统各不相同,所以这个客户端软件也是互不一样的。 # dhclient eth0 ![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) -Request IP Address from DHCP - 从DHCP请求IP地址 -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. - 当前 `'inet addr:'` 字段中显示了属于172.27.60.0网络地址范围内的IPv4地址。值得欣慰的是当前网络还配置了正确的子网掩码并且分发了广播地址。 -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. - 到这里看起来还都不错,让我们来测试一下,看看这台设备收到新IP地址是不是由服务器发出的。这里我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,这样我们就可以不用拿一个文本编辑器去查看所有的日志文件了。命令如下: # tail /var/log/syslog ![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) -Check DHCP Logs - 检查DHCP日志文件 -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. - OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。至此DHCP服务器搭建成功并且运行。如果有需要你可以继续配置其他的网络,排查故障,确保安全。 -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. - 在以后的Debian教程中我会讲一些新的 ISC-DHCP-Server 功能。有时间的话我将写一篇关于Bind9和DDNS的教程,融入到这篇文章里面。 -------------------------------------------------------------------------------- From 2f2456862999a63d9d057c577c6d6d5391f085cf Mon Sep 17 00:00:00 2001 From: ivo wang Date: Thu, 3 Dec 2015 12:39:01 +0800 Subject: [PATCH 0463/1710] Update 20150806 Installation Guide for Puppet on Ubuntu 15.04.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 认领这篇 --- .../20150806 Installation Guide for Puppet on Ubuntu 15.04.md | 1 + 1 file changed, 1 insertion(+) 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 ae8df117ef..59a243f0e5 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 ivowang 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. From 51745ee9d4b8681289855fdfe511b017df5d9093 Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 3 Dec 2015 19:06:12 +0800 Subject: [PATCH 0464/1710] Create 20151201 How to use Mutt email client with encrypted passwords.md --- ...t email client with encrypted passwords.md | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 translated/tech/20151201 How to use Mutt email client with encrypted passwords.md diff --git a/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md b/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md new file mode 100644 index 0000000000..1e8a032a04 --- /dev/null +++ b/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md @@ -0,0 +1,138 @@ +如何使用加密过密码的Mutt邮件客户端 +================================================================================ +Mutt是一个开源的Linux/UNIX终端环境下的邮件客户端。连同[Alpine][1],Mutt有充分的理由在Linux命令行热衷者中有最忠诚的追随者。想一下你对邮件客户端的期待的事情,Mutt拥有:多协议支持(e.g., POP3, IMAP and SMTP),S/MIME和PGP/GPG集成,线程会话,颜色编码,可定制宏/快捷键,等等。另外,基于命令行的Mutt相比笨重的web浏览器(如:Gmail,Ymail)或可视化邮件客户端(如:Thunderbird,MS Outlook)是一个轻量访问电子邮件的选择。 + +当你想使用Mutt通过公司的SMTP/IMAP服务器访问或发送邮件,或取代网页邮件服务,可能所关心的一个问题是如何保护您的邮件凭据(如:SMTP/IMAP密码)存储在一个纯文本Mutt配置文件(~/.muttrc)。 + +对于一些人安全的担忧,确实有一个容易的方法来**加密Mutt配置文件***,防止这种风险。在这个教程中,我描述了如何加密Mutt敏感配置,比如SMTP/IMAP密码使用GnuPG(GPG),一个开源的OpenPGP实现。 + +### 第一步 (可选):创建GPG密钥 ### + +因为我们将要使用GPG加密Mutt配置文件,如果你没有,第一步就是创建一个GPG密钥(公有/私有 密钥对)。如果有,忽略这步。 + +创建一个新GPG密钥,输入下面的。 + + $ gpg --gen-key + +选择密钥类型(RSA),密钥长度(2048 bits),和过期时间(0,不过期)。当出现用户ID提示时,输入你的名字(Dan Nanni) 和邮箱地址(myemail@email.com)关联到私有/公有密钥对。最后,输入一个密码来保护你的私钥。 + +![](https://c2.staticflickr.com/6/5726/22808727824_7735f11157_c.jpg) + +生成一个GPG密钥需要大量的随机字节熵,所以在生成密钥期间确保在你的系统上执行一些随机行为(如:打键盘,移动鼠标或者读写磁盘)。根据密钥长度决定生成GPG密钥要花几分钟或更多时间。 + +![](https://c1.staticflickr.com/1/644/23328597612_6ac5a29944_c.jpg) + +### 第二部:加密Mutt敏感配置 ### + +下一步,在~/.mutt目录创建一个新的文本文件,然后把一些你想隐藏的Mutt敏感配置放进去。这个例子里,我指定了SMTP/IMAP密码。 + + $ mkdir ~/.mutt + $ vi ~/.mutt/password + +---------- + + set smtp_pass="XXXXXXX" + set imap_pass="XXXXXXX" + +现在gpg用你的公钥加密这个文件如下。 + + $ gpg -r myemail@email.com -e ~/.mutt/password + +这将创建~/.mutt/password.gpg,这个是一个GPG加密原始版本文件。 + +继续删除~/.mutt/password,只保留GPG加密版本。 + +### 第三部:创建完整Mutt配置文件 ### + +由于你已经在一个单独的文件加密了Mutt敏感配置,你可以在~/.muttrc指定其余的Mutt配置。然后增加下面这行在~/.muttrc末尾。 + + source "gpg -d ~/.mutt/password.gpg |" + +当你使用Mutt,这行将解密~/.mutt/password.gpg,然后将解密内容应用到你的Mutt配置。 + +下面展示一个完整Mutt配置例子,这允许你用Mutt访问Gmail,没有暴露你的SMTP/IMAP密码。取代你用Gmail ID登陆你的账户。 + + set from = "yourgmailaccount@gmail.com" + set realname = "Your Name" + set smtp_url = "smtp://yourgmailaccount@smtp.gmail.com:587/" + set imap_user = "yourgmailaccount@gmail.com" + set folder = "imaps://imap.gmail.com:993" + set spoolfile = "+INBOX" + set postponed = "+[Google Mail]/Drafts" + set trash = "+[Google Mail]/Trash" + set header_cache =~/.mutt/cache/headers + set message_cachedir =~/.mutt/cache/bodies + set certificate_file =~/.mutt/certificates + set move = no + set imap_keepalive = 900 + + # encrypted IMAP/SMTP passwords + source "gpg -d ~/.mutt/password.gpg |" + +### 第四部(可选):配置GPG代理 ### + +这时候,你将可以使用加密了IMAP/SMTP密码的Mutt。无论如何,每次你运行Mutt,你都要先被提示输入一个GPG密码来使用你的私钥解密IMAP/SMTP密码。 + +![](https://c2.staticflickr.com/6/5667/23437064775_20c874940f_c.jpg) + +如果你想避免这样的GPG密码提示,你可以部署gpg代理。运行一个后台程序,gpg代理安全的缓存你的GPG密码,无需手工干预gpg自动从gpg代理获得你的GPG密码。如果你正在使用Linux桌面,你可以使用桌面特定方式来配置一些东西等价于gpg代理,例如,GNOME桌面的gnome-keyring-daemon。 + +你可以在基于Debian系统安装gpg代理: + +$ sudo apt-get install gpg-agent + +gpg代理是基于Red Hat系统预装的。 + +现在增加下面这些道你的.bashrc文件。 + + envfile="$HOME/.gnupg/gpg-agent.env" + if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then + eval "$(cat "$envfile")" + else + eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")" + fi + export GPG_AGENT_INFO + +重载.bashrc,或单纯的登出然后登陆回来。 + + $ source ~/.bashrc + +现在确认GPG_AGENT_INFO环境变量已经设置妥当。 + + $ echo $GPG_AGENT_INFO + +---------- + + /tmp/gpg-0SKJw8/S.gpg-agent:942:1 + +并且,当你输入gpg-agent命令时,你应该看到下面的信息。 + + $ gpg-agent + +---------- + + gpg-agent: gpg-agent running and available + +一旦gpg-agent启动运行,它将会在第一次提示你输入密码时缓存你的GPG密码。随后你运行Mutt多次,你将不会被提示要GPG密码(gpg-agent一直开着,缓存就不会过期)。 + +![](https://c1.staticflickr.com/1/664/22809928093_3be57698ce_c.jpg) + +### 结论 ### + +在这个指导里,我提出一个方法加密Mutt敏感配置如SMTP/IMAP密码使用GnuPG。注意,如果你想在Mutt上使用GnuPG或者登陆你的邮件信息,你可以参考[官方指南][2]在使用GPG与Mutt结合。 + +如果你知道任何使用Mutt的安全技巧,随时分享他。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/mutt-email-client-encrypted-passwords.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]:http://xmodulo.com/gmail-command-line-linux-alpine.html +[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG From bfb7cbeb1c975026b52e1afad877170ed875d0e2 Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 3 Dec 2015 19:06:20 +0800 Subject: [PATCH 0465/1710] Delete 20151201 How to use Mutt email client with encrypted passwords.md --- ...t email client with encrypted passwords.md | 139 ------------------ 1 file changed, 139 deletions(-) delete mode 100644 sources/tech/20151201 How to use Mutt email client with encrypted passwords.md diff --git a/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md b/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md deleted file mode 100644 index 758fe7c8b2..0000000000 --- a/sources/tech/20151201 How to use Mutt email client with encrypted passwords.md +++ /dev/null @@ -1,139 +0,0 @@ -wyangsun translating -How to use Mutt email client with encrypted passwords -================================================================================ -Mutt is an open-source email client written for Linux/UNIX terminal environment. Together with [Alpine][1], Mutt has the most devoted followers among Linux command-line enthusiasts, and for good reasons. Think of anything you expect from an email client, and Mutt has it: multi-protocol support (e.g., POP3, IMAP and SMTP), S/MIME and PGP/GPG integration, threaded conversation, color coding, customizable macros/keybindings, and so on. Besides, terminal-based Mutt is a lightweight alternative for accessing emails compared to bulky web browser-based (e.g., Gmail, Ymail) or GUI-based email clients (e.g., Thunderbird, MS Outlook). - -When you want to use Mutt to access or send emails via corporate SMTP/IMAP servers or replace web mail services, one concern you may have is how to protect your email credentials (e.g., SMTP/IMAP passwords) stored in a plain-text Mutt configuration file (~/.muttrc). - -For those who are security-conscious, there is actually an easy way to **encrypt Mutt configuration** to prevent such risk. In this tutorial, I describe how you can encrypt sensitive Mutt configuration such as SMTP/IMAP passwords using GnuPG (GPG), an open-source implementation of OpenPGP. - -### Step One (Optional): Create GPG Key ### - -Since we are going to use GPG to encrypt Mutt configuration, the first step is to create a GPG key (public/private keypair) if you don't have one. If you do, skip this step. - -To create a new GPG key, type the following. - - $ gpg --gen-key - -Choose the key type (RSA), keysize (2048 bits), and expiration date (0: no expiration). When prompted for a user ID, type your name (Dan Nanni) and email address (myemail@email.com) to be associated with the private/public keypair. Finally, type a passphrase to protect your private key. - -![](https://c2.staticflickr.com/6/5726/22808727824_7735f11157_c.jpg) - -Generating a GPG key requires a lot of random bytes for entropy, so make sure to perform some random actions on your system (e.g., type on a keyboard, move a mouse or read/write a disk) during key generation. Depending on keysize, it may take a few minutes or more to generate a GPG key. - -![](https://c1.staticflickr.com/1/644/23328597612_6ac5a29944_c.jpg) - -### Step Two: Encrypt Sensitive Mutt Configuration ### - -Next, create a new text file in ~/.mutt directory, and put in the file any sensitive Mutt configuration you want to hide. In this example, I specify SMTP/IMAP passwords. - - $ mkdir ~/.mutt - $ vi ~/.mutt/password - ----------- - - set smtp_pass="XXXXXXX" - set imap_pass="XXXXXXX" - -Now encrypt this file with gpg using your public key as follows. - - $ gpg -r myemail@email.com -e ~/.mutt/password - -This will create ~/.mutt/password.gpg, which is a GPG-encrypted version of the original file. - -Go ahead and remove ~/.mutt/password, leaving only the GPG-encrypted version. - -### Step Three: Create Full Mutt Configuration ### - -Now that you have encrypted sensitive Mutt configuration in a separate file, you can specify the rest of your Mutt configuration in ~/.muttrc. Then add the following line at the end of ~/.muttrc. - - source "gpg -d ~/.mutt/password.gpg |" - -This line will decrypt ~/.mutt/password.gpg when you launch Mutt, and apply the decrypted content to your Mutt configuration. - -The following shows an example of full Mutt configuration which allows you to access Gmail with Mutt, without revealing your SMTP/IMAP passwords. Replace yourgmailaccount with your Gmail ID. - - set from = "yourgmailaccount@gmail.com" - set realname = "Your Name" - set smtp_url = "smtp://yourgmailaccount@smtp.gmail.com:587/" - set imap_user = "yourgmailaccount@gmail.com" - set folder = "imaps://imap.gmail.com:993" - set spoolfile = "+INBOX" - set postponed = "+[Google Mail]/Drafts" - set trash = "+[Google Mail]/Trash" - set header_cache =~/.mutt/cache/headers - set message_cachedir =~/.mutt/cache/bodies - set certificate_file =~/.mutt/certificates - set move = no - set imap_keepalive = 900 - - # encrypted IMAP/SMTP passwords - source "gpg -d ~/.mutt/password.gpg |" - -### Step Four (Optional): Configure GPG-agent ### - -At this point, you will be able to use Mutt with encrypted IMAP/SMTP passwords. However, every time you launch Mutt, you will first be prompted to enter a GPG passphrase in order to decrypt IMAP/SMTP passwords using your private key. - -![](https://c2.staticflickr.com/6/5667/23437064775_20c874940f_c.jpg) - -If you want to avoid such GPG passphrase prompts, you can set up gpg-agent. Running as a daemon, gpg-agent securely caches your GPG passphrase, so that gpg automatically obtains your GPG passphrase from gpg-agent without you typing it manually. If you are using Linux desktop, you can use desktop-specific ways to configure something equivalent to gpg-agent, for example, gnome-keyring-daemon for GNOME desktop. - -You can install gpg-agent on Debian-based systems with: - -$ sudo apt-get install gpg-agent - -gpg-agent comes pre-installed on Red Hat based systems. - -Now add the following to your .bashrc file. - - envfile="$HOME/.gnupg/gpg-agent.env" - if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then - eval "$(cat "$envfile")" - else - eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")" - fi - export GPG_AGENT_INFO - -Reload .bashrc, or simply log out and log back in. - - $ source ~/.bashrc - -Now confirm that GPG_AGENT_INFO environment variable is set properly. - - $ echo $GPG_AGENT_INFO - ----------- - - /tmp/gpg-0SKJw8/S.gpg-agent:942:1 - -Also, when you type gpg-agent command, you should see the following message. - - $ gpg-agent - ----------- - - gpg-agent: gpg-agent running and available - -Once gpg-agent is up and running, it will cache your GPG passphrase the first time you type it at the passphrase prompt. Subsequently when you launch Mutt multiple times, you won't be prompted for a GPG passphrase (as long as gpg-agent is up and the cache entry does not expire). - -![](https://c1.staticflickr.com/1/664/22809928093_3be57698ce_c.jpg) - -### Conclusion ### - -In this tutorial, I presented a way to encrypt sensitive Mutt configuration such as SMTP/IMAP passwords using GnuPG. Note that if you want to use GnuPG within Mutt to encrypt or sign your email message, you can refer to the [official guide][2] on using GPG with Mutt. - -If you know of any security tips for using Mutt, feel free to share it. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/mutt-email-client-encrypted-passwords.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/gmail-command-line-linux-alpine.html -[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG From 0e53967f551df6f4bb889e8b606a1fc6ef3bbfc9 Mon Sep 17 00:00:00 2001 From: Bestony Date: Fri, 4 Dec 2015 05:15:42 +0800 Subject: [PATCH 0466/1710] =?UTF-8?q?=E6=96=B0=E9=97=BB=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Entering Public Beta --- .../Let's Encrypt:Entering Public Beta.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sources/news/Let's Encrypt:Entering Public Beta.md diff --git a/sources/news/Let's Encrypt:Entering Public Beta.md b/sources/news/Let's Encrypt:Entering Public Beta.md new file mode 100644 index 0000000000..5c5c61ebbd --- /dev/null +++ b/sources/news/Let's Encrypt:Entering Public Beta.md @@ -0,0 +1,44 @@ +Let's Encrypt:Entering Public Beta +================================================================================ +We’re happy to announce that Let’s Encrypt has entered Public Beta. Invitations are no longer needed in order to get free +certificates from Let’s Encrypt. + +It’s time for the Web to take a big step forward in terms of security and privacy. We want to see HTTPS become the default. +Let’s Encrypt was built to enable that by making it as easy as possible to get and manage certificates. + +We’d like to thank everyone who participated in the Limited Beta. Let’s Encrypt issued over 26,000 certificates during the +Limited Beta period. This allowed us to gain valuable insight into how our systems perform, and to be confident about moving +to Public Beta. + +We’d also like to thank all of our [sponsors][1] for their support. We’re happy to have announced earlier today that +[Facebook is our newest Gold sponsor][2]/ + +We have more work to do before we’re comfortable dropping the beta label entirely, particularly on the client experience. +Automation is a cornerstone of our strategy, and we need to make sure that the client works smoothly and reliably on a +wide range of platforms. We’ll be monitoring feedback from users closely, and making improvements as quickly as possible. + +Instructions for getting a certificate with the [Let’s Encrypt client][3] can be found [here][4]. + +[Let’s Encrypt Community Support][5] is an invaluable resource for our community, we strongly recommend making use of the +site if you have any questions about Let’s Encrypt. + +Let’s Encrypt depends on support from a wide variety of individuals and organizations. Please consider [getting involved][6] +, and if your company or organization would like to sponsor Let’s Encrypt please email us at [sponsor@letsencrypt.org][7]. +-------------------------------------------------------------------------------- + +via: https://letsencrypt.org/2015/12/03/entering-public-beta.html + +作者:[Josh Aas][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://letsencrypt.org/2015/12/03/entering-public-beta.html +[1]:https://letsencrypt.org/sponsors/ +[2]:https://letsencrypt.org/2015/12/03/facebook-sponsorship.html +[3]:https://github.com/letsencrypt/letsencrypt +[4]:https://letsencrypt.readthedocs.org/en/latest/ +[5]:https://community.letsencrypt.org/ +[6]:https://letsencrypt.org/getinvolved/ +[7]:mailto:sponsor@letsencrypt.org From 0281425e3eb0434448c307cb5c54ddb3e6902e61 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Fri, 4 Dec 2015 09:16:19 +0800 Subject: [PATCH 0467/1710] [translating]Why did you start using Linux --- sources/talk/20150820 Why did you start using Linux.md | 1 + 1 file changed, 1 insertion(+) 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 5fb6a8d4fe..58b89e1f74 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 @@ +[bazz2222] 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 From 2aaec293dda665b83b371100d8768800856a99c3 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 10:53:37 +0800 Subject: [PATCH 0468/1710] Create Installation Guide for Puppet on Ubuntu 15.04 --- ...tallation Guide for Puppet on Ubuntu 15.04 | 411 ++++++++++++++++++ 1 file changed, 411 insertions(+) create mode 100644 translated/tech/Installation Guide for Puppet on Ubuntu 15.04 diff --git a/translated/tech/Installation Guide for Puppet on Ubuntu 15.04 b/translated/tech/Installation Guide for Puppet on Ubuntu 15.04 new file mode 100644 index 0000000000..70bdb46ad9 --- /dev/null +++ b/translated/tech/Installation Guide for Puppet on Ubuntu 15.04 @@ -0,0 +1,411 @@ +如何在Ubuntu 15.04中安装puppet +================================================================================ + +大家好,本教程将教大家如何在ubuntu 15.04上面安装puppet,用它来管理你的服务器基础环境。puppet是由puppet实验室开发并维护的一款开源软件,它帮我们自动的管理配置服务器的基础环境。不管我们管理的是几个服务器还是数以千计的机器设备组成的业务流程及报表,puppet都能够使管理员从繁琐的手动调整中解放出来,腾出时间和精力去提升整体效率。它能够确保自动化流程作业的一致性,可靠性以及稳定性。它让管理员和开发者走得更近,叫付出更加简洁清晰设计良好的代码。puppet提供了管理配置和自动化数据中心的2个解决方案。分别是**puppet开源项目 and puppet商业版**.puppet开源项目在apache2.0上是灵活可定制的的解决方案,设置初衷是帮助他们完成那些经常操作的重复性工作。pupprt商业版是一个全平台复杂IT环境下的成熟解决方案,它除了拥有开源版本所有优势以外还有移动端apps,只有商业版才有的加强支持,以及模块化和集成管理等。Puppet使用SSL证书来认证主机与代理节点之间的通信。 + +本教程将要介绍如何在ubuntu15.04的主机和代理节点上面安装开源版的puppet。在这我们用一台服务器做主机管理和控制剩余的当作puppet的代理节点的服务器,这些代理节点将依据服务器来进行配置。在ubuntu 15.04只需要简单的几步就能安装配置好puppet,用它来管理我们的服务器基础环境非常的方便。(译者注:puppet采用的C/S架构所以必须有至少有一台作为服务端,其他作为客户端处理) +### 1.设置主机### + Here is the infrastructure of the server that we're gonna use for this tutorial. +在本教程里,我们将使用用2台运行ubuntu 15.04 "Vivid Vervet"的主机,一台作为服务端,另一台作为puppet的代理节点。这就是我们将用到的服务器基础环境。 + +puupet服务器IP:44.55.88.6,主机名: puppetmaster +puppet 代理节点 IP 45.55.86.39 ,主机名: puppetnode + +Now we'll add the entry of the machines to /etc/hosts on both machines node agent and master server. +我们要在代理节点和服务器这两天机器的hosts里面都添加上相应的条目,使用root或是sudo访问权限来编辑/etc/hosts文件命令如下: + # nano /etc/hosts + + 45.55.88.6 puppetmaster.example.com puppetmaster + 45.55.86.39 puppetnode.example.com puppetnode + +注意,puppet服务端必使用8140端口来运行,所以请务必保证开启8140端口。 + +### 2. 用NTP更新时间 ### + +To do so, here's the command below that we need to run on both master and node agent. +puppet的代理节点所使用系统时间必须要准确,这样可以避免代理证书出现问题。如果有时间差异,那么证书将过期失效,所以服务器与代理节点的系统时间必须双方互相同步。我们使用NTP(Network Time Protocol,网络时间协议)来更新同步时间。在服务器与代理节点上面分别运行以下命令来同步时间: + # ntpdate pool.ntp.org + + 17 Jun 00:17:08 ntpdate[882]: adjust time server 66.175.209.17 offset -0.001938 sec (译者注:显示类似的输出结果表示运行正常) + +使用下面的命令更新你的软件仓库,安装并运行ntp服务 + + # apt-get update && sudo apt-get -y install ntp ; service ntp restart + +### 3. 安装服务器软件 ### + +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. +有很多的方法可以用来安装开源版本的puppet。在本教程中我们在puppet实验室官网下载一个名为puppetlabs-release的软件包,安装后它为我们在软件源里面添加puppetmaster-passenger。puppetmaster-passenger是基于apache的puppet服务端。我们开始下载这个软件包 + # 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] + +下载完成后我们要安装这个软件包 + + # 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) ... + +使用apt包管理命令更新一下本地的软件源 + + # apt-get update + +现在我们就可以使用下面的命令来安装puppetmaster-passenger了 + + # apt-get install puppetmaster-passenger + +**提示**: 在安装的时候可能会报错**Warning: Setting templatedir is deprecated.请查看 http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')** 不过不用担心,忽略掉它就好,报错的意思是templatedir过时了,我们只需要在设置配置文件的时候把这一项disable就行了。 + +如何来查看puppet master是否已经安装成功了呢?非常简单只需要使用下面的命令查看它的版本就可以了。 + # puppet --version + + 3.8.1 + + +现在我们已经安装好了puppet master。要想使用puppet master apache服务就必须运行起来,因为puppet master进程的运行是基于apache的。 +在开始之前,我们将apache服务停止,这样puppet muster也会停止运行。 + + # systemctl stop apache2 + +### 4. 使用Apt工具锁定Master(服务端)版本 ### + +现在已经安装了 3.8.1版的puppet,我们锁定这个版本不让它随意升级,因为升级会造成配置文件混乱。 使用apT工具来锁定它,这里我们需要使用文本编辑器来创建一个新的文件 **/etc/apt/preferences.d/00-puppet.pref** + + # nano /etc/apt/preferences.d/00-puppet.pref + +在新创建的文件里面添加以下内容 + # /etc/apt/preferences.d/00-puppet.pref + Package: puppet puppet-common puppetmaster-passenger + Pin: version 3.8* + Pin-Priority: 501 + +这样在以后的系统软件升级中puppet将被锁住不会跟随系统软件一起升级。 + +### 5. 配置 Puppet### +Puppet master作为一个证书发行机构,所有代理证书的请求都将由它来处理。首先我们要删除所有在软件包安装过程中创建出来已经存在的ssl证书。本地默认的puppet证书在/var/lib/puppet/ssl。因此我们只需要使用rm命令来移除这些证书就可以了。 + # rm -rf /var/lib/puppet/ssl + + +现在来配置这些证书,在创建puppet master'证书的时候,需要用到能与服务器通信的代理节点的DNS名称。使用文本编辑器来编辑服务器的配置文件puppet.conf + # nano /etc/puppet/puppet.conf + +输出的结果像下面这样 + + [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 + + +在这我们需要注释掉templatedir 这行使它失效。在文件的结尾添加下面的信息。 + server = puppetmaster + environment = production + runinterval = 1h + strict_variables = true + certname = puppetmaster + dns_alt_names = puppetmaster, puppetmaster.example.com + +这里有很多有用的建立适合你的配置项。 如果你有需要,在Puppet实验室有一份详细的描述文件供你阅读。 [Main Config File (puppet.conf)][1]. + +编辑完成后保存退出。 + +使用下面的命令来生成一个新的证书。 + # 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 + +至此,证书已经生成. 一旦我们看到 **Notice: Starting Puppet master version 3.8.1**, 表明证书就已经制作好了.我们按下 CTRL-C 回到shell命令行. + +如果你想看刚生成证书的信息,可以使用下面的命令来进行查看。 + + # 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. 创建一个Puppet清单 ### + +默认的主要清单在/etc/puppet/manifests/site.pp. 这个主要清单文件定义着控制哪些代理节点。我们现在使用下面的命令来创建一个清单文件 + + # nano /etc/puppet/manifests/site.pp + +在刚打开的文件里面添加下面这几行 + + # 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, + } + +以上这几行的意思是通过apache web 服务来部署代理节点 +### 7. 运行Master服务### + +已经准备好运行puppet master了,那么开启apache服务来让它运行 + + # systemctl start apache2 + +我们puppet master已经跑起来了, 但是现在他还不能管理任何代理节点。现在我们给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. +**提示**: 如果报错 **Job for apache2.service failed. 查看"systemctl status apache2.service" and "journalctl -xe" 所给出的信息.** 肯定是apache server有一些问题. 我们可以使用root或是sudo访问权限来运行**apachectl start**查看它输出的日志。 在本教程执行过程中, 我们找到一个关于证书有问题的配置文件**/etc/apache2/sites-enabled/puppetmaster.conf**. 修改其中的**SSLCertificateFile /var/lib/puppet/ssl/certs/server.pem 为 SSLCertificateFile /var/lib/puppet/ssl/certs/puppetmaster.pem** 然后注释掉后面这行**SSLCertificateKeyFile** . 然后在命令行启动apache +### 8. Puppet客户端安装 ### + +我们已经准备好了puppet的服务端,现在来安装代理节点安装客户端。这里我们要给每一个需要管理的节点安装客户端,并且确保这些节点能够通过DNS查找的服务器主机。下面将 puppetnode.example.com作为代理节点安装客户端 +在代理节点上使用下面的命令下载puppet实验室提供的软件包。 + # 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] + +在ubuntu 15.04上我们使用debian包管理系统来安装它,命令如下: + # dpkg -i puppetlabs-release-trusty.deb + +使用apt包管理命令更新一下本地的软件源 + # apt-get update + +通过远程仓库安装 + # apt-get install puppet + +Puppet客户端默认是不启动的。这里我们需要使用文本编辑器修改/etc/default/puppet文件,使它正常工作。 + # nano /etc/default/puppet + +更改 **START** 的值改成 "yes" 。 + + START=yes + +最后保存并退出。 + +### 9. 使用APT工具锁定Agent(客户端)版本### + +和上面的步骤一样为防止随意升级造成的配置文件混乱,我们要将该版本使用apt工具锁定。具体做法是使用文本编辑器来创建一个新的文件 **/etc/apt/preferences.d/00-puppet.pref** + # nano /etc/apt/preferences.d/00-puppet.pref + +在新建的文件里面加入如下内容 + + # /etc/apt/preferences.d/00-puppet.pref + Package: puppet puppet-common + Pin: version 3.8* + Pin-Priority: 501 + +这样puppet就不会随着系统软件升级而随意升级了。 + +### 10. 配置puppet代理节点 ### + +我们需要编辑一下代理节点的puppet.conf文件,来使它运行。 + + # nano /etc/puppet/puppet.conf + +它看起来和服务端的配置文件完全一样。 +同样注释掉**templatedir**这行. 在这里我们需要删除掉所有关于[master]的部分。 + + +假定服务端可用我们的客户端应该是可以和它相互连接通信的。如果不行我们需要使用完整的域名puppetmaster.example.com + [agent] + server = puppetmaster.example.com + certname = puppetnode.example.com + +在文件的结尾增加上面3行,增加之后文件内容像下面这样。 + + [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 + +最后保存并退出。 + +使用下面的命令来启动客户端软件 + + # systemctl start puppet + +如果一切顺利的话,我们不会看到命令行有任何输出。 第一次运行的时候,代理节点会生成一个ssl证书并且发送一个请求给服务端,通过确认后,两台机器就可以互相通信了。 + +**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. 主服务器上的签名证书请求 ### + +第一次运行的时候,代理节点会生成一个ssl证书并且发送一个请求给服务端.在主服务器给代理节点服务器的证书签名之后,主服务器才能和代理服务器通信并且控制代理服务器。 + +在主服务器上使用下面的命令来列出现有的证书请求 + # 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 + + 因为只设置了一台代理节点服务器,所以我们将看到只有一个请求。它看起来像是代理节点服务器的域名和主机名。 +注意有没有“+”号在前面,代表这个证书有没有被签名。 + +使用**puppet cert sign**到**hostname**这个命令来签署这个签名请求。 + # 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' + +服务端只能和它所签名的代理节点通信并控制代理节点。 + +如想我们想签署所有的请求, 我们需要使用-all选项,如下所示。 + + # puppet cert sign --all + +### 删除一个Puppet证书 ### + +如果我们想移除一个主机,或者想重建一个主机然后再添加它. 下面的例子我们将展示如何删除puppet master上面的一个证书. 使用的命令如下: + + # 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' + +如果我们想查看目前所有的签署和未签署的请求,使用下面这条命令 + # 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. 部署一个 Puppet清单 ### + +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清单,我们现在署代理节点服务器清单。要应用并加载主清单,我们可以在代理节点服务器上面使用下面的命令 + + # 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 + +这里像我们展示了主清单如何去管理一个单一的服务器。 +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清单与主清单没有什么关联,那么需要使用puppet apply 到相应的路径。它仅适用于该代理节点。 + # puppet apply /etc/puppet/manifest/test.pp + +### 13. 配置一个特殊节点清单 ### + +如果我们想部署一个清单到某个特定的节点,我们需要配置清单如下。 + +在主服务器上面使用文本编辑器编辑/etc/puppet/manifest/site.pp + # nano /etc/puppet/manifest/site.pp + +添加下面的内容进去 + + 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, + } + } + +这里的配置显示我们将在名为puppetnode and puppetnode1的2个特殊节点上面安装apache服务. 这里可以添加更多我们需要安装部署的具体节点进去。 +### 14. 配置清单模块 ### + +模块化组件组是非常实用的,在Puppet社区有很多人提交自己的模块。 + +在主puppet服务器上, 我们将使用uppet module命令来安装**puppetlabs-apache** 模块。 + + # puppet module install puppetlabs-apache + +**警告**: 千万不要在一个已经部署apache环境的机器上面使用这个模块,否则它将清空你的apache配置。 + +现在用文本编辑器来修改 **site.pp** + + # nano /etc/puppet/manifest/site.pp + +添加下面的内容进去,意思是在 puppetnode上面安装apache服务。 + + node 'puppet-node' { + class { 'apache': } # use apache module + apache::vhost { 'example.com': # define vhost resource + port => '80', + docroot => '/var/www/html' + } + } + +保存退出。这样为我们的代理服务器重新配置部署基础环境。 + +### 总结 ### + +现在我们已经成功的在ubuntu 15.04上面部署并运行puppet来管理代理节点服务器的基础运行环境.我们学习了,puppet是如何工作的,配置清单文件,节点与主机间的ssl证书认证。使用puppet控制,管理并且配置众多的代理节点服务器是非常容易的。如果你有任何的问题,建议,反馈,请务必与我们取得联系我们将及时的改善更新,谢谢。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-puppet-ubuntu-15-04/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/ivo-wang) +校对:[校对者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 From ab096a3c4cb4e3140fd9944688e1dbf34023f938 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 11:43:48 +0800 Subject: [PATCH 0469/1710] Update and rename Installation Guide for Puppet on Ubuntu 15.04 to 20150806 Installation Guide for Puppet on Ubuntu 15.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 --- ...allation Guide for Puppet on Ubuntu 15.04} | 119 ++++++++---------- 1 file changed, 54 insertions(+), 65 deletions(-) rename translated/tech/{Installation Guide for Puppet on Ubuntu 15.04 => 20150806 Installation Guide for Puppet on Ubuntu 15.04} (56%) diff --git a/translated/tech/Installation Guide for Puppet on Ubuntu 15.04 b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04 similarity index 56% rename from translated/tech/Installation Guide for Puppet on Ubuntu 15.04 rename to translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04 index 70bdb46ad9..290698a62f 100644 --- a/translated/tech/Installation Guide for Puppet on Ubuntu 15.04 +++ b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04 @@ -1,18 +1,16 @@ 如何在Ubuntu 15.04中安装puppet ================================================================================ -大家好,本教程将教大家如何在ubuntu 15.04上面安装puppet,用它来管理你的服务器基础环境。puppet是由puppet实验室开发并维护的一款开源软件,它帮我们自动的管理配置服务器的基础环境。不管我们管理的是几个服务器还是数以千计的机器设备组成的业务流程及报表,puppet都能够使管理员从繁琐的手动调整中解放出来,腾出时间和精力去提升整体效率。它能够确保自动化流程作业的一致性,可靠性以及稳定性。它让管理员和开发者走得更近,叫付出更加简洁清晰设计良好的代码。puppet提供了管理配置和自动化数据中心的2个解决方案。分别是**puppet开源项目 and puppet商业版**.puppet开源项目在apache2.0上是灵活可定制的的解决方案,设置初衷是帮助他们完成那些经常操作的重复性工作。pupprt商业版是一个全平台复杂IT环境下的成熟解决方案,它除了拥有开源版本所有优势以外还有移动端apps,只有商业版才有的加强支持,以及模块化和集成管理等。Puppet使用SSL证书来认证主机与代理节点之间的通信。 +大家好,本教程将教各位如何在ubuntu 15.04上面安装puppet,用它来管理你的服务器基础环境。puppet是由puppet实验室开发并维护的一款开源软件,它能够帮我们自动的管理配置服务器的基础环境。不管我们管理的是几个服务器还是数以千计的计算机组成的业务报表体系,puppet都能够使管理员从繁琐的手动配置调整中解放出来,腾出时间和精力去提系统的升整体效率。它能够确保所有自动化流程作业的一致性,可靠性以及稳定性。它让管理员和开发者更紧密的联系在一起,使开发者更容易产出付出设计良好,简洁清晰的代码。puppet提供了管理配置和自动化数据中心的2个解决方案。这两个解决方案分别是**puppet开源项目 和 puppet商业版**。puppet开源项目依赖于apache2.0,它是一个非常灵活可随意定制的解决方案,设置初衷是帮助管理员去完成那些重复性操作工作。pupprt商业版是一个全平台复杂IT环境下的成熟解决方案,它除了拥有开源版本所有优势以外还有移动端apps,只有商业版才有的加强支持,以及模块化和集成管理等。Puppet使用SSL证书来认证主机与代理节点之间的通信。 -本教程将要介绍如何在ubuntu15.04的主机和代理节点上面安装开源版的puppet。在这我们用一台服务器做主机管理和控制剩余的当作puppet的代理节点的服务器,这些代理节点将依据服务器来进行配置。在ubuntu 15.04只需要简单的几步就能安装配置好puppet,用它来管理我们的服务器基础环境非常的方便。(译者注:puppet采用的C/S架构所以必须有至少有一台作为服务端,其他作为客户端处理) +本教程将要介绍如何在ubuntu 15.04的主机和代理节点上面安装开源版的puppet。在这我们用一台服务器做主机,管理和控制剩余当作puppet的代理节点的服务器,这些代理节点将依据服务器来进行配置。在ubuntu 15.04只需要简单的几步就能安装配置好puppet,用它来管理我们的服务器基础环境非常的方便。(译者注:puppet采用的C/S架构所以必须有至少有一台作为服务端,其他作为客户端处理) ### 1.设置主机### - Here is the infrastructure of the server that we're gonna use for this tutorial. -在本教程里,我们将使用用2台运行ubuntu 15.04 "Vivid Vervet"的主机,一台作为服务端,另一台作为puppet的代理节点。这就是我们将用到的服务器基础环境。 +在本教程里,我们将使用用2台运行ubuntu 15.04 "Vivid Vervet"的主机,一台作为服务端,另一台作为puppet的代理节点。下面是我们将用到的服务器的基础信息。 puupet服务器IP:44.55.88.6,主机名: puppetmaster -puppet 代理节点 IP 45.55.86.39 ,主机名: puppetnode +puppet代理节点IP: 45.55.86.39 ,主机名: puppetnode -Now we'll add the entry of the machines to /etc/hosts on both machines node agent and master server. -我们要在代理节点和服务器这两天机器的hosts里面都添加上相应的条目,使用root或是sudo访问权限来编辑/etc/hosts文件命令如下: +我们要在代理节点和服务器这两天机器的hosts里面都添加上相应的条目,使用root或是sudo访问权限来编辑/etc/hosts文件,命令如下: # nano /etc/hosts 45.55.88.6 puppetmaster.example.com puppetmaster @@ -22,20 +20,18 @@ Now we'll add the entry of the machines to /etc/hosts on both machines node agen ### 2. 用NTP更新时间 ### -To do so, here's the command below that we need to run on both master and node agent. -puppet的代理节点所使用系统时间必须要准确,这样可以避免代理证书出现问题。如果有时间差异,那么证书将过期失效,所以服务器与代理节点的系统时间必须双方互相同步。我们使用NTP(Network Time Protocol,网络时间协议)来更新同步时间。在服务器与代理节点上面分别运行以下命令来同步时间: +puppet代理节点所使用系统时间必须要准确,这样可以避免代理证书出现问题。如果有时间差异,那么证书将过期失效,所以服务器与代理节点的系统时间必须互相同步。我们使用NTP(Network Time Protocol,网络时间协议)来同步时间。在服务器与代理节点上面分别运行以下命令来同步时间。 # ntpdate pool.ntp.org - 17 Jun 00:17:08 ntpdate[882]: adjust time server 66.175.209.17 offset -0.001938 sec (译者注:显示类似的输出结果表示运行正常) + 17 Jun 00:17:08 ntpdate[882]: adjust time server 66.175.209.17 offset -0.001938 sec (译者注:显示类似的输出结果表示运行正常) -使用下面的命令更新你的软件仓库,安装并运行ntp服务 +如果没有ntp,请使用下面的命令更新你的软件仓库,安装并运行ntp服务 # apt-get update && sudo apt-get -y install ntp ; service ntp restart ### 3. 安装服务器软件 ### -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. -有很多的方法可以用来安装开源版本的puppet。在本教程中我们在puppet实验室官网下载一个名为puppetlabs-release的软件包,安装后它为我们在软件源里面添加puppetmaster-passenger。puppetmaster-passenger是基于apache的puppet服务端。我们开始下载这个软件包 +安装开源版本的puppet有很多的方法。在本教程中我们在puppet实验室官网下载一个名为puppetlabs-release的软件包,安装后它将为我们在软件源里面添加puppetmaster-passenger。puppetmaster-passenger依赖于apache的puppet服务端。我们开始下载这个软件包 # cd /tmp/ # wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb @@ -50,7 +46,7 @@ There are many ways to install open source puppet. In this tutorial, we'll downl 2015-06-17 00:19:26 (130 KB/s) - ‘puppetlabs-release-trusty.deb’ saved [7384/7384] -下载完成后我们要安装这个软件包 +下载完成,我们来安装它 # dpkg -i puppetlabs-release-trusty.deb @@ -64,26 +60,25 @@ There are many ways to install open source puppet. In this tutorial, we'll downl # apt-get update -现在我们就可以使用下面的命令来安装puppetmaster-passenger了 +现在我们就可以安装puppetmaster-passenger了 # apt-get install puppetmaster-passenger -**提示**: 在安装的时候可能会报错**Warning: Setting templatedir is deprecated.请查看 http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')** 不过不用担心,忽略掉它就好,报错的意思是templatedir过时了,我们只需要在设置配置文件的时候把这一项disable就行了。 +**提示**: 在安装的时候可能会报错**Warning: Setting templatedir is deprecated.请查看 http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')** 不过不用担心,忽略掉它就好,我们只需要在设置配置文件的时候把这一项disable就行了。 -如何来查看puppet master是否已经安装成功了呢?非常简单只需要使用下面的命令查看它的版本就可以了。 +如何来查看puppet master是否已经安装成功了呢?非常简单,只需要使用下面的命令查看它的版本就可以了。 # puppet --version 3.8.1 - -现在我们已经安装好了puppet master。要想使用puppet master apache服务就必须运行起来,因为puppet master进程的运行是基于apache的。 +现在我们已经安装好了puppet master。要想使用puppet master apache服务就必须运行起来,因为puppet master进程的运行是依赖于apache的。 在开始之前,我们将apache服务停止,这样puppet muster也会停止运行。 # systemctl stop apache2 ### 4. 使用Apt工具锁定Master(服务端)版本 ### -现在已经安装了 3.8.1版的puppet,我们锁定这个版本不让它随意升级,因为升级会造成配置文件混乱。 使用apT工具来锁定它,这里我们需要使用文本编辑器来创建一个新的文件 **/etc/apt/preferences.d/00-puppet.pref** +现在已经安装了 3.8.1版的puppet,我们锁定这个版本不让它随意升级,因为升级会造成配置文件混乱。 使用apt工具来锁定它,这里我们需要使用文本编辑器来创建一个新的文件 **/etc/apt/preferences.d/00-puppet.pref** # nano /etc/apt/preferences.d/00-puppet.pref @@ -93,14 +88,13 @@ There are many ways to install open source puppet. In this tutorial, we'll downl Pin: version 3.8* Pin-Priority: 501 -这样在以后的系统软件升级中puppet将被锁住不会跟随系统软件一起升级。 +这样在以后的系统软件升级中puppet master将被锁住不会跟随系统软件一起升级。 -### 5. 配置 Puppet### -Puppet master作为一个证书发行机构,所有代理证书的请求都将由它来处理。首先我们要删除所有在软件包安装过程中创建出来已经存在的ssl证书。本地默认的puppet证书在/var/lib/puppet/ssl。因此我们只需要使用rm命令来移除这些证书就可以了。 +### 5. 配置 Puppet Master### +Puppet master作为一个证书发行机构,所有代理证书的请求都将由它来处理。首先我们要删除所有在软件包安装过程中创建出来的ssl证书。本地默认的puppet证书在/var/lib/puppet/ssl。因此我们只需要使用rm命令来移除这些证书就可以了。 # rm -rf /var/lib/puppet/ssl - -现在来配置这些证书,在创建puppet master'证书的时候,需要用到能与服务器通信的代理节点的DNS名称。使用文本编辑器来编辑服务器的配置文件puppet.conf +现在来配置这些证书,在创建puppet master证书的时候,需要用使用DNS能查找到的代理节点名称。使用文本编辑器来修改服务器的配置文件puppet.conf # nano /etc/puppet/puppet.conf 输出的结果像下面这样 @@ -120,7 +114,7 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 ssl_client_verify_header = SSL_CLIENT_VERIFY -在这我们需要注释掉templatedir 这行使它失效。在文件的结尾添加下面的信息。 +在这我们需要注释掉templatedir 这行使它失效。然后在文件的结尾添加下面的信息。 server = puppetmaster environment = production runinterval = 1h @@ -128,7 +122,7 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 certname = puppetmaster dns_alt_names = puppetmaster, puppetmaster.example.com -这里有很多有用的建立适合你的配置项。 如果你有需要,在Puppet实验室有一份详细的描述文件供你阅读。 [Main Config File (puppet.conf)][1]. +还有很多你可能用的到的配置选项。 如果你有需要,在Puppet实验室有一份详细的描述文件供你阅读。 [Main Config File (puppet.conf)][1]. 编辑完成后保存退出。 @@ -147,9 +141,9 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 ^CNotice: Caught INT; storing stop Notice: Processing stop -至此,证书已经生成. 一旦我们看到 **Notice: Starting Puppet master version 3.8.1**, 表明证书就已经制作好了.我们按下 CTRL-C 回到shell命令行. +至此,证书已经生成。一旦我们看到 **Notice: Starting Puppet master version 3.8.1**, 表明证书就已经制作好了.我们按下 CTRL-C 回到shell命令行。 -如果你想看刚生成证书的信息,可以使用下面的命令来进行查看。 +查看新生成证书的信息,可以使用下面的命令。 # puppet cert list -all @@ -157,7 +151,7 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 ### 6. 创建一个Puppet清单 ### -默认的主要清单在/etc/puppet/manifests/site.pp. 这个主要清单文件定义着控制哪些代理节点。我们现在使用下面的命令来创建一个清单文件 +默认的主要清单是/etc/puppet/manifests/site.pp。 这个主要清单文件定义着控制哪些代理节点。现在我们来创建一个清单文件 # nano /etc/puppet/manifests/site.pp @@ -179,21 +173,20 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 ensure => running, } -以上这几行的意思是通过apache web 服务来部署代理节点 -### 7. 运行Master服务### +以上这几行的意思是给代理节点部署apache web 服务 +### 7. 运行puppet Master服务 ### -已经准备好运行puppet master了,那么开启apache服务来让它运行 +已经准备好运行puppet master了,那么开启apache服务来让它启动 # systemctl start apache2 -我们puppet master已经跑起来了, 但是现在他还不能管理任何代理节点。现在我们给master添加代理节点. +我们puppet master已经运行,不过它还不能管理任何代理节点。现在我们给puppet 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. -**提示**: 如果报错 **Job for apache2.service failed. 查看"systemctl status apache2.service" and "journalctl -xe" 所给出的信息.** 肯定是apache server有一些问题. 我们可以使用root或是sudo访问权限来运行**apachectl start**查看它输出的日志。 在本教程执行过程中, 我们找到一个关于证书有问题的配置文件**/etc/apache2/sites-enabled/puppetmaster.conf**. 修改其中的**SSLCertificateFile /var/lib/puppet/ssl/certs/server.pem 为 SSLCertificateFile /var/lib/puppet/ssl/certs/puppetmaster.pem** 然后注释掉后面这行**SSLCertificateKeyFile** . 然后在命令行启动apache +**提示**: 如果报错 **Job for apache2.service failed. 查看"systemctl status apache2.service" and "journalctl -xe" 所给出的信息.** 肯定是apache server有一些问题. 我们可以使用root或是sudo访问权限来运行**apachectl start**查看它输出的日志。 在本教程执行过程中, 我们发现一个证书配置的问题,解决方法如下**/etc/apache2/sites-enabled/puppetmaster.conf**. 修改其中的**SSLCertificateFile /var/lib/puppet/ssl/certs/server.pem 为 SSLCertificateFile /var/lib/puppet/ssl/certs/puppetmaster.pem** 然后注释掉后面这行**SSLCertificateKeyFile** . 然后在命令行启动apache ### 8. Puppet客户端安装 ### -我们已经准备好了puppet的服务端,现在来安装代理节点安装客户端。这里我们要给每一个需要管理的节点安装客户端,并且确保这些节点能够通过DNS查找的服务器主机。下面将 puppetnode.example.com作为代理节点安装客户端 -在代理节点上使用下面的命令下载puppet实验室提供的软件包。 +我们已经准备好了puppet的服务端,现在来为代理节点安装客户端。这里我们要给每一个需要管理的节点安装客户端,并且确保这些节点能够通过DNS查询到服务器主机。下面将 puppetnode.example.com作为代理节点安装客户端 +在代理节点服务器上,使用下面的命令下载puppet实验室提供的软件包。 # cd /tmp/ # wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb\ @@ -226,9 +219,9 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 最后保存并退出。 -### 9. 使用APT工具锁定Agent(客户端)版本### +### 9. 使用APT工具锁定Agent(客户端)版本 ### -和上面的步骤一样为防止随意升级造成的配置文件混乱,我们要将该版本使用apt工具锁定。具体做法是使用文本编辑器来创建一个新的文件 **/etc/apt/preferences.d/00-puppet.pref** +和上面的步骤一样为防止随意升级造成的配置文件混乱,我们要使用apt工具来把它锁定。具体做法是使用文本编辑器创建一个文件 **/etc/apt/preferences.d/00-puppet.pref** # nano /etc/apt/preferences.d/00-puppet.pref 在新建的文件里面加入如下内容 @@ -246,11 +239,10 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 # nano /etc/puppet/puppet.conf -它看起来和服务端的配置文件完全一样。 -同样注释掉**templatedir**这行. 在这里我们需要删除掉所有关于[master]的部分。 +它看起来和服务端的配置文件完全一样。同样注释掉**templatedir**这行。不同的是在这里我们需要删除掉所有关于[master]的部分。 -假定服务端可用我们的客户端应该是可以和它相互连接通信的。如果不行我们需要使用完整的域名puppetmaster.example.com +假定服务端可用,我们的客户端应该是可以和它相互连接通信的。如果不行我们需要使用完整的主机域名puppetmaster.example.com [agent] server = puppetmaster.example.com certname = puppetnode.example.com @@ -275,22 +267,20 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 # systemctl start puppet -如果一切顺利的话,我们不会看到命令行有任何输出。 第一次运行的时候,代理节点会生成一个ssl证书并且发送一个请求给服务端,通过确认后,两台机器就可以互相通信了。 - -**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. +如果一切顺利的话,我们不会看到命令行有任何输出。 第一次运行的时候,代理节点会生成一个ssl证书并且给服务端发送一个请求,经过签名确认后,两台机器就可以互相通信了。 **提示**: 如果这是你添加的第一个代理节点,建议你在添加其他节点前先给这个证书签名。一旦能够通过并正常运行,回过头来再添加其他代理节点。 -### 11. 主服务器上的签名证书请求 ### +### 11. 服务器上的签名证书请求 ### -第一次运行的时候,代理节点会生成一个ssl证书并且发送一个请求给服务端.在主服务器给代理节点服务器的证书签名之后,主服务器才能和代理服务器通信并且控制代理服务器。 +第一次运行的时候,代理节点会生成一个ssl证并且给服务端发送一个请求。在主服务器给代理节点服务器证书签名之后,主服务器才能和代理服务器通信并且控制代理服务器。 -在主服务器上使用下面的命令来列出现有的证书请求 +在主服务器上使用下面的命令来列出当前的证书请求 # 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 - 因为只设置了一台代理节点服务器,所以我们将看到只有一个请求。它看起来像是代理节点服务器的域名和主机名。 + 因为只设置了一台代理节点服务器,所以我们将只看到一个请求。 注意有没有“+”号在前面,代表这个证书有没有被签名。 使用**puppet cert sign**到**hostname**这个命令来签署这个签名请求。 @@ -299,15 +289,15 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 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' -服务端只能和它所签名的代理节点通信并控制代理节点。 +服务端只能控制它签名过的代理节点。 -如想我们想签署所有的请求, 我们需要使用-all选项,如下所示。 +如想我们想签署所有的请求, 需要使用-all选项,如下所示。 # puppet cert sign --all ### 删除一个Puppet证书 ### -如果我们想移除一个主机,或者想重建一个主机然后再添加它. 下面的例子我们将展示如何删除puppet master上面的一个证书. 使用的命令如下: +如果我们想移除一个主机,或者想重建一个主机然后再添加它。下面的例子里我们将展示如何删除puppet master上面的一个证书。使用的命令如下: # puppet cert clean hostname @@ -315,15 +305,14 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 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' -如果我们想查看目前所有的签署和未签署的请求,使用下面这条命令 +如果我们想查看所有的签署和未签署的请求,使用下面这条命令 # 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. 部署一个 Puppet清单 ### +### 12. 部署代理节点Puppet清单 ### -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清单,我们现在署代理节点服务器清单。要应用并加载主清单,我们可以在代理节点服务器上面使用下面的命令 +当配置并完成主puppet清单后,现在我们需要署代理节点服务器清单。要应用并加载主puppet清单,我们可以在代理节点服务器上面使用下面的命令 # puppet agent --test @@ -335,13 +324,13 @@ After we configure and complete the puppet manifest, we'll wanna deploy the mani Notice: Finished catalog run in 10.53 seconds 这里像我们展示了主清单如何去管理一个单一的服务器。 -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清单与主清单没有什么关联,那么需要使用puppet apply 到相应的路径。它仅适用于该代理节点。 + +如果我们打算运行的puppet清单与主puppet清单没有什么关联,那么需要使用puppet apply 到相应的路径。它仅适用于该代理节点。 # puppet apply /etc/puppet/manifest/test.pp -### 13. 配置一个特殊节点清单 ### +### 13. 配置特殊节点清单 ### -如果我们想部署一个清单到某个特定的节点,我们需要配置清单如下。 +如果我们想部署一个清单到某个特定的节点,我们需要进行以下操作。 在主服务器上面使用文本编辑器编辑/etc/puppet/manifest/site.pp # nano /etc/puppet/manifest/site.pp @@ -366,12 +355,12 @@ If we wanna run a puppet manifest that is not related to the main manifest, we c } } -这里的配置显示我们将在名为puppetnode and puppetnode1的2个特殊节点上面安装apache服务. 这里可以添加更多我们需要安装部署的具体节点进去。 +这里的配置显示我们将在名为puppetnode and puppetnode1的2个特殊节点上面安装apache服务. 这里可以添加其他我们需要安装部署的具体节点进去。 ### 14. 配置清单模块 ### -模块化组件组是非常实用的,在Puppet社区有很多人提交自己的模块。 +模块化组件组是非常实用的,在Puppet社区有很多人贡献自己的模块组件。 -在主puppet服务器上, 我们将使用uppet module命令来安装**puppetlabs-apache** 模块。 +在主puppet服务器上, 我们将使用puppet module命令来安装**puppetlabs-apache** 模块。 # puppet module install puppetlabs-apache @@ -395,7 +384,7 @@ If we wanna run a puppet manifest that is not related to the main manifest, we c ### 总结 ### -现在我们已经成功的在ubuntu 15.04上面部署并运行puppet来管理代理节点服务器的基础运行环境.我们学习了,puppet是如何工作的,配置清单文件,节点与主机间的ssl证书认证。使用puppet控制,管理并且配置众多的代理节点服务器是非常容易的。如果你有任何的问题,建议,反馈,请务必与我们取得联系我们将及时的改善更新,谢谢。 +现在我们已经成功的在ubuntu 15.04上面部署并运行puppet来管理代理节点服务器的基础运行环境。我们学习了puppet是如何工作的,编写清单文件,节点与主机间使用ssl证书认证的认证过程。使用puppet管理配置众多的代理节点服务器是非常容易的。如果你有任何的问题,建议,反馈,与我们取得联系,我们将第一时间完善更新,谢谢。 -------------------------------------------------------------------------------- From 7e6e201929e878809237fb28db4f8e7df529fd34 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 11:45:02 +0800 Subject: [PATCH 0470/1710] =?UTF-8?q?Rename=2020150806=20Installation=20Gu?= =?UTF-8?q?ide=20for=20Puppet=20on=20Ubuntu=2015.04.md=20to=2020150806=20I?= =?UTF-8?q?nstallation=20Guide=20for=20Puppet=20on=20Ubuntu=2015.04.md?= =?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 --- ...0806 Installation Guide for Puppet on Ubuntu 15.04.md翻译完毕} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/{20150806 Installation Guide for Puppet on Ubuntu 15.04.md => 20150806 Installation Guide for Puppet on Ubuntu 15.04.md翻译完毕} (100%) 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翻译完毕 similarity index 100% rename from sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md rename to sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md翻译完毕 From 98864bbc306ea66c39e5877022b6f4f0371d959b Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 11:45:43 +0800 Subject: [PATCH 0471/1710] Rename 20150806 Installation Guide for Puppet on Ubuntu 15.04 to 20150806 Installation Guide for Puppet on Ubuntu 15.04.md --- ... => 20150806 Installation Guide for Puppet on Ubuntu 15.04.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{20150806 Installation Guide for Puppet on Ubuntu 15.04 => 20150806 Installation Guide for Puppet on Ubuntu 15.04.md} (100%) diff --git a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04 b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md similarity index 100% rename from translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04 rename to translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md From 9dddb652df763de9f174f0c15b79188399841adb Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 11:48:57 +0800 Subject: [PATCH 0472/1710] Update 20150806 Installation Guide for Puppet on Ubuntu 15.04.md --- .../20150806 Installation Guide for Puppet on Ubuntu 15.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md index 290698a62f..4b40960c1c 100644 --- a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md +++ b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md @@ -391,7 +391,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 via: http://linoxide.com/linux-how-to/install-puppet-ubuntu-15-04/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/ivo-wang) +译者:[ivo-wang](https://github.com/ivo-wang) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 2df47a9d28ed1f130287c489b9fc2e3b4a0db688 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 11:50:16 +0800 Subject: [PATCH 0473/1710] Update 20150806 Installation Guide for Puppet on Ubuntu 15.04.md --- .../20150806 Installation Guide for Puppet on Ubuntu 15.04.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md index 4b40960c1c..8c96091bf0 100644 --- a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md +++ b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md @@ -32,6 +32,8 @@ puppet代理节点所使用系统时间必须要准确,这样可以避免代 ### 3. 安装服务器软件 ### 安装开源版本的puppet有很多的方法。在本教程中我们在puppet实验室官网下载一个名为puppetlabs-release的软件包,安装后它将为我们在软件源里面添加puppetmaster-passenger。puppetmaster-passenger依赖于apache的puppet服务端。我们开始下载这个软件包 + + # cd /tmp/ # wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb From f8fbc01efa7115e507606303e35524081016f088 Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 11:53:30 +0800 Subject: [PATCH 0474/1710] Update 20150806 Installation Guide for Puppet on Ubuntu 15.04.md --- ...lation Guide for Puppet on Ubuntu 15.04.md | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md index 8c96091bf0..93a9d05f80 100644 --- a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md +++ b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md @@ -11,6 +11,8 @@ puupet服务器IP:44.55.88.6,主机名: puppetmaster puppet代理节点IP: 45.55.86.39 ,主机名: puppetnode 我们要在代理节点和服务器这两天机器的hosts里面都添加上相应的条目,使用root或是sudo访问权限来编辑/etc/hosts文件,命令如下: + + # nano /etc/hosts 45.55.88.6 puppetmaster.example.com puppetmaster @@ -21,6 +23,8 @@ puppet代理节点IP: 45.55.86.39 ,主机名: puppetnode ### 2. 用NTP更新时间 ### puppet代理节点所使用系统时间必须要准确,这样可以避免代理证书出现问题。如果有时间差异,那么证书将过期失效,所以服务器与代理节点的系统时间必须互相同步。我们使用NTP(Network Time Protocol,网络时间协议)来同步时间。在服务器与代理节点上面分别运行以下命令来同步时间。 + + # ntpdate pool.ntp.org 17 Jun 00:17:08 ntpdate[882]: adjust time server 66.175.209.17 offset -0.001938 sec (译者注:显示类似的输出结果表示运行正常) @@ -69,6 +73,8 @@ puppet代理节点所使用系统时间必须要准确,这样可以避免代 **提示**: 在安装的时候可能会报错**Warning: Setting templatedir is deprecated.请查看 http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')** 不过不用担心,忽略掉它就好,我们只需要在设置配置文件的时候把这一项disable就行了。 如何来查看puppet master是否已经安装成功了呢?非常简单,只需要使用下面的命令查看它的版本就可以了。 + + # puppet --version 3.8.1 @@ -85,6 +91,8 @@ puppet代理节点所使用系统时间必须要准确,这样可以避免代 # nano /etc/apt/preferences.d/00-puppet.pref 在新创建的文件里面添加以下内容 + + # /etc/apt/preferences.d/00-puppet.pref Package: puppet puppet-common puppetmaster-passenger Pin: version 3.8* @@ -94,6 +102,8 @@ puppet代理节点所使用系统时间必须要准确,这样可以避免代 ### 5. 配置 Puppet Master### Puppet master作为一个证书发行机构,所有代理证书的请求都将由它来处理。首先我们要删除所有在软件包安装过程中创建出来的ssl证书。本地默认的puppet证书在/var/lib/puppet/ssl。因此我们只需要使用rm命令来移除这些证书就可以了。 + + # rm -rf /var/lib/puppet/ssl 现在来配置这些证书,在创建puppet master证书的时候,需要用使用DNS能查找到的代理节点名称。使用文本编辑器来修改服务器的配置文件puppet.conf @@ -117,6 +127,8 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 在这我们需要注释掉templatedir 这行使它失效。然后在文件的结尾添加下面的信息。 + + server = puppetmaster environment = production runinterval = 1h @@ -129,6 +141,8 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 编辑完成后保存退出。 使用下面的命令来生成一个新的证书。 + + # puppet master --verbose --no-daemonize Info: Creating a new SSL key for ca @@ -189,6 +203,8 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 我们已经准备好了puppet的服务端,现在来为代理节点安装客户端。这里我们要给每一个需要管理的节点安装客户端,并且确保这些节点能够通过DNS查询到服务器主机。下面将 puppetnode.example.com作为代理节点安装客户端 在代理节点服务器上,使用下面的命令下载puppet实验室提供的软件包。 + + # cd /tmp/ # wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb\ @@ -204,9 +220,12 @@ Puppet master作为一个证书发行机构,所有代理证书的请求都将 2015-06-17 00:54:42 (162 KB/s) - ‘puppetlabs-release-trusty.deb’ saved [7384/7384] 在ubuntu 15.04上我们使用debian包管理系统来安装它,命令如下: + + # dpkg -i puppetlabs-release-trusty.deb 使用apt包管理命令更新一下本地的软件源 + # apt-get update 通过远程仓库安装 @@ -224,6 +243,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 ### 9. 使用APT工具锁定Agent(客户端)版本 ### 和上面的步骤一样为防止随意升级造成的配置文件混乱,我们要使用apt工具来把它锁定。具体做法是使用文本编辑器创建一个文件 **/etc/apt/preferences.d/00-puppet.pref** + # nano /etc/apt/preferences.d/00-puppet.pref 在新建的文件里面加入如下内容 @@ -245,6 +265,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 假定服务端可用,我们的客户端应该是可以和它相互连接通信的。如果不行我们需要使用完整的主机域名puppetmaster.example.com + [agent] server = puppetmaster.example.com certname = puppetnode.example.com @@ -278,16 +299,16 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 第一次运行的时候,代理节点会生成一个ssl证并且给服务端发送一个请求。在主服务器给代理节点服务器证书签名之后,主服务器才能和代理服务器通信并且控制代理服务器。 在主服务器上使用下面的命令来列出当前的证书请求 - # puppet cert list + # 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 因为只设置了一台代理节点服务器,所以我们将只看到一个请求。 注意有没有“+”号在前面,代表这个证书有没有被签名。 使用**puppet cert sign**到**hostname**这个命令来签署这个签名请求。 - # puppet cert sign puppetnode.example.com + # 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' @@ -302,16 +323,16 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 如果我们想移除一个主机,或者想重建一个主机然后再添加它。下面的例子里我们将展示如何删除puppet master上面的一个证书。使用的命令如下: # 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' 如果我们想查看所有的签署和未签署的请求,使用下面这条命令 + # 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. 部署代理节点Puppet清单 ### 当配置并完成主puppet清单后,现在我们需要署代理节点服务器清单。要应用并加载主puppet清单,我们可以在代理节点服务器上面使用下面的命令 @@ -328,6 +349,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 这里像我们展示了主清单如何去管理一个单一的服务器。 如果我们打算运行的puppet清单与主puppet清单没有什么关联,那么需要使用puppet apply 到相应的路径。它仅适用于该代理节点。 + # puppet apply /etc/puppet/manifest/test.pp ### 13. 配置特殊节点清单 ### @@ -335,6 +357,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 如果我们想部署一个清单到某个特定的节点,我们需要进行以下操作。 在主服务器上面使用文本编辑器编辑/etc/puppet/manifest/site.pp + # nano /etc/puppet/manifest/site.pp 添加下面的内容进去 From 0cecba377b72802d1f04ac0251224d5a176f512b Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 11:55:16 +0800 Subject: [PATCH 0475/1710] Update 20150806 Installation Guide for Puppet on Ubuntu 15.04.md --- ...50806 Installation Guide for Puppet on Ubuntu 15.04.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md index 93a9d05f80..7195dbe268 100644 --- a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md +++ b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md @@ -318,7 +318,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 # puppet cert sign --all -### 删除一个Puppet证书 ### +### 12.删除一个Puppet证书 ### 如果我们想移除一个主机,或者想重建一个主机然后再添加它。下面的例子里我们将展示如何删除puppet master上面的一个证书。使用的命令如下: @@ -333,7 +333,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 + "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. 部署代理节点Puppet清单 ### +### 13. 部署代理节点Puppet清单 ### 当配置并完成主puppet清单后,现在我们需要署代理节点服务器清单。要应用并加载主puppet清单,我们可以在代理节点服务器上面使用下面的命令 @@ -352,7 +352,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 # puppet apply /etc/puppet/manifest/test.pp -### 13. 配置特殊节点清单 ### +### 14. 配置特殊节点清单 ### 如果我们想部署一个清单到某个特定的节点,我们需要进行以下操作。 @@ -381,7 +381,7 @@ Puppet客户端默认是不启动的。这里我们需要使用文本编辑器 } 这里的配置显示我们将在名为puppetnode and puppetnode1的2个特殊节点上面安装apache服务. 这里可以添加其他我们需要安装部署的具体节点进去。 -### 14. 配置清单模块 ### +### 15. 配置清单模块 ### 模块化组件组是非常实用的,在Puppet社区有很多人贡献自己的模块组件。 From 031303b37b641ecc5a3223415cb89cf735c4187b Mon Sep 17 00:00:00 2001 From: ivo wang Date: Fri, 4 Dec 2015 12:24:37 +0800 Subject: [PATCH 0476/1710] Update 20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md --- ...stall OsTicket Ticketing System in Fedora 22 or Centos 7.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 515b15844a..7a56750804 100644 --- 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 @@ -1,3 +1,4 @@ +translated by iov-wang 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. @@ -176,4 +177,4 @@ via: http://linoxide.com/linux-how-to/install-osticket-fedora-22-centos-7/ [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 +[3]:https://github.com/osTicket/osTicket-1.8/releases From 35f8a39b1337d7c9b3f65d896b1fd69633c287fe Mon Sep 17 00:00:00 2001 From: VicYu Date: Fri, 4 Dec 2015 15:02:19 +0800 Subject: [PATCH 0477/1710] =?UTF-8?q?=E5=88=A0=E9=99=A4IvoWang=E7=9A=84?= =?UTF-8?q?=E5=8E=9F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...uide for Puppet on Ubuntu 15.04.md翻译完毕 | 430 ------------------ 1 file changed, 430 deletions(-) delete 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翻译完毕 deleted file mode 100644 index 59a243f0e5..0000000000 --- a/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md翻译完毕 +++ /dev/null @@ -1,430 +0,0 @@ -Translating by ivowang -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 From 8e3192ca90ad0fe255fb774fd416e34bda9f5ec8 Mon Sep 17 00:00:00 2001 From: VicYu Date: Fri, 4 Dec 2015 15:17:58 +0800 Subject: [PATCH 0478/1710] =?UTF-8?q?=E6=9D=A5=EF=BC=8C=E6=95=B4=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inux ftp command to up- and download files on the shell.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md b/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md index 54b69555c4..e2ddf0cb2a 100644 --- a/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md +++ b/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md @@ -1,3 +1,5 @@ +Vic020 + How to use the Linux ftp command to up- and download files on the shell ================================================================================ In this tutorial, I will explain how to use the Linux ftp command on the shell. I will show you how to connect to an FTP server, up- and download files and create directories. While there are many nice desktops FTP clients available, the FTP command is still useful when you work remotely on a server over an SSH session and e.g. want to fetch a backup file from your FTP storage. @@ -143,4 +145,4 @@ via: https://www.howtoforge.com/tutorial/how-to-use-ftp-on-the-linux-shell/ 译者:[译者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 77faf28c55ccf5bb581bfbde2a7d2ac8c87618b3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 4 Dec 2015 15:52:16 +0800 Subject: [PATCH 0479/1710] Create 20151204 Review EXT4 vs. Btrfs vs. XFS.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20151204-1 选题 --- .../20151204 Review EXT4 vs. Btrfs vs. XFS.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md diff --git a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md new file mode 100644 index 0000000000..d370b87822 --- /dev/null +++ b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -0,0 +1,65 @@ +Review EXT4 vs. Btrfs vs. XFS +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) + +To be honest, one of the things that comes last in people’s thinking is to look at which file system on their PC is being used. Windows users as well as Mac OS X users even have less reason for looking as they have really only 1 choice for their operating system which are NTFS and HFS+. Linux operating system, on the other side, has plenty of various file system options, with the current default is being widely used ext4. However, there is another push for changing the file system to something other which is called btrfs. But what makes btrfs better, what are other file systems, and when can we see the distributions making the change? + +Let’s first have a general look at file systems and what they really do, then we will make a small comparison between famous file systems. + +### So, What Do File Systems Do? ### + +Just in case if you are unfamiliar about what file systems really do, it is actually simple when it is summarized. The file systems are mainly used in order for controlling how the data is stored after any program is no longer using it, how access to the data is controlled, what other information (metadata) is attached to the data itself, etc. I know that it does not sound like an easy thing to be programmed, and it is definitely not. The file systems are continually still being revised for including more functionality while becoming more efficient in what it simply needs to do. Therefore, however, it is a basic need for all computers, it is not quite as basic as it sounds like. + +### Why Partitioning? ### + +Many people have a vague knowledge of what the partitions are since each operating system has an ability for creating or removing them. It can seem strange that Linux operating system uses more than 1 partition on the same disk, even while using the standard installation procedure, so few explanations are called for them. One of the main goals of having different partitions is achieving higher data security in the disaster case. + +By dividing your hard disk into partitions, the data may be grouped and also separated. When the accidents occur, only the data stored in the partition which got the hit will only be damaged, while data on the other partitions will survive most likely. These principles date from the days when the Linux operating system didn’t have a journaled file system and any power failure might have led to a disaster. + +The using of partitions will remain for security and the robustness reasons, then the breach on 1 part of the operating system does not automatically mean that whole computer is under risk or danger. This is currently most important factor for the partitioning process. For example, the users create scripts, the programs or web applications which start filling up the disk. If that disk contains only 1 big partition, then entire system may stop functioning if that disk is full. If the users store data on separate partitions, then only that data partition can be affected, while system partitions and the possible other data partitions will keep functioning. + +Mind that to have a journaled file system will only provide data security in case if there is a power failure as well as sudden disconnection of the storage devices. Such will not protect the data against the bad blocks and the logical errors in the file system. In such cases, the user should use a Redundant Array of Inexpensive Disks (RAID) solution. + +### Why Switch File Systems? ### + +The ext4 file system has been an improvement for the ext3 file system that was also an improvement over the ext2 file system. While the ext4 is a very solid file system which has been the default choice for almost all distributions for the past few years, it is made from an aging code base. Additionally, Linux operating system users are seeking many new different features in file systems which ext4 does not handle on its own. There is software which takes care of some of such needs, but in the performance aspect, being able to do such things on the file system level could be faster. + +### Ext4 File System ### + +The ext4 has some limits which are still a bit impressive. The maximum file size is 16 tebibytes (which is roughly 17.6 terabytes) and is much bigger than any hard drive a regular consumer can currently buy. While, the largest volume/partition you can make with ext4 is 1 exbibyte (which is roughly 1,152,921.5 terabytes). The ext4 is known to bring the speed improvements over ext3 by using multiple various techniques. Like in the most modern file systems, it is a journaling file system that means that it will keep a journal of where the files are mainly located on the disk and of any other changes that happen to the disk. Regardless all of its features, it doesn’t support the transparent compression, the data deduplication, or the transparent encryption. The snapshots are supported technically, but such feature is experimental at best. + +### Btrfs File System ### + +The btrfs, many of us pronounce it different ways, as an example, Better FS, Butter FS, or B-Tree FS. It is a file system which is completely made from scratch. The btrfs exists because its developers firstly wanted to expand the file system functionality in order to include snapshots, pooling, as well as checksums among the other things. While it is independent from the ext4, it also wants to build off the ideas present in the ext4 that are great for the consumers and the businesses alike as well as incorporate those additional features that will benefit everybody, but specifically the enterprises. For the enterprises who are using very large programs with very large databases, they are having a seemingly continuous file system across the multiple hard drives could be very beneficial as it will make a consolidation of the data much easier. The data deduplication could reduce the amount of the actual space data could occupy, and the data mirroring could become easier with the btrfs as well when there is a single and broad file system which needs to be mirrored. + +The user certainly can still choose to create multiple partitions so that he does not need to mirror everything. Considering that the btrfs will be able for spanning over the multiple hard drives, it is a very good thing that it can support 16 times more drive space than the ext4. A maximum partition size of the btrfs file system is 16 exbibytes, as well as maximum file size is 16 exbibytes too. + +### XFS File System ### + +The XFS file system is an extension of the extent file system. The XFS is a high-performance 64-bit journaling file system. The support of the XFS was merged into Linux kernel in around 2002 and In 2009 Red Hat Enterprise Linux version 5.4 usage of the XFS file system. XFS supports maximum file system size of 8 exbibytes for the 64-bit file system. There is some comparison of XFS file system is XFS file system can’t be shrunk and poor performance with deletions of the large numbers of files. Now, the RHEL 7.0 uses XFS as the default filesystem. + +### Final Thoughts ### + +Unfortunately, the arrival date for the btrfs is not quite known. But officially, the next-generation file system is still classified as “unstable”, but if the user downloads the latest version of Ubuntu, he will be able to choose to install on a btrfs partition. When the btrfs will be classified actually as “stable” is still a mystery, but users shouldn’t expect the Ubuntu to use the btrfs by default until it’s indeed considered “stable”. It has been reported that Fedora 18 will use the btrfs as its default file system as by the time of its release a file system checker for the btrfs should exist. There is a good amount of work still left for the btrfs, as not all the features are yet implemented and the performance is a little sluggish if we compare it to the ext4. + +So, which is better to use? Till now, the ext4 will be the winner despite the identical performance. But why? The answer will be the convenience as well as the ubiquity. The ext4 is still excellent file system for the desktop or workstation use. It is provided by default, so the user can install the operating system on it. Also, the ext4 supports volumes up to 1 Exabyte and files up to 16 Terabyte in size, so there’s still a plenty of room for the growth where space is concerned. + +The btrfs might offer greater volumes up to 16 Exabyte and improved fault tolerance, but, till now, it feels more as an add-on file system rather than one integrated into the Linux operating system. For example, the btrfs-tools have to be present before a drive will be formatted with the btrfs, which means that the btrfs is not an option during the Linux operating system installation though that could vary with the distribution. + +Even though the transfer rates are so important, there’s more to a just file system than speed of the file transfers. The btrfs has many useful features such as Copy-on-Write (CoW), extensive checksums, snapshots, scrubbing, self-healing data, deduplication, as well as many more good improvements that ensure the data integrity. The btrfs lacks the RAID-Z features of ZFS, so the RAID is still in an experimental state with the btrfs. For pure data storage, however, the btrfs is the winner over the ext4, but time still will tell. + +Till the moment, the ext4 seems to be a better choice on the desktop system since it is presented as a default file system, as well as it is faster than the btrfs when transferring files. The btrfs is definitely worth to look into, but to completely switch to replace the ext4 on desktop Linux might be few years later. The data farms and the large storage pools could reveal different stories and show the right differences between ext4, XCF, and btrfs. + +If you have a different or additional opinion, kindly let us know by commenting on this article. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/review-ext4-vs-btrfs-vs-xfs/ + +作者:[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/ From b73766ccc0b51aca8f6e62ee24313f2099fc1190 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 4 Dec 2015 15:55:19 +0800 Subject: [PATCH 0480/1710] =?UTF-8?q?20151204-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20151204-2 选题 --- ...P from Fail2ban on CentOS 6 or CentOS 7.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md diff --git a/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md b/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md new file mode 100644 index 0000000000..38d3d89735 --- /dev/null +++ b/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md @@ -0,0 +1,60 @@ +How to Remove Banned IP from Fail2ban on CentOS 6 / CentOS 7 +================================================================================ +![](http://www.ehowstuff.com/wp-content/uploads/2015/12/security-265130_1280.jpg) + +[Fail2ban][1] is an intrusion prevention software framework that able to protect your server from brute-force attacks. Fail2ban written in the Python programming language and is widely used by most of the VPS servers. Fail2ban will scan log files and IP blacklists that shows signs of malicious, too many password failures, web server exploitation, WordPress plugin attacks and other vulnerabilities. If you already installed and used fail2ban to protect your web server, you may be wondering how to find the IP banned or blocked by Fail2ban, or you may want to remove banned ip from fail2ban jail on CentOS 6, CentOS 7, RHEL 6, RHEL 7 and Oracle Linux 6/7. + +### How to List of Banned IP address ### + +To see all the blocked ip addresses, run the following command : + + # iptables -L + Chain INPUT (policy ACCEPT) + target prot opt source destination + f2b-AccessForbidden tcp -- anywhere anywhere tcp dpt:http + f2b-WPLogin tcp -- anywhere anywhere tcp dpt:http + f2b-ConnLimit tcp -- anywhere anywhere tcp dpt:http + f2b-ReqLimit tcp -- anywhere anywhere tcp dpt:http + f2b-NoAuthFailures tcp -- anywhere anywhere tcp dpt:http + f2b-SSH tcp -- anywhere anywhere tcp dpt:ssh + f2b-php-url-open tcp -- anywhere anywhere tcp dpt:http + f2b-nginx-http-auth tcp -- anywhere anywhere multiport dports http,https + ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED + ACCEPT icmp -- anywhere anywhere + ACCEPT all -- anywhere anywhere + ACCEPT tcp -- anywhere anywhere tcp dpt:EtherNet/IP-1 + ACCEPT tcp -- anywhere anywhere tcp dpt:http + 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 + + + Chain f2b-NoAuthFailures (1 references) + target prot opt source destination + REJECT all -- 64.68.50.128 anywhere reject-with icmp-port-unreachable + REJECT all -- 104.194.26.205 anywhere reject-with icmp-port-unreachable + RETURN all -- anywhere anywhere + +### How to Remove Banned IP from Fail2ban jail ### + + # iptables -D f2b-NoAuthFailures -s banned_ip -j REJECT + +I hope this article gives you some ideas and quick guide on remove banned IP from Fail2ban jail on on CentOS 6, CentOS 7, RHEL 6, RHEL 7 and Oracle Linux 6/7. + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/how-to-remove-banned-ip-from-fail2ban-on-centos/ + +作者:[skytech][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/skytech/ +[1]:http://www.fail2ban.org/wiki/index.php/Main_Page From 09a694c6492ffa6502a085f19e8eec948d4d1e72 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 4 Dec 2015 15:56:20 +0800 Subject: [PATCH 0481/1710] =?UTF-8?q?20151204-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20151204-2 选题 --- ...04 Linux or Unix--jobs Command Examples.md | 195 ++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 sources/tech/20151204 Linux or Unix--jobs Command Examples.md diff --git a/sources/tech/20151204 Linux or Unix--jobs Command Examples.md b/sources/tech/20151204 Linux or Unix--jobs Command Examples.md new file mode 100644 index 0000000000..560a1ea1e8 --- /dev/null +++ b/sources/tech/20151204 Linux or Unix--jobs Command Examples.md @@ -0,0 +1,195 @@ +Linux / Unix: jobs Command Examples +================================================================================ +I am new Linux and Unix user. How do I show the active jobs on Linux or Unix-like systems using BASH/KSH/TCSH or POSIX based shell? How can I display status of jobs in the current session on Unix/Linux? + +Job control is nothing but the ability to stop/suspend the execution of processes (command) and continue/resume their execution as per your requirements. This is done using your operating system and shell such as bash/ksh or POSIX shell. + +You shell keeps a table of currently executing jobs and can be displayed with jobs command. + +### Purpose ### + +> Displays status of jobs in the current shell session. + +### Syntax ### + +The basic syntax is as follows: + + jobs + +OR + + jobs jobID + +OR + + jobs [options] jobID + +### Starting few jobs for demonstration purpose ### + +Before you start using jobs command, you need to start couple of jobs on your system. Type the following commands to start jobs: + + ## Start xeyes, calculator, and gedit text editor ### + xeyes & + gnome-calculator & + gedit fetch-stock-prices.py & + +Finally, run ping command in foreground: + + ping www.cyberciti.biz + +To suspend ping command job hit the **Ctrl-Z** key sequence. + +### jobs command examples ### + +To display the status of jobs in the current shell, enter: + + $ jobs + +Sample outputs: + + [1] 7895 Running gpass & + [2] 7906 Running gnome-calculator & + [3]- 7910 Running gedit fetch-stock-prices.py & + [4]+ 7946 Stopped ping cyberciti.biz + +To display the process ID or jobs for the job whose name begins with "p," enter: + + $ jobs -p %p + +OR + + $ jobs %p + +Sample outputs: + + [4]- Stopped ping cyberciti.biz + +The character % introduces a job specification. In this example, you are using the string whose name begins with suspended command such as %ping. + +### How do I show process IDs in addition to the normal information? ### + +Pass the -l(lowercase L) option to jobs command for more information about each job listed, run: + + $ jobs -l + +Sample outputs: + +![Fig.01: Displaying the status of jobs in the shell](http://s0.cyberciti.org/uploads/faq/2013/02/jobs-command-output.jpg) +Fig.01: Displaying the status of jobs in the shell + +### How do I list only processes that have changed status since the last notification? ### + +First, start a new job as follows: + + $ sleep 100 & + +Now, only show jobs that have stopped or exited since last notified, type: + + $ jobs -n + +Sample outputs: + + [5]- Running sleep 100 & + +### Display lists process IDs (PIDs) only ### + +Pass the -p option to jobs command to display PIDs only: + + $ jobs -p + +Sample outputs: + + 7895 + 7906 + 7910 + 7946 + 7949 + +### How do I display only running jobs? ### + +Pass the -r option to jobs command to display only running jobs only, type: + + $ jobs -r + +Sample outputs: + + [1] Running gpass & + [2] Running gnome-calculator & + [3]- Running gedit fetch-stock-prices.py & + +### How do I display only jobs that have stopped? ### + +Pass the -s option to jobs command to display only stopped jobs only, type: + + $ jobs -s + +Sample outputs: + + [4]+ Stopped ping cyberciti.biz + +To resume the ping cyberciti.biz job by entering the following bg command: + + $ bg %4 + +### jobs command options ### + +From the [bash(1)][1] command man page: + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
-lShow process id's in addition to the normal information.
-pShow process id's only.
-nShow only processes that have changed status since the last notification are printed.
-rRestrict output to running jobs only.
-sRestrict output to stopped jobs only.
-xCOMMAND is run after all job specifications that appear in ARGS have been replaced with the process ID of that job's process group leader./td>
+ +### A note about /usr/bin/jobs and shell builtin ### + +Type the following type command to find out whether jobs is part of shell, external command or both: + + $ type -a jobs + +Sample outputs: + + jobs is a shell builtin + jobs is /usr/bin/jobs + +In almost all cases you need to use the jobs command that is implemented as a BASH/KSH/POSIX shell built-in. The /usr/bin/jobs command can not be used in the current shell. The /usr/bin/jobs command operates in a different environment and does not share the parent bash/ksh's shells understanding of jobs. + +-------------------------------------------------------------------------------- + +via: + +作者: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.manpager.com/linux/man1/bash.1.html From 1c7e0c73fdfb276f7945a151b7480be703216f4c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 4 Dec 2015 15:56:57 +0800 Subject: [PATCH 0482/1710] =?UTF-8?q?20151204-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20151204-2 选题 --- ...figure Munin monitoring server in Linux.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md diff --git a/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md b/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md new file mode 100644 index 0000000000..314d721e38 --- /dev/null +++ b/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md @@ -0,0 +1,145 @@ +Install and Configure Munin monitoring server in Linux +================================================================================ +![](http://www.linuxnix.com/wp-content/uploads/2015/12/munin_page.jpg) + +Munin is an excellent system monitoring tool similar to [RRD tool][1] which will give you ample information about system performance in multiple fronts like **disk, network, process, system and users**. These are some of the default properties Munin monitors. + +### How Munin works? ### + +Munin works in a client-server model. Munin server process on main server try to collect data from client daemon which is running locally(Munin can monitor it’ss own resources) or from remote client(Munin can monitor hundreds of machines) and displays them in graphs on its web interface. + +### Configuring Munin in nutshell ### + +This is of two steps as we have to configure both server and client. +1)Install Munin server package and configure it so that it get data from clients. +2)Configure Munin client so that server will connect to client daemon for data collocation. + +### Install munin server in Linux ### + +Munin server installation on Ubuntu/Debian based machines + + apt-get install munin apache2 + +Munin server installation on Redhat/Centos based machines. Make sure that you [enable EPEL repo][2] before installing Munin on Redhat based machines as by default Redhat based machines do not have Munin in their repos. + + yum install munin httpd + +### Configuring Munin server in Linux ### + +Below are the steps we have to do in order to bring server up. + +1. Add host details which need monitoring in /etc/munin/munin.conf +1. Configure apache web server to include munin details. +1. Create User name and password for web interface +1. Restart apache server + +**Step 1**: Add hosts entry in this file in **/etc/munin/munin.conf**. Go to end of the file and a client to monitor. Here in this example, I added my DB server and its IP address to monitor + +Example: + + [db.linuxnix.com] + address 192.168.1.25 + use_node_name yes + +Save the file and exit. + +**Step 2**: Edit/create munin.conf file in /etc/apache2/conf.d folder to include Munin Apache related configs. In another note, by default other Munin web related configs are kept in /var/www/munin folder. + + vi /etc/apache2/conf.d/munin.conf + +Content: + + Alias /munin /var/www/munin + + Order allow,deny + Allow from localhost 127.0.0.0/8 ::1 + AllowOverride None + Options ExecCGI FollowSymlinks + AddHandler cgi-script .cgi + DirectoryIndex index.cgi + AuthUserFile /etc/munin/munin.passwd + AuthType basic + AuthName "Munin stats" + require valid-user + + ExpiresActive On + ExpiresDefault M310 + + + +Save the file and exit + +**Step 3**: Now create a username and password for viewing muning graphs: + + htpasswd -c /etc/munin/munin-htpasswd munin + +**Note**: For Redhat/Centos machines replace “**apache2**” with “**httpd**” in each path to access your config files. + +**Step 3**: Restart Apache server so that Munin configurations are picked-up by Apache. + +#### Ubuntu/Debian based: #### + + service apache2 restart + +#### Centos/Redhat based: #### + + service httpd restart + +### Install and configure Munin client in Linux ### + +**Step 1**: Install Munin client in Linux + + apt-get install munin-node + +**Note**: If you want to monitor your Munin server, then you have to install munin-node on that as well. + +**Step 2**: Configure client by editing munin-node.conf file. + + vi /etc/munin/munin-node.conf + +Example: + + allow ^127\.0\.0\.1$ + allow ^10\.10\.20\.20$ + +---------- + + # Which address to bind to; + host * + +---------- + + # And which port + port 4949 + +**Note**: 10.10.20.20 is my Munin server and it connections to 4949 port on client to get its data. + +**Step 3**: Restart munin-node on client server + + service munin-node restart + +### Testing connection ### + +check if you are able to connect client from server on 4949 port, other wise you have to open that port on client machine. + + telnet db.linuxnix.com 4949 + +Accessing Munin web interface + + http://munin.linuxnix.com/munin/index.html + +Hope this helps to configure basic Munin server. + +-------------------------------------------------------------------------------- + +via: http://www.linuxnix.com/install-and-configure-munin-monitoring-server-in-linux/ + +作者:[Surendra Anne][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxnix.com/author/surendra/ +[1]:http://www.linuxnix.com/network-monitoringinfo-gathering-tools-in-linux/ +[2]:http://www.linuxnix.com/how-to-install-and-enable-epel-repo-in-rhel-centos-oracle-scentific-linux/ From 9d19e7cd069bf5e69f1b6a42c96b2363bc536acf Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 4 Dec 2015 16:03:29 +0800 Subject: [PATCH 0483/1710] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E5=B0=86=E6=96=87=E4=BB=B6=E5=90=8D=E7=9A=84?= =?UTF-8?q?=E5=86=92=E5=8F=B7=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ring Public Beta.md => Let's Encrypt--Entering Public Beta.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/news/{Let's Encrypt:Entering Public Beta.md => Let's Encrypt--Entering Public Beta.md} (100%) diff --git a/sources/news/Let's Encrypt:Entering Public Beta.md b/sources/news/Let's Encrypt--Entering Public Beta.md similarity index 100% rename from sources/news/Let's Encrypt:Entering Public Beta.md rename to sources/news/Let's Encrypt--Entering Public Beta.md From c4b09094393e123758640192485a14ef73febca1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 4 Dec 2015 16:22:06 +0800 Subject: [PATCH 0484/1710] =?UTF-8?q?20151204-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...P Framework on CentOS 7 or Ubuntu 15.04.md | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md diff --git a/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md new file mode 100644 index 0000000000..10b3b02303 --- /dev/null +++ b/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md @@ -0,0 +1,175 @@ +How to Install Laravel PHP Framework on CentOS 7 / Ubuntu 15.04 +================================================================================ +Hi All, In this article we are going to setup Laravel on CentOS 7 and Ubuntu 15.04. If you are a PHP web developer then you don't need to worry about of all modern PHP frameworks, Laravel is the easiest to get up and running that saves your time and effort and makes web development a joy. Laravel embraces a general development philosophy that sets a high priority on creating maintainable code by following some simple guidelines, you should be able to keep a rapid pace of development and be free to change your code with little fear of breaking existing functionality. + +Laravel's PHP framework installation is not a big deal. You can simply follow the step by step guide in this article for your CentOS 7 or Ubuntu 15 server. + +### 1) Server Requirements ### + +Laravel depends upon a number of prerequisites that must be setup before installing it. Those prerequisites includes some basic tuning parameter of server like your system update, sudo rights and installation of required packages. + +Once you are connected to your server make sure to configure the fully qualified domain name then run the commands below to enable EPEL Repo and update your server. + +#### CentOS-7 #### + + # yum install epel-release + +---------- + + # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm + +---------- + + # yum update + +#### Ubuntu #### + + # apt-get install python-software-properties + # add-apt-repository ppa:ondrej/php5 + +---------- + + # apt-get update + +---------- + + # apt-get install -y php5 mcrypt php5-mcrypt php5-gd + +### 2) Firewall Setup ### + +System Firewall and SELinux setup is an important part regarding the security of your applications in production. You can make firewall off if you are working on test server and keep SELinux to permissive mode using the below command, so that you installing setup won't be affected by it. + + # setenforce 0 + +### 3) Apache, MariaDB, PHP Setup ### + +Laravel installation requires a complete LAMP stack with OpenSSL, PDO, Mbstring and Tokenizer PHP Extensions. If you are already running LAMP server then you can skip this step to move on and just make sure that the required PHP extensions are installed. + +To install AMP stack you can use the below commands on your respective server. + +#### CentOS #### + + # yum install httpd mariadb-server php56w php56w-mysql php56w-mcrypt php56w-dom php56w-mbstring + +To start and enable Apache web and MySQL/Mariadb services at bootup on CentOS 7 , we will use below commands. + + # systemctl start httpd + # systemctl enable httpd + +---------- + + #systemctl start mysqld + #systemctl enable mysqld + +After starting MariaDB service, we will configure its secured password with below command. + + #mysql_secure_installation + +#### Ubuntu #### + + # apt-get install mysql-server apache2 libapache2-mod-php5 php5-mysql + +### 4) Install Composer ### + +Now we are going to install composer that is one of the most important requirement before starting the Laravel installation that helps in installing Laravel's dependencies. + +#### CentOS/Ubuntu #### + +Run the below commands to setup 'composer' in CentOS/Ubuntu. + + # curl -sS https://getcomposer.org/installer | php + # mv composer.phar /usr/local/bin/composer + # chmod +x /usr/local/bin/composer + +![composer installation](http://blog.linoxide.com/wp-content/uploads/2015/11/14.png) + +### 5) Installing Laravel ### + +Laravel's installation package can be downloaded from github using the command below. + +# wget https://github.com/laravel/laravel/archive/develop.zip + +To extract the archived package and move into the document root directory use below commands. + + # unzip develop.zip + +---------- + + # mv laravel-develop /var/www/ + +Now use the following compose command that will install all required dependencies for Laravel within its directory. + + # cd /var/www/laravel-develop/ + # composer install + +![compose laravel](http://blog.linoxide.com/wp-content/uploads/2015/11/25.png) + +### 6) Key Encryption ### + +For encrypter service, we will be generating a 32 digit encryption key using the command below. + + # php artisan key:generate + + Application key [Lf54qK56s3qDh0ywgf9JdRxO2N0oV9qI] set successfully + +Now put this key into the 'app.php' file as shown below. + + # vim /var/www/laravel-develop/config/app.php + +![Key encryption](http://blog.linoxide.com/wp-content/uploads/2015/11/45.png) + +### 7) Virtua Host and Ownership ### + +After composer installation assign the permissions and apache user ownership to the document root directory as shown. + + # chmod 775 /var/www/laravel-develop/app/storage + +---------- + + # chown -R apache:apache /var/www/laravel-develop + +Open the default configuration file of apache web server using any editor to add the following lines at the end file for new virtual host entry. + + # vim /etc/httpd/conf/httpd.conf + +---------- + + ServerName laravel-develop + DocumentRoot /var/www/laravel/public + + start Directory /var/www/laravel + AllowOverride All + Directory close + +Now the time is to restart apache web server services as shown below and then open your web browser to check your localhost page. + +#### CentOS #### + + # systemctl restart httpd + +#### Ubuntu #### + + # service apache2 restart + +### 8) Laravel 5 Web Access ### + +Open your web browser and give your server IP or Fully Qualified Domain name and you will see the default web page of Laravel 5 frame work. + +![Laravel Default](http://blog.linoxide.com/wp-content/uploads/2015/11/35.png) + +### Conclusion ### + +Laravel Framework is a great tool to develop your web applications. So, at the end of this article you have learned its installation setup on Ubuntu 15 and CentOS 7 , Now start using this awesome PHP framework that provides you a lot of more features and comfort in your development work. Feel free to comment us back for your valuable suggestions an feedback to guide you in more specific and easiest way. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-15-04/ + +作者:[Kashif][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 81bf330a9933ac5cbd87b42a3ac960e75b2af1c2 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 4 Dec 2015 19:13:35 +0800 Subject: [PATCH 0485/1710] Update 20151204 Linux or Unix--jobs Command Examples.md --- sources/tech/20151204 Linux or Unix--jobs Command Examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151204 Linux or Unix--jobs Command Examples.md b/sources/tech/20151204 Linux or Unix--jobs Command Examples.md index 560a1ea1e8..40333bed6c 100644 --- a/sources/tech/20151204 Linux or Unix--jobs Command Examples.md +++ b/sources/tech/20151204 Linux or Unix--jobs Command Examples.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux / Unix: jobs Command Examples ================================================================================ I am new Linux and Unix user. How do I show the active jobs on Linux or Unix-like systems using BASH/KSH/TCSH or POSIX based shell? How can I display status of jobs in the current session on Unix/Linux? From 7fc6a7ae20d391339808ec9f7ed42c3bf018905c Mon Sep 17 00:00:00 2001 From: ivo wang Date: Sat, 5 Dec 2015 01:28:37 +0800 Subject: [PATCH 0486/1710] Update 20150906 How to Configure OpenNMS on CentOS 7.x.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 认领这篇 --- .../tech/20150906 How to Configure OpenNMS on CentOS 7.x.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index c7810d06ef..aca2b04bba 100644 --- 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 @@ -1,3 +1,4 @@ +translated by ivo-wang 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. @@ -216,4 +217,4 @@ via: http://linoxide.com/monitoring-2/install-configure-opennms-centos-7-x/ 本文由 [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 d7ccef0ffa34e6febdf79daa77b25779a5dcff0c Mon Sep 17 00:00:00 2001 From: ivo wang Date: Sat, 5 Dec 2015 01:30:03 +0800 Subject: [PATCH 0487/1710] Update 20150906 How to install Suricata intrusion detection system on Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 认领这篇 --- ... to install Suricata intrusion detection system on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index fe4a784d5a..736a6577de 100644 --- 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 @@ -1,3 +1,4 @@ +translated by ivo-wang 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]. @@ -194,4 +195,4 @@ via: http://xmodulo.com/install-suricata-intrusion-detection-system-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 +[9]:https://redmine.openinfosecfoundation.org/projects/suricata/wiki From bd65852eafbffeba8ccd40a6ceb195c90cea2a6b Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 5 Dec 2015 09:34:37 +0800 Subject: [PATCH 0488/1710] PUB:20150806 Installation Guide for Puppet on Ubuntu 15.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ivo-wang ,好长的文章,辛苦啦,基本上翻译的很好,有个别地方理解不对,已经修正。 可以做 diff 比较看看。发布后 URL: https://linux.cn/article-6692-1.html --- ...lation Guide for Puppet on Ubuntu 15.04.md | 435 ++++++++++++++++++ ...lation Guide for Puppet on Ubuntu 15.04.md | 425 ----------------- 2 files changed, 435 insertions(+), 425 deletions(-) create mode 100644 published/20150806 Installation Guide for Puppet on Ubuntu 15.04.md delete mode 100644 translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md diff --git a/published/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/published/20150806 Installation Guide for Puppet on Ubuntu 15.04.md new file mode 100644 index 0000000000..67ae06db9b --- /dev/null +++ b/published/20150806 Installation Guide for Puppet on Ubuntu 15.04.md @@ -0,0 +1,435 @@ +如何在 Ubuntu 15.04 中安装 puppet +================================================================================ + +大家好,本教程将学习如何在 ubuntu 15.04 上面安装 puppet,它可以用来管理你的服务器基础环境。puppet 是由puppet 实验室(Puppet Labs)开发并维护的一款开源的配置管理软件,它能够帮我们自动化供给、配置和管理服务器的基础环境。不管我们管理的是几个服务器还是数以千计的计算机组成的业务报表体系,puppet 都能够使管理员从繁琐的手动配置调整中解放出来,腾出时间和精力去提系统的升整体效率。它能够确保所有自动化流程作业的一致性、可靠性以及稳定性。它让管理员和开发者更紧密的联系在一起,使开发者更容易产出付出设计良好、简洁清晰的代码。puppet 提供了配置管理和数据中心自动化的两个解决方案。这两个解决方案分别是 **puppet 开源版** 和 **puppet 企业版**。puppet 开源版以 Apache 2.0 许可证发布,它是一个非常灵活、可定制的解决方案,设置初衷是帮助管理员去完成那些重复性操作工作。pupprt 企业版是一个全平台复杂 IT 环境下的成熟解决方案,它除了拥有开源版本所有优势以外还有移动端 apps、只有商业版才有的加强支持,以及模块化和集成管理等。Puppet 使用 SSL 证书来认证主控服务器与代理节点之间的通信。 + +本教程将要介绍如何在运行 ubuntu 15.04 的主控服务器和代理节点上面安装开源版的 puppet。在这里,我们用一台服务器做主控服务器(master),管理和控制剩余的当作 puppet 代理节点(agent node)的服务器,这些代理节点将依据主控服务器来进行配置。在 ubuntu 15.04 只需要简单的几步就能安装配置好 puppet,用它来管理我们的服务器基础环境非常的方便。(LCTT 译注:puppet 采用 C/S 架构,所以必须有至少有一台作为服务器,其他作为客户端处理) + +### 1.设置主机文件 ### + +在本教程里,我们将使用2台运行 ubuntu 15.04 “Vivid Vervet" 的主机,一台作为主控服务器,另一台作为 puppet 的代理节点。下面是我们将用到的服务器的基础信息。 + +- puupet 主控服务器 IP:44.55.88.6 ,主机名: puppetmaster +- puppet 代理节点 IP: 45.55.86.39 ,主机名: puppetnode + +我们要在代理节点和服务器这两台机器的 hosts 文件里面都添加上相应的条目,使用 root 或是 sudo 访问权限来编辑 /etc/hosts 文件,命令如下: + + # nano /etc/hosts + + 45.55.88.6 puppetmaster.example.com puppetmaster + 45.55.86.39 puppetnode.example.com puppetnode + +注意,puppet 主控服务器必使用 8140 端口来运行,所以请务必保证开启8140端口。 + +### 2. 用 NTP 更新时间 ### + +puppet 代理节点所使用系统时间必须要准确,这样可以避免代理证书出现问题。如果有时间差异,那么证书将过期失效,所以服务器与代理节点的系统时间必须互相同步。我们使用 NTP(Network Time Protocol,网络时间协议)来同步时间。**在服务器与代理节点上面分别**运行以下命令来同步时间。 + + # ntpdate pool.ntp.org + + 17 Jun 00:17:08 ntpdate[882]: adjust time server 66.175.209.17 offset -0.001938 sec + +(LCTT 译注:显示类似的输出结果表示运行正常) + +如果没有安装 ntp,请使用下面的命令更新你的软件仓库,安装并运行ntp服务 + + # apt-get update && sudo apt-get -y install ntp ; service ntp restart + +### 3. 安装主控服务器软件 ### + +安装开源版本的 puppet 有很多的方法。在本教程中我们在 puppet 实验室官网下载一个名为 puppetlabs-release 的软件包的软件源,安装后它将为我们在软件源里面添加 puppetmaster-passenger。puppetmaster-passenger 包括带有 apache 的 puppet 主控服务器。我们开始下载这个软件包: + + # 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] + +下载完成,我们来安装它: + + # 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) ... + +使用 apt 包管理命令更新一下本地的软件源: + + # apt-get update + +现在我们就可以安装 puppetmaster-passenger 了 + + # apt-get install puppetmaster-passenger + +**提示**: 在安装的时候可能会报错: + + 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') + +不过不用担心,忽略掉它就好,我们只需要在设置配置文件的时候把这一项禁用就行了。 + +如何来查看puppet 主控服务器是否已经安装成功了呢?非常简单,只需要使用下面的命令查看它的版本就可以了。 + + # puppet --version + + 3.8.1 + +现在我们已经安装好了 puppet 主控服务器。因为我们使用的是配合 apache 的 passenger,由 apache 来控制 puppet 主控服务器,当 apache 运行时 puppet 主控才运行。 + +在开始之前,我们需要通过停止 apache 服务来让 puppet 主控服务器停止运行。 + + # systemctl stop apache2 + +### 4. 使用 Apt 工具锁定主控服务器的版本 ### + +现在已经安装了 3.8.1 版的 puppet,我们锁定这个版本不让它随意升级,因为升级会造成配置文件混乱。 使用 apt 工具来锁定它,这里我们需要使用文本编辑器来创建一个新的文件 **/etc/apt/preferences.d/00-puppet.pref** + + # nano /etc/apt/preferences.d/00-puppet.pref + +在新创建的文件里面添加以下内容: + + # /etc/apt/preferences.d/00-puppet.pref + Package: puppet puppet-common puppetmaster-passenger + Pin: version 3.8* + Pin-Priority: 501 + +这样在以后的系统软件升级中, puppet 主控服务器将不会跟随系统软件一起升级。 + +### 5. 配置 Puppet 主控服务器### + +Puppet 主控服务器作为一个证书发行机构,需要生成它自己的证书,用于签署所有代理的证书的请求。首先我们要删除所有在该软件包安装过程中创建出来的 ssl 证书。本地默认的 puppet 证书放在 /var/lib/puppet/ssl。因此我们只需要使用 rm 命令来整个移除这些证书就可以了。 + + # rm -rf /var/lib/puppet/ssl + +现在来配置该证书,在创建 puppet 主控服务器证书时,我们需要包括代理节点与主控服务器沟通所用的每个 DNS 名称。使用文本编辑器来修改服务器的配置文件 puppet.conf + + # nano /etc/puppet/puppet.conf + +输出的结果像下面这样 + + [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 + +在这我们需要注释掉 templatedir 这行使它失效。然后在文件的 `[main]` 小节的结尾添加下面的信息。 + + server = puppetmaster + environment = production + runinterval = 1h + strict_variables = true + certname = puppetmaster + dns_alt_names = puppetmaster, puppetmaster.example.com + +还有很多你可能用的到的配置选项。 如果你有需要,在 Puppet 实验室有一份详细的描述文件供你阅读: [Main Config File (puppet.conf)][1]。 + +编辑完成后保存退出。 + +使用下面的命令来生成一个新的证书。 + + # 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 + +至此,证书已经生成。一旦我们看到 **Notice: Starting Puppet master version 3.8.1**,就表明证书就已经制作好了。我们按下 CTRL-C 回到 shell 命令行。 + +查看新生成证书的信息,可以使用下面的命令。 + + # 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. 创建一个 Puppet 清单 ### + +默认的主要清单(Manifest)是 /etc/puppet/manifests/site.pp。 这个主要清单文件包括了用于在代理节点执行的配置定义。现在我们来创建一个清单文件: + + # nano /etc/puppet/manifests/site.pp + +在刚打开的文件里面添加下面这几行: + + # 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, + } + +以上这几行的意思是给代理节点部署 apache web 服务。 + +### 7. 运行 puppet 主控服务 ### + +已经准备好运行 puppet 主控服务器 了,那么开启 apache 服务来让它启动 + + # systemctl start apache2 + +我们 puppet 主控服务器已经运行,不过它还不能管理任何代理节点。现在我们给 puppet 主控服务器添加代理节点. + +**提示**: 如果报错 + + Job for apache2.service failed. see "systemctl status apache2.service" and "journalctl -xe" for details. + +肯定是 apache 服务器有一些问题,我们可以使用 root 或是 sudo 访问权限来运行**apachectl start**查看它输出的日志。在本教程执行过程中, 我们发现一个 **/etc/apache2/sites-enabled/puppetmaster.conf** 的证书配置问题。修改其中的**SSLCertificateFile /var/lib/puppet/ssl/certs/server.pem **为 **SSLCertificateFile /var/lib/puppet/ssl/certs/puppetmaster.pem**,然后注释掉后面这行**SSLCertificateKeyFile** 。然后在命令行重新启动 apache。 + +### 8. 安装 Puppet 代理节点的软件包 ### + +我们已经准备好了 puppet 的服务器,现在需要一个可以管理的代理节点,我们将安装 puppet 代理软件到节点上去。这里我们要给每一个需要管理的节点安装代理软件,并且确保这些节点能够通过 DNS 查询到服务器主机。下面将 安装最新的代理软件到 节点 puppetnode.example.com 上。 + +在代理节点上使用下面的命令下载 puppet 实验室提供的软件包: + + # 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] + +在 ubuntu 15.04 上我们使用debian包管理系统来安装它,命令如下: + + # dpkg -i puppetlabs-release-trusty.deb + +使用 apt 包管理命令更新一下本地的软件源: + + # apt-get update + +通过远程仓库安装: + + # apt-get install puppet + +Puppet 代理默认是不启动的。这里我们需要使用文本编辑器修改 /etc/default/puppet 文件,使它正常工作: + + # nano /etc/default/puppet + +更改 **START** 的值改成 "yes" 。 + + START=yes + +最后保存并退出。 + +### 9. 使用 Apt 工具锁定代理软件的版本 ### + +和上面的步骤一样为防止随意升级造成的配置文件混乱,我们要使用 apt 工具来把它锁定。具体做法是使用文本编辑器创建一个文件 **/etc/apt/preferences.d/00-puppet.pref** + + # nano /etc/apt/preferences.d/00-puppet.pref + +在新建的文件里面加入如下内容 + + # /etc/apt/preferences.d/00-puppet.pref + Package: puppet puppet-common + Pin: version 3.8* + Pin-Priority: 501 + +这样 puppet 就不会随着系统软件升级而随意升级了。 + +### 10. 配置 puppet 代理节点 ### + +我们需要编辑一下代理节点的 puppet.conf 文件,来使它运行。 + + # nano /etc/puppet/puppet.conf + +它看起来和服务器的配置文件完全一样。同样注释掉**templatedir**这行。不同的是在这里我们需要删除掉所有关于`[master]` 的部分。 + +假定主控服务器可以通过名字“puppet-master”访问,我们的客户端应该可以和它相互连接通信。如果不行的话,我们需要使用完整的主机域名 puppetmaster.example.com + + [agent] + server = puppetmaster.example.com + certname = puppetnode.example.com + +在文件的结尾增加上面3行,增加之后文件内容像下面这样: + + [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 + +最后保存并退出。 + +使用下面的命令来启动客户端软件: + + # systemctl start puppet + +如果一切顺利的话,我们不会看到命令行有任何输出。 第一次运行的时候,代理节点会生成一个 ssl 证书并且给服务器发送一个请求,经过签名确认后,两台机器就可以互相通信了。 + +**提示**: 如果这是你添加的第一个代理节点,建议你在添加其他节点前先给这个证书签名。一旦能够通过并正常运行,回过头来再添加其他代理节点。 + +### 11. 在主控服务器上对证书请求进行签名 ### + +第一次运行的时候,代理节点会生成一个 ssl 证书并且给服务器发送一个签名请求。在主控服务器给代理节点服务器证书签名之后,主服务器才能和代理服务器通信并且控制代理服务器。 + +在主控服务器上使用下面的命令来列出当前的证书请求: + + # 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 + +因为只设置了一台代理节点服务器,所以我们将只看到一个请求。看起来类似如上,代理节点的完整域名即其主机名。 + +注意有没有“+”号在前面,代表这个证书有没有被签名。 + +使用带有主机名的**puppet cert sign**这个命令来签署这个签名请求,如下: + + # 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' + +主控服务器现在可以通讯和控制它签名过的代理节点了。 + +如果想签署所有的当前请求,可以使用 -all 选项,如下所示: + + # puppet cert sign --all + +### 12. 删除一个 Puppet 证书 ### + +如果我们想移除一个主机,或者想重建一个主机然后再添加它。下面的例子里我们将展示如何删除 puppet 主控服务器上面的一个证书。使用的命令如下: + + # 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' + +如果我们想查看所有的签署和未签署的请求,使用下面这条命令: + + # 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") + + +### 13. 部署 Puppet 清单 ### + +当配置并完成 puppet 清单后,现在我们需要部署清单到代理节点服务器上。要应用并加载主 puppet 清单,我们可以在代理节点服务器上面使用下面的命令: + + # 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 + +这里向我们展示了主清单如何立即影响到了一个单一的服务器。 + +如果我们打算运行的 puppet 清单与主清单没有什么关联,我们可以简单使用 puppet apply 带上相应的清单文件的路径即可。它仅将清单应用到我们运行该清单的代理节点上。 + + # puppet apply /etc/puppet/manifest/test.pp + +### 14. 为特定节点配置清单 ### + +如果我们想部署一个清单到某个特定的节点,我们需要如下配置清单。 + +在主控服务器上面使用文本编辑器编辑 /etc/puppet/manifest/site.pp: + + # nano /etc/puppet/manifest/site.pp + +添加下面的内容进去 + + 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, + } + } + +这里的配置显示我们将在名为 puppetnode 和 puppetnode1 的2个指定的节点上面安装 apache 服务。这里可以添加其他我们需要安装部署的具体节点进去。 + +### 15. 配置清单模块 ### + +模块对于组合任务是非常有用的,在 Puppet 社区有很多人贡献了自己的模块组件。 + +在主控服务器上, 我们将使用 puppet module 命令来安装 **puppetlabs-apache** 模块。 + + # puppet module install puppetlabs-apache + +**警告**: 千万不要在一个已经部署 apache 环境的机器上面使用这个模块,否则它将清空你没有被 puppet 管理的 apache 配置。 + +现在用文本编辑器来修改 **site.pp** : + + # nano /etc/puppet/manifest/site.pp + +添加下面的内容进去,在 puppetnode 上面安装 apache 服务。 + + node 'puppet-node' { + class { 'apache': } # use apache module + apache::vhost { 'example.com': # define vhost resource + port => '80', + docroot => '/var/www/html' + } + } + +保存退出。然后重新运行该清单来为我们的代理节点部署 apache 配置。 + +### 总结 ### + +现在我们已经成功的在 ubuntu 15.04 上面部署并运行 puppet 来管理代理节点服务器的基础运行环境。我们学习了puppet 是如何工作的,编写清单文件,节点与主机间使用 ssl 证书认证的认证过程。使用 puppet 开源软件配置管理工具在众多的代理节点上来控制、管理和配置重复性任务是非常容易的。如果你有任何的问题,建议,反馈,与我们取得联系,我们将第一时间完善更新,谢谢。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-puppet-ubuntu-15-04/ + +作者:[Arun Pyasi][a] +译者:[ivo-wang](https://github.com/ivo-wang) +校对:[wxy](https://github.com/wxy) + +本文由 [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 diff --git a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md deleted file mode 100644 index 7195dbe268..0000000000 --- a/translated/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md +++ /dev/null @@ -1,425 +0,0 @@ -如何在Ubuntu 15.04中安装puppet -================================================================================ - -大家好,本教程将教各位如何在ubuntu 15.04上面安装puppet,用它来管理你的服务器基础环境。puppet是由puppet实验室开发并维护的一款开源软件,它能够帮我们自动的管理配置服务器的基础环境。不管我们管理的是几个服务器还是数以千计的计算机组成的业务报表体系,puppet都能够使管理员从繁琐的手动配置调整中解放出来,腾出时间和精力去提系统的升整体效率。它能够确保所有自动化流程作业的一致性,可靠性以及稳定性。它让管理员和开发者更紧密的联系在一起,使开发者更容易产出付出设计良好,简洁清晰的代码。puppet提供了管理配置和自动化数据中心的2个解决方案。这两个解决方案分别是**puppet开源项目 和 puppet商业版**。puppet开源项目依赖于apache2.0,它是一个非常灵活可随意定制的解决方案,设置初衷是帮助管理员去完成那些重复性操作工作。pupprt商业版是一个全平台复杂IT环境下的成熟解决方案,它除了拥有开源版本所有优势以外还有移动端apps,只有商业版才有的加强支持,以及模块化和集成管理等。Puppet使用SSL证书来认证主机与代理节点之间的通信。 - -本教程将要介绍如何在ubuntu 15.04的主机和代理节点上面安装开源版的puppet。在这我们用一台服务器做主机,管理和控制剩余当作puppet的代理节点的服务器,这些代理节点将依据服务器来进行配置。在ubuntu 15.04只需要简单的几步就能安装配置好puppet,用它来管理我们的服务器基础环境非常的方便。(译者注:puppet采用的C/S架构所以必须有至少有一台作为服务端,其他作为客户端处理) -### 1.设置主机### -在本教程里,我们将使用用2台运行ubuntu 15.04 "Vivid Vervet"的主机,一台作为服务端,另一台作为puppet的代理节点。下面是我们将用到的服务器的基础信息。 - -puupet服务器IP:44.55.88.6,主机名: puppetmaster -puppet代理节点IP: 45.55.86.39 ,主机名: puppetnode - -我们要在代理节点和服务器这两天机器的hosts里面都添加上相应的条目,使用root或是sudo访问权限来编辑/etc/hosts文件,命令如下: - - - # nano /etc/hosts - - 45.55.88.6 puppetmaster.example.com puppetmaster - 45.55.86.39 puppetnode.example.com puppetnode - -注意,puppet服务端必使用8140端口来运行,所以请务必保证开启8140端口。 - -### 2. 用NTP更新时间 ### - -puppet代理节点所使用系统时间必须要准确,这样可以避免代理证书出现问题。如果有时间差异,那么证书将过期失效,所以服务器与代理节点的系统时间必须互相同步。我们使用NTP(Network Time Protocol,网络时间协议)来同步时间。在服务器与代理节点上面分别运行以下命令来同步时间。 - - - # ntpdate pool.ntp.org - - 17 Jun 00:17:08 ntpdate[882]: adjust time server 66.175.209.17 offset -0.001938 sec (译者注:显示类似的输出结果表示运行正常) - -如果没有ntp,请使用下面的命令更新你的软件仓库,安装并运行ntp服务 - - # apt-get update && sudo apt-get -y install ntp ; service ntp restart - -### 3. 安装服务器软件 ### - -安装开源版本的puppet有很多的方法。在本教程中我们在puppet实验室官网下载一个名为puppetlabs-release的软件包,安装后它将为我们在软件源里面添加puppetmaster-passenger。puppetmaster-passenger依赖于apache的puppet服务端。我们开始下载这个软件包 - - - # 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] - -下载完成,我们来安装它 - - # 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) ... - -使用apt包管理命令更新一下本地的软件源 - - # apt-get update - -现在我们就可以安装puppetmaster-passenger了 - - # apt-get install puppetmaster-passenger - -**提示**: 在安装的时候可能会报错**Warning: Setting templatedir is deprecated.请查看 http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')** 不过不用担心,忽略掉它就好,我们只需要在设置配置文件的时候把这一项disable就行了。 - -如何来查看puppet master是否已经安装成功了呢?非常简单,只需要使用下面的命令查看它的版本就可以了。 - - - # puppet --version - - 3.8.1 - -现在我们已经安装好了puppet master。要想使用puppet master apache服务就必须运行起来,因为puppet master进程的运行是依赖于apache的。 -在开始之前,我们将apache服务停止,这样puppet muster也会停止运行。 - - # systemctl stop apache2 - -### 4. 使用Apt工具锁定Master(服务端)版本 ### - -现在已经安装了 3.8.1版的puppet,我们锁定这个版本不让它随意升级,因为升级会造成配置文件混乱。 使用apt工具来锁定它,这里我们需要使用文本编辑器来创建一个新的文件 **/etc/apt/preferences.d/00-puppet.pref** - - # nano /etc/apt/preferences.d/00-puppet.pref - -在新创建的文件里面添加以下内容 - - - # /etc/apt/preferences.d/00-puppet.pref - Package: puppet puppet-common puppetmaster-passenger - Pin: version 3.8* - Pin-Priority: 501 - -这样在以后的系统软件升级中puppet master将被锁住不会跟随系统软件一起升级。 - -### 5. 配置 Puppet Master### -Puppet master作为一个证书发行机构,所有代理证书的请求都将由它来处理。首先我们要删除所有在软件包安装过程中创建出来的ssl证书。本地默认的puppet证书在/var/lib/puppet/ssl。因此我们只需要使用rm命令来移除这些证书就可以了。 - - - # rm -rf /var/lib/puppet/ssl - -现在来配置这些证书,在创建puppet master证书的时候,需要用使用DNS能查找到的代理节点名称。使用文本编辑器来修改服务器的配置文件puppet.conf - # nano /etc/puppet/puppet.conf - -输出的结果像下面这样 - - [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 - - -在这我们需要注释掉templatedir 这行使它失效。然后在文件的结尾添加下面的信息。 - - - server = puppetmaster - environment = production - runinterval = 1h - strict_variables = true - certname = puppetmaster - dns_alt_names = puppetmaster, puppetmaster.example.com - -还有很多你可能用的到的配置选项。 如果你有需要,在Puppet实验室有一份详细的描述文件供你阅读。 [Main Config File (puppet.conf)][1]. - -编辑完成后保存退出。 - -使用下面的命令来生成一个新的证书。 - - - # 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 - -至此,证书已经生成。一旦我们看到 **Notice: Starting Puppet master version 3.8.1**, 表明证书就已经制作好了.我们按下 CTRL-C 回到shell命令行。 - -查看新生成证书的信息,可以使用下面的命令。 - - # 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. 创建一个Puppet清单 ### - -默认的主要清单是/etc/puppet/manifests/site.pp。 这个主要清单文件定义着控制哪些代理节点。现在我们来创建一个清单文件 - - # nano /etc/puppet/manifests/site.pp - -在刚打开的文件里面添加下面这几行 - - # 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, - } - -以上这几行的意思是给代理节点部署apache web 服务 -### 7. 运行puppet Master服务 ### - -已经准备好运行puppet master了,那么开启apache服务来让它启动 - - # systemctl start apache2 - -我们puppet master已经运行,不过它还不能管理任何代理节点。现在我们给puppet master添加代理节点. - -**提示**: 如果报错 **Job for apache2.service failed. 查看"systemctl status apache2.service" and "journalctl -xe" 所给出的信息.** 肯定是apache server有一些问题. 我们可以使用root或是sudo访问权限来运行**apachectl start**查看它输出的日志。 在本教程执行过程中, 我们发现一个证书配置的问题,解决方法如下**/etc/apache2/sites-enabled/puppetmaster.conf**. 修改其中的**SSLCertificateFile /var/lib/puppet/ssl/certs/server.pem 为 SSLCertificateFile /var/lib/puppet/ssl/certs/puppetmaster.pem** 然后注释掉后面这行**SSLCertificateKeyFile** . 然后在命令行启动apache -### 8. Puppet客户端安装 ### - -我们已经准备好了puppet的服务端,现在来为代理节点安装客户端。这里我们要给每一个需要管理的节点安装客户端,并且确保这些节点能够通过DNS查询到服务器主机。下面将 puppetnode.example.com作为代理节点安装客户端 -在代理节点服务器上,使用下面的命令下载puppet实验室提供的软件包。 - - - # 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] - -在ubuntu 15.04上我们使用debian包管理系统来安装它,命令如下: - - - # dpkg -i puppetlabs-release-trusty.deb - -使用apt包管理命令更新一下本地的软件源 - - # apt-get update - -通过远程仓库安装 - # apt-get install puppet - -Puppet客户端默认是不启动的。这里我们需要使用文本编辑器修改/etc/default/puppet文件,使它正常工作。 - # nano /etc/default/puppet - -更改 **START** 的值改成 "yes" 。 - - START=yes - -最后保存并退出。 - -### 9. 使用APT工具锁定Agent(客户端)版本 ### - -和上面的步骤一样为防止随意升级造成的配置文件混乱,我们要使用apt工具来把它锁定。具体做法是使用文本编辑器创建一个文件 **/etc/apt/preferences.d/00-puppet.pref** - - # nano /etc/apt/preferences.d/00-puppet.pref - -在新建的文件里面加入如下内容 - - # /etc/apt/preferences.d/00-puppet.pref - Package: puppet puppet-common - Pin: version 3.8* - Pin-Priority: 501 - -这样puppet就不会随着系统软件升级而随意升级了。 - -### 10. 配置puppet代理节点 ### - -我们需要编辑一下代理节点的puppet.conf文件,来使它运行。 - - # nano /etc/puppet/puppet.conf - -它看起来和服务端的配置文件完全一样。同样注释掉**templatedir**这行。不同的是在这里我们需要删除掉所有关于[master]的部分。 - - -假定服务端可用,我们的客户端应该是可以和它相互连接通信的。如果不行我们需要使用完整的主机域名puppetmaster.example.com - - [agent] - server = puppetmaster.example.com - certname = puppetnode.example.com - -在文件的结尾增加上面3行,增加之后文件内容像下面这样。 - - [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 - -最后保存并退出。 - -使用下面的命令来启动客户端软件 - - # systemctl start puppet - -如果一切顺利的话,我们不会看到命令行有任何输出。 第一次运行的时候,代理节点会生成一个ssl证书并且给服务端发送一个请求,经过签名确认后,两台机器就可以互相通信了。 - -**提示**: 如果这是你添加的第一个代理节点,建议你在添加其他节点前先给这个证书签名。一旦能够通过并正常运行,回过头来再添加其他代理节点。 - -### 11. 服务器上的签名证书请求 ### - -第一次运行的时候,代理节点会生成一个ssl证并且给服务端发送一个请求。在主服务器给代理节点服务器证书签名之后,主服务器才能和代理服务器通信并且控制代理服务器。 - -在主服务器上使用下面的命令来列出当前的证书请求 - - # 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 - - 因为只设置了一台代理节点服务器,所以我们将只看到一个请求。 -注意有没有“+”号在前面,代表这个证书有没有被签名。 - -使用**puppet cert sign**到**hostname**这个命令来签署这个签名请求。 - - # 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' - -服务端只能控制它签名过的代理节点。 - -如想我们想签署所有的请求, 需要使用-all选项,如下所示。 - - # puppet cert sign --all - -### 12.删除一个Puppet证书 ### - -如果我们想移除一个主机,或者想重建一个主机然后再添加它。下面的例子里我们将展示如何删除puppet master上面的一个证书。使用的命令如下: - - # 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' - -如果我们想查看所有的签署和未签署的请求,使用下面这条命令 - - # 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") - - -### 13. 部署代理节点Puppet清单 ### - -当配置并完成主puppet清单后,现在我们需要署代理节点服务器清单。要应用并加载主puppet清单,我们可以在代理节点服务器上面使用下面的命令 - - # 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 - -这里像我们展示了主清单如何去管理一个单一的服务器。 - -如果我们打算运行的puppet清单与主puppet清单没有什么关联,那么需要使用puppet apply 到相应的路径。它仅适用于该代理节点。 - - # puppet apply /etc/puppet/manifest/test.pp - -### 14. 配置特殊节点清单 ### - -如果我们想部署一个清单到某个特定的节点,我们需要进行以下操作。 - -在主服务器上面使用文本编辑器编辑/etc/puppet/manifest/site.pp - - # nano /etc/puppet/manifest/site.pp - -添加下面的内容进去 - - 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, - } - } - -这里的配置显示我们将在名为puppetnode and puppetnode1的2个特殊节点上面安装apache服务. 这里可以添加其他我们需要安装部署的具体节点进去。 -### 15. 配置清单模块 ### - -模块化组件组是非常实用的,在Puppet社区有很多人贡献自己的模块组件。 - -在主puppet服务器上, 我们将使用puppet module命令来安装**puppetlabs-apache** 模块。 - - # puppet module install puppetlabs-apache - -**警告**: 千万不要在一个已经部署apache环境的机器上面使用这个模块,否则它将清空你的apache配置。 - -现在用文本编辑器来修改 **site.pp** - - # nano /etc/puppet/manifest/site.pp - -添加下面的内容进去,意思是在 puppetnode上面安装apache服务。 - - node 'puppet-node' { - class { 'apache': } # use apache module - apache::vhost { 'example.com': # define vhost resource - port => '80', - docroot => '/var/www/html' - } - } - -保存退出。这样为我们的代理服务器重新配置部署基础环境。 - -### 总结 ### - -现在我们已经成功的在ubuntu 15.04上面部署并运行puppet来管理代理节点服务器的基础运行环境。我们学习了puppet是如何工作的,编写清单文件,节点与主机间使用ssl证书认证的认证过程。使用puppet管理配置众多的代理节点服务器是非常容易的。如果你有任何的问题,建议,反馈,与我们取得联系,我们将第一时间完善更新,谢谢。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-puppet-ubuntu-15-04/ - -作者:[Arun Pyasi][a] -译者:[ivo-wang](https://github.com/ivo-wang) -校对:[校对者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 From 401264a523af0c84402d35c09c0303af2972101f Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 5 Dec 2015 11:26:04 +0800 Subject: [PATCH 0489/1710] translating --- ...o Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md b/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md index 38d3d89735..8b7d60f37c 100644 --- a/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md +++ b/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md @@ -1,3 +1,6 @@ +Translating + + How to Remove Banned IP from Fail2ban on CentOS 6 / CentOS 7 ================================================================================ ![](http://www.ehowstuff.com/wp-content/uploads/2015/12/security-265130_1280.jpg) From 81fccd3482b9e078d2c95d1c40ca5d8b448fc80f Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 5 Dec 2015 12:40:08 +0800 Subject: [PATCH 0490/1710] translated --- ...ed IP from Fail2ban on CentOS 6 or CentOS 7.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) rename {sources => translated}/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md (71%) diff --git a/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md b/translated/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md similarity index 71% rename from sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md rename to translated/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md index 8b7d60f37c..a918eff18f 100644 --- a/sources/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md +++ b/translated/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md @@ -1,15 +1,12 @@ -Translating - - -How to Remove Banned IP from Fail2ban on CentOS 6 / CentOS 7 +如何在CentOS 6/7 上移除被Fail2ban禁止的IP ================================================================================ ![](http://www.ehowstuff.com/wp-content/uploads/2015/12/security-265130_1280.jpg) -[Fail2ban][1] is an intrusion prevention software framework that able to protect your server from brute-force attacks. Fail2ban written in the Python programming language and is widely used by most of the VPS servers. Fail2ban will scan log files and IP blacklists that shows signs of malicious, too many password failures, web server exploitation, WordPress plugin attacks and other vulnerabilities. If you already installed and used fail2ban to protect your web server, you may be wondering how to find the IP banned or blocked by Fail2ban, or you may want to remove banned ip from fail2ban jail on CentOS 6, CentOS 7, RHEL 6, RHEL 7 and Oracle Linux 6/7. +[Fail2ban][1]是一款用于保护你的服务器免于暴力攻击的入侵保护软件。Fail2ban用python写成,并被广泛用户大多数服务器上。Fail2ban将扫描日志文件和IP黑名单来显示恶意软件、过多的密码失败、web服务器利用、Wordpress插件攻击和其他漏洞。如果你已经安装并使用了fail2ban来保护你的web服务器,你也许会想知道如何在CentOS 6、CentOS 7、RHEL 6、RHEL 7 和 Oracle Linux 6/7中找到被Fail2ban阻止的IP,或者你想将ip从fail2ban监狱中移除。 -### How to List of Banned IP address ### +### 如何列出被禁止的IP ### -To see all the blocked ip addresses, run the following command : +要查看所有被禁止的ip地址,运行下面的命令: # iptables -L Chain INPUT (policy ACCEPT) @@ -43,11 +40,11 @@ To see all the blocked ip addresses, run the following command : REJECT all -- 104.194.26.205 anywhere reject-with icmp-port-unreachable RETURN all -- anywhere anywhere -### How to Remove Banned IP from Fail2ban jail ### +### 如何从Fail2ban中移除IP ### # iptables -D f2b-NoAuthFailures -s banned_ip -j REJECT -I hope this article gives you some ideas and quick guide on remove banned IP from Fail2ban jail on on CentOS 6, CentOS 7, RHEL 6, RHEL 7 and Oracle Linux 6/7. +我希望这篇教程可以给你在CentOS 6、CentOS 7、RHEL 6、RHEL 7 和 Oracle Linux 6/7中移除被禁止的ip一些指导。 -------------------------------------------------------------------------------- From 5e575541042729bde0efd89ba97145816b7f6680 Mon Sep 17 00:00:00 2001 From: Flowsnow Date: Sat, 5 Dec 2015 16:07:43 +0800 Subject: [PATCH 0491/1710] Signed-off-by: Flowsnow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [已翻译]Part 9 - LFCS: Linux Package Management with Yum, RPM, Apt, Dpkg, Aptitude and Zypper --- ...th Yum RPM Apt Dpkg Aptitude and Zypper.md | 230 ------------------ ...th Yum RPM Apt Dpkg Aptitude and Zypper.md | 230 ++++++++++++++++++ 2 files changed, 230 insertions(+), 230 deletions(-) delete mode 100644 sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md create mode 100644 translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md 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 deleted file mode 100644 index af967e18d4..0000000000 --- a/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md +++ /dev/null @@ -1,230 +0,0 @@ -Flowsnow translating... -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/ diff --git a/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md b/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md new file mode 100644 index 0000000000..2781dde63d --- /dev/null +++ b/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md @@ -0,0 +1,230 @@ +Flowsnow translating... +LFCS系列第九讲: 使用Yum, RPM, Apt, Dpkg, Aptitude, Zypper进行Linux包管理 +================================================================================ +去年八月, Linux基金会宣布了一个全新的LFCS(Linux Foundation Certified Sysadmin,Linux基金会认证系统管理员)认证计划,这对广大系统管理员来说是一个很好的机会,管理员们可以通过绩效考试来表明自己可以成功支持Linux系统的整体运营。 当需要的时候一个Linux基金会认证的系统管理员有足够的专业知识来确保系统高效运行,提供第一手的故障诊断和监视,并且为工程师团队在问题升级时提供智能决策。 + +![Linux Package Management](http://www.tecmint.com/wp-content/uploads/2014/11/lfcs-Part-9.png) + +Linux基金会认证系统管理员 – 第九讲 + +请观看下面关于Linux基金会认证计划的演示。 + +注:youtube 视频 + + +本文是本系列十套教程中的第九讲,今天在这篇文章中我们会引导你学习Linux包管理,这也是LFCS认证考试所需要的。 + +### 包管理 ### + +简单的说,包管理是系统中安装和维护软件的一种方法,其中维护也包含更新和卸载。 + +在Linux早期,程序只以源代码的方式发行,还带有所需的用户使用手册和必备的配置文件,甚至更多。现如今,大多数发行商使用默认的预装程序或者被称为包的程序集合。用户使用这些预装程序或者包来安装该发行版本。然而,Linux最伟大的一点是我们仍然能够获得程序的源代码用来学习、改进和编译。 + +**包管理系统是如何工作的** + +如果某一个包需要一定的资源,如共享库,或者需要另一个包,据说就会存在依赖性问题。所有现在的包管理系统提供了一些解决依赖性的方法,以确保当安装一个包时,相关的依赖包也安装好了 + +**打包系统** + +几乎所有安装在现代Linux系统上的软件都会在互联网上找到。它要么能够通过中央库(中央库能包含几千个包,每个包都已经构建、测试并且维护好了)发行商得到,要么能够直接得到可以下载和手动安装的源代码。 + +由于不同的发行版使用不同的打包系统(Debian的*.deb文件/ CentOS的*.rpm文件/ openSUSE的专门为openSUSE构建的*.rpm文件),因此为一个发行版本开发的包会与其他发行版本不兼容。然而,大多数发行版本都可能是LFCS认证的三个发行版本之一。 + +**高级和低级打包工具** + +为了有效地进行包管理的任务,你需要知道,你将有两种类型的实用工具:低级工具(能在后端实际安装,升级,卸载包文件),以及高级工具(负责确保能很好的执行依赖性解决和元数据检索的任务,元数据也称为关于数据的数据)。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
发行版低级工具高级工具
 Debian版及其衍生版 dpkg apt-get / aptitude
 CentOS版 rpm yum
 openSUSE版 rpm zypper
+ +让我们来看下低级工具和高级工具的描述。 + +dpkg的是基于Debian系统中的一个低级包管理器。它可以安装,删除,提供有关资料,并建立*.deb包,但它不能自动下载并安装它们相应的依赖包。 + +- 阅读更多: [15个dpkg命令实例][1] + +apt-get是Debian和衍生版的高级包管理器,并提供命令行方式从多个来源检索和安装软件包,其中包括解决依赖性。和dpkg不同的是,apt-get不是直接基于.deb文件工作,而是基于包的正确名称。 + +- 阅读更多: [25个apt-get命令实力][2] + +Aptitude是基于Debian的系统的另一个高级包管理器,它可用于快速简便的执行管理任务(安装,升级和删除软件包,还可以自动处理解决依赖性)。与atp-get和额外的包管理器相比,它提供了相同的功能,例如提供对包的几个版本的访问。 + +rpm是Linux标准基础(LSB)兼容发布版使用的一种包管理器,用来对包进行低级处理。就像dpkg,rpm可以查询,安装,检验,升级和卸载软件包,并能被基于Fedora的系统频繁地使用,比如RHEL和CentOS。 + +- 阅读更多: [20个rpm命令实例][3] + +相对于基于RPM的系统,yum增加了系统自动更新的功能和带依赖性管理的包管理功能。作为一个高级工具,和apt-get或者aptitude相似,yum基于库工作。 + +- 阅读更多: [20个yum命令实例][4] +- +### 低级工具的常见用法 ### + +你用低级工具处理最常见的任务如下。 + +**1. 从已编译(*.deb或*.rpm)的文件安装一个包** + +这种安装方法的缺点是没有提供解决依赖性的方案。当你在发行版本库中无法获得某个包并且又不能通过高级工具下载安装时,你很可能会从一个已编译文件安装该包。因为低级工具不需要解决依赖性问题,所以当安装一个没有解决依赖性的包时会出现出错并且退出。 + + # dpkg -i file.deb [Debian版和衍生版] + # rpm -i file.rpm [CentOS版 / openSUSE版] + +**注意**: 不要试图在CentOS中安装一个为openSUSE构建的.rpm文件,反之亦然! + +**2. 从已编译文件中更新一个包** + +同样,当中央库中没有某安装包时,你只能手动升级该包。 + + # dpkg -i file.deb [Debian版和衍生版] + # rpm -U file.rpm [CentOS版 / openSUSE版] + +**3. 列举安装的包** + +当你第一次接触一个已经在工作中的系统时,很可能你会想知道安装了哪些包。 + + # dpkg -l [Debian版和衍生版] + # rpm -qa [CentOS版 / openSUSE版] + +如果你想知道一个特定的包安装在哪儿, 你可以使用管道命令从以上命令的输出中去搜索,这在这个系列的[操作Linux文件 – 第一讲][5] 中有介绍。假定我们需要验证mysql-common这个包是否安装在Ubuntu系统中。 + + # dpkg -l | grep mysql-common + +![Check Installed Packages in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Installed-Package.png) + +检查安装的包 + +另外一种方式来判断一个包是否已安装。 + + # dpkg --status package_name [Debian版和衍生版] + # rpm -q package_name [CentOS版 / openSUSE版] + +例如,让我们找出sysdig包是否安装在我们的系统。 + + # rpm -qa | grep sysdig + +![Check sysdig Package](http://www.tecmint.com/wp-content/uploads/2014/11/Check-sysdig-Package.png) + +检查sysdig包 + +**4. 查询一个文件是由那个包安装的** + + # dpkg --search file_name + # rpm -qf file_name + +例如,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) + +Linux中查询文件 + +### 高级工具的常见用法 ### + +你用高级工具处理最常见的任务如下。 + +**1. 搜索包** + +aptitude更新将会更新可用的软件包列表,并且aptitude搜索会根据包名进行实际性的搜索。 + + # aptitude update && aptitude search package_name + +在搜索所有选项中,yum不仅可以通过包名还可以通过包的描述搜索程序包。 + + # yum search package_name + # yum search all package_name + # yum whatprovides “*/package_name” + +假定我们需要一个名为sysdig的包,要知道的是我们需要先安装然后才能运行。 + + # yum whatprovides “*/sysdig” + +![Check Package Description in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Package-Description.png) + +检查包描述 + +whatprovides告诉yum搜索一个含有能够匹配上述正则表达式的文件的包。 + + # zypper refresh && zypper search package_name [在openSUSE上] + +**2. 从仓库安装一个包** + +当安装一个包时,在包管理器解决了所有依赖性问题后,可能会提醒你确认安装。需要注意的是运行更新或刷新(根据所使用的软件包管理器)不是绝对必要,但是考虑到安全性和依赖性的原因,保持安装的软件包是最新的是一个好的系统管理员的做法。 + + # aptitude update && aptitude install package_name [Debian版和衍生版] + # yum update && yum install package_name [CentOS版] + # zypper refresh && zypper install package_name [openSUSE版] + +**3. 卸载包** + +按选项卸载将会卸载软件包,但把配置文件保留完好,然而清除包从系统中完全删去该程序。 +# aptitude remove / purge package_name +# yum erase package_name + + ---注意要卸载的openSUSE包前面的减号 --- + + # zypper remove -package_name + +在默认情况下,大部分(如果不是全部)的包管理器会提示你,在你实际卸载之前你是否确定要继续卸载。所以,请仔细阅读屏幕上的信息,以避免陷入不必要的麻烦! + +**4. 显示包的信息** + +下面的命令将会显示birthday这个包的信息。 + + # 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) + +检查包信息 + +### 总结 ### + +作为一个系统管理员,包管理器是你不能回避的东西。你应该立即准备使用本文中介绍的这些工具。希望你在准备LFCS考试和日常工作中会觉得这些工具好用。欢迎在下面留下您的意见或问题,我们将尽可能快的回复你。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-package-management/ + +作者:[Gabriel Cánepa][a] +译者:[Flowsnow](https://github.com/Flowsnow) +校对:[校对者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 1404b5581120b793b53f75a0fb6ff8aace971632 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 5 Dec 2015 19:34:37 +0800 Subject: [PATCH 0492/1710] Translating sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md --- ... How to install Android Studio on Ubuntu 15.04 or CentOS 7.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md index 29569329c9..e0a8272395 100644 --- a/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md +++ b/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md @@ -1,3 +1,4 @@ +ictlyh Translating How to install Android Studio on Ubuntu 15.04 / CentOS 7 ================================================================================ With the advancement of smart phones in the recent years, Android has become one of the biggest phone platforms and all the tools required to build Android applications are also freely available. Android Studio is an Integrated Development Environment (IDE) for developing Android applications based on [IntelliJ IDEA][1]. It is a free and open source software by Google released in 2014 and succeeds Eclipse as the main IDE. From 8d68281c0599f22eb4e01456c41e72e777824024 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 5 Dec 2015 23:13:14 +0800 Subject: [PATCH 0493/1710] PUB:Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache @ictlyh --- ...Network Security Service NSS for Apache.md | 78 ++++++++++--------- 1 file changed, 40 insertions(+), 38 deletions(-) rename {translated/tech => published}/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md (62%) diff --git a/translated/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md b/published/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md similarity index 62% rename from translated/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md rename to published/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md index 5ff1f9fe65..574e9dc594 100644 --- a/translated/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md +++ b/published/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md @@ -1,11 +1,13 @@ -RHCE 系列: 使用网络安全服务(NSS)为 Apache 通过 TLS 实现 HTTPS +RHCE 系列(八):在 Apache 上使用网络安全服务(NSS)实现 HTTPS ================================================================================ -如果你是一个负责维护和确保 web 服务器安全的系统管理员,你不能不花费最大的精力确保服务器中处理和通过的数据任何时候都受到保护。 + +如果你是一个负责维护和确保 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 +*RHCE 系列:第八部分 - 使用网络安全服务(NSS)为 Apache 通过 TLS 实现 HTTPS* -为了在客户端和服务器之间提供更安全的连接,作为 HTTP 和 SSL(安全套接层)或者最近称为 TLS(传输层安全)的组合,产生了 HTTPS 协议。 +为了在客户端和服务器之间提供更安全的连接,作为 HTTP 和 SSL(Secure Sockets Layer,安全套接层)或者最近称为 TLS(Transport Layer Security,传输层安全)的组合,产生了 HTTPS 协议。 由于一些严重的安全漏洞,SSL 已经被更健壮的 TLS 替代。由于这个原因,在这篇文章中我们会解析如何通过 TLS 实现你 web 服务器和客户端之间的安全连接。 @@ -22,11 +24,11 @@ RHCE 系列:第八部分 - 使用网络安全服务(NSS)为 Apache 通过 # 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)。 +**重要**:请注意如果你想使用 OpenSSL 库而不是 NSS(Network Security Service,网络安全服务)实现 TLS,你可以在上面的命令中用 mod\_ssl 替换 mod\_nss(使用哪一个取决于你,但在这篇文章中我们会使用 NSS,因为它更加安全,比如说,它支持最新的加密标准,比如 PKCS #11)。 如果你使用 mod\_nss,首先要卸载 mod\_ssl,反之如此。 @@ -54,15 +56,15 @@ nss.conf – 配置文件 下一步,在 `/etc/httpd/conf.d/nss.conf` 配置文件中做以下更改: -1. 指定 NSS 数据库目录。你可以使用默认的目录或者新建一个。本文中我们使用默认的: +1、 指定 NSS 数据库目录。你可以使用默认的目录或者新建一个。本文中我们使用默认的: NSSCertificateDatabase /etc/httpd/alias -2. 通过保存密码到数据库目录中的 /etc/httpd/nss-db-password.conf 文件避免每次系统启动时要手动输入密码: +2、 通过保存密码到数据库目录中的 `/etc/httpd/nss-db-password.conf` 文件来避免每次系统启动时要手动输入密码: NSSPassPhraseDialog file:/etc/httpd/nss-db-password.conf -其中 /etc/httpd/nss-db-password.conf 只包含以下一行,其中 mypassword 是后面你为 NSS 数据库设置的密码: +其中 `/etc/httpd/nss-db-password.conf` 只包含以下一行,其中 mypassword 是后面你为 NSS 数据库设置的密码: internal:mypassword @@ -71,27 +73,27 @@ nss.conf – 配置文件 # chmod 640 /etc/httpd/nss-db-password.conf # chgrp apache /etc/httpd/nss-db-password.conf -3. 由于 POODLE SSLv3 漏洞,红帽建议停用 SSL 和 TLSv1.0 之前所有版本的 TLS(更多信息可以查看[这里][2])。 +3、 由于 POODLE SSLv3 漏洞,红帽建议停用 SSL 和 TLSv1.0 之前所有版本的 TLS(更多信息可以查看[这里][2])。 确保 NSSProtocol 指令的每个实例都类似下面一样(如果你没有托管其它虚拟主机,很可能只有一条): NSSProtocol TLSv1.0,TLSv1.1 -4. 由于这是一个自签名证书,Apache 会拒绝重启,并不会识别为有效发行人。由于这个原因,对于这种特殊情况我们还需要添加: +4、 由于这是一个自签名证书,Apache 会拒绝重启,并不会识别为有效发行人。由于这个原因,对于这种特殊情况我们还需要添加: NSSEnforceValidCerts off -5. 虽然并不是严格要求,为 NSS 数据库设置一个密码同样很重要: +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 数据库设置密码 +*为 NSS 数据库设置密码* ### 创建一个 Apache SSL 自签名证书 ### -下一步,我们会创建一个自签名证书为我们的客户机识别服务器(请注意这个方法对于生产环境并不是最好的选择;对于生产环境你应该考虑购买第三方可信证书机构验证的证书,例如 DigiCert)。 +下一步,我们会创建一个自签名证书来让我们的客户机可以识别服务器(请注意这个方法对于生产环境并不是最好的选择;对于生产环境你应该考虑购买第三方可信证书机构验证的证书,例如 DigiCert)。 我们用 genkey 命令为 box1 创建有效期为 365 天的 NSS 兼容证书。完成这一步后: @@ -101,19 +103,19 @@ nss.conf – 配置文件 ![创建 Apache SSL 密钥](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Apache-SSL-Key.png) -创建 Apache SSL 密钥 +*创建 Apache SSL 密钥* 你可以使用默认的密钥大小(2048),然后再次选择 Next: ![选择 Apache SSL 密钥大小](http://www.tecmint.com/wp-content/uploads/2015/09/Select-Apache-SSL-Key-Size.png) -选择 Apache SSL 密钥大小 +*选择 Apache SSL 密钥大小* 等待系统生成随机比特: ![生成随机密钥比特](http://www.tecmint.com/wp-content/uploads/2015/09/Generating-Random-Bits.png) -生成随机密钥比特 +*生成随机密钥比特* 为了加快速度,会提示你在控制台输入随机字符,正如下面的截图所示。请注意当没有从键盘接收到输入时进度条是如何停止的。然后,会让你选择: @@ -124,35 +126,35 @@ nss.conf – 配置文件 注:youtube 视频 -最后,会提示你输入之前设置的密码到 NSS 证书: +最后,会提示你输入之前给 NSS 证书设置的密码: # genkey --nss --days 365 box1 ![Apache NSS 证书密码](http://www.tecmint.com/wp-content/uploads/2015/09/Apache-NSS-Password.png) -Apache NSS 证书密码 +*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 证书 +*列出 Apache NSS 证书* -然后通过名字删除(除非严格要求,用你自己的证书名称替换 box1): +然后通过名字删除(如果你真的需要删除的,用你自己的证书名称替换 box1): # certutil -d /etc/httpd/alias -D -n "box1" -如果你需要继续的话: +如果你需要继续进行的话,请继续阅读。 ### 测试 Apache SSL HTTPS 连接 ### -最后,是时候测试到我们服务器的安全连接了。当你用浏览器打开 https://,你会看到著名的信息 “This connection is untrusted”: +最后,是时候测试到我们服务器的安全连接了。当你用浏览器打开 https://\,你会看到著名的信息 “This connection is untrusted”: ![检查 Apache SSL 连接](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Apache-SSL-Connection.png) -检查 Apache SSL 连接 +*检查 Apache SSL 连接* 在上面的情况中,你可以点击添加例外(Add Exception) 然后确认安全例外(Confirm Security Exception) - 但先不要这么做。让我们首先来看看证书看它的信息是否和我们之前输入的相符(如截图所示)。 @@ -160,37 +162,37 @@ Apache NSS 证书密码 ![确认 Apache SSL 证书详情](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Apache-SSL-Certificate-Details.png) -确认 Apache SSL 证书详情 +*确认 Apache SSL 证书详情* -现在你继续,确认例外(限于此次或永久),然后会通过 https 把你带到你 web 服务器的 DocumentRoot 目录,在这里你可以使用你浏览器自带的开发者工具检查连接详情: +现在你可以继续,确认例外(限于此次或永久),然后会通过 https 把你带到你 web 服务器的 DocumentRoot 目录,在这里你可以使用你浏览器自带的开发者工具检查连接详情: -在火狐浏览器中,你可以通过在屏幕中右击然后从上下文菜单中选择检查元素(Inspect Element)启动,尤其是通过网络选项卡: +在火狐浏览器中,你可以通过在屏幕中右击,然后从上下文菜单中选择检查元素(Inspect Element)启动开发者工具,尤其要看“网络”选项卡: ![检查 Apache HTTPS 连接](http://www.tecmint.com/wp-content/uploads/2015/09/Inspect-Apache-HTTPS-Connection.png) -检查 Apache HTTPS 连接 +*检查 Apache HTTPS 连接* 请注意这和之前显示的在验证过程中输入的信息一致。还有一种方式通过使用命令行工具测试连接: -左边(测试 SSLv3): +左图(测试 SSLv3): # openssl s_client -connect localhost:443 -ssl3 -右边(测试 TLS): +右图(测试 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 连接 +*测试 Apache SSL 和 TLS 连接* -参考上面的截图了解更相信信息。 +参考上面的截图了解更详细信息。 ### 总结 ### -我确信你已经知道,使用 HTTPS 会增加会在你站点中输入个人信息的访客的信任(从用户名和密码到任何商业/银行账户信息)。 +我想你已经知道,使用 HTTPS 会增加会在你站点中输入个人信息的访客的信任(从用户名和密码到任何商业/银行账户信息)。 -在那种情况下,你会希望获得由可信验证机构签名的证书,正如我们之前解释的(启用的步骤和发送 CSR 到 CA 然后获得签名证书的例子相同);另外的情况,就是像我们的例子中一样使用自签名证书。 +在那种情况下,你会希望获得由可信验证机构签名的证书,正如我们之前解释的(步骤和设置需要启用例外的证书的步骤相同,发送 CSR 到 CA 然后获得返回的签名证书);否则,就像我们的例子中一样使用自签名证书即可。 要获取更多关于使用 NSS 的详情,可以参考关于 [mod-nss][3] 的在线帮助。如果你有任何疑问或评论,请告诉我们。 @@ -200,11 +202,11 @@ via: http://www.tecmint.com/create-apache-https-self-signed-certificate-using-ns 作者:[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/install-lamp-in-centos-7/ -[1]:http://www.tecmint.com/author/gacanepa/ +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:https://linux.cn/article-5789-1.html [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 9248a086a3a68df962b8ee7073a905c2606a88bf Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 6 Dec 2015 00:35:36 +0800 Subject: [PATCH 0494/1710] Delete 20151201 Linux and Unix Port Scanning With netcat [nc] Command.md --- ... Port Scanning With netcat [nc] Command.md | 97 ------------------- 1 file changed, 97 deletions(-) delete mode 100644 sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md diff --git a/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md b/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md deleted file mode 100644 index f4019db6eb..0000000000 --- a/sources/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md +++ /dev/null @@ -1,97 +0,0 @@ -translation by strugglingyouth -Linux and Unix Port Scanning With netcat [nc] Command -================================================================================ -How do I find out which ports are opened on my own server? How do I run port scanning using the nc command instead of [the nmap command on a Linux or Unix-like][1] systems? - -The nmap (“Network Mapper”) is an open source tool for network exploration and security auditing. If nmap is not installed and you do not wish to use all of nmap options you can use netcat/nc command for scanning ports. This may useful to know which ports are open and running services on a target machine. You can use [nmap command for port scanning][2] too. - -### How do I use nc to scan Linux, UNIX and Windows server port scanning? ### - -If nmap is not installed try nc / netcat command as follow. The -z flag can be used to tell nc to report open ports, rather than initiate a connection. Run nc command with -z flag. You need to specify host name / ip along with the port range to limit and speedup operation: - - ## syntax ## - nc -z -v {host-name-here} {port-range-here} - nc -z -v host-name-here ssh - nc -z -v host-name-here 22 - nc -w 1 -z -v server-name-here port-Number-her - - ## scan 1 to 1023 ports ## - nc -zv vip-1.vsnl.nixcraft.in 1-1023 - -Sample outputs: - - Connection to localhost 25 port [tcp/smtp] succeeded! - Connection to vip-1.vsnl.nixcraft.in 25 port [tcp/smtp] succeeded! - Connection to vip-1.vsnl.nixcraft.in 80 port [tcp/http] succeeded! - Connection to vip-1.vsnl.nixcraft.in 143 port [tcp/imap] succeeded! - Connection to vip-1.vsnl.nixcraft.in 199 port [tcp/smux] succeeded! - Connection to vip-1.vsnl.nixcraft.in 783 port [tcp/*] succeeded! - Connection to vip-1.vsnl.nixcraft.in 904 port [tcp/vmware-authd] succeeded! - Connection to vip-1.vsnl.nixcraft.in 993 port [tcp/imaps] succeeded! - -You can scan individual port too: - - nc -zv v.txvip1 443 - nc -zv v.txvip1 80 - nc -zv v.txvip1 22 - nc -zv v.txvip1 21 - nc -zv v.txvip1 smtp - nc -zvn v.txvip1 ftp - - ## really fast scanner with 1 timeout value ## - netcat -v -z -n -w 1 v.txvip1 1-1023 - -Sample outputs: - -![Fig.01: Linux/Unix: Use Netcat to Establish and Test TCP and UDP Connections on a Server](http://s0.cyberciti.org/uploads/faq/2007/07/scan-with-nc.jpg) - -Fig.01: Linux/Unix: Use Netcat to Establish and Test TCP and UDP Connections on a Server - -Where, - -1. -z : Port scanning mode i.e. zero I/O mode. -1. -v : Be verbose [use twice -vv to be more verbose]. -1. -n : Use numeric-only IP addresses i.e. do not use DNS to resolve ip addresses. -1. -w 1 : Set time out value to 1. - -More examples: - - $ netcat -z -vv www.cyberciti.biz http - www.cyberciti.biz [75.126.153.206] 80 (http) open - sent 0, rcvd 0 - $ netcat -z -vv google.com https - DNS fwd/rev mismatch: google.com != maa03s16-in-f2.1e100.net - DNS fwd/rev mismatch: google.com != maa03s16-in-f6.1e100.net - DNS fwd/rev mismatch: google.com != maa03s16-in-f5.1e100.net - DNS fwd/rev mismatch: google.com != maa03s16-in-f3.1e100.net - DNS fwd/rev mismatch: google.com != maa03s16-in-f8.1e100.net - DNS fwd/rev mismatch: google.com != maa03s16-in-f0.1e100.net - DNS fwd/rev mismatch: google.com != maa03s16-in-f7.1e100.net - DNS fwd/rev mismatch: google.com != maa03s16-in-f4.1e100.net - google.com [74.125.236.162] 443 (https) open - sent 0, rcvd 0 - $ netcat -v -z -n -w 1 192.168.1.254 1-1023 - (UNKNOWN) [192.168.1.254] 989 (ftps-data) open - (UNKNOWN) [192.168.1.254] 443 (https) open - (UNKNOWN) [192.168.1.254] 53 (domain) open - -See also - -- [Scanning network for open ports with the nmap command][3] for more info. -- Man pages - [nc(1)][4], [nmap(1)][5] - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/linux-port-scanning/ - -作者: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/networking/nmap-command-examples-tutorials/ -[2]:http://www.cyberciti.biz/tips/linux-scanning-network-for-open-ports.html -[3]:http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/ -[4]:http://www.manpager.com/linux/man1/nc.1.html -[5]:http://www.manpager.com/linux/man1/nmap.1.html From 292729924948886b8fbf967d50335462c3a7665c Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 6 Dec 2015 00:36:08 +0800 Subject: [PATCH 0495/1710] Create 20151201 Linux and Unix Port Scanning With netcat [nc] Command.md --- ... Port Scanning With netcat [nc] Command.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 translated/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md diff --git a/translated/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md b/translated/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md new file mode 100644 index 0000000000..9672c222af --- /dev/null +++ b/translated/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md @@ -0,0 +1,99 @@ + +使用 netcat [nc] 命令对 Linux 和 Unix 进行端口扫描 +================================================================================ + +我如何在自己的服务器上找出哪些端口是开放的?如何使用 nc 命令进行端口扫描来替换 [Linux 或 类 Unix 中的 nmap 命令][1]? + +nmap (“Network Mapper”)是一个开源工具用于网络探测和安全审核。如果 nmap 没有安装或者你不希望使用 nmap,那你可以用 netcat/nc 命令进行端口扫描。它对于查看目标计算机上哪些端口是开放的或者运行着服务是非常有用的。你也可以使用 [nmap 命令进行端口扫描][2] 。 + +### 如何使用 nc 来扫描 Linux,UNIX 和 Windows 服务器的端口呢? ### + +If nmap is not installed try nc / netcat command as follow. The -z flag can be used to tell nc to report open ports, rather than initiate a connection. Run nc command with -z flag. You need to specify host name / ip along with the port range to limit and speedup operation: + + +如果未安装 nmap,如下所示,试试 nc/netcat 命令。-z 参数用来告诉 nc 报告开放的端口,而不是启动连接。在 nc 命令中使用 -z 参数时,你需要在主机名/ip 后面指定端口的范围来限制和加速其运行: + + ## 语法 ## + nc -z -v {host-name-here} {port-range-here} + nc -z -v host-name-here ssh + nc -z -v host-name-here 22 + nc -w 1 -z -v server-name-here port-Number-her + + ## 扫描 1 to 1023 端口 ## + nc -zv vip-1.vsnl.nixcraft.in 1-1023 + +输出示例: + + Connection to localhost 25 port [tcp/smtp] succeeded! + Connection to vip-1.vsnl.nixcraft.in 25 port [tcp/smtp] succeeded! + Connection to vip-1.vsnl.nixcraft.in 80 port [tcp/http] succeeded! + Connection to vip-1.vsnl.nixcraft.in 143 port [tcp/imap] succeeded! + Connection to vip-1.vsnl.nixcraft.in 199 port [tcp/smux] succeeded! + Connection to vip-1.vsnl.nixcraft.in 783 port [tcp/*] succeeded! + Connection to vip-1.vsnl.nixcraft.in 904 port [tcp/vmware-authd] succeeded! + Connection to vip-1.vsnl.nixcraft.in 993 port [tcp/imaps] succeeded! + +你也可以扫描单个端口: + + nc -zv v.txvip1 443 + nc -zv v.txvip1 80 + nc -zv v.txvip1 22 + nc -zv v.txvip1 21 + nc -zv v.txvip1 smtp + nc -zvn v.txvip1 ftp + + ## really fast scanner with 1 timeout value ## + netcat -v -z -n -w 1 v.txvip1 1-1023 + +输出示例: + +![Fig.01: Linux/Unix: Use Netcat to Establish and Test TCP and UDP Connections on a Server](http://s0.cyberciti.org/uploads/faq/2007/07/scan-with-nc.jpg) + +图01:Linux/Unix:使用 Netcat 来测试 TCP 和 UDP 与服务器建立连接, + +1. -z : 端口扫描模式即 I/O 模式。 +1. -v : 显示详细信息 [使用 -vv 来输出更详细的信息]。 +1. -n : 使用纯数字 IP 地址,即不用 DNS 来解析 IP 地址。 +1. -w 1 : 设置超时值设置为1。 + +更多例子: + + $ netcat -z -vv www.cyberciti.biz http + www.cyberciti.biz [75.126.153.206] 80 (http) open + sent 0, rcvd 0 + $ netcat -z -vv google.com https + DNS fwd/rev mismatch: google.com != maa03s16-in-f2.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f6.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f5.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f3.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f8.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f0.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f7.1e100.net + DNS fwd/rev mismatch: google.com != maa03s16-in-f4.1e100.net + google.com [74.125.236.162] 443 (https) open + sent 0, rcvd 0 + $ netcat -v -z -n -w 1 192.168.1.254 1-1023 + (UNKNOWN) [192.168.1.254] 989 (ftps-data) open + (UNKNOWN) [192.168.1.254] 443 (https) open + (UNKNOWN) [192.168.1.254] 53 (domain) open + +也可以看看 : + +- [使用 nmap 命令扫描网络中开放的端口][3]。 +- 手册页 - [nc(1)][4], [nmap(1)][5] + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/linux-port-scanning/ + +作者:Vivek Gite +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/ +[2]:http://www.cyberciti.biz/tips/linux-scanning-network-for-open-ports.html +[3]:http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/ +[4]:http://www.manpager.com/linux/man1/nc.1.html +[5]:http://www.manpager.com/linux/man1/nmap.1.html From 9ad6d5c6593ff82f228174c80c3a5bf9448ade47 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 6 Dec 2015 09:52:04 +0800 Subject: [PATCH 0496/1710] [Translated] sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md --- ...roid Studio on Ubuntu 15.04 or CentOS 7.md | 140 ------------------ ...roid Studio on Ubuntu 15.04 or CentOS 7.md | 139 +++++++++++++++++ 2 files changed, 139 insertions(+), 140 deletions(-) delete mode 100644 sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md create mode 100644 translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md diff --git a/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md deleted file mode 100644 index e0a8272395..0000000000 --- a/sources/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md +++ /dev/null @@ -1,140 +0,0 @@ -ictlyh Translating -How to install Android Studio on Ubuntu 15.04 / CentOS 7 -================================================================================ -With the advancement of smart phones in the recent years, Android has become one of the biggest phone platforms and all the tools required to build Android applications are also freely available. Android Studio is an Integrated Development Environment (IDE) for developing Android applications based on [IntelliJ IDEA][1]. It is a free and open source software by Google released in 2014 and succeeds Eclipse as the main IDE. - -In this article, we will learn how to install Android Studio on Ubuntu 15.04 and CentOS 7. - -### Installation on Ubuntu 15.04 ### - -We can install Android Studio in two ways. One is to set up the required repository and install it; other is to download it from the official Android site and install it locally. In the following example, we will be setting up the repo using command line and install it. Before proceeding, we need to make sure that we have JDK version1.6 or greater installed. - -Here, I'm installing JDK 1.8. - - $ sudo add-apt-repository ppa:webupd8team/java - - $ sudo apt-get update - - $ sudo apt-get install oracle-java8-installer oracle-java8-set-default - -Verify if java installation was successful: - - poornima@poornima-Lenovo:~$ java -version - -Now, setup the repo for installing Android Studio - - $ sudo apt-add-repository ppa:paolorotolo/android-studio - -![Android-Studio-repo](http://blog.linoxide.com/wp-content/uploads/2015/11/Android-studio-repo.png) - - $ sudo apt-get update - - $ sudo apt-get install android-studio - -Above install command will install android-studio in the directory /opt. - -Now, run the following command to start the setup wizard: - - $ /opt/android-studio/bin/studio.sh - -This will invoke the setup screen. Following are the screen shots that follow to set up Android studio: - -![Android Studio setup](http://blog.linoxide.com/wp-content/uploads/2015/11/Studio-setup.png) - -![Install-type](Android Studio setup) - -![Emulator Settings](http://blog.linoxide.com/wp-content/uploads/2015/11/Emulator-settings.png) - -Once you press the Finish button, Licence agreement will be displayed. After you accept the licence, it starts downloading the required components. - -![Download components](http://blog.linoxide.com/wp-content/uploads/2015/11/Download.png) - -Android studio installation will be complete after this step. When you relaunch Android studio, you will be shown the following welcome screen from where you will be able to start working with your Android Studio. - -![Welcome screen](http://blog.linoxide.com/wp-content/uploads/2015/11/Welcome-screen.png) - -### Installation on CentOS 7 ### - -Let us now learn how to install Android Studio on CentOS 7. Here also, you need to install JDK 1.6 or later. Remember to use 'sudo' before the commands if you are not a root user. You can download the [latest version][2] of JDK. In case you already have an older version installed, remove the same before installing the new one. In the below example, I will be installing JDK version 1.8.0_65 by downloading the required rpm. - - [root@li1260-39 ~]# rpm -ivh jdk-8u65-linux-x64.rpm - Preparing... ################################# [100%] - Updating / installing... - 1:jdk1.8.0_65-2000:1.8.0_65-fcs ################################# [100%] - Unpacking JAR files... - tools.jar... - plugin.jar... - javaws.jar... - deploy.jar... - rt.jar... - jsse.jar... - charsets.jar... - localedata.jar... - jfxrt.jar... - -If Java path is not set properly, you will get error messages. Hence, set the correct path: - - export JAVA_HOME=/usr/java/jdk1.8.0_25/ - export PATH=$PATH:$JAVA_HOME - -Check if the correct version has been installed: - - [root@li1260-39 ~]# java -version - java version "1.8.0_65" - Java(TM) SE Runtime Environment (build 1.8.0_65-b17) - Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode) - -If you notice any error message of the sort "unable-to-run-mksdcard-sdk-tool:" while trying to install Android Studio, you might also have to install the following packages on CentOS 7 64-bit: - - glibc.i686 - - glibc-devel.i686 - - libstdc++.i686 - - zlib-devel.i686 - - ncurses-devel.i686 - - libX11-devel.i686 - - libXrender.i686 - - libXrandr.i686 - -Let us know install studio by downloading the ide file from [Android site][3] and unzipping the same. - - [root@li1260-39 tmp]# unzip android-studio-ide-141.2343393-linux.zip - -Move android-studio directory to /opt directory - - [root@li1260-39 tmp]# mv /tmp/android-studio/ /opt/ - -You can create a simlink to the studio executable to quickly start it whenever you need it. - - [root@li1260-39 tmp]# ln -s /opt/android-studio/bin/studio.sh /usr/local/bin/android-studio - -Now launch the studio from a terminal: - - [root@localhost ~]#studio - -The screens that follow for completing the installation are same as the ones shown above for Ubuntu. When the installation completes, you can start creating your own Android applications. - -### Conclusion ### - -Within a year of its release, Android Studio has taken over as the primary IDE for Android development by eclipsing Eclipse. It is the only official IDE tool that will support future Android SDKs and other Android features that will be provided by Google. So, what are you waiting for? Go install Android Studio and have fun developing Android apps. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/tools/install-android-studio-ubuntu-15-04-centos-7/ - -作者:[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://www.jetbrains.com/idea/ -[2]:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html -[3]:http://developer.android.com/sdk/index.html \ No newline at end of file diff --git a/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..11d2e9b5b4 --- /dev/null +++ b/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,139 @@ +如何在 Ubuntu 15.04 / CentOS 7 上安装 Android Studio +================================================================================ +随着最近几年智能手机的进步,安卓成为了最大的手机平台之一,也有很多免费的用于开发安卓应用的工具。Android Studio 是基于 [IntelliJ IDEA][1] 用于开发安卓应用的集成开发环境。它是 Google 2014 年发布的免费开源软件,继 Eclipse 之后成为主要的 IDE。 + +在这篇文章,我们一起来学习如何在 Ubuntu 15.04 和 CentOS 7 上安装 Android Studio。 + +### 在 Ubuntu 15.04 上安装 ### + +我们可以用两种方式安装 Android Studio。第一种是配置必须的库然后再安装它;另一种是从 Android 官方网站下载然后再本地编译安装。在下面的例子中,我们会使用命令行设置库并安装它。在继续下一步之前,我们需要确保我们已经安装了 JDK 1.6 或者更新版本。 + +这里,我打算安装 JDK 1.8。 + + $ sudo add-apt-repository ppa:webupd8team/java + + $ sudo apt-get update + + $ sudo apt-get install oracle-java8-installer oracle-java8-set-default + +验证 java 是否安装成功: + + poornima@poornima-Lenovo:~$ java -version + +现在,设置安装 Android Studio 需要的库 + + $ sudo apt-add-repository ppa:paolorotolo/android-studio + +![Android-Studio-repo](http://blog.linoxide.com/wp-content/uploads/2015/11/Android-studio-repo.png) + + $ sudo apt-get update + + $ sudo apt-get install android-studio + +上面的安装命令会在 /opt 目录下面安装 Android Studio。 + +现在,运行下面的命令启动安装窗口: + + $ /opt/android-studio/bin/studio.sh + +这会激活安装窗口。下面的截图展示了安装 Android Studio 的过程。 + +![安装 Android Studio](http://blog.linoxide.com/wp-content/uploads/2015/11/Studio-setup.png) + +![安装类型](http://blog.linoxide.com/wp-content/uploads/2015/11/Install-type.png) + +![设置模拟器](http://blog.linoxide.com/wp-content/uploads/2015/11/Emulator-settings.png) + +你点击了 Finish 按钮之后,就会显示同意协议页面。当你接受协议之后,它就开始下载需要的组件。 + +![下载组件](http://blog.linoxide.com/wp-content/uploads/2015/11/Download.png) + +这一步之后就完成了 Android Studio 的安装。当你重启 Android Studio 时,你会看到下面的欢迎界面,从这里你可以开始用 Android Studio 工作了。 + +![欢迎界面](http://blog.linoxide.com/wp-content/uploads/2015/11/Welcome-screen.png) + +### 在 CentOS 7 上安装 ### + +现在再让我们来看看如何在 CentOS 7 上安装 Android Studio。这里你同样需要安装 JDK 1.6 或者更新版本。如果你不是 root 用户,记得在命令前面使用 ‘sudo’。你可以下载[最新版本][2]的 JDK。如果你已经安装了一个比较旧的版本,在安装新的版本之前你需要先卸载旧版本。在下面的例子中,我会通过下载需要的 rpm 包安装 JDK 1.8.0_65。 + + [root@li1260-39 ~]# rpm -ivh jdk-8u65-linux-x64.rpm + Preparing... ################################# [100%] + Updating / installing... + 1:jdk1.8.0_65-2000:1.8.0_65-fcs ################################# [100%] + Unpacking JAR files... + tools.jar... + plugin.jar... + javaws.jar... + deploy.jar... + rt.jar... + jsse.jar... + charsets.jar... + localedata.jar... + jfxrt.jar... + +如果没有正确设置 Java 路径,你会看到错误信息。因此,设置正确的路径: + + export JAVA_HOME=/usr/java/jdk1.8.0_25/ + export PATH=$PATH:$JAVA_HOME + +检查是否安装了正确的版本: + + [root@li1260-39 ~]# java -version + java version "1.8.0_65" + Java(TM) SE Runtime Environment (build 1.8.0_65-b17) + Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode) + +如果你安装 Android Studio 的时候看到任何类似 “unable-to-run-mksdcard-sdk-tool:” 的错误信息,你可能要在 CentOS 7 64 位系统中安装以下软件包: + + glibc.i686 + + glibc-devel.i686 + + libstdc++.i686 + + zlib-devel.i686 + + ncurses-devel.i686 + + libX11-devel.i686 + + libXrender.i686 + + libXrandr.i686 + +通过从 [Android 网站][3] 下载 IDE 文件然后解压安装 studio 也是一样的。 + + [root@li1260-39 tmp]# unzip android-studio-ide-141.2343393-linux.zip + +移动 android-studio 目录到 /opt 目录 + + [root@li1260-39 tmp]# mv /tmp/android-studio/ /opt/ + +需要的话你可以创建一个到 studio 可执行文件的符号链接用于快速启动。 + + [root@li1260-39 tmp]# ln -s /opt/android-studio/bin/studio.sh /usr/local/bin/android-studio + +现在在终端中启动 studio: + + [root@localhost ~]#studio + +之后用于完成安装的截图和前面 Ubuntu 安装过程中的是一样的。安装完成后,你就可以开始开发你自己的 Android 应用了。 + +### 总结 ### + +虽然发布不到一年,但是 Android Studio 已经替代 Eclipse 成为了安装开发最主要的 IDE。它是唯一一个能支持之后 Google 提供的 Android SDKs 和其它 Android 特性的官方 IDE 工具。那么,你还在等什么呢?赶快安装 Android Studio 然后体验开发安装应用的乐趣吧。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-android-studio-ubuntu-15-04-centos-7/ + +作者:[B N Poornima][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/bnpoornima/ +[1]:https://www.jetbrains.com/idea/ +[2]:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html +[3]:http://developer.android.com/sdk/index.html \ No newline at end of file From aaba87b2f2cd603f6824089c5e5b42d538ac8cfe Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 6 Dec 2015 20:33:09 +0800 Subject: [PATCH 0497/1710] =?UTF-8?q?20151206-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20151206 Supporting secure DNS in glibc.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sources/tech/20151206 Supporting secure DNS in glibc.md diff --git a/sources/tech/20151206 Supporting secure DNS in glibc.md b/sources/tech/20151206 Supporting secure DNS in glibc.md new file mode 100644 index 0000000000..8933c3c891 --- /dev/null +++ b/sources/tech/20151206 Supporting secure DNS in glibc.md @@ -0,0 +1,46 @@ +Supporting secure DNS in glibc +======================== + +Credit: Jonathan Corbet + +One of the many weak links in Internet security is the domain name system (DNS); it is subject to attacks that, among other things, can mislead applications regarding the IP address of a system they wish to connect to. That, in turn, can cause connections to go to the wrong place, facilitating man-in-the-middle attacks and more. The DNSSEC protocol extensions are meant to address this threat by setting up a cryptographically secure chain of trust for DNS information. When DNSSEC is set up properly, applications should be able to trust the results of domain lookups. As the discussion over an attempt to better integrate DNSSEC into the GNU C Library shows, though, ensuring that DNS lookups are safe is still not a straightforward problem. + +In a sense, the problem was solved years ago; one can configure a local nameserver to perform full DNSSEC verification and use that server via glibc calls in applications. DNSSEC can even be used to increase security in other areas; it can, for example, carry SSH or TLS key fingerprints, allowing applications to verify that they are talking to the right server. Things get tricky, though, when one wants to be sure that DNS results claiming to have DNSSEC verification are actually what they claim to be — when one wants the security that DNSSEC is meant to provide, in other words. + +The /etc/resolv.conf problem + +Part of the problem, from the glibc perspective, is that glibc itself does not do DNSSEC verification. Instead, it consults /etc/resolv.conf and asks the servers found therein to do the lookup and verification; the results are then returned to the application. If the application is using the low-level res_query() interface, those results may include the "authenticated data" (AD) flag (if the nameserver has set it) indicating that DNSSEC verification has been successfully performed. But glibc knows nothing about the trustworthiness of the nameserver that has provided those results, so it cannot tell the application anything about whether they should really be trusted. + +One of the first steps suggested by glibc maintainer Carlos O'Donell is to add an option (dns-strip-dnssec-ad-bit) to the resolv.conf file telling glibc to unconditionally remove the AD bit. This option could be set by distributions to indicate that the DNS lookup results cannot be trusted at a DNSSEC level. Once things have been set up so that the results can be trusted, that option can be removed. In the meantime, though, applications would have a way to judge the DNS lookup results they get from glibc, something that does not exist now. + +What would a trustworthy setup look like? The standard picture looks something like this: there is a local nameserver, accessed via the loopback interface, as the only entry in /etc/resolv.conf. That nameserver would be configured to do verification and, in the case that verification fails, simply return no results at all. There would, in almost all cases, be no need to worry about whether applications see the AD bit or not; if the results are not trustworthy, applications will simply not see them at all. A number of distributions are moving toward this model, but the situation is still not as simple as some might think. + +One problem is that this scheme makes /etc/resolv.conf into a central point of trust for the system. But, in a typical Linux system, there are no end of DHCP clients, networking scripts, and more that will make changes to that file. As Paul Wouters pointed out, locking down this file in the short term is not really an option. Sometimes those changes are necessary: when a diskless system is booting, it may need name-resolution service before it is at a point where it can start up its own nameserver. A system's entire DNS environment may change depending on which network it is attached to. Systems in containers may be best configured to talk to a nameserver on the host. And so on. + +So there seems to be a general belief that /etc/resolv.conf cannot really be trusted on current systems. Ideas to add secondary configuration files (/etc/secure-resolv.conf or whatever) have been floated, but they don't much change the basic nature of the situation. Beyond that, some participants felt that even a local nameserver running on the loopback interface is not really trustworthy; Zack Weinberg suggested that administrators might intentionally short out DNSSEC validation, for example. + +Since the configuration cannot be trusted on current systems, the reasoning goes, glibc needs to have a way to indicate to applications when the situation has improved and things can be trusted. That could include the AD-stripping option described above (or, conversely, an explicit "this nameserver is trusted" option); that, of course, would require that the system be locked down to a level where surprising changes to /etc/resolv.conf no longer happen. A variant, as suggested by Petr Spacek, is to have a way for an application to ask glibc whether it is talking to a local nameserver or not. + +Do it in glibc? + +An alternative would be to dispense with the nameserver and have glibc do DNSSEC validation itself. There is, however, resistance to putting a big pile of cryptographic code into glibc itself. That would increase the size of the library and, it is felt, increase the attack surface of any application using it. A variant of this idea, suggested by Zack, would be to put the validation code into the name-service caching daemon (nscd) instead. Since nscd is part of glibc, it is under the control of the glibc developers and there could be a certain amount of confidence that DNSSEC validation is being performed properly. The location of the nscd socket is well known, so the /etc/resolv.confissues don't come into play. Carlos worried, though, that this approach might deter adoption by users who do not want the caching features of nscd; in his mind, that seems to rule out the nscd option. + +So, in the short term, at least, it seems unlikely that glibc will take on the full task of performing validated DNSSEC lookups. That means that, if security-conscious applications are going to use glibc for their name lookups, the library will have to provide an indication of how trustworthy the results received from a separate nameserver are. And that will almost certainly require explicit action on the part of the distributor and/or system administrator. As Simo Sorce put it: + +A situation in which glibc does not use an explicit configuration option to signal applications that it is using a trusted resolver is not useful ... no scratch that, it is actively harmful, because applications developers will quickly realize they cannot trust any information coming from glibc and will simply not use it for DNSSEC related information. + +Configuring a system to properly use DNSSEC involves change to many of the components of that system — it is a distribution-wide problem that will take time to solve fully. The role that glibc plays in this transition is likely to be relatively small, but it is an important one: glibc is probably the only place where applications can receive some assurance that their DNS results are trustworthy without implementing their own resolver code. Running multiple DNSSEC implementations on a system seems like an unlikely path to greater security, so it would be good to get this right. + +The glibc project has not yet chosen a path by which it intends to get things right, though some sort of annotation in /etc/resolv.conf looks like a likely outcome. Any such change would then have to get into a release; given the conservative nature of glibc development, it may already be late for the 2.23 release, which is likely to happen in February. So higher DNSSEC awareness in glibc may not happen right away, but there is at least some movement in that direction. + +--------------------------- + +via: https://lwn.net/Articles/663474/ + +作者:Jonathan Corbet + +译者:[译者ID](https://github.com/译者ID) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 15edcca1ec9037d32e2105e523839207b2b8675a Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 6 Dec 2015 20:46:13 +0800 Subject: [PATCH 0498/1710] =?UTF-8?q?20151206-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit net, ipv6, security --- ...anager and privacy in the IPv6 internet.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md diff --git a/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md new file mode 100644 index 0000000000..b485db2927 --- /dev/null +++ b/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md @@ -0,0 +1,54 @@ +NetworkManager and privacy in the IPv6 internet +====================== + +IPv6 is gaining momentum. With growing use of the protocol concerns about privacy that were not initially anticipated arise. The Internet community actively publishes solutions to them. What’s the current state and how does NetworkManager catch up? Let’s figure out! + +![](https://blogs.gnome.org/lkundrak/files/2015/12/cameras1.jpg) + +## The identity of a IPv6-connected host + +The IPv6 enabled nodes don’t need a central authority similar to IPv4 [DHCP](https://tools.ietf.org/html/rfc2132) servers to configure their addresses. They discover the networks they are in and [complete the addresses themselves](https://tools.ietf.org/html/rfc4862) by generating the host part. This makes the network configuration simpler and scales better to larger networks. However, there’s some drawbacks to this approach. Firstly, the node needs to ensure that its address doesn’t collide with an address of any other node on the network. Secondly, if the node uses the same host part of the address in every network it enters then its movement can be tracked and the privacy is at risk. + +Internet Engineering Task Force (IETF), the organization behind the Internet standards, [acknowledged this problem](https://tools.ietf.org/html/draft-iesg-serno-privacy-00) and recommends against use of hardware serial numbers to identify the node in the network. + +But what does the actual implementation look like? + +The problem of address uniqueness is addressed with [Duplicate Address Detection](https://tools.ietf.org/html/rfc4862#section-5.4) (DAD) mechanism. When a node creates an address for itself it first checks whether another node uses the same address using the [Neighbor Discovery Protocol](https://tools.ietf.org/html/rfc4861) (a mechanism not unlike IPv4 [ARP](https://tools.ietf.org/html/rfc826) protocol). When it discovers the address is already used, it must discard it. + +The other problem (privacy) is a bit harder to solve. An IP address (be it IPv4 or IPv6) address consists of a network part and the host part. The host discovers the relevant network parts and is supposed generate the host part. Traditionally it just uses an Interface Identifier derived from the network hardware’s (MAC) address. The MAC address is set at manufacturing time and can uniquely identify the machine. This guarantees the address is stable and unique. That’s a good thing for address collision avoidance but a bad thing for privacy. The host part remaining constant in different network means that the machine can be uniquely identified as it enters different networks. This seemed like non-issue at the time the protocol was designed, but the privacy concerns arose as the IPv6 gained popularity. Fortunately, there’s a solution to this problem. + +## Enter privacy extensions + +It’s no secret that the biggest problem with IPv4 is that the addresses are scarce. This is no longer true with IPv6 and in fact an IPv6-enabled host can use addresses quite liberally. There’s absolutely nothing wrong with having multiple IPv6 addresses attached to the same interface. On the contrary, it’s a pretty standard situation. At the very minimum each node has an address that is used for contacting nodes on the same hardware link called a link-local address.  When the network contains a router that connects it to other networks in the internet, a node has an address for every network it’s directly connected to. If a host has more addresses in the same network the node accepts incoming traffic for all of them. For the outgoing connections which, of course, reveal the address to the remote host, the kernel picks the fittest one. But which one is it? + +With privacy extensions enabled, as defined by [RFC4941](https://tools.ietf.org/html/rfc4941), a new address with a random host part is generated every now and then. The newest one is used for new outgoing connections while the older ones are deprecated when they’re unused. This is a nifty trick — the host does not reveal the stable address as it’s not used for outgoing connections, but still accepts connections to it from the hosts that are aware of it. + +There’s a downside to this. Certain applications tie the address to the user identity. Consider a web application that issues a HTTP Cookie for the user during the authentication but only accepts it for the connections that come from the address that conducted the authentications. As the kernel generates a new temporary address, the server would reject the requests that use it, effectively logging the user out. It could be argued that the address is not an appropriate mechanism for establishing user’s identity but that’s what some real-world applications do. + +## Privacy stable addressing to the rescue + +Another approach would be needed to cope with this. There’s a need for an address that is unique (of course), stable for a particular network but still changes when user enters another network so that tracking is not possible. The RFC7217 introduces a mechanism that provides exactly this. + +Creation of a privacy stable address relies on a pseudo-random key that’s only known the host itself and never revealed to other hosts in the network. This key is then hashed using a cryptographically secure algorithm along with values specific for a particular network connection. It includes an identifier of the network interface, the network prefix and possibly other values specific to the network such as the wireless SSID. The use of the secret key makes it impossible to predict the resulting address for the other hosts while the network-specific data causes it to be different when entering a different network. + +This also solves the duplicate address problem nicely. The random key makes collisions unlikely. If, in spite of this, a collision occurs then the hash can be salted with a DAD failure counter and a different address can be generated instead of failing the network connectivity. Now that’s clever. + +Using privacy stable address doesn’t interfere with the privacy extensions at all. You can use the [RFC7217](https://tools.ietf.org/html/rfc7217) stable address while still employing the RFC4941 temporary addresses at the same time. + +## Where does NetworkManager stand? + +We’ve already enabled the privacy extensions with the release NetworkManager 1.0.4. They’re turned on by default; you can control them with ipv6.ip6-privacy property. + +With the release of NetworkManager 1.2, we’re adding the stable privacy addressing. It’s supposed to address the situations where the privacy extensions don’t make the cut. The use of the feature is controlled with the ipv6.addr-gen-mode property. If it’s set to stable-privacy then stable privacy addressing is used. Setting it to “eui64” or not setting it at all preserves the traditional default behavior. + +Stay tuned for NetworkManager 1.2 release in early 2016! If you want to try the bleeding-edge snapshot, give Fedora Rawhide a try. It will eventually become Fedora 24. + +*I’d like to thank Hannes Frederic Sowa for a valuable feedback. The article would make less sense without his corrections. Hannes also created the in-kernel implementation of the RFC7217 mechanism which can be used when the networking is not managed by NetworkManager.* + +-------------------------------------------------------------------------------- + +via: https://blogs.gnome.org/lkundrak/2015/12/03/networkmanager-and-privacy-in-the-ipv6-internet/ +作者:[Lubomir Rintel] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b22800f39ca0498574ef1293a8b3734ca0d059d3 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Dec 2015 21:33:52 +0800 Subject: [PATCH 0499/1710] PUB:Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration @ictlyh --- ... (SMTP) using null-client Configuration.md | 75 ++++++++----------- 1 file changed, 33 insertions(+), 42 deletions(-) rename {translated/tech => published}/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md (55%) diff --git a/translated/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md b/published/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md similarity index 55% rename from translated/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md rename to published/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md index ccc67dbb30..59d6d9de0c 100644 --- a/translated/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md +++ b/published/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md @@ -1,25 +1,25 @@ -第九部分 - 如果使用零客户端配置 Postfix 邮件服务器(SMTP) +RHCE 系列(九):如何使用无客户端配置 Postfix 邮件服务器(SMTP) ================================================================================ -尽管现在有很多在线联系方式,邮件仍然是一个人传递信息给远在世界尽头或办公室里坐在我们旁边的另一个人的有效方式。 +尽管现在有很多在线联系方式,电子邮件仍然是一个人传递信息给远在世界尽头或办公室里坐在我们旁边的另一个人的有效方式。 -下面的图描述了邮件从发送者发出直到信息到达接收者收件箱的传递过程。 +下面的图描述了电子邮件从发送者发出直到信息到达接收者收件箱的传递过程。 -![邮件如何工作](http://www.tecmint.com/wp-content/uploads/2015/09/How-Mail-Setup-Works.png) +![电子邮件如何工作](http://www.tecmint.com/wp-content/uploads/2015/09/How-Mail-Setup-Works.png) -邮件如何工作 +*电子邮件如何工作* -要使这成为可能,背后发生了好多事情。为了使邮件信息从一个客户端应用程序(例如 [Thunderbird][1]、Outlook,或者网络邮件服务,例如 Gmail 或 Yahoo 邮件)到一个邮件服务器,并从其到目标服务器并最终到目标接收人,每个服务器上都必须有 SMTP(简单邮件传输协议)服务。 +要实现这一切,背后发生了好多事情。为了使电子邮件信息从一个客户端应用程序(例如 [Thunderbird][1]、Outlook,或者 web 邮件服务,例如 Gmail 或 Yahoo 邮件)投递到一个邮件服务器,并从其投递到目标服务器并最终到目标接收人,每个服务器上都必须有 SMTP(简单邮件传输协议)服务。 -这就是为什么我们要在这篇博文中介绍如何在 RHEL 7 中设置 SMTP 服务器,从中本地用户发送的邮件(甚至发送到本地用户)被转发到一个中央邮件服务器以便于访问。 +这就是为什么我们要在这篇博文中介绍如何在 RHEL 7 中设置 SMTP 服务器,从本地用户发送的邮件(甚至发送到另外一个本地用户)被转发(forward)到一个中央邮件服务器以便于访问。 -在实际需求中这称为零客户端安装。 +在这个考试的要求中这称为无客户端(null-client)安装。 -在我们的测试环境中将包括一个原始邮件服务器和一个中央服务器或中继主机。 +在我们的测试环境中将包括一个起源(originating)邮件服务器和一个中央服务器或中继主机(relayhost)。 - 原始邮件服务器: (主机名: box1.mydomain.com / IP: 192.168.0.18) - 中央邮件服务器: (主机名: mail.mydomain.com / IP: 192.168.0.20) +- 起源邮件服务器: (主机名: box1.mydomain.com / IP: 192.168.0.18) +- 中央邮件服务器: (主机名: mail.mydomain.com / IP: 192.168.0.20) -为了域名解析我们在两台机器中都会使用有名的 /etc/hosts 文件: +我们在两台机器中都会使用你熟知的 `/etc/hosts` 文件做名字解析: 192.168.0.18 box1.mydomain.com box1 192.168.0.20 mail.mydomain.com mail @@ -28,34 +28,29 @@ 首先,我们需要(在两台机器上): -**1. 安装 Postfix:** +**1、 安装 Postfix:** # yum update && yum install postfix -**2. 启动服务并启用开机自动启动:** +**2、 启动服务并启用开机自动启动:** # systemctl start postfix # systemctl enable postfix -**3. 允许邮件流量通过防火墙:** +**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** +**4、 在 box1.mydomain.com 配置 Postfix** -Postfix 的主要配置文件是 /etc/postfix/main.cf。这个文件本身是一个很大的文本,因为其中包含的注释解析了程序设置的目的。 +Postfix 的主要配置文件是 `/etc/postfix/main.cf`。这个文件本身是一个很大的文本文件,因为其中包含了解释程序设置的用途的注释。 -为了简洁,我们只显示了需要编辑的行(是的,在原始服务器中你需要保留 mydestination 为空;否则邮件会被保存到本地而不是我们实际想要的中央邮件服务器): - -**在 box1.mydomain.com 配置 Postfix** - ----------- +为了简洁,我们只显示了需要编辑的行(没错,在起源服务器中你需要保留 `mydestination` 为空;否则邮件会被存储到本地,而不是我们实际想要发往的中央邮件服务器): myhostname = box1.mydomain.com mydomain = mydomain.com @@ -64,11 +59,7 @@ Postfix 的主要配置文件是 /etc/postfix/main.cf。这个文件本身是一 mydestination = relayhost = 192.168.0.20 -**5. 在 mail.mydomain.com 配置 Postfix** - -** 在 mail.mydomain.com 配置 Postfix ** - ----------- +**5、 在 mail.mydomain.com 配置 Postfix** myhostname = mail.mydomain.com mydomain = mydomain.com @@ -83,23 +74,23 @@ Postfix 的主要配置文件是 /etc/postfix/main.cf。这个文件本身是一 ![设置 Postfix SELinux 权限](http://www.tecmint.com/wp-content/uploads/2015/09/Set-Postfix-SELinux-Permission.png) -设置 Postfix SELinux 权限 +*设置 Postfix SELinux 权限* -上面的 SELinux 布尔值会允许 Postfix 在中央服务器写入邮件池。 +上面的 SELinux 布尔值会允许中央服务器上的 Postfix 可以写入邮件池(mail spool)。 -**6. 在两台机子上重启服务以使更改生效:** +**6、 在两台机子上重启服务以使更改生效:** # systemctl restart postfix 如果 Postfix 没有正确启动,你可以使用下面的命令进行错误处理。 - # systemctl –l status postfix - # journalctl –xn - # postconf –n + # systemctl -l status postfix + # journalctl -xn + # postconf -n ### 测试 Postfix 邮件服务 ### -为了测试邮件服务器,你可以使用任何邮件用户代理(最常见的简称为 MUA)例如 [mail 或 mutt][2]。 +要测试邮件服务器,你可以使用任何邮件用户代理(Mail User Agent,常简称为 MUA),例如 [mail 或 mutt][2]。 由于我个人喜欢 mutt,我会在 box1 中使用它发送邮件给用户 tecmint,并把现有文件(mailbody.txt)作为信息内容: @@ -107,7 +98,7 @@ Postfix 的主要配置文件是 /etc/postfix/main.cf。这个文件本身是一 ![测试 Postfix 邮件服务器](http://www.tecmint.com/wp-content/uploads/2015/09/Test-Postfix-Mail-Server.png) -测试 Postfix 邮件服务器 +*测试 Postfix 邮件服务器* 现在到中央邮件服务器(mail.mydomain.com)以 tecmint 用户登录,并检查是否收到了邮件: @@ -116,15 +107,15 @@ Postfix 的主要配置文件是 /etc/postfix/main.cf。这个文件本身是一 ![检查 Postfix 邮件服务器发送](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Postfix-Mail-Server-Delivery.png) -检查 Postfix 邮件服务器发送 +*检查 Postfix 邮件服务器发送* -如果没有收到邮件,检查 root 用户的邮件池查看警告或者错误提示。你也需要使用 [nmap 命令][3]确保两台服务器运行了 SMTP 服务,并在中央邮件服务器中 打开了 25 号端口: +如果没有收到邮件,检查 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 邮件服务器错误处理 +*Postfix 邮件服务器错误处理* ### 总结 ### @@ -134,7 +125,7 @@ Postfix 邮件服务器错误处理 - [在 CentOS/RHEL 07 上配置仅缓存的 DNS 服务器][4] -最后,我强烈建议你熟悉 Postfix 的配置文件(main.cf)和这个程序的帮助手册。如果有任何疑问,别犹豫,使用下面的评论框或者我们的论坛 Linuxsay.com 告诉我们吧,你会从世界各地的 Linux 高手中获得几乎及时的帮助。 +最后,我强烈建议你熟悉 Postfix 的配置文件(main.cf)和这个程序的帮助手册。如果有任何疑问,别犹豫,使用下面的评论框或者我们的论坛 Linuxsay.com 告诉我们吧,你会从世界各地的 Linux 高手中获得几乎是及时的帮助。 -------------------------------------------------------------------------------- @@ -142,7 +133,7 @@ via: http://www.tecmint.com/setup-postfix-mail-server-smtp-using-null-client-on- 作者:[Gabriel Cánepa][a] 译者:[ictlyh](https//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 c3e723319f751627568fe9382a78b9e6412e30e5 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Dec 2015 22:24:03 +0800 Subject: [PATCH 0500/1710] PUB:Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7 @ictlyh --- ...e Protocol) Server' in RHEL or CentOS 7.md | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) rename {translated/tech => published}/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md (50%) diff --git a/translated/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md b/published/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md similarity index 50% rename from translated/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md rename to published/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md index 54c4330ae2..404ad003fd 100644 --- a/translated/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md +++ b/published/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md @@ -1,12 +1,13 @@ -第 10 部分:在 RHEL/CentOS 7 中设置 “NTP(网络时间协议) 服务器” +RHCE 系列(十):在 RHEL/CentOS 7 中设置 NTP(网络时间协议)服务器 ================================================================================ -网络时间协议 - NTP - 是运行在传输层 123 号端口允许计算机通过网络同步准确时间的协议。随着时间的流逝,计算机内部时间会出现漂移,这会导致时间不一致问题,尤其是对于服务器和客户端日志文件,或者你想要备份服务器资源或数据库。 + +网络时间协议 - NTP - 是运行在传输层 123 号端口的 UDP 协议,它允许计算机通过网络同步准确时间。随着时间的流逝,计算机内部时间会出现漂移,这会导致时间不一致问题,尤其是对于服务器和客户端日志文件,或者你想要复制服务器的资源或数据库。 ![在 CentOS 上安装 NTP 服务器](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Server-Install-in-CentOS.png) -在 CentOS 和 RHEL 7 上安装 NTP 服务器 +*在 CentOS 和 RHEL 7 上安装 NTP 服务器* -#### 要求: #### +#### 前置要求: #### - [CentOS 7 安装过程][1] - [RHEL 安装过程][2] @@ -17,62 +18,62 @@ - [在 CentOS/RHCE 7 上配置静态 IP][4] - [在 CentOS/RHEL 7 上停用并移除不需要的服务][5] -这篇指南会告诉你如何在 CentOS/RHCE 7 上安装和配置 NTP 服务器,并使用 NTP 公共时间服务器池列表中和你服务器地理位置最近的可用节点中同步时间。 +这篇指南会告诉你如何在 CentOS/RHCE 7 上安装和配置 NTP 服务器,并使用 NTP 公共时间服务器池(NTP Public Pool Time Servers)列表中和你服务器地理位置最近的可用节点中同步时间。 #### 步骤一:安装和配置 NTP 守护进程 #### -1. 官方 CentOS /RHEL 7 库默认提供 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 服务器 +*安装 NTP 服务器* -2. 安装完服务器之后,首先到官方 [NTP 公共时间服务器池][6],选择你服务器物理位置所在的洲,然后搜索你的国家位置,然后会出现 NTP 服务器列表。 +2、 安装完服务器之后,首先到官方 [NTP 公共时间服务器池(NTP Public Pool Time Servers)][6],选择你服务器物理位置所在的洲,然后搜索你的国家位置,然后会出现 NTP 服务器列表。 ![NTP 服务器池](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Pool-Server.png) -NTP 服务器池 +*NTP 服务器池* -3. 然后打开编辑 NTP 守护进程主要配置文件,从 pool.ntp.org 中注释掉默认的公共服务器列表并用类似下面截图提供给你国家的列表替换。 +3、 然后打开编辑 NTP 守护进程的主配置文件,注释掉来自 pool.ntp.org 项目的公共服务器默认列表,并用类似下面截图中提供给你所在国家的列表替换。(LCTT 译注:中国使用 0.cn.pool.ntp.org 等) ![在 CentOS 中配置 NTP 服务器](http://www.tecmint.com/wp-content/uploads/2014/09/Configure-NTP-Server.png) -配置 NTP 服务器 +*配置 NTP 服务器* -4. 下一步,你需要允许客户端从你的网络中和这台服务器同步时间。为了做到这点,添加下面一行到 NTP 配置文件,其中限制语句控制允许哪些网络查询和同步时间 - 根据需要替换网络 IP。 +4、 下一步,你需要允许来自你的网络的客户端和这台服务器同步时间。为了做到这点,添加下面一行到 NTP 配置文件,其中 **restrict** 语句控制允许哪些网络查询和同步时间 - 请根据需要替换网络 IP。 restrict 192.168.1.0 netmask 255.255.255.0 nomodify notrap nomodify notrap 语句意味着不允许你的客户端配置服务器或者作为同步时间的节点。 -5. 如果你需要额外的信息用于错误处理,以防你的 NTP 守护进程出现问题,添加一个 logfile 语句,用于记录所有 NTP 服务器问题到一个指定的日志文件。 +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 日志 +*启用 NTP 日志* -6. 你编辑完所有上面解释的配置并保存关闭 ntp.conf 文件后,你最终的配置看起来像下面的截图。 +6、 在你编辑完所有上面解释的配置并保存关闭 ntp.conf 文件后,你最终的配置看起来像下面的截图。 ![CentOS 中 NTP 服务器的配置](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Server-Configuration.png) -NTP 服务器配置 +*NTP 服务器配置* ### 步骤二:添加防火墙规则并启动 NTP 守护进程 ### -7. NTP 服务在传输层(第四层)使用 123 号 UDP 端口。它是针对限制可变延迟的影响特别设计的。要在 RHEL/CentOS 7 中开放这个端口,可以对 Firewalld 服务使用下面的命令。 +7、 NTP 服务使用 OSI 传输层(第四层)的 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 端口 +*在 Firewall 中开放 NTP 端口* -8. 你在防火墙中开放了 123 号端口之后,启动 NTP 服务器并确保系统范围内可用。用下面的命令管理服务。 +8、 你在防火墙中开放了 123 号端口之后,启动 NTP 服务器并确保系统范围内可用。用下面的命令管理服务。 # systemctl start ntpd # systemctl enable ntpd @@ -80,34 +81,34 @@ NTP 服务器配置 ![启动 NTP 服务](http://www.tecmint.com/wp-content/uploads/2014/09/Start-NTP-Service.png) -启动 NTP 服务 +*启动 NTP 服务* ### 步骤三:验证服务器时间同步 ### -9. 启动了 NTP 守护进程后,用几分钟等服务器和它的服务器池列表同步时间,然后运行下面的命令验证 NTP 节点同步状态和你的系统时间。 +9、 启动了 NTP 守护进程后,用几分钟等服务器和它的服务器池列表同步时间,然后运行下面的命令验证 NTP 节点同步状态和你的系统时间。 # ntpq -p # date -R ![验证 NTP 服务器时间](http://www.tecmint.com/wp-content/uploads/2014/09/Verify-NTP-Time-Sync.png) -验证 NTP 时间同步 +*验证 NTP 时间同步* -10. 如果你想查询或者和你选择的服务器池同步,你可以使用 ntpdate 命令,后面跟服务器名或服务器地址,类似下面建议的命令行事例。 +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 时间 +*同步 NTP 时间* ### 步骤四:设置 Windows NTP 客户端 ### -11. 如果你的 windows 机器不是域名控制器的一部分,你可以配置 Windows 和你的 NTP服务器同步时间。在任务栏右边 -> 时间 -> 更改日期和时间设置 -> 网络时间标签 -> 更改设置 -> 和一个网络时间服务器检查同步 -> 在 Server 空格输入服务器 IP 或 FQDN -> 马上更新 -> OK。 +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 同步 Windows 时间* 就是这些。在你的网络中配置一个本地 NTP 服务器能确保你所有的服务器和客户端有相同的时间设置,以防出现网络连接失败,并且它们彼此都相互同步。 @@ -117,7 +118,7 @@ via: http://www.tecmint.com/install-ntp-server-in-centos/ 作者:[Matei Cezar][a] 译者:[ictlyh](http://motouxiaogui.cn/blog) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8a9793e1a71b9557a1c67ed802e3a32929f77f4d Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 6 Dec 2015 22:30:20 +0800 Subject: [PATCH 0501/1710] Update 20151119 Going Beyond Hello World Containers is Hard Stuff.md --- ...nd Hello World Containers is Hard Stuff.md | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) 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 3a2fd08d6f..877e2e7d21 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,48 +1,67 @@ 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. +在[我的上一篇文章里][1], 我介绍了Linux 容器背后的技术的概念。我写了我知道的一切。容器对我来说也是比较新的概念。我写这篇文章的目的就是鼓励我真正的来学习这些东西。 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. +我打算在使用中学习。首先实践,然后上手并记录下我是怎么走过来的。我假设这里肯定有很多想"Hello World" 这种类型的知识帮助我快速的掌握基础。然后我能够更进一步,构建一个微服务容器或者其它东西。 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... +可能对某些人来说这很简单,因为他们会耗费大量的时间专注在操作工作上。但是对我来说实际上是很困难的,可以从我在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. +我设计的微服务在理论上很简单。以JPG 或者PNG 格式在HTTP 终端发布一张数字照片,然后获得一个100像素宽的缩略图。 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. +我决定使用NodeJS 作为我的开发语言,使用[ImageMagick][2] 来转换缩略图。 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. +我下载了[Docker Toolbox][3],用它安装了Docker 的快速启动终端。Docker 快速启动终端使得创建容器更简单了。终端会启动一个装好了Docker 的Linux 虚拟机,它允许你在一个终端里运行Docker 命令。 In my case, I am running on OS X. But there’s a Windows version too. +虽然在我的例子里,我的操作系统是Mac OS X。但是Windows 下也有相同的工具。 I am going to use Docker Quickstart Terminal to build a container image for my microservice and run a container from that image. +我准备使用Docker 快速启动终端里为我的微服务创建一个容器镜像,然后从这个镜像运行容器。 The Docker Quickstart Terminal runs in your regular terminal, like so: +Docker 快速启动终端就运行在你使用的普通终端里,就像这样: ![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. @@ -315,7 +334,7 @@ And don't miss part two... via: https://deis.com/blog/2015/beyond-hello-world-containers-hard-stuff 作者:[Bob Reselman][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 399cc987f299bef006a19a946662ce3446cecd4e Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 6 Dec 2015 22:47:27 +0800 Subject: [PATCH 0502/1710] Update 20151119 Going Beyond Hello World Containers is Hard Stuff.md --- ...nd Hello World Containers is Hard Stuff.md | 21 ++++++++++++++++++- 1 file changed, 20 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 877e2e7d21..35465b1dec 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 @@ -64,56 +64,75 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 ### 第一个小问题和第一个大问题### So I fiddled around with NodeJS and ImageMagick and I got the service to work on my local machine. +所以我用NodeJS 和ImageMagick 瞎搞了一通然后让我的服务在本地运行起来了。 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.) +然后我创建了Dockerfile,这是Docker 用来构建容器的配置脚本。(我会在后面深入介绍构建和Dockerfile) Here’s the build command I ran on the Docker Quickstart Terminal: +这是我运行Docker 快速启动终端的命令: $ 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! - +我估摸着过了15分钟:我忘记了在末尾参数输入一个点`.`。 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` 命令][4]来启动容器,名字叫`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. +参数`-p 3001:3000` 让NodeJS 微服务在Docker 内运行在端口3000,而在主机上则是3001。 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 快速启动中端里用命令`docker-machine` 运行的Docker 虚拟机的ip地址: $ 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. +这句话返回了默认虚拟机的IP地址,即运行docker 的虚拟机。对于我来说,这个ip 地址是192.168.99.100。 I browsed to http://192.168.99.100:3001/ and got the file upload page I built: +我浏览网页http://192.168.99.100:3001/ ,然后找到了我创建的上传图片的网页: ![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. +终端告诉我他无法找到我的微服务需要的`/upload` 目录。 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. From 77d4a03c74c582597145f0a2c4444630af7c33c1 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 7 Dec 2015 08:25:18 +0800 Subject: [PATCH 0503/1710] [translated]Why did you start using Linux --- .../20150820 Why did you start using Linux.md | 148 ------------------ .../20150820 Why did you start using Linux.md | 144 +++++++++++++++++ 2 files changed, 144 insertions(+), 148 deletions(-) delete mode 100644 sources/talk/20150820 Why did you start using Linux.md create mode 100644 translated/talk/20150820 Why did you start using Linux.md diff --git a/sources/talk/20150820 Why did you start using Linux.md b/sources/talk/20150820 Why did you start using Linux.md deleted file mode 100644 index 58b89e1f74..0000000000 --- a/sources/talk/20150820 Why did you start using Linux.md +++ /dev/null @@ -1,148 +0,0 @@ -[bazz2222] -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/ diff --git a/translated/talk/20150820 Why did you start using Linux.md b/translated/talk/20150820 Why did you start using Linux.md new file mode 100644 index 0000000000..aa48db697c --- /dev/null +++ b/translated/talk/20150820 Why did you start using Linux.md @@ -0,0 +1,144 @@ +年轻人,你为啥使用 linux +================================================================================ +> 今天的开源综述:是什么带你进入 linux 的世界?号外:IBM 基于 Linux 的大型机。以及,你应该抛弃 win10 选择 Linux 的原因。 + +### 当初你为何使用 Linux? ### + +Linux 越来越流行,很多 OS X 或 Windows 用户都转移到 Linux 阵营了。但是你知道是什么让他们开始使用 Linux 的吗?一个 Reddit 用户在网站上问了这个问题,并且得到了很多有趣的回答。 + +一个名为 SilverKnight 的用户在 Reddit 的 Linux 板块上问了如下问题: + +> 我知道这个问题肯定被问过了,但我还是想听听年轻一代使用 Linux 的原因,以及是什么让他们坚定地成为 Linux 用户。 +> +> 我无意阻止大家讲出你们那些精彩的 Linux 故事,但是我还是对那些没有经历过什么精彩故事的新人的想法比较感兴趣。 +> +> 我27岁,半吊子 Linux 用户,这些年装过不少发行版,但没有投入全部精力去玩 Linux。我正在找更多的、能让我全身心投入到 Linux 潮流的理由,或者说激励。 +> +> [详见 Reddit][1] + +以下是网站上的回复: + +> **DoublePlusGood**:我12岁开始使用 Backtrack(现在改名为 Kali),因为我想成为一名黑客(LCTT 译注:原文1337 haxor,1337 是 leet 的火星文写法,意为'火星文',haxor 为 hackor 的火星文写法,意为'黑客',另一种写法是 1377 h4x0r,满满的火星文文化)。我现在一直使用 ArchLinux,因为它给我无限自由,让我对我的电脑可以为所欲为。 +> +> **Zack**:我记得是12、3岁的时候使用 Linux,现在15岁了。 +> +> 我11岁的时候就对 Windows XP 感到不耐烦,一个简单的功能,比如关机,TMD 都要让我耐心等着它慢慢完成。 +> +> 在那之前几个月,我在 freenode IRC 聊天室参与讨论了一个游戏,它是一个开源项目,大多数用户使用 Linux。 +> +> 我不断听到 Linux 但当时对它还没有兴趣。然而由于这些聊天频道(大部分在 freenode 上)谈论了很多编程话题,我就开始学习 python 了。 +> +> 一年后我尝试着安装 GNU/Linux (主要是 ubuntu)到我的新电脑(其实不新,但它是作为我的生日礼物被我得到的)。不幸的是它总是不能正常工作,原因未知,也许硬盘坏了,也许灰尘太多了。 +> +> 那时我放弃自己解决这个问题,然后缠着老爸给我的电脑装上 Ubuntu,他也无能为力,原因同上。 +> +> 在追求 Linux 一段时间后,我打算抛弃 Windows,使用 Linux Mint 代替 Ubuntu,本来没抱什么希望,但 Linux Mint 竟然能跑起来! +> +> 于是这个系统我用了6个月。 +> +> 那段时间我的一个朋友给了我一台虚拟机,跑 Ubuntu 的,我用了一年,直到我爸给了我一台服务器。 +> +> 6个月后我得到一台新 PC(现在还在用)。于是起想折腾点不一样的东西。 +> +> 我打算装 openSUSE。 +> +> 我很喜欢这个系统。然后在圣诞节的时候我得到树莓派,上面只能跑 Debian,还不能支持其它发行版。 +> +> **Cqz**:我9岁的时候有一次玩 Windows 98,结果这货当机了,原因未知。我没有 Windows 安装盘,但我爸的一本介绍编程的杂志上有一张随书附赠的光盘,这张光盘上刚好有 Mandrake Linux 的安装软件,于是我瞬间就成为了 Linux 用户。我当时还不知道自己在玩什么,但是玩得很嗨皮。这些年我虽然在电脑上装了多种 Windows 版本,但是 FLOSS 世界才是我的家。现在我只把 Windows 装在虚拟机上,用来玩游戏。 +> +> **Tosmarcel**:15岁那年对'编程'这个概念很好奇,然后我开始了哈佛课程'CS50',这个课程要我们安装 Linux 虚拟机用来执行一些命令。当时我问自己为什么 Windows 没有这些命令?于是我 Google 了 Linux,搜索结果出现了 Ubuntu,在安装 Ubuntu。的时候不小心把 Windows 分区给删了。。。当时对 Linux 毫无所知,适应这个系统非常困难。我现在16岁,用 ArchLinux,不想用回 Windows,我爱 ArchLinux。 +> +> **Micioonthet**:第一次听说 Linux 是在我5年级的时候,当时去我一朋友家,他的笔记本装的就是 MEPIS(Debian的一个比较老的衍生版),而不是 XP。 +> +> 原来是他爸爸是个美国的社会学家,而他全家都不信任微软。我对这些东西完全陌生,这系统完全没有我熟悉的软件,我很疑惑他怎么能使用。 +> +> 我13岁那年还没有自己的笔记本电脑,而我另一位朋友总是抱怨他的电脑有多慢,所以我打算把它买下来并修好它。我花了20美元买下了这台装着 Windows Vista 系统、跑满病毒、完全无法使用的惠普笔记本。我不想重装讨厌的 Windows 系统,记得 Linux 是免费的,所以我刻了一张 Ubuntu 14.04 光盘,马上把它装起来,然后我被它的高性能给震精了。 +> +> 我的世界(由于它允运行在 JAVA 上,所以当时它是 Linux 下为数不多的几个游戏之一)在 Vista 上只能跑5帧每秒,而在 Ubuntu 上能跑到25帧。 +> +> 我到现在还会偶尔使用一下那台笔记本,Linux 可不会在乎你的硬件设备有多老。 +> +> 之后我把我爸也拉入 Linux 行列,我们会以很低的价格买老电脑,装上 Linux Mint 或其他轻量级发行版,这省了好多钱。 +> +> **Webtm**:我爹每台电脑都会装多个发行版,有几台是 opensuse 和 Debian,他的个人电脑装的是 Slackware。所以我记得很小的时候一直在玩 debian,但没有投入很多精力,我用了几年的 Windows,然后我爹问我有没有兴趣试试 debian。这是个有趣的经历,在那之后我一直使用 debian。而现在我不用 Linux,转投 freeBSD,5个月了,用得很开心。 +> +> 完全控制自己的系统是个很奇妙的体验。开源届有好多酷酷的软件,我认为在自己解决一些问题并且利用这些工具解决其他事情的过程是最有趣的。当然稳定和高效也是吸引我的地方。更不用说它的保密级别了。 +> +> **Wyronaut**:我今年18,第一次玩 Linux 是13岁,当时玩的 Ubuntu,为啥要碰 Linux?因为我想搭一个'我的世界'的服务器来和小伙伴玩游戏,当时'我的世界'可是个新鲜玩意儿。而搭个私服需要用 Linux 系统。 +> +> 当时我还是个新手,对着 Linux 的命令行有些傻眼,因为很多东西都要我自己处理。还是多亏了 Google 和维基,我成功地在多台老 PC 上部署了一些简单的服务器,那些早已无人问津的老古董机器又能发挥余热了。 +> +> 跑过游戏服务器后,我又开始跑 web 服务器,先是跑了几年 HTML,CSS 和 PHP,之后受 TheNewBoston 视频的误导转到了 JAVA。 +> +> 一周后放弃 JAVA 改用 Python,当时学习 Python 用的书名叫《Learn Python The Hard Way》,作者是 Zed A. Shaw。我花了两周学完 Python,然后开始看《C++ Primer》,因为我想做游戏开发。看到一半(大概500页)的时候我放弃了。那个时候我有点讨厌玩电脑了。 +> +> 这样中断了一段时间之后,我决定学习 JavaScript,读了2本书,试了4个平台,然后又不玩了。 +> +> 现在到了不得不找一所学校并决定毕业后找什么样工作的糟糕时刻。我不想玩图形界面编程,所以我不会进游戏行业。我也不喜欢画画和建模。然后我发现了一个涉及网络安全的专业,于是我立刻爱上它了。我挑了很多 C 语言的书来度过这个假期,并且复习了一下数学来迎接新的校园生活。 +> +> 目前我玩 archlinux,不同 PC 上跑着不同任务,它们运行很稳定。 +> +> 可以说 Linux 带我进入编程的世界,而反过来,我最终在学校要学的就是 Linux。我估计会终生感谢 Linux。 +> +> **Linuxllc**:你们可以学学像我这样的老头。 +> +> 扔掉 Windows!扔掉 Windows!扔掉 Windows!给自己一个坚持使用 Linux 的理由,那就是完全,彻底,远离,Windows。 +> +> 我在 2003 年放弃 Windows,只用了5天就把所有电脑跑成 Linux,包括所有的外围设备(LCTT 译注:比如打印机?)。我不玩 Windows 里的游戏,只玩 Linux 里的。 +> +> **Highclass**:我28岁,不知道还是不是你要找的年轻人类型。 +> +> 老实说我对电脑挺感兴趣的,当我还没接触'自由软件哲学'的时候,我认为 free 是免费的意思。我也不认为命令行界面很让人难以接受,因为我小时候就接触过 DOS 系统。 +> +> 我第一个发行版是 Mandrake,在我11岁还是12岁那年我把家里的电脑弄得乱七八糟,然后我一直折腾那台电脑,试着让我技的技能提升一个台阶。现在我在一家公司全职使用 Linux。(请允许我耸个肩)。 +> +> **Matto**:我的电脑是旧货市场淘回来的,装 XP,跑得慢,于是我想换个系统。Google 了一下,发现 Ubuntu。当年我15、6岁,现在23了,就职的公司内部使用 Linux。 +> +> [更多评论移步 Reddit][2] + +### IBM 的 Linux 大型机 ### + +IBM 很久前就用 Linux 了。现在这家公司退推出一款机器专门使用 Ubuntu,机器名叫 LinuxOne。 + +Ron Miller 在 TecchCrunch 博客上说: + +> 新的大型机包括两款机型,都是以企鹅名称命名的(Linux 的吉祥物就是一只企鹅,懂18摸的命名用意了没?)第一款叫帝企鹅,使用 IBM z13 机型,我们早在1月份就介绍过了。另一款稍微小一点,名叫跳岩企鹅,供入门级买家使用。 +> +> 也许你会以为大型机就像恐龙一样早就灭绝了,但世界上许多大型机构中都还在使用它们,它们还健在。作为发展云技术战略的一部分,数据分析与安全有望于提升 Ubuntu 大型机的市场,这种大型机能提供一系列开源的企业级软件,比如 Apache Spark,Node.js,MongoDB,MariaDB,PostgreSQL 和 Chef。 +> +> 大型机还会存在于客户预置的数据中心中,但是市场的大小取决于会有多少客户使用这种类似于云服务的系统。Mauri 解释道,IBM 正在寻求增加大型机销量的途径,与 Canonical 公司合作,鼓励使用开源工具,都能为大型机打开一个小的,却能赚钱的市场。 +> +> +> [详情移步 TechCrunch][3] + +### 你为什么要放弃 Windows10 而选择 Linux ### + +自从 Windows10 出来以后,各种媒体都报道过它的隐藏间谍功能。ZDNet 列出了一些放弃 Windows10 的理由。 + +SJVN 在 ZDNet 的报告: + +> 你试试关掉 Windows10 的数据分享功能,坏消息来了:window10 会继续把你的数据分享给微软公司。请选择 Linux 吧。 +> +> 你可以有很多方法不让 Windows10 泄露你的秘密,但你不能阻止它交谈。Cortana,win10 小娜,语音助手,就算你把她关了,她也会把数据发给微软公司。这些数据包括你的电脑 ID,微软用它来识别你的 PC 机。 +> +> 所以如果这些泄密给你带来了烦恼,你可以使用老版本 Windows7,或者换到 Linux。然而,当 Windows7 不再提供技术支持的那天到来,如果你还想保留隐私,最终你还是只能选择 Linux。 +> +> 这里还有些小众的桌面系统能保护你的隐私,比如 BSD 家族的 FreeBSD,PCBSD,NetBSD,eComStation,OS/2。但是,最好的选择还是 Linux,它提供最低的学习曲线。 +> +> [详情移步 ZDNet][4] + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2972587/linux/why-did-you-start-using-linux.html + +作者:[Jim Lynch][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者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/ From 059bec5f522ef8bf54b3627cfc8aa2ee36aa87d7 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 7 Dec 2015 08:39:23 +0800 Subject: [PATCH 0504/1710] [translating]Linus Torvalds Lambasts Open Source Programmers over Insecure Code --- ...alds Lambasts Open Source Programmers over Insecure Code.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 1e37549646..d4cf419adb 100644 --- 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 @@ -1,3 +1,4 @@ +[bazz2222222] 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) @@ -32,4 +33,4 @@ via: http://thevarguy.com/open-source-application-software-companies/110415/linu [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 +[2]:https://en.wikipedia.org/wiki/Tanenbaum%E2%80%93Torvalds_debate From 4d115bcbfcd153497f8fc8f2786b88d88d3fbf35 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 7 Dec 2015 09:34:11 +0800 Subject: [PATCH 0505/1710] [translated]Linus Torvalds Lambasts Open Source Programmers over Insecure Code --- ...n Source Programmers over Insecure Code.md | 36 ------------------- 1 file changed, 36 deletions(-) delete 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 deleted file mode 100644 index d4cf419adb..0000000000 --- a/sources/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md +++ /dev/null @@ -1,36 +0,0 @@ -[bazz2222222] -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 From 25533429487afcdb714bf86d4852f793a3211fd2 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 7 Dec 2015 10:23:34 +0800 Subject: [PATCH 0506/1710] Translating by ZTinoZ --- .../20151123 7 ways hackers can use Wi-Fi against you.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md index 58f4ff00c3..49b8df80a9 100644 --- a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -46,9 +46,9 @@ If you want to ensure that your own network is well protected, upgrade the firmw ### 不保护你的家用Wi-Fi ### -Needless to say, it is important to set up a password that is not too easy to guess, and change your connection’s default name. You can also filter your MAC address so your router will recognize only certain devices. +不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的MAC地址来让你的路由器只承认那些确认过的设备。 -**Josh Althuser** is an open software advocate, Web architect and tech entrepreneur. Over the past 12 years, he has spent most of his time advocating for open-source software and managing teams and projects, as well as providing enterprise-level consultancy for Web applications and helping bring their products to the market. You may connect with him on [Twitter][6]. +**Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们走向市场。你可以联系[他的推特][6]. -------------------------------------------------------------------------------- From ed2c16631bb5e14c63e7df9634680b8217e64bdf Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 7 Dec 2015 10:24:45 +0800 Subject: [PATCH 0507/1710] Update 20151119 Going Beyond Hello World Containers is Hard Stuff.md --- ...nd Hello World Containers is Hard Stuff.md | 53 ++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) 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 35465b1dec..0ffda13bf0 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,8 +1,7 @@ -translating by ezio - Going Beyond Hello World Containers is Hard Stuff - +要超越Hello World 容器是件困难的事情 ================================================================================ + 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. 在[我的上一篇文章里][1], 我介绍了Linux 容器背后的技术的概念。我写了我知道的一切。容器对我来说也是比较新的概念。我写这篇文章的目的就是鼓励我真正的来学习这些东西。 @@ -135,18 +134,23 @@ Then, a brain spark flew. Somewhere along the line remembered reading a microser 然后灵光一闪。某人记起来微服务不应该自己做任何数据持久化的工作!保存数据应该是另一个服务的工作。 So what if the container can’t find the `/upload` directory? The real issue is: my microservice has a fundamentally flawed design. +所以容器找不到目录`/upload` 的原因到底是什么?这个问题的根本就是我的微服务在基础设计上就有问题。 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: +这是我用NodeJS 写的在内存工作、生成缩略图的代码: // Bind to the packages var express = require('express'); @@ -209,20 +213,26 @@ Here’s the NodeJS I wrote to do all the in-memory work for creating a thumbnai 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... +但是,在我测试把这个微服务当作一个普通的Node 应用运行在本地时... ![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. +我从缩略图工程的根目录开始构建。构建命令使用了根目录下的Dockerfile。它是这样工作的:把Dockerfile 放到你想构建镜像的地方,然后系统就默认使用这个Dockerfile。 Here is the text of the Dockerfile I was using: +下面是我使用的Dockerfile 的内容: FROM ubuntu:latest MAINTAINER bob@CogArtTech.com @@ -243,54 +253,70 @@ Here is the text of the Dockerfile I was using: CMD npm start What could go wrong? +这怎么可能出错呢? -### The Second Big Problem ### +### 第二个大问题 ### I ran the `build` command and I got this error: +我运行了`build` 命令,然后出了这个错: 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: +然后我从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? +我搜索了我能想到的所有的错误原因。差不多4个小时后,我想:为什么不重启一下机器呢? 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]: +我使用[`rm` 命令][5]删除了虚拟机里所有的容器。 $ docker rm -f $(docker ps -a -q) The `-f` flag here force removes running images. +`-f` 在这里的用处是强制删除运行中的镜像。 Then I removed all of my Docker images, using [the `rmi` command][6]: +然后删除了全部Docker 镜像,用的是[命令`rmi`][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. +这太打击我了:构建脚本好像需要有人从键盘输入Y! 但是,这是一个非交互的Dockerfile 脚本啊。这里并没有键盘。 I went back to the Dockerfile, and there it was: +回到Dockerfile,脚本元来时这样的: RUN apt-get update RUN apt-get install -y nodejs nodejs-legacy npm @@ -298,8 +324,10 @@ I went back to the Dockerfile, and there it was: 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. +第二个`apt-get` 忘记了`-y` 标志,这才是错误的根本原因。 I added the missing `-y` to the command: +我在这条命令后面添加了`-y` : RUN apt-get update RUN apt-get install -y nodejs nodejs-legacy npm @@ -307,43 +335,56 @@ I added the missing `-y` to the command: 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: +获取了虚拟机的IP 地址: $ docker-machine ip default Went to my browser and entered http://192.168.99.100:3001/ into the address bar. +在我的浏览器里面输入 http://192.168.99.100:3001/ : 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! +但是你想知道一些其它的事情吗?这篇文章是我在凌晨2点完成的,而每一个折磨的小时都值得了。为什么?因为这段时间你将自己全身心投入了喜欢的工作里。这件事很难,对于所有人来说都不是很容易就获得结果的。但是不要忘记:你在学习技术,运行世界的技术。 P.S. Check out this two part video of Hello World containers, check out [Raziel Tabib’s][7] excellent work in this video... +P.S. 了解一下Hello World 容器的两段视频,这里会有 [Raziel Tabib’s][7] 的精彩工作内容。 注:youtube视频 And don't miss part two... +千万被忘记第二部分... 注:youtube视频 From c09ccf9b7e1612ebf3d01d139bbe6f427822c3a4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 7 Dec 2015 10:28:09 +0800 Subject: [PATCH 0508/1710] Update 20151119 Going Beyond Hello World Containers is Hard Stuff.md clean --- ...nd Hello World Containers is Hard Stuff.md | 78 +------------------ 1 file changed, 2 insertions(+), 76 deletions(-) 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 0ffda13bf0..22ecb24715 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 @@ -2,27 +2,18 @@ Going Beyond Hello World Containers is Hard Stuff 要超越Hello World 容器是件困难的事情 ================================================================================ -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. 在[我的上一篇文章里][1], 我介绍了Linux 容器背后的技术的概念。我写了我知道的一切。容器对我来说也是比较新的概念。我写这篇文章的目的就是鼓励我真正的来学习这些东西。 -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. 我打算在使用中学习。首先实践,然后上手并记录下我是怎么走过来的。我假设这里肯定有很多想"Hello World" 这种类型的知识帮助我快速的掌握基础。然后我能够更进一步,构建一个微服务容器或者其它东西。 -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... 可能对某些人来说这很简单,因为他们会耗费大量的时间专注在操作工作上。但是对我来说实际上是很困难的,可以从我在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. 如果你曾经发现或者从来都没有发现自己处在这种境地:像我这样的人在这里解决一些你不需要解决的问题。 让我们开始吧。 @@ -30,126 +21,95 @@ Let’s begin. ### 一个缩略图微服务 ### -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. 我设计的微服务在理论上很简单。以JPG 或者PNG 格式在HTTP 终端发布一张数字照片,然后获得一个100像素宽的缩略图。 -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. 我决定使用NodeJS 作为我的开发语言,使用[ImageMagick][2] 来转换缩略图。 -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. 我下载了[Docker Toolbox][3],用它安装了Docker 的快速启动终端。Docker 快速启动终端使得创建容器更简单了。终端会启动一个装好了Docker 的Linux 虚拟机,它允许你在一个终端里运行Docker 命令。 -In my case, I am running on OS X. But there’s a Windows version too. 虽然在我的例子里,我的操作系统是Mac OS X。但是Windows 下也有相同的工具。 -I am going to use Docker Quickstart Terminal to build a container image for my microservice and run a container from that image. 我准备使用Docker 快速启动终端里为我的微服务创建一个容器镜像,然后从这个镜像运行容器。 -The Docker Quickstart Terminal runs in your regular terminal, like so: Docker 快速启动终端就运行在你使用的普通终端里,就像这样: ![container-diagram-2](https://deis.com/images/blog-images/containers-hard-2.png) ### 第一个小问题和第一个大问题### -So I fiddled around with NodeJS and ImageMagick and I got the service to work on my local machine. 所以我用NodeJS 和ImageMagick 瞎搞了一通然后让我的服务在本地运行起来了。 -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.) 然后我创建了Dockerfile,这是Docker 用来构建容器的配置脚本。(我会在后面深入介绍构建和Dockerfile) -Here’s the build command I ran on the Docker Quickstart Terminal: 这是我运行Docker 快速启动终端的命令: $ 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! 我估摸着过了15分钟:我忘记了在末尾参数输入一个点`.`。 -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` 命令][4]来启动容器,名字叫`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. 参数`-p 3001:3000` 让NodeJS 微服务在Docker 内运行在端口3000,而在主机上则是3001。 -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 快速启动中端里用命令`docker-machine` 运行的Docker 虚拟机的ip地址: $ 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. 这句话返回了默认虚拟机的IP地址,即运行docker 的虚拟机。对于我来说,这个ip 地址是192.168.99.100。 -I browsed to http://192.168.99.100:3001/ and got the file upload page I built: 我浏览网页http://192.168.99.100:3001/ ,然后找到了我创建的上传图片的网页: ![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. 终端告诉我他无法找到我的微服务需要的`/upload` 目录。 -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. 所以容器找不到目录`/upload` 的原因到底是什么?这个问题的根本就是我的微服务在基础设计上就有问题。 -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: 这是我用NodeJS 写的在内存工作、生成缩略图的代码: // Bind to the packages @@ -212,26 +172,20 @@ Here’s the NodeJS I wrote to do all the in-memory work for creating a thumbnai 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... 但是,在我测试把这个微服务当作一个普通的Node 应用运行在本地时... ![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. 我从缩略图工程的根目录开始构建。构建命令使用了根目录下的Dockerfile。它是这样工作的:把Dockerfile 放到你想构建镜像的地方,然后系统就默认使用这个Dockerfile。 -Here is the text of the Dockerfile I was using: 下面是我使用的Dockerfile 的内容: FROM ubuntu:latest @@ -252,70 +206,54 @@ Here is the text of the Dockerfile I was using: CMD npm start -What could go wrong? 这怎么可能出错呢? ### 第二个大问题 ### -I ran the `build` command and I got this error: 我运行了`build` 命令,然后出了这个错: 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: 然后我从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? 我搜索了我能想到的所有的错误原因。差不多4个小时后,我想:为什么不重启一下机器呢? -I did. And guess what? The error went away! 重启了,你猜猜结果?错误消失了!(译注:万能的重启) -Go figure. 继续。 ### 将精灵关进瓶子 ### -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]: 我使用[`rm` 命令][5]删除了虚拟机里所有的容器。 $ docker rm -f $(docker ps -a -q) -The `-f` flag here force removes running images. `-f` 在这里的用处是强制删除运行中的镜像。 -Then I removed all of my Docker images, using [the `rmi` command][6]: 然后删除了全部Docker 镜像,用的是[命令`rmi`][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. 这太打击我了:构建脚本好像需要有人从键盘输入Y! 但是,这是一个非交互的Dockerfile 脚本啊。这里并没有键盘。 -I went back to the Dockerfile, and there it was: 回到Dockerfile,脚本元来时这样的: RUN apt-get update @@ -334,15 +272,12 @@ I added the missing `-y` to the command: 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 @@ -352,38 +287,29 @@ 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. 在我的浏览器里面输入 http://192.168.99.100:3001/ : -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! 在容器里面工作了,我的第一次啊! ### 这意味着什么? ### -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! 但是你想知道一些其它的事情吗?这篇文章是我在凌晨2点完成的,而每一个折磨的小时都值得了。为什么?因为这段时间你将自己全身心投入了喜欢的工作里。这件事很难,对于所有人来说都不是很容易就获得结果的。但是不要忘记:你在学习技术,运行世界的技术。 -P.S. Check out this two part video of Hello World containers, check out [Raziel Tabib’s][7] excellent work in this video... P.S. 了解一下Hello World 容器的两段视频,这里会有 [Raziel Tabib’s][7] 的精彩工作内容。 注:youtube视频 -And don't miss part two... 千万被忘记第二部分... 注:youtube视频 From a6347bccf646b5d4e66823d14f95d61b6daebc5d Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 7 Dec 2015 10:29:04 +0800 Subject: [PATCH 0509/1710] Update 20151119 Going Beyond Hello World Containers is Hard Stuff.md --- ...20151119 Going Beyond Hello World Containers is Hard Stuff.md | 1 - 1 file changed, 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 22ecb24715..c42b278787 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,4 +1,3 @@ -Going Beyond Hello World Containers is Hard Stuff 要超越Hello World 容器是件困难的事情 ================================================================================ From 45cc9ab4726f1e392c7f376db8ef99d125e7ac7e Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 7 Dec 2015 10:34:32 +0800 Subject: [PATCH 0510/1710] =?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 --- .../20151119 Going Beyond Hello World Containers is Hard Stuff.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md (100%) diff --git a/sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md b/translated/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md similarity index 100% rename from sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md rename to translated/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md From 543453a7c57c2aa51c0c54f85002e32facece5e6 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Tue, 8 Dec 2015 08:58:26 +0800 Subject: [PATCH 0511/1710] [translating]Learn with Linux--Physics Simulation --- .../Learn with Linux--Physics Simulation.md | 7 ++-- ...n Source Programmers over Insecure Code.md | 35 +++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 translated/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md 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 index 2a8415dda7..7c210ff0c8 100644 --- a/sources/tech/Learn with Linux/Learn with Linux--Physics Simulation.md +++ b/sources/tech/Learn with Linux/Learn with Linux--Physics Simulation.md @@ -1,8 +1,9 @@ -Learn with Linux: Physics Simulation +[bazz222222] +Linux 学习系列之物理模拟 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/physics-fetured.jpg) -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] @@ -104,4 +105,4 @@ via: https://www.maketecheasier.com/linux-physics-simulation/ [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 +[10]:http://www.physion.net/ diff --git a/translated/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md b/translated/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md new file mode 100644 index 0000000000..e927a02b8c --- /dev/null +++ b/translated/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md @@ -0,0 +1,35 @@ +开源开发者提交不安全代码,遭 Linus 炮轰 +================================================================================ +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/linus-torvalds.jpg) + +Linus 最近(LCTT 译注:其实是11月份,没有及时翻译出来,看官轻喷Orz)骂了一个 Linux 开发者,原因是他向 kernel 提交了一份不安全的代码。 + +Linus 是个 Linux 内核项目非官方的“仁慈的独裁者(LCTT译注:英国《卫报》曾将乔布斯评价为‘仁慈的独裁者’)”,这意味着他有权决定将哪些代码合入内核,哪些代码直接丢掉。 + +在10月28号,一个开源开发者提交的代码未能符合 Torvalds 的要求,于是遭来了[一顿臭骂][1]。Torvalds 在他提交的代码下评论道:“你提交的是什么东西。” + +接着他说这个开发者是“毫无能力的神经病”。 + +Torvalds 为什么会这么生气?他觉得那段代码可以写得更有效率一点,可读性更强一点,编译器编译后跑得更好一点(编译器的作用就是将让人看的代码翻译成让电脑看的代码)。 + +Torvalds 重新写了一版代码将原来的那份替换掉,并建议所有开发者应该像他那种风格来写代码。 + +Torvalds 一直在嘲讽那些不符合他观点的人。早在1991年他就攻击过[Andrew Tanenbaum][2]——那个 Minix 操作系统的作者,而那个 Minix 操作系统被 Torvalds 描述为“脑残”。 + +但是 Torvalds 在这次嘲讽中表现得更有战略性了:“我想让*每个人*都知道,像他这种代码是完全不能被接收的。”他说他的目的是提醒每个 Linux 开发者,而不是针对那个开发者。 + +Torvalds 也用这个机会强调了烂代码的安全问题。现在的企业对安全问题很重视,所以安全问题需要在开源开发者心中得到足够重视,甚至需要在代码中表现为最高等级(LCTT 译注:操作系统必须权衡许多因素:安全、处理速度、灵活性、易用性等,而这里 Torvalds 将安全提升为最高优先级了)。骂一下那些提交不安全代码的开发者可以帮助提高 Linux 系统的安全性。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/110415/linus-torvalds-lambasts-open-source-programmers-over-inse + +作者:[Christopher Tozzi][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者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 From 080925b76ce69573a1bc5b746a7ee18272120b71 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 8 Dec 2015 09:58:55 +0800 Subject: [PATCH 0512/1710] translating by ezio kernel,datastructure --- sources/tech/20151122 Doubly linked list in the Linux Kernel.md | 2 ++ 1 file changed, 2 insertions(+) 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 index e6b5c97a77..4d6ff02ab8 100644 --- a/sources/tech/20151122 Doubly linked list in the Linux Kernel.md +++ b/sources/tech/20151122 Doubly linked list in the Linux Kernel.md @@ -1,3 +1,5 @@ +translating by Ezio + Data Structures in the Linux Kernel ================================================================================ From 5102620ae4d2163a2dd09ed163b4fb69d5802eb5 Mon Sep 17 00:00:00 2001 From: ezio Date: Tue, 8 Dec 2015 10:24:21 +0800 Subject: [PATCH 0513/1710] update --- .../20151122 Doubly linked list in the Linux Kernel.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 index 4d6ff02ab8..96a515fe93 100644 --- a/sources/tech/20151122 Doubly linked list in the Linux Kernel.md +++ b/sources/tech/20151122 Doubly linked list in the Linux Kernel.md @@ -3,12 +3,14 @@ translating by Ezio 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) +Linux 内核自己实现了双向链表,可以在[include/linux/list.h](https://github.com/torvalds/linux/blob/master/include/linux/list.h)找到定义。我们将会从双向链表数据结构开始`内核的数据结构`。为什么?因为它在内核里使用的很广泛,你只需要在[free-electrons.com](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): +首先让我们看一下在[include/linux/types.h](https://github.com/torvalds/linux/blob/master/include/linux/types.h) 里的主结构体: ```C struct list_head { @@ -17,6 +19,7 @@ struct list_head { ``` 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 : +你可能注意到这和你以前见过的双向链表的实现方法是不同的。举个例子来说,在[glib](http://www.gnu.org/software/libc/) 库里是这样实现的: ```C struct GList { @@ -27,8 +30,10 @@ struct GList { ``` 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 { From 7910711afb7a4a672f75032775dbcebb03c2c9e1 Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Tue, 8 Dec 2015 10:55:21 +0800 Subject: [PATCH 0514/1710] Translated --- ...everse Proxy for Apache on FreeBSD 10.2.md | 327 ++++++++++++++++++ 1 file changed, 327 insertions(+) create mode 100644 translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md diff --git a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md new file mode 100644 index 0000000000..db809e167a --- /dev/null +++ b/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md @@ -0,0 +1,327 @@ +Translated by KnightJoker +如何在FreeBSD 10.2上安装Nginx作为Apache的反向代理 +================================================================================ +Nginx是一款免费的,开源的HTTP和反向代理服务器, 以及一个代理POP3/IMAP的邮件服务器. Nginx是一款高性能的web服务器,其特点是丰富的功能,简单的结构以及低内存的占用. 第一个版本由 Igor Sysoev在2002年发布,然而到现在为止很多大的科技公司都在使用,包括 Netflix, Github, Cloudflare, WordPress.com等等 + +在这篇教程里我们会 "**在freebsd 10.2系统上,安装和配置Nginx网络服务器作为Apache的反向代理**". Apache 会用PHP在8080端口上运行,并且我们需要在80端口配置Nginx的运行,用来接收用户/访问者的请求.如果网页的用户请求来自于浏览器的80端口, 那么Nginx会用Apache网络服务器和PHP来通过这个请求,并运行在8080端口. + +#### 前提条件 #### + +- FreeBSD 10.2. +- Root 权限. + +### 步骤 1 - 更新系统 ### + +使用SSH证书登录到你的FreeBSD服务器以及使用下面命令来更新你的系统 : + + freebsd-update fetch + freebsd-update install + +### 步骤 2 - 安装 Apache ### + +Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器.在FreeBSD里Apache是未被默认安装的, 但是我们可以直接从端口下载,或者解压包在"/usr/ports/www/apache24" 目录下,再或者直接从PKG命令的FreeBSD系统信息库安装。在本教程中,我们将使用PKG命令从FreeBSD的库中安装: + + pkg install apache24 + +### 步骤 3 - 安装 PHP ### + +一旦成功安装Apache, 接着将会安装PHP并由一个用户处理一个PHP的文件请求. 我们将会用到如下的PKG命令来安装PHP : + + pkg install php56 mod_php56 php56-mysql php56-mysqli + +### 步骤 4 - 配置 Apache 和 PHP ### + +一旦所有都安装好了, 我们将会配置Apache在8080端口上运行, 并让PHP与Apache一同工作. 为了配置Apache,我们可以编辑 "httpd.conf"这个配置文件, 然而PHP我们只需要复制PHP的配置文件 php.ini 在 "/usr/local/etc/"目录下. + +进入到 "/usr/local/etc/" 目录 并且复制 php.ini-production 文件到 php.ini : + + cd /usr/local/etc/ + cp php.ini-production php.ini + +下一步, 在Apache目录下通过编辑 "httpd.conf"文件来配置Apache : + + cd /usr/local/etc/apache24 + nano -c httpd.conf + +端口配置在第 **52**行 : + + Listen 8080 + +服务器名称配置在第 **219** 行: + + ServerName 127.0.0.1:8080 + +在第 **277**行,如果目录需要,添加的DirectoryIndex文件,Apache将直接作用于它 : + + DirectoryIndex index.php index.html + +在第 **287**行下,配置Apache通过添加脚本来支持PHP : + + + SetHandler application/x-httpd-php + + + SetHandler application/x-httpd-php-source + + +保存然后退出. + +现在用sysrc命令,来添加Apache作为开机启动项目 : + + sysrc apache24_enable=yes + +然后用下面的命令测试Apache的配置 : + + apachectl configtest + +如果到这里都没有问题的话,那么就启动Apache吧 : + + service apache24 start + +如果全部完毕, 在"/usr/local/www/apache24/data" 目录下,创建一个phpinfo文件是验证PHP在Apache下完美运行的好方法 : + + cd /usr/local/www/apache24/data + echo "" > info.php + +现在就可以访问 freebsd 的服务器 IP : 192.168.1.123:8080/info.php. + +![Apache and PHP on Port 8080](http://blog.linoxide.com/wp-content/uploads/2015/11/Apache-and-PHP-on-Port-8080.png) + +Apache 是使用 PHP 在 8080端口下运行的. + +### 步骤 5 - 安装 Nginx ### + +Nginx 以低内存的占用作为一款高性能的web服务器以及反向代理服务器.在这个步骤里,我们将会使用Nginx作为Apache的反向代理, 因此让我们用pkg命令来安装它吧 : + + pkg install nginx + +### 步骤 6 - 配置 Nginx ### + +一旦 Nginx 安装完毕, 在 "**nginx.conf**" 文件里,我们需要做一个新的配置文件来替换掉原来的nginx文件. 更改到 "/usr/local/etc/nginx/"目录下 并且默认备份到 nginx.conf 文件: + + cd /usr/local/etc/nginx/ + mv nginx.conf nginx.conf.oroginal + +现在就可以创建一个新的 nginx 配置文件了 : + + nano -c nginx.conf + +然后粘贴下面的配置: + + user www; + worker_processes 1; + error_log /var/log/nginx/error.log; + + events { + worker_connections 1024; + } + + http { + include 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; + + sendfile on; + keepalive_timeout 65; + + # Nginx cache configuration + proxy_cache_path /var/nginx/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m; + proxy_temp_path /var/nginx/cache/tmp; + proxy_cache_key "$scheme$host$request_uri"; + + gzip on; + + server { + #listen 80; + server_name _; + + location /nginx_status { + + stub_status on; + access_log off; + } + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/local/www/nginx-dist; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:8080 + # + location ~ \.php$ { + proxy_pass http://127.0.0.1:8080; + include /usr/local/etc/nginx/proxy.conf; + } + } + + include /usr/local/etc/nginx/vhost/*; + + } + +保存退出. + +下一步, 在nginx目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 : + + cd /usr/local/etc/nginx/ + nano -c proxy.conf + +粘贴如下配置 : + + proxy_buffering on; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + client_max_body_size 10m; + client_body_buffer_size 128k; + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + proxy_buffers 100 8k; + add_header X-Cache $upstream_cache_status; + +保存退出. + +最后一步, 为 nginx 的高速缓存创建一个 "/var/nginx/cache"的新目录 : + + mkdir -p /var/nginx/cache + +### 步骤 7 - 配置 Nginx 的虚拟主机 ### + +在这个步骤里面,我们需要创建一个新的虚拟主机域 "saitama.me", 以跟文件 "/usr/local/www/saitama.me" 和日志文件一同放在 "/var/log/nginx" 目录下. + +我们必须做的第一件事情就是创建新的目录来存放虚拟主机文件, 在这里我们将用到一个"**vhost**"的新文件. 并创建它 : + + cd /usr/local/etc/nginx/ + mkdir vhost + +创建好vhost 目录, 那么我们就进入这个目录并创建一个新的虚拟主机文件. 这里我取名为 "**saitama.conf**" : + + cd vhost/ + nano -c saitama.conf + +粘贴如下虚拟主机的配置 : + + server { + # Replace with your freebsd IP + listen 192.168.1.123:80; + + # Document Root + root /usr/local/www/saitama.me; + index index.php index.html index.htm; + + # Domain + server_name www.saitama.me saitama.me; + + # Error and Access log file + error_log /var/log/nginx/saitama-error.log; + access_log /var/log/nginx/saitama-access.log main; + + # Reverse Proxy Configuration + location ~ \.php$ { + proxy_pass http://127.0.0.1:8080; + include /usr/local/etc/nginx/proxy.conf; + + # Cache configuration + proxy_cache my-cache; + proxy_cache_valid 10s; + proxy_no_cache $cookie_PHPSESSID; + proxy_cache_bypass $cookie_PHPSESSID; + proxy_cache_key "$scheme$host$request_uri"; + + } + + # Disable Cache for the file type html, json + location ~* .(?:manifest|appcache|html?|xml|json)$ { + expires -1; + } + + # Enable Cache the file 30 days + location ~* .(jpg|png|gif|jpeg|css|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ { + proxy_cache_valid 200 120m; + expires 30d; + proxy_cache my-cache; + access_log off; + } + + } + +保存退出. + +下一步, 为nginx和虚拟主机创建一个新的日志目录 "/var/log/" : + + mkdir -p /var/log/nginx/ + +如果一切顺利, 在文件的根目录下创建文件 saitama.me : + + cd /usr/local/www/ + mkdir saitama.me + +### 步骤 8 - 测试 ### + +在这个步骤里面,我们只是测试我们的nginx和虚拟主机的配置. + +用如下命令测试nginx的配置 : + + nginx -t + +如果一切都没有问题, 用 sysrc 命令添加nginx为启动项,并且启动nginx和重启apache: + + sysrc nginx_enable=yes + service nginx start + service apache24 restart + +一切完毕后, 在 saitama.me 目录下,添加一个新的phpinfo文件来验证php的正常运行 : + + cd /usr/local/www/saitama.me + echo "" > info.php + +然后便访问这个文档 : **www.saitama.me/info.php**. + +![Virtualhost Configured saitamame](http://blog.linoxide.com/wp-content/uploads/2015/11/Virtualhost-Configured-saitamame.png) + +Nginx 作为Apache的反向代理正在运行了,PHP也同样在进行工作了. + +这是另一种结果 : + +Test .html 文件无缓存. + + curl -I www.saitama.me + +![html with no-cache](http://blog.linoxide.com/wp-content/uploads/2015/11/html-with-no-cache.png) + +Test .css 文件只有三十天的缓存. + + curl -I www.saitama.me/test.css + +![css file 30day cache](http://blog.linoxide.com/wp-content/uploads/2015/11/css-file-30day-cache.png) + +Test .php 文件正常缓存 : + + curl -I www.saitama.me/info.php + +![PHP file cached](http://blog.linoxide.com/wp-content/uploads/2015/11/PHP-file-cached.png) + +全部完成. + +### 总结 ### + +Nginx 是最广泛的 HTTP 和反向代理的服务器. 拥有丰富的高性能和低内存/RAM的使用功能. Nginx使用了太多的缓存, 我们可以在网络上缓存静态文件使得网页加速, 并且在用户需要的时候再缓存php文件. 这样Nginx 的轻松配置和使用,可以让它用作HTTP服务器 或者 apache的反向代理. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-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 3af952e1421eed5c21cc64985682fcd15b066868 Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Tue, 8 Dec 2015 11:28:42 +0800 Subject: [PATCH 0515/1710] Delete --- ...everse Proxy for Apache on FreeBSD 10.2.md | 327 ------------------ 1 file changed, 327 deletions(-) delete mode 100644 sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md diff --git a/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md deleted file mode 100644 index b3638a61ea..0000000000 --- a/sources/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md +++ /dev/null @@ -1,327 +0,0 @@ -Translating by KnightJoker -How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2 -================================================================================ -Nginx is free and open source HTTP server and reverse proxy, as well as an mail proxy server for IMAP/POP3. Nginx is high performance web server with rich of features, simple configuration and low memory usage. Originally written by Igor Sysoev on 2002, and until now has been used by a big technology company including Netflix, Github, Cloudflare, WordPress.com etc. - -In this tutorial we will "**install and configure nginx web server as reverse proxy for apache on freebsd 10.2**". Apache will run with php on port 8080, and then we need to configure nginx run on port 80 to receive a request from user/visitor. If user request for web page from the browser on port 80, then nginx will pass the request to apache webserver and PHP that running on port 8080. - -#### Prerequisite #### - -- FreeBSD 10.2. -- Root privileges. - -### Step 1 - Update the System ### - -Log in to your freebsd server with ssh credential and update system with command below : - - freebsd-update fetch - freebsd-update install - -### Step 2 - Install Apache ### - -pache is open source HTTP server and the most widely used web server. Apache is not installed by default on freebsd, but we can install it from the ports or package on "/usr/ports/www/apache24" or install it from freebsd repository with pkg command. In this tutorial we will use pkg command to install from the freebsd repository : - - pkg install apache24 - -### Step 3 - Install PHP ### - -Once apache is installed, followed with installing php for handling a PHP file request by a user. We will install php with pkg command as below : - - pkg install php56 mod_php56 php56-mysql php56-mysqli - -### Step 4 - Configure Apache and PHP ### - -Once all is installed, we will configure apache to run on port 8080, and php working with apache. To configure apache, we can edit the configuration file "httpd.conf", and for PHP we just need to copy the php configuration file php.ini on "/usr/local/etc/" directory. - -Go to "/usr/local/etc/" directory and copy php.ini-production file to php.ini : - - cd /usr/local/etc/ - cp php.ini-production php.ini - -Next, configure apache by editing file "httpd.conf" on apache directory : - - cd /usr/local/etc/apache24 - nano -c httpd.conf - -Port configuration on line **52** : - - Listen 8080 - -ServerName configuration on line **219** : - - ServerName 127.0.0.1:8080 - -Add DirectoryIndex file that apache will serve it if a directory requested on line **277** : - - DirectoryIndex index.php index.html - -Configure apache to work with php by adding script below under line **287** : - - - SetHandler application/x-httpd-php - - - SetHandler application/x-httpd-php-source - - -Save and exit. - -Now add apache to start at boot time with sysrc command : - - sysrc apache24_enable=yes - -And test apache configuration with command below : - - apachectl configtest - -If there is no error, start apache : - - service apache24 start - -If all is done, verify that php is running well with apache by creating phpinfo file on "/usr/local/www/apache24/data" directory : - - cd /usr/local/www/apache24/data - echo "" > info.php - -Now visit the freebsd server IP : 192.168.1.123:8080/info.php. - -![Apache and PHP on Port 8080](http://blog.linoxide.com/wp-content/uploads/2015/11/Apache-and-PHP-on-Port-8080.png) - -Apache is working with php on port 8080. - -### Step 5 - Install Nginx ### - -Nginx high performance web server and reverse proxy with low memory consumption. In this step we will use nginx as reverse proxy for apache, so let's install it with pkg command : - - pkg install nginx - -### Step 6 - Configure Nginx ### - -Once nginx is installed, we must configure it by replacing nginx file "**nginx.conf**" with new configuration below. Change the directory to "/usr/local/etc/nginx/" and backup default nginx.conf : - - cd /usr/local/etc/nginx/ - mv nginx.conf nginx.conf.oroginal - -Now create new nginx configuration file : - - nano -c nginx.conf - -and paste configuration below : - - user www; - worker_processes 1; - error_log /var/log/nginx/error.log; - - events { - worker_connections 1024; - } - - http { - include 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; - - sendfile on; - keepalive_timeout 65; - - # Nginx cache configuration - proxy_cache_path /var/nginx/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m; - proxy_temp_path /var/nginx/cache/tmp; - proxy_cache_key "$scheme$host$request_uri"; - - gzip on; - - server { - #listen 80; - server_name _; - - location /nginx_status { - - stub_status on; - access_log off; - } - - # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/local/www/nginx-dist; - } - - # proxy the PHP scripts to Apache listening on 127.0.0.1:8080 - # - location ~ \.php$ { - proxy_pass http://127.0.0.1:8080; - include /usr/local/etc/nginx/proxy.conf; - } - } - - include /usr/local/etc/nginx/vhost/*; - - } - -Save and exit. - -Next, create new file called **proxy.conf** for reverse proxy configuration on nginx directory : - - cd /usr/local/etc/nginx/ - nano -c proxy.conf - -Paste configuration below : - - proxy_buffering on; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - client_max_body_size 10m; - client_body_buffer_size 128k; - proxy_connect_timeout 90; - proxy_send_timeout 90; - proxy_read_timeout 90; - proxy_buffers 100 8k; - add_header X-Cache $upstream_cache_status; - -Save and exit. - -And the last, create new directory for nginx cache on "/var/nginx/cache" : - - mkdir -p /var/nginx/cache - -### Step 7 - Configure Nginx VirtualHost ### - -In this step we will create new virtualhost for domain "saitama.me", with document root on "/usr/local/www/saitama.me" and the log file on "/var/log/nginx" directory. - -First thing we must do is creating new directory to store the virtualhost file, we here use new directory called "**vhost**". Let's create it : - - cd /usr/local/etc/nginx/ - mkdir vhost - -vhost directory has been created, now go to the directory and create new file virtualhost. I'me here will create new file "**saitama.conf**" : - - cd vhost/ - nano -c saitama.conf - -Paste virtualhost configuration below : - - server { - # Replace with your freebsd IP - listen 192.168.1.123:80; - - # Document Root - root /usr/local/www/saitama.me; - index index.php index.html index.htm; - - # Domain - server_name www.saitama.me saitama.me; - - # Error and Access log file - error_log /var/log/nginx/saitama-error.log; - access_log /var/log/nginx/saitama-access.log main; - - # Reverse Proxy Configuration - location ~ \.php$ { - proxy_pass http://127.0.0.1:8080; - include /usr/local/etc/nginx/proxy.conf; - - # Cache configuration - proxy_cache my-cache; - proxy_cache_valid 10s; - proxy_no_cache $cookie_PHPSESSID; - proxy_cache_bypass $cookie_PHPSESSID; - proxy_cache_key "$scheme$host$request_uri"; - - } - - # Disable Cache for the file type html, json - location ~* .(?:manifest|appcache|html?|xml|json)$ { - expires -1; - } - - # Enable Cache the file 30 days - location ~* .(jpg|png|gif|jpeg|css|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ { - proxy_cache_valid 200 120m; - expires 30d; - proxy_cache my-cache; - access_log off; - } - - } - -Save and exit. - -Next, create new log directory for nginx and virtualhost on "/var/log/" : - - mkdir -p /var/log/nginx/ - -If all is done, let's create a directory for document root for saitama.me : - - cd /usr/local/www/ - mkdir saitama.me - -### Step 8 - Testing ### - -This step is just test our nginx configuration and test the nginx virtualhost. - -Test nginx configuration with command below : - - nginx -t - -If there is no problem, add nginx to boot time with sysrc command, and then start it and restart apache: - - sysrc nginx_enable=yes - service nginx start - service apache24 restart - -All is done, now verify the the php is working by adding new file phpinfo on saitama.me directory : - - cd /usr/local/www/saitama.me - echo "" > info.php - -Visit the domain : **www.saitama.me/info.php**. - -![Virtualhost Configured saitamame](http://blog.linoxide.com/wp-content/uploads/2015/11/Virtualhost-Configured-saitamame.png) - -Nginx as reverse proxy for apache is working, and php is working too. - -And this is another results : - -Test .html file with no-cache. - - curl -I www.saitama.me - -![html with no-cache](http://blog.linoxide.com/wp-content/uploads/2015/11/html-with-no-cache.png) - -Test .css file with 30day cache. - - curl -I www.saitama.me/test.css - -![css file 30day cache](http://blog.linoxide.com/wp-content/uploads/2015/11/css-file-30day-cache.png) - -Test .php file with cache : - - curl -I www.saitama.me/info.php - -![PHP file cached](http://blog.linoxide.com/wp-content/uploads/2015/11/PHP-file-cached.png) - -All is done. - -### Conclusion ### - -Nginx is most popular HTTP server and reverse proxy. Has a rich of features with high performance and low memory/RAM usage. Nginx use too for caching, we can cache a static file on the web to make the web fast load, and cache for php file if a user request for it. Nginx is easy to configure and use, use for HTTP server or act as reverse proxy for apache. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-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 c41d237423576784f044f902026e9add3ffd3b4d Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Tue, 8 Dec 2015 12:47:50 +0800 Subject: [PATCH 0516/1710] Translated --- ...stall Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md index db809e167a..83877c8488 100644 --- a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md +++ b/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md @@ -1,4 +1,4 @@ -Translated by KnightJoker + 如何在FreeBSD 10.2上安装Nginx作为Apache的反向代理 ================================================================================ Nginx是一款免费的,开源的HTTP和反向代理服务器, 以及一个代理POP3/IMAP的邮件服务器. Nginx是一款高性能的web服务器,其特点是丰富的功能,简单的结构以及低内存的占用. 第一个版本由 Igor Sysoev在2002年发布,然而到现在为止很多大的科技公司都在使用,包括 Netflix, Github, Cloudflare, WordPress.com等等 @@ -319,7 +319,7 @@ Nginx 是最广泛的 HTTP 和反向代理的服务器. 拥有丰富的高性能 via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-freebsd-10-2/ 作者:[Arul][a] -译者:[译者ID](https://github.com/译者ID) +译者:[KnightJoker](https://github.com/KnightJoker) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a57d25a3319edae86ebffa508d553aa4f5c823bc Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 8 Dec 2015 14:15:34 +0800 Subject: [PATCH 0517/1710] Translating sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md --- ...ign Multiple IP Addresses To One Interface On Ubuntu 15.10.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md index a045ab953f..65da864ec4 100644 --- a/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md +++ b/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md @@ -1,3 +1,4 @@ +ictlyh Translating Assign Multiple IP Addresses To One Interface On Ubuntu 15.10 ================================================================================ Some times you might want to use more than one IP address for your network interface card. What will you do in such cases? Buy an extra network card and assign new IP? No, It’s not necessary(at least in the small networks). We can now assign multiple IP addresses to one interface on Ubuntu systems. Curious to know how? Well, Follow me, It is not that difficult. From c3b322ab3d517a829c8c7121fa9f0c8b693991a3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 8 Dec 2015 14:19:01 +0800 Subject: [PATCH 0518/1710] =?UTF-8?q?20151208-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ift Programming Language Comes To Linux.md | 41 +++++++++++++ ...208 Install Wetty on Centos or RHEL 6.X.md | 61 +++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 sources/news/20151208 Apple Swift Programming Language Comes To Linux.md create mode 100644 sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md diff --git a/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md b/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md new file mode 100644 index 0000000000..1c13c09dba --- /dev/null +++ b/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md @@ -0,0 +1,41 @@ +Apple Swift Programming Language Comes To Linux +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2015/12/Apple-Swift-Open-Source.jpg) + +Apple and Open Source toogether? Yes! Apple’s Swift programming language is now open source. This should not come as surprise because [Apple had already announced it six months back][1]. + +Apple announced the launch of open source Swift community came this week. A [new website][2] dedicated to the open source Swift community has been put in place with the following message: + +> We are excited by this new chapter in the story of Swift. After Apple unveiled the Swift programming language, it quickly became one of the fastest growing languages in history. Swift makes it easy to write software that is incredibly fast and safe by design. Now that Swift is open source, you can help make the best general purpose programming language available everywhere. + +[swift.org][2] will work as the one stop shop providing downloads for various platforms, community guidelines, news, getting started tutorials, instructions for contribution to open source Swift, documentation and other guidelines. If you are looking forward to learn Swift, this website must be bookmarked. + +In this announcement, a new package manager for easy sharing and building code has been made available as well. + +Most important of all for Linux users, the source code is now available at [Github][3]. You can check it out from the link below: + +- [Apple Swift Source Code][3] + +In addition to that, there are prebuilt binaries for Ubuntu 14.04 and 15.10. + +- [Swift binaries for Ubuntu][4] + +Don’t rush to use them because these are development branches and will not be suitable for production machine. So avoid it for now. Once stable version of Swift for Linux is released, I hope that Ubuntu will include it in [umake][5] on the line of [Visual Studio][6]. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/swift-open-source-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/apple-open-sources-swift-programming-language-linux/ +[2]:https://swift.org/ +[3]:https://github.com/apple +[4]:https://swift.org/download/#latest-development-snapshots +[5]:https://wiki.ubuntu.com/ubuntu-make +[6]:http://itsfoss.com/install-visual-studio-code-ubuntu/ \ No newline at end of file diff --git a/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md b/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md new file mode 100644 index 0000000000..6856b1d71e --- /dev/null +++ b/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md @@ -0,0 +1,61 @@ +Install Wetty on Centos/RHEL 6.X +================================================================================ +![](http://www.unixmen.com/wp-content/uploads/2015/11/Terminal.png) + +What is Wetty? + +As a system administrator, you probably connect to remote servers using a program such as GNOME Terminal (or the like) if you’re on a Linux desktop, or a SSH client such as Putty if you have a Windows machine, while you perform other tasks like browsing the web or checking your email. + +### Step 1: Install epel repo ### + + # wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm + # rpm -ivh epel-release-6-8.noarch.rpm + +### Step 2: Install dependencies ### + + # yum install epel-release git nodejs npm -y + +### Step 3: After installing these dependencies, clone the GitHub repository ### + + # git clone https://github.com/krishnasrinivas/wetty + +### Step 4: Run Wetty ### + + # cd wetty + # npm install + +### Step 5: Starting Wetty and Access Linux Terminal from Web Browser ### + + # node app.js -p 8080 + +### Step 6: Wetty through HTTPS ### + + # openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes (complete this) + +### Step 7: launch Wetty via HTTPS ### + + # nohup node app.js --sslkey key.pem --sslcert cert.pem -p 8080 & + +### Step 8: Add an user for wetty ### + + # useradd + # Passwd + +### Step 9: Access wetty ### + + http://Your_IP-Address:8080 + give the credential have created before for wetty and access + +Enjoy + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-wetty-centosrhel-6-x/ + +作者:[Debojyoti 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.unixmen.com/author/debjyoti/ \ No newline at end of file From 68304a43951075eacc7df867cf5ae4790bdd725e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 8 Dec 2015 15:16:50 +0800 Subject: [PATCH 0519/1710] =?UTF-8?q?20151208-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ze Time and Date Format in Ubuntu Panel.md | 65 +++++ ...lla with Apache and SSL on FreeBSD 10.2.md | 267 ++++++++++++++++++ 2 files changed, 332 insertions(+) create mode 100644 sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md create mode 100644 sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md diff --git a/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md b/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md new file mode 100644 index 0000000000..a9e72c626b --- /dev/null +++ b/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md @@ -0,0 +1,65 @@ +How to Customize Time & Date Format in Ubuntu Panel +================================================================================ +![Time & Date format](http://ubuntuhandbook.org/wp-content/uploads/2015/08/ubuntu_tips1.png) + +This quick tutorial is going to show you how to customize your Time & Date indicator in Ubuntu panel, though there are already a few options available in the settings page. + +![custom-timedate](http://ubuntuhandbook.org/wp-content/uploads/2015/12/custom-timedate.jpg) + +To get started, search for and install **dconf Editor** in Ubuntu Software Center. Then launch the software and follow below steps: + +**1.** When dconf Editor launches, navigate to **com -> canonical -> indicator -> datetime**. Set the value of **time-format** to **custom**. + +![custom time format](http://ubuntuhandbook.org/wp-content/uploads/2015/12/time-format.jpg) + +You can also do this via a command in terminal: + + gsettings set com.canonical.indicator.datetime time-format 'custom' + +**2.** Now you can customize the Time & Date format by editing the value of **custom-time-format**. + +![customize-timeformat](http://ubuntuhandbook.org/wp-content/uploads/2015/12/customize-timeformat.jpg) + +You can also do this via command: + + gsettings set com.canonical.indicator.datetime custom-time-format 'FORMAT_VALUE_HERE' + +Interpreted sequences are: + +- %a = abbreviated weekday name +- %A = full weekday name +- %b = abbreviated month name +- %B = full month name +- %d = day of month +- %l = hour ( 1..12), %I = hour (01..12) +- %k = hour ( 1..23), %H = hour (01..23) +- %M = minute (00..59) +- %p = AM or PM, %P = am or pm. +- %S = second (00..59) +- open terminal and run command `man date` to get more details. + +Some examples: + +custom time format value: **%a %H:%M %m/%d/%Y** + +![exam-1](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-1.jpg) + +**%a %r %b %d or %a %I:%M:%S %p %b %d** + +![exam-2](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-2.jpg) + +**%a %-d %b %l:%M %P %z** + +![exam-3](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-3.jpg) + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/ + +作者:[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/ \ No newline at end of file diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md new file mode 100644 index 0000000000..ab2ea88946 --- /dev/null +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -0,0 +1,267 @@ +How to Install Bugzilla with Apache and SSL on FreeBSD 10.2 +================================================================================ +Bugzilla is open source web base application for bug tracker and testing tool, develop by mozilla project, and licensed under Mozilla Public License. It is used by high tech company like mozilla, redhat and gnome. Bugzilla was originally created by Terry Weissman in 1998. It written in perl, use MySQL as the database back-end. It is a server software designed to help you manage software development. Bugzilla has a lot of features, optimized database, excellent security, advanced search tool, integrated with email capabilities etc. + +In this tutorial we will install bugzilla 5.0 with apache for the web server, and enable SSL for it. Then install mysql51 as the database system on freebsd 10.2. + +#### Prerequisite #### + + FreeBSD 10.2 - 64bit. + Root privileges. + +### Step 1 - Update System ### + +Log in to the freebsd server with ssl login, and update the repository database : + + sudo su + freebsd-update fetch + freebsd-update install + +### Step 2 - Install and Configure Apache ### + +In this step we will install apache from the freebsd repositories with pkg command. Then configure apache by editing file "httpd.conf" on apache24 directory, configure apache to use SSL, and CGI support. + +Install apache with pkg command : + + pkg install apache24 + +Go to the apache directory and edit the file "httpd.conf" with nanao editor : + + cd /usr/local/etc/apache24 + nano -c httpd.conf + +Uncomment the list line below : + + #Line 70 + LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so + + #Line 89 + LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so + + # Line 117 + LoadModule expires_module libexec/apache24/mod_expires.so + + #Line 141 to enabling SSL + LoadModule ssl_module libexec/apache24/mod_ssl.so + + # Line 162 for cgi support + LoadModule cgi_module libexec/apache24/mod_cgi.so + + # Line 174 to enable mod_rewrite + LoadModule rewrite_module libexec/apache24/mod_rewrite.so + + # Line 219 for the servername configuration + ServerName 127.0.0.1:80 + +Save and exit. + +Next, we need to install mod perl from freebsd repository, and then enable it : + + pkg install ap24-mod_perl2 + +To enable mod_perl, edit httpd.conf and add to the "Loadmodule" line below : + + nano -c httpd.conf + +Add line below : + + # Line 175 + LoadModule perl_module libexec/apache24/mod_perl.so + +Save and exit. + +And before start apache, add it to start at boot time with sysrc command : + + sysrc apache24_enable=yes + service apache24 start + +### Step 3 - Install and Configure MySQL Database ### + +We will use mysql51 for the database back-end, and it is support for perl module for mysql. Install mysql51 with pkg command below : + + pkg install p5-DBD-mysql51 mysql51-server mysql51-client + +Now we must add mysql to the boot time, and then start and configure the root password for mysql. + +Run command below to do it all : + + sysrc mysql_enable=yes + service mysql-server start + mysqladmin -u root password aqwe123 + +Note : + +mysql password : aqwe123 + +![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png) + +Next, we will log in to the mysql shell with user root and password that we've configured above, then we will create new database and user for bugzilla installation. + +Log in to the mysql shell with command below : + + mysql -u root -p + password: aqwe123 + +Add the database : + + create database bugzilladb; + create user bugzillauser@localhost identified by 'bugzillauser@'; + grant all privileges on bugzilladb.* to bugzillauser@localhost identified by 'bugzillauser@'; + flush privileges; + \q + +![Creating Database for Bugzilla](http://blog.linoxide.com/wp-content/uploads/2015/12/Creating-Database-for-Bugzilla.png) + +Database for bugzilla is created, database "bugzilladb" with user "bugzillauser" and password "bugzillauser@". + +### Step 4 - Generate New SSL Certificate ### + +Generate new self signed ssl certificate on directory "ssl" for bugzilla site. + +Go to the apache24 directory and create new directory "ssl" on it : + + cd /usr/local/etc/apache24/ + mkdir ssl; cd ssl + +Next, generate the certificate file with openssl command, then change the permission of the certificate file : + + sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt + chmod 600 * + +### Step 5 - Configure Virtualhost ### + +We will install bugzilla on directory "/usr/local/www/bugzilla", so we must create new virtualhost configuration for it. + +Go to the apache directory and create new directory called "vhost" for virtualhost file : + + cd /usr/local/etc/apache24/ + mkdir vhost; cd vhost + +Now create new file "bugzilla.conf" for the virtualhost file : + + nano -c bugzilla.conf + +Paste configuration below : + + + ServerName mybugzilla.me + ServerAlias www.mybuzilla.me + DocumentRoot /usr/local/www/bugzilla + Redirect permanent / https://mybugzilla.me/ + + + Listen 443 + + ServerName mybugzilla.me + DocumentRoot /usr/local/www/bugzilla + + ErrorLog "/var/log/mybugzilla.me-error_log" + CustomLog "/var/log/mybugzilla.me-access_log" common + + SSLEngine On + SSLCertificateFile /usr/local/etc/apache24/ssl/bugzilla.crt + SSLCertificateKeyFile /usr/local/etc/apache24/ssl/bugzilla.key + + + AddHandler cgi-script .cgi + Options +ExecCGI + DirectoryIndex index.cgi index.html + AllowOverride Limit FileInfo Indexes Options + Require all granted + + + +Save and exit. + +If all is done, create new directory for bugzilla installation and then enable the bugzilla virtualhost by adding the virtualhost configuration to httpd.conf file. + +Run command below on "apache24" directory : + + mkdir -p /usr/local/www/bugzilla + cd /usr/local/etc/apache24/ + nano -c httpd.conf + +In the end of the line, add configuration below : + + Include etc/apache24/vhost/*.conf + +Save and exit. + +Now test the apache configuration with "apachectl" command and restart it : + + apachectl configtest + service apache24 restart + +### Step 6 - Install Bugzilla ### + +We can install bugzilla manually by downloading the source, or install it from freebsd repository. In this step we will install bugzilla from freebsd repository with pkg command : + + pkg install bugzilla50 + +If it's done, go to the bugzilla installation directory and install all perl module that needed by bugzilla. + + cd /usr/local/www/bugzilla + ./install-module --all + +Wait it until all is finished, it is take the time. + +Next, generate the configuration file "localconfig" by executing "checksetup.pl" file on bugzilla installation directory. + + ./checksetup.pl + +You will see the error message about the database configuration, so edit the file "localconfig" with nano editor : + + nano -c localconfig + +Now add the database that was created on step 3. + + #Line 57 + $db_name = 'bugzilladb'; + + #Line 60 + $db_user = 'bugzillauser'; + + #Line 67 + $db_pass = 'bugzillauser@'; + +Save and exit. + +Then run "checksetup.pl" again : + + ./checksetup.pl + +You will be prompt about mail and administrator account, fill all of it with your email, user and password. + +![Admin Setup](http://blog.linoxide.com/wp-content/uploads/2015/12/Admin-Setup.png) + +In the last, we need to change the owner of the installation directory to user "www", then restart apache with service command : + + cd /usr/local/www/ + chown -R www:www bugzilla + service apache24 restart + +Now Bugzilla is installed, you can see it by visiting mybugzilla.me and you will be redirect to the https connection. + +Bugzilla home page. + +![Bugzilla Home](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Home.png) + +Bugzilla admin panel. + +![Bugzilla Admin Page](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Admin-Page.png) + +### Conclusion ### + +Bugzilla is web based application help you to manage the software development. It is written in perl and use MySQL as the database system. Bugzilla used by mozilla, redhat, gnome etc for help their software development. Bugzilla has a lot of features and easy to configure and install. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-bugzilla-apache-ssl-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 a0699ecf9c3777e496ce9f7ef57f7e28f4b47728 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 8 Dec 2015 16:38:20 +0800 Subject: [PATCH 0520/1710] =?UTF-8?q?20151208-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r visual effects in Linux with Kdenlive.md | 155 ++++++++++++++++++ ...Raspberry Pi projects for the classroom.md | 96 +++++++++++ ...0151208 6 creative ways to use ownCloud.md | 94 +++++++++++ ...0151208 6 useful LibreOffice extensions.md | 79 +++++++++ ... open source community metrics to track.md | 79 +++++++++ ...o renew the ISPConfig 3 SSL Certificate.md | 59 +++++++ 6 files changed, 562 insertions(+) create mode 100644 sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md create mode 100644 sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md create mode 100644 sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md create mode 100644 sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md create mode 100644 sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md create mode 100644 sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md diff --git a/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md b/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md new file mode 100644 index 0000000000..bf2ba1ff25 --- /dev/null +++ b/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md @@ -0,0 +1,155 @@ +10 tools for visual effects in Linux with Kdenlive +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life-uploads/kdenlivetoolssummary.png) +Image credits : Seth Kenlon. [CC BY-SA 4.0.][1] + +[Kdenlive][2] is one of those applications; you can use it daily for a year and wake up one morning only to realize that you still have only grazed the surface of all of its potential. That's why it's nice every once in a while to sit back and look over some of the lesser-used tricks and tools in Kdenlive. Even though something's not used as often as, say, the Spacer or Razor tools, it still may end up being just the right finishing touch on your latest masterpiece. + +Most of the tools I'll discuss here are not officially part of Kdenlive; they are plugins from the [Frei0r][3] package. These are ubiquitous parts of video processing on Linux and Unix, and they usually get installed along with Kdenlive as distributed by most Linux distributions, so they often seem like part of the application. If your install of Kdenlive does not feature some of the tools mentioned here, make sure that you have Frei0r plugins installed. + +Since many of the tools in this article affect the look of an image, here is the base image, without effects or adjustment: + +![](https://opensource.com/sites/default/files/images/life-uploads/before_0.png) + +Still image grabbed from a video by Footage Firm, Inc. [CC BY-SA 4.0.][1] + +Let's get started. + +### 1. Color effect ### + +![](https://opensource.com/sites/default/files/images/life-uploads/coloreffect.png) + +You can find the **Color Effect** filter in **Add Effect > Misc** context menu. As filters go, it's mostly just a preset; the only controls it has are which filter you want to use. + +![](https://opensource.com/sites/default/files/images/life-uploads/coloreffect_ctl_0.png) + +Normally that's the kind of filter I avoid, but I have to be honest: Sometimes a plug-and-play solution is exactly what you want. This filter has a few different settings, but the two that make it worth while (at least for me) are the Sepia and XPro effects. Admittedly, controls to adjust how sepia tone the sepia effect is would be nice, but no matter what, when you need a quick and familiar color effect, this is the filter to throw onto a clip. It's immediate, it's easy, and if your client asks for that look, this does the trick every time. + +### 2. Colorize ### + +![](https://opensource.com/sites/default/files/images/life-uploads/colorize.png) + +The simplicity of the **Colorize** filter in **Add Effect > Misc** is also its strength. In some editing applications, it takes two filters and some compositing to achieve this simple color-wash effect. It's refreshing that in Kdenlive, it's a matter of one filter with three possible controls (only one of which, strictly speaking, is necessary to achieve the look). + +![](https://opensource.com/sites/default/files/images/life-uploads/colorize_ctl.png) + +Its use is intuitive; use the **Hue** slider to set the color. Use the other controls to adjust the luma of the base image as needed. + +This is not a filter I use every day, but for ad spots, bumpers, dreamy sequences, or titles, it's the easiest and quickest path to a commonly needed look. Get a company's color, use it as the colorize effect, slap a logo over the top of the screen, and you've just created a winning corporate intro. + +### 3. Dynamic Text ### + +![](https://opensource.com/sites/default/files/images/life-uploads/dyntext.png) + +For the assistant editor, the Add Effect > Misc > Dynamic **Text** effect is worth the price of Kdenlive. With one mostly pre-set filter, you can add a running timecode burn-in to your project, which is an absolute must-have safety feature when round-tripping your footage through effects and sound. + +The controls look more complex than they actually are. + +![](https://opensource.com/sites/default/files/images/life-uploads/dyntext_ctl.png) + +The font settings are self-explanatory. Placement of the text is controlled by the Horizontal and Vertical Alignment settings; steer clear of the **Size** setting (it controls the size of the "canvas" upon which you are compositing the burn-in, not the size of the burn-in itself). + +The text itself doesn't have to be timecode. From the dropdown menu, you can choose from a list of useful text, including frame count (useful for VFX, since animators work in frames), source frame rate, source dimensions, and more. + +You are not limited to just one choice. The text field in the control panel will take whatever arbitrary text you put into it, so if you want to burn in more information than just timecode and frame rate (such as **Sc 3 - #timecode# - #meta.media.0.stream.frame_rate#**), then have at it. + +### 4. Luminance ### + +![](https://opensource.com/sites/default/files/images/life-uploads/luminance.png) + +The **Add Effect > Misc > Luminance** filter is a no-options filter. Luminance does one thing and it does it well: It drops the chroma values of all pixels in an image so that they are displayed by their luma values. In simpler terms, it's a grayscale filter. + +The nice thing about this filter is that it's quick, easy, efficient, and effective. This filter combines particularly well with other related filters (meaning that yes, I'm cheating and including three filters for one). + +![](https://opensource.com/sites/default/files/images/life-uploads/luminance_ctl.png) + +Combining, in this order, the **RGB Noise** for emulated grain, **Luminance** for grayscale, and **LumaLiftGainGamma** for levels can render a textured image that suggests the classic look and feel of [Kodax Tri-X][4] film. + +### 5. Mask0mate ### + +![](https://opensource.com/sites/default/files/images/life-uploads/mask0mate.png) +Image by Footage Firm, Inc. + +Better known as a four-point garbage mask, the **Add Effect > Alpha Manipulation > Mask0mate** tool is a quick, no-frills way to ditch parts of your frame that you don't need. There isn't much to say about it; it is what it is. + +![](https://opensource.com/sites/default/files/images/life-uploads/mask0mate_ctl.png) + +The confusing thing about the effect is that it does not imply compositing. You can pull in the edges all you want, but you won't see it unless you add the **Composite** transition to reveal what's underneath the clip (even if that's nothing). Also, use the **Invert** function for the filter to act like you think it should act (without it, the controls will probably feel backward to you). + +### 6. Pr0file ### + +![](https://opensource.com/sites/default/files/images/life-uploads/pr0file.png) + +The **Add Effect > Misc > Pr0file** filter is an analytical tool, not something you would actually leave on a clip for final export (unless, of course, you do). Pr0file consists of two components: the Marker, which dictates what area of the image is being analyzed, and the Graph, which displays information about the marked region. + +Set the marker using the **X, Y, Tilt**, and **Length** controls. The graphical readout of all the relevant color channel information is displayed as a graph, superimposed over your image. + +![](https://opensource.com/sites/default/files/images/life-uploads/pr0file_ctl.jpg) + +The readout displays a profile of the colors within the region marked. The result is a sort of hyper-specific vectorscope (or oscilloscope, as the case may be) that can help you zero in on problem areas during color correction, or compare regions while color matching. + +In other editors, the way to get the same information was simply to temporarily scale your image up to the region you want to analyze, look at your readout, and then hit undo to scale back. Both ways work, but the Pr0file filter does feel a little more elegant. + +### 7. Vectorscope ### + +![](https://opensource.com/sites/default/files/images/life-uploads/vectorscope.jpg) + +Kdenlive features an inbuilt vectorscope, available from the **View** menu in the main menu bar. A vectorscope is not a filter, it's just another view the footage in your Project Monitor, specifically a view of the color saturation in the current frame. If you are color correcting an image and you're not sure what colors you need to boost or counteract, looking at the vectorscope can be a huge help. + +There are several different views available. You can render the vectorscope in traditional green monochrome (like the hardware vectorscopes you'd find in a broadcast control room), or a chromatic view (my personal preference), or subtracted from a color-wheel background, and more. + +The vectorscope reads the entire frame, so unlike the Pr0file filter, you are not just getting a reading of one area in the frame. The result is a consolidated view of what colors are most prominent within a frame. Technically, the same sort of information can be intuited by several trial-and-error passes with color correction, or you can just leave your vectorscope open and watch the colors float along the color wheel and make adjustments accordingly. + +Aside from how you want the vectorscope to look, there are no controls for this tool. It is a readout only. + +### 8. Vertigo ### + +![](https://opensource.com/sites/default/files/images/life-uploads/vertigo.jpg) + +There's no way around it; **Add Effect > Misc > Vertigo** is a gimmicky special effect filter. So unless you're remaking [Fear and Loathing][5] or the movie adaptation of [Dead Island][6], you probably aren't going to use it that much; however, it's one of those high-quality filters that does the exact trick you want when you happen to be looking for it. + +The controls are simple. You can adjust how distorted the image becomes and the rate at which it distorts. The overall effect is probably more drunk or vision-quest than vertigo, but it's good. + +![](https://opensource.com/sites/default/files/images/life-uploads/vertigo_ctl.png) + +### 9. Vignette ### + +![](https://opensource.com/sites/default/files/images/life-uploads/vignette.jpg) + +Another beautiful effect, the **Add Effect > Misc > Vignette** darkens the outer edges of the frame to provide a sort of portrait, soft-focus nouveau look. Combined with the Color Effect or the Luminance faux Tri-X trick, this can be a powerful and emotional look. + +The softness of the border and the aspect ratio of the iris can be adjusted. The **Clear Center Size** attribute controls the size of the clear area, which has the effect of adjusting the intensity of the vignette effect. + +![](https://opensource.com/sites/default/files/images/life-uploads/vignette_ctl.png) + +### 10. Volume ### + +![](https://opensource.com/sites/default/files/images/life-uploads/vol.jpg) + +I don't believe in mixing sound within the video editing application, but I do acknowledge that sometimes it's just necessary for a quick fix or, sometimes, even for a tight production schedule. And that's when the **Audio correction > Volume (Keyframable)** effect comes in handy. + +The control panel is clunky, and no one really wants to adjust volume that way, so the effect is best when used directly in the timeline. To create a volume change, double-click the volume line over the audio clip, and then click and drag to adjust. It's that simple. + +Should you use it? Not really. Sound mixing should be done in a sound mixing application. Will you use it? Absolutely. At some point, you'll get audio that is too loud to play as you edit, or you'll be up against a deadline without a sound engineer in sight. Use it judiciously, watch your levels, and get the show finished. + +### Everything else ### + +This has been 10 (OK, 13 or 14) effects and tools that Kdenlive has quietly lying around to help your edits become great. Obviously there's a lot more to Kdenlive than just these little tricks. Some are obvious, some are cliché, some are obtuse, but they're all in your toolkit. Get to know them, explore your options, and you might be surprised what a few cheap tricks will get you. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/15/12/10-kdenlive-tools + +作者:[Seth Kenlon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/seth +[1]:https://creativecommons.org/licenses/by-sa/4.0/ +[2]:https://kdenlive.org/ +[3]:http://frei0r.dyne.org/ +[4]:http://www.kodak.com/global/en/professional/products/films/bw/triX2.jhtml +[5]:https://en.wikipedia.org/wiki/Fear_and_Loathing_in_Las_Vegas_(film) +[6]:https://en.wikipedia.org/wiki/Dead_Island \ No newline at end of file diff --git a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md new file mode 100644 index 0000000000..c1aa541416 --- /dev/null +++ b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md @@ -0,0 +1,96 @@ +5 great Raspberry Pi projects for the classroom +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png) + +Image by : opensource.com + +### 1. Minecraft Pi ### + +Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0.][1] + +Minecraft is the favorite game of pretty much every teenager in the world—and it's one of the most creative games ever to capture the attention of young people. The version that comes with every Raspberry Pi is not only a creative thinking building game, but comes with a programming interface allowing for additional interaction with the Minecraft world through Python code. + +Minecraft: Pi Edition is a great way for teachers to engage students with problem solving and writing code to perform tasks. You can use the Python API to build a house and have it follow you wherever you go, build a bridge wherever you walk, make it rain lava, show the temperature in the sky, and anything else your imagination can create. + +Read more in "[Getting Started with Minecraft Pi][2]." + +### 2. Reaction game and traffic lights ### + +![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg) + +Courtesy of [Low Voltage Labs][3]. [CC BY-SA 4.0][1]. + +It's really easy to get started with physical computing on Raspberry Pi—just connect up LEDs and buttons to the GPIO pins, and with a few lines of code you can turn lights on and control things with button presses. Once you know the code to do the basics, it's down to your imagination as to what you do next! + +If you know how to flash one light, you can flash three. Pick out three LEDs in traffic light colors and you can code the traffic light sequence. If you know how to use a button to a trigger an event, then you have a pedestrian crossing! Also look out for great pre-built traffic light add-ons like [PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6], and more. + +It's not always about the code—this can be used as an exercise in understanding how real world systems are devised. Computational thinking is a useful skill in any walk of life. + +![](https://opensource.com/sites/default/files/reaction-game.png) + +Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1]. + +Next, try wiring up two buttons and an LED and making a two-player reaction game—let the light come on after a random amount of time and see who can press the button first! + +To learn more, check out "[GPIO Zero recipes][7]. Everything you need is in [CamJam EduKit 1][8]. + +### 3. Sense HAT Pixel Pet ### + +The Astro Pi—an augmented Raspberry Pi—is going to space this December, but you haven't missed your chance to get your hands on the hardware. The Sense HAT is the sensor board add-on used in the Astro Pi mission and it's available for anyone to buy. You can use it for data collection, science experiments, games and more. Watch this Gurl Geek Diaries video from Raspberry Pi's Carrie Anne for a great way to get started—by bringing to life an animated pixel pet of your own design on the Sense HAT display: + +注:youtube 视频 + + +Learn more in "[Exploring the Sense HAT][9]." + +### 4. Infrared bird box ### + +![](https://opensource.com/sites/default/files/ir-bird-box.png) +Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0.][1] + +A great exercise for the whole class to get involved with—place a Raspberry Pi and the NoIR camera module inside a bird box along with some infra-red lights so you can see in the dark, then stream video from the Pi over the network or on the internet. Wait for birds to nest and you can observe them without disturbing them in their habitat. + +Learn all about infrared and the light spectrum, and how to adjust the camera focus and control the camera in software. + +Learn more in "[Make an infrared bird box.][10]" + +### 5. Robotics ### + +![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg) + +Courtesy of Low Voltage Labs. [CC BY-SA 4.0][1]. + +With a Raspberry Pi and as little as a couple of motors and a motor controller board, you can build your own robot. There is a vast range of robots you can make, from basic buggies held together by sellotape and a homemade chassis, all the way to self-aware, sensor-laden metallic stallions with camera attachments driven by games controllers. + +Learn how to control individual motors with something straightforward like the RTK Motor Controller Board (£8/$12), or dive into the new CamJam robotics kit (£17/$25) which comes with motors, wheels and a couple of sensors—great value and plenty of learning potential. + +Alternatively, if you'd like something more hardcore, try PiBorg's [4Borg][11] (£99/$150) or [DiddyBorg][12] (£180/$273) or go the whole hog and treat yourself to their DoodleBorg Metal edition (£250/$380)—and build a mini version of their infamous [DoodleBorg tank][13] (unfortunately not for sale). + +Check out the [CamJam robotics kit worksheets][14]. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom + +作者:[Ben Nuttall][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/bennuttall +[1]:https://creativecommons.org/licenses/by-sa/4.0/ +[2]:https://opensource.com/life/15/5/getting-started-minecraft-pi +[3]:http://lowvoltagelabs.com/ +[4]:http://lowvoltagelabs.com/products/pi-traffic/ +[5]:http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390 +[6]:https://ryanteck.uk/hats/1-traffichat-0635648607122.html +[7]:http://pythonhosted.org/gpiozero/recipes/ +[8]:http://camjam.me/?page_id=236 +[9]:https://opensource.com/life/15/10/exploring-raspberry-pi-sense-hat +[10]:https://www.raspberrypi.org/learning/infrared-bird-box/ +[11]:https://www.piborg.org/4borg +[12]:https://www.piborg.org/diddyborg +[13]:https://www.piborg.org/doodleborg +[14]:http://camjam.me/?page_id=1035#worksheets \ No newline at end of file diff --git a/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md b/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md new file mode 100644 index 0000000000..969e0637b5 --- /dev/null +++ b/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md @@ -0,0 +1,94 @@ +6 creative ways to use ownCloud +================================================================================ +![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc-open-source-yearbook-lead1-inc0335020sw-201511-01.png) + +Image by : Opensource.com + +[ownCloud][1] is a self-hosted open source file sync and share server. Like "big boys" Dropbox, Google Drive, Box, and others, ownCloud lets you access your files, calendar, contacts, and other data. You can synchronize everything (or part of it) between your devices and share files with others. But ownCloud can do much more than its proprietary, [hosted-on-somebody-else's-computer competitors][2]. + +Let's look at six creative things ownCloud can do. Some of these are possible because ownCloud is open source, whereas others are just unique features it offers. + +### 1. A scalable ownCloud Pi cluster ### + +Because ownCloud is open source, you can choose between self-hosting on your own server or renting space from a provider you trust—no need to put your files at a big company that stores it who knows where. [Find some ownCloud providers here][3] or grab packages or a virtual machine for [your own server here][4]. + +![](https://opensource.com/sites/default/files/images/life-uploads/banana-pi-owncloud-cluster.jpg) + +Photo by Jörn Friedrich Dreyer. [CC BY-SA 4.0.][5] + +The most creative things we've seen are a [Banana Pi cluster][6] and a [Raspberry Pi cluster][7]. Although ownCloud's scalability is often used to deploy to hundreds of thousands of users, some folks out there take it in a different direction, bringing multiple tiny systems together to make a super-fast ownCloud. Kudos! + +### 2. Keep your passwords synced ### + +To make ownCloud easier to extend, we have made it extremely modular and have an [ownCloud app store][8]. There you can find things like music and video players, calendars, contacts, productivity apps, games, a sketching app, and much more. + +Picking only one app from the almost 200 available is hard, but managing passwords is certainly a unique feature. There are no less than three apps providing this functionality: [Passwords][9], [Secure Container][10], and [Passman][11]. + +![](https://opensource.com/sites/default/files/images/life-uploads/password.png) + +### 3. Store your files where you want ### + +External storage allows you to hook your existing data storage into ownCloud, letting you to access files stored on FTP, WebDAV, Amazon S3, and even Dropbox and Google Drive through one interface. + +注:youtube 视频 + + +The "big boys" like to create their own little walled gardens—Box user can only collaborate with other Box users; and if you want to share your files from Google Drive, your mate needs a Google account or they can't do much. With ownCloud's external storage, you can break these barriers. + +A very creative solution is adding Google Drive and Dropbox as external storage. You can work with files on both seamlessly and share them with others through a simple link—no account needed to work with you! + +### 4. Get files uploaded ### + +Because ownCloud is open source, people contribute interesting features without being limited by corporate requirements. Our contributors have always cared about security and privacy, so ownCloud introduced features such as protecting a public link with a password and setting an expire date [years before anybody else did][12]. + +Today, ownCloud has the ability to configure a shared link as read-write, which means visitors can seamlessly edit the files you share with them (protected with a password or not) or upload new files to your server without being forced to sign up to another web service that wants their private data. + +注:youtube 视频 + + +This is great for when people want to share a large file with you. Rather than having to upload it to a third-party site, send you a link, and make you go there and download it (often requiring a login), they can just upload it to a shared folder you provide, and you can get to work right away. + +### 5. Get free secure storage ### + +We already talked about how many of our contributors care about security and privacy. That's why ownCloud has an app that can encrypt and decrypt stored data. + +Using ownCloud to store your files on Dropbox or Google Drive defeats the whole idea of retaking control of your data and keeping it private. The Encryption app changes that. By encrypting data before sending it to these providers and decrypting it upon retrieval, your data is safe as kittens. + +### 6. Share your files and stay in control ### + +As an open source project, ownCloud has no stake in building walled gardens. Enter Federated Cloud Sharing: a protocol [developed and published by ownCloud][13] that enables different file sync and share servers to talk to one another and exchange files securely. Federated Cloud Sharing has an interesting history. [Twenty-two German universities][14] decided to build a huge cloud for their 500,000 students. But as each university wanted to stay in control of the data of their own students, a creative solution was needed: Federated Cloud Sharing. The solution now connects all these universities so the students can seamlessly work together. At the same time, the system administrators at each university stay in control of the files their students have created and can apply policies, such as storage restrictions, or limitations on what, with whom, and how files can be shared. + +注:youtube 视频 + + +And this awesome technology isn't limited to German universities: Every ownCloud user can find their [Federated Cloud ID][15] in their user settings and share it with others. + +So there you have it. Six ways ownCloud enables people to do special and unique things, all made possible because it is open source and designed to help you liberate your data. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/15/12/6-creative-ways-use-owncloud + +作者:[Jos Poortvliet][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jospoortvliet +[1]:https://owncloud.com/ +[2]:https://blogs.fsfe.org/mk/new-stickers-and-leaflets-no-cloud-and-e-mail-self-defense/ +[3]:https://owncloud.org/providers +[4]:https://owncloud.org/install/#instructions-server +[5]:https://creativecommons.org/licenses/by-sa/4.0/ +[6]:http://www.owncluster.de/ +[7]:https://christopherjcoleman.wordpress.com/2013/01/05/host-your-owncloud-on-a-raspberry-pi-cluster/ +[8]:https://apps.owncloud.com/ +[9]:https://apps.owncloud.com/content/show.php/Passwords?content=170480 +[10]:https://apps.owncloud.com/content/show.php/Secure+Container?content=167268 +[11]:https://apps.owncloud.com/content/show.php/Passman?content=166285 +[12]:https://owncloud.com/owncloud45-community/ +[13]:http://karlitschek.de/2015/08/announcing-the-draft-federated-cloud-sharing-api/ +[14]:https://owncloud.com/customer/sciebo/ +[15]:https://owncloud.org/federation/ \ No newline at end of file diff --git a/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md b/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md new file mode 100644 index 0000000000..a2c1e393ff --- /dev/null +++ b/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md @@ -0,0 +1,79 @@ +6 useful LibreOffice extensions +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png) + +Image by : Opensource.com + +LibreOffice is the best free office suite around, and as such has been adopted by all major Linux distributions. Although LibreOffice is already packed with features, it can be extended by using specific add-ons, called extensions. + +The main LibreOffice extensions website is [extensions.libreoffice.org][1]. Extensions are tools that can be added or removed independently from the main installation, and may add new functionality or make existing functionality easier to use. + +### 1. MultiFormatSave ### + +MultiFormatSave lets users save a document in the OpenDocument, Microsoft Office (old and new), and/or PDF formats simultaneously, according to user settings. This extension is extremely useful during the migration from Microsoft Office document formats to the [Open Document Format][2] standard, because it offers the option to save in both flavors: ODF for interoperability, and Microsoft Office for compatibility with all users sticking to legacy formats. This makes the migration process softer, and easier to administer. + +**[Download MultiFormatSave][3]** + +![Multiformatsave extension](https://opensource.com/sites/default/files/images/business-uploads/multiformatsave.png) + +### 2. Alternative dialog Find & Replace for Writer (AltSearch) ### + +This extension adds many new features to Writer's find & replace function: searched or replaced text can contain one or more paragraphs; multiple search and replacement in one step; searching: Bookmarks, Notes, Text fields, Cross-references and Reference marks to their content, name or mark and their inserting; searching and inserting Footnote and Endnote; searching object of Table, Pictures and Text frames according to their name; searching out manual page and column break and their set up or deactivation; and searching similarly formatted text, according to cursor point. It is also possible to save and load search and replacement parameters, and execute the batch on several opened documents at the same time. + +**[Download Alternative dialog Find & Replace for Writer (AltSearch)][4]** + +![Alternative Find&amp;Replace add-on](https://opensource.com/sites/default/files/images/business-uploads/alternativefindreplace.png) + +### 3. Pepito Cleaner ### + +Pepito Cleaner is an extension of LibreOffice created to quickly resolve the most common formatting mistakes of old scans, PDF imports, and every digital text file. By clicking the Pepito Cleaner icon on the LibreOffice toolbar, users will open a window that will analyze the document and show the results broken down by category. This is extremely useful when converting PDF documents to ODF, as it cleans all the cruft left in place by the automatic process. + +**[Download Pepito Cleaner][5]** + +![Pepito cleaner screenshot](https://opensource.com/sites/default/files/images/business-uploads/pepitocleaner.png) + +### 4. ImpressRunner ### + +Impress Runner is a simple extension that transforms an [Impress][6] presentation into an auto-running file. The extension adds two icons, to set and remove the autostart function, which can also be added manually by editing the File | Properties | Custom Properties menu, and adding the term autostart in one of the first four text fields. This extension is especially useful for booths at conferences and events, where the slides are supposed to run unattended. + +**[Download ImpressRunner][7]** + +### 5. Export as Images ### + +The Export as Images extension adds a File menu entry export as Images... in Impress and [Draw][8], to export all slides or pages as images in JPG, PNG, GIF, BMP, and TIFF format, and allows users to choose a file name for exported images, the image size, and other parameters. + +**[Download Export as Images][9]** + +![Export as images extension](https://opensource.com/sites/default/files/images/business-uploads/exportasimages.png) + +### 6. Anaphraseus ### + +Anaphraseus is a CAT (Computer-Aided Translation) tool for creating, managing, and using bilingual Translation Memories. Anaphraseus is a LibreOffice macro set available as an extension or a standalone document. Originally, Anaphraseus was developed to work with the Wordfast format, but it can also export and import files in TMX format. Anaphraseus main features are: text segmentation, fuzzy search in Translation Memory, terminology recognition, and TMX Export/Import (OmegaT translation memory format). + +**[Download Anaphraseus][10]** + +![Anaphraseus screenshot](https://opensource.com/sites/default/files/images/business-uploads/anaphraseus.png) + +Do you have a favorite LibreOffice extension to recommend? Let us know about it in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions + +作者:[Italo Vignoli][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/italovignoli +[1]:http://extensions.libreoffice.org/ +[2]:http://www.opendocumentformat.org/ +[3]:http://extensions.libreoffice.org/extension-center/multisave-1 +[4]:http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer +[5]:http://pepitoweb.altervista.org/pepito_cleaner/index.php +[6]:https://www.libreoffice.org/discover/impress/ +[7]:http://extensions.libreoffice.org/extension-center/impressrunner +[8]:https://www.libreoffice.org/discover/draw/ +[9]:http://extensions.libreoffice.org/extension-center/export-as-images +[10]:http://anaphraseus.sourceforge.net/ \ No newline at end of file diff --git a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md new file mode 100644 index 0000000000..5098151775 --- /dev/null +++ b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md @@ -0,0 +1,79 @@ +Top 5 open source community metrics to track +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-1.png) + +So you decided to use metrics to track your free, open source software (FOSS) community. Now comes the big question: Which metrics should I be tracking? + +To answer this question, you must have an idea of what information you need. For example, you may want to know about the sustainability of the project community. How quickly does the community react to problems? How is the community attracting, retaining, or losing contributors? Once you decide which information you need, you can figure out which traces of community activity are available to provide it. Fortunately, FOSS projects following an open development model tend to leave loads of public data in their software development repositories, which can be analyzed to gather useful data. + +In this article, I'll introduce metrics that help provide a multi-faceted view of your project community. + +### 1. Activity ### + +The overall activity of the community and how it evolves over time is a useful metric for all open source communities. Activity provides a first view of how much the community is doing, and can be used to track different kinds of activity. For example, the number of commits gives a first idea about the volume of the development effort. The number of tickets opened provides insight into how many bugs are reported or new features are proposed. The number of messages in mailing lists or posts in forums gives an idea of how much discussion is being held in public. + +![Activity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/activity-metrics.png) + +Number of commits and number of merged changes after code review in the OpenStack project, as found in the [OpenStack Activity Dashboard][1]. Evolution over time (weekly data). + +### 2. Size ### + +The size of the community is the number of people participating in it, but, depending on the kind of participation, size numbers may vary. Usually you're interested in active contributors, which is good news. Active people may leave traces in the repositories of the project, which means you can count contributors who are active in producing code by looking at the **Author** field in git repositories, or count people participating in the resolution of tickets by looking at who is contributing to them. + +This basic idea of activity" (somebody did something) can be extended in many ways. One common way to track activity is to look at how many people did a sizable chunk of the activity. Generally most of a project's code contributions, for example, are from a small fraction of the people in the project's community. Knowing about that fraction helps provide an idea of the core group (i.e., the people who help lead the community). + +![Size metrics chart](https://opensource.com/sites/default/files/images/business-uploads/size-metrics.png) + +Number of authors and number of posters in mailing lists in the Xen project, as found in the [Xen Project Development Dashboard][2]. Evolution over time (monthly data). + +### 3. Performance ### + +So far, I have focused on measuring quantities of activities and contributors. You also can analyze how processes and people are performing. For example, you can measure how long processes take to finish. Time to resolve or close tickets shows how the project is reacting to new information that requires action, such as fixing a reported bug or implementing a requested new feature. Time spent in code review—from the moment when a change to the code is proposed to the moment it is accepted—shows how long upgrading a proposed change to the quality standards expected by the community takes. + +Other metrics deal with how well the project is coping with pending work, such as the ratio of new to closed tickets, or the backlog of still non-completed code reviews. Those parameters tell us, for example, whether or not the resources put into solving issues is enough. + +![Efficiency metrics chart](https://opensource.com/sites/default/files/images/business-uploads/efficiency-metrics.png) + +Ratio of tickets closed by tickets opened, and ratio of change proposals accepted or abandoned by new change proposals per quarter. OpenStack project, as shown in the [OpenStack Development Report, 2015-Q3][3] (PDF). + +### 4. Demographics ### + +Communities change as contributors move in and out. Depending on how people enter and leave a community over time, the age (time since members joined the community) of the community varies. The [community aging chart][4] nicely illustrates these exchanges over time. The chart is structured as a set of horizontal bars, two per "generation" of people joining the community. For each generation, the attracted bar shows how many new people joined the community during the corresponding period of time. The retained bar shows how many people are still active in the community. + +The relationship between the two bars for each generation is the retention rate: the fraction of people of that generation who are still in the project. The complete set of attracted bars show how attractive the project was in the past. And the complete set of the retention bars shows the current age structure of the community. + +![Demographics metrics chart](https://opensource.com/sites/default/files/images/business-uploads/demography-metrics.png) + +Community aging chart for the Eclipse community, as shown in the [Eclipse Development Dashboard][5]. Generations are defined every six months. + +### 5. Diversity ### + +Diversity is an important factor in the resiliency of communities. In general, the more diverse communities are—in terms of people or organizations participating—the more resilient they are. For example, when a company decides to leave a FOSS community, the potential problems the departure may cause are much smaller if its employees were contributing 5% of the work rather than 85%. + +The [Pony Factor][6], a term defined by [Daniel Gruno][7] for the minimum number of developers performing 50% of the commits. Based on the Pony Factor, the Elephant Factor is the minimum number of companies whose employees perform 50% of the commits. Both numbers provide an indication of how many people or companies the community depends on. + +![Diversity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/diversity-metrics.png) + +Pony and Elephant Factor for several FOSS projects in the area of cloud computing, as presented in [The quantitative state of the open cloud 2015][8] (slides). + +There are many other metrics to help measure a community. When determing which metrics to collect, think about the goals of your community, and which metrics will help you reach them. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/15/12/top-5-open-source-community-metrics-track + +作者:[Jesus M. Gonzalez-Barahona][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jgbarah +[1]:http://activity.openstack.org/ +[2]:http://projects.bitergia.com/xen-project-dashboard/ +[3]:http://activity.openstack.org/dash/reports/2015-q3/pdf/2015-q3_OpenStack_report.pdf +[4]:http://radar.oreilly.com/2014/10/measure-your-open-source-communitys-age-to-keep-it-healthy.html +[5]:http://dashboard.eclipse.org/demographics.html +[6]:https://ke4qqq.wordpress.com/2015/02/08/pony-factor-math/ +[7]:https://twitter.com/humbedooh +[8]:https://speakerdeck.com/jgbarah/the-quantitative-state-of-the-open-cloud-2015-edition \ No newline at end of file diff --git a/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md b/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md new file mode 100644 index 0000000000..600c8941cf --- /dev/null +++ b/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md @@ -0,0 +1,59 @@ +How to renew the ISPConfig 3 SSL Certificate +================================================================================ +This tutorial describes the steps to renew the SSL Certificate of the ISPConfig 3 control panel. There are two alternative ways to achieve that: + +- Create a new OpenSSL Certificate and CSR on the command line with OpenSSL. +- Renew the SSL Certificate with the ISPConfig updater + +I'll start with the manual way to renew the ssl cert. + +### 1) Create a new ISPConfig 3 SSL Certificate with OpenSSL ### + +Login to your server on the shell as root user. Before we create a new SSL Cert, backup the current ones. SSL Certs are security sensitive so I'll store the backup in the /root/ folder. + + tar pcfz /root/ispconfig_ssl_backup.tar.gz /usr/local/ispconfig/interface/ssl + chmod 600 /root/ispconfig_ssl_backup.tar.gz + +> Now create a new SSL Certificate key, Certificate Request (csr) and a self signed Certificate. + + cd /usr/local/ispconfig/interface/ssl + openssl genrsa -des3 -out ispserver.key 4096 + openssl req -new -key ispserver.key -out ispserver.csr + openssl x509 -req -days 3650 -in ispserver.csr \ + -signkey ispserver.key -out ispserver.crt + openssl rsa -in ispserver.key -out ispserver.key.insecure + mv ispserver.key ispserver.key.secure + mv ispserver.key.insecure ispserver.key + +Restart Apache to load the new SSL Certificate. + + service apache2 restart + +### 2) Renew the SSL Certificate with the ISPConfig installer ### + +The alternative way to get a new SSL Certificate is to use the ISPConfig update script. +Download ISPConfig to the /tmp folder, unpack the archive and start the update script. + + cd /tmp + wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz + tar xvfz ISPConfig-3-stable.tar.gz + cd ispconfig3_install/install + php -q update.php + +The update script will ask the following question during update: + + Create new ISPConfig SSL certificate (yes,no) [no]: + +Answer "yes" here and the SSL Certificate creation dialog will start. + +-------------------------------------------------------------------------------- + +via: http://www.faqforge.com/linux/how-to-renew-the-ispconfig-3-ssl-certificate/ + +作者:[Till][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.faqforge.com/author/till/ \ No newline at end of file From 9014fc443a0e5ebf85efac1bb3b8939406a16e25 Mon Sep 17 00:00:00 2001 From: Vic020 Date: Tue, 8 Dec 2015 19:00:20 +0800 Subject: [PATCH 0521/1710] translated --- ... to up- and download files on the shell.md | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md b/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md index e2ddf0cb2a..11983e0e80 100644 --- a/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md +++ b/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md @@ -1,14 +1,13 @@ -Vic020 - -How to use the Linux ftp command to up- and download files on the shell +如何在命令行中使用ftp命令上传和下载文件 ================================================================================ -In this tutorial, I will explain how to use the Linux ftp command on the shell. I will show you how to connect to an FTP server, up- and download files and create directories. While there are many nice desktops FTP clients available, the FTP command is still useful when you work remotely on a server over an SSH session and e.g. want to fetch a backup file from your FTP storage. +本文中,介绍在Linux shell中如何使用ftp命令。包括如何连接FTP服务器,上传或下载文件以及创建文件夹。尽管现在有许多不错的FTP桌面应用,但是在服务器、ssh、远程回话中命令行ftp命令还是有很多应用的。比如。需要服务器从ftp仓库拉取备份。 -### Step 1: Establishing an FTP connection ### +### 步骤 1: 建立FTP连接 ### -To connect to the FTP server, we have to type in the terminal window '**ftp**' and then the domain name 'domain.com' or IP address of the FTP server. -#### Examples: #### +想要连接FTP服务器,在命令上中先输入'**ftp**'然后空格跟上FTP服务器的域名'domain.com'或者IP地址 + +#### 例如: #### ftp domain.com @@ -16,42 +15,43 @@ To connect to the FTP server, we have to type in the terminal window '**ftp**' a ftp user@ftpdomain.com -**Note: for this example we used an anonymous server.** +**注意: 本次例子使用匿名服务器.** -Replace the IP and domain in the above examples with the IP address or domain of your FTP server. +替换下面例子中IP或域名为你的服务器地址。 -![The FTP login.](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/ftpanonymous.png) +![FTP登录](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/ftpanonymous.png) -### Step 2: Login with User and Password ### +### 步骤 2: 使用用户名密码登录 ### -Most FTP servers logins are password protected, so the server will ask us for a '**username**' and a '**password**'. +绝大多数的FTP服务器是使用密码保护的,因此这些FTP服务器会询问'**用户名**'和'**密码**'. -If you connect to a so-called anonymous FTP server, then try to use "anonymous" as user name and a nempty password: +如果你连接到被动匿名FTP服务器,可以尝试"anonymous"作为用户名以及空密码: Name: anonymous Password: -The terminal will return a message like this: +之后,终端会返回如下的信息: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> -When you are logged in successfully. +登录成功。 -![Successful FTP login.](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/login.png) +![FTP登录成功](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/login.png) -### Step 3: Working with Directories ### +### 步骤 3: 目录操作 ### -The commands to list, move and create folders on an FTP server are almost the same as we would use locally on our computer, ls for list, cd to change directories, mkdir to create directories... +FTP命令可以列出、移动和创建文件夹,如同我们在本地使用我们的电脑一样。ls可以打印目录列表,cd可以改变目录,mkdir可以创建文件夹。 + +#### 使用安全设置列出目录 #### -#### Listing directories with security settings: #### ftp> ls -The server will return: +服务器将返回: 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. @@ -60,35 +60,35 @@ The server will return: .... 226 Directory send OK. -![List directories](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/listing.png) +![打印目录](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/listing.png) -#### Changing Directories: #### +#### 改变目录: #### -To change the directory we can type: +改变目录可以输入: ftp> cd directory -The server will return: +服务器将会返回: 250 Directory succesfully changed. -![Change a directory in FTP.](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/directory.png) +![FTP中改变目录](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/directory.png) -### Step 4: Downloading files with FTP ### +### 步骤 4: 使用FTP下载文件 ### -Before downloading a file, we should set the local ftp file download directory by using 'lcd' command: +在下载一个文件之前,我们首先需要使用lcd命令设定本地接受目录位置。 lcd /home/user/yourdirectoryname -If you dont specify the download directory, the file will be downloaded to the current directory where you were at the time you started the FTP session. +如果你不指定下载目录,文件将会下载到你登录FTP时候的工作目录。 -Now, we can use the command 'get' command to download a file, the usage is: +现在,我们可以使用命令get来下载文件,比如: get file -The file will be downloaded to the directory previously set with the 'lcd' command. +文件会保存在使用lcd命令设置的目录位置。 -The server will return the next message: +服务器返回消息: local: file remote: file 200 PORT command successful. Consider using PASV. @@ -96,31 +96,31 @@ The server will return the next message: 226 File send OK. XXX bytes received in x.xx secs (x.xxx MB/s). -![Download a file with FTP.](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/gettingfile.png) +![使用FTP下载文件](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/gettingfile.png) -To download several files we can use wildcards. In this example I will download all files with the .xls file extension. +下载多个文件可以使用通配符。例如,下面这个例子我打算下载所有以.xls结尾的文件。 mget *.xls -### Step 5: Uploading Files with FTP ### +### 步骤 5: 使用FTP上传文件 ### -We can upload files that are in the local directory where we made the FTP connection. +完成FTP连接后,FTP同样可以上传文件 -To upload a file, we can use 'put' command. +使用put命令上传文件: put file -When the file that you want to upload is not in the local directory, you can use the absolute path starting with "/" as well: +当文件不再当前本地目录下的时候,可以使用绝对路径: put /path/file -To upload several files we can use the mput command similar to the mget example from above: +同样,可以上传多个文件: mput *.xls -### Step 6: Closing the FTP connection ### +### 步骤 6: 关闭FTP连接 ### -Once we have done the FTP work, we should close the connection for security reasons. There are three commands that we can use to close the connection: +完成FTP工作后,为了安全起见需要关闭连接。有三个命令可以关闭连接: bye @@ -128,13 +128,13 @@ Once we have done the FTP work, we should close the connection for security reas quit -Any of them will disconnect our PC from the FTP server and will return: +任意一个命令可以断开FTP服务器连接并返回: 221 Goodbye ![](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/goodbye.png) -If you need some additional help, once you are connected to the FTP server, type 'help' and this will show you all the available FTP commands. +需要更多帮助,在使用ftp命令连接到服务器后,可以使用“help”获得更多帮助。 ![](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/helpwindow.png) @@ -142,7 +142,7 @@ If you need some additional help, once you are connected to the FTP server, type via: https://www.howtoforge.com/tutorial/how-to-use-ftp-on-the-linux-shell/ -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7a7b85199776f9fcde71058c673bd6803e055863 Mon Sep 17 00:00:00 2001 From: Vic020 Date: Tue, 8 Dec 2015 19:01:46 +0800 Subject: [PATCH 0522/1710] Translated and Moved --- ...he Linux ftp command to up- and download files on the shell.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md (100%) diff --git a/sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md b/translated/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md similarity index 100% rename from sources/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md rename to translated/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md From 1659dda4ff32ab45ead30ffd0b972d55435fb4be Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 8 Dec 2015 19:52:42 +0800 Subject: [PATCH 0523/1710] Update 20151208 Install Wetty on Centos or RHEL 6.X.md --- sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md b/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md index 6856b1d71e..e675537c90 100644 --- a/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md +++ b/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Install Wetty on Centos/RHEL 6.X ================================================================================ ![](http://www.unixmen.com/wp-content/uploads/2015/11/Terminal.png) @@ -58,4 +59,4 @@ via: http://www.unixmen.com/install-wetty-centosrhel-6-x/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/debjyoti/ \ No newline at end of file +[a]:http://www.unixmen.com/author/debjyoti/ From 5e3ef89bfea721c5087f7e93f0e5a65391222ce5 Mon Sep 17 00:00:00 2001 From: runningwater Date: Tue, 8 Dec 2015 23:05:43 +0800 Subject: [PATCH 0524/1710] =?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 --- ...l series 2--Regular Expressions In grep.md | 290 ------------------ ...l series 2--Regular Expressions In grep.md | 288 +++++++++++++++++ 2 files changed, 288 insertions(+), 290 deletions(-) delete mode 100644 sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md create mode 100755 translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md deleted file mode 100644 index 8bac50fe25..0000000000 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md +++ /dev/null @@ -1,290 +0,0 @@ -(translating by runningwater) -Regular Expressions In grep -================================================================================ -How do I use the Grep command with regular expressions on a Linux and Unix-like operating systems? - -Linux comes with GNU grep, which supports extended regular expressions. GNU grep is the default on all Linux systems. The grep command is used to locate information stored anywhere on your server or workstation. - -### Regular Expressions ### - -Regular Expressions is nothing but a pattern to match for each input line. A pattern is a sequence of characters. Following all are examples of pattern: - - ^w1 - w1|w2 - [^ ] - -#### grep Regular Expressions Examples #### - -Search for 'vivek' in /etc/passswd - - grep vivek /etc/passwd - -Sample outputs: - - vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash - vivekgite:x:1001:1001::/home/vivekgite:/bin/sh - gitevivek:x:1002:1002::/home/gitevivek:/bin/sh - -Search vivek in any case (i.e. case insensitive search) - - grep -i -w vivek /etc/passwd - -Search vivek or raj in any case - - grep -E -i -w 'vivek|raj' /etc/passwd - -The PATTERN in last example, used as an extended regular expression. - -### Anchors ### - -You can use ^ and $ to force a regex to match only at the start or end of a line, respectively. The following example displays lines starting with the vivek only: - - grep ^vivek /etc/passwd - -Sample outputs: - - vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash - vivekgite:x:1001:1001::/home/vivekgite:/bin/sh - -You can display only lines starting with the word vivek only i.e. do not display vivekgite, vivekg etc: - - grep -w ^vivek /etc/passwd - -Find lines ending with word foo: -grep 'foo$' filename - -Match line only containing foo: - - grep '^foo$' filename - -You can search for blank lines with the following examples: - - grep '^$' filename - -### Character Class ### - -Match Vivek or vivek: - - grep '[vV]ivek' filename - -OR - - grep '[vV][iI][Vv][Ee][kK]' filename - -You can also match digits (i.e match vivek1 or Vivek2 etc): - - grep -w '[vV]ivek[0-9]' filename - -You can match two numeric digits (i.e. match foo11, foo12 etc): - - grep 'foo[0-9][0-9]' filename - -You are not limited to digits, you can match at least one letter: - - grep '[A-Za-z]' filename - -Display all the lines containing either a "w" or "n" character: - - grep [wn] filename - -Within a bracket expression, the name of a character class enclosed in "[:" and ":]" stands for the list of all characters belonging to that class. Standard character class names are: - -- [:alnum:] - Alphanumeric characters. -- [:alpha:] - Alphabetic characters -- [:blank:] - Blank characters: space and tab. -- [:digit:] - Digits: '0 1 2 3 4 5 6 7 8 9'. -- [:lower:] - Lower-case letters: 'a b c d e f g h i j k l m n o p q r s t u v w x y z'. -- [:space:] - Space characters: tab, newline, vertical tab, form feed, carriage return, and space. -- [:upper:] - Upper-case letters: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'. - -In this example match all upper case letters: - - grep '[:upper:]' filename - -### Wildcards ### - -You can use the "." for a single character match. In this example match all 3 character word starting with "b" and ending in "t": - - grep '\' filename - -Where, - -- \< Match the empty string at the beginning of word -- \> Match the empty string at the end of word. - -Print all lines with exactly two characters: - - grep '^..$' filename - -Display any lines starting with a dot and digit: - - grep '^\.[0-9]' filename - -#### Escaping the dot #### - -The following regex to find an IP address 192.168.1.254 will not work: - - grep '192.168.1.254' /etc/hosts - -All three dots need to be escaped: - - grep '192\.168\.1\.254' /etc/hosts - -The following example will only match an IP address: - - egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' filename - -The following will match word Linux or UNIX in any case: - - egrep -i '^(linux|unix)' filename - -### How Do I Search a Pattern Which Has a Leading - Symbol? ### - -Searches for all lines matching '--test--' using -e option Without -e, grep would attempt to parse '--test--' as a list of options: - - grep -e '--test--' filename - -### How Do I do OR with grep? ### - -Use the following syntax: - - grep 'word1|word2' filename - -OR - - grep 'word1\|word2' filename - -### How Do I do AND with grep? ### - -Use the following syntax to display all lines that contain both 'word1' and 'word2' - - grep 'word1' filename | grep 'word2' - -### How Do I Test Sequence? ### - -You can test how often a character must be repeated in sequence using the following syntax: - - {N} - {N,} - {min,max} - -Match a character "v" two times: - - egrep "v{2}" filename - -The following will match both "col" and "cool": - - egrep 'co{1,2}l' filename - -The following will match any row of at least three letters 'c'. - - egrep 'c{3,}' filename - -The following example will match mobile number which is in the following format 91-1234567890 (i.e twodigit-tendigit) - - grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" filename - -### How Do I Hightlight with grep? ### - -Use the following syntax: - - grep --color regex filename - -How Do I Show Only The Matches, Not The Lines? - -Use the following syntax: - - grep -o regex filename - -### Regular Expression Operator ### - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Regex operatorMeaning
.Matches any single character.
?The preceding item is optional and will be matched, at most, once.
*The preceding item will be matched zero or more times.
+The preceding item will be matched one or more times.
{N}The preceding item is matched exactly N times.
{N,}The preceding item is matched N or more times.
{N,M}The preceding item is matched at least N times, but not more than M times.
-Represents the range if it's not first or last in a list or the ending point of a range in a list.
^Matches the empty string at the beginning of a line; also represents the characters not in the range of a list.
$Matches the empty string at the end of a line.
\bMatches the empty string at the edge of a word.
\BMatches the empty string provided it's not at the edge of a word.
\<Match the empty string at the beginning of word.
\> Match the empty string at the end of word.
- -#### grep vs egrep #### - -egrep is the same as **grep -E**. It interpret PATTERN as an extended regular expression. From the grep man page: - - In basic regular expressions the meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the backslashed versions \?, \+, \{, - \|, \(, and \). - Traditional egrep did not support the { meta-character, and some egrep implementations support \{ instead, so portable scripts should avoid { in - grep -E patterns and should use [{] to match a literal {. - GNU grep -E attempts to support traditional usage by assuming that { is not special if it would be the start of an invalid interval specification. - For example, the command grep -E '{1' searches for the two-character string {1 instead of reporting a syntax error in the regular expression. - POSIX.2 allows this behavior as an extension, but portable scripts should avoid it. - -References: - -- man page grep and regex(7) -- info page grep` - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/grep-regular-expressions/ - -作者:Vivek Gite -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md new file mode 100755 index 0000000000..8389f4c339 --- /dev/null +++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md @@ -0,0 +1,288 @@ +## grep 中的正则表达式 +================================================================================ +在 Linux 、类 Unix 系统中我该如何使用 Grep 命令的正则表达式呢? + +Linux 附带有 GNU grep 命令工具,它支持正则表达式,而且 GNU grep 在所有的 Linux 系统中都是默认有的。Grep 命令被用于搜索定位存储在您服务器或工作站的信息。 + +### 正则表达式 ### + +正则表达式仅仅是对每个输入行的匹配的一种模式,即对字符序列的匹配模式。下面是范例: + + ^w1 + w1|w2 + [^ ] + +#### grep 正则表达式示例 #### + +在 /etc/passswd 目录中搜索 'vivek' + + grep vivek /etc/passwd + +输出例子: + + vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash + vivekgite:x:1001:1001::/home/vivekgite:/bin/sh + gitevivek:x:1002:1002::/home/gitevivek:/bin/sh + +摸索任何情况下的 vivek(即不区分大小写的搜索) + + grep -i -w vivek /etc/passwd + +摸索任何情况下的 vivek 或 raj + + grep -E -i -w 'vivek|raj' /etc/passwd + +上面最后的例子显示的,就是一个正则表达式扩展的模式。 + +### 锚 ### + +你可以分别使用 ^ 和 $ 符号来正则匹配输入行的开始或结尾。下面的例子搜索显示仅仅以 vivek 开始的输入行: + + grep ^vivek /etc/passwd + +输出例子: + + vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash + vivekgite:x:1001:1001::/home/vivekgite:/bin/sh + +你可以仅仅只搜索出以单词 vivek 开始的行,即不显示 vivekgit、vivekg 等 + + grep -w ^vivek /etc/passwd + +找出以单词 word 结尾的行: + + grep 'foo$' 文件名 + +匹配仅仅只包含 foo 的行: + + grep '^foo$' 文件名 + +如下所示的例子可以搜索空行: + + grep '^$' 文件名 + +### 字符类 ### + +匹配 Vivek 或 vivek: + + grep '[vV]ivek' 文件名 + +或者 + + grep '[vV][iI][Vv][Ee][kK]' 文件名 + +也可以匹配数字 (即匹配 vivek1 或 Vivek2 等等): + + grep -w '[vV]ivek[0-9]' 文件名 + +可以匹配两个数字字符(即 foo11、foo12 等): + + grep 'foo[0-9][0-9]' 文件名 + +不仅仅局限于数字,也能匹配至少一个字母的: + + grep '[A-Za-z]' 文件名 + +显示含有"w" 或 "n" 字符的所有行: + + grep [wn] 文件名 + +在括号内的表达式,即包在"[:" 和 ":]" 之间的字符类的名字,它表示的是属于此类的所有字符列表。标准的字符类名称如下: + +- [:alnum:] - 字母数字字符. +- [:alpha:] - 字母字符 +- [:blank:] - 空字符: 空格键符 和 制表符. +- [:digit:] - 数字: '0 1 2 3 4 5 6 7 8 9'. +- [:lower:] - 小写字母: 'a b c d e f g h i j k l m n o p q r s t u v w x y z'. +- [:space:] - 空格字符: 制表符、换行符、垂直制表符、换页符、回车符和空格键符. +- [:upper:] - 大写字母: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'. + +例子所示的是匹配所有大写字母: + + grep '[:upper:]' 文件名 + +### 通配符 ### + +你可以使用 "." 来匹配单个字符。例子中匹配以"b"开头以"t"结尾的3个字符的单词: + + grep '\' 文件名 + +在这儿, + +- \< 匹配单词前面的空字符串 +- \> 匹配单词后面的空字符串 + +打印出只有两个字符的所有行: + + grep '^..$' 文件名 + +显示以一个点和一个数字开头的行: + + grep '^\.[0-9]' 文件名 + +#### 点号转义 #### + +下面要匹配到 IP 地址为 192.168.1.254 的正则式是不会工作的: + + egrep '192.168.1.254' /etc/hosts + +三个点符号都需要转义: + + grep '192\.168\.1\.254' /etc/hosts + +下面的例子仅仅匹配出 IP 地址: + + egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' 文件名 + +下面的例子会匹配任意大小写的 Linux 或 UNIX 这两个单词: + + egrep -i '^(linux|unix)' 文件名 + +### 怎么样搜索以 - 符号开头的匹配模式? ### + +要使用 -e 选项来搜索匹配 '--test--' 字符串,如果不使用 -e 选项,grep 命令会试图把 '--test--' 当作自己的选项参数来解析: + + grep -e '--test--' 文件名 + +### 怎么使用 grep 的 OR 匹配? ### + +使用如下的语法: + + grep 'word1|word2' 文件名 + +或者是 + + grep 'word1\|word2' 文件名 + +### 怎么使用 grep 的 AND 匹配? ### + +使用下面的语法来显示既包含 'word1' 又包含 'word2' 的所有行 + + grep 'word1' 文件名 | grep 'word2' + +### 怎么样使用序列检测? ### + +使用如下的语法,您可以检测一个字符在序列中重复出现次数: + + {N} + {N,} + {min,max} + +要匹配字符 “v" 出现两次: + + egrep "v{2}" 文件名 + +下面的命令能匹配到 "col" 和 "cool" : + + egrep 'co{1,2}l' 文件名 + +下面的命令将会匹配出至少有三个 'c' 字符的所有行。 + + egrep 'c{3,}' 文件名 + +下面的例子会匹配 91-1234567890(即二个数字-十个数字) 这种格式的手机号。 + + grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" 文件名 + +### 怎么样使 grep 命令突出显示?### + +使用如下的语法: + + grep --color regex 文件名 + +### 怎么样仅仅只显示匹配出的字符,而不是匹配出的行? ### + +使用如下语法: + + grep -o regex 文件名 + +### 正则表达式限定符### + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
限定符描述
.匹配任意的一个字符.
?匹配前面的子表达式,最多一次。
*匹配前面的子表达式零次或多次。
+匹配前面的子表达式一次或多次。
{N}匹配前面的子表达式 N 次。
{N,}匹配前面的子表达式 N 次到多次。
{N,M}匹配前面的子表达式 N 到 M 次,至少 N 次至多 M 次。
-只要不是在序列开始、结尾或者序列的结束点上,表示序列范围
^匹配一行开始的空字符串;也表示字符不在要匹配的列表中。
$匹配一行末尾的空字符串。
\b匹配一个单词前后的空字符串。
\B匹配一个单词中间的空字符串
\<匹配单词前面的空字符串。
\> 匹配单词后面的空字符串。
+ +#### grep 和 egrep #### + +egrep 跟 **grep -E** 是一样的。他会以正则表达式的模式来解释。下面是 grep 的帮助页(man): + + 基本的正则表达式元字符 ?、+、 {、 |、 ( 和 ) 已经失去了他们特殊的意义,要使用的话用反斜线的版本 \?、\+、\{、\|、\( 和 \) 来代替。 + 传统的 egrep 不支持 { 元字符,一些 egrep 的实现是以 \{ 替代的,所以有 grep -E 的通用脚本应该避免使用 { 符号,要匹配字面的 { 应该使用 [}]。 + GNU grep -E 试图支持传统的用法,如果 { 出在在无效的间隔规范字符串这前,它就会假定 { 不是特殊字符。 + 例如,grep -E '{1' 命令搜索包含 {1 两个字符的串,而不会报出正则表达式语法错误。 + POSIX.2 标准允许对这种操作的扩展,但在可移植脚本文件里应该避免这样使用。 + +引用: + +- grep 和 regex 帮助手册页(7) +- grep 的 info 页` + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/grep-regular-expressions/ + +作者:Vivek Gite +译者:[runningwater](https://github.com/runningwater) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From 3951fe4a0d4ad6da3771fcfde8f9ebed2313c9e0 Mon Sep 17 00:00:00 2001 From: runningwater Date: Tue, 8 Dec 2015 23:22:51 +0800 Subject: [PATCH 0525/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20ru?= =?UTF-8?q?nningwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rch Multiple Words or String Pattern Using grep Command.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md index bb12d2e1b3..bd58e78535 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md @@ -1,4 +1,4 @@ -Search Multiple Words / String Pattern Using grep Command +(翻译中 by runningwater)Search Multiple Words / String Pattern Using grep Command ================================================================================ How do I search multiple strings or words using the grep command? For example I'd like to search word1, word2, word3 and so on within /path/to/file. How do I force grep to search multiple words? @@ -33,7 +33,7 @@ Fig.01: Linux / Unix egrep Command Search Multiple Words Demo Output via: http://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/ 作者:Vivek Gite -译者:[译者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 03c4e1a402e9dd593ba5848b8b34f5bbaa3f7fa8 Mon Sep 17 00:00:00 2001 From: ezio Date: Wed, 9 Dec 2015 09:55:49 +0800 Subject: [PATCH 0526/1710] translate finished --- ... Doubly linked list in the Linux Kernel.md | 51 ++++++++++++++----- 1 file changed, 38 insertions(+), 13 deletions(-) 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 index 96a515fe93..00da2d9d00 100644 --- a/sources/tech/20151122 Doubly linked list in the Linux Kernel.md +++ b/sources/tech/20151122 Doubly linked list in the Linux Kernel.md @@ -1,6 +1,4 @@ -translating by Ezio - -Data Structures in the Linux Kernel +Data Structures in the Linux Kernel——Doubly linked list ================================================================================ 双向链表 @@ -43,12 +41,14 @@ struct nmi_desc { ``` 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: +让我们看几个例子来理解一下在内核里是如何使用`list_head` 的。如上所述,在内核里有实在很多不同的地方用到了链表。我们来看一个在杂项字符驱动里面的使用的例子。在 [drivers/char/misc.c](https://github.com/torvalds/linux/blob/master/drivers/char/misc.c) 的杂项字符驱动API 被用来编写处理小型硬件和虚拟设备的小驱动。这些驱动共享相同的主设备号: ```C #define MISC_MAJOR 10 ``` but have their own minor number. For example you can see it with: +但是都有各自不同的次设备号。比如: ``` ls -l /dev | grep 10 @@ -75,6 +75,7 @@ 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: +现在让我们看看它是如何使用链表的。首先看一下结构体`miscdevice`: ```C struct miscdevice @@ -91,12 +92,14 @@ struct miscdevice ``` 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: +可以看到结构体的第四个变量`list` 是所有注册过的设备的链表。在源代码文件的开始可以看到这个链表的定义: ```C static LIST_HEAD(misc_list); ``` which expands to the definition of variables with `list_head` type: +它实际上是对用`list_head` 类型定义的变量的扩展。 ```C #define LIST_HEAD(name) \ @@ -104,18 +107,21 @@ which expands to the definition of variables with `list_head` type: ``` and initializes it with the `LIST_HEAD_INIT` macro, which sets previous and next entries with the address of variable - name: +然后使用宏`LIST_HEAD_INIT` 进行初始化,这会使用变量`name` 的地址来填充`prev`和`next` 结构体的两个变量。 ```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: +现在来看看注册杂项设备的函数`misc_register`。它在开始就用 `INIT_LIST_HEAD` 初始化了`miscdevice->list`。 ```C INIT_LIST_HEAD(&misc->list); ``` which does the same as the `LIST_HEAD_INIT` macro: +作用和宏`LIST_HEAD_INIT`一样。 ```C static inline void INIT_LIST_HEAD(struct list_head *list) @@ -126,12 +132,15 @@ static inline void INIT_LIST_HEAD(struct list_head *list) ``` In the next step after a device is created by the `device_create` function, we add it to the miscellaneous devices list with: +在函数`device_create` 创建了设备后我们就用下面的语句将设备添加到设备链表: ``` 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: +内核文件`list.h` 提供了项链表添加新项的API 接口。我们来看看它的实现: + ```C static inline void list_add(struct list_head *new, struct list_head *head) @@ -141,12 +150,14 @@ static inline void list_add(struct list_head *new, struct list_head *head) ``` It just calls internal function `__list_add` with the 3 given parameters: +实际上就是使用3个指定的参数来调用了内部函数`__list_add`: -* new - new entry. -* head - list head after which the new item will be inserted. -* head->next - next item after list head. +* new - 新项。 +* head - 新项将会被添加到`head`之前. +* head->next - `head` 之后的项。 Implementation of the `__list_add` is pretty simple: +`__list_add`的实现非常简单: ```C static inline void __list_add(struct list_head *new, @@ -161,8 +172,10 @@ static inline void __list_add(struct list_head *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`. +我们会在`prev`和`next` 之间添加一个新项。所以我们用宏`LIST_HEAD_INIT`定义的`misc` 链表会包含指向`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) \ @@ -170,25 +183,29 @@ There is still one question: how to get list's entry. There is a special macro: ``` which gets three parameters: +使用了三个参数: -* ptr - the structure list_head pointer; -* type - structure type; -* member - the name of the list_head within the structure; +* ptr - 指向链表头的指针; +* type - 结构体类型; +* member - 在结构体内类型为`list_head` 的变量的名字; 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: - +然后我们就可以使用`p->minor` 或者 `p->name`来访问`miscdevice`。让我们来看看`list_entry` 的实现: + ```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: +如我们所见,它仅仅使用相同的参数调用了宏`container_of`。初看这个宏挺奇怪的: ```C #define container_of(ptr, type, member) ({ \ @@ -197,8 +214,10 @@ As we can see it just calls `container_of` macro with the same arguments. At fir ``` 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 @@ -211,8 +230,10 @@ int main() { ``` will print `2`. +最终会打印`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: +下一点就是`typeof`,它也很简单。就如你从名字所理解的,它仅仅返回了给定变量的类型。当我第一次看到宏`container_of`的实现时,让我觉得最奇怪的就是`container_of`中的0.实际上这个指针巧妙的计算了从结构体特定变量的偏移,这里的`0`刚好就是位宽里的零偏移。让我们看一个简单的例子: ```C #include @@ -220,7 +241,7 @@ The next point is `typeof`, it's simple. As you can understand from its name, it struct s { int field1; char field2; - char field3; + char field3; }; int main() { @@ -230,16 +251,20 @@ int main() { ``` will print `0x5`. +结果显示`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: +下一个宏`offsetof` 会计算从结构体的某个变量的相对于结构体起始地址的偏移。它的实现和上面类似: ```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. +现在我们来总结一下宏`container_of`。只需要知道结构体里面类型为`list_head` 的变量的名字和结构体容器的类型,它可以通过结构体的变量`list_head`获得结构体的起始地址。在宏定义的第一行,声明了一个指向结构体成员变量`ptr`的指针`__mptr`,并且把`ptr` 的地址赋给它。现在`ptr` 和`__mptr` 指向了同一个地址。从技术上讲我们并不需要这一行,但是它可以方便的进行类型检查。第一行保证了特定的结构体(参数`type`)包含成员变量`member`。第二行代码会用宏`offsetof`计算成员变量相对于结构体起始地址的偏移,然后从结构体的地址减去这个偏移,最后就得到了结构体。 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_entry`不是``提供的唯一功能。双向链表的实现还提供了如下API: * list_add * list_add_tail @@ -254,11 +279,11 @@ Of course `list_add` and `list_entry` is not the only functions which ` Date: Wed, 9 Dec 2015 09:58:27 +0800 Subject: [PATCH 0527/1710] clean --- ... Doubly linked list in the Linux Kernel.md | 37 ++----------------- 1 file changed, 3 insertions(+), 34 deletions(-) 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 index 00da2d9d00..631d918813 100644 --- a/sources/tech/20151122 Doubly linked list in the Linux Kernel.md +++ b/sources/tech/20151122 Doubly linked list in the Linux Kernel.md @@ -1,13 +1,12 @@ -Data Structures in the Linux Kernel——Doubly linked list +Linux 内核里的数据结构——双向链表 ================================================================================ 双向链表 -------------------------------------------------------------------------------- -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) + Linux 内核自己实现了双向链表,可以在[include/linux/list.h](https://github.com/torvalds/linux/blob/master/include/linux/list.h)找到定义。我们将会从双向链表数据结构开始`内核的数据结构`。为什么?因为它在内核里使用的很广泛,你只需要在[free-electrons.com](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): 首先让我们看一下在[include/linux/types.h](https://github.com/torvalds/linux/blob/master/include/linux/types.h) 里的主结构体: ```C @@ -16,7 +15,6 @@ struct list_head { }; ``` -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 : 你可能注意到这和你以前见过的双向链表的实现方法是不同的。举个例子来说,在[glib](http://www.gnu.org/software/libc/) 库里是这样实现的: ```C @@ -27,10 +25,8 @@ struct GList { }; ``` -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 @@ -40,14 +36,12 @@ struct nmi_desc { }; ``` -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: 让我们看几个例子来理解一下在内核里是如何使用`list_head` 的。如上所述,在内核里有实在很多不同的地方用到了链表。我们来看一个在杂项字符驱动里面的使用的例子。在 [drivers/char/misc.c](https://github.com/torvalds/linux/blob/master/drivers/char/misc.c) 的杂项字符驱动API 被用来编写处理小型硬件和虚拟设备的小驱动。这些驱动共享相同的主设备号: ```C #define MISC_MAJOR 10 ``` -but have their own minor number. For example you can see it with: 但是都有各自不同的次设备号。比如: ``` @@ -74,7 +68,6 @@ 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: 现在让我们看看它是如何使用链表的。首先看一下结构体`miscdevice`: ```C @@ -91,14 +84,12 @@ struct miscdevice }; ``` -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: 可以看到结构体的第四个变量`list` 是所有注册过的设备的链表。在源代码文件的开始可以看到这个链表的定义: ```C static LIST_HEAD(misc_list); ``` -which expands to the definition of variables with `list_head` type: 它实际上是对用`list_head` 类型定义的变量的扩展。 ```C @@ -106,21 +97,18 @@ which expands to the definition of variables with `list_head` type: 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: 然后使用宏`LIST_HEAD_INIT` 进行初始化,这会使用变量`name` 的地址来填充`prev`和`next` 结构体的两个变量。 ```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: 现在来看看注册杂项设备的函数`misc_register`。它在开始就用 `INIT_LIST_HEAD` 初始化了`miscdevice->list`。 ```C INIT_LIST_HEAD(&misc->list); ``` -which does the same as the `LIST_HEAD_INIT` macro: 作用和宏`LIST_HEAD_INIT`一样。 ```C @@ -131,14 +119,12 @@ static inline void INIT_LIST_HEAD(struct list_head *list) } ``` -In the next step after a device is created by the `device_create` function, we add it to the miscellaneous devices list with: 在函数`device_create` 创建了设备后我们就用下面的语句将设备添加到设备链表: ``` 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: 内核文件`list.h` 提供了项链表添加新项的API 接口。我们来看看它的实现: @@ -149,14 +135,12 @@ static inline void list_add(struct list_head *new, struct list_head *head) } ``` -It just calls internal function `__list_add` with the 3 given parameters: 实际上就是使用3个指定的参数来调用了内部函数`__list_add`: * new - 新项。 * head - 新项将会被添加到`head`之前. * head->next - `head` 之后的项。 -Implementation of the `__list_add` is pretty simple: `__list_add`的实现非常简单: ```C @@ -171,10 +155,8 @@ static inline void __list_add(struct list_head *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`. 我们会在`prev`和`next` 之间添加一个新项。所以我们用宏`LIST_HEAD_INIT`定义的`misc` 链表会包含指向`miscdevice->list` 的向前指针和向后指针。 -There is still one question: how to get list's entry. There is a special macro: 这里有一个问题:如何得到列表的内容呢?这里有一个特殊的宏: ```C @@ -182,21 +164,18 @@ There is still one question: how to get list's entry. There is a special macro: container_of(ptr, type, member) ``` -which gets three parameters: 使用了三个参数: * ptr - 指向链表头的指针; * type - 结构体类型; * member - 在结构体内类型为`list_head` 的变量的名字; -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: 然后我们就可以使用`p->minor` 或者 `p->name`来访问`miscdevice`。让我们来看看`list_entry` 的实现: ```C @@ -204,7 +183,6 @@ After this we can access to any `miscdevice` field with `p->minor` or `p->name` 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: 如我们所见,它仅仅使用相同的参数调用了宏`container_of`。初看这个宏挺奇怪的: ```C @@ -213,10 +191,8 @@ As we can see it just calls `container_of` macro with the same arguments. At fir (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: 举个例子来说: ``` @@ -229,10 +205,8 @@ int main() { } ``` -will print `2`. 最终会打印`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: 下一点就是`typeof`,它也很简单。就如你从名字所理解的,它仅仅返回了给定变量的类型。当我第一次看到宏`container_of`的实现时,让我觉得最奇怪的就是`container_of`中的0.实际上这个指针巧妙的计算了从结构体特定变量的偏移,这里的`0`刚好就是位宽里的零偏移。让我们看一个简单的例子: ```C @@ -250,20 +224,16 @@ int main() { } ``` -will print `0x5`. 结果显示`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: 下一个宏`offsetof` 会计算从结构体的某个变量的相对于结构体起始地址的偏移。它的实现和上面类似: ```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. 现在我们来总结一下宏`container_of`。只需要知道结构体里面类型为`list_head` 的变量的名字和结构体容器的类型,它可以通过结构体的变量`list_head`获得结构体的起始地址。在宏定义的第一行,声明了一个指向结构体成员变量`ptr`的指针`__mptr`,并且把`ptr` 的地址赋给它。现在`ptr` 和`__mptr` 指向了同一个地址。从技术上讲我们并不需要这一行,但是它可以方便的进行类型检查。第一行保证了特定的结构体(参数`type`)包含成员变量`member`。第二行代码会用宏`offsetof`计算成员变量相对于结构体起始地址的偏移,然后从结构体的地址减去这个偏移,最后就得到了结构体。 -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_entry`不是``提供的唯一功能。双向链表的实现还提供了如下API: * list_add @@ -278,8 +248,7 @@ Of course `list_add` and `list_entry` is not the only functions which ` Date: Wed, 9 Dec 2015 09:59:42 +0800 Subject: [PATCH 0528/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E5=8A=A8=E5=88=B0translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20151122 Doubly linked list in the Linux Kernel.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151122 Doubly linked list in the Linux Kernel.md (100%) diff --git a/sources/tech/20151122 Doubly linked list in the Linux Kernel.md b/translated/tech/20151122 Doubly linked list in the Linux Kernel.md similarity index 100% rename from sources/tech/20151122 Doubly linked list in the Linux Kernel.md rename to translated/tech/20151122 Doubly linked list in the Linux Kernel.md From 6fe786d73564184151d07193f67fb85e4f345cf2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 9 Dec 2015 10:10:55 +0800 Subject: [PATCH 0529/1710] Delete 20151203 Getting started with Docker by Dockerizing this Blog.md --- ...ed with Docker by Dockerizing this Blog.md | 375 ------------------ 1 file changed, 375 deletions(-) delete mode 100644 sources/tech/20151203 Getting started with Docker by Dockerizing this Blog.md diff --git a/sources/tech/20151203 Getting started with Docker by Dockerizing this Blog.md b/sources/tech/20151203 Getting started with Docker by Dockerizing this Blog.md deleted file mode 100644 index 1f69a4adba..0000000000 --- a/sources/tech/20151203 Getting started with Docker by Dockerizing this Blog.md +++ /dev/null @@ -1,375 +0,0 @@ -Getting started with Docker by Dockerizing this Blog -====================== ->This article covers the basic concepts of Docker and how to Dockerize an application by creating a custom Dockerfile ->Written by Benjamin Cane on 2015-12-01 10:00:00 - -Docker is an interesting technology that over the past 2 years has gone from an idea, to being used by organizations all over the world to deploy applications. In today's article I am going to cover how to get started with Docker by "Dockerizing" an existing application. The application in question is actually this very blog! - -What is Docker -============ -============ - -Before we dive into learning the basics of Docker let's first understand what Docker is and why it is so popular. Docker, is an operating system container management tool that allows you to easily manage and deploy applications by making it easy to package them within operating system containers. - -### Containers vs. Virtual Machines - -Containers may not be as familiar as virtual machines but they are another method to provide Operating System Virtualization. However, they differ quite a bit from standard virtual machines. - -Standard virtual machines generally include a full Operating System, OS Packages and eventually an Application or two. This is made possible by a Hypervisor which provides hardware virtualization to the virtual machine. This allows for a single server to run many standalone operating systems as virtual guests. - -Containers are similar to virtual machines in that they allow a single server to run multiple operating environments, these environments however, are not full operating systems. Containers generally only include the necessary OS Packages and Applications. They do not generally contain a full operating system or hardware virtualization. This also means that containers have a smaller overhead than traditional virtual machines. - -Containers and Virtual Machines are often seen as conflicting technology, however, this is often a misunderstanding. Virtual Machines are a way to take a physical server and provide a fully functional operating environment that shares those physical resources with other virtual machines. A Container is generally used to isolate a running process within a single host to ensure that the isolated processes cannot interact with other processes within that same system. In fact containers are closer to BSD Jails and chroot'ed processes than full virtual machines. - -### What Docker provides on top of containers - -Docker itself is not a container runtime environment; in fact Docker is actually container technology agnostic with efforts planned for Docker to support Solaris Zones and BSD Jails. What Docker provides is a method of managing, packaging, and deploying containers. While these types of functions may exist to some degree for virtual machines they traditionally have not existed for most container solutions and the ones that existed, were not as easy to use or fully featured as Docker. - -Now that we know what Docker is, let's start learning how Docker works by first installing Docker and deploying a public pre-built container. - -## Starting with Installation -As Docker is not installed by default step 1 will be to install the Docker package; since our example system is running Ubuntu 14.0.4 we will do this using the Apt package manager. - -# apt-get install docker.io -Reading package lists... Done -Building dependency tree -Reading state information... Done -The following extra packages will be installed: - aufs-tools cgroup-lite git git-man liberror-perl -Suggested packages: - btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc - git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki - git-svn -The following NEW packages will be installed: - aufs-tools cgroup-lite docker.io git git-man liberror-perl -0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. -Need to get 7,553 kB of archives. -After this operation, 46.6 MB of additional disk space will be used. -Do you want to continue? [Y/n] y -To check if any containers are running we can execute the docker command using the ps option. - -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -The ps function of the docker command works similar to the Linux ps command. It will show available Docker containers and their current status. Since we have not started any Docker containers yet, the command shows no running containers. - -## Deploying a pre-built nginx Docker container -One of my favorite features of Docker is the ability to deploy a pre-built container in the same way you would deploy a package with yum or apt-get. To explain this better let's deploy a pre-built container running the nginx web server. We can do this by executing the docker command again, however, this time with the run option. - -# docker run -d nginx -Unable to find image 'nginx' locally -Pulling repository nginx -5c82215b03d1: Download complete -e2a4fb18da48: Download complete -58016a5acc80: Download complete -657abfa43d82: Download complete -dcb2fe003d16: Download complete -c79a417d7c6f: Download complete -abb90243122c: Download complete -d6137c9e2964: Download complete -85e566ddc7ef: Download complete -69f100eb42b5: Download complete -cd720b803060: Download complete -7cc81e9a118a: Download complete -The run function of the docker command tells Docker to find a specified Docker image and start a container running that image. By default, Docker containers run in the foreground, meaning when you execute docker run your shell will be bound to the container's console and the process running within the container. In order to launch this Docker container in the background I included the -d (detach) flag. - -By executing docker ps again we can see the nginx container running. - -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -f6d31ab01fc9 nginx:latest nginx -g 'daemon off 4 seconds ago Up 3 seconds 443/tcp, 80/tcp desperate_lalande -In the above output we can see the running container desperate_lalande and that this container has been built from the nginx:latest image. - -## Docker Images -Images are one of Docker's key features and is similar to a virtual machine image. Like virtual machine images, a Docker image is a container that has been saved and packaged. Docker however, doesn't just stop with the ability to create images. Docker also includes the ability to distribute those images via Docker repositories which are a similar concept to package repositories. This is what gives Docker the ability to deploy an image like you would deploy a package with yum. To get a better understanding of how this works let's look back at the output of the docker run execution. - -# docker run -d nginx -Unable to find image 'nginx' locally -The first message we see is that docker could not find an image named nginx locally. The reason we see this message is that when we executed docker run we told Docker to startup a container, a container based on an image named nginx. Since Docker is starting a container based on a specified image it needs to first find that image. Before checking any remote repository Docker first checks locally to see if there is a local image with the specified name. - -Since this system is brand new there is no Docker image with the name nginx, which means Docker will need to download it from a Docker repository. - -Pulling repository nginx -5c82215b03d1: Download complete -e2a4fb18da48: Download complete -58016a5acc80: Download complete -657abfa43d82: Download complete -dcb2fe003d16: Download complete -c79a417d7c6f: Download complete -abb90243122c: Download complete -d6137c9e2964: Download complete -85e566ddc7ef: Download complete -69f100eb42b5: Download complete -cd720b803060: Download complete -7cc81e9a118a: Download complete -This is exactly what the second part of the output is showing us. By default, Docker uses the Docker Hub repository, which is a repository service that Docker (the company) runs. - -Like GitHub, Docker Hub is free for public repositories but requires a subscription for private repositories. It is possible however, to deploy your own Docker repository, in fact it is as easy as docker run registry. For this article we will not be deploying a custom registry service. - -## Stopping and Removing the Container -Before moving on to building a custom Docker container let's first clean up our Docker environment. We will do this by stopping the container from earlier and removing it. - -To start a container we executed docker with the run option, in order to stop this same container we simply need to execute the docker with the kill option specifying the container name. - -# docker kill desperate_lalande -desperate_lalande -If we execute docker ps again we will see that the container is no longer running. - -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -However, at this point we have only stopped the container; while it may no longer be running it still exists. By default, docker ps will only show running containers, if we add the -a (all) flag it will show all containers running or not. - -# docker ps -a -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -f6d31ab01fc9 5c82215b03d1 nginx -g 'daemon off 4 weeks ago Exited (-1) About a minute ago desperate_lalande -In order to fully remove the container we can use the docker command with the rm option. - -# docker rm desperate_lalande -desperate_lalande -While this container has been removed; we still have a nginx image available. If we were to re-run docker run -d nginx again the container would be started without having to fetch the nginx image again. This is because Docker already has a saved copy on our local system. - -To see a full list of local images we can simply run the docker command with the images option. - -# docker images -REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE -nginx latest 9fab4090484a 5 days ago 132.8 MB -## Building our own custom image -At this point we have used a few basic Docker commands to start, stop and remove a common pre-built image. In order to "Dockerize" this blog however, we are going to have to build our own Docker image and that means creating a Dockerfile. - -With most virtual machine environments if you wish to create an image of a machine you need to first create a new virtual machine, install the OS, install the application and then finally convert it to a template or image. With Docker however, these steps are automated via a Dockerfile. A Dockerfile is a way of providing build instructions to Docker for the creation of a custom image. In this section we are going to build a custom Dockerfile that can be used to deploy this blog. - -### Understanding the Application -Before we can jump into creating a Dockerfile we first need to understand what is required to deploy this blog. - -The blog itself is actually static HTML pages generated by a custom static site generator that I wrote named; hamerkop. The generator is very simple and more about getting the job done for this blog specifically. All the code and source files for this blog are available via a public GitHub repository. In order to deploy this blog we simply need to grab the contents of the GitHub repository, install Python along with some Python modules and execute the hamerkop application. To serve the generated content we will use nginx; which means we will also need nginx to be installed. - -So far this should be a pretty simple Dockerfile, but it will show us quite a bit of the Dockerfile Syntax. To get started we can clone the GitHub repository and creating a Dockerfile with our favorite editor; vi in my case. - -# git clone https://github.com/madflojo/blog.git -Cloning into 'blog'... -remote: Counting objects: 622, done. -remote: Total 622 (delta 0), reused 0 (delta 0), pack-reused 622 -Receiving objects: 100% (622/622), 14.80 MiB | 1.06 MiB/s, done. -Resolving deltas: 100% (242/242), done. -Checking connectivity... done. -# cd blog/ -# vi Dockerfile -### FROM - Inheriting a Docker image -The first instruction of a Dockerfile is the FROM instruction. This is used to specify an existing Docker image to use as our base image. This basically provides us with a way to inherit another Docker image. In this case we will be starting with the same nginx image we were using before, if we wanted to start with a blank slate we could use the Ubuntu Docker image by specifying ubuntu:latest. - -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane -In addition to the FROM instruction, I also included a MAINTAINER instruction which is used to show the Author of the Dockerfile. - -As Docker supports using # as a comment marker, I will be using this syntax quite a bit to explain the sections of this Dockerfile. - -### Running a test build -Since we inherited the nginx Docker image our current Dockerfile also inherited all the instructions within the Dockerfile used to build that nginx image. What this means is even at this point we are able to build a Docker image from this Dockerfile and run a container from that image. The resulting image will essentially be the same as the nginx image but we will run through a build of this Dockerfile now and a few more times as we go to help explain the Docker build process. - -In order to start the build from a Dockerfile we can simply execute the docker command with the build option. - -# docker build -t blog /root/blog -Sending build context to Docker daemon 23.6 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Running in c97f36450343 - ---> 60a44f78d194 -Removing intermediate container c97f36450343 -Successfully built 60a44f78d194 -In the above example I used the -t (tag) flag to "tag" the image as "blog". This essentially allows us to name the image, without specifying a tag the image would only be callable via an Image ID that Docker assigns. In this case the Image ID is 60a44f78d194 which we can see from the docker command's build success message. - -In addition to the -t flag, I also specified the directory /root/blog. This directory is the "build directory", which is the directory that contains the Dockerfile and any other files necessary to build this container. - -Now that we have run through a successful build, let's start customizing this image. - -### Using RUN to execute apt-get -The static site generator used to generate the HTML pages is written in Python and because of this the first custom task we should perform within this Dockerfile is to install Python. To install the Python package we will use the Apt package manager. This means we will need to specify within the Dockerfile that apt-get update and apt-get install python-dev are executed; we can do this with the RUN instruction. - -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip -In the above we are simply using the RUN instruction to tell Docker that when it builds this image it will need to execute the specified apt-get commands. The interesting part of this is that these commands are only executed within the context of this container. What this means is even though python-dev and python-pip are being installed within the container, they are not being installed for the host itself. Or to put it simplier, within the container the pip command will execute, outside the container, the pip command does not exist. - -It is also important to note that the Docker build process does not accept user input during the build. This means that any commands being executed by the RUN instruction must complete without user input. This adds a bit of complexity to the build process as many applications require user input during installation. For our example, none of the commands executed by RUN require user input. - -### Installing Python modules -With Python installed we now need to install some Python modules. To do this outside of Docker, we would generally use the pip command and reference a file within the blog's Git repository named requirements.txt. In an earlier step we used the git command to "clone" the blog's GitHub repository to the /root/blog directory; this directory also happens to be the directory that we have created the Dockerfile. This is important as it means the contents of the Git repository are accessible to Docker during the build process. - -When executing a build, Docker will set the context of the build to the specified "build directory". This means that any files within that directory and below can be used during the build process, files outside of that directory (outside of the build context), are inaccessible. - -In order to install the required Python modules we will need to copy the requirements.txt file from the build directory into the container. We can do this using the COPY instruction within the Dockerfile. - -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip - -## Create a directory for required files -RUN mkdir -p /build/ - -## Add requirements file and run pip -COPY requirements.txt /build/ -RUN pip install -r /build/requirements.txt -Within the Dockerfile we added 3 instructions. The first instruction uses RUN to create a /build/ directory within the container. This directory will be used to copy any application files needed to generate the static HTML pages. The second instruction is the COPY instruction which copies the requirements.txt file from the "build directory" (/root/blog) into the /build directory within the container. The third is using the RUN instruction to execute the pip command; installing all the modules specified within the requirements.txt file. - -COPY is an important instruction to understand when building custom images. Without specifically copying the file within the Dockerfile this Docker image would not contain the requirements.txt file. With Docker containers everything is isolated, unless specifically executed within a Dockerfile a container is not likely to include required dependencies. - -### Re-running a build -Now that we have a few customization tasks for Docker to perform let's try another build of the blog image again. - -# docker build -t blog /root/blog -Sending build context to Docker daemon 19.52 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Using cache - ---> 8e0f1899d1eb -Step 2 : RUN apt-get update - ---> Using cache - ---> 78b36ef1a1a2 -Step 3 : RUN apt-get install -y python-dev python-pip - ---> Using cache - ---> ef4f9382658a -Step 4 : RUN mkdir -p /build/ - ---> Running in bde05cf1e8fe - ---> f4b66e09fa61 -Removing intermediate container bde05cf1e8fe -Step 5 : COPY requirements.txt /build/ - ---> cef11c3fb97c -Removing intermediate container 9aa8ff43f4b0 -Step 6 : RUN pip install -r /build/requirements.txt - ---> Running in c50b15ddd8b1 -Downloading/unpacking jinja2 (from -r /build/requirements.txt (line 1)) -Downloading/unpacking PyYaml (from -r /build/requirements.txt (line 2)) - -Successfully installed jinja2 PyYaml mistune markdown MarkupSafe -Cleaning up... - ---> abab55c20962 -Removing intermediate container c50b15ddd8b1 -Successfully built abab55c20962 -From the above build output we can see the build was successful, but we can also see another interesting message; ---> Using cache. What this message is telling us is that Docker was able to use its build cache during the build of this image. - -#### Docker build cache - -When Docker is building an image, it doesn't just build a single image; it actually builds multiple images throughout the build processes. In fact we can see from the above output that after each "Step" Docker is creating a new image. - - Step 5 : COPY requirements.txt /build/ - ---> cef11c3fb97c -The last line from the above snippet is actually Docker informing us of the creating of a new image, it does this by printing the Image ID; cef11c3fb97c. The useful thing about this approach is that Docker is able to use these images as cache during subsequent builds of the blog image. This is useful because it allows Docker to speed up the build process for new builds of the same container. If we look at the example above we can actually see that rather than installing the python-dev and python-pip packages again, Docker was able to use a cached image. However, since Docker was unable to find a build that executed the mkdir command, each subsequent step was executed. - -The Docker build cache is a bit of a gift and a curse; the reason for this is that the decision to use cache or to rerun the instruction is made within a very narrow scope. For example, if there was a change to the requirements.txt file Docker would detect this change during the build and start fresh from that point forward. It does this because it can view the contents of the requirements.txt file. The execution of the apt-get commands however, are another story. If the Apt repository that provides the Python packages were to contain a newer version of the python-pip package; Docker would not be able to detect the change and would simply use the build cache. This means that an older package may be installed. While this may not be a major issue for the python-pip package it could be a problem if the installation was caching a package with a known vulnerability. - -For this reason it is useful to periodically rebuild the image without using Docker's cache. To do this you can simply specify --no-cache=True when executing a Docker build. - -### Deploying the rest of the blog -With the Python packages and modules installed this leaves us at the point of copying the required application files and running the hamerkop application. To do this we will simply use more COPY and RUN instructions. - -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip - -## Create a directory for required files -RUN mkdir -p /build/ - -## Add requirements file and run pip -COPY requirements.txt /build/ -RUN pip install -r /build/requirements.txt - -## Add blog code nd required files -COPY static /build/static -COPY templates /build/templates -COPY hamerkop /build/ -COPY config.yml /build/ -COPY articles /build/articles - -## Run Generator -RUN /build/hamerkop -c /build/config.yml -Now that we have the rest of the build instructions, let's run through another build and verify that the image builds successfully. - -# docker build -t blog /root/blog/ -Sending build context to Docker daemon 19.52 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Using cache - ---> 8e0f1899d1eb -Step 2 : RUN apt-get update - ---> Using cache - ---> 78b36ef1a1a2 -Step 3 : RUN apt-get install -y python-dev python-pip - ---> Using cache - ---> ef4f9382658a -Step 4 : RUN mkdir -p /build/ - ---> Using cache - ---> f4b66e09fa61 -Step 5 : COPY requirements.txt /build/ - ---> Using cache - ---> cef11c3fb97c -Step 6 : RUN pip install -r /build/requirements.txt - ---> Using cache - ---> abab55c20962 -Step 7 : COPY static /build/static - ---> 15cb91531038 -Removing intermediate container d478b42b7906 -Step 8 : COPY templates /build/templates - ---> ecded5d1a52e -Removing intermediate container ac2390607e9f -Step 9 : COPY hamerkop /build/ - ---> 59efd1ca1771 -Removing intermediate container b5fbf7e817b7 -Step 10 : COPY config.yml /build/ - ---> bfa3db6c05b7 -Removing intermediate container 1aebef300933 -Step 11 : COPY articles /build/articles - ---> 6b61cc9dde27 -Removing intermediate container be78d0eb1213 -Step 12 : RUN /build/hamerkop -c /build/config.yml - ---> Running in fbc0b5e574c5 -Successfully created file /usr/share/nginx/html//2011/06/25/checking-the-number-of-lwp-threads-in-linux -Successfully created file /usr/share/nginx/html//2011/06/checking-the-number-of-lwp-threads-in-linux - -Successfully created file /usr/share/nginx/html//archive.html -Successfully created file /usr/share/nginx/html//sitemap.xml - ---> 3b25263113e1 -Removing intermediate container fbc0b5e574c5 -Successfully built 3b25263113e1 -### Running a custom container -With a successful build we can now start our custom container by running the docker command with the run option, similar to how we started the nginx container earlier. - -# docker run -d -p 80:80 --name=blog blog -5f6c7a2217dcdc0da8af05225c4d1294e3e6bb28a41ea898a1c63fb821989ba1 -Once again the -d (detach) flag was used to tell Docker to run the container in the background. However, there are also two new flags. The first new flag is --name, which is used to give the container a user specified name. In the earlier example we did not specify a name and because of that Docker randomly generated one. The second new flag is -p, this flag allows users to map a port from the host machine to a port within the container. - -The base nginx image we used exposes port 80 for the HTTP service. By default, ports bound within a Docker container are not bound on the host system as a whole. In order for external systems to access ports exposed within a container the ports must be mapped from a host port to a container port using the -p flag. The command above maps port 80 from the host, to port 80 within the container. If we wished to map port 8080 from the host, to port 80 within the container we could do so by specifying the ports in the following syntax -p 8080:80. - -From the above command it appears that our container was started successfully, we can verify this by executing docker ps. - -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -d264c7ef92bd blog:latest nginx -g 'daemon off 3 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:80->80/tcp blog -## Wrapping up - -At this point we now have a running custom Docker container. While we touched on a few Dockerfile instructions within this article we have yet to discuss all the instructions. For a full list of Dockerfile instructions you can checkout Docker's reference page, which explains the instructions very well. - -Another good resource is their Dockerfile Best Practices page which contains quite a few best practices for building custom Dockerfiles. Some of these tips are very useful such as strategically ordering the commands within the Dockerfile. In the above examples our Dockerfile has the COPY instruction for the articles directory as the last COPY instruction. The reason for this is that the articles directory will change quite often. It's best to put instructions that will change oftenat the lowest point possible within the Dockerfile to optimize steps that can be cached. - -In this article we covered how to start a pre-built container and how to build, then deploy a custom container. While there is quite a bit to learn about Docker this article should give you a good idea on how to get started. Of course, as always if you think there is anything that should be added drop it in the comments below. From bb44dc3e96191abc1d83a4469f3fbcd214871089 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 9 Dec 2015 17:32:18 +0800 Subject: [PATCH 0530/1710] Translating by ZTinoZ --- .../share/20151123 7 ways hackers can use Wi-Fi against you.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md index 49b8df80a9..b25656968a 100644 --- a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -28,7 +28,7 @@ You might think that no one needs to be warned against banking online using free ### 不使用防火墙 ### -A firewall is your first line of defense against malicious intruders. It’s meant to let good traffic through your computer on a network and keep hackers and malware out. You should turn it off only when your antivirus software has its own firewall. +防火墙是你的第一道抵御恶意入侵的防线,它能有效地让你的电脑网络通畅并阻挡黑客和恶意软件。你应该时刻开启它除非你的杀毒软件有它自己的防火墙。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/5_browsing-unencrypted-sites-100626678-orig.jpg) From 2d7ba8d6a1dfe34bc446e150538503f85c0e50f2 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Dec 2015 20:34:29 +0800 Subject: [PATCH 0531/1710] PUB:20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x @ictlyh --- ...phyr Test Management Tool on CentOS 7.x.md | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md (87%) diff --git a/translated/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md b/published/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md similarity index 87% rename from translated/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md rename to published/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md index 7de8349b9c..4380346dc9 100644 --- a/translated/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md +++ b/published/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md @@ -1,6 +1,7 @@ 如何在 CentOS 7.x 上安装 Zephyr 测试管理工具 ================================================================================ -测试管理工具包括作为测试人员需要的任何东西。测试管理工具用来记录测试执行的结果、计划测试活动以及报告质量保证活动的情况。在这篇文章中我们会向你介绍如何配置 Zephyr 测试管理工具,它包括了管理测试活动需要的所有东西,不需要单独安装测试活动所需要的应用程序从而降低测试人员不必要的麻烦。一旦你安装完它,你就看可以用它跟踪 bug、缺陷,和你的团队成员协作项目任务,因为你可以轻松地共享和访问测试过程中多个项目团队的数据。 + +测试管理(Test Management)指测试人员所需要的任何的所有东西。测试管理工具用来记录测试执行的结果、计划测试活动以及汇报质量控制活动的情况。在这篇文章中我们会向你介绍如何配置 Zephyr 测试管理工具,它包括了管理测试活动需要的所有东西,不需要单独安装测试活动所需要的应用程序从而降低测试人员不必要的麻烦。一旦你安装完它,你就看可以用它跟踪 bug 和缺陷,和你的团队成员协作项目任务,因为你可以轻松地共享和访问测试过程中多个项目团队的数据。 ### Zephyr 要求 ### @@ -19,21 +20,21 @@ Packages -JDK 7 or above ,  Oracle JDK 6 update -No Prior Tomcat, MySQL installed +JDK 7 或更高 ,  Oracle JDK 6 update +没有事先安装的 Tomcat 和 MySQL RAM 4 GB -Preferred 8 GB +推荐 8 GB CPU -2.0 GHZ or Higher +2.0 GHZ 或更高 Hard Disk -30 GB , Atleast 5GB must be free +30 GB , 至少 5GB @@ -48,8 +49,6 @@ [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 环境变量。 @@ -61,8 +60,6 @@ [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) @@ -71,7 +68,7 @@ ### 安装 MySQL 5.6.x ### -如果的机器上有其它的 MySQL,建议你先卸载它们并安装这个版本,或者升级它们的模式到指定的版本。因为 Zephyr 前提要求这个指定的主要/最小 MySQL (5.6.x)版本要有 root 用户名。 +如果的机器上有其它的 MySQL,建议你先卸载它们并安装这个版本,或者升级它们的模式(schemas)到指定的版本。因为 Zephyr 前提要求这个指定的 5.6.x 版本的 MySQL ,要有 root 用户名。 可以按照下面的步骤在 CentOS-7.1 上安装 MySQL 5.6 : @@ -93,10 +90,7 @@ [root@centos-007 ~]# service mysqld start [root@centos-007 ~]# service mysqld status -对于全新安装的 MySQL 服务器,MySQL root 用户的密码为空。 -为了安全起见,我们应该重置 MySQL root 用户的密码。 - -用自动生成的空密码连接到 MySQL 并更改 root 用户密码。 +对于全新安装的 MySQL 服务器,MySQL root 用户的密码为空。为了安全起见,我们应该重置 MySQL root 用户的密码。用自动生成的空密码连接到 MySQL 并更改 root 用户密码。 [root@centos-007 ~]# mysql mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_password'); @@ -224,7 +218,7 @@ 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) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 78f88f47324dc73b1f3672e1a8758f564f752e82 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Dec 2015 20:40:23 +0800 Subject: [PATCH 0532/1710] PUB:20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bazz2 果然出手不凡!555~~这种文章就得你来搞定它。 --- ...Lambasts Open Source Programmers over Insecure Code.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/talk => published}/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md (80%) diff --git a/translated/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md b/published/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md similarity index 80% rename from translated/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md rename to published/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md index e927a02b8c..964a9774ca 100644 --- a/translated/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md +++ b/published/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md @@ -2,9 +2,9 @@ ================================================================================ ![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/linus-torvalds.jpg) -Linus 最近(LCTT 译注:其实是11月份,没有及时翻译出来,看官轻喷Orz)骂了一个 Linux 开发者,原因是他向 kernel 提交了一份不安全的代码。 +Linus 上个月骂了一个 Linux 开发者,原因是他向 kernel 提交了一份不安全的代码。 -Linus 是个 Linux 内核项目非官方的“仁慈的独裁者(LCTT译注:英国《卫报》曾将乔布斯评价为‘仁慈的独裁者’)”,这意味着他有权决定将哪些代码合入内核,哪些代码直接丢掉。 +Linus 是个 Linux 内核项目非官方的“仁慈的独裁者(benevolent dictator)”(LCTT译注:英国《卫报》曾将乔布斯评价为‘仁慈的独裁者’),这意味着他有权决定将哪些代码合入内核,哪些代码直接丢掉。 在10月28号,一个开源开发者提交的代码未能符合 Torvalds 的要求,于是遭来了[一顿臭骂][1]。Torvalds 在他提交的代码下评论道:“你提交的是什么东西。” @@ -14,7 +14,7 @@ Torvalds 为什么会这么生气?他觉得那段代码可以写得更有效 Torvalds 重新写了一版代码将原来的那份替换掉,并建议所有开发者应该像他那种风格来写代码。 -Torvalds 一直在嘲讽那些不符合他观点的人。早在1991年他就攻击过[Andrew Tanenbaum][2]——那个 Minix 操作系统的作者,而那个 Minix 操作系统被 Torvalds 描述为“脑残”。 +Torvalds 一直在嘲讽那些不符合他观点的人。早在1991年他就攻击过 [Andrew Tanenbaum][2]——那个 Minix 操作系统的作者,而那个 Minix 操作系统被 Torvalds 描述为“脑残”。 但是 Torvalds 在这次嘲讽中表现得更有战略性了:“我想让*每个人*都知道,像他这种代码是完全不能被接收的。”他说他的目的是提醒每个 Linux 开发者,而不是针对那个开发者。 @@ -26,7 +26,7 @@ via: http://thevarguy.com/open-source-application-software-companies/110415/linu 作者:[Christopher Tozzi][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 b18df772777ef10c355580b48bb08665a1225093 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Dec 2015 20:52:18 +0800 Subject: [PATCH 0533/1710] PUB:20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7 @geekpi --- ...d IP from Fail2ban on CentOS 6 or CentOS 7.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md (71%) diff --git a/translated/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md b/published/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md similarity index 71% rename from translated/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md rename to published/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md index a918eff18f..a527982122 100644 --- a/translated/tech/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md +++ b/published/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md @@ -1,12 +1,12 @@ -如何在CentOS 6/7 上移除被Fail2ban禁止的IP +如何在 CentOS 6/7 上移除被 Fail2ban 禁止的 IP ================================================================================ ![](http://www.ehowstuff.com/wp-content/uploads/2015/12/security-265130_1280.jpg) -[Fail2ban][1]是一款用于保护你的服务器免于暴力攻击的入侵保护软件。Fail2ban用python写成,并被广泛用户大多数服务器上。Fail2ban将扫描日志文件和IP黑名单来显示恶意软件、过多的密码失败、web服务器利用、Wordpress插件攻击和其他漏洞。如果你已经安装并使用了fail2ban来保护你的web服务器,你也许会想知道如何在CentOS 6、CentOS 7、RHEL 6、RHEL 7 和 Oracle Linux 6/7中找到被Fail2ban阻止的IP,或者你想将ip从fail2ban监狱中移除。 +[fail2ban][1] 是一款用于保护你的服务器免于暴力攻击的入侵保护软件。fail2ban 用 python 写成,并广泛用于很多服务器上。fail2ban 会扫描日志文件和 IP 黑名单来显示恶意软件、过多的密码失败尝试、web 服务器利用、wordpress 插件攻击和其他漏洞。如果你已经安装并使用了 fail2ban 来保护你的 web 服务器,你也许会想知道如何在 CentOS 6、CentOS 7、RHEL 6、RHEL 7 和 Oracle Linux 6/7 中找到被 fail2ban 阻止的 IP,或者你想将 ip 从 fail2ban 监狱中移除。 -### 如何列出被禁止的IP ### +### 如何列出被禁止的 IP ### -要查看所有被禁止的ip地址,运行下面的命令: +要查看所有被禁止的 ip 地址,运行下面的命令: # iptables -L Chain INPUT (policy ACCEPT) @@ -40,19 +40,19 @@ REJECT all -- 104.194.26.205 anywhere reject-with icmp-port-unreachable RETURN all -- anywhere anywhere -### 如何从Fail2ban中移除IP ### +### 如何从 Fail2ban 中移除 IP ### # iptables -D f2b-NoAuthFailures -s banned_ip -j REJECT -我希望这篇教程可以给你在CentOS 6、CentOS 7、RHEL 6、RHEL 7 和 Oracle Linux 6/7中移除被禁止的ip一些指导。 +我希望这篇教程可以给你在 CentOS 6、CentOS 7、RHEL 6、RHEL 7 和 Oracle Linux 6/7 中移除被禁止的 ip 一些指导。 -------------------------------------------------------------------------------- via: http://www.ehowstuff.com/how-to-remove-banned-ip-from-fail2ban-on-centos/ 作者:[skytech][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 8457cf56b5dfa36d4186080dfcb66381769b90dc Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Wed, 9 Dec 2015 22:10:54 +0800 Subject: [PATCH 0534/1710] translating wi-cuckoo --- sources/news/Let's Encrypt--Entering Public Beta.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/news/Let's Encrypt--Entering Public Beta.md b/sources/news/Let's Encrypt--Entering Public Beta.md index 5c5c61ebbd..a876a6c39f 100644 --- a/sources/news/Let's Encrypt--Entering Public Beta.md +++ b/sources/news/Let's Encrypt--Entering Public Beta.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Let's Encrypt:Entering Public Beta ================================================================================ We’re happy to announce that Let’s Encrypt has entered Public Beta. Invitations are no longer needed in order to get free From c1e92f26eb18ba80c1b13a8af26868f171a7983e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Dec 2015 22:50:19 +0800 Subject: [PATCH 0535/1710] PUB:20151104 How to Install Redis Server on CentOS 7 @oska874 --- ...How to Install Redis Server on CentOS 7.md | 239 ++++++++++++++++++ ...How to Install Redis Server on CentOS 7.md | 236 ----------------- 2 files changed, 239 insertions(+), 236 deletions(-) create mode 100644 published/20151104 How to Install Redis Server on CentOS 7.md delete mode 100644 translated/tech/20151104 How to Install Redis Server on CentOS 7.md diff --git a/published/20151104 How to Install Redis Server on CentOS 7.md b/published/20151104 How to Install Redis Server on CentOS 7.md new file mode 100644 index 0000000000..90e090ef39 --- /dev/null +++ b/published/20151104 How to Install Redis Server on CentOS 7.md @@ -0,0 +1,239 @@ +如何在 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 安装包,我们需要从源代码编译,而为了要编译就需要安装 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 的服务器和客户端到 /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 + +取消对透明巨页内存(transparent huge pages)的支持,因为这会造成 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 #### + +设置 `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 #### + +你可能需要远程访问,如果是,那么你应该设置密码,这样子每次操作之前要求输入密码。 + + requirepass "bTFBx1NYYWRMTUEyNHhsCg" + +#### rename-command #### + +想象一下如下指令的输出。是的,这会输出服务器的配置,所以你应该在任何可能的情况下拒绝这种访问。 + + CONFIG GET * + +为了限制甚至禁止这条或者其他指令可以使用 `rename-command` 命令。你必须提供一个命令名和替代的名字。要禁止的话需要设置替代的名字为空字符串,这样禁止任何人猜测命令的名字会比较安全。 + + 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` 包含了从上次保存以来内存里数据集的转储数据。因为它先创建临时文件然后替换之前的转储文件,这里不存在数据破坏的问题,你不用担心,可以直接复制这个文件。 + +### 开机时启动 ### + +你可以使用 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) +校对:[wxy](https://github.com/wxy) + +本文由 [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 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 deleted file mode 100644 index eb872a2719..0000000000 --- a/translated/tech/20151104 How to Install Redis Server on CentOS 7.md +++ /dev/null @@ -1,236 +0,0 @@ -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 feae184a598968b19ba25ab620f95bfaf51c047e Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 9 Dec 2015 22:54:42 +0800 Subject: [PATCH 0536/1710] Delete Let's Encrypt--Entering Public Beta.md --- .../Let's Encrypt--Entering Public Beta.md | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 sources/news/Let's Encrypt--Entering Public Beta.md diff --git a/sources/news/Let's Encrypt--Entering Public Beta.md b/sources/news/Let's Encrypt--Entering Public Beta.md deleted file mode 100644 index 5c5c61ebbd..0000000000 --- a/sources/news/Let's Encrypt--Entering Public Beta.md +++ /dev/null @@ -1,44 +0,0 @@ -Let's Encrypt:Entering Public Beta -================================================================================ -We’re happy to announce that Let’s Encrypt has entered Public Beta. Invitations are no longer needed in order to get free -certificates from Let’s Encrypt. - -It’s time for the Web to take a big step forward in terms of security and privacy. We want to see HTTPS become the default. -Let’s Encrypt was built to enable that by making it as easy as possible to get and manage certificates. - -We’d like to thank everyone who participated in the Limited Beta. Let’s Encrypt issued over 26,000 certificates during the -Limited Beta period. This allowed us to gain valuable insight into how our systems perform, and to be confident about moving -to Public Beta. - -We’d also like to thank all of our [sponsors][1] for their support. We’re happy to have announced earlier today that -[Facebook is our newest Gold sponsor][2]/ - -We have more work to do before we’re comfortable dropping the beta label entirely, particularly on the client experience. -Automation is a cornerstone of our strategy, and we need to make sure that the client works smoothly and reliably on a -wide range of platforms. We’ll be monitoring feedback from users closely, and making improvements as quickly as possible. - -Instructions for getting a certificate with the [Let’s Encrypt client][3] can be found [here][4]. - -[Let’s Encrypt Community Support][5] is an invaluable resource for our community, we strongly recommend making use of the -site if you have any questions about Let’s Encrypt. - -Let’s Encrypt depends on support from a wide variety of individuals and organizations. Please consider [getting involved][6] -, and if your company or organization would like to sponsor Let’s Encrypt please email us at [sponsor@letsencrypt.org][7]. --------------------------------------------------------------------------------- - -via: https://letsencrypt.org/2015/12/03/entering-public-beta.html - -作者:[Josh Aas][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://letsencrypt.org/2015/12/03/entering-public-beta.html -[1]:https://letsencrypt.org/sponsors/ -[2]:https://letsencrypt.org/2015/12/03/facebook-sponsorship.html -[3]:https://github.com/letsencrypt/letsencrypt -[4]:https://letsencrypt.readthedocs.org/en/latest/ -[5]:https://community.letsencrypt.org/ -[6]:https://letsencrypt.org/getinvolved/ -[7]:mailto:sponsor@letsencrypt.org From 8206b75e4f343d34f3031e093bf7f304dae2c4c1 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Wed, 9 Dec 2015 22:57:18 +0800 Subject: [PATCH 0537/1710] translating by sg --- .../share/20151130 eSpeak--Text To Speech Tool For Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md b/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md index 3fc07db228..fcaff4177d 100644 --- a/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md +++ b/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md @@ -1,3 +1,4 @@ +translating。。 eSpeak: Text To Speech Tool For Linux ================================================================================ ![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) @@ -61,4 +62,4 @@ via: http://itsfoss.com/espeak-text-speech-linux/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://espeak.sourceforge.net/ [2]:http://en.wikipedia.org/wiki/WAV -[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language \ No newline at end of file +[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language From b259cc1e2b107f8a5eeb10907c174177535e2538 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 9 Dec 2015 23:08:54 +0800 Subject: [PATCH 0538/1710] translating wi-cuckoo --- .../20150917 A Repository with 44 Years of Unix Evolution.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 807cedf01d..634d056859 100644 --- 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 @@ -1,3 +1,4 @@ +translating wi-cuckoo A Repository with 44 Years of Unix Evolution ================================================================================ ### Abstract ### @@ -199,4 +200,4 @@ via: http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.htm [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 +[53]:https://github.com/dspinellis/unix-history-make From 91521794c65121947e42c813afdb5e77b2641a0b Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 10 Dec 2015 00:44:19 +0800 Subject: [PATCH 0539/1710] PUB:20151020 how to h2 in apache @ictlyh --- .../20151020 how to h2 in apache.md | 141 +++++++++--------- 1 file changed, 68 insertions(+), 73 deletions(-) rename {translated/tech => published}/20151020 how to h2 in apache.md (55%) diff --git a/translated/tech/20151020 how to h2 in apache.md b/published/20151020 how to h2 in apache.md similarity index 55% rename from translated/tech/20151020 how to h2 in apache.md rename to published/20151020 how to h2 in apache.md index 32420d5bf4..add5bb7560 100644 --- a/translated/tech/20151020 how to h2 in apache.md +++ b/published/20151020 how to h2 in apache.md @@ -8,45 +8,44 @@ Copyright (C) 2015 greenbytes GmbH ### 源码 ### -你可以从[这里][1]得到 Apache 发行版。Apache 2.4.17 及其更高版本都支持 HTTP/2。我不会再重复介绍如何构建服务器的指令。在很多地方有很好的指南,例如[这里][2]。 +你可以从[这里][1]得到 Apache 版本。Apache 2.4.17 及其更高版本都支持 HTTP/2。我不会再重复介绍如何构建该服务器的指令。在很多地方有很好的指南,例如[这里][2]。 -(有任何试验的链接?在 Twitter 上告诉我吧 @icing) +(有任何这个试验性软件包的相关链接?在 Twitter 上告诉我吧 @icing) -#### 编译支持 HTTP/2 #### +#### 编译支持 HTTP/2 #### -在你编译发行版之前,你要进行一些**配置**。这里有成千上万的选项。和 HTTP/2 相关的是: +在你编译版本之前,你要进行一些**配置**。这里有成千上万的选项。和 HTTP/2 相关的是: - **--enable-http2** - 启用在 Apache 服务器内部实现协议的 ‘http2’ 模块。 + 启用在 Apache 服务器内部实现该协议的 ‘http2’ 模块。 -- **--with-nghttp2=** +- **--with-nghttp2=\** 指定 http2 模块需要的 libnghttp2 模块的非默认位置。如果 nghttp2 是在默认的位置,配置过程会自动采用。 - **--enable-nghttp2-staticlib-deps** - 很少用到的选项,你可能用来静态链接 nghttp2 库到服务器。在大部分平台上,只有在找不到共享 nghttp2 库时才有效。 + 很少用到的选项,你可能想将 nghttp2 库静态链接到服务器里。在大部分平台上,只有在找不到共享 nghttp2 库时才有用。 -如果你想自己编译 nghttp2,你可以到 [nghttp2.org][3] 查看文档。最新的 Fedora 以及其它发行版已经附带了这个库。 +如果你想自己编译 nghttp2,你可以到 [nghttp2.org][3] 查看文档。最新的 Fedora 以及其它版本已经附带了这个库。 #### TLS 支持 #### -大部分人想在浏览器上使用 HTTP/2, 而浏览器只在 TLS 连接(**https:// 开头的 url)时支持它。你需要一些我下面介绍的配置。但首先你需要的是支持 ALPN 扩展的 TLS 库。 +大部分人想在浏览器上使用 HTTP/2, 而浏览器只在使用 TLS 连接(**https:// 开头的 url)时才支持 HTTP/2。你需要一些我下面介绍的配置。但首先你需要的是支持 ALPN 扩展的 TLS 库。 +ALPN 用来协商(negotiate)服务器和客户端之间的协议。如果你服务器上 TLS 库还没有实现 ALPN,客户端只能通过 HTTP/1.1 通信。那么,可以和 Apache 链接并支持它的是什么库呢? -ALPN 用来屏蔽服务器和客户端之间的协议。如果你服务器上 TLS 库还没有实现 ALPN,客户端只能通过 HTTP/1.1 通信。那么,和 Apache 连接的到底是什么?又是什么支持它呢? +- **OpenSSL 1.0.2** 及其以后。 +- ??? (别的我也不知道了) -- **OpenSSL 1.0.2** 即将到来。 -- ??? - -如果你的 OpenSSL 库是 Linux 发行版自带的,这里使用的版本号可能和官方 OpenSSL 发行版的不同。如果不确定的话检查一下你的 Linux 发行版吧。 +如果你的 OpenSSL 库是 Linux 版本自带的,这里使用的版本号可能和官方 OpenSSL 版本的不同。如果不确定的话检查一下你的 Linux 版本吧。 ### 配置 ### 另一个给服务器的好建议是为 http2 模块设置合适的日志等级。添加下面的配置: - # 某个地方有这样一行 + # 放在某个地方的这样一行 LoadModule http2_module modules/mod_http2.so @@ -62,38 +61,37 @@ ALPN 用来屏蔽服务器和客户端之间的协议。如果你服务器上 TL 那么,假设你已经编译部署好了服务器, TLS 库也是最新的,你启动了你的服务器,打开了浏览器。。。你怎么知道它在工作呢? -如果除此之外你没有添加其它到服务器配置,很可能它没有工作。 +如果除此之外你没有添加其它的服务器配置,很可能它没有工作。 -你需要告诉服务器在哪里使用协议。默认情况下,你的服务器并没有启动 HTTP/2 协议。因为这是安全路由,你可能要有一套部署了才能继续。 +你需要告诉服务器在哪里使用该协议。默认情况下,你的服务器并没有启动 HTTP/2 协议。因为这样比较安全,也许才能让你已有的部署可以继续工作。 -你用 **Protocols** 命令启用 HTTP/2 协议: +你可以用新的 **Protocols** 指令启用 HTTP/2 协议: - # for a https server + # 对于 https 服务器 Protocols h2 http/1.1 ... - # for a http server + # 对于 http 服务器 Protocols h2c http/1.1 -你可以给一般服务器或者指定的 **vhosts** 添加这个配置。 +你可以给整个服务器或者指定的 **vhosts** 添加这个配置。 #### SSL 参数 #### -对于 TLS (SSL),HTTP/2 有一些特殊的要求。阅读 [https:// 连接][4]了解更详细的信息。 +对于 TLS (SSL),HTTP/2 有一些特殊的要求。阅读下面的“ https:// 连接”一节了解更详细的信息。 ### http:// 连接 (h2c) ### -尽管现在还没有浏览器支持 HTTP/2 协议, http:// 这样的 url 也能正常工作, 因为有 mod_h[ttp]2 的支持。启用它你只需要做的一件事是在 **httpd.conf** 配置 Protocols : +尽管现在还没有浏览器支持,但是 HTTP/2 协议也工作在 http:// 这样的 url 上, 而且 mod_h[ttp]2 也支持。启用它你唯一所要做的是在 Protocols 配置中启用它: - # for a http server + # 对于 http 服务器 Protocols h2c http/1.1 - 这里有一些支持 **h2c** 的客户端(和客户端库)。我会在下面介绍: #### curl #### -Daniel Stenberg 维护的网络资源命令行客户端 curl 当然支持。如果你的系统上有 curl,有一个简单的方法检查它是否支持 http/2: +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 @@ -126,11 +124,11 @@ Daniel Stenberg 维护的网络资源命令行客户端 curl 当然支持。如 恭喜,如果看到了有 **...101 Switching...** 的行就表示它正在工作! -有一些情况不会发生到 HTTP/2 的 Upgrade 。如果你的第一个请求没有内容,例如你上传一个文件,就不会触发 Upgrade。[h2c 限制][5]部分有详细的解释。 +有一些情况不会发生 HTTP/2 的升级切换(Upgrade)。如果你的第一个请求有内容数据(body),例如你上传一个文件时,就不会触发升级切换。[h2c 限制][5]部分有详细的解释。 #### nghttp #### -nghttp2 有能一起编译的客户端和服务器。如果你的系统中有客户端,你可以简单地通过获取资源验证你的安装: +nghttp2 可以一同编译它自己的客户端和服务器。如果你的系统中有该客户端,你可以简单地通过获取一个资源来验证你的安装: sh> nghttp -uv http:/// [ 0.001] Connected @@ -151,7 +149,7 @@ nghttp2 有能一起编译的客户端和服务器。如果你的系统中有客 这和我们上面 **curl** 例子中看到的 Upgrade 输出很相似。 -在命令行参数中隐藏着一种可以使用 **h2c**:的参数:**-u**。这会指示 **nghttp** 进行 HTTP/1 Upgrade 过程。但如果我们不使用呢? +有另外一种在命令行参数中不用 **-u** 参数而使用 **h2c** 的方法。这个参数会指示 **nghttp** 进行 HTTP/1 升级切换过程。但如果我们不使用呢? sh> nghttp -v http:/// [ 0.002] Connected @@ -166,36 +164,33 @@ nghttp2 有能一起编译的客户端和服务器。如果你的系统中有客 :scheme: http ... -连接马上显示出了 HTTP/2!这就是协议中所谓的直接模式,当客户端发送一些特殊的 24 字节到服务器时就会发生: +连接马上使用了 HTTP/2!这就是协议中所谓的直接(direct)模式,当客户端发送一些特殊的 24 字节到服务器时就会发生: 0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0a - or in ASCII: PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n + +用 ASCII 表示是: + + PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n 支持 **h2c** 的服务器在一个新的连接中看到这些信息就会马上切换到 HTTP/2。HTTP/1.1 服务器则认为是一个可笑的请求,响应并关闭连接。 -因此 **直接** 模式只适合于那些确定服务器支持 HTTP/2 的客户端。例如,前一个 Upgrade 过程是成功的。 +因此,**直接**模式只适合于那些确定服务器支持 HTTP/2 的客户端。例如,当前一个升级切换过程成功了的时候。 -**直接** 模式的魅力是零开销,它支持所有请求,即使没有 body 部分(查看[h2c 限制][6])。任何支持 h2c 协议的服务器默认启用了直接模式。如果你想停用它,可以添加下面的配置指令到你的服务器: +**直接**模式的魅力是零开销,它支持所有请求,即使带有请求数据部分(查看[h2c 限制][6])。 -注:下面这行打删除线 - - H2Direct off - -注:下面这行打删除线 - -对于 2.4.17 发行版,默认明文连接时启用 **H2Direct** 。但是有一些模块和这不兼容。因此,在下一发行版中,默认会设置为**off**,如果你希望你的服务器支持它,你需要设置它为: +对于 2.4.17 版本,明文连接时默认启用 **H2Direct** 。但是有一些模块和这不兼容。因此,在下一版本中,默认会设置为**off**,如果你希望你的服务器支持它,你需要设置它为: H2Direct on ### https:// 连接 (h2) ### -一旦你的 mod_h[ttp]2 支持 h2c 连接,就是时候一同启用 **h2**,因为现在的浏览器支持它和 **https:** 一同使用。 +当你的 mod_h[ttp]2 可以支持 h2c 连接时,那就可以一同启用 **h2** 兄弟了,现在的浏览器仅支持它和 **https:** 一同使用。 -HTTP/2 标准对 https:(TLS)连接增加了一些额外的要求。上面已经提到了 ALNP 扩展。另外的一个要求是不会使用特定[黑名单][7]中的密码。 +HTTP/2 标准对 https:(TLS)连接增加了一些额外的要求。上面已经提到了 ALNP 扩展。另外的一个要求是不能使用特定[黑名单][7]中的加密算法。 -尽管现在版本的 **mod_h[ttp]2** 不增强这些密码(以后可能会),大部分客户端会这么做。如果你用不切当的密码在浏览器中打开 **h2** 服务器,你会看到模糊警告**INADEQUATE_SECURITY**,浏览器会拒接连接。 +尽管现在版本的 **mod_h[ttp]2** 不增强这些算法(以后可能会),但大部分客户端会这么做。如果让你的浏览器使用不恰当的算法打开 **h2** 服务器,你会看到不明确的警告**INADEQUATE_SECURITY**,浏览器会拒接连接。 -一个可接受的 Apache SSL 配置类似: +一个可行的 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 @@ -203,11 +198,11 @@ HTTP/2 标准对 https:(TLS)连接增加了一些额外的要求。上面已 (是的,这确实很长。) -这里还有一些应该调整的 SSL 配置参数,但不是必须:**SSLSessionCache**, **SSLUseStapling** 等,其它地方也有介绍这些。例如 Ilya Grigorik 写的一篇博客 [高性能浏览器网络][8]。 +这里还有一些应该调整,但不是必须调整的 SSL 配置参数:**SSLSessionCache**, **SSLUseStapling** 等,其它地方也有介绍这些。例如 Ilya Grigorik 写的一篇超赞的博客: [高性能浏览器网络][8]。 #### curl #### -再次回到 shell 并使用 curl(查看 [curl h2c 章节][9] 了解要求)你也可以通过 curl 用简单的命令检测你的服务器: +再次回到 shell 使用 curl(查看上面的“curl h2c”章节了解要求),你也可以通过 curl 用简单的命令检测你的服务器: sh> curl -v --http2 https:/// ... @@ -220,9 +215,9 @@ HTTP/2 标准对 https:(TLS)连接增加了一些额外的要求。上面已 恭喜你,能正常工作啦!如果还不能,可能原因是: -- 你的 curl 不支持 HTTP/2。查看[检测][10]。 +- 你的 curl 不支持 HTTP/2。查看上面的“检测 curl”一节。 - 你的 openssl 版本太低不支持 ALPN。 -- 不能验证你的证书,或者不接受你的密码配置。尝试添加命令行选项 -k 停用 curl 中的检查。如果那能工作,还要重新配置你的 SSL 和证书。 +- 不能验证你的证书,或者不接受你的算法配置。尝试添加命令行选项 -k 停用 curl 中的这些检查。如果可以工作,就重新配置你的 SSL 和证书。 #### nghttp #### @@ -246,11 +241,11 @@ HTTP/2 标准对 https:(TLS)连接增加了一些额外的要求。上面已 The negotiated protocol: http/1.1 [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) -这表示 ALPN 能正常工作,但并没有用 h2 协议。你需要像上面介绍的那样在服务器上选中那个协议。如果一开始在 vhost 部分选中不能正常工作,试着在通用部分选中它。 +这表示 ALPN 能正常工作,但并没有用 h2 协议。你需要像上面介绍的那样检查你服务器上的 Protocols 配置。如果一开始在 vhost 部分设置不能正常工作,试着在通用部分设置它。 #### Firefox #### -Update: [Apache Lounge][11] 的 Steffen Land 告诉我 [Firefox HTTP/2 指示插件][12]。你可以看到有多少地方用到了 h2(提示:Apache Lounge 用 h2 已经有一段时间了。。。) +更新: [Apache Lounge][11] 的 Steffen Land 告诉我 [Firefox 上有个 HTTP/2 指示插件][12]。你可以看到有多少地方用到了 h2(提示:Apache Lounge 用 h2 已经有一段时间了。。。) 你可以在 Firefox 浏览器中打开开发者工具,在那里的网络标签页查看 HTTP/2 连接。当你打开了 HTTP/2 并重新刷新 html 页面时,你会看到类似下面的东西: @@ -260,9 +255,9 @@ Update: [Apache Lounge][11] 的 Steffen Land 告诉我 [Firefox HTTP/2 指示 #### Google Chrome #### -在 Google Chrome 中,你在开发者工具中看不到 HTTP/2 指示器。相反,Chrome 用特殊的地址 **chrome://net-internals/#http2** 给出了相关信息。 +在 Google Chrome 中,你在开发者工具中看不到 HTTP/2 指示器。相反,Chrome 用特殊的地址 **chrome://net-internals/#http2** 给出了相关信息。(LCTT 译注:Chrome 已经有一个 “HTTP/2 and SPDY indicator” 可以很好的在地址栏识别 HTTP/2 连接) -如果你在服务器中打开了一个页面并在 Chrome 那个页面查看,你可以看到类似下面这样: +如果你打开了一个服务器的页面,可以在 Chrome 中查看那个 net-internals 页面,你可以看到类似下面这样: ![](https://icing.github.io/mod_h2/images/chrome-h2.png) @@ -276,21 +271,21 @@ Windows 10 中 Internet Explorer 的继任者 Edge 也支持 HTTP/2。你也可 #### Safari #### -在 Apple 的 Safari 中,打开开发者工具,那里有个网络标签页。重新加载你的服务器页面并在开发者工具中选择显示了加载的行。如果你启用了在右边显示详细试图,看 **状态** 部分。那里显示了 **HTTP/2.0 200**,类似: +在 Apple 的 Safari 中,打开开发者工具,那里有个网络标签页。重新加载你的服务器上的页面,并在开发者工具中选择显示了加载的那行。如果你启用了在右边显示详细视图,看 **Status** 部分。那里显示了 **HTTP/2.0 200**,像这样: ![](https://icing.github.io/mod_h2/images/safari-h2.png) #### 重新协商 #### -https: 连接重新协商是指正在运行的连接中特定的 TLS 参数会发生变化。在 Apache httpd 中,你可以通过目录中的配置文件修改 TLS 参数。如果一个要获取特定位置资源的请求到来,配置的 TLS 参数会和当前的 TLS 参数进行对比。如果它们不相同,就会触发重新协商。 +https: 连接重新协商是指正在运行的连接中特定的 TLS 参数会发生变化。在 Apache httpd 中,你可以在 directory 配置中改变 TLS 参数。如果进来一个获取特定位置资源的请求,配置的 TLS 参数会和当前的 TLS 参数进行对比。如果它们不相同,就会触发重新协商。 -这种最常见的情形是密码变化和客户端验证。你可以要求客户访问特定位置时需要通过验证,或者对于特定资源,你可以使用更安全的, CPU 敏感的密码。 +这种最常见的情形是算法变化和客户端证书。你可以要求客户访问特定位置时需要通过验证,或者对于特定资源,你可以使用更安全的、对 CPU 压力更大的算法。 -不管你的想法有多么好,HTTP/2 中都**不可以**发生重新协商。如果有 100 多个请求到同一个地方,什么时候哪个会发生重新协商呢? +但不管你的想法有多么好,HTTP/2 中都**不可以**发生重新协商。在同一个连接上会有 100 多个请求,那么重新协商该什么时候做呢? -对于这种配置,现有的 **mod_h[ttp]2** 还不能保证你的安全。如果你有一个站点使用了 TLS 重新协商,别在上面启用 h2! +对于这种配置,现有的 **mod_h[ttp]2** 还没有办法。如果你有一个站点使用了 TLS 重新协商,别在上面启用 h2! -当然,我们会在后面的发行版中解决这个问题然后你就可以安全地启用了。 +当然,我们会在后面的版本中解决这个问题,然后你就可以安全地启用了。 ### 限制 ### @@ -298,45 +293,45 @@ https: 连接重新协商是指正在运行的连接中特定的 TLS 参数会 实现除 HTTP 之外协议的模块可能和 **mod_http2** 不兼容。这在其它协议要求服务器首先发送数据时无疑会发生。 -**NNTP** 就是这种协议的一个例子。如果你在服务器中配置了 **mod_nntp_like_ssl**,甚至都不要加载 mod_http2。等待下一个发行版。 +**NNTP** 就是这种协议的一个例子。如果你在服务器中配置了 **mod\_nntp\_like\_ssl**,那么就不要加载 mod_http2。等待下一个版本。 #### h2c 限制 #### **h2c** 的实现还有一些限制,你应该注意: -#### 在虚拟主机中拒绝 h2c #### +##### 在虚拟主机中拒绝 h2c ##### 你不能对指定的虚拟主机拒绝 **h2c 直连**。连接建立而没有看到请求时会触发**直连**,这使得不可能预先知道 Apache 需要查找哪个虚拟主机。 -#### 升级请求体 #### +##### 有请求数据时的升级切换 ##### -对于有 body 部分的请求,**h2c** 升级不能正常工作。那些是 PUT 和 POST 请求(用于提交和上传)。如果你写了一个客户端,你可能会用一个简单的 GET 去处理请求或者用选项 * 去触发升级。 +对于有数据的请求,**h2c** 升级切换不能正常工作。那些是 PUT 和 POST 请求(用于提交和上传)。如果你写了一个客户端,你可能会用一个简单的 GET 或者 OPTIONS * 来处理那些请求以触发升级切换。 -原因从技术层面来看显而易见,但如果你想知道:升级过程中,连接处于半疯状态。请求按照 HTTP/1.1 的格式,而响应使用 HTTP/2。如果请求有一个 body 部分,服务器在发送响应之前需要读取整个 body。因为响应可能需要从客户端处得到应答用于流控制。但如果仍在发送 HTTP/1.1 请求,客户端就还不能处理 HTTP/2 连接。 +原因从技术层面来看显而易见,但如果你想知道:在升级切换过程中,连接处于半疯状态。请求按照 HTTP/1.1 的格式,而响应使用 HTTP/2 帧。如果请求有一个数据部分,服务器在发送响应之前需要读取整个数据。因为响应可能需要从客户端处得到应答用于流控制及其它东西。但如果仍在发送 HTTP/1.1 请求,客户端就仍然不能以 HTTP/2 连接。 -为了使行为可预测,几个服务器实现商决定不要在任何请求体中进行升级,即使 body 很小。 +为了使行为可预测,几个服务器在实现上决定不在任何带有请求数据的请求中进行升级切换,即使请求数据很小。 -#### 升级 302s #### +##### 302 时的升级切换 ##### -有重定向发生时当前 h2c 升级也不能工作。看起来 mod_http2 之前的重写有可能发生。这当然不会导致断路,但你测试这样的站点也许会让你迷惑。 +有重定向发生时,当前的 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**。你在浏览器中打开 URL **https://a.example.org/**,用另一个标签页加载 **https://b.example.org/**。 -在重新打开一个新的连接之前,浏览器看到它有一个到 **a.example.org** 的连接并且证书对于 **b.example.org** 也可用。因此,它在第一个连接上面向第二个标签页发送请求。 +在重新打开一个新的连接之前,浏览器看到它有一个到 **a.example.org** 的连接并且证书对于 **b.example.org** 也可用。因此,它在第一个连接上面发送第二个标签页的请求。 -这种连接重用是刻意设计的,它使得致力于 HTTP/1 切分效率的站点能够不需要太多变化就能利用 HTTP/2。 +这种连接重用是刻意设计的,它使得使用了 HTTP/1 切分(sharding)来提高效率的站点能够不需要太多变化就能利用 HTTP/2。 -Apache **mod_h[ttp]2** 还没有完全实现这点。如果 **a.example.org** 和 **b.example.org** 是不同的虚拟主机, Apache 不会允许这样的连接重用,并会告知浏览器状态码**421 错误请求**。浏览器会意识到它需要重新打开一个到 **b.example.org** 的连接。这仍然能工作,只是会降低一些效率。 +Apache **mod_h[ttp]2** 还没有完全实现这点。如果 **a.example.org** 和 **b.example.org** 是不同的虚拟主机, Apache 不会允许这样的连接重用,并会告知浏览器状态码 **421 Misdirected Request**。浏览器会意识到它需要重新打开一个到 **b.example.org** 的连接。这仍然能工作,只是会降低一些效率。 -我们期望下一次的发布中能有切当的检查。 +我们期望下一次的发布中能有合适的检查。 Münster, 12.10.2015, @@ -355,7 +350,7 @@ via: https://icing.github.io/mod_h2/howto.html 作者:[icing][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 00abbfdbbc6d6efc9b1e5e9906bcaa21b987d3b2 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 10 Dec 2015 09:46:41 +0800 Subject: [PATCH 0540/1710] Delete 20151208 Install Wetty on Centos or RHEL 6.X.md --- ...208 Install Wetty on Centos or RHEL 6.X.md | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md diff --git a/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md b/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md deleted file mode 100644 index e675537c90..0000000000 --- a/sources/tech/20151208 Install Wetty on Centos or RHEL 6.X.md +++ /dev/null @@ -1,62 +0,0 @@ -translation by strugglingyouth -Install Wetty on Centos/RHEL 6.X -================================================================================ -![](http://www.unixmen.com/wp-content/uploads/2015/11/Terminal.png) - -What is Wetty? - -As a system administrator, you probably connect to remote servers using a program such as GNOME Terminal (or the like) if you’re on a Linux desktop, or a SSH client such as Putty if you have a Windows machine, while you perform other tasks like browsing the web or checking your email. - -### Step 1: Install epel repo ### - - # wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm - # rpm -ivh epel-release-6-8.noarch.rpm - -### Step 2: Install dependencies ### - - # yum install epel-release git nodejs npm -y - -### Step 3: After installing these dependencies, clone the GitHub repository ### - - # git clone https://github.com/krishnasrinivas/wetty - -### Step 4: Run Wetty ### - - # cd wetty - # npm install - -### Step 5: Starting Wetty and Access Linux Terminal from Web Browser ### - - # node app.js -p 8080 - -### Step 6: Wetty through HTTPS ### - - # openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes (complete this) - -### Step 7: launch Wetty via HTTPS ### - - # nohup node app.js --sslkey key.pem --sslcert cert.pem -p 8080 & - -### Step 8: Add an user for wetty ### - - # useradd - # Passwd - -### Step 9: Access wetty ### - - http://Your_IP-Address:8080 - give the credential have created before for wetty and access - -Enjoy - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/install-wetty-centosrhel-6-x/ - -作者:[Debojyoti 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.unixmen.com/author/debjyoti/ From cdae99b7aecb803ed71fd7569ff5259c58016cd2 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 10 Dec 2015 09:47:05 +0800 Subject: [PATCH 0541/1710] Create 20151208 Install Wetty on Centos or RHEL 6.X.md --- ...208 Install Wetty on Centos or RHEL 6.X.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 translated/tech/20151208 Install Wetty on Centos or RHEL 6.X.md diff --git a/translated/tech/20151208 Install Wetty on Centos or RHEL 6.X.md b/translated/tech/20151208 Install Wetty on Centos or RHEL 6.X.md new file mode 100644 index 0000000000..330a6cc8e6 --- /dev/null +++ b/translated/tech/20151208 Install Wetty on Centos or RHEL 6.X.md @@ -0,0 +1,62 @@ + +在 Centos/RHEL 6.X 上安装 Wetty +================================================================================ +![](http://www.unixmen.com/wp-content/uploads/2015/11/Terminal.png) + +Wetty 是什么? + +作为系统管理员,如果你是在 Linux 桌面下,你可能会使用一个软件来连接远程服务器,像 GNOME 终端(或类似的),如果你是在 Windows 下,你可能会使用像 Putty 这样的 SSH 客户端来连接,并同时可以在浏览器中查收邮件等做其他事情。 + +### 第1步: 安装 epel 源 ### + + # wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm + # rpm -ivh epel-release-6-8.noarch.rpm + +### 第2步:安装依赖 ### + + # yum install epel-release git nodejs npm -y + +### 第3步:在安装完依赖后,克隆 GitHub 仓库 ### + + # git clone https://github.com/krishnasrinivas/wetty + +### 第4步:运行 Wetty ### + + # cd wetty + # npm install + +### 第5步:从 Web 浏览器启动 Wetty 并访问 Linux 终端 ### + + # node app.js -p 8080 + +### 第6步:为 Wetty 安装 HTTPS 证书 ### + + # openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes (complete this) + +### Step 7: 通过 HTTPS 来使用 Wetty ### + + # nohup node app.js --sslkey key.pem --sslcert cert.pem -p 8080 & + +### Step 8: 为 wetty 添加一个用户 ### + + # useradd + # Passwd + +### 第9步:访问 wetty ### + + http://Your_IP-Address:8080 + give the credential have created before for wetty and access + +到此结束! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-wetty-centosrhel-6-x/ + +作者:[Debojyoti Das][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/debjyoti/ From 85ff02f26af97327f86dced7265ae1f4c4ba2eb7 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 10 Dec 2015 16:18:00 +0800 Subject: [PATCH 0542/1710] Translating by ZTinoZ --- .../20151123 7 ways hackers can use Wi-Fi against you.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md index b25656968a..2d42ba2e33 100644 --- a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -10,13 +10,13 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F ### 利用免费热点 ### -它们似乎无处不在,而且它们的数量会在[下一个四年里增加四倍][1]。但是它们当中很多都是不值得信任的But many of them are untrustworthy, created just so your login credentials, to email or even more sensitive accounts, 都能被黑客用一款名叫“sniffers”的软件截获 — 这款软件能截获到任何你通过该连接提交的信息。The best defense against sniffing hackers is to use a VPN (virtual private network). A VPN keeps your private data protected because it encrypts what you input. +它们似乎无处不在,而且它们的数量会在[下一个四年里增加四倍][1]。但是它们当中很多都是不值得信任的,从你的登录凭证、email甚至更加敏感的账户,都能被黑客用一款名叫“sniffers”的软件截获 — 这款软件能截获到任何你通过该连接提交的信息。防止被黑客盯上的最好办法就是使用VPN(virtual private network),它能保护你的数据隐私它会加密你所输入的信息。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/2_online-banking-100626675-orig.jpg) ### 网上银行 ### -You might think that no one needs to be warned against banking online using free Wi-Fi, but cybersecurity firm Kaspersky Lab says that [more than 100 banks worldwide have lost $900 million][2] from cyberhacking, so it would seem that a lot of people are doing it. If you want to use the free Wi-Fi in a coffee shop because you’re confident it will be legitimate, confirm the exact network name with the barista. It’s pretty easy for [someone else in the shop with a router to set up an open connection][3] with a name that seems like it would be the name of the shop’s Wi-Fi. +你可能认为没有人需要自己被提醒不要使用免费Wi-Fi来操作网上银行, 但网络安全厂商卡巴斯基实验室表示[全球超过100家银行因为网络黑客而损失9亿美元][2],由此可见还是有很多人因此受害。If you want to use the free Wi-Fi in a coffee shop because you’re confident it will be legitimate, confirm the exact network name with the barista. It’s pretty easy for [someone else in the shop with a router to set up an open connection][3] with a name that seems like it would be the name of the shop’s Wi-Fi. ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/3_keeping-wifi-on-100626676-orig.jpg) From 9ba128a144037ed1bba782614cb3399b960a425f Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 10 Dec 2015 17:32:53 +0800 Subject: [PATCH 0543/1710] =?UTF-8?q?20151210-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker --- ...ed with Docker by Dockerizing this Blog.md | 450 ++++++++++++++++++ 1 file changed, 450 insertions(+) create mode 100644 sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md diff --git a/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md b/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md new file mode 100644 index 0000000000..517f7840b5 --- /dev/null +++ b/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md @@ -0,0 +1,450 @@ +Getting started with Docker by Dockerizing this Blog +====================== +>This article covers the basic concepts of Docker and how to Dockerize an application by creating a custom Dockerfile +>Written by Benjamin Cane on 2015-12-01 10:00:00 + +Docker is an interesting technology that over the past 2 years has gone from an idea, to being used by organizations all over the world to deploy applications. In today's article I am going to cover how to get started with Docker by "Dockerizing" an existing application. The application in question is actually this very blog! + +## What is Docker + +Before we dive into learning the basics of Docker let's first understand what Docker is and why it is so popular. Docker, is an operating system container management tool that allows you to easily manage and deploy applications by making it easy to package them within operating system containers. + +### Containers vs. Virtual Machines + +Containers may not be as familiar as virtual machines but they are another method to provide **Operating System Virtualization**. However, they differ quite a bit from standard virtual machines. + +Standard virtual machines generally include a full Operating System, OS Packages and eventually an Application or two. This is made possible by a Hypervisor which provides hardware virtualization to the virtual machine. This allows for a single server to run many standalone operating systems as virtual guests. + +Containers are similar to virtual machines in that they allow a single server to run multiple operating environments, these environments however, are not full operating systems. Containers generally only include the necessary OS Packages and Applications. They do not generally contain a full operating system or hardware virtualization. This also means that containers have a smaller overhead than traditional virtual machines. + +Containers and Virtual Machines are often seen as conflicting technology, however, this is often a misunderstanding. Virtual Machines are a way to take a physical server and provide a fully functional operating environment that shares those physical resources with other virtual machines. A Container is generally used to isolate a running process within a single host to ensure that the isolated processes cannot interact with other processes within that same system. In fact containers are closer to **BSD Jails** and `chroot`'ed processes than full virtual machines. + +### What Docker provides on top of containers + +Docker itself is not a container runtime environment; in fact Docker is actually container technology agnostic with efforts planned for Docker to support [Solaris Zones](https://blog.docker.com/2015/08/docker-oracle-solaris-zones/) and [BSD Jails](https://wiki.freebsd.org/Docker). What Docker provides is a method of managing, packaging, and deploying containers. While these types of functions may exist to some degree for virtual machines they traditionally have not existed for most container solutions and the ones that existed, were not as easy to use or fully featured as Docker. + +Now that we know what Docker is, let's start learning how Docker works by first installing Docker and deploying a public pre-built container. + +## Starting with Installation +As Docker is not installed by default step 1 will be to install the Docker package; since our example system is running Ubuntu 14.0.4 we will do this using the Apt package manager. + +``` +# apt-get install docker.io +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + aufs-tools cgroup-lite git git-man liberror-perl +Suggested packages: + btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc + git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki + git-svn +The following NEW packages will be installed: + aufs-tools cgroup-lite docker.io git git-man liberror-perl +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +Need to get 7,553 kB of archives. +After this operation, 46.6 MB of additional disk space will be used. +Do you want to continue? [Y/n] y +``` + +To check if any containers are running we can execute the `docker` command using the `ps` option. + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +``` + +The `ps` function of the `docker` command works similar to the Linux `ps `command. It will show available Docker containers and their current status. Since we have not started any Docker containers yet, the command shows no running containers. + +## Deploying a pre-built nginx Docker container +One of my favorite features of Docker is the ability to deploy a pre-built container in the same way you would deploy a package with `yum` or `apt-get`. To explain this better let's deploy a pre-built container running the nginx web server. We can do this by executing the `docker` command again, however, this time with the `run` option. + +``` +# docker run -d nginx +Unable to find image 'nginx' locally +Pulling repository nginx +5c82215b03d1: Download complete +e2a4fb18da48: Download complete +58016a5acc80: Download complete +657abfa43d82: Download complete +dcb2fe003d16: Download complete +c79a417d7c6f: Download complete +abb90243122c: Download complete +d6137c9e2964: Download complete +85e566ddc7ef: Download complete +69f100eb42b5: Download complete +cd720b803060: Download complete +7cc81e9a118a: Download complete +``` + +The `run` function of the `docker` command tells Docker to find a specified Docker image and start a container running that image. By default, Docker containers run in the foreground, meaning when you execute `docker run` your shell will be bound to the container's console and the process running within the container. In order to launch this Docker container in the background I included the `-d` (**detach**) flag. + +By executing `docker ps` again we can see the nginx container running. + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f6d31ab01fc9 nginx:latest nginx -g 'daemon off 4 seconds ago Up 3 seconds 443/tcp, 80/tcp desperate_lalande +``` + +In the above output we can see the running container `desperate_lalande` and that this container has been built from the `nginx:latest image`. + +### Docker Images +Images are one of Docker's key features and is similar to a virtual machine image. Like virtual machine images, a Docker image is a container that has been saved and packaged. Docker however, doesn't just stop with the ability to create images. Docker also includes the ability to distribute those images via Docker repositories which are a similar concept to package repositories. This is what gives Docker the ability to deploy an image like you would deploy a package with `yum`. To get a better understanding of how this works let's look back at the output of the `docker run` execution. + +``` +# docker run -d nginx +Unable to find image 'nginx' locally +``` + +The first message we see is that `docker` could not find an image named nginx locally. The reason we see this message is that when we executed `docker run` we told Docker to startup a container, a container based on an image named **nginx**. Since Docker is starting a container based on a specified image it needs to first find that image. Before checking any remote repository Docker first checks locally to see if there is a local image with the specified name. + +Since this system is brand new there is no Docker image with the name nginx, which means Docker will need to download it from a Docker repository. + +``` +Pulling repository nginx +5c82215b03d1: Download complete +e2a4fb18da48: Download complete +58016a5acc80: Download complete +657abfa43d82: Download complete +dcb2fe003d16: Download complete +c79a417d7c6f: Download complete +abb90243122c: Download complete +d6137c9e2964: Download complete +85e566ddc7ef: Download complete +69f100eb42b5: Download complete +cd720b803060: Download complete +7cc81e9a118a: Download complete +``` + +This is exactly what the second part of the output is showing us. By default, Docker uses the [Docker Hub](https://hub.docker.com/) repository, which is a repository service that Docker (the company) runs. + +Like GitHub, Docker Hub is free for public repositories but requires a subscription for private repositories. It is possible however, to deploy your own Docker repository, in fact it is as easy as `docker run registry`. For this article we will not be deploying a custom registry service. + +### Stopping and Removing the Container +Before moving on to building a custom Docker container let's first clean up our Docker environment. We will do this by stopping the container from earlier and removing it. + +To start a container we executed `docker` with the `run` option, in order to stop this same container we simply need to execute the `docker` with the `kill` option specifying the container name. + +``` +# docker kill desperate_lalande +desperate_lalande +``` + +If we execute `docker ps` again we will see that the container is no longer running. + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +``` + +However, at this point we have only stopped the container; while it may no longer be running it still exists. By default, `docker ps` will only show running containers, if we add the `-a` (all) flag it will show all containers running or not. + +``` +# docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f6d31ab01fc9 5c82215b03d1 nginx -g 'daemon off 4 weeks ago Exited (-1) About a minute ago desperate_lalande +``` + +In order to fully remove the container we can use the `docker` command with the `rm` option. + +``` +# docker rm desperate_lalande +desperate_lalande +``` + +While this container has been removed; we still have a **nginx** image available. If we were to re-run `docker run -d nginx` again the container would be started without having to fetch the nginx image again. This is because Docker already has a saved copy on our local system. + +To see a full list of local images we can simply run the `docker` command with the `images` option. + +``` +# docker images +REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE +nginx latest 9fab4090484a 5 days ago 132.8 MB +``` + +## Building our own custom image +At this point we have used a few basic Docker commands to start, stop and remove a common pre-built image. In order to "Dockerize" this blog however, we are going to have to build our own Docker image and that means creating a **Dockerfile**. + +With most virtual machine environments if you wish to create an image of a machine you need to first create a new virtual machine, install the OS, install the application and then finally convert it to a template or image. With Docker however, these steps are automated via a Dockerfile. A Dockerfile is a way of providing build instructions to Docker for the creation of a custom image. In this section we are going to build a custom Dockerfile that can be used to deploy this blog. + +### Understanding the Application +Before we can jump into creating a Dockerfile we first need to understand what is required to deploy this blog. + +The blog itself is actually static HTML pages generated by a custom static site generator that I wrote named; **hamerkop**. The generator is very simple and more about getting the job done for this blog specifically. All the code and source files for this blog are available via a public [GitHub](https://github.com/madflojo/blog) repository. In order to deploy this blog we simply need to grab the contents of the GitHub repository, install **Python** along with some **Python** modules and execute the `hamerkop` application. To serve the generated content we will use **nginx**; which means we will also need **nginx** to be installed. + +So far this should be a pretty simple Dockerfile, but it will show us quite a bit of the [Dockerfile Syntax](https://docs.docker.com/v1.8/reference/builder/). To get started we can clone the GitHub repository and creating a Dockerfile with our favorite editor; `vi` in my case. + +``` +# git clone https://github.com/madflojo/blog.git +Cloning into 'blog'... +remote: Counting objects: 622, done. +remote: Total 622 (delta 0), reused 0 (delta 0), pack-reused 622 +Receiving objects: 100% (622/622), 14.80 MiB | 1.06 MiB/s, done. +Resolving deltas: 100% (242/242), done. +Checking connectivity... done. +# cd blog/ +# vi Dockerfile +``` + +### FROM - Inheriting a Docker image +The first instruction of a Dockerfile is the `FROM` instruction. This is used to specify an existing Docker image to use as our base image. This basically provides us with a way to inherit another Docker image. In this case we will be starting with the same **nginx** image we were using before, if we wanted to start with a blank slate we could use the **Ubuntu** Docker image by specifying `ubuntu:latest`. + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane +``` + +In addition to the `FROM` instruction, I also included a `MAINTAINER` instruction which is used to show the Author of the Dockerfile. + +As Docker supports using `#` as a comment marker, I will be using this syntax quite a bit to explain the sections of this Dockerfile. + +### Running a test build +Since we inherited the **nginx** Docker image our current Dockerfile also inherited all the instructions within the [Dockerfile](https://github.com/nginxinc/docker-nginx/blob/08eeb0e3f0a5ee40cbc2bc01f0004c2aa5b78c15/Dockerfile) used to build that **nginx** image. What this means is even at this point we are able to build a Docker image from this Dockerfile and run a container from that image. The resulting image will essentially be the same as the **nginx** image but we will run through a build of this Dockerfile now and a few more times as we go to help explain the Docker build process. + +In order to start the build from a Dockerfile we can simply execute the `docker` command with the **build** option. + +``` +# docker build -t blog /root/blog +Sending build context to Docker daemon 23.6 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Running in c97f36450343 + ---> 60a44f78d194 +Removing intermediate container c97f36450343 +Successfully built 60a44f78d194 +``` + +In the above example I used the `-t` (**tag**) flag to "tag" the image as "blog". This essentially allows us to name the image, without specifying a tag the image would only be callable via an **Image ID** that Docker assigns. In this case the **Image ID** is `60a44f78d194` which we can see from the `docker` command's build success message. + +In addition to the `-t` flag, I also specified the directory `/root/blog`. This directory is the "build directory", which is the directory that contains the Dockerfile and any other files necessary to build this container. + +Now that we have run through a successful build, let's start customizing this image. + +### Using RUN to execute apt-get +The static site generator used to generate the HTML pages is written in **Python** and because of this the first custom task we should perform within this `Dockerfile` is to install Python. To install the Python package we will use the Apt package manager. This means we will need to specify within the Dockerfile that `apt-get update` and `apt-get install python-dev` are executed; we can do this with the `RUN` instruction. + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip +``` + +In the above we are simply using the `RUN` instruction to tell Docker that when it builds this image it will need to execute the specified `apt-get` commands. The interesting part of this is that these commands are only executed within the context of this container. What this means is even though `python-dev` and `python-pip` are being installed within the container, they are not being installed for the host itself. Or to put it simplier, within the container the `pip` command will execute, outside the container, the `pip` command does not exist. + +It is also important to note that the Docker build process does not accept user input during the build. This means that any commands being executed by the `RUN` instruction must complete without user input. This adds a bit of complexity to the build process as many applications require user input during installation. For our example, none of the commands executed by `RUN` require user input. + +### Installing Python modules +With **Python** installed we now need to install some Python modules. To do this outside of Docker, we would generally use the `pip` command and reference a file within the blog's Git repository named `requirements.txt`. In an earlier step we used the `git` command to "clone" the blog's GitHub repository to the `/root/blog` directory; this directory also happens to be the directory that we have created the `Dockerfile`. This is important as it means the contents of the Git repository are accessible to Docker during the build process. + +When executing a build, Docker will set the context of the build to the specified "build directory". This means that any files within that directory and below can be used during the build process, files outside of that directory (outside of the build context), are inaccessible. + +In order to install the required Python modules we will need to copy the `requirements.txt` file from the build directory into the container. We can do this using the `COPY` instruction within the `Dockerfile`. + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip + +## Create a directory for required files +RUN mkdir -p /build/ + +## Add requirements file and run pip +COPY requirements.txt /build/ +RUN pip install -r /build/requirements.txt +``` + +Within the `Dockerfile` we added 3 instructions. The first instruction uses `RUN` to create a `/build/` directory within the container. This directory will be used to copy any application files needed to generate the static HTML pages. The second instruction is the `COPY` instruction which copies the `requirements.txt` file from the "build directory" (`/root/blog`) into the `/build` directory within the container. The third is using the `RUN` instruction to execute the `pip` command; installing all the modules specified within the `requirements.txt` file. + +`COPY` is an important instruction to understand when building custom images. Without specifically copying the file within the Dockerfile this Docker image would not contain the requirements.txt file. With Docker containers everything is isolated, unless specifically executed within a Dockerfile a container is not likely to include required dependencies. + +### Re-running a build +Now that we have a few customization tasks for Docker to perform let's try another build of the blog image again. + +``` +# docker build -t blog /root/blog +Sending build context to Docker daemon 19.52 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Using cache + ---> 8e0f1899d1eb +Step 2 : RUN apt-get update + ---> Using cache + ---> 78b36ef1a1a2 +Step 3 : RUN apt-get install -y python-dev python-pip + ---> Using cache + ---> ef4f9382658a +Step 4 : RUN mkdir -p /build/ + ---> Running in bde05cf1e8fe + ---> f4b66e09fa61 +Removing intermediate container bde05cf1e8fe +Step 5 : COPY requirements.txt /build/ + ---> cef11c3fb97c +Removing intermediate container 9aa8ff43f4b0 +Step 6 : RUN pip install -r /build/requirements.txt + ---> Running in c50b15ddd8b1 +Downloading/unpacking jinja2 (from -r /build/requirements.txt (line 1)) +Downloading/unpacking PyYaml (from -r /build/requirements.txt (line 2)) + +Successfully installed jinja2 PyYaml mistune markdown MarkupSafe +Cleaning up... + ---> abab55c20962 +Removing intermediate container c50b15ddd8b1 +Successfully built abab55c20962 +``` + +From the above build output we can see the build was successful, but we can also see another interesting message;` ---> Using cache`. What this message is telling us is that Docker was able to use its build cache during the build of this image. + +#### Docker build cache + +When Docker is building an image, it doesn't just build a single image; it actually builds multiple images throughout the build processes. In fact we can see from the above output that after each "Step" Docker is creating a new image. + +``` + Step 5 : COPY requirements.txt /build/ + ---> cef11c3fb97c +``` + +The last line from the above snippet is actually Docker informing us of the creating of a new image, it does this by printing the **Image ID**; `cef11c3fb97c`. The useful thing about this approach is that Docker is able to use these images as cache during subsequent builds of the **blog** image. This is useful because it allows Docker to speed up the build process for new builds of the same container. If we look at the example above we can actually see that rather than installing the `python-dev` and `python-pip` packages again, Docker was able to use a cached image. However, since Docker was unable to find a build that executed the `mkdir` command, each subsequent step was executed. + +The Docker build cache is a bit of a gift and a curse; the reason for this is that the decision to use cache or to rerun the instruction is made within a very narrow scope. For example, if there was a change to the `requirements.txt` file Docker would detect this change during the build and start fresh from that point forward. It does this because it can view the contents of the `requirements.txt` file. The execution of the `apt-get` commands however, are another story. If the **Apt** repository that provides the Python packages were to contain a newer version of the python-pip package; Docker would not be able to detect the change and would simply use the build cache. This means that an older package may be installed. While this may not be a major issue for the `python-pip` package it could be a problem if the installation was caching a package with a known vulnerability. + +For this reason it is useful to periodically rebuild the image without using Docker's cache. To do this you can simply specify `--no-cache=True` when executing a Docker build. + +## Deploying the rest of the blog +With the Python packages and modules installed this leaves us at the point of copying the required application files and running the `hamerkop` application. To do this we will simply use more `COPY` and `RUN` instructions. + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip + +## Create a directory for required files +RUN mkdir -p /build/ + +## Add requirements file and run pip +COPY requirements.txt /build/ +RUN pip install -r /build/requirements.txt + +## Add blog code nd required files +COPY static /build/static +COPY templates /build/templates +COPY hamerkop /build/ +COPY config.yml /build/ +COPY articles /build/articles + +## Run Generator +RUN /build/hamerkop -c /build/config.yml +``` + +Now that we have the rest of the build instructions, let's run through another build and verify that the image builds successfully. + +``` +# docker build -t blog /root/blog/ +Sending build context to Docker daemon 19.52 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Using cache + ---> 8e0f1899d1eb +Step 2 : RUN apt-get update + ---> Using cache + ---> 78b36ef1a1a2 +Step 3 : RUN apt-get install -y python-dev python-pip + ---> Using cache + ---> ef4f9382658a +Step 4 : RUN mkdir -p /build/ + ---> Using cache + ---> f4b66e09fa61 +Step 5 : COPY requirements.txt /build/ + ---> Using cache + ---> cef11c3fb97c +Step 6 : RUN pip install -r /build/requirements.txt + ---> Using cache + ---> abab55c20962 +Step 7 : COPY static /build/static + ---> 15cb91531038 +Removing intermediate container d478b42b7906 +Step 8 : COPY templates /build/templates + ---> ecded5d1a52e +Removing intermediate container ac2390607e9f +Step 9 : COPY hamerkop /build/ + ---> 59efd1ca1771 +Removing intermediate container b5fbf7e817b7 +Step 10 : COPY config.yml /build/ + ---> bfa3db6c05b7 +Removing intermediate container 1aebef300933 +Step 11 : COPY articles /build/articles + ---> 6b61cc9dde27 +Removing intermediate container be78d0eb1213 +Step 12 : RUN /build/hamerkop -c /build/config.yml + ---> Running in fbc0b5e574c5 +Successfully created file /usr/share/nginx/html//2011/06/25/checking-the-number-of-lwp-threads-in-linux +Successfully created file /usr/share/nginx/html//2011/06/checking-the-number-of-lwp-threads-in-linux + +Successfully created file /usr/share/nginx/html//archive.html +Successfully created file /usr/share/nginx/html//sitemap.xml + ---> 3b25263113e1 +Removing intermediate container fbc0b5e574c5 +Successfully built 3b25263113e1 +``` + +### Running a custom container +With a successful build we can now start our custom container by running the `docker` command with the `run` option, similar to how we started the nginx container earlier. + +``` +# docker run -d -p 80:80 --name=blog blog +5f6c7a2217dcdc0da8af05225c4d1294e3e6bb28a41ea898a1c63fb821989ba1 +``` + +Once again the `-d` (**detach**) flag was used to tell Docker to run the container in the background. However, there are also two new flags. The first new flag is `--name`, which is used to give the container a user specified name. In the earlier example we did not specify a name and because of that Docker randomly generated one. The second new flag is `-p`, this flag allows users to map a port from the host machine to a port within the container. + +The base **nginx** image we used exposes port 80 for the HTTP service. By default, ports bound within a Docker container are not bound on the host system as a whole. In order for external systems to access ports exposed within a container the ports must be mapped from a host port to a container port using the `-p` flag. The command above maps port 80 from the host, to port 80 within the container. If we wished to map port 8080 from the host, to port 80 within the container we could do so by specifying the ports in the following syntax `-p 8080:80`. + +From the above command it appears that our container was started successfully, we can verify this by executing `docker ps`. + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d264c7ef92bd blog:latest nginx -g 'daemon off 3 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:80->80/tcp blog +``` + +## Wrapping up + +At this point we now have a running custom Docker container. While we touched on a few Dockerfile instructions within this article we have yet to discuss all the instructions. For a full list of Dockerfile instructions you can checkout [Docker's reference page](https://docs.docker.com/v1.8/reference/builder/), which explains the instructions very well. + +Another good resource is their [Dockerfile Best Practices page](https://docs.docker.com/engine/articles/dockerfile_best-practices/) which contains quite a few best practices for building custom Dockerfiles. Some of these tips are very useful such as strategically ordering the commands within the Dockerfile. In the above examples our Dockerfile has the `COPY` instruction for the `articles` directory as the last `COPY` instruction. The reason for this is that the `articles` directory will change quite often. It's best to put instructions that will change oftenat the lowest point possible within the Dockerfile to optimize steps that can be cached. + +In this article we covered how to start a pre-built container and how to build, then deploy a custom container. While there is quite a bit to learn about Docker this article should give you a good idea on how to get started. Of course, as always if you think there is anything that should be added drop it in the comments below. + +-------------------------------------- +via:http://bencane.com/2015/12/01/getting-started-with-docker-by-dockerizing-this-blog/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+bencane%2FSAUo+%28Benjamin+Cane%29 + +作者:Benjamin Cane + +译者:[译者ID](https://github.com/译者ID) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1806a1dbef0cd6c17373be0cab953b6bd96dff88 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Thu, 10 Dec 2015 21:06:16 +0800 Subject: [PATCH 0544/1710] Delete 20151130 eSpeak--Text To Speech Tool For Linux.md --- ...0 eSpeak--Text To Speech Tool For Linux.md | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md diff --git a/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md b/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md deleted file mode 100644 index fcaff4177d..0000000000 --- a/sources/share/20151130 eSpeak--Text To Speech Tool For Linux.md +++ /dev/null @@ -1,65 +0,0 @@ -translating。。 -eSpeak: Text To Speech Tool For Linux -================================================================================ -![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) - -[eSpeak][1] is a command line tool for Linux that converts text to speech. This is a compact speech synthesizer that provides support to English and many other languages. It is written in C. - -eSpeak reads the text from the standard input or the input file. The voice generated, however, is nowhere close to a human voice. But it is still a compact and handy tool if you want to use it in your projects. - -Some of the main features of eSpeak are: - -- A command line tool for Linux and Windows -- Speaks text from a file or from stdin -- Shared library version for use by other programs -- SAPI5 version for Windows, so it can be used with screen-readers and other programs that support the Windows SAPI5 interface. -- Ported to other platforms, including Android, Mac OSX etc. -- Several voice characteristics to choose from -- speech output can be saved as [.WAV file][2] -- SSML ([Speech Synthesis Markup Language][3]) is supported partially along with HTML -- Tiny in size, the complete program with language support etc is under 2 MB. -- Can translate text into phoneme codes, so it could be adapted as a front end for another speech synthesis engine. -- Development tools available for producing and tuning phoneme data. - -### Install eSpeak ### - -To install eSpeak in Ubuntu based system, use the command below in a terminal: - - sudo apt-get install espeak - -eSpeak is an old tool and I presume that it should be available in the repositories of other Linux distributions such as Arch Linux, Fedora etc. You can install eSpeak easily using dnf, pacman etc. - -To use eSpeak, just use it like: espeak and press enter to hear it aloud. Use Ctrl+C to close the running program. - -![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) - -There are several other options available. You can browse through them through the help section of the program. - -### GUI version: Gespeaker ### - -If you prefer the GUI version over the command line, you can install Gespeaker that provides a GTK front end to eSpeak. - -Use the command below to install Gespeaker: - - sudo apt-get install gespeaker - -The interface is straightforward and easy to use. You can explore it all by yourself. - -![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) - -While such tools might not be useful for general computing need, it could be handy if you are working on some projects where text to speech conversion is required. I let you decide the usage of this speech synthesizer. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/espeak-text-speech-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://espeak.sourceforge.net/ -[2]:http://en.wikipedia.org/wiki/WAV -[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language From 9f317d018f8edbed9423c864e2f6239597a7ea63 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Thu, 10 Dec 2015 21:08:48 +0800 Subject: [PATCH 0545/1710] Create 20151130 eSpeak--Text To Speech Tool For Linux.md --- ...0 eSpeak--Text To Speech Tool For Linux.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 translated/20151130 eSpeak--Text To Speech Tool For Linux.md diff --git a/translated/20151130 eSpeak--Text To Speech Tool For Linux.md b/translated/20151130 eSpeak--Text To Speech Tool For Linux.md new file mode 100644 index 0000000000..271866ff47 --- /dev/null +++ b/translated/20151130 eSpeak--Text To Speech Tool For Linux.md @@ -0,0 +1,64 @@ +eSpeak: Linux文本转语音工具 +================================================================================ +![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) + +[eSpeak][1]是Linux的命令行工具,能把文本转变成语音。这是一款用C语言写就的精致的语音合成器,提供英语和其它多种语言支持。 + +eSpeak从标准输入或者输入文件中读取文本。虽然语音输出与真人声音相去甚远,但是,在你项目有用得到的地方,eSpeak仍不失为一个精致快捷的工具。 + +eSpeak部分主要特性如下: + +- 为Linux和Windows准备的命令行工具 +- 从文件或者标准输入中把文本读出来 +- 提供给其它程序使用的共享库版本 +- 为Windows提供SAPI5版本,在screen-readers或者其它支持Windows SAPI5接口程序的支持下,eSpeak仍然能正常使用 +- 可移植到其它平台,包括安卓,OSX等 +- 多种特色声音提供选择 +- 语音输出可保存为[.WAV][2]格式的文件 +- 部分SSML([Speech Synthesis Markup Language][3])能为HTML所支持 +- 体积小巧,整个程序包括语言支持等占用不足2MB +- 可以实现文本到音素编码的转化,能被其它语音合成引擎吸纳为前端工具 +- 可作为生成和调制音素数据的开发工具 + +### 安装eSpeak ### + +基于Ubuntu的系统中,在终端运行以下命令安装eSpeak: + + sudo apt-get install espeak + +eSpeak is an old tool and I presume that it should be available in the repositories of other Linux distributions such as Arch Linux, Fedora etc. You can install eSpeak easily using dnf, pacman etc.eSpeak是一个古老的工具,我推测它应该能在其它众多Linux发行版如Arch,Fedora中运行。使用dnf,pacman等命令就能轻易安装。 + +eSpeak用法如下:输入espeak按enter键运行程序。输入字符按enter转换为语音输出(译补)。使用Ctrl+C来关闭运行中的程序。 + +![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) + +还有其它可以的选项,可以通过程序帮助进行查看。 + +### GUI版本:Gespeaker ### + +如果你更倾向于使用GUI版本,可以安装Gespeaker,它为eSpeak提供了GTK界面。 + +使用以下命令来安装Gespeaker: + + sudo apt-get install gespeaker + +操作接口简明易用,你完全可以自行探索。 + +![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) + +虽然这个工具不能为大部分计算所用,但是当你的项目需要把文本转换成语音,espeak还是挺方便使用的。需则用之吧~ + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/espeak-text-speech-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/soooogreen) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://espeak.sourceforge.net/ +[2]:http://en.wikipedia.org/wiki/WAV +[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language From 447e527fdc04da91eb873fef283cccfb8d953196 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Thu, 10 Dec 2015 21:09:34 +0800 Subject: [PATCH 0546/1710] Delete 20151130 eSpeak--Text To Speech Tool For Linux.md --- ...0 eSpeak--Text To Speech Tool For Linux.md | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 translated/20151130 eSpeak--Text To Speech Tool For Linux.md diff --git a/translated/20151130 eSpeak--Text To Speech Tool For Linux.md b/translated/20151130 eSpeak--Text To Speech Tool For Linux.md deleted file mode 100644 index 271866ff47..0000000000 --- a/translated/20151130 eSpeak--Text To Speech Tool For Linux.md +++ /dev/null @@ -1,64 +0,0 @@ -eSpeak: Linux文本转语音工具 -================================================================================ -![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) - -[eSpeak][1]是Linux的命令行工具,能把文本转变成语音。这是一款用C语言写就的精致的语音合成器,提供英语和其它多种语言支持。 - -eSpeak从标准输入或者输入文件中读取文本。虽然语音输出与真人声音相去甚远,但是,在你项目有用得到的地方,eSpeak仍不失为一个精致快捷的工具。 - -eSpeak部分主要特性如下: - -- 为Linux和Windows准备的命令行工具 -- 从文件或者标准输入中把文本读出来 -- 提供给其它程序使用的共享库版本 -- 为Windows提供SAPI5版本,在screen-readers或者其它支持Windows SAPI5接口程序的支持下,eSpeak仍然能正常使用 -- 可移植到其它平台,包括安卓,OSX等 -- 多种特色声音提供选择 -- 语音输出可保存为[.WAV][2]格式的文件 -- 部分SSML([Speech Synthesis Markup Language][3])能为HTML所支持 -- 体积小巧,整个程序包括语言支持等占用不足2MB -- 可以实现文本到音素编码的转化,能被其它语音合成引擎吸纳为前端工具 -- 可作为生成和调制音素数据的开发工具 - -### 安装eSpeak ### - -基于Ubuntu的系统中,在终端运行以下命令安装eSpeak: - - sudo apt-get install espeak - -eSpeak is an old tool and I presume that it should be available in the repositories of other Linux distributions such as Arch Linux, Fedora etc. You can install eSpeak easily using dnf, pacman etc.eSpeak是一个古老的工具,我推测它应该能在其它众多Linux发行版如Arch,Fedora中运行。使用dnf,pacman等命令就能轻易安装。 - -eSpeak用法如下:输入espeak按enter键运行程序。输入字符按enter转换为语音输出(译补)。使用Ctrl+C来关闭运行中的程序。 - -![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) - -还有其它可以的选项,可以通过程序帮助进行查看。 - -### GUI版本:Gespeaker ### - -如果你更倾向于使用GUI版本,可以安装Gespeaker,它为eSpeak提供了GTK界面。 - -使用以下命令来安装Gespeaker: - - sudo apt-get install gespeaker - -操作接口简明易用,你完全可以自行探索。 - -![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) - -虽然这个工具不能为大部分计算所用,但是当你的项目需要把文本转换成语音,espeak还是挺方便使用的。需则用之吧~ - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/espeak-text-speech-linux/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/soooogreen) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://espeak.sourceforge.net/ -[2]:http://en.wikipedia.org/wiki/WAV -[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language From d4c70c05147e8f6d93fd47ff795154bc388c70ba Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Thu, 10 Dec 2015 21:11:07 +0800 Subject: [PATCH 0547/1710] Create 20151130 eSpeak--Text To Speech Tool For Linux.md --- ...0 eSpeak--Text To Speech Tool For Linux.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md diff --git a/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md b/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md new file mode 100644 index 0000000000..271866ff47 --- /dev/null +++ b/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md @@ -0,0 +1,64 @@ +eSpeak: Linux文本转语音工具 +================================================================================ +![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) + +[eSpeak][1]是Linux的命令行工具,能把文本转变成语音。这是一款用C语言写就的精致的语音合成器,提供英语和其它多种语言支持。 + +eSpeak从标准输入或者输入文件中读取文本。虽然语音输出与真人声音相去甚远,但是,在你项目有用得到的地方,eSpeak仍不失为一个精致快捷的工具。 + +eSpeak部分主要特性如下: + +- 为Linux和Windows准备的命令行工具 +- 从文件或者标准输入中把文本读出来 +- 提供给其它程序使用的共享库版本 +- 为Windows提供SAPI5版本,在screen-readers或者其它支持Windows SAPI5接口程序的支持下,eSpeak仍然能正常使用 +- 可移植到其它平台,包括安卓,OSX等 +- 多种特色声音提供选择 +- 语音输出可保存为[.WAV][2]格式的文件 +- 部分SSML([Speech Synthesis Markup Language][3])能为HTML所支持 +- 体积小巧,整个程序包括语言支持等占用不足2MB +- 可以实现文本到音素编码的转化,能被其它语音合成引擎吸纳为前端工具 +- 可作为生成和调制音素数据的开发工具 + +### 安装eSpeak ### + +基于Ubuntu的系统中,在终端运行以下命令安装eSpeak: + + sudo apt-get install espeak + +eSpeak is an old tool and I presume that it should be available in the repositories of other Linux distributions such as Arch Linux, Fedora etc. You can install eSpeak easily using dnf, pacman etc.eSpeak是一个古老的工具,我推测它应该能在其它众多Linux发行版如Arch,Fedora中运行。使用dnf,pacman等命令就能轻易安装。 + +eSpeak用法如下:输入espeak按enter键运行程序。输入字符按enter转换为语音输出(译补)。使用Ctrl+C来关闭运行中的程序。 + +![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) + +还有其它可以的选项,可以通过程序帮助进行查看。 + +### GUI版本:Gespeaker ### + +如果你更倾向于使用GUI版本,可以安装Gespeaker,它为eSpeak提供了GTK界面。 + +使用以下命令来安装Gespeaker: + + sudo apt-get install gespeaker + +操作接口简明易用,你完全可以自行探索。 + +![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) + +虽然这个工具不能为大部分计算所用,但是当你的项目需要把文本转换成语音,espeak还是挺方便使用的。需则用之吧~ + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/espeak-text-speech-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/soooogreen) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://espeak.sourceforge.net/ +[2]:http://en.wikipedia.org/wiki/WAV +[3]:http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language From 211f6a4d1bd3687088562033dc63a8be6af7ecaf Mon Sep 17 00:00:00 2001 From: tastynoodle Date: Fri, 11 Dec 2015 01:30:32 -0500 Subject: [PATCH 0548/1710] Translating by tastynoodle --- .../20150901 5 best open source board games to play online.md | 1 + 1 file changed, 1 insertion(+) 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 c14fecc697..eee49289e0 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 tastynoodle 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. From 4f6c6f5048089529e877bdc35831ebb197608325 Mon Sep 17 00:00:00 2001 From: CHL Date: Fri, 11 Dec 2015 16:53:45 +0800 Subject: [PATCH 0549/1710] Update 20151208 Apple Swift Programming Language Comes To Linux.md --- ...0151208 Apple Swift Programming Language Comes To Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md b/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md index 1c13c09dba..ced2a1353d 100644 --- a/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md +++ b/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md @@ -1,3 +1,5 @@ +Flowsnow translating + Apple Swift Programming Language Comes To Linux ================================================================================ ![](http://itsfoss.com/wp-content/uploads/2015/12/Apple-Swift-Open-Source.jpg) @@ -38,4 +40,4 @@ via: http://itsfoss.com/swift-open-source-linux/ [3]:https://github.com/apple [4]:https://swift.org/download/#latest-development-snapshots [5]:https://wiki.ubuntu.com/ubuntu-make -[6]:http://itsfoss.com/install-visual-studio-code-ubuntu/ \ No newline at end of file +[6]:http://itsfoss.com/install-visual-studio-code-ubuntu/ From 265933a022a5679aff971ca6eca1c0779381eed0 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Fri, 11 Dec 2015 18:46:27 +0800 Subject: [PATCH 0550/1710] translating by sg --- .../20151124 Review--5 memory debuggers for Linux coding.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md b/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md index db465e47cd..1427a8e865 100644 --- a/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md +++ b/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md @@ -1,3 +1,4 @@ +translating。。。 Review: 5 memory debuggers for Linux coding ================================================================================ ![](http://images.techhive.com/images/article/2015/11/penguinadmin-2400px-100627186-primary.idge.jpg) @@ -281,4 +282,4 @@ via: http://www.computerworld.com/article/3003957/linux/review-5-memory-debugger [41]:http://linux.die.net/man/1/gcc [42]:http://linux.die.net/man/1/g++ [43]:https://sourceware.org/ml/libc-help/2014-05/msg00008.html -[44]:https://en.wikipedia.org/wiki/Thread_safety \ No newline at end of file +[44]:https://en.wikipedia.org/wiki/Thread_safety From af06eed89236d3819c298f61da04c61ad563a7cb Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sat, 12 Dec 2015 10:50:25 +0800 Subject: [PATCH 0551/1710] Update 20151123 Data Structures in the Linux Kernel.md --- sources/tech/20151123 Data Structures in the Linux Kernel.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20151123 Data Structures in the Linux Kernel.md b/sources/tech/20151123 Data Structures in the Linux Kernel.md index 187b3ce9cd..d344eacd97 100644 --- a/sources/tech/20151123 Data Structures in the Linux Kernel.md +++ b/sources/tech/20151123 Data Structures in the Linux Kernel.md @@ -1,3 +1,5 @@ +Translating by DongShuaike + Data Structures in the Linux Kernel ================================================================================ From 86a10331d52e0c2898d89af6c9d2b3eee49241e4 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sat, 12 Dec 2015 10:52:22 +0800 Subject: [PATCH 0552/1710] Update 20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md --- ...estore Point) your Ubuntu or Linux Mint with SystemBack.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md index 98193a8f72..8fc02b4a9b 100644 --- a/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md +++ b/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md @@ -1,3 +1,5 @@ +Translating by DongShuaike + Backup (System Restore Point) your Ubuntu/Linux Mint with SystemBack ================================================================================ System Restore is must have feature for any OS that allows the user to revert their computer's state (including system files, installed applications, and system settings) to that of a previous point in time, which can be used to recover from system malfunctions or other problems. @@ -37,4 +39,4 @@ via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[1]:https://launchpad.net/systemback \ No newline at end of file +[1]:https://launchpad.net/systemback From 04483b773080d648b432fc0cf9fd303091665507 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 12 Dec 2015 12:24:13 +0800 Subject: [PATCH 0553/1710] Translated sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md --- ...resses To One Interface On Ubuntu 15.10.md | 89 +++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-) rename {sources => translated}/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md (71%) diff --git a/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md similarity index 71% rename from sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md rename to translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md index 65da864ec4..fd61e5a939 100644 --- a/sources/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md +++ b/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md @@ -1,19 +1,18 @@ -ictlyh Translating -Assign Multiple IP Addresses To One Interface On Ubuntu 15.10 +在 Ubuntu 15.10 上为单个网卡设置多个 IP 地址 ================================================================================ -Some times you might want to use more than one IP address for your network interface card. What will you do in such cases? Buy an extra network card and assign new IP? No, It’s not necessary(at least in the small networks). We can now assign multiple IP addresses to one interface on Ubuntu systems. Curious to know how? Well, Follow me, It is not that difficult. +有时候你可能想在你的网卡上使用多个 IP 地址。遇到这种情况你会怎么办呢?买一个新的网卡并分配一个新的 IP?不,这没有必要(至少在小网络中)。现在我们可以在 Ubuntu 系统中为一个网卡分配多个 IP 地址。想知道怎么做到的?跟着我往下看,其实并不难。 -This method will work on Debian and it’s derivatives too. +这个方法也适用于 Debian 以及它的衍生版本。 -### Add additional IP addresses temporarily ### +### 临时添加 IP 地址 ### -First, let us find the IP address of the network card. In my Ubuntu 15.10 server, I use only one network card. +首先,让我们找到网卡的 IP 地址。在我的 Ubuntu 15.10 服务器版中,我只使用了一个网卡。 -Run the following command to find out the IP address: +运行下面的命令找到 IP 地址: sudo ip addr -**Sample output:** +**事例输出:** 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 @@ -28,11 +27,11 @@ Run the following command to find out the IP address: inet6 fe80::a00:27ff:fe2a:34e/64 scope link valid_lft forever preferred_lft forever -Or +或 sudo ifconfig -**Sample output:** +**事例输出:** enp0s3 Link encap:Ethernet HWaddr 08:00:27:2a:03:4b inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0 @@ -51,19 +50,19 @@ Or collisions:0 txqueuelen:0 RX bytes:38793 (38.7 KB) TX bytes:38793 (38.7 KB) -As you see in the above output, my network card name is **enp0s3**, and its IP address is **192.168.1.103**. +正如你在上面看到的,我的网卡名称是 **enp0s3**,它的 IP 地址是 **192.168.1.103**。 -Now let us add an additional IP address, for example **192.168.1.104**, to the Interface card. +现在让我们来为网卡添加一个新的 IP 地址,例如说 **192.168.1.104**。 -Open your Terminal and run the following command to add additional IP. +打开你的终端并运行下面的命令添加额外的 IP。 sudo ip addr add 192.168.1.104/24 dev enp0s3 -Now, let us check if the IP is added using command: +用命令检查是否启用了新的 IP: sudo ip address show enp0s3 -**Sample output:** +**样例输出:** 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff @@ -74,13 +73,13 @@ Now, let us check if the IP is added using command: inet6 fe80::a00:27ff:fe2a:34e/64 scope link valid_lft forever preferred_lft forever -Similarly, you can add as many IP addresses as you want. +类似地,你可以添加想要的任意多的 IP 地址。 -Let us ping the IP address to verify it. +让我们 ping 一下这个 IP 地址验证一下。 sudo ping 192.168.1.104 -**Sample output:** +**样例输出** PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data. 64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=0.901 ms @@ -88,17 +87,17 @@ Let us ping the IP address to verify it. 64 bytes from 192.168.1.104: icmp_seq=3 ttl=64 time=0.521 ms 64 bytes from 192.168.1.104: icmp_seq=4 ttl=64 time=0.524 ms -Yeah, It’s working!! +好极了,它能工作! -To remove the IP, just run: +要删除 IP,只需要运行: sudo ip addr del 192.168.1.104/24 dev enp0s3 -Let us check if it is removed. +再检查一下是否删除了 IP。 sudo ip address show enp0s3 -**Sample output:** +**样例输出:** 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff @@ -107,19 +106,19 @@ Let us check if it is removed. inet6 fe80::a00:27ff:fe2a:34e/64 scope link valid_lft forever preferred_lft forever -See, It’s gone!! +可以看到已经没有了!! -Well, as you may know, the changes will lost after you reboot your system. How do I make it permanent? That’s easy too. +也许你已经知道,你重启系统后会丢失这些设置。那么怎么设置才能永久有效呢?这也很简单。 -### Add additional IP addresses permanently ### +### 添加永久 IP 地址 ### -The network card configuration file of your Ubuntu system is **/etc/network/interfaces**. +Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 -Let us check the details of the above file. +让我们来看看上面文件的具体内容。 sudo cat /etc/network/interfaces -**Sample output:** +**输出样例:** # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). @@ -131,15 +130,15 @@ Let us check the details of the above file. auto enp0s3 iface enp0s3 inet dhcp -As you see in the above output, the Interface is DHCP enabled. +正如你在上面输出中看到的,网卡启用了 DHCP。 -Okay, now we will assign an additional address, for example **192.168.1.104/24**. +现在,让我们来分配一个额外的地址,例如 **192.168.1.104/24**。 -Edit file **/etc/network/interfaces**: +编辑 **/etc/network/interfaces**: sudo nano /etc/network/interfaces -Add additional IP address as shown in the black letters. +按照黑色字体标注的添加额外的 IP 地址。 # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). @@ -153,13 +152,13 @@ Add additional IP address as shown in the black letters. iface enp0s3 inet static address 192.168.1.104/24 -Save and close the file. +保存并关闭文件。 -Run the following file to take effect the changes without rebooting. +无需重启运行下面的命令使更改生效。 sudo ifdown enp0s3 && sudo ifup enp0s3 -**Sample output:** +**样例输出:** Killed old client process Internet Systems Consortium DHCP Client 4.3.1 @@ -183,13 +182,13 @@ Run the following file to take effect the changes without rebooting. DHCPACK of 192.168.1.103 from 192.168.1.1 bound to 192.168.1.103 -- renewal in 35146 seconds. -**Note**: It is **very important** to run the above two commands into **one** line if you are remoting into the server because the first one will drop your connection. Given in this way the ssh-session will survive. +**注意**:如果你从远程连接到服务器,把上面的两个命令放到**一行**中**非常重要**,因为第一个命令会断掉你的连接。而采用这种方式可以存活你的 ssh 会话。 -Now, let us check if IP is added using command: +现在,让我们用下面的命令来检查一下是否添加了新的 IP: sudo ip address show enp0s3 -**Sample output:** +**输出样例:** 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:2a:03:4e brd ff:ff:ff:ff:ff:ff @@ -200,13 +199,13 @@ Now, let us check if IP is added using command: inet6 fe80::a00:27ff:fe2a:34e/64 scope link valid_lft forever preferred_lft forever -Cool! Additional IP has been added. +很好!我们已经添加了额外的 IP。 -Well then let us ping the IP address to verify. +再次 ping IP 地址进行验证。 sudo ping 192.168.1.104 -**Sample output:** +**样例输出:** PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data. 64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=0.137 ms @@ -214,21 +213,21 @@ Well then let us ping the IP address to verify. 64 bytes from 192.168.1.104: icmp_seq=3 ttl=64 time=0.054 ms 64 bytes from 192.168.1.104: icmp_seq=4 ttl=64 time=0.067 ms -Voila! It’s working. That’s it. +好极了!它能正常工作。就是这样。 -Want to know how to add additional IP addresses on CentOS/RHEL/Scientific Linux/Fedora systems, check the following link. +想知道怎么给 CentOS/RHEL/Scientific Linux/Fedora 系统添加额外的 IP 地址,可以点击下面的链接。 注:此篇文章以前做过选题:20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md - [Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7][1] -Happy weekend! +周末愉快! -------------------------------------------------------------------------------- via: http://www.unixmen.com/assign-multiple-ip-addresses-to-one-interface-on-ubuntu-15-10/ 作者:[SK][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 e58b738e5d0a60c2c67437033ca1b35e2d11aa6a Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Sat, 12 Dec 2015 16:39:57 +0800 Subject: [PATCH 0554/1710] Update 20150824 Great Open Source Collaborative Editing Tools.md --- .../20150824 Great Open Source Collaborative Editing Tools.md | 1 + 1 file changed, 1 insertion(+) 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 c4746bc482..8f3e2853cb 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 @@ +Translating by H-mudcup 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. From 2d2db05a02ad15552d4d03abe943943787b2680e Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 12 Dec 2015 16:45:13 +0800 Subject: [PATCH 0555/1710] translating --- .../20151208 How to renew the ISPConfig 3 SSL Certificate.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md b/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md index 600c8941cf..029a81649e 100644 --- a/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md +++ b/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md @@ -1,3 +1,5 @@ +translating----geekpi + How to renew the ISPConfig 3 SSL Certificate ================================================================================ This tutorial describes the steps to renew the SSL Certificate of the ISPConfig 3 control panel. There are two alternative ways to achieve that: @@ -56,4 +58,4 @@ via: http://www.faqforge.com/linux/how-to-renew-the-ispconfig-3-ssl-certificate/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.faqforge.com/author/till/ \ No newline at end of file +[a]:http://www.faqforge.com/author/till/ From 67d3afd7324886b04c9340679c862603939cfc58 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 12 Dec 2015 16:57:29 +0800 Subject: [PATCH 0556/1710] translated --- ...o renew the ISPConfig 3 SSL Certificate.md | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) rename {sources => translated}/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md (51%) diff --git a/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md b/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md similarity index 51% rename from sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md rename to translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md index 029a81649e..a2ce4f1d1c 100644 --- a/sources/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md +++ b/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md @@ -1,22 +1,20 @@ -translating----geekpi - -How to renew the ISPConfig 3 SSL Certificate +如何更新ISPConfig 3 SSL证书 ================================================================================ -This tutorial describes the steps to renew the SSL Certificate of the ISPConfig 3 control panel. There are two alternative ways to achieve that: +本教程描述了如何再ISPConfig 3控制面板中更新SSL证书。有两个可选的方法: -- Create a new OpenSSL Certificate and CSR on the command line with OpenSSL. -- Renew the SSL Certificate with the ISPConfig updater +- 用OpenSSL创建一个新的OpenSSL证书和CSR。 +- 用ISPConfig updater更新SSL证书 -I'll start with the manual way to renew the ssl cert. +我将会用手工的方法更新ssl证书。 -### 1) Create a new ISPConfig 3 SSL Certificate with OpenSSL ### +### 1)用OpenSSL创建一个新的ISPConfig 3 SSL 证书 ### -Login to your server on the shell as root user. Before we create a new SSL Cert, backup the current ones. SSL Certs are security sensitive so I'll store the backup in the /root/ folder. +用root用户登录你的服务器。在创建一个新的SSL证书之前,备份现有的。SSL证书是安全敏感的,因此我将它存储在/root/目录下。 tar pcfz /root/ispconfig_ssl_backup.tar.gz /usr/local/ispconfig/interface/ssl chmod 600 /root/ispconfig_ssl_backup.tar.gz -> Now create a new SSL Certificate key, Certificate Request (csr) and a self signed Certificate. +> 现在创建一个新的SSL证书密钥,证书请求(csr)和自签发证书。 cd /usr/local/ispconfig/interface/ssl openssl genrsa -des3 -out ispserver.key 4096 @@ -27,14 +25,13 @@ Login to your server on the shell as root user. Before we create a new SSL Cert, mv ispserver.key ispserver.key.secure mv ispserver.key.insecure ispserver.key -Restart Apache to load the new SSL Certificate. +重启apache来加载新的SSL证书 service apache2 restart -### 2) Renew the SSL Certificate with the ISPConfig installer ### +### 2)用ISPConfig安装器来更新SSL证书 ### -The alternative way to get a new SSL Certificate is to use the ISPConfig update script. -Download ISPConfig to the /tmp folder, unpack the archive and start the update script. +另一个获取新的SSL证书的替代方案是使用ISPConfig更新脚本。下载ISPConfig到/tmp目录下,解压包并运行脚本。 cd /tmp wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz @@ -42,18 +39,18 @@ Download ISPConfig to the /tmp folder, unpack the archive and start the update s cd ispconfig3_install/install php -q update.php -The update script will ask the following question during update: +更新脚本会在更新时询问下面的额问题: Create new ISPConfig SSL certificate (yes,no) [no]: -Answer "yes" here and the SSL Certificate creation dialog will start. +这里回答“yes”,SSL证书创建对话框就会启动。 -------------------------------------------------------------------------------- via: http://www.faqforge.com/linux/how-to-renew-the-ispconfig-3-ssl-certificate/ 作者:[Till][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 3732620f316b91f61c48d2282dc237e9d4c2aed8 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 12 Dec 2015 19:47:55 +0800 Subject: [PATCH 0557/1710] [translated]20 - The history of Android --- .../20 - The history of Android.md | 95 ------------------- .../20 - The history of Android.md | 93 ++++++++++++++++++ 2 files changed, 93 insertions(+), 95 deletions(-) delete mode 100644 sources/talk/The history of Android/20 - The history of Android.md create mode 100644 translated/talk/The history of Android/20 - The history of Android.md 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 deleted file mode 100644 index 75c89a1abc..0000000000 --- a/sources/talk/The history of Android/20 - The history of Android.md +++ /dev/null @@ -1,95 +0,0 @@ -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) -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. -Photo by Ron Amadeo - -These screenshots give us our first look at the refined version of the Action Bar in Ice Cream Sandwich. Almost every app got a bar at the top of the screen that housed the app icon, title of the screen, several function buttons, and a menu button on the right. The right-aligned menu button was called the "overflow" button, because it housed items that didn't fit on the main action bar. The overflow menu wasn't static, though, it gave the action bar more screen real-estate—like in horizontal mode or on a tablet—and more of the overflow menu items were shown on the action bar as actual buttons. - -New in Ice Cream Sandwich was this design style of "swipe tabs," which replaced the 2×3 interstitial navigation screen Google was previously pushing. A tab bar sat just under the Action Bar, with the center title showing the current tab and the left and right having labels for the pages to the left and right of this screen. A swipe in either direction would change tabs, or you could tap on a title to go to that tab. - -One really cool design touch on the individual app screen was that, after the pictures, it would dynamically rearrange the page based on your history with that app. If you never installed the app before, the description would be the first box. If you used the app before, the first section would be the reviews bar, which would either invite you to review the app or remind you what you thought of the app last time you installed it. The second section for a previously used app was “What’s New," since an existing user would most likely be interested in changes. - -![Recent apps and the browser were just like Honeycomb, but smaller.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/recentbrowser.png) -Recent apps and the browser were just like Honeycomb, but smaller. -Photo by Ron Amadeo - -Recent apps toned the Tron look way down. The blue outline around the thumbnails was removed, along with the eerie, uneven blue glow in the background. It now looked like a neutral UI piece that would be at home in any time period. - -The Browser did its best to bring a tabbed experience to phones. Multi-tab browsing was placed front and center, but instead of wasting precious screen space on a tab strip, a tab button would open a Recent Apps-like interface that would show you your open tabs. Functionally, there wasn't much difference between this and the "window" view that was present in past versions of the Browser. The best addition to the Browser was a "Request desktop site" menu item, which would switch from the default mobile view to the normal site. The Browser showed off the flexibility of Google's Action Bar design, which, despite not having a top-left app icon, still functioned like any other top bar design. - -![Gmail and Google Talk—they're like Honeycomb, but smaller!](http://cdn.arstechnica.net/wp-content/uploads/2014/03/gmail2.png) -Gmail and Google Talk—they're like Honeycomb, but smaller! -Photo by Ron Amadeo - -Gmail and Google Talk both looked like smaller versions of their Honeycomb designs, but with a few tweaks to work better on smaller screens. Gmail featured a dual Action Bar—one on the top of the screen and one on the bottom. The top of the bar showed your current folder, account, and number of unread messages, and tapping on the bar opened a navigation menu. The bottom featured all the normal buttons you would expect along with the overflow button. This dual layout was used in order display more buttons on the surface level, but in landscape mode where vertical space was at a premium, the dual bars merged into a single top bar. - -In the message view, the blue bar was "sticky" when you scrolled down. It stuck to the top of the screen, so you could always see who wrote the current message, reply, or star it. Once in a message, the thin, dark gray bar at the bottom showed your current spot in the inbox (or whatever list brought you here), and you could swipe left and right to get to other messages. - -Google Talk would let you swipe left and right to change chat windows, just like Gmail, but there the bar was at the top. - -![The new dialer and the incoming call screen, both of which we haven't seen since Gingerbread.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/inc-calls.png) -The new dialer and the incoming call screen, both of which we haven't seen since Gingerbread. -Photo by Ron Amadeo - -Since Honeycomb was only for tablets, some UI pieces were directly preceded by Gingerbread instead. The new Ice Cream Sandwich dialer was, of course, black and blue, and it used smaller tabs that could be swiped through. While Ice Cream Sandwich finally did the sensible thing and separated the main phone and contacts interfaces, the phone app still had its own contacts tab. There were now two spots to view your contact list—one with a dark theme and one with a light theme. With a hardware search button no longer being a requirement, the bottom row of buttons had the voicemail shortcut swapped out for a search icon. - -Google liked to have the incoming call interface mirror the lock screen, which meant Ice Cream Sandwich got a circle-unlock design. Besides the usual decline or accept options, a new button was added to the top of the circle, which would let you decline a call by sending a pre-defined text message to the caller. Swiping up and picking a message like "Can't talk now, call you later" was (and still is) much more informative than an endlessly ringing phone. - -![Honeycomb didn't have folders or a texting app, so here's Ice Cream Sandwich versus Gingerbread.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/thenonmessedupversion.png) -Honeycomb didn't have folders or a texting app, so here's Ice Cream Sandwich versus Gingerbread. -Photo by Ron Amadeo - -Folders were now much easier to make. In Gingerbread, you had to long press on the screen, pick "folders," and then pick "new folder." In Ice Cream Sandwich, just drag one icon on top of another, and a folder is created containing those two icons. It was dead simple and much easier than finding the hidden long-press command. - -The design was much improved, too. Gingerbread used a generic beige folder icon, but Ice Cream Sandwich actually showed you what was in the folder by stacking the first three icons on top of each other, drawing a circle around them, and using that as the folder icon. Open folder containers resized to fit the amount of icons in the folder rather than being a full-screen, mostly empty box. It looked way, way better. - -![YouTube switched to a more modern white theme and used a list view instead of the crazy 3D scrolling](http://cdn.arstechnica.net/wp-content/uploads/2014/03/youtubes.png) -YouTube switched to a more modern white theme and used a list view instead of the crazy 3D scrolling -Photo by Ron Amadeo - -YouTube was completely redesigned and looked less like something from The Matrix and more like, well, YouTube. It was a simple white list of vertically scrolling videos, just like the website. Making videos on your phone was given prime real estate, with the first button on the action bar dedicated to recording a video. Strangely, different screens used different YouTube logos in the top left, switching between a horizontal YouTube logo and a square one. - -YouTube used swipe tabs just about everywhere. They were placed on the main page to browse and view your account and on the video pages to switch between comments, info, and related videos. The 4.0 app showed the first signs of Google+ YouTube integration, placing a "+1" icon next to the traditional rating buttons. Eventually Google+ would completely take over YouTube, turning the comments and author pages into Google+ activity. - -![Ice Cream Sandwich tried to make things easier on everyone. Here is a screen for tracking data usage, the new developer options with tons of analytics enabled, and the intro tutorial.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/data.png) -Ice Cream Sandwich tried to make things easier on everyone. Here is a screen for tracking data usage, the new developer options with tons of analytics enabled, and the intro tutorial. -Photo by Ron Amadeo - -Data Usage allowed users to easily keep track of and control their data usage. The main page showed a graph of this month's data usage, and users could set thresholds to be warned about data consumption or even set a hard usage limit to avoid overage charges. All of this was done easily by dragging the horizontal orange and red threshold lines higher or lower on the chart. The vertical white bars allowed users to select a slice of time in the graph. At the bottom of the page, the data usage for the selected time was broken down by app, so users could select a spike and easily see what app was sucking up all their data. When times got really tough, in the overflow button was an option to restrict all background data. Then, only apps running in the foreground could have access to the Internet connection. - -The Developer Options typically only housed a tiny handful of settings, but in Ice Cream Sandwich the section received a huge expansion. Google added all sorts of on-screen diagnostic overlays to help app developers understand what was happening inside their app. You could view CPU usage, pointer location, and view screen updates. There were also options to change the way the system functioned, like control over animation speed, background processing, and GPU rendering. - -One of the biggest differences between Android and the iOS is Android's app drawer interface. In Ice Cream Sandwich's quest to be more user-friendly, the initial startup launched a small tutorial showing users where the app drawer was and how to drag icons out of the drawer and onto the homescreen. With the removal of the off-screen menu button and changes like this, Android 4.0 made a big push to be more inviting to new smartphone users and switchers. - -![The "touch to beam" NFC support, Google Earth, and App Info, which would let you disable crapware.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-06-03.57.png) -The "touch to beam" NFC support, Google Earth, and App Info, which would let you disable crapware. - -Built into Ice Cream Sandwich was full support for [NFC][1]. While previous devices like the Nexus S had NFC, support was limited and the OS couldn't do much with the chip. 4.0 added a feature called Android Beam, which would let two NFC-equipped Android 4.0 devices transfer data back and forth. NFC would transmit data related to whatever was on the screen at the time, so tapping when a phone displayed a webpage would send that page to the other phone. You could also send contact information, directions, and YouTube links. When the two phones were put together, the screen zoomed out, and tapping on the zoomed-out display would send the information. - -In Android, users are not allowed to uninstall system apps, which are often integral to the function of the device. Carriers and OEMs took advantage of this and started putting crapware in the system partition, which they would often stick with software they didn't want. Android 4.0 allowed users to disable any app that couldn't be uninstalled, meaning the app remained on the system but didn't show up in the app drawer and couldn't be run. If users were willing to dig through the settings, this gave them an easy way to take control of their phone. - -Android 4.0 can be thought of as the start of the modern Android era. Most of the Google apps released around this time only worked on Android 4.0 and above. There were so many new APIs that Google wanted to take advantage of that—initially at least—support for versions below 4.0 was limited. After Ice Cream Sandwich and Honeycomb, Google was really starting to get serious about software design. In January 2012, the company [finally launched][2] *Android Design*, a design guideline site that taught Android app developers how to create apps to match the look and feel of Android. This was something iOS not only had from the start of third-party app support, but Apple enforced design so seriously that apps that did not meet the guidelines were blocked from the App Store. The fact that Android went three years without any kind of public design documents from Google shows just how bad things used to be. But with Duarte in charge of Android's design revolution, the company was finally addressing basic design needs. - ----------- - -![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/20/ - -译者:[译者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/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 diff --git a/translated/talk/The history of Android/20 - The history of Android.md b/translated/talk/The history of Android/20 - The history of Android.md new file mode 100644 index 0000000000..9ef34f1f63 --- /dev/null +++ b/translated/talk/The history of Android/20 - The history of Android.md @@ -0,0 +1,93 @@ +安卓编年史 +================================================================================ +![和之前完全不同的市场设计。以上是分类,特色,热门应用以及应用详情页面。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/market-pages.png) +和之前完全不同的市场设计。以上是分类,特色,热门应用以及应用详情页面。 +Ron Amadeo 供图 + +这些截图给了我们冰淇淋三明治中新版操作栏的第一印象。几乎所有的应用顶部都有一条栏,带有应用图标,当前界面标题,一些功能按钮,右边还有一个菜单按钮。这个右对齐的菜单按钮被称为“更多操作”,因为里面存放着无法放置到主操作栏的项目。不过更多操作菜单并不是固定不变的,它给了操作栏节省了更多的屏幕空间——比如在横屏模式或在平板上时,更多操作菜单的项目会像通常的按钮一样显示在操作栏上。 + +冰淇凌三明治中新增了“滑动标签页”设计,替换掉了谷歌之前推行的2×3方阵导航屏幕。一个标签页栏放置在了操作栏下方,位于中间的标签显示的是当前页面,左右侧的两个标签显示的是对应的当前页面的左右侧页面。向左右滑动可以切换标签页,或者你可以点击指定页面的标签跳转过去。 + +应用详情页面有个很赞的设计,在应用截图后,会根据你关于那个应用的历史动态地重新布局页面。如果你从来没有安装过该应用,应用描述会优先显示。如果你曾安装过这个应用,第一部分将会是评价栏,它会邀请你评价该应用或者提醒你上次你安装该应用时的评价是什么。之前使用过的应用页面第二部分是“新特性”,因为一个老用户最关心的应该是应用有什么变化。 + +![最近应用和浏览器和蜂巢中的类似,但是是小号的](http://cdn.arstechnica.net/wp-content/uploads/2014/03/recentbrowser.png) +最近应用和浏览器和蜂巢中的类似,但是是小号的。 +Ron Amadeo 供图 + +最近应用的电子风格外观被移除了。略缩图周围的蓝色的轮廓线被去除了,同时去除的还有背景怪异的,不均匀的蓝色光晕。它现在看起来是个中立型的界面,在任何时候看起来都很舒适。 + +浏览器尽了最大的努力把标签页体验带到手机上来。多标签浏览受到了关注,操作栏上引入的一个标签页按钮会打开一个类似最近应用的界面,显示你打开的标签页,而不是浪费宝贵的屏幕空间引入一个标签条。从功能上来说,这个和之前的浏览器中的“窗口”视图没什么差别。浏览器最佳的改进是菜单中的“请求桌面版站点”选项,这让你可以从默认的移动站点视图切换到正常站点。浏览器展示了谷歌的操作栏设计的灵活性,尽管这里没有左上角的应用图标,功能上来说和其他的顶栏设计相似。 + +![Gmail 和 Google Talk —— 它们和蜂巢中的相似,但是更小!](http://cdn.arstechnica.net/wp-content/uploads/2014/03/gmail2.png) +Gmail 和 Google Talk —— 它们和蜂巢中的相似,但是更小! +Ron Amadeo 供图 + +Gmail 和 Google Talk 看起来都像是之前蜂巢中的设计的缩小版,但是有些小调整让它们在小屏幕上表现更佳。Gmail 以双操作栏为特色——一个在屏幕顶部,一个在底部。顶部操作栏显示当前文件夹,账户,以及未读消息数目,点击顶栏可以打开一个导航菜单。底部操作栏有你期望出现在更多操作中的选项。使用双操作栏布局是为了在界面显示更多的按钮,但是在横屏模式下纵向空间有限,双操作栏就是合并成一个顶部操作栏。 + +在邮件视图下,往下滚动屏幕时蓝色栏有“粘性”。它会固定在屏幕顶部,所以你一直可以看到该邮件是谁写的,回复它,或者给它加星标。一旦处于邮件消息界面,底部细长的,深灰色栏会显示你当前在收件箱(或你所在的某个列表)的位置,并且你可以向左或向右滑动来切换到其他邮件。 + +Google Talk 允许你像在 Gmail 中那样左右滑动来切换聊天窗口,但是这里显示栏是在顶部。 + +![新的拨号和来电界面,都是姜饼以来我们还没见过的。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/inc-calls.png) +新的拨号和来电界面,都是姜饼以来我们还没见过的。 +Ron Amadeo 供图 + +因为蜂巢只给平板使用,所以一些界面设计直接超前于姜饼。冰淇淋三明治的新拨号界面就是如此,黑色和蓝色相间,并且使用了可滑动切换的小标签。尽管冰淇淋三明治终于做了对的事情并将电话主体和联系人独立开来,但电话应用还是有它自己的联系人标签。现在有两个地方可以看到你的联系人列表——一个有着暗色主题,另一个有着亮色主题。由于实体搜索按钮不再是硬性要求,底部的按钮栏的语音信息快捷方式被替换为了搜索图标。 + +谷歌几乎就是把来电界面做成了锁屏界面的镜像,这意味着冰淇淋三明治有着一个环状解锁设计。除了通常的接受和挂断选项,圆环的顶部还添加了一个按钮,让你可以挂断来电并给对方发送一条预先定义好的信息。向上滑动并选择一条信息如“现在无法接听,一会回电”,相比于一直响个不停的手机而言这样做的信息交流更加丰富。 + +![蜂巢没有文件夹和信息应用,所以这里是冰淇淋三明治和姜饼的对比。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/thenonmessedupversion.png) +蜂巢没有文件夹和信息应用,所以这里是冰淇淋三明治和姜饼的对比。 +Ron Amadeo 供图 + +现在创建文件夹更加方便了。在姜饼中,你得长按屏幕,选择“文件夹”选项,再点击“新文件夹”。在冰淇淋三明治中,你只要将一个图标拖拽到另一个图标上面,就会自动创建一个文件夹,并包含这两个图标。这简直不能更简单了,比寻找隐藏的长按命令容易多了。 + +设计上也有很大的改进。姜饼使用了一个通用的米黄色文件夹图标,但冰淇淋三明治直接显示出了文件夹中的头三个应用,把它们的图标叠在一起,在外侧画一个圆圈,并将其设置为文件夹图标。打开文件夹容器将自动调整大小以适应文件夹中的应用图标数目,而不是显示一个全屏的,大部分都是空的对话框。这看起来好得多得多。 + +![Youtube 转换到一个更加现代的白色主题,使用了列表视图替换疯狂的 3D 滚动视图。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/youtubes.png) +Youtube 转换到一个更加现代的白色主题,使用了列表视图替换疯狂的 3D 滚动视图。 +Ron Amadeo 供图 + +Youtube 经过了完全的重新设计,看起来没那么像是来自黑客帝国的产物,更像是,嗯,Youtube。它现在就是一个简单的垂直滚动的白色视频列表,就像网站的那样。在你手机上制作视频受到了重视,操作栏的第一个按钮专用于拍摄视频。奇怪的是,不同的界面左上角使用了不同的 Youtube 标志,在水平的 Youtube 标志和方形标志之间切换。 + +Youtube 几乎在所有地方都使用了滑动标签页。它们被放置在主页面以在浏览和账户间切换,放置在视频页面以在评论,介绍和相关视频之间切换。4.0 版本的应用显示出 Google+ Youtube 集成的第一个信号,通常的评分按钮旁边放置了 “+1” 图标。最终 Google+ 会完全占据 Youtube,将评论和作者页面变成 Google+ 活动。 + +![冰淇淋三明治试着让事情对所有人都更加简单。这里是数据使用量追踪,打开许多数据的新开发者选项,以及使用向导。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/data.png) +冰淇淋三明治试着让事情对所有人都更加简单。这里是数据使用量追踪,打开许多数据的新开发者选项,以及使用向导。 +Ron Amadeo 供图 + +数据使用量允许用户更轻松地追踪和控制他们的数据使用。主页面显示一个月度使用量图表,用户可以设置数据使用警告值或者硬性使用限制以避免超量使用产生费用。所有的这些只需简单地拖动橙色和红色水平限制线在图表上的位置即可。纵向的白色把手允许用户选择图表上的一段指定时间段。在页面底部,选定时间段内的数据使用量又细分到每个应用,所以用户可以选择一个数据使用高峰并轻松地查看哪个应用在消耗大量流量。当流量紧张的时候,更多操作按钮中有个限制所有后台流量的选项。设置之后只用在前台运行的程序有权连接互联网。 + +开发者选项通常只有一点点设置选项,但是在冰淇淋三明治中,这部分有非常多选项。谷歌添加了所有类型的屏幕诊断显示浮层来帮助开发者理解他们的应用中发生了什么。你可以看到 CPU 使用率,触摸点位置,还有视图界面更新。还有些选项可以更改系统功能,比如控制动画速度,后台处理,以及 GPU 渲染。 + +安卓和 iOS 之间最大的区别之一就是应用抽屉界面。在冰淇淋三明治对更加用户友好的追求下,设备第一次初始化启动会启动一个小教程,向用户展示应用抽屉的位置以及如何将应用图标从应用抽屉拖拽到主屏幕。随着实体菜单按键的移除和像这样的改变,安卓 4.0 做了很大的努力变得对新智能手机用户和转换过来的用户更有吸引力。 + +![“触摸分享”NFC 支持,Google Earth,以及应用信息,让你可以禁用垃圾软件。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-06-03.57.png) +“触摸分享”NFC 支持,Google Earth,以及应用信息,让你可以禁用垃圾软件。 + +冰淇淋三明治内置对 [NFC][1] 的完整支持。尽管之前的设备,比如 Nexus S 也拥有 NFC,得到的支持是有限的并且系统并不能利用芯片做太多事情。4.0 添加了一个“Android Beam”功能,两台拥有 NFC 的安卓 4.0 设备可以借此在设备间来回传输数据。NFC 会传输关于此事屏幕显示的数据,因此在手机显示一个网页的时候使用该功能会将该页面传送给另一部手机。你还可以发送联系人信息,方向导航,以及 Youtube 链接。当两台手机放在一起时,屏幕显示会缩小,点击缩小的界面会发送相关信息。 + +I在安卓中,用户不允许删除系统应用,以保证系统完整性。运营商和 OEM 利用该特性并开始将垃圾软件放入系统分区,经常有一些没用的应用存在系统中。安卓 4.0 允许用户禁用任何不能被卸载的应用,意味着该应用还存在于系统中但是不显示在应用抽屉里并且不能运行。如果用户愿意深究设置项,这给了他们一个简单的途径来拿回手机的控制权。 + +安卓 4.0 可以看做是现代安卓时代的开始。大部分这时发布的谷歌应用只能在安卓 4.0 及以上版本运行。4.0 还有许多谷歌想要好好利用的新 API——至少最初想要——对 4.0 以下的版本的支持就有限了。在冰淇淋三明治和蜂巢之后,谷歌真的开始认真对待软件设计。在2012年1月,谷歌[最终发布了][2] *Android Design*,一个教安卓开发者如何创建符合安卓外观和感觉的应用的设计指南站点。这是 iOS 在有第三方应用支持开始就在做的事情,苹果还严肃地对待应用的设计,不符合指南的应用都被 App Store 拒之门外。安卓三年以来谷歌没有给出任何公共设计规范文档的事实,足以说明事情有多糟糕。但随着在 Duarte 掌控下的安卓设计革命,谷歌终于发布了基本设计需求。 + +---------- + +![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/20/ + +译者:[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/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 From c4892fc3ac482c92d67f8eacf0da9d092eb8b513 Mon Sep 17 00:00:00 2001 From: Flowsnow Date: Sat, 12 Dec 2015 22:00:28 +0800 Subject: [PATCH 0558/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?][20151208=20Apple=20Swift=20Programming=20Language=20Comes=20T?= =?UTF-8?q?o=20Linux.md]=20Signed-off-by:=20Flowsnow=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ift Programming Language Comes To Linux.md | 43 ------------------ ...ift Programming Language Comes To Linux.md | 44 +++++++++++++++++++ 2 files changed, 44 insertions(+), 43 deletions(-) delete mode 100644 sources/news/20151208 Apple Swift Programming Language Comes To Linux.md create mode 100644 translated/news/20151208 Apple Swift Programming Language Comes To Linux.md diff --git a/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md b/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md deleted file mode 100644 index ced2a1353d..0000000000 --- a/sources/news/20151208 Apple Swift Programming Language Comes To Linux.md +++ /dev/null @@ -1,43 +0,0 @@ -Flowsnow translating - -Apple Swift Programming Language Comes To Linux -================================================================================ -![](http://itsfoss.com/wp-content/uploads/2015/12/Apple-Swift-Open-Source.jpg) - -Apple and Open Source toogether? Yes! Apple’s Swift programming language is now open source. This should not come as surprise because [Apple had already announced it six months back][1]. - -Apple announced the launch of open source Swift community came this week. A [new website][2] dedicated to the open source Swift community has been put in place with the following message: - -> We are excited by this new chapter in the story of Swift. After Apple unveiled the Swift programming language, it quickly became one of the fastest growing languages in history. Swift makes it easy to write software that is incredibly fast and safe by design. Now that Swift is open source, you can help make the best general purpose programming language available everywhere. - -[swift.org][2] will work as the one stop shop providing downloads for various platforms, community guidelines, news, getting started tutorials, instructions for contribution to open source Swift, documentation and other guidelines. If you are looking forward to learn Swift, this website must be bookmarked. - -In this announcement, a new package manager for easy sharing and building code has been made available as well. - -Most important of all for Linux users, the source code is now available at [Github][3]. You can check it out from the link below: - -- [Apple Swift Source Code][3] - -In addition to that, there are prebuilt binaries for Ubuntu 14.04 and 15.10. - -- [Swift binaries for Ubuntu][4] - -Don’t rush to use them because these are development branches and will not be suitable for production machine. So avoid it for now. Once stable version of Swift for Linux is released, I hope that Ubuntu will include it in [umake][5] on the line of [Visual Studio][6]. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/swift-open-source-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/apple-open-sources-swift-programming-language-linux/ -[2]:https://swift.org/ -[3]:https://github.com/apple -[4]:https://swift.org/download/#latest-development-snapshots -[5]:https://wiki.ubuntu.com/ubuntu-make -[6]:http://itsfoss.com/install-visual-studio-code-ubuntu/ diff --git a/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md b/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md new file mode 100644 index 0000000000..710691a140 --- /dev/null +++ b/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md @@ -0,0 +1,44 @@ +Flowsnow translating + +苹果编程语言Swift开始支持Linux +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2015/12/Apple-Swift-Open-Source.jpg) + +苹果也开源了?是的,苹果编程语言Swift已经开源了。其实我们并不应该感到意外,因为[在六个月以前苹果就已经宣布了这个消息][1]。 + +苹果宣布这周将推出开源Swift社区。一个专用于开源Swift社区的[新网站][2]已经就位,网站首页显示以下信息: + +> 我们对Swift开源感到兴奋。在苹果推出了编程语言Swift之后,它很快成为历史上增长最快的语言之一。Swift可以编写出难以置信的又快又安全的软件。目前,Swift是开源的,你能帮助做出随处可用的最好的通用编程语言。 + +[swift.org][2]这个网站将会作为一站式网站,它会提供各种资料的下载,包括各种平台,社区指南,最新消息,入门教程,贡献开源Swift的说明,文件和一些其他的指南。 如果你正期待着学习Swift,那么必须收藏这个网站。 + +在苹果的这次宣布中,一个用于方便分享和构建代码的包管理器已经可用了。 + +对于所有的Linux使用者来说,最重要的是,源代码已经可以从[Github][3]获得了.你可以从以下链接Checkout它: +Most important of all for Linux users, the source code is now available at [Github][3]. You can check it out from the link below: + +- [苹果Swift源代码][3] + +除此之外,对于ubuntu 14.04和15.10版本还有预编译的二进制文件。 + +- [ubuntu系统的Swift二进制文件][4] + +不要急着去使用它们,因为这些都是发展分支而且不适合于专用机器。因此现在避免使用,一旦发布了Linux下Swift的稳定版本,我希望ubuntu会把它包含在[umake][5]中靠近[Visual Studio][6]的地方。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/swift-open-source-linux/ + +作者:[Abhishek][a] +译者:[Flowsnow](https://github.com/Flowsnow) +校对:[校对者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/apple-open-sources-swift-programming-language-linux/ +[2]:https://swift.org/ +[3]:https://github.com/apple +[4]:https://swift.org/download/#latest-development-snapshots +[5]:https://wiki.ubuntu.com/ubuntu-make +[6]:http://itsfoss.com/install-visual-studio-code-ubuntu/ From 1fad1df7cd1cb40f6fe73414f6b75c8210087602 Mon Sep 17 00:00:00 2001 From: Flowsnow Date: Sat, 12 Dec 2015 22:09:45 +0800 Subject: [PATCH 0559/1710] =?UTF-8?q?=E6=94=B9=E5=8A=A8=E5=A4=B4=E9=83=A8?= =?UTF-8?q?=E6=A0=87=E8=AF=86=20Signed-off-by:=20Flowsnow=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20151208 Apple Swift Programming Language Comes To Linux.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md b/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md index 710691a140..fe2089345d 100644 --- a/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md +++ b/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md @@ -1,4 +1,3 @@ -Flowsnow translating 苹果编程语言Swift开始支持Linux ================================================================================ From 80fc50383f254ed525822eae47c92f9a9380449c Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 13 Dec 2015 15:22:02 +0800 Subject: [PATCH 0560/1710] [translating]21 - The history of Android --- .../The history of Android/21 - The history of Android.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/The history of Android/21 - The history of Android.md b/sources/talk/The history of Android/21 - The history of Android.md index 265e7a867b..089ec87bdc 100644 --- a/sources/talk/The history of Android/21 - The history of Android.md +++ b/sources/talk/The history of Android/21 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/playicons2.png) @@ -100,4 +102,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [2]:http://arstechnica.com/gadgets/2012/07/divine-intervention-googles-nexus-7-is-a-fantastic-200-tablet/ [3]:http://arstechnica.com/gadgets/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/ [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From 681a5727410f5f626337a433dd3e0b405a5abdb2 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sun, 13 Dec 2015 16:05:16 +0800 Subject: [PATCH 0561/1710] Translated by DongShuaike --- ...ur Ubuntu or Linux Mint with SystemBack.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md diff --git a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md new file mode 100644 index 0000000000..58eb99c205 --- /dev/null +++ b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md @@ -0,0 +1,28 @@ +# 使用SystemBack备份你的Ubuntu/Linux Mint(系统还原) + +系统还原对于任何一款允许用户还原电脑到之前状态(包括文件系统,安装的应用,以及系统设置)的操作系统来说,都是必备功能,可以处理系统故障以及其他的问题。有的时候安装一个程序或者驱动可能让你的系统黑屏。系统还原则让你电脑里面的系统文件(译者注:是系统文件,并非普通文件,详情请看**注意**部分)和程序恢复到之前工作正常时候的状态,进而让你远离那让人头痛的排障过程了。而且它也不会影响你的文件,照片或者其他数据。简单的系统备份还原工具[Systemback](https://launchpad.net/systemback)让你很容易地创建系统备份以及用户配置文件。如果遇到问题,你可以傻瓜式还原。它还有一些额外的特征包括系统复制,系统安装以及Live系统创建。 + +截图 + +[![systemback](https://camo.githubusercontent.com/5e0e0e4b2fafb1b929ea0ab63b75d5f9c7220641/687474703a2f2f322e62702e626c6f6773706f742e636f6d2f2d3255505333796c334c48772f566c696c677447416c76492f41414141414141414774732f75655261416768584e76632f73313630302f73797374656d6261636b2d312e6a7067)](https://camo.githubusercontent.com/5e0e0e4b2fafb1b929ea0ab63b75d5f9c7220641/687474703a2f2f322e62702e626c6f6773706f742e636f6d2f2d3255505333796c334c48772f566c696c677447416c76492f41414141414141414774732f75655261416768584e76632f73313630302f73797374656d6261636b2d312e6a7067) + +[![systemback](https://camo.githubusercontent.com/b6896bebb68f4f66d6e9b1cda32b074d0ff237ed/687474703a2f2f322e62702e626c6f6773706f742e636f6d2f2d37646a424c6247656e78452f566c696c676b2d465a48492f414141414141414147746b2f3250564e4b6c61504f2d632f73313630302f73797374656d6261636b2d322e6a7067)](https://camo.githubusercontent.com/b6896bebb68f4f66d6e9b1cda32b074d0ff237ed/687474703a2f2f322e62702e626c6f6773706f742e636f6d2f2d37646a424c6247656e78452f566c696c676b2d465a48492f414141414141414147746b2f3250564e4b6c61504f2d632f73313630302f73797374656d6261636b2d322e6a7067) + +[![](https://camo.githubusercontent.com/c7dab7c89b7379d4555042d66d3b1910c9dd983d/687474703a2f2f332e62702e626c6f6773706f742e636f6d2f2d62655a59774b727354346f2f566c696c677054687a69492f414141414141414147746f2f637773676858464e4752412f73313630302f73797374656d6261636b2d332e6a7067)](https://camo.githubusercontent.com/c7dab7c89b7379d4555042d66d3b1910c9dd983d/687474703a2f2f332e62702e626c6f6773706f742e636f6d2f2d62655a59774b727354346f2f566c696c677054687a69492f414141414141414147746f2f637773676858464e4752412f73313630302f73797374656d6261636b2d332e6a7067) + +[![](https://camo.githubusercontent.com/469b19a9064ec937bb06fc25efbc02409521b314/687474703a2f2f312e62702e626c6f6773706f742e636f6d2f2d745f676d636f515a72764d2f566c696c684c502d2d54492f41414141414141414774302f47574267366247656561492f73313630302f73797374656d6261636b2d352e6a7067)](https://camo.githubusercontent.com/469b19a9064ec937bb06fc25efbc02409521b314/687474703a2f2f312e62702e626c6f6773706f742e636f6d2f2d745f676d636f515a72764d2f566c696c684c502d2d54492f41414141414141414774302f47574267366247656561492f73313630302f73797374656d6261636b2d352e6a7067) + +**注意**:使用系统还原不会还原你的文件,音乐,电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机上没有系统还原点,那么系统还原工具就不会奏效了。(最后一句没有太理解) + +> > >适用于Ubuntu 15.10 Wily/16.04/15.04 Vivid/14.04 Trusty/Linux Mint 14.x/其他Ubuntu衍生版,打开终端,将下面这些命令复制过去: + +终端命令: + +``` +sudo add-apt-repository ppa:nemh/systemback +sudo apt-get update +sudo apt-get install systemback + +``` + +大功告成。 From 4ed41d24f688514d9642d81a9be4deb698e1521e Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Mon, 14 Dec 2015 00:25:55 +0800 Subject: [PATCH 0562/1710] Delete 20151124 Review--5 memory debuggers for Linux coding.md --- ...ew--5 memory debuggers for Linux coding.md | 285 ------------------ 1 file changed, 285 deletions(-) delete mode 100644 sources/talk/20151124 Review--5 memory debuggers for Linux coding.md diff --git a/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md b/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md deleted file mode 100644 index 1427a8e865..0000000000 --- a/sources/talk/20151124 Review--5 memory debuggers for Linux coding.md +++ /dev/null @@ -1,285 +0,0 @@ -translating。。。 -Review: 5 memory debuggers for Linux coding -================================================================================ -![](http://images.techhive.com/images/article/2015/11/penguinadmin-2400px-100627186-primary.idge.jpg) -Credit: [Moini][1] - -As a programmer, I'm aware that I tend to make mistakes -- and why not? Even programmers are human. Some errors are detected during code compilation, while others get caught during software testing. However, a category of error exists that usually does not get detected at either of these stages and that may cause the software to behave unexpectedly -- or worse, terminate prematurely. - -If you haven't already guessed it, I am talking about memory-related errors. Manually debugging these errors can be not only time-consuming but difficult to find and correct. Also, it's worth mentioning that these errors are surprisingly common, especially in software written in programming languages like C and C++, which were designed for use with [manual memory management][2]. - -Thankfully, several programming tools exist that can help you find memory errors in your software programs. In this roundup, I assess five popular, free and open-source memory debuggers that are available for Linux: Dmalloc, Electric Fence, Memcheck, Memwatch and Mtrace. I've used all five in my day-to-day programming, and so these reviews are based on practical experience. - -eviews are based on practical experience. - -### [Dmalloc][3] ### - -**Developer**: Gray Watson -**Reviewed version**: 5.5.2 -**Linux support**: All flavors -**License**: Creative Commons Attribution-Share Alike 3.0 License - -Dmalloc is a memory-debugging tool developed by Gray Watson. It is implemented as a library that provides wrappers around standard memory management functions like **malloc(), calloc(), free()** and more, enabling programmers to detect problematic code. - -![cw dmalloc output](http://images.techhive.com/images/article/2015/11/cw_dmalloc-output-100627040-large.idge.png) -Dmalloc - -As listed on the tool's Web page, the debugging features it provides includes memory-leak tracking, [double free][4] error tracking and [fence-post write detection][5]. Other features include file/line number reporting, and general logging of statistics. - -#### What's new #### - -Version 5.5.2 is primarily a [bug-fix release][6] containing corrections for a couple of build and install problems. - -#### What's good about it #### - -The best part about Dmalloc is that it's extremely configurable. For example, you can configure it to include support for C++ programs as well as threaded applications. A useful functionality it provides is runtime configurability, which means that you can easily enable/disable the features the tool provides while it is being executed. - -You can also use Dmalloc with the [GNU Project Debugger (GDB)][7] -- just add the contents of the dmalloc.gdb file (located in the contrib subdirectory in Dmalloc's source package) to the .gdbinit file in your home directory. - -Another thing that I really like about Dmalloc is its extensive documentation. Just head to the [documentation section][8] on its official website, and you'll get everything from how to download, install, run and use the library to detailed descriptions of the features it provides and an explanation of the output file it produces. There's also a section containing solutions to some common problems. - -#### Other considerations #### - -Like Mtrace, Dmalloc requires programmers to make changes to their program's source code. In this case you may, at the very least, want to add the **dmalloc.h** header, because it allows the tool to report the file/line numbers of calls that generate problems, something that is very useful as it saves time while debugging. - -In addition, the Dmalloc library, which is produced after the package is compiled, needs to be linked with your program while the program is being compiled. - -However, complicating things somewhat is the fact that you also need to set an environment variable, dubbed **DMALLOC_OPTION**, that the debugging tool uses to configure the memory debugging features -- as well as the location of the output file -- at runtime. While you can manually assign a value to the environment variable, beginners may find that process a bit tough, given that the Dmalloc features you want to enable are listed as part of that value, and are actually represented as a sum of their respective hexadecimal values -- you can read more about it [here][9]. - -An easier way to set the environment variable is to use the [Dmalloc Utility Program][10], which was designed for just that purpose. - -#### Bottom line #### - -Dmalloc's real strength lies in the configurability options it provides. It is also highly portable, having being successfully ported to many OSes, including AIX, BSD/OS, DG/UX, Free/Net/OpenBSD, GNU/Hurd, HPUX, Irix, Linux, MS-DOG, NeXT, OSF, SCO, Solaris, SunOS, Ultrix, Unixware and even Unicos (on a Cray T3E). Although the tool has a bit of a learning curve associated with it, the features it provides are worth it. - -### [Electric Fence][15] ### - -**Developer**: Bruce Perens -**Reviewed version**: 2.2.3 -**Linux support**: All flavors -**License**: GNU GPL (version 2) - -Electric Fence is a memory-debugging tool developed by Bruce Perens. It is implemented in the form of a library that your program needs to link to, and is capable of detecting overruns of memory allocated on a [heap][11] ) as well as memory accesses that have already been released. - -![cw electric fence output](http://images.techhive.com/images/article/2015/11/cw_electric-fence-output-100627041-large.idge.png) -Electric Fence - -As the name suggests, Electric Fence creates a virtual fence around each allocated buffer in a way that any illegal memory access results in a [segmentation fault][12]. The tool supports both C and C++ programs. - -#### What's new #### - -Version 2.2.3 contains a fix for the tool's build system, allowing it to actually pass the -fno-builtin-malloc option to the [GNU Compiler Collection (GCC)][13]. - -#### What's good about it #### - -The first thing that I liked about Electric Fence is that -- unlike Memwatch, Dmalloc and Mtrace -- it doesn't require you to make any changes in the source code of your program. You just need to link your program with the tool's library during compilation. - -Secondly, the way the debugging tool is implemented makes sure that a segmentation fault is generated on the very first instruction that causes a bounds violation, which is always better than having the problem detected at a later stage. - -Electric Fence always produces a copyright message in output irrespective of whether an error was detected or not. This behavior is quite useful, as it also acts as a confirmation that you are actually running an Electric Fence-enabled version of your program. - -#### Other considerations #### - -On the other hand, what I really miss in Electric Fence is the ability to detect memory leaks, as it is one of the most common and potentially serious problems that software written in C/C++ has. In addition, the tool cannot detect overruns of memory allocated on the stack, and is not thread-safe. - -Given that the tool allocates an inaccessible virtual memory page both before and after a user-allocated memory buffer, it ends up consuming a lot of extra memory if your program makes too many dynamic memory allocations. - -Another limitation of the tool is that it cannot explicitly tell exactly where the problem lies in your programs' code -- all it does is produce a segmentation fault whenever it detects a memory-related error. To find out the exact line number, you'll have to debug your Electric Fence-enabled program with a tool like [The Gnu Project Debugger (GDB)][14], which in turn depends on the -g compiler option to produce line numbers in output. - -Finally, although Electric Fence is capable of detecting most buffer overruns, an exception is the scenario where the allocated buffer size is not a multiple of the word size of the system -- in that case, an overrun (even if it's only a few bytes) won't be detected. - -#### Bottom line #### - -Despite all its limitations, where Electric Fence scores is the ease of use -- just link your program with the tool once, and it'll alert you every time it detects a memory issue it's capable of detecting. However, as already mentioned, the tool requires you to use a source-code debugger like GDB. - -### [Memcheck][16] ### - -**Developer**: [Valgrind Developers][17] -**Reviewed version**: 3.10.1 -**Linux support**: All flavors -**License**: GPL - -[Valgrind][18] is a suite that provides several tools for debugging and profiling Linux programs. Although it works with programs written in many different languages -- such as Java, Perl, Python, Assembly code, Fortran, Ada and more -- the tools it provides are largely aimed at programs written in C and C++. - -The most popular Valgrind tool is Memcheck, a memory-error detector that can detect issues such as memory leaks, invalid memory access, uses of undefined values and problems related to allocation and deallocation of heap memory. - -#### What's new #### - -This [release][19] of the suite (3.10.1) is a minor one that primarily contains fixes to bugs reported in version 3.10.0. In addition, it also "backports fixes for all reported missing AArch64 ARMv8 instructions and syscalls from the trunk." - -#### What's good about it #### - -Memcheck, like all other Valgrind tools, is basically a command line utility. It's very easy to use: If you normally run your program on the command line in a form such as prog arg1 arg2, you just need to add a few values, like this: valgrind --leak-check=full prog arg1 arg2. - -![cw memcheck output](http://images.techhive.com/images/article/2015/11/cw_memcheck-output-100627037-large.idge.png) -Memcheck - -(Note: You don't need to mention Memcheck anywhere in the command line because it's the default Valgrind tool. However, you do need to initially compile your program with the -g option -- which adds debugging information -- so that Memcheck's error messages include exact line numbers.) - -What I really like about Memcheck is that it provides a lot of command line options (such as the --leak-check option mentioned above), allowing you to not only control how the tool works but also how it produces the output. - -For example, you can enable the --track-origins option to see information on the sources of uninitialized data in your program. Enabling the --show-mismatched-frees option will let Memcheck match the memory allocation and deallocation techniques. For code written in C language, Memcheck will make sure that only the free() function is used to deallocate memory allocated by malloc(), while for code written in C++, the tool will check whether or not the delete and delete[] operators are used to deallocate memory allocated by new and new[], respectively. If a mismatch is detected, an error is reported. - -But the best part, especially for beginners, is that the tool even produces suggestions about which command line option the user should use to make the output more meaningful. For example, if you do not use the basic --leak-check option, it will produce an output suggesting: "Rerun with --leak-check=full to see details of leaked memory." And if there are uninitialized variables in the program, the tool will generate a message that says, "Use --track-origins=yes to see where uninitialized values come from." - -Another useful feature of Memcheck is that it lets you [create suppression files][20], allowing you to suppress certain errors that you can't fix at the moment -- this way you won't be reminded of them every time the tool is run. It's worth mentioning that there already exists a default suppression file that Memcheck reads to suppress errors in the system libraries, such as the C library, that come pre-installed with your OS. You can either create a new suppression file for your use, or edit the existing one (usually /usr/lib/valgrind/default.supp). - -For those seeking advanced functionality, it's worth knowing that Memcheck can also [detect memory errors][21] in programs that use [custom memory allocators][22]. In addition, it also provides [monitor commands][23] that can be used while working with Valgrind's built-in gdbserver, as well as a [client request mechanism][24] that allows you not only to tell the tool facts about the behavior of your program, but make queries as well. - -#### Other considerations #### - -While there's no denying that Memcheck can save you a lot of debugging time and frustration, the tool uses a lot of memory, and so can make your program execution significantly slower (around 20 to 30 times, [according to the documentation][25]). - -Aside from this, there are some other limitations, too. According to some user comments, Memcheck apparently isn't [thread-safe][26]; it doesn't detect [static buffer overruns][27]). Also, there are some Linux programs, like [GNU Emacs][28], that currently do not work with Memcheck. - -If you're interested in taking a look, an exhaustive list of Valgrind's limitations can be found [here][29]. - -#### Bottom line #### - -Memcheck is a handy memory-debugging tool for both beginners as well as those looking for advanced features. While it's very easy to use if all you need is basic debugging and error checking, there's a bit of learning curve if you want to use features like suppression files or monitor commands. - -Although it has a long list of limitations, Valgrind (and hence Memcheck) claims on its site that it is used by [thousands of programmers][30] across the world -- the team behind the tool says it's received feedback from users in over 30 countries, with some of them working on projects with up to a whopping 25 million lines of code. - -### [Memwatch][31] ### - -**Developer**: Johan Lindh -**Reviewed version**: 2.71 -**Linux support**: All flavors -**License**: GNU GPL - -Memwatch is a memory-debugging tool developed by Johan Lindh. Although it's primarily a memory-leak detector, it is also capable (according to its Web page) of detecting other memory-related issues like [double-free error tracking and erroneous frees][32], buffer overflow and underflow, [wild pointer][33] writes, and more. - -The tool works with programs written in C. Although you can also use it with C++ programs, it's not recommended (according to the Q&A file that comes with the tool's source package). - -#### What's new #### - -This version adds ULONG_LONG_MAX to detect whether a program is 32-bit or 64-bit. - -#### What's good about it #### - -Like Dmalloc, Memwatch comes with good documentation. You can refer to the USING file if you want to learn things like how the tool works; how it performs initialization, cleanup and I/O operations; and more. Then there is a FAQ file that is aimed at helping users in case they face any common error while using Memcheck. Finally, there is a test.c file that contains a working example of the tool for your reference. - -![cw memwatch output](http://images.techhive.com/images/article/2015/11/cw_memwatch_output-100627038-large.idge.png) -Memwatch - -Unlike Mtrace, the log file to which Memwatch writes the output (usually memwatch.log) is in human-readable form. Also, instead of truncating, Memwatch appends the memory-debugging output to the file each time the tool is run, allowing you to easily refer to the previous outputs should the need arise. - -It's also worth mentioning that when you execute your program with Memwatch enabled, the tool produces a one-line output on [stdout][34] informing you that some errors were found -- you can then head to the log file for details. If no such error message is produced, you can rest assured that the log file won't contain any mistakes -- this actually saves time if you're running the tool several times. - -Another thing that I liked about Memwatch is that it also provides a way through which you can capture the tool's output from within the code, and handle it the way you like (refer to the mwSetOutFunc() function in the Memwatch source code for more on this). - -#### Other considerations #### - -Like Mtrace and Dmalloc, Memwatch requires you to add extra code to your source file -- you have to include the memwatch.h header file in your code. Also, while compiling your program, you need to either compile memwatch.c along with your program's source files or include the object module from the compile of the file, as well as define the MEMWATCH and MW_STDIO variables on the command line. Needless to say, the -g compiler option is also required for your program if you want exact line numbers in the output. - -There are some features that it doesn't contain. For example, the tool cannot detect attempts to write to an address that has already been freed or read data from outside the allocated memory. Also, it's not thread-safe. Finally, as I've already pointed out in the beginning, there is no guarantee on how the tool will behave if you use it with programs written in C++. - -#### Bottom line #### - -Memcheck can detect many memory-related problems, making it a handy debugging tool when dealing with projects written in C. Given that it has a very small source code, you can learn how the tool works, debug it if the need arises, and even extend or update its functionality as per your requirements. - -### [Mtrace][35] ### - -**Developers**: Roland McGrath and Ulrich Drepper -**Reviewed version**: 2.21 -**Linux support**: All flavors -**License**: GNU LGPL - -Mtrace is a memory-debugging tool included in [the GNU C library][36]. It works with both C and C++ programs on Linux, and detects memory leaks caused by unbalanced calls to the malloc() and free() functions. - -![cw mtrace output](http://images.techhive.com/images/article/2015/11/cw_mtrace-output-100627039-large.idge.png) -Mtrace - -The tool is implemented in the form of a function called mtrace(), which traces all malloc/free calls made by a program and logs the information in a user-specified file. Because the file contains data in computer-readable format, a Perl script -- also named mtrace -- is used to convert and display it in human-readable form. - -#### What's new #### - -[The Mtrace source][37] and [the Perl file][38] that now come with the GNU C library (version 2.21) add nothing new to the tool aside from an update to the copyright dates. - -#### What's good about it #### - -The best part about Mtrace is that the learning curve for it isn't steep; all you need to understand is how and where to add the mtrace() -- and the corresponding muntrace() -- function in your code, and how to use the Mtrace Perl script. The latter is very straightforward -- all you have to do is run the mtrace() command. (For an example, see the last command in the screenshot above.) - -Another thing that I like about Mtrace is that it's scalable -- which means that you can not only use it to debug a complete program, but can also use it to detect memory leaks in individual modules of the program. Just call the mtrace() and muntrace() functions within each module. - -Finally, since the tool is triggered when the mtrace() function -- which you add in your program's source code -- is executed, you have the flexibility to enable the tool dynamically (during program execution) [using signals][39]. - -#### Other considerations #### - -Because the calls to mtrace() and mauntrace() functions -- which are declared in the mcheck.h file that you need to include in your program's source -- are fundamental to Mtrace's operation (the mauntrace() function is not [always required][40]), the tool requires programmers to make changes in their code at least once. - -Be aware that you need to compile your program with the -g option (provided by both the [GCC][41] and [G++][42] compilers), which enables the debugging tool to display exact line numbers in the output. In addition, some programs (depending on how big their source code is) can take a long time to compile. Finally, compiling with -g increases the size of the executable (because it produces extra information for debugging), so you have to remember that the program needs to be recompiled without -g after the testing has been completed. - -To use Mtrace, you need to have some basic knowledge of environment variables in Linux, given that the path to the user-specified file -- which the mtrace() function uses to log all the information -- has to be set as a value for the MALLOC_TRACE environment variable before the program is executed. - -Feature-wise, Mtrace is limited to detecting memory leaks and attempts to free up memory that was never allocated. It can't detect other memory-related issues such as illegal memory access or use of uninitialized memory. Also, [there have been complaints][43] that it's not [thread-safe][44]. - -### Conclusions ### - -Needless to say, each memory debugger that I've discussed here has its own qualities and limitations. So, which one is best suited for you mostly depends on what features you require, although ease of setup and use might also be a deciding factor in some cases. - -Mtrace is best suited for cases where you just want to catch memory leaks in your software program. It can save you some time, too, since the tool comes pre-installed on your Linux system, something which is also helpful in situations where the development machines aren't connected to the Internet or you aren't allowed to download a third party tool for any kind of debugging. - -Dmalloc, on the other hand, can not only detect more error types compared to Mtrace, but also provides more features, such as runtime configurability and GDB integration. Also, unlike any other tool discussed here, Dmalloc is thread-safe. Not to mention that it comes with detailed documentation, making it ideal for beginners. - -Although Memwatch comes with even more comprehensive documentation than Dmalloc, and can detect even more error types, you can only use it with software written in the C programming language. One of its features that stands out is that it lets you handle its output from within the code of your program, something that is helpful in case you want to customize the format of the output. - -If making changes to your program's source code is not what you want, you can use Electric Fence. However, keep in mind that it can only detect a couple of error types, and that doesn't include memory leaks. Plus, you also need to know GDB basics to make the most out of this memory-debugging tool. - -Memcheck is probably the most comprehensive of them all. It detects more error types and provides more features than any other tool discussed here -- and it doesn't require you to make any changes in your program's source code.But be aware that, while the learning curve is not very high for basic usage, if you want to use its advanced features, a level of expertise is definitely required. - --------------------------------------------------------------------------------- - -via: http://www.computerworld.com/article/3003957/linux/review-5-memory-debuggers-for-linux-coding.html - -作者:[Himanshu Arora][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/Himanshu-Arora/ -[1]:https://openclipart.org/detail/132427/penguin-admin -[2]:https://en.wikipedia.org/wiki/Manual_memory_management -[3]:http://dmalloc.com/ -[4]:https://www.owasp.org/index.php/Double_Free -[5]:https://stuff.mit.edu/afs/sipb/project/gnucash-test/src/dmalloc-4.8.2/dmalloc.html#Fence-Post%20Overruns -[6]:http://dmalloc.com/releases/notes/dmalloc-5.5.2.html -[7]:http://www.gnu.org/software/gdb/ -[8]:http://dmalloc.com/docs/ -[9]:http://dmalloc.com/docs/latest/online/dmalloc_26.html#SEC32 -[10]:http://dmalloc.com/docs/latest/online/dmalloc_23.html#SEC29 -[11]:https://en.wikipedia.org/wiki/Memory_management#Dynamic_memory_allocation -[12]:https://en.wikipedia.org/wiki/Segmentation_fault -[13]:https://en.wikipedia.org/wiki/GNU_Compiler_Collection -[14]:http://www.gnu.org/software/gdb/ -[15]:https://launchpad.net/ubuntu/+source/electric-fence/2.2.3 -[16]:http://valgrind.org/docs/manual/mc-manual.html -[17]:http://valgrind.org/info/developers.html -[18]:http://valgrind.org/ -[19]:http://valgrind.org/docs/manual/dist.news.html -[20]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles -[21]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.mempools -[22]:http://stackoverflow.com/questions/4642671/c-memory-allocators -[23]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.monitor-commands -[24]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs -[25]:http://valgrind.org/docs/manual/valgrind_manual.pdf -[26]:http://sourceforge.net/p/valgrind/mailman/message/30292453/ -[27]:https://msdn.microsoft.com/en-us/library/ee798431%28v=cs.20%29.aspx -[28]:http://www.computerworld.com/article/2484425/linux/5-free-linux-text-editors-for-programming-and-word-processing.html?nsdr=true&page=2 -[29]:http://valgrind.org/docs/manual/manual-core.html#manual-core.limits -[30]:http://valgrind.org/info/ -[31]:http://www.linkdata.se/sourcecode/memwatch/ -[32]:http://www.cecalc.ula.ve/documentacion/tutoriales/WorkshopDebugger/007-2579-007/sgi_html/ch09.html -[33]:http://c2.com/cgi/wiki?WildPointer -[34]:https://en.wikipedia.org/wiki/Standard_streams#Standard_output_.28stdout.29 -[35]:http://www.gnu.org/software/libc/manual/html_node/Tracing-malloc.html -[36]:https://www.gnu.org/software/libc/ -[37]:https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/mtrace.c;h=df10128b872b4adc4086cf74e5d965c1c11d35d2;hb=HEAD -[38]:https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/mtrace.pl;h=0737890510e9837f26ebee2ba36c9058affb0bf1;hb=HEAD -[39]:http://webcache.googleusercontent.com/search?q=cache:s6ywlLtkSqQJ:www.gnu.org/s/libc/manual/html_node/Tips-for-the-Memory-Debugger.html+&cd=1&hl=en&ct=clnk&gl=in&client=Ubuntu -[40]:http://www.gnu.org/software/libc/manual/html_node/Using-the-Memory-Debugger.html#Using-the-Memory-Debugger -[41]:http://linux.die.net/man/1/gcc -[42]:http://linux.die.net/man/1/g++ -[43]:https://sourceware.org/ml/libc-help/2014-05/msg00008.html -[44]:https://en.wikipedia.org/wiki/Thread_safety From a4320edeabd113820e5ce6f6b2d9c60f84ddd087 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Mon, 14 Dec 2015 00:27:03 +0800 Subject: [PATCH 0563/1710] Create 20151124 Review--5 memory debuggers for Linux coding.md --- ...ew--5 memory debuggers for Linux coding.md | 299 ++++++++++++++++++ 1 file changed, 299 insertions(+) create mode 100644 translated/talk/20151124 Review--5 memory debuggers for Linux coding.md diff --git a/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md b/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md new file mode 100644 index 0000000000..b49ba9e40a --- /dev/null +++ b/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md @@ -0,0 +1,299 @@ +点评:Linux编程中五款内存调试器 +================================================================================ +![](http://images.techhive.com/images/article/2015/11/penguinadmin-2400px-100627186-primary.idge.jpg) +Credit: [Moini][1] + +作为一个程序员,我知道我总在犯错误——事实是,怎么可能会不犯错的!程序员也是人啊。有的错误能在编码过程中及时发现,而有些却得等到软件测试才显露出来。然而,有一类错误并不能在这两个时期被排除,从而导致软件不能正常运行,甚至是提前中止。 + +想到了吗?我说的就是内存相关的错误。手动调试这些错误不仅耗时,而且很难发现并纠正。值得一提的是,这种错误非常地常见,特别是在一些软件里,这些软件是用C/C++这类允许[手动管理内存][2]的语言编写的。 + +幸运的是,现行有一些编程工具能够帮你找到软件程序中这些内存相关的错误。在这些工具集中,我评定了五款Linux可用的,流行、免费并且开源的内存调试器:Dmalloc、Electric Fence、 Memcheck、 Memwatch以及Mtrace。日常编码过程中我已经把这五个调试器用了个遍,所以这些点评是建立在我的实际体验之上的。 + +### [Dmalloc][3] ### + +**开发者**:Gray Watson + +**点评版本**:5.5.2 + +**Linux支持**:所有种类 + +**许可**:知识共享署名-相同方式共享许可证3.0 + +Dmalloc是Gray Watson开发的一款内存调试工具。它实现成库,封装了标准内存管理函数如**malloc(), calloc(), free()**等,使得程序员得以检测出有问题的代码。 + +![cw dmalloc output](http://images.techhive.com/images/article/2015/11/cw_dmalloc-output-100627040-large.idge.png) +Dmalloc + +如同工具的网页所列,这个调试器提供的特性包括内存泄漏跟踪、[重复释放(double free)][4]错误跟踪、以及[越界写入(fence-post write)][5]检测。其它特性包括文件/行号报告、普通统计记录。 + +#### 更新内容 #### + +5.5.2版本是一个[bug修复发行版][6],同时修复了构建和安装的问题。 + +#### 有何优点 #### + +Dmalloc最大的优点是可以进行任意配置。比如说,你可以配置以支持C++程序和多线程应用。Dmalloc还提供一个有用的功能:运行时可配置,这表示在Dmalloc执行时,可以轻易地使能或者禁能它提供的特性。 + +你还可以配合[GNU Project Debugger (GDB)][7]来使用Dmalloc,只需要将dmalloc.gdb文件(位于Dmalloc源码包中的contrib子目录里)的内容添加到你的主目录中的.gdbinit文件里即可。 + +另外一个优点让我对Dmalloc爱不释手的是它有大量的资料文献。前往官网的[Documentation标签][8],可以获取任何内容,有关于如何下载、安装、运行,怎样使用库,和Dmalloc所提供特性的细节描述,及其输入文件的解释。里面还有一个章节介绍了一般问题的解决方法。 + +#### 注意事项 #### + +跟Mtrace一样,Dmalloc需要程序员改动他们的源代码。比如说你可以(必须的)添加头文件**dmalloc.h**,工具就能汇报产生问题的调用的文件或行号。这个功能非常有用,因为它节省了调试的时间。 + +除此之外,还需要在编译你的程序时,把Dmalloc库(编译源码包时产生的)链接进去。 + +然而,还有点更麻烦的事,需要设置一个环境变量,命名为**DMALLOC_OPTION**,以供工具在运行时配置内存调试特性,以及输出文件的路径。可以手动为该环境变量分配一个值,不过初学者可能会觉得这个过程有点困难,因为你想使能的Dmalloc特性是存在于这个值之中的——表示为各自的十六进制值的累加。[这里][9]有详细介绍。 + +一个比较简单方法设置这个环境变量是使用[Dmalloc实用指令][10],这是专为这个目的设计的方法。 + +#### 总结 #### + +Dmalloc真正的优势在于它的可配置选项。而且高度可移植,曾经成功移植到多种操作系统如AIX、BSD/OS、DG/UX、Free/Net/OpenBSD、GNU/Hurd、HPUX、Irix、Linux、MS-DOG、NeXT、OSF、SCO、Solaris、SunOS、Ultrix、Unixware甚至Unicos(运行在Cray T3E主机上)。虽然Dmalloc有很多东西需要学习,但是它所提供的特性值得为之付出。 + +### [Electric Fence][15] ### + +**开发者**:Bruce Perens + +**点评版本**:2.2.3 + +**Linux支持**:所有种类 + +**许可**:GNU 通用公共许可证 (第二版) + +Electric Fence是Bruce Perens开发的一款内存调试工具,它以库的形式实现,你的程序需要链接它。Electric Fence能检测出[栈][11]内存溢出和访问已经释放的内存。 + +![cw electric fence output](http://images.techhive.com/images/article/2015/11/cw_electric-fence-output-100627041-large.idge.png) +Electric Fence + +顾名思义,Electric Fence在每个申请的缓存边界建立了fence(防护),任何非法内存访问都会导致[段错误][12]。这个调试工具同时支持C和C++编程。 + + +#### 更新内容 #### + +2.2.3版本修复了工具的构建系统,使得-fno-builtin-malloc选项能真正传给[GNU Compiler Collection (GCC)][13]。 + +#### 有何优点 #### + +我喜欢Electric Fence首要的一点是(Memwatch、Dmalloc和Mtrace所不具有的),这个调试工具不需要你的源码做任何的改动,你只需要在编译的时候把它的库链接进你的程序即可。 + +其次,Electric Fence实现一个方法,确认导致越界访问(a bounds violation)的第一个指令就是引起段错误的原因。这比在后面再发现问题要好多了。 + +不管是否有检测出错误,Electric Fence经常会在输出产生版权信息。这一点非常有用,由此可以确定你所运行的程序已经启用了Electric Fence。 + +#### 注意事项 #### + +另一方面,我对Electric Fence真正念念不忘的是它检测内存泄漏的能力。内存泄漏是C/C++软件最常见也是最难隐秘的问题之一。不过,Electric Fence不能检测出堆内存溢出,而且也不是线程安全的。 + +基于Electric Fence会在用户分配内存区的前后分配禁止访问的虚拟内存页,如果你过多的进行动态内存分配,将会导致你的程序消耗大量的额外内存。 + +Electric Fence还有一个局限是不能明确指出错误代码所在的行号。它所能做只是在监测到内存相关错误时产生段错误。想要定位行号,需要借助[The Gnu Project Debugger (GDB)][14]这样的调试工具来调试你启用了Electric Fence的程序。 + +最后一点,Electric Fence虽然能检测出大部分的缓冲区溢出,有一个例外是,如果所申请的缓冲区大小不是系统字长的倍数,这时候溢出(即使只有几个字节)就不能被检测出来。 + +#### 总结 #### + +尽管有那么多的局限,但是Electric Fence的优点却在于它的易用性。程序只要链接工具一次,Electric Fence就可以在监测出内存相关问题的时候报警。不过,如同前面所说,Electric Fence需要配合像GDB这样的源码调试器使用。 + + +### [Memcheck][16] ### + +**开发者**:[Valgrind开发团队][17] + +**点评版本**:3.10.1 + +**Linux支持**:所有种类 + +**许可**:通用公共许可证 + +[Valgrind][18]是一个提供好几款调试和Linux程序性能分析工具的套件。虽然Valgrind和编写语言各不相同(有Java、Perl、Python、Assembly code、ortran、Ada等等)的程序配合工作,但是它所提供的工具大部分都意在支持C/C++所编写的程序。 + +Memcheck作为内存错误检测器,是一款最受欢迎的Memcheck工具。它能够检测出诸多问题诸如内存泄漏、无效的内存访问、未定义变量的使用以及栈内存分配和释放相关的问题等。 + +#### 更新内容 #### + +工具套件(3.10.1)的[发行版][19]是一个副版本,主要修复了3.10.0版本发现的bug。除此之外,从主版本backport一些包,修复了缺失的AArch64 ARMv8指令和系统调用。 + +#### 有何优点 #### + +同其它所有Valgrind工具一样,Memcheck也是基本的命令行实用程序。它的操作非常简单:通常我们会使用诸如prog arg1 arg2格式的命令来运行程序,而Memcheck只要求你多加几个值即可,就像valgrind --leak-check=full prog arg1 arg2。 + +![cw memcheck output](http://images.techhive.com/images/article/2015/11/cw_memcheck-output-100627037-large.idge.png) +Memcheck + +(注意:因为Memcheck是Valgrind的默认工具所以无需提及Memcheck。但是,需要在编译程序之初带上-g参数选项,这一步会添加调试信息,使得Memcheck的错误信息会包含正确的行号。) + +我真正倾心于Memcheck的是它提供了很多命令行选项(如上所述的--leak-check选项),如此不仅能控制工具运转还可以控制它的输出。 + +举个例子,可以开启--track-origins选项,以查看程序源码中未初始化的数据。可以开启--show-mismatched-frees选项让Memcheck匹配内存的分配和释放技术。对于C语言所写的代码,Memcheck会确保只能使用free()函数来释放内存,malloc()函数来申请内存。而对C++所写的源码,Memcheck会检查是否使用了delete或delete[]操作符来释放内存,以及new或者new[]来申请内存。 + +Memcheck最好的特点,尤其是对于初学者来说的,是它会给用户建议使用那个命令行选项能让输出更加有意义。比如说,如果你不使用基本的--leak-check选项,Memcheck会在输出时建议“使用--leak-check=full重新运行,查看更多泄漏内存细节”。如果程序有未初始化的变量,Memcheck会产生信息“使用--track-origins=yes,查看未初始化变量的定位”。 + +Memcheck另外一个有用的特性是它可以[创建抑制文件(suppression files)][20],由此可以忽略特定不能修正的错误,这样Memcheck运行时就不会每次都报警了。值得一提的是,Memcheck会去读取默认抑制文件来忽略系统库(比如C库)中的报错,这些错误在系统创建之前就已经存在了。可以选择创建一个新的抑制文件,或是编辑现有的(通常是/usr/lib/valgrind/default.supp)。 + +Memcheck还有高级功能,比如可以使用[定制内存分配器][22]来[检测内存错误][21]。除此之外,Memcheck提供[监控命令][23],当用到Valgrind的内置gdbserver,以及[客户端请求][24]机制(不仅能把程序的行为告知Memcheck,还可以进行查询)时可以使用。 + +#### 注意事项 #### + +毫无疑问,Memcheck可以节省很多调试时间以及省去很多麻烦。但是它使用了很多内存,导致程序执行变慢([由资料可知][25],大概花上20至30倍时间)。 + +除此之外,Memcheck还有其它局限。根据用户评论,Memcheck明显不是[线程安全][26]的;它不能检测出 [静态缓冲区溢出][27];还有就是,一些Linux程序如[GNU Emacs][28],目前还不能使用Memcheck。 + +如果有兴趣,可以在[这里][29]查看Valgrind详尽的局限性说明。 + +#### 总结 #### + +无论是对于初学者还是那些需要高级特性的人来说,Memcheck都是一款便捷的内存调试工具。如果你仅需要基本调试和错误核查,Memcheck会非常容易上手。而当你想要使用像抑制文件或者监控指令这样的特性,就需要花一些功夫学习了。 + +虽然罗列了大量的局限性,但是Valgrind(包括Memcheck)在它的网站上声称全球有[成千上万程序员][30]使用了此工具。开发团队称收到来自超过30个国家的用户反馈,而这些用户的工程代码有的高达2.5千万行。 + +### [Memwatch][31] ### + +**开发者**:Johan Lindh + +**点评版本**:2.71 + +**Linux支持**:所有种类 + +**许可**:GNU通用公共许可证 + +Memwatch是由Johan Lindh开发的内存调试工具,虽然它主要扮演内存泄漏检测器的角色,但是它也具有检测其它如[重复释放跟踪和内存错误释放][32]、缓冲区溢出和下溢、[野指针][33]写入等等内存相关问题的能力(根据网页介绍所知)。 + +Memwatch支持用C语言所编写的程序。可以在C++程序中使用它,但是这种做法并不提倡(由Memwatch源码包随附的Q&A文件中可知)。 + +#### 更新内容 #### + +这个版本添加了ULONG_LONG_MAX以区分32位和64位程序。 + +#### 有何优点 #### + +跟Dmalloc一样,Memwatch也有优秀的文献资料。参考USING文件,可以学习如何使用Memwatch,可以了解Memwatch是如何初始化、如何清理以及如何进行I/O操作的,等等不一而足。还有一个FAQ文件,旨在帮助用户解决使用过程遇到的一般问题。最后还有一个test.c文件提供工作案例参考。 + +![cw memwatch output](http://images.techhive.com/images/article/2015/11/cw_memwatch_output-100627038-large.idge.png) +Memwatch + +不同于Mtrace,Memwatch的输出产生的日志文件(通常是memwatch.log)是人类可阅读格式。而且,Memwatch每次运行时总会拼接内存调试输出到此文件末尾,而不是进行覆盖(译改)。如此便可在需要之时,轻松查看之前的输出信息。 + +同样值得一提的是当你执行了启用Memwatch的程序,Memwatch会在[标准输出][34]中产生一个单行输出,告知发现了错误,然后你可以在日志文件中查看输出细节。如果没有产生错误信息,就可以确保日志文件不会写入任何错误,多次运行的话能实际节省时间。 + +另一个我喜欢的优点是Memwatch同样在源码中提供一个方法,你可以据此获取Memwatch的输出信息,然后任由你进行处理(参考Memwatch源码中的mwSetOutFunc()函数获取更多有关的信息)。 + +#### 注意事项 #### + +跟Mtrace和Dmalloc一样,Memwatch也需要你往你的源文件里增加代码:你需要把memwatch.h这个头文件包含进你的代码。而且,编译程序的时候,你需要连同memwatch.c一块编译;或者你可以把已经编译好的目标模块包含起来,然后在命令行定义MEMWATCH和MW_STDIO变量。不用说,想要在输出中定位行号,-g编译器选项也少不了。 + +还有一些没有具备的特性。比如Memwatch不能检测出往一块已经被释放的内存写入操作,或是在分配的内存块之外的读取操作。而且,Memwatch也不是线程安全的。还有一点,正如我在开始时指出,在C++程序上运行Memwatch的结果是不能预料的。 + +#### 总结 #### + +Memcheck可以检测很多内存相关的问题,在处理C程序时是非常便捷的调试工具。因为源码小巧,所以可以从中了解Memcheck如何运转,有需要的话可以调试它,甚至可以根据自身需求扩展升级它的功能。 + +### [Mtrace][35] ### + +**开发者**: Roland McGrath and Ulrich Drepper + +**点评版本**: 2.21 + +**Linux支持**:所有种类 + +**许可**:GNU通用公共许可证 + +Mtrace是[GNU C库][36]中的一款内存调试工具,同时支持Linux C和C++程序,检测由malloc()和free()函数的不对等调用所引起的内存泄漏问题。 + +![cw mtrace output](http://images.techhive.com/images/article/2015/11/cw_mtrace-output-100627039-large.idge.png) +Mtrace + +Mtrace实现为对mtrace()函数的调用,跟踪程序中所有malloc/free调用,在用户指定的文件中记录相关信息。文件以一种机器可读的格式记录数据,所以有一个Perl脚本(同样命名为mtrace)用来把文件转换并展示为人类可读格式。 + +#### 更新内容 #### + +[Mtrace源码][37]和[Perl文件][38]同GNU C库(2.21版本)一起释出,除了更新版权日期,其它别无改动。 + +#### 有何优点 #### + +Mtrace最优秀的特点是非常简单易学。你只需要了解在你的源码中如何以及何处添加mtrace()及其对立的muntrace()函数,还有如何使用Mtrace的Perl脚本。后者非常简单,只需要运行指令mtrace (例子见开头截图最后一条指令)。 + +Mtrace另外一个优点是它的可收缩性,体现在,不仅可以使用它来调试完整的程序,还可以使用它来检测程序中独立模块的内存泄漏。只需在每个模块里调用mtrace()和muntrace()即可。 + +最后一点,因为Mtrace会在mtace()(在源码中添加的函数)执行时被触发,因此可以很灵活地[使用信号][39]动态地(在程序执行周期内)使能Mtrace。 + +#### 注意事项 #### + +因为mtrace()和mauntrace()函数(在mcheck.h文件中声明,所以必须在源码中包含此头文件)的调用是Mtrace运行(mauntrace()函数并非[总是必要][40])的根本,因此Mtrace要求程序员至少改动源码一次。 + +了解需要在编译程序的时候带上-g选项([GCC][41]和[G++][42]编译器均由提供),才能使调试工具在输出展示正确的行号。除此之外,有些程序(取决于源码体积有多大)可能会花很长时间进行编译。最后,带-g选项编译会增加了可执行文件的内存(因为提供了额外的调试信息),因此记得程序需要在测试结束,不带-g选项重新进行编译。 + +使用Mtrace,你需要掌握Linux环境变量的基本知识,因为在程序执行之前,需要把用户指定文件(mtrace()函数用以记载全部信息)的路径设置为环境变量MALLOC_TRACE的值。 + +Mtrace在检测内存泄漏和尝试释放未经过分配的内存方面存在局限。它不能检测其它内存相关问题如非法内存访问、使用未初始化内存。而且,[有人抱怨][43]Mtrace不是[线程安全][44]的。 + +### 总结 ### + +不言自明,我在此讨论的每款内存调试器都有其优点和局限。所以,哪一款适合你取决于你所需要的特性,虽然有时候容易安装和使用也是一个决定因素。 + +要想捕获软件程序中的内存泄漏,Mtrace最适合不过了。它还可以节省时间。由于Linux系统已经预装了此工具,对于不能联网或者不可以下载第三方调试调试工具的情况,Mtrace也是极有助益的。 + +另一方面,相比Mtrace,,Dmalloc不仅能检测更多错误类型,还你呢个提供更多特性,比如运行时可配置、GDB集成。而且,Dmalloc不像这里所说的其它工具,它是线程安全的。更不用说它的详细资料了,这让Dmalloc成为初学者的理想选择。 + +虽然Memwatch的资料比Dmalloc的更加丰富,而且还能检测更多的错误种类,但是你只能在C语言写就的软件程序上使用它。一个让Memwatch脱颖而出的特性是它允许在你的程序源码中处理它的输出,这对于想要定制输出格式来说是非常有用的。 + +如果改动程序源码非你所愿,那么使用Electric Fence吧。不过,请记住,Electric Fence只能检测两种错误类型,而此二者均非内存泄漏。还有就是,需要了解GDB基础以最大程序发挥这款内存调试工具的作用。 + +Memcheck可能是这当中综合性最好的了。相比这里所说其它工具,它检测更多的错误类型,提供更多的特性,而且不需要你的源码做任何改动。但请注意,基本功能并不难上手,但是想要使用它的高级特性,就必须学习相关的专业知识了。 + +-------------------------------------------------------------------------------- + +via: http://www.computerworld.com/article/3003957/linux/review-5-memory-debuggers-for-linux-coding.html + +作者:[Himanshu Arora][a] +译者:[译者ID](https://github.com/soooogreen) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.computerworld.com/author/Himanshu-Arora/ +[1]:https://openclipart.org/detail/132427/penguin-admin +[2]:https://en.wikipedia.org/wiki/Manual_memory_management +[3]:http://dmalloc.com/ +[4]:https://www.owasp.org/index.php/Double_Free +[5]:https://stuff.mit.edu/afs/sipb/project/gnucash-test/src/dmalloc-4.8.2/dmalloc.html#Fence-Post%20Overruns +[6]:http://dmalloc.com/releases/notes/dmalloc-5.5.2.html +[7]:http://www.gnu.org/software/gdb/ +[8]:http://dmalloc.com/docs/ +[9]:http://dmalloc.com/docs/latest/online/dmalloc_26.html#SEC32 +[10]:http://dmalloc.com/docs/latest/online/dmalloc_23.html#SEC29 +[11]:https://en.wikipedia.org/wiki/Memory_management#Dynamic_memory_allocation +[12]:https://en.wikipedia.org/wiki/Segmentation_fault +[13]:https://en.wikipedia.org/wiki/GNU_Compiler_Collection +[14]:http://www.gnu.org/software/gdb/ +[15]:https://launchpad.net/ubuntu/+source/electric-fence/2.2.3 +[16]:http://valgrind.org/docs/manual/mc-manual.html +[17]:http://valgrind.org/info/developers.html +[18]:http://valgrind.org/ +[19]:http://valgrind.org/docs/manual/dist.news.html +[20]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles +[21]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.mempools +[22]:http://stackoverflow.com/questions/4642671/c-memory-allocators +[23]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.monitor-commands +[24]:http://valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs +[25]:http://valgrind.org/docs/manual/valgrind_manual.pdf +[26]:http://sourceforge.net/p/valgrind/mailman/message/30292453/ +[27]:https://msdn.microsoft.com/en-us/library/ee798431%28v=cs.20%29.aspx +[28]:http://www.computerworld.com/article/2484425/linux/5-free-linux-text-editors-for-programming-and-word-processing.html?nsdr=true&page=2 +[29]:http://valgrind.org/docs/manual/manual-core.html#manual-core.limits +[30]:http://valgrind.org/info/ +[31]:http://www.linkdata.se/sourcecode/memwatch/ +[32]:http://www.cecalc.ula.ve/documentacion/tutoriales/WorkshopDebugger/007-2579-007/sgi_html/ch09.html +[33]:http://c2.com/cgi/wiki?WildPointer +[34]:https://en.wikipedia.org/wiki/Standard_streams#Standard_output_.28stdout.29 +[35]:http://www.gnu.org/software/libc/manual/html_node/Tracing-malloc.html +[36]:https://www.gnu.org/software/libc/ +[37]:https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/mtrace.c;h=df10128b872b4adc4086cf74e5d965c1c11d35d2;hb=HEAD +[38]:https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/mtrace.pl;h=0737890510e9837f26ebee2ba36c9058affb0bf1;hb=HEAD +[39]:http://webcache.googleusercontent.com/search?q=cache:s6ywlLtkSqQJ:www.gnu.org/s/libc/manual/html_node/Tips-for-the-Memory-Debugger.html+&cd=1&hl=en&ct=clnk&gl=in&client=Ubuntu +[40]:http://www.gnu.org/software/libc/manual/html_node/Using-the-Memory-Debugger.html#Using-the-Memory-Debugger +[41]:http://linux.die.net/man/1/gcc +[42]:http://linux.die.net/man/1/g++ +[43]:https://sourceware.org/ml/libc-help/2014-05/msg00008.html +[44]:https://en.wikipedia.org/wiki/Thread_safety From e45523f623f8a6275b14678d5cd635bbc8f72f52 Mon Sep 17 00:00:00 2001 From: VicYu Date: Mon, 14 Dec 2015 02:17:17 +0800 Subject: [PATCH 0564/1710] =?UTF-8?q?=20=E5=8E=9F=E6=96=87=E5=B7=B2?= =?UTF-8?q?=E8=A2=AB=E7=BF=BB=E8=AF=91=EF=BC=8C=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ur Ubuntu or Linux Mint with SystemBack.md | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md diff --git a/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md deleted file mode 100644 index 8fc02b4a9b..0000000000 --- a/sources/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md +++ /dev/null @@ -1,42 +0,0 @@ -Translating by DongShuaike - -Backup (System Restore Point) your Ubuntu/Linux Mint with SystemBack -================================================================================ -System Restore is must have feature for any OS that allows the user to revert their computer's state (including system files, installed applications, and system settings) to that of a previous point in time, which can be used to recover from system malfunctions or other problems. -Sometimes installing a program or driver can make your OS go to blank screen. System Restore can return your PC's system files and programs to a time when everything was working fine, potentially preventing hours of troubleshooting headaches. It won't affect your documents, pictures, or other data. -Simple system backup and restore application with extra features. [Systemback][1] makes it easy to create backups of system and users configuration files. In case of problems you can easily restore the previous state of the system. There are extra features like system copying, system installation and Live system creation. - -Screenshots - -![systemback](http://2.bp.blogspot.com/-2UPS3yl3LHw/VlilgtGAlvI/AAAAAAAAGts/ueRaAghXNvc/s1600/systemback-1.jpg) - -![systemback](http://2.bp.blogspot.com/-7djBLbGenxE/Vlilgk-FZHI/AAAAAAAAGtk/2PVNKlaPO-c/s1600/systemback-2.jpg) - -![](http://3.bp.blogspot.com/-beZYwKrsT4o/VlilgpThziI/AAAAAAAAGto/cwsghXFNGRA/s1600/systemback-3.jpg) - -![](http://1.bp.blogspot.com/-t_gmcoQZrvM/VlilhLP--TI/AAAAAAAAGt0/GWBg6bGeeaI/s1600/systemback-5.jpg) - -**Note**: Using System Restore will not restore documents, music, emails, or personal files of any kind. Depending on your perspective, this is both a positive and negative feature. The bad news is that it won't restore that accidentally deleted file you wish you could get back, though a file recovery program might solve that problem. -If no restore point exists on your computer, System Restore has nothing to revert to so the tool won't work for you. If you're trying to recover from a major problem, you'll need to move on to another troubleshooting step. - ->>> Available for Ubuntu 15.10 Wily/16.04/15.04 Vivid/14.04 Trusty/Linux Mint 17.x/other Ubuntu derivatives -To install SystemBack Application in Ubuntu/Linux Mint open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal: - -Terminal Commands: - - sudo add-apt-repository ppa:nemh/systemback - sudo apt-get update - sudo apt-get install systemback - -That's it - --------------------------------------------------------------------------------- - -via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://launchpad.net/systemback From b2085f1f8bb5148aea9ab940f34306f561c483f8 Mon Sep 17 00:00:00 2001 From: VicYu Date: Mon, 14 Dec 2015 02:25:55 +0800 Subject: [PATCH 0565/1710] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=91=E6=96=87?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E8=A2=AB=E6=94=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=84=9A=E6=A0=87=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=AF=91=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ur Ubuntu or Linux Mint with SystemBack.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md index 58eb99c205..7e0ccc87c7 100644 --- a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md +++ b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md @@ -4,13 +4,13 @@ 截图 -[![systemback](https://camo.githubusercontent.com/5e0e0e4b2fafb1b929ea0ab63b75d5f9c7220641/687474703a2f2f322e62702e626c6f6773706f742e636f6d2f2d3255505333796c334c48772f566c696c677447416c76492f41414141414141414774732f75655261416768584e76632f73313630302f73797374656d6261636b2d312e6a7067)](https://camo.githubusercontent.com/5e0e0e4b2fafb1b929ea0ab63b75d5f9c7220641/687474703a2f2f322e62702e626c6f6773706f742e636f6d2f2d3255505333796c334c48772f566c696c677447416c76492f41414141414141414774732f75655261416768584e76632f73313630302f73797374656d6261636b2d312e6a7067) +![systemback](http://2.bp.blogspot.com/-2UPS3yl3LHw/VlilgtGAlvI/AAAAAAAAGts/ueRaAghXNvc/s1600/systemback-1.jpg) -[![systemback](https://camo.githubusercontent.com/b6896bebb68f4f66d6e9b1cda32b074d0ff237ed/687474703a2f2f322e62702e626c6f6773706f742e636f6d2f2d37646a424c6247656e78452f566c696c676b2d465a48492f414141414141414147746b2f3250564e4b6c61504f2d632f73313630302f73797374656d6261636b2d322e6a7067)](https://camo.githubusercontent.com/b6896bebb68f4f66d6e9b1cda32b074d0ff237ed/687474703a2f2f322e62702e626c6f6773706f742e636f6d2f2d37646a424c6247656e78452f566c696c676b2d465a48492f414141414141414147746b2f3250564e4b6c61504f2d632f73313630302f73797374656d6261636b2d322e6a7067) +![systemback](http://2.bp.blogspot.com/-7djBLbGenxE/Vlilgk-FZHI/AAAAAAAAGtk/2PVNKlaPO-c/s1600/systemback-2.jpg) -[![](https://camo.githubusercontent.com/c7dab7c89b7379d4555042d66d3b1910c9dd983d/687474703a2f2f332e62702e626c6f6773706f742e636f6d2f2d62655a59774b727354346f2f566c696c677054687a69492f414141414141414147746f2f637773676858464e4752412f73313630302f73797374656d6261636b2d332e6a7067)](https://camo.githubusercontent.com/c7dab7c89b7379d4555042d66d3b1910c9dd983d/687474703a2f2f332e62702e626c6f6773706f742e636f6d2f2d62655a59774b727354346f2f566c696c677054687a69492f414141414141414147746f2f637773676858464e4752412f73313630302f73797374656d6261636b2d332e6a7067) +![](http://3.bp.blogspot.com/-beZYwKrsT4o/VlilgpThziI/AAAAAAAAGto/cwsghXFNGRA/s1600/systemback-3.jpg) -[![](https://camo.githubusercontent.com/469b19a9064ec937bb06fc25efbc02409521b314/687474703a2f2f312e62702e626c6f6773706f742e636f6d2f2d745f676d636f515a72764d2f566c696c684c502d2d54492f41414141414141414774302f47574267366247656561492f73313630302f73797374656d6261636b2d352e6a7067)](https://camo.githubusercontent.com/469b19a9064ec937bb06fc25efbc02409521b314/687474703a2f2f312e62702e626c6f6773706f742e636f6d2f2d745f676d636f515a72764d2f566c696c684c502d2d54492f41414141414141414774302f47574267366247656561492f73313630302f73797374656d6261636b2d352e6a7067) +![](http://1.bp.blogspot.com/-t_gmcoQZrvM/VlilhLP--TI/AAAAAAAAGt0/GWBg6bGeeaI/s1600/systemback-5.jpg) **注意**:使用系统还原不会还原你的文件,音乐,电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机上没有系统还原点,那么系统还原工具就不会奏效了。(最后一句没有太理解) @@ -26,3 +26,14 @@ sudo apt-get install systemback ``` 大功告成。 + +-------------------------------------------------------------------------------- + +via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html + +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://launchpad.net/systemback From a4d477d1cc09ba097c674ec834ea6c9102cdab80 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 14 Dec 2015 10:21:51 +0800 Subject: [PATCH 0566/1710] [translating]Learn with Linux--Learning Music --- .../Learn with Linux--Learning Music.md | 17 +-- .../Learn with Linux--Physics Simulation.md | 108 ------------------ .../Learn with Linux--Physics Simulation.md | 107 +++++++++++++++++ 3 files changed, 116 insertions(+), 116 deletions(-) delete mode 100644 sources/tech/Learn with Linux/Learn with Linux--Physics Simulation.md create mode 100644 translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.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 index e6467eb810..f9675d59ce 100644 --- a/sources/tech/Learn with Linux/Learn with Linux--Learning Music.md +++ b/sources/tech/Learn with Linux/Learn with Linux--Learning Music.md @@ -1,16 +1,17 @@ +bazz2 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: +[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 教学之掌握数学][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. +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 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. @@ -152,4 +153,4 @@ via: https://www.maketecheasier.com/linux-learning-music/ [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 +[13]:http://www.linuxlinks.com/article/20090517041840856/PianoBooster.html 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 deleted file mode 100644 index 7c210ff0c8..0000000000 --- a/sources/tech/Learn with Linux/Learn with Linux--Physics Simulation.md +++ /dev/null @@ -1,108 +0,0 @@ -[bazz222222] -Linux 学习系列之物理模拟 -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/07/physics-fetured.jpg) - -[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 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/ diff --git a/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md b/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md new file mode 100644 index 0000000000..273ff72d5a --- /dev/null +++ b/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md @@ -0,0 +1,107 @@ +Linux 教学之物理模拟 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/physics-fetured.jpg) + +[Linux 学习系列][1]的所有文章: + +- [Linux 教学之教你练打字][2] +- [Linux 教学之物理模拟][3] +- [Linux 教学之教你玩音乐][4] +- [Linux 教学之两款地理软件][5] +- [Linux 教学之掌握数学][6] + +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 + +物理是一个有趣的课题,证据就是任何物理课程都可以用具体的图片演示给你看。能看到物理变化过程是一个很妙的体验,特别是你不需要到教室就能体验到。Linux 上有很多很好的科学软件来为你提供这种美妙感觉,本篇文章只着重介绍其中几种。 + +### 1. Step ### + +[Step][7] 是一个交互型物理模拟器,KDEEdu[8](KDE 教育)项目的一部分。没人会比它的作者更了解它的作用。在项目官网主页上写着“[Step] 是这样玩的:你放点东西进来,添加一些力(地心引力或者弹簧),然后点击‘模拟’按钮,这款软件就会为你模拟这个物体在真实世界的物理定律影响下的运动状态。你可以改变物体或力的属性(允许在模拟过程中进行修改),然后观察不同属性下产生的现象。Step 可以让你从体验中学习物理!” + +Step 依赖 Qt 以及其他一些 KDE 所依赖的软件,正是由于像 KDEEdu 之类的项目存在,才使得 KDE 变得如此强大,当然,你可能需要忍受由此带来的庞大的桌面系统。 + +Debian 的源中包含了 step 软件,终端下运行以下命令安装: + + sudo apt-get install step + +在 KDE 环境下,它只需要很少的依赖,几秒钟就能安装完成。 + +Step 有个简单的交互界面,你进去后直接可以进行模拟操作。 + +![physics-step-main](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-main.png) + +你会发现所有物品在屏幕左边,包括不同的质点,空气,不同形状的物体,弹簧,以及不同的力(见1区域) 。如果你选中一个物体,屏幕右边会出现简短的描述信息(见2区域),以及你创造的世界的介绍(主要介绍这个世界中包含的物体)(见3区域),以及你当前选中的物体的属性(见4区域),以及你的操作历史(见5区域)。 + +![physics-step-parts](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-parts.png) + +一旦你放好了所有物体,点击下“模拟”按钮,可以看到物体与物体之间的相互作用。 + +![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) + +想要更多了解 Step,按 F1 键,KDE 帮助中心会打印详细的软件操作手册。 + +### 2. Lightspeed ### + +Lightspeed 是一个简单的基于 GTK+ 和 OpenGL 的模拟器,可以模拟一个高速移动的物体被观测到的现象。这个模拟器的理论基础是爱因斯坦的狭义相对论,在 Lightspeed 的 [srouceforge 页面][9]上,他们这样介绍:当一个物体被加速到几千公里每秒,它就会表现得扭曲和褪色;当物体被不断加速到接近光速(299,792,458 m/s)时,这个现象会越来越明显,并且在不同方向观察这个物体的扭曲方式,会得到完全不一样的结果。 + +受到相对速度影响的现象如下(LCTT 译注:都可以从“光速不变”理论推导出来): + +- **洛伦兹收缩** —— 物体看起来变短了 +- **多普乐红移/蓝移** —— 物体的颜色变了 +- **前灯效应** —— 物体的明暗变化(LCTT 译注:当物体接近光速移动时,会在它前进的方向强烈地辐射光子,从这个角度看,物体会变得很亮,相反,从物体背后观察,会发现它很暗) +- **光行差效应** —— 物体扭曲变形了 + +Lightspeed 有 Debian 的源,执行下面的命令来安装: + + sudo apt-get install lightspeed + +用户界面非常简单,里边有一个物体(你可以从 sourceforge 下载更多形状的物体)沿着 x 轴运动(按下 A 键或在菜单栏 object 项目的 Animation 选项设置,物体就会开始运动)。 + +![physics-lightspeed](https://www.maketecheasier.com/assets/uploads/2015/08/physics-lightspeed.png) + +你可以滑动右边的滑动条来控制物体移动的速度。 + +![physics-lightspeed-deform](https://www.maketecheasier.com/assets/uploads/2015/08/physics-lightspeed-deform.png) + +其他一些简单的控制器可以让你获得更多的视觉效果。 + +![physics-lightspeed-visual](https://www.maketecheasier.com/assets/uploads/2015/08/physics-lightspeed-visual.png) + +点击界面并拖动鼠标可以改变物体视角,在 Camera 菜单下可以修改背景颜色或者物体的图形模式,以及其他效果。 + +### 特别推荐: Physion ### + +Physion 是个非常有趣并且美观的物理模拟软件,比上面介绍的两款软件都好玩好看。可惜在写本文章的时候它的[官网][10]出现问题了,下载页面无法使用。 + +从他们放在 Youtube 上的视频来看,Physion 还是值得我们下载下来玩玩的。在官网恢复之前,我们只能看看演示视频了。 + +注:youtube 视频 + + +你有其他 Linux 下的好玩的物理模拟、演示、教学软件吗?如果有,请在评论处分享给我们。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/linux-physics-simulation/ + +作者:[Attila Orosz][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者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/ From 65db061b2e7dbb4551a95e573849aced2548024c Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 14 Dec 2015 15:32:30 +0800 Subject: [PATCH 0567/1710] Finish the translation by ZTinoZ --- .../20151123 7 ways hackers can use Wi-Fi against you.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {sources => translated}/share/20151123 7 ways hackers can use Wi-Fi against you.md (79%) diff --git a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md similarity index 79% rename from sources/share/20151123 7 ways hackers can use Wi-Fi against you.md rename to translated/share/20151123 7 ways hackers can use Wi-Fi against you.md index 2d42ba2e33..623886b896 100644 --- a/sources/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -16,7 +16,7 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F ### 网上银行 ### -你可能认为没有人需要自己被提醒不要使用免费Wi-Fi来操作网上银行, 但网络安全厂商卡巴斯基实验室表示[全球超过100家银行因为网络黑客而损失9亿美元][2],由此可见还是有很多人因此受害。If you want to use the free Wi-Fi in a coffee shop because you’re confident it will be legitimate, confirm the exact network name with the barista. It’s pretty easy for [someone else in the shop with a router to set up an open connection][3] with a name that seems like it would be the name of the shop’s Wi-Fi. +你可能认为没有人需要自己被提醒不要使用免费Wi-Fi来操作网上银行, 但网络安全厂商卡巴斯基实验室表示[全球超过100家银行因为网络黑客而损失9亿美元][2],由此可见还是有很多人因此受害。如果你真的想要在一家咖吧里使用免费真实的Wi-Fi,那么你应该向服务员确认网络名称。[在店里用路由器设置一个开放的无线连接][3]并将它的网络名称设置成店名是一件相当简单的事。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/3_keeping-wifi-on-100626676-orig.jpg) @@ -34,13 +34,13 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F ### 浏览非加密网页 ### -Sad to say, [55% of the Web’s top 1 million sites don’t offer encryption][5]. An unencrypted website allows all data transmissions to be viewed by the prying eyes of hackers. Your browser will indicate when a site is secure (you’ll see a gray padlock with Mozilla Firefox, for example, and a green lock icon with Chrome). But even a secure website can’t protect you from sidejackers, who can steal the cookies from a website you visited, whether it’s a valid site or not, through a public network. +说起来很难过,[世界上排名前100万个网站中55%是不加密的][5],一个未加密的网站则会让传输的数据暴露在黑客的眼下。如果一个网页是安全的,你的浏览器则会有标明(比如说火狐浏览器是一把绿色的挂锁、Chrome蓝旗则是个绿色的图标)。但是一个安全的网站不能让你免于被劫持的风险,它能通过公共网络从你访问过的网站上窃取cookies,无论是不是正当网站与否。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/6_updating-security-software-100626679-orig.jpg) ### 不更新你的安全防护软件 ### -If you want to ensure that your own network is well protected, upgrade the firmware of your router. All you have to do is go to your router’s administration page to check. Normally, you can download the newest firmware right from the manufacturer’s site. +如果你想要确保你自己的网络是受保护的,就更新的路由器固件。你要做的就是进入你的路由器管理页面去检查,通常你能在厂商的官方网页上下载到最新的固件版本。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/7_securing-home-wifi-100626680-orig.jpg) From 28a42e035107a9f7f437198b2b696b4f3031d4b1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 14 Dec 2015 16:38:58 +0800 Subject: [PATCH 0568/1710] =?UTF-8?q?20151214-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...p Fun--Christmas Tree For Your Terminal.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md diff --git a/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md b/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md new file mode 100644 index 0000000000..81c6844eba --- /dev/null +++ b/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md @@ -0,0 +1,83 @@ +Linux / Unix Desktop Fun: Christmas Tree For Your Terminal +================================================================================ +Let us create Linux or Unix console Christmas tree just for fun and profit. First, you need to install a Perl module called Acme::POE::Tree. It is an animated Christmas tree module. I've tested this on Linux, OS X and Unix-like system. + +### Install Acme::POE::Tree ### + +The easiest way to install any perl module is to use the cpan (Comprehensive Perl Archive Network). Open the terminal application and type the following command to install Acme::POE::Tree: + + ## run as root ## + perl -MCPAN -e 'install Acme::POE::Tree' + +**Sample outputs:** + + Installing /home/vivek/perl5/man/man3/POE::NFA.3pm + Installing /home/vivek/perl5/man/man3/POE::Kernel.3pm + Installing /home/vivek/perl5/man/man3/POE::Loop.3pm + Installing /home/vivek/perl5/man/man3/POE::Resource.3pm + Installing /home/vivek/perl5/man/man3/POE::Filter::Map.3pm + Installing /home/vivek/perl5/man/man3/POE::Resource::SIDs.3pm + Installing /home/vivek/perl5/man/man3/POE::Loop::IO_Poll.3pm + Installing /home/vivek/perl5/man/man3/POE::Pipe::TwoWay.3pm + Appending installation info to /home/vivek/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod + RCAPUTO/POE-1.367.tar.gz + /usr/bin/make install -- OK + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + Has already been unwrapped into directory /home/vivek/.cpan/build/Acme-POE-Tree-1.022-uhlZUz + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + Has already been prepared + Running make for R/RC/RCAPUTO/Acme-POE-Tree-1.022.tar.gz + cp lib/Acme/POE/Tree.pm blib/lib/Acme/POE/Tree.pm + Manifying 1 pod document + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + /usr/bin/make -- OK + Running make test + PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t + t/01_basic.t .. ok + All tests successful. + Files=1, Tests=2, 6 wallclock secs ( 0.09 usr 0.03 sys + 0.53 cusr 0.06 csys = 0.71 CPU) + Result: PASS + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + Tests succeeded but one dependency not OK (Curses) + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + [dependencies] -- NA + +### Show Christmas tree in the shell ### + +Simply type the following command: + + perl -MAcme::POE::Tree -e 'Acme::POE::Tree->new()->run()' + +**Sample outputs:** + +![Gif 01: An animated christmas tree in Perl](http://s0.cyberciti.org/uploads/cms/2015/12/perl-tree.gif) + +Gif 01: An animated christmas tree in Perl + +### Tree customization ### + +Here is my tree.pl: + + #!/usr/bin/perl + + use Acme::POE::Tree; + my $tree = Acme::POE::Tree->new( + { + star_delay => 1.5, # shimmer star every 1.5 sec + light_delay => 2, # twinkle lights every 2 sec + run_for => 10, # automatically exit after 10 sec + } + ); + $tree->run(); + +Now can play with your tree modifying star_delay, run_for, and light_delay. And ,there you have it a a Christmas tree in your shell for fun. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/open-source/command-line-hacks/linux-unix-desktop-fun-christmas-tree-for-your-terminal/ + +作者: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 4b9704526b2fcccdc6ddf3ddfdb4432876836760 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Mon, 14 Dec 2015 20:51:06 +0800 Subject: [PATCH 0569/1710] translating --- ...ux or Unix Desktop Fun--Christmas Tree For Your Terminal.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md b/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md index 81c6844eba..e535fc0146 100644 --- a/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md +++ b/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md @@ -1,3 +1,4 @@ +sg translating Linux / Unix Desktop Fun: Christmas Tree For Your Terminal ================================================================================ Let us create Linux or Unix console Christmas tree just for fun and profit. First, you need to install a Perl module called Acme::POE::Tree. It is an animated Christmas tree module. I've tested this on Linux, OS X and Unix-like system. @@ -80,4 +81,4 @@ via: http://www.cyberciti.biz/open-source/command-line-hacks/linux-unix-desktop- 译者:[译者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 9b2dafd154dabfac60790e5caf1b4844cbdfef0f Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Mon, 14 Dec 2015 22:16:17 +0800 Subject: [PATCH 0570/1710] Translating --- ... send email notifications using Gmail SMTP server on Linux.md | 1 + 1 file changed, 1 insertion(+) 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 index 5ffcb5aea8..22e8606c6c 100644 --- 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 @@ -1,3 +1,4 @@ +Translating by KnightJoker 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. From df3cab4065bd66b8383ee364021ced9f9c81ddab Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Mon, 14 Dec 2015 22:28:12 +0800 Subject: [PATCH 0571/1710] Create 20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md --- ...p Fun--Christmas Tree For Your Terminal.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md diff --git a/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md b/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md new file mode 100644 index 0000000000..dbbab5ef8c --- /dev/null +++ b/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md @@ -0,0 +1,84 @@ +Linux / Unix桌面之趣:终端上的圣诞树 +================================================================================ +给你的Linux或Unix控制台创造一棵圣诞树玩玩吧。在此之前,需要先安装一个Perl模块,命名为Acme::POE::Tree。这是一棵很喜庆的圣诞树,我已经在Linux、OSX和类Unix系统上验证过了。 + + +### 安装 Acme::POE::Tree ### + +安装perl模块最简单的办法就是使用cpan(Perl综合典藏网)。打开终端,把下面的指令敲进去便可安装Acme::POE::Tree。 + + ## 以root身份运行 ## + perl -MCPAN -e 'install Acme::POE::Tree' + +**案例输出:** + + Installing /home/vivek/perl5/man/man3/POE::NFA.3pm + Installing /home/vivek/perl5/man/man3/POE::Kernel.3pm + Installing /home/vivek/perl5/man/man3/POE::Loop.3pm + Installing /home/vivek/perl5/man/man3/POE::Resource.3pm + Installing /home/vivek/perl5/man/man3/POE::Filter::Map.3pm + Installing /home/vivek/perl5/man/man3/POE::Resource::SIDs.3pm + Installing /home/vivek/perl5/man/man3/POE::Loop::IO_Poll.3pm + Installing /home/vivek/perl5/man/man3/POE::Pipe::TwoWay.3pm + Appending installation info to /home/vivek/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod + RCAPUTO/POE-1.367.tar.gz + /usr/bin/make install -- OK + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + Has already been unwrapped into directory /home/vivek/.cpan/build/Acme-POE-Tree-1.022-uhlZUz + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + Has already been prepared + Running make for R/RC/RCAPUTO/Acme-POE-Tree-1.022.tar.gz + cp lib/Acme/POE/Tree.pm blib/lib/Acme/POE/Tree.pm + Manifying 1 pod document + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + /usr/bin/make -- OK + Running make test + PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t + t/01_basic.t .. ok + All tests successful. + Files=1, Tests=2, 6 wallclock secs ( 0.09 usr 0.03 sys + 0.53 cusr 0.06 csys = 0.71 CPU) + Result: PASS + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + Tests succeeded but one dependency not OK (Curses) + RCAPUTO/Acme-POE-Tree-1.022.tar.gz + [dependencies] -- NA + +### 在Shell中显示圣诞树 ### + +只需要在终端上运行以下命令: + + perl -MAcme::POE::Tree -e 'Acme::POE::Tree->new()->run()' + +**案例输出** + +![Gif 01: An animated christmas tree in Perl](http://s0.cyberciti.org/uploads/cms/2015/12/perl-tree.gif) + +Gif 01: 一棵用Perl写的喜庆圣诞树 + +### 树的定制 ### + +以下是我的脚本文件tree.pl的内容: + + #!/usr/bin/perl + + use Acme::POE::Tree; + my $tree = Acme::POE::Tree->new( + { + star_delay => 1.5, # shimmer star every 1.5 sec + light_delay => 2, # twinkle lights every 2 sec + run_for => 10, # automatically exit after 10 sec + } + ); + $tree->run(); + +这样就可以通过修改star_delay、run_for和light_delay参数的值来自定义你的树了。一棵提供消遣的终端圣诞树就此诞生。 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/open-source/command-line-hacks/linux-unix-desktop-fun-christmas-tree-for-your-terminal/ + +作者:Vivek Gite +译者:[soooogreen](https://github.com/soooogreen) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ae1efdade6c909ab779065f4ef7a80f05787c879 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Mon, 14 Dec 2015 22:31:27 +0800 Subject: [PATCH 0572/1710] Delete 20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md --- ...p Fun--Christmas Tree For Your Terminal.md | 84 ------------------- 1 file changed, 84 deletions(-) delete mode 100644 sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md diff --git a/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md b/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md deleted file mode 100644 index e535fc0146..0000000000 --- a/sources/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md +++ /dev/null @@ -1,84 +0,0 @@ -sg translating -Linux / Unix Desktop Fun: Christmas Tree For Your Terminal -================================================================================ -Let us create Linux or Unix console Christmas tree just for fun and profit. First, you need to install a Perl module called Acme::POE::Tree. It is an animated Christmas tree module. I've tested this on Linux, OS X and Unix-like system. - -### Install Acme::POE::Tree ### - -The easiest way to install any perl module is to use the cpan (Comprehensive Perl Archive Network). Open the terminal application and type the following command to install Acme::POE::Tree: - - ## run as root ## - perl -MCPAN -e 'install Acme::POE::Tree' - -**Sample outputs:** - - Installing /home/vivek/perl5/man/man3/POE::NFA.3pm - Installing /home/vivek/perl5/man/man3/POE::Kernel.3pm - Installing /home/vivek/perl5/man/man3/POE::Loop.3pm - Installing /home/vivek/perl5/man/man3/POE::Resource.3pm - Installing /home/vivek/perl5/man/man3/POE::Filter::Map.3pm - Installing /home/vivek/perl5/man/man3/POE::Resource::SIDs.3pm - Installing /home/vivek/perl5/man/man3/POE::Loop::IO_Poll.3pm - Installing /home/vivek/perl5/man/man3/POE::Pipe::TwoWay.3pm - Appending installation info to /home/vivek/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod - RCAPUTO/POE-1.367.tar.gz - /usr/bin/make install -- OK - RCAPUTO/Acme-POE-Tree-1.022.tar.gz - Has already been unwrapped into directory /home/vivek/.cpan/build/Acme-POE-Tree-1.022-uhlZUz - RCAPUTO/Acme-POE-Tree-1.022.tar.gz - Has already been prepared - Running make for R/RC/RCAPUTO/Acme-POE-Tree-1.022.tar.gz - cp lib/Acme/POE/Tree.pm blib/lib/Acme/POE/Tree.pm - Manifying 1 pod document - RCAPUTO/Acme-POE-Tree-1.022.tar.gz - /usr/bin/make -- OK - Running make test - PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t - t/01_basic.t .. ok - All tests successful. - Files=1, Tests=2, 6 wallclock secs ( 0.09 usr 0.03 sys + 0.53 cusr 0.06 csys = 0.71 CPU) - Result: PASS - RCAPUTO/Acme-POE-Tree-1.022.tar.gz - Tests succeeded but one dependency not OK (Curses) - RCAPUTO/Acme-POE-Tree-1.022.tar.gz - [dependencies] -- NA - -### Show Christmas tree in the shell ### - -Simply type the following command: - - perl -MAcme::POE::Tree -e 'Acme::POE::Tree->new()->run()' - -**Sample outputs:** - -![Gif 01: An animated christmas tree in Perl](http://s0.cyberciti.org/uploads/cms/2015/12/perl-tree.gif) - -Gif 01: An animated christmas tree in Perl - -### Tree customization ### - -Here is my tree.pl: - - #!/usr/bin/perl - - use Acme::POE::Tree; - my $tree = Acme::POE::Tree->new( - { - star_delay => 1.5, # shimmer star every 1.5 sec - light_delay => 2, # twinkle lights every 2 sec - run_for => 10, # automatically exit after 10 sec - } - ); - $tree->run(); - -Now can play with your tree modifying star_delay, run_for, and light_delay. And ,there you have it a a Christmas tree in your shell for fun. - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/open-source/command-line-hacks/linux-unix-desktop-fun-christmas-tree-for-your-terminal/ - -作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7ffb172ac5d39ccdc021d22aa897c84f31a52219 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 15 Dec 2015 10:09:11 +0800 Subject: [PATCH 0573/1710] Translating by ZTinoZ --- ... to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index ab2ea88946..2b543d3444 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ How to Install Bugzilla with Apache and SSL on FreeBSD 10.2 ================================================================================ Bugzilla is open source web base application for bug tracker and testing tool, develop by mozilla project, and licensed under Mozilla Public License. It is used by high tech company like mozilla, redhat and gnome. Bugzilla was originally created by Terry Weissman in 1998. It written in perl, use MySQL as the database back-end. It is a server software designed to help you manage software development. Bugzilla has a lot of features, optimized database, excellent security, advanced search tool, integrated with email capabilities etc. @@ -264,4 +265,4 @@ via: http://linoxide.com/tools/install-bugzilla-apache-ssl-freebsd-10-2/ 本文由 [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 5eaaf8fb449e3bb7749d2bd5784b8ef1ee598b4c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 15 Dec 2015 10:46:54 +0800 Subject: [PATCH 0574/1710] =?UTF-8?q?20151215-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Of Penguins To Waddle About The Desktop.md | 100 +++++++++ ...esktop Fun--Let it Snow On Your Desktop.md | 75 +++++++ ...x or UNIX Desktop Fun--Steam Locomotive.md | 39 ++++ ...IX Desktop Fun--Terminal ASCII Aquarium.md | 64 ++++++ ...at And Mouse Chase All Over Your Screen.md | 89 ++++++++ ... Mode ASCII-art Box and Comment Drawing.md | 201 ++++++++++++++++++ 6 files changed, 568 insertions(+) create mode 100644 sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md create mode 100644 sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md create mode 100644 sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md create mode 100644 sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md create mode 100644 sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md create mode 100644 sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md diff --git a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md new file mode 100644 index 0000000000..3d9b1a2770 --- /dev/null +++ b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md @@ -0,0 +1,100 @@ +Linux Desktop Fun: Summon Swarms Of Penguins To Waddle About The Desktop +================================================================================ +XPenguins is a program for animating cute cartoons animals in your root window. By default it will be penguins they drop in from the top of the screen, walk along the tops of your windows, up the side of your windows, levitate, skateboard, and do other similarly exciting things. Now you can send an army of cute little penguins to invade the screen of someone else on your network. + +### Install XPenguins ### + +Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following commands to install XPenguins program. First, type the command apt-get update to tell apt to refresh its package information by querying the configured repositories and then install the required program: + + $ sudo apt-get update + $ sudo apt-get install xpenguins + +### How do I Start XPenguins Locally? ### + +Type the following command: + + $ xpenguins + +Sample outputs: + +![An army of cute little penguins invading the screen](http://files.cyberciti.biz/uploads/tips/2011/07/Workspace-1_002_12_07_2011.png) + +An army of cute little penguins invading the screen + +![Linux: Cute little penguins walking along the tops of your windows](http://files.cyberciti.biz/uploads/tips/2011/07/Workspace-1_001_12_07_2011.png) + +Linux: Cute little penguins walking along the tops of your windows + +![Xpenguins Screenshot](http://files.cyberciti.biz/uploads/tips/2011/07/xpenguins-screenshot.jpg) + +Xpenguins Screenshot + +Be careful when you move windows as the little guys squash easily. If you send the program an interupt signal (Ctrl-C) they will burst. + +### Themes ### + +To list themes, enter: + + $ xpenguins -l + +Sample outputs: + + Big Penguins + Bill + Classic Penguins + Penguins + Turtles + +You can use alternative themes as follows: + + $ xpenguins --theme "Big Penguins" --theme "Turtles" + +You can install additional themes as follows: + + $ cd /tmp + $ wget http://xpenguins.seul.org/xpenguins_themes-1.0.tar.gz + $ tar -zxvf xpenguins_themes-1.0.tar.gz + $ mkdir ~/.xpenguins + $ mv -v themes ~/.xpenguins/ + $ xpenguins -l + +Sample outputs: + + Lemmings + Sonic the Hedgehog + The Simpsons + Winnie the Pooh + Worms + Big Penguins + Bill + Classic Penguins + Penguins + Turtles + +To start with a random theme, enter: + + $ xpenguins --random-theme + +To load all available themes and run them simultaneously, enter: + + $ xpenguins --all + +More links and information: + +- [XPenguins][1] home page. +- man penguins +- More Linux / UNIX desktop fun with [Steam Locomotive][2] and [Terminal ASCII Aquarium][3]. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/tips/linux-cute-little-xpenguins-walk-along-tops-ofyour-windows.html + +作者:Vivek Gite +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://xpenguins.seul.org/ +[2]:http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html +[3]:http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium.html \ No newline at end of file diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md new file mode 100644 index 0000000000..9e96043927 --- /dev/null +++ b/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md @@ -0,0 +1,75 @@ +Linux / UNIX Desktop Fun: Let it Snow On Your Desktop +================================================================================ +Feeling lonely this holiday season? Try Xsnow. This little app will let it snow on the Unix / Linux desktop. Santa and his reindeer will complete your festive season feeling with moving snowflakes on your desktop, with Santa Claus running all over the screen. + +I first installed this 13 or 14 years ago. It was was originally created for Macintosh systems in 1984. You can install it as follows: + +### Install xsnow ### + +Debian / Ubuntu / Mint users type the following command: + + $ sudo apt-get install xsnow + +Freebsd users type the following command to install the same: + + # cd /usr/ports/x11/xsnow/ + # make install clean + +OR, try to add the package: + + # pkg_add -r xsnow + +#### A Note About Other Distros #### + +1. Fedora / RHEL / CentOS Linux desktop users may find the package using [rpmfusion][1] repo. +1. Gentoo user try Gentoo portage i.e. [emerge -p xsnow][2] +1. OpenSuse Linux user try Yast and search for xsnow. + +### How Do I Use xsnow? ### + +Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following to starts xsnow: + + $ xsnow + +Sample outputs: + +![Fig.01: Snow for your Linux and Unix desktop systems](http://files.cyberciti.biz/uploads/tips/2011/12/application-to-bring-snow-to-desktop_small.png) + +Fig.01: Snow for your Linux and Unix desktop systems + +You can set the background to a blue color and lets it snow white, type: + + $ xsnow -bg blue -sc snow + +To set the maximum number of snowflakes and runs as fast as possible, type: + + $ xsnow -snowflakes 10000 -delay 0 + +Do not display the trees and Santa Claus running all over the screen, enter: + + $ xsnow -notrees -nosanta + +For more information about xsnow and other options, please see the manual page by typing man xsnow from the command line: + + $ man xsnow + +Recommended readings: + +- [Download Xsnow][1] from the official site. +- Please note that [MS-Windows][2] and [Mac OS X version][3] attracts one time shareware fee. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/tips/linux-unix-xsnow.html + +作者:Vivek Gite +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://rpmfusion.org/Configuration +[2]:http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 +[3]:http://dropmix.xs4all.nl/rick/Xsnow/ +[4]:http://dropmix.xs4all.nl/rick/WinSnow/ +[5]:http://dropmix.xs4all.nl/rick/MacOSXSnow/ \ No newline at end of file diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md new file mode 100644 index 0000000000..7a7f975e04 --- /dev/null +++ b/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md @@ -0,0 +1,39 @@ +Linux / UNIX Desktop Fun: Steam Locomotive +================================================================================ +One of the most [common mistake][1] is typing sl instead of ls command. I actually set [an alias][2] i.e. alias sl=ls; but then you may miss out the steam train with whistle. + +sl is a joke software or classic UNIX game. It is a steam locomotive runs across your screen if you type "sl" (Steam Locomotive) instead of "ls" by mistake. + +### Install sl ### + +Type the following command under Debian / Ubuntu Linux, enter: + + # apt-get install sl + +It is also available on FreeBSD and other UNIX like operating systems. Next, mistyped ls command as sl: + + $ sl + +![Fig.01: Run steam locomotive across the screen if you type "sl" instead of "ls"](http://files.cyberciti.biz/uploads/tips/2011/05/sl_command_steam_locomotive.png) + +Fig.01: Run steam locomotive across the screen if you type "sl" instead of "ls" + +It also supports the following options: + +- **-a** : An accident seems to happen. You'll feel pity for people who cry for help. +- **-l** : shows little one. +- **-F** : It flies. +- **-e** : Allow interrupt by Ctrl+C. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html + +作者: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/my-10-unix-command-line-mistakes.html +[2]:http://bash.cyberciti.biz/guide/Create_and_use_aliases \ No newline at end of file diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md new file mode 100644 index 0000000000..407f5c07a0 --- /dev/null +++ b/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md @@ -0,0 +1,64 @@ +Linux / UNIX Desktop Fun: Terminal ASCII Aquarium +================================================================================ +You can now enjoy mysteries of the sea from the safety of your own terminal using ASCIIQuarium. It is an aquarium/sea animation in ASCII art created using perl. + +### Install Term::Animation ### + +First, you need to install Perl module called Term-Animation. Open a command-line terminal (select Applications > Accessories > Terminal), and then type: + + $ sudo apt-get install libcurses-perl + $ cd /tmp + $ 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 + +### Download and Install ASCIIQuarium ### + +While still at bash prompt, type: + + $ cd /tmp + $ wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz + $ tar -zxvf asciiquarium.tar.gz + $ cd asciiquarium_1.0/ + $ sudo cp asciiquarium /usr/local/bin + $ sudo chmod 0755 /usr/local/bin/asciiquarium + +### How do I view my ASCII Aquarium? ### + +Simply type the following command: + + $ /usr/local/bin/asciiquarium + +OR + + $ perl /usr/local/bin/asciiquarium + +![Fig.01: ASCII Aquarium](http://s0.cyberciti.org/uploads/tips/2011/01/screenshot-ASCIIQuarium.png) + +### Related media ### + +注:youtube 视频 + + +[Video 01: ASCIIQuarium - Sea Animation on Linux / Unix Desktop][1] + +### Download: erminal ASCII Aquarium KDE and Mac OS X Version ### + +[Download asciiquarium][2]. If you're running Mac OS X, try a packaged [version][3] that will run out of the box. For KDE users, try a [KDE Screensaver][4] based on the Asciiquarium. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium.html + +作者:Vivek Gite +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://youtu.be/MzatWgu67ok +[2]:http://www.robobunny.com/projects/asciiquarium/html/ +[3]:http://habilis.net/macasciiquarium/ +[4]:http://kde-look.org/content/show.php?content=29207 \ No newline at end of file diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md b/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md new file mode 100644 index 0000000000..9056f8162f --- /dev/null +++ b/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md @@ -0,0 +1,89 @@ +Linux / Unix Desktop Fun: Cat And Mouse Chase All Over Your Screen +================================================================================ +Oneko is a little fun app. It will change your cursor into mouse and creates a little cute cat and the cat start chasing around your mouse cursor. The word "neko" means "cat" in Japanese and it was originally written by a Japanese author as a Macintosh desktop accessory. + +### Install oneko ### + +Type the following command: + + $ sudo apt-get install oneko + +Sample outputs: + + [sudo] password for vivek: + Reading package lists... Done + Building dependency tree + Reading state information... Done + The following NEW packages will be installed: + oneko + 0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded. + Need to get 38.6 kB of archives. + After this operation, 168 kB of additional disk space will be used. + Get:1 http://debian.osuosl.org/debian/ squeeze/main oneko amd64 1.2.sakura.6-7 [38.6 kB] + Fetched 38.6 kB in 1s (25.9 kB/s) + Selecting previously deselected package oneko. + (Reading database ... 274152 files and directories currently installed.) + Unpacking oneko (from .../oneko_1.2.sakura.6-7_amd64.deb) ... + Processing triggers for menu ... + Processing triggers for man-db ... + Setting up oneko (1.2.sakura.6-7) ... + Processing triggers for menu ... + +FreeBSD unix user type the following command to install oneko: + + # cd /usr/ports/games/oneko + # make install clean + +### How do I use oneko? ### + +Simply type the following command: + + $ oneko + +You can make cat into "tora-neko", a cat wite tiger-like stripe: + + $ oneko -tora + +### Not a cat person? ### + +You can run a dog instead of a cat: + + $ oneko -dog + +The followin will runs Sakura Kinomoto instead of a cat: + + $ oneko -sakura + +Runs Tomoyo Daidouji instead of a cat: + + $ oneko -tomoyo + +### Check out related media ### + +This tutorial also available in video format: + +注:youtube 视频 + + +(Video.01: Demo - Install and use oneko under Linux) + +### Other options ### + +You can pass the following options: + +1. **-tofocus** : Makes cat run to and on top of focus window. When focus window is not in sight, cat chases mouse as usually. +1. **-position geometry** : Specify X and Y offsets in pixels to adjust position of cat relative to mouse pointer./li> +1. **-rv** : Reverse background color and foreground color. +1. **-fg color** : Foreground color (e.g., oneko -dog -fg red). +1. **-bg color** : Background color (e.g., oneko -dog -bg green). +1. See oneko man page for more information. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/open-source/oneko-app-creates-cute-cat-chasing-around-your-mouse/ + +作者: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 diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md new file mode 100644 index 0000000000..db254d3858 --- /dev/null +++ b/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md @@ -0,0 +1,201 @@ +Linux / Unix Desktop Fun: Text Mode ASCII-art Box and Comment Drawing +================================================================================ +Boxes command is a text filter and a little known tool that can draw any kind of ASCII art box around its input text or code for fun and profit. You can quickly create email signatures, or create regional comments in any programming language. This command was intended to be used with the vim text editor, but can be tied to any text editor which supports filters, as well as from the command line as a standalone tool. + +### Task: Install boxes ### + +Use the [apt-get command][1] to install boxes under Debian / Ubuntu Linux: + + $ sudo apt-get install boxes + +Sample outputs: + + Reading package lists... Done + Building dependency tree + Reading state information... Done + The following NEW packages will be installed: + boxes + 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. + Need to get 0 B/59.8 kB of archives. + After this operation, 205 kB of additional disk space will be used. + Selecting previously deselected package boxes. + (Reading database ... 224284 files and directories currently installed.) + Unpacking boxes (from .../boxes_1.0.1a-2.3_amd64.deb) ... + Processing triggers for man-db ... + Setting up boxes (1.0.1a-2.3) ... + +RHEL / CentOS / Fedora Linux users, use the [yum command to install boxes][2] (first [enable EPEL repo as described here][3]): + + # yum install boxes + +Sample outputs: + + Loaded plugins: rhnplugin + Setting up Install Process + Resolving Dependencies + There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. + --> Running transaction check + ---> Package boxes.x86_64 0:1.1-8.el6 will be installed + --> Finished Dependency Resolution + Dependencies Resolved + ========================================================================== + Package Arch Version Repository Size + ========================================================================== + Installing: + boxes x86_64 1.1-8.el6 epel 64 k + Transaction Summary + ========================================================================== + Install 1 Package(s) + Total download size: 64 k + Installed size: 151 k + Is this ok [y/N]: y + Downloading Packages: + boxes-1.1-8.el6.x86_64.rpm | 64 kB 00:00 + Running rpm_check_debug + Running Transaction Test + Transaction Test Succeeded + Running Transaction + Installing : boxes-1.1-8.el6.x86_64 1/1 + Installed: + boxes.x86_64 0:1.1-8.el6 + Complete! + +FreeBSD user can use the port as follows: + + cd /usr/ports/misc/boxes/ && make install clean + +Or, add the package using the pkg_add command: + + # pkg_add -r boxes + +### Draw any kind of box around some given text ### + +Type the following command: + + echo "This is a test" | boxes + +Or specify the name of the design to use: + + echo -e "\n\tVivek Gite\n\tvivek@nixcraft.com\n\twww.cyberciti.biz" | boxes -d dog + +Sample outputs: + +![Unix / Linux: Boxes Command To Draw Various Designs](http://s0.cyberciti.org/uploads/l/tips/2012/06/unix-linux-boxes-draw-dog-design.png) + +Fig.01: Unix / Linux: Boxes Command To Draw Various Designs + +#### How do I list all designs? #### + +The syntax is: + + boxes option + pipe | boxes options + echo "text" | boxes -d foo + boxes -l + +The -d design option sets the name of the design to use. The syntax is: + + echo "Text" | boxes -d design + pipe | boxes -d desig + +The -l option list designs. It produces a listing of all available box designs in the config file, along with a sample box and information about it's creator: + + boxes -l + boxes -l | more + boxes -l | less + +Sample outputs: + + 43 Available Styles in "/etc/boxes/boxes-config": + ------------------------------------------------- + ada-box (Neil Bird ): + --------------- + -- -- + -- -- + --------------- + ada-cmt (Neil Bird ): + -- + -- regular Ada + -- comments + -- + boy (Joan G. Stark ): + .-"""-. + / .===. \ + \/ 6 6 \/ + ( \___/ ) + _________ooo__\_____/______________ + / \ + | joan stark spunk1111@juno.com | + | VISIT MY ASCII ART GALLERY: | + | http://www.geocities.com/SoHo/7373/ | + \_______________________ooo_________/ jgs + | | | + |_ | _| + | | | + |__|__| + /-'Y'-\ + (__/ \__) + .... + ... + output truncated + .. + +### How do I filter text via boxes while using vi/vim text editor? ### + +You can use any external command with vi or vim. In this example, [insert current date and time][4], enter: + + !!date + +OR + + :r !date + +You need to type above command in Vim to read the output from the date command. This will insert the date and time after the current line: + + Tue Jun 12 00:05:38 IST 2012 + +You can do the same with boxes command. Create a sample shell script or a c program as follows: + + #!/bin/bash + Purpose: Backup mysql database to remote server. + Author: Vivek Gite + Last updated on: Tue Jun, 12 2012 + +Now type the following (move cursor to the second line i.e. line which starts with "Purpose: ...") + + 3!!boxes + +And voila you will get the output as follows: + + #!/bin/bash + /****************************************************/ + /* Purpose: Backup mysql database to remote server. */ + /* Author: Vivek Gite */ + /* Last updated on: Tue Jun, 12 2012 */ + /****************************************************/ + +This video will give you an introduction to boxes command: + +注:youtube 视频 + + +(Video:01: boxes command in action. BTW, this is my first video so go easy on me and let me know what you think.) + +See also + +- boxes man page + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text-editor.html + +作者: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://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/ +[3]:http://www.cyberciti.biz/faq/fedora-sl-centos-redhat6-enable-epel-repo/ +[4]:http://www.cyberciti.biz/faq/vim-inserting-current-date-time-under-linux-unix-osx/ \ No newline at end of file From e219db3ee1b4642e1eef387cd7b759acbbe2f5fe Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 15 Dec 2015 11:48:11 +0800 Subject: [PATCH 0575/1710] Translating by ZTinoZ --- ...lla with Apache and SSL on FreeBSD 10.2.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index 2b543d3444..e3c14d4a92 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -1,16 +1,15 @@ -Translating by ZTinoZ -How to Install Bugzilla with Apache and SSL on FreeBSD 10.2 +如何在FreeBSD 10.2上配置Apache和SSL并安装Bugzilla ================================================================================ Bugzilla is open source web base application for bug tracker and testing tool, develop by mozilla project, and licensed under Mozilla Public License. It is used by high tech company like mozilla, redhat and gnome. Bugzilla was originally created by Terry Weissman in 1998. It written in perl, use MySQL as the database back-end. It is a server software designed to help you manage software development. Bugzilla has a lot of features, optimized database, excellent security, advanced search tool, integrated with email capabilities etc. -In this tutorial we will install bugzilla 5.0 with apache for the web server, and enable SSL for it. Then install mysql51 as the database system on freebsd 10.2. +在本教程中,我们将给web服务器安装bugzilla 5.0的apache并为它启用SSL,然后在freebsd 10.2上安装mysql51来作为数据库系统。 -#### Prerequisite #### +#### 准备 #### FreeBSD 10.2 - 64bit. Root privileges. -### Step 1 - Update System ### +### 第一步 - 更新系统 ### Log in to the freebsd server with ssl login, and update the repository database : @@ -18,7 +17,7 @@ Log in to the freebsd server with ssl login, and update the repository database freebsd-update fetch freebsd-update install -### Step 2 - Install and Configure Apache ### +### 第二步 - 安装并配置Apache ### In this step we will install apache from the freebsd repositories with pkg command. Then configure apache by editing file "httpd.conf" on apache24 directory, configure apache to use SSL, and CGI support. @@ -76,7 +75,7 @@ And before start apache, add it to start at boot time with sysrc command : sysrc apache24_enable=yes service apache24 start -### Step 3 - Install and Configure MySQL Database ### +### 第三步 - 安装并配置MySQL数据库 ### We will use mysql51 for the database back-end, and it is support for perl module for mysql. Install mysql51 with pkg command below : @@ -129,7 +128,7 @@ Next, generate the certificate file with openssl command, then change the permis sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt chmod 600 * -### Step 5 - Configure Virtualhost ### +### 第五步 - 配置虚拟主机 ### We will install bugzilla on directory "/usr/local/www/bugzilla", so we must create new virtualhost configuration for it. @@ -193,7 +192,7 @@ Now test the apache configuration with "apachectl" command and restart it : apachectl configtest service apache24 restart -### Step 6 - Install Bugzilla ### +### 第六步 - 安装Bugzilla ### We can install bugzilla manually by downloading the source, or install it from freebsd repository. In this step we will install bugzilla from freebsd repository with pkg command : @@ -251,7 +250,7 @@ Bugzilla admin panel. ![Bugzilla Admin Page](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Admin-Page.png) -### Conclusion ### +### 结论 ### Bugzilla is web based application help you to manage the software development. It is written in perl and use MySQL as the database system. Bugzilla used by mozilla, redhat, gnome etc for help their software development. Bugzilla has a lot of features and easy to configure and install. @@ -260,7 +259,7 @@ Bugzilla is web based application help you to manage the software development. I via: http://linoxide.com/tools/install-bugzilla-apache-ssl-freebsd-10-2/ 作者:[Arul][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 10abd55c3a1d05adc59a464031531ef18ce61d3a Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 15 Dec 2015 11:56:31 +0800 Subject: [PATCH 0576/1710] =?UTF-8?q?20151215-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit linux,hardware,pi --- ... Raspberry Pi as a Secure Landing Point.md | 497 ++++++++++++++++++ 1 file changed, 497 insertions(+) create mode 100644 sources/tech/20151215 Securi-Pi: Using the Raspberry Pi as a Secure Landing Point.md diff --git a/sources/tech/20151215 Securi-Pi: Using the Raspberry Pi as a Secure Landing Point.md b/sources/tech/20151215 Securi-Pi: Using the Raspberry Pi as a Secure Landing Point.md new file mode 100644 index 0000000000..36c28d25d6 --- /dev/null +++ b/sources/tech/20151215 Securi-Pi: Using the Raspberry Pi as a Secure Landing Point.md @@ -0,0 +1,497 @@ +Securi-Pi: Using the Raspberry Pi as a Secure Landing Point +================================================================================ + +Like many LJ readers these days, I've been leading a bit of a techno-nomadic lifestyle as of the past few years—jumping from network to network, access point to access point, as I bounce around the real world while maintaining my connection to the Internet and other networks I use on a daily basis. As of late, I've found that more and more networks are starting to block outbound ports like SMTP (port 25), SSH (port 22) and others. It becomes really frustrating when you drop into a local coffee house expecting to be able to fire up your SSH client and get a few things done, and you can't, because the network's blocking you. + +However, I have yet to run across a network that blocks HTTPS outbound (port 443). After a bit of fiddling with a Raspberry Pi 2 I have at home, I was able to get a nice clean solution that lets me hit various services on the Raspberry Pi via port 443—allowing me to walk around blocked ports and hobbled networks so I can do the things I need to do. In a nutshell, I have set up this Raspberry Pi to act as an OpenVPN endpoint, SSH endpoint and Apache server—with all these services listening on port 443 so networks with restrictive policies aren't an issue. + +### Notes +This solution will work on most networks, but firewalls that do deep packet inspection on outbound traffic still can block traffic that's tunneled using this method. However, I haven't been on a network that does that...yet. Also, while I use a lot of cryptography-based solutions here (OpenVPN, HTTPS, SSH), I haven't done a strict security audit of this setup. DNS may leak information, for example, and there may be other things I haven't thought of. I'm not recommending this as a way to hide all your traffic—I just use this so that I can connect to the Internet in an unfettered way when I'm out and about. + +### Getting Started +Let's start off with what you need to put this solution together. I'm using this on a Raspberry Pi 2 at home, running the latest Raspbian, but this should work just fine on a Raspberry Pi Model B, as well. It fits within the 512MB of RAM footprint quite easily, although performance may be a bit slower, because the Raspberry Pi Model B has a single-core CPU as opposed to the Pi 2's quad-core. My Raspberry Pi 2 is behind my home's router/firewall, so I get the added benefit of being able to access my machines at home. This also means that any traffic I send to the Internet appears to come from my home router's IP address, so this isn't a solution designed to protect anonymity. If you don't have a Raspberry Pi, or don't want this running out of your home, it's entirely possible to run this out of a small cloud server too. Just make sure that the server's running Debian or Ubuntu, as these instructions are targeted at Debian-based distributions. + +![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11913f1.jpg) + +Figure 1. The Raspberry Pi, about to become an encrypted network endpoint. + +### Installing and Configuring BIND +Once you have your platform up and running—whether it's a Raspberry Pi or otherwise—next you're going to install BIND, the nameserver that powers a lot of the Internet. You're going to install BIND as a caching nameserver only, and not have it service incoming requests from the Internet. Installing BIND will give you a DNS server to point your OpenVPN clients at, once you get to the OpenVPN step. Installing BIND is easy; it's just a simple `apt-get `command to install it: + +``` +root@test:~# apt-get install bind9 +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + bind9utils +Suggested packages: + bind9-doc resolvconf ufw +The following NEW packages will be installed: + bind9 bind9utils +0 upgraded, 2 newly installed, 0 to remove and + ↪0 not upgraded. +Need to get 490 kB of archives. +After this operation, 1,128 kB of additional disk + ↪space will be used. +Do you want to continue [Y/n]? y +``` + +There are a couple minor configuration changes that need to be made to one of the config files of BIND before it can operate as a caching nameserver. Both changes are in `/etc/bind/named.conf.options`. First, you're going to uncomment the "forwarders" section of this file, and you're going to add a nameserver on the Internet to which to forward requests. In this case, I'm going to add Google's DNS (8.8.8.8). The "forwarders" section of the file should look like this: + +``` +forwarders { + 8.8.8.8; +}; +``` + +The second change you're going to make allows queries from your internal network and localhost. Simply add this line to the bottom of the configuration file, right before the `}`; that ends the file: + +``` +allow-query { 192.168.1.0/24; 127.0.0.0/16; }; +``` + +That line above allows this DNS server to be queried from the network it's on (in this case, my network behind my firewall) and localhost. Next, you just need to restart BIND: + +``` +root@test:~# /etc/init.d/bind9 restart +[....] Stopping domain name service...: bind9waiting + ↪for pid 13209 to die +. ok +[ ok ] Starting domain name service...: bind9. +``` + +Now you can test `nslookup` to make sure your server works: + +``` +root@test:~# nslookup +> server localhost +Default server: localhost +Address: 127.0.0.1#53 +> www.google.com +Server: localhost +Address: 127.0.0.1#53 + +Non-authoritative answer: +Name: www.google.com +Address: 173.194.33.176 +Name: www.google.com +Address: 173.194.33.177 +Name: www.google.com +Address: 173.194.33.178 +Name: www.google.com +Address: 173.194.33.179 +Name: www.google.com +Address: 173.194.33.180 +``` + +That's it! You've got a working nameserver on this machine. Next, let's move on to OpenVPN. + +### Installing and Configuring OpenVPN + +OpenVPN is an open-source VPN solution that relies on SSL/TLS for its key exchange. It's also easy to install and get working under Linux. Configuration of OpenVPN can be a bit daunting, but you're not going to deviate from the default configuration by much. To start, you're going to run an apt-get command and install OpenVPN: + +``` +root@test:~# apt-get install openvpn +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + liblzo2-2 libpkcs11-helper1 +Suggested packages: + resolvconf +The following NEW packages will be installed: + liblzo2-2 libpkcs11-helper1 openvpn +0 upgraded, 3 newly installed, 0 to remove and + ↪0 not upgraded. +Need to get 621 kB of archives. +After this operation, 1,489 kB of additional disk + ↪space will be used. +Do you want to continue [Y/n]? y +``` + +Now that OpenVPN is installed, you're going to configure it. OpenVPN is SSL-based, and it relies on both server and client certificates to work. To generate these certificates, you need to configure a Certificate Authority (CA) on the machine. Luckily, OpenVPN ships with some wrapper scripts known as "easy-rsa" that help to bootstrap this process. You'll start by making a directory on the filesystem for the easy-rsa scripts to reside in and by copying the scripts from the template directory there: + +``` +root@test:~# mkdir /etc/openvpn/easy-rsa +root@test:~# cp -rpv + ↪/usr/share/doc/openvpn/examples/easy-rsa/2.0/* + ↪/etc/openvpn/easy-rsa/ + ``` + +Next, copy the vars file to a backup copy: + +``` +root@test:/etc/openvpn/easy-rsa# cp vars vars.bak +``` + +Now, edit vars so it's got information pertinent to your installation. I'm going specify only the lines that need to be edited, with sample data, below: + +``` +KEY_SIZE=4096 +KEY_COUNTRY="US" +KEY_PROVINCE="CA" +KEY_CITY="Silicon Valley" +KEY_ORG="Linux Journal" +KEY_EMAIL="bill.childers@linuxjournal.com" +``` + +The next step is to source the vars file, so that the environment variables in the file are in your current environment: + +``` +root@test:/etc/openvpn/easy-rsa# source ./vars +NOTE: If you run ./clean-all, I will be doing a + ↪rm -rf on /etc/openvpn/easy-rsa/keys + ``` + +### Building the Certificate Authority + +You're now going to run clean-all to ensure a clean working environment, and then you're going to build the CA. Note that I'm changing changeme prompts to something that's appropriate for this installation: + +``` +root@test:/etc/openvpn/easy-rsa# ./clean-all +root@test:/etc/openvpn/easy-rsa# ./build-ca +Generating a 4096 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) [Silicon Valley]: +Organization Name (eg, company) [Linux Journal]: +Organizational Unit Name (eg, section) + ↪[changeme]:SecTeam +Common Name (eg, your name or your server's hostname) + ↪[changeme]:test.linuxjournal.com +Name [changeme]:test.linuxjournal.com +Email Address [bill.childers@linuxjournal.com]: +``` + +### Building the Server Certificate + +Once the CA is created, you need to build the OpenVPN server certificate: + +```root@test:/etc/openvpn/easy-rsa# + ↪./build-key-server test.linuxjournal.com +Generating a 4096 bit RSA private key +...................................................++ +writing new private key to 'test.linuxjournal.com.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) [Silicon Valley]: +Organization Name (eg, company) [Linux Journal]: +Organizational Unit Name (eg, section) + ↪[changeme]:SecTeam +Common Name (eg, your name or your server's hostname) + ↪[test.linuxjournal.com]: +Name [changeme]:test.linuxjournal.com +Email Address [bill.childers@linuxjournal.com]: + +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/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:'Silicon Valley' +organizationName :PRINTABLE:'Linux Journal' +organizationalUnitName:PRINTABLE:'SecTeam' +commonName :PRINTABLE:'test.linuxjournal.com' +name :PRINTABLE:'test.linuxjournal.com' +emailAddress + ↪:IA5STRING:'bill.childers@linuxjournal.com' +Certificate is to be certified until Sep 1 + ↪06:23:59 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 +``` + +The next step may take a while—building the Diffie-Hellman key for the OpenVPN server. This takes several minutes on a conventional desktop-grade CPU, but on the ARM processor of the Raspberry Pi, it can take much, much longer. Have patience, as long as the dots in the terminal are proceeding, the system is building its Diffie-Hellman key (note that many dots are snipped in these examples): + +``` +root@test:/etc/openvpn/easy-rsa# ./build-dh +Generating DH parameters, 4096 bit long safe prime, + ↪generator 2 +This is going to take a long time +....................................................+ + +``` + +### Building the Client Certificate + +Now you're going to generate a client key for your client to use when logging in to the OpenVPN server. OpenVPN is typically configured for certificate-based auth, where the client presents a certificate that was issued by an approved Certificate Authority: + +``` +root@test:/etc/openvpn/easy-rsa# ./build-key + ↪bills-computer +Generating a 4096 bit RSA private key +...................................................++ +...................................................++ +writing new private key to 'bills-computer.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) [Silicon Valley]: +Organization Name (eg, company) [Linux Journal]: +Organizational Unit Name (eg, section) + ↪[changeme]:SecTeam +Common Name (eg, your name or your server's hostname) + ↪[bills-computer]: +Name [changeme]:bills-computer +Email Address [bill.childers@linuxjournal.com]: + +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/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:'Silicon Valley' +organizationName :PRINTABLE:'Linux Journal' +organizationalUnitName:PRINTABLE:'SecTeam' +commonName :PRINTABLE:'bills-computer' +name :PRINTABLE:'bills-computer' +emailAddress + ↪:IA5STRING:'bill.childers@linuxjournal.com' +Certificate is to be certified until + ↪Sep 1 07:35:07 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 +root@test:/etc/openvpn/easy-rsa# +``` + +Now you're going to generate an HMAC code as a shared key to increase the security of the system further: + +``` +root@test:~# openvpn --genkey --secret + ↪/etc/openvpn/easy-rsa/keys/ta.key +``` + +### Configuration of the Server + +Finally, you're going to get to the meat of configuring the OpenVPN server. You're going to create a new file, /etc/openvpn/server.conf, and you're going to stick to a default configuration for the most part. The main change you're going to do is to set up OpenVPN to use TCP rather than UDP. This is needed for the next major step to work—without OpenVPN using TCP for its network communication, you can't get things working on port 443. So, create a new file called /etc/openvpn/server.conf, and put the following configuration in it: Garrick, shrink below. + +``` +port 1194 +proto tcp +dev tun +ca easy-rsa/keys/ca.crt +cert easy-rsa/keys/test.linuxjournal.com.crt ## or whatever + ↪your hostname was +key easy-rsa/keys/test.linuxjournal.com.key ## Hostname key + ↪- This file should be kept secret +management localhost 7505 +dh easy-rsa/keys/dh4096.pem +tls-auth /etc/openvpn/certs/ta.key 0 +server 10.8.0.0 255.255.255.0 # The server will use this + ↪subnet for clients connecting to it +ifconfig-pool-persist ipp.txt +push "redirect-gateway def1 bypass-dhcp" # Forces clients + ↪to redirect all traffic through the VPN +push "dhcp-option DNS 192.168.1.1" # Tells the client to + ↪use the DNS server at 192.168.1.1 for DNS - + ↪replace with the IP address of the OpenVPN + ↪machine and clients will use the BIND + ↪server setup earlier +keepalive 30 240 +comp-lzo # Enable compression +persist-key +persist-tun +status openvpn-status.log +verb 3 +``` + +And last, you're going to enable IP forwarding on the server, configure OpenVPN to start on boot and start the OpenVPN service: + +``` +root@test:/etc/openvpn/easy-rsa/keys# echo + ↪"net.ipv4.ip_forward = 1" >> /etc/sysctl.conf +root@test:/etc/openvpn/easy-rsa/keys# sysctl -p + ↪/etc/sysctl.conf +net.core.wmem_max = 12582912 +net.core.rmem_max = 12582912 +net.ipv4.tcp_rmem = 10240 87380 12582912 +net.ipv4.tcp_wmem = 10240 87380 12582912 +net.core.wmem_max = 12582912 +net.core.rmem_max = 12582912 +net.ipv4.tcp_rmem = 10240 87380 12582912 +net.ipv4.tcp_wmem = 10240 87380 12582912 +net.core.wmem_max = 12582912 +net.core.rmem_max = 12582912 +net.ipv4.tcp_rmem = 10240 87380 12582912 +net.ipv4.tcp_wmem = 10240 87380 12582912 +net.ipv4.ip_forward = 0 +net.ipv4.ip_forward = 1 + +root@test:/etc/openvpn/easy-rsa/keys# update-rc.d + ↪openvpn defaults +update-rc.d: using dependency based boot sequencing + +root@test:/etc/openvpn/easy-rsa/keys# + ↪/etc/init.d/openvpn start +[ ok ] Starting virtual private network daemon:. +``` + +### Setting Up OpenVPN Clients + +Your client installation depends on the host OS of your client, but you'll need to copy your client certs and keys created above to your client, and you'll need to import those certificates and create a configuration for that client. Each client and client OS does it slightly differently and documenting each one is beyond the scope of this article, so you'll need to refer to the documentation for that client to get it running. Refer to the Resources section for OpenVPN clients for each major OS. + +### Installing SSLH—the "Magic" Protocol Multiplexer + +The really interesting piece of this solution is SSLH. SSLH is a protocol multiplexer—it listens on port 443 for traffic, and then it can analyze whether the incoming packet is an SSH packet, HTTPS or OpenVPN, and it can forward that packet onto the proper service. This is what enables this solution to bypass most port blocks—you use the HTTPS port for all of this traffic, since HTTPS is rarely blocked. + +To start, `apt-get` install SSLH: + +``` +root@test:/etc/openvpn/easy-rsa/keys# apt-get + ↪install sslh +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + apache2 apache2-mpm-worker apache2-utils + ↪apache2.2-bin apache2.2-common + libapr1 libaprutil1 libaprutil1-dbd-sqlite3 + ↪libaprutil1-ldap libconfig9 +Suggested packages: + apache2-doc apache2-suexec apache2-suexec-custom + ↪openbsd-inetd inet-superserver +The following NEW packages will be installed: + apache2 apache2-mpm-worker apache2-utils + ↪apache2.2-bin apache2.2-common + libapr1 libaprutil1 libaprutil1-dbd-sqlite3 + ↪libaprutil1-ldap libconfig9 sslh +0 upgraded, 11 newly installed, 0 to remove + ↪and 0 not upgraded. +Need to get 1,568 kB of archives. +After this operation, 5,822 kB of additional + ↪disk space will be used. +Do you want to continue [Y/n]? y +``` + +After SSLH is installed, the package installer will ask you if you want to run it in inetd or standalone mode. Select standalone mode, because you want SSLH to run as its own process. If you don't have Apache installed, the Debian/Raspbian package of SSLH will pull it in automatically, although it's not strictly required. If you already have Apache running and configured, you'll want to make sure it only listens on localhost's interface and not all interfaces (otherwise, SSLH can't start because it can't bind to port 443). After installation, you'll receive an error that looks like this: + +``` +[....] Starting ssl/ssh multiplexer: sslhsslh disabled, + ↪please adjust the configuration to your needs +[FAIL] and then set RUN to 'yes' in /etc/default/sslh + ↪to enable it. ... failed! +failed! +``` + +This isn't an error, exactly—it's just SSLH telling you that it's not configured and can't start. Configuring SSLH is pretty simple. Its configuration is stored in `/etc/default/sslh`, and you just need to configure the `RUN` and `DAEMON_OPTS` variables. My SSLH configuration looks like this: + +``` +# Default options for sslh initscript +# sourced by /etc/init.d/sslh + +# Disabled by default, to force yourself +# to read the configuration: +# - /usr/share/doc/sslh/README.Debian (quick start) +# - /usr/share/doc/sslh/README, at "Configuration" section +# - sslh(8) via "man sslh" for more configuration details. +# Once configuration ready, you *must* set RUN to yes here +# and try to start sslh (standalone mode only) + +RUN=yes + +# binary to use: forked (sslh) or single-thread + ↪(sslh-select) version +DAEMON=/usr/sbin/sslh + +DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh + ↪127.0.0.1:22 --ssl 127.0.0.1:443 --openvpn + ↪127.0.0.1:1194 --pidfile /var/run/sslh/sslh.pid" + ``` + + Save the file and start SSLH: + +``` + root@test:/etc/openvpn/easy-rsa/keys# + ↪/etc/init.d/sslh start +[ ok ] Starting ssl/ssh multiplexer: sslh. +``` + +Now, you should be able to ssh to port 443 on your Raspberry Pi, and have it forward via SSLH: + +``` +$ ssh -p 443 root@test.linuxjournal.com +root@test:~# +``` + +SSLH is now listening on port 443 and can direct traffic to SSH, Apache or OpenVPN based on the type of packet that hits it. You should be ready to go! + +### Conclusion + +Now you can fire up OpenVPN and set your OpenVPN client configuration to port 443, and SSLH will route it to the OpenVPN server on port 1194. But because you're talking to your server on port 443, your VPN traffic won't get blocked. Now you can land at a strange coffee shop, in a strange town, and know that your Internet will just work when you fire up your OpenVPN and point it at your Raspberry Pi. You'll also gain some encryption on your link, which will improve the privacy of your connection. Enjoy surfing the Net via your new landing point! + +Resources + +Installing and Configuring OpenVPN: [https://wiki.debian.org/OpenVPN](https://wiki.debian.org/OpenVPN) and [http://cryptotap.com/articles/openvpn](http://cryptotap.com/articles/openvpn) + +OpenVPN client downloads: [https://openvpn.net/index.php/open-source/downloads.html](https://openvpn.net/index.php/open-source/downloads.html) + +OpenVPN Client for iOS: [https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8](https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8) + +OpenVPN Client for Android: [https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en](https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en) + +Tunnelblick for Mac OS X (OpenVPN client): [https://tunnelblick.net](https://tunnelblick.net) + +SSLH—Protocol Multiplexer: [http://www.rutschle.net/tech/sslh.shtml](http://www.rutschle.net/tech/sslh.shtml) and [https://github.com/yrutschle/sslh](https://github.com/yrutschle/sslh) + + +---------- +via: http://www.linuxjournal.com/content/securi-pi-using-raspberry-pi-secure-landing-point?page=0,0 + +作者:[Bill Childers][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/bill-childers + + From e17d6ca1678899e0dbca4ed28bd567e61ded6dc5 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 15 Dec 2015 15:51:05 +0800 Subject: [PATCH 0577/1710] =?UTF-8?q?20151215-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ablish FTP connection to an SFTP server.md | 49 ++++++++ ... Light Table 0.8 in Ubuntu 14.04, 15.10.md | 104 +++++++++++++++++ ...ock network traffic by country on Linux.md | 110 ++++++++++++++++++ ...le Software Collections (SCL) on CentOS.md | 105 +++++++++++++++++ 4 files changed, 368 insertions(+) create mode 100644 sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md create mode 100644 sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md create mode 100644 sources/tech/20151215 How to block network traffic by country on Linux.md create mode 100644 sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md diff --git a/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md new file mode 100644 index 0000000000..e6e0aca052 --- /dev/null +++ b/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md @@ -0,0 +1,49 @@ +Fix: Cannot establish FTP connection to an SFTP server +================================================================================ +### Problem ### + +The other day I had to connect to my web server. I use [FileZilla][1] for connecting to FTP servers. When I entered the hostname and password and tried to connect to the FTP server, it gave me the following error: + +> Error: Cannot establish FTP connection to an SFTP server. Please select proper protocol. +> +> Error: Critical error: Could not connect to server + +![FileZilla Cannot establish FTP connection to an SFTP server](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_1.jpeg) + +### Reason ### + +By reading the error message itself made me realize my mistake. I was trying to establish an [FTP][2] connection with an [SFTP][3] server. Clearly, I was not using the correct protocol (which should have been SFTP and not FTP). + +As you can see in the picture above, FileZilla defaults to FTP protocol. + +### Solution for “Cannot establish FTP connection to an SFTP server” ### + +Solution is simple. Use SFTP protocol instead of FTP. The one problem you might face is to know how to change the protocol to SFTP. This is where I am going to help you. + +In FileZilla menu, go to **File->Site Manager**. + +![FileZilla Site Manager](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_2.jpeg) + +In the Site Manager, go in General tab and select SFTP in Protocol. Also fill in the host server, port number, user password etc. + +![Cannot establish FTP connection to an SFTP server](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_3.png) + +I hope you can handle things from here onward. + +I hope this quick tutorial helped you to fix “Cannot establish FTP connection to an SFTP server. Please select proper protocol.” problem. In related articles, you can read this post to [know how to set up FTP server in Linux][4]. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-establish-ftp-connection-sftp-server/ + +作者:[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://filezilla-project.org/ +[2]:https://en.wikipedia.org/wiki/File_Transfer_Protocol +[3]:https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol +[4]:http://itsfoss.com/set-ftp-server-linux/ \ No newline at end of file diff --git a/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md b/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md new file mode 100644 index 0000000000..5424c7cd68 --- /dev/null +++ b/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md @@ -0,0 +1,104 @@ +How to Install Light Table 0.8 in Ubuntu 14.04, 15.10 +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2014/11/LightTable-IDE-logo-icon.png) + +The Light Table IDE has just reached a new stable release after more than one year of development. Now it provides 64-bit only binary for Linux. + +Changes in LightTable 0.8.0: + +- CHANGED: We have switched to Electron from NW.js +- CHANGED: LT’s releases and self-updating processes are completely in the open on Github +- ADDED: LT can be built from source with provided scripts across supported platforms +- ADDED: Most of LT’s node libraries are installed as npm dependencies instead of as forked libraries +- ADDED: Significant documentation. See more below +- FIX: Major usability issues on >= OSX 10.10 +- CHANGED: 32-bit linux is no longer an official download. Building from source will still be supported +- FIX: ClojureScript eval for modern versions of ClojureScript +- More details at [github.com/LightTable/LightTable/releases][1] + +![LightTable 0.8.0](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-08.jpg) + +### How to Install Light Table 0.8.0 in Ubuntu: ### + +Below steps show you how to install the official binary in Ubuntu. Works on all current Ubuntu releases (**64-bit only**). + +Before getting started, please make a backup if you have a previous release installed. + +**1.** Download the Linux binary from link below: + +- [lighttable-0.8.0-linux.tar.gz][2] + +**2.** Open terminal from Unity Dash, App Launcher, or via Ctrl+Alt+T keys. When it opens, paste below command and hit enter: + + gksudo file-roller ~/Downloads/lighttable-0.8.0-linux.tar.gz + +![open-via-fileroller](http://ubuntuhandbook.org/wp-content/uploads/2015/12/open-via-fileroller.jpg) + +Install `gksu` from Ubuntu Software Center if the command does not work. + +**3.** Previous command opens the downloaded archive via Archive Manager using root user privilege. + +When it opens, do: + +- right-click and rename the folder name to **LightTable** +- extract it to **Computer -> /opt/** directory. + +![extract-lighttable](http://ubuntuhandbook.org/wp-content/uploads/2015/12/extract-lighttable.jpg) + +Finally you should have the LightTable installed to /opt/ directory: + +![lighttable-in-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-in-opt.jpg) + +**4.** Create a launcher so you can start LightTable from Unity Dash or App Launcher. + +Open terminal and run below command to create & edit a launcher file for LightTable: + + gksudo gedit /usr/share/applications/lighttable.desktop + +When the file opens via Gedit text editor, paste below and save the file: + + [Desktop Entry] + Version=1.0 + Type=Application + Name=Light Table + GenericName=Text Editor + Comment=Open source IDE that modify, from running programs to embed websites and games + Exec=/opt/LightTable/LightTable %F + Terminal=false + MimeType=text/plain; + Icon=/opt/LightTable/resources/app/core/img/lticon.png + Categories=TextEditor;Development;Utility; + StartupNotify=true + Actions=Window;Document; + + Name[en_US]=Light Table + + [Desktop Action Window] + Name=New Window + Exec=/opt/LightTable/LightTable -n + OnlyShowIn=Unity; + + [Desktop Action Document] + Name=New File + Exec=/opt/LightTable/LightTable --command new_file + OnlyShowIn=Unity; + +So it looks like: + +![lighttable-launcher](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-launcher.jpg) + +Finally launch the IDE from Unity Dash or Application Launcher and enjoy! + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/12/install-light-table-0-8-ubuntu-14-04/ + +作者:[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://github.com/LightTable/LightTable/releases +[2]:https://github.com/LightTable/LightTable/releases/download/0.8.0/lighttable-0.8.0-linux.tar.gz \ No newline at end of file diff --git a/sources/tech/20151215 How to block network traffic by country on Linux.md b/sources/tech/20151215 How to block network traffic by country on Linux.md new file mode 100644 index 0000000000..1f2d39f04d --- /dev/null +++ b/sources/tech/20151215 How to block network traffic by country on Linux.md @@ -0,0 +1,110 @@ +How to block network traffic by country on Linux +================================================================================ +As a system admin who maintains production Linux servers, there are circumstances where you need to **selectively block or allow network traffic based on geographic locations**. For example, you are experiencing denial-of-service attacks mostly originating from IP addresses registered with a particular country. You want to block SSH logins from unknown foreign countries for security reasons. Your company has a distribution right to online videos, which requires it to legally stream to particular countries only. You need to prevent any local host from uploading documents to any non-US remote cloud storage due to geo-restriction company policies. + +All these scenarios require an ability to set up a firewall which does **country-based traffic filtering**. There are a couple of ways to do that. For one, you can use TCP wrappers to set up conditional blocking for individual applications (e.g., SSH, NFS, httpd). The downside is that the application you want to protect must be built with TCP wrappers support. Besides, TCP wrappers are not universally available across different platforms (e.g., Arch Linux [dropped][2] its support). An alternative approach is to set up [ipset][3] with country-based GeoIP information and apply it to iptables rules. The latter approach is more promising as the iptables-based filtering is application-agnostic and easy to set up. + +In this tutorial, I am going to present **another iptables-based GeoIP filtering which is implemented with xtables-addons**. For those unfamiliar with it, xtables-addons is a suite of extensions for netfilter/iptables. Included in xtables-addons is a module called xt_geoip which extends the netfilter/iptables to filter, NAT or mangle packets based on source/destination countries. For you to use xt_geoip, you don't need to recompile the kernel or iptables, but only need to build xtables-addons as modules, using the current kernel build environment (/lib/modules/`uname -r`/build). Reboot is not required either. As soon as you build and install xtables-addons, xt_geoip is immediately usable with iptables. + +As for the comparison between xt_geoip and ipset, the [official source][3] mentions that xt_geoip is superior to ipset in terms of memory foot print. But in terms of matching speed, hash-based ipset might have an edge. + +In the rest of the tutorial, I am going to show **how to use iptables/xt_geoip to block network traffic based on its source/destination countries**. + +### Install Xtables-addons on Linux ### + +Here is how you can compile and install xtables-addons on various Linux platforms. + +To build xtables-addons, you need to install a couple of dependent packages first. + +#### Install Dependencies on Debian, Ubuntu or Linux Mint #### + + $ sudo apt-get install iptables-dev xtables-addons-common libtext-csv-xs-perl pkg-config + +#### Install Dependencies on CentOS, RHEL or Fedora #### + +CentOS/RHEL 6 requires EPEL repository being set up first (for perl-Text-CSV_XS). + + $ sudo yum install gcc-c++ make automake kernel-devel-`uname -r` wget unzip iptables-devel perl-Text-CSV_XS + +#### Compile and Install Xtables-addons #### + +Download the latest `xtables-addons` source code from the [official site][4], and build/install it as follows. + + $ wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/xtables-addons-2.10.tar.xz + $ tar xf xtables-addons-2.10.tar.xz + $ cd xtables-addons-2.10 + $ ./configure + $ make + $ sudo make install + +Note that for Red Hat based systems (CentOS, RHEL, Fedora) which have SELinux enabled by default, it is necessary to adjust SELinux policy as follows. Otherwise, SELinux will prevent iptables from loading xt_geoip module. + + $ sudo chcon -vR --user=system_u /lib/modules/$(uname -r)/extra/*.ko + $ sudo chcon -vR --type=lib_t /lib64/xtables/*.so + +### Install GeoIP Database for Xtables-addons ### + +The next step is to install GeoIP database which will be used by xt_geoip for IP-to-country mapping. Conveniently, the xtables-addons source package comes with two helper scripts for downloading GeoIP database from MaxMind and converting it into a binary form recognized by xt_geoip. These scripts are found in geoip folder inside the source package. Follow the instructions below to build and install GeoIP database on your system. + + $ cd geoip + $ ./xt_geoip_dl + $ ./xt_geoip_build GeoIPCountryWhois.csv + $ sudo mkdir -p /usr/share/xt_geoip + $ sudo cp -r {BE,LE} /usr/share/xt_geoip + +According to [MaxMind][5], their GeoIP database is 99.8% accurate on a country-level, and the database is updated every month. To keep the locally installed GeoIP database up-to-date, you want to set up a monthly [cron job][6] to refresh the local GeoIP database as often. + +### Block Network Traffic Originating from or Destined to a Country ### + +Once xt_geoip module and GeoIP database are installed, you can immediately use the geoip match options in iptables command. + + $ sudo iptables -m geoip --src-cc country[,country...] --dst-cc country[,country...] + +Countries you want to block are specified using [two-letter ISO3166 code][7] (e.g., US (United States), CN (China), IN (India), FR (France)). + +For example, if you want to block incoming traffic from Yemen (YE) and Zambia (ZM), the following iptables command will do. + + $ sudo iptables -I INPUT -m geoip --src-cc YE,ZM -j DROP + +If you want to block outgoing traffic destined to China (CN), run the following command. + + $ sudo iptables -A OUTPUT -m geoip --dst-cc CN -j DROP + +The matching condition can also be "negated" by prepending "!" to "--src-cc" or "--dst-cc". For example: + +If you want to block all incoming non-US traffic on your server, run this: + + $ sudo iptables -I INPUT -m geoip ! --src-cc US -j DROP + +![](https://c2.staticflickr.com/6/5654/23665427845_050241b03f_c.jpg) + +#### For Firewall-cmd Users #### + +Some distros such as CentOS/RHEL 7 or Fedora have replaced iptables with firewalld as the default firewall service. On such systems, you can use firewall-cmd to block traffic using xt_geoip similarly. The above three examples can be rewritten with firewall-cmd as follows. + + $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip --src-cc YE,ZM -j DROP + $ sudo firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -m geoip --dst-cc CN -j DROP + $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip ! --src-cc US -j DROP + +### Conclusion ### + +In this tutorial, I presented iptables/xt_geoip which is an easy way to filter network packets based on their source/destination countries. This can be a useful arsenal to deploy in your firewall system if needed. As a final word of caution, I should mention that GeoIP-based traffic filtering is not a foolproof way to ban certain countries on your server. GeoIP database is by nature inaccurate/incomplete, and source/destination geography can easily be spoofed using VPN, Tor or any compromised relay hosts. Geography-based filtering can even block legitimate traffic that should not be banned. Understand this limitation before you decide to deploy it in your production environment. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/block-network-traffic-by-country-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://www.archlinux.org/news/dropping-tcp_wrappers-support/ +[2]:http://xmodulo.com/block-unwanted-ip-addresses-linux.html +[3]:http://xtables-addons.sourceforge.net/geoip.php +[4]:http://xtables-addons.sourceforge.net/ +[5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/ +[6]:http://ask.xmodulo.com/add-cron-job-linux.html +[7]:https://en.wikipedia.org/wiki/ISO_3166-1 \ No newline at end of file diff --git a/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md b/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md new file mode 100644 index 0000000000..e354bb53af --- /dev/null +++ b/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md @@ -0,0 +1,105 @@ +How to enable Software Collections (SCL) on CentOS +================================================================================ +Red Hat Enterprise Linux (RHEL) and its community fork, CentOS, offer 10-year life cycle, meaning that each version of RHEL/CentOS is updated with security patches for up to 10 years. While such long life cycle guarantees much needed system compatibility and reliability for enterprise users, a downside is that core applications and run-time environments grow antiquated as the underlying RHEL/CentOS version becomes close to end-of-life (EOF). For example, CentOS 6.5, whose EOL is dated to November 30th 2020, comes with python 2.6.6 and MySQL 5.1.73, which are already pretty old by today's standard. + +On the other hand, attempting to manually upgrade development toolchains and run-time environments on RHEL/CentOS may potentially break your system unless all dependencies are resolved correctly. Under normal circumstances, manual upgrade is not recommended unless you know what you are doing. + +The [Software Collections][1] (SCL) repository came into being to help with RHEL/CentOS users in this situation. The SCL is created to provide RHEL/CentOS users with a means to easily and safely install and use multiple (and potentially more recent) versions of applications and run-time environments "without" messing up the existing system. This is in contrast to other third party repositories which could cause conflicts among installed packages. + +The latest SCL offers: + +- Python 3.3 and 2.7 +- PHP 5.4 +- Node.js 0.10 +- Ruby 1.9.3 +- Perl 5.16.3 +- MariaDB and MySQL 5.5 +- Apache httpd 2.4.6 + +In the rest of the tutorial, let me show you how to set up the SCL repository and how to install and enable the packages from the SCL. + +### Set up the Software Collections (SCL) Repository ### + +The SCL is available on CentOS 6.5 and later. To set up the SCL, simply run: + + $ sudo yum install centos-release-SCL + +To enable and run applications from the SCL, you also need to install the following package. + + $ sudo yum install scl-utils-build + +You can browse a complete list of packages available from the SCL repository by running: + + $ yum --disablerepo="*" --enablerepo="scl" list available + +![](https://c2.staticflickr.com/6/5730/23304424250_f5c8a09584_c.jpg) + +### Install and Enable a Package from the SCL ### + +Now that you have set up the SCL, you can go ahead and install any package from the SCL. + +You can search for SCL packages with: + + $ yum --disablerepo="*" --enablerepo="scl" search + +Let's say you want to install python 3.3. + +Go ahead and install it as usual with yum: + + $ sudo yum install python33 + +At any time you can check the list of packages you installed from the SCL by running: + + $ scl --list + +---------- + + python33 + +A nice thing about the SCL is that installing a package from the SCL does NOT overwrite any system files, and is guaranteed to not cause any conflicts with other system libraries and applications. + +For example, if you check the default python version after installing python33, you will see that the default version is still the same: + + $ python --version + +---------- + + Python 2.6.6 + +If you want to try an installed SCL package, you need to explicitly enable it "on a per-command basis" using scl: + + $ scl enable + +For example, to enable python33 package for python command: + + $ scl enable python33 'python --version' + +---------- + + Python 3.3.2 + +If you want to run multiple commands while enabling python33 package, you can actually create an SCL-enabled bash session as follows. + + $ scl enable python33 bash + +Within this bash session, the default python will be switched to 3.3 until you type exit and kill the session. + +![](https://c2.staticflickr.com/6/5642/23491549632_1d08e163cc_c.jpg) + +In short, the SCL is somewhat similar to the virtualenv of Python, but is more general in that you can enable/disable SCL sessions for a far greater number of applications than just Python. + +For more detailed instructions on the SCL, refer to the official [quick start guide][2]. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/enable-software-collections-centos.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://www.softwarecollections.org/ +[2]:https://www.softwarecollections.org/docs/ \ No newline at end of file From a4dc2d0d7a053b948ff557903c4abfb235fc3952 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 15 Dec 2015 15:54:51 +0800 Subject: [PATCH 0578/1710] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E4=B8=AD?= =?UTF-8?q?=E6=9C=89=E5=86=92=E5=8F=B7=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 文件名中有冒号,修改文件名 --- ...ecuri-Pi--Using the Raspberry Pi as a Secure Landing Point.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/{20151215 Securi-Pi: Using the Raspberry Pi as a Secure Landing Point.md => 20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md} (100%) diff --git a/sources/tech/20151215 Securi-Pi: Using the Raspberry Pi as a Secure Landing Point.md b/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md similarity index 100% rename from sources/tech/20151215 Securi-Pi: Using the Raspberry Pi as a Secure Landing Point.md rename to sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md From 0933430063abc4a0807b607d8788faa53b3a7691 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 15 Dec 2015 19:02:21 +0800 Subject: [PATCH 0579/1710] Update 20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md --- ...n--Summon Swarms Of Penguins To Waddle About The Desktop.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md index 3d9b1a2770..b544517f5e 100644 --- a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md +++ b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux Desktop Fun: Summon Swarms Of Penguins To Waddle About The Desktop ================================================================================ XPenguins is a program for animating cute cartoons animals in your root window. By default it will be penguins they drop in from the top of the screen, walk along the tops of your windows, up the side of your windows, levitate, skateboard, and do other similarly exciting things. Now you can send an army of cute little penguins to invade the screen of someone else on your network. @@ -97,4 +98,4 @@ via: http://www.cyberciti.biz/tips/linux-cute-little-xpenguins-walk-along-tops-o [1]:http://xpenguins.seul.org/ [2]:http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html -[3]:http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium.html \ No newline at end of file +[3]:http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium.html From ff55e67796ab1f6863451d919fc78ac2f4cd5b0b Mon Sep 17 00:00:00 2001 From: su-kaiyao <1250471161@qq.com> Date: Tue, 15 Dec 2015 19:25:09 +0800 Subject: [PATCH 0580/1710] su-kaiyao translating 20151210 Getting started with Docker by Dockerizing this Blog.md --- ...1210 Getting started with Docker by Dockerizing this Blog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md b/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md index 517f7840b5..f8df8df93b 100644 --- a/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md +++ b/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md @@ -1,3 +1,5 @@ +su-kaiyao translating + Getting started with Docker by Dockerizing this Blog ====================== >This article covers the basic concepts of Docker and how to Dockerize an application by creating a custom Dockerfile From 6d0256790149e639ed578a6b45bafae0d2af8319 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 16 Dec 2015 11:02:14 +0800 Subject: [PATCH 0581/1710] Delete 20151204 Linux or Unix--jobs Command Examples.md --- ...04 Linux or Unix--jobs Command Examples.md | 196 ------------------ 1 file changed, 196 deletions(-) delete mode 100644 sources/tech/20151204 Linux or Unix--jobs Command Examples.md diff --git a/sources/tech/20151204 Linux or Unix--jobs Command Examples.md b/sources/tech/20151204 Linux or Unix--jobs Command Examples.md deleted file mode 100644 index 40333bed6c..0000000000 --- a/sources/tech/20151204 Linux or Unix--jobs Command Examples.md +++ /dev/null @@ -1,196 +0,0 @@ -translation by strugglingyouth -Linux / Unix: jobs Command Examples -================================================================================ -I am new Linux and Unix user. How do I show the active jobs on Linux or Unix-like systems using BASH/KSH/TCSH or POSIX based shell? How can I display status of jobs in the current session on Unix/Linux? - -Job control is nothing but the ability to stop/suspend the execution of processes (command) and continue/resume their execution as per your requirements. This is done using your operating system and shell such as bash/ksh or POSIX shell. - -You shell keeps a table of currently executing jobs and can be displayed with jobs command. - -### Purpose ### - -> Displays status of jobs in the current shell session. - -### Syntax ### - -The basic syntax is as follows: - - jobs - -OR - - jobs jobID - -OR - - jobs [options] jobID - -### Starting few jobs for demonstration purpose ### - -Before you start using jobs command, you need to start couple of jobs on your system. Type the following commands to start jobs: - - ## Start xeyes, calculator, and gedit text editor ### - xeyes & - gnome-calculator & - gedit fetch-stock-prices.py & - -Finally, run ping command in foreground: - - ping www.cyberciti.biz - -To suspend ping command job hit the **Ctrl-Z** key sequence. - -### jobs command examples ### - -To display the status of jobs in the current shell, enter: - - $ jobs - -Sample outputs: - - [1] 7895 Running gpass & - [2] 7906 Running gnome-calculator & - [3]- 7910 Running gedit fetch-stock-prices.py & - [4]+ 7946 Stopped ping cyberciti.biz - -To display the process ID or jobs for the job whose name begins with "p," enter: - - $ jobs -p %p - -OR - - $ jobs %p - -Sample outputs: - - [4]- Stopped ping cyberciti.biz - -The character % introduces a job specification. In this example, you are using the string whose name begins with suspended command such as %ping. - -### How do I show process IDs in addition to the normal information? ### - -Pass the -l(lowercase L) option to jobs command for more information about each job listed, run: - - $ jobs -l - -Sample outputs: - -![Fig.01: Displaying the status of jobs in the shell](http://s0.cyberciti.org/uploads/faq/2013/02/jobs-command-output.jpg) -Fig.01: Displaying the status of jobs in the shell - -### How do I list only processes that have changed status since the last notification? ### - -First, start a new job as follows: - - $ sleep 100 & - -Now, only show jobs that have stopped or exited since last notified, type: - - $ jobs -n - -Sample outputs: - - [5]- Running sleep 100 & - -### Display lists process IDs (PIDs) only ### - -Pass the -p option to jobs command to display PIDs only: - - $ jobs -p - -Sample outputs: - - 7895 - 7906 - 7910 - 7946 - 7949 - -### How do I display only running jobs? ### - -Pass the -r option to jobs command to display only running jobs only, type: - - $ jobs -r - -Sample outputs: - - [1] Running gpass & - [2] Running gnome-calculator & - [3]- Running gedit fetch-stock-prices.py & - -### How do I display only jobs that have stopped? ### - -Pass the -s option to jobs command to display only stopped jobs only, type: - - $ jobs -s - -Sample outputs: - - [4]+ Stopped ping cyberciti.biz - -To resume the ping cyberciti.biz job by entering the following bg command: - - $ bg %4 - -### jobs command options ### - -From the [bash(1)][1] command man page: - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
-lShow process id's in addition to the normal information.
-pShow process id's only.
-nShow only processes that have changed status since the last notification are printed.
-rRestrict output to running jobs only.
-sRestrict output to stopped jobs only.
-xCOMMAND is run after all job specifications that appear in ARGS have been replaced with the process ID of that job's process group leader./td>
- -### A note about /usr/bin/jobs and shell builtin ### - -Type the following type command to find out whether jobs is part of shell, external command or both: - - $ type -a jobs - -Sample outputs: - - jobs is a shell builtin - jobs is /usr/bin/jobs - -In almost all cases you need to use the jobs command that is implemented as a BASH/KSH/POSIX shell built-in. The /usr/bin/jobs command can not be used in the current shell. The /usr/bin/jobs command operates in a different environment and does not share the parent bash/ksh's shells understanding of jobs. - --------------------------------------------------------------------------------- - -via: - -作者: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.manpager.com/linux/man1/bash.1.html From 1545b896587355f25aa351f8577b3e0f499ff82e Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 16 Dec 2015 11:03:28 +0800 Subject: [PATCH 0582/1710] Create 20151204 Linux or Unix--jobs Command Examples.md --- ...04 Linux or Unix--jobs Command Examples.md | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 translated/tech/20151204 Linux or Unix--jobs Command Examples.md diff --git a/translated/tech/20151204 Linux or Unix--jobs Command Examples.md b/translated/tech/20151204 Linux or Unix--jobs Command Examples.md new file mode 100644 index 0000000000..fbb52a2544 --- /dev/null +++ b/translated/tech/20151204 Linux or Unix--jobs Command Examples.md @@ -0,0 +1,197 @@ + +Linux / Unix: jobs 命令示例 +================================================================================ + +我是个新的 Linux 或 Unix 用户。如何在 Linux 或类 Unix 系统中使用 BASH/KSH/TCSH 或者基于 POSIX 的 shell 来查看当前正在进行的作业?在 Unix/Linux 上怎样显示当前作业的状态? + +作业控制的是什么,停止/暂停进程(命令)的执行并按你的要求继续/恢复它们的执行。这是根据你的操作系统和 shell 如,bash/ksh 或 POSIX shell 来执行的。 + +shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命令来显示。 + +### 目的 ### + +> 在当前 shell 会话中显示作业的状态。 + +### 语法 ### + +其基本语法如下: + + jobs + +或 + + jobs jobID + +或者 + + jobs [options] jobID + +### 启动一些作业来进行示范 ### + +在开始使用 jobs 命令前,你需要在系统上先启动多个作业。执行以下命令来启动作业: + + ## 启动 xeyes, calculator, 和 gedit 文本编辑器 ### + xeyes & + gnome-calculator & + gedit fetch-stock-prices.py & + +最后,在前台运行 ping 命令: + + ping www.cyberciti.biz + +按 **Ctrl-Z** 键来暂停 ping 命令的作业。 + +### jobs 命令示例 ### + +要在当前 shell 显示作业的状态,请输入: + + $ jobs + +输出示例: + + [1] 7895 Running gpass & + [2] 7906 Running gnome-calculator & + [3]- 7910 Running gedit fetch-stock-prices.py & + [4]+ 7946 Stopped ping cyberciti.biz + +要显示进程 ID 或作业名称请使用 “P” 选项,输入: + + $ jobs -p %p + +或者 + + $ jobs %p + +输出示例: + + [4]- Stopped ping cyberciti.biz + +字符 % 后加一个作业。在这个例子中,你需要使用作业的名称来暂停它,如 %ping。 + +### 如何显示进程 ID 不包含其他正常的信息? ### + +通过 jobs 命令的 -l(小写的 L)选项列出每个作业的详细信息,运行: + + $ jobs -l + +示例输出: + +![Fig.01: Displaying the status of jobs in the shell](http://s0.cyberciti.org/uploads/faq/2013/02/jobs-command-output.jpg) +Fig.01: 在 shell 中显示 jobs 的状态 + +### 如何只列出最近一次状态改变的进程? ### + +首先,启动一个新的工作如下所示: + + $ sleep 100 & + +现在,只显示作业最近一次的状态(停止或退出),输入: + + $ jobs -n + +示例输出: + + [5]- Running sleep 100 & + +### 仅显示进程 ID(PID) ### + +通过 jobs 命令的 -p 选项仅显示 PID: + + $ jobs -p + +示例输出: + + 7895 + 7906 + 7910 + 7946 + 7949 + +### 怎样只显示正在运行的作业呢? ### + +通过 jobs 命令的 -r 选项只显示正在运行的作业,输入: + + $ jobs -r + +示例输出: + + [1] Running gpass & + [2] Running gnome-calculator & + [3]- Running gedit fetch-stock-prices.py & + +### 怎样只显示已经停止工作的作业? ### + +通过 jobs 命令的 -s 选项只显示停止工作的作业,输入: + + $ jobs -s + +示例输出: + + [4]+ Stopped ping cyberciti.biz + +要继续执行 ping cyberciti.biz 作业,输入以下 bg 命令: + + $ bg %4 + +### jobs 命令选项 ### + +摘自 [bash(1)][1] 命令 man 手册页: + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
-lShow process id's in addition to the normal information.
-pShow process id's only.
-nShow only processes that have changed status since the last notification are printed.
-rRestrict output to running jobs only.
-sRestrict output to stopped jobs only.
-xCOMMAND is run after all job specifications that appear in ARGS have been replaced with the process ID of that job's process group leader./td>
+ +### 关于 /usr/bin/jobs 和 shell 内建的说明 ### + +输入以下 type 命令找出是否 jobs 命令是 shell 的内建命令或是外部命令: + + $ type -a jobs + +输出示例: + + jobs is a shell builtin + jobs is /usr/bin/jobs + +在几乎所有情况下,jobs 命令都是作为 BASH/KSH/POSIX shell 内建命令被实现的。/usr/bin/jobs 命令不能被用在当前 shell 中。/usr/bin/jobs 命令工作在不同的环境中不共享父 bash/ksh 的 shells 来执行作业。 + +-------------------------------------------------------------------------------- + +via: + +作者:Vivek Gite +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.manpager.com/linux/man1/bash.1.html From b455cc65a1528fcd4a11c424336b066c45f8c0fc Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 16 Dec 2015 16:20:34 +0800 Subject: [PATCH 0583/1710] Translating by ZTinoZ --- ... Install Bugzilla with Apache and SSL on FreeBSD 10.2.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index e3c14d4a92..37b7819959 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -1,13 +1,13 @@ 如何在FreeBSD 10.2上配置Apache和SSL并安装Bugzilla ================================================================================ -Bugzilla is open source web base application for bug tracker and testing tool, develop by mozilla project, and licensed under Mozilla Public License. It is used by high tech company like mozilla, redhat and gnome. Bugzilla was originally created by Terry Weissman in 1998. It written in perl, use MySQL as the database back-end. It is a server software designed to help you manage software development. Bugzilla has a lot of features, optimized database, excellent security, advanced search tool, integrated with email capabilities etc. +Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由mozilla计划开发并由Mozilla公共许可证授权。它经常被一些高科技公司如mozilla、红帽公司和gnome使用。Bugzilla起初由Terry Weissman在1998年创立,它用perl语言编写,用MySQL作为后端数据库。它是一款旨在帮助管理软件开发的服务器软件,它功能丰富、高优化度的数据库、卓越的安全性、高级的搜索工具、整合邮件功能等等。 在本教程中,我们将给web服务器安装bugzilla 5.0的apache并为它启用SSL,然后在freebsd 10.2上安装mysql51来作为数据库系统。 #### 准备 #### - FreeBSD 10.2 - 64bit. - Root privileges. + FreeBSD 10.2 - 64位 + Root权限 ### 第一步 - 更新系统 ### From ab7d93830a3a5464fbfad17646f2821feead3b68 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 14 Dec 2015 01:18:06 +0800 Subject: [PATCH 0584/1710] PUB:20151201 Linux and Unix Port Scanning With netcat [nc] Command @strugglingyouth --- ... Port Scanning With netcat [nc] Command.md | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) rename {translated/tech => published}/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md (69%) diff --git a/translated/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md b/published/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md similarity index 69% rename from translated/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md rename to published/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md index 9672c222af..f6d69b0cf5 100644 --- a/translated/tech/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md +++ b/published/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md @@ -1,25 +1,21 @@ - 使用 netcat [nc] 命令对 Linux 和 Unix 进行端口扫描 ================================================================================ -我如何在自己的服务器上找出哪些端口是开放的?如何使用 nc 命令进行端口扫描来替换 [Linux 或 类 Unix 中的 nmap 命令][1]? +我如何在自己的服务器上找出哪些端口是开放的?如何使用 nc 命令进行端口扫描来替换 [Linux 或类 Unix 中的 nmap 命令][1]? -nmap (“Network Mapper”)是一个开源工具用于网络探测和安全审核。如果 nmap 没有安装或者你不希望使用 nmap,那你可以用 netcat/nc 命令进行端口扫描。它对于查看目标计算机上哪些端口是开放的或者运行着服务是非常有用的。你也可以使用 [nmap 命令进行端口扫描][2] 。 +nmap (“Network Mapper”)是一个用于网络探测和安全审核的开源工具。如果 nmap 没有安装或者你不希望使用 nmap,那你可以用 netcat/nc 命令进行端口扫描。它对于查看目标计算机上哪些端口是开放的或者运行着服务是非常有用的。你也可以使用 [nmap 命令进行端口扫描][2] 。 ### 如何使用 nc 来扫描 Linux,UNIX 和 Windows 服务器的端口呢? ### -If nmap is not installed try nc / netcat command as follow. The -z flag can be used to tell nc to report open ports, rather than initiate a connection. Run nc command with -z flag. You need to specify host name / ip along with the port range to limit and speedup operation: +如果未安装 nmap,试试 nc/netcat 命令,如下所示。-z 参数用来告诉 nc 报告开放的端口,而不是启动连接。在 nc 命令中使用 -z 参数时,你需要在主机名/ip 后面限定端口的范围和加速其运行: - -如果未安装 nmap,如下所示,试试 nc/netcat 命令。-z 参数用来告诉 nc 报告开放的端口,而不是启动连接。在 nc 命令中使用 -z 参数时,你需要在主机名/ip 后面指定端口的范围来限制和加速其运行: - - ## 语法 ## - nc -z -v {host-name-here} {port-range-here} + ### 语法 ### + ### nc -z -v {host-name-here} {port-range-here} nc -z -v host-name-here ssh nc -z -v host-name-here 22 nc -w 1 -z -v server-name-here port-Number-her - ## 扫描 1 to 1023 端口 ## + ### 扫描 1 to 1023 端口 ### nc -zv vip-1.vsnl.nixcraft.in 1-1023 输出示例: @@ -42,16 +38,16 @@ If nmap is not installed try nc / netcat command as follow. The -z flag can be u nc -zv v.txvip1 smtp nc -zvn v.txvip1 ftp - ## really fast scanner with 1 timeout value ## + ### 使用1秒的超时值来更快的扫描 ### netcat -v -z -n -w 1 v.txvip1 1-1023 输出示例: ![Fig.01: Linux/Unix: Use Netcat to Establish and Test TCP and UDP Connections on a Server](http://s0.cyberciti.org/uploads/faq/2007/07/scan-with-nc.jpg) -图01:Linux/Unix:使用 Netcat 来测试 TCP 和 UDP 与服务器建立连接, +*图01:Linux/Unix:使用 Netcat 来测试 TCP 和 UDP 与服务器建立连接* -1. -z : 端口扫描模式即 I/O 模式。 +1. -z : 端口扫描模式即零 I/O 模式。 1. -v : 显示详细信息 [使用 -vv 来输出更详细的信息]。 1. -n : 使用纯数字 IP 地址,即不用 DNS 来解析 IP 地址。 1. -w 1 : 设置超时值设置为1。 @@ -88,12 +84,12 @@ via: http://www.cyberciti.biz/faq/linux-port-scanning/ 作者:Vivek Gite 译者:[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/) 荣誉推出 -[1]:http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/ -[2]:http://www.cyberciti.biz/tips/linux-scanning-network-for-open-ports.html -[3]:http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/ +[1]:https://linux.cn/article-2561-1.html +[2]:https://linux.cn/article-2561-1.html +[3]:https://linux.cn/article-2561-1.html [4]:http://www.manpager.com/linux/man1/nc.1.html [5]:http://www.manpager.com/linux/man1/nmap.1.html From 8b0330faf17de141a6cb288ecf8ae61b38a44da0 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 16 Dec 2015 23:33:13 +0800 Subject: [PATCH 0585/1710] PUB:20151202 How to use the Linux ftp command to up- and download files on the shell @Vic020 --- ... to up- and download files on the shell.md | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) rename {translated/tech => published}/20151202 How to use the Linux ftp command to up- and download files on the shell.md (52%) diff --git a/translated/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md b/published/20151202 How to use the Linux ftp command to up- and download files on the shell.md similarity index 52% rename from translated/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md rename to published/20151202 How to use the Linux ftp command to up- and download files on the shell.md index 11983e0e80..dbb7e9d189 100644 --- a/translated/tech/20151202 How to use the Linux ftp command to up- and download files on the shell.md +++ b/published/20151202 How to use the Linux ftp command to up- and download files on the shell.md @@ -1,11 +1,10 @@ -如何在命令行中使用ftp命令上传和下载文件 +如何在命令行中使用 ftp 命令上传和下载文件 ================================================================================ -本文中,介绍在Linux shell中如何使用ftp命令。包括如何连接FTP服务器,上传或下载文件以及创建文件夹。尽管现在有许多不错的FTP桌面应用,但是在服务器、ssh、远程回话中命令行ftp命令还是有很多应用的。比如。需要服务器从ftp仓库拉取备份。 +本文中,介绍在 Linux shell 中如何使用 ftp 命令。包括如何连接 FTP 服务器,上传或下载文件以及创建文件夹。尽管现在有许多不错的 FTP 桌面应用,但是在服务器、SSH、远程会话中命令行 ftp 命令还是有很多应用的。比如。需要服务器从 ftp 仓库拉取备份。 -### 步骤 1: 建立FTP连接 ### +### 步骤 1: 建立 FTP 连接 ### - -想要连接FTP服务器,在命令上中先输入'**ftp**'然后空格跟上FTP服务器的域名'domain.com'或者IP地址 +想要连接 FTP 服务器,在命令上中先输入`ftp`然后空格跟上 FTP 服务器的域名 'domain.com' 或者 IP 地址 #### 例如: #### @@ -15,17 +14,17 @@ ftp user@ftpdomain.com -**注意: 本次例子使用匿名服务器.** +**注意: 本例中使用匿名服务器。** -替换下面例子中IP或域名为你的服务器地址。 +替换下面例子中 IP 或域名为你的服务器地址。 -![FTP登录](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/ftpanonymous.png) +![FTP 登录](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/ftpanonymous.png) ### 步骤 2: 使用用户名密码登录 ### -绝大多数的FTP服务器是使用密码保护的,因此这些FTP服务器会询问'**用户名**'和'**密码**'. +绝大多数的 FTP 服务器是使用密码保护的,因此这些 FTP 服务器会询问'**username**'和'**password**'. -如果你连接到被动匿名FTP服务器,可以尝试"anonymous"作为用户名以及空密码: +如果你连接到被称作匿名 FTP 服务器(LCTT 译注:即,并不需要你有真实的用户信息即可使用的 FTP 服务器称之为匿名 FTP 服务器),可以尝试`anonymous`作为用户名以及使用空密码: Name: anonymous @@ -40,15 +39,14 @@ 登录成功。 -![FTP登录成功](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/login.png) +![FTP 登录成功](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/login.png) ### 步骤 3: 目录操作 ### -FTP命令可以列出、移动和创建文件夹,如同我们在本地使用我们的电脑一样。ls可以打印目录列表,cd可以改变目录,mkdir可以创建文件夹。 +FTP 命令可以列出、移动和创建文件夹,如同我们在本地使用我们的电脑一样。`ls`可以打印目录列表,`cd`可以改变目录,`mkdir`可以创建文件夹。 #### 使用安全设置列出目录 #### - ftp> ls 服务器将返回: @@ -74,15 +72,15 @@ FTP命令可以列出、移动和创建文件夹,如同我们在本地使用 ![FTP中改变目录](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/directory.png) -### 步骤 4: 使用FTP下载文件 ### +### 步骤 4: 使用 FTP 下载文件 ### -在下载一个文件之前,我们首先需要使用lcd命令设定本地接受目录位置。 +在下载一个文件之前,我们首先需要使用`lcd`命令设定本地接受目录位置。 lcd /home/user/yourdirectoryname -如果你不指定下载目录,文件将会下载到你登录FTP时候的工作目录。 +如果你不指定下载目录,文件将会下载到你登录 FTP 时候的工作目录。 -现在,我们可以使用命令get来下载文件,比如: +现在,我们可以使用命令 get 来下载文件,比如: get file @@ -98,15 +96,15 @@ FTP命令可以列出、移动和创建文件夹,如同我们在本地使用 ![使用FTP下载文件](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/gettingfile.png) -下载多个文件可以使用通配符。例如,下面这个例子我打算下载所有以.xls结尾的文件。 +下载多个文件可以使用通配符及 `mget` 命令。例如,下面这个例子我打算下载所有以 .xls 结尾的文件。 mget *.xls -### 步骤 5: 使用FTP上传文件 ### +### 步骤 5: 使用 FTP 上传文件 ### -完成FTP连接后,FTP同样可以上传文件 +完成 FTP 连接后,FTP 同样可以上传文件 -使用put命令上传文件: +使用 `put`命令上传文件: put file @@ -118,7 +116,7 @@ FTP命令可以列出、移动和创建文件夹,如同我们在本地使用 mput *.xls -### 步骤 6: 关闭FTP连接 ### +### 步骤 6: 关闭 FTP 连接 ### 完成FTP工作后,为了安全起见需要关闭连接。有三个命令可以关闭连接: @@ -134,7 +132,7 @@ FTP命令可以列出、移动和创建文件夹,如同我们在本地使用 ![](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/goodbye.png) -需要更多帮助,在使用ftp命令连接到服务器后,可以使用“help”获得更多帮助。 +需要更多帮助,在使用 ftp 命令连接到服务器后,可以使用`help`获得更多帮助。 ![](https://www.howtoforge.com/images/how-to-use-ftp-in-the-linux-shell/big/helpwindow.png) @@ -143,6 +141,6 @@ FTP命令可以列出、移动和创建文件夹,如同我们在本地使用 via: https://www.howtoforge.com/tutorial/how-to-use-ftp-on-the-linux-shell/ 译者:[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 0718c7f49179212b6bb1e54964fdba1a1199d95e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 16 Dec 2015 23:34:12 +0800 Subject: [PATCH 0586/1710] PUB:20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command @oska874 --- ...Command Line Operation Using PV Command.md | 80 +++++++++++++++++++ ...Command Line Operation Using PV Command.md | 80 ------------------- 2 files changed, 80 insertions(+), 80 deletions(-) create mode 100644 published/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md delete mode 100644 translated/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md diff --git a/published/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/published/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md new file mode 100644 index 0000000000..37e17b4266 --- /dev/null +++ b/published/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md @@ -0,0 +1,80 @@ +如何使用 pv 命令监控 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(LCTT 译注:估计剩余的时间)。好事是你不必记住某一个选项,因为默认这几个选项都是启用的。但是,如果你只要其中某一个信息,那么可以通过控制这几个选项来完成任务。 + +这里还有一个`-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) +校对:[wxy](https://github.com/wxy) + +本文由 [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 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 deleted file mode 100644 index 2003bcff47..0000000000 --- a/translated/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 ba903117bd98f6bd2f92fe0333066839af837b08 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 16 Dec 2015 23:35:49 +0800 Subject: [PATCH 0587/1710] =?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 --- ...31 Linux workstation security checklist.md | 150 ++++++++++-------- 1 file changed, 83 insertions(+), 67 deletions(-) diff --git a/translated/tech/20150831 Linux workstation security checklist.md b/translated/tech/20150831 Linux workstation security checklist.md index 11155a48e0..7353eec493 100644 --- a/translated/tech/20150831 Linux workstation security checklist.md +++ b/translated/tech/20150831 Linux workstation security checklist.md @@ -1,114 +1,127 @@ -Linux平台安全备忘录 +Linux 基金会内部的 Linux 工作站安全检查清单 ================================================================================ -这是一组Linux基金会自己系统管理员的推荐规范。所有Linux基金会的雇员都是远程工作,我们使用这套指导方针确保系统管理员的系统通过核心安全需求,降低我们平台成为攻击目标的风险。 -即使你的系统管理员不用远程工作,很有可能的是,很多人的工作是在一个便携的笔记本上完成的,或者在业余时间或紧急时刻他们在工作平台中部署自己的家用系统。不论发生何种情况,你都能对应这个规范匹配到你的环境中。 +### 目标受众 -这绝不是一个详细的“工作站加固”文档,可以说这是一个努力避免大多数明显安全错误导致太多不便的一组规范的底线。你可能阅读这个文档会认为它的方法太偏执,同时另一些人也许会认为这仅仅是一些肤浅的研究。安全就像在高速公路上开车 -- 任何比你开的慢的都是一个傻瓜,然而任何比你开的快的人都是疯子。这个指南仅仅是一些列核心安全规则,既不详细又不是替代经验,警惕,和常识。 + 这是一套 Linux 基金会为其系统管理员提供的推荐规范。 + +这个文档用于帮助那些使用 Linux 工作站来访问和管理项目的 IT 设施的系统管理员团队。 + +如果你的系统管理员是远程员工,你也许可以使用这套指导方针确保系统管理员的系统可以通过核心安全需求,降低你的IT 平台成为攻击目标的风险。 + +即使你的系统管理员不是远程员工,很多人也会在工作环境中通过便携笔记本完成工作,或者在家中设置系统以便在业余时间或紧急时刻访问工作平台。不论发生何种情况,你都能调整这个推荐规范来适应你的环境。 + + +### 限制 + +但是,这并不是一个详细的“工作站加固”文档,可以说这是一个努力避免大多数明显安全错误而不会导致太多不便的一组推荐基线(baseline)。你也许阅读这个文档后会认为它的方法太偏执,而另一些人也许会认为这仅仅是一些肤浅的研究。安全就像在高速公路上开车 -- 任何比你开的慢的都是一个傻瓜,然而任何比你开的快的人都是疯子。这个指南仅仅是一些列核心安全规则,既不详细又不能替代经验、警惕和常识。 + +我们分享这篇文档是为了[将开源协作的优势带到 IT 策略文献资料中][18]。如果你发现它有用,我们希望你可以将它用到你自己团体中,并分享你的改进,对它的完善做出你的贡献。 + +### 结构 每一节都分为两个部分: - 核对适合你项目的需求 -- 随意列出关心的项目,解释为什么这么决定 +- 形式不定的提示内容,解释了为什么这么做 -## 严重级别 +#### 严重级别 -在清单的每一个项目都包括严重级别,这些是我们希望能帮助指导你的决定: +在清单的每一个项目都包括严重级别,我们希望这些能帮助指导你的决定: -- _(关键)_ 项目应该在考虑列表上被明确的重视。如果不采取措施,将会导致你的平台安全出现高风险。 -- _(中等)_ 项目将改善你的安全形态,但不是很重要,尤其是如果他们太多的干涉你的工作流程。 -- _(低等)_ 项目也许会改善整体安全性,但是在便利权衡下也许并不值得。 -- _(可疑)_ 留作感觉会明显完善我们平台安全的项目,但是可能会需要大量的调整与操作系统交互的方式。 +- **关键(ESSENTIAL)** 该项应该在考虑列表上被明确的重视。如果不采取措施,将会导致你的平台安全出现高风险。 +- **中等(NICE)** 该项将改善你的安全形势,但是会影响到你的工作环境的流程,可能会要求养成新的习惯,改掉旧的习惯。 +- **可疑(PARANOID)** 留作感觉会明显完善我们平台安全、但是可能会需要大量调整与操作系统交互的方式的项目。 -记住,这些只是参考。如果你觉得这些严重级别不能表达你的工程对安全承诺,正如你所见你应该调整他们为你合适的。 +记住,这些只是参考。如果你觉得这些严重级别不能反映你的工程对安全的承诺,你应该调整它们为你所合适的。 ## 选择正确的硬件 -我们禁止管理员使用一个特殊供应商或者一个特殊的型号,所以在选择工作系统时这部分是核心注意事项。 +我们并不会要求管理员使用一个特殊供应商或者一个特殊的型号,所以这一节提供的是选择工作系统时的核心注意事项。 -### 清单 +### 检查清单 -- [ ] 系统支持安全启动 _(关键)_ -- [ ] 系统没有火线,雷电或者扩展卡接口 _(中等)_ -- [ ] 系统有TPM芯片 _(低)_ +- [ ] 系统支持安全启动(SecureBoot) _(关键)_ +- [ ] 系统没有火线(Firewire),雷电(thunderbolt)或者扩展卡(ExpressCard)接口 _(中等)_ +- [ ] 系统有 TPM 芯片 _(中等)_ ### 注意事项 -#### 安全引导 +#### 安全启动(SecureBoot) -尽管它是有争议的性质,安全引导提供了对抗很多针对平台的攻击(Rootkits, "Evil Maid,"等等),没有介绍太多额外的麻烦。它将不会停止真正专用的攻击者,加上有很大程度上,站点安全机构有办法应对它(可能通过设计),但是拥有安全引导总比什么都没有强。 +尽管它还有争议,但是安全引导能够预防很多针对工作站的攻击(Rootkits、“Evil Maid”,等等),而没有太多额外的麻烦。它并不能阻止真正专门的攻击者,加上在很大程度上,国家安全机构有办法应对它(可能是通过设计),但是有安全引导总比什么都没有强。 -作为选择,你也许部署了[Anti Evil Maid][1]提供更多健全的保护,对抗安全引导支持的攻击类型,但是它需要更多部署和维护的工作。 +作为选择,你也许可以部署 [Anti Evil Maid][1] 提供更多健全的保护,以对抗安全引导所需要阻止的攻击类型,但是它需要更多部署和维护的工作。 -#### 系统没有火线,雷电或者扩展卡接口 +#### 系统没有火线(Firewire),雷电(thunderbolt)或者扩展卡(ExpressCard)接口 -火线是一个标准,故意的,允许任何连接设备完全直接内存访问你的系统([查看维基百科][2])。雷电接口和扩展卡同样有问题,虽然一些后来部署的雷电接口试图限制内存访问的范围。如果你没有这些系统端口,那是最好的,但是它并不严重,他们通常可以通过UEFI或内核本身禁用。 +火线是一个标准,其设计上允许任何连接的设备能够完全地直接访问你的系统内存(参见[维基百科][2])。雷电接口和扩展卡同样有问题,虽然一些后来部署的雷电接口试图限制内存访问的范围。如果你没有这些系统端口,那是最好的,但是它并不严重,它们通常可以通过 UEFI 关闭或内核本身禁用。 -#### TPM芯片 +#### TPM 芯片 -可信平台模块(TPM)是主板上的一个与核心处理器单独分开的加密芯片,他可以用来增加平台的安全性(比如存储完整磁盘加密密钥),不过通常不用在日常平台操作。最多,这是个很好的存在,除非你有特殊需要使用TPM增加你平台安全性。 +可信平台模块(Trusted Platform Module ,TPM)是主板上的一个与核心处理器单独分开的加密芯片,它可以用来增加平台的安全性(比如存储全盘加密的密钥),不过通常不会用于日常的平台操作。充其量,这个是一个有则更好的东西,除非你有特殊需求,需要使用 TPM 增加你的工作站安全性。 ## 预引导环境 -这是你开始安装系统前的一系列推荐规范。 +这是你开始安装操作系统前的一系列推荐规范。 ### 清单 -- [ ] 使用UEFI引导模式(不是传统BIOS)_(关键)_ -- [ ] 进入UEFI配置需要使用密码 _(关键)_ +- [ ] 使用 UEFI 引导模式(不是传统 BIOS)_(关键)_ +- [ ] 进入 UEFI 配置需要使用密码 _(关键)_ - [ ] 使用安全引导 _(关键)_ -- [ ] 启动系统需要UEFI级别密码 _(低)_ +- [ ] 启动系统需要 UEFI 级别密码 _(中等)_ ### 注意事项 -#### UEFI和安全引导 +#### UEFI 和安全引导 -UEFI尽管有缺点,还是提供很多传统BIOS没有的好功能,比如安全引导。大多数现代的系统都默认使用UEFI模式。 +UEFI 尽管有缺点,还是提供很多传统 BIOS 没有的好功能,比如安全引导。大多数现代的系统都默认使用 UEFI 模式。 -UEFI配置模式密码要确保密码强度。注意,很多厂商默默地限制了你使用密码长度,所以对比长口令你也许应该选择高熵短密码(更多地密码短语看下面)。 +确保进入 UEFI 配置模式要使用高强度密码。注意,很多厂商默默地限制了你使用密码长度,所以相比长口令你也许应该选择高熵值的短密码(关于密码短语请参考下面内容)。 -基于你选择的Linux分支,你也许会也许不会跳过额外的圈子,以导入你的发行版的安全引导键,才允许你启动发行版。很多分支已经与微软合作大多数厂商给他们已发布的内核签订密钥,这已经是大多数厂商公认的了,因此为了避免问题你必须处理密钥导入。 +基于你选择的 Linux 发行版,你也许需要、也许不需要按照 UEFI 的要求,来导入你的发行版的安全引导密钥,从而允许你启动该发行版。很多发行版已经与微软合作,用大多数厂商所支持的密钥给它们已发布的内核签名,因此避免了你必须处理密钥导入的麻烦。 -作为一个额外的措施,在允许某人得到引导分区然后尝试做一些不好的事之前,让他们输入密码。为了防止肩窥,这个密码应该跟你的UEFI管理密码不同。如果你关闭启动太多,你也许该选择别把心思费在这上面,当你已经进入LUKS密码,这将为您节省一些额外的按键。 +作为一个额外的措施,在允许某人访问引导分区然后尝试做一些不好的事之前,让他们输入密码。为了防止肩窥(shoulder-surfing),这个密码应该跟你的 UEFI 管理密码不同。如果你经常关闭和启动,你也许不想这么麻烦,因为你已经必须输入 LUKS 密码了(LUKS 参见下面内容),这样会让你您减少一些额外的键盘输入。 ## 发行版选择注意事项 -很有可能你会坚持一个广泛使用的发行版如Fedora,Ubuntu,Arch,Debian,或他们的一个类似分支。无论如何,这是你选择使用发行版应该考虑的。 +很有可能你会坚持一个广泛使用的发行版如 Fedora,Ubuntu,Arch,Debian,或它们的一个类似分支。无论如何,以下是你选择使用发行版应该考虑的。 ### 清单 -- [ ] 拥有一个强健的MAC/RBAC系统(SELinux/AppArmor/Grsecurity) _(关键)_ -- [ ] 公开的安全公告 _(关键)_ +- [ ] 拥有一个强健的 MAC/RBAC 系统(SELinux/AppArmor/Grsecurity) _(关键)_ +- [ ] 发布安全公告 _(关键)_ - [ ] 提供及时的安全补丁 _(关键)_ -- [ ] 提供密码验证的包 _(关键)_ -- [ ] 完全支持UEFI和安全引导 _(关键)_ +- [ ] 提供软件包的加密验证 _(关键)_ +- [ ] 完全支持 UEFI 和安全引导 _(关键)_ - [ ] 拥有健壮的原生全磁盘加密支持 _(关键)_ ### 注意事项 -#### SELinux,AppArmor,和GrSecurity/PaX +#### SELinux,AppArmor,和 GrSecurity/PaX -强制访问控制(MAC)或者基于角色的访问控制(RBAC)是一个POSIX系统遗留的基于用户或组的安全机制延伸。这些天大多数发行版已经绑定MAC/RBAC系统(Fedora,Ubuntu),或通过提供一种机制一个可选的安装后的步骤来添加它(Gentoo,Arch,Debian)。很明显,强烈建议您选择一个预装MAC/RBAC系统的分支,但是如果你对一个分支情有独钟,没有默认启用它,装完系统后应计划配置安装它。 +强制访问控制(Mandatory Access Controls,MAC)或者基于角色的访问控制(Role-Based Access Controls,RBAC)是一个用在老式 POSIX 系统的基于用户或组的安全机制扩展。现在大多数发行版已经捆绑了 MAC/RBAC 系统(Fedora,Ubuntu),或通过提供一种机制一个可选的安装后步骤来添加它(Gentoo,Arch,Debian)。显然,强烈建议您选择一个预装 MAC/RBAC 系统的发行版,但是如果你对某个没有默认启用它的发行版情有独钟,装完系统后应计划配置安装它。 -应该坚决避免使用不带任何MAC/RBAC机制的分支,像传统的POSIX基于用户和组的安全在当今时代应该算是考虑不足。如果你想建立一个MAC/RBAC工作站,通常会考虑AppArmor和PaX,他们比SELinux更容易学习。此外,在一个工作站上,有很少或者没有额外的监听用户运行的应用造成的最高风险,GrSecurity/PaX_可能_会比SELinux提供更多的安全效益。 +应该坚决避免使用不带任何 MAC/RBAC 机制的发行版,像传统的 POSIX 基于用户和组的安全在当今时代应该算是考虑不足。如果你想建立一个 MAC/RBAC 工作站,通常认为 AppArmor 和 PaX 比 SELinux 更容易掌握。此外,在工作站上,很少有或者根本没有对外监听的守护进程,而针对用户运行的应用造成的最高风险,GrSecurity/PaX _可能_ 会比SELinux 提供更多的安全便利。 #### 发行版安全公告 -大多数广泛使用的分支都有一个机制发送安全公告到他们的用户,但是如果你对一些机密感兴趣,查看开发人员是否有记录机制提醒用户安全漏洞和补丁。缺乏这样的机制是一个重要的警告信号,这个分支不够成熟,不能被视为主要管理工作站。 +大多数广泛使用的发行版都有一个给它们的用户发送安全公告的机制,但是如果你对一些机密感兴趣,去看看开发人员是否有见于文档的提醒用户安全漏洞和补丁的机制。缺乏这样的机制是一个重要的警告信号,说明这个分支不够成熟,不能被用作主要管理员的工作站。 #### 及时和可靠的安全更新 -多数常用的发行版提供的定期安全更新,但为确保关键包更新及时提供是值得检查的。避免使用分支和"社区重建"的原因是,由于不得不等待上游分支先发布它,他们经常延迟安全更新。 +多数常用的发行版提供定期安全更新,但应该经常检查以确保及时提供关键包更新。因此应避免使用附属发行版(spin-offs)和“社区重构”,因为它们必须等待上游分支先发布,它们经常延迟发布安全更新。 -你如果找到一个在安装包,更新元数据,或两者上不使用加密签名的发行版,将会处于困境。这么说,常用的发行版多年前就已经知道这个基本安全的意义(Arch,我正在看你),所以这也是值得检查的。 +现在,很难找到一个不使用加密签名、更新元数据或二者都不使用的发行版。如此说来,常用的发行版在引入这个基本安全机制就已经知道这些很多年了(Arch,我正在看你),所以这也是值得检查的。 -#### 发行版支持UEFI和安全引导 +#### 发行版支持 UEFI 和安全引导 -检查发行版支持UEFI和安全引导。查明它是否需要导入额外的密钥或是否要求启动内核有一个已经被系统厂商信任的密钥签名(例如跟微软达成合作)。一些发行版不支持UEFI或安全启动,但是提供了替代品来确保防篡改或防破坏引导环境([Qubes-OS][3]使用Anti Evil Maid,前面提到的)。如果一个发行版不支持安全引导和没有机制防止引导级别攻击,还是看看别的吧。 +检查发行版是否支持 UEFI 和安全引导。查明它是否需要导入额外的密钥或是否要求启动内核有一个已经被系统厂商信任的密钥签名(例如跟微软达成合作)。一些发行版不支持 UEFI 或安全启动,但是提供了替代品来确保防篡改(tamper-proof)或防破坏(tamper-evident)引导环境([Qubes-OS][3] 使用 Anti Evil Maid,前面提到的)。如果一个发行版不支持安全引导,也没有防止引导级别攻击的机制,还是看看别的吧。 #### 全磁盘加密 -全磁盘加密是保护静止数据要求,大多数发行版都支持。作为一个选择方案,系统自加密硬件驱动也许用来(通常通过主板TPM芯片实现)和提供类似安全级别加更快的选项,但是花费也更高。 +全磁盘加密是保护静止数据的要求,大多数发行版都支持。作为一个选择方案,带有自加密硬盘的系统也可以用(通常通过主板 TPM 芯片实现),并提供了类似安全级别而且操作更快,但是花费也更高。 ## 发行版安装指南 @@ -148,7 +161,7 @@ UEFI配置模式密码要确保密码强度。注意,很多厂商默默地限 #### Root,用户密码和管理组 -我们建议,你的root密码和你的LUKS加密使用同样的密码(除非你共享你的笔记本给可信的人,他应该能解锁设备,但是不应该能成为root用户)。如果你是笔记本电脑的唯一用户,那么你的root密码与你的LUKS密码不同是没有意义的安全优势。通常,你可以使用同样的密码在你的UEFI管理,磁盘加密,和root登陆 -- 知道这些任意一个都会让攻击者完全控制您的系统,在单用户工作站上使这些密码不同,没有任何安全益处。 +我们建议,你的root密码和你的LUKS加密使用同样的密码(除非你共享你的笔记本给可信的人,它应该能解锁设备,但是不应该能成为root用户)。如果你是笔记本电脑的唯一用户,那么你的root密码与你的LUKS密码不同是没有意义的安全优势。通常,你可以使用同样的密码在你的UEFI管理,磁盘加密,和root登陆 -- 知道这些任意一个都会让攻击者完全控制您的系统,在单用户工作站上使这些密码不同,没有任何安全益处。 你应该有一个不同的,但同样强健的常规用户帐户密码用来每天工作。这个用户应该是管理组用户(例如`wheel`或者类似,根据分支),允许你执行`sudo`来提升权限。 @@ -167,7 +180,7 @@ UEFI配置模式密码要确保密码强度。注意,很多厂商默默地限 - 用户登陆和sudo - 密码管理器的主密码 -很明显,如果有一个令人信服的理由他们所有可以不同。 +很明显,如果有一个令人信服的理由它们所有可以不同。 ## 安装后的加强 @@ -230,7 +243,7 @@ UEFI配置模式密码要确保密码强度。注意,很多厂商默默地限 #### Rkhunter和IDS -安装`rkhunter`和一个入侵检测系统(IDS)像`aide`或者`tripwire`将不会有用,除非你确实理解他们如何工作采取必要的步骤来设置正确(例如,保证数据库在额外的媒介,从可信的环境运行检测,记住执行系统更新和配置更改后要刷新数据库散列,等等)。如果你不愿在你的工作站执行这些步骤调整你如何工作,这些工具将带来麻烦没有任何实在的安全益处。 +安装`rkhunter`和一个入侵检测系统(IDS)像`aide`或者`tripwire`将不会有用,除非你确实理解它们如何工作采取必要的步骤来设置正确(例如,保证数据库在额外的媒介,从可信的环境运行检测,记住执行系统更新和配置更改后要刷新数据库散列,等等)。如果你不愿在你的工作站执行这些步骤调整你如何工作,这些工具将带来麻烦没有任何实在的安全益处。 我们强烈建议你安装`rkhunter`并每晚运行它。它相当易于学习和使用,虽然它不会阻止一个复杂的攻击者,它也能帮助你捕获你自己的错误。 @@ -265,19 +278,19 @@ UEFI配置模式密码要确保密码强度。注意,很多厂商默默地限 ### 浏览 -毫无疑问,在你的系统上web浏览器将是最大、最容易暴露的攻击层面的软件。它是专门下载和执行不可信,恶意代码的一个工具。它试图采用沙箱和代码卫生处理等多种机制保护你免受这种危险,但是在之前多个场合他们都被击败了。你应该学到浏览网站是最不安全的活动在你参与的任何一天。 +毫无疑问,在你的系统上web浏览器将是最大、最容易暴露的攻击层面的软件。它是专门下载和执行不可信,恶意代码的一个工具。它试图采用沙箱和代码卫生处理等多种机制保护你免受这种危险,但是在之前多个场合它们都被击败了。你应该学到浏览网站是最不安全的活动在你参与的任何一天。 有几种方法可以减少浏览器的影响,但真正有效的方法需要你操作您的工作站将发生显著的变化。 #### 1: 实用两个不同的浏览器 -这很容易做到,但是只有很少的安全效益。并不是所有浏览器都妥协给攻击者完全自由访问您的系统 -- 有时他们只能允许一个读取本地浏览器存储,窃取其他标签的活动会话,捕获输入浏览器,例如,实用两个不同的浏览器,一个用在工作/高安全站点,另一个用在其他,有助于防止攻击者请求整个饼干罐的小妥协。主要的不便是两个不同的浏览器消耗内存大量。 +这很容易做到,但是只有很少的安全效益。并不是所有浏览器都妥协给攻击者完全自由访问您的系统 -- 有时它们只能允许一个读取本地浏览器存储,窃取其它标签的活动会话,捕获输入浏览器,例如,实用两个不同的浏览器,一个用在工作/高安全站点,另一个用在其它,有助于防止攻击者请求整个饼干罐的小妥协。主要的不便是两个不同的浏览器消耗内存大量。 我们建议: ##### 火狐用来工作和高安全站点 -使用火狐登陆工作有关的站点,应该额外关心的是确保数据如cookies,会话,登陆信息,打键次数等等,明显不应该落入攻击者手中。除了少数的几个网站,你不应该用这个浏览器访问其他网站。 +使用火狐登陆工作有关的站点,应该额外关心的是确保数据如cookies,会话,登陆信息,打键次数等等,明显不应该落入攻击者手中。除了少数的几个网站,你不应该用这个浏览器访问其它网站。 你应该安装下面的火狐扩展: @@ -285,25 +298,25 @@ UEFI配置模式密码要确保密码强度。注意,很多厂商默默地限 - NoScript阻止活动内容加载,除非在用户白名单里的域名。跟你默认浏览器比它使用起来很麻烦(可是提供了真正好的安全效益),所以我们建议只在开启了它的浏览器上访问与工作相关的网站。 - [ ] Privacy Badger _(关键)_ - - EFF的Privacy Badger将在加载时预防大多数外部追踪器和广告平台,在这些追踪站点影响你的浏览器时将有助于避免妥协(追踪着和广告站点通常会成为攻击者的目标,因为他们会迅速影响世界各地成千上万的系统)。 + - EFF的Privacy Badger将在加载时预防大多数外部追踪器和广告平台,在这些追踪站点影响你的浏览器时将有助于避免妥协(追踪着和广告站点通常会成为攻击者的目标,因为它们会迅速影响世界各地成千上万的系统)。 - [ ] HTTPS Everywhere _(关键)_ - 这个EFF开发的扩展将确保你访问的大多数站点都在安全连接上,甚至你点击的连接使用的是http://(有效的避免大多数的攻击,例如[SSL-strip][7])。 - [ ] Certificate Patrol _(中等)_ - - 如果你正在访问的站点最近改变了他们的TLS证书 -- 特别是如果不是接近失效期或者现在使用不同的证书颁发机构,这个工具将会警告你。它有助于警告你是否有人正尝试中间人攻击你的连接,但是产生很多无害的假的类似情况。 + - 如果你正在访问的站点最近改变了它们的TLS证书 -- 特别是如果不是接近失效期或者现在使用不同的证书颁发机构,这个工具将会警告你。它有助于警告你是否有人正尝试中间人攻击你的连接,但是产生很多无害的假的类似情况。 你应该让火狐成为你的默认打开连接的浏览器,因为NoScript将在加载或者执行时阻止大多数活动内容。 -##### 其他一切都用Chrome/Chromium +##### 其它一切都用Chrome/Chromium -Chromium开发者在增加很多很好的安全特性方面比火狐强(至少[在Linux上][6])),例如seccomp沙箱,内核用户名空间等等,这担当一个你访问网站和你其他系统间额外的隔离层。Chromium是流开源项目,Chrome是Google所有的基于它构建的包(使用它输入时要非常谨慎任,何你不想让谷歌知道的事情都不要使用它)。 +Chromium开发者在增加很多很好的安全特性方面比火狐强(至少[在Linux上][6])),例如seccomp沙箱,内核用户名空间等等,这担当一个你访问网站和你其它系统间额外的隔离层。Chromium是流开源项目,Chrome是Google所有的基于它构建的包(使用它输入时要非常谨慎任,何你不想让谷歌知道的事情都不要使用它)。 -有人推荐你在Chrome上也安装**Privacy Badger**和**HTTPS Everywhere**扩展,然后给他一个不同的主题,从火狐指出这是你浏览器“不信任的站点”。 +有人推荐你在Chrome上也安装**Privacy Badger**和**HTTPS Everywhere**扩展,然后给它一个不同的主题,从火狐指出这是你浏览器“不信任的站点”。 #### 2: 使用两个不同浏览器,一个在专用的虚拟机里 -这有点像上面建议的做法,除了您将添加一个额外的步骤,通过快速访问协议运行专用虚拟机内部Chrome,允许你共享剪贴板和转发声音事件(如,Spice或RDP)。这将在不可信的浏览器和你其他的工作环境之间添加一个优秀的隔离层,确保攻击者完全危害你的浏览器将不得不另外打破VM隔离层,以达到系统的其余部分。 +这有点像上面建议的做法,除了您将添加一个额外的步骤,通过快速访问协议运行专用虚拟机内部Chrome,允许你共享剪贴板和转发声音事件(如,Spice或RDP)。这将在不可信的浏览器和你其它的工作环境之间添加一个优秀的隔离层,确保攻击者完全危害你的浏览器将不得不另外打破VM隔离层,以达到系统的其余部分。 这是一个出奇可行的结构,但是需要大量的RAM和高速处理器可以处理增加的负载。这还需要一个重要的奉献的管理员需要相应地调整自己的工作实践。 @@ -322,7 +335,7 @@ Chromium开发者在增加很多很好的安全特性方面比火狐强(至少 #### 注意事项 -使用好的,唯一的密码对你的团队成员来说应该是非常关键的需求。证书盗取一直在发生 — 要么通过中间计算机,盗取数据库备份,远程站点利用,要么任何其他的打算。证书从不应该通过站点被重用,尤其是关键的应用。 +使用好的,唯一的密码对你的团队成员来说应该是非常关键的需求。证书盗取一直在发生 — 要么通过中间计算机,盗取数据库备份,远程站点利用,要么任何其它的打算。证书从不应该通过站点被重用,尤其是关键的应用。 ##### 浏览器中的密码管理器 @@ -337,7 +350,7 @@ Chromium开发者在增加很多很好的安全特性方面比火狐强(至少 ##### 独立的密码管理器 -任何密码管理器都有一个主要的缺点,与浏览器结合,事实上是应用的一部分,这样最有可能被入侵者攻击。如果这让你不舒服(应该这样),你应该选择两个不同的密码管理器 -- 一个集成在浏览器中用来保存网站密码,一个作为独立运行的应用。后者可用于存储高风险凭证如root密码,数据库密码,其他shell账户凭证等。 +任何密码管理器都有一个主要的缺点,与浏览器结合,事实上是应用的一部分,这样最有可能被入侵者攻击。如果这让你不舒服(应该这样),你应该选择两个不同的密码管理器 -- 一个集成在浏览器中用来保存网站密码,一个作为独立运行的应用。后者可用于存储高风险凭证如root密码,数据库密码,其它shell账户凭证等。 有这样的工具可以特别有效的在团腿成员间共享超级用户的凭据(服务器根密码,ILO密码,数据库管理密码,引导装载程序密码等等)。 @@ -345,12 +358,12 @@ Chromium开发者在增加很多很好的安全特性方面比火狐强(至少 - [KeePassX][8],2版中改善了团队共享 - [Pass][9],它使用了文本文件和PGP并与git结合 -- [Django-Pstore][10],他是用GPG在管理员之间共享凭据 +- [Django-Pstore][10],它是用GPG在管理员之间共享凭据 - [Hiera-Eyaml][11],如果你已经在你的平台中使用了Puppet,可以便捷的追踪你的服务器/服务凭证,像你的Hiera加密数据的一部分。 ### 加固SSH和PGP私钥 -个人加密密钥,包括SSH和PGP私钥,都是你工作站中最重要的物品 -- 攻击将在获取到感兴趣的东西,这将允许他们进一步攻击你的平台或冒充你为其他管理员。你应该采取额外的步骤,确保你的私钥免遭盗窃。 +个人加密密钥,包括SSH和PGP私钥,都是你工作站中最重要的物品 -- 攻击将在获取到感兴趣的东西,这将允许它们进一步攻击你的平台或冒充你为其它管理员。你应该采取额外的步骤,确保你的私钥免遭盗窃。 #### 清单 @@ -366,7 +379,7 @@ Chromium开发者在增加很多很好的安全特性方面比火狐强(至少 - [Kernel Concepts][12],在这里可以采购支持OpenPGP的智能卡和USB读取器,你应该需要一个。 - [Yubikey NEO][13],这里提供OpenPGP功能的智能卡还提供很多很酷的特性(U2F, PIV, HOTP等等)。 -确保PGP主密码没有存储在工作平台也很重要,只有子密码在使用。主密钥只有在登陆其他的密钥和创建子密钥时使用 — 不经常发生这种操作。你可以照着[Debian的子密钥][14]向导来学习如何移动你的主密钥到移动存储和创建子密钥。 +确保PGP主密码没有存储在工作平台也很重要,只有子密码在使用。主密钥只有在登陆其它的密钥和创建子密钥时使用 — 不经常发生这种操作。你可以照着[Debian的子密钥][14]向导来学习如何移动你的主密钥到移动存储和创建子密钥。 你应该配置你的gnupg代理作为ssh代理然后使用基于智能卡PGP认证密钥作为你的ssh私钥。我们公布了一个细节向导如何使用智能卡读取器或Yubikey NEO。 @@ -408,13 +421,13 @@ SELinux是一个强制访问控制(MAC)为POSIX许可核心功能扩展。 semange permissive -a gpg_pinentry_t -这将允许你使用应用然后收集AVC的其他部分,你可以连同`audit2allow`写一个本地策略。一旦完成你就不会看到新的AVC的拒绝,你可以从许可中删除程序,运行: +这将允许你使用应用然后收集AVC的其它部分,你可以连同`audit2allow`写一个本地策略。一旦完成你就不会看到新的AVC的拒绝,你可以从许可中删除程序,运行: semanage permissive -d gpg_pinentry_t ##### 用SELinux的用户staff_r,使用你的工作站 -SELinux附带的本地角色实现基于角色的用户帐户禁止或授予某些特权。作为一个管理员,你应该使用`staff_r`角色,这可以限制访问很多配置和其他安全敏感文件,除非你先执行`sudo`。 +SELinux附带的本地角色实现基于角色的用户帐户禁止或授予某些特权。作为一个管理员,你应该使用`staff_r`角色,这可以限制访问很多配置和其它安全敏感文件,除非你先执行`sudo`。 默认,用户作为`unconfined_r`被创建,你可以运行大多数应用,没有任何(或只有一点)SELinux约束。转换你的用户到`staff_r`角色,运行下面的命令: @@ -460,7 +473,7 @@ IT安全的世界是一个没有底的兔子洞。如果你想深入,或者找 -------------------------------------------------------------------------------- -via: https://github.com/lfit/itpol/blob/master/linux-workstation-security.md#linux-workstation-security-list +via: https://github.com/lfit/itpol/blob/bbc17d8c69cb8eee07ec41f8fbf8ba32fdb4301b/linux-workstation-security.md 作者:[mricon][a] 译者:[wyangsun](https://github.com/wyangsun) @@ -485,3 +498,6 @@ via: https://github.com/lfit/itpol/blob/master/linux-workstation-security.md#lin [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 +[16]: http://www.pavelkogan.com/2014/05/23/luks-full-disk-encryption/ +[17]: https://en.wikipedia.org/wiki/Cold_boot_attack +[18]: http://www.linux.com/news/featured-blogs/167-amanda-mcpherson/850607-linux-foundation-sysadmins-open-source-their-it-policies \ No newline at end of file From 5d7b2118e92181aa272a178a1bba8d2608e31239 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 17 Dec 2015 11:19:44 +0800 Subject: [PATCH 0588/1710] Translating by ZTinoZ --- ...lla with Apache and SSL on FreeBSD 10.2.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index 37b7819959..11c35382b7 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -2,7 +2,7 @@ ================================================================================ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由mozilla计划开发并由Mozilla公共许可证授权。它经常被一些高科技公司如mozilla、红帽公司和gnome使用。Bugzilla起初由Terry Weissman在1998年创立,它用perl语言编写,用MySQL作为后端数据库。它是一款旨在帮助管理软件开发的服务器软件,它功能丰富、高优化度的数据库、卓越的安全性、高级的搜索工具、整合邮件功能等等。 -在本教程中,我们将给web服务器安装bugzilla 5.0的apache并为它启用SSL,然后在freebsd 10.2上安装mysql51来作为数据库系统。 +在本教程中,我们将给web服务器安装bugzilla 5.0的apache并为它启用SSL,然后在freebsd 10.2上安装mysql 5.1来作为数据库系统。 #### 准备 #### @@ -11,7 +11,7 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz ### 第一步 - 更新系统 ### -Log in to the freebsd server with ssl login, and update the repository database : +用ssl登录freebsd服务器,并更新库: sudo su freebsd-update fetch @@ -19,58 +19,58 @@ Log in to the freebsd server with ssl login, and update the repository database ### 第二步 - 安装并配置Apache ### -In this step we will install apache from the freebsd repositories with pkg command. Then configure apache by editing file "httpd.conf" on apache24 directory, configure apache to use SSL, and CGI support. +在这一步我们将从freebsd库中用pkg命令安装apache,然后在apache24目录下编辑"httpd.conf"文件,启用SSL和CGI支持。 -Install apache with pkg command : +用pkg命令安装apache: pkg install apache24 -Go to the apache directory and edit the file "httpd.conf" with nanao editor : +进入apache目录并用nano编辑器编辑"httpd.conf"文件: cd /usr/local/etc/apache24 nano -c httpd.conf -Uncomment the list line below : +反注释掉下面列出的行: - #Line 70 + #第70行 LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so - #Line 89 + #第89行 LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so - # Line 117 + #第117行 LoadModule expires_module libexec/apache24/mod_expires.so - #Line 141 to enabling SSL + #第141行,启用SSL LoadModule ssl_module libexec/apache24/mod_ssl.so - # Line 162 for cgi support + #第162行,支持cgi LoadModule cgi_module libexec/apache24/mod_cgi.so - # Line 174 to enable mod_rewrite + #第174行,启用mod_rewrite LoadModule rewrite_module libexec/apache24/mod_rewrite.so - # Line 219 for the servername configuration + #第219行,服务器名配置 ServerName 127.0.0.1:80 -Save and exit. +保存并退出。 -Next, we need to install mod perl from freebsd repository, and then enable it : +接着,我们需要从freebsd库中安装mod perl,并启用它: pkg install ap24-mod_perl2 -To enable mod_perl, edit httpd.conf and add to the "Loadmodule" line below : +启用mod_perl,编辑"httpd.conf"文件并添加"Loadmodule"行: nano -c httpd.conf -Add line below : +添加该行: - # Line 175 + #第175行 LoadModule perl_module libexec/apache24/mod_perl.so -Save and exit. +保存并退出。 -And before start apache, add it to start at boot time with sysrc command : +在启用apache之前,用sysrc命令添加以下行来在引导的时候启动: sysrc apache24_enable=yes service apache24 start From bdd749cf903633ef2dab5e1a65a013f09768ccba Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 17 Dec 2015 17:44:08 +0800 Subject: [PATCH 0589/1710] PUB:20150831 Linux workstation security checklist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wyangsun 辛苦了,这么经典,这么长的文章,翻译的很好。我校对都用了两天整呢。另外,我建议将这篇译文你提交给原文那边作为本地化翻译。 --- ...31 Linux workstation security checklist.md | 509 ++++++++++++++++++ ...31 Linux workstation security checklist.md | 503 ----------------- 2 files changed, 509 insertions(+), 503 deletions(-) create mode 100644 published/20150831 Linux workstation security checklist.md delete mode 100644 translated/tech/20150831 Linux workstation security checklist.md diff --git a/published/20150831 Linux workstation security checklist.md b/published/20150831 Linux workstation security checklist.md new file mode 100644 index 0000000000..15daaa5382 --- /dev/null +++ b/published/20150831 Linux workstation security checklist.md @@ -0,0 +1,509 @@ +来自 Linux 基金会内部的《Linux 工作站安全检查清单》 +================================================================================ + +### 目标受众 + + 这是一套 Linux 基金会为其系统管理员提供的推荐规范。 + +这个文档用于帮助那些使用 Linux 工作站来访问和管理项目的 IT 设施的系统管理员团队。 + +如果你的系统管理员是远程员工,你也许可以使用这套指导方针确保系统管理员的系统可以通过核心安全需求,降低你的IT 平台成为攻击目标的风险。 + +即使你的系统管理员不是远程员工,很多人也会在工作环境中通过便携笔记本完成工作,或者在家中设置系统以便在业余时间或紧急时刻访问工作平台。不论发生何种情况,你都能调整这个推荐规范来适应你的环境。 + + +### 限制 + +但是,这并不是一个详细的“工作站加固”文档,可以说这是一个努力避免大多数明显安全错误而不会导致太多不便的一组推荐基线(baseline)。你也许阅读这个文档后会认为它的方法太偏执,而另一些人也许会认为这仅仅是一些肤浅的研究。安全就像在高速公路上开车 -- 任何比你开的慢的都是一个傻瓜,然而任何比你开的快的人都是疯子。这个指南仅仅是一些列核心安全规则,既不详细又不能替代经验、警惕和常识。 + +我们分享这篇文档是为了[将开源协作的优势带到 IT 策略文献资料中][18]。如果你发现它有用,我们希望你可以将它用到你自己团体中,并分享你的改进,对它的完善做出你的贡献。 + +### 结构 + +每一节都分为两个部分: + +- 核对适合你项目的需求 +- 形式不定的提示内容,解释了为什么这么做 + +#### 严重级别 + +在清单的每一个项目都包括严重级别,我们希望这些能帮助指导你的决定: + +- **关键(ESSENTIAL)** 该项应该在考虑列表上被明确的重视。如果不采取措施,将会导致你的平台安全出现高风险。 +- **中等(NICE)** 该项将改善你的安全形势,但是会影响到你的工作环境的流程,可能会要求养成新的习惯,改掉旧的习惯。 +- **低等(PARANOID)** 留作感觉会明显完善我们平台安全、但是可能会需要大量调整与操作系统交互的方式的项目。 + +记住,这些只是参考。如果你觉得这些严重级别不能反映你的工程对安全的承诺,你应该调整它们为你所合适的。 + +## 选择正确的硬件 + +我们并不会要求管理员使用一个特殊供应商或者一个特殊的型号,所以这一节提供的是选择工作系统时的核心注意事项。 + +### 检查清单 + +- [ ] 系统支持安全启动(SecureBoot) _(关键)_ +- [ ] 系统没有火线(Firewire),雷电(thunderbolt)或者扩展卡(ExpressCard)接口 _(中等)_ +- [ ] 系统有 TPM 芯片 _(中等)_ + +### 注意事项 + +#### 安全启动(SecureBoot) + +尽管它还有争议,但是安全引导能够预防很多针对工作站的攻击(Rootkits、“Evil Maid”,等等),而没有太多额外的麻烦。它并不能阻止真正专门的攻击者,加上在很大程度上,国家安全机构有办法应对它(可能是通过设计),但是有安全引导总比什么都没有强。 + +作为选择,你也许可以部署 [Anti Evil Maid][1] 提供更多健全的保护,以对抗安全引导所需要阻止的攻击类型,但是它需要更多部署和维护的工作。 + +#### 系统没有火线(Firewire),雷电(thunderbolt)或者扩展卡(ExpressCard)接口 + +火线是一个标准,其设计上允许任何连接的设备能够完全地直接访问你的系统内存(参见[维基百科][2])。雷电接口和扩展卡同样有问题,虽然一些后来部署的雷电接口试图限制内存访问的范围。如果你没有这些系统端口,那是最好的,但是它并不严重,它们通常可以通过 UEFI 关闭或内核本身禁用。 + +#### TPM 芯片 + +可信平台模块(Trusted Platform Module ,TPM)是主板上的一个与核心处理器单独分开的加密芯片,它可以用来增加平台的安全性(比如存储全盘加密的密钥),不过通常不会用于日常的平台操作。充其量,这个是一个有则更好的东西,除非你有特殊需求,需要使用 TPM 增加你的工作站安全性。 + +## 预引导环境 + +这是你开始安装操作系统前的一系列推荐规范。 + +### 检查清单 + +- [ ] 使用 UEFI 引导模式(不是传统 BIOS)_(关键)_ +- [ ] 进入 UEFI 配置需要使用密码 _(关键)_ +- [ ] 使用安全引导 _(关键)_ +- [ ] 启动系统需要 UEFI 级别密码 _(中等)_ + +### 注意事项 + +#### UEFI 和安全引导 + +UEFI 尽管有缺点,还是提供了很多传统 BIOS 没有的好功能,比如安全引导。大多数现代的系统都默认使用 UEFI 模式。 + +确保进入 UEFI 配置模式要使用高强度密码。注意,很多厂商默默地限制了你使用密码长度,所以相比长口令你也许应该选择高熵值的短密码(关于密码短语请参考下面内容)。 + +基于你选择的 Linux 发行版,你也许需要、也许不需要按照 UEFI 的要求,来导入你的发行版的安全引导密钥,从而允许你启动该发行版。很多发行版已经与微软合作,用大多数厂商所支持的密钥给它们已发布的内核签名,因此避免了你必须处理密钥导入的麻烦。 + +作为一个额外的措施,在允许某人访问引导分区然后尝试做一些不好的事之前,让他们输入密码。为了防止肩窥(shoulder-surfing),这个密码应该跟你的 UEFI 管理密码不同。如果你经常关闭和启动,你也许不想这么麻烦,因为你已经必须输入 LUKS 密码了(LUKS 参见下面内容),这样会让你您减少一些额外的键盘输入。 + +## 发行版选择注意事项 + +很有可能你会坚持一个广泛使用的发行版如 Fedora,Ubuntu,Arch,Debian,或它们的一个类似发行版。无论如何,以下是你选择使用发行版应该考虑的。 + +### 检查清单 + +- [ ] 拥有一个强健的 MAC/RBAC 系统(SELinux/AppArmor/Grsecurity) _(关键)_ +- [ ] 发布安全公告 _(关键)_ +- [ ] 提供及时的安全补丁 _(关键)_ +- [ ] 提供软件包的加密验证 _(关键)_ +- [ ] 完全支持 UEFI 和安全引导 _(关键)_ +- [ ] 拥有健壮的原生全磁盘加密支持 _(关键)_ + +### 注意事项 + +#### SELinux,AppArmor,和 GrSecurity/PaX + +强制访问控制(Mandatory Access Controls,MAC)或者基于角色的访问控制(Role-Based Access Controls,RBAC)是一个用在老式 POSIX 系统的基于用户或组的安全机制扩展。现在大多数发行版已经捆绑了 MAC/RBAC 系统(Fedora,Ubuntu),或通过提供一种机制一个可选的安装后步骤来添加它(Gentoo,Arch,Debian)。显然,强烈建议您选择一个预装 MAC/RBAC 系统的发行版,但是如果你对某个没有默认启用它的发行版情有独钟,装完系统后应计划配置安装它。 + +应该坚决避免使用不带任何 MAC/RBAC 机制的发行版,像传统的 POSIX 基于用户和组的安全在当今时代应该算是考虑不足。如果你想建立一个 MAC/RBAC 工作站,通常认为 AppArmor 和 PaX 比 SELinux 更容易掌握。此外,在工作站上,很少有或者根本没有对外监听的守护进程,而针对用户运行的应用造成的最高风险,GrSecurity/PaX _可能_ 会比SELinux 提供更多的安全便利。 + +#### 发行版安全公告 + +大多数广泛使用的发行版都有一个给它们的用户发送安全公告的机制,但是如果你对一些机密感兴趣,去看看开发人员是否有见于文档的提醒用户安全漏洞和补丁的机制。缺乏这样的机制是一个重要的警告信号,说明这个发行版不够成熟,不能被用作主要管理员的工作站。 + +#### 及时和可靠的安全更新 + +多数常用的发行版提供定期安全更新,但应该经常检查以确保及时提供关键包更新。因此应避免使用附属发行版(spin-offs)和“社区重构”,因为它们必须等待上游发行版先发布,它们经常延迟发布安全更新。 + +现在,很难找到一个不使用加密签名、更新元数据或二者都不使用的发行版。如此说来,常用的发行版在引入这个基本安全机制就已经知道这些很多年了(Arch,说你呢),所以这也是值得检查的。 + +#### 发行版支持 UEFI 和安全引导 + +检查发行版是否支持 UEFI 和安全引导。查明它是否需要导入额外的密钥或是否要求启动内核有一个已经被系统厂商信任的密钥签名(例如跟微软达成合作)。一些发行版不支持 UEFI 或安全启动,但是提供了替代品来确保防篡改(tamper-proof)或防破坏(tamper-evident)引导环境([Qubes-OS][3] 使用 Anti Evil Maid,前面提到的)。如果一个发行版不支持安全引导,也没有防止引导级别攻击的机制,还是看看别的吧。 + +#### 全磁盘加密 + +全磁盘加密是保护静止数据的要求,大多数发行版都支持。作为一个选择方案,带有自加密硬盘的系统也可以用(通常通过主板 TPM 芯片实现),并提供了类似安全级别而且操作更快,但是花费也更高。 + +## 发行版安装指南 + +所有发行版都是不同的,但是也有一些一般原则: + +### 检查清单 + +- [ ] 使用健壮的密码全磁盘加密(LUKS) _(关键)_ +- [ ] 确保交换分区也加密了 _(关键)_ +- [ ] 确保引导程序设置了密码(可以和LUKS一样) _(关键)_ +- [ ] 设置健壮的 root 密码(可以和LUKS一样) _(关键)_ +- [ ] 使用无特权账户登录,作为管理员组的一部分 _(关键)_ +- [ ] 设置健壮的用户登录密码,不同于 root 密码 _(关键)_ + +### 注意事项 + +#### 全磁盘加密 + +除非你正在使用自加密硬盘,配置你的安装程序完整地加密所有存储你的数据与系统文件的磁盘很重要。简单地通过自动挂载的 cryptfs 环(loop)文件加密用户目录还不够(说你呢,旧版 Ubuntu),这并没有给系统二进制文件或交换分区提供保护,它可能包含大量的敏感数据。推荐的加密策略是加密 LVM 设备,以便在启动过程中只需要一个密码。 + +`/boot`分区将一直保持非加密,因为引导程序需要在调用 LUKS/dm-crypt 前能引导内核自身。一些发行版支持加密的`/boot`分区,比如 [Arch][16],可能别的发行版也支持,但是似乎这样增加了系统更新的复杂度。如果你的发行版并没有原生支持加密`/boot`也不用太在意,内核镜像本身并没有什么隐私数据,它会通过安全引导的加密签名检查来防止被篡改。 + +#### 选择一个好密码 + +现代的 Linux 系统没有限制密码口令长度,所以唯一的限制是你的偏执和倔强。如果你要启动你的系统,你将大概至少要输入两个不同的密码:一个解锁 LUKS ,另一个登录,所以长密码将会使你老的更快。最好从丰富或混合的词汇中选择2-3个单词长度,容易输入的密码。 + +优秀密码例子(是的,你可以使用空格): + +- nature abhors roombas +- 12 in-flight Jebediahs +- perdon, tengo flatulence + +如果你喜欢输入可以在公开场合和你生活中能见到的句子,比如: + +- Mary had a little lamb +- you're a wizard, Harry +- to infinity and beyond + +如果你愿意的话,你也应该带上最少要 10-12个字符长度的非词汇的密码。 + +除非你担心物理安全,你可以写下你的密码,并保存在一个远离你办公桌的安全的地方。 + +#### Root,用户密码和管理组 + +我们建议,你的 root 密码和你的 LUKS 加密使用同样的密码(除非你共享你的笔记本给信任的人,让他应该能解锁设备,但是不应该能成为 root 用户)。如果你是笔记本电脑的唯一用户,那么你的 root 密码与你的 LUKS 密码不同是没有安全优势上的意义的。通常,你可以使用同样的密码在你的 UEFI 管理,磁盘加密,和 root 登录中 -- 知道这些任意一个都会让攻击者完全控制您的系统,在单用户工作站上使这些密码不同,没有任何安全益处。 + +你应该有一个不同的,但同样强健的常规用户帐户密码用来日常工作。这个用户应该是管理组用户(例如`wheel`或者类似,根据发行版不同),允许你执行`sudo`来提升权限。 + +换句话说,如果在你的工作站只有你一个用户,你应该有两个独特的、强健(robust)而强壮(strong)的密码需要记住: + +**管理级别**,用在以下方面: + +- UEFI 管理 +- 引导程序(GRUB) +- 磁盘加密(LUKS) +- 工作站管理(root 用户) + +**用户级别**,用在以下: + +- 用户登录和 sudo +- 密码管理器的主密码 + +很明显,如果有一个令人信服的理由的话,它们全都可以不同。 + +## 安装后的加固 + +安装后的安全加固在很大程度上取决于你选择的发行版,所以在一个像这样的通用文档中提供详细说明是徒劳的。然而,这里有一些你应该采取的步骤: + +### 检查清单 + +- [ ] 在全局范围内禁用火线和雷电模块 _(关键)_ +- [ ] 检查你的防火墙,确保过滤所有传入端口 _(关键)_ +- [ ] 确保 root 邮件转发到一个你可以收到的账户 _(关键)_ +- [ ] 建立一个系统自动更新任务,或更新提醒 _(中等)_ +- [ ] 检查以确保 sshd 服务默认情况下是禁用的 _(中等)_ +- [ ] 配置屏幕保护程序在一段时间的不活动后自动锁定 _(中等)_ +- [ ] 设置 logwatch _(中等)_ +- [ ] 安装使用 rkhunter _(中等)_ +- [ ] 安装一个入侵检测系统(Intrusion Detection System) _(中等)_ + +### 注意事项 + +#### 将模块列入黑名单 + +将火线和雷电模块列入黑名单,增加一行到`/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`和一个类似`aide`或者`tripwire`入侵检测系统(IDS)并不是那么有用,除非你确实理解它们如何工作,并采取必要的步骤来设置正确(例如,保证数据库在外部介质,从可信的环境运行检测,记住执行系统更新和配置更改后要刷新散列数据库,等等)。如果你不愿在你的工作站执行这些步骤,并调整你如何工作的方式,这些工具只能带来麻烦而没有任何实在的安全益处。 + +我们建议你安装`rkhunter`并每晚运行它。它相当易于学习和使用,虽然它不会阻止一个复杂的攻击者,它也能帮助你捕获你自己的错误。 + +## 个人工作站备份 + +工作站备份往往被忽视,或偶尔才做一次,这常常是不安全的方式。 + +### 检查清单 + +- [ ] 设置加密备份工作站到外部存储 _(关键)_ +- [ ] 使用零认知(zero-knowledge)备份工具备份到站外或云上 _(中等)_ + +### 注意事项 + +#### 全加密的备份存到外部存储 + +把全部备份放到一个移动磁盘中比较方便,不用担心带宽和上行网速(在这个时代,大多数供应商仍然提供显著的不对称的上传/下载速度)。不用说,这个移动硬盘本身需要加密(再说一次,通过 LUKS),或者你应该使用一个备份工具建立加密备份,例如`duplicity`或者它的 GUI 版本 `deja-dup`。我建议使用后者并使用随机生成的密码,保存到离线的安全地方。如果你带上笔记本去旅行,把这个磁盘留在家,以防你的笔记本丢失或被窃时可以找回备份。 + +除了你的家目录外,你还应该备份`/etc`目录和出于取证目的的`/var/log`目录。 + +尤其重要的是,避免拷贝你的家目录到任何非加密存储上,即使是需要快速的在两个系统上移动文件时,一旦完成你肯定会忘了清除它,从而暴露个人隐私或者安全信息到监听者手中 -- 尤其是把这个存储介质跟你的笔记本放到同一个包里。 + +#### 有选择的零认知站外备份 + +站外备份(Off-site backup)也是相当重要的,是否可以做到要么需要你的老板提供空间,要么找一家云服务商。你可以建一个单独的 duplicity/deja-dup 配置,只包括重要的文件,以免传输大量你不想备份的数据(网络缓存、音乐、下载等等)。 + +作为选择,你可以使用零认知(zero-knowledge)备份工具,例如 [SpiderOak][5],它提供一个卓越的 Linux GUI工具还有更多的实用特性,例如在多个系统或平台间同步内容。 + +## 最佳实践 + +下面是我们认为你应该采用的最佳实践列表。它当然不是非常详细的,而是试图提供实用的建议,来做到可行的整体安全性和可用性之间的平衡。 + +### 浏览 + +毫无疑问, web 浏览器将是你的系统上最大、最容易暴露的面临攻击的软件。它是专门下载和执行不可信、甚至是恶意代码的一个工具。它试图采用沙箱和代码清洁(code sanitization)等多种机制保护你免受这种危险,但是在之前它们都被击败了多次。你应该知道,在任何时候浏览网站都是你做的最不安全的活动。 + +有几种方法可以减少浏览器的影响,但这些真实有效的方法需要你明显改变操作您的工作站的方式。 + +#### 1: 使用两个不同的浏览器 _(关键)_ + +这很容易做到,但是只有很少的安全效益。并不是所有浏览器都可以让攻击者完全自由访问您的系统 -- 有时它们只能允许某人读取本地浏览器存储,窃取其它标签的活动会话,捕获浏览器的输入等。使用两个不同的浏览器,一个用在工作/高安全站点,另一个用在其它方面,有助于防止攻击者请求整个 cookie 存储的小问题。主要的不便是两个不同的浏览器会消耗大量内存。 + +我们建议: + +##### 火狐用来访问工作和高安全站点 + +使用火狐登录工作有关的站点,应该额外关心的是确保数据如 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 中来提供高度安全的工作环境。 + +### 密码管理器 + +#### 检查清单 + +- [ ] 使用密码管理器 _(关键)_ +- [ ] 不相关的站点使用不同的密码 _(关键)_ +- [ ] 使用支持团队共享的密码管理器 _(中等)_ +- [ ] 给非网站类账户使用一个单独的密码管理器 _(低等)_ + +#### 注意事项 + +使用好的、唯一的密码对你的团队成员来说应该是非常关键的需求。凭证(credential)盗取一直在发生 — 通过被攻破的计算机、盗取数据库备份、远程站点利用、以及任何其它的方式。凭证绝不应该跨站点重用,尤其是关键的应用。 + +##### 浏览器中的密码管理器 + +每个浏览器有一个比较安全的保存密码机制,可以同步到供应商维护的,并使用用户的密码保证数据加密。然而,这个机制有严重的劣势: + +1. 不能跨浏览器工作 +2. 不提供任何与团队成员共享凭证的方法 + +也有一些支持良好、免费或便宜的密码管理器,可以很好的融合到多个浏览器,跨平台工作,提供小组共享(通常是付费服务)。可以很容易地通过搜索引擎找到解决方案。 + +##### 独立的密码管理器 + +任何与浏览器结合的密码管理器都有一个主要的缺点,它实际上是应用的一部分,这样最有可能被入侵者攻击。如果这让你不放心(应该这样),你应该选择两个不同的密码管理器 -- 一个集成在浏览器中用来保存网站密码,一个作为独立运行的应用。后者可用于存储高风险凭证如 root 密码、数据库密码、其它 shell 账户凭证等。 + +这样的工具在团队成员间共享超级用户的凭据方面特别有用(服务器 root 密码、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 私钥。我们发布了一个[详尽的指导][15]如何使用智能卡读取器或 Yubikey NEO。 + +如果你不想那么麻烦,最少要确保你的 PGP 私钥和你的 SSH 私钥有个强健的密码,这将让攻击者很难盗取使用它们。 + +### 休眠或关机,不要挂起 + +当系统挂起时,内存中的内容仍然保留在内存芯片中,可以会攻击者读取到(这叫做冷启动攻击(Cold Boot Attack))。如果你离开你的系统的时间较长,比如每天下班结束,最好关机或者休眠,而不是挂起它或者就那么开着。 + +### 工作站上的 SELinux + +如果你使用捆绑了 SELinux 的发行版(如 Fedora),这有些如何使用它的建议,让你的工作站达到最大限度的安全。 + +#### 检查清单 + +- [ ] 确保你的工作站强制(enforcing)使用 SELinux _(关键)_ +- [ ] 不要盲目的执行`audit2allow -M`,应该经常检查 _(关键)_ +- [ ] 绝不要 `setenforce 0` _(中等)_ +- [ ] 切换你的用户到 SELinux 用户`staff_u` _(中等)_ + +#### 注意事项 + +SELinux 是强制访问控制(Mandatory Access Controls,MAC),是 POSIX许可核心功能的扩展。它是成熟、强健,自从它推出以来已经有很长的路了。不管怎样,许多系统管理员现在仍旧重复过时的口头禅“关掉它就行”。 + +话虽如此,在工作站上 SELinux 会带来一些有限的安全效益,因为大多数你想运行的应用都是可以自由运行的。开启它有益于给网络提供足够的保护,也有可能有助于防止攻击者通过脆弱的后台服务提升到 root 级别的权限用户。 + +我们的建议是开启它并强制使用(enforcing)。 + +##### 绝不`setenforce 0` + +使用`setenforce 0`临时把 SELinux 设置为许可(permissive)模式很有诱惑力,但是你应该避免这样做。当你想查找一个特定应用或者程序的问题时,实际上这样做是把整个系统的 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 带有角色(role)的原生实现,基于用户帐户相关角色来禁止或授予某些特权。作为一个管理员,你应该使用`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 安全指南](https://docs.fedoraproject.org/en-US/Fedora/19/html/Security_Guide/index.html) +- [CESG Ubuntu 安全指南](https://www.gov.uk/government/publications/end-user-devices-security-guidance-ubuntu-1404-lts) +- [Debian 安全手册](https://www.debian.org/doc/manuals/securing-debian-howto/index.en.html) +- [Arch Linux 安全维基](https://wiki.archlinux.org/index.php/Security) +- [Mac OSX 安全](https://www.apple.com/support/security/guides/) + +## 许可 + +这项工作在[创作共用授权4.0国际许可证][0]许可下。 + +-------------------------------------------------------------------------------- + +via: https://github.com/lfit/itpol/blob/bbc17d8c69cb8eee07ec41f8fbf8ba32fdb4301b/linux-workstation-security.md + +作者:[mricon][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[wxy](https://github.com/wxy) + +本文由 [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 +[16]: http://www.pavelkogan.com/2014/05/23/luks-full-disk-encryption/ +[17]: https://en.wikipedia.org/wiki/Cold_boot_attack +[18]: http://www.linux.com/news/featured-blogs/167-amanda-mcpherson/850607-linux-foundation-sysadmins-open-source-their-it-policies \ No newline at end of file diff --git a/translated/tech/20150831 Linux workstation security checklist.md b/translated/tech/20150831 Linux workstation security checklist.md deleted file mode 100644 index 7353eec493..0000000000 --- a/translated/tech/20150831 Linux workstation security checklist.md +++ /dev/null @@ -1,503 +0,0 @@ -Linux 基金会内部的 Linux 工作站安全检查清单 -================================================================================ - -### 目标受众 - - 这是一套 Linux 基金会为其系统管理员提供的推荐规范。 - -这个文档用于帮助那些使用 Linux 工作站来访问和管理项目的 IT 设施的系统管理员团队。 - -如果你的系统管理员是远程员工,你也许可以使用这套指导方针确保系统管理员的系统可以通过核心安全需求,降低你的IT 平台成为攻击目标的风险。 - -即使你的系统管理员不是远程员工,很多人也会在工作环境中通过便携笔记本完成工作,或者在家中设置系统以便在业余时间或紧急时刻访问工作平台。不论发生何种情况,你都能调整这个推荐规范来适应你的环境。 - - -### 限制 - -但是,这并不是一个详细的“工作站加固”文档,可以说这是一个努力避免大多数明显安全错误而不会导致太多不便的一组推荐基线(baseline)。你也许阅读这个文档后会认为它的方法太偏执,而另一些人也许会认为这仅仅是一些肤浅的研究。安全就像在高速公路上开车 -- 任何比你开的慢的都是一个傻瓜,然而任何比你开的快的人都是疯子。这个指南仅仅是一些列核心安全规则,既不详细又不能替代经验、警惕和常识。 - -我们分享这篇文档是为了[将开源协作的优势带到 IT 策略文献资料中][18]。如果你发现它有用,我们希望你可以将它用到你自己团体中,并分享你的改进,对它的完善做出你的贡献。 - -### 结构 - -每一节都分为两个部分: - -- 核对适合你项目的需求 -- 形式不定的提示内容,解释了为什么这么做 - -#### 严重级别 - -在清单的每一个项目都包括严重级别,我们希望这些能帮助指导你的决定: - -- **关键(ESSENTIAL)** 该项应该在考虑列表上被明确的重视。如果不采取措施,将会导致你的平台安全出现高风险。 -- **中等(NICE)** 该项将改善你的安全形势,但是会影响到你的工作环境的流程,可能会要求养成新的习惯,改掉旧的习惯。 -- **可疑(PARANOID)** 留作感觉会明显完善我们平台安全、但是可能会需要大量调整与操作系统交互的方式的项目。 - -记住,这些只是参考。如果你觉得这些严重级别不能反映你的工程对安全的承诺,你应该调整它们为你所合适的。 - -## 选择正确的硬件 - -我们并不会要求管理员使用一个特殊供应商或者一个特殊的型号,所以这一节提供的是选择工作系统时的核心注意事项。 - -### 检查清单 - -- [ ] 系统支持安全启动(SecureBoot) _(关键)_ -- [ ] 系统没有火线(Firewire),雷电(thunderbolt)或者扩展卡(ExpressCard)接口 _(中等)_ -- [ ] 系统有 TPM 芯片 _(中等)_ - -### 注意事项 - -#### 安全启动(SecureBoot) - -尽管它还有争议,但是安全引导能够预防很多针对工作站的攻击(Rootkits、“Evil Maid”,等等),而没有太多额外的麻烦。它并不能阻止真正专门的攻击者,加上在很大程度上,国家安全机构有办法应对它(可能是通过设计),但是有安全引导总比什么都没有强。 - -作为选择,你也许可以部署 [Anti Evil Maid][1] 提供更多健全的保护,以对抗安全引导所需要阻止的攻击类型,但是它需要更多部署和维护的工作。 - -#### 系统没有火线(Firewire),雷电(thunderbolt)或者扩展卡(ExpressCard)接口 - -火线是一个标准,其设计上允许任何连接的设备能够完全地直接访问你的系统内存(参见[维基百科][2])。雷电接口和扩展卡同样有问题,虽然一些后来部署的雷电接口试图限制内存访问的范围。如果你没有这些系统端口,那是最好的,但是它并不严重,它们通常可以通过 UEFI 关闭或内核本身禁用。 - -#### TPM 芯片 - -可信平台模块(Trusted Platform Module ,TPM)是主板上的一个与核心处理器单独分开的加密芯片,它可以用来增加平台的安全性(比如存储全盘加密的密钥),不过通常不会用于日常的平台操作。充其量,这个是一个有则更好的东西,除非你有特殊需求,需要使用 TPM 增加你的工作站安全性。 - -## 预引导环境 - -这是你开始安装操作系统前的一系列推荐规范。 - -### 清单 - -- [ ] 使用 UEFI 引导模式(不是传统 BIOS)_(关键)_ -- [ ] 进入 UEFI 配置需要使用密码 _(关键)_ -- [ ] 使用安全引导 _(关键)_ -- [ ] 启动系统需要 UEFI 级别密码 _(中等)_ - -### 注意事项 - -#### UEFI 和安全引导 - -UEFI 尽管有缺点,还是提供很多传统 BIOS 没有的好功能,比如安全引导。大多数现代的系统都默认使用 UEFI 模式。 - -确保进入 UEFI 配置模式要使用高强度密码。注意,很多厂商默默地限制了你使用密码长度,所以相比长口令你也许应该选择高熵值的短密码(关于密码短语请参考下面内容)。 - -基于你选择的 Linux 发行版,你也许需要、也许不需要按照 UEFI 的要求,来导入你的发行版的安全引导密钥,从而允许你启动该发行版。很多发行版已经与微软合作,用大多数厂商所支持的密钥给它们已发布的内核签名,因此避免了你必须处理密钥导入的麻烦。 - -作为一个额外的措施,在允许某人访问引导分区然后尝试做一些不好的事之前,让他们输入密码。为了防止肩窥(shoulder-surfing),这个密码应该跟你的 UEFI 管理密码不同。如果你经常关闭和启动,你也许不想这么麻烦,因为你已经必须输入 LUKS 密码了(LUKS 参见下面内容),这样会让你您减少一些额外的键盘输入。 - -## 发行版选择注意事项 - -很有可能你会坚持一个广泛使用的发行版如 Fedora,Ubuntu,Arch,Debian,或它们的一个类似分支。无论如何,以下是你选择使用发行版应该考虑的。 - -### 清单 - -- [ ] 拥有一个强健的 MAC/RBAC 系统(SELinux/AppArmor/Grsecurity) _(关键)_ -- [ ] 发布安全公告 _(关键)_ -- [ ] 提供及时的安全补丁 _(关键)_ -- [ ] 提供软件包的加密验证 _(关键)_ -- [ ] 完全支持 UEFI 和安全引导 _(关键)_ -- [ ] 拥有健壮的原生全磁盘加密支持 _(关键)_ - -### 注意事项 - -#### SELinux,AppArmor,和 GrSecurity/PaX - -强制访问控制(Mandatory Access Controls,MAC)或者基于角色的访问控制(Role-Based Access Controls,RBAC)是一个用在老式 POSIX 系统的基于用户或组的安全机制扩展。现在大多数发行版已经捆绑了 MAC/RBAC 系统(Fedora,Ubuntu),或通过提供一种机制一个可选的安装后步骤来添加它(Gentoo,Arch,Debian)。显然,强烈建议您选择一个预装 MAC/RBAC 系统的发行版,但是如果你对某个没有默认启用它的发行版情有独钟,装完系统后应计划配置安装它。 - -应该坚决避免使用不带任何 MAC/RBAC 机制的发行版,像传统的 POSIX 基于用户和组的安全在当今时代应该算是考虑不足。如果你想建立一个 MAC/RBAC 工作站,通常认为 AppArmor 和 PaX 比 SELinux 更容易掌握。此外,在工作站上,很少有或者根本没有对外监听的守护进程,而针对用户运行的应用造成的最高风险,GrSecurity/PaX _可能_ 会比SELinux 提供更多的安全便利。 - -#### 发行版安全公告 - -大多数广泛使用的发行版都有一个给它们的用户发送安全公告的机制,但是如果你对一些机密感兴趣,去看看开发人员是否有见于文档的提醒用户安全漏洞和补丁的机制。缺乏这样的机制是一个重要的警告信号,说明这个分支不够成熟,不能被用作主要管理员的工作站。 - -#### 及时和可靠的安全更新 - -多数常用的发行版提供定期安全更新,但应该经常检查以确保及时提供关键包更新。因此应避免使用附属发行版(spin-offs)和“社区重构”,因为它们必须等待上游分支先发布,它们经常延迟发布安全更新。 - -现在,很难找到一个不使用加密签名、更新元数据或二者都不使用的发行版。如此说来,常用的发行版在引入这个基本安全机制就已经知道这些很多年了(Arch,我正在看你),所以这也是值得检查的。 - -#### 发行版支持 UEFI 和安全引导 - -检查发行版是否支持 UEFI 和安全引导。查明它是否需要导入额外的密钥或是否要求启动内核有一个已经被系统厂商信任的密钥签名(例如跟微软达成合作)。一些发行版不支持 UEFI 或安全启动,但是提供了替代品来确保防篡改(tamper-proof)或防破坏(tamper-evident)引导环境([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/bbc17d8c69cb8eee07ec41f8fbf8ba32fdb4301b/linux-workstation-security.md - -作者:[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 -[16]: http://www.pavelkogan.com/2014/05/23/luks-full-disk-encryption/ -[17]: https://en.wikipedia.org/wiki/Cold_boot_attack -[18]: http://www.linux.com/news/featured-blogs/167-amanda-mcpherson/850607-linux-foundation-sysadmins-open-source-their-it-policies \ No newline at end of file From 8869fcfa810ed60746a466a58b0282fb330215f4 Mon Sep 17 00:00:00 2001 From: su-kaiyao <1250471161@qq.com> Date: Thu, 17 Dec 2015 22:14:26 +0800 Subject: [PATCH 0590/1710] su-kaiyao translated --- ...ed with Docker by Dockerizing this Blog.md | 452 ----------------- ...with Docker by Dockerizing this Blog.md.md | 464 ++++++++++++++++++ 2 files changed, 464 insertions(+), 452 deletions(-) delete mode 100644 sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md create mode 100644 translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md diff --git a/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md b/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md deleted file mode 100644 index f8df8df93b..0000000000 --- a/sources/tech/20151210 Getting started with Docker by Dockerizing this Blog.md +++ /dev/null @@ -1,452 +0,0 @@ -su-kaiyao translating - -Getting started with Docker by Dockerizing this Blog -====================== ->This article covers the basic concepts of Docker and how to Dockerize an application by creating a custom Dockerfile ->Written by Benjamin Cane on 2015-12-01 10:00:00 - -Docker is an interesting technology that over the past 2 years has gone from an idea, to being used by organizations all over the world to deploy applications. In today's article I am going to cover how to get started with Docker by "Dockerizing" an existing application. The application in question is actually this very blog! - -## What is Docker - -Before we dive into learning the basics of Docker let's first understand what Docker is and why it is so popular. Docker, is an operating system container management tool that allows you to easily manage and deploy applications by making it easy to package them within operating system containers. - -### Containers vs. Virtual Machines - -Containers may not be as familiar as virtual machines but they are another method to provide **Operating System Virtualization**. However, they differ quite a bit from standard virtual machines. - -Standard virtual machines generally include a full Operating System, OS Packages and eventually an Application or two. This is made possible by a Hypervisor which provides hardware virtualization to the virtual machine. This allows for a single server to run many standalone operating systems as virtual guests. - -Containers are similar to virtual machines in that they allow a single server to run multiple operating environments, these environments however, are not full operating systems. Containers generally only include the necessary OS Packages and Applications. They do not generally contain a full operating system or hardware virtualization. This also means that containers have a smaller overhead than traditional virtual machines. - -Containers and Virtual Machines are often seen as conflicting technology, however, this is often a misunderstanding. Virtual Machines are a way to take a physical server and provide a fully functional operating environment that shares those physical resources with other virtual machines. A Container is generally used to isolate a running process within a single host to ensure that the isolated processes cannot interact with other processes within that same system. In fact containers are closer to **BSD Jails** and `chroot`'ed processes than full virtual machines. - -### What Docker provides on top of containers - -Docker itself is not a container runtime environment; in fact Docker is actually container technology agnostic with efforts planned for Docker to support [Solaris Zones](https://blog.docker.com/2015/08/docker-oracle-solaris-zones/) and [BSD Jails](https://wiki.freebsd.org/Docker). What Docker provides is a method of managing, packaging, and deploying containers. While these types of functions may exist to some degree for virtual machines they traditionally have not existed for most container solutions and the ones that existed, were not as easy to use or fully featured as Docker. - -Now that we know what Docker is, let's start learning how Docker works by first installing Docker and deploying a public pre-built container. - -## Starting with Installation -As Docker is not installed by default step 1 will be to install the Docker package; since our example system is running Ubuntu 14.0.4 we will do this using the Apt package manager. - -``` -# apt-get install docker.io -Reading package lists... Done -Building dependency tree -Reading state information... Done -The following extra packages will be installed: - aufs-tools cgroup-lite git git-man liberror-perl -Suggested packages: - btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc - git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki - git-svn -The following NEW packages will be installed: - aufs-tools cgroup-lite docker.io git git-man liberror-perl -0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. -Need to get 7,553 kB of archives. -After this operation, 46.6 MB of additional disk space will be used. -Do you want to continue? [Y/n] y -``` - -To check if any containers are running we can execute the `docker` command using the `ps` option. - -``` -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -``` - -The `ps` function of the `docker` command works similar to the Linux `ps `command. It will show available Docker containers and their current status. Since we have not started any Docker containers yet, the command shows no running containers. - -## Deploying a pre-built nginx Docker container -One of my favorite features of Docker is the ability to deploy a pre-built container in the same way you would deploy a package with `yum` or `apt-get`. To explain this better let's deploy a pre-built container running the nginx web server. We can do this by executing the `docker` command again, however, this time with the `run` option. - -``` -# docker run -d nginx -Unable to find image 'nginx' locally -Pulling repository nginx -5c82215b03d1: Download complete -e2a4fb18da48: Download complete -58016a5acc80: Download complete -657abfa43d82: Download complete -dcb2fe003d16: Download complete -c79a417d7c6f: Download complete -abb90243122c: Download complete -d6137c9e2964: Download complete -85e566ddc7ef: Download complete -69f100eb42b5: Download complete -cd720b803060: Download complete -7cc81e9a118a: Download complete -``` - -The `run` function of the `docker` command tells Docker to find a specified Docker image and start a container running that image. By default, Docker containers run in the foreground, meaning when you execute `docker run` your shell will be bound to the container's console and the process running within the container. In order to launch this Docker container in the background I included the `-d` (**detach**) flag. - -By executing `docker ps` again we can see the nginx container running. - -``` -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -f6d31ab01fc9 nginx:latest nginx -g 'daemon off 4 seconds ago Up 3 seconds 443/tcp, 80/tcp desperate_lalande -``` - -In the above output we can see the running container `desperate_lalande` and that this container has been built from the `nginx:latest image`. - -### Docker Images -Images are one of Docker's key features and is similar to a virtual machine image. Like virtual machine images, a Docker image is a container that has been saved and packaged. Docker however, doesn't just stop with the ability to create images. Docker also includes the ability to distribute those images via Docker repositories which are a similar concept to package repositories. This is what gives Docker the ability to deploy an image like you would deploy a package with `yum`. To get a better understanding of how this works let's look back at the output of the `docker run` execution. - -``` -# docker run -d nginx -Unable to find image 'nginx' locally -``` - -The first message we see is that `docker` could not find an image named nginx locally. The reason we see this message is that when we executed `docker run` we told Docker to startup a container, a container based on an image named **nginx**. Since Docker is starting a container based on a specified image it needs to first find that image. Before checking any remote repository Docker first checks locally to see if there is a local image with the specified name. - -Since this system is brand new there is no Docker image with the name nginx, which means Docker will need to download it from a Docker repository. - -``` -Pulling repository nginx -5c82215b03d1: Download complete -e2a4fb18da48: Download complete -58016a5acc80: Download complete -657abfa43d82: Download complete -dcb2fe003d16: Download complete -c79a417d7c6f: Download complete -abb90243122c: Download complete -d6137c9e2964: Download complete -85e566ddc7ef: Download complete -69f100eb42b5: Download complete -cd720b803060: Download complete -7cc81e9a118a: Download complete -``` - -This is exactly what the second part of the output is showing us. By default, Docker uses the [Docker Hub](https://hub.docker.com/) repository, which is a repository service that Docker (the company) runs. - -Like GitHub, Docker Hub is free for public repositories but requires a subscription for private repositories. It is possible however, to deploy your own Docker repository, in fact it is as easy as `docker run registry`. For this article we will not be deploying a custom registry service. - -### Stopping and Removing the Container -Before moving on to building a custom Docker container let's first clean up our Docker environment. We will do this by stopping the container from earlier and removing it. - -To start a container we executed `docker` with the `run` option, in order to stop this same container we simply need to execute the `docker` with the `kill` option specifying the container name. - -``` -# docker kill desperate_lalande -desperate_lalande -``` - -If we execute `docker ps` again we will see that the container is no longer running. - -``` -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -``` - -However, at this point we have only stopped the container; while it may no longer be running it still exists. By default, `docker ps` will only show running containers, if we add the `-a` (all) flag it will show all containers running or not. - -``` -# docker ps -a -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -f6d31ab01fc9 5c82215b03d1 nginx -g 'daemon off 4 weeks ago Exited (-1) About a minute ago desperate_lalande -``` - -In order to fully remove the container we can use the `docker` command with the `rm` option. - -``` -# docker rm desperate_lalande -desperate_lalande -``` - -While this container has been removed; we still have a **nginx** image available. If we were to re-run `docker run -d nginx` again the container would be started without having to fetch the nginx image again. This is because Docker already has a saved copy on our local system. - -To see a full list of local images we can simply run the `docker` command with the `images` option. - -``` -# docker images -REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE -nginx latest 9fab4090484a 5 days ago 132.8 MB -``` - -## Building our own custom image -At this point we have used a few basic Docker commands to start, stop and remove a common pre-built image. In order to "Dockerize" this blog however, we are going to have to build our own Docker image and that means creating a **Dockerfile**. - -With most virtual machine environments if you wish to create an image of a machine you need to first create a new virtual machine, install the OS, install the application and then finally convert it to a template or image. With Docker however, these steps are automated via a Dockerfile. A Dockerfile is a way of providing build instructions to Docker for the creation of a custom image. In this section we are going to build a custom Dockerfile that can be used to deploy this blog. - -### Understanding the Application -Before we can jump into creating a Dockerfile we first need to understand what is required to deploy this blog. - -The blog itself is actually static HTML pages generated by a custom static site generator that I wrote named; **hamerkop**. The generator is very simple and more about getting the job done for this blog specifically. All the code and source files for this blog are available via a public [GitHub](https://github.com/madflojo/blog) repository. In order to deploy this blog we simply need to grab the contents of the GitHub repository, install **Python** along with some **Python** modules and execute the `hamerkop` application. To serve the generated content we will use **nginx**; which means we will also need **nginx** to be installed. - -So far this should be a pretty simple Dockerfile, but it will show us quite a bit of the [Dockerfile Syntax](https://docs.docker.com/v1.8/reference/builder/). To get started we can clone the GitHub repository and creating a Dockerfile with our favorite editor; `vi` in my case. - -``` -# git clone https://github.com/madflojo/blog.git -Cloning into 'blog'... -remote: Counting objects: 622, done. -remote: Total 622 (delta 0), reused 0 (delta 0), pack-reused 622 -Receiving objects: 100% (622/622), 14.80 MiB | 1.06 MiB/s, done. -Resolving deltas: 100% (242/242), done. -Checking connectivity... done. -# cd blog/ -# vi Dockerfile -``` - -### FROM - Inheriting a Docker image -The first instruction of a Dockerfile is the `FROM` instruction. This is used to specify an existing Docker image to use as our base image. This basically provides us with a way to inherit another Docker image. In this case we will be starting with the same **nginx** image we were using before, if we wanted to start with a blank slate we could use the **Ubuntu** Docker image by specifying `ubuntu:latest`. - -``` -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane -``` - -In addition to the `FROM` instruction, I also included a `MAINTAINER` instruction which is used to show the Author of the Dockerfile. - -As Docker supports using `#` as a comment marker, I will be using this syntax quite a bit to explain the sections of this Dockerfile. - -### Running a test build -Since we inherited the **nginx** Docker image our current Dockerfile also inherited all the instructions within the [Dockerfile](https://github.com/nginxinc/docker-nginx/blob/08eeb0e3f0a5ee40cbc2bc01f0004c2aa5b78c15/Dockerfile) used to build that **nginx** image. What this means is even at this point we are able to build a Docker image from this Dockerfile and run a container from that image. The resulting image will essentially be the same as the **nginx** image but we will run through a build of this Dockerfile now and a few more times as we go to help explain the Docker build process. - -In order to start the build from a Dockerfile we can simply execute the `docker` command with the **build** option. - -``` -# docker build -t blog /root/blog -Sending build context to Docker daemon 23.6 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Running in c97f36450343 - ---> 60a44f78d194 -Removing intermediate container c97f36450343 -Successfully built 60a44f78d194 -``` - -In the above example I used the `-t` (**tag**) flag to "tag" the image as "blog". This essentially allows us to name the image, without specifying a tag the image would only be callable via an **Image ID** that Docker assigns. In this case the **Image ID** is `60a44f78d194` which we can see from the `docker` command's build success message. - -In addition to the `-t` flag, I also specified the directory `/root/blog`. This directory is the "build directory", which is the directory that contains the Dockerfile and any other files necessary to build this container. - -Now that we have run through a successful build, let's start customizing this image. - -### Using RUN to execute apt-get -The static site generator used to generate the HTML pages is written in **Python** and because of this the first custom task we should perform within this `Dockerfile` is to install Python. To install the Python package we will use the Apt package manager. This means we will need to specify within the Dockerfile that `apt-get update` and `apt-get install python-dev` are executed; we can do this with the `RUN` instruction. - -``` -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip -``` - -In the above we are simply using the `RUN` instruction to tell Docker that when it builds this image it will need to execute the specified `apt-get` commands. The interesting part of this is that these commands are only executed within the context of this container. What this means is even though `python-dev` and `python-pip` are being installed within the container, they are not being installed for the host itself. Or to put it simplier, within the container the `pip` command will execute, outside the container, the `pip` command does not exist. - -It is also important to note that the Docker build process does not accept user input during the build. This means that any commands being executed by the `RUN` instruction must complete without user input. This adds a bit of complexity to the build process as many applications require user input during installation. For our example, none of the commands executed by `RUN` require user input. - -### Installing Python modules -With **Python** installed we now need to install some Python modules. To do this outside of Docker, we would generally use the `pip` command and reference a file within the blog's Git repository named `requirements.txt`. In an earlier step we used the `git` command to "clone" the blog's GitHub repository to the `/root/blog` directory; this directory also happens to be the directory that we have created the `Dockerfile`. This is important as it means the contents of the Git repository are accessible to Docker during the build process. - -When executing a build, Docker will set the context of the build to the specified "build directory". This means that any files within that directory and below can be used during the build process, files outside of that directory (outside of the build context), are inaccessible. - -In order to install the required Python modules we will need to copy the `requirements.txt` file from the build directory into the container. We can do this using the `COPY` instruction within the `Dockerfile`. - -``` -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip - -## Create a directory for required files -RUN mkdir -p /build/ - -## Add requirements file and run pip -COPY requirements.txt /build/ -RUN pip install -r /build/requirements.txt -``` - -Within the `Dockerfile` we added 3 instructions. The first instruction uses `RUN` to create a `/build/` directory within the container. This directory will be used to copy any application files needed to generate the static HTML pages. The second instruction is the `COPY` instruction which copies the `requirements.txt` file from the "build directory" (`/root/blog`) into the `/build` directory within the container. The third is using the `RUN` instruction to execute the `pip` command; installing all the modules specified within the `requirements.txt` file. - -`COPY` is an important instruction to understand when building custom images. Without specifically copying the file within the Dockerfile this Docker image would not contain the requirements.txt file. With Docker containers everything is isolated, unless specifically executed within a Dockerfile a container is not likely to include required dependencies. - -### Re-running a build -Now that we have a few customization tasks for Docker to perform let's try another build of the blog image again. - -``` -# docker build -t blog /root/blog -Sending build context to Docker daemon 19.52 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Using cache - ---> 8e0f1899d1eb -Step 2 : RUN apt-get update - ---> Using cache - ---> 78b36ef1a1a2 -Step 3 : RUN apt-get install -y python-dev python-pip - ---> Using cache - ---> ef4f9382658a -Step 4 : RUN mkdir -p /build/ - ---> Running in bde05cf1e8fe - ---> f4b66e09fa61 -Removing intermediate container bde05cf1e8fe -Step 5 : COPY requirements.txt /build/ - ---> cef11c3fb97c -Removing intermediate container 9aa8ff43f4b0 -Step 6 : RUN pip install -r /build/requirements.txt - ---> Running in c50b15ddd8b1 -Downloading/unpacking jinja2 (from -r /build/requirements.txt (line 1)) -Downloading/unpacking PyYaml (from -r /build/requirements.txt (line 2)) - -Successfully installed jinja2 PyYaml mistune markdown MarkupSafe -Cleaning up... - ---> abab55c20962 -Removing intermediate container c50b15ddd8b1 -Successfully built abab55c20962 -``` - -From the above build output we can see the build was successful, but we can also see another interesting message;` ---> Using cache`. What this message is telling us is that Docker was able to use its build cache during the build of this image. - -#### Docker build cache - -When Docker is building an image, it doesn't just build a single image; it actually builds multiple images throughout the build processes. In fact we can see from the above output that after each "Step" Docker is creating a new image. - -``` - Step 5 : COPY requirements.txt /build/ - ---> cef11c3fb97c -``` - -The last line from the above snippet is actually Docker informing us of the creating of a new image, it does this by printing the **Image ID**; `cef11c3fb97c`. The useful thing about this approach is that Docker is able to use these images as cache during subsequent builds of the **blog** image. This is useful because it allows Docker to speed up the build process for new builds of the same container. If we look at the example above we can actually see that rather than installing the `python-dev` and `python-pip` packages again, Docker was able to use a cached image. However, since Docker was unable to find a build that executed the `mkdir` command, each subsequent step was executed. - -The Docker build cache is a bit of a gift and a curse; the reason for this is that the decision to use cache or to rerun the instruction is made within a very narrow scope. For example, if there was a change to the `requirements.txt` file Docker would detect this change during the build and start fresh from that point forward. It does this because it can view the contents of the `requirements.txt` file. The execution of the `apt-get` commands however, are another story. If the **Apt** repository that provides the Python packages were to contain a newer version of the python-pip package; Docker would not be able to detect the change and would simply use the build cache. This means that an older package may be installed. While this may not be a major issue for the `python-pip` package it could be a problem if the installation was caching a package with a known vulnerability. - -For this reason it is useful to periodically rebuild the image without using Docker's cache. To do this you can simply specify `--no-cache=True` when executing a Docker build. - -## Deploying the rest of the blog -With the Python packages and modules installed this leaves us at the point of copying the required application files and running the `hamerkop` application. To do this we will simply use more `COPY` and `RUN` instructions. - -``` -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip - -## Create a directory for required files -RUN mkdir -p /build/ - -## Add requirements file and run pip -COPY requirements.txt /build/ -RUN pip install -r /build/requirements.txt - -## Add blog code nd required files -COPY static /build/static -COPY templates /build/templates -COPY hamerkop /build/ -COPY config.yml /build/ -COPY articles /build/articles - -## Run Generator -RUN /build/hamerkop -c /build/config.yml -``` - -Now that we have the rest of the build instructions, let's run through another build and verify that the image builds successfully. - -``` -# docker build -t blog /root/blog/ -Sending build context to Docker daemon 19.52 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Using cache - ---> 8e0f1899d1eb -Step 2 : RUN apt-get update - ---> Using cache - ---> 78b36ef1a1a2 -Step 3 : RUN apt-get install -y python-dev python-pip - ---> Using cache - ---> ef4f9382658a -Step 4 : RUN mkdir -p /build/ - ---> Using cache - ---> f4b66e09fa61 -Step 5 : COPY requirements.txt /build/ - ---> Using cache - ---> cef11c3fb97c -Step 6 : RUN pip install -r /build/requirements.txt - ---> Using cache - ---> abab55c20962 -Step 7 : COPY static /build/static - ---> 15cb91531038 -Removing intermediate container d478b42b7906 -Step 8 : COPY templates /build/templates - ---> ecded5d1a52e -Removing intermediate container ac2390607e9f -Step 9 : COPY hamerkop /build/ - ---> 59efd1ca1771 -Removing intermediate container b5fbf7e817b7 -Step 10 : COPY config.yml /build/ - ---> bfa3db6c05b7 -Removing intermediate container 1aebef300933 -Step 11 : COPY articles /build/articles - ---> 6b61cc9dde27 -Removing intermediate container be78d0eb1213 -Step 12 : RUN /build/hamerkop -c /build/config.yml - ---> Running in fbc0b5e574c5 -Successfully created file /usr/share/nginx/html//2011/06/25/checking-the-number-of-lwp-threads-in-linux -Successfully created file /usr/share/nginx/html//2011/06/checking-the-number-of-lwp-threads-in-linux - -Successfully created file /usr/share/nginx/html//archive.html -Successfully created file /usr/share/nginx/html//sitemap.xml - ---> 3b25263113e1 -Removing intermediate container fbc0b5e574c5 -Successfully built 3b25263113e1 -``` - -### Running a custom container -With a successful build we can now start our custom container by running the `docker` command with the `run` option, similar to how we started the nginx container earlier. - -``` -# docker run -d -p 80:80 --name=blog blog -5f6c7a2217dcdc0da8af05225c4d1294e3e6bb28a41ea898a1c63fb821989ba1 -``` - -Once again the `-d` (**detach**) flag was used to tell Docker to run the container in the background. However, there are also two new flags. The first new flag is `--name`, which is used to give the container a user specified name. In the earlier example we did not specify a name and because of that Docker randomly generated one. The second new flag is `-p`, this flag allows users to map a port from the host machine to a port within the container. - -The base **nginx** image we used exposes port 80 for the HTTP service. By default, ports bound within a Docker container are not bound on the host system as a whole. In order for external systems to access ports exposed within a container the ports must be mapped from a host port to a container port using the `-p` flag. The command above maps port 80 from the host, to port 80 within the container. If we wished to map port 8080 from the host, to port 80 within the container we could do so by specifying the ports in the following syntax `-p 8080:80`. - -From the above command it appears that our container was started successfully, we can verify this by executing `docker ps`. - -``` -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -d264c7ef92bd blog:latest nginx -g 'daemon off 3 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:80->80/tcp blog -``` - -## Wrapping up - -At this point we now have a running custom Docker container. While we touched on a few Dockerfile instructions within this article we have yet to discuss all the instructions. For a full list of Dockerfile instructions you can checkout [Docker's reference page](https://docs.docker.com/v1.8/reference/builder/), which explains the instructions very well. - -Another good resource is their [Dockerfile Best Practices page](https://docs.docker.com/engine/articles/dockerfile_best-practices/) which contains quite a few best practices for building custom Dockerfiles. Some of these tips are very useful such as strategically ordering the commands within the Dockerfile. In the above examples our Dockerfile has the `COPY` instruction for the `articles` directory as the last `COPY` instruction. The reason for this is that the `articles` directory will change quite often. It's best to put instructions that will change oftenat the lowest point possible within the Dockerfile to optimize steps that can be cached. - -In this article we covered how to start a pre-built container and how to build, then deploy a custom container. While there is quite a bit to learn about Docker this article should give you a good idea on how to get started. Of course, as always if you think there is anything that should be added drop it in the comments below. - --------------------------------------- -via:http://bencane.com/2015/12/01/getting-started-with-docker-by-dockerizing-this-blog/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+bencane%2FSAUo+%28Benjamin+Cane%29 - -作者:Benjamin Cane - -译者:[译者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/20151210 Getting started with Docker by Dockerizing this Blog.md.md b/translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md new file mode 100644 index 0000000000..a74af87b6f --- /dev/null +++ b/translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md @@ -0,0 +1,464 @@ +通过Dockerize这篇博客来开启我们的Docker之旅 +=== +>这篇文章将包含Docker的基本概念,以及如何通过创建一个定制的Dockerfile来Dockerize一个应用 +>作者:Benjamin Cane,2015-12-01 10:00:00 + +Docker是2年前从某个idea中孕育而生的有趣技术,世界各地的公司组织都积极使用它来部署应用。在今天的文章中,我将教你如何通过"Dockerize"一个现有的应用,来开始我们的Docker运用。问题中的应用指的就是这篇博客! + +## 什么是Docker? + +当我们开始学习Docker基本概念时,让我们先去搞清楚什么是Docker以及它为什么这么流行。Docker是一个操作系统容器管理工具,它通过将应用打包在操作系统容器中,来方便我们管理和部署应用。 + +### 容器 vs. 虚拟机 + +容器虽和虚拟机并不完全相似,但它也是一种提供**操作系统虚拟化**的方式。但是,它和标准的虚拟机还是有不同之处的。 + +标准虚拟机一般会包括一个完整的操作系统,操作系统包,最后还有一至两个应用。这都得益于为虚拟机提供硬件虚拟化的管理程序。这样一来,一个单一的服务器就可以将许多独立的操作系统作为虚拟客户机运行了。 + +容器和虚拟机很相似,它们都支持在单一的服务器上运行多个操作环境,只是,在容器中,这些环境并不是一个个完整的操作系统。容器一般只包含必要的操作系统包和一些应用。它们通常不会包含一个完整的操作系统或者硬件虚拟化程序。这也意味着容器比传统的虚拟机开销更少。 + +容器和虚拟机常被误认为是两种抵触的技术。虚拟机采用同一个物理服务器,来提供全功能的操作环境,该环境会和其余虚拟机一起共享这些物理资源。容器一般用来隔离运行中的应用进程,运行进程将在单独的主机中运行,以保证隔离后的进程之间不能相互影响。事实上,容器和**BSD Jails**以及`chroot`进程的相似度,超过了和完整虚拟机的相似度。 + +### Docker在容器的上层提供了什么 + +Docker不是一个容器运行环境,事实上,只是一个容器技术,并不包含那些帮助Docker支持[Solaris Zones](https://blog.docker.com/2015/08/docker-oracle-solaris-zones/)和[BSD Jails](https://wiki.freebsd.org/Docker)的技术。Docker提供管理,打包和部署容器的方式。虽然一定程度上,虚拟机多多少少拥有这些类似的功能,但虚拟机并没有完整拥有绝大多数的容器功能,即使拥有,这些功能用起来都并没有Docker来的方便。 + +现在,我们应该知道Docker是什么了,然后,我们将从安装Docker,并部署一个公共的预构建好的容器开始,学习Docker是如何工作的。 + +## 从安装开始 + +默认情况下,Docker并不会自动被安装在您的计算机中,所以,第一步就是安装Docker包;我们的教学机器系统是Ubuntu 14.0.4,所以,我们将使用Apt包管理器,来执行安装操作。 + +``` +# apt-get install docker.io +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + aufs-tools cgroup-lite git git-man liberror-perl +Suggested packages: + btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc + git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki + git-svn +The following NEW packages will be installed: + aufs-tools cgroup-lite docker.io git git-man liberror-perl +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +Need to get 7,553 kB of archives. +After this operation, 46.6 MB of additional disk space will be used. +Do you want to continue? [Y/n] y +``` + +为了检查当前是否有容器运行,我们可以执行`docker`命令,加上`ps`选项 + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +``` + +`docker`命令中的`ps`功能类似于Linux的`ps`命令。它将显示可找到的Docker容器以及各自的状态。由于我们并没有开启任何Docker容器,所以命令没有显示任何正在运行的容器。 + +## 部署一个预构建好的nginx Docker容器 + +我比较喜欢的Docker特性之一就是Docker部署预先构建好的容器的方式,就像`yum`和`apt-get`部署包一样。为了更好地解释,我们来部署一个运行着nginx web服务器的预构建容器。我们可以继续使用`docker`命令,这次选择`run`选项。 + +``` +# docker run -d nginx +Unable to find image 'nginx' locally +Pulling repository nginx +5c82215b03d1: Download complete +e2a4fb18da48: Download complete +58016a5acc80: Download complete +657abfa43d82: Download complete +dcb2fe003d16: Download complete +c79a417d7c6f: Download complete +abb90243122c: Download complete +d6137c9e2964: Download complete +85e566ddc7ef: Download complete +69f100eb42b5: Download complete +cd720b803060: Download complete +7cc81e9a118a: Download complete +``` + +`docker`命令的`run`选项,用来通知Docker去寻找一个指定的Docker镜像,然后开启运行着该镜像的容器。默认情况下,Docker容器在前台运行,这意味着当你运行`docker run`命令的时候,你的shell会被绑定到容器的控制台以及运行在容器中的进程。为了能在后台运行该Docker容器,我们可以使用`-d` (**detach**)标志。 + +再次运行`docker ps`命令,可以看到nginx容器正在运行。 + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f6d31ab01fc9 nginx:latest nginx -g 'daemon off 4 seconds ago Up 3 seconds 443/tcp, 80/tcp desperate_lalande +``` + +从上面的打印信息中,我们可以看到正在运行的名为`desperate_lalande`的容器,它是由`nginx:latest image`(译者注:nginx最新版本的镜像)构建而来得。 + +### Docker镜像 + +镜像是Docker的核心特征之一,类似于虚拟机镜像。和虚拟机镜像一样,Docker镜像是一个被保存并打包的容器。当然,Docker不只是创建镜像,它还可以通过Docker仓库发布这些镜像,Docker仓库和包仓库的概念差不多,它让Docker能够模仿`yum`部署包的方式来部署镜像。为了更好地理解这是怎么工作的,我们来回顾`docker run`执行后的输出。 + +``` +# docker run -d nginx +Unable to find image 'nginx' locally +``` + +我们可以看到第一条信息是,Docker不能在本地找到名叫nginx的镜像。这是因为当我们执行`docker run`命令时,告诉Docker运行一个基于nginx镜像的容器。既然Docker要启动一个基于特定镜像的容器,那么Docker首先需要知道那个指定镜像。在检查远程仓库之前,Docker首先检查本地是否存在指定名称的本地镜像。 + +因为系统是崭新的,不存在nginx镜像,Docker将选择从Docker仓库下载之。 + +``` +Pulling repository nginx +5c82215b03d1: Download complete +e2a4fb18da48: Download complete +58016a5acc80: Download complete +657abfa43d82: Download complete +dcb2fe003d16: Download complete +c79a417d7c6f: Download complete +abb90243122c: Download complete +d6137c9e2964: Download complete +85e566ddc7ef: Download complete +69f100eb42b5: Download complete +cd720b803060: Download complete +7cc81e9a118a: Download complete +``` + +这就是第二部分打印信息显示给我们的内容。默认,Docker会使用[Docker Hub](https://hub.docker.com/)仓库,该仓库由Docker公司维护。 + +和Github一样,在Docker Hub创建公共仓库是免费的,私人仓库就需要缴纳费用了。当然,部署你自己的Docker仓库也是可以实现的,事实上只需要简单地运行`docker run registry`命令就行了。但在这篇文章中,我们的重点将不是讲解如何部署一个定制的注册服务。 + +### 关闭并移除容器 + +在我们继续构建定制容器之前,我们先清理Docker环境,我们将关闭先前的容器,并移除它。 + +我们利用`docker`命令和`run`选项运行一个容器,所以,为了停止该相同的容器,我们简单地在执行`docker`命令时,使用`kill`选项,并指定容器名。 + +``` +# docker kill desperate_lalande +desperate_lalande +``` + +当我们再次执行`docker ps`,就不再有容器运行了 + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +``` + +但是,此时,我们这是停止了容器;虽然它不再运行,但仍然存在。默认情况下,`docker ps`只会显示正在运行的容器,如果我们附加`-a` (all) 标识,它会显示所有运行和未运行的容器。 + +``` +# docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f6d31ab01fc9 5c82215b03d1 nginx -g 'daemon off 4 weeks ago Exited (-1) About a minute ago desperate_lalande +``` + +为了能完整地移除容器,我们在用`docker`命令时,附加`rm`选项。 + +``` +# docker rm desperate_lalande +desperate_lalande +``` + +虽然容器被移除了;但是我们仍拥有可用的**nginx**镜像(译者注:镜像缓存)。如果我们重新运行`docker run -d nginx`,Docker就无需再次拉取nginx镜像,即可启动容器。这是因为我们本地系统中已经保存了一个副本。 + +为了列出系统中所有的本地镜像,我们运行`docker`命令,附加`images`选项。 + +``` +# docker images +REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE +nginx latest 9fab4090484a 5 days ago 132.8 MB +``` + +## 构建我们自己的镜像 + +截至目前,我们已经使用了一些基础的Docker命令来开启,停止和移除一个预构建好的普通镜像。为了"Dockerize"这篇博客,我们需要构建我们自己的镜像,也就是创建一个**Dockerfile**。 + +在大多数虚拟机环境中,如果你想创建一个机器镜像,首先,你需要建立一个新的虚拟机,安装操作系统,安装应用,最后将其转换为一个模板或者镜像。但在Docker中,所有这些步骤都可以通过Dockerfile实现全自动。Dockerfile是向Docker提供构建指令去构建定制镜像的方式。在这一章节,我们将编写能用来部署这篇博客的定制Dockerfile。 + +### 理解应用 + +我们开始构建Dockerfile之前,第一步要搞明白,我们需要哪些东西来部署这篇博客。 + +博客本质上是由静态站点生成器生成的静态HTML页面,这个静态站点是我编写的,名为**hamerkop**。这个生成器很简单,它所做的就是生成该博客站点。所有的博客源码都被我放在了一个公共的[Github仓库](https://github.com/madflojo/blog)。为了部署这篇博客,我们要先从Github仓库把博客内容拉取下来,然后安装**Python**和一些**Python**模块,最后执行`hamerkop`应用。我们还需要安装**nginx**,来运行生成后的内容。 + +截止目前,这些还是一个简单的Dockerfile,但它却给我们展示了相当多的[Dockerfile语法]((https://docs.docker.com/v1.8/reference/builder/))。我们需要克隆Github仓库,然后使用你最喜欢的编辑器编写Dockerfile;我选择`vi` + +``` +# git clone https://github.com/madflojo/blog.git +Cloning into 'blog'... +remote: Counting objects: 622, done. +remote: Total 622 (delta 0), reused 0 (delta 0), pack-reused 622 +Receiving objects: 100% (622/622), 14.80 MiB | 1.06 MiB/s, done. +Resolving deltas: 100% (242/242), done. +Checking connectivity... done. +# cd blog/ +# vi Dockerfile +``` + +### FROM - 继承一个Docker镜像 + +第一条Dockerfile指令是`FROM`指令。这将指定一个现存的镜像作为我们的基础镜像。这也从根本上给我们提供了继承其他Docker镜像的途径。在本例中,我们还是从刚刚我们使用的**nginx**开始,如果我们想重新开始,我们可以通过指定`ubuntu:latest`来使用**Ubuntu** Docker镜像。 + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane +``` + +除了`FROM`指令,我还使用了`MAINTAINER`,它用来显示Dockerfile的作者。 + +Docker支持使用`#`作为注释,我将经常使用该语法,来解释Dockerfile的部分内容。 + +### 运行一次测试构建 + +因为我们继承了**nginx** Docker镜像,我们现在的Dockerfile也就包括了用来构建**nginx**镜像的[Dockerfile](https://github.com/nginxinc/docker-nginx/blob/08eeb0e3f0a5ee40cbc2bc01f0004c2aa5b78c15/Dockerfile)中所有指令。这意味着,此时我们可以从该Dockerfile中构建出一个Docker镜像,然后从该镜像中运行一个容器。虽然,最终的镜像和**nginx**镜像本质上是一样的,但是我们这次是通过构建Dockerfile的形式,然后我们将讲解Docker构建镜像的过程。 + +想要从Dockerfile构建镜像,我们只需要在运行`docker`命令的时候,加上**build**选项。 + +``` +# docker build -t blog /root/blog +Sending build context to Docker daemon 23.6 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Running in c97f36450343 + ---> 60a44f78d194 +Removing intermediate container c97f36450343 +Successfully built 60a44f78d194 +``` + +上面的例子,我们使用了`-t` (**tag**)标识给镜像添加"blog"的标签。本质上我们只是在给镜像命名,如果我们不指定标签,就只能通过Docker分配的**Image ID**来访问镜像了。本例中,从Docker构建成功的信息可以看出,**Image ID**值为`60a44f78d194`。 + +除了`-t`标识外,我还指定了目录`/root/blog`。该目录被称作"构建目录",它将包含Dockerfile,以及其他需要构建该容器的文件。 + +现在我们构建成功,下面我们开始定制该镜像。 + +### 使用RUN来执行apt-get + +用来生成HTML页面的静态站点生成器是用**Python**语言编写的,所以,在Dockerfile中需要做的第一件定制任务是安装Python。我们将使用Apt包管理器来安装Python包,这意味着在Dockerfile中我们要指定运行`apt-get update`和`apt-get install python-dev`;为了完成这一点,我们可以使用`RUN`指令。 + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip +``` + +如上所示,我们只是简单地告知Docker构建镜像的时候,要去执行指定的`apt-get`命令。比较有趣的是,这些命令只会在该容器的上下文中执行。这意味着,即使容器中安装了`python-dev`和`python-pip`,但主机本身并没有安装这些。说的更简单点,`pip`命令将只在容器中执行,出了容器,`pip`命令不存在。 + +还有一点比较重要的是,Docker构建过程中不接受用户输入。这说明任何被`RUN`指令执行的命令必须在没有用户输入的时候完成。由于很多应用在安装的过程中需要用户的输入信息,所以这增加了一点难度。我们例子,`RUN`命令执行的命令都不需要用户输入。 + +### 安装Python模块 + +**Python**安装完毕后,我们现在需要安装Python模块。如果在Docker外做这些事,我们通常使用`pip`命令,然后参考博客Git仓库中名叫`requirements.txt`的文件。在之前的步骤中,我们已经使用`git`命令成功地将Github仓库"克隆"到了`/root/blog`目录;这个目录碰巧也是我们创建`Dockerfile`的目录。这很重要,因为这意味着Dokcer在构建过程中可以访问Git仓库中的内容。 + +当我们执行构建后,Docker将构建的上下文环境设置为指定的"构建目录"。这意味着目录中的所有文件都可以在构建过程中被使用,目录之外的文件(构建环境之外)是不能访问的。 + +为了能安装需要的Python模块,我们需要将`requirements.txt`从构建目录拷贝到容器中。我们可以在`Dockerfile`中使用`COPY`指令完成这一需求。 + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip + +## Create a directory for required files +RUN mkdir -p /build/ + +## Add requirements file and run pip +COPY requirements.txt /build/ +RUN pip install -r /build/requirements.txt +``` + +在`Dockerfile`中,我们增加了3条指令。第一条指令使用`RUN`在容器中创建了`/build/`目录。该目录用来拷贝生成静态HTML页面需要的一切应用文件。第二条指令是`COPY`指令,它将`requirements.txt`从"构建目录"(`/root/blog`)拷贝到容器中的`/build/`目录。第三条使用`RUN`指令来执行`pip`命令;安装`requirements.txt`文件中指定的所有模块。 + +当构建定制镜像时,`COPY`是条重要的指令。如果在Dockerfile中不指定拷贝文件,Docker镜像将不会包含requirements.txt文件。在Docker容器中,所有东西都是隔离的,除非在Dockerfile中指定执行,否则容器中不会包括需要的依赖。 + +### 重新运行构建 + +现在,我们让Docker执行了一些定制任务,现在我们尝试另一次blog镜像的构建。 + +``` +# docker build -t blog /root/blog +Sending build context to Docker daemon 19.52 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Using cache + ---> 8e0f1899d1eb +Step 2 : RUN apt-get update + ---> Using cache + ---> 78b36ef1a1a2 +Step 3 : RUN apt-get install -y python-dev python-pip + ---> Using cache + ---> ef4f9382658a +Step 4 : RUN mkdir -p /build/ + ---> Running in bde05cf1e8fe + ---> f4b66e09fa61 +Removing intermediate container bde05cf1e8fe +Step 5 : COPY requirements.txt /build/ + ---> cef11c3fb97c +Removing intermediate container 9aa8ff43f4b0 +Step 6 : RUN pip install -r /build/requirements.txt + ---> Running in c50b15ddd8b1 +Downloading/unpacking jinja2 (from -r /build/requirements.txt (line 1)) +Downloading/unpacking PyYaml (from -r /build/requirements.txt (line 2)) + +Successfully installed jinja2 PyYaml mistune markdown MarkupSafe +Cleaning up... + ---> abab55c20962 +Removing intermediate container c50b15ddd8b1 +Successfully built abab55c20962 +``` + +上述输出所示,我们可以看到构建成功了,我们还可以看到另外一个有趣的信息` ---> Using cache`。这条信息告诉我们,Docker在构建该镜像时使用了它的构建缓存。 + +### Docker构建缓存 + +当Docker构建镜像时,它不仅仅构建一个单独的镜像;事实上,在构建过程中,它会构建许多镜像。从上面的输出信息可以看出,在每一"步"执行后,Docker都在创建新的镜像。 + +``` + Step 5 : COPY requirements.txt /build/ + ---> cef11c3fb97c +``` + +上面片段的最后一行可以看出,Docker在告诉我们它在创建一个新镜像,因为它打印了**Image ID**;`cef11c3fb97c`。这种方式有用之处在于,Docker能在随后构建**blog**镜像时将这些镜像作为缓存使用。这很有用处,因为这样,Docker就能加速同一个容器中新构建任务的构建流程。从上面的例子中,我们可以看出,Docker没有重新安装`python-dev`和`python-pip`包,Docker则使用了缓存镜像。但是由于Docker并没有找到执行`mkdir`命令的构建缓存,随后的步骤就被一一执行了。 + +Docker构建缓存一定程度上是福音,但有时也是噩梦。这是因为使用缓存或者重新运行指令的决定在一个很狭窄的范围内执行。比如,如果`requirements.txt`文件发生了修改,Docker会在构建时检测到该变化,然后Docker会重新执行该执行那个点往后的所有指令。这得益于Docker能查看`requirements.txt`的文件内容。但是,`apt-get`命令的执行就是另一回事了。如果提供Python包的**Apt** 仓库包含了一个更新的python-pip包;Docker不会检测到这个变化,转而去使用构建缓存。这会导致之前旧版本的包将被安装。虽然对`python-pip`来说,这不是主要的问题,但对使用了某个致命攻击缺陷的包缓存来说,这是个大问题。 + +出于这个原因,抛弃Docker缓存,定期地重新构建镜像是有好处的。这时,当我们执行Docker构建时,我简单地指定`--no-cache=True`即可。 + +## 部署博客的剩余部分 + +Python包和模块安装后,接下来我们将拷贝需要用到的应用文件,然后运行`hamerkop`应用。我们只需要使用更多的`COPY` and `RUN`指令就可完成。 + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip + +## Create a directory for required files +RUN mkdir -p /build/ + +## Add requirements file and run pip +COPY requirements.txt /build/ +RUN pip install -r /build/requirements.txt + +## Add blog code nd required files +COPY static /build/static +COPY templates /build/templates +COPY hamerkop /build/ +COPY config.yml /build/ +COPY articles /build/articles + +## Run Generator +RUN /build/hamerkop -c /build/config.yml +``` + +现在我们已经写出了剩余的构建指令,我们再次运行另一次构建,并确保镜像构建成功。 + +``` +# docker build -t blog /root/blog/ +Sending build context to Docker daemon 19.52 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Using cache + ---> 8e0f1899d1eb +Step 2 : RUN apt-get update + ---> Using cache + ---> 78b36ef1a1a2 +Step 3 : RUN apt-get install -y python-dev python-pip + ---> Using cache + ---> ef4f9382658a +Step 4 : RUN mkdir -p /build/ + ---> Using cache + ---> f4b66e09fa61 +Step 5 : COPY requirements.txt /build/ + ---> Using cache + ---> cef11c3fb97c +Step 6 : RUN pip install -r /build/requirements.txt + ---> Using cache + ---> abab55c20962 +Step 7 : COPY static /build/static + ---> 15cb91531038 +Removing intermediate container d478b42b7906 +Step 8 : COPY templates /build/templates + ---> ecded5d1a52e +Removing intermediate container ac2390607e9f +Step 9 : COPY hamerkop /build/ + ---> 59efd1ca1771 +Removing intermediate container b5fbf7e817b7 +Step 10 : COPY config.yml /build/ + ---> bfa3db6c05b7 +Removing intermediate container 1aebef300933 +Step 11 : COPY articles /build/articles + ---> 6b61cc9dde27 +Removing intermediate container be78d0eb1213 +Step 12 : RUN /build/hamerkop -c /build/config.yml + ---> Running in fbc0b5e574c5 +Successfully created file /usr/share/nginx/html//2011/06/25/checking-the-number-of-lwp-threads-in-linux +Successfully created file /usr/share/nginx/html//2011/06/checking-the-number-of-lwp-threads-in-linux + +Successfully created file /usr/share/nginx/html//archive.html +Successfully created file /usr/share/nginx/html//sitemap.xml + ---> 3b25263113e1 +Removing intermediate container fbc0b5e574c5 +Successfully built 3b25263113e1 +``` + +### 运行定制的容器 + +成功的一次构建后,我们现在就可以通过运行`docker`命令和`run`选项来运行我们定制的容器,和之前我们启动nginx容器一样。 + +``` +# docker run -d -p 80:80 --name=blog blog +5f6c7a2217dcdc0da8af05225c4d1294e3e6bb28a41ea898a1c63fb821989ba1 +``` + +我们这次又使用了`-d` (**detach**)标识来让Docker在后台运行。但是,我们也可以看到两个新标识。第一个新标识是`--name`,这用来给容器指定一个用户名称。之前的例子,我们没有指定名称,因为Docker随机帮我们生成了一个。第二个新标识是`-p`,这个标识允许用户从主机映射一个端口到容器中的一个端口。 + +之前我们使用的基础**nginx**镜像分配了80端口给HTTP服务。默认情况下,容器内的端口通道并没有绑定到主机系统。为了让外部系统能访问容器内部端口,我们必须使用`-p`标识将主机端口映射到容器内部端口。上面的命令,我们通过`-p 8080:80`语法将主机80端口映射到容器内部的80端口。 + +经过上面的命令,我们的容器似乎成功启动了,我们可以通过执行`docker ps`核实。 + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d264c7ef92bd blog:latest nginx -g 'daemon off 3 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:80->80/tcp blog +``` + +## 总结 + +截止目前,我们拥有了正在运行的定制Docker容器。虽然在这篇文章中,我们只接触了一些Dockerfile指令用法,但是我们还是要讨论所有的指令。我们可以检查[Docker's reference page](https://docs.docker.com/v1.8/reference/builder/)来获取所有的Dockerfile指令用法,那里对指令的用法说明得很详细。 + +另一个比较好的资源是[Dockerfile Best Practices page](https://docs.docker.com/engine/articles/dockerfile_best-practices/),它有许多构建定制Dockerfile的最佳练习。有些技巧非常有用,比如战略性地组织好Dockerfile中的命令。上面的例子中,我们将`articles`目录的`COPY`指令作为Dockerfile中最后的`COPY`指令。这是因为`articles`目录会经常变动。所以,将那些经常变化的指令尽可能地放在最后面的位置,来最优化那些可以被缓存的步骤。 + +通过这篇文章,我们涉及了如何运行一个预构建的容器,以及如何构建,然后部署定制容器。虽然关于Docker你还有许多需要继续学习的地方,但我想这篇文章给了你如何继续开始的好建议。当然,如果你认为还有一些需要继续补充的内容,在下面评论即可。 + +-------------------------------------- +via:http://bencane.com/2015/12/01/getting-started-with-docker-by-dockerizing-this-blog/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+bencane%2FSAUo+%28Benjamin+Cane%29 + +作者:Benjamin Cane + +译者:[su-kaiyao](https://github.com/su-kaiyao) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + From e17507e78a0cf61ec2c4d163724029fcca564663 Mon Sep 17 00:00:00 2001 From: NearTan Date: Fri, 18 Dec 2015 14:56:34 +0800 Subject: [PATCH 0591/1710] Update 20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md --- ...nstall Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md index 10b3b02303..1e14ff6a7b 100644 --- a/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md +++ b/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md @@ -1,3 +1,4 @@ +translating by NearTan How to Install Laravel PHP Framework on CentOS 7 / Ubuntu 15.04 ================================================================================ Hi All, In this article we are going to setup Laravel on CentOS 7 and Ubuntu 15.04. If you are a PHP web developer then you don't need to worry about of all modern PHP frameworks, Laravel is the easiest to get up and running that saves your time and effort and makes web development a joy. Laravel embraces a general development philosophy that sets a high priority on creating maintainable code by following some simple guidelines, you should be able to keep a rapid pace of development and be free to change your code with little fear of breaking existing functionality. @@ -172,4 +173,4 @@ via: http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-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 84e2ade6293921847f3396a28f20c8650ff2fd88 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Fri, 18 Dec 2015 16:49:28 +0800 Subject: [PATCH 0592/1710] half the work --- .../Learn with Linux--Learning to Type.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) 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 index 51cef0f1a8..fe80d9e51d 100644 --- 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 @@ -2,53 +2,51 @@ 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: +[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 教学之掌握数学][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. +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 -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. +很多人都要打字,操作键盘已经成为他们的第二天性。 但是这些人中有多少是依然使用两个手指头来快速地按键盘的?即使学校有教我们使用键盘的方法(LCTT 译注:呃。。。),我们也会慢慢地抛弃正确的打字姿势,养成只用两个大拇指玩键盘的习惯。 -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 (或者叫 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. +TuxType 是给小孩子玩的。在一些有趣的游戏中,小学生们可以通过完成一些简单的练习来 get “10个手指打字”的新技能。 -Debian and derivatives (therefore all Ubuntu derivatives) should have TuxType in their standard repositories. To install simply type +Debian 及其衍生版本(包含所有 Ubuntu 衍生版本)的标准软件仓库都有 TuxType,使用下面的命令安装: 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.). +软件开始时有一个简单的 Tux 界面和一段难听的 midi 音乐,幸运的是你可以通过右下角的喇叭按钮把声音调低了。(LCTT译注:Tux 就是那只 Linux 吉祥物,Linus 说它的表情被设计成刚喝完啤酒后的满足感,见《Just For Fun》。) ![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. +最开始处的两个选项“Fish Cascade”和“Comet Zap”是打字游戏,当你开始游戏时,你需要很投入到这个课程。 -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. +第3个选项为“Lession”,提供40多个简单的课程,每个课程会增加一个字母让你来练习,练习过程中会给出一些提示,比如应该用哪个手指按键盘上的字母。 ![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. +更高级点的,你可以练习输入句子。不知道为什么,句子练习被放在“Options”选项里。(LCTT 译注:句子练习第一句是“The quick brown fox jumps over the lazy dog”,包含了26个英文字母的英文句子,可用于检测键盘是否坏键,也是练习英文打字的必备良药啊。) ![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 +这个游戏让玩家打出单词来帮助 Tux 吃到小鱼或者打击掉下来的流星,可以训练速度和精确度。 ![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) ### From ed02e579444567df750a75d8a8075ba5f9a39b15 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 18 Dec 2015 17:31:36 +0800 Subject: [PATCH 0593/1710] Update 20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md --- ...ri-Pi--Using the Raspberry Pi as a Secure Landing Point.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md b/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md index 36c28d25d6..7388b7693e 100644 --- a/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md +++ b/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md @@ -1,3 +1,7 @@ +translating by ezio + + + Securi-Pi: Using the Raspberry Pi as a Secure Landing Point ================================================================================ From 127cb0b703572d061e57112d86459adbc2a11685 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sat, 19 Dec 2015 14:07:22 +0800 Subject: [PATCH 0594/1710] translated wi-cuckoo --- ...ository with 44 Years of Unix Evolution.md | 89 +++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-) mode change 100644 => 100755 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 old mode 100644 new mode 100755 index 634d056859..43b3b9e219 --- 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 @@ -1,33 +1,32 @@ -translating wi-cuckoo -A Repository with 44 Years of Unix Evolution -================================================================================ -### Abstract ### +一个涵盖 Unix 44 年进化史的仓库 +============================================================================= +### 摘要 ### -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. +Unix 操作系统的进化历史,可以从一个版本控制的仓库中窥见,时间跨越从 1972 年以 5000 行内核代码的出现,到 2015 年成为一个含有 26,000,000 行代码的被广泛使用的系统。该仓库包含 659,000 条提交,和 2306 次合并。仓库部署被普遍采用的 Git 系统储存其代码,并且在时下流行的 GitHub 上建立了档案。它综合了系统定制软件的 24 个快照,都是开发自贝尔实验室,伯克利大学,386BSD 团队,两个传统的仓库 和 开源 FreeBSD 系统的仓库。总的来说,850 位个人贡献者已经确认,更早些时候的一批人主要做基础研究。这些数据可以用于一些经验性的研究,在软件工程,信息系统和软件考古学领域。 -### 1 Introduction ### +### 1 介绍 ### -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. +Unix 操作系统作为一个主要的工程上的突破而脱颖而出,得益于其模范的设计,大量的技术贡献,它的开发模型和广泛的使用。Unix 编程环境的设计已经被标榜为一个能提供非常简洁,功能强大并且优雅的设计[[1][1]]。在技术方面,许多对 Unix 有直接贡献的,或者因 Unix 而流行的特性就包括[[2][2]]:用高级语言编写的可移植部署的内核;一个分层式设计的文件系统;兼容的文件,设备,网络和进程间 I/O;管道和过滤架构;虚拟文件系统;和用户可选的 shell。很早的时候,就有一个庞大的社区为 Unix 贡献软件[[3][3]],[[4][4]],pp. 65-72]。随时间流走,这个社区不断壮大,并且以现在称为开源软件开发的方式在工作着[[5][5],pp. 440-442]。Unix 和其睿智的晚辈们也将 C 和 C++ 编程语言,分析程序和词法分析生成器(*yacc,lex*),发扬光大了,文档编制工具(*troff,eqn,tbl*),脚本语言(*awk,sed,Perl*),TCP/IP 网络,和配置管理系统(*SCSS,RCS,Subversion,Git*)发扬广大了,同时也形成了大部分的现代互联网基础设施和网络。 -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. +幸运的是,一些重要的具有历史意义的 Unix 材料已经保存下来了,现在保持对外开放。尽管 Unix 最初是由相对严格的协议发行,但在早期的开发中,很多重要的部分是通过 Unix 的某个版权拥有者以一个自由的协议发行。然后将这些部分再结合开发的软件或者以开源发行的软件,Berkeley,Californai 大学和 FreeBSD 项目组从 1972 年六月二十日开始到现在,提供了涵盖整个系统的开发。 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 ### +### 2. 数据概览 ### -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. +这 1GB 的 Unix 仓库可以从 [GitHub][9] 克隆。[1][10]如今[2][11],这个仓库包含来自 850 个贡献者的 659,000 个提交和 2306 个合并。贡献者有来自 Bell 实验室的 23 个员工,Berkeley 计算机系统研究组(CSRG)的 158 个人,和 FreeBSD 项目的 660 个成员。 -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. +这个仓库的生命始于一个 *Epoch* 的标签,这里面只包含了证书信息和现在的 README 文件。其后各种各样的标签和分支记录了很多重要的时刻。 -- *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. +- *Research-VX* 标签对应来自 Bell 实验室六次的研究版本。从 *Research-V1* (PDP-11 4768 行汇编代码)开始,到以 *Research-V7* (大约 324,000 行代码,1820 个 C 文件)结束。 +- *Bell-32V* 是 DEC/VAX 架构的 Unix 第七个版本的一部分。 +- *BSD-X* 标签对应 Berkeley 释出的 15 个快照。 +- *386BSD-X* 标签对应系统的两个开源版本,主要是 Lynne 和 William Jolitz 写的 适用于 Intel 386 架构的内核代码。 +- *FreeBSD-release/X* 标签和分支标记了来自 FreeBSD 项目的 116 个发行版。 -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. +另外,以 *-Snapshot-Development* 为后缀的分支,表示一个被综合的以时间排序的快照文件序列的一些提交,而以一个 *-VCS-Development* 为后缀的标签,标记了有特别发行版出现的历史分支的时刻。 -The repository's history includes commits from the earliest days of the system's development, such as the following. +仓库的历史包含从系统开发早期的一些提交,比如下面这些。 commit c9f643f59434f14f774d61ee3856972b8c3905b1 Author: Dennis Ritchie @@ -35,69 +34,69 @@ The repository's history includes commits from the earliest days of the system's 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. +释出间隙的合并随着系统进化而发生,比如 从 BSD 2 到 BSD 3 的开发,Unix 32/V 也是正确地代表了 Git 仓库里带两个父节点的图形节点。(这太莫名其妙了) -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. +更为重要的是,该仓库的构造方式允许 **git blame**,就是可以给源代码加上注释,如版本,日期和它们第一次出现相关联的作者,这样可以知道任何代码的起源。比如说 **BSD-4** 这个标签,在内核的 *pipe.c* 文件上运行一下 git blame,就会显示代码行由 Ken Thompson 写于 1974,1975 和 1979年,Bill Joy 写于 1980 年。这就可以自动(尽管计算上比较费事)检测出任何时刻出现的代码。 ![](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. +如上图[12]所示,现代版本的 Unix(FreeBSD 9)依然有来自 BSD 4.3,BSD 4.3 Net/2 和 BSD 2.0 的代码块。有趣的是,这图片显示有部分代码好像没有保留下来,当时激进地要创造一个脱离于 Berkeyel(386BSD 和 FreeBSD 1.0)释出代码的开源操作系统,其所开发的代码。FreeBSD 9 中最古老的代码是一个 18 行的队列,在 C 库里面的 timezone.c 文件里,该文件也可以在第七版的 Unix 文件里找到,同样的名字,时间戳是 1979 年一月十日 - 36 年前。 -### 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. +这个项目的目的是以某种方式巩固从数据方面说明 Unix 的进化,通过将其并入一个现代的修订仓库,帮助人们对系统进化的研究。项目工作包括收录数据,分类并综合到一个单独的 Git 仓库里。 ![](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. +项目以三种数据类型为基础(见 Figure [2][13])。首先,早些发布的版本快照,是从 [Unix Heritage Society archive][14] 中获得,[2][15] 在 [CD-ROM 镜像][16] 中包括 CSRG 全部的源包,[4][17] [Oldlinux site],[5][19] 和 [FreeBSD 包][20]。[6][21] 其次,以前的,现在的仓库,也就是 CSRG SCCS [[6][22]] 仓库,FreeBSD 1 CVS 仓库,和[现代 FreeBSD 开发的 Git 镜像][23]。[7][24]前两个都是从相同的源获得而作为对应的快照。 -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] +最后,也是最费力的数据源是 **primary research**。释出的快照并没有提供关于它们的源头和每个文件贡献者的信息。因此,这些信息片段需要通过 primary research 验证。至于作者信息主要通过作者的自传,研究论文,内部备忘录和旧文档扫描;通过阅读并且自动处理源代码和帮助页面补充;通过与那个年代的人用电子邮件交流;在 *StackExchange* 网站上贴出疑问;查看文件的位置(在早期的内核源代码版本中,分为 `usr/sys/dmr` 和 `/usr/sys/ken`);从研究论文和帮助手册到源代码,从一个发行版到另一个发行版地宣传中获取。(有趣的是,第一和第二的研究版帮助页面都有一个 “owner” 部分,列出了作者(比如,*Ken*)与对应的系统命令,文件,系统调用,或者功能库。在第四版中这个部分就没了,而在 BSD 发行版中又浮现了 “Author” 部分。)关于作者信息更为详细地写在了项目的文件中,这些文件被用于匹配源代码文件和它们的作者和对应的提交信息。最后,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. +作为该项目的一部分而开发的软件和数据文件,现在可以[在线获取][27],[9][28],并且,如果有合适的网络环境,CPU 和磁盘资源,可以用来从头构建这样一个仓库。关于主要发行版的所有者信息,都存储在该项目 `author-path` 目录下的文件里。These contain lines with a regular expressions for a file path followed by the identifier of the corresponding author.(这句单词都认识,但是不理解具体意思)也可以制定多个作者。正则表达式是按线性处理的,所以一个文件末尾的匹配一切的表达式可以指定一个发行版的默认作者。为避免重复,一个以 `.au` 后缀的独立文件专门用于映射作者身份到他们的名字和 email。这样一个文件为每个社区建立了一个,以关联系统的进化:Bell 实验室,Berkeley,386BSD 和 FreeBSD。为了真实性的需要,早期 Bell 实验室发行版的 emails 都以 UUCP 注释列出了(e.g. `research!ken`)。FreeBSD 作者的鉴定人图谱,需要导入早期的 CVS 仓库,通过从如今项目的 Git 仓库里解压对应的数据构建。总的来说,注释作者信息的文件(828 rules)包含 1107 行,并且另外 640 映射作者鉴定人到名字。 -The curation of the project's data sources has been codified into a 168-line `Makefile`. It involves the following steps. +现在项目的数据源被编码成了一个 168 行的 `Makefile`。它包括下面的步骤。 -**Fetching** Copying and cloning about 11GB of images, archives, and repositories from remote sites. +**Fetching** 从远程站点复制和克隆大约 11GB 的镜像,档案和仓库。 -**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. +**Tooling** 从 2.9 BSD 中为旧的 PDP-11 档案获取一个归档器,并作出调整来在现代的 Unix 版本下编译;编译 4.3 BSD *compress* 程序来解压 386BSD 发行版,这个程序不再是现代 Unix 系统的组成部分了。 -**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. +**Organizing** 用 tar 和 *cpio* 解压缩包;结合第六版的三个目录;用旧的 PDP-11 归档器解压所有的 1 BSD 档案;挂载 CD-ROM 镜像,这样可以作为文件系统处理;组合 8 和 62 386BSD 散乱的磁盘镜像为两个独立的文件。 -**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*. +**Cleaning** 重新存储第一版的内核源代码文件,这个可以通过合适的字符识别从打印输出用获取;给第七版的源代码文件打补丁;移除一个发行版后被添加进来的元数据和其他文件,为避免得到错误的时间戳信息;修复毁坏的 SCCS 文件;通过移除 CVS symbols assigned to multiple revisions with a custom Perl script,删除 CVS *Attr* 文件和用 *cvs2svn* 将 CVS 仓库转换为 Git 仓库,来处理早期的 FreeBSD CVS 仓库。 -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. +在仓库表述中有一个很有意思的部分就是,如何导入那些快照,并以一种方式联系起来,使得 *git blame* 可以发挥它的魔力。快照导入到仓库是作为一系列的提交实现的,根据每个文件的时间戳。当所有文件导入后,就被用对应发行版的名字给标记了。在这点上,一个人可以删除那些文件,并开始导入下一个快照。注意 *git blame* 命令是通过回溯一个仓库的历史来工作的,并使用启发法来检测文件之间或内部的代码移动和复制。因此,删除掉的快照间会产生中断,防止它们之间的代码被追踪。 -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. +相反,在下一个快照导入之前,之前快照的所有文件都被移动到了一个隐藏的后备目录里,叫做 `.ref`(引用)。它们保存在那,直到下个快照的所有文件都被导入了,这时候它们就会被删掉。因为 `.ref` 目录下的每个文件都完全配对一个原始文件,*git blame* 可以知道多少源代码通过 `.ref` 文件从一个版本移到了下一个,而不用显示出 `.ref` 文件。为了更进一步帮助检测代码起源,同时增加表述的真实性,每个发行版都被表述成了一个合并,介于有增加文件的分支(*-Development*)与之前发行版之间的合并。 -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]. +上世纪 80 年代这个时期,只有 Berkeley 开发文件的一个子集是用 SCCS 版本控制的。整个时期内,我们统一的仓库里包含了来自 SCCS 的提交和快照增加的文件。在每个发行版的时间点上,可以发现 SCCS 最近的提交,被标记成一个发行版中增加的导入分支的合并。这些合并可以在 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. +将各种数据资源综合到一个仓库的工作,主要是用两个脚本来完成的。一个 780 行的 Perl 脚本(`import-dir.pl`)可以从一个单独的数据源(快照目录,SCCS 仓库,或者 Git 仓库)中,以 *Git fast export* 格式导出(真实的或者综合的)提交历史。输出是一个简单的文本格式,Git 工具用这个来导入和导出提交。其他方面,这个脚本以一些东西为参数,如文件到贡献者的映射,贡献者登录名和他们的全名间的映射,导入的提交会被合并,哪些文件要处理,哪些文件要忽略,和“引用”文件的处理。一个 450 行的 Shell 脚本创建 Git 仓库,并调用带适当参数的 Perl 脚本,导入 27 个可用的历史数据资源。Shell 脚本也会跑 30 遍测试,比较特定标签的仓库和对应的数据源,确认出现的和没出现的备用目录,并查看分支树和合并的数量,*git blame* 和 *git log* 的输出中的退化。最后,*git* 被调用来作垃圾收集和压缩仓库,从最初的 6GB 降到发行的 1GB。 -### 4 Data Uses ### +### 4 数据使用 ### -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. +数据可以用于软件工程,信息系统和软件考古学领域的经验性研究。鉴于它从不间断而独一无二的存在了超过了 40 年,可以供软件的进化和代代更迭参考。伴随那个时代以来在处理速度千倍地增长,存储容量百万倍的扩大,数据同样可以用于软件和硬件技术交叉进化的研究。软件开发从研究中心到大学,到开源社区的转移,可以用来研究组织文化对于软件开发的影响。仓库也可以用于学习开发者编程的影响力,比如 Turing 奖获得者(Dennis Ritchie 和 Ken Thompson)和 IT 产业的大佬(Bill Joy 和 Eric Schmidt)。另一个值得学习的现象是代码的长寿,无论是单行的水平,或是作为那个时代随 Unix 发行的完整的系统(Ingres, Lisp, Pascal, Ratfor, Snobol, TMP),和导致代码存活或消亡的因素。最后,因为数据使 Git 底层软件仓库存储技术感到压力,到了它的限度,这会加速修正管理系统领域的工程进度。 ![](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. +Figure [3][30] 描述了一些有趣的代码统计,根据 36 个主要 Unix 发行版,验证了代码风格和编程语言的使用在很长的时间尺度上的进化。这种进化是软硬件技术的需求和支持驱动的,软件构筑理论,甚至社会力量。图片中的数据已经计算了在一个所给发行版中出现的文件的平均时间。正如可以从中看到,在过去的 40 年中,验证器和文件名字的长度已经稳定从 4 到 6 个字符增长到 7 到 11 个字符。我们也可以看到在评论数量的少量稳定增加,和 *goto* 表达的使用量减少,同时 *register* 这个类型修改器的消失。 -### 5 Further Work ### +### 5 未来的工作 ### -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. +可以做很多事情去提高仓库的正确性和有效性。创建进程作为源代码开源了,通过 GitHub 的拉取请求,可以很容易地贡献更多代码和修复。最有用的社区贡献会使得导入的快照文件的覆盖增长,这曾经是隶属于一个具体的作者。现在,大约 90,000 个文件(在 160,000 总量之外)被指定了作者,根据一个默认的规则。类似地,大约有 250 个作者(最初 FreeBSD 那些)是验证器确认的。两个都列在了 build 仓库无配对的目录里,也欢迎贡献数据。进一步,BSD SCCS 和 FreeBSD CVS 的提交,共享相同的作者和时间戳,这些可以结合成一个单独的 Git 提交。导入 SCCS 文件提交的支持会被添加进来,为了引入仓库对应的元数据。最后,最重要的,开源系统的更多分支会添加进来,比如 NetBSD OpenBSD, DragonFlyBSD 和 *illumos*。理想地,其他重要的历史上的 Unix 发行版,它们的版权拥有者,如 System III, System V, NeXTSTEP 和 SunOS,也会在一个协议下释出他们的系统,允许他们的合作伙伴使用仓库用于研究。 -#### 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. +本人感谢很多付出努力的人们。 Brian W. Kernighan, Doug McIlroy 和 Arnold D. Robbins 帮助 Bell 实验室开发了登录验证器。 Clem Cole, Era Erikson, Mary Ann Horton, Kirk McKusick, Jeremy C. Reed, Ingo Schwarze 和 Anatole Shaw 开发了 BSD 的登录验证器。BSD SCCS 导入了 H. Merijn Brand 和 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. +这次研究通过 National Strategic Reference Framework (NSRF) 的 Operational Program " Education and Lifelong Learning" - Research Funding Program: Thalis - Athens University of Economics and Business - Software Engineering Research Platform,由 European Union ( European Social Fund - ESF) 和 Greek national funds 出资赞助。 -### 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. @@ -143,7 +142,7 @@ This research has been co-financed by the European Union (European Social Fund - via: http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html -译者:[译者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/) 荣誉推出 From 628c632488319a59826cd4744f5839fef8ee1167 Mon Sep 17 00:00:00 2001 From: Bian Jiaping Date: Sat, 19 Dec 2015 16:41:28 +0800 Subject: [PATCH 0595/1710] Translating 'How to enable Software Collections (SCL) on CentOS' --- ...1215 How to enable Software Collections (SCL) on CentOS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md b/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md index e354bb53af..1d5340a3aa 100644 --- a/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md +++ b/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md @@ -1,3 +1,5 @@ +Translating by bianjp + How to enable Software Collections (SCL) on CentOS ================================================================================ Red Hat Enterprise Linux (RHEL) and its community fork, CentOS, offer 10-year life cycle, meaning that each version of RHEL/CentOS is updated with security patches for up to 10 years. While such long life cycle guarantees much needed system compatibility and reliability for enterprise users, a downside is that core applications and run-time environments grow antiquated as the underlying RHEL/CentOS version becomes close to end-of-life (EOF). For example, CentOS 6.5, whose EOL is dated to November 30th 2020, comes with python 2.6.6 and MySQL 5.1.73, which are already pretty old by today's standard. @@ -14,7 +16,7 @@ The latest SCL offers: - Ruby 1.9.3 - Perl 5.16.3 - MariaDB and MySQL 5.5 -- Apache httpd 2.4.6 +- Apache httpd 2.4.6 In the rest of the tutorial, let me show you how to set up the SCL repository and how to install and enable the packages from the SCL. From 16a3c4212533dfe2d1969f84b5a48fe4f4fa161c Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 19 Dec 2015 23:49:02 +0800 Subject: [PATCH 0596/1710] translating by Ezio --- ...o Setup Drone - a Continuous Integration Service in Linux.md | 2 ++ 1 file changed, 2 insertions(+) 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 index bfcf1e3ae3..8f63bdd5fc 100644 --- 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 @@ -1,3 +1,5 @@ +translating by Ezio + How to Setup Drone - a Continuous Integration Service in Linux ============================================================== From 5ec783d6b076a3c2f5bbd5a23b13914750540013 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 14:08:56 +0800 Subject: [PATCH 0597/1710] translating --- ...Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md index 9e96043927..7fd2056eb7 100644 --- a/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md +++ b/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md @@ -1,3 +1,6 @@ +translating---geekpi + + Linux / UNIX Desktop Fun: Let it Snow On Your Desktop ================================================================================ Feeling lonely this holiday season? Try Xsnow. This little app will let it snow on the Unix / Linux desktop. Santa and his reindeer will complete your festive season feeling with moving snowflakes on your desktop, with Santa Claus running all over the screen. @@ -72,4 +75,4 @@ via: http://www.cyberciti.biz/tips/linux-unix-xsnow.html [2]:http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 [3]:http://dropmix.xs4all.nl/rick/Xsnow/ [4]:http://dropmix.xs4all.nl/rick/WinSnow/ -[5]:http://dropmix.xs4all.nl/rick/MacOSXSnow/ \ No newline at end of file +[5]:http://dropmix.xs4all.nl/rick/MacOSXSnow/ From 39d3afca2791490b5098fcccb2b12c78c539de62 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 14:29:58 +0800 Subject: [PATCH 0598/1710] translated --- ...esktop Fun--Let it Snow On Your Desktop.md | 78 ------------------- ...esktop Fun--Let it Snow On Your Desktop.md | 75 ++++++++++++++++++ 2 files changed, 75 insertions(+), 78 deletions(-) delete mode 100644 sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md create mode 100644 translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md deleted file mode 100644 index 7fd2056eb7..0000000000 --- a/sources/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md +++ /dev/null @@ -1,78 +0,0 @@ -translating---geekpi - - -Linux / UNIX Desktop Fun: Let it Snow On Your Desktop -================================================================================ -Feeling lonely this holiday season? Try Xsnow. This little app will let it snow on the Unix / Linux desktop. Santa and his reindeer will complete your festive season feeling with moving snowflakes on your desktop, with Santa Claus running all over the screen. - -I first installed this 13 or 14 years ago. It was was originally created for Macintosh systems in 1984. You can install it as follows: - -### Install xsnow ### - -Debian / Ubuntu / Mint users type the following command: - - $ sudo apt-get install xsnow - -Freebsd users type the following command to install the same: - - # cd /usr/ports/x11/xsnow/ - # make install clean - -OR, try to add the package: - - # pkg_add -r xsnow - -#### A Note About Other Distros #### - -1. Fedora / RHEL / CentOS Linux desktop users may find the package using [rpmfusion][1] repo. -1. Gentoo user try Gentoo portage i.e. [emerge -p xsnow][2] -1. OpenSuse Linux user try Yast and search for xsnow. - -### How Do I Use xsnow? ### - -Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following to starts xsnow: - - $ xsnow - -Sample outputs: - -![Fig.01: Snow for your Linux and Unix desktop systems](http://files.cyberciti.biz/uploads/tips/2011/12/application-to-bring-snow-to-desktop_small.png) - -Fig.01: Snow for your Linux and Unix desktop systems - -You can set the background to a blue color and lets it snow white, type: - - $ xsnow -bg blue -sc snow - -To set the maximum number of snowflakes and runs as fast as possible, type: - - $ xsnow -snowflakes 10000 -delay 0 - -Do not display the trees and Santa Claus running all over the screen, enter: - - $ xsnow -notrees -nosanta - -For more information about xsnow and other options, please see the manual page by typing man xsnow from the command line: - - $ man xsnow - -Recommended readings: - -- [Download Xsnow][1] from the official site. -- Please note that [MS-Windows][2] and [Mac OS X version][3] attracts one time shareware fee. - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/tips/linux-unix-xsnow.html - -作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://rpmfusion.org/Configuration -[2]:http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 -[3]:http://dropmix.xs4all.nl/rick/Xsnow/ -[4]:http://dropmix.xs4all.nl/rick/WinSnow/ -[5]:http://dropmix.xs4all.nl/rick/MacOSXSnow/ diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md b/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md new file mode 100644 index 0000000000..c47ff21da0 --- /dev/null +++ b/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md @@ -0,0 +1,75 @@ +Linux/Unix桌面趣事:让桌面下雪 +================================================================================ +在这个节日里感到孤独么?试一下Xsnow吧。它是一个可以在Unix/Linux桌面下下雪的app。圣诞老人和他的驯鹿会在屏幕中奔跑,伴随着雪片让你感受到节日的感觉。 + +我第一次是再13、4年前安装的它。它最初是在1984年Macintosh系统中创造的。你可以用下面的方法来安装: + +### 安装 xsnow ### + +Debian/Ubuntu/Mint用户用下面的命令: + + $ sudo apt-get install xsnow + +Freebsd用户输入下面的命令: + + # cd /usr/ports/x11/xsnow/ + # make install clean + +或者尝试添加包: + + # pkg_add -r xsnow + +#### 其他发行版的方法 #### + +1. Fedora/RHEL/CentOS在[rpmfusion][1]仓库中找找。 +2. Gentoo用户试下Gentoo portage也就是[emerge -p xsnow][2] +3. Opensuse用户使用yast搜索xsnow + +### 我该如何使用xsnow? ### + +打开终端(程序 > 附件 > 终端),输入下面的额命令启动xsnow: + + $ xsnow + +示例输出: + +![Fig.01: Snow for your Linux and Unix desktop systems](http://files.cyberciti.biz/uploads/tips/2011/12/application-to-bring-snow-to-desktop_small.png) + +图01: 在Linux和Unix桌面中显示雪花 + +你可以设置背景位蓝色,并让它下白雪,输入: + + $ xsnow -bg blue -sc snow + +设置最大的雪片数量,并让它尽可能快地运行,输入: + + $ xsnow -snowflakes 10000 -delay 0 + +不要显示圣诞树和圣诞老人满屏幕地跑,输入: + + $ xsnow -notrees -nosanta + +关于xsnow更多的信息和选项,在命令行下输入man xsnow查看手册: + + $ man xsnow + +建议阅读 + +- 官网[下载 Xsnow][1] +- 注意[MS-Windows][2]和[Mac OS X version][3]有一次性的共享软件费用。 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/tips/linux-unix-xsnow.html + +作者:Vivek Gite +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://rpmfusion.org/Configuration +[2]:http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 +[3]:http://dropmix.xs4all.nl/rick/Xsnow/ +[4]:http://dropmix.xs4all.nl/rick/WinSnow/ +[5]:http://dropmix.xs4all.nl/rick/MacOSXSnow/ From 05c49a4988318fdeb2ec6c6e28e73a90f64320f0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 14:31:55 +0800 Subject: [PATCH 0599/1710] translating --- .../20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md index 7a7f975e04..89f80f6970 100644 --- a/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md +++ b/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md @@ -1,3 +1,5 @@ +translating---geekpi + Linux / UNIX Desktop Fun: Steam Locomotive ================================================================================ One of the most [common mistake][1] is typing sl instead of ls command. I actually set [an alias][2] i.e. alias sl=ls; but then you may miss out the steam train with whistle. @@ -36,4 +38,4 @@ via: http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-typ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [1]:http://www.cyberciti.biz/tips/my-10-unix-command-line-mistakes.html -[2]:http://bash.cyberciti.biz/guide/Create_and_use_aliases \ No newline at end of file +[2]:http://bash.cyberciti.biz/guide/Create_and_use_aliases From 9969d35f34951a71722790528ed33e1f467a8790 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 14:42:49 +0800 Subject: [PATCH 0600/1710] translated --- ...x or UNIX Desktop Fun--Steam Locomotive.md | 41 ------------------- ...x or UNIX Desktop Fun--Steam Locomotive.md | 40 ++++++++++++++++++ 2 files changed, 40 insertions(+), 41 deletions(-) delete mode 100644 sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md create mode 100644 translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md deleted file mode 100644 index 89f80f6970..0000000000 --- a/sources/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md +++ /dev/null @@ -1,41 +0,0 @@ -translating---geekpi - -Linux / UNIX Desktop Fun: Steam Locomotive -================================================================================ -One of the most [common mistake][1] is typing sl instead of ls command. I actually set [an alias][2] i.e. alias sl=ls; but then you may miss out the steam train with whistle. - -sl is a joke software or classic UNIX game. It is a steam locomotive runs across your screen if you type "sl" (Steam Locomotive) instead of "ls" by mistake. - -### Install sl ### - -Type the following command under Debian / Ubuntu Linux, enter: - - # apt-get install sl - -It is also available on FreeBSD and other UNIX like operating systems. Next, mistyped ls command as sl: - - $ sl - -![Fig.01: Run steam locomotive across the screen if you type "sl" instead of "ls"](http://files.cyberciti.biz/uploads/tips/2011/05/sl_command_steam_locomotive.png) - -Fig.01: Run steam locomotive across the screen if you type "sl" instead of "ls" - -It also supports the following options: - -- **-a** : An accident seems to happen. You'll feel pity for people who cry for help. -- **-l** : shows little one. -- **-F** : It flies. -- **-e** : Allow interrupt by Ctrl+C. - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html - -作者: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/my-10-unix-command-line-mistakes.html -[2]:http://bash.cyberciti.biz/guide/Create_and_use_aliases diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md b/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md new file mode 100644 index 0000000000..d97f0f3c68 --- /dev/null +++ b/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md @@ -0,0 +1,40 @@ +Linux/Unix 桌面趣事:蒸汽火车 +================================================================================ +一个[最常见的错误][1]是把ls输入成了sl。我已经设置了[一个alias][2],也就是alias sl=ls。但是你也许就错过了带汽笛的蒸汽小火车了。 + +sl是一个玩笑软件或是一个Unix游戏。它会在你错误地把“ls”输入成“sl”(Steam Locomotive)后出现一辆蒸汽火车穿过你的屏幕。 + +### 安装 sl ### + +在Debian/Ubuntu下输入下面的命令: + + # apt-get install sl + +它同样也在Freebsd和其他类Unix的操作系统上存在。下面把ls输错成sl: + + $ sl + +![Fig.01: Run steam locomotive across the screen if you type "sl" instead of "ls"](http://files.cyberciti.biz/uploads/tips/2011/05/sl_command_steam_locomotive.png) + +图01: 如果你把“ls”输入成“sl”蒸汽火车会穿过你的屏幕。 + +It also supports the following options: +它同样支持下面的选项: + +- **-a** : 似乎发生了意外。你会哭喊求助的人们感到难过。 +- **-l** : 显示小一点的火车 +- **-F** : 它飞走 +- **-e** : 允许被Ctrl+C终端 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html + +作者:Vivek Gite +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.cyberciti.biz/tips/my-10-unix-command-line-mistakes.html +[2]:http://bash.cyberciti.biz/guide/Create_and_use_aliases From f6da7558f8f214392e9f8976037fa4552e940e59 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 14:44:06 +0800 Subject: [PATCH 0601/1710] translating --- ...1215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md index 407f5c07a0..d9f5881ab6 100644 --- a/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md +++ b/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md @@ -1,3 +1,5 @@ +translating---geekpi + Linux / UNIX Desktop Fun: Terminal ASCII Aquarium ================================================================================ You can now enjoy mysteries of the sea from the safety of your own terminal using ASCIIQuarium. It is an aquarium/sea animation in ASCII art created using perl. @@ -61,4 +63,4 @@ via: http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium. [1]:http://youtu.be/MzatWgu67ok [2]:http://www.robobunny.com/projects/asciiquarium/html/ [3]:http://habilis.net/macasciiquarium/ -[4]:http://kde-look.org/content/show.php?content=29207 \ No newline at end of file +[4]:http://kde-look.org/content/show.php?content=29207 From f3d79f8094f825fb9c741cf026b40607db659bfc Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 14:55:24 +0800 Subject: [PATCH 0602/1710] translated --- ...IX Desktop Fun--Terminal ASCII Aquarium.md | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md b/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md index d9f5881ab6..ed26f49783 100644 --- a/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md +++ b/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md @@ -1,12 +1,11 @@ -translating---geekpi - -Linux / UNIX Desktop Fun: Terminal ASCII Aquarium +Linux/Unix桌面趣事:终端ASCII水族箱 ================================================================================ -You can now enjoy mysteries of the sea from the safety of your own terminal using ASCIIQuarium. It is an aquarium/sea animation in ASCII art created using perl. +你可以在你的终端中使用ASCIIQuarium安全地欣赏海洋的神秘了。它是一个用perl写的ASCII艺术水族箱/海洋动画。 -### Install Term::Animation ### +### 安装 Term::Animation ### -First, you need to install Perl module called Term-Animation. Open a command-line terminal (select Applications > Accessories > Terminal), and then type: + +首先你需要安装名为Term-Animation的perl模块。打开终端(选择程序 > 附件 > 终端),并输入: $ sudo apt-get install libcurses-perl $ cd /tmp @@ -16,9 +15,9 @@ First, you need to install Perl module called Term-Animation. Open a command-lin $ perl Makefile.PL && make && make test $ sudo make install -### Download and Install ASCIIQuarium ### +### 下载安装ASCIIQuarium ### -While still at bash prompt, type: +接着再终端中输入: $ cd /tmp $ wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz @@ -27,35 +26,35 @@ While still at bash prompt, type: $ sudo cp asciiquarium /usr/local/bin $ sudo chmod 0755 /usr/local/bin/asciiquarium -### How do I view my ASCII Aquarium? ### +### 我怎么浏览ASCII水族箱? ### -Simply type the following command: +输入下面的命令: $ /usr/local/bin/asciiquarium -OR +或者 $ perl /usr/local/bin/asciiquarium ![Fig.01: ASCII Aquarium](http://s0.cyberciti.org/uploads/tips/2011/01/screenshot-ASCIIQuarium.png) -### Related media ### +### 相关媒体 ### 注:youtube 视频 -[Video 01: ASCIIQuarium - Sea Animation on Linux / Unix Desktop][1] +[视频01: ASCIIQuarium - Linux/Unix桌面上的海洋动画][1] -### Download: erminal ASCII Aquarium KDE and Mac OS X Version ### +### 下载:ASCII Aquarium的KDE和Mac OS X版本 ### -[Download asciiquarium][2]. If you're running Mac OS X, try a packaged [version][3] that will run out of the box. For KDE users, try a [KDE Screensaver][4] based on the Asciiquarium. +[下载asciiquarium][2]。如果你运行的是Mac OS X,试下一个可以直接使用已经打包好的[版本][3]。对于KDE用户,试试基于Asciiquarium的[KDE屏幕保护程序][4] -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium.html 作者:Vivek Gite -译者:[译者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 94e213dfe3633e6275247376defc21c6b7a4d063 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 14:55:49 +0800 Subject: [PATCH 0603/1710] Rename sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md to translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md --- ...20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md (100%) diff --git a/sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md b/translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md similarity index 100% rename from sources/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md rename to translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md From 0f5ba3f8681e02c56608a30959652aaf5abcecc2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 14:58:37 +0800 Subject: [PATCH 0604/1710] translating --- ...x Desktop Fun--Cat And Mouse Chase All Over Your Screen.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md b/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md index 9056f8162f..02cd4360f7 100644 --- a/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md +++ b/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md @@ -1,3 +1,5 @@ +translating---geekpi + Linux / Unix Desktop Fun: Cat And Mouse Chase All Over Your Screen ================================================================================ Oneko is a little fun app. It will change your cursor into mouse and creates a little cute cat and the cat start chasing around your mouse cursor. The word "neko" means "cat" in Japanese and it was originally written by a Japanese author as a Macintosh desktop accessory. @@ -86,4 +88,4 @@ via: http://www.cyberciti.biz/open-source/oneko-app-creates-cute-cat-chasing-aro 译者:[译者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 521062a10c4e314b1c67ecf83f7ae514d17dc5df Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 20 Dec 2015 15:04:20 +0800 Subject: [PATCH 0605/1710] [translated]21 - The history of Android --- .../21 - The history of Android.md | 105 ------------------ .../21 - The history of Android.md | 104 +++++++++++++++++ 2 files changed, 104 insertions(+), 105 deletions(-) delete mode 100644 sources/talk/The history of Android/21 - The history of Android.md create mode 100644 translated/talk/The history of Android/21 - The history of Android.md diff --git a/sources/talk/The history of Android/21 - The history of Android.md b/sources/talk/The history of Android/21 - The history of Android.md deleted file mode 100644 index 089ec87bdc..0000000000 --- a/sources/talk/The history of Android/21 - The history of Android.md +++ /dev/null @@ -1,105 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/playicons2.png) -Photo by Ron Amadeo - -### Google Play and the return of direct-to-consumer device sales ### - -On March 6, 2012, Google unified all of its content offerings under the banner of "Google Play." The Android Market became the Google Play Store, Google Books became Google Play Books, Google Music became Google Play Music, and Android Market Movies became Google Play Movies & TV. While the app interfaces didn't change much, all four content apps got new names and icons. Content purchased in the Play Store would be downloaded to the appropriate app, and the Play Store and Play content apps all worked together to provide a fairly organized content experience. - -The Google Play update was Google's first big out-of-cycle update. Four packed-in apps were all changed without having to issue a system update—they were all updated through the Android Market/Play Store. Enabling out-of-cycle updates to individual apps was a big focus for Google, and being able to do an update like this was the culmination of an engineering effort that started in the Gingerbread era. Google had been working on "decoupling" the apps from the operating system and making everything portable enough to be distributed through the Android Market/Play Store. - -While one or two apps (mostly Maps and Gmail) had previously lived on the Android Market, from here on you'll see a lot more significant updates that have nothing to do with an operating system release. System updates require the cooperation of OEMs and carriers, so they are difficult to push out to every user. Play Store updates are completely controlled by Google, though, providing the company a direct line to users' devices. For the launch of Google Play, the Android Market updated itself to the Google Play Store, and from there, Books, Music, and Movies were all issued Google Play-flavored updates. - -The design of the Google Play apps was still all over the place. Each app looked and functioned differently, but for now, a cohesive brand was a good start. And removing "Android" from the branding was necessary because many services were available in the browser and could be used without touching an Android device at all. - -In April 2012, Google started [selling devices though the Play Store again][1], reviving the direct-to-customer model it had experimented with for the launch of the Nexus One. While it was only two years after ending the Nexus One sales, Internet shopping was now more common place, and buying something before you could hold it didn't seem as crazy as it did in 2010. - -Google also saw how price-conscious consumers became when faced with the Nexus One's $530 price tag. The first device for sale was an unlocked, GSM version of the Galaxy Nexus for $399. From there, price would go even lower. $350 has been the entry-level price for the last two Nexus smartphones, and 7-inch Nexus tablets would come in at only $200 to $220. - -Today, the Play Store sells eight different Android devices, four Chromebooks, a thermostat, and tons of accessories, and the device store is the de-facto location for a new Google product launch. New phone launches are so popular, the site usually breaks under the load, and new Nexus phones sell out in a few hours. - -### Android 4.1, Jelly Bean—Google Now points toward the future ### - -![The Asus-made Nexus 7, Android 4.1's launch device.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/ASUS_Google_Nexus_7_4_11.jpg) -The Asus-made Nexus 7, Android 4.1's launch device. - -With the release of Android 4.1, Jelly Bean in July 2012, Google settled into an Android release cadence of about every six months. The platform matured to the point where a release every three months was unnecessary, and the slower release cycle gave OEMs a chance to catch their breath. Unlike Honeycomb, point releases were now fairly major updates, with 4.1 bringing major UI and framework changes. - -One of the biggest changes in Jelly Bean that you won't be able to see in screenshots is "Project Butter," the name for a concerted effort by Google's engineers to make Android animations run smoothly at 30FPS. Core changes were made, like Vsync and triple buffering, and individual animations were optimized so they could be drawn smoothly. Animation and scrolling smoothness had always been a weak point of Android when compared to iOS. After some work on both the core animation framework and on individual apps, Jelly Bean brought Android a lot closer to iOS' smoothness. - -Along with Jelly Bean came the [Nexus][2] 7, a 7-inch tablet manufactured by Asus. Unlike the primarily horizontal Xoom, the Nexus 7 was meant to be used in portrait mode, like a large phone. The Nexus 7 showed that, after almost a year-and-a-half of ecosystem building, Google was ready to commit to the tablet market with a flagship device. Like the Nexus One and GSM Galaxy Nexus, the Nexus 7 was sold online directly by Google. While those earlier devices had shockingly high prices for consumers that were used to carrier subsidies, the Nexus 7 hit a mass market price point of only $200. The price bought you a device with a 7-inch, 1280x800 display, a quad core, 1.2 GHz Tegra 3 processor, 1GB of RAM, and 8GB of storage. The Nexus 7 was such a good value that many wondered if Google was making any money at all on its flagship tablet. - -This smaller, lighter, 7-inch form factor would be a huge success for Google, and it put the company in the rare position of being an industry trendsetter. Apple, which started with a 10-inch iPad, was eventually forced to answer the Nexus 7 and tablets like it with the iPad Mini. - -![4.1's new lock screen design, wallpaper, and the new on-press highlight on the system buttons.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/picture.png) -4.1's new lock screen design, wallpaper, and the new on-press highlight on the system buttons. -Photo by Ron Amadeo - -The Tron look introduced in Honeycomb was toned down a little in Ice Cream Sandwich, and Jelly Bean took things a step further. It started removing blue from large chunks of the operating system. The hint was the on-press highlights on the system buttons, which changed from blue to gray. - -![A composite image of the new app lineup and the new notification panel with expandable notifications.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/jb-apps-and-notications.png) -A composite image of the new app lineup and the new notification panel with expandable notifications. -Photo by Ron Amadeo - -The Notification panel was completely revamped, and we've finally arrived at the design used today in KitKat. The new panel extended to the top of the screen and covered the usual status icons, meaning the status bar was no longer visible when the panel was open. The time was prominently displayed in the top left corner, along with the date and a settings shortcut. The clear all notions button, which was represented by an "X" in Ice Cream Sandwich, changed to a stairstep icon, symbolizing the staggered sliding animation that cleared the notification panel. The bottom handle changed from a circle to a single line that ran the length of the notification panel. All the typography was changed—the notification panel now used bigger, thinner fonts for everything. This was another screen where the blue introduced in Ice Cream Sandwich and Honeycomb was removed. The notification panel was entirely gray now except for on-touch highlights. - -There was new functionality in the panel, too. Notifications were now expandable and could show much more information than the previous two-line design. It now showed up to eight lines of text and could even show buttons at the bottom of the notification. The screenshot notification had a share button at the bottom, and you could call directly from a missed call notification, or you could snooze a ringing alarm all from the notification panel. New notifications were expanded by default, but as they piled up they would collapse back to the traditional size. Dragging down on a notification with two fingers would expand it. - -![The new Google Search app, with Google Now cards, voice search, and text search.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/googlenow.png) -The new Google Search app, with Google Now cards, voice search, and text search. -Photo by Ron Amadeo - -The biggest feature addition to Jelly Bean for not only Android, but for Google as a whole, was the new version of the Google Search application. This introduced "Google Now," a predictive search feature. Google Now was displayed as several cards that sit below the search box, and it would offer results to searches Google thinks you care about. These were things like Google Maps searches for places you've recently looked at on your desktop computer or calendar appointment locations, the weather, and time at home while traveling. - -The new Google Search app could, of course, be launched with the Google icon, but it could also be accessed from any screen with a swipe up from the system bar. Long pressing on the system bar brought up a ring that worked similarly to the lock screen ring. The card section scrolled vertically, and cards could be a swipe away if you didn't want to see them. Voice Search was a big part of the updates. Questions weren't just blindly entered into Google; if Google knew the answer, it would also talk back using a text-To-Speech engine. And old-school text searches were, of course, still supported. Just tap on the bar and start typing. - -Google frequently called Google Now "the future of Google Search." Telling Google what you wanted wasn't good enough. Google wanted to know what you wanted before you did. Google Now put all of Google's data mining knowledge about you to work for you, and it was the company's biggest advantage against rival search services like Bing. Smartphones knew more about you than any other device you own, so the service debuted on Android. But Google slowly worked Google Now into Chrome, and eventually it will likely end up on Google.com. - -While the functionality was important, it became clear that Google Now was the most important design work to ever come out of the company, too. The white card aesthetic that this app introduced would become the foundation for Google's design of just about everything. Today, this card style is used in the Google Play Store and in all of the Play content apps, YouTube, Google Maps, Drive, Keep, Gmail, Google+, and many others. It's not just Android apps, either. Many of Google's desktop sites and iOS apps are inspired by this design. Design was historically one of Google's weak areas, but Google Now was the point where the company finally got its act together with a cohesive, company-wide design language. - -![Yet another YouTube redesign. Information density went way down.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/yotuube.png) -Yet another YouTube redesign. Information density went way down. -Photo by Ron Amadeo - -Another version, another YouTube redesign. This time the list view was primarily thumbnail-based, with giant images taking up most of the screen real estate. Information density tanked with the new list design. Before YouTube would display around six items per screen, now it could only display three. - -YouTube was one of the first apps to add a sliding drawer to the left side of an app, a feature which would become a standard design style across Google's apps. The drawer has links for your account and channel subscriptions, which allowed Google to kill the tabs-on-top design. - -![Google Play Service's responsibilities versus the rest of Android.](http://cdn.arstechnica.net/wp-content/uploads/2013/08/playservicesdiagram2.png) -Google Play Service's responsibilities versus the rest of Android. -Photo by Ron Amadeo - -### Google Play Services—fragmentation and making OS versions (nearly) obsolete ### - -It didn't seem like a big deal at the time, but in September 2012, Google Play Services 1.0 was automatically pushed out to every Android phone running 2.2 and up. It added a few Google+ APIs and support for OAuth 2.0. - -While this update might sound boring, Google Play Services would eventually grow to become an integral part of Android. Google Play Services acts as a shim between the normal apps and the installed Android OS, allowing Google to update or replace some core components and add APIs without having to ship out a new Android version. - -With Play Services, Google had a direct line to the core of an Android phone without having to go through OEM updates and carrier approval processes. Google used Play Services to add an entirely new location system, a malware scanner, remote wipe capabilities, and new Google Maps APIs, all without shipping an OS update. Like we mentioned at the end of the Gingerbread section, thanks to all the "portable" APIs implemented in Play Services, Gingerbread can still download a modern version of the Play Store and many other Google Apps. - -The other big benefit was compatibility with Android's user base. The newest release of an Android OS can take a very long time to get out to the majority of users, which means APIs that get tied to the latest version of the OS won't be any good to developers until the majority of the user base upgrades. Google Play Services is compatible with Froyo and above, which is 99 percent of active devices, and the updates pushed directly to phones through the Play Store. By including APIs in Google Play Services instead of Android, Google can push a new API out to almost all users in about a week. It's [a great solution][3] to many of the problems caused by version fragmentation. - ----------- - -![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/21/ - -译者:[译者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/2012/04/unlocked-samsung-galaxy-nexus-can-now-be-purchased-from-google/ -[2]:http://arstechnica.com/gadgets/2012/07/divine-intervention-googles-nexus-7-is-a-fantastic-200-tablet/ -[3]:http://arstechnica.com/gadgets/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/21 - The history of Android.md b/translated/talk/The history of Android/21 - The history of Android.md new file mode 100644 index 0000000000..48cd8880be --- /dev/null +++ b/translated/talk/The history of Android/21 - The history of Android.md @@ -0,0 +1,104 @@ +安卓编年史 +================================================================================ +![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/playicons2.png) +Ron Amadeo 供图 + +### Google Play 和直接面向消费者出售设备的回归 ### + +2012年3月6日,谷歌将旗下提供的所有内容统一到 “Google Play”。安卓市场变为了 Google Play 商店,Google Books 变为 Google Play Books,Google Music 变为 Google Play Music,还有 Android Market Movies 变为 Google Play Movies & TV。尽管应用界面的变化不是很大,这四个内容应用都获得了新的名称和图标。在 Play 商店购买的内容会下载到对应的应用中,Play 商店和 Play 内容应用一道给用户提供了易管理的内容体验。 + +Google Play 更新是谷歌第一个大的更新周期外更新。四个自带应用都没有通过系统更新获得升级,它们都是直接通过安卓市场/ Play商店更新的。对单独的应用启用周期外更新是谷歌的重大关注点之一,而能够实现这样的更新,是自姜饼时代开始的工程努力的顶峰。谷歌一直致力于对应用从系统“解耦”,从而让它们能够通过安卓市场/ Play 商店进行分发。 + +尽管一两个应用(主要是地图和 Gmail)之前就在安卓市场上,从这里开始你会看到许多更重大的更新,而其和系统发布无关。系统更新需要 OEM 厂商和运营商的合作,所以很难保证推送到每个用户手上。而 Play 商店更新则完全掌握在谷歌手上,给了谷歌一条直接到达用户设备的途径。因为 Google Play 的发布,安卓市场对自身升级到了 Google Play Store,在那之后,图书,音乐以及电影应用都下发了 Google Play 式的更新。 + +Google Play 系列应用的设计仍然不尽相同。每个应用的外观和功能各有差异,但暂且来说,一个统一的品牌标识是个好的开始。从品牌标识中去除“安卓”字样是很有必要的,因为很多服务是在浏览器中提供的,不需要安卓设备也能使用。 + +2012年4月,谷歌[再次开始通过 Play 商店销售设备][1],恢复在 Nexus One 发布时尝试的直接面向消费者销售的方式。尽管距 Nexus One 销售结束仅有两年,但往上购物现在更加寻常,在接触到物品之前就购买它并不像在2010年时听起来那么疯狂。 + +谷歌也看到了价格敏感的用户在面对 Nexus One 530美元的价格时的反应。第一部销售的设备是无锁的,GSM 版本的 Galaxy Nexus,价格399美元。在那之后,价格变得更低。350美元成为了最近两台 Nexus 设备的入门价,7英寸 Nexus 平板的价格更是只有200美元到220美元。 + +今天,Play 商店销售八款不同的安卓设备,四款 Chromebook,一款自动调温器,以及许多配件,设备商店已经是谷歌新产品发布的实际地点了。新产品发布总是如此受欢迎,站点往往无法承载如此大的流量,新 Nexus 手机也在几小时内售空。 + +### 安卓 4.1,果冻豆——Google Now指明未来 + +![华硕制造的 Nexus 7,安卓 4.1 的首发设备。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/ASUS_Google_Nexus_7_4_11.jpg) +华硕制造的 Nexus 7,安卓 4.1 的首发设备。 + +随着2012年7月安卓 4.1 果冻豆的发布,谷歌的安卓发布节奏进入每六个月一发布的轨道。平台已经成熟,三个月的发布周期就没那么必要了,更长的发布周期也给了 OEM 厂商足够的时间跟上谷歌的节奏。和蜂巢不同,小数点后的更新发布现在是主要更新,4.1 带来了主要的界面更新和框架变化。 + +果冻豆最大的变化之一,并且你在截图中看不到的是“黄油计划”,谷歌工程师齐心努力让安卓的动画顺畅地跑在 30FPS 上。还有一些核心变化,像垂直同步和三重缓冲,每个动画都经过优化以流畅地绘制。动画和顺滑滚动一直是安卓和 iOS 相比之下的弱点。经过在核心动画框架和单独的应用上的努力,果冻豆让安卓的流畅度大幅接近 iOS。 + +和果冻豆一起到来的还有 [Nexus][2] 7,由华硕生产的7英寸平板。不像之前主要是横屏模式的 Xoom,Nexus 7 主要以竖屏模式使用,像个大一号的手机。Nexus 7 展现了经过一年半的生态建设,谷歌已经准备好了给平板市场带来一部旗舰设备。和 Nexus One 和 GSM Galaxy Nexus 一样,Nexus 7 直接由谷歌在线销售。尽管那些早先的设备对习惯于运营商补贴的消费者来说拥有惊人的高价,Nexus 7 以仅仅 200 美元的价格推向大众市场。这个价格给你带来一部7英寸,1280x800 英寸显示屏,四核 1.2GHz Tegra 3 处理器,1GB 内存,8GB 内置存储的设备。Nexus 7 的性价比如此之高,许多人都想知道谷歌到底有没有在其旗舰平板上赚到钱。 + +更小,更轻,7英寸,这些因素促成了谷歌巨大的成功,并且将谷歌带向了引领行业潮流的位置。一开始制造10英寸 iPad 的苹果,最终也不得不推出和 Nexus 7 相似的 iPad Mini 来应对。 + +![4.1 的新锁屏设计,壁纸,以及系统按钮新的点击高亮。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/picture.png) +4.1 的新锁屏设计,壁纸,以及系统按钮新的点击高亮。 +Ron Amadeo 供图 + +蜂巢引入的电子风格在冰淇淋三明治中有所减少,果冻豆在此之上走得更远。它开始从系统中大范围地移除蓝色。迹象就是系统按钮的点击高亮从蓝色变为了灰色。 + +![新应用阵容合成图以及新的消息可展开通知面板。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/jb-apps-and-notications.png) +新应用阵容合成图以及新的消息可展开通知面板。 +Ron Amadeo 供图 + +通知中心面板完全重制了,这个设计一直沿用到今天的奇巧巧克力(KitKat)。新面板扩展到了屏幕顶部,并且覆盖了状态栏图标,这意味着通知面板打开的时候不再能看到状态栏。时间突出显示在左上角,旁边是日期和设置按钮。清除所有通知按钮,冰淇淋三明治中显示为一个“X”按钮,现在变为阶梯状的按钮,象征着清除所有通知的时候消息交错滑动的动画效果。底部的面板把手从一个小圆换成了一条直线,和面板等宽。所有的排版都发生了变化——通知面板的所有项现在都使用了更大,更细的字体。通知面板是另一个从冰淇淋三明治和蜂巢中引入的蓝色元素被移除的屏幕。除了触摸高亮之外整个通知面板都是灰色的。 + +通知面板也引入了新功能。相较于之前的两行设计,现在的通知消息可以展开以显示更多信息。通知消息可以显示最多8行文本,甚至还能在消息底部显示按钮。屏幕截图通知消息底部有个分享按钮,你也可以直接从未接来电通知拨号,或者将一个正在响铃的闹钟小睡,这些都可以在通知面板完成。新通知消息默认展开,但当它们堆叠到一起时会恢复原来的尺寸。在通知消息上双指向下滑动可以展开消息。 + +![新谷歌搜索应用,带有 Google Now 卡片,语音搜索,以及文字搜索。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/googlenow.png) +新谷歌搜索应用,带有 Google Now 卡片,语音搜索,以及文字搜索。 +Ron Amadeo 供图 + +果冻豆中不止对安卓而言,也是对谷歌来说最大的特性,是新版谷歌搜索应用。它带来了“Google Now”,一个预测性搜索功能。Google Now 在搜索框下面显示为几张卡片,它会提供谷歌认为你所关心的事物的搜索结果。就比如谷歌地图搜索你最近在桌面电脑查找的地点或日历的约会地点,天气,以及旅行时回家的时间。 + +新版谷歌搜索应用自然可以从谷歌图标启动,但它还可以在任意屏幕从系统栏上滑访问。长按系统栏会唤出一个类似锁屏解锁的环。卡片部分纵向滚动,如果你不想看到它们,可以滑动消除它们。语音搜索是更新的一个大部分。提问不是无脑地输入进谷歌,如果谷歌知道答案,它还会用文本语音转换引擎回答你。传统的文字搜索当然也受支持。只需点击搜索栏然后开始输入即可。 + +谷歌经常将 Google Now 称作“谷歌搜索的未来”。告诉谷歌你想要什么这还不够好。谷歌想要在你之前知道你想要什么。Google Now 用谷歌所有的数据挖掘关于你的知识为你服务,这也是谷歌对抗搜索引擎竞争对手,比如必应,最大的优势所在。智能手机比你拥有的其它设备更了解你,所以该服务在安卓上首次亮相。但谷歌慢慢也将 Google Now 加入 Chrome,最终似乎会到达 Google.com。 + +尽管功能很重要,但同时 Google Now 是谷歌产品有史以来最重要的设计工作也是毋庸置疑的。谷歌搜索应用引入的白色卡片审美将会成为几乎所有谷歌产品设计的基础。今天,卡片风格被用在 Google Play 商店以及所有的 Play 内容应用,Youtube,谷歌地图,Drive,Keep,Gmail,Google+以及其它产品。同时也不限于安卓应用。不少谷歌的桌面站点和 iOS 应用也以此设计为灵感。设计是谷歌历史中的弱项之一,但 Google Now 开始谷歌最终在设计上采取了行动,带来一个统一的,全公司范围的设计语言。 + +![又一个 Youtube 重新设计,信息密度有所下降。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/yotuube.png) +又一个 Youtube 的重新设计,信息密度有所下降。 +Ron Amadeo 供图 + +又一个版本,又一个 Youtube 的重新设计。这次列表视图主要基于略缩图,大大的图片占据了屏幕的大部分。信息密度在新列表设计中有所下降。之前 Youtube 每屏大约能显示6个项目,现在只能显示3个。 + +Youtube 是首批在应用左侧加入滑动抽屉的应用之一,该特性会成为谷歌应用的标准设计风格。抽屉中有你的账户的链接和订阅频道,这让谷歌可以去除页面顶部标签页设计。 + +![Google Play 服务的职责以及安卓的剩余部分职责。](http://cdn.arstechnica.net/wp-content/uploads/2013/08/playservicesdiagram2.png) +Google Play 服务的职责以及安卓的剩余部分职责。 +Ron Amadeo 供图 + +### Google Play Services—fragmentation and making OS versions (nearly) obsolete ### +### Google Play 服务——碎片化和让系统版本(几乎)过时 ### + +碎片化那时候看起来这并不是个大问题,但2012年12月,Google Play 服务 1.0 面向所有安卓2.2及以上版本的手机推出。它添加了一些 Google+ API 和对 OAuth 2.0 的支持。 + +尽管这个升级听起来很无聊,但 Google Play 服务最终会成长为安卓整体的一部分。Google Play 服务扮演着正常应用和安卓系统的中间角色,使得谷歌可以升级或替换一些核心组件,并在不发布新安卓版本的前提下添加 API。 + +有了 Play 服务,谷歌有了直接接触安卓手机核心部分的能力,而不用通过 OEM 更新一集运营商批准的过程。谷歌使用 Play 服务添加了全新的位置系统,恶意软件扫描,远程擦除功能,以及新的谷歌地图 API,所有的这一切都不用通过发布一个系统更新实现。正如我们在姜饼部分的结尾提到的,感谢 Play 服务里这些“可移植的”API 实现,姜饼仍然能够下载现代版本的 Play 商店和许多其他的谷歌应用。 + +另一个巨大的益处是安卓用户基础的兼容性。最新版本的安卓系统要经过很长时间到达大多数用户手中,这意味着最新版本系统绑定的 API 在大多数用户升级之前对开发者来说没有任何意义。Google Play 服务兼容冻酸奶及以上版本,换句话说就是99%的活跃设备,并且更新可以直接通过 Play 商店直接推送到手机上。通过将 API 包含在 Google Play 服务中而不是安卓中,谷歌可以在一周内将新 API 推送到几乎所有用户手中。这对许多版本碎片化引起的问题来说是个[伟大的解决方案][3]。 + +---------- + +![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/21/ + +译者:[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/2012/04/unlocked-samsung-galaxy-nexus-can-now-be-purchased-from-google/ +[2]:http://arstechnica.com/gadgets/2012/07/divine-intervention-googles-nexus-7-is-a-fantastic-200-tablet/ +[3]:http://arstechnica.com/gadgets/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 60fb37d36735cd3553e53d5828a296ffe0b3fd9f Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 15:16:41 +0800 Subject: [PATCH 0606/1710] translated --- ...at And Mouse Chase All Over Your Screen.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) rename {sources => translated}/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md (54%) diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md b/translated/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md similarity index 54% rename from sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md rename to translated/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md index 02cd4360f7..e08d21ae49 100644 --- a/sources/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md +++ b/translated/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md @@ -1,16 +1,14 @@ -translating---geekpi - -Linux / Unix Desktop Fun: Cat And Mouse Chase All Over Your Screen +Linux/Unix桌面趣事:猫和老鼠在屏幕中追逐 ================================================================================ -Oneko is a little fun app. It will change your cursor into mouse and creates a little cute cat and the cat start chasing around your mouse cursor. The word "neko" means "cat" in Japanese and it was originally written by a Japanese author as a Macintosh desktop accessory. +Oneko是一个有趣的app。它会把你的光标变成一直老鼠,并在后面创建一个可爱的小猫,并且始终在老鼠光标后面追着。单词“neko”再日语中的意思是老鼠。它最初是作为Macintosh桌面附件由一位日本人开发的。 -### Install oneko ### +### 安装 oneko ### -Type the following command: +试下下面的命令: $ sudo apt-get install oneko -Sample outputs: +示例输出: [sudo] password for vivek: Reading package lists... Done @@ -31,61 +29,63 @@ Sample outputs: Setting up oneko (1.2.sakura.6-7) ... Processing triggers for menu ... -FreeBSD unix user type the following command to install oneko: +FreeBSD用户输入下面的命令安装oneko: # cd /usr/ports/games/oneko # make install clean -### How do I use oneko? ### +### 我该如何使用oneko? ### Simply type the following command: +输入下面的命令: $ oneko -You can make cat into "tora-neko", a cat wite tiger-like stripe: +你可以把猫变成“tora-neko”,一只像白老虎条纹的猫: $ oneko -tora -### Not a cat person? ### +### 不喜欢猫? ### -You can run a dog instead of a cat: +你可以用狗代替猫: $ oneko -dog -The followin will runs Sakura Kinomoto instead of a cat: +下面可以用樱花代替猫: $ oneko -sakura -Runs Tomoyo Daidouji instead of a cat: +用大道寺代替猫: $ oneko -tomoyo -### Check out related media ### +### 查看相关媒体 ### -This tutorial also available in video format: +这个教程同样也有视频格式: 注:youtube 视频 -(Video.01: Demo - Install and use oneko under Linux) +(Video.01: 示例 - 在Linux下安装和使用oneko) -### Other options ### +### 其他选项 ### You can pass the following options: +你可以传入下面的选项 -1. **-tofocus** : Makes cat run to and on top of focus window. When focus window is not in sight, cat chases mouse as usually. -1. **-position geometry** : Specify X and Y offsets in pixels to adjust position of cat relative to mouse pointer./li> -1. **-rv** : Reverse background color and foreground color. -1. **-fg color** : Foreground color (e.g., oneko -dog -fg red). -1. **-bg color** : Background color (e.g., oneko -dog -bg green). -1. See oneko man page for more information. +1.**-tofocus**:让猫再聚焦的窗口顶部奔跑。当聚焦的窗口不在视野中时,猫像平常那样追逐老鼠。 +2. **-position 坐标** :指定X和Y来调整猫相对老鼠的位置 +3. **-rv**:将前景色和背景色对调 +4. **-fg 颜色** : 前景色 (比如 oneko -dog -fg red)。 +5. **-bg 颜色** : 背景色 (比如 oneko -dog -bg green)。 +6. 查看oneko的手册获取更多信息。 -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/open-source/oneko-app-creates-cute-cat-chasing-around-your-mouse/ 作者:Vivek Gite -译者:[译者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 95da8d2f5a7fca9051999d5134ca5d9864acc32e Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 15:19:58 +0800 Subject: [PATCH 0607/1710] translating --- ... Fix--Cannot establish FTP connection to an SFTP server.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md index e6e0aca052..e7d06a153d 100644 --- a/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md +++ b/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md @@ -1,3 +1,5 @@ +translating + Fix: Cannot establish FTP connection to an SFTP server ================================================================================ ### Problem ### @@ -46,4 +48,4 @@ via: http://itsfoss.com/fix-establish-ftp-connection-sftp-server/ [1]:https://filezilla-project.org/ [2]:https://en.wikipedia.org/wiki/File_Transfer_Protocol [3]:https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol -[4]:http://itsfoss.com/set-ftp-server-linux/ \ No newline at end of file +[4]:http://itsfoss.com/set-ftp-server-linux/ From 464198ecc76bf36cb3ee7bc68c2fb7e79b211802 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 15:34:32 +0800 Subject: [PATCH 0608/1710] translated --- ...ablish FTP connection to an SFTP server.md | 51 ------------------- ...ablish FTP connection to an SFTP server.md | 50 ++++++++++++++++++ 2 files changed, 50 insertions(+), 51 deletions(-) delete mode 100644 sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md create mode 100644 translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md diff --git a/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md deleted file mode 100644 index e7d06a153d..0000000000 --- a/sources/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md +++ /dev/null @@ -1,51 +0,0 @@ -translating - -Fix: Cannot establish FTP connection to an SFTP server -================================================================================ -### Problem ### - -The other day I had to connect to my web server. I use [FileZilla][1] for connecting to FTP servers. When I entered the hostname and password and tried to connect to the FTP server, it gave me the following error: - -> Error: Cannot establish FTP connection to an SFTP server. Please select proper protocol. -> -> Error: Critical error: Could not connect to server - -![FileZilla Cannot establish FTP connection to an SFTP server](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_1.jpeg) - -### Reason ### - -By reading the error message itself made me realize my mistake. I was trying to establish an [FTP][2] connection with an [SFTP][3] server. Clearly, I was not using the correct protocol (which should have been SFTP and not FTP). - -As you can see in the picture above, FileZilla defaults to FTP protocol. - -### Solution for “Cannot establish FTP connection to an SFTP server” ### - -Solution is simple. Use SFTP protocol instead of FTP. The one problem you might face is to know how to change the protocol to SFTP. This is where I am going to help you. - -In FileZilla menu, go to **File->Site Manager**. - -![FileZilla Site Manager](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_2.jpeg) - -In the Site Manager, go in General tab and select SFTP in Protocol. Also fill in the host server, port number, user password etc. - -![Cannot establish FTP connection to an SFTP server](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_3.png) - -I hope you can handle things from here onward. - -I hope this quick tutorial helped you to fix “Cannot establish FTP connection to an SFTP server. Please select proper protocol.” problem. In related articles, you can read this post to [know how to set up FTP server in Linux][4]. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/fix-establish-ftp-connection-sftp-server/ - -作者:[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://filezilla-project.org/ -[2]:https://en.wikipedia.org/wiki/File_Transfer_Protocol -[3]:https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol -[4]:http://itsfoss.com/set-ftp-server-linux/ diff --git a/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md new file mode 100644 index 0000000000..34c5e2e0cf --- /dev/null +++ b/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md @@ -0,0 +1,50 @@ +Fix: Cannot establish FTP connection to an SFTP server +修复:无法与SFTP服务器建立FTP连接 +================================================================================ +### 问题 ### + +有一天我要连接到我的web服务器。我使用[FileZilla][1]连接到FTP服务器。当我输入主机名和密码后来连接服务器后,我得到了下面的错误。 + +> Error: Cannot establish FTP connection to an SFTP server. Please select proper protocol. +> +> Error: Critical error: Could not connect to server + +![FileZilla Cannot establish FTP connection to an SFTP server](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_1.jpeg) + +### 原因 ### + +看见错误信息后我意识到了我的错误。我尝试与一台SFTP服务器建立一个[FTP][2]连接。很明显我没有使用一个正确的协议(应该是SFTP而不是FTP)。 + +如你在上图所见,FileZilla默认使用的是FTP协议。 + +### 解决“Cannot establish FTP connection to an SFTP server”的方案 ### + +解决方案很简单。使用SFTP协议而不是FTP。一个你或许要面对的问题是把协议修改成SFTP。这就是我要帮助你的。 + +再FileZilla菜单中,进入 **文件->站点管理**. + +![FileZilla Site Manager](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_2.jpeg) + +在站点管理中,进入通用选项并选择SFTP协议。同样填上主机、端口号、用户密码等。 + +![Cannot establish FTP connection to an SFTP server](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_3.png) + +我希望你从这里可以开始处理。 + +我希望本篇教程可以帮助你修复“Cannot establish FTP connection to an SFTP server. Please select proper protocol.”这个问题。在相关的文章中,你可以读[了解在Linux中如何设置FTP][4]。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-establish-ftp-connection-sftp-server/ + +作者:[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://filezilla-project.org/ +[2]:https://en.wikipedia.org/wiki/File_Transfer_Protocol +[3]:https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol +[4]:http://itsfoss.com/set-ftp-server-linux/ From ba7e9c315460f4d131e0805ce94e493a6c9eb0fd Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 20 Dec 2015 15:34:47 +0800 Subject: [PATCH 0609/1710] Update 20151215 Fix--Cannot establish FTP connection to an SFTP server.md --- ...215 Fix--Cannot establish FTP connection to an SFTP server.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md index 34c5e2e0cf..79e26abd64 100644 --- a/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md +++ b/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md @@ -1,4 +1,3 @@ -Fix: Cannot establish FTP connection to an SFTP server 修复:无法与SFTP服务器建立FTP连接 ================================================================================ ### 问题 ### From 25e49a9f31361b29cf02626714c10673b4c9524a Mon Sep 17 00:00:00 2001 From: runningwater Date: Sun, 20 Dec 2015 15:41:48 +0800 Subject: [PATCH 0610/1710] =?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 --- ...rds or String Pattern Using grep Command.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md index bd58e78535..9af1afa163 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md @@ -1,32 +1,32 @@ -(翻译中 by runningwater)Search Multiple Words / String Pattern Using grep Command +使用 grep 命令来搜索多个单词/字符串模式 ================================================================================ -How do I search multiple strings or words using the grep command? For example I'd like to search word1, word2, word3 and so on within /path/to/file. How do I force grep to search multiple words? +要使用 grep 命令来搜索多个字符串或单词,我们该怎么做?例如我想要查找 /path/to/file 文件中的 word1、word2、word3 等单词,我怎么样命令 grep 查找这些单词呢? -The [grep command supports regular expression][1] pattern. To search multiple words, use following syntax: +[grep 命令支持正则表达式][1]匹配模式。要使用多单词搜索,请使用如下语法: grep 'word1\|word2\|word3' /path/to/file -In this example, search warning, error, and critical words in a text log file called /var/log/messages, enter: +下的例子中,要在一个名叫 /var/log/messages 的文本日志文件中查找 warning、error 和 critical 这几个单词,输入: $ grep 'warning\|error\|critical' /var/log/messages -To just match words, add -w swith: +仅仅只是要匹配单词的话,可以加上 -w 选项参数: $ grep -w 'warning\|error\|critical' /var/log/messages -egrep command can skip the above syntax and use the following syntax: +egrep 命令可以跳过上面的语法格式,其使用的语法格式如下: $ egrep -w 'warning|error|critical' /var/log/messages -I recommend that you pass the -i (ignore case) and --color option as follows: +我建义您们加上 -i (忽略大小写) 和 --color 选项参数,如下示: $ egrep -wi --color 'warning|error|critical' /var/log/messages -Sample outputs: +输出示例: ![Fig.01: Linux / Unix egrep Command Search Multiple Words Demo Output](http://s0.cyberciti.org/uploads/faq/2008/04/egrep-words-output.png) -Fig.01: Linux / Unix egrep Command Search Multiple Words Demo Output +Fig.01: Linux / Unix egrep 命令查找多个单词输出例子 -------------------------------------------------------------------------------- From b4f275374027e9493bb3c887e4ce89ecd3a10c1f Mon Sep 17 00:00:00 2001 From: runningwater Date: Sun, 20 Dec 2015 16:03:43 +0800 Subject: [PATCH 0611/1710] =?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 --- ...-Search Multiple Words or String Pattern Using grep Command.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md (100%) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md similarity index 100% rename from sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md rename to translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md From efecfea3390971a94b9ec8a603ee0dde9119b2ba Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 20 Dec 2015 18:58:17 +0800 Subject: [PATCH 0612/1710] [Translating]20151208 How to Customize Time and Date Format in Ubuntu Panel --- ...8 How to Customize Time and Date Format in Ubuntu Panel.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md b/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md index a9e72c626b..58405c88b8 100644 --- a/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md +++ b/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md @@ -1,3 +1,5 @@ +alim0x translating + How to Customize Time & Date Format in Ubuntu Panel ================================================================================ ![Time & Date format](http://ubuntuhandbook.org/wp-content/uploads/2015/08/ubuntu_tips1.png) @@ -62,4 +64,4 @@ via: http://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ubuntuhandbook.org/index.php/about/ \ No newline at end of file +[a]:http://ubuntuhandbook.org/index.php/about/ From bab3a2e42f12749f75bb673d4cd50a4423de062c Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sun, 20 Dec 2015 19:49:38 +0800 Subject: [PATCH 0613/1710] Create 20151220 GCC-Inline-Assembly-HOWTO.md --- .../20151220 GCC-Inline-Assembly-HOWTO.md | 630 ++++++++++++++++++ 1 file changed, 630 insertions(+) create mode 100644 sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md new file mode 100644 index 0000000000..99f1ceed04 --- /dev/null +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -0,0 +1,630 @@ +* * * + +# GCC-Inline-Assembly-HOWTO +v0.1, 01 March 2003. +* * * + +_This HOWTO explains the use and usage of the inline assembly feature provided by GCC. There are only two prerequisites for reading this article, and that’s obviously a basic knowledge of x86 assembly language and C._ + +* * * + +## 1. Introduction. + +## 1.1 Copyright and License. + +Copyright (C)2003 Sandeep S. + +This document is free; you can redistribute and/or modify this under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + +This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +## 1.2 Feedback and Corrections. + +Kindly forward feedback and criticism to [Sandeep.S](mailto:busybox@sancharnet.in). I will be indebted to anybody who points out errors and inaccuracies in this document; I shall rectify them as soon as I am informed. + +## 1.3 Acknowledgments. + +I express my sincere appreciation to GNU people for providing such a great feature. Thanks to Mr.Pramode C E for all the helps he did. Thanks to friends at the Govt Engineering College, Trichur for their moral-support and cooperation, especially to Nisha Kurur and Sakeeb S. Thanks to my dear teachers at Govt Engineering College, Trichur for their cooperation. + +Additionally, thanks to Phillip, Brennan Underwood and colin@nyx.net; Many things here are shamelessly stolen from their works. + +* * * + +## 2. Overview of the whole thing. + +We are here to learn about GCC inline assembly. What this inline stands for? + +We can instruct the compiler to insert the code of a function into the code of its callers, to the point where actually the call is to be made. Such functions are inline functions. Sounds similar to a Macro? Indeed there are similarities. + +What is the benefit of inline functions? + +This method of inlining reduces the function-call overhead. And if any of the actual argument values are constant, their known values may permit simplifications at compile time so that not all of the inline function’s code needs to be included. The effect on code size is less predictable, it depends on the particular case. To declare an inline function, we’ve to use the keyword `inline` in its declaration. + +Now we are in a position to guess what is inline assembly. Its just some assembly routines written as inline functions. They are handy, speedy and very much useful in system programming. Our main focus is to study the basic format and usage of (GCC) inline assembly functions. To declare inline assembly functions, we use the keyword `asm`. + +Inline assembly is important primarily because of its ability to operate and make its output visible on C variables. Because of this capability, "asm" works as an interface between the assembly instructions and the "C" program that contains it. + +* * * + +## 3. GCC Assembler Syntax. + +GCC, the GNU C Compiler for Linux, uses **AT&T**/**UNIX** assembly syntax. Here we’ll be using AT&T syntax for assembly coding. Don’t worry if you are not familiar with AT&T syntax, I will teach you. This is quite different from Intel syntax. I shall give the major differences. + +1. Source-Destination Ordering. + + The direction of the operands in AT&T syntax is opposite to that of Intel. In Intel syntax the first operand is the destination, and the second operand is the source whereas in AT&T syntax the first operand is the source and the second operand is the destination. ie, + + "Op-code dst src" in Intel syntax changes to + + "Op-code src dst" in AT&T syntax. + +2. Register Naming. + + Register names are prefixed by % ie, if eax is to be used, write %eax. + +3. Immediate Operand. + + AT&T immediate operands are preceded by ’$’. For static "C" variables also prefix a ’$’. In Intel syntax, for hexadecimal constants an ’h’ is suffixed, instead of that, here we prefix ’0x’ to the constant. So, for hexadecimals, we first see a ’$’, then ’0x’ and finally the constants. + +4. Operand Size. + + In AT&T syntax the size of memory operands is determined from the last character of the op-code name. Op-code suffixes of ’b’, ’w’, and ’l’ specify byte(8-bit), word(16-bit), and long(32-bit) memory references. Intel syntax accomplishes this by prefixing memory operands (not the op-codes) with ’byte ptr’, ’word ptr’, and ’dword ptr’. + + Thus, Intel "mov al, byte ptr foo" is "movb foo, %al" in AT&T syntax. + +5. Memory Operands. + + In Intel syntax the base register is enclosed in ’[’ and ’]’ where as in AT&T they change to ’(’ and ’)’. Additionally, in Intel syntax an indirect memory reference is like + + section:[base + index*scale + disp], which changes to + + section:disp(base, index, scale) in AT&T. + + One point to bear in mind is that, when a constant is used for disp/scale, ’$’ shouldn’t be prefixed. + +Now we saw some of the major differences between Intel syntax and AT&T syntax. I’ve wrote only a few of them. For a complete information, refer to GNU Assembler documentations. Now we’ll look at some examples for better understanding. + +> ` +> +>
+------------------------------+------------------------------------+
+> |       Intel Code             |      AT&T Code                     |
+> +------------------------------+------------------------------------+
+> | mov     eax,1                |  movl    $1,%eax                   |   
+> | mov     ebx,0ffh             |  movl    $0xff,%ebx                |   
+> | int     80h                  |  int     $0x80                     |   
+> | mov     ebx, eax             |  movl    %eax, %ebx                |
+> | mov     eax,[ecx]            |  movl    (%ecx),%eax               |
+> | mov     eax,[ebx+3]          |  movl    3(%ebx),%eax              | 
+> | mov     eax,[ebx+20h]        |  movl    0x20(%ebx),%eax           |
+> | add     eax,[ebx+ecx*2h]     |  addl    (%ebx,%ecx,0x2),%eax      |
+> | lea     eax,[ebx+ecx]        |  leal    (%ebx,%ecx),%eax          |
+> | sub     eax,[ebx+ecx*4h-20h] |  subl    -0x20(%ebx,%ecx,0x4),%eax |
+> +------------------------------+------------------------------------+
+> 
+> +> ` + +* * * + +## 4. Basic Inline. + +The format of basic inline assembly is very much straight forward. Its basic form is + +`asm("assembly code");` + +Example. + +> ` +> +> * * * +> +>
asm("movl %ecx %eax"); /* moves the contents of ecx to eax */
+> __asm__("movb %bh (%eax)"); /*moves the byte from bh to the memory pointed by eax */
+> 
+> +> * * * +> +> ` + +You might have noticed that here I’ve used `asm` and `__asm__`. Both are valid. We can use `__asm__` if the keyword `asm` conflicts with something in our program. If we have more than one instructions, we write one per line in double quotes, and also suffix a ’\n’ and ’\t’ to the instruction. This is because gcc sends each instruction as a string to **as**(GAS) and by using the newline/tab we send correctly formatted lines to the assembler. + +Example. + +> ` +> +> * * * +> +>
 __asm__ ("movl %eax, %ebx\n\t"
+>           "movl $56, %esi\n\t"
+>           "movl %ecx, $label(%edx,%ebx,$4)\n\t"
+>           "movb %ah, (%ebx)");
+> 
+> +> * * * +> +> ` + +If in our code we touch (ie, change the contents) some registers and return from asm without fixing those changes, something bad is going to happen. This is because GCC have no idea about the changes in the register contents and this leads us to trouble, especially when compiler makes some optimizations. It will suppose that some register contains the value of some variable that we might have changed without informing GCC, and it continues like nothing happened. What we can do is either use those instructions having no side effects or fix things when we quit or wait for something to crash. This is where we want some extended functionality. Extended asm provides us with that functionality. + +* * * + +## 5. Extended Asm. + +In basic inline assembly, we had only instructions. In extended assembly, we can also specify the operands. It allows us to specify the input registers, output registers and a list of clobbered registers. It is not mandatory to specify the registers to use, we can leave that head ache to GCC and that probably fit into GCC’s optimization scheme better. Anyway the basic format is: + +> ` +> +> * * * +> +>
       asm ( assembler template 
+>            : output operands                  /* optional */
+>            : input operands                   /* optional */
+>            : list of clobbered registers      /* optional */
+>            );
+> 
+> +> * * * +> +> ` + +The assembler template consists of assembly instructions. Each operand is described by an operand-constraint string followed by the C expression in parentheses. A colon separates the assembler template from the first output operand and another separates the last output operand from the first input, if any. Commas separate the operands within each group. The total number of operands is limited to ten or to the maximum number of operands in any instruction pattern in the machine description, whichever is greater. + +If there are no output operands but there are input operands, you must place two consecutive colons surrounding the place where the output operands would go. + +Example: + +> ` +> +> * * * +> +>
        asm ("cld\n\t"
+>              "rep\n\t"
+>              "stosl"
+>              : /* no output registers */
+>              : "c" (count), "a" (fill_value), "D" (dest)
+>              : "%ecx", "%edi" 
+>              );
+> 
+> +> * * * +> +> ` + +Now, what does this code do? The above inline fills the `fill_value` `count` times to the location pointed to by the register `edi`. It also says to gcc that, the contents of registers `eax` and `edi` are no longer valid. Let us see one more example to make things more clearer. + +> ` +> +> * * * +> +>
        
+>         int a=10, b;
+>         asm ("movl %1, %%eax; 
+>               movl %%eax, %0;"
+>              :"=r"(b)        /* output */
+>              :"r"(a)         /* input */
+>              :"%eax"         /* clobbered register */
+>              );       
+> 
+> +> * * * +> +> ` + +Here what we did is we made the value of ’b’ equal to that of ’a’ using assembly instructions. Some points of interest are: + +* "b" is the output operand, referred to by %0 and "a" is the input operand, referred to by %1. +* "r" is a constraint on the operands. We’ll see constraints in detail later. For the time being, "r" says to GCC to use any register for storing the operands. output operand constraint should have a constraint modifier "=". And this modifier says that it is the output operand and is write-only. +* There are two %’s prefixed to the register name. This helps GCC to distinguish between the operands and registers. operands have a single % as prefix. +* The clobbered register %eax after the third colon tells GCC that the value of %eax is to be modified inside "asm", so GCC won’t use this register to store any other value. + +When the execution of "asm" is complete, "b" will reflect the updated value, as it is specified as an output operand. In other words, the change made to "b" inside "asm" is supposed to be reflected outside the "asm". + +Now we may look each field in detail. + +## 5.1 Assembler Template. + +The assembler template contains the set of assembly instructions that gets inserted inside the C program. The format is like: either each instruction should be enclosed within double quotes, or the entire group of instructions should be within double quotes. Each instruction should also end with a delimiter. The valid delimiters are newline(\n) and semicolon(;). ’\n’ may be followed by a tab(\t). We know the reason of newline/tab, right?. Operands corresponding to the C expressions are represented by %0, %1 ... etc. + +## 5.2 Operands. + +C expressions serve as operands for the assembly instructions inside "asm". Each operand is written as first an operand constraint in double quotes. For output operands, there’ll be a constraint modifier also within the quotes and then follows the C expression which stands for the operand. ie, + +"constraint" (C expression) is the general form. For output operands an additional modifier will be there. Constraints are primarily used to decide the addressing modes for operands. They are also used in specifying the registers to be used. + +If we use more than one operand, they are separated by comma. + +In the assembler template, each operand is referenced by numbers. Numbering is done as follows. If there are a total of n operands (both input and output inclusive), then the first output operand is numbered 0, continuing in increasing order, and the last input operand is numbered n-1\. The maximum number of operands is as we saw in the previous section. + +Output operand expressions must be lvalues. The input operands are not restricted like this. They may be expressions. The extended asm feature is most often used for machine instructions the compiler itself does not know as existing ;-). If the output expression cannot be directly addressed (for example, it is a bit-field), our constraint must allow a register. In that case, GCC will use the register as the output of the asm, and then store that register contents into the output. + +As stated above, ordinary output operands must be write-only; GCC will assume that the values in these operands before the instruction are dead and need not be generated. Extended asm also supports input-output or read-write operands. + +So now we concentrate on some examples. We want to multiply a number by 5\. For that we use the instruction `lea`. + +> ` +> +> * * * +> +>
        asm ("leal (%1,%1,4), %0"
+>              : "=r" (five_times_x)
+>              : "r" (x) 
+>              );
+> 
+> +> * * * +> +> ` + +Here our input is in ’x’. We didn’t specify the register to be used. GCC will choose some register for input, one for output and does what we desired. If we want the input and output to reside in the same register, we can instruct GCC to do so. Here we use those types of read-write operands. By specifying proper constraints, here we do it. + +> ` +> +> * * * +> +>
        asm ("leal (%0,%0,4), %0"
+>              : "=r" (five_times_x)
+>              : "0" (x) 
+>              );
+> 
+> +> * * * +> +> ` + +Now the input and output operands are in the same register. But we don’t know which register. Now if we want to specify that also, there is a way. + +> ` +> +> * * * +> +>
        asm ("leal (%%ecx,%%ecx,4), %%ecx"
+>              : "=c" (x)
+>              : "c" (x) 
+>              );
+> 
+> +> * * * +> +> ` + +In all the three examples above, we didn’t put any register to the clobber list. why? In the first two examples, GCC decides the registers and it knows what changes happen. In the last one, we don’t have to put `ecx` on the c lobberlist, gcc knows it goes into x. Therefore, since it can know the value of `ecx`, it isn’t considered clobbered. + +## 5.3 Clobber List. + +Some instructions clobber some hardware registers. We have to list those registers in the clobber-list, ie the field after the third ’**:**’ in the asm function. This is to inform gcc that we will use and modify them ourselves. So gcc will not assume that the values it loads into these registers will be valid. We shoudn’t list the input and output registers in this list. Because, gcc knows that "asm" uses them (because they are specified explicitly as constraints). If the instructions use any other registers, implicitly or explicitly (and the registers are not present either in input or in the output constraint list), then those registers have to be specified in the clobbered list. + +If our instruction can alter the condition code register, we have to add "cc" to the list of clobbered registers. + +If our instruction modifies memory in an unpredictable fashion, add "memory" to the list of clobbered registers. This will cause GCC to not keep memory values cached in registers across the assembler instruction. We also have to add the **volatile** keyword if the memory affected is not listed in the inputs or outputs of the asm. + +We can read and write the clobbered registers as many times as we like. Consider the example of multiple instructions in a template; it assumes the subroutine _foo accepts arguments in registers `eax` and `ecx`. + +> ` +> +> * * * +> +>
        asm ("movl %0,%%eax;
+>               movl %1,%%ecx;
+>               call _foo"
+>              : /* no outputs */
+>              : "g" (from), "g" (to)
+>              : "eax", "ecx"
+>              );
+> 
+> +> * * * +> +> ` + +## 5.4 Volatile ...? + +If you are familiar with kernel sources or some beautiful code like that, you must have seen many functions declared as `volatile` or `__volatile__` which follows an `asm` or `__asm__`. I mentioned earlier about the keywords `asm` and `__asm__`. So what is this `volatile`? + +If our assembly statement must execute where we put it, (i.e. must not be moved out of a loop as an optimization), put the keyword `volatile` after asm and before the ()’s. So to keep it from moving, deleting and all, we declare it as + +`asm volatile ( ... : ... : ... : ...);` + +Use `__volatile__` when we have to be verymuch careful. + +If our assembly is just for doing some calculations and doesn’t have any side effects, it’s better not to use the keyword `volatile`. Avoiding it helps gcc in optimizing the code and making it more beautiful. + +In the section `Some Useful Recipes`, I have provided many examples for inline asm functions. There we can see the clobber-list in detail. + +* * * + +## 6. More about constraints. + +By this time, you might have understood that constraints have got a lot to do with inline assembly. But we’ve said little about constraints. Constraints can say whether an operand may be in a register, and which kinds of register; whether the operand can be a memory reference, and which kinds of address; whether the operand may be an immediate constant, and which possible values (ie range of values) it may have.... etc. + +## 6.1 Commonly used constraints. + +There are a number of constraints of which only a few are used frequently. We’ll have a look at those constraints. + +1. **Register operand constraint(r)** + + When operands are specified using this constraint, they get stored in General Purpose Registers(GPR). Take the following example: + + `asm ("movl %%eax, %0\n" :"=r"(myval));` + + Here the variable myval is kept in a register, the value in register `eax` is copied onto that register, and the value of `myval` is updated into the memory from this register. When the "r" constraint is specified, gcc may keep the variable in any of the available GPRs. To specify the register, you must directly specify the register names by using specific register constraints. They are: + + > ` + > + >
+---+--------------------+
+    > | r |    Register(s)     |
+    > +---+--------------------+
+    > | a |   %eax, %ax, %al   |
+    > | b |   %ebx, %bx, %bl   |
+    > | c |   %ecx, %cx, %cl   |
+    > | d |   %edx, %dx, %dl   |
+    > | S |   %esi, %si        |
+    > | D |   %edi, %di        |
+    > +---+--------------------+
+    > 
+ > + > ` + +2. **Memory operand constraint(m)** + + When the operands are in the memory, any operations performed on them will occur directly in the memory location, as opposed to register constraints, which first store the value in a register to be modified and then write it back to the memory location. But register constraints are usually used only when they are absolutely necessary for an instruction or they significantly speed up the process. Memory constraints can be used most efficiently in cases where a C variable needs to be updated inside "asm" and you really don’t want to use a register to hold its value. For example, the value of idtr is stored in the memory location loc: + + `asm("sidt %0\n" : :"m"(loc));` + +3. **Matching(Digit) constraints** + + In some cases, a single variable may serve as both the input and the output operand. Such cases may be specified in "asm" by using matching constraints. + + `asm ("incl %0" :"=a"(var):"0"(var));` + + We saw similar examples in operands subsection also. In this example for matching constraints, the register %eax is used as both the input and the output variable. var input is read to %eax and updated %eax is stored in var again after increment. "0" here specifies the same constraint as the 0th output variable. That is, it specifies that the output instance of var should be stored in %eax only. This constraint can be used: + + * In cases where input is read from a variable or the variable is modified and modification is written back to the same variable. + * In cases where separate instances of input and output operands are not necessary. + + The most important effect of using matching restraints is that they lead to the efficient use of available registers. + +Some other constraints used are: + +1. "m" : A memory operand is allowed, with any kind of address that the machine supports in general. +2. "o" : A memory operand is allowed, but only if the address is offsettable. ie, adding a small offset to the address gives a valid address. +3. "V" : A memory operand that is not offsettable. In other words, anything that would fit the `m’ constraint but not the `o’constraint. +4. "i" : An immediate integer operand (one with constant value) is allowed. This includes symbolic constants whose values will be known only at assembly time. +5. "n" : An immediate integer operand with a known numeric value is allowed. Many systems cannot support assembly-time constants for operands less than a word wide. Constraints for these operands should use ’n’ rather than ’i’. +6. "g" : Any register, memory or immediate integer operand is allowed, except for registers that are not general registers. + +Following constraints are x86 specific. + +1. "r" : Register operand constraint, look table given above. +2. "q" : Registers a, b, c or d. +3. "I" : Constant in range 0 to 31 (for 32-bit shifts). +4. "J" : Constant in range 0 to 63 (for 64-bit shifts). +5. "K" : 0xff. +6. "L" : 0xffff. +7. "M" : 0, 1, 2, or 3 (shifts for lea instruction). +8. "N" : Constant in range 0 to 255 (for out instruction). +9. "f" : Floating point register +10. "t" : First (top of stack) floating point register +11. "u" : Second floating point register +12. "A" : Specifies the `a’ or `d’ registers. This is primarily useful for 64-bit integer values intended to be returned with the `d’ register holding the most significant bits and the `a’ register holding the least significant bits. + +## 6.2 Constraint Modifiers. + +While using constraints, for more precise control over the effects of constraints, GCC provides us with constraint modifiers. Mostly used constraint modifiers are + +1. "=" : Means that this operand is write-only for this instruction; the previous value is discarded and replaced by output data. +2. "&" : Means that this operand is an earlyclobber operand, which is modified before the instruction is finished using the input operands. Therefore, this operand may not lie in a register that is used as an input operand or as part of any memory address. An input operand can be tied to an earlyclobber operand if its only use as an input occurs before the early result is written. + + The list and explanation of constraints is by no means complete. Examples can give a better understanding of the use and usage of inline asm. In the next section we’ll see some examples, there we’ll find more about clobber-lists and constraints. + +* * * + +## 7. Some Useful Recipes. + +Now we have covered the basic theory about GCC inline assembly, now we shall concentrate on some simple examples. It is always handy to write inline asm functions as MACRO’s. We can see many asm functions in the kernel code. (/usr/src/linux/include/asm/*.h). + +1. First we start with a simple example. We’ll write a program to add two numbers. + + > ` + > + > * * * + > + >
int main(void)
+    > {
+    >         int foo = 10, bar = 15;
+    >         __asm__ __volatile__("addl  %%ebx,%%eax"
+    >                              :"=a"(foo)
+    >                              :"a"(foo), "b"(bar)
+    >                              );
+    >         printf("foo+bar=%d\n", foo);
+    >         return 0;
+    > }
+    > 
+ > + > * * * + > + > ` + + Here we insist GCC to store foo in %eax, bar in %ebx and we also want the result in %eax. The ’=’ sign shows that it is an output register. Now we can add an integer to a variable in some other way. + + > ` + > + > * * * + > + >
 __asm__ __volatile__(
+    >                       "   lock       ;\n"
+    >                       "   addl %1,%0 ;\n"
+    >                       : "=m"  (my_var)
+    >                       : "ir"  (my_int), "m" (my_var)
+    >                       :                                 /* no clobber-list */
+    >                       );
+    > 
+ > + > * * * + > + > ` + + This is an atomic addition. We can remove the instruction ’lock’ to remove the atomicity. In the output field, "=m" says that my_var is an output and it is in memory. Similarly, "ir" says that, my_int is an integer and should reside in some register (recall the table we saw above). No registers are in the clobber list. + +2. Now we’ll perform some action on some registers/variables and compare the value. + + > ` + > + > * * * + > + >
 __asm__ __volatile__(  "decl %0; sete %1"
+    >                       : "=m" (my_var), "=q" (cond)
+    >                       : "m" (my_var) 
+    >                       : "memory"
+    >                       );
+    > 
+ > + > * * * + > + > ` + + Here, the value of my_var is decremented by one and if the resulting value is `0` then, the variable cond is set. We can add atomicity by adding an instruction "lock;\n\t" as the first instruction in assembler template. + + In a similar way we can use "incl %0" instead of "decl %0", so as to increment my_var. + + Points to note here are that (i) my_var is a variable residing in memory. (ii) cond is in any of the registers eax, ebx, ecx and edx. The constraint "=q" guarantees it. (iii) And we can see that memory is there in the clobber list. ie, the code is changing the contents of memory. + +3. How to set/clear a bit in a register? As next recipe, we are going to see it. + + > ` + > + > * * * + > + >
__asm__ __volatile__(   "btsl %1,%0"
+    >                       : "=m" (ADDR)
+    >                       : "Ir" (pos)
+    >                       : "cc"
+    >                       );
+    > 
+ > + > * * * + > + > ` + + Here, the bit at the position ’pos’ of variable at ADDR ( a memory variable ) is set to `1` We can use ’btrl’ for ’btsl’ to clear the bit. The constraint "Ir" of pos says that, pos is in a register, and it’s value ranges from 0-31 (x86 dependant constraint). ie, we can set/clear any bit from 0th to 31st of the variable at ADDR. As the condition codes will be changed, we are adding "cc" to clobberlist. + +4. Now we look at some more complicated but useful function. String copy. + + > ` + > + > * * * + > + >
static inline char * strcpy(char * dest,const char *src)
+    > {
+    > int d0, d1, d2;
+    > __asm__ __volatile__(  "1:\tlodsb\n\t"
+    >                        "stosb\n\t"
+    >                        "testb %%al,%%al\n\t"
+    >                        "jne 1b"
+    >                      : "=&S" (d0), "=&D" (d1), "=&a" (d2)
+    >                      : "0" (src),"1" (dest) 
+    >                      : "memory");
+    > return dest;
+    > }
+    > 
+ > + > * * * + > + > ` + + The source address is stored in esi, destination in edi, and then starts the copy, when we reach at **0**, copying is complete. Constraints "&S", "&D", "&a" say that the registers esi, edi and eax are early clobber registers, ie, their contents will change before the completion of the function. Here also it’s clear that why memory is in clobberlist. + + We can see a similar function which moves a block of double words. Notice that the function is declared as a macro. + + > ` + > + > * * * + > + >
#define mov_blk(src, dest, numwords) \
+    > __asm__ __volatile__ (                                          \
+    >                        "cld\n\t"                                \
+    >                        "rep\n\t"                                \
+    >                        "movsl"                                  \
+    >                        :                                        \
+    >                        : "S" (src), "D" (dest), "c" (numwords)  \
+    >                        : "%ecx", "%esi", "%edi"                 \
+    >                        )
+    > 
+ > + > * * * + > + > ` + + Here we have no outputs, so the changes that happen to the contents of the registers ecx, esi and edi are side effects of the block movement. So we have to add them to the clobber list. + +5. In Linux, system calls are implemented using GCC inline assembly. Let us look how a system call is implemented. All the system calls are written as macros (linux/unistd.h). For example, a system call with three arguments is defined as a macro as shown below. + + > ` + > + > * * * + > + >
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+    > type name(type1 arg1,type2 arg2,type3 arg3) \
+    > { \
+    > long __res; \
+    > __asm__ volatile (  "int $0x80" \
+    >                   : "=a" (__res) \
+    >                   : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+    >                     "d" ((long)(arg3))); \
+    > __syscall_return(type,__res); \
+    > }
+    > 
+ > + > * * * + > + > ` + + Whenever a system call with three arguments is made, the macro shown above is used to make the call. The syscall number is placed in eax, then each parameters in ebx, ecx, edx. And finally "int 0x80" is the instruction which makes the system call work. The return value can be collected from eax. + + Every system calls are implemented in a similar way. Exit is a single parameter syscall and let’s see how it’s code will look like. It is as shown below. + + > ` + > + > * * * + > + >
{
+    >         asm("movl $1,%%eax;         /* SYS_exit is 1 */
+    >              xorl %%ebx,%%ebx;      /* Argument is in ebx, it is 0 */
+    >              int  $0x80"            /* Enter kernel mode */
+    >              );
+    > }
+    > 
+ > + > * * * + > + > ` + + The number of exit is "1" and here, it’s parameter is 0\. So we arrange eax to contain 1 and ebx to contain 0 and by `int $0x80`, the `exit(0)` is executed. This is how exit works. + +* * * + +## 8. Concluding Remarks. + +This document has gone through the basics of GCC Inline Assembly. Once you have understood the basic concept it is not difficult to take steps by your own. We saw some examples which are helpful in understanding the frequently used features of GCC Inline Assembly. + +GCC Inlining is a vast subject and this article is by no means complete. More details about the syntax’s we discussed about is available in the official documentation for GNU Assembler. Similarly, for a complete list of the constraints refer to the official documentation of GCC. + +And of-course, the Linux kernel use GCC Inline in a large scale. So we can find many examples of various kinds in the kernel sources. They can help us a lot. + +If you have found any glaring typos, or outdated info in this document, please let us know. + +* * * + +## 9. References. + +1. [Brennan’s Guide to Inline Assembly](http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html) +2. [Using Assembly Language in Linux](http://linuxassembly.org/articles/linasm.html) +3. [Using as, The GNU Assembler](http://www.gnu.org/manual/gas-2.9.1/html_mono/as.html) +4. [Using and Porting the GNU Compiler Collection (GCC)](http://gcc.gnu.org/onlinedocs/gcc_toc.html) +5. [Linux Kernel Source](http://ftp.kernel.org/) + +* * * +via: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html + + 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[](https://github.com/) 校对:[]() + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9432f87f1e895b6809d20a77d241699ce361612a Mon Sep 17 00:00:00 2001 From: L Date: Sun, 20 Dec 2015 19:10:18 +0800 Subject: [PATCH 0614/1710] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=91Talk-KDE=2019=E5=B9=B4=20=E5=8E=86=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【翻译完成】Talk-KDE 19年 历程 This reverts commit d8cded1556b7db2bbb56b5dac1046c0cb9762f58. --- ...0 19 Years of KDE History--Step by Step.md | 53 ++++++++----------- 1 file changed, 22 insertions(+), 31 deletions(-) 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 index b5abb96572..39c8e3bb33 100644 --- 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 @@ -1,24 +1,21 @@ -19 Years of KDE History: Step by Step -================================================================================ +【[jerryling315](https://github.com/jerryling315)翻译中】 + +# 19 Years of KDE History: Step by Step 注:youtube 视频 -### Introduction ### +## 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. -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 #### +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 #### +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. @@ -29,11 +26,10 @@ This version received mixed reception. Many criticized the use of the Qt softwar 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 #### - +### 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 +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) @@ -47,8 +43,7 @@ Major updates: * DCOP (Desktop COmmunication Protocol), a client-to-client commu 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 #### - +### 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. @@ -83,8 +78,7 @@ K Desktop Environment 3.0 introduced better support for restricted usage, a feat **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 #### - +### 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. @@ -93,7 +87,7 @@ The majority of development went into implementing most of the new technologies 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 +**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) @@ -165,7 +159,7 @@ The majority of development went into implementing most of the new technologies 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. +**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) @@ -173,8 +167,7 @@ The majority of development went into implementing most of the new technologies **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 #### - +### 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. @@ -207,14 +200,12 @@ Big thanks to the [KDE][1] developers and community, Wikipedia for [descriptions -------------------------------------------------------------------------------- -via: https://tlhp.cf/kde-history/ +via: [https://tlhp.cf/kde-history/](https://tlhp.cf/kde-history/) -作者:[Pavlo RudyiCategories][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +作者:[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 +[1]: https://www.kde.org/ +[2]: https://en.wikipedia.org/wiki/KDE_Plasma_5 +[a]: https://tlhp.cf/author/paul/ From e737f68ae5a38ac816642b3d15c76ed963881a4c Mon Sep 17 00:00:00 2001 From: L Date: Sun, 20 Dec 2015 21:23:31 +0800 Subject: [PATCH 0615/1710] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E3=80=91Talk-19=E5=B9=B4KDE=E5=8E=86=E7=A8=8B?= 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 | 211 ------------------ ...0 19 Years of KDE History--Step by Step.md | 209 +++++++++++++++++ 2 files changed, 209 insertions(+), 211 deletions(-) delete mode 100644 sources/talk/20101020 19 Years of KDE History--Step by Step.md create mode 100644 translated/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 deleted file mode 100644 index 39c8e3bb33..0000000000 --- a/sources/talk/20101020 19 Years of KDE History--Step by Step.md +++ /dev/null @@ -1,211 +0,0 @@ -【[jerryling315](https://github.com/jerryling315)翻译中】 - -# 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/](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/) 荣誉推出 - -[1]: https://www.kde.org/ -[2]: https://en.wikipedia.org/wiki/KDE_Plasma_5 -[a]: https://tlhp.cf/author/paul/ diff --git a/translated/talk/20101020 19 Years of KDE History--Step by Step.md b/translated/talk/20101020 19 Years of KDE History--Step by Step.md new file mode 100644 index 0000000000..ef90acd91f --- /dev/null +++ b/translated/talk/20101020 19 Years of KDE History--Step by Step.md @@ -0,0 +1,209 @@ +# 19年KDE进化历程 +注:youtube 视频 + + +## 概述 +KDE – 史上功能最强大的桌面环境之一; 开源且免费。19年前,1996年10月14日,德国程序员 Matthias Ettrich 开始了编写这个美观的桌面环境。KDE提供了诸如shell以及其他很多日常使用的程序。今日,KDE被成千上万人在 Unix 和 Windows 上使用。19年----一个对软件项目而言极为漫长的年岁。现在是时候让我们回到最初,看看这一切从哪里开始了。 + +K Desktop Environment(KDE)有很多创新之处:新设计,美观,连贯性,易于使用,对普通用户和专业用户都足够强大的应用库。"KDE"这个名字是对单词"通用桌面环境"(Common Desktop Environment)玩的一个简单谐音游戏,"K"----"Cool"。 第一代KDE在双证书授权下使用了有专利的 Trolltech's Qt 框架 (现Qt的前身),这两个许可证分别是 open source QPL(Q public license) 和 商业专利许可证(proprietary commercial license)。在2000年 Trolltech 让一部分 Qt 软件库开始发布在 GPL 证书下; Qt 4.5 发布在了 LGPL 2.1 许可证下。自2009起 KDE 桌面环境由三部分构成:Plasma Workspaces (作Shell),KDE 应用,作为 KDE Software 编译的 KDE Platform. + +## 各发布版本 +### Pre-Release – 1996年10月14日 +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/0b3.png) + +当时名称为 Kool Desktop Environment;"Kool"这个单词在很快就被弃用了。最初,所有KDE的组件都是被单独发布在开发社区里的,他们之间没有任何环绕大项目的组装配合。开发组邮件列表中的第一封通信是发往kde@fiwi02.wiwi.uni-Tubingen.de 的邮件。 + +### KDE 1.0 – 1998年7月12日 +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/10.png) + +这个版本受到了颇有争议的反馈。很多人反对使用Qt框架----当时的 FreeQt 许可证和自由软件许可证并不兼容----并建议开发组使用 Motif 或者 LessTif 替代。尽管有着这些反对声,KDE 仍然被很多用户所青睐,并且成功作为第一个Linux发行版的环境被集成了进去。(made its way into the first Linux distributions) + +![28 January 1999](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/11.png) + +1999年1月28日 + +一次升级,**K Desktop Environment 1.1**,更快,更稳定的同时加入了很多小升级。这个版本同时也加入了很多新的图标,背景,外观文理。和这些全面翻新同时出现的还有 Torsten Rahn 绘制的全新KDE图标----齿轮前的3个K字母;这个图标的修改版也一直沿用至今。 + +### KDE 2.0 – 2000年10月23日 +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/20.png) + +重大更新:_ DCOP (Desktop COmmunication Protocol),一个端到端的通信协议 _ KIO,一个应用程序I/O库 _ KParts,组件对象模板 _ KHTML,一个符合 HTML 4.0 标准的图像绘制引擎。 + +![26 February 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/21.png) + +2001年2月26日 + +**K Desktop Environment 2.1** 首次发布了媒体播放器 noatun,noatun使用了先进的模组-插件设计。为了便利开发者,K Desktop Environment 2.1 打包了 KDevelop + +![15 August 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/22.png) + +2001年8月15日 + +**KDE 2.2**版本在GNU/Linux上加快了50%的应用启动速度,同时提高了稳定性和 HTML、JavaScript的解析性能,同时还增加了一些 KMail 的功能。 + +### KDE 3.0 – 2002年4月3日 +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/30.png) + +K Desktop Environment 3.0 加入了更好的限制使用功能,这个功能在网咖,企业公用电脑上被广泛需求。 + +![28 January 2003](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/31.png) + +2003年1月28日 + +**K Desktop Environment 3.1** 加入了新的默认窗口(Keramik)和图标样式(Crystal)和其他一些改进。 + +![3 February 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/32.png) + +2004年2月3日 + +**K Desktop Environment 3.2** 加入了诸如网页表格,书写邮件中拼写检查的新功能;补强了邮件和日历功能。完善了Konqueror 中的标签机制和对 Microsoft Windows 桌面共享协议的支持。 + +![19 August 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/33.png) + +2004年8月19日 + +**K Desktop Environment 3.3** 侧重于组合不同的桌面组件。Kontact 被放进了群件应用Kolab 并与 Kpilot 结合。Konqueror 的加入让KDE有了更好的 IM 交流功能,比如支持发送文件,以及其他 IM 协议(如IRC)的支持。 + +![16 March 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/34.png) + +2005年3月16日 + +**K Desktop Environment 3.4** 侧重于提高易用性。这次更新为Konqueror,Kate,KPDF加入了文字-语音转换功能;也在桌面系统中加入了独立的 KSayIt 文字-语音转换软件。 + +![29 November 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/35.png) + +2005年11月29日 + +**The K Desktop Environment 3.5** 发布加入了 SuperKaramba,为桌面环境提供了易于安装的插件机制。 desktop. Konqueror 加入了广告屏蔽功能并成为了有史以来第二个通过Acid2 CSS 测试的浏览器。 + +### KDE SC 4.0 – 2008年1月11日 +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/400.png) + +大部分开组投身于把最新的技术和开发框架整合进 KDE 4 当中。Plasma 和 Oxygen 是两次最大的用户界面风格变更。同时,Dolphin 替代 Konqueror 成为默认文件管理器,Okular 成为了默认文档浏览器。 + +![29 July 2008](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/401.png) + +2008年7月29日 + +**KDE 4.1** 引入了一个在 PIM 和 Kopete 中使用的表情主题系统;引入了可以让用户便利地从互联网上一键下载数据的DXS。同时引入了 GStreamer,QuickTime,和 DirectShow 9 Phonon 后台。加入了新应用如:_ Dragon Player _ Kontact _ Skanlite – 扫描仪软件,_ Step – 物理模拟软件 * 新游戏: Kdiamond,Kollision,KBreakout 和更多...... + +![27 January 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/402.png) + +2009年1月27日 + +**KDE 4.2** 被认为是在已经极佳的 KDE 4.1 基础上的又一次全面超越,同时也成为了大多数用户替换旧 3.5 版本的完美选择。 + +![4 August 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/403.png) + +2009年8月4日 + +**KDE 4.3** 修复了超过10,000个 bugs,同时加入了让近2,000个被用户需求的功能。整合一些新的技术例如:PolicyKit,NetworkManage & Geolocation services 等也是这个版本的一大重点。 + +![9 February 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/404.png) + +2010年2月9日 + +**KDE SC 4.4** 基础 Qt 4 开框架的 4.6 版本,新的应用 KAddressBook 被加入,同时也是is based on version 4.6 of the Qt 4 toolkit. New application – KAddressBook,Kopete首次发布。 + +![10 August 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/405.png) + +2010年8月10日 + +**KDE SC 4.5** 增加了一些新特性:整合了 WebKit 库----一个开源的浏览器引擎库,现在也被在 Apple Safari 和 Google Chrome 中广泛使用。KPackageKit 替换了 Kpackage。 + +![26 January 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/406.png) + +2011年1月26日 + +**KDE SC 4.6** 加强了 OpenGl 的性能,同时照常更新了无数bug和小改进。 + +![27 July 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/407.png) + +2011年7月27日 + +**KDE SC 4.7** 升级 KWin 以兼容 OpenGL ES 2.0 ,更新了 Qt Quick,Plasma Desktop 中在应用里普遍使用的新特性 1.2万个bug被修复。 + +![25 January 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/408.png) + +2012年1月25日 + +**KDE SC 4.8**: 更好的 KWin 性能与 Wayland 支持,更新了 Doplhin 的外观设计。 + +![1 August 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/409.png) + +2012年8月1日 + +**KDE SC 4.9**: 向 Dolphin 文件管理器增加了一些更新,比如加入了实时文件重命名,鼠标辅助按钮支持,更好的位置标签和更多文件分类管理功能。 + +![6 February 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/410.png) + +2013年2月6日 + +**KDE SC 4.10**: 很多 Plasma 插件使用 QML 重写; Nepomuk,Kontact 和 Okular 得到了很大程度的性能和功能提升。 + +![14 August 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/411.png) + +2013年8月14日 + +**KDE SC 4.11**: Kontact 和 Nepomuk 有了很大的优化。 第一代 Plasma Workspaces 进入了仅有维护而没有新生开发的软件周期。 + +![18 December 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/412.png) + +2013年12月18日 + +**KDE SC 4.12**: Kontact 得到了极大的提升。 + +![16 April 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/413.png) + +2014年4月16日 + +**KDE SC 4.13**: Nepomuk 语义搜索功能替代了桌面上的原有的Baloo搜索。 KDE SC 4.13 发布了53个语言版本。 + +![20 August 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/414.png) + +2014年8月20日 + +**KDE SC 4.14**: 这个发布版本侧重于稳定性提升:大量的bug修复和小更新。这是最后一个 KDE SC 4 发布版本。 + +### KDE Plasma 5.0 – 2014年7月15日 +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/500.png) + +KDE Plasma 5 – 第五代 KDE。大幅改进了设计和系统,新的默认主题 ---- Breeze,完全迁移到了 QML,更好的 OpenGL 性能,更完美的 HiDPI (高分辨率)显示支持。 + +![11 November 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/501.png) + +2014年11月11日 + +**KDE Plasma 5.1**:加入了Plasma 4里原先没有补完的功能。 + +![27 January 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/502.png) + +2015年1月27日 + +**KDE Plasma 5.2**:新组件:BlueDevil,KSSHAskPass,Muon,SDDM 主题设置,KScreen,GTK+ 样式设置 和 KDecoration. + +![28 April 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/503.png) + +2015年4月28日 + +**KDE Plasma 5.3**:Plasma Media Center 技术预览。新的蓝牙和触摸板小程序;改良了电源管理。 + +![25 August 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/504.png) + +2015年8月25日 + +**KDE Plasma 5.4**:Wayland 登场,新的基于 QML 的音频管理程序,交替式全屏程序显示。 + +万分感谢 [KDE][1] 开发者和社区及Wikipedia 为书写 [概述][2] 带来的帮助,同时,感谢所有读者。希望大家保持自由精神(be free)并继续支持如同 KDE 一样的开源的自由软件发展。 + +-------------------------------------------------------------------------------- + +via: [https://tlhp.cf/kde-history/](https://tlhp.cf/kde-history/) + +作者:[Pavlo RudyiCategories][a] 译者:[jerryling315](https://github.com/jerryling315) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://www.kde.org/ +[2]: https://en.wikipedia.org/wiki/KDE_Plasma_5 +[a]: https://tlhp.cf/author/paul/ From 4ac1549bba1fc9f381e4defc22cb0fddb31ce4cc Mon Sep 17 00:00:00 2001 From: Bestony Date: Sun, 20 Dec 2015 21:53:41 +0800 Subject: [PATCH 0616/1710] =?UTF-8?q?=E8=AE=A4=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20151013 DFileManager--Cover Flow File Manager.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151013 DFileManager--Cover Flow File Manager.md b/sources/tech/20151013 DFileManager--Cover Flow File Manager.md index 9c96fe9553..c2f74987b4 100644 --- a/sources/tech/20151013 DFileManager--Cover Flow File Manager.md +++ b/sources/tech/20151013 DFileManager--Cover Flow File Manager.md @@ -1,3 +1,4 @@ +translation by bestony 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. From f36898e7f5ecc37bcc0e69d8e91e6d2668b6406c Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Sun, 20 Dec 2015 23:35:04 +0800 Subject: [PATCH 0617/1710] translate by zky001 translate by zky001 --- sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index 99f1ceed04..45dbf42e96 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -1,3 +1,4 @@ +translate by zky001 * * * # GCC-Inline-Assembly-HOWTO @@ -625,6 +626,6 @@ If you have found any glaring typos, or outdated info in this document, please l * * * via: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html - 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[](https://github.com/) 校对:[]() + 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[zky001](https://github.com/zky001) 校对:[]() 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From eaaa8c2fcbebfb77369a877b4bec5e482a4fe4b9 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 21 Dec 2015 08:48:12 +0800 Subject: [PATCH 0618/1710] [translated]Learn with Linux--Learning to Type --- .../Learn with Linux--Learning to Type.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {sources => translated}/tech/Learn with Linux/Learn with Linux--Learning to Type.md (91%) diff --git a/sources/tech/Learn with Linux/Learn with Linux--Learning to Type.md b/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md similarity index 91% rename from sources/tech/Learn with Linux/Learn with Linux--Learning to Type.md rename to translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md index fe80d9e51d..abb08355ac 100644 --- a/sources/tech/Learn with Linux/Learn with Linux--Learning to Type.md +++ b/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md @@ -50,25 +50,26 @@ Debian 及其衍生版本(包含所有 Ubuntu 衍生版本)的标准软件 ### GNU typist (gtype) ### -For adults and more experienced typists, there is GNU Typist, a console-based application developed by the GNU project. +对于成年人或有打字经验的人来说,GNU Typist 可能更合适,它是一个 GNU 项目、基于控制台操作的游戏。 -GNU Typist will also be carried by most Debian derivatives’ main repos. Installing it is as easy as typing +GNU Typist 也在大多数 Debian 衍生版本的软件库中,运行下面的命令来安装: 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) From 25cf990974ec55735e7564b617876264dfb269b2 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 21 Dec 2015 08:52:10 +0800 Subject: [PATCH 0619/1710] [translated]Learn with Linux--Learning to Type --- .../Learn with Linux--Learning to Type.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md b/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md index abb08355ac..5153d11453 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md +++ b/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md @@ -1,4 +1,4 @@ -Learn with Linux: Learning to Type +Linux 教学之教你练打字 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-featured.png) @@ -36,21 +36,21 @@ Debian 及其衍生版本(包含所有 Ubuntu 衍生版本)的标准软件 ![learntotype-tuxtyping-exd2](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-exd2.jpg) -更高级点的,你可以练习输入句子。不知道为什么,句子练习被放在“Options”选项里。(LCTT 译注:句子练习第一句是“The quick brown fox jumps over the lazy dog”,包含了26个英文字母的英文句子,可用于检测键盘是否坏键,也是练习英文打字的必备良药啊。) +更高级点的,你可以练习输入句子。不知道为什么,句子练习被放在“Options”选项里。(LCTT 译注:句子练习第一句是“The quick brown fox jumps over the lazy dog”,包含了26个英文字母,可用于检测键盘是否坏键,也是练习英文打字的必备良药啊。) ![learntotype-tuxtyping-phrase](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-phrase.jpg) -这个游戏让玩家打出单词来帮助 Tux 吃到小鱼或者打击掉下来的流星,可以训练速度和精确度。 +这个游戏让玩家打出单词来帮助 Tux 吃到小鱼或者干掉掉下来的流星,训练速度和精确度。 ![learntotype-tuxtyping-fish](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-fish.jpg) ![learntotype-tuxtyping-zap](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-zap.jpg) -除了练习有趣外,这些游戏还可以训练玩家的拼写、速度、手眼配合能力,因为你如果认真玩的话,必须盯着屏幕,不看键盘打字。 +除了练习有趣外,这些游戏还可以训练玩家的拼写、速度、手眼配合能力,因为你如果认真在玩的话,必须盯着屏幕,不看键盘打字。 ### GNU typist (gtype) ### -对于成年人或有打字经验的人来说,GNU Typist 可能更合适,它是一个 GNU 项目、基于控制台操作的游戏。 +对于成年人或有打字经验的人来说,GNU Typist 可能更合适,它是一个 GNU 项目,基于控制台操作。 GNU Typist 也在大多数 Debian 衍生版本的软件库中,运行下面的命令来安装: @@ -68,45 +68,45 @@ GNU Typist 也在大多数 Debian 衍生版本的软件库中,运行下面的 ![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, +下图的错误已经超过 3%,错误率太高了,你得降低些。 ![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.” +一些训练用于完成特殊目标,比如“平衡键盘训练(LCTT 译注:感觉是用来练习手感的)”。 ![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. +如果你想练练自己的打字水平,Linux 上有很多软件给你用。本文介绍的两款软件界面简单但内容丰富,能满足绝大多数打字爱好者的需求。如果你正在使用、或者听说过其他的优秀打字练习软件,请在评论栏贴出来,让我们长长姿势。 -------------------------------------------------------------------------------- via: https://www.maketecheasier.com/learn-to-type-in-linux/ 作者:[Attila Orosz][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 3976898192d2b5ad7742ed85120783190647564a Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 21 Dec 2015 08:53:25 +0800 Subject: [PATCH 0620/1710] [translated]Learn with Linux--Learning to Type --- .../tech/Learn with Linux/Learn with Linux--Learning to Type.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md b/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md index 5153d11453..75694225aa 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md +++ b/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md @@ -98,7 +98,6 @@ GNU Typist 也在大多数 Debian 衍生版本的软件库中,运行下面的 ### 总结 ### -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. 如果你想练练自己的打字水平,Linux 上有很多软件给你用。本文介绍的两款软件界面简单但内容丰富,能满足绝大多数打字爱好者的需求。如果你正在使用、或者听说过其他的优秀打字练习软件,请在评论栏贴出来,让我们长长姿势。 -------------------------------------------------------------------------------- From c131c9c6ce0b8d80878e36dbf6f625bc4106e766 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 21 Dec 2015 08:59:17 +0800 Subject: [PATCH 0621/1710] [translating]Learn with Linux--Two Geography Apps --- .../Learn with Linux--Two Geography Apps.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 index a31e1f73b4..30b5b7854d 100644 --- 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 @@ -1,14 +1,17 @@ +bazz2222 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: +[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 教学之掌握数学][6] + +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 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. From 2cbe8640647bf049ca96f8226fe14f312bd5d097 Mon Sep 17 00:00:00 2001 From: runningwater Date: Mon, 21 Dec 2015 09:13:09 +0800 Subject: [PATCH 0622/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...l series 4--Grep Count Lines If a String or Word Matches.md | 3 ++- ...rial series 5--Grep From Files and Display the File Name.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md index cc11cf85c2..c145320e5a 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md @@ -1,3 +1,4 @@ +(translating by runningwater) Grep Count Lines If a String / Word Matches ================================================================================ How do I count lines if given word or string matches for each input file under Linux or UNIX operating systems? @@ -27,7 +28,7 @@ Sample outputs: via: http://www.cyberciti.biz/faq/grep-count-lines-if-a-string-word-matches/ 作者:Vivek Gite -译者:[译者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/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md index 6fa9dc7a27..3b683746eb 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md @@ -1,3 +1,4 @@ +(translating by runningwater) Grep From Files and Display the File Name ================================================================================ How do I grep from a number of files and display the file name only? @@ -61,7 +62,7 @@ Sample outputs: via: http://www.cyberciti.biz/faq/grep-from-files-and-display-the-file-name/ 作者:Vivek Gite -译者:[译者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/) 荣誉推出 \ No newline at end of file From 0a2e18511bb5c1275ba76ad436f6936a11b8ee9b Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 19 Dec 2015 18:18:55 +0800 Subject: [PATCH 0623/1710] =?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 @wi-cuckoo --- .../tech/20150917 A Repository with 44 Years of Unix Evolution.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150917 A Repository with 44 Years of Unix Evolution.md (100%) diff --git a/sources/tech/20150917 A Repository with 44 Years of Unix Evolution.md b/translated/tech/20150917 A Repository with 44 Years of Unix Evolution.md similarity index 100% rename from sources/tech/20150917 A Repository with 44 Years of Unix Evolution.md rename to translated/tech/20150917 A Repository with 44 Years of Unix Evolution.md From 5d0b30c76fd5a8ba17da604abad5fd79071cf84b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 21 Dec 2015 10:41:58 +0800 Subject: [PATCH 0624/1710] PUB:20151208 Install Wetty on Centos or RHEL 6.X @strugglingyouth --- ...208 Install Wetty on Centos or RHEL 6.X.md | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) rename {translated/tech => published}/20151208 Install Wetty on Centos or RHEL 6.X.md (66%) diff --git a/translated/tech/20151208 Install Wetty on Centos or RHEL 6.X.md b/published/20151208 Install Wetty on Centos or RHEL 6.X.md similarity index 66% rename from translated/tech/20151208 Install Wetty on Centos or RHEL 6.X.md rename to published/20151208 Install Wetty on Centos or RHEL 6.X.md index 330a6cc8e6..c0f9f503b5 100644 --- a/translated/tech/20151208 Install Wetty on Centos or RHEL 6.X.md +++ b/published/20151208 Install Wetty on Centos or RHEL 6.X.md @@ -1,11 +1,16 @@ - 在 Centos/RHEL 6.X 上安装 Wetty ================================================================================ ![](http://www.unixmen.com/wp-content/uploads/2015/11/Terminal.png) -Wetty 是什么? +**Wetty 是什么?** -作为系统管理员,如果你是在 Linux 桌面下,你可能会使用一个软件来连接远程服务器,像 GNOME 终端(或类似的),如果你是在 Windows 下,你可能会使用像 Putty 这样的 SSH 客户端来连接,并同时可以在浏览器中查收邮件等做其他事情。 +Wetty = Web + tty + +作为系统管理员,如果你是在 Linux 桌面下,你可以用它像一个 GNOME 终端(或类似的)一样来连接远程服务器;如果你是在 Windows 下,你可以用它像使用 Putty 这样的 SSH 客户端一样来连接远程,然后同时可以在浏览器中上网并查收邮件等其它事情。 + +(LCTT 译注:简而言之,这是一个基于 Web 浏览器的远程终端) + +![](https://github.com/krishnasrinivas/wetty/raw/master/terminal.png) ### 第1步: 安装 epel 源 ### @@ -15,6 +20,8 @@ Wetty 是什么? ### 第2步:安装依赖 ### # yum install epel-release git nodejs npm -y + +(LCTT 译注:对,没错,是用 node.js 编写的) ### 第3步:在安装完依赖后,克隆 GitHub 仓库 ### @@ -31,13 +38,15 @@ Wetty 是什么? ### 第6步:为 Wetty 安装 HTTPS 证书 ### - # openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes (complete this) + # openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes + +(等待完成) -### Step 7: 通过 HTTPS 来使用 Wetty ### +### 第7步:通过 HTTPS 来使用 Wetty ### # nohup node app.js --sslkey key.pem --sslcert cert.pem -p 8080 & -### Step 8: 为 wetty 添加一个用户 ### +### 第8步:为 wetty 添加一个用户 ### # useradd # Passwd @@ -45,7 +54,8 @@ Wetty 是什么? ### 第9步:访问 wetty ### http://Your_IP-Address:8080 - give the credential have created before for wetty and access + +输入你之前为 wetty 创建的证书然后访问。 到此结束! @@ -55,7 +65,7 @@ via: http://www.unixmen.com/install-wetty-centosrhel-6-x/ 作者:[Debojyoti Das][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 046e0609ae8c923882dc01a36e85d03c3eaefd53 Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Mon, 21 Dec 2015 11:40:08 +0800 Subject: [PATCH 0625/1710] Update sign.md --- sign.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sign.md b/sign.md index 1c413aba40..ebebc6e06f 100644 --- a/sign.md +++ b/sign.md @@ -19,4 +19,4 @@ via:来源链接 [6]: [7]: [8]: -[9]: \ No newline at end of file +[9]:ff From bbd8097168458dcf38e08efd427ec220b30538f2 Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Mon, 21 Dec 2015 11:40:29 +0800 Subject: [PATCH 0626/1710] Update sign.md --- sign.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sign.md b/sign.md index ebebc6e06f..960d450a96 100644 --- a/sign.md +++ b/sign.md @@ -19,4 +19,4 @@ via:来源链接 [6]: [7]: [8]: -[9]:ff +[9]: From b5f5d262ceae9808804d9525dfb54ae8dbf7b6f2 Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 21 Dec 2015 11:41:47 +0800 Subject: [PATCH 0627/1710] [translated]20151208 How to Customize Time and Date Format in Ubuntu Panel --- ...ze Time and Date Format in Ubuntu Panel.md | 67 ------------------- ...ze Time and Date Format in Ubuntu Panel.md | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md create mode 100644 translated/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md diff --git a/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md b/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md deleted file mode 100644 index 58405c88b8..0000000000 --- a/sources/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md +++ /dev/null @@ -1,67 +0,0 @@ -alim0x translating - -How to Customize Time & Date Format in Ubuntu Panel -================================================================================ -![Time & Date format](http://ubuntuhandbook.org/wp-content/uploads/2015/08/ubuntu_tips1.png) - -This quick tutorial is going to show you how to customize your Time & Date indicator in Ubuntu panel, though there are already a few options available in the settings page. - -![custom-timedate](http://ubuntuhandbook.org/wp-content/uploads/2015/12/custom-timedate.jpg) - -To get started, search for and install **dconf Editor** in Ubuntu Software Center. Then launch the software and follow below steps: - -**1.** When dconf Editor launches, navigate to **com -> canonical -> indicator -> datetime**. Set the value of **time-format** to **custom**. - -![custom time format](http://ubuntuhandbook.org/wp-content/uploads/2015/12/time-format.jpg) - -You can also do this via a command in terminal: - - gsettings set com.canonical.indicator.datetime time-format 'custom' - -**2.** Now you can customize the Time & Date format by editing the value of **custom-time-format**. - -![customize-timeformat](http://ubuntuhandbook.org/wp-content/uploads/2015/12/customize-timeformat.jpg) - -You can also do this via command: - - gsettings set com.canonical.indicator.datetime custom-time-format 'FORMAT_VALUE_HERE' - -Interpreted sequences are: - -- %a = abbreviated weekday name -- %A = full weekday name -- %b = abbreviated month name -- %B = full month name -- %d = day of month -- %l = hour ( 1..12), %I = hour (01..12) -- %k = hour ( 1..23), %H = hour (01..23) -- %M = minute (00..59) -- %p = AM or PM, %P = am or pm. -- %S = second (00..59) -- open terminal and run command `man date` to get more details. - -Some examples: - -custom time format value: **%a %H:%M %m/%d/%Y** - -![exam-1](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-1.jpg) - -**%a %r %b %d or %a %I:%M:%S %p %b %d** - -![exam-2](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-2.jpg) - -**%a %-d %b %l:%M %P %z** - -![exam-3](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-3.jpg) - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/ - -作者:[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/ diff --git a/translated/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md b/translated/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md new file mode 100644 index 0000000000..958dab2f18 --- /dev/null +++ b/translated/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md @@ -0,0 +1,67 @@ +自定义Ubuntu面板时间日期显示格式 +================================================================================ +![时间日期格式](http://ubuntuhandbook.org/wp-content/uploads/2015/08/ubuntu_tips1.png) + +尽管设置里已经有一些选项可以用了,这个快速教程会向你展示如何更加深入地自定义 Ubuntu 面板上的时间和日期指示器。 + +![自定义世间日期](http://ubuntuhandbook.org/wp-content/uploads/2015/12/custom-timedate.jpg) + +在开始之前,在 Ubuntu 软件中心搜索并安装 **dconf Editor**。然后启动该软件并按以下步骤执行: + +**1.** 当 dconf Editor 启动后,导航至 **com -> canonical -> indicator -> datetime**。将 **time-format** 的值设置为 **custom**。 + +![自定义时间格式](http://ubuntuhandbook.org/wp-content/uploads/2015/12/time-format.jpg) + +你也可以通过终端里的命令完成以上操作: + + gsettings set com.canonical.indicator.datetime time-format 'custom' + +**2.** 现在你可以通过编辑 **custom-time-format** 的值来自定义时间和日期的格式。 + +![自定义-时间格式](http://ubuntuhandbook.org/wp-content/uploads/2015/12/customize-timeformat.jpg) + +你也可以通过命令完成:(译注:将 FORMAT_VALUE_HERE 替换为所需要的格式值) + + gsettings set com.canonical.indicator.datetime custom-time-format 'FORMAT_VALUE_HERE' + +以下是参数含义: + +- %a = 星期名缩写 +- %A = 星期名完整拼写 +- %b = 月份名缩写 +- %B = 月份名完整拼写 +- %d = 按月计日期 +- %l = 小时 ( 1..12), %I = 小时 (01..12) +- %k = 小时 ( 1..23), %H = 小时 (01..23) +- %M = 分钟 (00..59) +- %p = 午别,AM 或 PM, %P = am 或 pm. +- %S = 秒 (00..59) +- 打开终端键入命令 `man date` 并执行以了解更多细节。 + +一些例子: + +自定义时间日期显示格式值: + +**%a %H:%M %m/%d/%Y** + +![exam-1](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-1.jpg) + +**%a %r %b %d or %a %I:%M:%S %p %b %d** + +![exam-2](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-2.jpg) + +**%a %-d %b %l:%M %P %z** + +![exam-3](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-3.jpg) + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/ + +作者:[Ji m][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuhandbook.org/index.php/about/ From 33424c486cc7dea51fa5b63196a6c57484d9062d Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 21 Dec 2015 11:55:55 +0800 Subject: [PATCH 0628/1710] PUB:20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10 @ictlyh --- ...eSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) rename {translated/tech => published}/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md (84%) diff --git a/translated/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md b/published/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md similarity index 84% rename from translated/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md rename to published/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md index 7fd4414127..040fb40302 100644 --- a/translated/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md +++ b/published/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md @@ -1,14 +1,14 @@ -在 Ubuntu 15.10 上安装 PostgreSQL 9.4 和 phpPgAdmin +在 Ubuntu 上安装世界上最先进的开源数据库 PostgreSQL 9.4 和 phpPgAdmin ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/05/postgresql.png) ### 简介 ### -[PostgreSQL][1] 是一款强大的,开源对象关系型数据库系统。它支持所有的主流操作系统,包括 Linux、Unix(AIX、BSD、HP-UX,SGI IRIX、Mac OS、Solaris、Tru64) 以及 Windows 操作系统。 +[PostgreSQL][1] 是一款强大的,开源的,对象关系型数据库系统。它支持所有的主流操作系统,包括 Linux、Unix(AIX、BSD、HP-UX,SGI IRIX、Mac OS、Solaris、Tru64) 以及 Windows 操作系统。 下面是 **Ubuntu** 发起者 **Mark Shuttleworth** 对 PostgreSQL 的一段评价。 -> PostgreSQL 真的是一款很好的数据库系统。刚开始我们使用它的时候,并不确定它能否胜任工作。但我错的太离谱了。它很强壮、快速,在各个方面都很专业。 +> PostgreSQL 是一款极赞的数据库系统。刚开始我们在 Launchpad 上使用它的时候,并不确定它能否胜任工作。但我是错了。它很强壮、快速,在各个方面都很专业。 > > — Mark Shuttleworth. @@ -22,7 +22,7 @@ 如果你需要其它的版本,按照下面那样先添加 PostgreSQL 仓库然后再安装。 -**PostgreSQL apt 仓库** 支持 amd64 和 i386 架构的 Ubuntu 长期支持版(10.04、12.04 和 14.04),以及非长期支持版(14.04)。对于其它非长期支持版,该软件包虽然不能完全支持,但使用和 LTS 版本近似的也能正常工作。 +**PostgreSQL apt 仓库** 支持 amd64 和 i386 架构的 Ubuntu 长期支持版(10.04、12.04 和 14.04),以及非长期支持版(14.04)。对于其它非长期支持版,该软件包虽然没有完全支持,但使用和 LTS 版本近似的也能正常工作。 #### Ubuntu 14.10 系统: #### @@ -36,11 +36,11 @@ **注意**: 上面的库只能用于 Ubuntu 14.10。还没有升级到 Ubuntu 15.04 和 15.10。 -**Ubuntu 14.04**,添加下面一行: +对于 **Ubuntu 14.04**,添加下面一行: deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main -**Ubuntu 12.04**,添加下面一行: +对于 **Ubuntu 12.04**,添加下面一行: deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main @@ -48,8 +48,6 @@ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc ----------- - sudo apt-key add - 更新软件包列表: @@ -66,7 +64,7 @@ sudo -u postgres psql postgres -#### 事例输出: #### +#### 示例输出: #### psql (9.4.5) Type "help" for help. @@ -87,7 +85,7 @@ Enter it again: postgres=# \q -要安装 PostgreSQL Adminpack,在 postgresql 窗口输入下面的命令: +要安装 PostgreSQL Adminpack 扩展,在 postgresql 窗口输入下面的命令: sudo -u postgres psql postgres @@ -165,7 +163,7 @@ #port = 5432 [...] -取消改行的注释,然后设置你 postgresql 服务器的 IP 地址,或者设置为 ‘*’ 监听所有用户。你应该谨慎设置所有远程用户都可以访问 PostgreSQL。 +取消该行的注释,然后设置你 postgresql 服务器的 IP 地址,或者设置为 ‘*’ 监听所有用户。你应该谨慎设置所有远程用户都可以访问 PostgreSQL。 [...] listen_addresses = '*' @@ -272,8 +270,6 @@ sudo systemctl restart postgresql ----------- - sudo systemctl restart apache2 或者, @@ -284,19 +280,19 @@ 现在打开你的浏览器并导航到 **http://ip-address/phppgadmin**。你会看到以下截图。 -![phpPgAdmin – Google Chrome_001](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_001.jpg) +![phpPgAdmin ](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_001.jpg) 用你之前创建的用户登录。我之前已经创建了一个名为 “**senthil**” 的用户,密码是 “**ubuntu**”,因此我以 “senthil” 用户登录。 -![phpPgAdmin – Google Chrome_002](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_002.jpg) +![phpPgAdmin ](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_002.jpg) 然后你就可以访问 phppgadmin 面板了。 -![phpPgAdmin – Google Chrome_003](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_003.jpg) +![phpPgAdmin ](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_003.jpg) 用 postgres 用户登录: -![phpPgAdmin – Google Chrome_004](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_004.jpg) +![phpPgAdmin ](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_004.jpg) 就是这样。现在你可以用 phppgadmin 可视化创建、删除或者更改数据库了。 @@ -308,7 +304,7 @@ via: http://www.unixmen.com/install-postgresql-9-4-and-phppgadmin-on-ubuntu-15-1 作者:[SK][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 c50536c2eb9bc144b053baffea584aa53e628f90 Mon Sep 17 00:00:00 2001 From: taichirain Date: Mon, 21 Dec 2015 12:03:03 +0800 Subject: [PATCH 0629/1710] firt commit --- ...0151123 How to Configure Apache Solr on Ubuntu 14 or 15.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md index e73bdbeb0a..8033292f5f 100644 --- a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md +++ b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md @@ -1,3 +1,5 @@ +taichirain 翻译中 + How to Configure Apache Solr on Ubuntu 14 / 15 ================================================================================ Hello and welcome to our today's article on Apache Solr. The brief description about Apache Solr is that it is an Open Source most famous search platform with Apache Lucene at the back end for Web sites that enables you to easily create search engines which searches websites, databases and files. It can index and search multiple sites and return recommendations for related contents based on the searched text. @@ -130,4 +132,4 @@ via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/kashifs/ -[1]:http://lucene.apache.org/solr/ \ No newline at end of file +[1]:http://lucene.apache.org/solr/ From d09c3a16751e37f3f0798f44a60e33a5d0c78737 Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Mon, 21 Dec 2015 13:57:59 +0800 Subject: [PATCH 0630/1710] Translating by itsang --- .../20151206 NetworkManager and privacy in the IPv6 internet.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md index b485db2927..d3abefacb2 100644 --- a/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md +++ b/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md @@ -1,3 +1,4 @@ +Translating by itsang NetworkManager and privacy in the IPv6 internet ====================== From 8f8dcb4e6fb6b62791d227192f3f5ec6f3d5a011 Mon Sep 17 00:00:00 2001 From: taichirain Date: Mon, 21 Dec 2015 20:14:01 +0800 Subject: [PATCH 0631/1710] first commit --- ...onfigure Apache Solr on Ubuntu 14 or 15.md | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md index 8033292f5f..0353702dc9 100644 --- a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md +++ b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md @@ -1,30 +1,35 @@ taichirain 翻译中 How to Configure Apache Solr on Ubuntu 14 / 15 +如何在Ubuntu 14/15上配置Apache Solr ================================================================================ Hello and welcome to our today's article on Apache Solr. The brief description about Apache Solr is that it is an Open Source most famous search platform with Apache Lucene at the back end for Web sites that enables you to easily create search engines which searches websites, databases and files. It can index and search multiple sites and return recommendations for related contents based on the searched text. Solr works with HTTP Extensible Markup Language (XML) that offers application program interfaces (APIs) for Javascript Object Notation, Python, and Ruby. According to the Apache Lucene Project, Solr offers capabilities that have made it popular with administrators including it many featuring like: -- Full Text Search -- Faceted Navigation +- 全文检索 +- 分面导航 - Snippet generation/highting -- Spell Suggestion/Auto complete +- 拼写建议/自动完成 - Custom document ranking/ordering +- 自定义文档排序/排列 -#### Prerequisites: #### +#### 前提条件: #### On a fresh Linux Ubuntu 14/15 with minimal packages installed, you only have to take care of few prerequisites in order to install Apache Solr. +在一个以最小化安装包安装的linux Ubuntu 14/15的系统上,你仅仅需要少量的准备,就可以开始安装 Apache Solor. -### 1)System Update ### +### 1)System Update 系统更新### Login to your Ubuntu server with a non-root sudo user that will be used to perform all the steps to install and use Solr. +在所有的安装步骤以及使用Solor过程中使用一个具有sudo权限的非root用户登录Ubuntu server After successful login, issue the following command to update your system with latest updates and patches. +登录成功后,使用下面的命令,升级你的系统到最新的更新及补丁 $ sudo apt-get update -### 2) JRE Setup ### +### 2) JRE Setup 安装JRE### The Solr setup needs Java Runtime Environment to be installed on the system as its basic requirement because solr and tomcat both are the Java based applications. So, we need to install and configure its home environment with latest Java. @@ -37,6 +42,7 @@ Upon completion, run the setup its the repository for the latest version of Java $ sudo add-apt-repository ppa:webupd8team/java Now you are able to install the latest version of Oracle Java 8 with 'wget' by issuing the below commands to update the packages source list and then to install Java. +使用下面的命令升级源列表,然后安装java,然后你就可以使用'wget'安装Oracle Jave 8的最新版本 $ sudo apt-get update @@ -45,8 +51,10 @@ Now you are able to install the latest version of Oracle Java 8 with 'wget' by i $ sudo apt-get install oracle-java8-installer Accept the Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX as you will be asked during the Java installation and configuration process by a click on the 'OK' button. +在安装和配置Java SE Platform 和 JavaFX 过程中点击'OK'按钮,接受 Oracle Binary Code License Agreement 协议. When the installation process complete, run the below command to test the successful installation of Java and check its version. +在安装完成后,运行下面的命令,检查是否安装成功以及安装的版本 kash@solr:~$ java -version java version "1.8.0_66" @@ -54,32 +62,38 @@ When the installation process complete, run the below command to test the succes Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) The output indicates that we have successfully fulfilled the basic requirement of Solr by installing the Java. Now move to the next step to install Solr. +执行结果表明我们已经成功的安装了Java,并达到安装Solr最基本的要求了 -### Installing Solr ### +### Installing Solr 安装Solr### Installing Solr on Ubuntu can be done by using two different ways but in this article we prefer to install its latest package from the source. +有两种不同的方式可以在Ubuntu上安装Solr,在本文中,只会用最新的源码包来演示源码安装 To install Solr from its source, download its available package with latest version from there Official [Web Page][1], copy the link address and get it using 'wget' command. +要使用源码安装Solr,先要从官网 [Web Page][1] 下载最新的可用安装包。复制一下链接,然后使用 'wget'命令来下载。 $ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz Run the command below to extract the archived service into '/bin' folder. +运行下面的命令,将归档服务解压到 /bin目录 $ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2 Then run the script to start Solr service that will creates a new 'solr' user and then installs solr as a service. +运行脚本来启动Solr服务:将会先创建一个solr的用户,然后将Solr安装成服务 $ sudo bash ./install_solr_service.sh solr-5.3.1.tgz ![Solr Installation](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) To check the status of Solr service, you use the below command. +使用下面的命令来检查Solr服务的状态 $ service solr status ![Solr Status](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) -### Creating Solr Collection: ### +### Creating Solr Collection: 创建Solr集合: ### Now we can create multiple collections using Solr user. To do so just run the below command by mentioning the name of the collection you want to create and by specifying its configuration set as shown. @@ -88,16 +102,20 @@ Now we can create multiple collections using Solr user. To do so just run the be ![creating collection](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) We have successfully created the new core instance directory for our our first collection where we can add new data in it. To view its default schema file in directory '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' . +我们已经成功的为我们的第一个集合创建了新的内核实例目录,并可以将数据添加到那里。 +它的概要文件在 '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' -### Using Solr Web ### +### Using Solr Web 使用Solr页面### Apache Solr can be accessible on the default port of Solr that 8983. Open your favorite browser and navigate to http://your_server_ip:8983/solr or http://your-domain.com:8983/solr. Make sure that the port is allowed in your firewall. +Apache Solr可以使用默认的端口8983进入.打开浏览器,输入 http://your_server_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口. http://172.25.10.171:8983/solr/ ![Solr Web Access](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) From the Solr Web Console click on the 'Core Admin' button from the left bar, then you will see your first collection that we created earlier using CLI. While you can also create new cores by pointing on the 'Add Core' button. +在Solr的Web控制台的左侧菜单点击'Core Admin'按钮,你将会看见我们之前使用CLI方式创建的集合。你可以点击'Add Core'按钮来创建新的内核 ![Adding Core](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) @@ -117,7 +135,7 @@ After adding the document click on the 'Submit Document' button. ![adding Document](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) -### Conclusion ### +### Conclusion 总结### You are now able to insert and query data using the Solr web interface after its successful installation on Ubuntu. Now add more collections and insert you own data and documents that you wish to put and manage through Solr. We hope you have got this article much helpful and enjoyed reading this. From 91576d11fc9598247591d12240e06acab26e48ac Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 21 Dec 2015 21:50:28 +0800 Subject: [PATCH 0632/1710] PUB:20151022 9 Tips for Improving WordPress Performance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 这篇这么长,辛苦了。不过其中有些地方翻译的不够仔细。 --- ...ips for Improving WordPress Performance.md | 163 +++++++++--------- 1 file changed, 81 insertions(+), 82 deletions(-) rename {translated/tech => published}/20151022 9 Tips for Improving WordPress Performance.md (52%) diff --git a/translated/tech/20151022 9 Tips for Improving WordPress Performance.md b/published/20151022 9 Tips for Improving WordPress Performance.md similarity index 52% rename from translated/tech/20151022 9 Tips for Improving WordPress Performance.md rename to published/20151022 9 Tips for Improving WordPress Performance.md index 9c105df42a..ea1a76200d 100644 --- a/translated/tech/20151022 9 Tips for Improving WordPress Performance.md +++ b/published/20151022 9 Tips for Improving WordPress Performance.md @@ -1,19 +1,18 @@ - -提高 WordPress 性能的9个技巧 +深入浅出讲述提升 WordPress 性能的九大秘笈 ================================================================================ -关于建站和 web 应用程序交付,WordPress 是全球最大的一个平台。全球大约 [四分之一][1] 的站点现在正在使用开源 WordPress 软件,包括 eBay, Mozilla, RackSpace, TechCrunch, CNN, MTV,纽约时报,华尔街日报。 +在建站和 web 应用程序交付方面,WordPress 是全球最大的一个平台。全球大约[四分之一][1] 的站点现在正在使用开源 WordPress 软件,包括 eBay、 Mozilla、 RackSpace、 TechCrunch、 CNN、 MTV、纽约时报、华尔街日报 等等。 -WordPress.com,对于用户创建博客平台是最流行的,其也运行在WordPress 开源软件上。[NGINX powers WordPress.com][2]。许多 WordPress 用户刚开始在 WordPress.com 上建站,然后移动到搭载着 WordPress 开源软件的托管主机上;其中大多数站点都使用 NGINX 软件。 +最流行的个人博客平台 WordPress.com,其也运行在 WordPress 开源软件上。[而 NGINX 则为 WordPress.com 提供了动力][2]。在 WordPress.com 的用户当中,许多站点起步于 WordPress.com,然后换成了自己运行 WordPress 开源软件;它们中越来越多的站点也使用了 NGINX 软件。 -WordPress 的吸引力是它的简单性,无论是安装启动或者对于终端用户的使用。然而,当使用量不断增长时,WordPress 站点的体系结构也存在一定的问题 - 这里几个方法,包括使用缓存以及组合 WordPress 和 NGINX,可以解决这些问题。 +WordPress 的吸引力源于其简单性,无论是对于最终用户还是安装架设。然而,当使用量不断增长时,WordPress 站点的体系结构也存在一定的问题 - 这里有几个方法,包括使用缓存,以及将 WordPress 和 NGINX 组合起来,可以解决这些问题。 -在这篇博客中,我们提供了9个技巧来进行优化,以帮助你解决 WordPress 中一些常见的性能问题: +在这篇博客中,我们提供了九个提速技巧来帮助你解决 WordPress 中一些常见的性能问题: - [缓存静态资源][3] - [缓存动态文件][4] -- [使用 NGINX][5] -- [添加支持 NGINX 的链接][6] +- [迁移到 NGINX][5] +- [添加 NGINX 静态链接支持][6] - [为 NGINX 配置 FastCGI][7] - [为 NGINX 配置 W3_Total_Cache][8] - [为 NGINX 配置 WP-Super-Cache][9] @@ -22,39 +21,39 @@ WordPress 的吸引力是它的简单性,无论是安装启动或者对于终 ### 在 LAMP 架构下 WordPress 的性能 ### -大多数 WordPress 站点都运行在传统的 LAMP 架构下:Linux 操作系统,Apache Web 服务器软件,MySQL 数据库软件 - 通常是一个单独的数据库服务器 - 和 PHP 编程语言。这些都是非常著名的,广泛应用的开源工具。大多数人都将 WordPress “称为” LAMP,并且很容易寻求帮助和支持。 +大多数 WordPress 站点都运行在传统的 LAMP 架构下:Linux 操作系统,Apache Web 服务器软件,MySQL 数据库软件(通常是一个单独的数据库服务器)和 PHP 编程语言。这些都是非常著名的,广泛应用的开源工具。在 WordPress 世界里,很多人都用的是 LAMP,所以很容易寻求帮助和支持。 -当用户访问 WordPress 站点时,浏览器为每个用户创建六到八个连接来运行 Linux/Apache 的组合。当用户请求连接时,每个页面的 PHP 文件开始飞速的从 MySQL 数据库争夺资源来响应请求。 +当用户访问 WordPress 站点时,浏览器为每个用户创建六到八个连接来连接到 Linux/Apache 上。当用户请求连接时,PHP 即时生成每个页面,从 MySQL 数据库获取资源来响应请求。 -LAMP 对于数百个并发用户依然能照常工作。然而,流量突然增加是常见的并且 - 通常是 - 一件好事。 +LAMP 或许对于数百个并发用户依然能照常工作。然而,流量突然增加是常见的,并且通常这应该算是一件好事。 但是,当 LAMP 站点变得繁忙时,当同时在线的用户达到数千个时,它的瓶颈就会被暴露出来。瓶颈存在主要是两个原因: -1. Apache Web 服务器 - Apache 为每一个连接需要消耗大量资源。如果 Apache 接受了太多的并发连接,内存可能会耗尽,性能急剧降低,因为数据必须使用磁盘进行交换。如果以限制连接数来提高响应时间,新的连接必须等待,这也导致了用户体验变得很差。 +1. Apache Web 服务器 - Apache 的每个/每次连接需要消耗大量资源。如果 Apache 接受了太多的并发连接,内存可能会耗尽,从而导致性能急剧降低,因为数据必须交换到磁盘了。如果以限制连接数来提高响应时间,新的连接必须等待,这也导致了用户体验变得很差。 -1. PHP/MySQL 的交互 - 总之,一个运行 PHP 和 MySQL 数据库服务器的应用服务器上每秒的请求量不能超过最大限制。当请求的数量超过最大连接数时,用户必须等待。超过最大连接数时也会增加所有用户的响应时间。超过其两倍以上时会出现明显的性能问题。 +1. PHP/MySQL 的交互 - 一个运行 PHP 和 MySQL 数据库服务器的应用服务器上每秒的请求量有一个最大限制。当请求的数量超过这个最大限制时,用户必须等待。超过这个最大限制时也会增加所有用户的响应时间。超过其两倍以上时会出现明显的性能问题。 - LAMP 架构的网站一般都会出现性能瓶颈,这时就需要升级硬件了 - 加 CPU,扩大磁盘空间等等。当 Apache 和 PHP/MySQL 的架构负载运行后,在硬件上不断的提升无法保证对系统资源指数增长的需求。 +LAMP 架构的网站出现性能瓶颈是常见的情况,这时就需要升级硬件了 - 增加 CPU,扩大磁盘空间等等。当 Apache 和 PHP/MySQL 的架构超载后,在硬件上不断的提升却跟不上系统资源指数增长的需求。 -最先取代 LAMP 架构的是 LEMP 架构 – Linux, NGINX, MySQL, 和 PHP。 (这是 LEMP 的缩写,E 代表着 “engine-x.” 的发音。) 我们在 [技巧 3][12] 中会描述 LEMP 架构。 +首选替代 LAMP 架构的是 LEMP 架构 – Linux, NGINX, MySQL, 和 PHP。 (这是 LEMP 的缩写,E 代表着 “engine-x.” 的发音。) 我们在 [技巧 3][12] 中会描述 LEMP 架构。 ### 技巧 1. 缓存静态资源 ### -静态资源是指不变的文件,像 CSS,JavaScript 和图片。这些文件往往在网页的数据中占半数以上。页面的其余部分是动态生成的,像在论坛中评论,仪表盘的性能,或个性化的内容(可以看看Amazon.com 产品)。 +静态资源是指不变的文件,像 CSS,JavaScript 和图片。这些文件往往在网页的数据中占半数以上。页面的其余部分是动态生成的,像在论坛中评论,性能仪表盘,或个性化的内容(可以看看 Amazon.com 产品)。 缓存静态资源有两大好处: -- 更快的交付给用户 - 用户从他们浏览器的缓存或者从互联网上离他们最近的缓存服务器获取静态文件。有时候文件较大,因此减少等待时间对他们来说帮助很大。 +- 更快的交付给用户 - 用户可以从它们浏览器的缓存或者从互联网上离它们最近的缓存服务器获取静态文件。有时候文件较大,因此减少等待时间对它们来说帮助很大。 - 减少应用服务器的负载 - 从缓存中检索到的每个文件会让 web 服务器少处理一个请求。你的缓存越多,用户等待的时间越短。 -要让浏览器缓存文件,需要早在静态文件中设置正确的 HTTP 首部。当看到 HTTP Cache-Control 首部时,特别设置了 max-age,Expires 首部,以及 Entity 标记。[这里][13] 有详细的介绍。 +要让浏览器缓存文件,需要在静态文件中设置正确的 HTTP 首部。看看 HTTP Cache-Control 首部,特别是设置了 max-age 参数,Expires 首部,以及 Entity 标记。[这里][13] 有详细的介绍。 -当启用本地缓存然后用户请求以前访问过的文件时,浏览器首先检查该文件是否在缓存中。如果在,它会询问 Web 服务器该文件是否改变过。如果该文件没有改变,Web 服务器将立即响应一个304状态码(未改变),这意味着该文件没有改变,而不是返回状态码200 OK,然后继续检索并发送已改变的文件。 +当启用本地缓存,然后用户请求以前访问过的文件时,浏览器首先检查该文件是否在缓存中。如果在,它会询问 Web 服务器该文件是否改变过。如果该文件没有改变,Web 服务器将立即响应一个304状态码(未改变),这意味着该文件没有改变,而不是返回状态码200 OK 并检索和发送已改变的文件。 -为了支持浏览器以外的缓存,可以考虑下面的方法,内容分发网络(CDN)。CDN 是一​​种流行且​​强大的缓存工具,但我们在这里不详细描述它。可以想一下 CDN 背后的支撑技术的实现。此外,当你的站点从 HTTP/1.x 过渡到 HTTP/2 协议时,CDN 的用处可能不太大;根据需要调查和测试,找到你网站需要的正确方法。 +要在浏览器之外支持缓存,可以考虑下面讲到的技巧,以及考虑使用内容分发网络(CDN)。CDN 是一​​种流行且​​强大的缓存工具,但我们在这里不详细描述它。在你实现了这里讲到的其它技术之后可以考虑 CDN。此外,当你的站点从 HTTP/1.x 过渡到 HTTP/2 协议时,CDN 的用处可能不太大;根据需要调查和测试,找到你网站需要的正确方法。 -如果你转向 NGINX Plus 或开源的 NGINX 软件作为架构的一部分,建议你考虑 [技巧 3][14],然后配置 NGINX 缓存静态资源。使用下面的配置,用你 Web 服务器的 URL 替换 www.example.com。 +如果你转向 NGINX Plus 或将开源的 NGINX 软件作为架构的一部分,建议你考虑 [技巧 3][14],然后配置 NGINX 缓存静态资源。使用下面的配置,用你 Web 服务器的 URL 替换 www.example.com。 server { # substitute your web server's URL for www.example.com @@ -86,63 +85,63 @@ LAMP 对于数百个并发用户依然能照常工作。然而,流量突然增 ### 技巧 2. 缓存动态文件 ### -WordPress 是动态生成的网页,这意味着每次请求时它都要生成一个给定的网页(即使和前一次的结果相同)。这意味着用户随时获得的是最新内容。 +WordPress 动态地生成网页,这意味着每次请求时它都要生成一个给定的网页(即使和前一次的结果相同)。这意味着用户随时获得的是最新内容。 想一下,当用户访问一个帖子时,并在文章底部有用户的评论时。你希望用户能够看到所有的评论 - 即使评论刚刚发布。动态内容就是处理这种情况的。 -但现在,当帖子每秒出现十几二十几个请求时。应用服务器可能每秒需要频繁生成页面导致其压力过大,造成延误。为了给用户提供最新的内容,每个访问理论上都是新的请求,因此他们也不得不在首页等待。 +但现在,当帖子每秒出现十几二十几个请求时。应用服务器可能每秒需要频繁生成页面导致其压力过大,造成延误。为了给用户提供最新的内容,每个访问理论上都是新的请求,因此它们不得不在原始出处等待很长时间。 -为了防止页面由于负载过大变得缓慢,需要缓存动态文件。这需要减少文件的动态内容来提高整个系统的响应速度。 +为了防止页面由于不断提升的负载而变得缓慢,需要缓存动态文件。这需要减少文件的动态内容来提高整个系统的响应速度。 -要在 WordPress 中启用缓存中,需要使用一些流行的插件 - 如下所述。WordPress 的缓存插件需要刷新页面,然后将其缓存短暂时间 - 也许只有几秒钟。因此,如果该网站每秒中只有几个请求,那大多数用户获得的页面都是缓存的副本。这也有助于提高所有用户的检索时间: +要在 WordPress 中启用缓存中,需要使用一些流行的插件 - 如下所述。WordPress 的缓存插件会请求最新的页面,然后将其缓存短暂时间 - 也许只有几秒钟。因此,如果该网站每秒中会有几个请求,那大多数用户获得的页面都是缓存的副本。这也有助于提高所有用户的检索时间: - 大多数用户获得页面的缓存副本。应用服务器没有做任何工作。 -- 用户很快会得到一个新的副本。应用服务器只需每隔一段时间刷新页面。当服务器产生一个新的页面(对于第一个用户访问后,缓存页过期),它这样做要快得多,因为它的请求不会超载。 +- 用户会得到一个之前的崭新副本。应用服务器只需每隔一段时间生成一个崭新页面。当服务器产生一个崭新页面(对于缓存过期后的第一个用户访问),它这样做要快得多,因为它的请求并没有超载。 -你可以缓存运行在 LAMP 架构或者 [LEMP 架构][15] 上 WordPress 的动态文件(在 [技巧 3][16] 中说明了)。有几个缓存插件,你可以在 WordPress 中使用。这里有最流行的缓存插件和缓存技术,从最简单到最强大的: +你可以缓存运行在 LAMP 架构或者 [LEMP 架构][15] 上 WordPress 的动态文件(在 [技巧 3][16] 中说明了)。有几个缓存插件,你可以在 WordPress 中使用。运用到了最流行的缓存插件和缓存技术,从最简单到最强大的: -- [Hyper-Cache][17] 和 [Quick-Cache][18] – 这两个插件为每个 WordPress 页面创建单个 PHP 文件。它支持的一些动态函数会绕过多个 WordPress 与数据库的连接核心处理,创建一个更快的用户体验。他们不会绕过所有的 PHP 处理,所以使用以下选项他们不能给出相同的性能提升。他们也不需要修改 NGINX 的配置。 +- [Hyper-Cache][17] 和 [Quick-Cache][18] – 这两个插件为每个 WordPress 页面创建单个 PHP 文件。它支持绕过多个 WordPress 与数据库的连接核心处理的一些动态功能,创建一个更快的用户体验。它们不会绕过所有的 PHP 处理,所以并不会如下面那些取得同样的性能提升。它们也不需要修改 NGINX 的配置。 -- [WP Super Cache][19] – 最流行的 WordPress 缓存插件。它有许多功能,它的界面非常简洁,如下图所示。我们展示了 NGINX 一个简单的配置实例在 [技巧 7][20] 中。 +- [WP Super Cache][19] – 最流行的 WordPress 缓存插件。在它易用的界面易用上提供了许多功能,如下所示。我们在 [技巧 7][20] 中展示了一个简单的 NGINX 配置实例。 -- [W3 Total Cache][21] – 这是第二大最受欢迎的 WordPress 缓存插件。它比 WP Super Cache 的功能更强大,但它有些配置选项比较复杂。一个 NGINX 的简单配置,请看 [技巧 6][22]。 +- [W3 Total Cache][21] – 这是第二流行的 WordPress 缓存插件。它比 WP Super Cache 的功能更强大,但它有些配置选项比较复杂。样例 NGINX 配置,请看 [技巧 6][22]。 -- [FastCGI][23] – CGI 代表通用网关接口,在因特网上发送请求和接收文件。它不是一个插件只是一种能直接使用缓存的方法。FastCGI 可以被用在 Apache 和 Nginx 上,它也是最流行的动态缓存方法;我们在 [技巧 5][24] 中描述了如何配置 NGINX 来使用它。 +- [FastCGI][23] – CGI 的意思是通用网关接口( Common Gateway Interface),在因特网上发送请求和接收文件的一种通用方式。它不是一个插件,而是一种与缓存交互缓存的方法。FastCGI 可以被用在 Apache 和 Nginx 上,它也是最流行的动态缓存方法;我们在 [技巧 5][24] 中描述了如何配置 NGINX 来使用它。 -这些插件的技术文档解释了如何在 LAMP 架构中配置它们。配置选项包括数据库和对象缓存;也包括使用 HTML,CSS 和 JavaScript 来构建 CDN 集成环境。对于 NGINX 的配置,请看列表中的提示技巧。 +这些插件和技术的文档解释了如何在典型的 LAMP 架构中配置它们。配置方式包括数据库和对象缓存;最小化 HTML、CSS 和 JavaScript;集成流行的 CDN 集成环境。对于 NGINX 的配置,请看列表中的提示技巧。 -**注意**:WordPress 不能缓存用户的登录信息,因为它们的 WordPress 页面都是不同的。(对于大多数网站来说,只有一小部分用户可能会登录),大多数缓存不会对刚刚评论过的用户显示缓存页面,只有当用户刷新页面时才会看到他们的评论。若要缓存页面的非个性化内容,如果它对整体性能来说很重要,可以使用一种称为 [fragment caching][25] 的技术。 +**注意**:缓存不会用于已经登录的 WordPress 用户,因为他们的 WordPress 页面都是不同的。(对于大多数网站来说,只有一小部分用户可能会登录)此外,大多数缓存不会对刚刚评论过的用户显示缓存页面,因为当用户刷新页面时希望看到他们的评论。若要缓存页面的非个性化内容,如果它对整体性能来说很重要,可以使用一种称为 [碎片缓存(fragment caching)][25] 的技术。 ### 技巧 3. 使用 NGINX ### -如上所述,当并发用户数超过某一值时 Apache 会导致性能问题 – 可能数百个用户同时使用。Apache 对于每一个连接会消耗大量的资源,因而容易耗尽内存。Apache 可以配置连接数的值来避免耗尽内存,但是这意味着,超过限制时,新的连接请求必须等待。 +如上所述,当并发用户数超过某一数量时 Apache 会导致性能问题 – 可能是数百个用户同时使用。Apache 对于每一个连接会消耗大量的资源,因而容易耗尽内存。Apache 可以配置连接数的值来避免耗尽内存,但是这意味着,超过限制时,新的连接请求必须等待。 -此外,Apache 使用 mod_php 模块将每一个连接加载到内存中,即使只有静态文件(图片,CSS,JavaScript 等)。这使得每个连接消耗更多的资源,从而限制了服务器的性能。 +此外,Apache 为每个连接加载一个 mod_php 模块副本到内存中,即使只有服务于静态文件(图片,CSS,JavaScript 等)。这使得每个连接消耗更多的资源,从而限制了服务器的性能。 -开始解决这些问题吧,从 LAMP 架构迁到 LEMP 架构 – 使用 NGINX 取代 Apache 。NGINX 仅消耗很少量的内存就能处理成千上万的并发连接数,所以你不必经历颠簸,也不必限制并发连接数。 +要解决这些问题,从 LAMP 架构迁到 LEMP 架构 – 使用 NGINX 取代 Apache 。NGINX 在一定的内存之下就能处理成千上万的并发连接数,所以你不必经历颠簸,也不必限制并发连接数到很小的数量。 -NGINX 处理静态文件的性能也较好,它有内置的,简单的 [缓存][26] 控制策略。减少应用服务器的负载,你的网站的访问速度会更快,用户体验更好。 +NGINX 处理静态文件的性能也较好,它有内置的,容易调整的 [缓存][26] 控制策略。减少应用服务器的负载,你的网站的访问速度会更快,用户体验更好。 -你可以在部署的所有 Web 服务器上使用 NGINX,或者你可以把一个 NGINX 服务器作为 Apache 的“前端”来进行反向代理 - NGINX 服务器接收客户端请求,将请求的静态文件直接返回,将 PHP 请求转发到 Apache 上进行处理。 +你可以在部署环境的所有 Web 服务器上使用 NGINX,或者你可以把一个 NGINX 服务器作为 Apache 的“前端”来进行反向代理 - NGINX 服务器接收客户端请求,将请求的静态文件直接返回,将 PHP 请求转发到 Apache 上进行处理。 -对于动态页面的生成 - WordPress 核心体验 - 选择一个缓存工具,如 [技巧 2][27] 中描述的。在下面的技巧中,你可以看到 FastCGI,W3_Total_Cache 和 WP-Super-Cache 在 NGINX 上的配置示例。 (Hyper-Cache 和 Quick-Cache 不需要改变 NGINX 的配置。) +对于动态页面的生成,这是 WordPress 核心体验,可以选择一个缓存工具,如 [技巧 2][27] 中描述的。在下面的技巧中,你可以看到 FastCGI,W3\_Total\_Cache 和 WP-Super-Cache 在 NGINX 上的配置示例。 (Hyper-Cache 和 Quick-Cache 不需要改变 NGINX 的配置。) **技巧** 缓存通常会被保存到磁盘上,但你可以用 [tmpfs][28] 将缓存放在内存中来提高性能。 -为 WordPress 配置 NGINX 很容易。按照这四个步骤,其详细的描述在指定的技巧中: +为 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]。 +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 的链接 ### +### 技巧 4. 让 NGINX 支持永久链接 ### -许多 WordPress 网站依靠 **.htaccess** 文件,此文件依赖 WordPress 的多个功能,包括永久支持,插件和文件缓存。NGINX 不支持 **.htaccess** 文件。幸运的是,你可以使用 NGINX 的简单而全面的配置文件来实现大部分相同的功能。 +许多 WordPress 网站依赖于 **.htaccess** 文件,此文件为 WordPress 的多个功能所需要,包括永久链接支持、插件和文件缓存。NGINX 不支持 **.htaccess** 文件。幸运的是,你可以使用 NGINX 的简单而全面的配置文件来实现大部分相同的功能。 -你可以在使用 NGINX 的 WordPress 中通过在主 [server][36] 块下添加下面的 location 块中启用 [永久链接][35]。(此 location 块在其他代码示例中也会被包括)。 +你可以在你的主 [server][36] 块下添加下面的 location 块中为使用 NGINX 的 WordPress 启用 [永久链接][35]。(此 location 块在其它代码示例中也会被包括)。 -**try_files** 指令告诉 NGINX 检查请求的 URL 在根目录下是作为文件(**$uri**)还是目录(**$uri/**),**/var/www/example.com/htdocs**。如果都不是,NGINX 将重定向到 **/index.php**,通过查询字符串参数判断是否作为参数。 +**try_files** 指令告诉 NGINX 检查请求的 URL 在文档根目录(**/var/www/example.com/htdocs**)下是作为文件(**$uri**)还是目录(**$uri/**) 存在的。如果都不是,NGINX 将重定向到 **/index.php**,并传递查询字符串参数作为参数。 server { server_name example.com www.example.com; @@ -159,17 +158,17 @@ NGINX 处理静态文件的性能也较好,它有内置的,简单的 [缓存 ### 技巧 5. 在 NGINX 中配置 FastCGI ### -NGINX 可以从 FastCGI 应用程序中缓存响应,如 PHP 响应。此方法可提供最佳的性能。 +NGINX 可以缓存来自 FastCGI 应用程序的响应,如 PHP 响应。此方法可提供最佳的性能。 -对于开源的 NGINX,第三方模块 [ngx_cache_purge][37] 提供了缓存清除能力,需要手动编译,配置代码如下所示。NGINX Plus 已经包含了此代码的实现。 +对于开源的 NGINX,编译入第三方模块 [ngx\_cache\_purge][37] 可以提供缓存清除能力,配置代码如下所示。NGINX Plus 已经包含了它自己实现此代码。 -当使用 FastCGI 时,我们建议你安装 [NGINX 辅助插件][38] 并使用下面的配置文件,尤其是要使用 **fastcgi_cache_key** 并且 location 块下要包括 **fastcgi_cache_purge**。当页面被发布或有改变时,甚至有新评论被发布时,该插件会自动清除你的缓存,你也可以从 WordPress 管理控制台手动清除。 +当使用 FastCGI 时,我们建议你安装 [NGINX 辅助插件][38] 并使用下面的配置文件,尤其是要注意 **fastcgi\_cache\_key** 的使用和包括 **fastcgi\_cache\_purge** 的 location 块。当页面发布或有改变时,有新评论被发布时,该插件会自动清除你的缓存,你也可以从 WordPress 管理控制台手动清除。 -NGINX 的辅助插件还可以添加一个简短的 HTML 代码到你网页的底部,确认缓存是否正常并显示一些统计工作。(你也可以使用 [$upstream_cache_status][39] 确认缓存功能是否正常。) +NGINX 的辅助插件还可以在你网页的底部添加一个简短的 HTML 代码,以确认缓存是否正常并显示一些统计数据。(你也可以使用 [$upstream\_cache\_status][39] 确认缓存功能是否正常。) -fastcgi_cache_path /var/run/nginx-cache levels=1:2 + 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"; + fastcgi_cache_key "$scheme$request_method$host$request_uri"; server { server_name example.com www.example.com; @@ -181,7 +180,7 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; set $skip_cache 0; - # POST 请求和查询网址的字符串应该交给 PHP + # POST 请求和带有查询参数的网址应该交给 PHP if ($request_method = POST) { set $skip_cache 1; } @@ -196,7 +195,7 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; 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; @@ -240,13 +239,13 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; } } -### 技巧 6. 为 NGINX 配置 W3_Total_Cache ### +### 技巧 6. 为 NGINX 配置 W3\_Total\_Cache ### -[W3 Total Cache][40], 是 Frederick Townes 的 [W3-Edge][41] 下的, 是一个支持 NGINX 的 WordPress 缓存框架。其有众多选项配置,可以替代 FastCGI 缓存。 +[W3 Total Cache][40], 是 [W3-Edge][41] 的 Frederick Townes 出品的, 是一个支持 NGINX 的 WordPress 缓存框架。其有众多选项配置,可以替代 FastCGI 缓存。 -缓存插件提供了各种缓存配置,还包括数据库和对象的缓存,对 HTML,CSS 和 JavaScript,可选择性的与流行的 CDN 整合。 +这个缓存插件提供了各种缓存配置,还包括数据库和对象的缓存,最小化 HTML、CSS 和 JavaScript,并可选与流行的 CDN 整合。 -使用插件时,需要将其配置信息写入位于你的域的根目录的 NGINX 配置文件中。 +这个插件会通过写入一个位于你的域的根目录的 NGINX 配置文件来控制 NGINX。 server { server_name example.com www.example.com; @@ -271,11 +270,11 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; ### 技巧 7. 为 NGINX 配置 WP Super Cache ### -[WP Super Cache][42] 是由 Donncha O Caoimh 完成的, [Automattic][43] 上的一个 WordPress 开发者, 这是一个 WordPress 缓存引擎,它可以将 WordPress 的动态页面转变成静态 HTML 文件,以使 NGINX 可以很快的提供服务。它是第一个 WordPress 缓存插件,和其他的相比,它更专注于某一特定的领域。 +[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 实现;这部分可以进行定制,来满足你的需求。 +在下面的配置中,带有名为 supercache 的 location 块是 WP Super Cache 特有的部分。 WordPress 规则的其余代码用于不缓存已登录用户的信息,不缓存 POST 请求,并对静态资源设置过期首部,再加上标准的 PHP 处理;这部分可以根据你的需求进行定制。 server { @@ -288,7 +287,7 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; set $cache_uri $request_uri; - # POST 请求和查询网址的字符串应该交给 PHP + # POST 请求和带有查询字符串的网址应该交给 PHP if ($request_method = POST) { set $cache_uri 'null cache'; } @@ -305,13 +304,13 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; 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 + #当请求的文件存在时使用缓存,否则将请求转发给 WordPress location / { try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php; @@ -346,7 +345,7 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; ### 技巧 8. 为 NGINX 配置安全防范措施 ### -为了防止攻击,可以控制对关键资源的访问以及当机器超载时进行登录限制。 +为了防止攻击,可以控制对关键资源的访问并限制机器人对登录功能的过量攻击。 只允许特定的 IP 地址访问 WordPress 的仪表盘。 @@ -365,14 +364,14 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; deny all; } -拒绝其他人访问 WordPress 的配置文件 **wp-config.php**。拒绝其他人访问的另一种方法是将该文件的一个目录移到域的根目录下。 +拒绝其它人访问 WordPress 的配置文件 **wp-config.php**。拒绝其它人访问的另一种方法是将该文件的一个目录移到域的根目录之上的目录。 - # 拒绝其他人访问 wp-config.php + # 拒绝其它人访问 wp-config.php location ~* wp-config.php { deny all; } -对 **wp-login.php** 进行限速来防止暴力攻击。 +对 **wp-login.php** 进行限速来防止暴力破解。 # 拒绝访问 wp-login.php location = /wp-login.php { @@ -383,27 +382,27 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri"; ### 技巧 9. 配置 NGINX 支持 WordPress 多站点 ### -WordPress 多站点,顾名思义,使用同一个版本的 WordPress 从单个实例中允许你管理两个或多个网站。[WordPress.com][44] 运行的就是 WordPress 多站点,其主机为成千上万的用户提供博客服务。 +WordPress 多站点(WordPress Multisite),顾名思义,这个版本 WordPress 可以让你以单个实例管理两个或多个网站。[WordPress.com][44] 运行的就是 WordPress 多站点,其主机为成千上万的用户提供博客服务。 你可以从单个域的任何子目录或从不同的子域来运行独立的网站。 使用此代码块添加对子目录的支持。 - # 在 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 子目录中 + # 避免对子目录中 /blogs.dir/ 结构执行 PHP readfile() location ^~ /blogs.dir { internal; alias /var/www/example.com/htdocs/wp-content/blogs.dir; @@ -414,8 +413,8 @@ WordPress 多站点,顾名思义,使用同一个版本的 WordPress 从单 ============================================================ - # 避免 PHP readfile() 在 /files/structure 子目录中 - location ~ ^(/[^/]+/)?files/(?.+) { + # 避免对子目录中 /files/ 结构执行 PHP readfile() + 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; @@ -424,7 +423,7 @@ WordPress 多站点,顾名思义,使用同一个版本的 WordPress 从单 ============================================================ - # WPMU 文件结构的子域路径 + # 子域路径的WPMU 文件结构 location ~ ^/files/(.*)$ { try_files /wp-includes/ms-files.php?file=$1 =404; access_log off; @@ -434,7 +433,7 @@ WordPress 多站点,顾名思义,使用同一个版本的 WordPress 从单 ============================================================ - # 地图博客 ID 在特定的目录下 + # 映射博客 ID 到特定的目录 map $http_host $blogid { default 0; example.com 1; @@ -444,15 +443,15 @@ WordPress 多站点,顾名思义,使用同一个版本的 WordPress 从单 ### 结论 ### -可扩展性对许多站点的开发者来说是一项挑战,因为这会让他们在 WordPress 站点中取得成功。(对于那些想要跨越 WordPress 性能问题的新站点。)为 WordPress 添加缓存,并将 WordPress 和 NGINX 结合,是不错的答案。 +可扩展性对许多要让他们的 WordPress 站点取得成功的开发者来说是一项挑战。(对于那些想要跨越 WordPress 性能门槛的新站点而言。)为 WordPress 添加缓存,并将 WordPress 和 NGINX 结合,是不错的答案。 -NGINX 不仅对 WordPress 网站是有用的。世界上排名前 1000,10,000和100,000网站中 NGINX 也是作为 [领先的 web 服务器][45] 被使用。 +NGINX 不仅用于 WordPress 网站。世界上排名前 1000、10000 和 100000 网站中 NGINX 也是 [遥遥领先的 web 服务器][45]。 -欲了解更多有关 NGINX 的性能,请看我们最近的博客,[关于 10x 应用程序的 10 个技巧][46]。 +欲了解更多有关 NGINX 的性能,请看我们最近的博客,[让应用性能提升 10 倍的 10 个技巧][46]。 NGINX 软件有两个版本: -- NGINX 开源的软件 - 像 WordPress 一样,此软件你可以自行下载,配置和编译。 +- NGINX 开源软件 - 像 WordPress 一样,此软件你可以自行下载,配置和编译。 - NGINX Plus - NGINX Plus 包括一个预构建的参考版本的软件,以及服务和技术支持。 想要开始,先到 [nginx.org][47] 下载开源软件并了解下 [NGINX Plus][48]。 @@ -463,7 +462,7 @@ via: https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with- 作者:[Floyd Smith][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 85b4b678b98e3b442c5f5d55f4467162911572ce Mon Sep 17 00:00:00 2001 From: Bian Jiaping Date: Tue, 22 Dec 2015 00:08:31 +0800 Subject: [PATCH 0633/1710] Translated 'How to enable Software Collections (SCL) on CentOS' --- ...le Software Collections (SCL) on CentOS.md | 107 ------------------ ...le Software Collections (SCL) on CentOS.md | 106 +++++++++++++++++ 2 files changed, 106 insertions(+), 107 deletions(-) delete mode 100644 sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md create mode 100644 translated/tech/20151215 How to enable Software Collections (SCL) on CentOS.md diff --git a/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md b/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md deleted file mode 100644 index 1d5340a3aa..0000000000 --- a/sources/tech/20151215 How to enable Software Collections (SCL) on CentOS.md +++ /dev/null @@ -1,107 +0,0 @@ -Translating by bianjp - -How to enable Software Collections (SCL) on CentOS -================================================================================ -Red Hat Enterprise Linux (RHEL) and its community fork, CentOS, offer 10-year life cycle, meaning that each version of RHEL/CentOS is updated with security patches for up to 10 years. While such long life cycle guarantees much needed system compatibility and reliability for enterprise users, a downside is that core applications and run-time environments grow antiquated as the underlying RHEL/CentOS version becomes close to end-of-life (EOF). For example, CentOS 6.5, whose EOL is dated to November 30th 2020, comes with python 2.6.6 and MySQL 5.1.73, which are already pretty old by today's standard. - -On the other hand, attempting to manually upgrade development toolchains and run-time environments on RHEL/CentOS may potentially break your system unless all dependencies are resolved correctly. Under normal circumstances, manual upgrade is not recommended unless you know what you are doing. - -The [Software Collections][1] (SCL) repository came into being to help with RHEL/CentOS users in this situation. The SCL is created to provide RHEL/CentOS users with a means to easily and safely install and use multiple (and potentially more recent) versions of applications and run-time environments "without" messing up the existing system. This is in contrast to other third party repositories which could cause conflicts among installed packages. - -The latest SCL offers: - -- Python 3.3 and 2.7 -- PHP 5.4 -- Node.js 0.10 -- Ruby 1.9.3 -- Perl 5.16.3 -- MariaDB and MySQL 5.5 -- Apache httpd 2.4.6 - -In the rest of the tutorial, let me show you how to set up the SCL repository and how to install and enable the packages from the SCL. - -### Set up the Software Collections (SCL) Repository ### - -The SCL is available on CentOS 6.5 and later. To set up the SCL, simply run: - - $ sudo yum install centos-release-SCL - -To enable and run applications from the SCL, you also need to install the following package. - - $ sudo yum install scl-utils-build - -You can browse a complete list of packages available from the SCL repository by running: - - $ yum --disablerepo="*" --enablerepo="scl" list available - -![](https://c2.staticflickr.com/6/5730/23304424250_f5c8a09584_c.jpg) - -### Install and Enable a Package from the SCL ### - -Now that you have set up the SCL, you can go ahead and install any package from the SCL. - -You can search for SCL packages with: - - $ yum --disablerepo="*" --enablerepo="scl" search - -Let's say you want to install python 3.3. - -Go ahead and install it as usual with yum: - - $ sudo yum install python33 - -At any time you can check the list of packages you installed from the SCL by running: - - $ scl --list - ----------- - - python33 - -A nice thing about the SCL is that installing a package from the SCL does NOT overwrite any system files, and is guaranteed to not cause any conflicts with other system libraries and applications. - -For example, if you check the default python version after installing python33, you will see that the default version is still the same: - - $ python --version - ----------- - - Python 2.6.6 - -If you want to try an installed SCL package, you need to explicitly enable it "on a per-command basis" using scl: - - $ scl enable - -For example, to enable python33 package for python command: - - $ scl enable python33 'python --version' - ----------- - - Python 3.3.2 - -If you want to run multiple commands while enabling python33 package, you can actually create an SCL-enabled bash session as follows. - - $ scl enable python33 bash - -Within this bash session, the default python will be switched to 3.3 until you type exit and kill the session. - -![](https://c2.staticflickr.com/6/5642/23491549632_1d08e163cc_c.jpg) - -In short, the SCL is somewhat similar to the virtualenv of Python, but is more general in that you can enable/disable SCL sessions for a far greater number of applications than just Python. - -For more detailed instructions on the SCL, refer to the official [quick start guide][2]. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/enable-software-collections-centos.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://www.softwarecollections.org/ -[2]:https://www.softwarecollections.org/docs/ \ No newline at end of file diff --git a/translated/tech/20151215 How to enable Software Collections (SCL) on CentOS.md b/translated/tech/20151215 How to enable Software Collections (SCL) on CentOS.md new file mode 100644 index 0000000000..8567f69176 --- /dev/null +++ b/translated/tech/20151215 How to enable Software Collections (SCL) on CentOS.md @@ -0,0 +1,106 @@ +如何在CentOS上启用Software Collections(SCL) +================================================================================ + +红帽企业版linux(RHEL)和它的社区版分支——CentOS,提供10年的生命周期,这意味着RHEL/CentOS的每个版本会提供长达10年的安全更新。虽然这么长的生命周期为企业用户提供了更需要的系统兼容性和可靠性,但也存在一个缺点:随着底层的RHEL/CentOS版本接近生命周期的结束,核心应用和运行时环境变得陈旧过时。例如CentOS 6.5,它的生命周期结束时间是2020年11月30日,携带Python 2.6.6和MySQL 5.1.73,以今天的标准来看已经非常古老了。 + +另一方面,在RHEL/CentOS上试图手动升级开发工具链和运行时环境存在潜在的可能使系统崩溃,除非所有依赖都被正确解决。通常情况下,手动升级都是不推荐的,除非你知道你在干什么。 + +[Software Collections][1](SCL)源出现了,以帮助解决RHEL/CentOS下的这种问题。SCL的创建就是为了给RHEL/CentOS用户提供一种方式以方便、安全地安装和使用应用程序和运行时环境的多个(而且可能更新的)版本,同时避免把系统搞乱。与之相对的是第三方源,它们可能会在已安装的包之间引起冲突。 + +最新的SCL提供: + +- Python 3.3 和 2.7 +- PHP 5.4 +- Node.js 0.10 +- Ruby 1.9.3 +- Perl 5.16.3 +- MariaDB 和 MySQL 5.5 +- Apache httpd 2.4.6 + +在这篇教程的剩余部分,我会展示一下如何配置SCL源,以及如何安装和启用SCL中的包。 + +### 配置SCL源 + +SCL可用于CentOS 6.5及更新的版本。要配置SCL源,只需执行: + + $ sudo yum install centos-release-SCL + +要启用和运行SCL中的应用,你还需要安装下列包: + + $ sudo yum install scl-utils-build + +执行下面的命令可以查看SCL中可用包的完整列表: + + $ yum --disablerepo="*" --enablerepo="scl" list available + +![](https://c2.staticflickr.com/6/5730/23304424250_f5c8a09584_c.jpg) + +### 从SCL中安装和启用包 + +既然你已配置好了SCL,你可以继续并从SCL中安装包了。 + +你可以搜索SCL中的包: + + $ yum --disablerepo="*" --enablerepo="scl" search + +我们假设你要安装Python 3.3。 + +继续,就像通常安装包那样使用yum安装: + + $ sudo yum install python33 + +任何时候你都可以查看从SCL中安装的包的列表,只需执行: + + $ scl --list + +---------- + + python33 + +SCL的优点之一是安装其中的包不会覆盖任何系统文件,并且保证了不会引起系统中其它库和应用的冲突。 + +例如,若果在安装python33包后检查默认的python版本,你会发现默认的版本并没有改变: + + $ python --version + +---------- + + Python 2.6.6 + +如果想使用一个已经安装的SCL包,你需要在每个命令中使用scl命令显式启用它(译注:即想在哪条命令中使用SCL中的包,就得通过scl命令执行该命令) + + $ scl enable + +例如,要针对python命令启用python33包: + + $ scl enable python33 'python --version' + +---------- + + Python 3.3.2 + +如果想在启用python33包时执行多条命令,你可以像下面那样创建一个启用SCL的bash会话: + + $ scl enable python33 bash + +在这个bash会话中,默认的python会被切换为3.3版本,直到你输入exit,退出会话。 + +![](https://c2.staticflickr.com/6/5642/23491549632_1d08e163cc_c.jpg) + +简而言之,SCL有几分像Python的虚拟环境,但更通用,因为你可以为远远更多的应用启用/禁用SCL会话,而不仅仅是Python。 + +更详细的SCL指南,参考官方的[快速入门指南][2] + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/enable-software-collections-centos.html + +作者:[Dan Nanni][a] +译者:[bianjp](https://github.com/bianjp) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://www.softwarecollections.org/ +[2]:https://www.softwarecollections.org/docs/ From e3f09ca8433c891d4ad6a27bb8b1ca2e45c34a06 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Tue, 22 Dec 2015 07:33:46 +0800 Subject: [PATCH 0634/1710] [translated]Learn with Linux--Two Geography Apps --- .../Learn with Linux--Two Geography Apps.md | 48 ++++++++----------- 1 file changed, 21 insertions(+), 27 deletions(-) rename {sources => translated}/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md (52%) diff --git a/sources/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md b/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md similarity index 52% rename from sources/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md rename to translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md index 30b5b7854d..38869361c2 100644 --- a/sources/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md +++ b/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md @@ -1,5 +1,4 @@ -bazz2222 -Learn with Linux: Two Geography Apps +Linux 教学之两款地理软件 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-featured.png) @@ -13,86 +12,81 @@ Learn with Linux: Two Geography Apps 引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 -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. +地理是一门有趣的学科,我们每天都能接触到,虽然可能没有意识到,但当你打开 GPS、SatNav 或谷歌地图时,你就已经在使用这些软件提供的地理数据了;当你在新闻中看到一个国家的消息或听到一些金融数据时,这些信息都可以归于地理学范畴。Linux 提供了很多学习地理学的软件,可用于教学,也可用于自学。 ### 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. +在多数 Linux 发行版的软件库中,只有两个与地理有关的软件,两个都属于 KDE 阵营,或者说都属于 KDE 教育项目。Kgeopraphy 使用简单的彩色编码图来绘制被选中的国家。 -To install kegeography just type +Ubuntu 及衍生版在终端执行下面命令安装软件: 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. +Marble 是一个稍微高级一点的软件,无需 3D 加速就能提供全球视角。 ![learn-geography-marble-main](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-main.png) -To get Marble, type +在 Ubuntu 及衍生版的终端输入下面的命令来安装 Marble: 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. +Marble 专注于地图绘制,它的主界面就是一张地图。 ![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, +你可以选择不同的投影方法,比如球状投影和麦卡托投影(LCTT 译注:把地球表面绘制在平面上的方法),在下拉菜单里你可以选择平面视角或外部视角,包括 Atlas 视角,OpenStreetMap 提供的成熟的离线地图, ![learn-geography-marble-map](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-map.jpg) -satellite view (by NASA), +以及卫星视角(由 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 +除了有包含不同界面和大量数据的离线地图,Marble 还提供其他信息。你可以在菜单中打开或关闭不同的离线 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. +和在线的 online services。 ![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. +一个有趣的在线服务是维基百科,点击下 Wiki 图标,会弹出一个界面来展示你选中区域的详细信息。 ![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. +这款软件还提供定位追踪、路由规划、位置搜索和其他有用的功能。如果你喜欢地图学,Marble 可以让你长时间享受探索和学习的乐趣。 -### 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. +Linux 提供大量优秀的教育软件,当然也包括地理学科。本文介绍的两款软件可以帮你学到很多地理知识,并且你可以以一种好玩的人机交互方式来测试你的知识量。 -------------------------------------------------------------------------------- via: https://www.maketecheasier.com/linux-geography-apps/ 作者:[Attila Orosz][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 4ce67549f452eea0a443377571636e937d5901c0 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Tue, 22 Dec 2015 07:36:52 +0800 Subject: [PATCH 0635/1710] [translated]Learn with Linux--Two Geography Apps --- .../Learn with Linux/Learn with Linux--Two Geography Apps.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md b/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md index 38869361c2..8ce6b052af 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md +++ b/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md @@ -16,7 +16,6 @@ Linux 教学之两款地理软件 ### 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. 在多数 Linux 发行版的软件库中,只有两个与地理有关的软件,两个都属于 KDE 阵营,或者说都属于 KDE 教育项目。Kgeopraphy 使用简单的彩色编码图来绘制被选中的国家。 Ubuntu 及衍生版在终端执行下面命令安装软件: From 93f6f7bb9eebe77e4aab0244791b973cd6363c23 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 22 Dec 2015 10:35:59 +0800 Subject: [PATCH 0636/1710] [translating]22 - The history of Android --- .../The history of Android/22 - The history of Android.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/talk/The history of Android/22 - The history of Android.md b/sources/talk/The history of Android/22 - The history of Android.md index 79cf7bd2a5..fab3d8c087 100644 --- a/sources/talk/The history of Android/22 - The history of Android.md +++ b/sources/talk/The history of Android/22 - The history of Android.md @@ -1,8 +1,10 @@ +alim0x translating + The history of Android ================================================================================ ### Android 4.2, Jelly Bean—new Nexus devices, new tablet interface ### -The Android Platform was rapidly maturing, and with Google hosting more and more apps in the Play Store, there was less and less that needed to go out in the OS update. Still, the relentless march of updates must continue, and in November 2012 Android 4.2 was released. 4.2 was still called "Jelly Bean," a nod to the relatively small amount of changes that were present in this release. +The Android Platform was rapidly maturing, and with Google hosting more and more apps in the Play Store, there was less and less that needed to go out in the OS update. Still, the relentless march of updates must continue, and in November 2012 Android 4.2 was released. 4.2 was still called "Jelly Bean," a nod to the relatively small amount of changes that were present in this release. ![The LG-made Nexus 4 and Samsung-made Nexus 10.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/unnamed.jpg) The LG-made Nexus 4 and Samsung-made Nexus 10. @@ -81,4 +83,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [1]:http://arstechnica.com/gadgets/2014/01/hands-on-with-samsungs-notepro-and-tabpro-new-screen-sizes-and-magazine-ui/ [2]:http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From 299bbce59e6f4bc6062fd6aa5df3626af81966a1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 22 Dec 2015 16:31:45 +0800 Subject: [PATCH 0637/1710] =?UTF-8?q?20151222-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20151222 Turn Tor socks to http.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/tech/20151222 Turn Tor socks to http.md diff --git a/sources/tech/20151222 Turn Tor socks to http.md b/sources/tech/20151222 Turn Tor socks to http.md new file mode 100644 index 0000000000..da6eb0ed5a --- /dev/null +++ b/sources/tech/20151222 Turn Tor socks to http.md @@ -0,0 +1,86 @@ +Turn Tor socks to http +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/12/tor-593x445.jpg) + +For using Tor service you can use diffrent tools like Tor browser, Foxyproxy and other things, some download managers such as Wget or Aria2 can’t get Tor socks directly and start downloading anonymously with that so we need some tools to change Tor socks to http and then download with that. + +**Note** : This tutorial is under Debian distrobutions and in other distrobutions may be diffrent so if your distro is Debian base and you have configured Tor correctly go a head ! + +**Polipo** : This service uses 8123 Port and 127.0.0.1 IP, use following command to install Polipo on your computer : + + sudo apt install polipo + +Now use this command to go in Polipo config file: + + sudo nano /etc/polipo/config + +Add the following lines to the end of the file : + + proxyAddress = "::0" + allowedClients = 192.168.1.0/24 + socksParentProxy = "localhost:9050" + socksProxyType = socks5 + +Restart the Polipo service with this command : + + sudo service polipo restart + +Now Polipo is ready ! do what ever you like in anonymous world ! as example of how using it : + + pdmt -l "link" -i 127.0.01 -p 8123 + +With command above, PDMT ( Persian Download Manager Terminal ) will download your file anonymously. + +**Proxychains** : In this service you can set Tor or Lantern proxy to turn socks too but in usage it’s a little diffrent with Polipo and Privoxy because you don’t need to use any port ! for installing that use following command : + + sudo apt install proxychains + +Open config file with this command : + + sudo nano /etc/proxychains.conf + +Now add the following code to the end of text, this code is Tor port and Ip : + + socks5 127.0.0.1 9050 + +If you put “proxychains” word before a command in terminal and run it, it would run by Tor proxy : + + proxychains firefoxt + proxychains aria2c + proxychains wget + +**Privoxy** : Privoxy uses 8118 port and it’s easy to run first install privoxy package : + + sudo apt install privoxy + +We should change the config file now : + + sudo nano /etc/pivoxy/config + +Add the following lines to end of the file : + + forward-socks5 / 127.0.0.1:9050 . + forward-socks4a / 127.0.0.1:9050 . + forward-socks5t / 127.0.0.1:9050 . + forward 192.168.*.*/ . + forward 10.*.*.*/ . + forward 127.*.*.*/ . + forward localhost/ . + +Restart the service : + + sudo service privoxy restart + +Service is ready ! port is 8118 and Ip is 127.0.0.1 use it and enjoy from it ! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/turn-tor-socks-http/ + +作者:[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://www.unixmen.com/author/hossein/ \ No newline at end of file From d76e3d2eabd459ab1a0ca42f17f9df6ed32ef579 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 22 Dec 2015 17:12:41 +0800 Subject: [PATCH 0638/1710] Translating by ZTinoZ --- ...all Bugzilla with Apache and SSL on FreeBSD 10.2.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index 11c35382b7..87aa5e1ef8 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -77,21 +77,21 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz ### 第三步 - 安装并配置MySQL数据库 ### -We will use mysql51 for the database back-end, and it is support for perl module for mysql. Install mysql51 with pkg command below : +我们要用mysql 5.1来作为后端数据库并且支持perl模块。用pkg命令安装mysql 5.1: pkg install p5-DBD-mysql51 mysql51-server mysql51-client -Now we must add mysql to the boot time, and then start and configure the root password for mysql. +现在我们要在启动时添加mysql服务并启动,然后为mysql配置root密码。 -Run command below to do it all : +运行以下命令来完成所有操作: sysrc mysql_enable=yes service mysql-server start mysqladmin -u root password aqwe123 -Note : +注意: -mysql password : aqwe123 +这里mysql密码为:aqwe123 ![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png) From 12ad2f30b74db6974af21fb21042bfc4145cfa96 Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Tue, 22 Dec 2015 18:08:13 +0800 Subject: [PATCH 0639/1710] Delete 20150824 Great Open Source Collaborative Editing Tools.md --- ...Open Source Collaborative Editing Tools.md | 229 ------------------ 1 file changed, 229 deletions(-) delete mode 100644 sources/share/20150824 Great Open Source Collaborative Editing Tools.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 deleted file mode 100644 index 8f3e2853cb..0000000000 --- a/sources/share/20150824 Great Open Source Collaborative Editing Tools.md +++ /dev/null @@ -1,229 +0,0 @@ -Translating by H-mudcup -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 From 47dd0f91668094243243227397a05516a2fee812 Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Tue, 22 Dec 2015 18:11:11 +0800 Subject: [PATCH 0640/1710] Create 20150824 Great Open Source Collaborative Editing Tools.md --- ...Open Source Collaborative Editing Tools.md | 228 ++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 translated/share/20150824 Great Open Source Collaborative Editing Tools.md diff --git a/translated/share/20150824 Great Open Source Collaborative Editing Tools.md b/translated/share/20150824 Great Open Source Collaborative Editing Tools.md new file mode 100644 index 0000000000..bc0a841477 --- /dev/null +++ b/translated/share/20150824 Great Open Source Collaborative Editing Tools.md @@ -0,0 +1,228 @@ +优秀的开源合作编辑工具 +================================================================================ +一句话,合作编著就是多个人进行编著。合作有好处也有风险。好处包括更加全面/协调的方式,更好的利用现有资源和一个更加有力的、团结的声音。对于我来说,最大的好处是极大的透明度。那是当我需要采纳同事的观点。同事之间来来回回地传文件效率非常低,导致不必要的延误还让人(比如,我)对整个合作这件事都感到不满意。有个好的合作软件,我就能实时地或异步地分享笔记,数据和文件,并用评论来分享自己的想法。这样在文档、图片、视频、演示文稿上合作就不会那么的琐碎而无聊。 + +有很多种方式能在线进行合作,简直不能更简便了。这篇文章表明了我最喜欢的开源实时文档合作编辑工具。 + +Google Docs 是个非常好的高效应用,有着大部分我所需要的功能。它可以作为一个实时地合作编辑文档的工具提供服务。文档可以被分享、打开并被多位用户同时编辑,用户还能看见其他合作者一个字母一个字母的编辑过程。虽然 Google Docs 对个人是免费的,但并不开源。 + +下面是我带来的最棒的开源合作编辑器,它们能帮你不被打扰的集中精力进行写作,而且是和其他人协同完成。 + +---------- + +### Hackpad ### + +![Hackpad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Hackpad.png) + +Hackpad 是个开源的基于网页的实时 wiki,基于开源 EtherPad 合作文档编辑器。 + +Hackpad 允许用户实时分享你的文档,它还用彩色编码显示各个作者分别贡献了哪部分。它还允许插入图片、清单,由于提供了语法高亮功能,它还能用来写代码。 + +当2014年4月 Dropbox 获得了 Hackpad 后,这款软件就以开源的形式在本月发行。让我们经历的等待非常值得。 + +特性: + +- 有类似 wiki 所提供的,一套非常完善的功能 +- 实时或者异步地记合作笔记,共享数据和文件,或用评论分享你们的想法 +- 细致的隐私许可让你可以邀请单个朋友,一个十几人的团队或者上千的 Twitter 粉丝 +- 智能执行 +- 直接从流行的视频分享网站上插入视频 +- 表格 +- 可对使用广泛的包括 C, C#, CSS, CoffeeScript, Java, 以及 HTML 在内的编程语言进行语法高亮 + +- 网站:[hackpad.com][1] +- 源代码:[github.com/dropbox/hackpad][2] +- 开发者:[Contributors][3] +- 许可:Apache License, Version 2.0 +- 版本号: - + +---------- + +### Etherpad ### + +![Etherpad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Etherpad.png) + +Etherpad 是个基于网页的开源实时合作编辑器,允许多个作者同时编辑一个文本文档,写评论,并与其他作者用群聊方式进行交流。 + +Etherpad 是用 JavaScript 运行的,在 AppJet 平台的顶端,通过 Comet 流实现实时的功能。 + +特性: + +- 尽心设计的斯巴达界面 +- 简单的格式化文本功能 +- “滑动时间轴”——浏览一个工程历史版本 +- 可以下载纯文本、 PDF、微软的 Word 文档、Open Document 和 HTML 格式的文档 +- 每隔一段很短的时间就会自动保存 +- 可个性化程度高 +- 有客户端插件可以扩展编辑的功能 +- 几百个支持 Etherpad 的扩展包括支持 email 提醒,pad 管理,授权 +- 可访问性开启 +- 可从 Node 里或通过 CLI(命令行界面)和 Pad 目录实时交互 + +- 网站: [etherpad.org][4] +- 源代码:[github.com/ether/etherpad-lite][5] +- 开发者:David Greenspan, Aaron Iba, J.D. Zamfiresc, Daniel Clemens, David Cole +- 许可:Apache License, Version 2.0 +- 版本号: 1.5.7 + +---------- + +### Firepad ### + +![Firepad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Firepad.png) + +Firepad 是个开源的合作文本编辑器。它的设计目的是被嵌入到更大的网页应用中对几天内新加入的代码进行批注。 + +Firepad 是个全功能的文本编辑器,有解决冲突,光标同步,用户属性,用户在线状态检测功能。它使用 Firebase 作为后台,而且不需要任何服务器端的代码。他可以被加入到任何网页应用中。Firepad 可以使用 CodeMirror 编辑器或者 Ace 编辑器提交文本,它的操作转换代码是从 ot.js 上借鉴的。 + +如果你想要通过添加简单的文档和代码编辑器来扩展你的网页应用能力,Firepad 最适合不过了。 + +Firepad 已被多个编辑器使用,包括Atlassian Stash Realtime Editor、Nitrous.IO、LiveMinutes 和 Koding。 + +特性: + +- 纯正的合作编辑 +- 基于 OT 的智能合并及解决冲突 +- 支持多种格式的文本和代码的编辑 +- 光标位置同步 +- 撤销/重做 +- 文本高亮 +- 用户属性 +- 在线检测 +- 版本检查点 +- 图片 +- 通过它的 API 拓展 Firepad +- 支持所有现代浏览器:Chrome、Safari、Opera 11+、IE8+、Firefox 3.6+ + +- 网站: [www.firepad.io][6] +- 源代码:[github.com/firebase/firepad][7] +- 开发者:Michael Lehenbauer and the team at Firebase +- 许可:MIT +- 版本号:1.1.1 + +---------- + +### OwnCloud Documents ### + +![ownCloud Documents in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-ownCloud.png) + +ownCloud Documents 是个可以单独并/或合作进行办公室文档编辑 ownCloud 应用。它允许最多5个人同时在网页浏览器上合作进行编辑 .odt 和 .doc 文件。 + +ownCloud 是个自托管文件同步和分享服务器。他通过网页界面,同步客户端或 WebDAV 提供你数据的使用权,同时提供一个容易在设备间进行浏览、同步和分享的平台。 + +特性: + +- 合作编辑,多个用户同时进行文件编辑 +- 在 ownCloud 里创建文档 +- 上传文档 +- 在浏览器里分享和编辑文件,然后在 ownCloud 内部或通过公共链接进行分享这些文件 +- 有类似 ownCloud 的功能,如版本管理、本地同步、加密、恢复被删文件 +- 通过透明转换文件格式的方式无缝支持微软 Word 文档 + +- 网站:[owncloud.org][8] +- 源代码: [github.com/owncloud/documents][9] +- 开发者:OwnCloud Inc. +- 许可:AGPLv3 +- 版本号:8.1.1 + +---------- + +### Gobby ### + +![Gobby in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Gobby.png) + +Gobby 是个支持在一个会话内进行多个用户聊天并打开多个文档的合作编辑器。所有的用户都能同时在文件上进行工作,无需锁定。不同用户编写的部分用不同颜色高亮显示,它还支持多个编程和标记语言的语法高亮。 + +Gobby 允许多个用户在互联网上实时共同编辑同一个文档。他很好的整合了 GNOME 环境。它拥有一个客户端-服务端结构,这让它能支持一个会话开多个文档,文档同步请求,密码保护和 IRC 式的聊天方式可以在多个频道进行交流。用户可以选择一个颜色对他们在文档中编写的文本进行高亮。 + +还供有一个叫做 infinoted 的专用服务器。 + +特性: + +- 成熟的文本编辑能力包括使用 GtkSourceView 的语法高亮功能 +- 实时、无需锁定、通过加密(包括PFS)连接的合作文本编辑 +- 整合了群聊 +- 本地组撤销:撤销不会影响远程用户的修改 +- 显示远程用户的光标和选择区域 +- 用不同颜色高亮不同用户编写的文本 +- 适用于大多数编程语言的语法高亮,自动缩进,可配置 tab 宽度 +- 零冲突 +- 加密数据传输包括完美的正向加密(PFS) +- 会话可被密码保护 +- 通过 Access Control Lists (ACLs) 进行精密的权限保护 +- 高度个性化的专用服务器 +- 自动保存文档 +- 先进的查找和替换功能 +- 国际化 +- 完整的 Unicode 支持 + +- 网站:[gobby.github.io][10] +- 源代码: [github.com/gobby][11] +- 开发者: Armin Burgmeier, Philipp Kern and contributors +- 许可: GNU GPLv2+ and ISC +- 版本号:0.5.0 + +---------- + +### OnlyOffice ### + +![OnlyOffice in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-OnlyOffice.png) + +ONLYOFFICE(从前叫 Teamlab Office)是个多功能云端在线办公套件,整合了 CRM(客户关系管理)系统、文档和项目管理工具箱、甘特图以及邮件整合器 + +它能让你整理商业任务和时间表,保存并分享你的合作或个人文档,使用网络社交工具如博客和论坛,还可以和你的队员通过团队的即时聊天工具进行交流。 + +能在同一个地方管理文档、项目、团队和顾客关系。OnlyOffice 结合了文本,电子表格和电子幻灯片编辑器,他们的功能跟微软桌面应用(Word、Excel 和 PowerPoint)的功能相同。但是他允许实时进行合作编辑、评论和聊天。 + +OnlyOffice 是用 ASP.NET 编写的,基于 HTML5 Canvas 元素,并且被翻译成21种语言。 + +特性: + +- 当在大文档里工作、翻页和缩放时,它能与桌面应用一样强大 +- 文档可以在浏览/编辑模式下分享 +- 文档嵌入 +- 电子表格和电子幻灯片编辑器 +- 合作编辑 +- 评论 +- 群聊 +- 移动应用 +- 甘特图 +- 时间管理 +- 权限管理 +- Invoicing 系统 +- 日历 +- 整合了文件保存系统:Google Drive、Box、OneDrive、Dropbox、OwnCloud +- 整合了 CRM、电子邮件整合器和工程管理模块 +- 邮件服务器 +- 邮件整合器 +- 可以编辑流行格式的文档、电子表格和电子幻灯片:DOC、DOCX、ODT、RTF、TXT、XLS、XLSX、ODS、CSV、PPTX、PPT、ODP + +- 网站:[www.onlyoffice.com][12] +- 源代码:[github.com/ONLYOFFICE/DocumentServer][13] +- 开发者:Ascensio System SIA +- 许可:GNU GPL v3 +- 版本号:7.7 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150823085112605/CollaborativeEditing.html + +作者:Frazer Kline +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者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 From 874f7a9f6acb14f072c29942e9e6f10b38298b97 Mon Sep 17 00:00:00 2001 From: Feng Wei Date: Tue, 22 Dec 2015 20:50:02 +0800 Subject: [PATCH 0641/1710] Update 20151104 Optimize Web Delivery with these Open Source Tools.md --- ...51104 Optimize Web Delivery with these Open Source Tools.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index aaf8a7292d..3d1137f5bf 100644 --- 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 @@ -1,3 +1,4 @@ +translating by fw8899 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. @@ -192,4 +193,4 @@ via: http://www.linuxlinks.com/article/20151101020309690/WebDelivery.html [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 +[5]:https://banu.com/tinyproxy/ From acc710338f47a470d172d579e9454a43700248f3 Mon Sep 17 00:00:00 2001 From: GHLandy Date: Tue, 22 Dec 2015 21:52:48 +0800 Subject: [PATCH 0642/1710] [Translating] Part 2 - LFCS: How to Install and Use vi/vim as a Full Text Editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 认领翻译 --- ...-How to Install and Use vi or vim as a Full Text Editor.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 7fe8073a77..23e1b30f57 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 @@ +GHLandy Translating + 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. @@ -384,4 +386,4 @@ via: http://www.tecmint.com/vi-editor-usage/ [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 +[3]:https://identity.linuxfoundation.org/user?destination=pid/1 From f2fdb7203d562fa7db451dc889932737d0e6bfa1 Mon Sep 17 00:00:00 2001 From: sonofelice Date: Tue, 22 Dec 2015 22:48:36 +0800 Subject: [PATCH 0643/1710] translating --- ...uration File Directives Uncommented Lines of a Config File.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md index d7d520326e..27bf39c2b3 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md +++ b/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md @@ -1,3 +1,4 @@ +translating by sonofelice Linux / UNIX View Only Configuration File Directives ( Uncommented Lines of a Config File ) ================================================================================ Most Linux and UNIX-like system configuration files are documented using comments, but some time I just need to see line of configuration text in a config file. How can I view just the uncommented configuration file directives from squid.conf or httpd.conf file? How can I strip out comments and blank lines on a Linux or Unix-like systems? From c9f4791155b8d093bee8466abd0b2f84dd55da08 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 22 Dec 2015 23:36:32 +0800 Subject: [PATCH 0644/1710] PUB:20151215 How to enable Software Collections (SCL) on CentOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bianjp 翻译的不错!明早就发布出来了,请关注: https://linux.cn/ --- ...le Software Collections (SCL) on CentOS.md | 100 +++++++++++++++++ ...le Software Collections (SCL) on CentOS.md | 106 ------------------ 2 files changed, 100 insertions(+), 106 deletions(-) create mode 100644 published/20151215 How to enable Software Collections (SCL) on CentOS.md delete mode 100644 translated/tech/20151215 How to enable Software Collections (SCL) on CentOS.md diff --git a/published/20151215 How to enable Software Collections (SCL) on CentOS.md b/published/20151215 How to enable Software Collections (SCL) on CentOS.md new file mode 100644 index 0000000000..2c0b835026 --- /dev/null +++ b/published/20151215 How to enable Software Collections (SCL) on CentOS.md @@ -0,0 +1,100 @@ +如何在 CentOS 上启用 软件集 Software Collections(SCL) +================================================================================ + +红帽企业版 linux(RHEL)和它的社区版分支——CentOS,提供10年的生命周期,这意味着 RHEL/CentOS 的每个版本会提供长达10年的安全更新。虽然这么长的生命周期为企业用户提供了迫切需要的系统兼容性和可靠性,但也存在一个缺点:随着底层的 RHEL/CentOS 版本接近生命周期的结束,核心应用和运行时环境变得陈旧过时。例如 CentOS 6.5,它的生命周期结束时间是2020年11月30日,其所携带的 Python 2.6.6和 MySQL 5.1.73,以今天的标准来看已经非常古老了。 + +另一方面,在 RHEL/CentOS 上试图手动升级开发工具链和运行时环境存在使系统崩溃的潜在可能,除非所有依赖都被正确解决。通常情况下,手动升级都是不推荐的,除非你知道你在干什么。 + +[软件集(Software Collections)][1](SCL)源出现了,以帮助解决 RHEL/CentOS 下的这种问题。SCL 的创建就是为了给 RHEL/CentOS 用户提供一种以方便、安全地安装和使用应用程序和运行时环境的多个(而且可能是更新的)版本的方式,同时避免把系统搞乱。与之相对的是第三方源,它们可能会在已安装的包之间引起冲突。 + +最新的 SCL 提供了: + +- Python 3.3 和 2.7 +- PHP 5.4 +- Node.js 0.10 +- Ruby 1.9.3 +- Perl 5.16.3 +- MariaDB 和 MySQL 5.5 +- Apache httpd 2.4.6 + +在这篇教程的剩余部分,我会展示一下如何配置 SCL 源,以及如何安装和启用 SCL 中的包。 + +### 配置 SCL 源 + +SCL 可用于 CentOS 6.5 及更新的版本。要配置 SCL 源,只需执行: + + $ sudo yum install centos-release-SCL + +要启用和运行 SCL 中的应用,你还需要安装下列包: + + $ sudo yum install scl-utils-build + +执行下面的命令可以查看 SCL 中可用包的完整列表: + + $ yum --disablerepo="*" --enablerepo="scl" list available + +![](https://c2.staticflickr.com/6/5730/23304424250_f5c8a09584_c.jpg) + +### 从 SCL 中安装和启用包 + +既然你已配置好了 SCL,你可以继续并从 SCL 中安装包了。 + +你可以搜索 SCL 中的包: + + $ yum --disablerepo="*" --enablerepo="scl" search + +我们假设你要安装 Python 3.3。 + +继续,就像通常安装包那样使用 yum 安装: + + $ sudo yum install python33 + +任何时候你都可以查看从 SCL 中安装的包的列表,只需执行: + + $ scl --list + + python33 + +SCL 的优点之一是安装其中的包不会覆盖任何系统文件,并且保证不会引起与系统中其它库和应用的冲突。 + +例如,如果在安装 python33 包后检查默认的 python 版本,你会发现默认的版本并没有改变: + + $ python --version + + Python 2.6.6 + +如果想使用一个已经安装的 SCL 包,你需要在每个命令中使用 `scl` 命令显式启用它(LCTT 译注:即想在哪条命令中使用 SCL 中的包,就得通过`scl`命令执行该命令) + + $ scl enable + +例如,要针对`python`命令启用 python33 包: + + $ scl enable python33 'python --version' + + Python 3.3.2 + +如果想在启用 python33 包时执行多条命令,你可以像下面那样创建一个启用 SCL 的 bash 会话: + + $ scl enable python33 bash + +在这个 bash 会话中,默认的 python 会被切换为3.3版本,直到你输入`exit`,退出会话。 + +![](https://c2.staticflickr.com/6/5642/23491549632_1d08e163cc_c.jpg) + +简而言之,SCL 有几分像 Python 的虚拟环境,但更通用,因为你可以为远比 Python 更多的应用启用/禁用 SCL 会话。 + +更详细的 SCL 指南,参考官方的[快速入门指南][2] + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/enable-software-collections-centos.html + +作者:[Dan Nanni][a] +译者:[bianjp](https://github.com/bianjp) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://www.softwarecollections.org/ +[2]:https://www.softwarecollections.org/docs/ diff --git a/translated/tech/20151215 How to enable Software Collections (SCL) on CentOS.md b/translated/tech/20151215 How to enable Software Collections (SCL) on CentOS.md deleted file mode 100644 index 8567f69176..0000000000 --- a/translated/tech/20151215 How to enable Software Collections (SCL) on CentOS.md +++ /dev/null @@ -1,106 +0,0 @@ -如何在CentOS上启用Software Collections(SCL) -================================================================================ - -红帽企业版linux(RHEL)和它的社区版分支——CentOS,提供10年的生命周期,这意味着RHEL/CentOS的每个版本会提供长达10年的安全更新。虽然这么长的生命周期为企业用户提供了更需要的系统兼容性和可靠性,但也存在一个缺点:随着底层的RHEL/CentOS版本接近生命周期的结束,核心应用和运行时环境变得陈旧过时。例如CentOS 6.5,它的生命周期结束时间是2020年11月30日,携带Python 2.6.6和MySQL 5.1.73,以今天的标准来看已经非常古老了。 - -另一方面,在RHEL/CentOS上试图手动升级开发工具链和运行时环境存在潜在的可能使系统崩溃,除非所有依赖都被正确解决。通常情况下,手动升级都是不推荐的,除非你知道你在干什么。 - -[Software Collections][1](SCL)源出现了,以帮助解决RHEL/CentOS下的这种问题。SCL的创建就是为了给RHEL/CentOS用户提供一种方式以方便、安全地安装和使用应用程序和运行时环境的多个(而且可能更新的)版本,同时避免把系统搞乱。与之相对的是第三方源,它们可能会在已安装的包之间引起冲突。 - -最新的SCL提供: - -- Python 3.3 和 2.7 -- PHP 5.4 -- Node.js 0.10 -- Ruby 1.9.3 -- Perl 5.16.3 -- MariaDB 和 MySQL 5.5 -- Apache httpd 2.4.6 - -在这篇教程的剩余部分,我会展示一下如何配置SCL源,以及如何安装和启用SCL中的包。 - -### 配置SCL源 - -SCL可用于CentOS 6.5及更新的版本。要配置SCL源,只需执行: - - $ sudo yum install centos-release-SCL - -要启用和运行SCL中的应用,你还需要安装下列包: - - $ sudo yum install scl-utils-build - -执行下面的命令可以查看SCL中可用包的完整列表: - - $ yum --disablerepo="*" --enablerepo="scl" list available - -![](https://c2.staticflickr.com/6/5730/23304424250_f5c8a09584_c.jpg) - -### 从SCL中安装和启用包 - -既然你已配置好了SCL,你可以继续并从SCL中安装包了。 - -你可以搜索SCL中的包: - - $ yum --disablerepo="*" --enablerepo="scl" search - -我们假设你要安装Python 3.3。 - -继续,就像通常安装包那样使用yum安装: - - $ sudo yum install python33 - -任何时候你都可以查看从SCL中安装的包的列表,只需执行: - - $ scl --list - ----------- - - python33 - -SCL的优点之一是安装其中的包不会覆盖任何系统文件,并且保证了不会引起系统中其它库和应用的冲突。 - -例如,若果在安装python33包后检查默认的python版本,你会发现默认的版本并没有改变: - - $ python --version - ----------- - - Python 2.6.6 - -如果想使用一个已经安装的SCL包,你需要在每个命令中使用scl命令显式启用它(译注:即想在哪条命令中使用SCL中的包,就得通过scl命令执行该命令) - - $ scl enable - -例如,要针对python命令启用python33包: - - $ scl enable python33 'python --version' - ----------- - - Python 3.3.2 - -如果想在启用python33包时执行多条命令,你可以像下面那样创建一个启用SCL的bash会话: - - $ scl enable python33 bash - -在这个bash会话中,默认的python会被切换为3.3版本,直到你输入exit,退出会话。 - -![](https://c2.staticflickr.com/6/5642/23491549632_1d08e163cc_c.jpg) - -简而言之,SCL有几分像Python的虚拟环境,但更通用,因为你可以为远远更多的应用启用/禁用SCL会话,而不仅仅是Python。 - -更详细的SCL指南,参考官方的[快速入门指南][2] - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/enable-software-collections-centos.html - -作者:[Dan Nanni][a] -译者:[bianjp](https://github.com/bianjp) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:https://www.softwarecollections.org/ -[2]:https://www.softwarecollections.org/docs/ From 8ea4240d03f9e140239746c5343011fd3c5e3753 Mon Sep 17 00:00:00 2001 From: sonofelice Date: Tue, 22 Dec 2015 23:46:14 +0800 Subject: [PATCH 0645/1710] =?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 翻译完成 --- ...ives Uncommented Lines of a Config File.md | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) rename {sources => translated}/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md (68%) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md similarity index 68% rename from sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md rename to translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md index 27bf39c2b3..9de5e1d64d 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md +++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md @@ -1,18 +1,19 @@ -translating by sonofelice -Linux / UNIX View Only Configuration File Directives ( Uncommented Lines of a Config File ) -================================================================================ -Most Linux and UNIX-like system configuration files are documented using comments, but some time I just need to see line of configuration text in a config file. How can I view just the uncommented configuration file directives from squid.conf or httpd.conf file? How can I strip out comments and blank lines on a Linux or Unix-like systems? +Linux / UNIX 下只查看配置文件的有效配置行(配置文件中未被注释的命令行) +========================================================= -To view just the uncommented lines of text in a config file use the grep, sed, awk, perl or any other text processing utility provided by UNIX / BSD / OS X / Linux operating systems. +大多数的Linux和类Unix系统的配置文件中都有许多的注释行,但是有时候我只想看其中的有效配置行。那我怎么才能只看到quid.conf或httpd.conf这样的配置文件中的非注释命令行呢?怎么去掉这些注释或者空行呢? -### grep command example to strip out command ### +我们可以使用UNIX / BSD / OS X / Linux 这些操作系统自身提供的grep,sed,awk,perl或者其他文本处理工具来查看配置文件中的有效配置命令行。 -You can use the gerp command as follows: + +### grep 命令示例——去掉注释 ### + +可以按照如下示例使用grep命令: $ grep -v "^#" /path/to/config/file $ grep -v "^#" /etc/apache2/apache2.conf -Sample outputs: +示例输出: ServerRoot "/etc/apache2" @@ -99,7 +100,7 @@ Sample outputs: Include /etc/apache2/sites-enabled/ -To suppress blank lines use [egrep command][1], run: +想要跳过空行,可以使用 [egrep 命令][1], 示例: egrep -v "^#|^$" /etc/apache2/apache2.conf ## or pass it to the page such as more or less ## @@ -114,35 +115,34 @@ To suppress blank lines use [egrep command][1], run: [ -f "$1" ] && command egrep -v "^#|^$" "$f" || echo "Error $1 file not found." } -Sample output: +示例输出: ![Fig.01: Unix/Linux Egrep Strip Out Comments Blank Lines](http://s0.cyberciti.org/uploads/faq/2008/05/grep-strip-out-comments-blank-lines.jpg) -Fig.01: Unix/Linux Egrep Strip Out Comments Blank Lines +Fig.01: Unix/Linux Egrep 除去注释行和空行 -### Understanding grep/egrep command line options ### +### 理解 grep/egrep 命令行选项 ### -The -v option invert the sense of matching, to select non-matching lines. This option should work under all posix based systems. The regex ^$ matches and removes all blank lines and ^# matches and removes all comments that starts with a "#". +-v 选项,选择出不匹配的命令行。该选项适用于所有基于posix的系统。正则表达式 ^$ 匹配出所有的非空行, ^#匹配出所有的不以“#”开头的非注释行。 -### sed Command example ### +### sed 命令示例 ### -GNU / sed command can be used as follows: +可以按照如下示例使用 GNU / sed 命令: $ sed '/ *#/d; /^ *$/d' /path/to/file $ sed '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf - -GNU or BSD sed can update your config file too. The syntax is as follows to edit files in-place, saving backups with the specified extension such as .bak: +GNU or BSD sed 也可以修改配置文件。下面的语法是编辑文件,修改扩展名(比如 .bak)进行文件备份: sed -i'.bak.2015.12.27' '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf -For more info see man pages - [grep(1)][2], [sed(1)][3] +更多信息见参考手册 - [grep(1)][2], [sed(1)][3] -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/faq/shell-display-uncommented-lines-only/ 作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) +译者:[sonofelice](https://github.com/sonofelice) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c148c7a8d9407f137320153b45615a4bf392512b Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 23 Dec 2015 08:19:50 +0800 Subject: [PATCH 0646/1710] [translating]Review EXT4 vs. Btrfs vs. XFS --- sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md index d370b87822..f6e40d4286 100644 --- a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md +++ b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -1,3 +1,4 @@ +bazz2222222222222222222222222222222222222222222 Review EXT4 vs. Btrfs vs. XFS ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) From b05214d1b383900dae93026b156f52c29e14ac14 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 23 Dec 2015 08:37:36 +0800 Subject: [PATCH 0647/1710] PUB:20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu @geekpi --- ... The Latest Arduino IDE 1.6.6 in Ubuntu.md | 73 +++++++++++++++++ ... The Latest Arduino IDE 1.6.6 in Ubuntu.md | 78 ------------------- 2 files changed, 73 insertions(+), 78 deletions(-) create mode 100644 published/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md delete mode 100644 translated/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md diff --git a/published/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md b/published/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md new file mode 100644 index 0000000000..27160257ad --- /dev/null +++ b/published/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md @@ -0,0 +1,73 @@ +如何在 Ubuntu 中安装最新的 Arduino IDE 1.6.6 +================================================================================ +![Install latest Arduino in Ubuntu](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-icon.png) + +> 本篇教程会教你如何在当前的 Ubuntu 发行版中安装最新的 Arduino IDE 1.6.6。 + +开源的 Arduino IDE 发布了1.6.6,并带来了很多的改变。新的发布已经切换到 Java 8,它与 IDE 绑定并且用于编译所需。具体见 [发布说明][1]。 + +![Arduino 1.6.6 in Ubuntu 15.10](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-ubuntu.jpg) + +对于那些不想使用软件中心的 1.0.5 旧版本的人而言,你可以使用下面的步骤在所有的 Ubuntu 发行版中安装 Arduino。 + +> **请用正确版本号替换软件包的版本号** + +**1、** 从下面的官方链接下载最新的包 **Linux 32-bit 或者 Linux 64-bit**。 + +- [https://www.arduino.cc/en/Main/Software][2] + +如果不知道你系统的类型?进入系统设置->详细->概览。 + +**2、** 从Unity Dash、App Launcher 或者使用 Ctrl+Alt+T 打开终端。打开后,一个个运行下面的命令: + +进入下载文件夹: + + cd ~/Downloads + +![navigate-downloads](http://ubuntuhandbook.org/wp-content/uploads/2015/11/navigate-downloads.jpg) + +使用 tar 命令解压: + + tar -xvf arduino-1.6.6-*.tar.xz + +![extract-archive](http://ubuntuhandbook.org/wp-content/uploads/2015/11/extract-archive.jpg) + +将解压后的文件移动到**/opt/**下: + + sudo mv arduino-1.6.6 /opt + +![move-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/11/move-opt.jpg) + +**3、** 现在 IDE 已经与最新的 Java 绑定使用了。但是最好为程序设置一个桌面图标/启动方式: + +进入安装目录: + + cd /opt/arduino-1.6.6/ + +在这个目录给 install.sh 可执行权限 + + chmod +x install.sh + +最后运行脚本同时安装桌面快捷方式和启动图标: + + ./install.sh + +下图中我用“&&”同时运行这三个命令: + +![install-desktop-icon](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-desktop-icon.jpg) + +最后从 Unity Dash、程序启动器或者桌面快捷方式运行 Arduino IDE。 + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/11/install-arduino-ide-1-6-6-ubuntu/ + +作者:[Ji m][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuhandbook.org/index.php/about/ +[1]:https://www.arduino.cc/en/Main/ReleaseNotes +[2]:https://www.arduino.cc/en/Main/Software diff --git a/translated/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md b/translated/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md deleted file mode 100644 index 668b9c3a80..0000000000 --- a/translated/tech/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md +++ /dev/null @@ -1,78 +0,0 @@ -如何再Ubuntu中安装最新的Arduino IDE 1.6.6 -================================================================================ -![Install latest Arduino in Ubuntu](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-icon.png) - -> 本篇教程会教你如何在现在的Ubuntu发布版中安装最新的 Arduino IDE,目前的版本为1.6.6。 - -开源的Arduino IDE发布了1.6.6,并带来了很多的改变。新的发布已经切换到Java 8,它与IDE绑定并且再编译时需要它。具体见[RELEASE NOTE][1]。 - -![Arduino 1.6.6 in Ubuntu 15.10](http://ubuntuhandbook.org/wp-content/uploads/2015/11/arduino-ubuntu.jpg) - -对于那些不想使用软件中心的1.0.5旧版本的人而言,你可以使用下面的步骤再所有的Ubuntu发行版中安装Ardunino。 - -注:下面这个说明下面的代码颜色,这个发布的时候要对照一下原文,写点说明,因为颜色在md里标识不出来 -> **用红字替换将来的版本** - -**1.** Download the latest packages, **Linux 32-bit or Linux 64-bit**, from the official link below: -**1.** 从下面的官方链接下载最新的包 **Linux 32-bit 或者 Linux 64-bit**。 - -- [www.arduino.cc/en/Main/Software][2] - -不知道你系统的类型?进入系统设置->详细->概览。 - -**2.** 从Unity Dash、App Launcher或者Ctrl+Alt+T打开终端。打开后,一个个运行下面的命令: - -进入下载文件夹: - - cd ~/Downloads - -![navigate-downloads](http://ubuntuhandbook.org/wp-content/uploads/2015/11/navigate-downloads.jpg) - -使用tar命令解压 - -注:arduino-1.6.6-*.tar.xz 为红色部分 - tar -xvf arduino-1.6.6-*.tar.xz - -![extract-archive](http://ubuntuhandbook.org/wp-content/uploads/2015/11/extract-archive.jpg) - -将解压后的文件移动到**/opt/**下: - -注:arduino-1.6.6 为红色部分 - sudo mv arduino-1.6.6 /opt - -![move-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/11/move-opt.jpg) - -**3.** 现在IDE已经与最新的Java绑定使用了。但是最好位程序设置一个桌面图标/启动方式: - -进入安装目录 - -注:arduino-1.6.6 为红色部分 - cd /opt/arduino-1.6.6/ - -在这个目录给install.sh可执行权限 - - chmod +x install.sh - -最后运行脚本同事安装桌面快捷方式和启动图标: - - ./install.sh - -下图中我用“&&”同事运行这三个命令: - -![install-desktop-icon](http://ubuntuhandbook.org/wp-content/uploads/2015/11/install-desktop-icon.jpg) - -最后从Unity Dash、程序启动器或者桌面快捷方式运行Arduino IDE。 - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/11/install-arduino-ide-1-6-6-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://www.arduino.cc/en/Main/ReleaseNotes -[2]:https://www.arduino.cc/en/Main/Software From 9bf82598140c99ddaedb276f1d1d3762e2c8874e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 23 Dec 2015 08:38:01 +0800 Subject: [PATCH 0648/1710] PUB:20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen @geekpi --- ...at And Mouse Chase All Over Your Screen.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) rename {translated/tech => published}/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md (72%) diff --git a/translated/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md b/published/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md similarity index 72% rename from translated/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md rename to published/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md index e08d21ae49..1994d7b797 100644 --- a/translated/tech/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md +++ b/published/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md @@ -1,6 +1,6 @@ -Linux/Unix桌面趣事:猫和老鼠在屏幕中追逐 +Linux/Unix桌面趣事:显示器里的猫和老鼠 ================================================================================ -Oneko是一个有趣的app。它会把你的光标变成一直老鼠,并在后面创建一个可爱的小猫,并且始终在老鼠光标后面追着。单词“neko”再日语中的意思是老鼠。它最初是作为Macintosh桌面附件由一位日本人开发的。 +Oneko 是一个有趣的应用。它会把你的光标变成一只老鼠,并在后面创建一个可爱的小猫,并且始终追逐着老鼠光标。单词“neko”在日语中的意思是老鼠。它最初是一位日本人开发的 Macintosh 桌面附件。 ### 安装 oneko ### @@ -29,19 +29,18 @@ Oneko是一个有趣的app。它会把你的光标变成一直老鼠,并在后 Setting up oneko (1.2.sakura.6-7) ... Processing triggers for menu ... -FreeBSD用户输入下面的命令安装oneko: +FreeBSD 用户输入下面的命令安装 oneko: # cd /usr/ports/games/oneko # make install clean -### 我该如何使用oneko? ### +### 我该如何使用 oneko? ### -Simply type the following command: 输入下面的命令: $ oneko -你可以把猫变成“tora-neko”,一只像白老虎条纹的猫: +你可以把猫变成 “tora-neko”,一只像白老虎条纹的猫: $ oneko -tora @@ -66,19 +65,18 @@ Simply type the following command: 注:youtube 视频 -(Video.01: 示例 - 在Linux下安装和使用oneko) +(Video.01: 示例 - 在 Linux 下安装和使用 oneko) ### 其他选项 ### -You can pass the following options: 你可以传入下面的选项 -1.**-tofocus**:让猫再聚焦的窗口顶部奔跑。当聚焦的窗口不在视野中时,猫像平常那样追逐老鼠。 +1. **-tofocus**:让猫在获得焦点的窗口顶部奔跑。当获得焦点的窗口不在视野中时,猫像平常那样追逐老鼠。 2. **-position 坐标** :指定X和Y来调整猫相对老鼠的位置 3. **-rv**:将前景色和背景色对调 4. **-fg 颜色** : 前景色 (比如 oneko -dog -fg red)。 5. **-bg 颜色** : 背景色 (比如 oneko -dog -bg green)。 -6. 查看oneko的手册获取更多信息。 +6. 查看 oneko 的手册获取更多信息。 -------------------------------------------------------------------------------- @@ -86,6 +84,6 @@ via: http://www.cyberciti.biz/open-source/oneko-app-creates-cute-cat-chasing-aro 作者:Vivek Gite 译者:[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 7d55d9a8053648ad273457bcb8fa1c0bb46a0519 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 23 Dec 2015 08:44:45 +0800 Subject: [PATCH 0649/1710] PUB:20151208 How to Customize Time and Date Format in Ubuntu Panel @alim0x --- ...ze Time and Date Format in Ubuntu Panel.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20151208 How to Customize Time and Date Format in Ubuntu Panel.md (60%) diff --git a/translated/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md b/published/20151208 How to Customize Time and Date Format in Ubuntu Panel.md similarity index 60% rename from translated/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md rename to published/20151208 How to Customize Time and Date Format in Ubuntu Panel.md index 958dab2f18..4b20628048 100644 --- a/translated/tech/20151208 How to Customize Time and Date Format in Ubuntu Panel.md +++ b/published/20151208 How to Customize Time and Date Format in Ubuntu Panel.md @@ -1,14 +1,14 @@ -自定义Ubuntu面板时间日期显示格式 +如何深度定制 Ubuntu 面板的时间日期显示格式 ================================================================================ ![时间日期格式](http://ubuntuhandbook.org/wp-content/uploads/2015/08/ubuntu_tips1.png) -尽管设置里已经有一些选项可以用了,这个快速教程会向你展示如何更加深入地自定义 Ubuntu 面板上的时间和日期指示器。 +尽管设置页面里已经有一些选项可以用了,这个快速教程会向你展示如何更加深入地自定义 Ubuntu 面板上的时间和日期指示器。 ![自定义世间日期](http://ubuntuhandbook.org/wp-content/uploads/2015/12/custom-timedate.jpg) 在开始之前,在 Ubuntu 软件中心搜索并安装 **dconf Editor**。然后启动该软件并按以下步骤执行: -**1.** 当 dconf Editor 启动后,导航至 **com -> canonical -> indicator -> datetime**。将 **time-format** 的值设置为 **custom**。 +**1、** 当 dconf Editor 启动后,导航至 **com -> canonical -> indicator -> datetime**。将 **time-format** 的值设置为 **custom**。 ![自定义时间格式](http://ubuntuhandbook.org/wp-content/uploads/2015/12/time-format.jpg) @@ -16,11 +16,11 @@ gsettings set com.canonical.indicator.datetime time-format 'custom' -**2.** 现在你可以通过编辑 **custom-time-format** 的值来自定义时间和日期的格式。 +**2、** 现在你可以通过编辑 **custom-time-format** 的值来自定义时间和日期的格式。 ![自定义-时间格式](http://ubuntuhandbook.org/wp-content/uploads/2015/12/customize-timeformat.jpg) -你也可以通过命令完成:(译注:将 FORMAT_VALUE_HERE 替换为所需要的格式值) +你也可以通过命令完成:(LCTT 译注:将 FORMAT_VALUE_HERE 替换为所需要的格式值) gsettings set com.canonical.indicator.datetime custom-time-format 'FORMAT_VALUE_HERE' @@ -30,29 +30,28 @@ - %A = 星期名完整拼写 - %b = 月份名缩写 - %B = 月份名完整拼写 -- %d = 按月计日期 +- %d = 每月的日期 - %l = 小时 ( 1..12), %I = 小时 (01..12) - %k = 小时 ( 1..23), %H = 小时 (01..23) - %M = 分钟 (00..59) - %p = 午别,AM 或 PM, %P = am 或 pm. - %S = 秒 (00..59) -- 打开终端键入命令 `man date` 并执行以了解更多细节。 -一些例子: +可以打开终端键入命令 `man date` 并执行以了解更多细节。 -自定义时间日期显示格式值: +一些自定义时间日期显示格式值的例子: **%a %H:%M %m/%d/%Y** -![exam-1](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-1.jpg) +![%a %H:%M %m/%d/%Y](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-1.jpg) **%a %r %b %d or %a %I:%M:%S %p %b %d** -![exam-2](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-2.jpg) +![%a %r %b %d or %a %I:%M:%S %p %b %d](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-2.jpg) **%a %-d %b %l:%M %P %z** -![exam-3](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-3.jpg) +![%a %-d %b %l:%M %P %z](http://ubuntuhandbook.org/wp-content/uploads/2015/12/exam-3.jpg) -------------------------------------------------------------------------------- @@ -60,7 +59,7 @@ via: http://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/ 作者:[Ji m][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 40a30b579c10381389cf6b05279f8d52aeff765f Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 23 Dec 2015 09:17:15 +0800 Subject: [PATCH 0650/1710] PUB:20151030 How To Install FreeBSD on Raspberry Pi 2 Model B @strugglingyouth --- ...stall FreeBSD on Raspberry Pi 2 Model B.md | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) rename {translated/tech => published}/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md (65%) diff --git a/translated/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md b/published/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md similarity index 65% rename from translated/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md rename to published/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md index 941d3a2b72..6057efd5fb 100644 --- a/translated/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md +++ b/published/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md @@ -1,16 +1,15 @@ -如何在树莓派2 B型上安装 FreeBSD +如何在树莓派 2B 上安装 FreeBSD ================================================================================ -在树莓派2 B型上如何安装 FreeBSD 10 或 FreeBSD 11(current)?怎么在 Linux,OS X,FreeBSD 或类 Unix 操作系统上烧录 SD 卡? +在树莓派 2B 上如何安装 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 版。 +在树莓派 2B 上安装 FreeBSD 10 或 FreeBSD 11(current)很容易。使用 FreeBSD 操作系统可以打造一个非常易用的 Unix 服务器。FreeBSD-CURRENT 自2012年十一月以来一直支持树莓派,2015年三月份后也开始支持树莓派2了。在这个快速教程中我将介绍如何在树莓派 2B 上安装 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 或 @@ -45,52 +44,51 @@ 1024+0 records out 1073741824 bytes transferred in 661.669584 secs (1622776 bytes/sec) -#### 使用 Linux/FreeBSD 或者 类 Unix 系统来烧录 FreeBSD-current #### +#### 使用 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 。 +**确保使用实际的 SD 卡的设备名称来替换 /dev/sdb**(LCTT 译注:千万注意不要写错了)。 ### 4. 引导 FreeBSD ### -在树莓派2 B型上插入 SD 卡。你需要连接键盘,鼠标和显示器。我使用的是 USB 转串口线来连接显示器的: +在树莓派 2B 上插入 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 的串行连接 +*图01 基于树莓派 USB 的串行连接* 在下面的例子中,我使用 screen 命令来连接我的 RPI: - ## Linux version ## + ## Linux 上 ## screen /dev/tty.USB0 115200 - ## OS X version ## + ## OS X 上 ## screen /dev/cu.usbserial 115200 - ## Windows user use Putty.exe ## + ## Windows 请使用 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 +*图02: 在树莓派 2上引导 FreeBSD-current* ### 5. FreeBSD 在 RPi 2上的用户名和密码 ### 默认的密码是 freebsd/freebsd 和 root/root。 -到此为止, FreeBSD-current 已经安装并运行在 RPi 2上。 +到此为止, FreeBSD-current 已经安装并运行在树莓派 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) +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 23c7ebb3b3ea9fc30c9ee1bc6deee4c5e1fb2a59 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 23 Dec 2015 09:37:45 +0800 Subject: [PATCH 0651/1710] PUB:20151208 Apple Swift Programming Language Comes To Linux @flowsnow --- ...ift Programming Language Comes To Linux.md | 41 ++++++++++++++++++ ...ift Programming Language Comes To Linux.md | 43 ------------------- 2 files changed, 41 insertions(+), 43 deletions(-) create mode 100644 published/20151208 Apple Swift Programming Language Comes To Linux.md delete mode 100644 translated/news/20151208 Apple Swift Programming Language Comes To Linux.md diff --git a/published/20151208 Apple Swift Programming Language Comes To Linux.md b/published/20151208 Apple Swift Programming Language Comes To Linux.md new file mode 100644 index 0000000000..1eb1de02fc --- /dev/null +++ b/published/20151208 Apple Swift Programming Language Comes To Linux.md @@ -0,0 +1,41 @@ +可以在 Linux 下试试苹果编程语言 Swift +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2015/12/Apple-Swift-Open-Source.jpg) + +是的,你知道的,苹果编程语言 Swift 已经开源了。其实我们并不应该感到意外,因为[在六个月以前苹果就已经宣布了这个消息][1]。 + +苹果宣布推出开源 Swift 社区。一个专用于开源 Swift 社区的[新网站][2]已经就位,网站首页显示以下信息: + +> 我们对 Swift 开源感到兴奋。在苹果推出了编程语言 Swift 之后,它很快成为历史上增长最快的语言之一。Swift 可以编写出难以置信的又快又安全的软件。目前,Swift 是开源的,你可以将这个最好的通用编程语言用在各种地方。 + +[swift.org][2] 这个网站将会作为一站式网站,它会提供各种资料的下载,包括各种平台,社区指南,最新消息,入门教程,为开源 Swift 做贡献的说明,文件和一些其他的指南。 如果你正期待着学习 Swift,那么必须收藏这个网站。 + +在苹果的这次宣布中,一个用于方便分享和构建代码的包管理器已经可用了。 + +对于所有的 Linux 使用者来说,最重要的是,源代码已经可以从 [Github][3]获得了.你可以从以下链接 Checkout 它: + +- [苹果 Swift 源代码][3] + +除此之外,对于 ubuntu 14.04 和 15.10 版本还有预编译的二进制文件。 + +- [ubuntu 系统的 Swift 二进制文件][4] + +不要急着在产品环境中使用它们,因为这些都是开发分支而不适合于产品环境。因此现在应避免使用在产品环境中,一旦发布了 Linux 下 Swift 的稳定版本,我希望 ubuntu 会把它包含在 [umake][5]中,和 [Visual Studio Code][6] 放一起。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/swift-open-source-linux/ + +作者:[Abhishek][a] +译者:[Flowsnow](https://github.com/Flowsnow) +校对:[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/apple-open-sources-swift-programming-language-linux/ +[2]:https://swift.org/ +[3]:https://github.com/apple +[4]:https://swift.org/download/#latest-development-snapshots +[5]:https://wiki.ubuntu.com/ubuntu-make +[6]:http://itsfoss.com/install-visual-studio-code-ubuntu/ diff --git a/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md b/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md deleted file mode 100644 index fe2089345d..0000000000 --- a/translated/news/20151208 Apple Swift Programming Language Comes To Linux.md +++ /dev/null @@ -1,43 +0,0 @@ - -苹果编程语言Swift开始支持Linux -================================================================================ -![](http://itsfoss.com/wp-content/uploads/2015/12/Apple-Swift-Open-Source.jpg) - -苹果也开源了?是的,苹果编程语言Swift已经开源了。其实我们并不应该感到意外,因为[在六个月以前苹果就已经宣布了这个消息][1]。 - -苹果宣布这周将推出开源Swift社区。一个专用于开源Swift社区的[新网站][2]已经就位,网站首页显示以下信息: - -> 我们对Swift开源感到兴奋。在苹果推出了编程语言Swift之后,它很快成为历史上增长最快的语言之一。Swift可以编写出难以置信的又快又安全的软件。目前,Swift是开源的,你能帮助做出随处可用的最好的通用编程语言。 - -[swift.org][2]这个网站将会作为一站式网站,它会提供各种资料的下载,包括各种平台,社区指南,最新消息,入门教程,贡献开源Swift的说明,文件和一些其他的指南。 如果你正期待着学习Swift,那么必须收藏这个网站。 - -在苹果的这次宣布中,一个用于方便分享和构建代码的包管理器已经可用了。 - -对于所有的Linux使用者来说,最重要的是,源代码已经可以从[Github][3]获得了.你可以从以下链接Checkout它: -Most important of all for Linux users, the source code is now available at [Github][3]. You can check it out from the link below: - -- [苹果Swift源代码][3] - -除此之外,对于ubuntu 14.04和15.10版本还有预编译的二进制文件。 - -- [ubuntu系统的Swift二进制文件][4] - -不要急着去使用它们,因为这些都是发展分支而且不适合于专用机器。因此现在避免使用,一旦发布了Linux下Swift的稳定版本,我希望ubuntu会把它包含在[umake][5]中靠近[Visual Studio][6]的地方。 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/swift-open-source-linux/ - -作者:[Abhishek][a] -译者:[Flowsnow](https://github.com/Flowsnow) -校对:[校对者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/apple-open-sources-swift-programming-language-linux/ -[2]:https://swift.org/ -[3]:https://github.com/apple -[4]:https://swift.org/download/#latest-development-snapshots -[5]:https://wiki.ubuntu.com/ubuntu-make -[6]:http://itsfoss.com/install-visual-studio-code-ubuntu/ From 370a351078481a901196b66f517eb0c0a3d55bb3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 23 Dec 2015 17:29:23 +0800 Subject: [PATCH 0652/1710] =?UTF-8?q?20151223-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Biggest Linux Stories Of The Year 2015.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md diff --git a/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md new file mode 100644 index 0000000000..af41c6a5e1 --- /dev/null +++ b/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md @@ -0,0 +1,123 @@ +Ten Biggest Linux Stories Of The Year 2015 +================================================================================ +![Biggest Linux Stories of 2015](http://itsfoss.com/wp-content/uploads/2015/12/Biggest-Linux-Stories-2015.jpg) + +Year 2015 is coming to an end and I am here with Year 2015 special series on It’s FOSS. First in this series is the biggest Linux stories of the year 2015. These stories are the ones that had the most impact on the Linux world, both positive and negative. + +I have summarized ten of such stories which created the most buzz in 2015. Here we go! + +### Biggest Linux and Open Source stories of the year 2015 ### + +Just to add, the listed items are not ordered chronologically. + +#### Microsoft’s partnering with Linux #### + +In late September, everyone was shocked to hear that [Microsoft created its own Linux distribution][1]. It was later revealed that [it was a software][2] developed for its Azur cloud switches. + +But the story did not end up just there. Microsoft indeed partnered with Canonical (parent company of Ubuntu Linux) for [HDInsight][3], Microsoft’s big data Hadoop-on-Azure service. Ubuntu was the first Linux on which [Microsoft deployed this software][4]. + +Will Microsoft continue its affair with Linux? Or will it dump it after Linux has served its purpose (Azur). Only time will tell. + +#### Microsoft releases Visual Studio Code for Linux #### + +Before Microsoft-Linux distribution uproar, Microsoft has dropped another bomb by releasing Visual Studio Code for Linux, along with Windows and OS X versions. Though Visual Studio Code is not open source, releasing a Linux version was somehow a win for Linux users. After all, Linus Torvalds had famously said, “if Microsoft ever does an application for Linux, it means I’ve won”. + +You can follow this tutorial to see [how to install Visual Studio Code in Ubuntu][5]. + +#### Apple open sources Swift programming language #### + +Apple was not behind in showing off its ‘love’ for Linux and Open Source. Apple’s flagship programming language Swift which is used for making iOS apps, [is now open source][6] with Linux ports available. Though in beta, you can easily [install Swift in Ubuntu][7]. + +But Apple is Apple and it [started bragging itself][8] as the “first major computer company to make Open Source development a key part of its software strategy…(sic)”. + +#### Ubuntu Phone finally launched #### + +Ubuntu Phone was finally launched earlier this year. Intended for early adopters and developers, Ubuntu was welcomed with open heart by the Ubuntu community. Mainstream smartphone users are still shying away from it, mainly [because the OS is still under heavy development][9]. Year 2016 will be deciding for the existence of Ubuntu Phone. + +#### Financial crisis hits Jolla #### + +Jolla, the company behind Linux based smartphone operating system Sailfish OS, hit a major financial hurdle. It resulted in [half of Jolla employees being laid off][10]. + +Jolla had a very [successful crowdfunding campaign][11] in 2014 for its tablet. Apparently, they spent most of the budget on the development of Sailfish OS and when the lead investor backed off, company struggled for its survival. + +Good news is that Jolla has managed to get some solid funding and its ]back in business][12]. + +#### Firefox OS is dead #### + +One of the open source alternatives to Android, Mozilla’s mobile operating system Firefox OS died a slow death earlier this month. Intended at developing countries with smartphones as cheap as $25, Firefox OS based smartphones could never gained popularity. I think lack of popular apps and cheap hardware was the main reason. + +In December, [Mozilla announced][13] that it will stop developing Firefox OS and also stop the sale of Firefox smartphones. + +Though it is never announced, I think even [Tizen][14], Linux foundation’s own Linux based mobile OS, is dead as well. I don’t see any development news on Tizen and Linux Foundation never promotes it. It is just the matter of time when we will be invited to the funeral of Tizen. + +#### Infighting in “Ubuntu family” #### + +There were lots of heated discussion in May this year when Kubuntu project lead, [Jonathan Riddell was forced out by Ubuntu Community Council][15]. Jonathan had asked questions about how the donations received by Ubuntu is being spent. He had complained that Kubuntu never saw the money. + +This led to an exchange of accusation between both sides. Ultimately, big daddy of Ubuntu, [Mark Shuttleworth asked Jonathan to step down][16]. + +#### Female Linux Kernel developer quits citing ‘brutal communication style’ #### + +Linux creator Linux Torvalds is known for the use of abusive language. Linux Kernel dev [Sarah Sharp][17] is also known for being out spoken. + +Sarah Sharp had earlier locked horns with Linus Torvalds in 2013 when she publicly [advised Linus to keep “verbal violence” off the mailing list][18]. Linus did not take it [lightly][19] as well. + +That was in 2013. In 2015, Sarah announced that she is [stepping down from her work in Kernel community][20] because the communication style lacks basic decency and is brutal and profane. + +This move left people discussing if Linux Kernel community should really change the way they behave or if Sarah took things too far. + +#### Unity gaming editor ported to Linux #### + +While [gaming on Linux][21] is still the Achilles heel for Linux users, the community got excited when gaming engine Unity announced that it is testing its [game editor on Linux][22]. As Linux is used very well for rendering, it is speculated that this move will bring game developers to Linux. It is not confirmed yet if Unity will actually bring a final Linux version of its game editor though. + +#### Open Source adoption in government organization #### + +Administration in several [European cities decided to ditch proprity software][23] and opt for open source alternatives. Most city administration replaced Microsoft Office with LibreOffice or OpenOffice. Few cities and [government][24] schools also went ahead and replaced Microsoft Windows with Linux. + +Cost cutting was one of the major factor in this decision as the city administration saved hundreds of thousands of Euro by adopting Open Source. + +Universities were not far behind in adopting open source as well. All year round, we get to hear how a [university dropped Photoshop for Krita][25] or [university using open source office][26]. + +### Conclusion ### + +As with any other year, 2015 also had some positive and some negative moments for Linux lovers. We saw competitors like Microsoft and Apple coming close to Linux, government organizations adopting to open source. At the same time, we witnessed the failure of Firefox smartphone OS. A mixed year, I would say. + +What do you think? I let you share what you think was the most important news for Linux-ers in the year 2015 and your overall feel about it. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/biggest-linux-stories-2015/ + +作者:[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.theregister.co.uk/2015/09/18/microsoft_has_developed_its_own_linux_repeat_microsoft_has_developed_its_own_linux/ +[2]:http://arstechnica.com/information-technology/2015/09/microsoft-has-built-software-but-not-a-linux-distribution-for-its-software-switches/ +[3]:https://azure.microsoft.com/en-us/services/hdinsight/ +[4]:http://www.zdnet.com/article/microsoft-deploys-first-major-server-application-on-ubuntu-linux/ +[5]:http://itsfoss.com/install-visual-studio-code-ubuntu/ +[6]:http://itsfoss.com/swift-open-source-linux/ +[7]:http://itsfoss.com/use-swift-linux/ +[8]:https://business.facebook.com/itsfoss/photos/pb.115098615297581.-2207520000.1450817108./634288916711879/?type=3&theater +[9]:http://www.engadget.com/2015/07/24/ubuntu-phone-review/ +[10]:http://techcrunch.com/2015/11/20/jolla-running-out-of-runway-for-its-android-alternative/ +[11]:https://www.indiegogo.com/projects/jolla-tablet-world-s-first-crowdsourced-tablet#/ +[12]:https://blog.jolla.com/jolla-back-business/ +[13]:http://arstechnica.com/gadgets/2015/12/firefox-os-smartphones-are-dead/ +[14]:https://www.tizen.org/ +[15]:http://www.omgubuntu.co.uk/2015/05/kubuntu-project-lead-asked-to-step-down-by-ubuntu-community-council +[16]:http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html +[17]:http://sarah.thesharps.us/ +[18]:http://www.techeye.net/chips/linus-torvalds-and-intel-woman-in-sweary-spat +[19]:http://marc.info/?l=linux-kernel&m=137392506516022&w=2 +[20]:http://www.networkworld.com/article/2988850/opensource-subnet/linux-kernel-dev-sarah-sharp-quits-citing-brutal-communications-style.html +[21]:http://itsfoss.com/linux-gaming-guide/ +[22]:http://itsfoss.com/unity-gaming-engine-linux/ +[23]:http://itsfoss.com/tag/open-source-adoption/ +[24]:http://itsfoss.com/spanish-school-ditches-windows-ubuntu/ +[25]:http://itsfoss.com/french-university-dumps-adobe-photoshop-open-source-app-krita/ +[26]:http://itsfoss.com/hungarian-universities-switch-eurooffice/ From 1a4eb0ff2650dd2bc0e6ce9a102b170efee072c9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 23 Dec 2015 17:30:20 +0800 Subject: [PATCH 0653/1710] =?UTF-8?q?20151223-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e Best File System for My Linux Install.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/talk/20151223 What' s the Best File System for My Linux Install.md diff --git a/sources/talk/20151223 What' s the Best File System for My Linux Install.md b/sources/talk/20151223 What' s the Best File System for My Linux Install.md new file mode 100644 index 0000000000..1e8af12179 --- /dev/null +++ b/sources/talk/20151223 What' s the Best File System for My Linux Install.md @@ -0,0 +1,96 @@ +What’s the Best File System for My Linux Install? +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-feature-image.jpg) + +File systems: they’re not the most exciting things in the world, but important nonetheless. In this article we’ll go over the popular choices for file systems on Linux – what they’re about, what they can do, and who they’re for. + +### Ext4 ### + +![file-systems-ext4](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-ext4.png) + +If you’ve ever installed Linux before, chances are you’ve seen the “Ext4” during installation. There’s a good reason for that: it’s the file system of choice for just about every Linux distribution available right now. Sure, there are some that choose other options, but there’s no denying that Extended 4 is the file system of choice for almost all Linux users. + +#### What can it do? #### + +Extended 4 has all of the goodness that you’ve come to expect from past file system iterations (Ext2/Ext3) but with enhancements. There’s a lot to dig into, but here are the best parts of what Ext4 can do for you: + +- file system journaling +- journal checksums +- multi-block file allocation +- backwards compatibility support for Extended 2 and 3 +- persistent pre-allocation of free space +- improved file system checking (over previous versions) +- and of course, support for larger files + +#### Who is it for? #### + +Extended 4 is for those looking for a super-stable foundation to build upon, or for those looking for something that just works. This file system won’t snapshot your system; it doesn’t even have the greatest SSD support, but If your needs aren’t too extravagant, you’ll get along with it just fine. + +### BtrFS ### + +![file-systems-btrFS](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-btrFS-e1450065697580.png) + +The B-tree file system (also known as butterFS) is a file system for Linux developed by Oracle. It’s a new file system and is in heavy development stages. The Linux community considers it unstable to use for some. The core principle of BtrFS is based around the principle of copy-on-write. **Copy on write** basically means that the system has one single copy of a bit of data before the data has been written. When the data has been written, a copy of it is made. + +#### What can it do? #### + +Besides supporting copy-on-write, BtrFS can do many other things – so many things, in fact, that it’d take forever to list everything. Here are the most notable features: The file system supports read-only snapshots, file cloning, subvolumes, transparent compression, offline file system check, in-place conversion from ext3 and 4 to Btrfs, online defragmentation, anew has support for RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10. + +#### Who is it for? #### + +The developers of BtrFS have promised that this file system is the next-gen replacement for other file systems out there. That much is true, though it certainly is a work in progress. There are many killer features for advanced users and basic users alike (including great performance on SSDs). This file system is for those looking to get a little bit more out of their file system and who want to try the copy-on-write way of doing things. + +### XFS ### + +![file-systems-xfs](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-xfs.jpg) + +Developed and created by Silicon Graphics, XFS is a high-end file system that specializes in speed and performance. XFS does extremely well when it comes to parallel input and output because of its focus on performance. The XFS file system can handle massive amounts of data, so much in fact that some users of XFS have close to 300+ terabytes of data. + +#### What can it do? #### + +XFS is a well-tested data storage file system created for high performance operations. Its features include: + +- striped allocation of RAID arrays +- file system journaling +- variable block sizes +- direct I/O +- guaranteed-rate I/O +- snapshots +- online defragmentation +- online resizing + +#### Who is it for? #### + +XFS is for those looking for a rock-solid file solution. The file system has been around since 1993 and has only gotten better and better with time. If you have a home server and you’re perplexed on where you should go with storage, consider XFS. A lot of the features the file system comes with (like snapshots) could aid in your file storage system. It’s not just for servers, though. If you’re a more advanced user and you’re interested in a lot of what was promised in BtrFS, check out XFS. It does a lot of the same stuff and doesn’t have stability issues. + +### Reiser4 ### + +![file-system-riser4](https://www.maketecheasier.com/assets/uploads/2015/05/file-system-riser4.gif) + +Reiser4, the successor to ReiserFS, is a file system created and developed by Namesys. The creation of Reiser4 was backed by the Linspire project as well as DARPA. What makes Reiser4 special is its multitude of transaction models. There isn’t one single way data can be written; instead, there are many. + +#### What can it do? #### + +Reiser4 has the unique ability to use different transaction models. It can use the copy-on-write model (like BtrFS), write-anywhere, journaling, and the hybrid transaction model. It has a lot of improvements upon ReiserFS, including better file system journaling via wandering logs, better support for smaller files, and faster handling of directories. Reiser4 has a lot to offer. There are a lot more features to talk about, but suffice it to say it’s a huge improvement over ReiserFS with tons of added features. + +#### Who is it for? #### + +Resier4 is for those looking to stretch one file system across multiple use-cases. Maybe you want to set up one machine with copy-on-write, another with write-anywhere, and another with hybrid transaction, and you don’t want to use different types of file systems to accomplish this task. Reiser4 is perfect for this type of use-case. + +### Conclusion ### + +There are many file systems available on Linux. Each serves a unique purpose for unique users looking to solve different problems.This post focuses on the most popular choices for the platform. There is no doubt there are other choices out there for other use-cases. + +What’s your favorite file system to use on Linux? Tell us why below! + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/best-file-system-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 7cc9b01c1ed4c24d9f6f33d7eae96e9c2990825b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 23 Dec 2015 17:31:30 +0800 Subject: [PATCH 0654/1710] =?UTF-8?q?20151223-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...H Login Without Password CentOS or RHEL.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md diff --git a/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md new file mode 100644 index 0000000000..b4a2f886a1 --- /dev/null +++ b/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md @@ -0,0 +1,105 @@ +How to Setup SSH Login Without Password CentOS / RHEL +================================================================================ +![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg) + +As a system administrator, you plan on using OpenSSH for Linux and automate your daily tasks such as transferring files or database dump file for the backup to another server. To achieve this goal, you need to log in automatically from the host A to host B. Login automatically mean you do not want to enter any password because you want to use ssh from a shell script. + +In this article we’ll show you how to Setup SSH Login without Password on CentOS / RHEL. After automatic login has been configured, you can use it to move the file using SSH (Secure Shell) and secure copy (SCP). + +SSH is open source and the most trusted network protocol which is used to login to the remote server. It is used by system administrators to execute commands, also used to transfer files from one computer to another over a network using SCP protocol. + +After you setup SSH login without password, you can get the following advantages : + +a) Automate your daily task via scripts. +b) Enhance security of your linux server. This is one of the recommended method to prevent a brute force attack on virtual private server (VPS), SSH keys are nearly impossible to decipher by brute force alone. + +### What is ssh-keygen ### + +ssh-keygen is a Unix utility that is used to generate, create, manage the public and private keys for ssh authentication. With the help of the ssh-keygen tool, a user can create passphrase keys for both SSH protocol version 1 and version 2. ssh-keygen creates RSA keys for SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2. + +### What is ssh-copy-id ### + +ssh-copy-id is a script that copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also append the indicated identity file to that machine’s ~/.ssh/authorized_keys file and assigns proper permission to the remote-host’s home. + +### SSH keys ### + +SSH keys provide better and secure way of logging into a linux server with SSH. After you run ssh-keygen, you will generate public key and private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. + +### Setup SSH Login Without Password on CentOS and RHEL. ### + +This steps tested on CentOS 5/6/7, RHEL 5/6/7 and Oracle Linux 6/7. + +Node1 : 192.168.0.9 +Node2 : 192.168.l.10 + +#### Step One : #### + +Test the connection and access from node1 to node2 : + + [root@node1 ~]# ssh root@192.168.0.10 + The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established. + RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42. + Are you sure you want to continue connecting (yes/no)? yes + Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts. + root@192.168.0.10's password: + Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1 + [root@node2 ~]# + +#### Step Two : #### + +Generate public and private keys using ssh-key-gen. Please take note that you can increase security by protecting the private key with a passphrase. + + [root@node1 ~]# ssh-keygen + Generating public/private rsa key pair. + Enter file in which to save the key (/root/.ssh/id_rsa): + 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: + b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local + The key's randomart image is: + +--[ RSA 2048]----+ + | . ++ | + | o o o | + | o o o . | + | . o + .. | + | S . . | + | . .. .| + | o E oo.o | + | = ooo. | + | . o.o. | + +-----------------+ + +#### Step Three : #### + +Copy or transfer the public key to remote-host using ssh-copy-id command. It will append the indicated identity file to ~/.ssh/authorized_keys on node2 : + + [root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10 + root@192.168.0.10's password: + Now try logging into the machine, with "ssh '192.168.0.10'", and check in: + + .ssh/authorized_keys + + to make sure we haven't added extra keys that you weren't expecting. + +#### Step Four : #### + +Try SSH login without Password to node2 : + + [root@node1 ~]# ssh root@192.168.0.10 + Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local + +I hope this article gives you some ideas and quick guide on how to setup SSH login without password on Linux CentOS / RHEL. + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/ssh-login-without-password-centos/ + +作者:[skytech][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/skytech/ From 1ea0ae28be7b14830bca43993a001565fc559a8a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 23 Dec 2015 17:31:58 +0800 Subject: [PATCH 0655/1710] =?UTF-8?q?20151204-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Use Glances to Monitor System on Ubuntu.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md diff --git a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md new file mode 100644 index 0000000000..14787025e9 --- /dev/null +++ b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md @@ -0,0 +1,105 @@ +How to Use Glances to Monitor System on Ubuntu +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/12/glances_featured.jpg) + +Glances is a cross-platform command-line text-based tool to monitor your system. It is written in Python language and uses the `psutil` library to get information from the system. Using it you can monitor CPU, Load Average, Memory, Network Interfaces, Disk I/O, File System spaces utilization, mounted devices, total number of active processes and top processes. There are many interesting options available in Glances. One of the main features is that you can set thresholds (careful, warning and critical) in a configuration file, and information will be shown in colors which indicates the bottleneck in the system. + +### Glances Features ### + +- the average CPU load +- total number of processes like active, sleeping processes, etc. +- total memory information like RAM, swap, free memory, etc. +- CPU information +- Network download and upload speed of connections +- Disk I/O read/write speed details +- Currently mounted devices’ disk usages +- Top processes with their CPU/memory usages + +### Installing Glances ### + +Installing Glances on Ubuntu is easy, as it is available on Ubuntu’s repository. You can install Glances by running the following command. + + sudo apt-get install glances + +### Usage of Glances ### + +After installation has been finished, you can launch Glances by running the following command: + + glances + +You will see an output like the following: + +![glances monitor system output](https://www.maketecheasier.com/assets/uploads/2015/12/glances_output1.png) + +Press ESC or “Ctrl + C” to quit from the Glances terminal. + +By default, the interval time is set to 1 second, but you can define the custom interval time while running glances from the terminal. + +To set the interval time to 5 seconds, run the following command: + + glances -t 5 + +### Glances Color Codes ### + +Glances color code meanings: + +- `GREEN` : OK +- `BLUE` : CAREFUL +- `VIOLET` : ALERT +- `RED` : CRITICAL + +By default, Glances thresholds set is: careful=50, warning=70, critical=90. You can customize the threshold by using the default configuration file glances.conf located at the “/etc/glances/” directory. + +### Glances Options ### + +Glances provides sever so hot keys to find output information while it is running. + +Below are the list of several hot keys. + +- `m` : sort processes by MEM% +- `p` : sort processes by name +- `c` : sort processes by CPU% +- `d` : show/hide disk I/O stats +- `a` : sort processes automatically +- `f` : show/hide file system statshddtemp +- `i` : sort processes by I/O rate +- `s` : show/hide sensors’ stats +- `y` : show/hide hddtemp stats +- `l` : show/hide logs +- `n` : show/hide network stats +- `x` : delete warning and critical logs +- `h` : show/hide help screen +- `q` : quit +- `w` : delete warning logs + +### Use Glances to Monitor Remote Systems ### + +You can also monitor remote systems using Glances. To use it on a remote system, use the following command: + + glances -s + +You will see an output like the following: + +![glances monitor remote system server](https://www.maketecheasier.com/assets/uploads/2015/12/glances_server.png) + +You will see Glances running on port 61209. + +Now, go to the remote machine and execute the following command to connect to a Glances server by specifying the IP address as shown below. For example, 192.168.1.10 is your Glances server IP address. + + glances -c -P 192.168.1.10 + +### Conclusion ### + +Glances is a very useful tool for every Linux system administrator. Using it, you can easily monitor your Linux system in less time. Feel free to comment if you have any questions. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/glances-monitor-system-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 e98d774219dc8570b61e838c94d783b70a02cc62 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 23 Dec 2015 17:32:31 +0800 Subject: [PATCH 0656/1710] =?UTF-8?q?20151204-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tor Linux System Performance Using Nmon.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sources/tech/20151223 Monitor Linux System Performance Using Nmon.md diff --git a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md new file mode 100644 index 0000000000..6f47649208 --- /dev/null +++ b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md @@ -0,0 +1,100 @@ +Monitor Linux System Performance Using Nmon +================================================================================ +Nmon (also known as Nigel’s Monitor) is a computer performance system monitor tool for the AIX and Linux operating systems developed by IBM employee Nigel Griffiths. The tool displays onscreen or saves to a data file the operating system statistics to aid in the understanding of computer resource use, tuning options and bottlenecks. This system benchmark tool gives you a huge amount of important performance information in one go with a single command. You can easily monitor your system’s CPU, memory, network, disks, file systems, NFS, top processes, resources and power micro-partition information using Nmon. + +### Installing Nmon ### + +By default nmon is available in the Ubuntu repository. You can easily install nmon by running the following command: + + sudo apt-get install nmon + +How to Use Nmon to Monitor Linux Performance + +Once the installation has been finished, you can launch it by typing the `nmon` command in the terminal. + + nmon + +You wI’ll see the following output: + +![nmon-output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon-output.png) + +You can see from the above screenshot that the nmon command-line utility runs completely in interactive mode, and you can easily toggle statistics using shortcut keys. + +You can use the following nmon keyboard shortcuts to display different system stats: + +- `q` : to stop and exit Nmon +- `h` : to see help screen +- `c` : see CPU stats +- `m` : see memory stats +- `d` : see disk stats +- `k` : see kernel stats +- `n` : see network stats +- `N` : see NFS stats +- `j` : see file system stats +- `t` : see top process +- `V` : see virtual memory stats +- `v` : verbose mode + +### Check CPU by Processor ### + +If you would like to collect some statistics on CPU performance, you should hit the c key on the keyboard. + +After hitting the c key you wI’ll see the following output. + +![nmon_cpu_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_cpu_output.png) + +### Check Top Process Statistics ### + +To get stats on top processes that are running on your system, press the t key on your keyboard. + +You will see the following output. + +![nmon_process_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_process_output.jpg) + +### Check Network Statistics ### + +To get the network stats of your Linux system, just press the n key on your keyboard. + +You wI’ll see the following output: + +![n_network_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_network_output.png) + +### Disk I/O Graphs ### + +Use the `d` key to get information about disks. + +You wI’ll see the following output: + +![nmon_disk_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_disk_output.png) + +### Check Kernel Information ### + +A most important key to use with this tool is `k;` it is used to display some brief information on the kernel of your system. + +You will see the following output after hitting the `k` key on your keyboard. + +![nmon_kernel_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_kernel_output.png) + +### Get System Information ### + +A very useful key for every system admin is the `r` key which is used to give information on different resources such as machine architecture, operating system version, Linux version and CPU. + +You will see the following output by hitting the `r` key. + +![nmon_system_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_system_output.png) + +### Conclusion ### + +There are many other tools that can do the same job of the Nmon, but Nmon is so usee friendly for a Linux beginner. Please feel free to comment if you have any questions. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/monitor-linux-system-performance/ + +作者:[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 0f62f73dcde9f3291e3f9905cdd96cc21e3d256d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 23 Dec 2015 17:45:14 +0800 Subject: [PATCH 0657/1710] =?UTF-8?q?=E9=80=89=E9=A2=98=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=86=99=E9=94=99=E4=BA=8620152323-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 选题日期写错了20152323-2 选题 --- .../20151223 How to Use Glances to Monitor System on Ubuntu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md index 14787025e9..b10e7ed47e 100644 --- a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md +++ b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md @@ -103,3 +103,4 @@ via: https://www.maketecheasier.com/glances-monitor-system-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://www.maketecheasier.com/author/hiteshjethva/ + From d0828a112dd69ac359e098e2f29471a1064c40c8 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 23 Dec 2015 17:45:44 +0800 Subject: [PATCH 0658/1710] =?UTF-8?q?=E9=80=89=E9=A2=98=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=86=99=E9=94=99=E4=BA=8620152323-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 选题日期写错了20152323-2 选题 --- .../tech/20151223 Monitor Linux System Performance Using Nmon.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md index 6f47649208..a0edd16870 100644 --- a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md +++ b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md @@ -98,3 +98,4 @@ via: https://www.maketecheasier.com/monitor-linux-system-performance/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://www.maketecheasier.com/author/hiteshjethva/ + From d16f505efbd81c72c391c926b2042e6f543d2c9f Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 23 Dec 2015 17:57:32 +0800 Subject: [PATCH 0659/1710] PUB:20150917 A Repository with 44 Years of Unix Evolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wi-cuckoo 太厉害了,这篇这么长,很多地方还很艰涩,亏你翻译的这么好。我校对都用了一整天呢。辛苦啦! --- ...ository with 44 Years of Unix Evolution.md | 220 ++++++++++++++++++ ...ository with 44 Years of Unix Evolution.md | 202 ---------------- 2 files changed, 220 insertions(+), 202 deletions(-) create mode 100755 published/20150917 A Repository with 44 Years of Unix Evolution.md delete mode 100755 translated/tech/20150917 A Repository with 44 Years of Unix Evolution.md diff --git a/published/20150917 A Repository with 44 Years of Unix Evolution.md b/published/20150917 A Repository with 44 Years of Unix Evolution.md new file mode 100755 index 0000000000..5c19f0180f --- /dev/null +++ b/published/20150917 A Repository with 44 Years of Unix Evolution.md @@ -0,0 +1,220 @@ +一个涵盖 Unix 44 年进化史的版本仓库 +============================================================================= + +http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html + +This is an HTML rendering of a working paper draft that led to a publication. The publication should always be cited in preference to this draft using the following reference: + +- **Diomidis Spinellis**. [A repository with 44 years of Unix evolution](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html). In MSR '15: Proceedings of the 12th Working Conference on Mining Software Repositories, pages 13-16. IEEE, 2015. Best Data Showcase Award. ([doi:10.1109/MSR.2015.6](http://dx.doi.org/10.1109/MSR.2015.6)) + +This document is also available in [PDF format](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.pdf). + +The document's metadata is available in [BibTeX format](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c-bibtex.html). + +This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author's copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder. + +[Diomidis Spinellis Publications](http://www.dmst.aueb.gr/dds/pubs/) + +© 2015 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE. + +### 摘要 ### + +Unix 操作系统的进化历史,可以从一个版本控制仓库中窥见,时间跨度从 1972 年的 5000 行内核代码开始,到 2015 年成为一个含有 26,000,000 行代码的被广泛使用的系统。该仓库包含 659,000 条提交,和 2306 次合并。仓库部署了被普遍采用的 Git 系统用于储存其代码,并且在时下流行的 GitHub 上建立了存档。它由来自贝尔实验室(Bell Labs),伯克利大学(Berkeley University),386BSD 团队所开发的系统软件的 24 个快照综合定制而成,这包括两个老式仓库和一个开源 FreeBSD 系统的仓库。总的来说,可以确认其中的 850 位个人贡献者,更早些时候的一批人主要做基础研究。这些数据可以用于一些经验性的研究,在软件工程,信息系统和软件考古学领域。 + +### 1、介绍 ### + +Unix 操作系统作为一个主要的工程上的突破而脱颖而出,得益于其模范的设计、大量的技术贡献、它的开发模型及广泛的使用。Unix 编程环境的设计已经被视为一个提供非常简洁、强大而优雅的设计 [[1][1]] 。在技术方面,许多对 Unix 有直接贡献的,或者因 Unix 而流行的特性就包括 [[2][2]] :用高级语言编写的可移植部署的内核;一个分层式设计的文件系统;兼容的文件,设备,网络和进程间 I/O;管道和过滤架构;虚拟文件系统;和作为普通进程的可由用户选择的不同 shell。很早的时候,就有一个庞大的社区为 Unix 贡献软件 [[3][3]] ,[[4][4],pp. 65-72] 。随时间流逝,这个社区不断壮大,并且以现在称为开源软件开发的方式在工作着 [[5][5],pp. 440-442] 。Unix 和其睿智的晚辈们也将 C 和 C++ 编程语言、分析程序和词法分析生成器(*yacc*,*lex*)、文档编制工具(*troff*,*eqn*,*tbl*)、脚本语言(*awk*,*sed*,*Perl*)、TCP/IP 网络、和配置管理系统(configuration management system)(*SCSS*,*RCS*,*Subversion*,*Git*)发扬广大了,同时也形成了现代互联网基础设施和网络的最大的部分。 + +幸运的是,一些重要的具有历史意义的 Unix 材料已经保存下来了,现在保持对外开放。尽管 Unix 最初是由相对严格的协议发行,但在早期的开发中,很多重要的部分是通过 Unix 的版权拥有者之一(Caldera International) (LCTT 译注:2002年改名为 SCO Group)以一个自由的协议发行。通过将这些部分再结合上由加州大学伯克利分校(University of California, Berkeley)和 FreeBSD 项目组开发或发布的开源软件,贯穿了从 1972 年六月二十日开始到现在的整个系统的开发。 + +通过规划和处理这些可用的快照以及或旧或新的配置管理仓库,将这些可用数据的大部分重建到一个新合成的 Git 仓库之中。这个仓库以数字的形式记录了过去44年来最重要的数字时代产物的详细的进化。下列章节描述了该仓库的结构和内容(第[2][6]节)、创建方法(第[3][7]节)和该如何使用(第[4][8]节)。 + +### 2、数据概览 ### + +这 1GB 的 Unix 历史仓库可以从 [GitHub][9] 上克隆^[1][10] 。如今^[2][11] ,这个仓库包含来自 850 个贡献者的 659,000 个提交和 2,306 个合并。贡献者有来自贝尔实验室(Bell Labs)的 23 个员工,伯克利大学(Berkeley University)的计算机系统研究组(Computer Systems Research Group)(CSRG)的 158 个人,和 FreeBSD 项目的 660 个成员。 + +这个仓库的生命始于一个 *Epoch* 的标签,这里面只包含了证书信息和现在的 README 文件。其后各种各样的标签和分支记录了很多重要的时刻。 + +- *Research-VX* 标签对应来自贝尔实验室(Bell Labs)六个研究版本。从 *Research-V1* (4768 行 PDP-11 汇编代码)开始,到以 *Research-V7* (大约 324,000 行代码,1820 个 C 文件)结束。 +- *Bell-32V* 是第七个版本 Unix 在 DEC/VAX 架构上的移植。 +- *BSD-X* 标签对应伯克利大学(Berkeley University)释出的 15 个快照。 +- *386BSD-X* 标签对应该系统的两个开源版本,主要是 Lynne 和 William Jolitz 写的适用于 Intel 386 架构的内核代码。 +- *FreeBSD-release/X* 标签和分支标记了来自 FreeBSD 项目的 116 个发行版。 + +另外,以 *-Snapshot-Development* 为后缀的分支,表示该提交由来自一个以时间排序的快照文件序列而合成;而以一个 *-VCS-Development* 为后缀的标签,标记了有特定发行版出现的历史分支的时刻。 + +仓库的历史包含从系统开发早期的一些提交,比如下面这些。 + + 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 + +两个发布之间的合并代表着系统发生了进化,比如 BSD 3 的开发来自 BSD2 和 Unix 32/V,它在 Git 仓库里正是被表示为带两个父节点的图形节点。 + +更为重要的是,以这种方式构造的仓库允许 **git blame**,就是可以给源代码行加上注释,如版本、日期和它们第一次出现相关联的作者,这样可以知道任何代码的起源。比如说,检出 **BSD-4** 这个标签,并在内核的 *pipe.c* 文件上运行一下 git blame,就会显示出由 Ken Thompson 写于 1974,1975 和 1979年的代码行,和 Bill Joy 写于 1980 年的。这就可以自动(尽管计算上比较费事)检测出任何时刻出现的代码。 + +![](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/provenance.png) + +*图1:各个重大 Unix 发行版的代码来源* + +如[上图][12]所示,现代版本的 Unix(FreeBSD 9)依然有相当部分的来自 BSD 4.3,BSD 4.3 Net/2 和 BSD 2.0 的代码块。有趣的是,这图片显示有部分代码好像没有保留下来,当时激进地要创造一个脱离于伯克利(386BSD 和 FreeBSD 1.0)所释出代码的开源操作系统。FreeBSD 9 中最古老的代码是一个 18 行的队列,在 C 库里面的 timezone.c 文件里,该文件也可以在第七版的 Unix 文件里找到,同样的名字,时间戳是 1979 年一月十日 - 36 年前。 + +### 3、数据收集和处理 ### + +这个项目的目的是以某种方式巩固从数据方面说明 Unix 的进化,通过将其并入一个现代的版本仓库,帮助人们对系统进化的研究。项目工作包括收录数据,分类并综合到一个单独的 Git 仓库里。 + +![](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/branches.png) + +*图2:导入 Unix 快照、仓库及其合并* + +项目以三种数据类型为基础(见[图2][13])。首先,早期发布版本的快照,获取自 [Unix 遗产社会归档(Unix Heritage Society archive)][14]^[3][15] 、包括了 CSRG 全部的源代码归档的 [CD-ROM 镜像][16]^[4][17] , [Oldlinux 网站][18]^[5][19] 和 [FreeBSD 归档][20]^[6][21] 。 其次,以前的和现在的仓库,即 CSRG SCCS [[6][22]] 仓库,FreeBSD 1 CVS 仓库,和[现代 FreeBSD 开发的 Git 镜像][23]^[7][24] 。前两个都是从和快照相同的来源获得的。 + +最后,也是最费力的数据源是 **初步研究(primary research)**。释出的快照并没有提供关于它们的源头和每个文件贡献者的信息。因此,这些信息片段需要通过初步研究(primary research)验证。至于作者信息主要通过作者的自传,研究论文,内部备忘录和旧文档扫描件;通过阅读并且自动处理源代码和帮助页面补充;通过与那个年代的人用电子邮件交流;在 *StackExchange* 网站上贴出疑问;查看文件的位置(在早期的内核版本的源代码,分为 `usr/sys/dmr` 和 `/usr/sys/ken` 两个位置);从研究论文和帮助手册披露的作者找到源代码,从一个又一个的发行版中获取。(有趣的是,第一和第二的研究版(Research Edition)帮助页面都有一个 “owner” 部分,列出了作者(比如,*Ken*)及对应的系统命令、文件、系统调用或库函数。在第四版中这个部分就没了,而在 BSD 发行版中又浮现了 “Author” 部分。)关于作者信息更为详细地写在了项目的文件中,这些文件被用于匹配源代码文件和它们的作者和对应的提交信息。最后,关于源代码库之间的合并信息是获取自[ NetBSD 项目所维护的 BSD 家族树][25]^[8][26] 。 + +作为本项目的一部分而开发的软件和数据文件,现在可以[在线获取][27]^[9][28] ,并且,如果有合适的网络环境,CPU 和磁盘资源,可以用来从头构建这样一个仓库。关于主要发行版的作者信息,都存储在本项目的 `author-path` 目录下的文件里。它们的内容中带有正则表达式的文件路径后面指出了相符的作者。可以指定多个作者。正则表达式是按线性处理的,所以一个文件末尾的匹配一切的表达式可以指定一个发行版的默认作者。为避免重复,一个以 `.au` 后缀的独立文件专门用于映射作者的识别号(identifier)和他们的名字及 email。这样一个文件为每个与该系统进化相关的社区都建立了一个:贝尔实验室(Bell Labs),伯克利大学(Berkeley University),386BSD 和 FreeBSD。为了真实性的需要,早期贝尔实验室(Bell Labs)发行版的 emails 都以 UUCP 注释(UUCP notation)方式列出(例如, `research!ken`)。FreeBSD 作者的识别映射,需要导入早期的 CVS 仓库,通过从如今项目的 Git 仓库里拆解对应的数据构建。总的来说,由 1107 行构成了注释作者信息的文件(828 个规则),并且另有 640 行用于映射作者的识别号到名字。 + +现在项目的数据源被编码成了一个 168 行的 `Makefile`。它包括下面的步骤。 + +**Fetching** 从远程站点复制和克隆大约 11GB 的镜像、归档和仓库。 + +**Tooling** 从 2.9 BSD 中为旧的 PDP-11 归档获取一个归档器,并调整它以在现代的 Unix 版本下编译;编译 4.3 BSD 的 *compress* 程序来解压 386BSD 发行版,这个程序不再是现代 Unix 系统的组成部分了。 + +**Organizing** 用 *tar* 和 *cpio* 解压缩包;合并第六个研究版的三个目录;用旧的 PDP-11 归档器解压全部一个 BSD 归档;挂载 CD-ROM 镜像,这样可以作为文件系统处理;合并第 8 和 62 的 386BSD 磁盘镜像为两个独立的文件。 + +**Cleaning** 恢复第一个研究版的内核源代码文件,这个可以通过 OCR 从打印件上得到近似其原始状态的的格式;给第七个研究版的源代码文件打补丁;移除发行后被添加进来的元数据和其他文件,为避免得到错误的时间戳信息;修复毁坏的 SCCS 文件;用一个定制的 Perl 脚本移除指定到多个版本的 CVS 符号、删除与现在冲突的 CVS *Attr* 文件、用 *cvs2svn* 将 CVS 仓库转换为 Git 仓库,以处理早期的 FreeBSD CVS 仓库。 + +在仓库再现(representation)中有一个很有意思的部分就是,如何导入那些快照,并以一种方式联系起来,使得 *git blame* 可以发挥它的魔力。快照导入到仓库是基于每个文件的时间戳作为一系列的提交实现的。当所有文件导入后,就被用对应发行版的名字给标记了。然后,可以删除那些文件,并开始导入下一个快照。注意 *git blame* 命令是通过回溯一个仓库的历史来工作的,并使用启发法(heuristics)来检测文件之间或文件内的代码移动和复制。因此,删除掉的快照间会产生中断,以防止它们之间的代码被追踪。 + +相反,在下一个快照导入之前,之前快照的所有文件都被移动到了一个隐藏的后备目录里,叫做 `.ref`(引用)。它们保存在那,直到下个快照的所有文件都被导入了,这时候它们就会被删掉。因为 `.ref` 目录下的每个文件都精确对应一个原始文件,*git blame* 可以知道多少源代码通过 `.ref` 文件从一个版本移到了下一个,而不用显示出 `.ref` 文件。为了更进一步帮助检测代码起源,同时增加再现(representation)的真实性,每个发行版都被再现(represented)为一个有增量文件的分支(*-Development*)与之前发行版之间的合并。 + +上世纪 80 年代时期,只有伯克利(Berkeley) 开发的文件的一个子集是用 SCCS 版本控制的。在那个期间,我们的统一仓库里包含了来自 SCCS 的提交和快照的增量文件的导入数据。对于每个发行版,可用最近的时间戳找到该 SCCS 提交,并被标记为一个与发行版增量导入分支的合并。这些合并可以在[图2][29] 的中间看到。 + +将各种数据资源综合到一个仓库的工作,主要是用两个脚本来完成的。一个 780 行的 Perl 脚本(`import-dir.pl`)可以从一个单独的数据源(快照目录、SCCS 仓库,或者 Git 仓库)中,以 *Git fast export* 格式导出(真实的或者综合的)提交历史。输出是一个简单的文本格式,Git 工具用这个来导入和导出提交。其他方面,这个脚本以一些东西为参数,如文件到贡献者的映射、贡献者登录名和他们的全名间的映射、哪个导入的提交会被合并、哪些文件要处理和忽略、以及“引用”文件的处理。一个 450 行的 Shell 脚本创建 Git 仓库,并调用带适当参数的 Perl 脚本,来导入 27 个可用的历史数据资源。Shell 脚本也会运行 30 个测试,比较特定标签的仓库和对应的数据源,核对查看的目录中出现的和没出现的,并回溯查看分支树和合并的数量,*git blame* 和 *git log* 的输出。最后,调用 *git* 作垃圾收集和仓库压缩,从最初的 6GB 降到分发的 1GB 大小。 + +### 4、数据使用 ### + +该数据可以用于软件工程、信息系统和软件考古学(software archeology)领域的经验性研究。鉴于它从不间断而独一无二的存在了超过了 40 年,可以供软件进化和跨代更迭参考。从那时以来,处理速度已经成千倍地增长、存储容量扩大了百万倍,该数据同样可以用于软件和硬件技术交叉进化(co-evolution)的研究。软件开发从研究中心到大学,到开源社区的转移,可以用来研究组织文化对于软件开发的影响。该仓库也可以用于学习著名人物的实际编程,比如 Turing 奖获得者(Dennis Ritchie 和 Ken Thompson)和 IT 产业的大佬(Bill Joy 和 Eric Schmidt)。另一个值得学习的现象是代码的长寿,无论是单行的水平,或是作为那个时代随 Unix 发布的完整的系统(Ingres、 Lisp、 Pascal、 Ratfor、 Snobol、 TMP),和导致代码存活或消亡的因素。最后,因为该数据让 Git 感到了压力,底层的软件仓库存储技术达到了其极限,这会推动版本管理系统领域的工程进度。 + +![](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/metrics.png) + +*图3:Unix 发行版的代码风格进化* + +[图3][30] 根据 36 个主要 Unix 发行版描述了一些有趣的代码统计的趋势线(用 R 语言的局部多项式回归拟合函数生成),验证了代码风格和编程语言的使用在很长的时间尺度上的进化。这种进化是软硬件技术的需求和支持、软件构筑理论,甚至社会力量所驱动的。图片中的日期计算了出现在一个给定发行版中的所有文件的平均日期。正如可以从中看到,在过去的 40 年中,标示符和文件名字的长度已经稳步从 4 到 6 个字符增长到 7 到 11 个字符。我们也可以看到注释数量的少量稳步增加,以及 *goto* 语句的使用量减少,同时 *register* 这个类型修饰符的消失。 + +### 5、未来的工作 ### + +可以做很多事情去提高仓库的正确性和有效性。创建过程以开源代码共享了,通过 GitHub 的拉取请求(pull request),可以很容易地贡献更多代码和修复。最有用的社区贡献将使得导入的快照文件的覆盖面增长,以便归属于某个具体的作者。现在,大约 90,000 个文件(在 160,000 总量之外)通过默认规则指定了作者。类似地,大约有 250 个作者(最初 FreeBSD 那些)仅知道其识别号。两个都列在了 build 仓库的 unmatched 目录里,欢迎贡献数据。进一步,BSD SCCS 和 FreeBSD CVS 的提交共享相同的作者和时间戳,这些可以结合成一个单独的 Git 提交。导入 SCCS 文件提交的支持会被添加进来,以便引入仓库对应的元数据。最后,也是最重要的,开源系统的更多分支会添加进来,比如 NetBSD、 OpenBSD、DragonFlyBSD 和 *illumos*。理想情况下,其他历史上重要的 Unix 发行版,如 System III、System V、 NeXTSTEP 和 SunOS 等的当前版权拥有者,也会在一个允许他们的合作伙伴使用仓库用于研究的协议下释出他们的系统。 + +### 鸣谢 ### + +本文作者感谢很多付出努力的人们。 Brian W. Kernighan, Doug McIlroy 和 Arnold D. Robbins 在贝尔实验室(Bell Labs)的登录识别号方面提供了帮助。 Clem Cole, Era Erikson, Mary Ann Horton, Kirk McKusick, Jeremy C. Reed, Ingo Schwarze 和 Anatole Shaw 在 BSD 的登录识别号方面提供了帮助。BSD SCCS 的导入代码是基于 H. Merijn Brand 和 Jonathan Gray 的工作。 + +这次研究由欧盟 ( 欧洲社会基金(European Social Fund,ESF)) 和 希腊国家基金(Greek national funds)通过国家战略参考框架( National Strategic Reference Framework ,NSRF) 的 Operational Program " Education and Lifelong Learning" - Research Funding Program: Thalis - Athens University of Economics and Business - Software Engineering Research Platform ,共同出资赞助。 + +### 引用 ### + +[[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. + +---------- + +#### 脚注 #### + +[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 + +作者:Diomidis Spinellis +译者:[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.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 diff --git a/translated/tech/20150917 A Repository with 44 Years of Unix Evolution.md b/translated/tech/20150917 A Repository with 44 Years of Unix Evolution.md deleted file mode 100755 index 43b3b9e219..0000000000 --- a/translated/tech/20150917 A Repository with 44 Years of Unix Evolution.md +++ /dev/null @@ -1,202 +0,0 @@ -一个涵盖 Unix 44 年进化史的仓库 -============================================================================= -### 摘要 ### - -Unix 操作系统的进化历史,可以从一个版本控制的仓库中窥见,时间跨越从 1972 年以 5000 行内核代码的出现,到 2015 年成为一个含有 26,000,000 行代码的被广泛使用的系统。该仓库包含 659,000 条提交,和 2306 次合并。仓库部署被普遍采用的 Git 系统储存其代码,并且在时下流行的 GitHub 上建立了档案。它综合了系统定制软件的 24 个快照,都是开发自贝尔实验室,伯克利大学,386BSD 团队,两个传统的仓库 和 开源 FreeBSD 系统的仓库。总的来说,850 位个人贡献者已经确认,更早些时候的一批人主要做基础研究。这些数据可以用于一些经验性的研究,在软件工程,信息系统和软件考古学领域。 - -### 1 介绍 ### - -Unix 操作系统作为一个主要的工程上的突破而脱颖而出,得益于其模范的设计,大量的技术贡献,它的开发模型和广泛的使用。Unix 编程环境的设计已经被标榜为一个能提供非常简洁,功能强大并且优雅的设计[[1][1]]。在技术方面,许多对 Unix 有直接贡献的,或者因 Unix 而流行的特性就包括[[2][2]]:用高级语言编写的可移植部署的内核;一个分层式设计的文件系统;兼容的文件,设备,网络和进程间 I/O;管道和过滤架构;虚拟文件系统;和用户可选的 shell。很早的时候,就有一个庞大的社区为 Unix 贡献软件[[3][3]],[[4][4]],pp. 65-72]。随时间流走,这个社区不断壮大,并且以现在称为开源软件开发的方式在工作着[[5][5],pp. 440-442]。Unix 和其睿智的晚辈们也将 C 和 C++ 编程语言,分析程序和词法分析生成器(*yacc,lex*),发扬光大了,文档编制工具(*troff,eqn,tbl*),脚本语言(*awk,sed,Perl*),TCP/IP 网络,和配置管理系统(*SCSS,RCS,Subversion,Git*)发扬广大了,同时也形成了大部分的现代互联网基础设施和网络。 - -幸运的是,一些重要的具有历史意义的 Unix 材料已经保存下来了,现在保持对外开放。尽管 Unix 最初是由相对严格的协议发行,但在早期的开发中,很多重要的部分是通过 Unix 的某个版权拥有者以一个自由的协议发行。然后将这些部分再结合开发的软件或者以开源发行的软件,Berkeley,Californai 大学和 FreeBSD 项目组从 1972 年六月二十日开始到现在,提供了涵盖整个系统的开发。 - -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. 数据概览 ### - -这 1GB 的 Unix 仓库可以从 [GitHub][9] 克隆。[1][10]如今[2][11],这个仓库包含来自 850 个贡献者的 659,000 个提交和 2306 个合并。贡献者有来自 Bell 实验室的 23 个员工,Berkeley 计算机系统研究组(CSRG)的 158 个人,和 FreeBSD 项目的 660 个成员。 - -这个仓库的生命始于一个 *Epoch* 的标签,这里面只包含了证书信息和现在的 README 文件。其后各种各样的标签和分支记录了很多重要的时刻。 - -- *Research-VX* 标签对应来自 Bell 实验室六次的研究版本。从 *Research-V1* (PDP-11 4768 行汇编代码)开始,到以 *Research-V7* (大约 324,000 行代码,1820 个 C 文件)结束。 -- *Bell-32V* 是 DEC/VAX 架构的 Unix 第七个版本的一部分。 -- *BSD-X* 标签对应 Berkeley 释出的 15 个快照。 -- *386BSD-X* 标签对应系统的两个开源版本,主要是 Lynne 和 William Jolitz 写的 适用于 Intel 386 架构的内核代码。 -- *FreeBSD-release/X* 标签和分支标记了来自 FreeBSD 项目的 116 个发行版。 - -另外,以 *-Snapshot-Development* 为后缀的分支,表示一个被综合的以时间排序的快照文件序列的一些提交,而以一个 *-VCS-Development* 为后缀的标签,标记了有特别发行版出现的历史分支的时刻。 - -仓库的历史包含从系统开发早期的一些提交,比如下面这些。 - - 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 - -释出间隙的合并随着系统进化而发生,比如 从 BSD 2 到 BSD 3 的开发,Unix 32/V 也是正确地代表了 Git 仓库里带两个父节点的图形节点。(这太莫名其妙了) - -更为重要的是,该仓库的构造方式允许 **git blame**,就是可以给源代码加上注释,如版本,日期和它们第一次出现相关联的作者,这样可以知道任何代码的起源。比如说 **BSD-4** 这个标签,在内核的 *pipe.c* 文件上运行一下 git blame,就会显示代码行由 Ken Thompson 写于 1974,1975 和 1979年,Bill Joy 写于 1980 年。这就可以自动(尽管计算上比较费事)检测出任何时刻出现的代码。 - -![](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/provenance.png) - -Figure 1: Code provenance across significant Unix releases. - -如上图[12]所示,现代版本的 Unix(FreeBSD 9)依然有来自 BSD 4.3,BSD 4.3 Net/2 和 BSD 2.0 的代码块。有趣的是,这图片显示有部分代码好像没有保留下来,当时激进地要创造一个脱离于 Berkeyel(386BSD 和 FreeBSD 1.0)释出代码的开源操作系统,其所开发的代码。FreeBSD 9 中最古老的代码是一个 18 行的队列,在 C 库里面的 timezone.c 文件里,该文件也可以在第七版的 Unix 文件里找到,同样的名字,时间戳是 1979 年一月十日 - 36 年前。 - -### 数据收集和处理 ### - -这个项目的目的是以某种方式巩固从数据方面说明 Unix 的进化,通过将其并入一个现代的修订仓库,帮助人们对系统进化的研究。项目工作包括收录数据,分类并综合到一个单独的 Git 仓库里。 - -![](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/branches.png) - -Figure 2: Imported Unix snapshots, repositories, and their mergers. - -项目以三种数据类型为基础(见 Figure [2][13])。首先,早些发布的版本快照,是从 [Unix Heritage Society archive][14] 中获得,[2][15] 在 [CD-ROM 镜像][16] 中包括 CSRG 全部的源包,[4][17] [Oldlinux site],[5][19] 和 [FreeBSD 包][20]。[6][21] 其次,以前的,现在的仓库,也就是 CSRG SCCS [[6][22]] 仓库,FreeBSD 1 CVS 仓库,和[现代 FreeBSD 开发的 Git 镜像][23]。[7][24]前两个都是从相同的源获得而作为对应的快照。 - -最后,也是最费力的数据源是 **primary research**。释出的快照并没有提供关于它们的源头和每个文件贡献者的信息。因此,这些信息片段需要通过 primary research 验证。至于作者信息主要通过作者的自传,研究论文,内部备忘录和旧文档扫描;通过阅读并且自动处理源代码和帮助页面补充;通过与那个年代的人用电子邮件交流;在 *StackExchange* 网站上贴出疑问;查看文件的位置(在早期的内核源代码版本中,分为 `usr/sys/dmr` 和 `/usr/sys/ken`);从研究论文和帮助手册到源代码,从一个发行版到另一个发行版地宣传中获取。(有趣的是,第一和第二的研究版帮助页面都有一个 “owner” 部分,列出了作者(比如,*Ken*)与对应的系统命令,文件,系统调用,或者功能库。在第四版中这个部分就没了,而在 BSD 发行版中又浮现了 “Author” 部分。)关于作者信息更为详细地写在了项目的文件中,这些文件被用于匹配源代码文件和它们的作者和对应的提交信息。最后,information regarding merges between source code bases was obtained from a [BSD family tree maintained by the NetBSD project][25].[8][26](不好组织这个语言) - -作为该项目的一部分而开发的软件和数据文件,现在可以[在线获取][27],[9][28],并且,如果有合适的网络环境,CPU 和磁盘资源,可以用来从头构建这样一个仓库。关于主要发行版的所有者信息,都存储在该项目 `author-path` 目录下的文件里。These contain lines with a regular expressions for a file path followed by the identifier of the corresponding author.(这句单词都认识,但是不理解具体意思)也可以制定多个作者。正则表达式是按线性处理的,所以一个文件末尾的匹配一切的表达式可以指定一个发行版的默认作者。为避免重复,一个以 `.au` 后缀的独立文件专门用于映射作者身份到他们的名字和 email。这样一个文件为每个社区建立了一个,以关联系统的进化:Bell 实验室,Berkeley,386BSD 和 FreeBSD。为了真实性的需要,早期 Bell 实验室发行版的 emails 都以 UUCP 注释列出了(e.g. `research!ken`)。FreeBSD 作者的鉴定人图谱,需要导入早期的 CVS 仓库,通过从如今项目的 Git 仓库里解压对应的数据构建。总的来说,注释作者信息的文件(828 rules)包含 1107 行,并且另外 640 映射作者鉴定人到名字。 - -现在项目的数据源被编码成了一个 168 行的 `Makefile`。它包括下面的步骤。 - -**Fetching** 从远程站点复制和克隆大约 11GB 的镜像,档案和仓库。 - -**Tooling** 从 2.9 BSD 中为旧的 PDP-11 档案获取一个归档器,并作出调整来在现代的 Unix 版本下编译;编译 4.3 BSD *compress* 程序来解压 386BSD 发行版,这个程序不再是现代 Unix 系统的组成部分了。 - -**Organizing** 用 tar 和 *cpio* 解压缩包;结合第六版的三个目录;用旧的 PDP-11 归档器解压所有的 1 BSD 档案;挂载 CD-ROM 镜像,这样可以作为文件系统处理;组合 8 和 62 386BSD 散乱的磁盘镜像为两个独立的文件。 - -**Cleaning** 重新存储第一版的内核源代码文件,这个可以通过合适的字符识别从打印输出用获取;给第七版的源代码文件打补丁;移除一个发行版后被添加进来的元数据和其他文件,为避免得到错误的时间戳信息;修复毁坏的 SCCS 文件;通过移除 CVS symbols assigned to multiple revisions with a custom Perl script,删除 CVS *Attr* 文件和用 *cvs2svn* 将 CVS 仓库转换为 Git 仓库,来处理早期的 FreeBSD CVS 仓库。 - -在仓库表述中有一个很有意思的部分就是,如何导入那些快照,并以一种方式联系起来,使得 *git blame* 可以发挥它的魔力。快照导入到仓库是作为一系列的提交实现的,根据每个文件的时间戳。当所有文件导入后,就被用对应发行版的名字给标记了。在这点上,一个人可以删除那些文件,并开始导入下一个快照。注意 *git blame* 命令是通过回溯一个仓库的历史来工作的,并使用启发法来检测文件之间或内部的代码移动和复制。因此,删除掉的快照间会产生中断,防止它们之间的代码被追踪。 - -相反,在下一个快照导入之前,之前快照的所有文件都被移动到了一个隐藏的后备目录里,叫做 `.ref`(引用)。它们保存在那,直到下个快照的所有文件都被导入了,这时候它们就会被删掉。因为 `.ref` 目录下的每个文件都完全配对一个原始文件,*git blame* 可以知道多少源代码通过 `.ref` 文件从一个版本移到了下一个,而不用显示出 `.ref` 文件。为了更进一步帮助检测代码起源,同时增加表述的真实性,每个发行版都被表述成了一个合并,介于有增加文件的分支(*-Development*)与之前发行版之间的合并。 - -上世纪 80 年代这个时期,只有 Berkeley 开发文件的一个子集是用 SCCS 版本控制的。整个时期内,我们统一的仓库里包含了来自 SCCS 的提交和快照增加的文件。在每个发行版的时间点上,可以发现 SCCS 最近的提交,被标记成一个发行版中增加的导入分支的合并。这些合并可以在 Figure [2][29] 中间看到。 - -将各种数据资源综合到一个仓库的工作,主要是用两个脚本来完成的。一个 780 行的 Perl 脚本(`import-dir.pl`)可以从一个单独的数据源(快照目录,SCCS 仓库,或者 Git 仓库)中,以 *Git fast export* 格式导出(真实的或者综合的)提交历史。输出是一个简单的文本格式,Git 工具用这个来导入和导出提交。其他方面,这个脚本以一些东西为参数,如文件到贡献者的映射,贡献者登录名和他们的全名间的映射,导入的提交会被合并,哪些文件要处理,哪些文件要忽略,和“引用”文件的处理。一个 450 行的 Shell 脚本创建 Git 仓库,并调用带适当参数的 Perl 脚本,导入 27 个可用的历史数据资源。Shell 脚本也会跑 30 遍测试,比较特定标签的仓库和对应的数据源,确认出现的和没出现的备用目录,并查看分支树和合并的数量,*git blame* 和 *git log* 的输出中的退化。最后,*git* 被调用来作垃圾收集和压缩仓库,从最初的 6GB 降到发行的 1GB。 - -### 4 数据使用 ### - -数据可以用于软件工程,信息系统和软件考古学领域的经验性研究。鉴于它从不间断而独一无二的存在了超过了 40 年,可以供软件的进化和代代更迭参考。伴随那个时代以来在处理速度千倍地增长,存储容量百万倍的扩大,数据同样可以用于软件和硬件技术交叉进化的研究。软件开发从研究中心到大学,到开源社区的转移,可以用来研究组织文化对于软件开发的影响。仓库也可以用于学习开发者编程的影响力,比如 Turing 奖获得者(Dennis Ritchie 和 Ken Thompson)和 IT 产业的大佬(Bill Joy 和 Eric Schmidt)。另一个值得学习的现象是代码的长寿,无论是单行的水平,或是作为那个时代随 Unix 发行的完整的系统(Ingres, Lisp, Pascal, Ratfor, Snobol, TMP),和导致代码存活或消亡的因素。最后,因为数据使 Git 底层软件仓库存储技术感到压力,到了它的限度,这会加速修正管理系统领域的工程进度。 - -![](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] 描述了一些有趣的代码统计,根据 36 个主要 Unix 发行版,验证了代码风格和编程语言的使用在很长的时间尺度上的进化。这种进化是软硬件技术的需求和支持驱动的,软件构筑理论,甚至社会力量。图片中的数据已经计算了在一个所给发行版中出现的文件的平均时间。正如可以从中看到,在过去的 40 年中,验证器和文件名字的长度已经稳定从 4 到 6 个字符增长到 7 到 11 个字符。我们也可以看到在评论数量的少量稳定增加,和 *goto* 表达的使用量减少,同时 *register* 这个类型修改器的消失。 - -### 5 未来的工作 ### - -可以做很多事情去提高仓库的正确性和有效性。创建进程作为源代码开源了,通过 GitHub 的拉取请求,可以很容易地贡献更多代码和修复。最有用的社区贡献会使得导入的快照文件的覆盖增长,这曾经是隶属于一个具体的作者。现在,大约 90,000 个文件(在 160,000 总量之外)被指定了作者,根据一个默认的规则。类似地,大约有 250 个作者(最初 FreeBSD 那些)是验证器确认的。两个都列在了 build 仓库无配对的目录里,也欢迎贡献数据。进一步,BSD SCCS 和 FreeBSD CVS 的提交,共享相同的作者和时间戳,这些可以结合成一个单独的 Git 提交。导入 SCCS 文件提交的支持会被添加进来,为了引入仓库对应的元数据。最后,最重要的,开源系统的更多分支会添加进来,比如 NetBSD OpenBSD, DragonFlyBSD 和 *illumos*。理想地,其他重要的历史上的 Unix 发行版,它们的版权拥有者,如 System III, System V, NeXTSTEP 和 SunOS,也会在一个协议下释出他们的系统,允许他们的合作伙伴使用仓库用于研究。 - -### 鸣谢 ### - -本人感谢很多付出努力的人们。 Brian W. Kernighan, Doug McIlroy 和 Arnold D. Robbins 帮助 Bell 实验室开发了登录验证器。 Clem Cole, Era Erikson, Mary Ann Horton, Kirk McKusick, Jeremy C. Reed, Ingo Schwarze 和 Anatole Shaw 开发了 BSD 的登录验证器。BSD SCCS 导入了 H. Merijn Brand 和 Jonathan Gray 的开发工作的代码。 - -这次研究通过 National Strategic Reference Framework (NSRF) 的 Operational Program " Education and Lifelong Learning" - Research Funding Program: Thalis - Athens University of Economics and Business - Software Engineering Research Platform,由 European Union ( European Social Fund - ESF) 和 Greek national funds 出资赞助。 - -### 引用 ### - -[[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 - -译者:[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.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 From bbdb9d470504664c71abe775b5a12bc4755516cc Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 23 Dec 2015 22:39:49 +0800 Subject: [PATCH 0660/1710] [translated]Learn with Linux--Learning Music --- .../Learn with Linux--Learning Music.md | 156 ------------------ .../Learn with Linux--Learning Music.md | 153 +++++++++++++++++ 2 files changed, 153 insertions(+), 156 deletions(-) delete mode 100644 sources/tech/Learn with Linux/Learn with Linux--Learning Music.md create mode 100644 translated/tech/Learn with Linux/Learn with Linux--Learning Music.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 deleted file mode 100644 index f9675d59ce..0000000000 --- a/sources/tech/Learn with Linux/Learn with Linux--Learning Music.md +++ /dev/null @@ -1,156 +0,0 @@ -bazz2 -Learn with Linux: Learning Music -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-featured.png) - -[Linux 学习系列][1]的所有文章: - -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] - -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 - -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 diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md b/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md new file mode 100644 index 0000000000..c732344a19 --- /dev/null +++ b/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md @@ -0,0 +1,153 @@ +Linux 教学之教你玩音乐 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-featured.png) + +[Linux 学习系列][1]的所有文章: + +- [Linux 教学之教你练打字][2] +- [Linux 教学之物理模拟][3] +- [Linux 教学之教你玩音乐][4] +- [Linux 教学之两款地理软件][5] +- [Linux 教学之掌握数学][6] + +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 + +学习音乐是一个很好的消遣方式。训练你的耳朵能识别音阶与和弦、掌握一门乐器、控制自己的嗓音,这些都需要大量的练习,以及会遇到很多困难。音乐理论非常博大精深,有太多东西需要记忆,你需要非常勤奋才能讲这些东西变成你的“技术”。在你的音乐之路上,Linux 提供了杰出的软件来帮助你前行。它们不能让你立刻成为一个音乐家,但可以作为一个降低学习难度的好助手。 + +### Gnu Solfège ### + +[Solfège][7] 是一个世界流行的音乐教学工具,适用于各个级别的音乐教育。很多流行的教学方法(比如著名的柯达伊教学法)就使用 Solfège 作为它们的基础。相比于学到音乐知识,Solfège 更关注于让用户不断练习音乐。它假想的用户是那些已经有一些音乐基础,并且想不断练习音乐技巧的学生。 + +以下是 GNU 网站的开发者声明: + +> “当你在高校、学院、音乐学校中学习音乐,你一般要进行的一些听力训练,比如视唱,会比较简单,但是通常需要两个人配合,一个问,一个答。[...] GNU Solfège 尝试着解决这个问题,你可以在没有其他人的帮助下完成更多的简单机械式练习。只是别忘了这些练习只是整个音乐训练过程的一部分。” + +这款软件兑现了它的承诺,你可以在试听帮手的帮助下练习几乎所有音乐技巧。 + +Debian 和 Ubuntu 的远端库上有这款软件,在终端运行下面命令安装软件: + + sudo apt-get install solfege + +它开启的时候会出现一个简单的开始界面。 + +![learnmusic-solfege-main](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-solfege-main.png) + +这些选项几乎包含了所有种类,大多数链接里面都有子类,你可以从中选择独立的练习。 + +![learnmusic-solfege-scales](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-solfege-scales.png) + +![learnmusic-solfege-hun](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-solfege-hun.png) + +软件提供多种练习和测试项目,都能通过外接的 MIDI 设备(LCTT 译注:MIDI,Musical Instrument Digital Interface,乐器数字接口)或者声卡来播放音乐。这些练习还配合音符播放,以及支持慢动作回放功能。 + +很重要的一点是如果你在 Ubuntu 下使用 Solfège,默认情况下你可能没法听到声音(除非你有外接 MIDI 设备)。如果出现了这种情况,点击“File -> Prefernces -> Sound Setup”,选择合适的设备(一般情况下选 ALSA 都能解决问题)。 + +![learnmusic-solfege-midi](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-solfege-midi.png) + +Solfège 对你的日常练习非常有帮助,经常使用它,可以在你开始唱 do-re-mi 之前练好你的音乐听觉。 + +### Tete (听力训练) ### + +[Tete][8] (这款听力训练软件)是一款简单但有效的 JAVA 软件,用于[训练听力][9]。它通过在不同背景下播放不同和弦以及不同 MIDI 声音来训练你分辨不同的音阶。[从 SourceForge 下载][10],然后解压它。 + + unzip Tete-* + +进入解压出来的目录: + + cd Tete-* + +这里假设你的系统已经安装好了 JAVA,你可以使用下面的命令执行 Java 文件: + + java -jar Tete-[版本号] + +(可以在输入“Tete-”后按 Tab 键进行自动补全。) + +Tete 只有一个简单的界面,所有内容都在这里了。 + +![learnmusic-tete-main](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-tete-main.png) + +你可以选择表演音阶(见上图),和弦(下图), + +![learnmusic-tete-chords](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-tete-chords.png) + +或音程。 + +![learnmusic-tete-intervals](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-tete-intervals.png) + +你可以“精调”很多选项,包括 midi 乐器的声音、提升或降低音阶以及回放的快慢等等。SourceForge 网站上有关于 Tete 的非常有用的教程,介绍了这个软件的各个方面。 + +### JalMus ### + +Jalmus 是用 JAVA 写的键盘音符阅读训练器。可以外接 MIDI 键盘,也可以使用虚拟键盘。它提供很多简单的课程练习来训练你的音符阅读能力。这个软件在2013年之后就不再更新了,但还是比较实用的。 + +进入[sourceforge 页面][11]下载最后版本(v2.3)的 JAVA 安装器,或者在终端输入下面的命令下载: + + wget http://garr.dl.sourceforge.net/project/jalmus/Jalmus-2.3/installjalmus23.jar + +下载完成后,加载安装器: + + java -jar installjalmus23.jar + +跨平台的 JAVA 安装器会一步一步引导你完成安装的。 + +Jalmus 的主界面非常朴素。 + +![learnmusic-jalmus-main](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-main.jpg) + +你可以在“Lessons”菜单中找到各种不同难度的课程,从非常简单(一行音符从左边向右滑过,键盘上相应的按键会高亮显示), + +![learnmusic-jalmus-singlenote](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-singlenote.png) + +到非常困难(有多行音符从右向左滑过,你需要按顺序键入音符)。 + +![learnmusic-jalmus-multinote](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-multinote.png) + +Jalmus 也包含一些训练,内容和课程相似,只是没有那些视觉上的提示了。当完成训练后,屏幕上会显示你的乐谱。它还提供不同难度的节拍训练,你能听到看到这些训练里面播放的旋律。在多行乐谱同时播放时,一个节拍器(能听见能看见)可以帮你理解 + +![learnmusic-jalmus-rhythm](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-rhythm.png) + +和阅读乐谱。(LCTT 写给王老板的话:我特么实在编不下去了,这段你得帮我改改。) + +![learnmusic-jalmus-score](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-score.png) + +所有这些功能都是可配置的,你可以选择打开或者关闭它们。 + +总的来说,Jalmus 可能是节奏训练软件中属于功能最强的,虽然它不是学音乐必备的软件,但在节奏训练这个特殊的领域,它做得很出色。 + +### 号外 ### + +#### TuxGuitar #### + +对于吉他练习者,[TuxGuitar][12] 看起来很像 Windows 下面的 Guitar Pro 软件(它也可以读 Guitar Pro 格式的文件)。 + +#### PianoBooster #### +[Piano Booster][13] 可以练习钢琴技巧,它能播放 MIDI 文件,你可以使用外接键盘来弹钢琴,同时还能查看屏幕上滑过的乐谱。 + +### 总结 ### + +Linux 提供很多优秀的工具供你学习,如果你对音乐感兴趣,你完全不用担心没有软件能帮你练习音乐技术。实际上,可供学习音乐的学生选择的优秀软件数量远比上面介绍的要多。如果你还知道其他的音乐训练软件,请在写下你的评论,让我们能够知道。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/linux-learning-music/ + +作者:[Attila Orosz][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者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 From 145c6a3c782f027f97f3395aaa9bbcacc7b42e76 Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Thu, 24 Dec 2015 10:37:18 +0800 Subject: [PATCH 0661/1710] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=91Top=205=20open=20source=20community=20metrics=20to=20t?= =?UTF-8?q?rack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20151208 Top 5 open source community metrics to track.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md index 5098151775..86c20aeb6f 100644 --- a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md +++ b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md @@ -1,3 +1,4 @@ +Sonofelice Translating Top 5 open source community metrics to track ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-1.png) From 4e858354eec24702e5065805809bfb04c09cb7e8 Mon Sep 17 00:00:00 2001 From: Bian Jiaping Date: Thu, 24 Dec 2015 15:35:27 +0800 Subject: [PATCH 0662/1710] translating 'How to Use Glances to Monitor System on Ubuntu' --- .../20151223 How to Use Glances to Monitor System on Ubuntu.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md index b10e7ed47e..8237aa4f25 100644 --- a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md +++ b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md @@ -1,3 +1,5 @@ +translating by bianjp + How to Use Glances to Monitor System on Ubuntu ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/12/glances_featured.jpg) From bb996158d9ed80408a7d7771c1b6bbede0bdbfcd Mon Sep 17 00:00:00 2001 From: NearTan Date: Thu, 24 Dec 2015 23:50:44 +0800 Subject: [PATCH 0663/1710] translated --- ...P Framework on CentOS 7 or Ubuntu 15.04.md | 176 ------------------ ...P Framework on CentOS 7 or Ubuntu 15.04.md | 176 ++++++++++++++++++ 2 files changed, 176 insertions(+), 176 deletions(-) delete mode 100644 sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md create mode 100644 translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md diff --git a/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md deleted file mode 100644 index 1e14ff6a7b..0000000000 --- a/sources/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md +++ /dev/null @@ -1,176 +0,0 @@ -translating by NearTan -How to Install Laravel PHP Framework on CentOS 7 / Ubuntu 15.04 -================================================================================ -Hi All, In this article we are going to setup Laravel on CentOS 7 and Ubuntu 15.04. If you are a PHP web developer then you don't need to worry about of all modern PHP frameworks, Laravel is the easiest to get up and running that saves your time and effort and makes web development a joy. Laravel embraces a general development philosophy that sets a high priority on creating maintainable code by following some simple guidelines, you should be able to keep a rapid pace of development and be free to change your code with little fear of breaking existing functionality. - -Laravel's PHP framework installation is not a big deal. You can simply follow the step by step guide in this article for your CentOS 7 or Ubuntu 15 server. - -### 1) Server Requirements ### - -Laravel depends upon a number of prerequisites that must be setup before installing it. Those prerequisites includes some basic tuning parameter of server like your system update, sudo rights and installation of required packages. - -Once you are connected to your server make sure to configure the fully qualified domain name then run the commands below to enable EPEL Repo and update your server. - -#### CentOS-7 #### - - # yum install epel-release - ----------- - - # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm - ----------- - - # yum update - -#### Ubuntu #### - - # apt-get install python-software-properties - # add-apt-repository ppa:ondrej/php5 - ----------- - - # apt-get update - ----------- - - # apt-get install -y php5 mcrypt php5-mcrypt php5-gd - -### 2) Firewall Setup ### - -System Firewall and SELinux setup is an important part regarding the security of your applications in production. You can make firewall off if you are working on test server and keep SELinux to permissive mode using the below command, so that you installing setup won't be affected by it. - - # setenforce 0 - -### 3) Apache, MariaDB, PHP Setup ### - -Laravel installation requires a complete LAMP stack with OpenSSL, PDO, Mbstring and Tokenizer PHP Extensions. If you are already running LAMP server then you can skip this step to move on and just make sure that the required PHP extensions are installed. - -To install AMP stack you can use the below commands on your respective server. - -#### CentOS #### - - # yum install httpd mariadb-server php56w php56w-mysql php56w-mcrypt php56w-dom php56w-mbstring - -To start and enable Apache web and MySQL/Mariadb services at bootup on CentOS 7 , we will use below commands. - - # systemctl start httpd - # systemctl enable httpd - ----------- - - #systemctl start mysqld - #systemctl enable mysqld - -After starting MariaDB service, we will configure its secured password with below command. - - #mysql_secure_installation - -#### Ubuntu #### - - # apt-get install mysql-server apache2 libapache2-mod-php5 php5-mysql - -### 4) Install Composer ### - -Now we are going to install composer that is one of the most important requirement before starting the Laravel installation that helps in installing Laravel's dependencies. - -#### CentOS/Ubuntu #### - -Run the below commands to setup 'composer' in CentOS/Ubuntu. - - # curl -sS https://getcomposer.org/installer | php - # mv composer.phar /usr/local/bin/composer - # chmod +x /usr/local/bin/composer - -![composer installation](http://blog.linoxide.com/wp-content/uploads/2015/11/14.png) - -### 5) Installing Laravel ### - -Laravel's installation package can be downloaded from github using the command below. - -# wget https://github.com/laravel/laravel/archive/develop.zip - -To extract the archived package and move into the document root directory use below commands. - - # unzip develop.zip - ----------- - - # mv laravel-develop /var/www/ - -Now use the following compose command that will install all required dependencies for Laravel within its directory. - - # cd /var/www/laravel-develop/ - # composer install - -![compose laravel](http://blog.linoxide.com/wp-content/uploads/2015/11/25.png) - -### 6) Key Encryption ### - -For encrypter service, we will be generating a 32 digit encryption key using the command below. - - # php artisan key:generate - - Application key [Lf54qK56s3qDh0ywgf9JdRxO2N0oV9qI] set successfully - -Now put this key into the 'app.php' file as shown below. - - # vim /var/www/laravel-develop/config/app.php - -![Key encryption](http://blog.linoxide.com/wp-content/uploads/2015/11/45.png) - -### 7) Virtua Host and Ownership ### - -After composer installation assign the permissions and apache user ownership to the document root directory as shown. - - # chmod 775 /var/www/laravel-develop/app/storage - ----------- - - # chown -R apache:apache /var/www/laravel-develop - -Open the default configuration file of apache web server using any editor to add the following lines at the end file for new virtual host entry. - - # vim /etc/httpd/conf/httpd.conf - ----------- - - ServerName laravel-develop - DocumentRoot /var/www/laravel/public - - start Directory /var/www/laravel - AllowOverride All - Directory close - -Now the time is to restart apache web server services as shown below and then open your web browser to check your localhost page. - -#### CentOS #### - - # systemctl restart httpd - -#### Ubuntu #### - - # service apache2 restart - -### 8) Laravel 5 Web Access ### - -Open your web browser and give your server IP or Fully Qualified Domain name and you will see the default web page of Laravel 5 frame work. - -![Laravel Default](http://blog.linoxide.com/wp-content/uploads/2015/11/35.png) - -### Conclusion ### - -Laravel Framework is a great tool to develop your web applications. So, at the end of this article you have learned its installation setup on Ubuntu 15 and CentOS 7 , Now start using this awesome PHP framework that provides you a lot of more features and comfort in your development work. Feel free to comment us back for your valuable suggestions an feedback to guide you in more specific and easiest way. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-15-04/ - -作者:[Kashif][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/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md new file mode 100644 index 0000000000..431bd652a7 --- /dev/null +++ b/translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md @@ -0,0 +1,176 @@ + +如何在 CentOS 7 / Ubuntu 15.04 上安装 PHP 框架 Framework +================================================================================ +大家好,这篇文章将要讲述如何在 CentOS 7 / Ubuntu 15.04 上安装 PHP 框架 Laravel。如果你是一个 PHP Web 的开发者,你并不需要关心各种琳琅满目的现代 PHP 框架,Laravel 是最易用同时也是最能节省你时间的一个框架,能让你享受到 web 开发的乐趣。一个好的框架能让你在简单的使用指导下能快速开发出最核心的代码,Laravel 拥抱这一普世的开发哲学。你能抱持很高的开发效率并且无痛重构你现有的代码。 + +Laravel 安装极其容易,你只要跟着本文章一步步操作就能在 CentOS 7 或者 Ubuntu 15 服务器上安装。 + +### 1) 服务器要求 ### + +在安装 Laravel 前需要安装一些它的依赖和先决条件,这些包括升级系统到最新版本,sudo 权限,和安装依赖包。 + +当你连接到你的服务器时,请确保你能通以下命令能成功的使用 EPEL 仓库并且升级你的服务器。 + +#### CentOS-7 #### + + # yum install epel-release + +---------- + + # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm + +---------- + + # yum update + +#### Ubuntu #### + + # apt-get install python-software-properties + # add-apt-repository ppa:ondrej/php5 + +---------- + + # apt-get update + +---------- + + # apt-get install -y php5 mcrypt php5-mcrypt php5-gd + +### 2) Firewall Setup ### + +系统防火墙和 SELinux 设置对于用于生产的服务器安全来说非常重要,你可以关闭防火墙和用以下命令行设置 SELinux 成宽容模式(permissive)模式来保证安装程序不受他们的影响。 + + # setenforce 0 + +### 3) Apache, MariaDB, PHP Setup ### + +Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 OpenSSL, PDO, Mbstring 和 Tokenizer PHP Extensions。如果 LAMP 已经运行在你的服务器上你可以跳过这部,但是需要注意一些必要的 PHP 插件是否安装好。 + +要安装完整 AMP 你需要在自己的服务器上运行以下命令。 + +#### CentOS #### + + # yum install httpd mariadb-server php56w php56w-mysql php56w-mcrypt php56w-dom php56w-mbstring + +要在 CentOS 7 上实现 MySQL / Mariadb 服务开机自动启动,你需要运行以下命令 + + # systemctl start httpd + # systemctl enable httpd + +---------- + + #systemctl start mysqld + #systemctl enable mysqld + +在启动 MariaDB 服务之后,你需要运行以下命令配置一个足够安全的密码 + + #mysql_secure_installation + +#### Ubuntu #### + + # apt-get install mysql-server apache2 libapache2-mod-php5 php5-mysql + +### 4) 安装 Composer ### + +在我们安装 Laravel 前,先让我们开始安装 composer。安装 composer 对于安装 Laravel 是最重要的步骤之一,因为 composer 能帮我们安装 Laravel 的各种依赖。 + +#### CentOS/Ubuntu #### + +在 CentOS / Ubuntu 下运行以下命令来配置 composer + + # curl -sS https://getcomposer.org/installer | php + # mv composer.phar /usr/local/bin/composer + # chmod +x /usr/local/bin/composer + +![composer installation](http://blog.linoxide.com/wp-content/uploads/2015/11/14.png) + +### 5) Installing Laravel ### + +我们可以运行以下命令从 github 上下载 Laravel 的安装包 + + # wget https://github.com/laravel/laravel/archive/develop.zip + +运行以下命令解压安装包并且移动 document 的根目录 + + # unzip develop.zip + +---------- + + # mv laravel-develop /var/www/ + +现在使用 compose 命令来安装目录下所有 Laravel 所需要的依赖 + + # cd /var/www/laravel-develop/ + # composer install + +![compose laravel](http://blog.linoxide.com/wp-content/uploads/2015/11/25.png) + +### 6) Key Encryption ### + +为了加密服务器,我们使用以下命令来生成一个加密后的 32 位的密钥 + + # php artisan key:generate + + Application key [Lf54qK56s3qDh0ywgf9JdRxO2N0oV9qI] set successfully + +现在把这个密钥放到 'app.php' 文件,如以下所示 + + # vim /var/www/laravel-develop/config/app.php + +![Key encryption](http://blog.linoxide.com/wp-content/uploads/2015/11/45.png) + +### 7) 虚拟 Host 和 所属用户 ### + +在 composer 安装好后,分配 document 根目录的权限和所属用户,如下所示 + + # chmod 775 /var/www/laravel-develop/app/storage + +---------- + + # chown -R apache:apache /var/www/laravel-develop + +用任意一款编辑器打开 apache 服务器的默认配置文件,在文件最后加上虚拟 host 入口 + + # vim /etc/httpd/conf/httpd.conf + +---------- + + ServerName laravel-develop + DocumentRoot /var/www/laravel/public + + start Directory /var/www/laravel + AllowOverride All + Directory close + +现在我们用以下命令重启 apache 服务器,打开浏览器查看 localhost 页面 + +#### CentOS #### + + # systemctl restart httpd + +#### Ubuntu #### + + # service apache2 restart + +### 8) Laravel 5 Web Access ### + +打开浏览器然后输入你的配置的 IP 地址或者绝对域名(to 校对:「绝对域名」译自 https://zh.wikipedia.org/wiki/%E5%AE%8C%E6%95%B4%E7%B6%B2%E5%9F%9F%E5%90%8D%E7%A8%B1#cite_note-1)你将会看到 Laravel 5 的默认页面 + +![Laravel Default](http://blog.linoxide.com/wp-content/uploads/2015/11/35.png) + +### 结论 ### + +Laravel 框架对于开发网页应用来说是一个绝好的的工具。所以,看了这篇文章你将学会在 Ubuntu 15 和 CentOS 7 上安装 Laravel 之后你就能开始使用这超棒的框架提供的各种功能来舒服的来进行你的开发工作。如果你有什么意见或者建议请发表在评论内容上,我们将根据您宝贵的反馈来使我们的文章更加浅显易懂。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-15-04/ + +作者:[Kashif][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/ From 30fe9721b5a000760b06c33b19cc7788340bfbd9 Mon Sep 17 00:00:00 2001 From: sonofelice Date: Fri, 25 Dec 2015 00:00:39 +0800 Subject: [PATCH 0664/1710] half of the translation --- ...op 5 open source community metrics to track.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md index 86c20aeb6f..0f2926152a 100644 --- a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md +++ b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md @@ -1,23 +1,28 @@ -Sonofelice Translating -Top 5 open source community metrics to track +五大开源社区指标追踪 ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-1.png) +你决定使用指标来追踪那些免费开源的软件社区。那么问题来了:我应该去追踪哪些指标呢? + So you decided to use metrics to track your free, open source software (FOSS) community. Now comes the big question: Which metrics should I be tracking? +要回答这个问题,你首先要知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。这个社区对问题的应对速度怎么样。一个社区如何吸引、维持或者失去贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,免费开源社区(FOSS)一些遵从开放式开发模型的项目在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 + To answer this question, you must have an idea of what information you need. For example, you may want to know about the sustainability of the project community. How quickly does the community react to problems? How is the community attracting, retaining, or losing contributors? Once you decide which information you need, you can figure out which traces of community activity are available to provide it. Fortunately, FOSS projects following an open development model tend to leave loads of public data in their software development repositories, which can be analyzed to gather useful data. +在这篇文章中,我会介绍一些指标,从而为这些项目社区提供一个多方位的视角分析。 + In this article, I'll introduce metrics that help provide a multi-faceted view of your project community. -### 1. Activity ### +### 1. 社区活动 ### -The overall activity of the community and how it evolves over time is a useful metric for all open source communities. Activity provides a first view of how much the community is doing, and can be used to track different kinds of activity. For example, the number of commits gives a first idea about the volume of the development effort. The number of tickets opened provides insight into how many bugs are reported or new features are proposed. The number of messages in mailing lists or posts in forums gives an idea of how much discussion is being held in public. +一个社区的总体活动和这个社区怎样随着时间演变,是度量一个社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过投票的数量我们可以大概知道提交了多少bug或者又提出了多少新特性。邮件列表的数量或者论坛帖子的数量可以让我了解到有过多少次公开的讨论。 ![Activity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/activity-metrics.png) Number of commits and number of merged changes after code review in the OpenStack project, as found in the [OpenStack Activity Dashboard][1]. Evolution over time (weekly data). -### 2. Size ### +### 2. 社区规模 ### The size of the community is the number of people participating in it, but, depending on the kind of participation, size numbers may vary. Usually you're interested in active contributors, which is good news. Active people may leave traces in the repositories of the project, which means you can count contributors who are active in producing code by looking at the **Author** field in git repositories, or count people participating in the resolution of tickets by looking at who is contributing to them. From 47542308dd79ecbb9d4b44f749f7e11c5829bbc0 Mon Sep 17 00:00:00 2001 From: sonofelice Date: Fri, 25 Dec 2015 00:28:16 +0800 Subject: [PATCH 0665/1710] half --- ...08 Top 5 open source community metrics to track.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md index 0f2926152a..e0b309e9b0 100644 --- a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md +++ b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md @@ -4,26 +4,23 @@ 你决定使用指标来追踪那些免费开源的软件社区。那么问题来了:我应该去追踪哪些指标呢? -So you decided to use metrics to track your free, open source software (FOSS) community. Now comes the big question: Which metrics should I be tracking? - 要回答这个问题,你首先要知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。这个社区对问题的应对速度怎么样。一个社区如何吸引、维持或者失去贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,免费开源社区(FOSS)一些遵从开放式开发模型的项目在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 -To answer this question, you must have an idea of what information you need. For example, you may want to know about the sustainability of the project community. How quickly does the community react to problems? How is the community attracting, retaining, or losing contributors? Once you decide which information you need, you can figure out which traces of community activity are available to provide it. Fortunately, FOSS projects following an open development model tend to leave loads of public data in their software development repositories, which can be analyzed to gather useful data. - 在这篇文章中,我会介绍一些指标,从而为这些项目社区提供一个多方位的视角分析。 -In this article, I'll introduce metrics that help provide a multi-faceted view of your project community. - ### 1. 社区活动 ### 一个社区的总体活动和这个社区怎样随着时间演变,是度量一个社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过投票的数量我们可以大概知道提交了多少bug或者又提出了多少新特性。邮件列表的数量或者论坛帖子的数量可以让我了解到有过多少次公开的讨论。 ![Activity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/activity-metrics.png) -Number of commits and number of merged changes after code review in the OpenStack project, as found in the [OpenStack Activity Dashboard][1]. Evolution over time (weekly data). +[OpenStack活动看板][1]上面显示的项目代码提交次数和代码评审之后代码合并次数随时间变化的趋势图(周数据) + ### 2. 社区规模 ### +社区的规模指的是参与到这个社区的人数,但是,基于不同形式的参与人数也有很大的差别。好消息是,通常你只对积极活跃的贡献者比较感兴趣。活跃的贡献者 + The size of the community is the number of people participating in it, but, depending on the kind of participation, size numbers may vary. Usually you're interested in active contributors, which is good news. Active people may leave traces in the repositories of the project, which means you can count contributors who are active in producing code by looking at the **Author** field in git repositories, or count people participating in the resolution of tickets by looking at who is contributing to them. This basic idea of activity" (somebody did something) can be extended in many ways. One common way to track activity is to look at how many people did a sizable chunk of the activity. Generally most of a project's code contributions, for example, are from a small fraction of the people in the project's community. Knowing about that fraction helps provide an idea of the core group (i.e., the people who help lead the community). From e369d054a27a924e2fc7219abf7905f64988a43c Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 25 Dec 2015 11:32:25 +0800 Subject: [PATCH 0666/1710] PUB:20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ivo-wang 翻译辛苦了~ https://linux.cn/article-6793-1.html --- ...tihomed ISC DHCP Server on Debian Linux.md | 162 +++++++++++++++++ ...tihomed ISC DHCP Server on Debian Linux.md | 164 ------------------ 2 files changed, 162 insertions(+), 164 deletions(-) create mode 100644 published/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md delete mode 100644 translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md diff --git a/published/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/published/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md new file mode 100644 index 0000000000..32ce669b8c --- /dev/null +++ b/published/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md @@ -0,0 +1,162 @@ +在 Debian Linux 上安装配置 ISC DHCP 服务器 +================================================================================ + +动态主机控制协议(Dynamic Host Control Protocol,DHCP)给网络管理员提供了一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的 DHCP 服务工具是 ISC DHCP Server。DHCP 服务的目的是给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP 服务提供的信息包括:DNS 服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 + +本教程介绍运行在 Debian 7.7 上 4.2.4 版的 ISC-DHCP-Server 如何管理多个虚拟局域网(VLAN),也可以非常容易应用到单一网络上。 + +测试用的网络是通过思科路由器使用传统的方式来管理 DHCP 租约地址的。目前有 12 个 VLAN 需要通过集中式服务器来管理。把 DHCP 的任务转移到一个专用的服务器上,路由器可以收回相应的资源,把资源用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 + +另一个将 DHCP 服务转移到专用服务器的好处,以后会讲到,它可以建立动态域名服务器(DDNS),这样当主机从服务器请求 DHCP 地址的时候,这样新主机的主机名就会被添加到 DNS 系统里面。 + +### 安装和配置 ISC DHCP 服务器### + +1、使用 apt 工具用来安装 Debian 软件仓库中的 ISC 软件,来创建这个多宿主服务器。与其他教程一样需要使用 root 或者 sudo 访问权限。请适当的修改,以便使用下面的命令。(LCTT 译注:下面中括号里面是注释,使用的时候请删除,#表示使用的 root 权限) + + # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件] + # dpkg --get-selections isc-dhcp-server [确认软件已经成功安装] + # dpkg -s isc-dhcp-server [用另一种方式确认成功安装] + +![Install ISC DHCP Server in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ISC-DHCP-Server.jpg) + +2、 确认服务软件已经安装完成,现在需要提供网络信息来配置服务器,这样服务器才能够根据我们的需要来分发网络信息。作为管理员最起码需要了解的 DHCP 信息如下: + +- 网络地址 +- 子网掩码 +- 动态分配的地址范围 + +其他一些服务器动态分配的有用信息包括: + +- 默认网关 +- DNS 服务器 IP 地址 +- 域名 +- 主机名 +- 网络广播地址 + +这只是能让 ISC DHCP 服务器处理的选项中非常少的一部分。如果你想查看所有选项及其描述需要在安装好软件后输入以下命令: + + # man dhcpd.conf + +3、 一旦管理员已经确定了这台服务器分发的所有必要信息,那么是时候配置服务器并且分配必要的地址池了。在配置任何地址池或服务器配置之前,必须配置 DHCP 服务器侦听这台服务器上面的一个接口。 + +在这台特定的服务器上,设置好网卡后,DHCP 会侦听名称名为`'bond0'`的接口。请适根据你的实际情况来更改服务器以及网络环境。下面的配置都是针对本教程的。 + +![Configure ISC DHCP Network](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DHCP-Network.jpg) + +这行指定的是 DHCP 服务侦听接口(一个或多个)上的 DHCP 流量。修改主配置文件,分配适合的 DHCP 地址池到所需要的网络上。主配置文件在 /etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 + + # nano /etc/dhcp/dhcpd.conf + +这个配置文件可以配置我们所需要的地址池/主机。文件顶部有 ‘ddns-update-style‘ 这样一句,在本教程中它设置为 ‘none‘。在以后的教程中会讲到动态 DNS,ISC-DHCP-Server 将会与 BIND9 集成,它能够使主机名更新指向到 IP 地址。 + +4、 接下来的部分是管理员配置全局网络设置,如 DNS 域名,默认的租约时间,IP地址,子网的掩码,以及其它。如果你想了解所有的选项,请阅读 man 手册中的 dhcpd.conf 文件,命令如下: + + # man dhcpd.conf + +对于这台服务器,我们需要在配置文件顶部配置一些全局网络设置,这样就不用到每个地址池中去单独设置了。 + +![Configure ISC DDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DDNS.png) + +我们花一点时间来解释一下这些选项,在本教程中虽然它们是一些全局设置,但是也可以单独的为某一个地址池进行配置。 + +- option domain-name “comptech.local”; – 所有使用这台 DHCP 服务器的主机,都将成为 DNS 域 “comptech.local” 的一员 + +- option domain-name-servers 172.27.10.6; DHCP 向所有配置这台 DHCP 服务器的的网络主机分发 DNS 服务器地址为 172.27.10.6 + +- option subnet-mask 255.255.255.0; – 每个网络设备都分配子网掩码 255.255.255.0 或 /24 + +- default-lease-time 3600; – 默认有效的地址租约时间(单位是秒)。如果租约时间耗尽,那么主机可以重新申请租约。如果租约完成,那么相应的地址也将被尽快回收。 + +- max-lease-time 86400; – 这是一台主机所能租用的最大的租约时间(单位为秒)。 + +- ping-check true; – 这是一个额外的测试,以确保服务器分发出的网络地址不是当前网络中另一台主机已使用的网络地址。 + +- ping-timeout; – 在判断地址以前没有使用过前,服务器将等待 ping 响应多少秒。 + +- ignore client-updates; 现在这个选项是可以忽略的,因为 DDNS 在前面已在配置文件中已经被禁用,但是当 DDNS 运行时,这个选项会忽略主机更新其 DNS 主机名的请求。 + +5、 文件中下面一行是权威 DHCP 所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么取消对该权威关键字(authoritative stanza) 的注释。 + +通过去掉关键字 authoritative 前面的 ‘#’,取消注释全局权威关键字。这台服务器将是它所管理网络里面的唯一权威。 + +![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) + +默认情况下服务器被假定为**不是**网络上的权威服务器。之所以这样做是出于安全考虑。如果有人因为不了解 DHCP 服务的配置,导致配置不当或配置到一个不该出现的网络里面,这都将带来非常严重的连接问题。这行还可用在每个网络中单独配置使用。也就是说如果这台服务器不是整个网络的 DHCP 服务器,authoritative 行可以用在每个单独的网络中,而不是像上面截图中那样的全局配置。 + +6、 这一步是配置服务器将要管理的所有 DHCP 地址池/网络。简短起见,本教程只讲到配置的地址池之一。作为管理员需要收集一些必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) + +以下这个地址池所用到的信息都是管理员收集整理的:网络 ID 172.27.60.0, 子网掩码 255.255.255.0 或 /24, 默认子网网关 172.27.60.1,广播地址 172.27.60.255.0 。 + +以上这些信息对于构建 dhcpd.conf 文件中新网络非常重要。使用文本编辑器修改配置文件添加新网络进去,这里我们需要使用 root 或 sudo 访问权限。 + + # nano /etc/dhcp/dhcpd.conf + +![Configure DHCP Pools and Networks](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-network.png) + +当前这个例子是给用 VMWare 创建的虚拟服务器分配 IP 地址。第一行显示是该网络的子网掩码。括号里面的内容是 DHCP 服务器应该提供给网络上面主机的所有选项。 + +第一行, range 172.27.60.50 172.27.60.254; 这一行显示的是,DHCP 服务在这个网络上能够给主机动态分发的地址范围。 + +第二行,option routers 172.27.60.1; 这里显示的是给网络里面所有的主机分发的默认网关地址。 + +最后一行, option broadcast-address 172.27.60.255; 显示当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 + +必须要强调的是每行的结尾必须要用(;)来结束,所有创建的网络必须要在 {} 里面。 + +7、 如果要创建多个网络,继续创建完它们的相应选项后保存文本文件即可。配置完成以后如果有更改,ISC-DHCP-Server 进程需要重启来使新的更改生效。重启进程可以通过下面的命令来完成: + + # service isc-dhcp-server restart + +这条命令将重启 DHCP 服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理 dhcp 请求。最简单的方法是通过 [lsof 命令][1]来查看服务器是否在侦听67端口,命令如下: + + # lsof -i :67 + +![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) + +这里输出的结果表明 dhcpd(DHCP 服务守护进程)正在运行并且侦听67端口。由于在 /etc/services 文件中67端口的映射,所以输出中的67端口实际上被转换成了 “bootps”。 + +在大多数的系统中这是非常常见的,现在服务器应该已经为网络连接做好准备,我们可以将一台主机接入网络请求DHCP地址来验证服务是否正常。 + +### 测试客户端连接 ### + +8、 现在许多系统使用网络管理器来维护网络连接状态,因此这个设备应该预先配置好的,只要对应的接口处于活跃状态就能够获取 DHCP。 + +然而当一台设备无法使用网络管理器时,它可能需要手动获取 DHCP 地址。下面的几步将演示怎样手动获取以及如何查看服务器是否已经按需要分发地址。 + +‘[ifconfig][2]‘工具能够用来检查接口的配置。这台被用来测试的 DHCP 服务器的设备,它只有一个网络适配器(网卡),这块网卡被命名为 ‘eth0‘。 + + # ifconfig eth0 + +![Check Network Interface IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/No-ip.png) + +从输出结果上看,这台设备目前没有 IPv4 地址,这样很便于测试。我们把这台设备连接到 DHCP 服务器并发出一个请求。这台设备上已经安装了一个名为 ‘dhclient‘ 的DHCP客户端工具。因为操作系统各不相同,所以这个客户端软件也是互不一样的。 + + # dhclient eth0 + +![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) + +当前 `'inet addr:'` 字段中显示了属于 172.27.60.0 网络地址范围内的 IPv4 地址。值得欣慰的是当前网络还配置了正确的子网掩码并且分发了广播地址。 + +到这里看起来还都不错,让我们来测试一下,看看这台设备收到新 IP 地址是不是由服务器发出的。这里我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具 ‘tail’,它只显示日志文件的最后几行,这样我们就可以不用拿一个文本编辑器去查看所有的日志文件了。命令如下: + + # tail /var/log/syslog + +![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) + +OK!服务器记录表明它分发了一个地址给这台主机 (HRTDEBXENSRV)。服务器按预期运行,给它充当权威服务器的网络分发了适合的网络地址。至此 DHCP 服务器搭建成功并且运行。如果有需要你可以继续配置其他的网络,排查故障,确保安全。 + +在以后的Debian教程中我会讲一些新的 ISC-DHCP-Server 功能。有时间的话我将写一篇关于 Bind9 和 DDNS 的教程,融入到这篇文章里面。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ + +作者:[Rob Turner][a] +译者:[ivo-wang](https://github.com/ivo-wang) +校对:[wxy](https://github.com/wxy) + +本文由 [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/ diff --git a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md deleted file mode 100644 index 5dcea06611..0000000000 --- a/translated/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md +++ /dev/null @@ -1,164 +0,0 @@ -debian linux上安装配置 ISC DHCP Server -================================================================================ -动态主机控制协议(DHCP)给网络管理员提供一种便捷的方式,为不断变化的网络主机或是动态网络提供网络层地址。其中最常用的DHCP服务工具是 ISC DHCP Server。DHCP服务的目的是给主机提供必要的网络信息以便能够和其他连接在网络中的主机互相通信。DHCP服务一般包括以下信息:DNS服务器信息,网络地址(IP),子网掩码,默认网关信息,主机名等等。 - -本教程介绍4.2.4版的ISC-DHCP-Server如何在Debian7.7上管理多个虚拟局域网(VLAN),它也可以非常容易的配置的用于单一网络。 - -测试用的网络是通过思科路由器使用传统的方式来管理DHCP租约地址的,目前有12个VLANs需要通过路由器的集中式服务器来管理。把DHCP的任务转移到一个专用的服务器上面,路由器可以收回相应的资源,把资源用到更重要的任务上,比如路由寻址,访问控制列表,流量监测以及网络地址转换等。 - -另一个将DHCP服务转移到专用服务器的好处,以后会讲到,它可以建立动态域名服务器(DDNS)这样当主机从服务器请求DHCP地址的时候,新主机的主机名将被添加到DNS系统里面。 - -### 安装和配置ISC DHCP Server### - -1. 使用apt工具用来安装Debian软件仓库中的ISC软件,来创建这个多宿主服务器。与其他教程一样需要使用root或者sudo访问权限。请适当的修改,以便使用下面的命令。(译者注:下面中括号里面是注释,使用的时候请删除,#表示使用的root权限) - - - # apt-get install isc-dhcp-server [安装 the ISC DHCP Server 软件] - # dpkg --get-selections isc-dhcp-server [确认软件已经成功安装] - # dpkg -s isc-dhcp-server [用另一种方式确认成功安装] - -![Install ISC DHCP Server in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ISC-DHCP-Server.jpg) - -2. 确认服务软件已经安装完成,现在需要一些网络的需求来配置服务器,这样服务器才能够根据我们的需要来分发网络信息。作为管理员最起码需要了解的DHCP信息如下: -- 网络地址 -- 子网掩码 -- 动态分配的地址范围 - -其他一些服务器动态分配的有用信息包括: -- 默认网关 -- DNS服务器IP地址 -- 域名 -- 主机名 -- 网络广播地址 - - -这只是能让ISC DHCP server处理的选项中非常少的一部分。如果你想查看所有选项及其描述需要在安装好软件后输入以下命令: - # man dhcpd.conf - -3. 一旦管理员已经确定了这台服务器需要分发的需求信息,那么是时候配置服务器并且分配必要的地址池了。在配置任何地址池或服务器配置之前,DHCP服务必须配置好,来侦听这台服务器上面的一个接口。 - -在这台特定的服务器上,设置好网卡后,DHCP会侦听名称名为`'bond0'`的接口。请适根据你的实际情况来更改服务器以及网络环境。下面的配置都是针对本教程的。 - -![Configure ISC DHCP Network](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DHCP-Network.jpg) - -这行指定的是DHCP服务侦听接口(一个或多个)上的DHCP流量。修改主要的配置文件分配适合的DHCP地址池到所需要的网络上。配置文件所在置/etc/dhcp/dhcpd.conf。用文本编辑器打开这个文件 - # nano /etc/dhcp/dhcpd.conf - -这个配置文件可以配置我们所需要的地址池/主机。文件顶部有‘ddns-update-style‘这样一句,在本教程中它设置为‘none‘。在以后的教程中动态DNS,ISC-DHCP-Server 将被整合到 BIND9,它能够使主机名更新到IP地址。 - -4. 接下来的部分是管理员配置全局网络设置,如DNS域名,默认的租约时间,IP地址,子网的掩码,以及更多的区域。如果你想了解所有的选项,请阅读man手册中的dhcpd.conf文件,命令如下: - - # man dhcpd.conf - - -对于这台服务器,我们需要在顶部配置一些全局网络设置,这样就不用到每个地址池中去单独设置了。 - -![Configure ISC DDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DDNS.png) - - -我们花一点时间来解释一下这些选项,在本教程中虽然它们是一些全局设置,但是也可以为单独的为某一个地址池进行配置。 - -- option domain-name “comptech.local”; – 所有使用这台DHCP服务器的主机,都将成为DNS域名为“comptech.local”的一员 - -- option domain-name-servers 172.27.10.6; DHCP向所有配置这台DHCP服务器的的网络主机分发DNS服务器地址为172.27.10.6 - -- option subnet-mask 255.255.255.0; – 分派子网掩码到每一个网络设备 255.255.255.0 或a /24 - -- default-lease-time 3600; – 默认有效的地址租约时间(单位是秒)。如果租约时间耗尽,那么主机可以重新申请租约。如果租约完成,那么相应的地址也将被尽快回收。 - -- max-lease-time 86400; – 这是一台主机最大的租约时间(单位为秒)。 - -- ping-check true; – 这是一个额外的测试,以确保服务器分发出的网络地址不是当前网络中另一台主机已使用的网络地址。 - -- ping-timeout; – 如果地址以前没有使用过,可以用这个选项来检测2个ping返回值之间的时间长度。 - -- ignore client-updates; 现在这个选项是可以忽略的,因为DDNS在前面已在配置文件中已经被禁用,但是当DDNS运行时,这个选项会忽略更新其DNS主机名的请求。 - -5. 文件中下面一行是权威DHCP所在行。这行的意义是如果服务器是为文件中所配置的网络分发地址的服务器,那么取消注释权威字节(authoritative stanza)来实现。 - -通过去掉关键字authoritative 前面的‘#’,取消注释全局权威字节。这台服务器将是它所管理网络里面的唯一权威。 - -![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) -开启 ISC Authoritative - -默认情况下服务器被假定为不是网络上的权威。之所以这样做是出于安全考虑。如果有人因为不了解DHCP服务的配置,导致配置不当或配置到一个不该出现的网络里面,这都将带来非常严重的重连接问题。这行还可用在每个网络中单独配置使用。也就是说如果这台服务器不是整个网络的DHCP服务器,authoritative行可以用在每个单独的网络中,而不是像上面截图中那样的全局配置。 - -6. 这一步是配置服务器将要管理的所有DHCP地址池/网络。简短起见,本教程只配置了地址池。作为管理员需要收集一些必要的网络信息(比如域名,网络地址,有多少地址能够被分发等等) - -以下这个地址池所用到的信息都是管理员收集整理的:网络id 172.27.60.0, 子网掩码 255.255.255.0 or a /24, 默认子网网关172.27.60.1,广播地址 172.27.60.255.0 - -以上这些信息用于构建hcpd.conf文件中新的网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用root或sudo访问权限。网络非常重要。使用文本编辑器修改配置文件添加新的网络进去,这里我们需要使用root或sudo访问权限。 - - # nano /etc/dhcp/dhcpd.conf - -![Configure DHCP Pools and Networks](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-network.png) -配置DHCP的地址池和网络 - -当前这个例子是给用VMWare创建的虚拟服务器分配IP地址。第一行显示是该网络的子网掩码。括号里面的内容是DHCP服务器应该提供给网络上面主机的所有选项。 - -第一节, range 172.27.60.50 172.27.60.254;这一行显示的是,DHCP服务在这个网络上能够给主机动态分发的地址范围。 - -第二节,option routers 172.27.60.1;这里显示的是网络里面所有的主机分发默认网关地址。 - -最后一节, option broadcast-address 172.27.60.255;,显示当前网络的广播地址。这个地址不能被包含在要分发放的地址范围内,因为广播地址不能分配到一个主机上面。 - -必须要强调的是每行的结尾必须要用(;)来结束,所有创建的网络必须要在{}里面。 - -7. 如果是创建多个网络,连续的创建完它们的相应选项后保存文本文件即可。配置完成以后如果有更改,ISC-DHCP-Server进程需要重启来使新的更改生效。重启进程可以通过下面的命令来完成: - # service isc-dhcp-server restart - -这条命令将重启DHCP服务,管理员能够使用几种不同的方式来检查服务器是否已经可以处理dhcp请求。最简单的方法是通过lsof命令[1]来查看服务器是否在侦听67端口,命令如下: - - # lsof -i :67 - -![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) -检查DHCP侦听端口 - -这里输出的结果表明DHCPD(DHCP服务守护进程)正在运行并且侦听67端口。由于/etc/services文件中67端口是端口映射,所以输出中的67端口实际上被转换成了“bootps”。 - -在大多数的系统中这是非常常见的,现在服务器应该已经为网络连接做好准备,我们可以将一台主机接入网络请求DHCP地址来验证服务是否正常。 - -### 测试客户端连接 ### - -8. 现在许多系统使用网络管理器来维护网络连接状态,因此这个设备应该预先配置好的,只要对应的接口处于活跃状态就能够获取DHCP。 - -然而当一台设备无法使用网络管理器时,它可能需要手动获取DHCP地址。下面的几步将演示怎样手动获取以及如何查看服务器是否已经按需要分发地址。 - - ‘[ifconfig][2]‘工具能够用来检查接口的配置。这台被用来测试的DHCP服务器的设备,它只有一个网络适配器(网卡),这块网卡被命名为‘eth0‘。 - - # ifconfig eth0 - -![Check Network Interface IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/No-ip.png) -检查网络接口IP地址 - -从输出结果上看,这台设备目前没IPv4地址,这样很好便于测试。我们把这台设备连接到DHCP服务器并发出一个请求。这台设备上已经安装了一个名为‘dhclient‘ 的DHCP客户端工具。因为操作系统各不相同,所以这个客户端软件也是互不一样的。 - # dhclient eth0 - -![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) -从DHCP请求IP地址 - -当前 `'inet addr:'` 字段中显示了属于172.27.60.0网络地址范围内的IPv4地址。值得欣慰的是当前网络还配置了正确的子网掩码并且分发了广播地址。 - -到这里看起来还都不错,让我们来测试一下,看看这台设备收到新IP地址是不是由服务器发出的。这里我们参照服务器的日志文件来完成这个任务。虽然这个日志的内容有几十万条,但是里面只有几条是用来确定服务器是否正常工作的。这里我们使用一个工具‘tail’,它只显示日志文件的最后几行,这样我们就可以不用拿一个文本编辑器去查看所有的日志文件了。命令如下: - - # tail /var/log/syslog - -![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) -检查DHCP日志文件 - -OK!服务器记录表明它分发了一个地址给这台主机(HRTDEBXENSRV)。服务器按预期运行,给它充当权威的网络分发适合的网络地址。至此DHCP服务器搭建成功并且运行。如果有需要你可以继续配置其他的网络,排查故障,确保安全。 - -在以后的Debian教程中我会讲一些新的 ISC-DHCP-Server 功能。有时间的话我将写一篇关于Bind9和DDNS的教程,融入到这篇文章里面。 --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ - -作者:[Rob Turner][a] -译者:[ivo-wang](https://github.com/ivo-wang) -校对:[校对者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/ From 98da95eb5aa33a14bee57dd63783a34e449510a0 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 25 Dec 2015 14:51:24 +0800 Subject: [PATCH 0667/1710] PUB:20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop @geekpi --- ...esktop Fun--Let it Snow On Your Desktop.md | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) rename {translated/tech => published}/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md (54%) diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md b/published/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md similarity index 54% rename from translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md rename to published/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md index c47ff21da0..29b9b1a77f 100644 --- a/translated/tech/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md +++ b/published/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md @@ -1,16 +1,17 @@ -Linux/Unix桌面趣事:让桌面下雪 +Linux/Unix 桌面趣事:让桌面下雪 ================================================================================ -在这个节日里感到孤独么?试一下Xsnow吧。它是一个可以在Unix/Linux桌面下下雪的app。圣诞老人和他的驯鹿会在屏幕中奔跑,伴随着雪片让你感受到节日的感觉。 -我第一次是再13、4年前安装的它。它最初是在1984年Macintosh系统中创造的。你可以用下面的方法来安装: +在这个节日里感到孤独么?试一下 Xsnow 吧。它是一个可以在 Unix/Linux 桌面下下雪的应用。圣诞老人和他的驯鹿会在屏幕中奔跑,伴随着雪片让你感受到节日的感觉。 + +我第一次安装它还是在 13、4 年前。它最初是在 1984 年 Macintosh 系统中创造的。你可以用下面的方法来安装: ### 安装 xsnow ### -Debian/Ubuntu/Mint用户用下面的命令: +Debian/Ubuntu/Mint 用户用下面的命令: $ sudo apt-get install xsnow -Freebsd用户输入下面的命令: +Freebsd 用户输入下面的命令: # cd /usr/ports/x11/xsnow/ # make install clean @@ -21,13 +22,13 @@ Freebsd用户输入下面的命令: #### 其他发行版的方法 #### -1. Fedora/RHEL/CentOS在[rpmfusion][1]仓库中找找。 -2. Gentoo用户试下Gentoo portage也就是[emerge -p xsnow][2] -3. Opensuse用户使用yast搜索xsnow +1. Fedora/RHEL/CentOS 在 [rpmfusion][1] 仓库中找找。 +2. Gentoo 用户试下 Gentoo portage,也就是[emerge -p xsnow][2] +3. Opensuse 用户使用 yast 搜索 xsnow -### 我该如何使用xsnow? ### +### 我该如何使用 xsnow? ### -打开终端(程序 > 附件 > 终端),输入下面的额命令启动xsnow: +打开终端(程序 > 附件 > 终端),输入下面的额命令启动 xsnow: $ xsnow @@ -35,13 +36,13 @@ Freebsd用户输入下面的命令: ![Fig.01: Snow for your Linux and Unix desktop systems](http://files.cyberciti.biz/uploads/tips/2011/12/application-to-bring-snow-to-desktop_small.png) -图01: 在Linux和Unix桌面中显示雪花 +*图01: 在 Linux 和 Unix 桌面中显示雪花* -你可以设置背景位蓝色,并让它下白雪,输入: +你可以设置背景为蓝色,并让它下白雪,输入: $ xsnow -bg blue -sc snow -设置最大的雪片数量,并让它尽可能快地运行,输入: +设置最大的雪片数量,并让它尽可能快地掉下,输入: $ xsnow -snowflakes 10000 -delay 0 @@ -49,14 +50,14 @@ Freebsd用户输入下面的命令: $ xsnow -notrees -nosanta -关于xsnow更多的信息和选项,在命令行下输入man xsnow查看手册: +关于 xsnow 更多的信息和选项,在命令行下输入 man xsnow 查看手册: $ man xsnow 建议阅读 - 官网[下载 Xsnow][1] -- 注意[MS-Windows][2]和[Mac OS X version][3]有一次性的共享软件费用。 +- 注意 [MS-Windows][2] 和 [Mac OS X][3] 版本有一次性的共享软件费用。 -------------------------------------------------------------------------------- @@ -64,7 +65,7 @@ via: http://www.cyberciti.biz/tips/linux-unix-xsnow.html 作者:Vivek Gite 译者:[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 488427cd8b3bfee1b55965e3b6cb2485aeb1a751 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 25 Dec 2015 14:59:34 +0800 Subject: [PATCH 0668/1710] PUB:20151215 Linux or UNIX Desktop Fun--Steam Locomotive @geekpi --- ...x or UNIX Desktop Fun--Steam Locomotive.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) rename {translated/tech => published}/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md (53%) diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md b/published/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md similarity index 53% rename from translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md rename to published/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md index d97f0f3c68..45a56d6ddc 100644 --- a/translated/tech/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md +++ b/published/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md @@ -1,30 +1,31 @@ Linux/Unix 桌面趣事:蒸汽火车 ================================================================================ -一个[最常见的错误][1]是把ls输入成了sl。我已经设置了[一个alias][2],也就是alias sl=ls。但是你也许就错过了带汽笛的蒸汽小火车了。 +一个你[经常犯的错误][1]是把 ls 输入成了 sl。我已经设置了[一个别名][2],也就是 `alias sl=ls`。但是这样你也许就错过了这辆带汽笛的蒸汽小火车了。 -sl是一个玩笑软件或是一个Unix游戏。它会在你错误地把“ls”输入成“sl”(Steam Locomotive)后出现一辆蒸汽火车穿过你的屏幕。 +sl 是一个搞笑软件或,也是一个 Unix 游戏。它会在你错误地把“ls”输入成“sl”(Steam Locomotive)后出现一辆蒸汽火车穿过你的屏幕。 ### 安装 sl ### -在Debian/Ubuntu下输入下面的命令: +在 Debian/Ubuntu 下输入下面的命令: # apt-get install sl -它同样也在Freebsd和其他类Unix的操作系统上存在。下面把ls输错成sl: +它同样也在 Freebsd 和其他类Unix的操作系统上存在。 + +下面,让我们把 ls 输错成 sl: $ sl ![Fig.01: Run steam locomotive across the screen if you type "sl" instead of "ls"](http://files.cyberciti.biz/uploads/tips/2011/05/sl_command_steam_locomotive.png) -图01: 如果你把“ls”输入成“sl”蒸汽火车会穿过你的屏幕。 +*图01: 如果你把 “ls” 输入成 “sl” ,蒸汽火车会穿过你的屏幕。* -It also supports the following options: 它同样支持下面的选项: -- **-a** : 似乎发生了意外。你会哭喊求助的人们感到难过。 +- **-a** : 似乎发生了意外。你会为那些哭喊求助的人们感到难过。 - **-l** : 显示小一点的火车 -- **-F** : 它飞走 -- **-e** : 允许被Ctrl+C终端 +- **-F** : 它居然飞走了 +- **-e** : 允许被 Ctrl+C 中断 -------------------------------------------------------------------------------- @@ -32,7 +33,7 @@ via: http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-typ 作者:Vivek Gite 译者:[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 aeb432f56aa517315f1b45f3f8212bb0ae7c9cb2 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 25 Dec 2015 15:29:41 +0800 Subject: [PATCH 0669/1710] PUB:20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium @geekpi --- ...IX Desktop Fun--Terminal ASCII Aquarium.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) rename {translated/tech => published}/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md (68%) diff --git a/translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md b/published/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md similarity index 68% rename from translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md rename to published/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md index ed26f49783..e24c2f381e 100644 --- a/translated/tech/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md +++ b/published/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md @@ -1,11 +1,11 @@ -Linux/Unix桌面趣事:终端ASCII水族箱 +Linux/Unix 桌面趣事:终端 ASCII 水族箱 ================================================================================ -你可以在你的终端中使用ASCIIQuarium安全地欣赏海洋的神秘了。它是一个用perl写的ASCII艺术水族箱/海洋动画。 + +你可以在你的终端中使用 ASCIIQuarium 安全地欣赏海洋的神秘了。它是一个用 perl 写的 ASCII 艺术水族箱/海洋动画。 ### 安装 Term::Animation ### - -首先你需要安装名为Term-Animation的perl模块。打开终端(选择程序 > 附件 > 终端),并输入: +首先你需要安装名为 Term-Animation 的perl模块。打开终端(选择程序 > 附件 > 终端),并输入: $ sudo apt-get install libcurses-perl $ cd /tmp @@ -15,9 +15,9 @@ Linux/Unix桌面趣事:终端ASCII水族箱 $ perl Makefile.PL && make && make test $ sudo make install -### 下载安装ASCIIQuarium ### +### 下载安装 ASCIIQuarium ### -接着再终端中输入: +接着在终端中输入: $ cd /tmp $ wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz @@ -26,7 +26,7 @@ Linux/Unix桌面趣事:终端ASCII水族箱 $ sudo cp asciiquarium /usr/local/bin $ sudo chmod 0755 /usr/local/bin/asciiquarium -### 我怎么浏览ASCII水族箱? ### +### 我怎么观赏 ASCII 水族箱? ### 输入下面的命令: @@ -38,6 +38,8 @@ Linux/Unix桌面趣事:终端ASCII水族箱 ![Fig.01: ASCII Aquarium](http://s0.cyberciti.org/uploads/tips/2011/01/screenshot-ASCIIQuarium.png) +*ASCII 水族箱* + ### 相关媒体 ### 注:youtube 视频 @@ -45,9 +47,9 @@ Linux/Unix桌面趣事:终端ASCII水族箱 [视频01: ASCIIQuarium - Linux/Unix桌面上的海洋动画][1] -### 下载:ASCII Aquarium的KDE和Mac OS X版本 ### +### 下载:ASCII Aquarium 的 KDE 和 Mac OS X 版本 ### -[下载asciiquarium][2]。如果你运行的是Mac OS X,试下一个可以直接使用已经打包好的[版本][3]。对于KDE用户,试试基于Asciiquarium的[KDE屏幕保护程序][4] +[点此下载 asciiquarium][2]。如果你运行的是 Mac OS X,试下这个可以直接使用的已经打包好的[版本][3]。对于 KDE 用户,试试基于 Asciiquarium 的[KDE 屏幕保护程序][4] -------------------------------------------------------------------------------- @@ -55,7 +57,7 @@ via: http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium. 作者:Vivek Gite 译者:[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 df310db48059e0d69cf0ae7063c2c877e11f40bd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 25 Dec 2015 16:27:30 +0800 Subject: [PATCH 0670/1710] =?UTF-8?q?20151225-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ugins to increase productivity on Emacs.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md diff --git a/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md b/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md new file mode 100644 index 0000000000..17fb4ba8ab --- /dev/null +++ b/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md @@ -0,0 +1,78 @@ +What are the best plugins to increase productivity on Emacs +================================================================================ +Over a year ago now, I went looking for the best plugins to [turn Vim into a full-fledged IDE][1]. Interestingly, a lot of the comments on that post were about how Emacs already has most of these plugins built in, and was already a great IDE. Although I can only agree about Emacs' incredible versatility, it is still not the ultimate editor when it comes out of the box. Thankfully, its vast plugin library is here to fix that. But among the plethora of options available to you, it is sometimes hard to know where to start. So for now, let me try to assemble a short list of the indispensable plugins to increase your productivity while using Emacs. Although I am heavily geared towards programming related productivity, most of these plugins would be useful to anyone for any usage. + +### 1. Ido-mode ### + +![](https://c2.staticflickr.com/6/5718/23311895573_c1fb34337c_c.jpg) + +Maybe one of the most useful plugin for beginners, Ido stands for interactively do. It replaces most of the dry prompts with a fancy character matching menu. For example, it will replace the normal prompt to open a file with a list of all the files in the current directory. Type any string, and Ido will try to match it with the most appropriate file. It makes it really easy to visualize your actions, and also to quickly get through a folder where all files are named with the same prefix. + +### 2. Smex ### + +![](https://c2.staticflickr.com/2/1517/23310442314_2a22a60c34_c.jpg) + +Not the most famous one, but a good place to complete what Ido-mode started: Smex can be a fancy replacement to the normal 'M-x' prompt, with a heavy inspiration from Ido-mode. It brings the same interactive search for the commands you would normally have to type after calling 'M-x'. It is simple and efficient, and a great way to save those additional few fractions of a second you normally need. + +### 3. Auto Complete ### + +![](https://c2.staticflickr.com/6/5794/23643004900_3042f77952_c.jpg) + +Before knowing the existence of this plugin, I spent half of my time on Emacs pressing ‘M-/’ to complete my words. Now, I have a fancy pop-up to do it for me. There is not much more to say about it, except that we all need it. + +### 4. YASnippet ### + +![](https://c2.staticflickr.com/2/1688/23830403072_0d8df6ef4c_b.jpg) + +This one is really for the coders. There is always some piece of code that we feel we use all the time. For me, it's 'var_dump(...); exit;' to debug PHP. After a while of typing it over and over, it just occurred to me that I could have it pre-recorded and easily accessible as a snippet of code. With YASnippets, it's easy to import snippet files or make your own. After that, a simple press on the tabulation key will expand a small keyword into a chunk of pre-written code easy to navigate through and modify. + +### 5. Org-mode ### + +![](https://c2.staticflickr.com/6/5687/23570808789_d683c949e4.jpg) + +For disclaimer, I have only recently started using Org-mode. But it has already blown me away. From the hundreds of written pieces I have seen around, Org-mode can change your life. The idea behind it is simple: it is a mode that simplifies note taking while keeping a plain text format, making it easy to navigate through lists of tasks and various data, and perform operations such as filtering by priority or due date, or setting a recurrence. Yet, from this simple idea, you can accomplish a lot, and it is easy to get overwhelmed with all the options. Rather than a long explanation, I urge you to go through [available tutorials][2], watch a lot of videos, and see by yourself how powerful Org-mode is. + +### 6. Helm ### + +![](https://c2.staticflickr.com/2/1489/23310442334_5e6db22b79_c.jpg) + +Some love it, but others are not such a big fan of it. I am part of the later. But with such a huge following, it is impossible to avoid it. Helm aims to transform your Emacs experience completely. Simply described, Helm is a framework that will help you find a file or a command quickly from within Emacs. Based on your input, it will try to use word completion to guide you to the action you have in mind. The feeling is a bit weird at first, but for some, Helm is a religion of its own. Although I am not its fan, I do appreciate helm-occur which a great tool to search for strings in a large document as it shows all occurrences in a separate buffer, making it easy to navigate through them. If you are looking for a quick demo to understand what Helm can do, I recommend [this post][3]. + +### 7. ace-jump-mode ### + +![](https://c2.staticflickr.com/2/1710/23856168871_6df1faa565_c.jpg) + +Another plugin with a big following that I am trying to get on board with is ace-jump-mode. Master this plugin, and you will be promised to transcend the usage of a mouse. Simply described, by triggering ace-jump-mode with a shortcut of your choice, you will be prompted for a character. Enter one, and all words starting with that character will be highlighted with a unique letter. Enter one of the letters on screen, and your cursor will jump straight to the word it is highlighting. I have to admit that it is pretty hard to get the reflex to use it, but once you have it, it will increase your movement speed in a document by a lot. + +### 8. find-file-in-project ### + +![](https://c2.staticflickr.com/2/1492/23570808809_96ec8454a9_c.jpg) + +If you like Sublime text and its very handy 'Ctrl-p' fuzzy search to open any file in a project, then you will love find-file-in-project (or ffip). After setting it up by declaring the root of your version control folder, you can summon easily a cool text bar that quickly scans and searches through your code base for a matching file based on the name you input. I like to have it bound to the F6 key on my keyboard. It is simple and very handy if you do not know the complicate directory structure from the top of your head. + +### 9. Flymake ### + +![](https://c2.staticflickr.com/6/5708/23310442354_cbba657ed3.jpg) + +For IDE lovers, I think that syntax checker is one of the most powerful features. It is great for beginners and handy for tired programmers. And thanks to Flymake, Emacs users can enjoy it too. Since I work in PHP a lot, Flymake does not need any extra configuration. As I write my code, it will automatically check my code and highlight any line that contains a problem. For compiled languages, Flymake will look for a Makefile that it will use to check your code. Absolutely magical. + +### 10. electric-pair ### + +Last, but not least, electric-pair is one of the simplest yet most powerful plugin in my opinion. It just automatically closes whatever parenthesis or bracket you open. It doesn't look like much at first, but trust me. After struggling for the hundredth time to find that matching parenthesis, you will be glad to have a plugin to ensure that all your expressions are balanced. + +To conclude, Emacs is a fantastic tool. Probably not a shocker. Try these plugins and watch as your productivity goes through the roof. This list is of course not exhaustive at all. If you want to bring your contribution, feel free to do so in the comments. I am myself always looking for new plugins to try and new ways to experience Emacs. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/best-plugins-to-increase-productivity-on-emacs.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/turn-vim-full-fledged-ide.html +[2]:http://orgmode.org/worg/org-tutorials/ +[3]:http://tuhdo.github.io/helm-intro.html From c76e19e7bd0e2becb6ff435fe84a39d8edae5e8d Mon Sep 17 00:00:00 2001 From: taichirain Date: Sat, 26 Dec 2015 01:18:30 +0800 Subject: [PATCH 0671/1710] first commit --- ...onfigure Apache Solr on Ubuntu 14 or 15.md | 81 +++++++------------ 1 file changed, 29 insertions(+), 52 deletions(-) diff --git a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md index 0353702dc9..f2dd3e3474 100644 --- a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md +++ b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md @@ -1,48 +1,39 @@ taichirain 翻译中 -How to Configure Apache Solr on Ubuntu 14 / 15 如何在Ubuntu 14/15上配置Apache Solr ================================================================================ -Hello and welcome to our today's article on Apache Solr. The brief description about Apache Solr is that it is an Open Source most famous search platform with Apache Lucene at the back end for Web sites that enables you to easily create search engines which searches websites, databases and files. It can index and search multiple sites and return recommendations for related contents based on the searched text. +大家好,欢迎来阅读我们今天Apache Solr的文章.Apache Solr是一个运行在网站后台的目前最热门的一个搜索引擎,基于Apache Lucene,能让你很容易的创建搜索引擎,数据库,文件。它能够索引和搜索多个网站并根据搜索文本的相关内容返回搜索建议. -Solr works with HTTP Extensible Markup Language (XML) that offers application program interfaces (APIs) for Javascript Object Notation, Python, and Ruby. According to the Apache Lucene Project, Solr offers capabilities that have made it popular with administrators including it many featuring like: +Solr工作在可扩展标记语言(XML),并可以为JSON、Python和Ruby提供应用程序接口(APIs)。根据Apache Lucene项目,Solr提供了非常多的功能,让它很受管理员们的欢迎: - 全文检索 - 分面导航 -- Snippet generation/highting - 拼写建议/自动完成 -- Custom document ranking/ordering - 自定义文档排序/排列 #### 前提条件: #### - -On a fresh Linux Ubuntu 14/15 with minimal packages installed, you only have to take care of few prerequisites in order to install Apache Solr. -在一个以最小化安装包安装的linux Ubuntu 14/15的系统上,你仅仅需要少量的准备,就可以开始安装 Apache Solor. +在一个使用Ubuntu 14/15最小化安装包的系统上,你仅仅需要少量的准备,就开始安装 Apache Solor. ### 1)System Update 系统更新### -Login to your Ubuntu server with a non-root sudo user that will be used to perform all the steps to install and use Solr. -在所有的安装步骤以及使用Solor过程中使用一个具有sudo权限的非root用户登录Ubuntu server +在所有的安装步骤以及使用Solor过程中使用一个具有sudo权限的非root用户登录Ubuntu server。 -After successful login, issue the following command to update your system with latest updates and patches. 登录成功后,使用下面的命令,升级你的系统到最新的更新及补丁 $ sudo apt-get update ### 2) JRE Setup 安装JRE### +要安装Solr,首先需要安装JRE(Java Runtime Environment)作为基础环境,因为solr和tomcat都是基于Java.所以,我们需要安装最新版的Java和配置Java本地环境. -The Solr setup needs Java Runtime Environment to be installed on the system as its basic requirement because solr and tomcat both are the Java based applications. So, we need to install and configure its home environment with latest Java. - -To install the latest version on Oracle Java 8, we need to install Python Software Properties using the below command. +为了安装最新版的Java 8,我们需要安装Python Software Properties工具包 $ sudo apt-get install python-software-properties -Upon completion, run the setup its the repository for the latest version of Java 8. +完成后,配置最新版Java 8的仓库 $ sudo add-apt-repository ppa:webupd8team/java -Now you are able to install the latest version of Oracle Java 8 with 'wget' by issuing the below commands to update the packages source list and then to install Java. -使用下面的命令升级源列表,然后安装java,然后你就可以使用'wget'安装Oracle Jave 8的最新版本 +使用下面的命令更新源,然后安装java,然后使用'wget'安装Oracle Jave 8的最新版本 $ sudo apt-get update @@ -50,32 +41,25 @@ Now you are able to install the latest version of Oracle Java 8 with 'wget' by i $ sudo apt-get install oracle-java8-installer -Accept the Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX as you will be asked during the Java installation and configuration process by a click on the 'OK' button. -在安装和配置Java SE Platform 和 JavaFX 过程中点击'OK'按钮,接受 Oracle Binary Code License Agreement 协议. +在安装和配置Java SE Platform 和 JavaFX 过程中点击'OK'按钮接受 Oracle Binary Code License Agreement 协议. -When the installation process complete, run the below command to test the successful installation of Java and check its version. -在安装完成后,运行下面的命令,检查是否安装成功以及安装的版本 +在安装完成后,运行下面的命令,检查是否安装成功以及查看安装的版本 kash@solr:~$ java -version java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) -The output indicates that we have successfully fulfilled the basic requirement of Solr by installing the Java. Now move to the next step to install Solr. 执行结果表明我们已经成功的安装了Java,并达到安装Solr最基本的要求了 -### Installing Solr 安装Solr### +### 安装Solr### +有两种不同的方式可以在Ubuntu上安装Solr,在本文中我们只用最新的源码包来演示源码安装 -Installing Solr on Ubuntu can be done by using two different ways but in this article we prefer to install its latest package from the source. -有两种不同的方式可以在Ubuntu上安装Solr,在本文中,只会用最新的源码包来演示源码安装 - -To install Solr from its source, download its available package with latest version from there Official [Web Page][1], copy the link address and get it using 'wget' command. -要使用源码安装Solr,先要从官网 [Web Page][1] 下载最新的可用安装包。复制一下链接,然后使用 'wget'命令来下载。 +要使用源码安装Solr,先要从官网 [Web Page][1] 下载最新的可用安装包。复制以下链接,然后使用 'wget'命令来下载。 $ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz -Run the command below to extract the archived service into '/bin' folder. -运行下面的命令,将归档服务解压到 /bin目录 +运行下面的命令,将已压缩的服务解压到 /bin目录 $ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2 @@ -84,42 +68,36 @@ Then run the script to start Solr service that will creates a new 'solr' user an $ sudo bash ./install_solr_service.sh solr-5.3.1.tgz -![Solr Installation](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) +![Solr 安装](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) -To check the status of Solr service, you use the below command. 使用下面的命令来检查Solr服务的状态 $ service solr status -![Solr Status](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) +![Solr 状态](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) -### Creating Solr Collection: 创建Solr集合: ### - -Now we can create multiple collections using Solr user. To do so just run the below command by mentioning the name of the collection you want to create and by specifying its configuration set as shown. +### 创建Solr集合: ### +我们现在可以使用Solr用户添加多个集合.就像下图所示的那样,我们仅仅只需要在命令行中指定集合名称和指定其配置集就可以创建多个集合了 $ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs" -![creating collection](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) +![创建集合](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) -We have successfully created the new core instance directory for our our first collection where we can add new data in it. To view its default schema file in directory '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' . -我们已经成功的为我们的第一个集合创建了新的内核实例目录,并可以将数据添加到那里。 +我们已经成功的为我们的第一个集合创建了新的内核实例目录,并将数据添加到里面。 它的概要文件在 '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' ### Using Solr Web 使用Solr页面### - -Apache Solr can be accessible on the default port of Solr that 8983. Open your favorite browser and navigate to http://your_server_ip:8983/solr or http://your-domain.com:8983/solr. Make sure that the port is allowed in your firewall. -Apache Solr可以使用默认的端口8983进入.打开浏览器,输入 http://your_server_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口. +可以使用默认的端口8983连接Apache Solr.打开浏览器,输入 http://your_server_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口. http://172.25.10.171:8983/solr/ -![Solr Web Access](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) +![Web访问Solr](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) -From the Solr Web Console click on the 'Core Admin' button from the left bar, then you will see your first collection that we created earlier using CLI. While you can also create new cores by pointing on the 'Add Core' button. 在Solr的Web控制台的左侧菜单点击'Core Admin'按钮,你将会看见我们之前使用CLI方式创建的集合。你可以点击'Add Core'按钮来创建新的内核 -![Adding Core](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) +![添加核心](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) -You can also add the document and query from the document as shown in below image by selecting your particular collection and pointing the document. Add the data in the specified format as shown in the box. +就像下图中所示,你可以选择某个集合和指向文档向里面添加内容或从文档中查询数据。像方框中显示的那样添加指定格式的数据。 { "number": 1, @@ -131,20 +109,19 @@ You can also add the document and query from the document as shown in below imag "skills": "Linux and Virtualization" } -After adding the document click on the 'Submit Document' button. +添加文件后点击'Submit Document'按钮. -![adding Document](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) +![添加文档](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) -### Conclusion 总结### - -You are now able to insert and query data using the Solr web interface after its successful installation on Ubuntu. Now add more collections and insert you own data and documents that you wish to put and manage through Solr. We hope you have got this article much helpful and enjoyed reading this. +### 结尾### +在Ubuntu上安装成功后,你就可以使用Solr WEB接口插入或查询数据。如果你想通过Solr来管理更多的数据和文件,可以创建更多的集合。希望你能喜欢这篇文章并且希望它能够帮到你。 -------------------------------------------------------------------------------- via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ 作者:[Kashif][a] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/taichirain) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f582966b4dc5f77018dae3eb46d32fe2f372aae7 Mon Sep 17 00:00:00 2001 From: taichirain Date: Sat, 26 Dec 2015 01:40:40 +0800 Subject: [PATCH 0672/1710] Raspberry Pi --- ...51208 5 great Raspberry Pi projects for the classroom.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md index c1aa541416..302034c330 100644 --- a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md +++ b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md @@ -1,8 +1,12 @@ +taichirain 翻译中 + 5 great Raspberry Pi projects for the classroom +5 伟大的树莓派项目教室 ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png) Image by : opensource.com +图片来源 : opensource.com ### 1. Minecraft Pi ### @@ -93,4 +97,4 @@ via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classr [11]:https://www.piborg.org/4borg [12]:https://www.piborg.org/diddyborg [13]:https://www.piborg.org/doodleborg -[14]:http://camjam.me/?page_id=1035#worksheets \ No newline at end of file +[14]:http://camjam.me/?page_id=1035#worksheets From feb3be13eec53741e219e2c42adc58d8004ca8ec Mon Sep 17 00:00:00 2001 From: taichirain Date: Sat, 26 Dec 2015 09:20:54 +0800 Subject: [PATCH 0673/1710] =?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 --- .../20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md index f2dd3e3474..64357e0284 100644 --- a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md +++ b/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md @@ -121,7 +121,7 @@ Then run the script to start Solr service that will creates a new 'solr' user an via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ 作者:[Kashif][a] -译者:[译者ID](https://github.com/taichirain) +译者:[taichirain](https://github.com/taichirain) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2ca82e18efdbc537cce982e57f19dcc82bc66b0a Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 26 Dec 2015 14:48:33 +0800 Subject: [PATCH 0674/1710] translating --- sources/tech/20151222 Turn Tor socks to http.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151222 Turn Tor socks to http.md b/sources/tech/20151222 Turn Tor socks to http.md index da6eb0ed5a..89729eb189 100644 --- a/sources/tech/20151222 Turn Tor socks to http.md +++ b/sources/tech/20151222 Turn Tor socks to http.md @@ -1,3 +1,5 @@ +translating---geekpi + Turn Tor socks to http ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/12/tor-593x445.jpg) @@ -83,4 +85,4 @@ via: http://www.unixmen.com/turn-tor-socks-http/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/hossein/ \ No newline at end of file +[a]:http://www.unixmen.com/author/hossein/ From 613744becc0be90d702be1931d4732fb970c2f7b Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 26 Dec 2015 15:11:58 +0800 Subject: [PATCH 0675/1710] translated --- .../tech/20151222 Turn Tor socks to http.md | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/sources/tech/20151222 Turn Tor socks to http.md b/sources/tech/20151222 Turn Tor socks to http.md index 89729eb189..6f50ba2455 100644 --- a/sources/tech/20151222 Turn Tor socks to http.md +++ b/sources/tech/20151222 Turn Tor socks to http.md @@ -1,65 +1,63 @@ -translating---geekpi - -Turn Tor socks to http +将Tor socks转换成http ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/12/tor-593x445.jpg) -For using Tor service you can use diffrent tools like Tor browser, Foxyproxy and other things, some download managers such as Wget or Aria2 can’t get Tor socks directly and start downloading anonymously with that so we need some tools to change Tor socks to http and then download with that. +使用tor服务你可以使用不同的工具像Tor浏览器、Foxyproxy和其他事情,有些下载管理器像wget和aria2不能直接直接使用tor socks开始匿名下载,因此我们需要一些工具来将tor socks转换成http代理这样就能用它来下载了。 -**Note** : This tutorial is under Debian distrobutions and in other distrobutions may be diffrent so if your distro is Debian base and you have configured Tor correctly go a head ! +**注意**:本教程基于Debian下,其他发行版会有些不同,因此如果你的发行版是基于Debian的,就可以直接使用下面的配置了。 -**Polipo** : This service uses 8123 Port and 127.0.0.1 IP, use following command to install Polipo on your computer : +**Polipo** : 这个服务会使用8123端口和127.0.0.1的IP,使用下面的命令来在计算机上安装Polipo: sudo apt install polipo -Now use this command to go in Polipo config file: +现在使用这个命令打开Polipo的配置文件: sudo nano /etc/polipo/config -Add the following lines to the end of the file : +在文件最后加入下面的行: proxyAddress = "::0" allowedClients = 192.168.1.0/24 socksParentProxy = "localhost:9050" socksProxyType = socks5 -Restart the Polipo service with this command : +用下面的命令来重启Polipo: sudo service polipo restart -Now Polipo is ready ! do what ever you like in anonymous world ! as example of how using it : +现在Polipo已经安装好了!在匿名的世界里做你想做的吧!下面是使用的例子: pdmt -l "link" -i 127.0.01 -p 8123 -With command above, PDMT ( Persian Download Manager Terminal ) will download your file anonymously. +用上面的命令PDMT(Persian下载器)会匿名地下载你的文件。 -**Proxychains** : In this service you can set Tor or Lantern proxy to turn socks too but in usage it’s a little diffrent with Polipo and Privoxy because you don’t need to use any port ! for installing that use following command : +**Proxychains** : 在此服务中你可以设置使用tor或者Lantern代理,但是在使用上它和Polipo和Privoxy有点不同,它不需要使用任何端口!使用下面的命令来安装: sudo apt install proxychains -Open config file with this command : +用这条命令来打开配置文件: sudo nano /etc/proxychains.conf -Now add the following code to the end of text, this code is Tor port and Ip : +现在添加下面的代码到文件底部,这里是tor的端口和IP: socks5 127.0.0.1 9050 -If you put “proxychains” word before a command in terminal and run it, it would run by Tor proxy : +如果你在命令的前面加上“proxychains”并运行,它就能通过tor代理来运行: proxychains firefoxt proxychains aria2c proxychains wget -**Privoxy** : Privoxy uses 8118 port and it’s easy to run first install privoxy package : +**Privoxy** : Privoxy使用8118端口,并且首次可以很轻松地通过privoxy包来安装: sudo apt install privoxy -We should change the config file now : +我们现在要修改配置文件: sudo nano /etc/pivoxy/config -Add the following lines to end of the file : +在文件底部加入下面的行: forward-socks5 / 127.0.0.1:9050 . forward-socks4a / 127.0.0.1:9050 . @@ -69,18 +67,18 @@ Add the following lines to end of the file : forward 127.*.*.*/ . forward localhost/ . -Restart the service : +重启服务: sudo service privoxy restart -Service is ready ! port is 8118 and Ip is 127.0.0.1 use it and enjoy from it ! +服务已经好了!端口是8118,IP是127.0.0.1,就尽情使用吧! -------------------------------------------------------------------------------- via: http://www.unixmen.com/turn-tor-socks-http/ 作者:[Hossein heydari][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 6aff74c08e4feb47a4e74dc14b5c94e05ff246c2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 26 Dec 2015 15:13:57 +0800 Subject: [PATCH 0676/1710] Rename sources/tech/20151222 Turn Tor socks to http.md to translated/tech/20151222 Turn Tor socks to http.md --- {sources => translated}/tech/20151222 Turn Tor socks to http.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151222 Turn Tor socks to http.md (100%) diff --git a/sources/tech/20151222 Turn Tor socks to http.md b/translated/tech/20151222 Turn Tor socks to http.md similarity index 100% rename from sources/tech/20151222 Turn Tor socks to http.md rename to translated/tech/20151222 Turn Tor socks to http.md From 0583c7b8eb6142facd439024d2e09d757dccef3e Mon Sep 17 00:00:00 2001 From: sonofelice Date: Sat, 26 Dec 2015 16:24:35 +0800 Subject: [PATCH 0677/1710] complete --- ... open source community metrics to track.md | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md index e0b309e9b0..73a48fb694 100644 --- a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md +++ b/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md @@ -2,15 +2,15 @@ ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-1.png) -你决定使用指标来追踪那些免费开源的软件社区。那么问题来了:我应该去追踪哪些指标呢? +如果你决定使用指标来追踪那些免费开源的软件社区。那么问题来了:我应该去追踪哪些指标呢? -要回答这个问题,你首先要知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。这个社区对问题的应对速度怎么样。一个社区如何吸引、维持或者失去贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,免费开源社区(FOSS)一些遵从开放式开发模型的项目在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 +要回答这个问题,你首先要知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。这个社区对问题的应对速度怎么样。一个社区怎么吸引、维护或者流失贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,免费开源社区(FOSS)一些遵从开放式开发模型的项目在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 在这篇文章中,我会介绍一些指标,从而为这些项目社区提供一个多方位的视角分析。 ### 1. 社区活动 ### -一个社区的总体活动和这个社区怎样随着时间演变,是度量一个社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过投票的数量我们可以大概知道提交了多少bug或者又提出了多少新特性。邮件列表的数量或者论坛帖子的数量可以让我了解到有过多少次公开的讨论。 +一个社区的总体活动和这个社区怎样随着时间演变,是度量一个社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过投票的数量我们可以大概知道提交了多少bug或者又提出了多少新特性。邮件列表的数量或者论坛帖子的数量可以让我们了解到有过多少次公开的讨论。 ![Activity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/activity-metrics.png) @@ -19,47 +19,46 @@ ### 2. 社区规模 ### -社区的规模指的是参与到这个社区的人数,但是,基于不同形式的参与人数也有很大的差别。好消息是,通常你只对积极活跃的贡献者比较感兴趣。活跃的贡献者 +社区的规模指的是参与到这个社区的人数,但是,基于不同形式的参与人数也有很大的差别。好消息是,通常你只对积极活跃的贡献者比较感兴趣。活跃的贡献者会在项目的仓库留下一些线索。这意味着你可以通过查看git仓库存放的代码中**author**字段来统计积极贡献代码的人数,或者通过看积极参与问题解决的人的得票数来统计活跃人数。 -The size of the community is the number of people participating in it, but, depending on the kind of participation, size numbers may vary. Usually you're interested in active contributors, which is good news. Active people may leave traces in the repositories of the project, which means you can count contributors who are active in producing code by looking at the **Author** field in git repositories, or count people participating in the resolution of tickets by looking at who is contributing to them. - -This basic idea of activity" (somebody did something) can be extended in many ways. One common way to track activity is to look at how many people did a sizable chunk of the activity. Generally most of a project's code contributions, for example, are from a small fraction of the people in the project's community. Knowing about that fraction helps provide an idea of the core group (i.e., the people who help lead the community). +所谓活跃(某些人做了某些事)可以扩展到很多方面。一种常见的跟踪活动的方式是看有多少人做了工作量相当可观的任务。比如,通常一个项目代码的贡献者是来自这个项目社区的一小部分人。了解了这一小部分人,就对核心的工作组(比如,领导这个社区的人)有一个基本的认识了。 ![Size metrics chart](https://opensource.com/sites/default/files/images/business-uploads/size-metrics.png) -Number of authors and number of posters in mailing lists in the Xen project, as found in the [Xen Project Development Dashboard][2]. Evolution over time (monthly data). +[Xen项目开发看板][2]上展示的该项目邮件列表上作者人数和提交人数随时间的变化趋势(每月数据) -### 3. Performance ### +### 3. 社区表现 ### -So far, I have focused on measuring quantities of activities and contributors. You also can analyze how processes and people are performing. For example, you can measure how long processes take to finish. Time to resolve or close tickets shows how the project is reacting to new information that requires action, such as fixing a reported bug or implementing a requested new feature. Time spent in code review—from the moment when a change to the code is proposed to the moment it is accepted—shows how long upgrading a proposed change to the quality standards expected by the community takes. -Other metrics deal with how well the project is coping with pending work, such as the ratio of new to closed tickets, or the backlog of still non-completed code reviews. Those parameters tell us, for example, whether or not the resources put into solving issues is enough. +到目前为止,关注点主要集中在活动数量和贡献者数量的统计上了。你也可以分析流程还有用户的表现如何。比如,你可以测量某流程需要多久才能执行完成。解决或者关闭投票的时间可以表明一个需要及时响应的项目对新信息的应对如何,比如修复一个已经提出的bug或者实现一个新需求。代码评审花费的时间,即从代码修改提交到被通过的时间,可以看出更新一个提出的改变要达到社区期望的标准需要多久。 + +其他的一些指标主要与项目处理挂起的工作如何有关,比如新的要被关闭投票的比例,或者仍然没有关闭的代码评审的后台日志。这些参数能告诉我们像投入到解决这些问题的资源是否充足这样的一些信息。 ![Efficiency metrics chart](https://opensource.com/sites/default/files/images/business-uploads/efficiency-metrics.png) -Ratio of tickets closed by tickets opened, and ratio of change proposals accepted or abandoned by new change proposals per quarter. OpenStack project, as shown in the [OpenStack Development Report, 2015-Q3][3] (PDF). +在[2015第三季度OpenStack开发报告][3]上显示的,每季度关闭与打开状态的投票数之比,接受与放弃的改变提案与最新的改变提案之比。 -### 4. Demographics ### +### 4. 社区人口统计 ### -Communities change as contributors move in and out. Depending on how people enter and leave a community over time, the age (time since members joined the community) of the community varies. The [community aging chart][4] nicely illustrates these exchanges over time. The chart is structured as a set of horizontal bars, two per "generation" of people joining the community. For each generation, the attracted bar shows how many new people joined the community during the corresponding period of time. The retained bar shows how many people are still active in the community. +随着贡献者的参与或者退出,社区也在不断改变。社区的年龄(从社区成员加入时算起)取决于随着时间变化,人们怎么加入和退出社区。[社区年龄统计图表][4]能够很好的展现这些改变随时间的变化。 图标是由一系列的水平条组成,每条水平条代表加入到社区的两代人。对于每一代,Attracted栏显示在相应的时间里有多少人加入到了社区。Retained栏显示有多少人目前仍然活跃在社区。 -The relationship between the two bars for each generation is the retention rate: the fraction of people of that generation who are still in the project. The complete set of attracted bars show how attractive the project was in the past. And the complete set of the retention bars shows the current age structure of the community. +代表一代人的两个水平条的关系就是滞留比例:依然在这个项目中的那一代人的一部分。Attracted水平条的完整集合表示这个项目在过去有多么受欢迎。Retained水平条的完整集合则表示社区目前的年龄结构。 ![Demographics metrics chart](https://opensource.com/sites/default/files/images/business-uploads/demography-metrics.png) -Community aging chart for the Eclipse community, as shown in the [Eclipse Development Dashboard][5]. Generations are defined every six months. +[Eclipse开发看板][5]上显示的Eclipse社区的社区年龄表。每六个月为一代。 -### 5. Diversity ### +### 5. 社区多样性 ### -Diversity is an important factor in the resiliency of communities. In general, the more diverse communities are—in terms of people or organizations participating—the more resilient they are. For example, when a company decides to leave a FOSS community, the potential problems the departure may cause are much smaller if its employees were contributing 5% of the work rather than 85%. +多样性是一个社区保持弹性的很关键的因素。通常来说,一个社区越具有多样性(人或者组织参与的多元化),那么这个社区的弹性也就越大。比如,如果一个公司要决定离开一个免费开源社区,那么这个公司的员工贡献5%要远比85%所可能引起的潜在问题要小很多。 -The [Pony Factor][6], a term defined by [Daniel Gruno][7] for the minimum number of developers performing 50% of the commits. Based on the Pony Factor, the Elephant Factor is the minimum number of companies whose employees perform 50% of the commits. Both numbers provide an indication of how many people or companies the community depends on. +[小马因素][6],是[Daniel Gruno][7] 为“最少的开发者数贡献了50%的代码提交量”这一现象定义的术语。基于这一小马因素,大象因素则是指最少量的公司员工贡献了50%的代码提交量。这两个数据提供了一种指示,即这个社区依赖多少人或者公司。 ![Diversity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/diversity-metrics.png) -Pony and Elephant Factor for several FOSS projects in the area of cloud computing, as presented in [The quantitative state of the open cloud 2015][8] (slides). +[2015开发云数量状态统计][8]显示的在云计算领域的几个免费开源社区项目的小马和大象因素。 -There are many other metrics to help measure a community. When determing which metrics to collect, think about the goals of your community, and which metrics will help you reach them. +还有许多其他的指标来衡量一个社区。在决定收集哪些指标时,想想你社区的目标,哪些指标能帮你了解这些社区。 -------------------------------------------------------------------------------- From c5d10610f51a82723c2a51b92da90c23ff4ffdb6 Mon Sep 17 00:00:00 2001 From: sonofelice Date: Sat, 26 Dec 2015 18:17:26 +0800 Subject: [PATCH 0678/1710] =?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 --- ... open source community metrics to track.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {sources/talk/yearbook2015 => translated/tech}/20151208 Top 5 open source community metrics to track.md (70%) diff --git a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md b/translated/tech/20151208 Top 5 open source community metrics to track.md similarity index 70% rename from sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md rename to translated/tech/20151208 Top 5 open source community metrics to track.md index 73a48fb694..9d1c27f272 100644 --- a/sources/talk/yearbook2015/20151208 Top 5 open source community metrics to track.md +++ b/translated/tech/20151208 Top 5 open source community metrics to track.md @@ -2,15 +2,15 @@ ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-1.png) -如果你决定使用指标来追踪那些免费开源的软件社区。那么问题来了:我应该去追踪哪些指标呢? +如果你决定使用指标来追踪你的免费开源的软件社区。那么问题来了:我应该去追踪哪些指标呢? -要回答这个问题,你首先要知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。这个社区对问题的应对速度怎么样。一个社区怎么吸引、维护或者流失贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,免费开源社区(FOSS)一些遵从开放式开发模型的项目在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 +要回答这个问题,你必须知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。一个社区对问题的应对速度有多快。一个社区怎么吸引、维护或者流失贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,免费开源软件社区(FOSS)一些遵从开放式开发模型的项目在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 -在这篇文章中,我会介绍一些指标,从而为这些项目社区提供一个多方位的视角分析。 +在这篇文章中,我会介绍一些指标,从而为你的项目社区提供一个多方位的视角分析。 ### 1. 社区活动 ### -一个社区的总体活动和这个社区怎样随着时间演变,是度量一个社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过投票的数量我们可以大概知道提交了多少bug或者又提出了多少新特性。邮件列表的数量或者论坛帖子的数量可以让我们了解到有过多少次公开的讨论。 +一个社区的总体活动和这个社区怎样随着时间演变,是度量所有社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过开放的投票数我们可以大概知道提交了多少bug或者又提出了多少新特性。邮件列表的数量或者论坛帖子的数量可以让我们了解到有过多少次公开的讨论。 ![Activity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/activity-metrics.png) @@ -32,7 +32,7 @@ 到目前为止,关注点主要集中在活动数量和贡献者数量的统计上了。你也可以分析流程还有用户的表现如何。比如,你可以测量某流程需要多久才能执行完成。解决或者关闭投票的时间可以表明一个需要及时响应的项目对新信息的应对如何,比如修复一个已经提出的bug或者实现一个新需求。代码评审花费的时间,即从代码修改提交到被通过的时间,可以看出更新一个提出的改变要达到社区期望的标准需要多久。 -其他的一些指标主要与项目处理挂起的工作如何有关,比如新的要被关闭投票的比例,或者仍然没有关闭的代码评审的后台日志。这些参数能告诉我们像投入到解决这些问题的资源是否充足这样的一些信息。 +其他的一些指标主要与项目处理挂起的工作表现如何有关,比如新的和被关闭投票的比例,或者仍然没有关闭的代码评审的后台日志。这些参数能告诉我们像投入到解决这些问题的资源是否充足这样的一些信息。 ![Efficiency metrics chart](https://opensource.com/sites/default/files/images/business-uploads/efficiency-metrics.png) @@ -40,25 +40,25 @@ ### 4. 社区人口统计 ### -随着贡献者的参与或者退出,社区也在不断改变。社区的年龄(从社区成员加入时算起)取决于随着时间变化,人们怎么加入和退出社区。[社区年龄统计图表][4]能够很好的展现这些改变随时间的变化。 图标是由一系列的水平条组成,每条水平条代表加入到社区的两代人。对于每一代,Attracted栏显示在相应的时间里有多少人加入到了社区。Retained栏显示有多少人目前仍然活跃在社区。 +随着贡献者的参与或者退出,社区也在不断改变。社区的年龄(从社区成员加入时算起)取决于随着时间变化,人们怎么加入和退出社区。[社区年龄统计图表][4]很直观的展现了这些改变随时间的变化。图标是由一系列的水平条组成,每两条水平条代表加入到社区的一代人。对于每一代,Attracted水平条表示在相应的时间里有多少人加入到了社区。Retained水平条表示有多少人目前仍然活跃在社区。 代表一代人的两个水平条的关系就是滞留比例:依然在这个项目中的那一代人的一部分。Attracted水平条的完整集合表示这个项目在过去有多么受欢迎。Retained水平条的完整集合则表示社区目前的年龄结构。 ![Demographics metrics chart](https://opensource.com/sites/default/files/images/business-uploads/demography-metrics.png) -[Eclipse开发看板][5]上显示的Eclipse社区的社区年龄表。每六个月为一代。 +[Eclipse开发看板][5]上显示的Eclipse社区的社区年龄表。每六个月定义一次。 ### 5. 社区多样性 ### -多样性是一个社区保持弹性的很关键的因素。通常来说,一个社区越具有多样性(人或者组织参与的多元化),那么这个社区的弹性也就越大。比如,如果一个公司要决定离开一个免费开源社区,那么这个公司的员工贡献5%要远比85%所可能引起的潜在问题要小很多。 +多样性是一个社区保持弹性的很关键的因素。通常来说,一个社区越具有多样性(人或者组织参与的多元化),那么这个社区的弹性也就越大。比如,如果一个公司要决定离开一个免费开源社区,那么这个公司的员工贡献5%要远比贡献85%所可能引起的潜在问题要小很多。 -[小马因素][6],是[Daniel Gruno][7] 为“最少的开发者数贡献了50%的代码提交量”这一现象定义的术语。基于这一小马因素,大象因素则是指最少量的公司员工贡献了50%的代码提交量。这两个数据提供了一种指示,即这个社区依赖多少人或者公司。 +[小马因素][6],是[Daniel Gruno][7] 为“最少的开发者贡献了50%的代码提交量”这一现象定义的术语。基于这一小马因素,大象因素则是指最少量的公司其员工贡献了50%的代码提交量。这两个数据提供了一种指示,即这个社区依赖多少人或者公司。 ![Diversity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/diversity-metrics.png) [2015开发云数量状态统计][8]显示的在云计算领域的几个免费开源社区项目的小马和大象因素。 -还有许多其他的指标来衡量一个社区。在决定收集哪些指标时,想想你社区的目标,哪些指标能帮你了解这些社区。 +还有许多其他的指标来衡量一个社区。在决定收集哪些指标时,可以考虑一下社区的目标,还有哪些指标能帮到你。 -------------------------------------------------------------------------------- From 4c1368398ca316b5c79da540d608484238149eb8 Mon Sep 17 00:00:00 2001 From: sonofelice Date: Sat, 26 Dec 2015 20:04:53 +0800 Subject: [PATCH 0679/1710] edit translator --- .../20151208 Top 5 open source community metrics to track.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20151208 Top 5 open source community metrics to track.md b/translated/tech/20151208 Top 5 open source community metrics to track.md index 9d1c27f272..ac0e26b645 100644 --- a/translated/tech/20151208 Top 5 open source community metrics to track.md +++ b/translated/tech/20151208 Top 5 open source community metrics to track.md @@ -65,7 +65,7 @@ via: https://opensource.com/business/15/12/top-5-open-source-community-metrics-track 作者:[Jesus M. Gonzalez-Barahona][a] -译者:[译者ID](https://github.com/译者ID) +译者:[sonofelice](https://github.com/sonofelice) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2efea2e2bd1e46c9f5a70b9416faa558b083ef3a Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 26 Dec 2015 21:39:40 +0800 Subject: [PATCH 0680/1710] =?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 @taichirain --- .../20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md (100%) diff --git a/sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md similarity index 100% rename from sources/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md rename to translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md From 1f38b30f09c5b46b925c30bbd1a2acaf60d9e2a2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 26 Dec 2015 23:59:45 +0800 Subject: [PATCH 0681/1710] Update 20151114 How to Setup Drone - a Continuous Integration Service in Linux.md --- ...Continuous Integration Service in Linux.md | 62 +++++++++++++++---- 1 file changed, 50 insertions(+), 12 deletions(-) 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 index 8f63bdd5fc..a18bc28cb9 100644 --- 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 @@ -5,23 +5,33 @@ 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 ### +如果你对一次又一次的克隆、构建、测试和部署代码感到厌倦了,可以考虑一下持续集成。持续集成也就是CI,是软件工程的像我们一样的频繁提交的代码库,构建、测试和部署的实践。CI 帮助我们快速的集成新代码到已有的代码基线。如果这个过程是自动化进行的,那么就会提高开发的速度,因为这可以减少开发人员手工构建和测试的时间。[Drone][1] 是一个免费的开源项目,用来提供一个非常棒的持续集成服务的环境,采用了Apache 2.0 协议。它已经集成近很多代码库提供商,比如Github、Bitbucket 以及Google COde,并且它可以从代码库提取代码,使我们可以编译多种语言,包括PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA 等等。它是如此一个强大的平台是因为它每次构建都使用了容器和docker 技术,这让用户可以在保证隔离的条件下完全控制他们自己的构建环境。 + +### 1. 安装 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 #### +首先,我们要安装docker,因为这是Drone 的工作流的最关键的元素。Drone 合理的利用了docker 来构建和测试应用。容器技术提高了应用部署的效率。要安装docker ,我们需要在不同的linux 发行版本运行下面对应的命令,我们这里会说明Ubuntu 14.04 和CentOS 7 两个版本。 + +#### Ubuntu #### To install Docker in Ubuntu, we can simply run the following commands in a terminal or console. +要在Ubuntu 上安装Docker ,我们只需要运行下面的命令。 + # apt-get update # apt-get install docker.io After the installation is done, we'll restart our docker engine using service command. +安装之后我们需要使用`service` 命令重启docker 引擎。 + # service docker restart Then, we'll make docker start automatically in every system boot. +然后我们让docker 在系统启动时自动启动。 + # update-rc.d docker defaults Adding system startup for /etc/init.d/docker ... @@ -33,50 +43,68 @@ Then, we'll make docker start automatically in every system boot. /etc/rc4.d/S20docker -> ../init.d/docker /etc/rc5.d/S20docker -> ../init.d/docker -#### On CentOS #### +#### 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. +要在centos 上安装docker,我们可以简单的运行下面的命令。 + # 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. +安装好docker 引擎之后我么只需要简单实用下面的`systemd` 命令启动docker,因为centos 7 的默认init 系统是systemd。 + # systemctl start docker Then, we'll enable docker to start automatically in every system startup. +然后我们要让docker 在系统启动时自动启动。 + # systemctl enable docker ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service' -### 2. Installing SQlite Driver ### +### 2. 安装 SQlite 驱动 ### 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 #### +Drone 默认使用SQLite3 数据库服务器来保存数据和信息。它会在/var/lib/drone/ 自动创建名为drone.sqlite 的数据库来处理数据库模式的创建和迁移。要安装SQLite3 我们要完成以下几步。 + +#### 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. +因为SQLite3 存在于Ubuntu 14.04 的默认软件库,我们只需要简单的使用apt 命令安装它。 + # apt-get install libsqlite3-dev -#### On CentOS 7 #### +#### CentOS 7 #### To install it on CentOS 7 machine, we'll need to run the following yum command. +要在Centos 7 上安装选哟使用下面的yum 命令。 + # yum install sqlite-devel -### 3. Installing Drone ### +### 3. 安装 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 #### +最后,我们安装好依赖的软件,我们现在更进一步的接近安装Drone。在这一步里我们值简单的从官方链接下载对应的二进制软件包,然后使用默认软件包管理器安装Drone。 + +#### 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 从官方的[Debian 文件下载链接][2]下载drone 的debian 软件包。下面就是下载命令。 + # wget downloads.drone.io/master/drone.deb Resolving downloads.drone.io (downloads.drone.io)... 54.231.48.98 @@ -89,6 +117,8 @@ We'll use wget to download the debian package of drone for ubuntu from the [offi After its downloaded, we'll gonna install it with dpkg package manager. +下载好之后,我们将使用dpkg 软件包管理器安装它。 + # dpkg -i drone.deb Selecting previously unselected package drone. @@ -99,10 +129,12 @@ After its downloaded, we'll gonna install it with dpkg package manager. Your system ubuntu 14: using upstart to control Drone drone start/running, process 9512 -#### On CentOS #### +#### 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. +在CentOS 机器上我们要使用wget 命令从[下载链接][3]下载RPM 包。 + # wget downloads.drone.io/master/drone.rpm --2015-11-06 11:06:45-- http://downloads.drone.io/master/drone.rpm @@ -116,19 +148,25 @@ In the machine running CentOS, we'll download the RPM package from the [official Then, we'll install the download rpm package using yum package manager. +然后我们使用yum 安装rpm 包。 + # yum localinstall drone.rpm -### 4. Configuring Port ### +### 4. 配置端口 ### 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. +安装完成之后,我们要使它工作要先进行配置。drone 的配置文件在**/etc/drone/drone.toml** 。默认情况下drone 的web 接口使用的是80,而这也是http 默认的端口,如果我们要下面所示的修改配置文件里server 块对应的值。 + [server] port=":80" -### 5. Integrating Github ### +### 5. 集成 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. @@ -307,7 +345,7 @@ In this article, we learned to completely setup a workable Continuous Intergrati via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ 作者:[Arun Pyasi][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 3aa612f8fc509c34511186557f17c792c2c9edbc Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 27 Dec 2015 00:16:41 +0800 Subject: [PATCH 0682/1710] =?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 --- ...0 eSpeak--Text To Speech Tool For Linux.md | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md b/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md index 271866ff47..f4ec1f20e1 100644 --- a/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md +++ b/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md @@ -1,24 +1,24 @@ -eSpeak: Linux文本转语音工具 +eSpeak: Linux 文本转语音工具 ================================================================================ ![Text to speech tool in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Text-to-speech-Linux.jpg) -[eSpeak][1]是Linux的命令行工具,能把文本转变成语音。这是一款用C语言写就的精致的语音合成器,提供英语和其它多种语言支持。 +[eSpeak][1]是一款 Linux 命令行工具,能把文本转换成语音。它是一款简洁的语音合成器,用C语言编写而成,它支持英语和其它多种语言。 -eSpeak从标准输入或者输入文件中读取文本。虽然语音输出与真人声音相去甚远,但是,在你项目有用得到的地方,eSpeak仍不失为一个精致快捷的工具。 +eSpeak 从标准输入或者输入文件中读取文本。虽然语音输出与真人声音相去甚远,但是,在你项目需要的时候,eSpeak 仍不失为一个简便快捷的工具。 -eSpeak部分主要特性如下: +eSpeak 部分主要特性如下: -- 为Linux和Windows准备的命令行工具 +- 提供给 Linux 和 Windows 的命令行工具 - 从文件或者标准输入中把文本读出来 - 提供给其它程序使用的共享库版本 -- 为Windows提供SAPI5版本,在screen-readers或者其它支持Windows SAPI5接口程序的支持下,eSpeak仍然能正常使用 +- 为 Windows 提供SAPI5版本,在screen-readers或者其它支持Windows SAPI5接口程序的支持下,eSpeak仍然能正常使用 - 可移植到其它平台,包括安卓,OSX等 -- 多种特色声音提供选择 +- 提供多种声音特性选择 - 语音输出可保存为[.WAV][2]格式的文件 -- 部分SSML([Speech Synthesis Markup Language][3])能为HTML所支持 -- 体积小巧,整个程序包括语言支持等占用不足2MB -- 可以实现文本到音素编码的转化,能被其它语音合成引擎吸纳为前端工具 -- 可作为生成和调制音素数据的开发工具 +- 部分SSML([Speech Synthesis Markup Language][3]语音合成标记语言)能为HTML所支持 +- 体积小巧,整个程序连同语言支持等占用小于2MB +- 可以实现文本到音素编码的转化,因此能适应成为其它语音合成引擎的前端工具 +- 开发工具可用于生产和调整音素数据 ### 安装eSpeak ### @@ -26,35 +26,35 @@ eSpeak部分主要特性如下: sudo apt-get install espeak -eSpeak is an old tool and I presume that it should be available in the repositories of other Linux distributions such as Arch Linux, Fedora etc. You can install eSpeak easily using dnf, pacman etc.eSpeak是一个古老的工具,我推测它应该能在其它众多Linux发行版如Arch,Fedora中运行。使用dnf,pacman等命令就能轻易安装。 +eSpeak 是一个古老的工具,我推测它应该能在其它众多 Linux 发行版中运行,比如 Arch,Fedora。使用 dnf,pacman 等命令就能轻松安装。 -eSpeak用法如下:输入espeak按enter键运行程序。输入字符按enter转换为语音输出(译补)。使用Ctrl+C来关闭运行中的程序。 +eSpeak 用法如下:输入 espeak 按 enter 键运行程序。输入字符按 enter 转换为语音输出(译补)。使用 Ctrl+C 来关闭运行中的程序。 ![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) -还有其它可以的选项,可以通过程序帮助进行查看。 +还有一些其他的选项可用,可以通过程序帮助进行查看。 ### GUI版本:Gespeaker ### -如果你更倾向于使用GUI版本,可以安装Gespeaker,它为eSpeak提供了GTK界面。 +如果你更倾向于使用 GUI 版本,可以安装 Gespeaker,它为 eSpeak 提供了 GTK 界面。 使用以下命令来安装Gespeaker: sudo apt-get install gespeaker -操作接口简明易用,你完全可以自行探索。 +操作界面简明易用,你完全可以自行探索。 ![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) -虽然这个工具不能为大部分计算所用,但是当你的项目需要把文本转换成语音,espeak还是挺方便使用的。需则用之吧~ +虽然这些工具不能为大部分计算所用,但是当你的项目需要把文本转换成语音时,使用 espeak 还是挺方便的。是否使用 espeak 这款语音合成器,选择权就交给你们啦。 -------------------------------------------------------------------------------- via: http://itsfoss.com/espeak-text-speech-linux/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/soooogreen) -校对:[校对者ID](https://github.com/校对者ID) +译者:[soooogreen](https://github.com/soooogreen) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f612d31bd8343d8a1e8a53bfe80994f58aadc773 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 27 Dec 2015 00:33:48 +0800 Subject: [PATCH 0683/1710] Update 20151114 How to Setup Drone - a Continuous Integration Service in Linux.md --- ...Continuous Integration Service in Linux.md | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) 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 index a18bc28cb9..f5f84006f8 100644 --- 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 @@ -165,24 +165,32 @@ After the installation is completed, we'll gonna configure drone to make it work 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]. - +为了运行Drone 我们必须设置最少一个和GitHub、GitHub 企业版,Gitlab,Gogs,Bitbucket 关联的集成点。在本文里我们只集成了github,但是如果哦我们要集成其他的我们可以在配置文件做修改。为了集成github 我们需要在[github setting] 创建一个新的应用。 ![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. +要创建一个应用,我们需要在`New Application` 页面点击`Register`,然后如下所示填表。 + ![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. +我们应该保证在应用的配置项里设置了**授权了的回调链接**,链接看起来像`http://drone.linoxide.com/api/auth/github.com`。然后我们点击注册应用。所有都做好之后我们会看到我们需要在我们的Drone 配置文件里配置的客户端ID 和客户端密钥。 + ![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. +在这些都完成之后我们需要使用文本编辑器编辑drone 配置文件,比如使用下面的命令。 + # nano /etc/drone/drone.toml Then, we'll find the [github] section and append the section with the above noted configuration as shown below. +然后我们会在drone 的配置文件里面找到[github] 部分,紧接着的是下面所示的配置内容 + [github] client="3dd44b969709c518603c" secret="4ee261abdb431bdc5e96b19cc3c498403853632a" @@ -191,24 +199,32 @@ Then, we'll find the [github] section and append the section with the above note ![Configuring Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-github-drone-e1446835124465.png) -### 6. Configuring SMTP server ### +### 6. 配置 SMTP 服务器 ### 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 #### +如果我们想让drone 使用email 发送通知,那么我们需要在SMTP 配置里面设置我们的SMTP 服务器。如果我们已经有了一个SMTP 服务,那就只需要简单的使用它的配置文件就行了,但是因为我们没有一个SMTP 服务器,我们需要安装一个MTA 比如Postfix,然后在drone 配置文件里配置好SMTP。 + +#### Ubuntu #### We can install postfix in ubuntu by running the following apt command. +在ubuntu 里使用下面的apt 命令安装postfix。 + # apt-get install postfix -#### On CentOS #### +#### CentOS #### We can install postfix in CentOS by running the following yum command. +在CentOS 里使用下面的yum 命令安装postfix。 + # yum install postfix After installing, we'll need to edit the configuration of our postfix configuration using a text editor. +安装好之后,我们需要编辑我们的postfix 配置文件。 + # nano /etc/postfix/main.cf Then, we'll need to replace the value of myhostname parameter to our FQDN ie drone.linoxide.com . @@ -345,7 +361,7 @@ In this article, we learned to completely setup a workable Continuous Intergrati via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ 作者:[Arun Pyasi][a] -译者:[ezio](https://github.com/oska874) +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7bcde5f35f2cee532828394c7fb468853f50a5ae Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 27 Dec 2015 01:28:50 +0800 Subject: [PATCH 0684/1710] =?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 --- ...3 7 ways hackers can use Wi-Fi against you.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md index 623886b896..cc3447e72a 100644 --- a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -10,19 +10,19 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F ### 利用免费热点 ### -它们似乎无处不在,而且它们的数量会在[下一个四年里增加四倍][1]。但是它们当中很多都是不值得信任的,从你的登录凭证、email甚至更加敏感的账户,都能被黑客用一款名叫“sniffers”的软件截获 — 这款软件能截获到任何你通过该连接提交的信息。防止被黑客盯上的最好办法就是使用VPN(virtual private network),它能保护你的数据隐私它会加密你所输入的信息。 +它们似乎无处不在,而且它们的数量会在[接下来四年里增加三倍][1]。但是它们当中很多都是不值得信任的,从你的登录凭证、email甚至更加敏感的账户,都能被黑客用一款名叫“sniffers”的软件截获 — 这款软件能截获到任何你通过该连接提交的信息。防止被黑客盯上的最好办法就是使用VPN(virtual private network),它加密了你所输入的信息,因此能够保护你的数据隐私。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/2_online-banking-100626675-orig.jpg) ### 网上银行 ### -你可能认为没有人需要自己被提醒不要使用免费Wi-Fi来操作网上银行, 但网络安全厂商卡巴斯基实验室表示[全球超过100家银行因为网络黑客而损失9亿美元][2],由此可见还是有很多人因此受害。如果你真的想要在一家咖吧里使用免费真实的Wi-Fi,那么你应该向服务员确认网络名称。[在店里用路由器设置一个开放的无线连接][3]并将它的网络名称设置成店名是一件相当简单的事。 +你可能认为没有人需要被提醒不要使用免费Wi-Fi来操作网上银行, 但网络安全厂商卡巴斯基实验室表示[全球超过100家银行因为网络黑客而损失9亿美元][2],由此可见还是有很多人因此受害。如果你确信一家咖啡店的免费Wi-Fi是正规的,想要连接它,那么你应该向服务员确认网络名称。[他人在店里用路由器设置一个开放的无线连接][3]并将它的网络名称设置成店名是一件相当简单的事。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/3_keeping-wifi-on-100626676-orig.jpg) ### 始终开着Wi-Fi开关 ### -如果你手机的Wi-Fi开关一直开着的,你会自动被连接到一个不安全的网络中去,你甚至都没有意识到。你可以利用你手机的[基于位置的Wi-Fi功能][4],如果它是可用的,那它会在你离开你所保存的网络范围后自动关闭你的Wi-Fi开关并在你回去之后再次开启。 +如果你手机的Wi-Fi开关一直开着的,你会自动被连接到一个不安全的网络中去,你甚至都没有意识到。你可以利用你手机中[基于位置的Wi-Fi功能][4],如果它是可用的,那它会在你离开你所保存的网络范围后自动关闭你的Wi-Fi开关并在你回去之后再次开启。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/4_not-using-firewall-100626677-orig.jpg) @@ -34,21 +34,21 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F ### 浏览非加密网页 ### -说起来很难过,[世界上排名前100万个网站中55%是不加密的][5],一个未加密的网站则会让传输的数据暴露在黑客的眼下。如果一个网页是安全的,你的浏览器则会有标明(比如说火狐浏览器是一把绿色的挂锁、Chrome蓝旗则是个绿色的图标)。但是一个安全的网站不能让你免于被劫持的风险,它能通过公共网络从你访问过的网站上窃取cookies,无论是不是正当网站与否。 +说起来很难过,[世界上排名前100万个网站中55%是不加密的][5],一个未加密的网站会让一切传输数据暴露在黑客的眼中。如果一个网页是安全的,你的浏览器则会有标明(比如说火狐浏览器是一把灰色的挂锁,Chrome浏览器则是个绿锁图标)。但是一个安全的网站不能让你免于被劫持的风险,它能通过公共网络从你访问过的网站上窃取cookies,无论是不是正规网站。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/6_updating-security-software-100626679-orig.jpg) ### 不更新你的安全防护软件 ### -如果你想要确保你自己的网络是受保护的,就更新的路由器固件。你要做的就是进入你的路由器管理页面去检查,通常你能在厂商的官方网页上下载到最新的固件版本。 +如果你想要确保你自己的网络是受保护的,就更新路由器固件。你要做的就是进入你的路由器管理页面去检查,通常你能在厂商的官方网页上下载到最新的固件版本。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/7_securing-home-wifi-100626680-orig.jpg) ### 不保护你的家用Wi-Fi ### -不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的MAC地址来让你的路由器只承认那些确认过的设备。 +不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的MAC地址来让你的路由器只识别那些确认过的设备。 -**Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们走向市场。你可以联系[他的推特][6]. +**Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们把产品推向市场。你可以通过[他的推特][6]联系他。 -------------------------------------------------------------------------------- @@ -56,7 +56,7 @@ via: http://www.networkworld.com/article/3003170/mobile-security/7-ways-hackers- 作者:[Josh Althuser][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6fb06594c952173a4e2cdc85cc761a9ea1c9f949 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 27 Dec 2015 01:31:25 +0800 Subject: [PATCH 0685/1710] =?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 --- .../share/20151123 7 ways hackers can use Wi-Fi against you.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md index cc3447e72a..ecb53bee2c 100644 --- a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -48,7 +48,7 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F 不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的MAC地址来让你的路由器只识别那些确认过的设备。 -**Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们把产品推向市场。你可以通过[他的推特][6]联系他。 +* **Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们把产品推向市场。你可以通过[他的推特][6]联系他。* -------------------------------------------------------------------------------- From 2c5853e18db0912742753d3461ecaba7cb353200 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 27 Dec 2015 01:32:04 +0800 Subject: [PATCH 0686/1710] =?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 --- .../share/20151123 7 ways hackers can use Wi-Fi against you.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md index ecb53bee2c..cc3447e72a 100644 --- a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md @@ -48,7 +48,7 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F 不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的MAC地址来让你的路由器只识别那些确认过的设备。 -* **Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们把产品推向市场。你可以通过[他的推特][6]联系他。* +**Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们把产品推向市场。你可以通过[他的推特][6]联系他。 -------------------------------------------------------------------------------- From c6f38534c2fd2023a90a06f7b21c6cd68c6c1558 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 27 Dec 2015 01:56:38 +0800 Subject: [PATCH 0687/1710] =?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 --- ...all Android Studio on Ubuntu 15.04 or CentOS 7.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md index 11d2e9b5b4..00bde27e78 100644 --- a/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md +++ b/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md @@ -1,12 +1,12 @@ 如何在 Ubuntu 15.04 / CentOS 7 上安装 Android Studio ================================================================================ -随着最近几年智能手机的进步,安卓成为了最大的手机平台之一,也有很多免费的用于开发安卓应用的工具。Android Studio 是基于 [IntelliJ IDEA][1] 用于开发安卓应用的集成开发环境。它是 Google 2014 年发布的免费开源软件,继 Eclipse 之后成为主要的 IDE。 +随着最近几年智能手机的进步,安卓成为了最大的手机平台之一,所有用于开发安卓应用的工具都是免费提供。Android Studio 是基于 [IntelliJ IDEA][1] 用于开发安卓应用的集成开发环境(IDE)。它是 Google 2014 年发布的免费开源软件,继 Eclipse 之后成为主要的 IDE。 在这篇文章,我们一起来学习如何在 Ubuntu 15.04 和 CentOS 7 上安装 Android Studio。 ### 在 Ubuntu 15.04 上安装 ### -我们可以用两种方式安装 Android Studio。第一种是配置必须的库然后再安装它;另一种是从 Android 官方网站下载然后再本地编译安装。在下面的例子中,我们会使用命令行设置库并安装它。在继续下一步之前,我们需要确保我们已经安装了 JDK 1.6 或者更新版本。 +我们可以用两种方式安装 Android Studio。第一种是配置必须的库然后再安装它;另一种是从 Android 官方网站下载然后在本地编译安装。在下面的例子中,我们会使用命令行设置库并安装它。在继续下一步之前,我们需要确保我们已经安装了 JDK 1.6 或者更新版本。 这里,我打算安装 JDK 1.8。 @@ -32,7 +32,7 @@ 上面的安装命令会在 /opt 目录下面安装 Android Studio。 -现在,运行下面的命令启动安装窗口: +现在,运行下面的命令启动安装向导: $ /opt/android-studio/bin/studio.sh @@ -121,7 +121,7 @@ ### 总结 ### -虽然发布不到一年,但是 Android Studio 已经替代 Eclipse 成为了安装开发最主要的 IDE。它是唯一一个能支持之后 Google 提供的 Android SDKs 和其它 Android 特性的官方 IDE 工具。那么,你还在等什么呢?赶快安装 Android Studio 然后体验开发安装应用的乐趣吧。 +虽然发布不到一年,但是 Android Studio 已经替代 Eclipse 成为了Android开发最主要的 IDE。它是唯一能支持 Google 之后将要提供的 Android SDKs 和其它 Android 特性的官方 IDE 工具。那么,你还在等什么呢?赶快安装 Android Studio 来体验开发 Android 应用的乐趣吧。 -------------------------------------------------------------------------------- @@ -129,11 +129,11 @@ via: http://linoxide.com/tools/install-android-studio-ubuntu-15-04-centos-7/ 作者:[B N Poornima][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/bnpoornima/ [1]:https://www.jetbrains.com/idea/ [2]:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html -[3]:http://developer.android.com/sdk/index.html \ No newline at end of file +[3]:http://developer.android.com/sdk/index.html From abb2af67a965ea777ed77ca7b14a0ad4471f0558 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 27 Dec 2015 11:30:01 +0800 Subject: [PATCH 0688/1710] Update 20151114 How to Setup Drone - a Continuous Integration Service in Linux.md --- ...Continuous Integration Service in Linux.md | 69 ++++++++++++++++--- 1 file changed, 59 insertions(+), 10 deletions(-) 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 index f5f84006f8..275f92dc1b 100644 --- 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 @@ -1,6 +1,7 @@ translating by Ezio How to Setup Drone - a Continuous Integration Service in Linux +如何在linux 上配置持续集成服务 - Drone ============================================================== 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. @@ -189,7 +190,7 @@ After thats done, we'll need to edit our drone configuration using a text editor Then, we'll find the [github] section and append the section with the above noted configuration as shown below. -然后我们会在drone 的配置文件里面找到[github] 部分,紧接着的是下面所示的配置内容 +然后我们会在drone 的配置文件里面找到`[github]` 部分,紧接着的是下面所示的配置内容 [github] client="3dd44b969709c518603c" @@ -229,14 +230,20 @@ After installing, we'll need to edit the configuration of our postfix configurat Then, we'll need to replace the value of myhostname parameter to our FQDN ie drone.linoxide.com . +然后我们要把myhostname 的值替换为我们自己的FQDN,比如drone.linoxide.com。 + myhostname = drone.linoxide.com Now, we'll gonna finally configure the SMTP section of our drone configuration file. +现在开始配置drone 配置文件里的SMTP 部分。 + # nano /etc/drone/drone.toml Then, we'll find the [stmp] section and then we'll need to append the setting as follows. +找到`[smtp]` 部分补充上下面的内容。 + [smtp] host = "drone.linoxide.com" port = "587" @@ -248,14 +255,20 @@ Then, we'll find the [stmp] section and then we'll need to append the setting as Note: Here, **user** and **pass** parameters are strongly recommended to be changed according to one's user configuration. -### 7. Configuring Worker ### +注意:这里的**user** 和 **pass** 参数强烈推荐一定要改成一个用户的配置。 + +### 7. 配置 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. +如我们所知的drone 利用了docker 完成构建、测试任务,我们需要把docker 配置为drone 的worker。要完成这些需要修改drone 配置文件里的`[worker]` 部分。 + # nano /etc/drone/drone.toml Then, we'll uncomment the following lines and append as shown below. +然后取消底下几行的注释并且补充上下面的内容。 + [worker] nodes=[ "unix:///var/run/docker.sock", @@ -264,6 +277,8 @@ Then, we'll uncomment the following lines and append as shown below. 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. +这里我们只设置了两个节点,这意味着上面的配置文件只能同时执行2 个构建操作。要提高并发性可以增大节点的值。 + [worker] nodes=[ "unix:///var/run/docker.sock", @@ -274,45 +289,63 @@ Here, we have set only 2 node which means the above configuration is capable of Here, in the above configuration, drone is configured to process four builds at a time, using the local docker daemon. -### 8. Restarting Drone ### +使用上面的配置文件drone 被配置为使用本地的docker 守护程序可以同时构建4个任务。 + +### 8. 重启 Drone ### Finally, after everything is done regarding the installation and configuration, we'll now start our drone server in our linux machine. -#### On Ubuntu #### +最后,当所有的安装和配置都准备好之后,我们现在要在本地的linux 机器上启动drone 服务器。 + +#### 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. +因为ubuntu 14.04 使用了sysvinit 作为默认的init 系统,所以只需要简单执行下面的service 命令就可以启动drone 了。 + # service drone restart To make drone start automatically in every boot of the system, we'll run the following command. +要让drone 在系统启动时也自动运行,需要运行下面的命令。 + # update-rc.d drone defaults -#### On CentOS #### +#### CentOS #### To start drone in CentOS machine, we'll simply run systemd command as CentOS 7 is shipped with systemd as init system. +因为CentOS 7使用systemd 作为init 系统,所以只需要运行下面的systemd 命令就可以重启drone。 + # systemctl restart drone Then, we'll enable drone to start automatically in every system boot. +要让drone 自动运行只需要运行下面的命令。 + # systemctl enable drone -### 9. Allowing Firewalls ### +### 9. 添加防火墙例外 ### 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 #### +众所周知drone 默认使用了80 端口而我们又没有修改他,所以我们需要配置防火墙程序允许80 端口(http)开发并允许其他机器可以通过网络连接。 + +#### 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 是最流行的防火墙程序,并且ubuntu 默认安装了它。我们需要修改iptable 暴露端口80,这样我们才能让drone 的web 界面在网络上被大家访问。 + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT # /etc/init.d/iptables save -#### On CentOS 7 #### +#### 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. +因为CentOS 7 默认安装了systemd,它使用firewalld 作为防火墙程序。为了在firewalld 上打开80端口(http 服务),我们需要执行下面的命令。 + # firewall-cmd --permanent --add-service=http success @@ -321,24 +354,34 @@ As CentOS 7 has systemd installed by default, it contains firewalld running as f success -### 10. Accessing Web Interface ### +### 10. 访问web 界面 ### 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. +现在我们将在我们最喜欢的浏览器上通过web 界面打开drone。要完成这些我们要把浏览器指向运行drone 的服务器。因为drone 默认使用80 端口而我们有没有修改过,所以我们只需要在浏览器里根据我们的配置输入`http://ip-address/` 或 `http://drone.linoxide.com` 就行了。在我们正确的完成了上述操作后,我们就可以看到登陆界面了。 + ![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. +因为在上面的步骤里配置了Github,我们现在只需要简单的选择github然后进入应用授权步骤,这些完成后我们就可以进入工作台了。 + ![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. +这里它会同步我们在github 上的代码库,然后询问我们要在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. +这一步完成后,它会询问我们在代码库里添加`.drone.yml` 文件的新名称,并且在这个文件里定义构建的过程和配置项,比如使用那个docker 镜像,执行那些命令和脚本来编译,等等。 + We'll need to configure our .drone.yml as shown below. +我们按照下面的内容来配置我们的`.drone.yml`。 + image: python script: - python helloworld.py @@ -346,16 +389,22 @@ We'll need to configure our .drone.yml as shown below. 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. +这一步完成后我们就可以使用drone 应用里的YAML 格式的配置文件来构建我们的应用了。所有对代码库的提交和改变此时都会同步到这个仓库。一旦提交完成了,drone 就会自动开始构建。 + ![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 ! +在本文中我们学习了如何安装一个可以工作的使用drone 的持续集成平台。如果我们愿意我们甚至可以从drone.io 官方提供的服务开始工作。我们可以根据自己的需求从免费的服务或者收费服务开始。它通过漂亮的web界面和强大的功能改变了持续集成的世界。它可以集成很多第三方应用和部署平台。如果你有任何问题、建议可以直接反馈给我们,谢谢。 + -------------------------------------------------------------------------------- via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ From 992398e9d4a450ae1b393c7e10c9b5dafffda210 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 27 Dec 2015 11:32:55 +0800 Subject: [PATCH 0689/1710] translate done --- ...Continuous Integration Service in Linux.md | 107 +----------------- 1 file changed, 1 insertion(+), 106 deletions(-) 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 index 275f92dc1b..077c945b9c 100644 --- 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 @@ -1,36 +1,23 @@ -translating by Ezio - -How to Setup Drone - a Continuous Integration Service in Linux 如何在linux 上配置持续集成服务 - Drone ============================================================== -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. - 如果你对一次又一次的克隆、构建、测试和部署代码感到厌倦了,可以考虑一下持续集成。持续集成也就是CI,是软件工程的像我们一样的频繁提交的代码库,构建、测试和部署的实践。CI 帮助我们快速的集成新代码到已有的代码基线。如果这个过程是自动化进行的,那么就会提高开发的速度,因为这可以减少开发人员手工构建和测试的时间。[Drone][1] 是一个免费的开源项目,用来提供一个非常棒的持续集成服务的环境,采用了Apache 2.0 协议。它已经集成近很多代码库提供商,比如Github、Bitbucket 以及Google COde,并且它可以从代码库提取代码,使我们可以编译多种语言,包括PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA 等等。它是如此一个强大的平台是因为它每次构建都使用了容器和docker 技术,这让用户可以在保证隔离的条件下完全控制他们自己的构建环境。 ### 1. 安装 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. - 首先,我们要安装docker,因为这是Drone 的工作流的最关键的元素。Drone 合理的利用了docker 来构建和测试应用。容器技术提高了应用部署的效率。要安装docker ,我们需要在不同的linux 发行版本运行下面对应的命令,我们这里会说明Ubuntu 14.04 和CentOS 7 两个版本。 #### Ubuntu #### -To install Docker in Ubuntu, we can simply run the following commands in a terminal or console. - 要在Ubuntu 上安装Docker ,我们只需要运行下面的命令。 # apt-get update # apt-get install docker.io -After the installation is done, we'll restart our docker engine using service command. - 安装之后我们需要使用`service` 命令重启docker 引擎。 # service docker restart -Then, we'll make docker start automatically in every system boot. - 然后我们让docker 在系统启动时自动启动。 # update-rc.d docker defaults @@ -46,26 +33,18 @@ Then, we'll make docker start automatically in every system boot. #### 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. - 要在centos 上安装docker,我们可以简单的运行下面的命令。 # 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. - 安装好docker 引擎之后我么只需要简单实用下面的`systemd` 命令启动docker,因为centos 7 的默认init 系统是systemd。 # systemctl start docker -Then, we'll enable docker to start automatically in every system startup. - 然后我们要让docker 在系统启动时自动启动。 # systemctl enable docker @@ -74,36 +53,26 @@ Then, we'll enable docker to start automatically in every system startup. ### 2. 安装 SQlite 驱动 ### -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. - Drone 默认使用SQLite3 数据库服务器来保存数据和信息。它会在/var/lib/drone/ 自动创建名为drone.sqlite 的数据库来处理数据库模式的创建和迁移。要安装SQLite3 我们要完成以下几步。 #### 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. - 因为SQLite3 存在于Ubuntu 14.04 的默认软件库,我们只需要简单的使用apt 命令安装它。 # apt-get install libsqlite3-dev #### CentOS 7 #### -To install it on CentOS 7 machine, we'll need to run the following yum command. - 要在Centos 7 上安装选哟使用下面的yum 命令。 # yum install sqlite-devel ### 3. 安装 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. - 最后,我们安装好依赖的软件,我们现在更进一步的接近安装Drone。在这一步里我们值简单的从官方链接下载对应的二进制软件包,然后使用默认软件包管理器安装Drone。 #### 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 从官方的[Debian 文件下载链接][2]下载drone 的debian 软件包。下面就是下载命令。 # wget downloads.drone.io/master/drone.deb @@ -116,8 +85,6 @@ We'll use wget to download the debian package of drone for ubuntu from the [offi 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 软件包管理器安装它。 # dpkg -i drone.deb @@ -132,8 +99,6 @@ After its downloaded, we'll gonna install it with dpkg package manager. #### 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. - 在CentOS 机器上我们要使用wget 命令从[下载链接][3]下载RPM 包。 # wget downloads.drone.io/master/drone.rpm @@ -147,16 +112,12 @@ In the machine running CentOS, we'll download the RPM package from the [official 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 安装rpm 包。 # yum localinstall drone.rpm ### 4. 配置端口 ### -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. - 安装完成之后,我们要使它工作要先进行配置。drone 的配置文件在**/etc/drone/drone.toml** 。默认情况下drone 的web 接口使用的是80,而这也是http 默认的端口,如果我们要下面所示的修改配置文件里server 块对应的值。 [server] @@ -164,32 +125,22 @@ After the installation is completed, we'll gonna configure drone to make it work ### 5. 集成 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]. - 为了运行Drone 我们必须设置最少一个和GitHub、GitHub 企业版,Gitlab,Gogs,Bitbucket 关联的集成点。在本文里我们只集成了github,但是如果哦我们要集成其他的我们可以在配置文件做修改。为了集成github 我们需要在[github setting] 创建一个新的应用。 ![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. - 要创建一个应用,我们需要在`New Application` 页面点击`Register`,然后如下所示填表。 ![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. - 我们应该保证在应用的配置项里设置了**授权了的回调链接**,链接看起来像`http://drone.linoxide.com/api/auth/github.com`。然后我们点击注册应用。所有都做好之后我们会看到我们需要在我们的Drone 配置文件里配置的客户端ID 和客户端密钥。 ![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. - 在这些都完成之后我们需要使用文本编辑器编辑drone 配置文件,比如使用下面的命令。 # nano /etc/drone/drone.toml -Then, we'll find the [github] section and append the section with the above noted configuration as shown below. - 然后我们会在drone 的配置文件里面找到`[github]` 部分,紧接着的是下面所示的配置内容 [github] @@ -202,46 +153,32 @@ Then, we'll find the [github] section and append the section with the above note ### 6. 配置 SMTP 服务器 ### -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. - 如果我们想让drone 使用email 发送通知,那么我们需要在SMTP 配置里面设置我们的SMTP 服务器。如果我们已经有了一个SMTP 服务,那就只需要简单的使用它的配置文件就行了,但是因为我们没有一个SMTP 服务器,我们需要安装一个MTA 比如Postfix,然后在drone 配置文件里配置好SMTP。 #### Ubuntu #### -We can install postfix in ubuntu by running the following apt command. - 在ubuntu 里使用下面的apt 命令安装postfix。 # apt-get install postfix #### CentOS #### -We can install postfix in CentOS by running the following yum command. - 在CentOS 里使用下面的yum 命令安装postfix。 # yum install postfix -After installing, we'll need to edit the configuration of our postfix configuration using a text editor. - 安装好之后,我们需要编辑我们的postfix 配置文件。 # nano /etc/postfix/main.cf -Then, we'll need to replace the value of myhostname parameter to our FQDN ie drone.linoxide.com . - 然后我们要把myhostname 的值替换为我们自己的FQDN,比如drone.linoxide.com。 myhostname = drone.linoxide.com -Now, we'll gonna finally configure the SMTP section of our drone configuration file. - 现在开始配置drone 配置文件里的SMTP 部分。 # nano /etc/drone/drone.toml -Then, we'll find the [stmp] section and then we'll need to append the setting as follows. - 找到`[smtp]` 部分补充上下面的内容。 [smtp] @@ -253,20 +190,14 @@ Then, we'll find the [stmp] section and then we'll need to append the setting as ![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. - 注意:这里的**user** 和 **pass** 参数强烈推荐一定要改成一个用户的配置。 ### 7. 配置 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. - 如我们所知的drone 利用了docker 完成构建、测试任务,我们需要把docker 配置为drone 的worker。要完成这些需要修改drone 配置文件里的`[worker]` 部分。 # nano /etc/drone/drone.toml -Then, we'll uncomment the following lines and append as shown below. - 然后取消底下几行的注释并且补充上下面的内容。 [worker] @@ -275,8 +206,6 @@ Then, we'll uncomment the following lines and append as shown below. "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. - 这里我们只设置了两个节点,这意味着上面的配置文件只能同时执行2 个构建操作。要提高并发性可以增大节点的值。 [worker] @@ -287,54 +216,38 @@ Here, we have set only 2 node which means the above configuration is capable of "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. - 使用上面的配置文件drone 被配置为使用本地的docker 守护程序可以同时构建4个任务。 ### 8. 重启 Drone ### -Finally, after everything is done regarding the installation and configuration, we'll now start our drone server in our linux machine. - 最后,当所有的安装和配置都准备好之后,我们现在要在本地的linux 机器上启动drone 服务器。 #### 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. - 因为ubuntu 14.04 使用了sysvinit 作为默认的init 系统,所以只需要简单执行下面的service 命令就可以启动drone 了。 # service drone restart -To make drone start automatically in every boot of the system, we'll run the following command. - 要让drone 在系统启动时也自动运行,需要运行下面的命令。 # update-rc.d drone defaults #### CentOS #### -To start drone in CentOS machine, we'll simply run systemd command as CentOS 7 is shipped with systemd as init system. - 因为CentOS 7使用systemd 作为init 系统,所以只需要运行下面的systemd 命令就可以重启drone。 # systemctl restart drone -Then, we'll enable drone to start automatically in every system boot. - 要让drone 自动运行只需要运行下面的命令。 # systemctl enable drone ### 9. 添加防火墙例外 ### -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. - 众所周知drone 默认使用了80 端口而我们又没有修改他,所以我们需要配置防火墙程序允许80 端口(http)开发并允许其他机器可以通过网络连接。 #### 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 是最流行的防火墙程序,并且ubuntu 默认安装了它。我们需要修改iptable 暴露端口80,这样我们才能让drone 的web 界面在网络上被大家访问。 # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT @@ -342,8 +255,6 @@ iptables 是最流行的防火墙程序,并且ubuntu 默认安装了它。我 #### 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. - 因为CentOS 7 默认安装了systemd,它使用firewalld 作为防火墙程序。为了在firewalld 上打开80端口(http 服务),我们需要执行下面的命令。 # firewall-cmd --permanent --add-service=http @@ -356,30 +267,20 @@ As CentOS 7 has systemd installed by default, it contains firewalld running as f ### 10. 访问web 界面 ### -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. - 现在我们将在我们最喜欢的浏览器上通过web 界面打开drone。要完成这些我们要把浏览器指向运行drone 的服务器。因为drone 默认使用80 端口而我们有没有修改过,所以我们只需要在浏览器里根据我们的配置输入`http://ip-address/` 或 `http://drone.linoxide.com` 就行了。在我们正确的完成了上述操作后,我们就可以看到登陆界面了。 ![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. - 因为在上面的步骤里配置了Github,我们现在只需要简单的选择github然后进入应用授权步骤,这些完成后我们就可以进入工作台了。 ![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. - 这里它会同步我们在github 上的代码库,然后询问我们要在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. - 这一步完成后,它会询问我们在代码库里添加`.drone.yml` 文件的新名称,并且在这个文件里定义构建的过程和配置项,比如使用那个docker 镜像,执行那些命令和脚本来编译,等等。 -We'll need to configure our .drone.yml as shown below. - 我们按照下面的内容来配置我们的`.drone.yml`。 image: python @@ -387,22 +288,16 @@ We'll need to configure our .drone.yml as shown below. - 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. - 这一步完成后我们就可以使用drone 应用里的YAML 格式的配置文件来构建我们的应用了。所有对代码库的提交和改变此时都会同步到这个仓库。一旦提交完成了,drone 就会自动开始构建。 ![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) ### 总结 ### -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 ! - 在本文中我们学习了如何安装一个可以工作的使用drone 的持续集成平台。如果我们愿意我们甚至可以从drone.io 官方提供的服务开始工作。我们可以根据自己的需求从免费的服务或者收费服务开始。它通过漂亮的web界面和强大的功能改变了持续集成的世界。它可以集成很多第三方应用和部署平台。如果你有任何问题、建议可以直接反馈给我们,谢谢。 -------------------------------------------------------------------------------- @@ -410,7 +305,7 @@ In this article, we learned to completely setup a workable Continuous Intergrati via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ 作者:[Arun Pyasi][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 5cc918dca292aacae91227b0bfee63921d5141f8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 27 Dec 2015 11:33:16 +0800 Subject: [PATCH 0690/1710] move 1 --- ...Continuous Integration Service in Linux.md | 317 ------------------ 1 file changed, 317 deletions(-) delete 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 deleted file mode 100644 index 077c945b9c..0000000000 --- a/sources/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md +++ /dev/null @@ -1,317 +0,0 @@ -如何在linux 上配置持续集成服务 - Drone -============================================================== - -如果你对一次又一次的克隆、构建、测试和部署代码感到厌倦了,可以考虑一下持续集成。持续集成也就是CI,是软件工程的像我们一样的频繁提交的代码库,构建、测试和部署的实践。CI 帮助我们快速的集成新代码到已有的代码基线。如果这个过程是自动化进行的,那么就会提高开发的速度,因为这可以减少开发人员手工构建和测试的时间。[Drone][1] 是一个免费的开源项目,用来提供一个非常棒的持续集成服务的环境,采用了Apache 2.0 协议。它已经集成近很多代码库提供商,比如Github、Bitbucket 以及Google COde,并且它可以从代码库提取代码,使我们可以编译多种语言,包括PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA 等等。它是如此一个强大的平台是因为它每次构建都使用了容器和docker 技术,这让用户可以在保证隔离的条件下完全控制他们自己的构建环境。 - -### 1. 安装 Docker ### - -首先,我们要安装docker,因为这是Drone 的工作流的最关键的元素。Drone 合理的利用了docker 来构建和测试应用。容器技术提高了应用部署的效率。要安装docker ,我们需要在不同的linux 发行版本运行下面对应的命令,我们这里会说明Ubuntu 14.04 和CentOS 7 两个版本。 - -#### Ubuntu #### - -要在Ubuntu 上安装Docker ,我们只需要运行下面的命令。 - - # apt-get update - # apt-get install docker.io - -安装之后我们需要使用`service` 命令重启docker 引擎。 - - # service docker restart - -然后我们让docker 在系统启动时自动启动。 - - # 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 - -#### CentOS #### - -第一,我们要更新机器上已经安装的软件包。我们可以使用下面的命令。 - - # sudo yum update - -要在centos 上安装docker,我们可以简单的运行下面的命令。 - - # curl -sSL https://get.docker.com/ | sh - -安装好docker 引擎之后我么只需要简单实用下面的`systemd` 命令启动docker,因为centos 7 的默认init 系统是systemd。 - - # systemctl start docker - -然后我们要让docker 在系统启动时自动启动。 - - # systemctl enable docker - - ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service' - -### 2. 安装 SQlite 驱动 ### - -Drone 默认使用SQLite3 数据库服务器来保存数据和信息。它会在/var/lib/drone/ 自动创建名为drone.sqlite 的数据库来处理数据库模式的创建和迁移。要安装SQLite3 我们要完成以下几步。 - -#### Ubuntu 14.04 #### - -因为SQLite3 存在于Ubuntu 14.04 的默认软件库,我们只需要简单的使用apt 命令安装它。 - - # apt-get install libsqlite3-dev - -#### CentOS 7 #### - -要在Centos 7 上安装选哟使用下面的yum 命令。 - - # yum install sqlite-devel - -### 3. 安装 Drone ### - -最后,我们安装好依赖的软件,我们现在更进一步的接近安装Drone。在这一步里我们值简单的从官方链接下载对应的二进制软件包,然后使用默认软件包管理器安装Drone。 - -#### Ubuntu #### - -我们将使用wget 从官方的[Debian 文件下载链接][2]下载drone 的debian 软件包。下面就是下载命令。 - - # 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] - -下载好之后,我们将使用dpkg 软件包管理器安装它。 - - # 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 - -#### CentOS #### - -在CentOS 机器上我们要使用wget 命令从[下载链接][3]下载RPM 包。 - - # 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] - -然后我们使用yum 安装rpm 包。 - - # yum localinstall drone.rpm - -### 4. 配置端口 ### - -安装完成之后,我们要使它工作要先进行配置。drone 的配置文件在**/etc/drone/drone.toml** 。默认情况下drone 的web 接口使用的是80,而这也是http 默认的端口,如果我们要下面所示的修改配置文件里server 块对应的值。 - - [server] - port=":80" - -### 5. 集成 Github ### - -为了运行Drone 我们必须设置最少一个和GitHub、GitHub 企业版,Gitlab,Gogs,Bitbucket 关联的集成点。在本文里我们只集成了github,但是如果哦我们要集成其他的我们可以在配置文件做修改。为了集成github 我们需要在[github setting] 创建一个新的应用。 - -![Registering App Github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-app-github.png) - -要创建一个应用,我们需要在`New Application` 页面点击`Register`,然后如下所示填表。 - -![Registering OAuth app github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-OAuth-app-github.png) - -我们应该保证在应用的配置项里设置了**授权了的回调链接**,链接看起来像`http://drone.linoxide.com/api/auth/github.com`。然后我们点击注册应用。所有都做好之后我们会看到我们需要在我们的Drone 配置文件里配置的客户端ID 和客户端密钥。 - -![Client ID and Secret Token](http://blog.linoxide.com/wp-content/uploads/2015/11/client-id-secret-token.png) - -在这些都完成之后我们需要使用文本编辑器编辑drone 配置文件,比如使用下面的命令。 - - # nano /etc/drone/drone.toml - -然后我们会在drone 的配置文件里面找到`[github]` 部分,紧接着的是下面所示的配置内容 - - [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. 配置 SMTP 服务器 ### - -如果我们想让drone 使用email 发送通知,那么我们需要在SMTP 配置里面设置我们的SMTP 服务器。如果我们已经有了一个SMTP 服务,那就只需要简单的使用它的配置文件就行了,但是因为我们没有一个SMTP 服务器,我们需要安装一个MTA 比如Postfix,然后在drone 配置文件里配置好SMTP。 - -#### Ubuntu #### - -在ubuntu 里使用下面的apt 命令安装postfix。 - - # apt-get install postfix - -#### CentOS #### - -在CentOS 里使用下面的yum 命令安装postfix。 - - # yum install postfix - -安装好之后,我们需要编辑我们的postfix 配置文件。 - - # nano /etc/postfix/main.cf - -然后我们要把myhostname 的值替换为我们自己的FQDN,比如drone.linoxide.com。 - - myhostname = drone.linoxide.com - -现在开始配置drone 配置文件里的SMTP 部分。 - - # nano /etc/drone/drone.toml - -找到`[smtp]` 部分补充上下面的内容。 - - [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) - -注意:这里的**user** 和 **pass** 参数强烈推荐一定要改成一个用户的配置。 - -### 7. 配置 Worker ### - -如我们所知的drone 利用了docker 完成构建、测试任务,我们需要把docker 配置为drone 的worker。要完成这些需要修改drone 配置文件里的`[worker]` 部分。 - - # nano /etc/drone/drone.toml - -然后取消底下几行的注释并且补充上下面的内容。 - - [worker] - nodes=[ - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock" - ] - -这里我们只设置了两个节点,这意味着上面的配置文件只能同时执行2 个构建操作。要提高并发性可以增大节点的值。 - - [worker] - nodes=[ - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock" - ] - -使用上面的配置文件drone 被配置为使用本地的docker 守护程序可以同时构建4个任务。 - -### 8. 重启 Drone ### - -最后,当所有的安装和配置都准备好之后,我们现在要在本地的linux 机器上启动drone 服务器。 - -#### Ubuntu #### - -因为ubuntu 14.04 使用了sysvinit 作为默认的init 系统,所以只需要简单执行下面的service 命令就可以启动drone 了。 - - # service drone restart - -要让drone 在系统启动时也自动运行,需要运行下面的命令。 - - # update-rc.d drone defaults - -#### CentOS #### - -因为CentOS 7使用systemd 作为init 系统,所以只需要运行下面的systemd 命令就可以重启drone。 - - # systemctl restart drone - -要让drone 自动运行只需要运行下面的命令。 - - # systemctl enable drone - -### 9. 添加防火墙例外 ### - -众所周知drone 默认使用了80 端口而我们又没有修改他,所以我们需要配置防火墙程序允许80 端口(http)开发并允许其他机器可以通过网络连接。 - -#### Ubuntu 14.04 #### - -iptables 是最流行的防火墙程序,并且ubuntu 默认安装了它。我们需要修改iptable 暴露端口80,这样我们才能让drone 的web 界面在网络上被大家访问。 - - # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT - # /etc/init.d/iptables save - -#### CentOS 7 #### - -因为CentOS 7 默认安装了systemd,它使用firewalld 作为防火墙程序。为了在firewalld 上打开80端口(http 服务),我们需要执行下面的命令。 - - # firewall-cmd --permanent --add-service=http - - success - - # firewall-cmd --reload - - success - -### 10. 访问web 界面 ### - -现在我们将在我们最喜欢的浏览器上通过web 界面打开drone。要完成这些我们要把浏览器指向运行drone 的服务器。因为drone 默认使用80 端口而我们有没有修改过,所以我们只需要在浏览器里根据我们的配置输入`http://ip-address/` 或 `http://drone.linoxide.com` 就行了。在我们正确的完成了上述操作后,我们就可以看到登陆界面了。 - -![Login Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/login-github-drone-e1446834688394.png) - -因为在上面的步骤里配置了Github,我们现在只需要简单的选择github然后进入应用授权步骤,这些完成后我们就可以进入工作台了。 - -![Drone Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/11/drone-dashboard.png) - -这里它会同步我们在github 上的代码库,然后询问我们要在drone 上构建那个代码库。 - -![Activate Repository](http://blog.linoxide.com/wp-content/uploads/2015/11/activate-repository-e1446835574595.png) - -这一步完成后,它会询问我们在代码库里添加`.drone.yml` 文件的新名称,并且在这个文件里定义构建的过程和配置项,比如使用那个docker 镜像,执行那些命令和脚本来编译,等等。 - -我们按照下面的内容来配置我们的`.drone.yml`。 - - image: python - script: - - python helloworld.py - - echo "Build has been completed." - -这一步完成后我们就可以使用drone 应用里的YAML 格式的配置文件来构建我们的应用了。所有对代码库的提交和改变此时都会同步到这个仓库。一旦提交完成了,drone 就会自动开始构建。 - -![Building Application Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/building-application-drone.png) - -所有操作都完成后,我们就能在终端看到构建的结果了。 - -![Build Success Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/build-success-drone.png) - -### 总结 ### - -在本文中我们学习了如何安装一个可以工作的使用drone 的持续集成平台。如果我们愿意我们甚至可以从drone.io 官方提供的服务开始工作。我们可以根据自己的需求从免费的服务或者收费服务开始。它通过漂亮的web界面和强大的功能改变了持续集成的世界。它可以集成很多第三方应用和部署平台。如果你有任何问题、建议可以直接反馈给我们,谢谢。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ - -作者:[Arun Pyasi][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/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 e3442f00e7bbff5a2ab9e84cc50e7410a2bdf046 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 27 Dec 2015 11:35:18 +0800 Subject: [PATCH 0691/1710] move done 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 translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md diff --git a/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md b/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md new file mode 100644 index 0000000000..077c945b9c --- /dev/null +++ b/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md @@ -0,0 +1,317 @@ +如何在linux 上配置持续集成服务 - Drone +============================================================== + +如果你对一次又一次的克隆、构建、测试和部署代码感到厌倦了,可以考虑一下持续集成。持续集成也就是CI,是软件工程的像我们一样的频繁提交的代码库,构建、测试和部署的实践。CI 帮助我们快速的集成新代码到已有的代码基线。如果这个过程是自动化进行的,那么就会提高开发的速度,因为这可以减少开发人员手工构建和测试的时间。[Drone][1] 是一个免费的开源项目,用来提供一个非常棒的持续集成服务的环境,采用了Apache 2.0 协议。它已经集成近很多代码库提供商,比如Github、Bitbucket 以及Google COde,并且它可以从代码库提取代码,使我们可以编译多种语言,包括PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA 等等。它是如此一个强大的平台是因为它每次构建都使用了容器和docker 技术,这让用户可以在保证隔离的条件下完全控制他们自己的构建环境。 + +### 1. 安装 Docker ### + +首先,我们要安装docker,因为这是Drone 的工作流的最关键的元素。Drone 合理的利用了docker 来构建和测试应用。容器技术提高了应用部署的效率。要安装docker ,我们需要在不同的linux 发行版本运行下面对应的命令,我们这里会说明Ubuntu 14.04 和CentOS 7 两个版本。 + +#### Ubuntu #### + +要在Ubuntu 上安装Docker ,我们只需要运行下面的命令。 + + # apt-get update + # apt-get install docker.io + +安装之后我们需要使用`service` 命令重启docker 引擎。 + + # service docker restart + +然后我们让docker 在系统启动时自动启动。 + + # 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 + +#### CentOS #### + +第一,我们要更新机器上已经安装的软件包。我们可以使用下面的命令。 + + # sudo yum update + +要在centos 上安装docker,我们可以简单的运行下面的命令。 + + # curl -sSL https://get.docker.com/ | sh + +安装好docker 引擎之后我么只需要简单实用下面的`systemd` 命令启动docker,因为centos 7 的默认init 系统是systemd。 + + # systemctl start docker + +然后我们要让docker 在系统启动时自动启动。 + + # systemctl enable docker + + ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service' + +### 2. 安装 SQlite 驱动 ### + +Drone 默认使用SQLite3 数据库服务器来保存数据和信息。它会在/var/lib/drone/ 自动创建名为drone.sqlite 的数据库来处理数据库模式的创建和迁移。要安装SQLite3 我们要完成以下几步。 + +#### Ubuntu 14.04 #### + +因为SQLite3 存在于Ubuntu 14.04 的默认软件库,我们只需要简单的使用apt 命令安装它。 + + # apt-get install libsqlite3-dev + +#### CentOS 7 #### + +要在Centos 7 上安装选哟使用下面的yum 命令。 + + # yum install sqlite-devel + +### 3. 安装 Drone ### + +最后,我们安装好依赖的软件,我们现在更进一步的接近安装Drone。在这一步里我们值简单的从官方链接下载对应的二进制软件包,然后使用默认软件包管理器安装Drone。 + +#### Ubuntu #### + +我们将使用wget 从官方的[Debian 文件下载链接][2]下载drone 的debian 软件包。下面就是下载命令。 + + # 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] + +下载好之后,我们将使用dpkg 软件包管理器安装它。 + + # 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 + +#### CentOS #### + +在CentOS 机器上我们要使用wget 命令从[下载链接][3]下载RPM 包。 + + # 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] + +然后我们使用yum 安装rpm 包。 + + # yum localinstall drone.rpm + +### 4. 配置端口 ### + +安装完成之后,我们要使它工作要先进行配置。drone 的配置文件在**/etc/drone/drone.toml** 。默认情况下drone 的web 接口使用的是80,而这也是http 默认的端口,如果我们要下面所示的修改配置文件里server 块对应的值。 + + [server] + port=":80" + +### 5. 集成 Github ### + +为了运行Drone 我们必须设置最少一个和GitHub、GitHub 企业版,Gitlab,Gogs,Bitbucket 关联的集成点。在本文里我们只集成了github,但是如果哦我们要集成其他的我们可以在配置文件做修改。为了集成github 我们需要在[github setting] 创建一个新的应用。 + +![Registering App Github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-app-github.png) + +要创建一个应用,我们需要在`New Application` 页面点击`Register`,然后如下所示填表。 + +![Registering OAuth app github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-OAuth-app-github.png) + +我们应该保证在应用的配置项里设置了**授权了的回调链接**,链接看起来像`http://drone.linoxide.com/api/auth/github.com`。然后我们点击注册应用。所有都做好之后我们会看到我们需要在我们的Drone 配置文件里配置的客户端ID 和客户端密钥。 + +![Client ID and Secret Token](http://blog.linoxide.com/wp-content/uploads/2015/11/client-id-secret-token.png) + +在这些都完成之后我们需要使用文本编辑器编辑drone 配置文件,比如使用下面的命令。 + + # nano /etc/drone/drone.toml + +然后我们会在drone 的配置文件里面找到`[github]` 部分,紧接着的是下面所示的配置内容 + + [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. 配置 SMTP 服务器 ### + +如果我们想让drone 使用email 发送通知,那么我们需要在SMTP 配置里面设置我们的SMTP 服务器。如果我们已经有了一个SMTP 服务,那就只需要简单的使用它的配置文件就行了,但是因为我们没有一个SMTP 服务器,我们需要安装一个MTA 比如Postfix,然后在drone 配置文件里配置好SMTP。 + +#### Ubuntu #### + +在ubuntu 里使用下面的apt 命令安装postfix。 + + # apt-get install postfix + +#### CentOS #### + +在CentOS 里使用下面的yum 命令安装postfix。 + + # yum install postfix + +安装好之后,我们需要编辑我们的postfix 配置文件。 + + # nano /etc/postfix/main.cf + +然后我们要把myhostname 的值替换为我们自己的FQDN,比如drone.linoxide.com。 + + myhostname = drone.linoxide.com + +现在开始配置drone 配置文件里的SMTP 部分。 + + # nano /etc/drone/drone.toml + +找到`[smtp]` 部分补充上下面的内容。 + + [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) + +注意:这里的**user** 和 **pass** 参数强烈推荐一定要改成一个用户的配置。 + +### 7. 配置 Worker ### + +如我们所知的drone 利用了docker 完成构建、测试任务,我们需要把docker 配置为drone 的worker。要完成这些需要修改drone 配置文件里的`[worker]` 部分。 + + # nano /etc/drone/drone.toml + +然后取消底下几行的注释并且补充上下面的内容。 + + [worker] + nodes=[ + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock" + ] + +这里我们只设置了两个节点,这意味着上面的配置文件只能同时执行2 个构建操作。要提高并发性可以增大节点的值。 + + [worker] + nodes=[ + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock" + ] + +使用上面的配置文件drone 被配置为使用本地的docker 守护程序可以同时构建4个任务。 + +### 8. 重启 Drone ### + +最后,当所有的安装和配置都准备好之后,我们现在要在本地的linux 机器上启动drone 服务器。 + +#### Ubuntu #### + +因为ubuntu 14.04 使用了sysvinit 作为默认的init 系统,所以只需要简单执行下面的service 命令就可以启动drone 了。 + + # service drone restart + +要让drone 在系统启动时也自动运行,需要运行下面的命令。 + + # update-rc.d drone defaults + +#### CentOS #### + +因为CentOS 7使用systemd 作为init 系统,所以只需要运行下面的systemd 命令就可以重启drone。 + + # systemctl restart drone + +要让drone 自动运行只需要运行下面的命令。 + + # systemctl enable drone + +### 9. 添加防火墙例外 ### + +众所周知drone 默认使用了80 端口而我们又没有修改他,所以我们需要配置防火墙程序允许80 端口(http)开发并允许其他机器可以通过网络连接。 + +#### Ubuntu 14.04 #### + +iptables 是最流行的防火墙程序,并且ubuntu 默认安装了它。我们需要修改iptable 暴露端口80,这样我们才能让drone 的web 界面在网络上被大家访问。 + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + # /etc/init.d/iptables save + +#### CentOS 7 #### + +因为CentOS 7 默认安装了systemd,它使用firewalld 作为防火墙程序。为了在firewalld 上打开80端口(http 服务),我们需要执行下面的命令。 + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 10. 访问web 界面 ### + +现在我们将在我们最喜欢的浏览器上通过web 界面打开drone。要完成这些我们要把浏览器指向运行drone 的服务器。因为drone 默认使用80 端口而我们有没有修改过,所以我们只需要在浏览器里根据我们的配置输入`http://ip-address/` 或 `http://drone.linoxide.com` 就行了。在我们正确的完成了上述操作后,我们就可以看到登陆界面了。 + +![Login Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/login-github-drone-e1446834688394.png) + +因为在上面的步骤里配置了Github,我们现在只需要简单的选择github然后进入应用授权步骤,这些完成后我们就可以进入工作台了。 + +![Drone Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/11/drone-dashboard.png) + +这里它会同步我们在github 上的代码库,然后询问我们要在drone 上构建那个代码库。 + +![Activate Repository](http://blog.linoxide.com/wp-content/uploads/2015/11/activate-repository-e1446835574595.png) + +这一步完成后,它会询问我们在代码库里添加`.drone.yml` 文件的新名称,并且在这个文件里定义构建的过程和配置项,比如使用那个docker 镜像,执行那些命令和脚本来编译,等等。 + +我们按照下面的内容来配置我们的`.drone.yml`。 + + image: python + script: + - python helloworld.py + - echo "Build has been completed." + +这一步完成后我们就可以使用drone 应用里的YAML 格式的配置文件来构建我们的应用了。所有对代码库的提交和改变此时都会同步到这个仓库。一旦提交完成了,drone 就会自动开始构建。 + +![Building Application Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/building-application-drone.png) + +所有操作都完成后,我们就能在终端看到构建的结果了。 + +![Build Success Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/build-success-drone.png) + +### 总结 ### + +在本文中我们学习了如何安装一个可以工作的使用drone 的持续集成平台。如果我们愿意我们甚至可以从drone.io 官方提供的服务开始工作。我们可以根据自己的需求从免费的服务或者收费服务开始。它通过漂亮的web界面和强大的功能改变了持续集成的世界。它可以集成很多第三方应用和部署平台。如果你有任何问题、建议可以直接反馈给我们,谢谢。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ + +作者:[Arun Pyasi][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/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 18e544593361a1402e06b276ad9720113eee2261 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 27 Dec 2015 15:20:30 +0800 Subject: [PATCH 0692/1710] =?UTF-8?q?20151227-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ubuntu,mobile,os --- ...0151227 Ubuntu Touch, three years later.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/tech/20151227 Ubuntu Touch, three years later.md diff --git a/sources/tech/20151227 Ubuntu Touch, three years later.md b/sources/tech/20151227 Ubuntu Touch, three years later.md new file mode 100644 index 0000000000..3d467163cf --- /dev/null +++ b/sources/tech/20151227 Ubuntu Touch, three years later.md @@ -0,0 +1,68 @@ +Back in early 2013, your editor [dedicated a sacrificial handset][2] to the testing of the then-new Ubuntu Touch distribution. At that time, things were so unbaked that the distribution came with mocked-up data for unready apps; it even came with a set of fake tweets. Nearly three years later, it seemed time to give Ubuntu Touch another try on another sacrificial device. This distribution has certainly made some progress in those years, but, sadly, it still seems far from being a competitive offering in this space. +In particular, your editor tested version 16.04r3 from the testing channel on a Nexus 4 handset. The Nexus 4 is certainly past its prime at the end of 2015, but it still functions as a credible Android device. It is, in any case, the only phone handset on [the list of supported devices][1] other than the three that were sold (in locations far from your editor's home) with Ubuntu Touch pre-installed. It is a bit discouraging that Ubuntu Touch is not supported on a more recent device; the Nexus 4 was discontinued over two years ago. + +People who are accustomed to putting strange systems on Nexus devices know the drill fairly well: unlock the bootloader, install a new recovery image if necessary, then use the **fastboot** tool to flash a new image. Ubuntu Touch does not work that way; instead, one must use a set of tools available only on the Ubuntu desktop distribution. Your editor's current menagerie of systems does not include any of those, but, fortunately, running the Ubuntu 15.10 distribution off a USB drive works just fine. It must be said, though, that Ubuntu appears not to have gotten the memo regarding high-DPI laptop displays; 15.10 is an exercise in eyestrain on such a device. + +Once the requisite packages have been installed, the **ubuntu-device-flash** command can be used to install Ubuntu Touch on the phone. It finds the installation image wherever Canonical hides them (it's not obvious where that is) and puts it onto the phone; the process, on the Nexus 4, took about three hours — a surprisingly long time. Among other things, it installs a Ubuntu-specific recovery image, regardless of whether that should be necessary or not. The installation takes up about 4.5GB of space on the device. At the end, the phone reboots and comes up with the Ubuntu Touch lock screen, which has changed little in the last three years. The first boot takes a discouragingly long time, but subsequent reboots are faster, perhaps faster than Android on the same device. + +Alas, that's about the only thing that is faster than Android. The phone starts sluggish and gets worse as time goes on. At one point it took a solid minute to get the dialer screen up on the running device. Scrolling can be jerky and unpleasant to work with. At least once, the phone bogged down to the point that there was little alternative to shutting it down and starting over. + +Logging into the device over the USB connection offers some clues as to why that might be. There were no less than 258 processes running on the system. A number of them have "evolution" in their name, which is never a good sign even on a heftier system. Daemons like NetworkManager and pulseaudio are running. In general, Ubuntu Touch seems to have a large number of relatively large moving parts, leading, seemingly, to memory pressure and a certain amount of thrashing. + +Three years ago, Ubuntu Touch was built on an Android chassis. There are still bits of Android that show up here and there (it uses binder, for example), but a number of those components have been replaced. This release runs an Android-derived kernel that identifies itself as "3.4.0-7 #39-Ubuntu". 3.4.0 was released in May 2012, so it is getting a bit long in the tooth; the 3.4.0 number suggests this kernel hasn't even gotten the stable updates that followed that release. Finding the source for the kernel in this distribution is not easy; it must almost certainly be hidden somewhere in this Gerrit repository, but your editor ran out of time while trying to find it. The SurfaceFlinger display manager has been replaced by Ubuntu's own Mir, with Unity providing the interface. Upstart is the init system, despite the fact that Ubuntu has moved to systemd on desktop systems. + +When one moves beyond the command-line interface and starts playing with the touchscreen, one finds that the basics of the interface resemble what was demonstrated three years ago. Swiping from the left edge brings the [Overview screen] Unity icon bar (but no longer switches to a home screen; the "home screen" concept doesn't really seem to exist anymore). Swiping from the right will either switch to another application or produce an overview of running applications; it's not clear how it decides which. The overview provides a cute oblique view of the running applications; it's sufficient to choose one, but seems somewhat wasteful of screen space. Swiping up from the bottom produces an application-specific menu — usually. + +![][3] + + +The swipe gestures work well enough once one gets used to them, but there is scope for confusion. The camera app, for example, will instruct the user to "swipe left for photo roll," but, unless one is careful to avoid [Swipe left] the right edge of the screen, that gesture will yield the overview screen instead. One can learn subtleties like "swipes involving the edge" and "swipes avoiding the edge," but one could argue that such an interface is more difficult than it needs to be and less discoverable than it could be. + +![][4] + +Speaking of the camera app, it takes pictures as one might expect, and it has gained a high-dynamic-range mode in recent years. It still has no support for stitching together photos in a panorama or "photo sphere" mode, though. + +![][5] + +The base distribution comes with a fairly basic set of apps. Many of them appear to be interfaces to an associated web page; the Amazon, GMail, and Facebook apps, for example. Something called "Shorts" appears to be an RSS reader, though it seems impervious to the addition of arbitrary feeds. There is a terminal app, but it prompts for a password — a bit surprising [Terminal emulator] given that no password had ever been supplied for the device (it turns out that one should use the screen-lock PIN here). It's not clear that this extra level of "security" is helpful, given that the user involved is already able to install, launch, and run applications on the device, but so it goes. + +Despite the presence of all those evolution processes, there is no IMAP-capable email app; there are also no mapping apps. There is a rudimentary web browser with Ubuntu branding; it appears that this browser is based on Chromium. The weather app is limited to a few dozen hardwired locations worldwide; the closest supported location to LWN headquarters was Houston, which, one assumes, is unlikely to be dealing with the foot of snow your editor had to shovel while partway through this article. One suspects we would have heard about that. + +![][6] + +Inevitably, there is a store from which one can obtain other apps. There are, for example, a couple of seemingly capable, OpenStreetMap-based mapping apps there, including one that claims turn-by-turn navigation, but nothing requiring GPS access worked in your editor's tests. Games abound, of course, but [Maps] there is little in the way of apps that are well known in the Android or iOS worlds. The store will refuse to allow the installation of apps until one creates a "Ubuntu One" account; that is unfortunate, but most Android users never get anywhere near that far before having to create or supply a Google account. + +![][7] + +Canonical puts a fair amount of energy into promoting its "scopes," which are said to be better than apps for the aggregation of content. In truth, they seem to just be another type of app with a focus on gathering information from more than one source. Although, with "branded scopes," the "more than one source" part is often deliberately put by the wayside. Your editor played around with scopes for a while, but, in truth, could not find what was supposed to make them special. + +Permissions management in Ubuntu Touch resembles that found in recent Android releases: the user will be prompted the first time an application tries to exercise a specific privilege. As with Android, the number of [Permissions request] actions requiring privilege is relatively small, and "connect to any arbitrary site on the Internet" is not among them. Access to location information or the camera, though, will generate a prompt. There is also, again as with Android, a way to control which applications are allowed to place notifications on the screen. + +Ubuntu Touch still seems to drain the battery far more quickly than Android does on the same device. Indeed, it is barely able to get through the night while sitting idle. There is a cute battery app that offers a couple of "ways to reduce battery use," but it lacks Android's ability to say which apps are actually draining the battery (though, it must be said, that information from Android is often less helpful than one might hope). + +![][8] + +The keyboard now has proper multi-lingual support (though there is no visual indication of which language is currently in effect) and, as with Android, one can switch between languages on the fly. It offers word suggestions, does [Keyboard] spelling correction, and all the usual things. One missing feature, though, is "swipe" typing which, your editor has found, can speed the process of inputting text on a small keyboard considerably. There is also no voice input; no major loss from your editor's point of view, but others will probably see that differently. + +There is a lot to like in Ubuntu Touch. There is some appeal to running something that looks like a proper Linux system, even if it still has a number of Ubuntu-specific components. One does not get the sense that the device is watching quite as closely as Android devices do, though it's not entirely clear, for example, what happens with location data or where it might be stored. In any case, a Ubuntu device clearly has more free software on it than most alternatives do; there is no proprietary "play services" layer maintaining control over the system. + +Sadly, though, this distribution still is not up to the capabilities and the performance of the big alternatives. Switching to Ubuntu Touch means settling for a much slower system, running on a severely limited set of devices, with a relative scarcity of apps to choose from. Your editor would very much like to see a handset distribution that is more free and more open than the alternatives, but that distribution must also be competitive with those alternatives, and that does not seem to be the case here. Unless Canonical can find a way to close the performance and feature gaps with Android, it seems unlikely to have much hope of achieving uptake that is within a few orders of magnitude of Android's. + +-------------------------------------- + +via: https://lwn.net/Articles/667983/ + +作者:Jonathan Corbet +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://developer.ubuntu.com/en/start/ubuntu-for-devices/devices/ +[2]: https://lwn.net/Articles/540138/ +[3]: https://static.lwn.net/images/2015/utouch/overview-sm.png +[4]: https://static.lwn.net/images/2015/utouch/camera-swipe-sm.png +[5]: https://static.lwn.net/images/2015/utouch/terminal.png +[6]: https://static.lwn.net/images/2015/utouch/gps-sm.png +[7]: https://static.lwn.net/images/2015/utouch/camera-perm.png +[8]: https://static.lwn.net/images/2015/utouch/schifo.png From 6a2109b8d1636bb7ebf4c2f3b821c503e79fde34 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 27 Dec 2015 15:38:11 +0800 Subject: [PATCH 0693/1710] =?UTF-8?q?20151227-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit debian --- ...227 Upheaval in the Debian Live project.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 sources/talk/20151227 Upheaval in the Debian Live project.md diff --git a/sources/talk/20151227 Upheaval in the Debian Live project.md b/sources/talk/20151227 Upheaval in the Debian Live project.md new file mode 100644 index 0000000000..d663d09b17 --- /dev/null +++ b/sources/talk/20151227 Upheaval in the Debian Live project.md @@ -0,0 +1,66 @@ +While the event had a certain amount of drama surrounding it, the [announcement][1] of the end for the [Debian Live project][2] seems likely to have less of an impact than it first appeared. The loss of the lead developer will certainly be felt—and the treatment he and the project received seems rather baffling—but the project looks like it will continue in some form. So Debian will still have tools to create live CDs and other media going forward, but what appears to be a long-simmering dispute between project founder and leader Daniel Baumann and the Debian CD and installer teams has been "resolved", albeit in an unfortunate fashion. + +The November 9 announcement from Baumann was titled "An abrupt End to Debian Live". In that message, he pointed to a number of different events over the nearly ten years since the [project was founded][3] that indicated to him that his efforts on Debian Live were not being valued, at least by some. The final straw, it seems, was an "intent to package" (ITP) bug [filed][4] by Iain R. Learmonth that impinged on the namespace used by Debian Live. + +Given that one of the main Debian Live packages is called "live-build", the new package's name, "live-build-ng", was fairly confrontational in and of itself. Live-build-ng is meant to be a wrapper around the [vmdebootstrap][5] tool for creating live media (CDs and USB sticks), which is precisely the role Debian Live is filling. But when Baumann [asked][6] Learmonth to choose a different name for his package, he got an "interesting" [reply][7]: + +``` +It is worth noting that live-build is not a Debian project, it is an external project that claims to be an official Debian project. This is something that needs to be fixed. +There is no namespace issue, we are building on the existing live-config and live-boot packages that are maintained and bringing these into Debian as native projects. If necessary, these will be forks, but I'm hoping that won't have to happen and that we can integrate these packages into Debian and continue development in a collaborative manner. +live-build has been deprecated by debian-cd, and live-build-ng is replacing it. In a purely Debian context at least, live-build is deprecated. live-build-ng is being developed in collaboration with debian-cd and D-I [Debian Installer]. +``` + +Whether or not Debian Live is an "official" Debian project (or even what "official" means in this context) has been disputed in the thread. Beyond that, though, Neil Williams (who is the maintainer of vmdebootstrap) [provided some][8] explanation for the switch away from Debian Live: + +``` +vmdebootstrap is being extended explicitly to provide support for a replacement for live-build. This work is happening within the debian-cd team to be able to solve the existing problems with live-build. These problems include reliability issues, lack of multiple architecture support and lack of UEFI support. vmdebootstrap has all of these, we do use support from live-boot and live-config as these are out of the scope for vmdebootstrap. +``` + +Those seem like legitimate complaints, but ones that could have been fixed within the existing project. Instead, though, something of a stealth project was evidently undertaken to replace live-build. As Baumann [pointed out][9], nothing was posted to the debian-live mailing list about the plans. The ITP was the first notice that anyone from the Debian Live project got about the plans, so it all looks like a "secret plan"—something that doesn't sit well in a project like Debian. + +As might be guessed, there were multiple postings that supported Baumann's request to rename "live-build-ng", followed by many that expressed dismay at his decision to stop working on Debian Live. But Learmonth and Williams were adamant that replacing live-build is needed. Learmonth did [rename][10] live-build-ng to a perhaps less confrontational name: live-wrapper. He noted that his aim had been to add the new tool to the Debian Live project (and "bring the Debian Live project into Debian"), but things did not play out that way. + +``` +I apologise to everyone that has been upset by the ITP bug. The software is not yet ready for use as a full replacement for live-build, and it was filed to let people know that the work was ongoing and to collect feedback. This sort of worked, but the feedback wasn't the kind I was looking for. +``` + +The backlash could perhaps have been foreseen. Communication is a key aspect of free-software communities, so a plan to replace the guts of a project seems likely to be controversial—more so if it is kept under wraps. For his part, Baumann has certainly not been perfect—he delayed the "wheezy" release by [uploading an unsuitable syslinux package][11] and [dropped down][12] from a Debian Developer to a Debian Maintainer shortly thereafter—but that doesn't mean he deserves this kind of treatment. There are others involved in the project as well, of course, so it is not just Baumann who is affected. + +One of those other people is Ben Armstrong, who has been something of a diplomat during the event and has tried to smooth the waters. He started with a [post][13] that celebrated the project and what Baumann and the team had accomplished over the years. As he noted, the [list of downstream projects][14] for Debian Live is quite impressive. In another post, he also [pointed out][15] that the project is not dead: + +``` +If the Debian CD team succeeds in their efforts and produces a replacement that is viable, reliable, well-tested, and a suitable candidate to replace live-build, this can only be good for Debian. If they are doing their job, they will not "[replace live-build with] an officially improved, unreliable, little-tested alternative". I've seen no evidence so far that they operate that way. And in the meantime, live-build remains in the archive -- there is no hurry to remove it, so long as it remains in good shape, and there is not yet an improved successor to replace it. +``` + +On November 24, Armstrong also [posted][16] an update (and to [his blog][17]) on Debian Live. It shows some good progress made in the two weeks since Baumann's exit; there are even signs of collaboration between the project and the live-wrapper developers. There is also a [to-do list][18], as well as the inevitable call for more help. That gives reason to believe that all of the drama surrounding the project was just a glitch—avoidable, perhaps, but not quite as dire as it might have seemed. + + +--------------------------------- + +via: https://lwn.net/Articles/665839/ + +作者:Jake Edge +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[1]: https://lwn.net/Articles/666127/ +[2]: http://live.debian.net/ +[3]: https://www.debian.org/News/weekly/2006/08/ +[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804315 +[5]: http://liw.fi/vmdebootstrap/ +[6]: https://lwn.net/Articles/666173/ +[7]: https://lwn.net/Articles/666176/ +[8]: https://lwn.net/Articles/666181/ +[9]: https://lwn.net/Articles/666208/ +[10]: https://lwn.net/Articles/666321/ +[11]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699808 +[12]: https://nm.debian.org/public/process/14450 +[13]: https://lwn.net/Articles/666336/ +[14]: http://live.debian.net/project/downstream/ +[15]: https://lwn.net/Articles/666338/ +[16]: https://lwn.net/Articles/666340/ +[17]: http://syn.theti.ca/2015/11/24/debian-live-after-debian-live/ +[18]: https://wiki.debian.org/DebianLive/TODO From b452657816c4fc4d47756724164d4a45a3b6c8c9 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 27 Dec 2015 15:41:59 +0800 Subject: [PATCH 0694/1710] =?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 --- ...to access Dropbox from the command line in Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translated/tech/20151123 How to access Dropbox from the command line in Linux.md b/translated/tech/20151123 How to access Dropbox from the command line in Linux.md index 6c5f73e596..9f9d1fd5ed 100644 --- a/translated/tech/20151123 How to access Dropbox from the command line in Linux.md +++ b/translated/tech/20151123 How to access Dropbox from the command line in Linux.md @@ -1,8 +1,8 @@ -Linux 中如何从命令行访问 Dropbox +Linux 中如何通过命令行访问 Dropbox ================================================================================ -在当今这个多设备的环境下,云存储无处不在。无论身处何方,人们都想通过多种设备来从云存储中获取所需的内容。由于优雅的 UI 和完美的跨平台兼容性,Dropbox 已成为最为广泛使用的云存储服务。 Dropbox 的流行已引发了一系列官方或非官方 Dropbox 客户端的出现,它们支持不同的操作系统平台。 +在当今这个多设备的环境下,云存储无处不在。无论身处何方,人们都想通过多种设备来从云存储中获取所需的内容。由于拥有漂亮的 UI 和完美的跨平台兼容性,Dropbox 已成为最为广泛使用的云存储服务。 Dropbox 的流行已引发了一系列官方或非官方 Dropbox 客户端的出现,它们支持不同的操作系统平台。 -当然 Linux 平台下也有着自己的 Dropbox 客户端: 既有命令行的,也有图形界面。[Dropbox Uploader][1] 是一个简单易用的 Dropbox 命令行客户端,它是用 BASH 脚本语言所编写的。在这篇教程中,我将描述 **在 Linux 中如何使用 Dropbox Uploader 通过命令行来访问 Dropbox**。 +当然 Linux 平台下也有着自己的 Dropbox 客户端: 既有命令行的,也有图形界面客户端。[Dropbox Uploader][1] 是一个简单易用的 Dropbox 命令行客户端,它是用 BASH 脚本语言所编写的。在这篇教程中,我将描述 **在 Linux 中如何使用 Dropbox Uploader 通过命令行来访问 Dropbox**。 ### Linux 中安装和配置 Dropbox Uploader ### @@ -13,7 +13,7 @@ Linux 中如何从命令行访问 Dropbox 请确保你已经在系统中安装了 `curl`,因为 Dropbox Uploader 通过 curl 来运行 Dropbox 的 API。 -要配置 Dropbox Uploader,只需运行 dropbox_uploader.sh 即可。当你第一次运行这个脚本时,它将询问你,以使得它可以访问你的 Dropbox 账户。 +要配置 Dropbox Uploader,只需运行 dropbox_uploader.sh 即可。当你第一次运行这个脚本时,它将请求得到授权以使得脚本可以访问你的 Dropbox 账户。 $ ./dropbox_uploader.sh @@ -88,7 +88,7 @@ via: http://xmodulo.com/access-dropbox-command-line-linux.html 作者:[Dan Nanni][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1ee6c0f1ae424aaabad83c2b099ee90ef16a2cb5 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 27 Dec 2015 16:33:00 +0800 Subject: [PATCH 0695/1710] =?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 --- ...everse Proxy for Apache on FreeBSD 10.2.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md index 83877c8488..abd69a9cab 100644 --- a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md +++ b/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md @@ -1,9 +1,9 @@ - + 如何在FreeBSD 10.2上安装Nginx作为Apache的反向代理 ================================================================================ -Nginx是一款免费的,开源的HTTP和反向代理服务器, 以及一个代理POP3/IMAP的邮件服务器. Nginx是一款高性能的web服务器,其特点是丰富的功能,简单的结构以及低内存的占用. 第一个版本由 Igor Sysoev在2002年发布,然而到现在为止很多大的科技公司都在使用,包括 Netflix, Github, Cloudflare, WordPress.com等等 +Nginx是一款免费的开源HTTP和反向代理服务器, 以及一个POP3/IMAP的邮件代理服务器。Nginx是一款高性能的web服务器,其特点是丰富的功能,简单的结构以及低内存的占用. 第一个版本由 Igor Sysoev在2002年发布,迄今为止很多大的科技公司依然在使用,包括 Netflix, Github, Cloudflare, WordPress.com等等。 -在这篇教程里我们会 "**在freebsd 10.2系统上,安装和配置Nginx网络服务器作为Apache的反向代理**". Apache 会用PHP在8080端口上运行,并且我们需要在80端口配置Nginx的运行,用来接收用户/访问者的请求.如果网页的用户请求来自于浏览器的80端口, 那么Nginx会用Apache网络服务器和PHP来通过这个请求,并运行在8080端口. +在这篇教程里我们会 "**在freebsd 10.2系统上,安装和配置Nginx网络服务器作为Apache的反向代理**". Apache 会用PHP在8080端口上运行,并且我们需要在80端口配置Nginx的运行,用来接收用户/访问者的请求.如果网页的用户请求来自于浏览器的80端口, 那么Nginx会用Apache网络服务器和PHP来通过这个请求,并运行在8080端口。 #### 前提条件 #### @@ -19,7 +19,7 @@ Nginx是一款免费的,开源的HTTP和反向代理服务器, 以及一个代 ### 步骤 2 - 安装 Apache ### -Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器.在FreeBSD里Apache是未被默认安装的, 但是我们可以直接从端口下载,或者解压包在"/usr/ports/www/apache24" 目录下,再或者直接从PKG命令的FreeBSD系统信息库安装。在本教程中,我们将使用PKG命令从FreeBSD的库中安装: +Apache是现在使用范围最广的web服务器以及开源的HTTP服务器.在FreeBSD里Apache是未被默认安装的, 但是我们可以直接通过端口或者在"/usr/ports/www/apache24" 目录下的解压包安装,再或者直接从PKG命令的FreeBSD系统信息库安装。在本教程中,我们将使用PKG命令从FreeBSD的库中安装: pkg install apache24 @@ -31,7 +31,7 @@ Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器. ### 步骤 4 - 配置 Apache 和 PHP ### -一旦所有都安装好了, 我们将会配置Apache在8080端口上运行, 并让PHP与Apache一同工作. 为了配置Apache,我们可以编辑 "httpd.conf"这个配置文件, 然而PHP我们只需要复制PHP的配置文件 php.ini 在 "/usr/local/etc/"目录下. +一旦所有都安装好了, 我们将会配置Apache在8080端口上运行, 并让PHP与Apache一同工作. 要想配置Apache,我们可以编辑 "httpd.conf"这个配置文件, 然而PHP我们只需要复制"/usr/local/etc/"目录下的PHP配置文件 php.ini 。 进入到 "/usr/local/etc/" 目录 并且复制 php.ini-production 文件到 php.ini : @@ -64,7 +64,7 @@ Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器. SetHandler application/x-httpd-php-source -保存然后退出. +保存并退出。 现在用sysrc命令,来添加Apache作为开机启动项目 : @@ -78,7 +78,7 @@ Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器. service apache24 start -如果全部完毕, 在"/usr/local/www/apache24/data" 目录下,创建一个phpinfo文件是验证PHP在Apache下完美运行的好方法 : +如果全部完毕, 在"/usr/local/www/apache24/data" 目录下创建一个phpinfo文件来验证PHP在Apache下完美运行: cd /usr/local/www/apache24/data echo "" > info.php @@ -87,17 +87,17 @@ Apache是现在使用范围最广的网络服务器以及开源的HTTP服务器. ![Apache and PHP on Port 8080](http://blog.linoxide.com/wp-content/uploads/2015/11/Apache-and-PHP-on-Port-8080.png) -Apache 是使用 PHP 在 8080端口下运行的. +Apache 是使用 PHP 在 8080 端口下运行的。 ### 步骤 5 - 安装 Nginx ### -Nginx 以低内存的占用作为一款高性能的web服务器以及反向代理服务器.在这个步骤里,我们将会使用Nginx作为Apache的反向代理, 因此让我们用pkg命令来安装它吧 : +Nginx 以低内存的占用作为一款高性能的web服务器以及反向代理服务器。在这个步骤里,我们将会使用Nginx作为Apache的反向代理, 因此让我们用pkg命令来安装它吧 : pkg install nginx ### 步骤 6 - 配置 Nginx ### -一旦 Nginx 安装完毕, 在 "**nginx.conf**" 文件里,我们需要做一个新的配置文件来替换掉原来的nginx文件. 更改到 "/usr/local/etc/nginx/"目录下 并且默认备份到 nginx.conf 文件: +一旦 Nginx 安装完毕, 在 "**nginx.conf**" 文件里,我们需要做一个新的配置文件来替换掉原来的nginx文件。更改到 "/usr/local/etc/nginx/"目录下,并且备份默认 nginx.conf 文件: cd /usr/local/etc/nginx/ mv nginx.conf nginx.conf.oroginal @@ -164,7 +164,7 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 } -保存退出. +保存并退出。 下一步, 在nginx目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 : @@ -186,7 +186,7 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 proxy_buffers 100 8k; add_header X-Cache $upstream_cache_status; -保存退出. +保存并退出. 最后一步, 为 nginx 的高速缓存创建一个 "/var/nginx/cache"的新目录 : @@ -194,14 +194,14 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 ### 步骤 7 - 配置 Nginx 的虚拟主机 ### -在这个步骤里面,我们需要创建一个新的虚拟主机域 "saitama.me", 以跟文件 "/usr/local/www/saitama.me" 和日志文件一同放在 "/var/log/nginx" 目录下. +在这个步骤里面,我们需要创建一个新的虚拟主机域 "saitama.me", 以跟文件 "/usr/local/www/saitama.me" 和日志文件一同放在 "/var/log/nginx" 目录下。 我们必须做的第一件事情就是创建新的目录来存放虚拟主机文件, 在这里我们将用到一个"**vhost**"的新文件. 并创建它 : cd /usr/local/etc/nginx/ mkdir vhost -创建好vhost 目录, 那么我们就进入这个目录并创建一个新的虚拟主机文件. 这里我取名为 "**saitama.conf**" : +创建好vhost 目录, 那么我们就进入这个目录并创建一个新的虚拟主机文件。这里我取名为 "**saitama.conf**" : cd vhost/ nano -c saitama.conf @@ -252,7 +252,7 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 } -保存退出. +保存并退出。 下一步, 为nginx和虚拟主机创建一个新的日志目录 "/var/log/" : @@ -265,7 +265,7 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 ### 步骤 8 - 测试 ### -在这个步骤里面,我们只是测试我们的nginx和虚拟主机的配置. +在这个步骤里面,我们只是测试我们的nginx和虚拟主机的配置。 用如下命令测试nginx的配置 : @@ -282,37 +282,37 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 cd /usr/local/www/saitama.me echo "" > info.php -然后便访问这个文档 : **www.saitama.me/info.php**. +然后访问这个域名 : **www.saitama.me/info.php**. ![Virtualhost Configured saitamame](http://blog.linoxide.com/wp-content/uploads/2015/11/Virtualhost-Configured-saitamame.png) -Nginx 作为Apache的反向代理正在运行了,PHP也同样在进行工作了. +Nginx 作为Apache的反向代理正在运行了,PHP也同样在进行工作了。 这是另一种结果 : -Test .html 文件无缓存. +无缓存的 Test .html 文件。 curl -I www.saitama.me ![html with no-cache](http://blog.linoxide.com/wp-content/uploads/2015/11/html-with-no-cache.png) -Test .css 文件只有三十天的缓存. +有三十天缓存的 Test .css 文件。 curl -I www.saitama.me/test.css ![css file 30day cache](http://blog.linoxide.com/wp-content/uploads/2015/11/css-file-30day-cache.png) -Test .php 文件正常缓存 : +正常缓存的 Test .php 文件: curl -I www.saitama.me/info.php ![PHP file cached](http://blog.linoxide.com/wp-content/uploads/2015/11/PHP-file-cached.png) -全部完成. +全部完成。 ### 总结 ### -Nginx 是最广泛的 HTTP 和反向代理的服务器. 拥有丰富的高性能和低内存/RAM的使用功能. Nginx使用了太多的缓存, 我们可以在网络上缓存静态文件使得网页加速, 并且在用户需要的时候再缓存php文件. 这样Nginx 的轻松配置和使用,可以让它用作HTTP服务器 或者 apache的反向代理. +Nginx 是最受欢迎的 HTTP 和反向代理服务器,拥有丰富的高性能和低内存/RAM的使用功能。Nginx使用了太多的缓存, 我们可以在网络上缓存静态文件使得网页加速,并且在用户需要的时候再缓存php文件。这样 Nginx 的轻松配置和使用可以让它用作HTTP服务器或者 apache的反向代理。 -------------------------------------------------------------------------------- @@ -320,8 +320,8 @@ via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-freebsd 作者:[Arul][a] 译者:[KnightJoker](https://github.com/KnightJoker) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline(https://github.com/carolinewuyan) 本文由 [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 41ac956f62c46c7e2f7719810ca07aa22d905e4c Mon Sep 17 00:00:00 2001 From: GHLandy Date: Sun, 27 Dec 2015 16:43:39 +0800 Subject: [PATCH 0696/1710] Create Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md --- ...and Use vi or vim as a Full Text Editor.md | 392 ++++++++++++++++++ 1 file changed, 392 insertions(+) create mode 100644 translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md diff --git a/translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md b/translated/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..e300edbb99 --- /dev/null +++ b/translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md @@ -0,0 +1,392 @@ +GHLandy Translated + +LFCS系列第二讲:如何安装和使用纯文本编辑器vi/vim + +================================================================================ + +几个月前, Linux 基金会发起了 LFCS (Linux 基金会认证系统管理员)认证,以帮助世界各地的人来验证他们能够在 Linux 系统上做基本的中间系统管理任务:如系统支持,第一手的故障诊断和维修,以及何时向上游支持团队提出问题的智能决策。 + +![Learning VI Editor in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/LFCS-Part-2.png) + +在 Linux 中学习 vi 编辑器 + +请简要看看一下视频,里边介绍了 Linux 基金会认证的程序。 + +注:youtube 视频 + + + +这篇文章是十个tutorial系列的第二部分,在这个部分,我们会介绍 vi/vim 基本的文件编辑操作和理解编辑器中的(三个)模式,这是LFCS认证考试中必须掌握的。 + +### 使用 vi/vim 执行基本的文件编辑操作 ### + +vi 是为了 Unix 而被编写的第一个全屏文本编辑器。由于它被设计得小巧而简单,对于只使用图形界面编辑器,举几个例子,如 NotePad++ 或者 gedit 的那些人来说,使用起来可能存在一些困难。 + +为了使用 vi,我们必须首先理解这个强大的程序操作中的3种模式,方便我们后边学习这个强大文本处理软件的相关操作。 + +请注意,大多数的现代 Linux 发行版都集成了 vi 的变种——— vim(vi升级版),相比于 vi,它有更多新功能。由于这个原因,我们会在本教程中交替使用 vi 和 vim。 + +如果你的发行版还没有安装 vim,你可以通过以下方法来安装: + +- Ubuntu 及其衍生版:apt-get update && apt-get install vim +- 以 Red-Hat 为基础的发行版:yum update && yum install vim +- openSUSE :zypper update && zypper install vim + +### 我为什么要学习 vi ### + +至少有以下两点好理由: + +1.(不管你使用什么发行版)vi 总是可用的,因为它是 POSIX 所要求的。 + +2.vi 基本不消耗多少系统资源,并且允许我们仅仅通过键盘来完成任何可能的任务。 + +此外,vi 有的非常广泛的内置 manual 帮助,程序打开后就可以通过 :help 命令来查看。这个内置 manual 帮助比 vi/vim 的 man 页面包含了更多信息。 + +![vi Man Pages](http://www.tecmint.com/wp-content/uploads/2014/10/vi-man-pages.png) + +vi Man 页面 + +#### 启动 vi #### + +可以通过在命令提示符下输入 vi 来启动。 + +![Start vi Editor](http://www.tecmint.com/wp-content/uploads/2014/10/start-vi-editor.png) + +使用 vi 编辑器 + +然后按下字母 i,你就可以开始输入了。或者通过下面的方法来启动 vi: + + # vi filename + +这样会打开一个名为 filename 的 buffer(稍后详细介绍 buffer),在你编辑完成之后就可以存储在磁盘中了。 + +#### 理解 vi 的三个模式 #### + +1.在命令模式中,vi 允许用户浏览该文件并输入由一个或多个字母组成简短的、大小写敏感的 vi 命令。这些命令的大部分都可以增加一个前缀数字表示执行次数。 + +比如:yy(或Y) 复制当前的整行,3yy(或3Y) 复制当前整行和下边紧接着的两行(总共3行)。通过 Esc 键可以随时进入命令模式(而不管当前工作在什么模式下)。事实上,在命令模式下,键盘上所有的输入都被解释为命令而非文本,这往往使得初学者困惑不已。 + +2.在末行模式中,我们可以处理文件(包括保存当前文件和运行外部程序)。我们必须在命令模式下输入一个冒号(:),才能进入这个模式,紧接着是需要使用的末行模式下的命令。执行之后 vi 自动回到命令模式。 + +3.在文本输入模式(通常使用字母 i 进入这个模式)中,我们可以随意输入文本。大多数的键入将以文本形式输出到屏幕(一个重要的例外是Esc键,它将退出文本编辑模式并回到命令模式)。 + +![vi Insert Mode](http://www.tecmint.com/wp-content/uploads/2014/10/vi-insert-mode.png) + +vi 文本插入模式 + +#### vi 命令 #### + +下面的表格列出常用的 vi 命令。文件版本的命令可以通过添加叹号的命令强制执行(如,:q! 命令强制退出编辑器而不保存文件)。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 关键命令 描述
 h 或 ← 光标左移一个字符
 j 或 ↓ 光标下移一行
 k 或 ↑ 光标上移一行
 l (小写 L) 或 → 光标右移一个字符
 H 光标移至屏幕顶行
 L 光标移至屏幕末行
 G 光标移至文件末行
 w 光标右移一个词
 b 光标左移一个词
 0 (零) 光标移至行首
 ^ 光标移至当前行第一个非空格字符
 $ 光标移至当前行行尾
 Ctrl-B 向后翻页
 Ctrl-F 向前翻页
 i 在光标所在位置插入文本
 I (大写 i) 在当前行首插入文本
 J (大写 j) 将下一行与当前行合并(下一行上移到当前行)
 a 在光标所在位置后追加文本
 o (小写 O) 在当前行下边插入空白行
 O (大写 o) 在当前行上边插入空白行
 r 替换光标所在位置的字符
 R 光标所在位置覆盖插入文本
 x 删除光标所在位置的字符
 X 立即删除光标所在位置之前(左边)的一个字符
 dd 剪切当前整行文本(为了之后进行粘贴)
 D 剪切光标所在位置到行末的文本(该命令等效于 d$)
 yX 给 X 命令一个移动长度,复制适当数量的字符、单词或者从光标开始到一定数量的行
 yy 或 Y 复制当前整行
 p 粘贴在光标所在位置之后(下一行)
 P 粘贴在光标所在位置之前(上一行)
 . (句点) 重复最后一个命令
 u 撤销最后一个命令
 U 撤销最后一行的最后一个命令,只有光标仍在最后一行才能执行。
 n 在查找中跳到下一个匹配项
 N 在查找中跳到前一个匹配项
 :n 下一个文件,编辑多个指定文件时,该命令加载下一个文件。
 :e file 加载新文件来替代当前文件
 :r file 将新文件的内容插入到光标所在位置的下一行
 :q 退出并放弃更改
 :w file 将当期打开的buffer保存为file。如果是追加到已存在的文件中,则使用 :w >> file 命令
 :wq 保存当前文件的内容并退出。等效于 x! 和 ZZ
 :r! command 执行 command 命令,并将命令的输出插入到光标所在位置的下一行
+ +#### vi 选项 #### + +下列选项将会在启动 Vim 的时候进行加载(需要写入到~/.vimrc文件): + + # 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编辑器选项 + +- set number 当 vi 打开或新建文件时,显示行号。 +- syntax on 打开语法高亮(对应多个文件扩展名),以便源码文件和配置文件更具可读性。 +- set tabstop=4 设置制表符间距为 4 个空格(默认为 8)。 +- set autoindent 将前一行的缩进应用于下一行。 + +#### 查找和替换 #### + +vi 具有通过查找将光标移动到(在单独一行或者整个文件中的)指定位置。它还可自动或者通过用户确认来执行文本替换。 + +a) 在行内查找。f 命令在当前行查找指定字符,并将光标移动到指定字符出现的位置。 + +例如,命令 fh 会在本行中将光标实例字母h出现的位置。注意,字母 f 和你要查找的字符都不会出现在屏幕上,但是当你按下回车的时候,要查找的字符会被高亮显示。 + +比如,以下是在命令模式按下 f4 之后的结果。 + +![Search String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-string.png) + +在 vi 中查找字符。 + +b) 在整个文件内查找。使用 / 命令,紧接着需要查找的单词或短语。这个查找可以通过使用 n 命令或者 N 重复查找上一个查找的字符串。以下是在命令模式键入 /Jane 的查找结果。 + +![Vi Search String in File](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-line.png) + +在vi中查找字符 + +c) vi 通过使用命令来完成多行或者整个文件的替换操作(类似于 sed)。我们可以使用一下命令,使得整个文件中的单词 “old” 替换为 “young”。 + + :%s/old/young/g + +**注意**:冒号位于命令的最前面。 + +![Vi Search and Replace](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-and-replace.png) + +vi 的查找和替换 + +冒号 (:) 进入末行模式,在本例中 s 表示替换,% 是从第一行到最后一行的表示方式(也可以使用 nm 表示范围,即第 n 行到第 m 行),old 是查找模式,young 是用来替换的文本,g 表示在每个查找出来的字符串都进行替换。 + +另外,在命令最后增加一个 c,可以在每一个匹配项替换前进行确认。 + + :%s/old/young/gc + +将就文本替换为新文本前,vi/vim 会想我们显示一下信息: + +![Replace String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-replace-old-with-young.png) + +vi 中替换字符串 + +- y: 执行替换(yes) +- n: 跳过这个匹配字符的替换并转到下一个(no) +- a: 在当前匹配字符及后边的相同项全部执行替换 +- q 或 Esc: 取消替换 +- l (小写 L): 执行本次替换并退出 +- Ctrl-e, Ctrl-y: 下翻页,上翻页,查看相应的文本来进行替换 + +#### 同时编辑多个文件 #### + +我们在命令提示符输入 vim file1 file2 file3 如下: + + # vim file1 file2 file3 + +vim 会首先打开 file1,要跳到 file2 需用 :n 命令。当需要打开前一个文件时,:N 就可以了。 + +为了从 file1 跳到 file3 + +a) :buffers 命令会显示当前正在编辑的文件列表 + + :buffers + +![Edit Multiple Files](http://www.tecmint.com/wp-content/uploads/2014/10/vi-edit-multiple-files.png) + +编辑多个文件 + +b) :buffer 3 命令(后边没有 s)会打开 file 进行编辑。 + +在上边的图片中,标记符号 # 表示该文件当前已被打开在后台,而 %a 标记的文件是正在被编辑的。另外,文件号(如上边例子的 3)后边的空格表示该文件还没有被打开。 + +#### vi 的临时 buffers #### + +为了复制连续的多行(比如,假设为 4 行)到一个名为 a 的临时 buffer(与文件无关),并且还要将这些行粘贴到在当前 vi 会话文件中的其它位置,我们需要: + +1. 按下 Esc 键以确认 vi 处在命令模式 + +2. 将光标放在我们希望复制的第一行文本 + +3. 输入 a4yy 复制当前行和接下来的 3 行,进入一个名为 a 的 buffer。我们一继续编辑我们的文件————我们不需要立即插入刚刚复制的行。 + +4. 当到了需要使用刚刚复制行的位置,在 p(小写)或 P(大写)命令来讲复制行插入到名为 a 的 buffer: + +- 输入 ap,复制行将插入到光标位置所在行的下一行。 +- 输入 aP,复制行将插入到光标位置所在行的上一行。 + +如果愿意,我们可以重复上述步骤,将 buffer a 中的内容插入到我们文件的多个位置。一个临时 buffer,像本次会话中的一样,会在当前窗口关闭时释放掉。 + +### 总结 ### + +像我们看到的一样,vi/vim 在命令接口下是一个强大而灵活的文本编辑器。通过以下链接,随时分享你自己的技巧和评论。 + +#### 参考链接 #### + +- [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] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者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 From f692f65f1e469169b649d4e9e82de825b1a5f938 Mon Sep 17 00:00:00 2001 From: GHLandy Date: Sun, 27 Dec 2015 16:45:39 +0800 Subject: [PATCH 0697/1710] Delete Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md --- ...and Use vi or vim as a Full Text Editor.md | 389 ------------------ 1 file changed, 389 deletions(-) delete mode 100644 sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md 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 deleted file mode 100644 index 23e1b30f57..0000000000 --- a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md +++ /dev/null @@ -1,389 +0,0 @@ -GHLandy Translating - -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 From e76a60efe4a9f3de364a07217a8fcc69d1c835bd Mon Sep 17 00:00:00 2001 From: GHLandy Date: Sun, 27 Dec 2015 16:47:26 +0800 Subject: [PATCH 0698/1710] [Translating] Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux. --- ...ries Setting File Attributes and Finding Files in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 82cc54a5a6..4b1d700c4e 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 @@ +GHLandy Translateing + 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. @@ -379,4 +381,4 @@ via: http://www.tecmint.com/compress-files-and-finding-files-in-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 +[6]:https://identity.linuxfoundation.org/user?destination=pid/1 From bf62ce04e50e36b18f3462b2cc1ecb34c7a8e242 Mon Sep 17 00:00:00 2001 From: dongfengweixiao Date: Sun, 27 Dec 2015 17:32:35 +0800 Subject: [PATCH 0699/1710] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...and Use vi or vim as a Full Text Editor.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md b/translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md index e300edbb99..c7f3d5140c 100644 --- a/translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md +++ b/translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md @@ -4,7 +4,7 @@ LFCS系列第二讲:如何安装和使用纯文本编辑器vi/vim ================================================================================ -几个月前, Linux 基金会发起了 LFCS (Linux 基金会认证系统管理员)认证,以帮助世界各地的人来验证他们能够在 Linux 系统上做基本的中间系统管理任务:如系统支持,第一手的故障诊断和维修,以及何时向上游支持团队提出问题的智能决策。 +几个月前, Linux 基金会发起了 LFCS (Linux Foundation Certified System administrator,Linux 基金会认证系统管理员)认证,以帮助世界各地的人来验证他们能够在 Linux 系统上做基本的中间系统管理任务:如系统支持,第一手的故障诊断和处理,以及何时向上游支持团队提出问题的智能决策。 ![Learning VI Editor in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/LFCS-Part-2.png) @@ -16,15 +16,15 @@ LFCS系列第二讲:如何安装和使用纯文本编辑器vi/vim -这篇文章是十个tutorial系列的第二部分,在这个部分,我们会介绍 vi/vim 基本的文件编辑操作和理解编辑器中的(三个)模式,这是LFCS认证考试中必须掌握的。 +这篇文章是《十个教程》系列的第二部分,在这个部分,我们会介绍 vi/vim 基本的文件编辑操作,帮助读者理解编辑器中的三个模式,这是LFCS认证考试中必须掌握的。 ### 使用 vi/vim 执行基本的文件编辑操作 ### -vi 是为了 Unix 而被编写的第一个全屏文本编辑器。由于它被设计得小巧而简单,对于只使用图形界面编辑器,举几个例子,如 NotePad++ 或者 gedit 的那些人来说,使用起来可能存在一些困难。 +vi 是为 Unix 而生的第一个全屏文本编辑器。它的设计小巧简单,对于仅仅使用过诸如 NotePad++ 或 gedit 等图形界面的文本编辑器的用户来说,使用起来可能存在一些困难。 -为了使用 vi,我们必须首先理解这个强大的程序操作中的3种模式,方便我们后边学习这个强大文本处理软件的相关操作。 +为了使用 vi,我们必须首先理解这个强大的程序操作中的三种模式,方便我们后边学习这个强大的文本处理软件的相关操作。 -请注意,大多数的现代 Linux 发行版都集成了 vi 的变种——— vim(vi升级版),相比于 vi,它有更多新功能。由于这个原因,我们会在本教程中交替使用 vi 和 vim。 +请注意,大多数的现代 Linux 发行版都集成了 vi 的变种——— vim(Vi IMproved,VI 的改进),相比于 vi,它有更多新功能。所以,我们会在本教程中交替使用 vi 和 vim。 如果你的发行版还没有安装 vim,你可以通过以下方法来安装: @@ -34,13 +34,13 @@ vi 是为了 Unix 而被编写的第一个全屏文本编辑器。由于它被 ### 我为什么要学习 vi ### -至少有以下两点好理由: +至少有以下两个理由: -1.(不管你使用什么发行版)vi 总是可用的,因为它是 POSIX 所要求的。 +1.因为它是 POSIX 标准的一部分,所以不管你使用什么发行版 vi 总是可用的。 2.vi 基本不消耗多少系统资源,并且允许我们仅仅通过键盘来完成任何可能的任务。 -此外,vi 有的非常广泛的内置 manual 帮助,程序打开后就可以通过 :help 命令来查看。这个内置 manual 帮助比 vi/vim 的 man 页面包含了更多信息。 +此外,vi 有的非常丰富的内置帮助手册,程序打开后就可以通过 :help 命令来查看。这个内置帮助手册比 vi/vim 的 man 页面包含了更多信息。 ![vi Man Pages](http://www.tecmint.com/wp-content/uploads/2014/10/vi-man-pages.png) @@ -298,7 +298,7 @@ b) 在整个文件内查找。使用 / 命令,紧接着需要查找的单词 在vi中查找字符 -c) vi 通过使用命令来完成多行或者整个文件的替换操作(类似于 sed)。我们可以使用一下命令,使得整个文件中的单词 “old” 替换为 “young”。 +c) vi 通过使用命令来完成多行或者整个文件的替换操作(类似于 sed)。我们可以使用以下命令,使得整个文件中的单词 “old” 替换为 “young”。 :%s/old/young/g @@ -382,7 +382,7 @@ via: http://www.tecmint.com/vi-editor-usage/ 作者:[Gabriel Cánepa][a] 译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[东风唯笑](https://github.com/dongfengweixiao) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 5a435541dd5f3b063f7bed2000c7f720dec68341 Mon Sep 17 00:00:00 2001 From: Bestony Date: Sun, 27 Dec 2015 17:50:27 +0800 Subject: [PATCH 0700/1710] Delete 20151013 DFileManager--Cover Flow File Manager.md DeleteFile --- ...3 DFileManager--Cover Flow File Manager.md | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 sources/tech/20151013 DFileManager--Cover Flow File Manager.md diff --git a/sources/tech/20151013 DFileManager--Cover Flow File Manager.md b/sources/tech/20151013 DFileManager--Cover Flow File Manager.md deleted file mode 100644 index c2f74987b4..0000000000 --- a/sources/tech/20151013 DFileManager--Cover Flow File Manager.md +++ /dev/null @@ -1,64 +0,0 @@ -translation by bestony -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 768dcad8c69128b067af16359f5de8f420802fea Mon Sep 17 00:00:00 2001 From: Bestony Date: Sun, 27 Dec 2015 17:51:30 +0800 Subject: [PATCH 0701/1710] Create 20151013 DFileManager--Cover Flow File Manager.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 生成新的文件 --- ...3 DFileManager--Cover Flow File Manager.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 translated/tech/20151013 DFileManager--Cover Flow File Manager.md diff --git a/translated/tech/20151013 DFileManager--Cover Flow File Manager.md b/translated/tech/20151013 DFileManager--Cover Flow File Manager.md new file mode 100644 index 0000000000..39b376c113 --- /dev/null +++ b/translated/tech/20151013 DFileManager--Cover Flow File Manager.md @@ -0,0 +1,61 @@ +DFileManager:文件流文件管理器 +================================================================================ +一个像宝石一样的文件管理器从Ubuntu标准库中缺失,但是有器自己的独特的特色。DFileManager是一个推特一样的产品 + +一个很棘手的问题是,如何知道有多少个Linux开源软件可以被使用。出于好奇,你可以在Shell里输入如下命令 + + ~$ for f in /var/lib/apt/lists/*Packages; do printf ’%5d %s\n’ $(grep ’^Package: ’ “$f” | wc -l) ${f##*/} done | sort -rn + +在我的Ubuntu15.04系统上,会产生如下结果 +![Ubuntu 15.04 Packages](http://www.linuxlinks.com/portal/content/reviews/FileManagers/UbuntuPackages.png) + +正如上面的截图所示,在所有的库中,大约有39000个包,在主库中有8500个包。这听起来很少.但是这些自助形式的开源软件、组件、支持库有很多不是由Ubuntu开发者打包的。重要的是,有很多重要的组件不在库中,只能通过源代码编译。DFileManager就是这样一个组件。他是仍处在早期阶段的一个QT跨平台文件管理器.QT提供单一源码的跨平台可移植性。 + +在缺失二进制文件的包里,用户需要编译源代码。对于一些工具来说,这个可能会产生很大的问题,特别是如果这个应用依赖于任何一个含糊不清的依赖库,或者某个没有被编译在系统中的特殊软件版本。 +### 安装 ### + +幸运的是,DFileManager非常容易编译。对于我的老Ubutnu来说,这个在开发者网站上的安装介绍提供了大部分的重要步骤,不过,少量的基础包没有在上面(为什么总是这样?虽然支持库会让文件系统变得一团糟!)。在我的系统上,为了做好准备,从github上下载源代码并且编译这个软件,我在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 + +你可以通过在shell中输入如下命令来启动它 + + ~$ dfm + +下面是在最吸引人的操作界面下操作的DFileManager,文件流视图.这提供了一个拥有相当有吸引力的体验的滑动当前文件夹下的文件的能力。这是看图片的理想选择。这个文件管理器酷似Finder(Macintosh 操作系统下的默认文件管理器),可能会对你有吸引力。 + +![DFileManager in action](http://www.linuxlinks.com/portal/content/reviews/FileManagers/Screenshot-dfm.png) + +### 特点: ### + +- 4种视图:图标、详请、列和文件流 +- 通过位置和设备归类书签 +- 标签页 +- 简单的搜索和过滤 +- 自定义文件类型的缩略图,包括多媒体文件 +- 可以移动的信息栏 +- 单击打开文件和目录 +- 控制队列IO操作 +- 记住每个文件夹的视图属性 +- 显示隐藏文件 + +DFileManager 不是KDE 的Dolphin,但是能做相同的事情。这个是一个真正能够帮助人们的浏览文件的文件管理器。还有,别忘了反馈信息给开发者,任何人都可以做出这样的贡献 + +-------------------------------------------------------------------------------- + +via: http://gofk.tumblr.com/post/131014089537/dfilemanager-cover-flow-file-manager-a-real-gem + +作者:[gofk][a] +译者:[bestony](https://github.com/bestony) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://gofk.tumblr.com/ From ea29ca28be5b6044f7e88d2e1bd5289dcad58df5 Mon Sep 17 00:00:00 2001 From: Bestony Date: Mon, 28 Dec 2015 07:49:23 +0800 Subject: [PATCH 0702/1710] merge source --- translated/tech/LFCS/Part 2 - LFCS | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 translated/tech/LFCS/Part 2 - LFCS diff --git a/translated/tech/LFCS/Part 2 - LFCS b/translated/tech/LFCS/Part 2 - LFCS new file mode 100644 index 0000000000..e69de29bb2 From 2df9ed54870d35b41aca1f692d1c18b9ffdbaf5e Mon Sep 17 00:00:00 2001 From: Bestony Date: Mon, 28 Dec 2015 07:53:44 +0800 Subject: [PATCH 0703/1710] =?UTF-8?q?=E8=AE=A4=E9=A2=86?= 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 | 1 + 1 file changed, 1 insertion(+) 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 67a6641393..6f1aba9ed8 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,4 @@ +translating By Bestony Remember sed and awk? All Linux admins should ================================================================================ ![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) From 64ee6cf0f417bfd9d6a5d0852500aedaaa667ee9 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 28 Dec 2015 10:32:55 +0800 Subject: [PATCH 0704/1710] =?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 --- ...onfigure Apache Solr on Ubuntu 14 or 15.md | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md index 64357e0284..e6f3f05552 100644 --- a/translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md +++ b/translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md @@ -1,9 +1,7 @@ -taichirain 翻译中 如何在Ubuntu 14/15上配置Apache Solr ================================================================================ -大家好,欢迎来阅读我们今天Apache Solr的文章.Apache Solr是一个运行在网站后台的目前最热门的一个搜索引擎,基于Apache Lucene,能让你很容易的创建搜索引擎,数据库,文件。它能够索引和搜索多个网站并根据搜索文本的相关内容返回搜索建议. - +大家好,欢迎来阅读我们今天Apache Solr的文章。Apache Solr是一个最有名的开源搜索平台,基于在网站后端运行的Apache Lucene,能够让你轻松创建搜索引擎来搜索网站、数据库和文件。它能够索引和搜索多个网站并根据搜索文本的相关内容返回搜索建议. Solr工作在可扩展标记语言(XML),并可以为JSON、Python和Ruby提供应用程序接口(APIs)。根据Apache Lucene项目,Solr提供了非常多的功能,让它很受管理员们的欢迎: - 全文检索 @@ -12,20 +10,22 @@ Solr工作在可扩展标记语言(XML),并可以为JSON、Python和Ruby提供 - 自定义文档排序/排列 #### 前提条件: #### -在一个使用Ubuntu 14/15最小化安装包的系统上,你仅仅需要少量的准备,就开始安装 Apache Solor. + +在一个使用最小化安装包的全新 Ubuntu 14/15 系统上,你仅仅需要少量的准备,就开始安装 Apache Solor. ### 1)System Update 系统更新### -在所有的安装步骤以及使用Solor过程中使用一个具有sudo权限的非root用户登录Ubuntu server。 +使用一个具有sudo权限的非root用户登录你的Ubuntu服务器,这将会在接下来的所有安装和使用Solr的步骤中使用。 登录成功后,使用下面的命令,升级你的系统到最新的更新及补丁 $ sudo apt-get update ### 2) JRE Setup 安装JRE### + 要安装Solr,首先需要安装JRE(Java Runtime Environment)作为基础环境,因为solr和tomcat都是基于Java.所以,我们需要安装最新版的Java和配置Java本地环境. -为了安装最新版的Java 8,我们需要安装Python Software Properties工具包 +要想安装最新版的Java 8,我们需要通过以下命令安装Python Software Properties工具包 $ sudo apt-get install python-software-properties @@ -33,7 +33,7 @@ Solr工作在可扩展标记语言(XML),并可以为JSON、Python和Ruby提供 $ sudo add-apt-repository ppa:webupd8team/java -使用下面的命令更新源,然后安装java,然后使用'wget'安装Oracle Jave 8的最新版本 +现在你可以通过以下命令更新包源列表,使用‘wget’来安装最新版本的Oracle Java 8,然后安装Java。 $ sudo apt-get update @@ -41,59 +41,62 @@ Solr工作在可扩展标记语言(XML),并可以为JSON、Python和Ruby提供 $ sudo apt-get install oracle-java8-installer -在安装和配置Java SE Platform 和 JavaFX 过程中点击'OK'按钮接受 Oracle Binary Code License Agreement 协议. +在安装和配置Java SE Platform 和 JavaFX 过程中点击'OK'按钮接受 Oracle二进制代码许可协议(Oracle Binary Code License Agreement)。 -在安装完成后,运行下面的命令,检查是否安装成功以及查看安装的版本 +在安装完成后,运行下面的命令,检查是否安装成功以及查看安装的版本。 kash@solr:~$ java -version java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) -执行结果表明我们已经成功的安装了Java,并达到安装Solr最基本的要求了 +执行结果表明我们已经成功安装了Java,并达到安装Solr最基本的要求了,接着我们进行下一步。 ### 安装Solr### -有两种不同的方式可以在Ubuntu上安装Solr,在本文中我们只用最新的源码包来演示源码安装 + +有两种不同的方式可以在Ubuntu上安装Solr,在本文中我们只用最新的源码包来演示源码安装。 要使用源码安装Solr,先要从官网 [Web Page][1] 下载最新的可用安装包。复制以下链接,然后使用 'wget'命令来下载。 $ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz -运行下面的命令,将已压缩的服务解压到 /bin目录 +运行下面的命令,将已存档的服务解压到 /bin目录。 $ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2 -Then run the script to start Solr service that will creates a new 'solr' user and then installs solr as a service. -运行脚本来启动Solr服务:将会先创建一个solr的用户,然后将Solr安装成服务 + +运行脚本来启动Solr服务,这将会先创建一个solr的用户,然后将Solr安装成服务。 $ sudo bash ./install_solr_service.sh solr-5.3.1.tgz ![Solr 安装](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) -使用下面的命令来检查Solr服务的状态 +使用下面的命令来检查Solr服务的状态。 $ service solr status ![Solr 状态](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) ### 创建Solr集合: ### -我们现在可以使用Solr用户添加多个集合.就像下图所示的那样,我们仅仅只需要在命令行中指定集合名称和指定其配置集就可以创建多个集合了 + +我们现在可以使用Solr用户添加多个集合。就像下图所示的那样,我们只需要在命令行中指定集合名称和指定其配置集就可以创建多个集合了。 $ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs" ![创建集合](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) -我们已经成功的为我们的第一个集合创建了新的内核实例目录,并将数据添加到里面。 -它的概要文件在 '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' +我们已经成功的为我们的第一个集合创建了新的内核实例目录,并可以将数据添加到里面。 +查看库中的默认模式文件 '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' + +### 使用Solr页面### -### Using Solr Web 使用Solr页面### 可以使用默认的端口8983连接Apache Solr.打开浏览器,输入 http://your_server_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口. http://172.25.10.171:8983/solr/ ![Web访问Solr](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) -在Solr的Web控制台的左侧菜单点击'Core Admin'按钮,你将会看见我们之前使用CLI方式创建的集合。你可以点击'Add Core'按钮来创建新的内核 +在Solr的Web控制台左侧菜单点击'Core Admin'按钮,你将会看见我们之前使用CLI方式创建的集合。你可以点击'Add Core'按钮来创建新的内核。 ![添加核心](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) @@ -113,7 +116,8 @@ Then run the script to start Solr service that will creates a new 'solr' user an ![添加文档](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) -### 结尾### +### 总结### + 在Ubuntu上安装成功后,你就可以使用Solr WEB接口插入或查询数据。如果你想通过Solr来管理更多的数据和文件,可以创建更多的集合。希望你能喜欢这篇文章并且希望它能够帮到你。 -------------------------------------------------------------------------------- @@ -122,7 +126,7 @@ via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ 作者:[Kashif][a] 译者:[taichirain](https://github.com/taichirain) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 464359b33443f9433205bea038e05669e68912c7 Mon Sep 17 00:00:00 2001 From: Stdio A Date: Mon, 28 Dec 2015 14:57:57 +0800 Subject: [PATCH 0705/1710] Translating 20151223 Ten Biggest Linux Stories Of The Year 2015 --- .../talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md index af41c6a5e1..ce56ab4405 100644 --- a/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md +++ b/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md @@ -1,3 +1,5 @@ +StdioA translating + Ten Biggest Linux Stories Of The Year 2015 ================================================================================ ![Biggest Linux Stories of 2015](http://itsfoss.com/wp-content/uploads/2015/12/Biggest-Linux-Stories-2015.jpg) From 87eb41695fe70df1fa3e51729b7b29231a310f10 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 28 Dec 2015 15:04:23 +0800 Subject: [PATCH 0706/1710] PUB:20151123 7 ways hackers can use Wi-Fi against you @ZTinoZ --- ... ways hackers can use Wi-Fi against you.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) rename {translated/share => published}/20151123 7 ways hackers can use Wi-Fi against you.md (50%) diff --git a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md b/published/20151123 7 ways hackers can use Wi-Fi against you.md similarity index 50% rename from translated/share/20151123 7 ways hackers can use Wi-Fi against you.md rename to published/20151123 7 ways hackers can use Wi-Fi against you.md index cc3447e72a..d8794383c7 100644 --- a/translated/share/20151123 7 ways hackers can use Wi-Fi against you.md +++ b/published/20151123 7 ways hackers can use Wi-Fi against you.md @@ -1,40 +1,42 @@ -黑客利用Wi-Fi侵犯你隐私的七种方法 +黑客利用 Wi-Fi 攻击你的七种方法 ================================================================================ ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/intro_title-100626673-orig.jpg) -### 黑客利用Wi-Fi侵犯你隐私的七种方法 ### +### 黑客利用 Wi-Fi 侵犯你隐私的七种方法 ### -Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-Fi连接泄露身份信息的七种方法和预防措施。 +Wi-Fi — 啊,你是如此的方便,却又如此的危险! + +这里给大家介绍一下通过Wi-Fi连接“慷慨捐赠”你的身份信息的七种方法和反制措施。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/1_free-hotspots-100626674-orig.jpg) ### 利用免费热点 ### -它们似乎无处不在,而且它们的数量会在[接下来四年里增加三倍][1]。但是它们当中很多都是不值得信任的,从你的登录凭证、email甚至更加敏感的账户,都能被黑客用一款名叫“sniffers”的软件截获 — 这款软件能截获到任何你通过该连接提交的信息。防止被黑客盯上的最好办法就是使用VPN(virtual private network),它加密了你所输入的信息,因此能够保护你的数据隐私。 +它们似乎无处不在,而且它们的数量会在[接下来四年里增加三倍][1]。但是它们当中很多都是不值得信任的,从你的登录凭证、email 甚至更加敏感的账户,都能被黑客用“嗅探器(sniffers)”软件截获 — 这种软件能截获到任何你通过该连接提交的信息。防止被黑客盯上的最好办法就是使用VPN(虚拟私有网virtual private network),它加密了你所输入的信息,因此能够保护你的数据隐私。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/2_online-banking-100626675-orig.jpg) ### 网上银行 ### -你可能认为没有人需要被提醒不要使用免费Wi-Fi来操作网上银行, 但网络安全厂商卡巴斯基实验室表示[全球超过100家银行因为网络黑客而损失9亿美元][2],由此可见还是有很多人因此受害。如果你确信一家咖啡店的免费Wi-Fi是正规的,想要连接它,那么你应该向服务员确认网络名称。[他人在店里用路由器设置一个开放的无线连接][3]并将它的网络名称设置成店名是一件相当简单的事。 +你可能认为没有人需要被提醒不要使用免费 Wi-Fi 来操作网上银行, 但网络安全厂商卡巴斯基实验室表示**[全球超过100家银行因为网络黑客而损失9亿美元][2]**,由此可见还是有很多人因此受害。如果你确信一家咖啡店的免费 Wi-Fi 是正规的,想要连接它,那么你应该向服务员确认网络名称。[其他人在店里用路由器设置一个开放的无线连接][3],并将它的网络名称设置成店名是一件相当简单的事。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/3_keeping-wifi-on-100626676-orig.jpg) -### 始终开着Wi-Fi开关 ### +### 始终开着 Wi-Fi 开关 ### -如果你手机的Wi-Fi开关一直开着的,你会自动被连接到一个不安全的网络中去,你甚至都没有意识到。你可以利用你手机中[基于位置的Wi-Fi功能][4],如果它是可用的,那它会在你离开你所保存的网络范围后自动关闭你的Wi-Fi开关并在你回去之后再次开启。 +如果你手机的 Wi-Fi 开关一直开着的,你会自动被连接到一个不安全的网络中去,你甚至都没有意识到。你可以利用你手机中[基于位置的 Wi-Fi 功能][4],如果有这种功能的话,那它会在你离开你所保存的网络范围后自动关闭你的 Wi-Fi 开关并在你回去之后再次开启。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/4_not-using-firewall-100626677-orig.jpg) ### 不使用防火墙 ### -防火墙是你的第一道抵御恶意入侵的防线,它能有效地让你的电脑网络通畅并阻挡黑客和恶意软件。你应该时刻开启它除非你的杀毒软件有它自己的防火墙。 +防火墙是你的第一道抵御恶意入侵的防线,它能有效地让你的电脑网络保持通畅并阻挡黑客和恶意软件。你应该时刻开启它除非你的杀毒软件有它自己的防火墙。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/5_browsing-unencrypted-sites-100626678-orig.jpg) ### 浏览非加密网页 ### -说起来很难过,[世界上排名前100万个网站中55%是不加密的][5],一个未加密的网站会让一切传输数据暴露在黑客的眼中。如果一个网页是安全的,你的浏览器则会有标明(比如说火狐浏览器是一把灰色的挂锁,Chrome浏览器则是个绿锁图标)。但是一个安全的网站不能让你免于被劫持的风险,它能通过公共网络从你访问过的网站上窃取cookies,无论是不是正规网站。 +说起来很难过,**[世界上排名前100万个网站中55%是不加密的][5]**,一个未加密的网站会让一切传输数据暴露在黑客的眼中。如果一个网页是安全的,你的浏览器则会有标明(比如说火狐浏览器是一把灰色的挂锁,Chrome 浏览器则是个绿锁图标)。但是即使是安全的网站不能让你免于被劫持的风险,他们能通过公共网络从你访问过的网站上窃取 cookies,无论是不是正规网站。 ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/6_updating-security-software-100626679-orig.jpg) @@ -44,11 +46,11 @@ Wi-Fi — 既然方便又危险的东西!这里给大家介绍一下通过Wi-F ![Image courtesy Thinkstock](http://core0.staticworld.net/images/article/2015/11/7_securing-home-wifi-100626680-orig.jpg) -### 不保护你的家用Wi-Fi ### +### 不保护你的家用 Wi-Fi ### -不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的MAC地址来让你的路由器只识别那些确认过的设备。 +不用说,设置一个复杂的密码和更改无线连接的默认名都是非常重要的。你还可以过滤你的 MAC 地址来让你的路由器只识别那些确认过的设备。 -**Josh Althuser**是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们把产品推向市场。你可以通过[他的推特][6]联系他。 +本文作者 **Josh Althuser** 是一个开源支持者、网络架构师和科技企业家。在过去12年里,他花了很多时间去倡导使用开源软件来管理团队和项目,同时为网络应用程序提供企业级咨询并帮助它们把产品推向市场。你可以通过[他的推特][6]联系他。 -------------------------------------------------------------------------------- From 041b5463de7f615f045f875d5142f1f506151ec9 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 28 Dec 2015 15:09:31 +0800 Subject: [PATCH 0707/1710] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bestony --- translated/tech/LFCS/Part 2 - LFCS | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 translated/tech/LFCS/Part 2 - LFCS diff --git a/translated/tech/LFCS/Part 2 - LFCS b/translated/tech/LFCS/Part 2 - LFCS deleted file mode 100644 index e69de29bb2..0000000000 From a76f67fe21399fdde03c6368ed29122d95b9e888 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 28 Dec 2015 16:06:13 +0800 Subject: [PATCH 0708/1710] =?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 --- ...resses To One Interface On Ubuntu 15.10.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md index fd61e5a939..5c35da569b 100644 --- a/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md +++ b/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md @@ -1,6 +1,6 @@ 在 Ubuntu 15.10 上为单个网卡设置多个 IP 地址 ================================================================================ -有时候你可能想在你的网卡上使用多个 IP 地址。遇到这种情况你会怎么办呢?买一个新的网卡并分配一个新的 IP?不,这没有必要(至少在小网络中)。现在我们可以在 Ubuntu 系统中为一个网卡分配多个 IP 地址。想知道怎么做到的?跟着我往下看,其实并不难。 +有时候你可能想在你的网卡上使用多个 IP 地址。遇到这种情况你会怎么办呢?买一个新的网卡并分配一个新的 IP?不,没有这个必要(至少在小型网络中)。现在我们可以在 Ubuntu 系统中为一个网卡分配多个 IP 地址。想知道怎么做到的?跟着我往下看,其实并不难。 这个方法也适用于 Debian 以及它的衍生版本。 @@ -12,7 +12,7 @@ sudo ip addr -**事例输出:** +**样例输出:** 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 @@ -31,7 +31,7 @@ sudo ifconfig -**事例输出:** +**样例输出:** enp0s3 Link encap:Ethernet HWaddr 08:00:27:2a:03:4b inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0 @@ -50,7 +50,7 @@ collisions:0 txqueuelen:0 RX bytes:38793 (38.7 KB) TX bytes:38793 (38.7 KB) -正如你在上面看到的,我的网卡名称是 **enp0s3**,它的 IP 地址是 **192.168.1.103**。 +正如你在上面输出中看到的,我的网卡名称是 **enp0s3**,它的 IP 地址是 **192.168.1.103**。 现在让我们来为网卡添加一个新的 IP 地址,例如说 **192.168.1.104**。 @@ -73,7 +73,7 @@ inet6 fe80::a00:27ff:fe2a:34e/64 scope link valid_lft forever preferred_lft forever -类似地,你可以添加想要的任意多的 IP 地址。 +类似地,你可以添加任意数量的 IP 地址,只要你想要。 让我们 ping 一下这个 IP 地址验证一下。 @@ -108,7 +108,7 @@ 可以看到已经没有了!! -也许你已经知道,你重启系统后会丢失这些设置。那么怎么设置才能永久有效呢?这也很简单。 +正如你所知,重启系统后这些设置会失效。那么怎么设置才能永久有效呢?这也很简单。 ### 添加永久 IP 地址 ### @@ -154,7 +154,7 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 保存并关闭文件。 -无需重启运行下面的命令使更改生效。 +运行下面的命令使更改无需重启即生效。 sudo ifdown enp0s3 && sudo ifup enp0s3 @@ -182,7 +182,7 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 DHCPACK of 192.168.1.103 from 192.168.1.1 bound to 192.168.1.103 -- renewal in 35146 seconds. -**注意**:如果你从远程连接到服务器,把上面的两个命令放到**一行**中**非常重要**,因为第一个命令会断掉你的连接。而采用这种方式可以存活你的 ssh 会话。 +**注意**:如果你从远程连接到服务器,把上面的两个命令放到**一行**中**非常重要**,因为第一个命令会断掉你的连接。而采用这种方式可以保留你的 ssh 会话。 现在,让我们用下面的命令来检查一下是否添加了新的 IP: @@ -228,9 +228,9 @@ via: http://www.unixmen.com/assign-multiple-ip-addresses-to-one-interface-on-ubu 作者:[SK][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-network-interface-card-centos-7/ \ No newline at end of file +[1]:http://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-network-interface-card-centos-7/ From ae4d996af869f97d2ccc4f07aa9425f8082bb2d4 Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Mon, 28 Dec 2015 16:29:41 +0800 Subject: [PATCH 0709/1710] translated 20151206 NetworkManager and privacy in the IPv6 internet.md --- ...anager and privacy in the IPv6 internet.md | 44 ++++++++++++++----- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md index d3abefacb2..bdabf24aff 100644 --- a/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md +++ b/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md @@ -1,55 +1,75 @@ Translating by itsang NetworkManager and privacy in the IPv6 internet +IPv6因特网中的隐私保护和网络管理器 + ====================== IPv6 is gaining momentum. With growing use of the protocol concerns about privacy that were not initially anticipated arise. The Internet community actively publishes solutions to them. What’s the current state and how does NetworkManager catch up? Let’s figure out! +IPv6的使用量正在不断增加,让我们始料未及的是,伴随这个协议不断增加的使用量,大量隐私问题涌现出来。互联网社区在积极发表相关解决方案,当前状况是怎样的呢?网络管理器又是如何跟上的呢?让我们来瞧瞧吧! + ![](https://blogs.gnome.org/lkundrak/files/2015/12/cameras1.jpg) -## The identity of a IPv6-connected host +## The identity of a IPv6-connected host 通过IPv6方式连接的主机的特性 -The IPv6 enabled nodes don’t need a central authority similar to IPv4 [DHCP](https://tools.ietf.org/html/rfc2132) servers to configure their addresses. They discover the networks they are in and [complete the addresses themselves](https://tools.ietf.org/html/rfc4862) by generating the host part. This makes the network configuration simpler and scales better to larger networks. However, there’s some drawbacks to this approach. Firstly, the node needs to ensure that its address doesn’t collide with an address of any other node on the network. Secondly, if the node uses the same host part of the address in every network it enters then its movement can be tracked and the privacy is at risk. +The IPv6 enabled nodes don’t need a central authority similar to IPv4 [DHCP](https://tools.ietf.org/html/rfc2132) servers to configure their addresses. They discover the networks they are in and [complete the addresses themselves](https://tools.ietf.org/html/rfc4862) by generating the host part. This makes the network configuration simpler and scales better to larger networks. However, there’s some drawbacks to this approach. Firstly, the node needs to ensure that its address doesn’t collide with an address of any other node on the network. Secondly, if the node uses the same host part of the address in every network it enters then its movement can be tracked and the privacy is at risk. +通过IPv6方式激活的结点(译者注:结点在网络中指一个联网的设备)不需要类似IPv4网络中[DHCP](https://tools.ietf.org/html/rfc2132)服务器的中央机构来配置他们的地址。它们发现自己所在的网络然后通过生成主机部分来[自主生成地址](https://tools.ietf.org/html/rfc2132)。这种方式使得网络配置更加简单,并且能够更好的扩展到更大规模的网络。然而,这种方式也有一些缺点。首先,这个结点需要确保它的地址不会和网络上其他结点冲突。其次,如果这个结点在进入的每一个网络中使用相同的主机部分,它的运动就可以被追踪,如此一来,隐私便处于危险之中。 -Internet Engineering Task Force (IETF), the organization behind the Internet standards, [acknowledged this problem](https://tools.ietf.org/html/draft-iesg-serno-privacy-00) and recommends against use of hardware serial numbers to identify the node in the network. +Internet Engineering Task Force (IETF), the organization behind the Internet standards, [acknowledged this problem](https://tools.ietf.org/html/draft-iesg-serno-privacy-00) and recommends against use of hardware serial numbers to identify the node in the network. +负责制定因特网标准的组织Internet工程任务组(Internet Engineering Task Force,IETF)[意识到了这个问题](https://tools.ietf.org/html/draft-iesg-serno-privacy-00),这个组织建议取消使用硬件序列号来识别网络上的结点。 But what does the actual implementation look like? +但实际的实施情况是怎样的呢? -The problem of address uniqueness is addressed with [Duplicate Address Detection](https://tools.ietf.org/html/rfc4862#section-5.4) (DAD) mechanism. When a node creates an address for itself it first checks whether another node uses the same address using the [Neighbor Discovery Protocol](https://tools.ietf.org/html/rfc4861) (a mechanism not unlike IPv4 [ARP](https://tools.ietf.org/html/rfc826) protocol). When it discovers the address is already used, it must discard it. +The problem of address uniqueness is addressed with [Duplicate Address Detection](https://tools.ietf.org/html/rfc4862#section-5.4) (DAD) mechanism. When a node creates an address for itself it first checks whether another node uses the same address using the [Neighbor Discovery Protocol](https://tools.ietf.org/html/rfc4861) (a mechanism not unlike IPv4 [ARP](https://tools.ietf.org/html/rfc826) protocol). When it discovers the address is already used, it must discard it. +地址唯一性问题可以通过[重复地址检测(Duplicate Address Detection, DAD)](https://tools.ietf.org/html/rfc4862#section-5.4)机制来解决。当结点为自身创建地址的时候,他首先通过[邻居发现协议(Neighbor Discovery Protocol)](https://tools.ietf.org/html/rfc4861)(一种不同于IPv4 [ARP](https://tools.ietf.org/html/rfc826)协议的机制)来检查另一个结点是否使用了相同的地址。当它发现地址已经被使用,它必须抛弃掉这个地址。 The other problem (privacy) is a bit harder to solve. An IP address (be it IPv4 or IPv6) address consists of a network part and the host part. The host discovers the relevant network parts and is supposed generate the host part. Traditionally it just uses an Interface Identifier derived from the network hardware’s (MAC) address. The MAC address is set at manufacturing time and can uniquely identify the machine. This guarantees the address is stable and unique. That’s a good thing for address collision avoidance but a bad thing for privacy. The host part remaining constant in different network means that the machine can be uniquely identified as it enters different networks. This seemed like non-issue at the time the protocol was designed, but the privacy concerns arose as the IPv6 gained popularity. Fortunately, there’s a solution to this problem. +解决另一个问题——隐私问题,有一点困难。一个IP地址(无论IPv4或IPv6)由网络部分和主机部分组成(译者注:网络部分用来划分子网,主机部分用来从相应子网中找到具体的主机)。主机查找出相关的网络部分,并且生成主机部分。传统上它只使用了源自网络硬件(MAC)地址的接口识别器。MAC地址在硬件制造的时候就被设置好了,它可以唯一的识别机器。这样就确保了地址的稳定性和唯一性。这对避免地址冲突来说是件好事,但是对隐私来说一点也不好。主机部分在不同网络下保持恒定意味着机器在进入不同网络时可以被唯一的识别。这在协议制定的时候看起来无可非议,但是随着IPv6的流行,人们对于隐私问题的担忧也愈演愈烈。幸运的是,解决办法还是有的。 -## Enter privacy extensions +## Enter privacy extensions 进入隐私扩展 -It’s no secret that the biggest problem with IPv4 is that the addresses are scarce. This is no longer true with IPv6 and in fact an IPv6-enabled host can use addresses quite liberally. There’s absolutely nothing wrong with having multiple IPv6 addresses attached to the same interface. On the contrary, it’s a pretty standard situation. At the very minimum each node has an address that is used for contacting nodes on the same hardware link called a link-local address.  When the network contains a router that connects it to other networks in the internet, a node has an address for every network it’s directly connected to. If a host has more addresses in the same network the node accepts incoming traffic for all of them. For the outgoing connections which, of course, reveal the address to the remote host, the kernel picks the fittest one. But which one is it? +It’s no secret that the biggest problem with IPv4 is that the addresses are scarce. This is no longer true with IPv6 and in fact an IPv6-enabled host can use addresses quite liberally. There’s absolutely nothing wrong with having multiple IPv6 addresses attached to the same interface. On the contrary, it’s a pretty standard situation. At the very minimum each node has an address that is used for contacting nodes on the same hardware link called a link-local address. When the network contains a router that connects it to other networks in the internet, a node has an address for every network it’s directly connected to. If a host has more addresses in the same network the node accepts incoming traffic for all of them. For the outgoing connections which, of course, reveal the address to the remote host, the kernel picks the fittest one. But which one is it? +Pv4的最大问题——地址枯竭,已经不是什么秘密。对IPv6来说,这一点不再成立,事实上,使用IPv6的主机能够相当大方的利用地址。多个IPv6地址对应一块网卡绝对没有任何错误,正好相反,这是一种标准情形。最起码每个结点都有一个“本地连接地址”,它被用来与同一物理链路的结点联络。当网络包含了一个连接其他网络的路由器,这个网络中的每一个结点都有一个与每个直接连接网络联络的地址。如果主机在相同网络有更多的地址,结点(译者注:指路由器)将接受它们全部的传入流量。对于输出连接,它会把地址显示给远程主机,内核会挑选最适合的地址。但到底是哪一个呢? -With privacy extensions enabled, as defined by [RFC4941](https://tools.ietf.org/html/rfc4941), a new address with a random host part is generated every now and then. The newest one is used for new outgoing connections while the older ones are deprecated when they’re unused. This is a nifty trick — the host does not reveal the stable address as it’s not used for outgoing connections, but still accepts connections to it from the hosts that are aware of it. +With privacy extensions enabled, as defined by [RFC4941](https://tools.ietf.org/html/rfc4941), a new address with a random host part is generated every now and then. The newest one is used for new outgoing connections while the older ones are deprecated when they’re unused. This is a nifty trick — the host does not reveal the stable address as it’s not used for outgoing connections, but still accepts connections to it from the hosts that are aware of it. +隐私扩展可用时,就像[RFC4941](https://tools.ietf.org/html/rfc4941)定义的那样,时常会生成带有随机主机部分的新地址。最新的那个被用于最新的输出连接,与此同时,那些不被使用了的旧地址将被丢弃。这是一个极好的窍略——当固定地址不用于输出连接的时候,主机就不会显示它,但它仍然会接受注意到它的主机的连接。 There’s a downside to this. Certain applications tie the address to the user identity. Consider a web application that issues a HTTP Cookie for the user during the authentication but only accepts it for the connections that come from the address that conducted the authentications. As the kernel generates a new temporary address, the server would reject the requests that use it, effectively logging the user out. It could be argued that the address is not an appropriate mechanism for establishing user’s identity but that’s what some real-world applications do. +但这也存在美中不足之处——某些应用会把地址与用户识别绑定在一起。让我们来考虑一下这种情形,一个web应用在用户认证的时候生成一个HTTP Cookie,但它只接受实施认证的地址的连接。当内核生成了一个新的临时地址,服务器会拒绝使用这个地址的请求,实际上相当于将用户登出。地址是不是建立用户认证的合适机制值得商榷,但这确实是现实中应用程序正在做的。 -## Privacy stable addressing to the rescue +## Privacy stable addressing to the rescue 解救之道——隐私固定寻址 -Another approach would be needed to cope with this. There’s a need for an address that is unique (of course), stable for a particular network but still changes when user enters another network so that tracking is not possible. The RFC7217 introduces a mechanism that provides exactly this. +Another approach would be needed to cope with this. There’s a need for an address that is unique (of course), stable for a particular network but still changes when user enters another network so that tracking is not possible. The RFC7217 introduces a mechanism that provides exactly this. +解决这个问题可能需要另辟蹊径。唯一的(当然咯)地址确实有必要,对于特定网络来说是稳定的,但当用户进入了另一个网络后仍然会变,这样的话追踪就变得几乎不可能。RFC7217介绍了一种如上所述的机制。 Creation of a privacy stable address relies on a pseudo-random key that’s only known the host itself and never revealed to other hosts in the network. This key is then hashed using a cryptographically secure algorithm along with values specific for a particular network connection. It includes an identifier of the network interface, the network prefix and possibly other values specific to the network such as the wireless SSID. The use of the secret key makes it impossible to predict the resulting address for the other hosts while the network-specific data causes it to be different when entering a different network. +创建隐私固定地址依赖于伪随机值,这个随机值只被主机本身知晓,它不会显示给网络上的其他主机。这个随机值随后被一个密码安全算法加密,一起被加密的还有一些与网络连接的特殊值。这些值包含:用以标识网卡的标识符;网络前缀;对于这个网络来说有可能的其他特殊值,例如无线的SSID。使用安全值使其他主机很难预测结果地址,与此同时,当进入不同的网络时,网络的特殊数据会让地址变得不同。 This also solves the duplicate address problem nicely. The random key makes collisions unlikely. If, in spite of this, a collision occurs then the hash can be salted with a DAD failure counter and a different address can be generated instead of failing the network connectivity. Now that’s clever. +这也巧妙的解决了地址重复问题。因为有随机值的存在,冲突也不太可能发生。万一发生了冲突,结果地址会得到重复地址检测失败的记录,这时会生成一个不同的地址而不会断开网络连接。看,这种方式很聪明吧。 Using privacy stable address doesn’t interfere with the privacy extensions at all. You can use the [RFC7217](https://tools.ietf.org/html/rfc7217) stable address while still employing the RFC4941 temporary addresses at the same time. +使用隐私固定地址一点儿也不会妨碍隐私扩展。你可以在使用RFC4941所描述的临时地址的同时使用[RFC7217](https://tools.ietf.org/html/rfc7217)中的固定地址。 -## Where does NetworkManager stand? +## Where does NetworkManager stand? 网络管理器处于什么样的状况? We’ve already enabled the privacy extensions with the release NetworkManager 1.0.4. They’re turned on by default; you can control them with ipv6.ip6-privacy property. +我们已经在网络管理器1.0.4版本中实现了隐私扩展。在这个版本中,隐私扩展默认开启。你可以用ipv6.ip6-privacy参数来控制它。 With the release of NetworkManager 1.2, we’re adding the stable privacy addressing. It’s supposed to address the situations where the privacy extensions don’t make the cut. The use of the feature is controlled with the ipv6.addr-gen-mode property. If it’s set to stable-privacy then stable privacy addressing is used. Setting it to “eui64” or not setting it at all preserves the traditional default behavior. +在网络管理器1.2版本中,我们将会加入固定隐私寻址。应该指出的是,目前的隐私扩展还不符合这种需求。我们可以使用ipv6.addr-gen-mode参数来控制这个特性。如果它被设置成固定隐私,那么将会使用固定隐私寻址。设置成“eui64”或者干脆不设置它将会保持传统的默认寻址方式。 Stay tuned for NetworkManager 1.2 release in early 2016! If you want to try the bleeding-edge snapshot, give Fedora Rawhide a try. It will eventually become Fedora 24. +敬请期待明年,也就是2016年年初网络管理器1.2版本的发布吧!如果你想尝试一下最新的版本,不妨试试Fedora Rawhide,它最终会变成Fedora24。 -*I’d like to thank Hannes Frederic Sowa for a valuable feedback. The article would make less sense without his corrections. Hannes also created the in-kernel implementation of the RFC7217 mechanism which can be used when the networking is not managed by NetworkManager.* +*I’d like to thank Hannes Frederic Sowa for a valuable feedback. The article would make less sense without his corrections. Hannes also created the in-kernel implementation of the RFC7217 mechanism which can be used when the networking is not managed by NetworkManager.* +*我想感谢Hannes Frederic Sowa,他给了我很有价值的反馈。如果没有他的帮助,这篇文章的作用将会逊色很多。另外,Hannes也是RFC7217所描述机制的内核实现者,当网络管理器不起作用的时候,它将发挥作用。* -------------------------------------------------------------------------------- via: https://blogs.gnome.org/lkundrak/2015/12/03/networkmanager-and-privacy-in-the-ipv6-internet/ 作者:[Lubomir Rintel] -译者:[译者ID](https://github.com/译者ID) +译者:[itsang](https://github.com/itsang) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0e4ab9bea694f9854a536b838b36ca8357f01dc7 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 28 Dec 2015 17:37:26 +0800 Subject: [PATCH 0710/1710] =?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 --- ...int) your Ubuntu or Linux Mint with SystemBack.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md index 7e0ccc87c7..c931365600 100644 --- a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md +++ b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md @@ -1,6 +1,10 @@ -# 使用SystemBack备份你的Ubuntu/Linux Mint(系统还原) +# 使用 SystemBack 备份你的 Ubuntu/Linux Mint(系统还原) -系统还原对于任何一款允许用户还原电脑到之前状态(包括文件系统,安装的应用,以及系统设置)的操作系统来说,都是必备功能,可以处理系统故障以及其他的问题。有的时候安装一个程序或者驱动可能让你的系统黑屏。系统还原则让你电脑里面的系统文件(译者注:是系统文件,并非普通文件,详情请看**注意**部分)和程序恢复到之前工作正常时候的状态,进而让你远离那让人头痛的排障过程了。而且它也不会影响你的文件,照片或者其他数据。简单的系统备份还原工具[Systemback](https://launchpad.net/systemback)让你很容易地创建系统备份以及用户配置文件。如果遇到问题,你可以傻瓜式还原。它还有一些额外的特征包括系统复制,系统安装以及Live系统创建。 +对于任何一款允许用户还原电脑到之前状态(包括文件系统,安装的应用,以及系统设置)的操作系统来说,系统还原都是必备功能,可以恢复系统故障以及其他的问题。 + +有的时候安装一个程序或者驱动可能让你的系统黑屏。系统还原则让你电脑里面的系统文件(译者注:是系统文件,并非普通文件,详情请看**注意**部分)和程序恢复到之前工作正常时候的状态,进而让你远离那让人头痛的排障过程了。而且它也不会影响你的文件,照片或者其他数据。 + +简单的系统备份还原工具[Systemback](https://launchpad.net/systemback)让你很容易地创建系统备份以及用户配置文件。一旦遇到问题,你可以简单地恢复到系统先前的状态。它还有一些额外的特征包括系统复制,系统安装以及Live系统创建。 截图 @@ -12,7 +16,7 @@ ![](http://1.bp.blogspot.com/-t_gmcoQZrvM/VlilhLP--TI/AAAAAAAAGt0/GWBg6bGeeaI/s1600/systemback-5.jpg) -**注意**:使用系统还原不会还原你的文件,音乐,电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机上没有系统还原点,那么系统还原工具就不会奏效了。(最后一句没有太理解) +**注意**:使用系统还原不会还原你的文件,音乐,电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机没有还原点,那么系统恢复就无法奏效,所以这个工具就无法帮助你(还原系统),如果你尝试恢复一个主要问题,你将需要移步到另外的步骤来进行故障排除。 > > >适用于Ubuntu 15.10 Wily/16.04/15.04 Vivid/14.04 Trusty/Linux Mint 14.x/其他Ubuntu衍生版,打开终端,将下面这些命令复制过去: @@ -32,7 +36,7 @@ sudo apt-get install systemback via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 59980f066fe3156be71d218c2770876c2413da3a Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Mon, 28 Dec 2015 20:00:10 +0800 Subject: [PATCH 0711/1710] transtated 20151206 NetworkManager and privacy in the IPv6 internet.md --- .../20151206 NetworkManager and privacy in the IPv6 internet.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151206 NetworkManager and privacy in the IPv6 internet.md (100%) diff --git a/sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md similarity index 100% rename from sources/tech/20151206 NetworkManager and privacy in the IPv6 internet.md rename to translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md From a3a4270e4b16f72d6720c7301d14311d22b455a6 Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Mon, 28 Dec 2015 20:05:56 +0800 Subject: [PATCH 0712/1710] translated --- ...anager and privacy in the IPv6 internet.md | 27 +++---------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md index bdabf24aff..834d50a0ac 100644 --- a/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md +++ b/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md @@ -1,69 +1,50 @@ -Translating by itsang -NetworkManager and privacy in the IPv6 internet IPv6因特网中的隐私保护和网络管理器 ====================== -IPv6 is gaining momentum. With growing use of the protocol concerns about privacy that were not initially anticipated arise. The Internet community actively publishes solutions to them. What’s the current state and how does NetworkManager catch up? Let’s figure out! IPv6的使用量正在不断增加,让我们始料未及的是,伴随这个协议不断增加的使用量,大量隐私问题涌现出来。互联网社区在积极发表相关解决方案,当前状况是怎样的呢?网络管理器又是如何跟上的呢?让我们来瞧瞧吧! ![](https://blogs.gnome.org/lkundrak/files/2015/12/cameras1.jpg) -## The identity of a IPv6-connected host 通过IPv6方式连接的主机的特性 +## 通过IPv6方式连接的主机的特性 -The IPv6 enabled nodes don’t need a central authority similar to IPv4 [DHCP](https://tools.ietf.org/html/rfc2132) servers to configure their addresses. They discover the networks they are in and [complete the addresses themselves](https://tools.ietf.org/html/rfc4862) by generating the host part. This makes the network configuration simpler and scales better to larger networks. However, there’s some drawbacks to this approach. Firstly, the node needs to ensure that its address doesn’t collide with an address of any other node on the network. Secondly, if the node uses the same host part of the address in every network it enters then its movement can be tracked and the privacy is at risk. 通过IPv6方式激活的结点(译者注:结点在网络中指一个联网的设备)不需要类似IPv4网络中[DHCP](https://tools.ietf.org/html/rfc2132)服务器的中央机构来配置他们的地址。它们发现自己所在的网络然后通过生成主机部分来[自主生成地址](https://tools.ietf.org/html/rfc2132)。这种方式使得网络配置更加简单,并且能够更好的扩展到更大规模的网络。然而,这种方式也有一些缺点。首先,这个结点需要确保它的地址不会和网络上其他结点冲突。其次,如果这个结点在进入的每一个网络中使用相同的主机部分,它的运动就可以被追踪,如此一来,隐私便处于危险之中。 -Internet Engineering Task Force (IETF), the organization behind the Internet standards, [acknowledged this problem](https://tools.ietf.org/html/draft-iesg-serno-privacy-00) and recommends against use of hardware serial numbers to identify the node in the network. 负责制定因特网标准的组织Internet工程任务组(Internet Engineering Task Force,IETF)[意识到了这个问题](https://tools.ietf.org/html/draft-iesg-serno-privacy-00),这个组织建议取消使用硬件序列号来识别网络上的结点。 -But what does the actual implementation look like? 但实际的实施情况是怎样的呢? -The problem of address uniqueness is addressed with [Duplicate Address Detection](https://tools.ietf.org/html/rfc4862#section-5.4) (DAD) mechanism. When a node creates an address for itself it first checks whether another node uses the same address using the [Neighbor Discovery Protocol](https://tools.ietf.org/html/rfc4861) (a mechanism not unlike IPv4 [ARP](https://tools.ietf.org/html/rfc826) protocol). When it discovers the address is already used, it must discard it. 地址唯一性问题可以通过[重复地址检测(Duplicate Address Detection, DAD)](https://tools.ietf.org/html/rfc4862#section-5.4)机制来解决。当结点为自身创建地址的时候,他首先通过[邻居发现协议(Neighbor Discovery Protocol)](https://tools.ietf.org/html/rfc4861)(一种不同于IPv4 [ARP](https://tools.ietf.org/html/rfc826)协议的机制)来检查另一个结点是否使用了相同的地址。当它发现地址已经被使用,它必须抛弃掉这个地址。 -The other problem (privacy) is a bit harder to solve. An IP address (be it IPv4 or IPv6) address consists of a network part and the host part. The host discovers the relevant network parts and is supposed generate the host part. Traditionally it just uses an Interface Identifier derived from the network hardware’s (MAC) address. The MAC address is set at manufacturing time and can uniquely identify the machine. This guarantees the address is stable and unique. That’s a good thing for address collision avoidance but a bad thing for privacy. The host part remaining constant in different network means that the machine can be uniquely identified as it enters different networks. This seemed like non-issue at the time the protocol was designed, but the privacy concerns arose as the IPv6 gained popularity. Fortunately, there’s a solution to this problem. 解决另一个问题——隐私问题,有一点困难。一个IP地址(无论IPv4或IPv6)由网络部分和主机部分组成(译者注:网络部分用来划分子网,主机部分用来从相应子网中找到具体的主机)。主机查找出相关的网络部分,并且生成主机部分。传统上它只使用了源自网络硬件(MAC)地址的接口识别器。MAC地址在硬件制造的时候就被设置好了,它可以唯一的识别机器。这样就确保了地址的稳定性和唯一性。这对避免地址冲突来说是件好事,但是对隐私来说一点也不好。主机部分在不同网络下保持恒定意味着机器在进入不同网络时可以被唯一的识别。这在协议制定的时候看起来无可非议,但是随着IPv6的流行,人们对于隐私问题的担忧也愈演愈烈。幸运的是,解决办法还是有的。 -## Enter privacy extensions 进入隐私扩展 +## 进入隐私扩展 -It’s no secret that the biggest problem with IPv4 is that the addresses are scarce. This is no longer true with IPv6 and in fact an IPv6-enabled host can use addresses quite liberally. There’s absolutely nothing wrong with having multiple IPv6 addresses attached to the same interface. On the contrary, it’s a pretty standard situation. At the very minimum each node has an address that is used for contacting nodes on the same hardware link called a link-local address. When the network contains a router that connects it to other networks in the internet, a node has an address for every network it’s directly connected to. If a host has more addresses in the same network the node accepts incoming traffic for all of them. For the outgoing connections which, of course, reveal the address to the remote host, the kernel picks the fittest one. But which one is it? Pv4的最大问题——地址枯竭,已经不是什么秘密。对IPv6来说,这一点不再成立,事实上,使用IPv6的主机能够相当大方的利用地址。多个IPv6地址对应一块网卡绝对没有任何错误,正好相反,这是一种标准情形。最起码每个结点都有一个“本地连接地址”,它被用来与同一物理链路的结点联络。当网络包含了一个连接其他网络的路由器,这个网络中的每一个结点都有一个与每个直接连接网络联络的地址。如果主机在相同网络有更多的地址,结点(译者注:指路由器)将接受它们全部的传入流量。对于输出连接,它会把地址显示给远程主机,内核会挑选最适合的地址。但到底是哪一个呢? -With privacy extensions enabled, as defined by [RFC4941](https://tools.ietf.org/html/rfc4941), a new address with a random host part is generated every now and then. The newest one is used for new outgoing connections while the older ones are deprecated when they’re unused. This is a nifty trick — the host does not reveal the stable address as it’s not used for outgoing connections, but still accepts connections to it from the hosts that are aware of it. 隐私扩展可用时,就像[RFC4941](https://tools.ietf.org/html/rfc4941)定义的那样,时常会生成带有随机主机部分的新地址。最新的那个被用于最新的输出连接,与此同时,那些不被使用了的旧地址将被丢弃。这是一个极好的窍略——当固定地址不用于输出连接的时候,主机就不会显示它,但它仍然会接受注意到它的主机的连接。 -There’s a downside to this. Certain applications tie the address to the user identity. Consider a web application that issues a HTTP Cookie for the user during the authentication but only accepts it for the connections that come from the address that conducted the authentications. As the kernel generates a new temporary address, the server would reject the requests that use it, effectively logging the user out. It could be argued that the address is not an appropriate mechanism for establishing user’s identity but that’s what some real-world applications do. 但这也存在美中不足之处——某些应用会把地址与用户识别绑定在一起。让我们来考虑一下这种情形,一个web应用在用户认证的时候生成一个HTTP Cookie,但它只接受实施认证的地址的连接。当内核生成了一个新的临时地址,服务器会拒绝使用这个地址的请求,实际上相当于将用户登出。地址是不是建立用户认证的合适机制值得商榷,但这确实是现实中应用程序正在做的。 -## Privacy stable addressing to the rescue 解救之道——隐私固定寻址 +## 解救之道——隐私固定寻址 -Another approach would be needed to cope with this. There’s a need for an address that is unique (of course), stable for a particular network but still changes when user enters another network so that tracking is not possible. The RFC7217 introduces a mechanism that provides exactly this. 解决这个问题可能需要另辟蹊径。唯一的(当然咯)地址确实有必要,对于特定网络来说是稳定的,但当用户进入了另一个网络后仍然会变,这样的话追踪就变得几乎不可能。RFC7217介绍了一种如上所述的机制。 -Creation of a privacy stable address relies on a pseudo-random key that’s only known the host itself and never revealed to other hosts in the network. This key is then hashed using a cryptographically secure algorithm along with values specific for a particular network connection. It includes an identifier of the network interface, the network prefix and possibly other values specific to the network such as the wireless SSID. The use of the secret key makes it impossible to predict the resulting address for the other hosts while the network-specific data causes it to be different when entering a different network. 创建隐私固定地址依赖于伪随机值,这个随机值只被主机本身知晓,它不会显示给网络上的其他主机。这个随机值随后被一个密码安全算法加密,一起被加密的还有一些与网络连接的特殊值。这些值包含:用以标识网卡的标识符;网络前缀;对于这个网络来说有可能的其他特殊值,例如无线的SSID。使用安全值使其他主机很难预测结果地址,与此同时,当进入不同的网络时,网络的特殊数据会让地址变得不同。 -This also solves the duplicate address problem nicely. The random key makes collisions unlikely. If, in spite of this, a collision occurs then the hash can be salted with a DAD failure counter and a different address can be generated instead of failing the network connectivity. Now that’s clever. 这也巧妙的解决了地址重复问题。因为有随机值的存在,冲突也不太可能发生。万一发生了冲突,结果地址会得到重复地址检测失败的记录,这时会生成一个不同的地址而不会断开网络连接。看,这种方式很聪明吧。 -Using privacy stable address doesn’t interfere with the privacy extensions at all. You can use the [RFC7217](https://tools.ietf.org/html/rfc7217) stable address while still employing the RFC4941 temporary addresses at the same time. 使用隐私固定地址一点儿也不会妨碍隐私扩展。你可以在使用RFC4941所描述的临时地址的同时使用[RFC7217](https://tools.ietf.org/html/rfc7217)中的固定地址。 -## Where does NetworkManager stand? 网络管理器处于什么样的状况? +## 网络管理器处于什么样的状况? -We’ve already enabled the privacy extensions with the release NetworkManager 1.0.4. They’re turned on by default; you can control them with ipv6.ip6-privacy property. 我们已经在网络管理器1.0.4版本中实现了隐私扩展。在这个版本中,隐私扩展默认开启。你可以用ipv6.ip6-privacy参数来控制它。 -With the release of NetworkManager 1.2, we’re adding the stable privacy addressing. It’s supposed to address the situations where the privacy extensions don’t make the cut. The use of the feature is controlled with the ipv6.addr-gen-mode property. If it’s set to stable-privacy then stable privacy addressing is used. Setting it to “eui64” or not setting it at all preserves the traditional default behavior. 在网络管理器1.2版本中,我们将会加入固定隐私寻址。应该指出的是,目前的隐私扩展还不符合这种需求。我们可以使用ipv6.addr-gen-mode参数来控制这个特性。如果它被设置成固定隐私,那么将会使用固定隐私寻址。设置成“eui64”或者干脆不设置它将会保持传统的默认寻址方式。 -Stay tuned for NetworkManager 1.2 release in early 2016! If you want to try the bleeding-edge snapshot, give Fedora Rawhide a try. It will eventually become Fedora 24. 敬请期待明年,也就是2016年年初网络管理器1.2版本的发布吧!如果你想尝试一下最新的版本,不妨试试Fedora Rawhide,它最终会变成Fedora24。 -*I’d like to thank Hannes Frederic Sowa for a valuable feedback. The article would make less sense without his corrections. Hannes also created the in-kernel implementation of the RFC7217 mechanism which can be used when the networking is not managed by NetworkManager.* *我想感谢Hannes Frederic Sowa,他给了我很有价值的反馈。如果没有他的帮助,这篇文章的作用将会逊色很多。另外,Hannes也是RFC7217所描述机制的内核实现者,当网络管理器不起作用的时候,它将发挥作用。* -------------------------------------------------------------------------------- From 192c04d8421b89b3ff83e45b5bc408c430e1f62e Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Mon, 28 Dec 2015 20:08:36 +0800 Subject: [PATCH 0713/1710] Update 20151206 NetworkManager and privacy in the IPv6 internet.md --- .../20151206 NetworkManager and privacy in the IPv6 internet.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md index 834d50a0ac..fb2eaa5af7 100644 --- a/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md +++ b/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md @@ -1,5 +1,4 @@ IPv6因特网中的隐私保护和网络管理器 - ====================== IPv6的使用量正在不断增加,让我们始料未及的是,伴随这个协议不断增加的使用量,大量隐私问题涌现出来。互联网社区在积极发表相关解决方案,当前状况是怎样的呢?网络管理器又是如何跟上的呢?让我们来瞧瞧吧! From fa3a39e735fe419e19f27421bc66d19b914c511d Mon Sep 17 00:00:00 2001 From: Stdio A Date: Mon, 28 Dec 2015 20:47:21 +0800 Subject: [PATCH 0714/1710] =?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/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md new file: translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md --- ... Biggest Linux Stories Of The Year 2015.md | 125 ------------------ ... Biggest Linux Stories Of The Year 2015.md | 125 ++++++++++++++++++ 2 files changed, 125 insertions(+), 125 deletions(-) delete mode 100644 sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md create mode 100644 translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md diff --git a/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md deleted file mode 100644 index ce56ab4405..0000000000 --- a/sources/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md +++ /dev/null @@ -1,125 +0,0 @@ -StdioA translating - -Ten Biggest Linux Stories Of The Year 2015 -================================================================================ -![Biggest Linux Stories of 2015](http://itsfoss.com/wp-content/uploads/2015/12/Biggest-Linux-Stories-2015.jpg) - -Year 2015 is coming to an end and I am here with Year 2015 special series on It’s FOSS. First in this series is the biggest Linux stories of the year 2015. These stories are the ones that had the most impact on the Linux world, both positive and negative. - -I have summarized ten of such stories which created the most buzz in 2015. Here we go! - -### Biggest Linux and Open Source stories of the year 2015 ### - -Just to add, the listed items are not ordered chronologically. - -#### Microsoft’s partnering with Linux #### - -In late September, everyone was shocked to hear that [Microsoft created its own Linux distribution][1]. It was later revealed that [it was a software][2] developed for its Azur cloud switches. - -But the story did not end up just there. Microsoft indeed partnered with Canonical (parent company of Ubuntu Linux) for [HDInsight][3], Microsoft’s big data Hadoop-on-Azure service. Ubuntu was the first Linux on which [Microsoft deployed this software][4]. - -Will Microsoft continue its affair with Linux? Or will it dump it after Linux has served its purpose (Azur). Only time will tell. - -#### Microsoft releases Visual Studio Code for Linux #### - -Before Microsoft-Linux distribution uproar, Microsoft has dropped another bomb by releasing Visual Studio Code for Linux, along with Windows and OS X versions. Though Visual Studio Code is not open source, releasing a Linux version was somehow a win for Linux users. After all, Linus Torvalds had famously said, “if Microsoft ever does an application for Linux, it means I’ve won”. - -You can follow this tutorial to see [how to install Visual Studio Code in Ubuntu][5]. - -#### Apple open sources Swift programming language #### - -Apple was not behind in showing off its ‘love’ for Linux and Open Source. Apple’s flagship programming language Swift which is used for making iOS apps, [is now open source][6] with Linux ports available. Though in beta, you can easily [install Swift in Ubuntu][7]. - -But Apple is Apple and it [started bragging itself][8] as the “first major computer company to make Open Source development a key part of its software strategy…(sic)”. - -#### Ubuntu Phone finally launched #### - -Ubuntu Phone was finally launched earlier this year. Intended for early adopters and developers, Ubuntu was welcomed with open heart by the Ubuntu community. Mainstream smartphone users are still shying away from it, mainly [because the OS is still under heavy development][9]. Year 2016 will be deciding for the existence of Ubuntu Phone. - -#### Financial crisis hits Jolla #### - -Jolla, the company behind Linux based smartphone operating system Sailfish OS, hit a major financial hurdle. It resulted in [half of Jolla employees being laid off][10]. - -Jolla had a very [successful crowdfunding campaign][11] in 2014 for its tablet. Apparently, they spent most of the budget on the development of Sailfish OS and when the lead investor backed off, company struggled for its survival. - -Good news is that Jolla has managed to get some solid funding and its ]back in business][12]. - -#### Firefox OS is dead #### - -One of the open source alternatives to Android, Mozilla’s mobile operating system Firefox OS died a slow death earlier this month. Intended at developing countries with smartphones as cheap as $25, Firefox OS based smartphones could never gained popularity. I think lack of popular apps and cheap hardware was the main reason. - -In December, [Mozilla announced][13] that it will stop developing Firefox OS and also stop the sale of Firefox smartphones. - -Though it is never announced, I think even [Tizen][14], Linux foundation’s own Linux based mobile OS, is dead as well. I don’t see any development news on Tizen and Linux Foundation never promotes it. It is just the matter of time when we will be invited to the funeral of Tizen. - -#### Infighting in “Ubuntu family” #### - -There were lots of heated discussion in May this year when Kubuntu project lead, [Jonathan Riddell was forced out by Ubuntu Community Council][15]. Jonathan had asked questions about how the donations received by Ubuntu is being spent. He had complained that Kubuntu never saw the money. - -This led to an exchange of accusation between both sides. Ultimately, big daddy of Ubuntu, [Mark Shuttleworth asked Jonathan to step down][16]. - -#### Female Linux Kernel developer quits citing ‘brutal communication style’ #### - -Linux creator Linux Torvalds is known for the use of abusive language. Linux Kernel dev [Sarah Sharp][17] is also known for being out spoken. - -Sarah Sharp had earlier locked horns with Linus Torvalds in 2013 when she publicly [advised Linus to keep “verbal violence” off the mailing list][18]. Linus did not take it [lightly][19] as well. - -That was in 2013. In 2015, Sarah announced that she is [stepping down from her work in Kernel community][20] because the communication style lacks basic decency and is brutal and profane. - -This move left people discussing if Linux Kernel community should really change the way they behave or if Sarah took things too far. - -#### Unity gaming editor ported to Linux #### - -While [gaming on Linux][21] is still the Achilles heel for Linux users, the community got excited when gaming engine Unity announced that it is testing its [game editor on Linux][22]. As Linux is used very well for rendering, it is speculated that this move will bring game developers to Linux. It is not confirmed yet if Unity will actually bring a final Linux version of its game editor though. - -#### Open Source adoption in government organization #### - -Administration in several [European cities decided to ditch proprity software][23] and opt for open source alternatives. Most city administration replaced Microsoft Office with LibreOffice or OpenOffice. Few cities and [government][24] schools also went ahead and replaced Microsoft Windows with Linux. - -Cost cutting was one of the major factor in this decision as the city administration saved hundreds of thousands of Euro by adopting Open Source. - -Universities were not far behind in adopting open source as well. All year round, we get to hear how a [university dropped Photoshop for Krita][25] or [university using open source office][26]. - -### Conclusion ### - -As with any other year, 2015 also had some positive and some negative moments for Linux lovers. We saw competitors like Microsoft and Apple coming close to Linux, government organizations adopting to open source. At the same time, we witnessed the failure of Firefox smartphone OS. A mixed year, I would say. - -What do you think? I let you share what you think was the most important news for Linux-ers in the year 2015 and your overall feel about it. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/biggest-linux-stories-2015/ - -作者:[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.theregister.co.uk/2015/09/18/microsoft_has_developed_its_own_linux_repeat_microsoft_has_developed_its_own_linux/ -[2]:http://arstechnica.com/information-technology/2015/09/microsoft-has-built-software-but-not-a-linux-distribution-for-its-software-switches/ -[3]:https://azure.microsoft.com/en-us/services/hdinsight/ -[4]:http://www.zdnet.com/article/microsoft-deploys-first-major-server-application-on-ubuntu-linux/ -[5]:http://itsfoss.com/install-visual-studio-code-ubuntu/ -[6]:http://itsfoss.com/swift-open-source-linux/ -[7]:http://itsfoss.com/use-swift-linux/ -[8]:https://business.facebook.com/itsfoss/photos/pb.115098615297581.-2207520000.1450817108./634288916711879/?type=3&theater -[9]:http://www.engadget.com/2015/07/24/ubuntu-phone-review/ -[10]:http://techcrunch.com/2015/11/20/jolla-running-out-of-runway-for-its-android-alternative/ -[11]:https://www.indiegogo.com/projects/jolla-tablet-world-s-first-crowdsourced-tablet#/ -[12]:https://blog.jolla.com/jolla-back-business/ -[13]:http://arstechnica.com/gadgets/2015/12/firefox-os-smartphones-are-dead/ -[14]:https://www.tizen.org/ -[15]:http://www.omgubuntu.co.uk/2015/05/kubuntu-project-lead-asked-to-step-down-by-ubuntu-community-council -[16]:http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html -[17]:http://sarah.thesharps.us/ -[18]:http://www.techeye.net/chips/linus-torvalds-and-intel-woman-in-sweary-spat -[19]:http://marc.info/?l=linux-kernel&m=137392506516022&w=2 -[20]:http://www.networkworld.com/article/2988850/opensource-subnet/linux-kernel-dev-sarah-sharp-quits-citing-brutal-communications-style.html -[21]:http://itsfoss.com/linux-gaming-guide/ -[22]:http://itsfoss.com/unity-gaming-engine-linux/ -[23]:http://itsfoss.com/tag/open-source-adoption/ -[24]:http://itsfoss.com/spanish-school-ditches-windows-ubuntu/ -[25]:http://itsfoss.com/french-university-dumps-adobe-photoshop-open-source-app-krita/ -[26]:http://itsfoss.com/hungarian-universities-switch-eurooffice/ diff --git a/translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md new file mode 100644 index 0000000000..90c8f2f6a7 --- /dev/null +++ b/translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md @@ -0,0 +1,125 @@ +# 2015年度十大Linux事件 + +![2015年的大事件](http://itsfoss.com/wp-content/uploads/2015/12/Biggest-Linux-Stories-2015.jpg) + +2015年即将结束,我在这里(It's FOSS)发表《2015年的大事件》系列。这个系列的第一篇文章为《2015十大Linux事件》。这些事件在Linux世界中产生了极大的影响,无论它们是积极的还是消极的。 + +我总结了2015发生的十个像这样——产生了最大影响的事件。黑喂狗! + +### 2015年度十大Linux/开源相关事件 + +补充一句,以下这些项目没有按照时间顺序排列。 + +#### 微软与Linux的结盟 + +在9月下旬,所有人听到[微软构建了自己的Linux发行版][1]这个消息时都大吃一惊。其在后来被揭露,这其实是一个微软开发的用于`Azur cloud switches`的[软件][2]。 + +但故事还没结束。微软真的与Canonical (Ubuntu Linux的母公司)达成合作 来开发[HDInsight][3]——微软在通过Azure上构建Hadoop来进行大数据处理的服务. Ubuntu是[微软在其上部署软件][4]的第一个Linux系统。 + +微软会继续保持它与Linux的关系吗? 还是在使用Linux达到其目的(Azur)就会收手?只有时间能告诉我们一切。 + +#### 微软发布适用于Linux的Visual Studio Code + +在微软发布Linux发行版引起喧嚣之前,微软扔下了另一枚炸弹——发布Linux版Visual Studio Code, 与其一并发布的还有Windows以及OS X版。尽管Visual Studio Code并不是开源的,从某种意义上讲,发布Linux版本仍然是Linux用户的胜利。 无论如何,Linus Torvalds曾说过一句很著名的话:“如果微软给Linux开发过一款应用的话,这就意味着我已经赢了”。 + +你可以看这个教程来学习[如何在Ubuntu中安装Visual Studio Code][5]。 + +#### 苹果公司开源编程语言Swift + +在向Linux及开源“示爱”方面,苹果公司也不甘示弱。苹果用来制作iOS应用的首选编程语言Swift, [现已开源][6]并移植到Linux中。虽然其还在测试中,但你可以轻易地[在Ubuntu中安装Swift][7]。 + +但是,苹果就是苹果,它[开始吹嘘][8]其为“第一个视开源开发为公司的关键软件开发策略的计算机公司巨头(原文如此)”。 + +#### Ubuntu手机终于发布 + +Ubuntu手机终于在今年年初发布。 因其早期使用者及开发者,Ubuntu深受Ubuntu社区喜爱。主流智能机用户仍然回避它,主要[因为该系统还在大规模开发中][9]。对于Ubuntu手机的问世,2016年将成为决定性的一年。 + +#### Jolla遭受经济危机 + +Jolla, Sailfish OS —— 以Linux为基础的智能手机系统的幕后公司,遭受了严重的财政障碍。这导致了[一半的Jolla员工罢工][10]。 + +Jolla在2014年针对它的平板电脑完成了一次非常[成功的众筹][11],显然,他们将大部分预算都花在了Sailfish OS的开发上,而在主要投资者退出后,公司在挣扎以求生存。 + +不过有一个好消息,Jolla成功拿到了一些雄厚的资金,而且他们已[回归经营生意][12]。 + +#### Firefox OS已死 + +作为安卓的开源替代品,Mozila的移动操作系统Firefox OS在这个月初慢性死亡。本打算在发展中国家售卖低至25美金的智能手机,可Firefox OS永远没有流行起来。我认为主要原因是它的硬件廉价,以及它缺少流行应用。 + +在十二月,[Mozilla宣布][13]其将停止开发Firefox OS, 并停止出售Firefox智能手机。 + +我认为[Tizen][14], Linux基金会旗下的基于Linux的移动操作系统,也已经消失了,尽管其从未发布过。我没有看到任何关于Tizen开发的消息,而且Linux基金会从未推动过它的开发。Tizen何时死亡只是一个时间问题。 + +#### “Ubuntu家族”内讧 + +今年五月,Jonathan Riddell,Kubuntu项目的领导者,[被Ubuntu社区委员会强制要求下台][15],这引起了很多激烈的讨论。Jonathan曾质问Ubuntu所收捐款的使用情况,他抱怨Kubuntu从未见到过这些钱。 + +这导致了两方的互相谴责。最终。Ubuntu的老爹,[Mark Shuttleworth要求Jonathan下台][16]。 + +#### 女性Linux内核开发者因“野蛮的沟通方式”而退出 + +Linux之父Linus Torvalds因其粗俗的语言而著称。Linux内核开发者[Sarah Sharp][17]也因为嘴快心直而著称。 + +Sarah Sharp曾在2013年与Linus Torvalds公开争执,[建议Linus将“语言暴力”赶出邮件列表][18]。Linus也没有[委婉地][19]回复她。 + +那是在2013年。2015年,Sarah宣布她正在[逐步停止她在内核社区的工作][20]因为他们的交流方式缺乏基本礼仪,并且野蛮而充满亵渎。 + +这一举动让人们开始讨论Linux内核社区是否真的应该改变他们的行为方式,还是Sarah做的太过分了。 + +#### Unity游戏编辑器移植到Linux平台 + +尽管[在Linux上玩游戏][21]认识Linux用户们的阿克琉斯之踵,整个社区在游戏引擎Unity宣布其正在测试[Linux下的游戏编辑器][22]时都沸腾了。因为在渲染图像时,Linux是一个最流行的选择,所以我们推测这将使游戏开发者向Linux靠拢。不过,Unity是否真的会推出一个最终版本的游戏编辑器,这个问题还未被证实。 + +#### 政府机构采用开源软件 + +欧洲数个城市的管理机构决定[抛弃先前的软件][23],并使用其开源的替代品。大多数城市管理机构将Microsoft Office替换为LibreOffice或OpenOffice. 一些城市管理机构和[公立学校][24]也跟进,将Microsoft Windows换成Linux. + +对于这一行为,削减成本是一个重要的因素,因为城市管理机构通过采用开源软件省下了无数欧元。 + +大学也并没有在采用开源软件的道路上落后。这一年,我们听到了[大学如何抛弃Photoshop改用Krita][25]以及[大学使用开源Office软件][26]的消息。 + +### 总结 + +与其他年一样,2015年同样有许多另Linux爱好者感到积极或消极的时刻。我们看到Linux的竞争者,如微软和苹果,向Linux靠拢,政府机构采用开源软件。同时,我们特见证了Firefox智能手机系统的失败。我想说,这真是喜忧参半的一年。 + +你认为呢?我希望你们分享你们所认为对于Linuxer们来说最重要的新闻,和你们对这一年的整体感受。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/biggest-linux-stories-2015/ + +作者:[Abhishek][a] + +译者:[ StdioA](https://github.com/StdioA) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://itsfoss.com/author/abhishek/ +[1]: http://www.theregister.co.uk/2015/09/18/microsoft_has_developed_its_own_linux_repeat_microsoft_has_developed_its_own_linux/ +[2]: http://arstechnica.com/information-technology/2015/09/microsoft-has-built-software-but-not-a-linux-distribution-for-its-software-switches/ +[3]: https://azure.microsoft.com/en-us/services/hdinsight/ +[4]: http://www.zdnet.com/article/microsoft-deploys-first-major-server-application-on-ubuntu-linux/ +[5]: http://itsfoss.com/install-visual-studio-code-ubuntu/ +[6]: http://itsfoss.com/swift-open-source-linux/ +[7]: http://itsfoss.com/use-swift-linux/ +[8]: https://business.facebook.com/itsfoss/photos/pb.115098615297581.-2207520000.1450817108./634288916711879/?type=3&theater +[9]: http://www.engadget.com/2015/07/24/ubuntu-phone-review/ +[10]: http://techcrunch.com/2015/11/20/jolla-running-out-of-runway-for-its-android-alternative/ +[11]: https://www.indiegogo.com/projects/jolla-tablet-world-s-first-crowdsourced-tablet#/ +[12]: https://blog.jolla.com/jolla-back-business/ +[13]: http://arstechnica.com/gadgets/2015/12/firefox-os-smartphones-are-dead/ +[14]: https://www.tizen.org/ +[15]: http://www.omgubuntu.co.uk/2015/05/kubuntu-project-lead-asked-to-step-down-by-ubuntu-community-council +[16]: http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html +[17]: http://sarah.thesharps.us/ +[18]: http://www.techeye.net/chips/linus-torvalds-and-intel-woman-in-sweary-spat +[19]: http://marc.info/?l=linux-kernel&m=137392506516022&w=2 +[20]: http://www.networkworld.com/article/2988850/opensource-subnet/linux-kernel-dev-sarah-sharp-quits-citing-brutal-communications-style.html +[21]: http://itsfoss.com/linux-gaming-guide/ +[22]: http://itsfoss.com/unity-gaming-engine-linux/ +[23]: http://itsfoss.com/tag/open-source-adoption/ +[24]: http://itsfoss.com/spanish-school-ditches-windows-ubuntu/ +[25]: http://itsfoss.com/french-university-dumps-adobe-photoshop-open-source-app-krita/ +[26]: http://itsfoss.com/hungarian-universities-switch-eurooffice/ From ecb5c53f050396236af94ce61b3eb43f18498ea1 Mon Sep 17 00:00:00 2001 From: Bian Jiaping Date: Tue, 29 Dec 2015 00:42:40 +0800 Subject: [PATCH 0715/1710] Translated 'How to Use Glances to Monitor System on Ubuntu' --- ...Use Glances to Monitor System on Ubuntu.md | 108 ----------------- ...Use Glances to Monitor System on Ubuntu.md | 109 ++++++++++++++++++ 2 files changed, 109 insertions(+), 108 deletions(-) delete mode 100644 sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md create mode 100644 translated/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md diff --git a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md b/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md deleted file mode 100644 index 8237aa4f25..0000000000 --- a/sources/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md +++ /dev/null @@ -1,108 +0,0 @@ -translating by bianjp - -How to Use Glances to Monitor System on Ubuntu -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/12/glances_featured.jpg) - -Glances is a cross-platform command-line text-based tool to monitor your system. It is written in Python language and uses the `psutil` library to get information from the system. Using it you can monitor CPU, Load Average, Memory, Network Interfaces, Disk I/O, File System spaces utilization, mounted devices, total number of active processes and top processes. There are many interesting options available in Glances. One of the main features is that you can set thresholds (careful, warning and critical) in a configuration file, and information will be shown in colors which indicates the bottleneck in the system. - -### Glances Features ### - -- the average CPU load -- total number of processes like active, sleeping processes, etc. -- total memory information like RAM, swap, free memory, etc. -- CPU information -- Network download and upload speed of connections -- Disk I/O read/write speed details -- Currently mounted devices’ disk usages -- Top processes with their CPU/memory usages - -### Installing Glances ### - -Installing Glances on Ubuntu is easy, as it is available on Ubuntu’s repository. You can install Glances by running the following command. - - sudo apt-get install glances - -### Usage of Glances ### - -After installation has been finished, you can launch Glances by running the following command: - - glances - -You will see an output like the following: - -![glances monitor system output](https://www.maketecheasier.com/assets/uploads/2015/12/glances_output1.png) - -Press ESC or “Ctrl + C” to quit from the Glances terminal. - -By default, the interval time is set to 1 second, but you can define the custom interval time while running glances from the terminal. - -To set the interval time to 5 seconds, run the following command: - - glances -t 5 - -### Glances Color Codes ### - -Glances color code meanings: - -- `GREEN` : OK -- `BLUE` : CAREFUL -- `VIOLET` : ALERT -- `RED` : CRITICAL - -By default, Glances thresholds set is: careful=50, warning=70, critical=90. You can customize the threshold by using the default configuration file glances.conf located at the “/etc/glances/” directory. - -### Glances Options ### - -Glances provides sever so hot keys to find output information while it is running. - -Below are the list of several hot keys. - -- `m` : sort processes by MEM% -- `p` : sort processes by name -- `c` : sort processes by CPU% -- `d` : show/hide disk I/O stats -- `a` : sort processes automatically -- `f` : show/hide file system statshddtemp -- `i` : sort processes by I/O rate -- `s` : show/hide sensors’ stats -- `y` : show/hide hddtemp stats -- `l` : show/hide logs -- `n` : show/hide network stats -- `x` : delete warning and critical logs -- `h` : show/hide help screen -- `q` : quit -- `w` : delete warning logs - -### Use Glances to Monitor Remote Systems ### - -You can also monitor remote systems using Glances. To use it on a remote system, use the following command: - - glances -s - -You will see an output like the following: - -![glances monitor remote system server](https://www.maketecheasier.com/assets/uploads/2015/12/glances_server.png) - -You will see Glances running on port 61209. - -Now, go to the remote machine and execute the following command to connect to a Glances server by specifying the IP address as shown below. For example, 192.168.1.10 is your Glances server IP address. - - glances -c -P 192.168.1.10 - -### Conclusion ### - -Glances is a very useful tool for every Linux system administrator. Using it, you can easily monitor your Linux system in less time. Feel free to comment if you have any questions. - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/glances-monitor-system-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/ - diff --git a/translated/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md b/translated/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md new file mode 100644 index 0000000000..46541196a6 --- /dev/null +++ b/translated/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md @@ -0,0 +1,109 @@ +如何在 Ubuntu 上使用 Glances 监控系统 +================================================================================ + +![](https://www.maketecheasier.com/assets/uploads/2015/12/glances_featured.jpg) + +Glances 是一个跨平台、基于命令行、文本模式的系统监控工具。它是用 Python 编写的,使用 `psutil` 库从系统获取信息。你可以用它来监控 CPU、平均负载、内存、网络接口、磁盘 I/O,文件系统空间利用率、挂载的设备、所有活动进程以及消耗资源最多的进程。Glances 有很多有趣的选项。它的主要特性之一是可以在配置文件中设置阀值(careful[小心]、warning[警告]、critical[致命]),然后它会用不同颜色显示信息以表明系统的瓶颈。 + +### Glances 的功能 + +- CPU 平均负载 +- 不同状态(如活动、休眠)进程的数量 +- 所有内存信息,如物理内存、交换空间、空闲内存 +- CPU 信息 +- 网络连接的上行/下行速度 +- 磁盘 I/O 读/写速度详细信息 +- 当前挂载设备的磁盘使用情况 +- 消耗资源最多的进程和他们的 CPU/内存使用情况 + +### 安装 Glances + +Glances 在 Ubuntu 的软件源中,所以安装很简单。执行下面的命令安装 Glances: + + sudo apt-get install glances + +(LCTT 译注:若安装后无法正常使用,可考虑使用 pip 安装/升级glances:`sudo pip install --upgrade glances`) + +### Glances 使用方法 + +安装完成后,可以执行下面的命令启动 Glances: + + glances + +你将看到类似下图的输出: + +![glances monitor system output](https://www.maketecheasier.com/assets/uploads/2015/12/glances_output1.png) + +要退出 Glances 终端,按 ESC 键或 “Ctrl + C”。 + +默认情况下,时间间隔(LCTT 译注:显示数据刷新的时间间隔)是 1s,不过你可以在从终端启动 Glances 时自定义时间间隔。 + +要把时间间隔设为 5s,执行下面的命令: + + glances -t 5 + +### Glances 中不同颜色含义 + +Glances 中不同颜色的含义: + +- `绿色`:正常 +- `蓝色`:需要注意 +- `紫色`:警告 +- `红色`:严重 + +默认设置下,Glances 的阀值设置是:careful=50,warning=70,critical=90。你可以通过 “/etc/glances/” 目录下的默认配置文件 glances.conf 来自定义这些阀值。 + +### Glances 的选项 + +Glances 提供了很多快捷键,可以在它运行时用来查找输出信息。 + +下面是一些常用的热键列表: + +- `m` : 按内存占用排序进程 +- `p` : 按进程名称排序进程 +- `c` : 按 CPU 占用率排序进程 +- `i` : 按 I/O 频率排序进程 +- `a` : 自动排序进程 +- `d` : 显示/隐藏磁盘 I/O 统计信息 +- `f` : 显示/隐藏文件系统统计信息 +- `s` : 显示/隐藏传感器统计信息 +- `y` : 显示/隐藏硬盘温度统计信息 +- `l` : 显示/隐藏日志 +- `n` : 显示/隐藏网络统计信息 +- `x` : 删除警告和严重日志 +- `h` : 显示/隐藏帮助界面 +- `q` : 退出 +- `w` : 删除警告记录 + +### 使用 Glances 监控远程系统 + +你也可以使用 Glances 监控远程系统。要在远程系统上使用它,使用下面的命令: + + glances -s + +你会看到类似下面的输出: + +![glances monitor remote system server](https://www.maketecheasier.com/assets/uploads/2015/12/glances_server.png) + +如你所见,Glances 运行在 61209 端口。 + +现在,到远程机器上执行下面的命令以连接到指定 IP 地址的 Glances 服务器上。假设 192.168.1.10 是你的 Glances 服务器 IP 地址。 + + glances -c -P 192.168.1.10 + +### 结论 + +对于每个 Linux 系统管理员来说,Glances 都是一个非常有用的工具。使用它,你可以轻松、高效地监控 Linux 系统。如果你有什么问题,自由地评论吧。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/glances-monitor-system-ubuntu/ + +作者:[Hitesh Jethva][a] +译者:[bianjp](https://github.com/bianjp) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/hiteshjethva/ + From 708a5ed930f0099d80981c58d39c3669dc366884 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 29 Dec 2015 10:39:54 +0800 Subject: [PATCH 0716/1710] =?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 --- ...P Framework on CentOS 7 or Ubuntu 15.04.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md index 431bd652a7..fe8da81be3 100644 --- a/translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md +++ b/translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md @@ -1,13 +1,13 @@ -如何在 CentOS 7 / Ubuntu 15.04 上安装 PHP 框架 Framework +如何在 CentOS 7 / Ubuntu 15.04 上安装 PHP 框架 Laravel ================================================================================ -大家好,这篇文章将要讲述如何在 CentOS 7 / Ubuntu 15.04 上安装 PHP 框架 Laravel。如果你是一个 PHP Web 的开发者,你并不需要关心各种琳琅满目的现代 PHP 框架,Laravel 是最易用同时也是最能节省你时间的一个框架,能让你享受到 web 开发的乐趣。一个好的框架能让你在简单的使用指导下能快速开发出最核心的代码,Laravel 拥抱这一普世的开发哲学。你能抱持很高的开发效率并且无痛重构你现有的代码。 +大家好,这篇文章将要讲述如何在 CentOS 7 / Ubuntu 15.04 上安装 Laravel。如果你是一个 PHP Web 的开发者,你并不需要关心各种琳琅满目的现代 PHP 框架,Laravel 是最轻松启动和运行的,它省时省力,能让你享受到 web 开发的乐趣。Laravel 信奉着一个普世的开发哲学,作为一个好的框架它为你提供了高度优先权,让你在简单的使用指导下创建出可维护代码,你应该保持着高速的开发效率,能够随时毫不畏惧更改你的代码来打破现有功能。 -Laravel 安装极其容易,你只要跟着本文章一步步操作就能在 CentOS 7 或者 Ubuntu 15 服务器上安装。 +Laravel 安装并不繁琐,你只要跟着本文章一步步操作就能在 CentOS 7 或者 Ubuntu 15 服务器上安装。 ### 1) 服务器要求 ### -在安装 Laravel 前需要安装一些它的依赖和先决条件,这些包括升级系统到最新版本,sudo 权限,和安装依赖包。 +在安装 Laravel 前需要安装一些它的依赖前提条件,主要是一些基本的参数调整,比如升级系统到最新版本,sudo 权限和安装依赖包。 当你连接到你的服务器时,请确保你能通以下命令能成功的使用 EPEL 仓库并且升级你的服务器。 @@ -37,15 +37,15 @@ Laravel 安装极其容易,你只要跟着本文章一步步操作就能在 Ce # apt-get install -y php5 mcrypt php5-mcrypt php5-gd -### 2) Firewall Setup ### +### 2) 防火墙安装 ### -系统防火墙和 SELinux 设置对于用于生产的服务器安全来说非常重要,你可以关闭防火墙和用以下命令行设置 SELinux 成宽容模式(permissive)模式来保证安装程序不受他们的影响。 +系统防火墙和 SELinux 设置对于用于产品应用安全来说非常重要,当你使用测试服务器的时候可以关闭防火墙,用以下命令行设置 SELinux 成宽容模式(permissive)模式来保证安装程序不受它们的影响。 # setenforce 0 -### 3) Apache, MariaDB, PHP Setup ### +### 3) Apache, MariaDB, PHP 安装 ### -Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 OpenSSL, PDO, Mbstring 和 Tokenizer PHP Extensions。如果 LAMP 已经运行在你的服务器上你可以跳过这部,但是需要注意一些必要的 PHP 插件是否安装好。 +Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 OpenSSL、PDO,Mbstring 和 Tokenizer PHP Extensions。如果 LAMP 已经运行在你的服务器上你可以跳过这一步,直接确认一些必要的 PHP 插件是否安装好。 要安装完整 AMP 你需要在自己的服务器上运行以下命令。 @@ -53,7 +53,7 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op # yum install httpd mariadb-server php56w php56w-mysql php56w-mcrypt php56w-dom php56w-mbstring -要在 CentOS 7 上实现 MySQL / Mariadb 服务开机自动启动,你需要运行以下命令 +要在 CentOS 7 上实现 MySQL / Mariadb 服务开机自动启动,你需要运行以下命令。 # systemctl start httpd # systemctl enable httpd @@ -63,7 +63,7 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op #systemctl start mysqld #systemctl enable mysqld -在启动 MariaDB 服务之后,你需要运行以下命令配置一个足够安全的密码 +在启动 MariaDB 服务之后,你需要运行以下命令配置一个足够安全的密码。 #mysql_secure_installation @@ -77,7 +77,7 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op #### CentOS/Ubuntu #### -在 CentOS / Ubuntu 下运行以下命令来配置 composer +在 CentOS / Ubuntu 下运行以下命令来配置 composer 。 # curl -sS https://getcomposer.org/installer | php # mv composer.phar /usr/local/bin/composer @@ -85,13 +85,13 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op ![composer installation](http://blog.linoxide.com/wp-content/uploads/2015/11/14.png) -### 5) Installing Laravel ### +### 5) 安装 Laravel ### -我们可以运行以下命令从 github 上下载 Laravel 的安装包 +我们可以运行以下命令从 github 上下载 Laravel 的安装包。 # wget https://github.com/laravel/laravel/archive/develop.zip -运行以下命令解压安装包并且移动 document 的根目录 +运行以下命令解压安装包并且移动 document 的根目录。 # unzip develop.zip @@ -99,22 +99,22 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op # mv laravel-develop /var/www/ -现在使用 compose 命令来安装目录下所有 Laravel 所需要的依赖 +现在使用 compose 命令来安装目录下所有 Laravel 所需要的依赖。 # cd /var/www/laravel-develop/ # composer install ![compose laravel](http://blog.linoxide.com/wp-content/uploads/2015/11/25.png) -### 6) Key Encryption ### +### 6) 密钥 ### -为了加密服务器,我们使用以下命令来生成一个加密后的 32 位的密钥 +为了加密服务器,我们使用以下命令来生成一个加密后的 32 位的密钥。 # php artisan key:generate Application key [Lf54qK56s3qDh0ywgf9JdRxO2N0oV9qI] set successfully -现在把这个密钥放到 'app.php' 文件,如以下所示 +现在把这个密钥放到 'app.php' 文件,如以下所示。 # vim /var/www/laravel-develop/config/app.php @@ -122,7 +122,7 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op ### 7) 虚拟 Host 和 所属用户 ### -在 composer 安装好后,分配 document 根目录的权限和所属用户,如下所示 +在 composer 安装好后,分配 document 根目录的权限和所属用户,如下所示。 # chmod 775 /var/www/laravel-develop/app/storage @@ -130,7 +130,7 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op # chown -R apache:apache /var/www/laravel-develop -用任意一款编辑器打开 apache 服务器的默认配置文件,在文件最后加上虚拟 host 入口 +用任意一款编辑器打开 apache 服务器的默认配置文件,在文件最后加上虚拟 host 入口。 # vim /etc/httpd/conf/httpd.conf @@ -143,7 +143,7 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op AllowOverride All Directory close -现在我们用以下命令重启 apache 服务器,打开浏览器查看 localhost 页面 +现在我们用以下命令重启 apache 服务器,打开浏览器查看 localhost 页面。 #### CentOS #### @@ -153,15 +153,15 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op # service apache2 restart -### 8) Laravel 5 Web Access ### +### 8) Laravel 5 网络访问 ### -打开浏览器然后输入你的配置的 IP 地址或者绝对域名(to 校对:「绝对域名」译自 https://zh.wikipedia.org/wiki/%E5%AE%8C%E6%95%B4%E7%B6%B2%E5%9F%9F%E5%90%8D%E7%A8%B1#cite_note-1)你将会看到 Laravel 5 的默认页面 +打开浏览器然后输入你配置的 IP 地址或者绝对域名(Fully qualified domain name)你将会看到 Laravel 5 的默认页面。 ![Laravel Default](http://blog.linoxide.com/wp-content/uploads/2015/11/35.png) -### 结论 ### +### 总结 ### -Laravel 框架对于开发网页应用来说是一个绝好的的工具。所以,看了这篇文章你将学会在 Ubuntu 15 和 CentOS 7 上安装 Laravel 之后你就能开始使用这超棒的框架提供的各种功能来舒服的来进行你的开发工作。如果你有什么意见或者建议请发表在评论内容上,我们将根据您宝贵的反馈来使我们的文章更加浅显易懂。 +Laravel 框架对于开发网页应用来说是一个绝好的的工具。所以,看了这篇文章你将学会在 Ubuntu 15 和 CentOS 7 上安装 Laravel, 之后你就可以使用这个超棒的PHP框架提供的各种功能和舒适便捷性来进行你的开发工作。如果您有什么意见或者建议请在以下评论区中回复,我们将根据您宝贵的反馈来使我们的文章更加浅显易懂。 -------------------------------------------------------------------------------- @@ -169,7 +169,7 @@ via: http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-15-04/ 作者:[Kashif][a] 译者:[NearTan](https://github.com/NearTan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5783a8754c8725ab98617a65ab722869be68d171 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 29 Dec 2015 14:24:32 +0800 Subject: [PATCH 0717/1710] PUB:20151130 eSpeak--Text To Speech Tool For Linux @soooogreen --- ...0 eSpeak--Text To Speech Tool For Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/share => published}/20151130 eSpeak--Text To Speech Tool For Linux.md (70%) diff --git a/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md b/published/20151130 eSpeak--Text To Speech Tool For Linux.md similarity index 70% rename from translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md rename to published/20151130 eSpeak--Text To Speech Tool For Linux.md index f4ec1f20e1..e968be847b 100644 --- a/translated/share/20151130 eSpeak--Text To Speech Tool For Linux.md +++ b/published/20151130 eSpeak--Text To Speech Tool For Linux.md @@ -11,34 +11,34 @@ eSpeak 部分主要特性如下: - 提供给 Linux 和 Windows 的命令行工具 - 从文件或者标准输入中把文本读出来 - 提供给其它程序使用的共享库版本 -- 为 Windows 提供SAPI5版本,在screen-readers或者其它支持Windows SAPI5接口程序的支持下,eSpeak仍然能正常使用 +- 为 Windows 提供 SAPI5 版本,所以它能用于 screen-readers 或者其它支持 Windows SAPI5 接口的程序 - 可移植到其它平台,包括安卓,OSX等 - 提供多种声音特性选择 -- 语音输出可保存为[.WAV][2]格式的文件 -- 部分SSML([Speech Synthesis Markup Language][3]语音合成标记语言)能为HTML所支持 +- 语音输出可保存为 [.WAV][2] 格式的文件 +- 配合 HTML 部分可支持 SSML(语音合成标记语言,[Speech Synthesis Markup Language][3]) - 体积小巧,整个程序连同语言支持等占用小于2MB -- 可以实现文本到音素编码的转化,因此能适应成为其它语音合成引擎的前端工具 +- 可以实现文本到音素编码(phoneme code)的转化,因此可以作为其它语音合成引擎的前端工具 - 开发工具可用于生产和调整音素数据 -### 安装eSpeak ### +### 安装 eSpeak ### -基于Ubuntu的系统中,在终端运行以下命令安装eSpeak: +基于 Ubuntu 的系统中,在终端运行以下命令安装 eSpeak: sudo apt-get install espeak eSpeak 是一个古老的工具,我推测它应该能在其它众多 Linux 发行版中运行,比如 Arch,Fedora。使用 dnf,pacman 等命令就能轻松安装。 -eSpeak 用法如下:输入 espeak 按 enter 键运行程序。输入字符按 enter 转换为语音输出(译补)。使用 Ctrl+C 来关闭运行中的程序。 +eSpeak 用法如下:输入 espeak 运行程序。输入字符按 enter 转换为语音输出(LCTT 译注:补充)。使用 Ctrl+C 来关闭运行中的程序。 ![eSpeak command line](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-example.png) 还有一些其他的选项可用,可以通过程序帮助进行查看。 -### GUI版本:Gespeaker ### +### GUI 版本:Gespeaker ### 如果你更倾向于使用 GUI 版本,可以安装 Gespeaker,它为 eSpeak 提供了 GTK 界面。 -使用以下命令来安装Gespeaker: +使用以下命令来安装 Gespeaker: sudo apt-get install gespeaker @@ -46,7 +46,7 @@ eSpeak 用法如下:输入 espeak 按 enter 键运行程序。输入字符按 ![eSpeak GUI tool for text to speech in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/eSpeak-GUI.png) -虽然这些工具不能为大部分计算所用,但是当你的项目需要把文本转换成语音时,使用 espeak 还是挺方便的。是否使用 espeak 这款语音合成器,选择权就交给你们啦。 +虽然这些工具在大多数计算任务下用不到,但是当你的项目需要把文本转换成语音时,使用 espeak 还是挺方便的。是否使用 espeak 这款语音合成器,选择权就交给你们啦。 -------------------------------------------------------------------------------- From 9ef158ab5819ff7341f8575ad4d5fbf6da5a15b4 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 29 Dec 2015 14:25:01 +0800 Subject: [PATCH 0718/1710] PUB:20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7 @ictlyh --- ...roid Studio on Ubuntu 15.04 or CentOS 7.md | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) rename {translated/tech => published}/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md (83%) diff --git a/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/published/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md similarity index 83% rename from translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md rename to published/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md index 00bde27e78..c851ce0da2 100644 --- a/translated/tech/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md +++ b/published/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md @@ -1,19 +1,17 @@ 如何在 Ubuntu 15.04 / CentOS 7 上安装 Android Studio ================================================================================ -随着最近几年智能手机的进步,安卓成为了最大的手机平台之一,所有用于开发安卓应用的工具都是免费提供。Android Studio 是基于 [IntelliJ IDEA][1] 用于开发安卓应用的集成开发环境(IDE)。它是 Google 2014 年发布的免费开源软件,继 Eclipse 之后成为主要的 IDE。 +随着最近几年智能手机的进步,安卓成为了最大的手机平台之一,在开发安卓应用中所用到的所有工具也都可以免费得到。Android Studio 是基于 [IntelliJ IDEA][1] 用于开发安卓应用的集成开发环境(IDE)。它是 Google 2014 年发布的免费开源软件,继 Eclipse 之后成为主要的 IDE。 在这篇文章,我们一起来学习如何在 Ubuntu 15.04 和 CentOS 7 上安装 Android Studio。 ### 在 Ubuntu 15.04 上安装 ### -我们可以用两种方式安装 Android Studio。第一种是配置必须的库然后再安装它;另一种是从 Android 官方网站下载然后在本地编译安装。在下面的例子中,我们会使用命令行设置库并安装它。在继续下一步之前,我们需要确保我们已经安装了 JDK 1.6 或者更新版本。 +我们可以用两种方式安装 Android Studio。第一种是配置所需的库然后再安装它;另一种是从 Android 官方网站下载然后在本地编译安装。在下面的例子中,我们会使用命令行设置库并安装它。在继续下一步之前,我们需要确保我们已经安装了 JDK 1.6 或者更新版本。 这里,我打算安装 JDK 1.8。 $ sudo add-apt-repository ppa:webupd8team/java - $ sudo apt-get update - $ sudo apt-get install oracle-java8-installer oracle-java8-set-default 验证 java 是否安装成功: @@ -27,7 +25,6 @@ ![Android-Studio-repo](http://blog.linoxide.com/wp-content/uploads/2015/11/Android-studio-repo.png) $ sudo apt-get update - $ sudo apt-get install android-studio 上面的安装命令会在 /opt 目录下面安装 Android Studio。 @@ -48,7 +45,7 @@ ![下载组件](http://blog.linoxide.com/wp-content/uploads/2015/11/Download.png) -这一步之后就完成了 Android Studio 的安装。当你重启 Android Studio 时,你会看到下面的欢迎界面,从这里你可以开始用 Android Studio 工作了。 +这一步完成之后就结束了 Android Studio 的安装。当你重启 Android Studio 时,你会看到下面的欢迎界面,从这里你可以开始用 Android Studio 工作了。 ![欢迎界面](http://blog.linoxide.com/wp-content/uploads/2015/11/Welcome-screen.png) @@ -85,21 +82,14 @@ 如果你安装 Android Studio 的时候看到任何类似 “unable-to-run-mksdcard-sdk-tool:” 的错误信息,你可能要在 CentOS 7 64 位系统中安装以下软件包: - glibc.i686 - - glibc-devel.i686 - - libstdc++.i686 - - zlib-devel.i686 - - ncurses-devel.i686 - - libX11-devel.i686 - - libXrender.i686 - - libXrandr.i686 + - glibc.i686 + - glibc-devel.i686 + - libstdc++.i686 + - zlib-devel.i686 + - ncurses-devel.i686 + - libX11-devel.i686 + - libXrender.i686 + - libXrandr.i686 通过从 [Android 网站][3] 下载 IDE 文件然后解压安装 studio 也是一样的。 @@ -121,7 +111,7 @@ ### 总结 ### -虽然发布不到一年,但是 Android Studio 已经替代 Eclipse 成为了Android开发最主要的 IDE。它是唯一能支持 Google 之后将要提供的 Android SDKs 和其它 Android 特性的官方 IDE 工具。那么,你还在等什么呢?赶快安装 Android Studio 来体验开发 Android 应用的乐趣吧。 +虽然发布不到一年,但是 Android Studio 已经替代 Eclipse 成为了 Android 的开发最主要的 IDE。它是唯一能支持 Google 之后将要提供的 Android SDK 和其它 Android 特性的官方 IDE 工具。那么,你还在等什么呢?赶快安装 Android Studio 来体验开发 Android 应用的乐趣吧。 -------------------------------------------------------------------------------- From 9b3224321aa688ab71f1e5392dc17ca68babe2ec Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Tue, 29 Dec 2015 14:35:12 +0800 Subject: [PATCH 0719/1710] [translated] 20151206 NetworkManager and privacy in the IPv6 internet.md --- .../20151206 NetworkManager and privacy in the IPv6 internet.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md index fb2eaa5af7..cfd203da33 100644 --- a/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md +++ b/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md @@ -3,7 +3,6 @@ IPv6因特网中的隐私保护和网络管理器 IPv6的使用量正在不断增加,让我们始料未及的是,伴随这个协议不断增加的使用量,大量隐私问题涌现出来。互联网社区在积极发表相关解决方案,当前状况是怎样的呢?网络管理器又是如何跟上的呢?让我们来瞧瞧吧! - ![](https://blogs.gnome.org/lkundrak/files/2015/12/cameras1.jpg) ## 通过IPv6方式连接的主机的特性 From ff16b906c4753b24f6831fd819bc02f27cd1f558 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 29 Dec 2015 14:47:47 +0800 Subject: [PATCH 0720/1710] PUB:20151123 How to access Dropbox from the command line in Linux @FSSlc --- ...1123 How to access Dropbox from the command line in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20151123 How to access Dropbox from the command line in Linux.md (95%) diff --git a/translated/tech/20151123 How to access Dropbox from the command line in Linux.md b/published/20151123 How to access Dropbox from the command line in Linux.md similarity index 95% rename from translated/tech/20151123 How to access Dropbox from the command line in Linux.md rename to published/20151123 How to access Dropbox from the command line in Linux.md index 9f9d1fd5ed..3c452ac4f6 100644 --- a/translated/tech/20151123 How to access Dropbox from the command line in Linux.md +++ b/published/20151123 How to access Dropbox from the command line in Linux.md @@ -2,7 +2,7 @@ Linux 中如何通过命令行访问 Dropbox ================================================================================ 在当今这个多设备的环境下,云存储无处不在。无论身处何方,人们都想通过多种设备来从云存储中获取所需的内容。由于拥有漂亮的 UI 和完美的跨平台兼容性,Dropbox 已成为最为广泛使用的云存储服务。 Dropbox 的流行已引发了一系列官方或非官方 Dropbox 客户端的出现,它们支持不同的操作系统平台。 -当然 Linux 平台下也有着自己的 Dropbox 客户端: 既有命令行的,也有图形界面客户端。[Dropbox Uploader][1] 是一个简单易用的 Dropbox 命令行客户端,它是用 BASH 脚本语言所编写的。在这篇教程中,我将描述 **在 Linux 中如何使用 Dropbox Uploader 通过命令行来访问 Dropbox**。 +当然 Linux 平台下也有着自己的 Dropbox 客户端: 既有命令行的,也有图形界面客户端。[Dropbox Uploader][1] 是一个简单易用的 Dropbox 命令行客户端,它是用 Bash 脚本语言所编写的(LCTT 译注:对,你没看错, 就是 Bash)。在这篇教程中,我将描述 **在 Linux 中如何使用 Dropbox Uploader 通过命令行来访问 Dropbox**。 ### Linux 中安装和配置 Dropbox Uploader ### From 10e947a980a3b4a40815d51eff17c020259ac66d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 29 Dec 2015 15:31:05 +0800 Subject: [PATCH 0721/1710] =?UTF-8?q?20151229-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...51229 Watch Star Wars In Linux Terminal.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sources/tech/20151229 Watch Star Wars In Linux Terminal.md diff --git a/sources/tech/20151229 Watch Star Wars In Linux Terminal.md b/sources/tech/20151229 Watch Star Wars In Linux Terminal.md new file mode 100644 index 0000000000..45c5a917ec --- /dev/null +++ b/sources/tech/20151229 Watch Star Wars In Linux Terminal.md @@ -0,0 +1,53 @@ +Watch Star Wars In Linux Terminal +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) + +Star Wars fever has gripped the world. The latest installment in the [Star Wars series, Star Wars: The Force Awakens, has broken the opening records][1]. + +While I cannot help you to get a ticket of the latest Star Wars movie, I can certainly provide you a way to watch [Star Wars episode IV][2], the original and very first Star Wars movie. + +No, it won’t be HD, Blue Ray edition. Instead, it will be the ASCII version of Star Wars episode IV and you can watch it in Linux Terminal, in true geek way :) + +### Watch Star Wars in Linux Terminal ### + +Open a terminal and use the following command: + + telnet towel.blinkenlights.nl + +Wait for a few seconds and you can see animated ASCII art in the terminal like this: + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal.png) + +And it will keep on going: + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-1.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-3.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-5.png) + +To stop the animation, press ctrl+]. After that type quit to come out of telnet command. + +### More terminal fun ### + +In fact, watching Star Wars is not the only fun thing you can do in Linux terminal. You can run a [train in terminal][3] or [get Linux logo in ASCII art][4]. + +I let you enjoy Star Wars in Linux :) + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/star-wars-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.gamespot.com/articles/star-wars-7-breaks-thursday-night-movie-opening-re/1100-6433246/ +[2]:http://www.imdb.com/title/tt0076759/ +[3]:http://itsfoss.com/ubuntu-terminal-train/ +[4]:http://itsfoss.com/display-linux-logo-in-ascii/ From af2238e609250c09210b747f7ea4a9e2d0576708 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 29 Dec 2015 15:42:41 +0800 Subject: [PATCH 0722/1710] =?UTF-8?q?20151129-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20151229 Grub 2--Heal your bootloader.md | 235 ++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 sources/tech/20151229 Grub 2--Heal your bootloader.md diff --git a/sources/tech/20151229 Grub 2--Heal your bootloader.md b/sources/tech/20151229 Grub 2--Heal your bootloader.md new file mode 100644 index 0000000000..062c2361d2 --- /dev/null +++ b/sources/tech/20151229 Grub 2--Heal your bootloader.md @@ -0,0 +1,235 @@ +Grub 2: Heal your bootloader +================================================================================ +**There are few things as irritating as a broken bootloader. Get the best out of Grub 2 and keep it shipshape.** + +Why do this? + +- Grub 2 is the most popular bootloader that’s used by almost every Linux distribution. +- A bootloader is a vital piece of software, but they are susceptible to damage. +- Grub 2 is an expansive and flexible boot loader that offers various customisable options. + +The Grub 2 Linux bootloader is a wonderful and versatile piece of software. While it isn’t the only bootloader out there, it’s the most popular and almost all the leading desktop distros use it. The job of the Grub bootloader is twofold. First, it displays a menu of all installed operating systems on a computer and invites you to pick one. Second, Grub loads the Linux kernel if you choose a Linux operating system from the boot menu. + +As you can see, if you use Linux, you can’t escape the bootloader. Yet it’s one the least understood components inside a Linux distro. In this tutorial we’ll familiarise you with some of Grub 2’s famed versatility and equip you with the skills to help yourself when you have a misbehaving bootloader. + +The most important parts of Grub 2 are a bunch of text files and a couple of scripts. The first piece to know is **/etc/default/grub**. This is the text file in which you can set the general configuration variables and other characteristics of the Grub 2 menu (see box titled “Common user settings”). + +The other important aspect of Grub 2 is the **/etc/grub.d** folder. All the scripts that define each menu entry are housed there. The names of these scripts must have a two-digit numeric prefix. Its purpose is to define the order in which the scripts are executed and the order of the corresponding entries when the Grub 2 menu is built. The **00_header** file is read first, which parses the **/etc/default/grub** configuration file. Then come the entries for the Linux kernels in the **10_linux** file. This script creates one regular and one recovery menu entry for each kernel in the default **/boot** partition. + +This script is followed by others for third-party apps such as **30_os-prober** and **40_custom**. The **os-prober** script creates entries for kernels and other operating systems found on other partitions. It can recognise Linux, Windows, BSD and Mac OS X installations. If your hard disk layout is too exotic for the **os-prober** script to pick up an installed distro, you can add it to the **40_custom** file (see the “Add custom entries” box). + +**Grub** 2 does not require you to manually maintain your boot options’ configuration file: instead it generates the **/boot/grub/grub.cfg** file with the **grub2-mkconfig** command. This utility will parse the scripts in the **/etc/grub.d** directory and the **/etc/default/grub** settings file to define your setup. + +Graphical boot repair + +A vast majority of Grub 2 issues can easily be resolved with the touch of a button thanks to the Boot Repair app. This nifty little application has an intuitive user interface and can scan and comprehend various kinds of disk layouts and partitioning schemes, and can sniff out and correctly identify operating system installations inside them. The utility works on traditional computers with a Master Boot Record (MBR) as well as the newer UEFI computers with the UID Partition Table (GPT) layout. + +The easiest way to use Boot Repair is to install it inside a Live Ubuntu session. Fire up an Ubuntu Live distro on a machine with a broken bootloader and install Boot Repair by first adding its PPA repository with + + sudo add-apt-repository ppa:yannubuntu/Boot Repair + +Then refresh the list of repositories with + + sudo apt-get update + +before installing the app with + + sudo apt-get install -y Boot Repair + +Fire up the tool once it’s installed. The app will scan your hard disk before displaying its interface, which is made up of a couple of buttons. To follow the advice of the tool, simply press the Recommended Repair button, which should fix most broken bootloaders. After it’s restored your bootloader, the tool also spits out a small URL which you should note. The URL contains a detailed summary of your disks, including your partitions along with the contents of important Grub 2 files including **/etc/default/grub** and **boot/grub/grub.cfg**. If the tool hasn’t been able to fix your bootloader, you can share the URL on your distro’s forum boards to allow others to understand your disk layout and offer suggestions. + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/boot-repair-large.jpg) + +**Boot Repair also lets you customise Grub 2’s options.** + +#### Bootloader bailout #### + +Grub 2 boot problems can leave the system in several states. The text on the display where you’d expect the bootloader menu gives an indication of the current state of the system. If the system stops booting at the **grub>** prompt, it means the Grub 2 modules were loaded but it couldn’t find the **grub.cfg** file. This is the full Grub 2 command shell and you can do quite a bit here to help yourself. If you see the **grub rescue>** prompt, it means that the bootloader couldn’t find the Grub 2 modules nor could it find any of your boot files. However, if your screen just displays the word ‘GRUB’, it means the bootloader has failed to find even the most basic information that’s usually contained in the Master Boot Record. + +You can correct these Grub failures either by using a live CD or from Grub 2’s command shell. If you’re lucky and your bootloader drops you at the **grub>** prompt, you have the power of the Grub 2 shell at your disposal to correct any errors. + +The next few commands work with both **grub>** and **grub rescue>**. The **set pager=1** command invokes the pager, which prevents text from scrolling off the screen. You can also use the **ls** command which lists all partitions that Grub sees, like this: + + grub> ls + (hd0) (hd0,msdos5) (hd0,msdos6) (hd1,msdos1) + +As you can see, the command also lists the partition table scheme along with the partitions. + +You can also use the **ls** command on each partition to find your root filesystem: + + grub> ls (hd0,5)/ + lost+found/ var/ etc/ media/ bin/ initrd.gz + boot/ dev/ home/ selinux/ srv/ tmp/ vmlinuz + +You can drop the **msdos** bit from the name of the partition. Also, if you miss the trailing slash and instead say **ls (hd0,5)** you’ll get information about the partition including its filesystem type, total size, and last modification time. If you have multiple partitions, read the contents of the **/etc/issue** file with the **cat** command to identify the distro, such as **cat (hd0,5)/etc/issue**. + +Assuming you find the root filesystem you’re looking for inside **(hd0,5)**, make sure that it contains the /**boot/grub** directory and the Linux kernel image you wish to boot into, such as **vmlinuz-3.13.0-24-generic**. Now type the following: + + grub> set root=(hd0,5) + grub> linux /boot/vmlinuz-3.13.0-24-generic root=/dev/sda5 + grub> initrd /boot/initrd.img-3.13.0-24-generic + +The first command points Grub to the partition housing the distro we wish to boot into. The second command then tells Grub the location of the kernel image inside the partition as well as the location of the root filesystem. The final line sets the location of the initial ramdisk file. You can use tab autocompletion to fill in the name of the kernel and the initrd, which will save you a lot of time and effort. + +Once you’ve keyed these in, type **boot** at the next **grub>** prompt and Grub will boot into the specified operating system. + +Things are a little different if you’re at the **grub rescue>** prompt. Since the bootloader hasn’t been able to find and load any of the required modules, you’ll have to insert them manually: + + grub rescue> set root=(hd0,5) + grub rescue> insmod (hd0,5)/boot/grub/normal.mod + grub rescue> normal + grub> insmod linux + +As you can see, just like before, after we use the **ls** command to hunt down the Linux partition, we mark it with the **set** command. We then insert the **normal** module, which when activated will return us to the standard **grub>** mode. The next command then inserts the linux module in case it hasn’t been loaded. Once this module has been loaded you can proceed to point the boot loader to the kernel image and initrd files just as before and round off the procedure with the **boot** command to bring up the distro. + +Once you’ve successfully booted into the distro, don’t forget to regenerate a new configuration file for Grub with the + + grub-mkconfig -o /boot/grub/grub.cfg + +command. You’ll also have to install a copy of the bootloader into the MBR with the + + sudo grub2-install /dev/sda + +command. + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cfg-large.jpg) + +**To disable a script under the /etc/grub.d, all you need to do is remove the executable bit, for example with chmod -x /etc/grub.d/20_memtest86+ which will remove the ‘Memory Test’ option from the menu.** + +### Grub 2 and UEFI ### + +UEFI-enabled machines (more or less, any machine sold in the last couple of years) have added another layer of complexity to debugging a broken **Grub 2** bootloader. While the procedure for restoring a **Grub 2** install on a UEFI machine isn’t much different than it is on a non-UEFI machine, the newer firmware handles things differently, which results in mixed restoration results. + +On a UEFI-based system, you do not install anything in the MBR. Instead you install a Linux EFI bootloader in the EFI System Partition (ESP) and set it as the EFI’s default boot program using a tool such as **efibootmgr** for Linux, or **bcdedit** for Windows. + +As things stand now, the Grub 2 bootloader should be installed properly when installing any major desktop Linux distro, which will happily coexist with Windows 8. However, if you end up with a broken bootloader, you can restore the machine with a live distro. When you boot the live medium, make sure you boot it in the UEFI mode. The computer’s boot menu will have two boot options for each removable drive – a vanilla option and an option tagged with UEFI. Use the latter to expose the EFI variables in **/sys/firmware/efi/**. + +From the live environment, mount the root filesystem of the broken installation as mentioned in the tutorial. You’ll also have to mount the ESP partition. Assuming it’s **/dev/sda1**, you can mount it with + + sudo mount /dev/sda1 /mnt/boot/efi + +Then load the **efivars** module with **modprobe efivars** before chrooting into the installed distribution as shown in the tutorial. + +Here on, if you’re using Fedora, reinstall the bootloader with the + + yum reinstall grub2-efi shim + +command followed by + + grub2-mkconfig -o /boot/grub2/grub.cfg + +to generate the new configuration file. Ubuntu users can do this with + + apt-get install --reinstall grub-efi-amd64 + +With the bootloader in place, exit chroot, unmount all partitions and reboot to the Grub 2 menu. + +#### Dude, where’s my Grub? #### + +The best thing about Grub 2 is that you can reinstall it whenever you want. So if you lose the Grub 2 bootloader, say when another OS like Windows replaces it with its own bootloader, you can restore Grub within a few steps with the help of a live distro. Assuming you’ve installed a distro on **/dev/sda5**, you can reinstall Grub by first creating a mount directory for the distro with + + sudo mkdir -p /mnt/distro + +and then mounting the partition with + + mount /dev/sda5 /mnt/distro + +You can then reinstall Grub with + + grub2-install --root-directory=/mnt/distro /dev/sda + +This command will rewrite the MBR information on the **/dev/sda** device, point to the current Linux installation and rewrite some Grub 2 files such as **grubenv** and **device.map**. + +Another common issue pops up on computers with multiple distros. When you install a new Linux distro, its bootloader should pick up the already installed distros. In case it doesn’t, just boot into the newly installed distro and run + + grub2-mkconfig + +Before running the command, make sure that the root partitions of the distros missing from the boot menu are mounted. If the distro you wish to add has **/root** and **/home** on separate partitions, only mount the partition that contains /root, before running the **grub2-mkconfig** command. + +While Grub 2 will be able to pick most distros, trying to add a Fedora installation from within Ubuntu requires one extra step. If you’ve installed Fedora with its default settings, the distro’s installer would have created LVM partitions. In this case, you’ll first have to install the **lvm2** driver using the distro’s package management system, such as with + + sudo apt-get install lvm2 + +before Grub 2’s **os-prober** script can find and add Fedora to the boot menu. + +### Common user settings ### + +Grub 2 has lots of configuration variables. Here are some of the common ones that you’re most likely to modify in the **/etc/default/grub** file. The **GRUB_DEFAULT** variable specifies the default boot entry. It will accept a numeric value such as 0, which denotes the first entry, or “saved” which will point it to the selected option from the previous boot. The **GRUB_TIMEOUT** variable specifies the delay before booting the default menu entry and the **GRUB_CMDLINE_LINUX** variable lists the parameters that are passed on the kernel command line for all Linux menu entries. + +If the **GRUB_DISABLE_RECOVERY** variable is set to **true**, the recovery mode menu entries will not be generated. These entries boot the distro into single-user mode from where you can repair your system with command line tools. Also useful is the **GRUB_GFXMODE** variable, which specifies the resolution of the text shown in the menu. The variable can take any value supported by your graphics card. + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cli-large.jpg) + +**Grub 2 has a command line, which you can invoke by pressing C at the bootloader menu.** + +#### Thorough fix #### + +If the **grub2-install** command didn’t work for you, and you still can’t boot into Linux, you’ll need to completely reinstall and reconfigure the bootloader. For this task, we’ll use the venerable **chroot** utility to change the run environment from that of the live CD to the Linux install we want to recover. You can use any Linux live CD for this purpose as long as it has the **chroot** tool. However, make sure the live medium is for the same architecture as the architecture of the installation on the hard disk. So if you wish to **chroot** to a 64-bit installation you must use an amd64 live distro. + +After you’ve booted the live distro, the first order of business is to check the partitions on the machine. Use **fdisk -l** to list all the partitions on the disk and make note of the partition that holds the Grub 2 installation that you want to fix. + +Let’s assume we wish to restore the bootloader from the distro installed in **/dev/sda5**. Fire up a terminal and mount it with: + + sudo mount /dev/sda5 /mnt + +Now you’ll have to bind the directories that the Grub 2 bootloader needs access to in order to detect other operating systems: + + $ sudo mount --bind /dev /mnt/dev + $ sudo mount --bind /dev/pts /mnt/dev/pts + $ sudo mount --bind /proc /mnt/proc + $ sudo mount --bind /sys /mnt/sys + +We’re now all set to leave the live environment and enter into the distro installed inside the **/dev/sda5** partition via **chroot**: + + $ sudo chroot /mnt /bin/bash + +You’re now all set to install, check, and update Grub. Just like before, use the + + sudo grub2-install /dev/sda + +command to reinstall the bootloader. Since the **grub2-install** command doesn’t touch the **grub.cfg** file, we’ll have to create it manually with + + sudo grub-mkconfig -o /boot/grub/grub.cfg + +That should do the trick. You now have a fresh copy of Grub 2 with a list of all the operating systems and distros installed on your machine. Before you can restart the computer, you’ll have to exit the chrooted system and unmount all the partitions in the following order: + + $ exit + $ sudo umount /mnt/sys + $ sudo umount /mnt/proc + $ sudo umount /mnt/dev/pts + $ sudo umount /mnt/dev + $ sudo umount /mnt + +You can now safely reboot the machine, which should be back under Grub 2’s control, and the bootloader under yours! + +### Add custom entries ### + +If you wish to add an entry to the bootloader menu, you should add a boot stanza to the **40_custom** script. You can, for example, use it to display an entry to boot a Linux distro installed on a removable USB drive. Assuming your USB drive is **sdb1**, and the vmlinuz kernel image and the initrd files are under the root (/) directory, add the following to the **40_custom** file: + + menuentry “Linux on USB” { + set root=(hd1,1) + linux /vmlinuz root=/dev/sdb1 ro quiet splash + initrd /initrd.img + } + +For more accurate results, instead of device and partition names you can use their UUIDs, such as + + set root=UUID=54f22dd7-eabe + +Use + + sudo blkid + +to find the UUIDs of all the connected drives and partitions. You can also add entries for any distros on your disk that weren’t picked up by the os-prober script, as long as you know where the distro’s installed and the location of its kernel and initrd image files. + +-------------------------------------------------------------------------------- + +via: https://www.linuxvoice.com/grub-2-heal-your-bootloader/ + +作者:[Mayank Sharma][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linuxvoice.com/author/mayank/ From 19d10d23397e1b5801a3c79429c1495ee303cae6 Mon Sep 17 00:00:00 2001 From: Feng Wei Date: Wed, 30 Dec 2015 00:10:59 +0800 Subject: [PATCH 0723/1710] tranlation complete --- ...b Delivery with these Open Source Tools.md | 196 ------------------ ...b Delivery with these Open Source Tools.md | 195 +++++++++++++++++ 2 files changed, 195 insertions(+), 196 deletions(-) delete mode 100644 sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md create mode 100644 translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md 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 deleted file mode 100644 index 3d1137f5bf..0000000000 --- a/sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md +++ /dev/null @@ -1,196 +0,0 @@ -translating by fw8899 -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/ diff --git a/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md b/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md new file mode 100644 index 0000000000..21fd8ad8e2 --- /dev/null +++ b/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md @@ -0,0 +1,195 @@ +使用开源工具优化Web响应 +================================================================================ +Web代理软件转发HTTP请求时并不会改变数据流量。它们经过配置后,可以免客户端配置,作为透明代理。它们还可以作为网站反向代理的前端;缓存服务器在此能支撑一台或多台web服务器为海量用户提供服务。 + +网站代理功能多样,有着宽泛的用途:从页面缓存、DNS和其他查询,到加速web服务器响应、降低带宽消耗。代理软件广泛用于大型高访问量的网站,比如纽约时报、卫报, 以及社交媒体网站如Twitter、Facebook和Wikipedia。 + +页面缓存已经成为优化单位时间内所能吞吐的数据量的至关重要的机制。好的Web缓存还能降低延迟,尽可能快地响应页面,让终端用户不至于因等待内容的时间过久而失去耐心。它们还能将频繁访问的内容缓存起来以节省带宽。如果你需要降低服务器负载并改善网站内容响应速度,那缓存软件能带来的好处就绝对值得探索一番。 + +为深入探查Linux下可用的相关软件的质量,我列出了下边5个优秀的开源web代理工具。它们中有些功能完备强大,也有几个只需很低的资源就能运行。 + +### Squid ### + +Squid是一个高性能、开源的代理缓存和Web缓存服务器,支持FTP、Internet Gopher、HTTPS和SSL等多种协议。它通过一个非阻塞,I/O事件驱动的单一进程处理所有IPV4或IPV6上的请求。 + +Squid由一个主服务程序squid,和DNS查询程序dnsserver,另外还有可选的请求重写、执行认证程序组件,及一些管理和客户端工具构成。 + +Squid提供了丰富的访问控制、认证和日志环境, 用于开发web代理和内容服务网站应用。 + +其特性包括: + +- Web代理: + - 通过缓存来降低访问时间和带宽使用 + - 将元数据和特别热的对象缓存到内存中 + - 缓存DNS查询 + - 支持非阻塞的DNS查询 + - 实现了失败请求的未果缓存 +- Squid缓存可架设为层次结构,或网状结构以节省额外的带宽 +- 通过可扩展的访问控制来执行网站使用条款 +- 隐匿请求,如禁用或修改客户端HTTP请求头特定属性 +- 反向代理 +- 媒体范围限制 +- 支持SSL +- 支持IPv6 +- 错误页面的本地化 - Squid可以根据访问者的语言选项对每个请求展示本地化的错误页面 +- 连接Pinning(用于NTLM Auth Passthrough) - 一种通过Web代理,允许Web服务器使用Microsoft NTLM安全认证替代HTTP标准认证的方案 +- 支持服务质量 (QoS, Quality of Service) 流 + - 选择一个TOS/Diffserv值来标记本地命中 + - 选择一个TOS/Diffserv值来标记邻居命中 + - 选择性地仅标记同级或上级请求 + - 允许任意发往客户端的HTTP响应保持由远程服务器处响应的TOS值 + - 对收到的远程服务器的TOS值,在复制之前对指定位进行掩码操作,再发送到客户端 +- SSL Bump (用于HTTPS过滤和适配) - Squid-in-the-middle,在CONNECT方式的SSL隧道中,用配置化的客户端和服务器端证书,对流量进行解密和加密 +- 支持适配模块 +- ICAP旁路和重试增强 - 通过完全的旁路和动态链式路由扩展ICAP,来处理多多个适应性服务。 +- 支持ICY流式协议 - 俗称SHOUTcast多媒体流 +- 动态SSL证书生产 +- 支持ICAP协议(Internet Content Adaptation Protocol) +- 完整的请求日志记录 +- 匿名连接 + +- 网站: [www.squid-cache.org][1] +- 开发: 美国国家应用网络研究实验室和网络志愿者 +- 授权: GNU GPL v2 +- 版本号: 4.0.1 + +### Privoxy ### + +Privoxy(Privacy Enhancing Proxy)是一个非缓存类Web代理软件,它自带的高级过滤功能用来增强隐私保护,修改页面内容和HTTP头部信息,访问控制,以及去除广告和其它招人反感的互联网垃圾。Privoxy的配置非常灵活,能充分定制已满足各种各样的需求和偏好。它支持单机和多用户网络两种模式。 + +Privoxy使用Actions规则来处理浏览器和远程站点间的数据流。 + +其特性包括: + +- 高度配置化 +- 广告拦截 +- Cookie管理 +- 支持"Connection: keep-alive"。可以无视客户端配置而保持持久连接 +- 支持IPv6 +- 标签化,允许按照客户端和服务器的请求头进行处理 +- 作为拦截代理器运行 +- 巧妙的手段和过滤机制用来处理服务器和客户端的HTTP头部 +- 可以与其他代理软件链式使用 +- 整合了基于浏览器的配置和控制工具,能在线跟踪规则和过滤效果,可远程开关 +- 页面过滤(文本替换、根据尺寸大小删除广告栏, 隐藏的"web-bugs"元素和HTML容错等) +- 模块化的配置使得标准配合和用户配置可以存放于不同文件中,这样安装更新就不会覆盖用户的个性化设置 +- 配置文件支持Perl兼容的正则表达式,以及更为精妙和灵活的配置语法 +- GIF去动画 +- 旁路处理大量click-tracking脚本(避免脚本重定向) +- 大多数代理生成的页面(例如 "访问受限" 页面)可由用户自定义HTML模板 +- 自动监测配置文件的修改并重新读取 +- 最大特点是可以基于每个站点或每个位置来进行控制 + +- 网站: [www.privoxy.org][2] +- 开发: Fabian Keil(开发领导者), David Schmidt, 和众多其他贡献者 +- 授权: GNU GPL v2 +- 版本号: 3.4.2 + +### Varnish Cache ### + +Varnish Cache是一个为性能和灵活性而生的web加速器。它新颖的架构设计能带来显著的性能提升。根据你的架构,通常情况下它能加速响应速度300-1000倍。Varnish将页面存储到内存,这样web服务器就无需重复地创建相同的页面,只需要在页面发生变化后重新生成。页面内容直接从内存中访问,当然比其他方式更快。 + +此外Varnish能大大提升响应web页面的速度,用任何应用服务器都能使网站访问速度大幅度地提升。 + +按按经验,Varnish Cache比较经济的配置是1-16GB内存+SSD固态硬盘。 + +其特性包括: + +- 新颖的设计 +- VCL - 非常灵活的配置语言。VCL配置转换成C,然后编译、加载、运行,灵活且高效 +- 能使用round-robin轮询和随机分发两种方式来负载均衡,两种方式下后端服务器都可以设置权重 +- 基于DNS、随机、散列和客户端IP的分发器 +- 多台后端主机间的负载均衡 +- 支持Edge Side Includes,包括拼装压缩后的ESI片段 +- 多线程并发 +- URL重写 +- 单Varnish缓存多个虚拟主机 +- 日志数据存储在共享内存中 +- 基本的后端服务器健康检查 +- 优雅地处理后端服务器“挂掉” +- 命令行界面的管理控制台 +- 使用内联C来扩展Varnish +- 可以与Apache用在相同的系统上 +- 单系统可运行多个Varnish +- 支持HAProxy代理协议。该协议在每个收到的TCP请求,例如SSL终止过程中,附加小段头信息,以记录客户端的真实地址 +- 冷热VCL状态 +- 用名为VMODs的Varnish模块来提供插件扩展 +- 通过VMODs定义后端主机 +- Gzip压缩及解压 +- HTTP流通过和获取 +- 神圣模式和优雅模式。用Varnish作为负载均衡器,神圣模式下可以将不稳定的后端服务器在一段时间内打入黑名单,阻止它们继续提供流量服务。优雅模式允许Varnish在获取不到后端服务器状态良好的响应时,提供已过期版本的页面或其它内容。 +- 实验性支持持久化存储,无需LRU缓存淘汰 + +- 网站: [www.varnish-cache.org][3] +- 开发: Varnish Software +- 授权: FreeBSD +- 版本号: 4.1.0 + +### Polipo ### + +Polipo是一个开源的HTTP缓存代理,只需要非常低的资源开销。 + +它监听来自浏览器的web页面请求,转发到web服务器,然后将服务器的响应转发到浏览器。在此过程中,它能优化和整形网络流量。从本质来讲Polipo与WWWOFFLE很相似,但其实现技术更接近于Squid。 + +Polipo最开始的目标是作为一个兼容HTTP/1.1的代理,理论它能在任何兼容HTTP/1.1或更早的HTTP/1.0的站点上运行。 + +其特性包括: + +- HTTP 1.1、IPv4 & IPv6、流量过滤和隐私保护增强 +- 如确认远程服务器支持,则无论收到的请求是管道处理过的还是在多个连接上同时收到的,都使用HTTP/1.1管道 +- 下载被中断时缓存起始部分,当需要续传时用区间请求来完成下载 +- 将HTTP/1.0的客户端请求升级为HTTP/1.1,然后按照客户端支持的级别进行升级或降级后回复 +- 全面支持IPv6 (作用域(链路本地)地址除外) +- 作为IPv4和IPv6网络的网桥 +- 内容过滤 +- 能使用Poor Man多路复用技术降低延迟 +- 支持SOCKS 4和SOCKS 5协议 +- HTTPS代理 +- 扮演透明代理的角色 +- 可以与Privoxy或tor一起运行 + +- 网站: [www.pps.univ-paris-diderot.fr/~jch/software/polipo/][4] +- 开发: Juliusz Chroboczek, Christopher Davis +- 授权: MIT License +- 版本号: 1.1.1 + +### Tinyproxy ### + +Tinyproxy是一个轻量级的开源web代理守护进程,其设计目标是快而小。它适用于需要完整HTTP代理特性,但系统资源又不足以运行大型代理的场景,比如嵌入式部署。 + +Tinyproxy对小规模网络非常有用,这样的场合下大型代理会使系统资源紧张,或有安全风险。Tinyproxy的一个关键特性是其缓冲连接的理念。实质上Tinyproxy服务器的响应进行了高速缓冲,然后按照客户端能够处理的最高速度进行响应。该特性极大的降低了网络延滞带来的问题。 + +特性: + +- 易于修改 +- 隐匿模式 - 定义哪些HTTP头允许通过,哪些又会被拦截 +- 支持HTTPS - Tinyproxy允许通过CONNECT方法转发HTTPS连接,任何情况下都不会修改数据流量 +- 远程监控 - 远程访问代理统计数据,让你能清楚了解代理服务当前的忙碌状态 +- 平均负载监控 - 通过配置,当服务器的负载接近一定值后拒绝新连接 +- 访问控制 - 通过配置,仅允许指定子网或IP地址的访问 +- 安全 - 运行无需额外权限,减小了系统受到威胁的概率 +- 基于URL的过滤 - 允许基于域和URL的黑白名单 +- 透明代理 - 配位为透明代理,这样客户端就无需任何配置 +- 代理链 - 来流量出口处采用上游代理服务器,而不是直接转发到目标服务器,创建我们所说的代理链 +- 隐私特性 - 限制允许从浏览器收到的来自HTTP服务器的数据(例如cookies),同时限制允许通过的从浏览器到HTTP服务器的数据(例如版本信息) +- 低开销 - 使用glibc内存开销只有2MB,CPU负载按并发连接数线性增长(取决于网络连接速度)。 Tinyproxy可以运行在老旧的机器上而无需担心性能问题。 + +- 网站: [banu.com/tinyproxy][5] +- 开发: Robert James Kaes和其他贡献者 +- 授权: GNU GPL v2 +- 版本号: 1.8.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20151101020309690/WebDelivery.html + +译者:[fw8899](https://github.com/fw8899) +校对:[校对者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/ From eb201e83dd7269aa1af58920ac61e122d56e5ea4 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 30 Dec 2015 11:06:26 +0800 Subject: [PATCH 0724/1710] Translating by ZTinoZ --- ...illa with Apache and SSL on FreeBSD 10.2.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index 87aa5e1ef8..46ce91f327 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -95,14 +95,14 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz ![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png) -Next, we will log in to the mysql shell with user root and password that we've configured above, then we will create new database and user for bugzilla installation. +以上步骤都完成之后,我们用root登录mysql shell,然后为bugzilla创建一个新的数据库和用户。 -Log in to the mysql shell with command below : +用以下命令登录mysql shell: mysql -u root -p password: aqwe123 -Add the database : +添加数据库: create database bugzilladb; create user bugzillauser@localhost identified by 'bugzillauser@'; @@ -112,18 +112,18 @@ Add the database : ![Creating Database for Bugzilla](http://blog.linoxide.com/wp-content/uploads/2015/12/Creating-Database-for-Bugzilla.png) -Database for bugzilla is created, database "bugzilladb" with user "bugzillauser" and password "bugzillauser@". +bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分别为"bugzillauser"和"bugzillauser@"。 -### Step 4 - Generate New SSL Certificate ### +### 第四步 - 生成新的SSL证书 ### -Generate new self signed ssl certificate on directory "ssl" for bugzilla site. +在bugzilla站点的"ssl"目录里生成新的自签名SSL证书。 -Go to the apache24 directory and create new directory "ssl" on it : +前往apache24目录并在此创建新目录"ssl": cd /usr/local/etc/apache24/ mkdir ssl; cd ssl -Next, generate the certificate file with openssl command, then change the permission of the certificate file : +接着,用openssl命令生成证书文件,然后更改其权限: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt chmod 600 * @@ -171,7 +171,7 @@ Paste configuration below : -Save and exit. +保存并退出。 If all is done, create new directory for bugzilla installation and then enable the bugzilla virtualhost by adding the virtualhost configuration to httpd.conf file. From 974244eb79dccbb1d8e77ddba11c2e04323630cc Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Wed, 30 Dec 2015 13:05:32 +0800 Subject: [PATCH 0725/1710] Create Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Translated] Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux 【翻译完成】 LFCS 系列第三讲:如何在 Linux 中归档/压缩文件及目录、设置文件属性和搜索文件 --- ...e Attributes and Finding Files in Linux.md | 390 ++++++++++++++++++ 1 file changed, 390 insertions(+) create mode 100644 translated/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md diff --git a/translated/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md b/translated/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..876fa4d3af --- /dev/null +++ b/translated/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,390 @@ +GHLandy Translated + +LFCS 系列第三讲:如何在 Linux 中归档/压缩文件及目录、设置文件属性和搜索文件 + +================================================================================ +最近,Linux 基金会发起了 一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让遍布全世界的人都有机会参加该认证的考试,并且通过考试的人将会得到关于他们有能力在 Linux 上执行基本的中间系统管理任务的认证证书。这项认证包括了对已运行的系统和服务的支持、一流水平的问题解决和分析以及决定何时将问题反映给工程师团队的能力。 + +![Linux Foundation Certified Sysadmin – Part 3](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-3.png) + +LFCS 系列第三讲 + +请看以下视频,这里边讲给出 Linux 基金会认证程序的一些想法。 + +注:youtube 视频 + + +本讲是《十套教程》系列中的第三讲,在这一讲中,我们会涵盖如何在文件系统中归档/压缩文件及目录、设置文件属性和搜索文件等内容,这些都是 LFCS 认证中必须掌握的知识。 + +### 归档和压缩的相关工具 ### + +文件归档工具将一堆文件整合到一个单独的归档文件之后,我们可以将归档文件备份到不同类型的媒介或者通过网络传输和发送 Email 来备份。在 Linux 中使用频率最高的归档实用工具是 tar。当归档工具和压缩工具一起使用的时候,可以减少同一文件和信息在硬盘中的存储空间。 + +#### tar 使用工具 #### + +tar 将一组文件打包到一个单独的归档文件(通常叫做 tar 文件或者 tarball)。tar 这个名称最初代表磁带存档程序(tape archiver),但现在我们可以用它来归档任意类型的可读写媒介上边的数据,而不是只能归档磁带数据。tar 通常与 gzip、bzip2 或者 xz 等压缩工具一起使用,生成一个压缩的 tarball。 + +**基本语法:** + + # tar [选项] [路径名 ...] + +其中 ... 代表指定那些文件进行归档操作的表达式 + +#### tar 的常用命令 #### + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
长选项简写描述
 –create c 创建 tar 归档文件
 –concatenate A 将一存档与已有的存档合并
 –append r 把要存档的文件追加到归档文件的末尾
 –update u 更新新文件到归档文件中去
 –diff 或 –compare d 比较存档与当前文件的不同之处
 –file archive f 使用档案文件或设备
 –list t 列出 tarball 中的内容
 –extract 或 –get x 从归档文件中释放文件
+ +#### 常用的操作修饰符 #### + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
长选项缩写描述
 –directory dir C 执行归档操作前,先转到指定目录
 –same-permissions p 保持原始的文件权限
 –verbose v 列出所有的读取或提取文件。但这个标识符与 –list 一起使用的时候,还会显示出文件大小、属主和时间戳的信息
 –verify W 写入存档后进行校验
 –exclude file — 不把指定文件包含在内
 –exclude=pattern X 以PATTERN模式排除文件
 –gzip 或 –gunzip z 通过gzip压缩归档
 –bzip2 j 通过bzip2压缩归档
 –xz J 通过xz压缩归档
+ +Gzip 是最古老的压缩工具,压缩率最小,bzip2 的压缩率稍微高一点。另外,xz是最新的压缩工具,压缩率最好。xz 具有最佳压缩率的代价是:完成压缩操作花费最多时间,压缩过程中占有较多系统资源。 + +通常,通过这些工具压缩的 tar 文件相应的具有 .gz、.bz2 或 .xz的扩展名。在下列的例子中,我们使用 file1、file2、file3、file4 和 file5 进行演示。 + +**通过 gzip、bzip2 和 xz 压缩归档** + +归档当前工作目录的所有文件,并以 gzip、bzip2 和 xz 压缩刚刚的归档文件(请注意,用正则表达式来指定那些文件应该归档——这是为了防止归档工具包前一步生成的文件打包进来)。 + + # 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) + +压缩多个文件 + +**列举 tarball 中的内容和更新/追加文件到归档文件中** + +列举 tarball 中的内容,并显示相同信息为一个详细目录清单。注意,不能直接向压缩的归档文件更新/追加文件(若你需要向压缩的 tarball 中更新/追加文件,需要先解压 tar 文件后再进行操作,然后重新压缩)。 + + # tar tvf [tarball] + +![Check Files in tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/List-Archive-Content.png) + +列举归档文件中的内容 + +运行一下任意一条命令: + + # gzip -d myfiles.tar.gz [#1] + # bzip2 -d myfiles.tar.bz2 [#2] + # xz -d myfiles.tar.xz [#3] + +然后: + + # tar --delete --file myfiles.tar file4 (删除tarball中的file4) + # tar --update --file myfiles.tar file4 (更新tarball中的file4) + +和 + + # gzip myfiles.tar [ 如果你运行 #1 命令 ] + # bzip2 myfiles.tar [ 如果你运行 #2 命令 ] + # xz myfiles.tar [ 如果你运行 #3 命令 ] + +最后 + + # tar tvf [tarball] #again + +将 file4 修改后的日期和时间与之前显示的对应信息进行比较 + +**排除文件类型** + +假设你现在需要备份用户的家目录。一个有经验的系统管理员会选择忽略所有视频和音频文件再备份(也可能是公司规定)。 + +可能你最先想到的方法是在备份是时候,忽略扩展名为 .mp3 和 .mp4(或者其他格式)的文件。但如果你有些自作聪明的用户将扩展名改为 .txt 或者 .bkp,那你的方法就不灵了。为了发现并排除音频或者视频文件,你需要先检查文件类型。以下 shell 脚本可以代你完成类型检查: + + #!/bin/bash + # 把需要进行备份的目录传递给 $1 参数. + DIR=$1 + #排除文件类型中包含了 mpeg 字符串的文件,然后创建 tarball 并进行压缩。 + # -若文件类型中包含 mpeg 字符串, $?(最后执行的命令的退出状态)返回 0,然后文件名被定向到排除选项。否则返回 1。 + # -若 $? 等于 0,该文件从需要备份文件的列表排除。 + 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) + +排除文件进行备份 + +**使用 tar 保持文件的原有权限进行恢复** + +通过以下命令,你可以保留文件的权限将备份文件恢复到原始用户的家目录(本例是 user_restore)。 + + # 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) + +从归档文件中恢复 + +**扩展阅读:** + +- [18 tar Command Examples in Linux][1] +- [Dtrx – An Intelligent Archive Tool for Linux][2] + +### 通过 find 命令搜索文件 ### + +find 命令用于递归搜索目录树中包含指定字符的文件和目录,然后在屏幕显示出于指定字符相匹配的文件和目录,或者在匹配项进行其他操作。 + +通常,我们通过文件名、文件的属主、属组、类型权限、日期及大小来搜索。 + +#### 基本语法:#### + +# find [需搜索的目录] [表达式] + +**通过文件大小递归搜索文件** + +以下命令会搜索当前目录(.)及其下两层子目录(-maxdepth 3,包含当前目录及往下两层的子目录)大于 2 MB(-size +2M)的所有文件(-f)。 + + # 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) + +通过文件大小搜索文件 + +**搜索符合一定规则的文件并将其删除** + +有时候,777 权限的文件通常为外部攻击者打开便利之门。不管是以何种方式,让所有人都可以对文件进行任意操作都是不安全的。对此,我们采取一个相对激进的方法——删除这些文件(‘{ }’用来“聚集”搜索的结果)。 + + # 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) + +搜索 777 权限的文件 + +**按访问时间和修改时间搜索文件** + +搜索 /etc 目录下访问时间(-atime)或修改时间(-mtime)大于或小于 6 个月或者刚好 6 个月的配置文件。 + +按照下面例子对命令进行修改: + + # 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) + +按修改时间搜索文件 + +- 扩展阅读: [35 Practical Examples of Linux ‘find’ Command][3] + +### 文件权限及基本属性 ### + +ls -l 命令输出的前 10 位字符是文件的属性,其中第一个字符用来表明文件的类型。 + +- – : 普通文件 +- -d : 目录 +- -l : 符号链接 +- -c : 字符设备 (它将数据作为字节流处理,如terminal) +- -b : 块设备 (在块设备中处理数据,如存储设备) + +接下来表示文件属性的 9 位字符叫做文件的读写模式,代表文件属主、同组用户和其他用户(通常指的是“外部世界”)对应的读(r)、写(w)和执行(x)权限。 + +文件的写权限允许对应的用户对文件进行打开和读写,对于同时设置了执行权限的目录,对应用户可以列举出该目录的内容。另外,文件的执行权限允许将文件当做是一个可执行程序来运行,而目录的执行权限则是允许用户进入和退出该目录。 + +文件的权限通过 chown 命令来更改,其基本语法如下: + + # chmod [new_mode] file + +new_mode 可以是 3 位八进制数值或者对应权限的表达式。 + +八进制数值可以从二进制数值进行等值转换,通过下列方法来计算文件属主、同组用户和其他用户权限对应的二进制数值: + +一个确定权限的二进制数值表现为 2 的幂(r=2^2,w=2^1,x=2^0),当权限省缺时,二进制数值为 0。如下: + +![Linux File Permissions](http://www.tecmint.com/wp-content/uploads/2014/10/File-Permissions.png) + +文件权限 + +使用八进制数值设置上图的文件权限,请输入: + + # chmod 744 myfile + +通过 u、g 和 o 分别代表用户、同组用户和其他用户,然后你也可以使用权限表达式来单独对用户设置文件的权限模式。也可以通过 a 代表所有用户,然后设置文件权限。通过 + 号或者 - 号相应的赋予或移除文件权限。 + + +**为所有用户撤销一个 shell 脚本的执行权限** + +正如之前解释的那样,我们可以通过 - 号为需要移除权限的属主、同组用户、其他用户或者所有用户去掉指定的文件权限。下面命令中的短横线(-)可以理解为:移除(-)所有用户(a)的 backup.sh 文件执行权限(x)。 + + # chmod a-x backup.sh + +下面演示为文件属主、同组用户赋予读、写和执行权限,并赋予其他用户读权限。 + +当我们使用 3 位八进制数值为文件设置权限的时候,第一位数字代表属主权限,第二位数字代表同组用户权限,第三位数字代表其他用户的权限: + +- 属主:(r=2^2 + w=2^1 + x=2^0 = 7) +- 同组用户:(r=2^2 + w=2^1 + x=2^0 = 7) +- 其他用户:(r=2^2 + w=0 + x=0 = 4), + + # chmod 774 myfile + +随着练习时间的推移,你会知道何种情况下使用哪种方式来更改文件的权限模式的效果最好。 + +使用 ls -l 详细列举目录详细同样会显示出文件的属主和属组(这个很基本,而且影响到系统文件的访问控制)。 + +![Linux File Listing](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-File-Listing.png) + +列举 Linux 文件 + +通过 chown 命令可以对文件的归属权进行更改,可以同时或者分开更改属主和属组。其基本语法为: + + # chown user:group file + +至少要指定用户或者用户组 + +**举几个例子:** + +将文件的属主更改为指定用户: + + # chown gacanepa sent + +同时将文件的属主和属组更改为指定的用户和组: + + # chown gacanepa:gacanepa TestFile + +只将文件的属组更改为指定组。注意组名前的冒号(:)。 + + # chown :gacanepa email_body.txt + +### 结论 ### + +作为一个系统管理员,你需要懂得如何创建和恢复备份、如何在系统中搜索文件并更改它们的属性。通过一些技巧,你可以更好地管理系统并避免以后出问题。 + +我希望,本文给出的技巧可以帮助你达成管理系统的目标。你可以随时在评论中发表自己的技巧及社区给你带来的益处。 + +先行感谢! + +参考链接 +- [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] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者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 From 4ec79d53a83651a6742e6d553165172c2737fe95 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Wed, 30 Dec 2015 13:07:17 +0800 Subject: [PATCH 0726/1710] Delete Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译,删除原文,译文已放在对应位置。 --- ...e Attributes and Finding Files in Linux.md | 384 ------------------ 1 file changed, 384 deletions(-) delete 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 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 deleted file mode 100644 index 4b1d700c4e..0000000000 --- a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md +++ /dev/null @@ -1,384 +0,0 @@ -GHLandy Translateing - -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 From 23da66eef6883a16a1a01c36e5c9ae9c4deed867 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Wed, 30 Dec 2015 13:09:59 +0800 Subject: [PATCH 0727/1710] [Translating] Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【开始翻译】 LFCS系列第四讲:分区存储设备、格式化文件系统和配置Swap分区 --- ...s Formatting Filesystems and Configuring Swap Partition.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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..32bf16bb7c 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 @@ +GHLandy Translating + 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. @@ -188,4 +190,4 @@ via: http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ [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 +[3]:https://identity.linuxfoundation.org/user?destination=pid/1 From 9dd65c151b8fd4fc910da5f77fbbe92693e37fca Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Wed, 30 Dec 2015 14:14:30 +0800 Subject: [PATCH 0728/1710] =?UTF-8?q?zky001=E6=AD=A3=E5=9C=A8=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 本文由zky001正在翻译 谢谢 --- sources/tech/20151229 Watch Star Wars In Linux Terminal.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151229 Watch Star Wars In Linux Terminal.md b/sources/tech/20151229 Watch Star Wars In Linux Terminal.md index 45c5a917ec..d0adc812c4 100644 --- a/sources/tech/20151229 Watch Star Wars In Linux Terminal.md +++ b/sources/tech/20151229 Watch Star Wars In Linux Terminal.md @@ -1,3 +1,4 @@ +zky001正在翻译 Watch Star Wars In Linux Terminal ================================================================================ ![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) @@ -41,7 +42,7 @@ I let you enjoy Star Wars in Linux :) via: http://itsfoss.com/star-wars-linux/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[zky001](https://github.com/zky001) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0fe200a3a7eccbd32086747f33eaf58aae52a3d8 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Wed, 30 Dec 2015 14:47:58 +0800 Subject: [PATCH 0729/1710] =?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 翻译完成 --- ...51229 Watch Star Wars In Linux Terminal.md | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 sources/tech/20151229 Watch Star Wars In Linux Terminal.md diff --git a/sources/tech/20151229 Watch Star Wars In Linux Terminal.md b/sources/tech/20151229 Watch Star Wars In Linux Terminal.md deleted file mode 100644 index d0adc812c4..0000000000 --- a/sources/tech/20151229 Watch Star Wars In Linux Terminal.md +++ /dev/null @@ -1,54 +0,0 @@ -zky001正在翻译 -Watch Star Wars In Linux Terminal -================================================================================ -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) - -Star Wars fever has gripped the world. The latest installment in the [Star Wars series, Star Wars: The Force Awakens, has broken the opening records][1]. - -While I cannot help you to get a ticket of the latest Star Wars movie, I can certainly provide you a way to watch [Star Wars episode IV][2], the original and very first Star Wars movie. - -No, it won’t be HD, Blue Ray edition. Instead, it will be the ASCII version of Star Wars episode IV and you can watch it in Linux Terminal, in true geek way :) - -### Watch Star Wars in Linux Terminal ### - -Open a terminal and use the following command: - - telnet towel.blinkenlights.nl - -Wait for a few seconds and you can see animated ASCII art in the terminal like this: - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal.png) - -And it will keep on going: - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-1.png) - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-3.png) - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-5.png) - -To stop the animation, press ctrl+]. After that type quit to come out of telnet command. - -### More terminal fun ### - -In fact, watching Star Wars is not the only fun thing you can do in Linux terminal. You can run a [train in terminal][3] or [get Linux logo in ASCII art][4]. - -I let you enjoy Star Wars in Linux :) - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/star-wars-linux/ - -作者:[Abhishek][a] -译者:[zky001](https://github.com/zky001) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://www.gamespot.com/articles/star-wars-7-breaks-thursday-night-movie-opening-re/1100-6433246/ -[2]:http://www.imdb.com/title/tt0076759/ -[3]:http://itsfoss.com/ubuntu-terminal-train/ -[4]:http://itsfoss.com/display-linux-logo-in-ascii/ From f86156a7ac258692f62efedae716b32b69f8d8b5 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Wed, 30 Dec 2015 14:49:53 +0800 Subject: [PATCH 0730/1710] =?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 翻译完成 --- ...51229 Watch Star Wars In Linux Terminal.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 translated/tech/20151229 Watch Star Wars In Linux Terminal.md diff --git a/translated/tech/20151229 Watch Star Wars In Linux Terminal.md b/translated/tech/20151229 Watch Star Wars In Linux Terminal.md new file mode 100644 index 0000000000..41b739a9c0 --- /dev/null +++ b/translated/tech/20151229 Watch Star Wars In Linux Terminal.md @@ -0,0 +1,49 @@ +在Linux终端看星球大战 +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) +星球大战席卷世界。最新一期的 [《星球大战》系列, 《星球大战7:原力觉醒》,打破了有史以来的记录][1]. + +虽然我不能帮你得到一张最新的《星球大战》电影的票,但我可以提供给你一种方式,看[星球大战第四集片段][2],它是非常早期的《星球大战》电影。 + +不,它不会是高清,也不是蓝光版。相反,它将是ASCII版的《星球大战》第四集片段,你可以在Linux终端看它,这才是真正的极客的方式 :) + +### 在Linux终端看星球大战 ### + +打开一个终端,使用以下命令: + + telnet towel.blinkenlights.nl + +等待几秒钟,你可以在终端看到类似于以下这样的动画ASCII艺术: + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal.png) + +同时它将继续 + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-1.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-3.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-5.png) + +要停止动画,按 ctrl +],在这之后输入quit来退出tenlnet程序 + +### 更多有趣的终端 ### +事实上,看《星球大战》并不是你在Linux终端下唯一能做有趣的事情。您可以运行[终端里的列车][3]或[通过ASCII艺术得到Linux标志][4]。 + +我希望你可以在Linux下享受星球争霸 +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/star-wars-linux/ + +作者:[Abhishek][a] +译者:[zky001](https://github.com/zky001) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.gamespot.com/articles/star-wars-7-breaks-thursday-night-movie-opening-re/1100-6433246/ +[2]:http://www.imdb.com/title/tt0076759/ +[3]:http://itsfoss.com/ubuntu-terminal-train/ +[4]:http://itsfoss.com/display-linux-logo-in-ascii/ From b0f15872eecf93b5240e56ac15918b4f68616ad9 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Wed, 30 Dec 2015 14:55:56 +0800 Subject: [PATCH 0731/1710] =?UTF-8?q?zky001=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit zky001翻译中 --- ...t are the best plugins to increase productivity on Emacs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md b/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md index 17fb4ba8ab..6c3a1c8f98 100644 --- a/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md +++ b/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md @@ -1,3 +1,4 @@ +zky001翻译中 What are the best plugins to increase productivity on Emacs ================================================================================ Over a year ago now, I went looking for the best plugins to [turn Vim into a full-fledged IDE][1]. Interestingly, a lot of the comments on that post were about how Emacs already has most of these plugins built in, and was already a great IDE. Although I can only agree about Emacs' incredible versatility, it is still not the ultimate editor when it comes out of the box. Thankfully, its vast plugin library is here to fix that. But among the plethora of options available to you, it is sometimes hard to know where to start. So for now, let me try to assemble a short list of the indispensable plugins to increase your productivity while using Emacs. Although I am heavily geared towards programming related productivity, most of these plugins would be useful to anyone for any usage. @@ -67,7 +68,7 @@ To conclude, Emacs is a fantastic tool. Probably not a shocker. Try these plugin via: http://xmodulo.com/best-plugins-to-increase-productivity-on-emacs.html 作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) +译者:[zky001](https://github.com/zky001) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7fba1b5c829b620cb6a9dde2937853e9daf1bdce Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Wed, 30 Dec 2015 16:13:30 +0800 Subject: [PATCH 0732/1710] Update 20151229 Grub 2--Heal your bootloader.md --- sources/tech/20151229 Grub 2--Heal your bootloader.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151229 Grub 2--Heal your bootloader.md b/sources/tech/20151229 Grub 2--Heal your bootloader.md index 062c2361d2..19fcca7d08 100644 --- a/sources/tech/20151229 Grub 2--Heal your bootloader.md +++ b/sources/tech/20151229 Grub 2--Heal your bootloader.md @@ -1,3 +1,4 @@ +翻译中。。。。。 Grub 2: Heal your bootloader ================================================================================ **There are few things as irritating as a broken bootloader. Get the best out of Grub 2 and keep it shipshape.** From 84eae5f5b24fdcd5da99a17eb77aaf1f5f5e98b8 Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Wed, 30 Dec 2015 20:39:06 +0800 Subject: [PATCH 0733/1710] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=91Monitor=20Linux=20System=20Performance=20Using=20Nmon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20151223 Monitor Linux System Performance Using Nmon.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md index a0edd16870..b482f17bf6 100644 --- a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md +++ b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md @@ -1,3 +1,4 @@ +sonofelice translating Monitor Linux System Performance Using Nmon ================================================================================ Nmon (also known as Nigel’s Monitor) is a computer performance system monitor tool for the AIX and Linux operating systems developed by IBM employee Nigel Griffiths. The tool displays onscreen or saves to a data file the operating system statistics to aid in the understanding of computer resource use, tuning options and bottlenecks. This system benchmark tool gives you a huge amount of important performance information in one go with a single command. You can easily monitor your system’s CPU, memory, network, disks, file systems, NFS, top processes, resources and power micro-partition information using Nmon. From 6cd7f433eb07fb9d4ff528c2a4c5012d457e7dc6 Mon Sep 17 00:00:00 2001 From: crazyLinuxer <958983476@qq.com> Date: Wed, 30 Dec 2015 21:33:30 +0800 Subject: [PATCH 0734/1710] Update 20151125 Running a mainline kernel on a cellphone.md --- .../tech/20151125 Running a mainline kernel on a cellphone.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20151125 Running a mainline kernel on a cellphone.md b/sources/tech/20151125 Running a mainline kernel on a cellphone.md index c247051def..624c99d2a7 100644 --- a/sources/tech/20151125 Running a mainline kernel on a cellphone.md +++ b/sources/tech/20151125 Running a mainline kernel on a cellphone.md @@ -1,3 +1,5 @@ + +kylepeng93正在翻译 Running a mainline kernel on a cellphone ================================================================================ From 4eea7ab819a7be554faf85deb6ea8155084e23f5 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Wed, 30 Dec 2015 22:54:46 +0800 Subject: [PATCH 0735/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20Part=205=20-=20LFCS:=20How=20to=20Mount/Unmount=20Local=20a?= =?UTF-8?q?nd=20Network=20(Samba=20&=20NFS)=20Filesystems=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【开始翻译】 LFCS系列第五讲:如何在 Linux 中挂载/卸载本地文件系统和网络文件系统(Samba 和 NFS) --- ...nt Local and Network Samba and NFS Filesystems in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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..959095a394 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 @@ +GHLandy Translating + 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. @@ -229,4 +231,4 @@ via: http://www.tecmint.com/mount-filesystem-in-linux/ [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 +[5]:https://identity.linuxfoundation.org/user?destination=pid/1 From b37d0bb90c552073e11fe5a642d2ec1caba2696a Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Wed, 30 Dec 2015 22:56:17 +0800 Subject: [PATCH 0736/1710] Delete Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译,译文放在相应位置。 --- ...esystems and Configuring Swap Partition.md | 193 ------------------ 1 file changed, 193 deletions(-) delete mode 100644 sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md 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 deleted file mode 100644 index 32bf16bb7c..0000000000 --- a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md +++ /dev/null @@ -1,193 +0,0 @@ -GHLandy Translating - -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 From 7a6cbf6205b3e68f89d45662614498eaced759fa Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Wed, 30 Dec 2015 22:58:44 +0800 Subject: [PATCH 0737/1710] =?UTF-8?q?[=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20Part=204=20-=20LFCS:=20Partitioning=20Storage=20Devices,=20?= =?UTF-8?q?Formatting=20Filesystems=20and=20Configuring=20Swap=20Partition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【完成翻译】 LFCS系列第四讲:分区存储设备、格式化文件系统和配置交换(Swap)分区 --- ...esystems and Configuring Swap Partition.md | 195 ++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 translated/tech/LFCS/Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md diff --git a/translated/tech/LFCS/Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md b/translated/tech/LFCS/Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md new file mode 100644 index 0000000000..987ea4a7f8 --- /dev/null +++ b/translated/tech/LFCS/Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md @@ -0,0 +1,195 @@ +GHLandy Translated + +LFCS 系列第四讲:分区存储设备、格式化文件系统和配置交换分区 + +================================================================================ +去年八月份,Linux 基金会发起了 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,给所有系统管理员一个展现自己的机会。通过基础考试后,他们可以胜任在 Linux 上的整体运维工作:包括系统支持、一流水平的诊断和监控以及在必要之时向其他支持团队提交帮助请求等。 + +![Linux Foundation Certified Sysadmin – Part 4](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-4.png) + +LFCS 系列第四讲 + +需要注意的是,Linux 基金会认证是非常严格的,通过与否完全要看个人能力。通过在线链接,你可以随时随地参加 Linux 基金会认证考试。所以,你再也不用到考试中心了,只需要不断提高自己的专业技能和经验就可去参加考试了。 + +请看一下视频,这里将讲解 Linux 基金会认证程序。 + +注:youtube 视频 + + +本讲是《十套教程》系列中的第四讲。在本讲中,我们将涵盖分区存储设备、格式化文件系统和配置交换分区等内容,这些都是 LFCS 认证中的必备知识。 + +### 分区存储设备 ### + +分区是一种将单独的硬盘分成一个或多个区的手段。一个分区只是硬盘的一部分,我们可以认为这部分是独立的磁盘,里边包含一个单一类型的文件系统。分区表则是将硬盘上这些分区与分区标识符联系起来的索引。 + +在 Linux 中,IBM PC 兼容系统里边用于管理传统 MBR(最新到2009年)分区的工具是 fdisk。对于 GPT(2010年至今)分区,我们使用 gdisk。这两个工具都可以通过程序名后面加上设备名称(如 /dev/sdb)进行调用。 + +#### 使用 fdisk 管理 MBR 分区 #### + +我们先来介绍 fdisk: + + # fdisk /dev/sdb + +然后出现提示说进行下一步操作。若不确定如何操作,按下 “m” 键显示帮助。 + +![fdisk Help Menu](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-help.png) + +fdisk 帮助菜单 + +上图中,使用频率最高的选项已高亮显示。你可以随时按下 “p” 显示分区表。 + +![Check Partition Table in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Show-Partition-Table.png) + +显示分区表 + +Id 列显示由 fdisk 分配给每个分区的分区类型(分区 id)。一个分区类型代表一种文件系统的标识符,简单来说,包括该分区上数据的访问方法。 + +请注意,每个分区类型的全面都全面讲解将超出了本教程的范围——本系列教材主要专注于 LFCS 测试,因能力为主。 + +**下面列出一些 fdisk 常用选项:** + +按下 “l”(小写 L)选项来显示所有可以由 fdisk 管理的分区类型。 + +按下 “d” 可以删除现有的分区。若硬盘上有多个分区,fdisk 将询问你要删除那个分区。 + +键入对应的数字,并按下 “w” 保存更改(将更改写入分区表)。 + +在下图的命令中,我们将删除 /dev/sdb2,然后显示(p)分区表来验证更改。 + +![fdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-options.png) + +fdisk 命令选项 + +按下 “n” 后接着按下 “p” 会创建新一个主分区。最后,你可以使用所有的默认值(这将占用所有的可用空间),或者像下面一样自定义分区大小。 + +![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-New-Partition.png) + +创建新分区 + +若 fdisk 分配的分区 Id 并不是我们想用的,可以按下 “t” 来更改。 + +![Change Partition Name in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Partition-Name.png) + +更改分区类型 + +全部设置好分区后,按下 “w” 将更改保存到硬盘分区表上。 + +![Save Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Partition-Changes.png) + +保存分区更改 + +#### 使用 gdisk 管理 GPT 分区 #### + +下面的例子中,我们使用 /dev/sdb。 + + # gdisk /dev/sdb + +必须注意的是,gdisk 可以用于创建 MBR 和 GPT 两种分区表。 + +![Create GPT Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-GPT-Partitions.png) + +创建 GPT 分区 + +使用 GPT 分区方案,我们可以在同一个硬盘上创建最多 128 个分区,单个分区最大以 PB 为单位,而 MBR 分区方案最大的只能 2TB。 + +注意,fdisk 与 gdisk 中大多数命令都是一样的。因此,我们不会详细介绍这些命令选项,而是给出一张使用过程中的截图。 + +![gdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/gdisk-options.png) + +gdisk 命令选项 + +### 格式化文件系统 ### + +一旦创建完需要的分区,我们就必须为分区创建文件系统。查询你所用系统支持的文件系统,请运行: + + # ls /sbin/mk* + +![Check Filesystems Type in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Filesystems.png) + +检查文件系统类型 + +选择文件系统取决于你的需求。你应该考虑到每个文件系统的优缺点以及其特点。选择文件系统需要看的两个重要属性: + +- 日志支持,允许从系统崩溃事件中快速恢复数据。 +- 安全增强式 Linux(SELinux)支持,按照项目 wiki 所说,“安全增强式 Linux 允许用户和管理员更好的把握访问控制权限”。 + +在接下来的例子中,我们通过 mkfs 在 /dev/sdb1上创建 ext4 文件系统(支持日志和 SELinux),标卷为 Tecmint。mkfs 基本语法如下: + + # mkfs -t [filesystem] -L [label] device + 或者 + # mkfs.[filesystem] -L [label] device + +![Create ext4 Filesystems in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystems.png) + +创建 ext4 文件系统 + +### 创建并启用交换分区 ### + +要让 Linux 系统访问虚拟内存,则必须有一个交换分区,当内存(RAM)用完的时候,将硬盘中指定分区(即 Swap 分区)当做内存来使用。因此,当有足够的系统内存(RAM)来满足系统的所有的需求时,我们并不需要划分交换分区。尽管如此,是否使用交换分区取决于管理员。 + +下面列出选择交换分区大小的经验法则: + +物理内存不高于 2GB 时,取两倍物理内存大小即可;物理内存在 2GB 以上时,取一倍物理内存大小即可;并且所取大小应该大于 32MB。 + +所以,如果: + +M为物理内存大小,S 为交换分区大小,单位 GB,那么: + + 若 M < 2 + S = M *2 + 否则 + S = M + 2 + +记住,这只是基本的经验。对于作为系统管理员的你,才是决定是否使用交换分区及其大小的关键。 + +要配置交换分区,首先要划分一个常规分区,大小像我们之前演示的那样来选取。然后添加以下条目到 /etc/fstab 文件中(其中的X要更改为对应的 b 或 c)。 + + /dev/sdX1 swap swap sw 0 0 + +最后,格式化并启用交换分区: + + # mkswap /dev/sdX1 + # swapon -v /dev/sdX1 + +显示交换分区的快照: + + # cat /proc/swaps + +关闭交换分区: + + # swapoff /dev/sdX1 + +下面的例子,我们会使用 fdisk 将 /dev/sdc1(512MB,系统和内存为 256MB)来设置交换分区,下面是我们之前详细提过的步骤。注意,这种情况下我们使用的是指定大小分区。 + +![Create-Swap-Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Swap-Partition.png) + +创建交换分区 + +![Add Swap Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Swap-Partition.png) + +启用交换分区 + +### 结论 ### + +在你的系统管理员之路上,创建分区(包括交换分区)和格式化文件系统是非常重要的一部。我希望本文中所给出的技巧指导你到达你的管理员目标。随时在本讲评论区中发表你的技巧和想法,一起为社区做贡献。 + +参考链接 + +- [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] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者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 From f334cabef84a01dd01f6d318501e596c30a8271b Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Thu, 31 Dec 2015 00:09:54 +0800 Subject: [PATCH 0738/1710] =?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 --- ...tor Linux System Performance Using Nmon.md | 86 ++++++++----------- 1 file changed, 36 insertions(+), 50 deletions(-) diff --git a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md index b482f17bf6..30e22701c4 100644 --- a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md +++ b/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md @@ -1,99 +1,85 @@ sonofelice translating -Monitor Linux System Performance Using Nmon +使用Nmon监控Linux的系统性能 ================================================================================ -Nmon (also known as Nigel’s Monitor) is a computer performance system monitor tool for the AIX and Linux operating systems developed by IBM employee Nigel Griffiths. The tool displays onscreen or saves to a data file the operating system statistics to aid in the understanding of computer resource use, tuning options and bottlenecks. This system benchmark tool gives you a huge amount of important performance information in one go with a single command. You can easily monitor your system’s CPU, memory, network, disks, file systems, NFS, top processes, resources and power micro-partition information using Nmon. +Nmon(得名于Nigel's的监控器)是IBM的员工Nigel Griffiths为AIX和Linux系统开发的一款计算机性能系统监控工具。Nmon可以把操作系统的统计数据展示在屏幕上或者存储到一份数据文件里,来帮助理解计算机资源的使用情况、调整选项和系统瓶颈。这个系统基准测试工具只需要使用一条命令就能得到大量重要的性能数据。使用Nmon可以很轻松的监控系统的CPU、内存、网络、硬盘、文件系统、NFS、高耗进程、资源和微分区功率的信息。 -### Installing Nmon ### +### Nmon 安装 ### -By default nmon is available in the Ubuntu repository. You can easily install nmon by running the following command: +Nmon默认是存在于Ubuntu的仓库中的。你可以通过下面的命令安装Nmon: sudo apt-get install nmon -How to Use Nmon to Monitor Linux Performance - -Once the installation has been finished, you can launch it by typing the `nmon` command in the terminal. +怎么使用Nmon来监控Linux的性能 +安装完成后,通过在终端输入`nmon` 命令来启动Nmon nmon -You wI’ll see the following output: +你会看到下面的输出: ![nmon-output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon-output.png) -You can see from the above screenshot that the nmon command-line utility runs completely in interactive mode, and you can easily toggle statistics using shortcut keys. +从上面的截图可以看到nmon命令行工具完全是交互式运行的,你可以使用快捷键来轻松查看对应的统计数据。 +你可以使用下面的nmon快捷键来显示不同的系统统计数据: -You can use the following nmon keyboard shortcuts to display different system stats: +- `q` : 停止或编辑Nmon +- `h` : 查看帮助 +- `c` : 查看CPU统计数据 +- `m` : 查看内存统计数据 +- `d` : 查看硬盘统计数据 +- `k` : 查看内核统计数据 +- `n` : 查看网络统计数据 +- `N` : 查看NFS统计数据 +- `j` : 查看文件系统统计数据 +- `t` : 查看高耗进程 +- `V` : 查看虚拟内存统计数据 +- `v` : 详细模式 -- `q` : to stop and exit Nmon -- `h` : to see help screen -- `c` : see CPU stats -- `m` : see memory stats -- `d` : see disk stats -- `k` : see kernel stats -- `n` : see network stats -- `N` : see NFS stats -- `j` : see file system stats -- `t` : see top process -- `V` : see virtual memory stats -- `v` : verbose mode +### 核查CPU处理器 ### -### Check CPU by Processor ### - -If you would like to collect some statistics on CPU performance, you should hit the c key on the keyboard. - -After hitting the c key you wI’ll see the following output. +如果你想收集关于CPU性能相关的统计数据,你应该按下键盘上的`c`键,之后你将会看到下面的输出: ![nmon_cpu_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_cpu_output.png) -### Check Top Process Statistics ### +### 核查高耗进程统计数据 ### -To get stats on top processes that are running on your system, press the t key on your keyboard. - -You will see the following output. +如果想收集系统正在运行的高耗进程的统计数据,按键盘上的`t`键,之后你将会看到下面的输出: ![nmon_process_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_process_output.jpg) -### Check Network Statistics ### +### 核查网络统计数据 ### -To get the network stats of your Linux system, just press the n key on your keyboard. - -You wI’ll see the following output: +如果想收集Linux系统网络统计数据,按下`n`键,你将会看到下面输出: ![n_network_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_network_output.png) -### Disk I/O Graphs ### +### 硬盘 I/O 图表 ### -Use the `d` key to get information about disks. - -You wI’ll see the following output: +使用`d` 键获取硬盘相关的信息,你会看到下面输出: ![nmon_disk_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_disk_output.png) -### Check Kernel Information ### +### 核查内核信息 ### -A most important key to use with this tool is `k;` it is used to display some brief information on the kernel of your system. - -You will see the following output after hitting the `k` key on your keyboard. +Nmon一个非常重要的快捷键是`k`键,用来显示系统内核相关的概要信息。按下`k`键之后,会看到下面输出: ![nmon_kernel_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_kernel_output.png) -### Get System Information ### +### 获取系统信息 ### -A very useful key for every system admin is the `r` key which is used to give information on different resources such as machine architecture, operating system version, Linux version and CPU. - -You will see the following output by hitting the `r` key. +对每个系统管理员来说一个非常有用的快捷键是`r`键,可以用来显示计算机系统结构、操作系统版本号和CPU等不同资源的信息。按下`r`键之后会看到下面输出: ![nmon_system_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_system_output.png) -### Conclusion ### +### 总结 ### -There are many other tools that can do the same job of the Nmon, but Nmon is so usee friendly for a Linux beginner. Please feel free to comment if you have any questions. +还有许多其他的工具实现的功能和Nmon一样,不过Nmon对一个Linux新手来说还是很友好的。如果你有什么问题,尽管评论。 -------------------------------------------------------------------------------- via: https://www.maketecheasier.com/monitor-linux-system-performance/ 作者:[Hitesh Jethva][a] -译者:[译者ID](https://github.com/译者ID) +译者:[sonofelice](https://github.com/sonofelice) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b64d869421d63bf6ba9329677c0151dee467f011 Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Thu, 31 Dec 2015 00:11:03 +0800 Subject: [PATCH 0739/1710] =?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 --- .../tech/20151223 Monitor Linux System Performance Using Nmon.md | 1 - 1 file changed, 1 deletion(-) rename {sources => translated}/tech/20151223 Monitor Linux System Performance Using Nmon.md (99%) diff --git a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md b/translated/tech/20151223 Monitor Linux System Performance Using Nmon.md similarity index 99% rename from sources/tech/20151223 Monitor Linux System Performance Using Nmon.md rename to translated/tech/20151223 Monitor Linux System Performance Using Nmon.md index 30e22701c4..70d0f3a11f 100644 --- a/sources/tech/20151223 Monitor Linux System Performance Using Nmon.md +++ b/translated/tech/20151223 Monitor Linux System Performance Using Nmon.md @@ -1,4 +1,3 @@ -sonofelice translating 使用Nmon监控Linux的系统性能 ================================================================================ Nmon(得名于Nigel's的监控器)是IBM的员工Nigel Griffiths为AIX和Linux系统开发的一款计算机性能系统监控工具。Nmon可以把操作系统的统计数据展示在屏幕上或者存储到一份数据文件里,来帮助理解计算机资源的使用情况、调整选项和系统瓶颈。这个系统基准测试工具只需要使用一条命令就能得到大量重要的性能数据。使用Nmon可以很轻松的监控系统的CPU、内存、网络、硬盘、文件系统、NFS、高耗进程、资源和微分区功率的信息。 From fdaa1dc0bb87b91fee1c1a2b1f3cab751c3b17c4 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 31 Dec 2015 06:40:13 +0800 Subject: [PATCH 0740/1710] PUB:20151229 Watch Star Wars In Linux Terminal @zky001 --- ...51229 Watch Star Wars In Linux Terminal.md | 55 +++++++++++++++++++ ...51229 Watch Star Wars In Linux Terminal.md | 49 ----------------- 2 files changed, 55 insertions(+), 49 deletions(-) create mode 100644 published/20151229 Watch Star Wars In Linux Terminal.md delete mode 100644 translated/tech/20151229 Watch Star Wars In Linux Terminal.md diff --git a/published/20151229 Watch Star Wars In Linux Terminal.md b/published/20151229 Watch Star Wars In Linux Terminal.md new file mode 100644 index 0000000000..b92a5b8b61 --- /dev/null +++ b/published/20151229 Watch Star Wars In Linux Terminal.md @@ -0,0 +1,55 @@ +在 Linux 终端下看《星球大战》 +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) + +《星球大战(Star Wars)》已经席卷世界。最新一期的 [《星球大战》系列, 《星球大战7:原力觉醒》,打破了有史以来的记录][1]。 + +虽然我不能帮你得到一张最新的《星球大战》的电影票,但我可以提供给你一种方式,看[星球大战第四集][2],它是非常早期的《星球大战》电影(1977 年)。 + + +不,它不会是高清,也不是蓝光版。相反,它将是 ASCII 版的《星球大战》第四集,你可以在 Linux 终端看它,这才是真正的极客的方式 :) + +### 在 Linux 终端看星球大战 ### + +打开一个终端,使用以下命令: + + telnet towel.blinkenlights.nl + +等待几秒钟,你可以在终端看到类似于以下这样的动画ASCII艺术: + +(LCTT 译注:有时候会解析到效果更好 IPv6 版本上,如果你没有 IPv6 地址,可以重新连接试试;另外似乎线路不稳定,出现卡顿时稍等。) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal.png) + +它将继续播映…… + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-1.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-3.png) + +![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-5.png) + +要停止动画,按 ctrl +],在这之后输入 quit 来退出 telnet 程序。 + +### 更多有趣的终端 ### + +事实上,看《星球大战》并不是你在 Linux 终端下唯一能做有趣的事情。您可以运行[终端里的列车][3]或[通过ASCII艺术得到Linux标志][4]。 + +希望你能享受在 Linux 下看《星球大战》。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/star-wars-linux/ + +作者:[Abhishek][a] +译者:[zky001](https://github.com/zky001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.gamespot.com/articles/star-wars-7-breaks-thursday-night-movie-opening-re/1100-6433246/ +[2]:http://www.imdb.com/title/tt0076759/ +[3]:http://itsfoss.com/ubuntu-terminal-train/ +[4]:http://itsfoss.com/display-linux-logo-in-ascii/ diff --git a/translated/tech/20151229 Watch Star Wars In Linux Terminal.md b/translated/tech/20151229 Watch Star Wars In Linux Terminal.md deleted file mode 100644 index 41b739a9c0..0000000000 --- a/translated/tech/20151229 Watch Star Wars In Linux Terminal.md +++ /dev/null @@ -1,49 +0,0 @@ -在Linux终端看星球大战 -================================================================================ -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) -星球大战席卷世界。最新一期的 [《星球大战》系列, 《星球大战7:原力觉醒》,打破了有史以来的记录][1]. - -虽然我不能帮你得到一张最新的《星球大战》电影的票,但我可以提供给你一种方式,看[星球大战第四集片段][2],它是非常早期的《星球大战》电影。 - -不,它不会是高清,也不是蓝光版。相反,它将是ASCII版的《星球大战》第四集片段,你可以在Linux终端看它,这才是真正的极客的方式 :) - -### 在Linux终端看星球大战 ### - -打开一个终端,使用以下命令: - - telnet towel.blinkenlights.nl - -等待几秒钟,你可以在终端看到类似于以下这样的动画ASCII艺术: - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal.png) - -同时它将继续 - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-1.png) - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png) - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-3.png) - -![](http://itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-5.png) - -要停止动画,按 ctrl +],在这之后输入quit来退出tenlnet程序 - -### 更多有趣的终端 ### -事实上,看《星球大战》并不是你在Linux终端下唯一能做有趣的事情。您可以运行[终端里的列车][3]或[通过ASCII艺术得到Linux标志][4]。 - -我希望你可以在Linux下享受星球争霸 --------------------------------------------------------------------------------- - -via: http://itsfoss.com/star-wars-linux/ - -作者:[Abhishek][a] -译者:[zky001](https://github.com/zky001) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://www.gamespot.com/articles/star-wars-7-breaks-thursday-night-movie-opening-re/1100-6433246/ -[2]:http://www.imdb.com/title/tt0076759/ -[3]:http://itsfoss.com/ubuntu-terminal-train/ -[4]:http://itsfoss.com/display-linux-logo-in-ascii/ From b622e12b53d483fa29126aed575560f5293aaa6b Mon Sep 17 00:00:00 2001 From: Feng Wei Date: Thu, 31 Dec 2015 11:10:12 +0800 Subject: [PATCH 0741/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E4=B8=AD]20151223?= =?UTF-8?q?=20How=20to=20Setup=20SSH=20Login=20Without=20Password=20CentOS?= =?UTF-8?q?=20or=20RHEL.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请任务 --- ...51223 How to Setup SSH Login Without Password CentOS or RHEL.md} | 1 + 1 file changed, 1 insertion(+) rename sources/tech/{20151223 How to Setup SSH Login Without Password CentOS or RHEL.md => [翻译中]20151223 How to Setup SSH Login Without Password CentOS or RHEL.md} (99%) diff --git a/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/sources/tech/[翻译中]20151223 How to Setup SSH Login Without Password CentOS or RHEL.md similarity index 99% rename from sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md rename to sources/tech/[翻译中]20151223 How to Setup SSH Login Without Password CentOS or RHEL.md index b4a2f886a1..3e0fc4cc0d 100644 --- a/sources/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md +++ b/sources/tech/[翻译中]20151223 How to Setup SSH Login Without Password CentOS or RHEL.md @@ -1,3 +1,4 @@ +translating by fw8899 How to Setup SSH Login Without Password CentOS / RHEL ================================================================================ ![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg) From e58e7a4167bb1435323e8c3b9601b5c7f8e06009 Mon Sep 17 00:00:00 2001 From: "hittlle.li" Date: Thu, 31 Dec 2015 13:55:37 +0800 Subject: [PATCH 0742/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20:=20Part=2010=20-=20LFCS=20--=20Understanding=20and=20Learn?= =?UTF-8?q?ing=20Basic=20Shell=20Scriptiong=20and=20Linux=20Filesystem=20T?= =?UTF-8?q?roubleshooting.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sic Shell Scripting and Linux Filesystem Troubleshooting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 3ffb1dc54f..841d5c0625 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,4 @@ +Being translated by hittlle...... 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. @@ -312,4 +313,4 @@ via: http://www.tecmint.com/linux-basic-shell-scripting-and-linux-filesystem-tro [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 +[4]:http://www.tecmint.com/basic-shell-programming-part-ii/ From d1d51c0e558646ebcf06439c70b5b9f457116275 Mon Sep 17 00:00:00 2001 From: cposture Date: Thu, 31 Dec 2015 14:02:40 +0800 Subject: [PATCH 0743/1710] =?UTF-8?q?[Translating=20by=20cposture=2015-12-?= =?UTF-8?q?31]Part=206=20-=20LFCS--Assembling=20Partitions=20as=20RAID=20D?= =?UTF-8?q?evices=20=E2=80=93=20Creating=20&=20=20=20=20=20Managing=20Syst?= =?UTF-8?q?em=20Backups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ons as RAID Devices – Creating & Managing System Backups.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 fd23db110f..21f1d0523b 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,4 @@ +[Translating by cposture 15-12-31] 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. @@ -273,4 +274,4 @@ via: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/ [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 +[4]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ From a08de53bc453c005ca72b3da3dbfaf3a9da5dc0a Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Thu, 31 Dec 2015 14:22:01 +0800 Subject: [PATCH 0744/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20Part=208=20-=20LFCS--Managing=20Users=20and=20Groups=20File?= =?UTF-8?q?=20Permissions=20and=20Attributes=20and=20Enabling=20sudo=20Acc?= =?UTF-8?q?ess=20on=20Accounts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ons and Attributes and Enabling sudo Access on Accounts.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 2cec4de4ae..d45720d964 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 @@ +GHLandy Translating + 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. @@ -327,4 +329,4 @@ via: http://www.tecmint.com/manage-users-and-groups-in-linux/ [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 +[6]:http://www.tecmint.com/vi-editor-usage/ From 869e613069c86ca0cfc95caaf5e4cea7ef5a467d Mon Sep 17 00:00:00 2001 From: CHL Date: Thu, 31 Dec 2015 14:40:29 +0800 Subject: [PATCH 0745/1710] [Translating by Flowsnow] Part 7 - LFCS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flowsnow正在翻译part7 --- ...artup Process and Services SysVinit Systemd and Upstart.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 abf09ee523..3a2dfa844a 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 Flowsnow + 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. @@ -364,4 +366,4 @@ via: http://www.tecmint.com/linux-boot-process-and-manage-services/ [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 +[6]:http://upstart.ubuntu.com/cookbook/ From 536c8163d9e67f3893e3bbd6dfc49ad09ee6f4e5 Mon Sep 17 00:00:00 2001 From: CHL Date: Thu, 31 Dec 2015 14:43:32 +0800 Subject: [PATCH 0746/1710] =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=BF=BB=E8=AF=91p?= =?UTF-8?q?art7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Startup Process and Services SysVinit Systemd and Upstart.md | 2 -- 1 file changed, 2 deletions(-) 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 3a2dfa844a..2a822e8a45 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 Flowsnow - 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. From 9383d826c27445cd663e76377c69bc4ce43c9e9e Mon Sep 17 00:00:00 2001 From: CHL Date: Thu, 31 Dec 2015 14:47:17 +0800 Subject: [PATCH 0747/1710] [Translating by Flowsnow] Part 7 - LFCS: Managing System Startup Process and Services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flowsnow开始翻译part7 --- ...Startup Process and Services SysVinit Systemd and Upstart.md | 2 ++ 1 file changed, 2 insertions(+) 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 2a822e8a45..3a2dfa844a 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 Flowsnow + 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. From e9550c3324e0325900dc7abf662a50d2d65ec57b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 31 Dec 2015 14:57:47 +0800 Subject: [PATCH 0748/1710] Translating by ZTinoZ Signed-off-by: ZTinoZ --- ...lla with Apache and SSL on FreeBSD 10.2.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index 46ce91f327..4d14f87440 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -95,7 +95,7 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz ![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png) -以上步骤都完成之后,我们用root登录mysql shell,然后为bugzilla创建一个新的数据库和用户。 +以上步骤都完成之后,我们用root登录mysql shell,然后为bugzilla安装创建一个新的数据库和用户。 用以下命令登录mysql shell: @@ -130,18 +130,18 @@ bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分 ### 第五步 - 配置虚拟主机 ### -We will install bugzilla on directory "/usr/local/www/bugzilla", so we must create new virtualhost configuration for it. +我们将在"/usr/local/www/bugzilla"目录里安装bugzilla,所以我们必须为它创建新的虚拟主机配置。 -Go to the apache directory and create new directory called "vhost" for virtualhost file : +前往apache目录并为虚拟主机文件创建名为"vhost"的新目录: cd /usr/local/etc/apache24/ mkdir vhost; cd vhost -Now create new file "bugzilla.conf" for the virtualhost file : +现在为虚拟主机文件创建新文件"bugzilla.conf": nano -c bugzilla.conf -Paste configuration below : +将以下配置粘贴进去: ServerName mybugzilla.me @@ -173,28 +173,28 @@ Paste configuration below : 保存并退出。 -If all is done, create new directory for bugzilla installation and then enable the bugzilla virtualhost by adding the virtualhost configuration to httpd.conf file. +上述都完成之后,为bugzilla安装创建新目录并通过添加虚拟主机配置至httpd.conf文件来启用bugzilla虚拟主机。 -Run command below on "apache24" directory : +在"apache24"目录下运行以下命令: mkdir -p /usr/local/www/bugzilla cd /usr/local/etc/apache24/ nano -c httpd.conf -In the end of the line, add configuration below : +文末,添加以下配置: Include etc/apache24/vhost/*.conf -Save and exit. +保存并退出。 -Now test the apache configuration with "apachectl" command and restart it : +现在用"apachectl"命令测试一下apache的配置并重启它: apachectl configtest service apache24 restart ### 第六步 - 安装Bugzilla ### -We can install bugzilla manually by downloading the source, or install it from freebsd repository. In this step we will install bugzilla from freebsd repository with pkg command : +我们可以通过下载源来手动安装bugzilla了,或从freebsd库中安装也可以。在这一步中我们将用pkg命令从freebsd库中安装bugzilla: pkg install bugzilla50 From f1695ece125a2d4395f517c8e8778b430475dd9c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 31 Dec 2015 16:26:37 +0800 Subject: [PATCH 0749/1710] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8D=EF=BC=8C=E4=B8=BA=E4=BA=86?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E8=B5=B7=E8=A7=81=EF=BC=8C=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E7=94=A8=20/=20\=20:=20=E7=AD=89=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @GHLandy --- ...CS--How to Install and Use vi or vim as a Full Text Editor.md} | 0 ...ces, Formatting Filesystems and Configuring Swap Partition.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename translated/tech/LFCS/{Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md => Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md} (100%) rename translated/tech/LFCS/{Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md => Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md} (100%) diff --git a/translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md b/translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md similarity index 100% rename from translated/tech/LFCS/Part 2 - LFCS: How to Install and Use vi or vim as a Full Text Editor.md rename to translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md diff --git a/translated/tech/LFCS/Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md b/translated/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md similarity index 100% rename from translated/tech/LFCS/Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md rename to translated/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md From ce939525c2a1b031f474b6298601849d8d4f2fb9 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 31 Dec 2015 19:22:30 +0800 Subject: [PATCH 0750/1710] translating --- ...ee Software Foundation--Best Quotes of Richard Stallman.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 index af8bb311db..e7dbefff62 100644 --- 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 @@ -1,3 +1,5 @@ +For my dear RMS + 30 Years of Free Software Foundation: Best Quotes of Richard Stallman ================================================================================ 注:youtube 视频 @@ -167,4 +169,4 @@ via: https://tlhp.cf/fsf-richard-stallman/ [a]:https://tlhp.cf/author/paul/ [1]:http://www.gnu.org/ -[2]:http://www.fsf.org/ \ No newline at end of file +[2]:http://www.fsf.org/ From 93ce9ef14f295c6d556d340c533b11c9a87129f0 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Fri, 1 Jan 2016 13:03:55 +0800 Subject: [PATCH 0751/1710] Delete 20151225 What are the best plugins to increase productivity on Emacs.md --- ...ugins to increase productivity on Emacs.md | 79 ------------------- 1 file changed, 79 deletions(-) delete mode 100644 sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md diff --git a/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md b/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md deleted file mode 100644 index 6c3a1c8f98..0000000000 --- a/sources/tech/20151225 What are the best plugins to increase productivity on Emacs.md +++ /dev/null @@ -1,79 +0,0 @@ -zky001翻译中 -What are the best plugins to increase productivity on Emacs -================================================================================ -Over a year ago now, I went looking for the best plugins to [turn Vim into a full-fledged IDE][1]. Interestingly, a lot of the comments on that post were about how Emacs already has most of these plugins built in, and was already a great IDE. Although I can only agree about Emacs' incredible versatility, it is still not the ultimate editor when it comes out of the box. Thankfully, its vast plugin library is here to fix that. But among the plethora of options available to you, it is sometimes hard to know where to start. So for now, let me try to assemble a short list of the indispensable plugins to increase your productivity while using Emacs. Although I am heavily geared towards programming related productivity, most of these plugins would be useful to anyone for any usage. - -### 1. Ido-mode ### - -![](https://c2.staticflickr.com/6/5718/23311895573_c1fb34337c_c.jpg) - -Maybe one of the most useful plugin for beginners, Ido stands for interactively do. It replaces most of the dry prompts with a fancy character matching menu. For example, it will replace the normal prompt to open a file with a list of all the files in the current directory. Type any string, and Ido will try to match it with the most appropriate file. It makes it really easy to visualize your actions, and also to quickly get through a folder where all files are named with the same prefix. - -### 2. Smex ### - -![](https://c2.staticflickr.com/2/1517/23310442314_2a22a60c34_c.jpg) - -Not the most famous one, but a good place to complete what Ido-mode started: Smex can be a fancy replacement to the normal 'M-x' prompt, with a heavy inspiration from Ido-mode. It brings the same interactive search for the commands you would normally have to type after calling 'M-x'. It is simple and efficient, and a great way to save those additional few fractions of a second you normally need. - -### 3. Auto Complete ### - -![](https://c2.staticflickr.com/6/5794/23643004900_3042f77952_c.jpg) - -Before knowing the existence of this plugin, I spent half of my time on Emacs pressing ‘M-/’ to complete my words. Now, I have a fancy pop-up to do it for me. There is not much more to say about it, except that we all need it. - -### 4. YASnippet ### - -![](https://c2.staticflickr.com/2/1688/23830403072_0d8df6ef4c_b.jpg) - -This one is really for the coders. There is always some piece of code that we feel we use all the time. For me, it's 'var_dump(...); exit;' to debug PHP. After a while of typing it over and over, it just occurred to me that I could have it pre-recorded and easily accessible as a snippet of code. With YASnippets, it's easy to import snippet files or make your own. After that, a simple press on the tabulation key will expand a small keyword into a chunk of pre-written code easy to navigate through and modify. - -### 5. Org-mode ### - -![](https://c2.staticflickr.com/6/5687/23570808789_d683c949e4.jpg) - -For disclaimer, I have only recently started using Org-mode. But it has already blown me away. From the hundreds of written pieces I have seen around, Org-mode can change your life. The idea behind it is simple: it is a mode that simplifies note taking while keeping a plain text format, making it easy to navigate through lists of tasks and various data, and perform operations such as filtering by priority or due date, or setting a recurrence. Yet, from this simple idea, you can accomplish a lot, and it is easy to get overwhelmed with all the options. Rather than a long explanation, I urge you to go through [available tutorials][2], watch a lot of videos, and see by yourself how powerful Org-mode is. - -### 6. Helm ### - -![](https://c2.staticflickr.com/2/1489/23310442334_5e6db22b79_c.jpg) - -Some love it, but others are not such a big fan of it. I am part of the later. But with such a huge following, it is impossible to avoid it. Helm aims to transform your Emacs experience completely. Simply described, Helm is a framework that will help you find a file or a command quickly from within Emacs. Based on your input, it will try to use word completion to guide you to the action you have in mind. The feeling is a bit weird at first, but for some, Helm is a religion of its own. Although I am not its fan, I do appreciate helm-occur which a great tool to search for strings in a large document as it shows all occurrences in a separate buffer, making it easy to navigate through them. If you are looking for a quick demo to understand what Helm can do, I recommend [this post][3]. - -### 7. ace-jump-mode ### - -![](https://c2.staticflickr.com/2/1710/23856168871_6df1faa565_c.jpg) - -Another plugin with a big following that I am trying to get on board with is ace-jump-mode. Master this plugin, and you will be promised to transcend the usage of a mouse. Simply described, by triggering ace-jump-mode with a shortcut of your choice, you will be prompted for a character. Enter one, and all words starting with that character will be highlighted with a unique letter. Enter one of the letters on screen, and your cursor will jump straight to the word it is highlighting. I have to admit that it is pretty hard to get the reflex to use it, but once you have it, it will increase your movement speed in a document by a lot. - -### 8. find-file-in-project ### - -![](https://c2.staticflickr.com/2/1492/23570808809_96ec8454a9_c.jpg) - -If you like Sublime text and its very handy 'Ctrl-p' fuzzy search to open any file in a project, then you will love find-file-in-project (or ffip). After setting it up by declaring the root of your version control folder, you can summon easily a cool text bar that quickly scans and searches through your code base for a matching file based on the name you input. I like to have it bound to the F6 key on my keyboard. It is simple and very handy if you do not know the complicate directory structure from the top of your head. - -### 9. Flymake ### - -![](https://c2.staticflickr.com/6/5708/23310442354_cbba657ed3.jpg) - -For IDE lovers, I think that syntax checker is one of the most powerful features. It is great for beginners and handy for tired programmers. And thanks to Flymake, Emacs users can enjoy it too. Since I work in PHP a lot, Flymake does not need any extra configuration. As I write my code, it will automatically check my code and highlight any line that contains a problem. For compiled languages, Flymake will look for a Makefile that it will use to check your code. Absolutely magical. - -### 10. electric-pair ### - -Last, but not least, electric-pair is one of the simplest yet most powerful plugin in my opinion. It just automatically closes whatever parenthesis or bracket you open. It doesn't look like much at first, but trust me. After struggling for the hundredth time to find that matching parenthesis, you will be glad to have a plugin to ensure that all your expressions are balanced. - -To conclude, Emacs is a fantastic tool. Probably not a shocker. Try these plugins and watch as your productivity goes through the roof. This list is of course not exhaustive at all. If you want to bring your contribution, feel free to do so in the comments. I am myself always looking for new plugins to try and new ways to experience Emacs. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/best-plugins-to-increase-productivity-on-emacs.html - -作者:[Adrien Brochard][a] -译者:[zky001](https://github.com/zky001) -校对:[校对者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/turn-vim-full-fledged-ide.html -[2]:http://orgmode.org/worg/org-tutorials/ -[3]:http://tuhdo.github.io/helm-intro.html From 74ca5559941b3aaf306e867843e2af4a70eaebb7 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Fri, 1 Jan 2016 13:05:00 +0800 Subject: [PATCH 0752/1710] Create 20151225 What are the best plugins to increase productivity on Emacs.md --- ...ugins to increase productivity on Emacs.md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md diff --git a/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md b/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md new file mode 100644 index 0000000000..789ba72198 --- /dev/null +++ b/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md @@ -0,0 +1,92 @@ +zky001翻译中 +提高emacs(生产力)效率的最好插件是什么 +================================================================================ +一年前的这个时候, 我想要寻找一个最好的插件 [将VIM打造成一个成熟的全功能的IDE][1]. 有趣的是, 很多评论那篇文章的是关于Emacs是怎么样(如何)已经集成大部分这些插件,已经是一个伟大的IDE了. 尽管我对Emacs的难以置信的多样化表示赞成, 它依旧不是可以开箱即用(安装好不安插件即可用)的高级编辑器. 还好, 其庞大的插件库可以解决这个问题. 但在过多的选项中, 有时很难清楚该如何入手. 因此现在, 让我试着收集一个虽然简短但是不可或缺的插件列表来让你使用Emacs时提高工作效率. 虽然我主要侧重于与编程相关的生产力,但是这些插件将对任何人或对任何使用方法都是有用的. + +### 1. Ido-模式 ### + +![](https://c2.staticflickr.com/6/5718/23311895573_c1fb34337c_c.jpg) + +Ido 或许是对新手最有用的一个插件, Ido 表示交互式的去做.它取代大部分的用花哨的匹配字符提示的枯燥菜单 . 好比说, 它将取代正常的提示来打开一个拥有当前目录中的所有文件列表的文件. 任何字符串类型,Ido 将尝试匹配最合适的文件。它很容易想象你的行为,并迅速通过一个文件夹的所有文件命名相同的前缀来查找. + +### 2. Smex ### + +![](https://c2.staticflickr.com/2/1517/23310442314_2a22a60c34_c.jpg) + +不算最著名的一个,但却是一个好选择来完成那些由Ido-mode开始的工作:Smex可以优雅的替代正常的“M-x”提示,也有由Ido-mode带来的很大的启发。通常输入的命令调用“M-x”之后它带来同样的互动搜索。它既简单又有效,是一个很好的节省那些额外的你通常需要1秒的短时间方式 + +### 3. Auto Complete ### + +![](https://c2.staticflickr.com/6/5794/23643004900_3042f77952_c.jpg) + +知道这个插件的存在之前,我花了我一半的时间在使用Emacs敲击"M-/"来完成代码上。现在,我有一个漂亮的弹出为我去做自动补全。无须多说,只是我们都需要它。 + +### 4. YASnippet ### + +![](https://c2.staticflickr.com/2/1688/23830403072_0d8df6ef4c_b.jpg) + +这是真正的程序员所需利器。总有一些代码,我们觉得我们在它们上面用掉了所有的时间。对我来说,用"var_dump(…);exit;"来调试PHP。经过一段时间一遍又一遍的输入"var_dump(…);exit;",我就想到我可以预先把其作为录制好的,方便的代码片段。YASnippets,很容易导入片段文件或者自己制做。之后,一个简单的按制表键可以将一小关键词扩展成一块预先写好的代码易于使用者浏览和修改。 + + +### 5. Org-mode ### + +![](https://c2.staticflickr.com/6/5687/23570808789_d683c949e4.jpg) + +免责声明,我最近才开始使用Org-mode。但它已经深深的吸引了我。从我看过数以百计的书面作品来说,Org-mode可以改变你的生活。它背后的想法很简单:它是一种模式,简化了笔记,同时保持一个纯文本格式,便于浏览列表的任务和各种数据,并执行操作,如按优先级过滤或到期日期,或设置一个复发日期 。然而,从这个简单的想法,你可以完成很多,但也容易被所有的选项弄的不堪重负。与其去看一个长长的解释,我敦促你去通过[可用教程][2],看很多视频,自己去看看Org-mode是多么强大。 + + +### 6. Helm ### + +![](https://c2.staticflickr.com/2/1489/23310442334_5e6db22b79_c.jpg) + +一些使用者喜欢它,但是其他人没有这么大的使用热情。我是后者的一部分。但在拥有这样一个庞大的追随者群体的情况下,是不可能避免提到它的。Helm旨在完全变换你的Emacs使用体验。简单描述,Helm是一个这样的框架,在Emacs下将帮助您快速找到一个文件或命令。根据您的输入,它将尝试使用词语自动完成指导你大脑的念头变为行动。起初感觉有点奇怪,但对一些人来说,Helm本身就是一个信仰。虽然我不是Helm的粉丝,我欣赏helm-occur这一个伟大的工具在一个大文档搜索字符串并且在一个单独的缓冲区显示所有,因此很容易导航。如果你正在寻找一个快速演示来了解Helm能做什么,我推荐这篇文章[3]。 + + +### 7. ace-jump-mode ### + +![](https://c2.staticflickr.com/2/1710/23856168871_6df1faa565_c.jpg) + +另一个插件有一大群追随者,我试图加入ace-jump-mode的粉丝群。拥有这个插件,你会体验到胜于鼠标的使用。简单的描述,通过触发ace-jump-mode您选择的快捷方式,你将被提示字符。输入一个字符,所有单词将会出现,独特的字母字符将突出显示。输入一个字母在屏幕上,和你的光标会直接跳转到词高亮显示。我不得不承认,这是让反射很难使用它,但是,一旦你拥有它,它会增加你的在一个文档里光标的移动速度。 + + + +### 8. find-file-in-project ### + +![](https://c2.staticflickr.com/2/1492/23570808809_96ec8454a9_c.jpg) + +如果你喜欢Sublime text和它非常方便的“Ctrl-p”模糊搜索打开在一个项目中的任何文件,你将会喜欢上find-file-in-project(或ffip)。通过声明您的版本控制的根文件夹设置后,您可以轻松地收集一个快速扫描的很酷的标题文本并根据您输入的名称匹配的通过代码库搜索文件。我喜欢把它绑定到键盘上面F6键。如果你不知道从你的顶层目录到最基本文件的复杂结构,它很简单,很方便。 + + +### 9. Flymake ### + +![](https://c2.staticflickr.com/6/5708/23310442354_cbba657ed3.jpg) + +IDE的爱好者,我认为语法检查器是IDE最强大的特性之一。它非常适合初学者和方便码累了的程序员。感谢Flymake,Emacs用户也可以享受语法检查器 。因为我工作很多需要PHP,Flymake不需要任何额外的配置。当我写代码的时候,它会自动检查我的代码和高亮任何一个包含一个问题的行。对于编译语言,Flymake将寻找一个Makefile,它将用来检查代码。绝对不可思议。 + + + +### 10. electric-pair ### + +  最后,但并非最不重要,在我看来,electric-pair是最简单但最强大的插件之一。它就自动关闭括号或打开括号。它期初看起来不是很好,但相信我。第一百次挣扎后发现匹配的括号,你会很高兴有一个插件,确保你所有的表达式都是平衡的。   +   + + +总结一下,Emacs是一个奇妙的工具。这可不是一个令人惊哑的说法。试试这些插件和看着你的效率直线飙升。这当然不是详尽的列表。如果你想带来你的贡献,请在评论中这样做。我自己一直在寻找新的插件来体验Emacs,也在找寻新方法来体验Emacs。 + + + + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/best-plugins-to-increase-productivity-on-emacs.html + +作者:[Adrien Brochard][a] +译者:[zky001](https://github.com/zky001) +校对:[校对者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/turn-vim-full-fledged-ide.html +[2]:http://orgmode.org/worg/org-tutorials/ +[3]:http://tuhdo.github.io/helm-intro.html From c40db506402c3121e391168a34413343e8bce589 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Fri, 1 Jan 2016 13:07:49 +0800 Subject: [PATCH 0753/1710] Update 20151225 What are the best plugins to increase productivity on Emacs.md --- ...at are the best plugins to increase productivity on Emacs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md b/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md index 789ba72198..66d9b657c0 100644 --- a/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md +++ b/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md @@ -1,4 +1,4 @@ -zky001翻译中 +zky001翻译完毕 提高emacs(生产力)效率的最好插件是什么 ================================================================================ 一年前的这个时候, 我想要寻找一个最好的插件 [将VIM打造成一个成熟的全功能的IDE][1]. 有趣的是, 很多评论那篇文章的是关于Emacs是怎么样(如何)已经集成大部分这些插件,已经是一个伟大的IDE了. 尽管我对Emacs的难以置信的多样化表示赞成, 它依旧不是可以开箱即用(安装好不安插件即可用)的高级编辑器. 还好, 其庞大的插件库可以解决这个问题. 但在过多的选项中, 有时很难清楚该如何入手. 因此现在, 让我试着收集一个虽然简短但是不可或缺的插件列表来让你使用Emacs时提高工作效率. 虽然我主要侧重于与编程相关的生产力,但是这些插件将对任何人或对任何使用方法都是有用的. From 74736f3411d34e03e531f81f8c1e2d93c6ddd221 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Fri, 1 Jan 2016 20:15:17 +0800 Subject: [PATCH 0754/1710] =?UTF-8?q?zky001=E6=AD=A3=E5=9C=A8=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sktop Fun--Text Mode ASCII-art Box and Comment Drawing.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md index db254d3858..268c6c9477 100644 --- a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md +++ b/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md @@ -1,3 +1,4 @@ +翻译中 Linux / Unix Desktop Fun: Text Mode ASCII-art Box and Comment Drawing ================================================================================ Boxes command is a text filter and a little known tool that can draw any kind of ASCII art box around its input text or code for fun and profit. You can quickly create email signatures, or create regional comments in any programming language. This command was intended to be used with the vim text editor, but can be tied to any text editor which supports filters, as well as from the command line as a standalone tool. @@ -190,7 +191,7 @@ See also via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text-editor.html 作者:Vivek Gite -译者:[译者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/) 荣誉推出 @@ -198,4 +199,4 @@ via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text [1]:http://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html [2]:http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/ [3]:http://www.cyberciti.biz/faq/fedora-sl-centos-redhat6-enable-epel-repo/ -[4]:http://www.cyberciti.biz/faq/vim-inserting-current-date-time-under-linux-unix-osx/ \ No newline at end of file +[4]:http://www.cyberciti.biz/faq/vim-inserting-current-date-time-under-linux-unix-osx/ From daba25f97fc3cda441d91bef3f538782a61c7964 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 2 Jan 2016 15:27:10 +0800 Subject: [PATCH 0755/1710] Translating sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md --- ... Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md b/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md index 3f2f392efb..98275ace42 100644 --- a/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md +++ b/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Install Cockpit in Fedora / CentOS / RHEL/ Arch Linux ================================================================================ Cockpit is a free and open source server management software that makes us easy to administer our GNU/Linux servers via its beautiful web interface frontend. Cockpit helps make linux system administrator, system maintainers and DevOps easy to manage their server and to perform simple tasks, such as administering storage, inspecting journals, starting and stopping services and more. Its journal interface adds aroma in flower making people easy to switch between the terminal and web interface. And moreover, it makes easy to manage not only one server but several multiple networked servers from a single place at the same time with just a single click. It is very light weight and has easy to use web based interface. In this tutorial, we'll learn how we can setup Cockpit and use it to manage our server running Fedora, CentOS, Arch Linux and RHEL distributions as their operating system software. Some of the awesome benefits of Cockpit in our GNU/Linux servers are as follows: From 0038b65f13a97737e0f89c7de6db123cc16ea424 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 2 Jan 2016 16:40:35 +0800 Subject: [PATCH 0756/1710] Translated tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md --- ... Fedora or CentOS or RHEL or Arch Linux.md | 149 ------------------ ... Fedora or CentOS or RHEL or Arch Linux.md | 148 +++++++++++++++++ 2 files changed, 148 insertions(+), 149 deletions(-) delete mode 100644 sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md create mode 100644 translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md diff --git a/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md b/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md deleted file mode 100644 index 98275ace42..0000000000 --- a/sources/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md +++ /dev/null @@ -1,149 +0,0 @@ -ictlyh Translating -How to Install Cockpit in Fedora / CentOS / RHEL/ Arch Linux -================================================================================ -Cockpit is a free and open source server management software that makes us easy to administer our GNU/Linux servers via its beautiful web interface frontend. Cockpit helps make linux system administrator, system maintainers and DevOps easy to manage their server and to perform simple tasks, such as administering storage, inspecting journals, starting and stopping services and more. Its journal interface adds aroma in flower making people easy to switch between the terminal and web interface. And moreover, it makes easy to manage not only one server but several multiple networked servers from a single place at the same time with just a single click. It is very light weight and has easy to use web based interface. In this tutorial, we'll learn how we can setup Cockpit and use it to manage our server running Fedora, CentOS, Arch Linux and RHEL distributions as their operating system software. Some of the awesome benefits of Cockpit in our GNU/Linux servers are as follows: - -1. It consist of systemd service manager for ease. -1. It has a Journal log viewer to perform troubleshoots and log analysis. -1. Storage setup including LVM was never easier before. -1. Basic Network configuration can be applied with Cockpit -1. We can easily add and remove local users and manage multiple servers. - -### 1. Installing Cockpit ### - -First of all, we'll need to setup Cockpit in our linux based server. In most of the distributions, the cockpit package is already available in their official repositories. Here, in this tutorial, we'll setup Cockpit in Fedora 22, CentOS 7, Arch Linux and RHEL 7 from their official repositories. - -#### On CentOS / RHEL #### - -Cockpit is available in the official repository of CenOS and RHEL. So, we'll simply install it using yum manager. To do so, we'll simply run the following command under sudo/root access. - - # yum install cockpit - -![Install Cockpit Centos](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-centos.png) - -#### On Fedora 22/21 #### - -Alike, CentOS, it is also available by default in Fedora's official repository, we'll simply install cockpit using dnf package manager. - - # dnf install cockpit - -![Install Cockpit Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-fedora.png) - -#### On Arch Linux #### - -Cockpit is currently not available in the official repository of Arch Linux but it is available in the Arch User Repository also know as AUR. So, we'll simply run the following yaourt command to install it. - - # yaourt cockpit - -![Install Cockpit Archlinux](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-archlinux.png) - -### 2. Starting and Enabling Cockpit ### - -After we have successfully installed it, we'll gonna start the cockpit server with our service/daemon manager. As of 2015, most of the linux distributions have adopted Systemd whereas some of the linux distributions still run SysVinit to manage daemon, but Cockpit uses systemd for almost everything from running daemons to services. So, we can only setup Cockpit in the latest releases of linux distributions running Systemd. In order to start Cockpit and make it start in every boot of the system, we'll need to run the following command in a terminal or a console. - - # systemctl start cockpit - - # systemctl enable cockpit.socket - - Created symlink from /etc/systemd/system/sockets.target.wants/cockpit.socket to /usr/lib/systemd/system/cockpit.socket. - -### 3. Allowing Firewall ### - -After we have started our cockpit server and enable it to start in every boot, we'll now go for configuring firewall. As we have firewall programs running in our server, we'll need to allow ports in order to make cockpit accessible outside of the server. - -#### On Firewalld #### - - # firewall-cmd --add-service=cockpit --permanent - - success - - # firewall-cmd --reload - - success - -![Cockpit Allowing Firewalld](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-allowing-firewalld.png) - -#### On Iptables #### - - # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT - - # service iptables save - -### 4. Accessing Cockpit Web Interface ### - -Next, we'll gonna finally access the Cockpit web interface using a web browser. We'll simply need to point our web browser to https://ip-address:9090 or https://server.domain.com:9090 according to the configuration. Here, in our tutorial, we'll gonna point our browser to https://128.199.114.17:9090 as shown in the image below. - -![Cockpit Webserver SSL Proceed](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-webserver-ssl-proceed.png) - -We'll be displayed an SSL certification warning as we are using a self-signed SSL certificate. So, we'll simply ignore it and go forward towards the login page, in chrome/chromium, we'll need to click on Show Advanced and then we'll need to click on **Proceed to 128.199.114.17 (unsafe)** . - -![Cockpit Login Screen](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-login-screen.png) - -Now, we'll be asked to enter the login details in order to enter into the dashboard. Here, the username and password is the same as that of the login details we use to login to our linux server. After we enter the login details and click on Log In button, we will be welcomed into the Cockpit Dashboard. - -![Cockpit Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-dashboard.png) - -Here, we'll see all the menu and visualization of CPU, Disk, Network, Storage usages of the server. We'll see the dashboard as shown above. - -#### Services #### - -To manage services, we'll need to click on Services button on the menu situated in the right side of the web page. Then, we'll see the services under 5 categories, Targets, System Services, Sockets, Timers and Paths. - -![Cockpit Services](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-services.png) - -#### Docker Containers #### - -We can even manage docker containers with Cockpit. It is pretty easy to monitor and administer Docker containers with Cockpit. As docker isn't installed and running in our server, we'll need to click on Start Docker. - -![Cockpit Container](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-container.png) - -Cockpit will automatically install and run docker in our server. After its running, we see the following screen. Then, we can manage the docker images, containers as per our requirement. - -![Cockpit Containers Mangement](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-containers-mangement.png) - -#### Journal Log Viewer #### - -Cockpit has a managed log viewer which separates the Errors, Warnings, Notices into different tabs. And we also have a tab All where we can see them all in a single place. - -![Cockpit Journal Logs](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-journal-logs.png) - -#### Networking #### - -Under the networking section, we see two graphs in which there is the visualization of Sending and Receiving speed. And we can see there the list of available interfaces with option to Add Bond, Bridge, VLAN. If we need to configure an interface, we can do so by simply clicking on the interface name. Below everything, we can see the Journal Log Viewer for Networking. - -![Cockpit Network](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-network.png) - -#### Storage #### - -Now, its easy with Cockpit to see the R/W speed of our hard disk. We can see the Journal log of the Storage in order to perform troubleshoot and fixes. A clear visualization bar of how much space is occupied is shown in the page. We can even Unmount, Format, Delete a partition of a Hard Disk and more. Features like creating RAID Device, Volume Group is also available in it. - -![Cockpit Storage](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-storage.png) - -#### Account Management #### - -We can easily create new accounts with Cockpit Web Interface. The accounts created in it is applied to the system's user account. We can change password, specify roles, delete, rename user accounts with it. - -![Cockpit Accounts](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-accounts.png) - -#### Live Terminal #### - -This is an awesome feature built-in with Cockpit. Yes, we can execute commands, do stuffs with the live terminal provided by Cockpit interface. This makes us really easy to switch between the web interface and terminal according to our need. - -![Cockpit Terminal](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-terminal.png) - -### Conclusion ### - -Cockpit is a good free and open source software developed by [Red Hat][1] for making the server management easy and simple. It is best for performing simple system administration tasks and is good for the new system administrators. It is still under pre-release as its stable release hasn't been released yet. So, it is not suitable for production. It is currently developed on the latest release of Fedora, CentOS, Arch Linux, RHEL where systemd is installed by default. If you are willing to install Cockpit in Ubuntu, you can get the PPA access but is currently outdated. 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-cockpit-fedora-centos-rhel-arch-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://www.redhat.com/ \ No newline at end of file diff --git a/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md b/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md new file mode 100644 index 0000000000..38a89dcbc2 --- /dev/null +++ b/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md @@ -0,0 +1,148 @@ +如何在 Fedora/CentOS/RHEL 或 Arch Linux 上安装 Cockpit +================================================================================ +Cockpit 是一个免费开源的服务器管理软件,它使得我们可以通过它好看的 web 前端界面轻松地管理我们的 GNU/Linux 服务器。Cockpit 使得 linux 系统管理员、系统维护员和开发者能轻松地管理他们的服务器并执行一些简单的任务,例如管理存储、检测日志、启动或停止服务以及一些其它任务。它的报告界面添加了一些很好的功能使得可以轻松地在终端和 web 界面之间切换。另外,它不仅使得管理一台服务器变得简单,更重要的是只需要一个单击就可以在一个地方同时管理多个通过网络连接的服务器。它非常轻量级,web 界面也非常简单易用。在这篇博文中,我们会学习如何安装 Cockpit 并用它管理我们的运行着 Fedora、CentOS、Arch Linux 以及 RHEL 发行版操作系统的服务器。下面是 Cockpit 在我们的 GNU/Linux 服务器中一些非常棒的功能: + +1. 它包含 systemd 服务管理器。 +2. 有一个用于故障排除和日志分析的 Journal 日志查看器。 +3. 包括 LVM 在内的存储配置比以前任何时候都要简单。 +4. 用 Cockpit 可以进行基本的网络配置。 +5. 可以轻松地添加和删除用户以及管理多台服务器。 + +### 1. 安装 Cockpit ### + +首先,我们需要在我们基于 linux 的服务器上安装 Cockpit。大部分发行版的官方软件仓库中都有可用的 cockpit 安装包。这篇博文中,我们会在 Fedora 22、CentOS 7、Arch Linux 和 RHEL 7 中通过它们的官方软件仓库安装 Cockpit。 + +#### CentOS / RHEL #### + +CentOS 和 RHEL 官方软件库中有可用的 Cockpit。我们只需要用 yum 管理器就可以安装。只需要以 sudo/root 权限运行下面的命令就可以安装它。 + + # yum install cockpit + +![Centos 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-centos.png) + +#### Fedora 22/21 #### + +和 CentOS 一样, Fedora 的官方软件库默认也有可用的 Cockpit。我们只需要用 dnf 软件包管理器就可以安装 Cockpit。 + + # dnf install cockpit + +![Fedora 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-fedora.png) + +#### Arch Linux #### + +现在 Arch Linux 官方软件库中还没有可用的 Cockpit,但 Arch 用户库(Arch User Repository,AUR)有。只需要运行下面的 yaourt 命令就可以安装。 + + # yaourt cockpit + +![Arch linux 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-archlinux.png) + +### 2. 启动并启用 Cockpit ### + +成功安装完 Cockpit,我们就要用服务/守护进程管理器启动 Cockpit 服务。到了 2015 年,尽管一些 linux 发行版仍然运行 SysVinit 管理守护进程,但大部分 linux 发行版都采用了 Systemd,Cockpit 使用 systemd 完成从运行守护进程到服务几乎所有的功能。因此,我们只能在运行着 Systemd 的最新的 linux 发行版中安装 Cockpit。要启动 Cockpit 并让它在每次系统重启时自动启动,我们需要在终端或控制台中运行下面的命令。 + # systemctl start cockpit + + # systemctl enable cockpit.socket + + 创建从 /etc/systemd/system/sockets.target.wants/cockpit.socket 到 /usr/lib/systemd/system/cockpit.socket 的符号链接。 + +### 3. 允许通过防火墙 ### + +启动 Cockpit 并使得它能在每次系统重启时自动启动后,我们现在要给它配置防火墙。由于我们的服务器上运行着防火墙程序,我们需要允许它通过某些端口使得从服务器外面可以访问 Cockpit。 + +#### Firewalld #### + + # firewall-cmd --add-service=cockpit --permanent + + success + + # firewall-cmd --reload + + success + +![允许 Cockpit 通过 Firewalld](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-allowing-firewalld.png) + +#### Iptables #### + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + + # service iptables save + +### 4. 访问 Cockpit Web 界面 ### + +下面,我们终于要通过 web 浏览器访问 Cockpit web 界面了。根据配置,我们只需要用浏览器打开 https://ip-address:9090 或 https://server.domain.com:9090。在我们这篇博文中,我们用浏览器打开 https://128.199.114.17:9090,正如下图所示。 + +![通过 SSL 访问 Cockpit Web 服务](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-webserver-ssl-proceed.png) + +此时会出现一个 SSL 认证警告,因为我们正在使用一个自签名认证。我们只需要忽略这个警告并进入到登录页面,在 chrome/chromium 中,我们需要点击 Show Advanced 然后点击 **Proceed to 128.199.114.17 (unsafe)**。 + +![Cockpit 登录界面](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-login-screen.png) + +现在,要进入仪表盘,我们需要输入详细的登录信息。这里,用户名和密码和用于登录我们的 linux 服务器的用户名和密码相同。当我们输入登录信息并点击 Log In 按钮后,我们就会进入到 Cockpit 仪表盘。 + +![Cockpit 仪表盘](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-dashboard.png) + +这里我们可以看到所有的菜单以及 CPU、磁盘、网络、存储使用情况的可视化结果。仪表盘正如上图所示。 + +#### 服务 #### + +要管理服务,我们需要点击 web 页面右边菜单中的 Services 按钮。然后,我们会看到服务被分成了 5 个类别,目标、系统服务、套接字、计时器和路径。 + +![Cockpit 服务](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-services.png) + +#### Docker 容器 #### + +我们甚至可以用 Cockpit 管理 docker 容器。用 Cockpit 监控和管理 Docker 容器非常简单。由于我们的服务器中没有安装运行 docker,我们需要点击 Start Docker。 + + +![Cockpit 容器](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-container.png) + +Cockpit 会自动在我们的服务器上安装和运行 docker。启动之后,我们就会看到下面的截图。然后我们就可以按照需求管理 docker 镜像、容器。 + +![Cockpit 容器管理](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-containers-mangement.png) + +#### Journal 日志查看器 #### + +Cockpit 有个日志查看器,它把错误、警告、注意分到不同的标签页。我们也有一个 All 标签页,在这里可以看到所有的日志信息。 + +![Cockpit Journal 日志](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-journal-logs.png) + +#### 网络 #### + +在网络部分,我们可以看到两个可视化发送和接收速度的图。我们可以看到这里有一个可用网卡的列表,还有 Add Bond、Bridge、VLAN 的选项。如果我们需要配置一个网卡,我们只需要点击网卡名称。在下面,我们可以看到网络的 Journal 日志信息。 + +![Cockpit Network](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-network.png) + +#### 存储 #### + +现在,用 Cockpit 可以方便地查看硬盘的读写速度。我们可以查看存储的 Journal 日志以便进行故障排除和修复。在页面中还有一个已用空间的可视化图。我们甚至可以卸载、格式化、删除一块硬盘的某个分区。它还有类似创建 RAID 设备、卷组等攻能。 + +![Cockpit Storage](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-storage.png) + +#### 用户管理 #### + +通过 Cockpit Web 界面我们可以方便地创建新用户。在这里创建的账户会应用到系统用户账户。我们可以用它更改密码、指定角色、以及删除用户账户。 + +![Cockpit Accounts](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-accounts.png) + +#### 实时终端 #### + +Cockpit 还有一个很棒的特性。是的,我们可以执行命令,用 Cockpit 界面提供的实时终端执行任务。这使得我们可以根据我们的需求在 web 界面和终端之间自由切换。 + +![Cockpit 终端](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-terminal.png) + +### 总结 ### + +Cockpit 是由 [Red Hat][1] 开发的使得管理服务器变得轻松简单的免费开源软件。它非常适合于进行简单的系统管理任务和新手系统管理员。它仍然处于开发阶段,还没有稳定版发行。因此不适合于生产环境。它是针对最新的默认安装了 systemd 的 Fedora、CentOS、Arch Linux、RHEL 系统开发的。如果你想在 Ubuntu 上安装 Cockpit,你可以通过 PPA 访问,但现在已经过期了。如果你有任何疑问、建议,请在下面的评论框中反馈给我们,这样我们可以改进和更新我们的内容。非常感谢 ! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-cockpit-fedora-centos-rhel-arch-linux/ + +作者:[Arun Pyasi][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/arunp/ +[1]:http://www.redhat.com/ \ No newline at end of file From 2aec773fc3e9ef5da40e09d479a6802941d998c8 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Sat, 2 Jan 2016 16:54:20 +0800 Subject: [PATCH 0757/1710] =?UTF-8?q?zky001=E6=AD=A3=E5=9C=A8=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...15 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md b/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md index 5424c7cd68..fd26cb0104 100644 --- a/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md +++ b/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md @@ -1,3 +1,4 @@ +翻译中 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10 ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2014/11/LightTable-IDE-logo-icon.png) @@ -101,4 +102,4 @@ via: http://ubuntuhandbook.org/index.php/2015/12/install-light-table-0-8-ubuntu- [a]:http://ubuntuhandbook.org/index.php/about/ [1]:https://github.com/LightTable/LightTable/releases -[2]:https://github.com/LightTable/LightTable/releases/download/0.8.0/lighttable-0.8.0-linux.tar.gz \ No newline at end of file +[2]:https://github.com/LightTable/LightTable/releases/download/0.8.0/lighttable-0.8.0-linux.tar.gz From 73e91522cbe60dcbffdd4ee685e307f96753215c Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sat, 2 Jan 2016 23:50:24 +0800 Subject: [PATCH 0758/1710] =?UTF-8?q?[=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20Part=205=20-=20LFCS--How=20to=20Mount=20or=20Unmount=20Loca?= =?UTF-8?q?l=20and=20Network=20Samba=20and=20NFS=20Filesystems=20in=20Linu?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【完成翻译】 LFCS 系列第五讲:如何在 Linux 中挂载/卸载本地文件系统和网络文件系统(Samba 和 NFS) --- ...work Samba and NFS Filesystems in Linux.md | 246 ++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md diff --git a/translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md b/translated/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..1551f4de0c --- /dev/null +++ b/translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md @@ -0,0 +1,246 @@ +GHLandy Translated + +LFCS 系列第五讲:如何在 Linux 中挂载/卸载本地文件系统和网络文件系统(Samba 和 NFS) + +================================================================================ + +Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时上游团队请求支持的决策能力。 + +![Linux Foundation Certified Sysadmin – Part 5](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-5.png) + +LFCS 系列第五讲 + +请看以下视频,这里边介绍了 Linux 基金会认证程序。 + +注:youtube 视频 + + +本讲是《十套教程》系列中的第三讲,在这一讲里边,我们会解释如何在 Linux 中挂载/卸载本地和网络文件系统。这些都是 LFCS 认证中的必备知识。 + + +### 挂载文件系统 ### + +在个硬盘分好区之后,Linux 需要通过某些方式对硬盘分区上的数据进行访问。Linux 并不会像 DOS 或者 Windows 那样给每个硬盘分区分配一个字母来作为盘符,而是将硬盘分区挂载到统一的目录树上的挂载点。 + +挂载点是一个目录,挂载是一种访问分区上文件系统的方法,挂载文件系统实际上是将一个确切的文件系统(比如一个分区)和目录树中指定的目录联系起来的过程。 + +换句话说,管理存储设备的第一步就是把设备关联到文件系统树。要完成这一步,通常可以这样:用 mount 命令来进行临时挂载(用完的时候,使用 umount 命令来卸载),或者通过编辑 /etc/fstab 文件之后重启系统来永久性挂载,这样每次开机都会进行挂载。 + + +不带任何选项的 mount 命令,可以显示当前已挂载的文件系统。 + + # mount + +![Check Mounted Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/check-mounted-filesystems.png) + +检查已挂载的文件系统 + +另外,mount 命令通常用来挂载文件系统。其基本语法如下: + + # mount -t type device dir -o options + +该命令会指引内核在设备上找到的文件系统(如已格式化为指定类型的文件系统)挂载到指定目录。像这样的形式,mount 命令不会再到 /etc/fstab 文件中进行确认。 + +除非像下面,挂载指定的目录或者设备: + + # mount /dir -o options + 或 + # mount device -o options + +mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上述两种情况下,mount 命令会在 /etc/fstab 查找相应的设备或挂载点),最后尝试完成挂载操作(这个通常可以成功执行,除非你的挂载点或者设备正在使用中,或者你调用 mount 命令的时候没有 root 权限)。 + +你可以看到,mount 命令的每行输出都是如下格式: + + device on directory type (options) + +例如: + + /dev/mapper/debian-home on /home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered) + +读作: + +设备 dev/mapper/debian-home 的格式为 ext4,挂载在 /home 下,并且有以下挂载选项: rw,relatime,user_xattr,barrier=1,data=ordered。 + +**mount 命令选项** + +下面列出 mount 命令的常用选项 + + +- async:运许在将要挂载的文件系统上进行异步 I/O 操作 +- auto:标志文件系统通过 mount -a 命令挂载,与 noauto 相反。 + +- defaults:该选项为 async,auto,dev,exec,nouser,rw,suid 的一个别名。注意,多个选项必须由逗号隔开并且中间没有空格。倘若你不小心在两个选项中间输入了一个空格,mount 命令会把后边的字符解释为另一个参数。 +- loop:将镜像文件(如 .iso 文件)挂载为 loop 设备。该选项可以用来模拟显示光盘中的文件内容。 +- noexec:阻止该文件系统中可执行文件的执行。与 exec 选项相反。 + +- nouser:阻止任何用户(除 root 用户外) 挂载或卸载文件系统。与 user 选项相反。 +- remount:重新挂载文件系统。 +- ro:只读模式挂载。 +- rw:读写模式挂载。 +- relatime:只要访问时间早于修改时间,就更新文件的的访问时间。 +- user_xattr:允许用户设置和移除可扩展文件系统属性。 + +**以 ro 和 noexec 模式挂载设备** + + # mount -t ext4 /dev/sdg1 /mnt -o ro,noexec + +在本例中,我们可以看到,在挂载点 /mnt 中尝试写入文件或者运行可执行文件都会显示相应的错误信息。 + + # 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 -t ext4 /dev/sdg1 /mnt -o defaults + +![Mount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device.png) + +挂载设备 + +在这个例子中,我们发现写入文件和命令都完美执行了。 + +### 卸载设备 ### + +使用 umount 命令卸载设备,意味着将所有的“在使用”数据全部写入到文件系统了,然后可以安全移除文件系统。请注意,倘若你移除一个没有事先正确卸载的文件系统,就会有造成设备损坏和数据丢失的风险。 + +也就是说,你必须设备的盘符或者挂载点中退出,才能卸载设备。换言之,当前工作目录不能是需要卸载设备的挂载点。否则,系统将返回设备繁忙的提示信息。 + +![Unmount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Unmount-Device.png) + +卸载设备 + +离开需卸载设备的挂载点最简单的方法就是,运行不带任何选项的 cd 命令,这样会回到当前用户的家目录。 + + +### 挂载常见的网络文件系统 ### +最常用的两种网络文件系统是 SMB(Server Message Block,服务器消息块)和 NFS(Network File System,网络文件系统)。如果你只向类 Unix 客户端提供共享,用 NFS 就可以了,如果是向 Windows 和其他类 Unix客户端提供共享服务,就需要用到 Samba 了。 + + +扩展阅读 + +- [Setup Samba Server in RHEL/CentOS and Fedora][1] +- [Setting up NFS (Network File System) on RHEL/CentOS/Fedora and Debian/Ubuntu][2] + +下面的例子中,假设 Samba 和 NFS 已经在地址为 192.168.0.10 的服务器上架设好了(请注意,架设 NFS 服务器也是 LFCS 考试中需要考核的能力,我们会在后边中提到)。 + + +#### 在 Linux 中挂载 Samba 共享 #### + +第一步:在 Red Hat 以 Debian 系发行版中安装 samba-client、samba-common 和 cifs-utils 软件包,如下: + + # yum update && yum install samba-client samba-common cifs-utils + # aptitude update && aptitude install samba-client samba-common cifs-utils +然后运行下列命令,查看服务器上可用的 Samba 共享。 + + # smbclient -L 192.168.0.10 + +并输入远程机器上 root 账户的密码。 + +![Mount Samba Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Samba-Share.png) + +挂载 Samba 共享 + +上图中,已经对可以挂载到我们本地系统上的共享进行高亮显示。你只需要与一个远程服务器上的合法用户名及密码就可以访问共享了。 + +第二步:当挂载有密码保护的网络文件系统时候,将你的访问凭证写入到 /etc/fstab 文件中并非明智的选择。你需要将这些信息写入到具有 600 权限的隐藏文件中,像这样: + + # mkdir /media/samba + # echo “username=samba_username” > /media/samba/.smbcredentials + # echo “password=samba_password” >> /media/samba/.smbcredentials + # chmod 600 /media/samba/.smbcredentials + +第三步:然后将下面的内容添加到 /etc/fstab 文件中。 + + # //192.168.0.10/gacanepa /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0 + +第四步:现在可以挂载你的 Samba 共享了。手动挂载(mount //192.168.0.10/gacanepa)或者重启系统并应用 /etc/fstab 中相应行来用就挂载都可以。 + +![Mount Password Protect Samba Share](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Password-Protect-Samba-Share.png) + +挂载有密码保护的 Samba 共享 + +#### 在 Linux 系统中挂载 NFS 共享 #### + +第一步:在 Red Hat 以 Debian 系发行版中安装 nfs-common 和 portmap 软件包。如下: + + # yum update && yum install nfs-utils nfs-utils-lib + # aptitude update && aptitude install nfs-common + +第二步:为 NFS 共享创建挂载点。 + + # mkdir /media/nfs + +第三步:将下面的内容添加到 /etc/fstab 文件中。 + +192.168.0.10:/NFS-SHARE /media/nfs nfs defaults 0 0 + +第四步:现在可以挂载你的 Samba 共享了。手动挂载(mount 192.168.0.10:/NFS-SHARE)或者重启系统并应用 /etc/fstab 中相应行来用就挂载都可以。 + +![Mount NFS Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-NFS-Share.png) + +挂载 NFS 共享 + +### 永久性挂载文件系统 ### + +像前面两个例子那样,/etc/fstab 控制着Linux如何访问硬盘分区及可移动设备。/etc/fstab 由六个字段的内容组成,各个字段之间通过一个空格符或者制表符来分开。井号(#)开始的行只是会被忽略的注释。 + +每一行都按照这个格式来写入: + + + +其中: + +- : 第一个字段指定挂载的设备。大多数发行版本都通过分区的标卷(label)或者 UUID 来指定。这样做可以避免分区号改变是带来的错误。 +- : 第二字段指定挂载点。 +- :文件系统的类型代码与 mount 命令挂载文件系统时使用的类型代码是一样的。通过 auto 类型代码可以让内核自动检测文件系统,这对于可移动设备来说非常方便。注意,该选项可能不是对所有文件系统可用。 +- : 一个(或多个)挂载选项。 +- : 你可能把这个字段设置为 0(否则设置为 1),使得系统启动时禁用 dump 工具(dump 程序曾经是一个常用的备份工具,但现在越来越少用了)对文件系统进行备份。 + +- : 这个字段指定启动系统是是否通过 fsck 来检查文件系统的完整性。0 表示 fsck 不对文件系统进行检查。数字越大,优先级越低。因此,根分区(/)最可能使用数字 1,其他所有需要检查的分区则是以数字 2. + +**Mount 命令例示** + +1. 在系统启动时,通过 TECMINT 标卷来挂载文件系统,并具备 rw 和 noexec 属性,你应该将以下语句添加到 /etc/fstab 文件中。 + + LABEL=TECMINT /mnt ext4 rw,noexec 0 0 + +2. 若你想在系统启动时挂载 DVD 光驱中的内容,添加已下语句。 + + /dev/sr0 /media/cdrom0 iso9660 ro,user,noauto 0 0 + +其中 /dev/sr0 为你的 DVD 光驱。 + +### 总结 ### + +可以放心,在命令行中挂载/卸载本地和网络文件系统将是你作为系统管理员的日常责任的一部分。同时,你需要掌握 /etc/fstab 文件的编写。希望本文对你有帮助。随时在下边发表评论(或者提问),并分享本文到你的朋友圈。 + + +参考链接 + +- [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] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者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 From 25b59c59cb88332b2e64f10ba4d17d2d64e5176e Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sat, 2 Jan 2016 23:51:43 +0800 Subject: [PATCH 0759/1710] Delete Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译,译文放在对应位置 --- ...work Samba and NFS Filesystems in Linux.md | 234 ------------------ 1 file changed, 234 deletions(-) delete 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 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 deleted file mode 100644 index 959095a394..0000000000 --- a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md +++ /dev/null @@ -1,234 +0,0 @@ -GHLandy Translating - -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 From bb0bc00e6da8f42082e9058b6fdc50ba7bcb29df Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sun, 3 Jan 2016 00:00:15 +0800 Subject: [PATCH 0760/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020151125=2020=20Years=20of=20GIMP=20Evolution--Step=20by=20?= =?UTF-8?q?Step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【开始翻译】GIMP 过去的 20 年——一点一点的进步 --- .../talk/20151125 20 Years of GIMP Evolution--Step by Step.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md b/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md index edcef22d7f..681a1d6258 100644 --- a/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md +++ b/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md @@ -1,3 +1,5 @@ +GHLandy Translating + 20 Years of GIMP Evolution: Step by Step ================================================================================ 注:youtube 视频 @@ -168,4 +170,4 @@ via: https://tlhp.cf/20-years-of-gimp-evolution/ [a]:https://tlhp.cf/author/paul/ [1]:https://gimp.org/ -[2]:http://www.gnu.org/ \ No newline at end of file +[2]:http://www.gnu.org/ From 6bd4f7b843ca1a1e4b625aa89a517fbbe8cb4ae9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 Jan 2016 18:39:01 +0800 Subject: [PATCH 0761/1710] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201512?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ll and Configure Multihomed ISC DHCP Server on Debian Linux.md | 0 .../20150806 Installation Guide for Puppet on Ubuntu 15.04.md | 0 ...0824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md | 0 .../{ => 201512}/20150831 Linux workstation security checklist.md | 0 .../20150917 A Repository with 44 Years of Unix Evolution.md | 0 ...151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md | 0 published/{ => 201512}/20151020 how to h2 in apache.md | 0 .../20151022 9 Tips for Improving WordPress Performance.md | 0 .../20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md | 0 .../20151104 How to Install Redis Server on CentOS 7.md | 0 ...orvalds Lambasts Open Source Programmers over Insecure Code.md | 0 ...Progress of a Linux Command Line Operation Using PV Command.md | 0 .../20151109 How to Set Up AWStats On Ubuntu Server.md | 0 ...51117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md | 0 .../20151123 7 ways hackers can use Wi-Fi against you.md | 0 ...151123 How to access Dropbox from the command line in Linux.md | 0 ...3 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md | 0 .../{ => 201512}/20151123 LNAV--Ncurses based log file viewer.md | 0 ...ow to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md | 0 published/{ => 201512}/20151125 The tar command explained.md | 0 .../20151130 eSpeak--Text To Speech Tool For Linux.md | 0 ...51201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md | 0 ...51201 Linux and Unix Port Scanning With netcat [nc] Command.md | 0 ...he Linux ftp command to up- and download files on the shell.md | 0 ...w to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md | 0 .../20151208 Apple Swift Programming Language Comes To Linux.md | 0 ...51208 How to Customize Time and Date Format in Ubuntu Panel.md | 0 .../{ => 201512}/20151208 Install Wetty on Centos or RHEL 6.X.md | 0 ...20151215 How to enable Software Collections (SCL) on CentOS.md | 0 ...1215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md | 0 .../20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md | 0 ...20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md | 0 ... Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md | 0 .../{ => 201512}/20151229 Watch Star Wars In Linux Terminal.md | 0 34 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201512}/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md (100%) rename published/{ => 201512}/20150806 Installation Guide for Puppet on Ubuntu 15.04.md (100%) rename published/{ => 201512}/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md (100%) rename published/{ => 201512}/20150831 Linux workstation security checklist.md (100%) rename published/{ => 201512}/20150917 A Repository with 44 Years of Unix Evolution.md (100%) rename published/{ => 201512}/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md (100%) rename published/{ => 201512}/20151020 how to h2 in apache.md (100%) rename published/{ => 201512}/20151022 9 Tips for Improving WordPress Performance.md (100%) rename published/{ => 201512}/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md (100%) rename published/{ => 201512}/20151104 How to Install Redis Server on CentOS 7.md (100%) rename published/{ => 201512}/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md (100%) rename published/{ => 201512}/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md (100%) rename published/{ => 201512}/20151109 How to Set Up AWStats On Ubuntu Server.md (100%) rename published/{ => 201512}/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md (100%) rename published/{ => 201512}/20151123 7 ways hackers can use Wi-Fi against you.md (100%) rename published/{ => 201512}/20151123 How to access Dropbox from the command line in Linux.md (100%) rename published/{ => 201512}/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md (100%) rename published/{ => 201512}/20151123 LNAV--Ncurses based log file viewer.md (100%) rename published/{ => 201512}/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md (100%) rename published/{ => 201512}/20151125 The tar command explained.md (100%) rename published/{ => 201512}/20151130 eSpeak--Text To Speech Tool For Linux.md (100%) rename published/{ => 201512}/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md (100%) rename published/{ => 201512}/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md (100%) rename published/{ => 201512}/20151202 How to use the Linux ftp command to up- and download files on the shell.md (100%) rename published/{ => 201512}/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md (100%) rename published/{ => 201512}/20151208 Apple Swift Programming Language Comes To Linux.md (100%) rename published/{ => 201512}/20151208 How to Customize Time and Date Format in Ubuntu Panel.md (100%) rename published/{ => 201512}/20151208 Install Wetty on Centos or RHEL 6.X.md (100%) rename published/{ => 201512}/20151215 How to enable Software Collections (SCL) on CentOS.md (100%) rename published/{ => 201512}/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md (100%) rename published/{ => 201512}/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md (100%) rename published/{ => 201512}/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md (100%) rename published/{ => 201512}/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md (100%) rename published/{ => 201512}/20151229 Watch Star Wars In Linux Terminal.md (100%) diff --git a/published/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/published/201512/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md similarity index 100% rename from published/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md rename to published/201512/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md diff --git a/published/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/published/201512/20150806 Installation Guide for Puppet on Ubuntu 15.04.md similarity index 100% rename from published/20150806 Installation Guide for Puppet on Ubuntu 15.04.md rename to published/201512/20150806 Installation Guide for Puppet on Ubuntu 15.04.md diff --git a/published/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md b/published/201512/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md similarity index 100% rename from published/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md rename to published/201512/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md diff --git a/published/20150831 Linux workstation security checklist.md b/published/201512/20150831 Linux workstation security checklist.md similarity index 100% rename from published/20150831 Linux workstation security checklist.md rename to published/201512/20150831 Linux workstation security checklist.md diff --git a/published/20150917 A Repository with 44 Years of Unix Evolution.md b/published/201512/20150917 A Repository with 44 Years of Unix Evolution.md similarity index 100% rename from published/20150917 A Repository with 44 Years of Unix Evolution.md rename to published/201512/20150917 A Repository with 44 Years of Unix Evolution.md diff --git a/published/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/published/201512/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md similarity index 100% rename from published/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md rename to published/201512/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md diff --git a/published/20151020 how to h2 in apache.md b/published/201512/20151020 how to h2 in apache.md similarity index 100% rename from published/20151020 how to h2 in apache.md rename to published/201512/20151020 how to h2 in apache.md diff --git a/published/20151022 9 Tips for Improving WordPress Performance.md b/published/201512/20151022 9 Tips for Improving WordPress Performance.md similarity index 100% rename from published/20151022 9 Tips for Improving WordPress Performance.md rename to published/201512/20151022 9 Tips for Improving WordPress Performance.md diff --git a/published/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md b/published/201512/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md similarity index 100% rename from published/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md rename to published/201512/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md diff --git a/published/20151104 How to Install Redis Server on CentOS 7.md b/published/201512/20151104 How to Install Redis Server on CentOS 7.md similarity index 100% rename from published/20151104 How to Install Redis Server on CentOS 7.md rename to published/201512/20151104 How to Install Redis Server on CentOS 7.md diff --git a/published/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md b/published/201512/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md similarity index 100% rename from published/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md rename to published/201512/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md diff --git a/published/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/published/201512/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md similarity index 100% rename from published/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md rename to published/201512/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md diff --git a/published/20151109 How to Set Up AWStats On Ubuntu Server.md b/published/201512/20151109 How to Set Up AWStats On Ubuntu Server.md similarity index 100% rename from published/20151109 How to Set Up AWStats On Ubuntu Server.md rename to published/201512/20151109 How to Set Up AWStats On Ubuntu Server.md diff --git a/published/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md b/published/201512/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md similarity index 100% rename from published/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md rename to published/201512/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md diff --git a/published/20151123 7 ways hackers can use Wi-Fi against you.md b/published/201512/20151123 7 ways hackers can use Wi-Fi against you.md similarity index 100% rename from published/20151123 7 ways hackers can use Wi-Fi against you.md rename to published/201512/20151123 7 ways hackers can use Wi-Fi against you.md diff --git a/published/20151123 How to access Dropbox from the command line in Linux.md b/published/201512/20151123 How to access Dropbox from the command line in Linux.md similarity index 100% rename from published/20151123 How to access Dropbox from the command line in Linux.md rename to published/201512/20151123 How to access Dropbox from the command line in Linux.md diff --git a/published/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md b/published/201512/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md similarity index 100% rename from published/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md rename to published/201512/20151123 How to install Android Studio on Ubuntu 15.04 or CentOS 7.md diff --git a/published/20151123 LNAV--Ncurses based log file viewer.md b/published/201512/20151123 LNAV--Ncurses based log file viewer.md similarity index 100% rename from published/20151123 LNAV--Ncurses based log file viewer.md rename to published/201512/20151123 LNAV--Ncurses based log file viewer.md diff --git a/published/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md b/published/201512/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md similarity index 100% rename from published/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md rename to published/201512/20151125 How to Install GIMP 2.8.16 in Ubuntu 16.04 or 15.10 or 14.04.md diff --git a/published/20151125 The tar command explained.md b/published/201512/20151125 The tar command explained.md similarity index 100% rename from published/20151125 The tar command explained.md rename to published/201512/20151125 The tar command explained.md diff --git a/published/20151130 eSpeak--Text To Speech Tool For Linux.md b/published/201512/20151130 eSpeak--Text To Speech Tool For Linux.md similarity index 100% rename from published/20151130 eSpeak--Text To Speech Tool For Linux.md rename to published/201512/20151130 eSpeak--Text To Speech Tool For Linux.md diff --git a/published/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md b/published/201512/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md similarity index 100% rename from published/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md rename to published/201512/20151201 How to Install The Latest Arduino IDE 1.6.6 in Ubuntu.md diff --git a/published/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md b/published/201512/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md similarity index 100% rename from published/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md rename to published/201512/20151201 Linux and Unix Port Scanning With netcat [nc] Command.md diff --git a/published/20151202 How to use the Linux ftp command to up- and download files on the shell.md b/published/201512/20151202 How to use the Linux ftp command to up- and download files on the shell.md similarity index 100% rename from published/20151202 How to use the Linux ftp command to up- and download files on the shell.md rename to published/201512/20151202 How to use the Linux ftp command to up- and download files on the shell.md diff --git a/published/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md b/published/201512/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md similarity index 100% rename from published/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md rename to published/201512/20151204 How to Remove Banned IP from Fail2ban on CentOS 6 or CentOS 7.md diff --git a/published/20151208 Apple Swift Programming Language Comes To Linux.md b/published/201512/20151208 Apple Swift Programming Language Comes To Linux.md similarity index 100% rename from published/20151208 Apple Swift Programming Language Comes To Linux.md rename to published/201512/20151208 Apple Swift Programming Language Comes To Linux.md diff --git a/published/20151208 How to Customize Time and Date Format in Ubuntu Panel.md b/published/201512/20151208 How to Customize Time and Date Format in Ubuntu Panel.md similarity index 100% rename from published/20151208 How to Customize Time and Date Format in Ubuntu Panel.md rename to published/201512/20151208 How to Customize Time and Date Format in Ubuntu Panel.md diff --git a/published/20151208 Install Wetty on Centos or RHEL 6.X.md b/published/201512/20151208 Install Wetty on Centos or RHEL 6.X.md similarity index 100% rename from published/20151208 Install Wetty on Centos or RHEL 6.X.md rename to published/201512/20151208 Install Wetty on Centos or RHEL 6.X.md diff --git a/published/20151215 How to enable Software Collections (SCL) on CentOS.md b/published/201512/20151215 How to enable Software Collections (SCL) on CentOS.md similarity index 100% rename from published/20151215 How to enable Software Collections (SCL) on CentOS.md rename to published/201512/20151215 How to enable Software Collections (SCL) on CentOS.md diff --git a/published/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md b/published/201512/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md similarity index 100% rename from published/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md rename to published/201512/20151215 Linux or UNIX Desktop Fun--Let it Snow On Your Desktop.md diff --git a/published/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md b/published/201512/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md similarity index 100% rename from published/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md rename to published/201512/20151215 Linux or UNIX Desktop Fun--Steam Locomotive.md diff --git a/published/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md b/published/201512/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md similarity index 100% rename from published/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md rename to published/201512/20151215 Linux or UNIX Desktop Fun--Terminal ASCII Aquarium.md diff --git a/published/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md b/published/201512/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md similarity index 100% rename from published/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md rename to published/201512/20151215 Linux or Unix Desktop Fun--Cat And Mouse Chase All Over Your Screen.md diff --git a/published/20151229 Watch Star Wars In Linux Terminal.md b/published/201512/20151229 Watch Star Wars In Linux Terminal.md similarity index 100% rename from published/20151229 Watch Star Wars In Linux Terminal.md rename to published/201512/20151229 Watch Star Wars In Linux Terminal.md From ae42a060d01c5dedbb5e7cc0e74c5a6dae6660c3 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 Jan 2016 18:39:42 +0800 Subject: [PATCH 0762/1710] PUB:20151222 Turn Tor socks to http.md @geekpi --- .../20151222 Turn Tor socks to http.md | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) rename {translated/tech => published}/20151222 Turn Tor socks to http.md (52%) diff --git a/translated/tech/20151222 Turn Tor socks to http.md b/published/20151222 Turn Tor socks to http.md similarity index 52% rename from translated/tech/20151222 Turn Tor socks to http.md rename to published/20151222 Turn Tor socks to http.md index 6f50ba2455..77415b8e82 100644 --- a/translated/tech/20151222 Turn Tor socks to http.md +++ b/published/20151222 Turn Tor socks to http.md @@ -1,16 +1,18 @@ -将Tor socks转换成http +将 Tor socks 转换成 http 代理 ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/12/tor-593x445.jpg) -使用tor服务你可以使用不同的工具像Tor浏览器、Foxyproxy和其他事情,有些下载管理器像wget和aria2不能直接直接使用tor socks开始匿名下载,因此我们需要一些工具来将tor socks转换成http代理这样就能用它来下载了。 +你可以通过不同的 Tor 工具来使用 Tor 服务,如 Tor 浏览器、Foxyproxy 和其它东西,像 wget 和 aria2 这样的下载管理器不能直接使用 Tor socks 开始匿名下载,因此我们需要一些工具来将 Tor socks 转换成 http 代理,这样就能用它来下载了。 -**注意**:本教程基于Debian下,其他发行版会有些不同,因此如果你的发行版是基于Debian的,就可以直接使用下面的配置了。 +**注意**:本教程基于 Debian ,其他发行版会有些不同,因此如果你的发行版是基于 Debian 的,就可以直接使用下面的配置了。 -**Polipo** : 这个服务会使用8123端口和127.0.0.1的IP,使用下面的命令来在计算机上安装Polipo: +### Polipo + +这个服务会使用 8123 端口和 127.0.0.1 的 IP 地址,使用下面的命令来在计算机上安装 Polipo: sudo apt install polipo -现在使用这个命令打开Polipo的配置文件: +现在使用如下命令打开 Polipo 的配置文件: sudo nano /etc/polipo/config @@ -21,17 +23,19 @@ socksParentProxy = "localhost:9050" socksProxyType = socks5 -用下面的命令来重启Polipo: +用如下的命令来重启 Polipo: sudo service polipo restart -现在Polipo已经安装好了!在匿名的世界里做你想做的吧!下面是使用的例子: +现在 Polipo 已经安装好了!在匿名的世界里做你想做的吧!下面是使用的例子: pdmt -l "link" -i 127.0.01 -p 8123 -用上面的命令PDMT(Persian下载器)会匿名地下载你的文件。 +通过上面的命令 PDMT(Persian 下载器终端)会匿名地下载你的文件。 -**Proxychains** : 在此服务中你可以设置使用tor或者Lantern代理,但是在使用上它和Polipo和Privoxy有点不同,它不需要使用任何端口!使用下面的命令来安装: +### Proxychains + +在此服务中你可以设置使用 Tor 或者 Lantern 代理,但是在使用上它和 Polipo 和 Privoxy 有点不同,它不需要使用任何端口!使用下面的命令来安装: sudo apt install proxychains @@ -39,17 +43,19 @@ sudo nano /etc/proxychains.conf -现在添加下面的代码到文件底部,这里是tor的端口和IP: +现在添加下面的代码到文件底部,这里是 Tor 的端口和 IP: socks5 127.0.0.1 9050 -如果你在命令的前面加上“proxychains”并运行,它就能通过tor代理来运行: +如果你在命令的前面加上“proxychains”并运行,它就能通过 Tor 代理来运行: proxychains firefoxt proxychains aria2c proxychains wget -**Privoxy** : Privoxy使用8118端口,并且首次可以很轻松地通过privoxy包来安装: +### Privoxy + +Privoxy 使用 8118 端口,可以很轻松地通过 privoxy 包来安装: sudo apt install privoxy @@ -71,7 +77,7 @@ sudo service privoxy restart -服务已经好了!端口是8118,IP是127.0.0.1,就尽情使用吧! +服务已经好了!端口是 8118,IP 是 127.0.0.1,就尽情使用吧! -------------------------------------------------------------------------------- @@ -79,7 +85,7 @@ via: http://www.unixmen.com/turn-tor-socks-http/ 作者:[Hossein heydari][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 d659425d0df46b5078542a10b3df70ec12ddb084 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Sun, 3 Jan 2016 20:06:04 +0800 Subject: [PATCH 0763/1710] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E7=9A=84=E4=B8=80=E4=BA=9B=E4=B8=8D=E5=A5=BD=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改了翻译的一些不好的地方 --- ...are the best plugins to increase productivity on Emacs.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md b/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md index 66d9b657c0..86f163b7ff 100644 --- a/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md +++ b/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md @@ -1,7 +1,6 @@ -zky001翻译完毕 -提高emacs(生产力)效率的最好插件是什么 +提高emacs生产力的最好插件是什么 ================================================================================ -一年前的这个时候, 我想要寻找一个最好的插件 [将VIM打造成一个成熟的全功能的IDE][1]. 有趣的是, 很多评论那篇文章的是关于Emacs是怎么样(如何)已经集成大部分这些插件,已经是一个伟大的IDE了. 尽管我对Emacs的难以置信的多样化表示赞成, 它依旧不是可以开箱即用(安装好不安插件即可用)的高级编辑器. 还好, 其庞大的插件库可以解决这个问题. 但在过多的选项中, 有时很难清楚该如何入手. 因此现在, 让我试着收集一个虽然简短但是不可或缺的插件列表来让你使用Emacs时提高工作效率. 虽然我主要侧重于与编程相关的生产力,但是这些插件将对任何人或对任何使用方法都是有用的. +一年前的这个时候, 我想要寻找一个最好的插件 [将VIM打造成一个成熟的全功能的IDE][1]. 有趣的是, 很多评论那篇文章的是关于Emacs集成大部分这些插件,已经是一个伟大的IDE了. 尽管我对Emacs的难以置信的多样化表示赞成, 它依旧不是可以开箱即用(安装好不安插件即可用)的高级编辑器. 还好, 其庞大的插件库可以解决这个问题. 但在过多的选项中, 有时很难清楚该如何入手. 因此现在, 让我试着收集一个虽然简短但是不可或缺的插件列表来让你使用Emacs时提高工作效率. 虽然我主要侧重于与编程相关的生产力,但是这些插件将对任何人或对任何使用方法都是有用的. ### 1. Ido-模式 ### From 9432924f681ee08df446fe97f5f0176cb56fdfa2 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sun, 3 Jan 2016 23:36:02 +0800 Subject: [PATCH 0764/1710] =?UTF-8?q?[=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20Part=208=20-=20LFCS--Managing=20Users=20and=20Groups=20File?= =?UTF-8?q?=20Permissions=20and=20Attributes=20and=20Enabling=20sudo=20Acc?= =?UTF-8?q?ess=20on=20Accounts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【完成翻译】 LFCS 系列第八讲:管理用户和用户组、文件权限和属性以及启用账户 sudo 访问权限 --- ...es and Enabling sudo Access on Accounts.md | 333 ++++++++++++++++++ 1 file changed, 333 insertions(+) create mode 100644 translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md diff --git a/translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md b/translated/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..5f511676af --- /dev/null +++ b/translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md @@ -0,0 +1,333 @@ +GHLandy Translated + +LFCS 系列第八讲:管理用户和用户组、文件权限和属性以及启用账户 sudo 访问权限 + +================================================================================ + +去年八月份,Linux 基金会发起了全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让世界各地的人能够参与到关于 Linux 系统中间层的基本管理操作的认证考试中去,这项认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时向上游团队请求支持的决策能力。 + +![Linux Users and Groups Management](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-8.png) + +LFCS 系列第八讲 + +请看以下视频,里边将描述 LFCS 认证程序。 + +注:youtube视频 + + +本讲是《十套教程》系列的第八讲,在这一讲中,我们将引导你学习如何在 Linux 管理用户和用户组权限的设置,这些内容是 LFCS 认证开始中的必备知识。 + +由于 Linux 是一个多用户的操作系统(允许多个用户通过不同主机或者终端访问一个独立系统),因此你需要知道如何才能有效地管理用户:如何添加、编辑、禁用和删除用户账户,并赋予他们足以完成自身任务的必要权限。 + +### 添加用户账户 ### + +添加新用户账户,你需要以 root 运行一下两条命令中的任意一条: + + # adduser [new_account] + # useradd [new_account] + +当新用户账户添加到系统时,会自动执行以下操作: + +1. 自动创建用户家目录(默认是 /home/username)。 + +2. 自动拷贝下列隐藏文件到新建用户的家目录,用来设置新用户会话的环境变量。 + + .bash_logout + .bash_profile + .bashrc + +3. 自动创建邮件缓存目录 /var/spool/mail/username。 + +4. 自动创建于用户名相同的用户组。 + +**理解 /etc/passwd 中的内容** + +/etc/passwd 文件中存储了所有用户账户的信息,每个用户在里边都有一条对应的记录,其格式(每个字段用冒号隔开)如下: + + [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] + +- 字段 [username] 和 [Comment] 是自解释的关系。 +- 第二个字段中 x 表明通过用户名 username 登录系统是有密码保护的, 密码保存在 /etc/shadow 文件中。 +- [UID] 和 [GID] 字段用整数表示,代表该用户的用户标识符和对应所在组的组标志符。 +- 字段 [Home directory] 为 username 用户家目录的绝对路径。 +- 字段 [Default shell] 指定用户登录系统时默认使用的 shell。 + +**理解 /etc/group 中的内容** + +/etc/group 文件存储所有用户组的信息。每行记录的格式如下: + + [Group name]:[Group password]:[GID]:[Group members] + +- [Group name] 为用户组名称。 +- 字段 [Group password] 为 x 的话,则说明不适用用户组密码。 +- [GID] 与 /etc/passwd 中保存的 GID 相同。 +- [Group members] 用户组中的用户使用逗号隔开。 + +![Add User Accounts in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-user-accounts.png) + +添加用户账户 + +添加用户账户之后,你可以使用 usermod 命令来修改用户信息中的部分字段,该命令基本语法如下: + + # usermod [options] [username] + +**设置账户的过期时间** + +通过 –expiredate 标记后边接 年-月-日 格式的日期,如下: + + # usermod --expiredate 2014-10-30 tecmint + +**将用户添加到其他组** + +使用 -aG 或者 –append –groups 选项,后边跟着用户组,如果有多个用户组,每个用户组之间使用逗号隔开。 + + # usermod --append --groups root,users tecmint + +**改变用户家目录的默认位置** + +使用 -d 或者 –home 选项,后边跟着新的家目录的绝对路径。 + + # usermod --home /tmp tecmint + +**改变用户的默认 shell** + +使用 –shell 选项,后边跟着新 shell 的路径。 + + # usermod --shell /bin/sh tecmint + +**显示用户所属的用户组** + + # groups tecmint + # id tecmint + +下面,我们一次运行上述命令: + + # 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 命令例示 + +扩展阅读 + +- [15 useradd Command Examples in Linux][1] +- [15 usermod Command Examples in Linux][2] + +对于已有用户账户,我们还可以: + +**通过锁定密码来禁用账户** + +使用 -L (大写 l)或者 –lock 选项来锁定用户密码。 + + # usermod --lock tecmint + +**解锁用户密码** + +使用 –u 或者 –unlock 选项来解锁我们之前锁定的账户。 + + # usermod --unlock tecmint + +![Lock User in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/lock-user-in-linux.png) + +锁定用户账户 + +**为需要对指定文件进行读写的多个用户建立用户组** + +运行下列几条命令来完成: + + # groupadd common_group # 添加新用户组 + # chown :common_group common.txt # 将 common.txt 的用户组修改为 common_group + # usermod -aG common_group user1 # 添加用户 user1 到 common_group 用户组 + # usermod -aG common_group user2 # 添加用户 user2 到 common_group 用户组 + # usermod -aG common_group user3 # 添加用户 user3 到 common_group 用户组 + +**删除用户组** + +通过以下命令删除用户组: + + # groupdel [group_name] + +属于这个 group_name 用户组的文件是不会被删除的,而仅仅是删除了用户组。 + +### Linux 文件权限 ### + +除了我们在 [Setting File Attributes – Part 3][3] 中说到的基本的读取、写入和执行权限外,文件还有一些不常用却很重要的的权限设置,有时候把它当做“特殊权限”。 + +就像之前我们讨论的基本权限,这里同样使用八进制数字或者一个字母(象征性符号)好表示该权限类型。 + +**删除用户账户** + +你可以通过 userdel --remove 命令来删除用户账户。这样会删除用户拥有的家目录和家目录下的所有文件,以及邮件缓存目录。 + + # userdel --remove [username] + +#### 用户组管理 #### + +每次添加新用户,系统会为该用户创建同名的用户组,此时用户组里边只有新建的用户,其他用户可以随后添加进去。建立用户组的目的之一,就是为了通过对指定资源设置权限来完成对这些资源和文件进行访问控制。 + +比如,你有下列用户: + +- user1 (primary group: user1) +- user2 (primary group: user2) +- user3 (primary group: user3) + +他们都需要对你系统里边某个位置的 common.txt 文件,或者 user1 用户刚刚创建的共享进行读写。你可能会运行下列命令: + + # chmod 660 common.txt + 或 + # chmod u=rw,g=rw,o= common.txt [注意最后那个 = 号和文件名之间的空格] + +然而,这样仅仅给文件所属的用户和用户组(本例为 user1)成员的提供了读写权限。你还需要将 user2 和 user3 添加到 user1 组,打这样做也将 user1 用户和用户组的其他文件的权限开放给了 user2 和 user3。 + +这时候,用户组就派上用场了,下面将演示怎么做。 + +**理解 Setuid 位** + +当为可执行文件设置 setuid 位之后,用户运行程序是会继承该程序属主的有效特权。由于这样做会引起安全风险,因此设置 setuid 权限的文件及程序必须尽量少。你会发现,当系统中有用户需要执行 root 用户所管辖的程序时就是设置了 setuid 权限。 + +也就是说,用户不仅仅可以运行这个可执行文件,而且能以 root 权限来运行。比如,先检查 /bin/passwd 的权限,这个可执行文件用于改变账户的密码,并修改 /etc/shadow 文件。超级用户可以改变任意账户的密码,但是其他用户只能改变自己账户的密码。 + +![passwd Command Examples](http://www.tecmint.com/wp-content/uploads/2014/10/passwd-command.png) + +passwd 命令例示 + +因此,所有用户都有权限运行 /bin/passwd,但只有 root 用户可以指定改变指定用户账户的密码。其他用户只能改变其自身的密码。 + +![Change User Password in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/change-user-password.png) + +修改用户密码 + +**理解 Setgid 位** + +设置 setgid 位之后,真实用户的有效 GID 变为属组的 GID。因此,任何用户都能以赋予属组用户的权限来访问文件。另外,当目录置了 setgid 位之后,新建的文件将继承其所属目录的 GID,并且新建的子目录会继承父目录的 setgid 位。通过这个方法,你能够以一个指定用户组的身份来访问该目录里边的文件,而不必管文件属主的主属组。 + + # chmod g+s [filename] + +以八进制形式来设置 setgid 位,在当前基本权限(或者想要设置的权限)前加上数字 2 就行了。 + + # chmod 2755 [directory] + +**给目录设置 SETGID 位** + +![Add Setgid in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-setgid-to-directory.png) + +给命令设置 setgid 位 + +**理解 Sticky 位** + +文件设置了 Sticky 为之后,Linux 会将文件忽略,对于该文件影响到的目录,除了属主或者 root 用户外,其他用户无法删除,甚至重命名目录中其他文件也不行。 + +# chmod o+t [directory] + +以八进制形式来设置 sticky 位,在当前基本权限(或者想要设置的权限)前加上数字 1 就行了。 + +# chmod 1755 [directory] + +若没有 sticky 位,任何有权限读写目录的用户都可删除和重命名文件。因此,sticky 为通常出现在像 /tmp 之类的目录,这些目录是所有人都具有写权限的。 + +![Add Stickybit in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-sticky-bit-to-directory.png) + +给目录设置 sticky 位 + +### Linux 特殊文件属性 ### + +文件还有其他一些属性,用来做进一步的操作限制。比如,阻止对文件的重命名、移动、删除甚至是修改。可以通过使用 [chattr 命令][4] 来设置,并可以使用 lsattr 工具来查看这些属性。设置如下: + + # chattr +i file1 + # chattr +a file2 + +运行这些命令之后,file1 成为不可变状态(即不可移动、重命名、修改或删除),而 file2 进入“仅追加”模式(仅在追加内容模式中打开)。 + +![Protect File from Deletion](http://www.tecmint.com/wp-content/uploads/2014/10/chattr-command.png) + +通过 Chattr 命令来包含文件 + +### 访问 root 账户并启用 sudo ### + +访问 root 账户的方法之一,就是通过输入: + + $ su + +然后输入 root 账户密码。 + +倘若授权成功,你将以 root 身份登录,工作目录则是登录前所在的位置。如果是想要一登录就自动进入 root 用户的家目录,请运行: + $ su - + +然后输入 root 账户密码。 + +![Enable sudo Access on Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Sudo-Access.png) + +为用户启用 sudo 访问权限 + +执行上个步骤需要普通用户知道 root 账户的密码,这样会引起非常严重的安全问题。于是,系统管理员通常会配置 sudo 命令来让普通用户在严格控制的环境中以其他用户身份(通常是 root)来执行命令。所有,可以在严格控制用户的情况下,又允许他运行一条或多条特权命令。 + +- 扩展阅读:[Difference Between su and sudo User][5] + +普通用户通过他自己的用户密码来完成 sudo 授权。输入命令之后会出现输入密码(并不是超级用户密码)的提示,授权成功(只要赋予了用户运行该命令的权限)的话,指定的命令就会运行。 + +系统管理员必须编辑 /etc/sudoers 文件,才能为 sudo 赋予相应权限。通常建议使用 visudo 命令来编辑这个文件,而不是使用文本编辑器来打开它。 + + # visudo + +这样会使用 vim(如果你按照 [Install and Use vim as Editor – Part 2][6] 里边说的来编辑文件)来打开 /etc/sudoers 文件。 + +以下是需要设置的相关的行: + + 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 + +来更加深入了解这些项: + + Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/usr/local/bin" + +这一行指定 sudo 将要使用的目录,这样可以阻止使用用户指定的目录,那样的话可能会危及系统。 + +下一行是用来指定权限的: + + root ALL=(ALL) ALL + +- 第一个 ALL 关键词表明这条规则适用于所有主机。 +- 第二个 ALL 关键词表明第一个字段中指定的用户能以任何用户身份所具有的权限来运行相应命令。 +- 第三个 ALL 关键词表明可以运行任何命令。 + + tecmint ALL=/bin/yum update + +如果 = 号后边没有指定用户,sudo 则默认为 root 用户。本例中,tecmint 用户能以 root身份运行 yum update 命令。 + + gacanepa ALL=NOPASSWD:/bin/updatedb + +NOPASSWD 关键词表明 gacanepa 用户不需要密码,可以直接运行 /bin/updatedb 命令。 + + %admin ALL=(ALL) ALL + +% 符号表示该行应用 admin 用户组。其他部分的含义与对于用户的含义是一样的。本例表示 admin 用户组的成员可以通过任何主机的链接来运行任何命令。 + +通过 sudo -l 命令可以查看,你的账户拥有什么样的权限。 + +![Sudo Access Rules](http://www.tecmint.com/wp-content/uploads/2014/10/sudo-access-rules.png) + +Sudo 访问规则 + +### 总结 ### +对于系统管理员来说,高效能的用户和文件管理技能是非常必要的。本文已经涵盖了这些内容,我们希望你将这些作为一个开始,,然后慢慢进步。随时在下边发表评论或提问,我们会尽快回应的。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-users-and-groups-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者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/ From 676e9ccb0cb9e8b33ee10f7458cd9eddf9f767b4 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sun, 3 Jan 2016 23:36:53 +0800 Subject: [PATCH 0765/1710] Delete Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译,译文放于对应位置。 --- ...es and Enabling sudo Access on Accounts.md | 332 ------------------ 1 file changed, 332 deletions(-) delete mode 100644 sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md 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 deleted file mode 100644 index d45720d964..0000000000 --- a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md +++ /dev/null @@ -1,332 +0,0 @@ -GHLandy Translating - -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/ From f3d89dddfc15844e41d8dc0b97d02718bb8a84f5 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sun, 3 Jan 2016 23:42:57 +0800 Subject: [PATCH 0766/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]20150921=2014=20tips=20for=20teaching=20open=20source=20develo?= =?UTF-8?q?pment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【开始翻译】 开源代码开发的 14 个教学技巧 --- .../20150921 14 tips for teaching open source development.md | 2 ++ 1 file changed, 2 insertions(+) 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 a580f3b776..fb250ac4c6 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,5 @@ +GHLandy 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. From dc65a026a8266bc28d893792a0ec7e4ca67c84e3 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 4 Jan 2016 14:48:54 +0800 Subject: [PATCH 0767/1710] Translating by ZTinoZ --- ...lla with Apache and SSL on FreeBSD 10.2.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index 4d14f87440..b67dc19ac9 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -198,55 +198,55 @@ bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分 pkg install bugzilla50 -If it's done, go to the bugzilla installation directory and install all perl module that needed by bugzilla. +以上步骤都完成之后,前往bugzilla安装目录并安装所有bugzilla需要的perl模块。 cd /usr/local/www/bugzilla ./install-module --all -Wait it until all is finished, it is take the time. +要等到所有都完成,这需要点时间。 -Next, generate the configuration file "localconfig" by executing "checksetup.pl" file on bugzilla installation directory. +下一步,在bugzilla的安装目录中执行"checksetup.pl"文件来生成配置文件"localconfig"。 ./checksetup.pl -You will see the error message about the database configuration, so edit the file "localconfig" with nano editor : +你会看到一条关于数据库配置错误,你得用nano编辑器编辑一下"localconfig"文件: nano -c localconfig -Now add the database that was created on step 3. +现在添加第三步创建的数据库。 - #Line 57 + #第五十七行 $db_name = 'bugzilladb'; - #Line 60 + #第六十行 $db_user = 'bugzillauser'; - #Line 67 + #第六十七行 $db_pass = 'bugzillauser@'; -Save and exit. +保存并退出。 -Then run "checksetup.pl" again : +然后再次运行"checksetup.pl": ./checksetup.pl -You will be prompt about mail and administrator account, fill all of it with your email, user and password. +你会收到输入邮箱名和管理员账号的提示,你只要输入你得邮箱、用户名和密码就行了。 ![Admin Setup](http://blog.linoxide.com/wp-content/uploads/2015/12/Admin-Setup.png) -In the last, we need to change the owner of the installation directory to user "www", then restart apache with service command : +最后,我们需要把安装目录的属主改成"www",然后用服务命令重启apache: cd /usr/local/www/ chown -R www:www bugzilla service apache24 restart -Now Bugzilla is installed, you can see it by visiting mybugzilla.me and you will be redirect to the https connection. +现在Bugzilla已经安装好了,你可以通过访问mybugzilla.me来查看,并且将会重定向到https连接。 -Bugzilla home page. +Bugzilla首页: ![Bugzilla Home](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Home.png) -Bugzilla admin panel. +Bugzilla admin面板: ![Bugzilla Admin Page](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Admin-Page.png) From 57fa60702434c05d254b28f11f4afacac90158f2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 4 Jan 2016 16:19:17 +0800 Subject: [PATCH 0768/1710] =?UTF-8?q?20160104-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... portfolio management software on Linux.md | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 sources/tech/20160104 What is good stock portfolio management software on Linux.md diff --git a/sources/tech/20160104 What is good stock portfolio management software on Linux.md b/sources/tech/20160104 What is good stock portfolio management software on Linux.md new file mode 100644 index 0000000000..258cf104fc --- /dev/null +++ b/sources/tech/20160104 What is good stock portfolio management software on Linux.md @@ -0,0 +1,109 @@ +What is good stock portfolio management software on Linux +================================================================================ +If you are investing in the stock market, you probably understand the importance of a sound portfolio management plan. The goal of portfolio management is to come up with the best investment plan tailored for you, considering your risk tolerance, time horizon and financial goals. Given its importance, no wonder there are no shortage of commercial portfolio management apps and stock market monitoring software, each touting various sophisticated portfolio performance tracking and reporting capabilities. + +For those of you Linux aficionados who are looking for a **good open-source portfolio management tool** to manage and track your stock portfolio on Linux, I would highly recommend a Java-based portfolio manager called [JStock][1]. If you are not a big Java fan, you might be turned off by the fact that JStock runs on a heavyweight JVM. At the same time I am sure many people will appreciate the fact that JStock is instantly accessible on every Linux platform with JRE installed. No hoops to jump through to make it work on your Linux environment. + +The day is gone when "open-source" means "cheap" or "subpar". Considering that JStock is just a one-man job, JStock is impressively packed with many useful features as a portfolio management tool, and all that credit goes to Yan Cheng Cheok! For example, JStock supports price monitoring via watchlists, multiple portfolios, custom/built-in stock indicators and scanners, support for 27 different stock markets and cross-platform cloud backup/restore. JStock is available on multiple platforms (Linux, OS X, Android and Windows), and you can save and restore your JStock portfolios seamlessly across different platforms via cloud backup/restore. + +Sounds pretty neat, huh? Now I am going to show you how to install and use JStock in more detail. + +### Install JStock on Linux ### + +Since JStock is written in Java, you must [install JRE][2] to run it. Note that JStock requires JRE 1.7 or higher. If your JRE version does not meet this requirement, JStock will fail with the following error. + + Exception in thread "main" java.lang.UnsupportedClassVersionError: org/yccheok/jstock/gui/JStock : Unsupported major.minor version 51.0 + +Once you install JRE on your Linux, download the latest JStock release from the official website, and launch it as follows. + + $ wget https://github.com/yccheok/jstock/releases/download/release_1-0-7-13/jstock-1.0.7.13-bin.zip + $ unzip jstock-1.0.7.13-bin.zip + $ cd jstock + $ chmod +x jstock.sh + $ ./jstock.sh + +In the rest of the tutorial, let me demonstrate several useful features of JStock. + +### Monitor Stock Price Movements via Watchlist ### + +On JStock you can monitor stock price movement and automatically get notified by creating one or more watchlists. In each watchlist, you can add multiple stocks you are interested in. Then add your alert thresholds under "Fall Below" and "Rise Above" columns, which correspond to minimum and maximum stock prices you want to set, respectively. + +![](https://c2.staticflickr.com/2/1588/23795349969_37f4b0f23c_c.jpg) + +For example, if you set minimum/maximum prices of AAPL stock to $102 and $115.50, you will be alerted via desktop notifications if the stock price goes below $102 or moves higher than $115.50 at any time. + +You can also enable email alert option, so that you will instead receive email notifications for such price events. To enable email alerts, go to "Options" menu. Under "Alert" tab, turn on "Send message to email(s)" box, and enter your Gmail account. Once you go through Gmail authorization steps, JStock will start sending email alerts to that Gmail account (and optionally CC to any third-party email address). + +![](https://c2.staticflickr.com/2/1644/24080560491_3aef056e8d_b.jpg) + +### Manage Multiple Portfolios ### + +JStock allows you to manage multiple portfolios. This feature is useful if you are using multiple stock brokers. You can create a separate portfolio for each broker and manage your buy/sell/dividend transactions on a per-broker basis. You can switch different portfolios by choosing a particular portfolio under "Portfolio" menu. The following screenshot shows a hypothetical portfolio. + +![](https://c2.staticflickr.com/2/1646/23536385433_df6c036c9a_c.jpg) + +Optionally you can enable broker fee option, so that you can enter any broker fees, stamp duty and clearing fees for each buy/sell transaction. If you are lazy, you can enable fee auto-calculation and enter fee schedules for each brokering firm from the option menu beforehand. Then JStock will automatically calculate and enter fees when you add transactions to your portfolio. + +![](https://c2.staticflickr.com/2/1653/24055085262_0e315c3691_b.jpg) + +### Screen Stocks with Built-in/Custom Indicators ### + +If you are doing any technical analysis on stocks, you may want to screen stocks based on various criteria (so-called "stock indicators"). For stock screening, JStock offers several [pre-built technical indicators][3] that capture upward/downward/reversal trends of individual stocks. The following is a list of available indicators. + +- Moving Average Convergence Divergence (MACD) +- Relative Strength Index (RSI) +- Money Flow Index (MFI) +- Commodity Channel Index (CCI) +- Doji +- Golden Cross, Death Cross +- Top Gainers/Losers + +To install any pre-built indicator, go to "Stock Indicator Editor" tab on JStock. Then click on "Install" button in the right-side panel. Choose "Install from JStock server" option, and then install any indicator(s) you want. + +![](https://c2.staticflickr.com/2/1476/23867534660_b6a9c95a06_c.jpg) + +Once one or more indicators are installed, you can scan stocks using them. Go to "Stock Indicator Scanner" tab, click on "Scan" button at the bottom, and choose any indicator. + +![](https://c2.staticflickr.com/2/1653/24137054996_e8fcd10393_c.jpg) + +Once you select the stocks to scan (e.g., NYSE, NASDAQ), JStock will perform scan, and show a list of stocks captured by the indicator. + +![](https://c2.staticflickr.com/2/1446/23795349889_0f1aeef608_c.jpg) + +Besides pre-built indicators, you can also define custom indicator(s) on your own with a GUI-based indicator editor. The following example screens for stocks whose current price is less than or equal to its 60-day average price. + +![](https://c2.staticflickr.com/2/1605/24080560431_3d26eac6b5_c.jpg) + +### Cloud Backup and Restore between Linux and Android JStock ### + +Another nice feature of JStock is cloud backup and restore. JStock allows you to save and restore your portfolios/watchlists via Google Drive, and this features works seamlessly across different platforms (e.g., Linux and Android). For example, if you saved your JStock portfolios to Google Drive on Android, you can restore them on Linux version of JStock. + +![](https://c2.staticflickr.com/2/1537/24163165565_bb47e04d6c_c.jpg) + +![](https://c2.staticflickr.com/2/1556/23536385333_9ed1a75d72_c.jpg) + +If you don't see your portfolios/watchlists after restoring from Google Drive, make sure that your country is correctly set under "Country" menu. + +JStock Android free version is available from [Google Play store][4]. You will need to upgrade to premium version for one-time payment if you want to use its full features (e.g., cloud backup, alerts, charts). I think the premium version is definitely worth it. + +![](https://c2.staticflickr.com/2/1687/23867534720_18b917028c_c.jpg) + +As a final note, I should mention that its creator, Yan Cheng Cheok, is pretty active in JStock development, and quite responsive in addressing any bugs. Kudos to him! + +What do you think of JStock as portfolio tracking software? + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/stock-portfolio-management-software-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://jstock.org/ +[2]:http://ask.xmodulo.com/install-java-runtime-linux.html +[3]:http://jstock.org/ma_indicator.html +[4]:https://play.google.com/store/apps/details?id=org.yccheok.jstock.gui From 822172c79617c8a9dd115730250637dc71404c8a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 4 Jan 2016 16:19:57 +0800 Subject: [PATCH 0769/1710] =?UTF-8?q?20160104-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...om the command line on Debian or Ubuntu.md | 312 ++++++++++++++++++ 1 file changed, 312 insertions(+) create mode 100644 sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md diff --git a/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md new file mode 100644 index 0000000000..ed21bdb4ce --- /dev/null +++ b/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -0,0 +1,312 @@ +How to use KVM from the command line on Debian or Ubuntu +================================================================================ +There are different ways to manage virtual machines (VMs) running on KVM hypervisor. For example, virt-manager is a popular GUI-based front-end for VM management. However, if you would like to use KVM on a headless server, GUI-based solutions will not be ideal. In fact, you can create and manage KVM VMs purely from the command line using kvm command-line wrapper script. Alternatively, you can use virsh which is an easier-to-use command-line user interface for managing guest VMs. Underneath virsh, it communicates wtih libvirtd service which can control several different hypervisors including KVM, Xen, QEMU, LXC and OpenVZ. + +A command-line management interface such as virsh is also useful when you would like to "automate" the provisioning and management of VMs. Also, the fact that virsh supports multiple hypervisors means you can manage different hypervisors via the same virsh interface. + +In this tutorial, I will demonstrate **how to run KVM from the command line by using virsh on Debian or Ubuntu**. + +### Step One: Verify Hardware Virtualization Support ### + +As a first step, verify that the host CPU is equipped with hardware virtualization extensions (e.g., Intel VT or AMD-V), which are required for KVM. The following command will do. + + $ egrep '(vmx|svm)' --color /proc/cpuinfo + +![](https://c2.staticflickr.com/2/1505/24050288606_758a44c4c6_c.jpg) + +If the output does not contain vmx or svm flag, it means the host CPU does not have hardware virtualization support. Thus you cannot use KVM on the host. After verifying that the host CPU comes with vmx or svm, proceed to install KVM next. + +For KVM, it is not required to run a 64-bit kernel on the KVM host, but generally it is recommended. + +### Step Two: Install KVM ### + +Using apt-get, install KVM and related user-space tools. + + $ sudo apt-get install qemu-kvm libvirt-bin + +During installation, libvirtd group (or libvirt-qemu on Debian) will be created, and your userID will be automatically added to the group. This will allows you to manage VMs as a non-root regular user. You can verify that by using id command, which will show your group IDs: + + $ id + +![](https://c2.staticflickr.com/6/5597/15432586092_64dfb867d3_c.jpg) + +If for some reason, libvirtd (or libvirt-qemu) is not found in your groupID list, you can manually add yourself to the group as follows. + +On Ubuntu: + + $ sudo adduser [youruserID] libvirtd + +On Debian: + + $ sudo adduser [youruserID] libvirt-qemu + +Reload updated group membership info as follows. Upon asked for a password, enter your login password. + + $ exec su -l $USER + +At this point, you should be able to run virsh as a regular user. As a test, try the command below, which will show a list of available VMs (currently none). If you do not encounter a permission error, it means everything is okay so far. + + $ virsh list + +---------- + + Id Name State + ---------------------------------------------------- + +### Step Three: Configure Bridged Networking ### + +One way to enable KVM VMs to access external networks is via a Linux bridge created on a KVM host. The bridge interconnects the virtual interfaces of VMs with the physical interface of the host, so that the VMs can send or receive traffic via the physical interface. This is called bridged networking. + +Here is how to create and configure a Linux bridge br0 for bridged networking with KVM. + +First, install a necessary package, and create a Linux bridge from the command line. + + $ sudo apt-get install bridge-utils + $ sudo brctl addbr br0 + +The next step is to configure Linux bridge in /etc/network/interfaces, so that the bridge is configured automatically upon boot. To use /etc/network/interfaces, you need to disable Network Manager on your system (if you are using it). Follow the [this instruction][1] to disable Network Manager. + +After disabling Network Manager, go ahead and configure Linux bridge br0 in /etc/network/interfaces as follows. + + #auto eth0 + #iface eth0 inet dhcp + + auto br0 + iface br0 inet dhcp + bridge_ports eth0 + bridge_stp off + bridge_fd 0 + bridge_maxwait 0 + +In the above I assume that eth0 is the primary network interface that is connected to external networks. Also, I assume that eth0 is getting its IP address via DHCP. Note that there is no configuration for eth0 in /etc/network/interface. The Linux bridge br0 takes up the configuration of eth0 as eth0 is enslaved to the bridge br0. + +Restart network service, and verify that Linux bridge is configured successfully. If successful, br0 should be assigned the eth0's DHCP IP address, and eth0 should not have any IP address assigned. + + $ sudo /etc/init.d/networking restart + $ ifconfig + +If for any reason eth0 still retains the IP address which is assigned to br0, you may have to explicitly remove the IP address from eth0. + +![](https://c2.staticflickr.com/2/1698/23780708850_66cd7ba6ea_c.jpg) + +### Step Four: Create a VM from the Command Line ### + +With KVM, the configuration of a VM is stored in a domain XML file. Thus, the first step to create a VM is to prepare its domain XML file. + +The following is a sample domain XML file of a VM. You can customize it as needed. + + + alice + f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa + 1048576 + 1048576 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/kvm + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + +The above domain XML file defines the following VM. + +- 1GB memory, one vCPU and one hard drive. +- Disk image: /home/dev/images/alice.img. +- Boot from CD-ROM (/home/dev/iso/CentOS-6.5-x86_64-minimal.iso). +- Networking: one network interface bridged to br0 +- Remote access via VNC. + +The UUID string inside can be randomly generated. To get a random UUID, you can use uuid command-line tool. + + $ sudo apt-get install uuid + $ uuid + +Another way to create a domain XML file is to dump the domain information of an existing VM as follows. + + $ virsh dumpxml alice > bob.xml + +![](https://c2.staticflickr.com/6/5808/23968234602_25e8019ec8_c.jpg) + +### Step Five: Start VM from the Command Line ### + +Before starting a VM, you need to create its initial disk image. For that, you can use qemu-img command, which comes with qemu-kvm package you installed. The following command creates 10GB size empty disk image of qcow2 type: + + $ qemu-img create -f qcow2 /home/dev/images/alice.img 10G + +The advantage of using "qcow2" (as opposed to "raw") as a disk image format is that a "qcow2"-type disk image is not created as a full size (10GB) initially, but grows as the disk gets populated. So it is more space-efficient. + +Now you are ready to start a VM using the domain XML file you created earlier. The following command will create a VM, and automatically start it. + + $ virsh create alice.xml + +---------- + + Domain alice created from alice.xml + +**NOTE**: If you run the above command with an already created VM, it will wipe out the VM without warning. If you already created a VM, you can instead use the following command to just start the VM. + + $ virsh start alice.xml + +Verify that a new domain has been created and started successfully with: + + $ virsh list + +---------- + + Id Name State + ---------------------------------------------------- + 3 alice running + +Also, verify that the virtual interface for the VM (e.g., vnet0) is successfully added to the Linux bridge br0 that you created earlier. + + $ sudo brctl show + +![](https://c2.staticflickr.com/2/1546/23449585383_a371e9e579_c.jpg) + +### Step Six: Remote Access a VM ### + +To access the console of a running VM remotely, you can use any VNC client. + +First, find out the VNC port number for the VM as follows. + + $ sudo netstat -nap | egrep '(kvm|qemu)' + +![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg) + +In this example, the VNC port number for alice VM is 5900. + +Then launch a VNC client, and connect to a VNC server running at :5900. In our example, the VM is supposed to boot into CentOS CD-ROM. + +![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg) + +### Manage VMs with virsh ### + +The following lists common usages of virsh command. + +To create a new guest domain and start a VM: + + $ virsh create alice.xml + +To stop a VM and destroy a guest domain: + + $ virsh destroy alice + +To shutdown a VM (without destroying a domain): + + $ virsh shutdown alice + +To suspend a VM: + + $ virsh suspend alice + +To resume a suspended VM: + + $ virsh resume alice + +To access login console of a running VM: + + $ virsh console alice + +To autostart a VM upon host booting: + + $ virsh autostart alice + +To get domain information of a VM: + + $ virsh dominfo alice + +To edit domain XML of a VM: + + $ virsh edit alice + +The above will invoke the domain XML file of the VM with a default text editor. Any change in the XML will automatically be validated by libvirt for correctness. + +You can also manage VMs from within a virsh session. To create and enter a new virsh session, simply run: + + $ virsh + +At the virsh prompt, you can use any virsh commands. + +![](https://c2.staticflickr.com/6/5645/23708565129_b1ef968b30_c.jpg) + +### Troubleshooting ### + +1. I am getting the error while trying to create a VM: + + error: internal error: no supported architecture for os type 'hvm' + +You can get this error if your hardware does not have hardware virtualization support (e.g., Intel VT or AMD-V), which is required to run KVM. If you are getting this error even when your CPU comes with Intel VT or AMD-V, here are possible solutions: + +First, check if kvm kernel module is missing. + + $ lsmod | grep kvm + +If kvm kernel module is not loaded, you must load it as follows. + + $ sudo modprobe kvm_intel (for Intel processor) + $ sudo modprobe kvm_amd (for AMD processor) + +The second solution is adding "--connect qemu:///system" argument to virsh command as follows. This argument may be needed when you are using more than one hypervisor (e.g., VMware, VirtualBox) on the server hardware. + + $ virsh --connect qemu:///system create alice.xml + +2. I am getting the error while trying to access login console of my VM: + + $ virsh console alice + +---------- + + error: internal error: cannot find character device + +This error occurs because you did not define a console device in the VM's XML file. Add the following inside the "device" section of the XML file. + + + + + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/use-kvm-command-line-debian-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://xmodulo.com/author/nanni +[1]:http://xmodulo.com/disable-network-manager-linux.html From f6e1c6f4bd55d33a0f76e8cdec924bdaed464eca Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 4 Jan 2016 16:26:49 +0800 Subject: [PATCH 0770/1710] =?UTF-8?q?20160104-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Information on Linux Using Command Line.md | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md diff --git a/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md b/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md new file mode 100644 index 0000000000..6d332d57b6 --- /dev/null +++ b/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md @@ -0,0 +1,150 @@ +How to Check Hardware Information on Linux Using Command Line +================================================================================ +![](https://maketecheasier-holisticmedia.netdna-ssl.com/assets/uploads/2015/12/hdd_info_featured-1.png) + +There are many commands available to check hardware information of your Linux system. Some commands report only specific hardware components like CPU or memory while the rest cover multiple hardware units. + +This tutorial takes a quick look at some of the most commonly used commands to check information and configuration details about various hardware devices. + +### lscpu ### + +The `lscpu` command gives you information about the CPU and processing units. It does not have any other options or functionality. + + lscpu + +You will see the following output by running the above command. + +![hdd_info_lscpu](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lscpu.png) + +### lspci ### + +The lspci is another command line tool that lists all the PCI buses and details about the devices connected to them like VGA adapter, graphics card, network adapter, usb ports, SATA controller, etc. + + lspci + +You will see an output similar to the following image. + +![hdd_info_lspci](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci-1.png) + +You can also filter out specific device information by running the following command: + + lspci -v | grep "VGA" -A 12 + +You will see graphics card information similar to the following. + +![hdd_info_lspci_vga](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci_vga.png) + +### lshw ### + +The `lshw` is a general purpose utility that reports detailed and brief information about multiple hardware units like CPU, memory, usb controller, disk, etc. Lshw extracts the information from different “/proc” files. + + lshw -short + +You will see the following information by running the above command. + +![hdd_info_lshw](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lshw.png) + +### lsscsi ### + +You can list all scsi/sata devices like hard drives and optical drives by running the following command: + + lsscsi + +The output wI’ll look something like this image. + +![hdd_info_lsscsi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsscsi-1.png) + +### lsusb ### + +This command shows you the USB controllers and details about devices connected to them. By default, the lsusb command prints brief information. You can also use the verbose option -v to print detailed information about each usb port. + + lsusb + +You will see the following output. + +![hdd_info_lsusb](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsusb.png) + +### Inxi ### + +`Inxi` is a bash script that fetches hardware information from multiple sources and commands on the system and gives you goodlooking reports that non-technical users can read easily. + +By default, `inxi` is not installed in Ubuntu. You can install it by running the following command: + + sudo apt-get install inxi + +After installing inxi, you can get hardware information by running the following command: + + inxi -Fx + +You will see an output similar to the image below. + +![hdd_info_inxi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_inxi.jpg) + +### df ### + +This command gives you brief information about various partitions, their mount points and the used and available space on each. +You can run the `df` command with the `-H` parameter. + + df -H + +You will see the following output. + +![hdd_info_df](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_df-1.png) + +### Free ### + +You can check the amount of used, free and total amount of RAM on your system with the free command. + + free -m + +You will see the following output. + +![hdd_info_free](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_free.png) + +### Dmidecode ### + +The `dmidecode` command is different from all other commands. It extracts hardware information by reading data from the DMI tables. + +To display information about the processor, run: + + sudo dmidecode -t processor + +![hdd_info_dmi_processor](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_processor.jpg) + +To display information about the memory, run: + + sudo dmidecode -t memory + +![hdd_info_dmi_memory](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_memory.png) + +To display information about the bios, run: + + sudo dmidecode -t bios + +![hdd_info_dmi_bios](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_bios.png) + +### Hdparm ### + +The hdparm command gives you information about sata devices like hard disks. + + sudo hdparm + +You will see the following output. + +![hdd_info_hdparm](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_hdparm.png) + +### Conclusion ### + +Each of the commands has a different method of extracting hardware information. You can try more than one of them while looking for specific hardware details. All of the above tools are available in most Linux distros, and can be easily installed from the default repository. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/check-hardware-information-linux/ + +作者:[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 6a45c75309674c02770722e1700bcb3200044344 Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Mon, 4 Jan 2016 23:02:06 +0800 Subject: [PATCH 0771/1710] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=91How=20to=20Check=20Hardware=20Information=20on=20Linux?= =?UTF-8?q?=20Using=20Command=20Line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【翻译中】How to Check Hardware Information on Linux Using Command Line --- ... to Check Hardware Information on Linux Using Command Line.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md b/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md index 6d332d57b6..c793db21b2 100644 --- a/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md +++ b/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md @@ -1,3 +1,4 @@ +sonofelice translating How to Check Hardware Information on Linux Using Command Line ================================================================================ ![](https://maketecheasier-holisticmedia.netdna-ssl.com/assets/uploads/2015/12/hdd_info_featured-1.png) From 68f219f6b242cab86205bfce1ba502c7c722c177 Mon Sep 17 00:00:00 2001 From: Feng Wei Date: Mon, 4 Jan 2016 23:02:56 +0800 Subject: [PATCH 0772/1710] translation complete --- ... SSH Login Without Password CentOS or RHEL.md | 106 ------------------ ...H Login Without Password CentOS or RHEL.md | 105 +++++++++++++++++ 2 files changed, 105 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/[翻译中]20151223 How to Setup SSH Login Without Password CentOS or RHEL.md create mode 100644 translated/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md diff --git a/sources/tech/[翻译中]20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/sources/tech/[翻译中]20151223 How to Setup SSH Login Without Password CentOS or RHEL.md deleted file mode 100644 index 3e0fc4cc0d..0000000000 --- a/sources/tech/[翻译中]20151223 How to Setup SSH Login Without Password CentOS or RHEL.md +++ /dev/null @@ -1,106 +0,0 @@ -translating by fw8899 -How to Setup SSH Login Without Password CentOS / RHEL -================================================================================ -![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg) - -As a system administrator, you plan on using OpenSSH for Linux and automate your daily tasks such as transferring files or database dump file for the backup to another server. To achieve this goal, you need to log in automatically from the host A to host B. Login automatically mean you do not want to enter any password because you want to use ssh from a shell script. - -In this article we’ll show you how to Setup SSH Login without Password on CentOS / RHEL. After automatic login has been configured, you can use it to move the file using SSH (Secure Shell) and secure copy (SCP). - -SSH is open source and the most trusted network protocol which is used to login to the remote server. It is used by system administrators to execute commands, also used to transfer files from one computer to another over a network using SCP protocol. - -After you setup SSH login without password, you can get the following advantages : - -a) Automate your daily task via scripts. -b) Enhance security of your linux server. This is one of the recommended method to prevent a brute force attack on virtual private server (VPS), SSH keys are nearly impossible to decipher by brute force alone. - -### What is ssh-keygen ### - -ssh-keygen is a Unix utility that is used to generate, create, manage the public and private keys for ssh authentication. With the help of the ssh-keygen tool, a user can create passphrase keys for both SSH protocol version 1 and version 2. ssh-keygen creates RSA keys for SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2. - -### What is ssh-copy-id ### - -ssh-copy-id is a script that copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also append the indicated identity file to that machine’s ~/.ssh/authorized_keys file and assigns proper permission to the remote-host’s home. - -### SSH keys ### - -SSH keys provide better and secure way of logging into a linux server with SSH. After you run ssh-keygen, you will generate public key and private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. - -### Setup SSH Login Without Password on CentOS and RHEL. ### - -This steps tested on CentOS 5/6/7, RHEL 5/6/7 and Oracle Linux 6/7. - -Node1 : 192.168.0.9 -Node2 : 192.168.l.10 - -#### Step One : #### - -Test the connection and access from node1 to node2 : - - [root@node1 ~]# ssh root@192.168.0.10 - The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established. - RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42. - Are you sure you want to continue connecting (yes/no)? yes - Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts. - root@192.168.0.10's password: - Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1 - [root@node2 ~]# - -#### Step Two : #### - -Generate public and private keys using ssh-key-gen. Please take note that you can increase security by protecting the private key with a passphrase. - - [root@node1 ~]# ssh-keygen - Generating public/private rsa key pair. - Enter file in which to save the key (/root/.ssh/id_rsa): - 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: - b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local - The key's randomart image is: - +--[ RSA 2048]----+ - | . ++ | - | o o o | - | o o o . | - | . o + .. | - | S . . | - | . .. .| - | o E oo.o | - | = ooo. | - | . o.o. | - +-----------------+ - -#### Step Three : #### - -Copy or transfer the public key to remote-host using ssh-copy-id command. It will append the indicated identity file to ~/.ssh/authorized_keys on node2 : - - [root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10 - root@192.168.0.10's password: - Now try logging into the machine, with "ssh '192.168.0.10'", and check in: - - .ssh/authorized_keys - - to make sure we haven't added extra keys that you weren't expecting. - -#### Step Four : #### - -Try SSH login without Password to node2 : - - [root@node1 ~]# ssh root@192.168.0.10 - Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local - -I hope this article gives you some ideas and quick guide on how to setup SSH login without password on Linux CentOS / RHEL. - --------------------------------------------------------------------------------- - -via: http://www.ehowstuff.com/ssh-login-without-password-centos/ - -作者:[skytech][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.ehowstuff.com/author/skytech/ diff --git a/translated/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/translated/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md new file mode 100644 index 0000000000..a806d76491 --- /dev/null +++ b/translated/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md @@ -0,0 +1,105 @@ +如何在CentOS / RHEL上设置SSH免密码登录 +================================================================================ +![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg) + +作为系统管理员,你计划在Linux上使用OpenSSHell,完成日常工作的自动化,比如文件传输、备份数据库转储文件到另一台服务器。为实现该目标,你需要从主机A能自动登录到主机B。自动登录也就是说,要在shell脚本中使用ssh,而无需要输入任何密码。 + +本文会告诉你怎样在CentOS/RHEL上设置SSH免密码登录。自动登录配置好以后,你可以在它基础上用SSH (Secure Shell) 和secure copy (SCP)移动文件。 + +SSH是开源的,用于远程登录的最为可靠的网络协议。系统管理员用它来执行命令,以及通过SCP协议在网络上向另一台电脑传输文件。 + +通过配置SSH免密码登录,你可以享受到如下的便利: + +a) 用脚本实现日常工作的自动化。 +b) 增强Linux服务器的安全性。这是防范虚拟专用服务器(VPS)遭受暴力破解攻击的一个推荐的方法,SSH 密钥单凭暴力破解是几乎不可攻破的。 + +### 什么是ssh-keygen ### + +ssh-keygen是Unix实用工具包里的一个命令,用来生成、创建和管理SSH认证用的公私钥。通过ssh-keygen命令,用户可以创建支持SSH1和SSH2的密钥。ssh-keygen为SSH1创建RSA密钥,SSH2则可以是RSA或DSA。 + +### 什么是ssh-copy-id ### + +ssh-copy-id是用来将本地公钥拷贝到远程authorized_keys文件的脚本命令,它还会将身份标识文件追加到远程机器的~/.ssh/authorized_keys文件中,并给远程主机的用户主目录适当的的权限 + +### SSH keys ### + +SSH keys为登录Linux服务器提供了更好且安全的机制。运行ssh-keygen后,将会生成公私密钥对。你可以将公钥放置到任意服务器,从持有私钥的客户端连接到服务器的时,会用它来解锁。两者匹配时,系统无需密码就能解除锁定。 + +### 在CentOS和RHEL上设置免密码登录SSH ### + +以下步骤在CentOS 5/6/7、RHEL 5/6/7和Oracle Linux 6/7上测试通过。 + +节点1 : 192.168.0.9 +节点2 : 192.168.l.10 + +#### 步骤1 : #### + +测试节点1到节点2的连接和访问: + + [root@node1 ~]# ssh root@192.168.0.10 + The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established. + RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42. + Are you sure you want to continue connecting (yes/no)? yes + Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts. + root@192.168.0.10's password: + Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1 + [root@node2 ~]# + +#### 步骤二: #### + +使用ssh-key-gen命令生成公钥和私钥,这里要注意的是可以对私钥进行加密保护以增强安全性。 + + [root@node1 ~]# ssh-keygen + Generating public/private rsa key pair. + Enter file in which to save the key (/root/.ssh/id_rsa): + 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: + b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local + The key's randomart image is: + +--[ RSA 2048]----+ + | . ++ | + | o o o | + | o o o . | + | . o + .. | + | S . . | + | . .. .| + | o E oo.o | + | = ooo. | + | . o.o. | + +-----------------+ + +#### 步骤三: #### + + 用ssh-copy-di命令将公钥复制或上传到远程主机,并将身份标识文件追加到节点2的~/.ssh/authorized_keys中: + + [root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10 + root@192.168.0.10's password: + Now try logging into the machine, with "ssh '192.168.0.10'", and check in: + + .ssh/authorized_keys + + to make sure we haven't added extra keys that you weren't expecting. + +#### 步骤四: #### + +验证免密码SSH登录节点2: + + [root@node1 ~]# ssh root@192.168.0.10 + Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local + +我希望这篇文章能帮助到你,为你提供SSH免密码登录CentOS / RHEL的基本认知和快速指南。 + +-------------------------------------------------------------------------------- + +原载: http://www.ehowstuff.com/ssh-login-without-password-centos/ + +作者:[skytech][a] +译者:[fw8899](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/skytech/ From 4031cf6d60d2a14a60079de8a97aa695546da230 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 5 Jan 2016 00:09:38 +0800 Subject: [PATCH 0773/1710] Update 20151215 How to block network traffic by country on Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...151215 How to block network traffic by country on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151215 How to block network traffic by country on Linux.md b/sources/tech/20151215 How to block network traffic by country on Linux.md index 1f2d39f04d..14bdbad711 100644 --- a/sources/tech/20151215 How to block network traffic by country on Linux.md +++ b/sources/tech/20151215 How to block network traffic by country on Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + How to block network traffic by country on Linux ================================================================================ As a system admin who maintains production Linux servers, there are circumstances where you need to **selectively block or allow network traffic based on geographic locations**. For example, you are experiencing denial-of-service attacks mostly originating from IP addresses registered with a particular country. You want to block SSH logins from unknown foreign countries for security reasons. Your company has a distribution right to online videos, which requires it to legally stream to particular countries only. You need to prevent any local host from uploading documents to any non-US remote cloud storage due to geo-restriction company policies. @@ -107,4 +109,4 @@ via: http://xmodulo.com/block-network-traffic-by-country-linux.html [4]:http://xtables-addons.sourceforge.net/ [5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/ [6]:http://ask.xmodulo.com/add-cron-job-linux.html -[7]:https://en.wikipedia.org/wiki/ISO_3166-1 \ No newline at end of file +[7]:https://en.wikipedia.org/wiki/ISO_3166-1 From 12e1e660f328a4517799c0d523db36c2a0ed540f Mon Sep 17 00:00:00 2001 From: crazyLinuxer <958983476@qq.com> Date: Tue, 5 Jan 2016 00:53:06 +0800 Subject: [PATCH 0774/1710] Update 20160104 How to use KVM from the command line on Debian or Ubuntu.md --- ...4 How to use KVM from the command line on Debian or Ubuntu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md index ed21bdb4ce..c91fa32afc 100644 --- a/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md +++ b/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -1,3 +1,4 @@ +kylepeng93翻译中... How to use KVM from the command line on Debian or Ubuntu ================================================================================ There are different ways to manage virtual machines (VMs) running on KVM hypervisor. For example, virt-manager is a popular GUI-based front-end for VM management. However, if you would like to use KVM on a headless server, GUI-based solutions will not be ideal. In fact, you can create and manage KVM VMs purely from the command line using kvm command-line wrapper script. Alternatively, you can use virsh which is an easier-to-use command-line user interface for managing guest VMs. Underneath virsh, it communicates wtih libvirtd service which can control several different hypervisors including KVM, Xen, QEMU, LXC and OpenVZ. From eb3eb38421f9718c4f68c362db79f7267046502b Mon Sep 17 00:00:00 2001 From: kylepeng93 <958983476@qq.com> Date: Tue, 5 Jan 2016 01:43:26 +0800 Subject: [PATCH 0775/1710] =?UTF-8?q?kylepeng93=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4 How to use KVM from the command line on Debian or Ubuntu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md index ed21bdb4ce..733832f224 100644 --- a/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md +++ b/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -1,3 +1,4 @@ +kylepeng93翻译中 How to use KVM from the command line on Debian or Ubuntu ================================================================================ There are different ways to manage virtual machines (VMs) running on KVM hypervisor. For example, virt-manager is a popular GUI-based front-end for VM management. However, if you would like to use KVM on a headless server, GUI-based solutions will not be ideal. In fact, you can create and manage KVM VMs purely from the command line using kvm command-line wrapper script. Alternatively, you can use virsh which is an easier-to-use command-line user interface for managing guest VMs. Underneath virsh, it communicates wtih libvirtd service which can control several different hypervisors including KVM, Xen, QEMU, LXC and OpenVZ. From 353355ea35e725fc03802f751051422a1b8a9a60 Mon Sep 17 00:00:00 2001 From: kylepeng93 <958983476@qq.com> Date: Tue, 5 Jan 2016 02:04:32 +0800 Subject: [PATCH 0776/1710] translated --- ...unning a mainline kernel on a cellphone.md | 42 ------------------- ...unning a mainline kernel on a cellphone.md | 14 +++++++ 2 files changed, 14 insertions(+), 42 deletions(-) delete mode 100644 sources/tech/20151125 Running a mainline kernel on a cellphone.md create mode 100644 translated/tech/20151125 Running a mainline kernel on a cellphone.md diff --git a/sources/tech/20151125 Running a mainline kernel on a cellphone.md b/sources/tech/20151125 Running a mainline kernel on a cellphone.md deleted file mode 100644 index 624c99d2a7..0000000000 --- a/sources/tech/20151125 Running a mainline kernel on a cellphone.md +++ /dev/null @@ -1,42 +0,0 @@ - -kylepeng93正在翻译 -Running a mainline kernel on a cellphone -================================================================================ - -One of the biggest freedoms associated with free software is the ability to replace a program with an updated or modified version. Even so, of the many millions of people using Linux-powered phones, few are able to run a mainline kernel on those phones, even if they have the technical skills to do the replacement. The sad fact is that no mainstream phone available runs mainline kernels. A session at the 2015 Kernel Summit, led by Rob Herring, explored this problem and what might be done to address it. - -When asked, most of the developers in the room indicated that they would prefer to be able to run mainline kernels on their phones — though a handful did say that they would rather not do so. Rob has been working on this problem for the last year and a half in support of Project Ara (mentioned in this article). But the news is not good. - -There is, he said, too much out-of-tree code running on a typical handset; mainline kernels simply lack the drivers needed to make that handset work. A typical phone is running 1-3 million lines of out-of-tree code. Almost all of those phones are stuck on the 3.10 kernel — or something even older. There are all kinds of reasons for this, but the simple fact is that things seem to move too quickly in the handset world for the kernel community to keep up. Is that, he asked, something that we care about? - -Tim Bird noted that the Nexus 1, one of the original Android phones, never ran a mainline kernel and never will. It broke the promise of open source, making it impossible for users to put a new kernel onto their devices. At this point, no phone supports that ability. Peter Zijlstra wondered about how much of that out-of-tree code was duplicated functionality from one handset to the next; Rob noted that he has run into three independently developed hotplug governors so far. - -Dirk Hohndel suggested that few people care. Of the billion phones out there, he said, approximately 27 of them have owners who care about running mainline kernels. The rest just want to get the phone to work. Perhaps developers who are concerned about running mainline kernels are trying to solve the wrong problem. - -Chris Mason said that handset vendors are currently facing the same sorts of problems that distributors dealt with many years ago. They are coping with a lot of inefficient, repeated, duplicated work. Once the distributors [Rob Herring] decided to put their work into the mainline instead of carrying it themselves, things got a lot better. The key is to help the phone manufacturers to realize that they can benefit in the same way; that, rather than pressure from users, is how the problem will be solved. - -Grant Likely raised concerns about security in a world where phones cannot be upgraded. What we need is a real distribution market for phones. But, as long as the vendors are in charge of the operating software, phones will not be upgradeable. We have a big security mess coming, he said. Peter added that, with Stagefright, that mess is already upon us. - -Ted Ts'o said that running mainline kernels is not his biggest concern. He would be happy if the phones on sale this holiday season would be running a 3.18 or 4.1 kernel, rather than being stuck on 3.10. That, he suggested, is a more solvable problem. Steve Rostedt said that would not solve the security problem, but Ted remarked that a newer kernel would at least make it easier to backport fixes. Grant replied that, one year from now, it would all just happen again; shipping newer kernels is just an incremental fix. Kees Cook added that there is not much to be gained from backporting fixes; the real problem is that there are no defenses from bugs (he would expand on this theme in a separate session later in the day). - -Rob said that any kind of solution would require getting the vendors on board. That, though, will likely run into trouble with the sort of lockdown that vendors like to apply to their devices. Paolo Bonzini asked whether it would be possible to sue vendors over unfixed security vulnerabilities, especially when the devices are still under warranty. Grant said that upgradeability had to become a market requirement or it simply wasn't going to happen. It might be a nasty security issue that causes this to happen, or carriers might start requiring it. Meanwhile, kernel developers need to keep pushing in that direction. Rob noted that, beyond the advantages noted thus far, the ability to run mainline kernels would help developers to test and validate new features on Android devices. - -Josh Triplett asked whether the community would be prepared to do what it would take if the industry were to come around to the idea of mainline kernel support. There would be lots of testing and validation of kernels on handsets required; Android Compatibility Test Suite failures would have to be treated as regressions. Rob suggested that this could be discussed next year, after the basic functionality is in place, but Josh insisted that, if the demand were to show up, we would have to be able to give a good answer. - -Tim said that there is currently a big disconnect with the vendor world; vendors are not reporting or contributing anything back to the community at all. They are completely disconnected, so there is no forward progress ever. Josh noted that when vendors do report bugs with the old kernels they are using, the reception tends to be less than friendly. Arnd Bergmann said that what was needed was to get one of the big silicon vendors to commit to the idea and get its hardware to a point where running mainline kernels was possible; that would put pressure on the others. But, he added, that would require the existence of one free GPU driver that got shipped with the hardware — something that does not exist currently. - -Rob put up a list of problem areas, but there was not much time for discussion of the particulars. WiFi drivers continue to be an issue, especially with the new features being added in the Android world. Johannes Berg agreed that the new features are an issue; the Android developers do not even talk about them until they ship with the hardware. Support for most of those features does eventually land in the mainline kernel, though. - -As things wound down, Ben Herrenschmidt reiterated that the key was to get vendors to realize that working with the mainline kernel is in their own best interest; it saves work in the long run. Mark Brown said that, in past years when the kernel version shipped with Android moved forward more reliably, the benefits of working upstream were more apparent to vendors. Now that things seem to be stuck on 3.10, that pressure is not there in the same way. The session ended with developers determined to improve the situation, but without any clear plan for getting there. - --------------------------------------------------------------------------------- - -via: https://lwn.net/Articles/662147/ - -作者:[Jonathan Corbet][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://lwn.net/Articles/KernelSummit2015/ diff --git a/translated/tech/20151125 Running a mainline kernel on a cellphone.md b/translated/tech/20151125 Running a mainline kernel on a cellphone.md new file mode 100644 index 0000000000..e3a6c52e9f --- /dev/null +++ b/translated/tech/20151125 Running a mainline kernel on a cellphone.md @@ -0,0 +1,14 @@ +在手机上面运行主线内核 +对于自由软件来说,其最大的自由之一就是能够用一个更新或修改的版本来替换原始版本的程序。尽管如此,数千万使用linux内核作为支持的手机用户却很少能够在他们的手机上运行主线内核,即使他们拥有替换内核代码的专业技能。可悲的是,我们必须承认目前仍然无法使用到运行主线内核的主流手机。在由Rob Herring主持的2015届内核峰会上,与会人员共同探讨了这个问题,并进一步谈论了他们应该怎么做才能解决这个问题。 +当主持人提问的时候,在座的大多数开发人员都表示他们更喜欢在他们的手机上面运行主线内核,然而也有少数人持相反的看法。在Project Ara的支持下,Rob在这个问题上已经研究了近一年半的时间。但是最新的研究成果并不理想。 +Rob表示,有太多的树(out-of-tree)代码运行在手机上,主线内核只是缺少能使手机正常运行所必须的驱动。每台合格的手机都在运行着100万到300万的树(out-of-tree)代码。几乎所有的这些手机的内核版本都不超过3.1,有一些甚至更加古老。造成这种情况的原因有很多,但是有一点是很清楚的,在手机的世界里,一切都变化的太快以至于内核社区无法跟上它们的步伐。如果真是那样,他问到,我们还担心什么呢? +Tim Bird指出,第一台Android手机Nexus1从来没有运行过任何一个主线内核,并且以后也不会。它打破了开源的承诺,也使得用户不可能做到将一个新的内核放到手机中。从这一点上来说,没有任何一款手机支持这种能力。Peter Zijlstra想知道从一台手机到另一台手机到底有多少正发挥作用的被复制的代码。Rob表示,迄今为止,他已经见到了三个独立开发的热插拔调速器。 +Dirk Hohndel提出了很少有人注意到的建议。他说,对于世界上的成千上亿万台手机,其中大约有百分之27的手机用户关心他们的手机是否运行着主线内核。剩下的用户仅仅只是想让他们的手机正常工作。或许那些关注手机是否在运行主线内核的开发者正在努力去解决这个令人不解的问题。 +Chris Mason说,那些手机卖家当前正面临着相同类型的问题,而这些问题也是那些linux发行版过去所面临过的问题。他们疲于应付大量的无效且重复和能被复制的工作。一旦这些发行版决定将他们的工作重心转入到主线内核而不是让它顺其自然的发展,那么问题将会变得好解决的多。解决问题的关键就是去帮助手机制造商们认识到他们可以通过同样的方式获利,形成这种认识的关键并不是通过来自用户的压力。这样一来,问题就可以解决了。 +Grant Likely提出了对于安全问题的担忧,这种担忧来自于那些不能升级他们的手机系统的android设备。他说,我们需要的是一个真正专为手机设立的发行市场。但是,只要手机卖家仍然掌控着手机中的应用软件,那么手机的同步更新将无法实现。我们接下来将面临一个很大的安全难题。Peter补充说,随着Stagefright漏洞的出现,难题已经出现在我们面前了。 +Ted Ts'o说,运行主线内核并不是他的主要关注点。他很乐于见到这个假期中所售卖的手机能够运行3.18或者4.1的内核,而不是继续停留在3.10。他认为这是一个更可能被解决的问题。Steve Rostedt认为,按照Ted Ts'o所说的那样去做并不能解决手机的安全问题,但是,Ted认为使用一个更新的内核至少可以让漏洞修复变得更加容易。Grant对此回应说,接下来的一年里,这一切都将再次发生。过渡到更新的内核也是一个渐进式的对系统的完善。Kees Cook补充说,我们无法从修复旧版本的内核漏洞的过程中得到太多的益处,真正的问题是我们没有对bug的应对措施。 +Rob说,任何一种解决方案都需要得到当前的手机供应商的支持。否则,由于厂商对应用到他们生产的手机上的操作系统的封锁,运行主线内核的策略将会陷入麻烦。Paolo Bonzini提问说是否可以因为那些没有修复的安全漏洞而控告手机厂商,尤其当手机仍然处于保修期内。Grant认为对于手机的可更新能力的保证必须来源于市场需求,否则是无法实现的。而促使它实现的原因可能会是一个严重的安全问题,然后用户开始对手机的可更新能力提出要求。同时,内核开发人员必须不断朝着这个方向努力。Rob表示,除了到目前为止指出的所有优点之外,运行主线内核也能帮助开发者对安卓设备上的新特性进行测试和验证。 +Josh Triplett提问说,如果手机产商提出对主线内核提供支持的想法,那么内核社区又将采取什么措施呢?那样将会针对手机各方面的特性要求对内核进行大量的测试和验证;Android的兼容性测试套件中出现的失败将不得不被再次回归。Rob提议这个问题将会在明年被讨论,即先将最基本的功能做好。但是,Josh强调说,如果这个需求出现了,我们就应该能够给出一个好的答案。 +Tim认为,当前,我们和厂商之间存在很大的脱节。厂商根本不会主动报告或者贡献任何反馈给社区。他们之间完全脱节了,这样的话永远不会有进步。Josh表示,当厂商们报告他们正在使用的旧内核的相关bug时,双方之间的接受度将变得更加友好。Arnd Bergmann认为,我们需要的是得到一个大芯片厂商对使用主线内核的认可,并且将该厂商的硬件提升到能够支持主线内核的运行的这样一个水平,而这样将会在其他方面增加负担。但是,他补充说,实现这个目标要求存在一个跟随硬件一起分发的自由GPU驱动程序——然而这种程序当前并不存在。 +Rob给存在问题的领域列了一个清单,但是现在已经没有太多的时间去讨论其中的细节了。WIFI驱动仍然是一个问题,尤其是当新特性被添加到Android设备上的时候。Johannes Berg对新特性仍然存在问题表示赞同;android的开发人员甚至在这些新特性被应用到Android设备上之前都不会去谈论它们是否存在问题。然而,对这些特性中的大多数的技术支持最终都会落实在主线内核中。 +随着会议逐渐接近尾声,Ben Herrenschmidt再次重申:实现在andoroid手机上运行主线内核的关键还是在于让厂商认识到使用主线内核是它们获得最大利润的最好选择。从长远看,使用主线内核能节省大量的工作。Mark Brown认为,以前,当搭载在Android设备上的内核版本以更稳定的方式向前推进的时候,上游工作的好处对运营商来说更加明显。以现在的情况来看,手机上的内核版本似乎停留在了3.10,那种压力是不一样的。这次会话以开发者决定进一步改善当前的状况而结束,但是却并没有对如何改善提出一个明确的计划。 From aca7feecd997150483b7ecfa2ab5ecf9bd981579 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Tue, 5 Jan 2016 09:49:48 +0800 Subject: [PATCH 0777/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020151208=206=20useful=20LibreOffice=20extensions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【开始翻译】LibreOffice 中的六大实用扩展插件 --- .../yearbook2015/20151208 6 useful LibreOffice extensions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md b/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md index a2c1e393ff..be1bb2d553 100644 --- a/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md +++ b/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md @@ -1,3 +1,5 @@ +GHLandy Translating + 6 useful LibreOffice extensions ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png) @@ -76,4 +78,4 @@ via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions [7]:http://extensions.libreoffice.org/extension-center/impressrunner [8]:https://www.libreoffice.org/discover/draw/ [9]:http://extensions.libreoffice.org/extension-center/export-as-images -[10]:http://anaphraseus.sourceforge.net/ \ No newline at end of file +[10]:http://anaphraseus.sourceforge.net/ From 89cc4705478284b915583863d574f8a177287d96 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 5 Jan 2016 10:57:08 +0800 Subject: [PATCH 0778/1710] Translating by ZTinoZ --- ...w to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index b67dc19ac9..f709ba5582 100644 --- a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -252,7 +252,7 @@ Bugzilla admin面板: ### 结论 ### -Bugzilla is web based application help you to manage the software development. It is written in perl and use MySQL as the database system. Bugzilla used by mozilla, redhat, gnome etc for help their software development. Bugzilla has a lot of features and easy to configure and install. +Bugzilla是一个基于web并能帮助你管理软件开发的应用,它用perl开发并使用MySQL作为数据库系统。Bugzilla被mozilla,redhat,gnome等等公司用来帮助它们的软件开发工作。Bugzilla有很多功能并易于配置和安装。 -------------------------------------------------------------------------------- From dfa43521d91c3262d1ff22b464a0c9bbd7260bba Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 5 Jan 2016 10:57:58 +0800 Subject: [PATCH 0779/1710] Finish the translation by ZTinoZ --- ...How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md (100%) diff --git a/sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md similarity index 100% rename from sources/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md rename to translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md From b84530a93dc7eadde2cb5007e86fda7bd611dcf8 Mon Sep 17 00:00:00 2001 From: kylepeng93 <958983476@qq.com> Date: Tue, 5 Jan 2016 11:54:59 +0800 Subject: [PATCH 0780/1710] translated --- ...unning a mainline kernel on a cellphone.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/tech/20151125 Running a mainline kernel on a cellphone.md b/translated/tech/20151125 Running a mainline kernel on a cellphone.md index e3a6c52e9f..88f21b55d7 100644 --- a/translated/tech/20151125 Running a mainline kernel on a cellphone.md +++ b/translated/tech/20151125 Running a mainline kernel on a cellphone.md @@ -1,14 +1,14 @@ 在手机上面运行主线内核 -对于自由软件来说,其最大的自由之一就是能够用一个更新或修改的版本来替换原始版本的程序。尽管如此,数千万使用linux内核作为支持的手机用户却很少能够在他们的手机上运行主线内核,即使他们拥有替换内核代码的专业技能。可悲的是,我们必须承认目前仍然无法使用到运行主线内核的主流手机。在由Rob Herring主持的2015届内核峰会上,与会人员共同探讨了这个问题,并进一步谈论了他们应该怎么做才能解决这个问题。 -当主持人提问的时候,在座的大多数开发人员都表示他们更喜欢在他们的手机上面运行主线内核,然而也有少数人持相反的看法。在Project Ara的支持下,Rob在这个问题上已经研究了近一年半的时间。但是最新的研究成果并不理想。 -Rob表示,有太多的树(out-of-tree)代码运行在手机上,主线内核只是缺少能使手机正常运行所必须的驱动。每台合格的手机都在运行着100万到300万的树(out-of-tree)代码。几乎所有的这些手机的内核版本都不超过3.1,有一些甚至更加古老。造成这种情况的原因有很多,但是有一点是很清楚的,在手机的世界里,一切都变化的太快以至于内核社区无法跟上它们的步伐。如果真是那样,他问到,我们还担心什么呢? -Tim Bird指出,第一台Android手机Nexus1从来没有运行过任何一个主线内核,并且以后也不会。它打破了开源的承诺,也使得用户不可能做到将一个新的内核放到手机中。从这一点上来说,没有任何一款手机支持这种能力。Peter Zijlstra想知道从一台手机到另一台手机到底有多少正发挥作用的被复制的代码。Rob表示,迄今为止,他已经见到了三个独立开发的热插拔调速器。 -Dirk Hohndel提出了很少有人注意到的建议。他说,对于世界上的成千上亿万台手机,其中大约有百分之27的手机用户关心他们的手机是否运行着主线内核。剩下的用户仅仅只是想让他们的手机正常工作。或许那些关注手机是否在运行主线内核的开发者正在努力去解决这个令人不解的问题。 -Chris Mason说,那些手机卖家当前正面临着相同类型的问题,而这些问题也是那些linux发行版过去所面临过的问题。他们疲于应付大量的无效且重复和能被复制的工作。一旦这些发行版决定将他们的工作重心转入到主线内核而不是让它顺其自然的发展,那么问题将会变得好解决的多。解决问题的关键就是去帮助手机制造商们认识到他们可以通过同样的方式获利,形成这种认识的关键并不是通过来自用户的压力。这样一来,问题就可以解决了。 -Grant Likely提出了对于安全问题的担忧,这种担忧来自于那些不能升级他们的手机系统的android设备。他说,我们需要的是一个真正专为手机设立的发行市场。但是,只要手机卖家仍然掌控着手机中的应用软件,那么手机的同步更新将无法实现。我们接下来将面临一个很大的安全难题。Peter补充说,随着Stagefright漏洞的出现,难题已经出现在我们面前了。 -Ted Ts'o说,运行主线内核并不是他的主要关注点。他很乐于见到这个假期中所售卖的手机能够运行3.18或者4.1的内核,而不是继续停留在3.10。他认为这是一个更可能被解决的问题。Steve Rostedt认为,按照Ted Ts'o所说的那样去做并不能解决手机的安全问题,但是,Ted认为使用一个更新的内核至少可以让漏洞修复变得更加容易。Grant对此回应说,接下来的一年里,这一切都将再次发生。过渡到更新的内核也是一个渐进式的对系统的完善。Kees Cook补充说,我们无法从修复旧版本的内核漏洞的过程中得到太多的益处,真正的问题是我们没有对bug的应对措施。 -Rob说,任何一种解决方案都需要得到当前的手机供应商的支持。否则,由于厂商对应用到他们生产的手机上的操作系统的封锁,运行主线内核的策略将会陷入麻烦。Paolo Bonzini提问说是否可以因为那些没有修复的安全漏洞而控告手机厂商,尤其当手机仍然处于保修期内。Grant认为对于手机的可更新能力的保证必须来源于市场需求,否则是无法实现的。而促使它实现的原因可能会是一个严重的安全问题,然后用户开始对手机的可更新能力提出要求。同时,内核开发人员必须不断朝着这个方向努力。Rob表示,除了到目前为止指出的所有优点之外,运行主线内核也能帮助开发者对安卓设备上的新特性进行测试和验证。 -Josh Triplett提问说,如果手机产商提出对主线内核提供支持的想法,那么内核社区又将采取什么措施呢?那样将会针对手机各方面的特性要求对内核进行大量的测试和验证;Android的兼容性测试套件中出现的失败将不得不被再次回归。Rob提议这个问题将会在明年被讨论,即先将最基本的功能做好。但是,Josh强调说,如果这个需求出现了,我们就应该能够给出一个好的答案。 -Tim认为,当前,我们和厂商之间存在很大的脱节。厂商根本不会主动报告或者贡献任何反馈给社区。他们之间完全脱节了,这样的话永远不会有进步。Josh表示,当厂商们报告他们正在使用的旧内核的相关bug时,双方之间的接受度将变得更加友好。Arnd Bergmann认为,我们需要的是得到一个大芯片厂商对使用主线内核的认可,并且将该厂商的硬件提升到能够支持主线内核的运行的这样一个水平,而这样将会在其他方面增加负担。但是,他补充说,实现这个目标要求存在一个跟随硬件一起分发的自由GPU驱动程序——然而这种程序当前并不存在。 -Rob给存在问题的领域列了一个清单,但是现在已经没有太多的时间去讨论其中的细节了。WIFI驱动仍然是一个问题,尤其是当新特性被添加到Android设备上的时候。Johannes Berg对新特性仍然存在问题表示赞同;android的开发人员甚至在这些新特性被应用到Android设备上之前都不会去谈论它们是否存在问题。然而,对这些特性中的大多数的技术支持最终都会落实在主线内核中。 -随着会议逐渐接近尾声,Ben Herrenschmidt再次重申:实现在andoroid手机上运行主线内核的关键还是在于让厂商认识到使用主线内核是它们获得最大利润的最好选择。从长远看,使用主线内核能节省大量的工作。Mark Brown认为,以前,当搭载在Android设备上的内核版本以更稳定的方式向前推进的时候,上游工作的好处对运营商来说更加明显。以现在的情况来看,手机上的内核版本似乎停留在了3.10,那种压力是不一样的。这次会话以开发者决定进一步改善当前的状况而结束,但是却并没有对如何改善提出一个明确的计划。 + 对于自由软件来说,其最大的自由之一就是能够用一个更新或修改的版本来替换原始版本的程序。尽管如此,数千万使用linux内核作为支持的手机用户却很少能够在他们的手机上运行主线内核,即使他们拥有替换内核代码的专业技能。可悲的是,我们必须承认目前仍然无法使用到运行主线内核的主流手机。在由Rob Herring主持的2015届内核峰会上,与会人员共同探讨了这个问题,并进一步谈论了他们应该怎么做才能解决这个问题。 + 当主持人提问的时候,在座的大多数开发人员都表示他们更喜欢在他们的手机上面运行主线内核,然而也有少数人持相反的看法。在Project Ara的支持下,Rob在这个问题上已经研究了近一年半的时间。但是最新的研究成果并不理想。 + Rob表示,有太多的树(out-of-tree)代码运行在手机上,主线内核只是缺少能使手机正常运行所必须的驱动。每台合格的手机都在运行着100万到300万的树(out-of-tree)代码。几乎所有的这些手机的内核版本都不超过3.1,有一些甚至更加古老。造成这种情况的原因有很多,但是有一点是很清楚的,在手机的世界里,一切都变化的太快以至于内核社区无法跟上它们的步伐。如果真是那样,他问到,我们还担心什么呢? + Tim Bird指出,第一台Android手机Nexus1从来没有运行过任何一个主线内核,并且以后也不会。它打破了开源的承诺,也使得用户不可能做到将一个新的内核放到手机中。从这一点上来说,没有任何一款手机支持这种能力。Peter Zijlstra想知道从一台手机到另一台手机到底有多少正发挥作用的被复制的代码。Rob表示,迄今为止,他已经见到了三个独立开发的热插拔调速器。 + Dirk Hohndel提出了很少有人注意到的建议。他说,对于世界上的成千上亿万台手机,其中大约有百分之27的手机用户关心他们的手机是否运行着主线内核。剩下的用户仅仅只是想让他们的手机正常工作。或许那些关注手机是否在运行主线内核的开发者正在努力去解决这个令人不解的问题。 + Chris Mason说,那些手机卖家当前正面临着相同类型的问题,而这些问题也是那些linux发行版过去所面临过的问题。他们疲于应付大量的无效且重复和能被复制的工作。一旦这些发行版决定将他们的工作重心转入到主线内核而不是让它顺其自然的发展,那么问题将会变得好解决的多。解决问题的关键就是去帮助手机制造商们认识到他们可以通过同样的方式获利,形成这种认识的关键并不是通过来自用户的压力。这样一来,问题就可以解决了。 + Grant Likely提出了对于安全问题的担忧,这种担忧来自于那些不能升级他们的手机系统的android设备。他说,我们需要的是一个真正专为手机设立的发行市场。但是,只要手机卖家仍然掌控着手机中的应用软件,那么手机的同步更新将无法实现。我们接下来将面临一个很大的安全难题。Peter补充说,随着Stagefright漏洞的出现,难题已经出现在我们面前了。 + Ted Ts'o说,运行主线内核并不是他的主要关注点。他很乐于见到这个假期中所售卖的手机能够运行3.18或者4.1的内核,而不是继续停留在3.10。他认为这是一个更可能被解决的问题。Steve Rostedt认为,按照Ted Ts'o所说的那样去做并不能解决手机的安全问题,但是,Ted认为使用一个更新的内核至少可以让漏洞修复变得更加容易。Grant对此回应说,接下来的一年里,这一切都将再次发生。过渡到更新的内核也是一个渐进式的对系统的完善。Kees Cook补充说,我们无法从修复旧版本的内核漏洞的过程中得到太多的益处,真正的问题是我们没有对bug的应对措施。 + Rob说,任何一种解决方案都需要得到当前的手机供应商的支持。否则,由于厂商对应用到他们生产的手机上的操作系统的封锁,运行主线内核的策略将会陷入麻烦。Paolo Bonzini提问说是否可以因为那些没有修复的安全漏洞而控告手机厂商,尤其当手机仍然处于保修期内。Grant认为对于手机的可更新能力的保证必须来源于市场需求,否则是无法实现的。而促使它实现的原因可能会是一个严重的安全问题,然后用户开始对手机的可更新能力提出要求。同时,内核开发人员必须不断朝着这个方向努力。Rob表示,除了到目前为止指出的所有优点之外,运行主线内核也能帮助开发者对安卓设备上的新特性进行测试和验证。 + Josh Triplett提问说,如果手机产商提出对主线内核提供支持的想法,那么内核社区又将采取什么措施呢?那样将会针对手机各方面的特性要求对内核进行大量的测试和验证;Android的兼容性测试套件中出现的失败将不得不被再次回归。Rob提议这个问题将会在明年被讨论,即先将最基本的功能做好。但是,Josh强调说,如果这个需求出现了,我们就应该能够给出一个好的答案。 + Tim认为,当前,我们和厂商之间存在很大的脱节。厂商根本不会主动报告或者贡献任何反馈给社区。他们之间完全脱节了,这样的话永远不会有进步。Josh表示,当厂商们报告他们正在使用的旧内核的相关bug时,双方之间的接受度将变得更加友好。Arnd Bergmann认为,我们需要的是得到一个大芯片厂商对使用主线内核的认可,并且将该厂商的硬件提升到能够支持主线内核的运行的这样一个水平,而这样将会在其他方面增加负担。但是,他补充说,实现这个目标要求存在一个跟随硬件一起分发的自由GPU驱动程序——然而这种程序当前并不存在。 + Rob给存在问题的领域列了一个清单,但是现在已经没有太多的时间去讨论其中的细节了。WIFI驱动仍然是一个问题,尤其是当新特性被添加到Android设备上的时候。Johannes Berg对新特性仍然存在问题表示赞同;android的开发人员甚至在这些新特性被应用到Android设备上之前都不会去谈论它们是否存在问题。然而,对这些特性中的大多数的技术支持最终都会落实在主线内核中。 + 随着会议逐渐接近尾声,Ben Herrenschmidt再次重申:实现在andoroid手机上运行主线内核的关键还是在于让厂商认识到使用主线内核是它们获得最大利润的最好选择。从长远看,使用主线内核能节省大量的工作。Mark Brown认为,以前,当搭载在Android设备上的内核版本以更稳定的方式向前推进的时候,上游工作的好处对运营商来说更加明显。以现在的情况来看,手机上的内核版本似乎停留在了3.10,那种压力是不一样的。这次会话以开发者决定进一步改善当前的状况而结束,但是却并没有对如何改善提出一个明确的计划。 From 9920ab020efb2b60473075d5da0321c098d585a4 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Tue, 5 Jan 2016 13:35:53 +0800 Subject: [PATCH 0781/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]=2020151125=2020=20Years=20of=20GIMP=20Evolution--Step=20by=20?= =?UTF-8?q?Step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【翻译完成】GIMP 过去的 20 年:一点一滴的进步 --- ...0 Years of GIMP Evolution--Step by Step.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md diff --git a/translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md b/translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md new file mode 100644 index 0000000000..20acfc1ee8 --- /dev/null +++ b/translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md @@ -0,0 +1,169 @@ +GHLandy Translated + +GIMP 过去的 20 年:一点一滴的进步 +================================================================================ +注:youtube 视频 + + +[GIMP][1](GNU 图像处理程序)—— 一流的开源免费图像处理程序。加州大学伯克利分校的 Peter Mattis 和 Spencer Kimball 最早在 1995 年的时候就进行了该程序的开发。到了 1997 年,该程序成为了 [GNU Project][2] 官方的一部分,并正式更名为 GIMP。时至今日,GIMP 已经成为了最好的图像编辑器之一,并有最受欢迎的 “GIMP vs Photoshop” 之争。 + +1995 年 11 月 21 日,首版发布: + +> 发布者: Peter Mattis +> +> 发布主题: ANNOUNCE: The GIMP +> +> 日期: 1995-11-21 +> +> 消息ID: <48s543$r7b@agate.berkeley.edu> +> +> 新闻组: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps +> +> GIMP:通用图像处理程序 +> ------------------------------------------------ +> +> GIMP 是为各种图像编辑操作提供一个直观的图形界面而设计的。 +> +> 以下是 GIMP 的主要功能介绍: +> +> 图像查看 +> ------------- +> +> * 支持 8 位,15 位,16 位和 24 位颜色 +> * 8 位色显示的图像序列的稳定算法 +> * 以 RGB 色、灰度和索引色模式查看图像 +> * 同时编辑多个图像 +> * 实时缩放和全图查看 +> * 支持 GIF、JPEG、PNG、TIFF 和 XPM 格式 +> +> 图像编辑 +> ------------- +> +> * 选区工具:包括矩形、椭圆、自由、模糊、贝尔赛曲线以及智能 +> * 变换工具:包括旋转、缩放、剪切和翻转 +> * 绘画工具:包括油漆桶、笔刷、喷枪、克隆、卷积、混合和文本 +> * 效果滤镜:如模糊和边缘检测 +> * 通道和颜色操作:叠加、反相和分解 +> * 组件功能:允许你方便的添加新的文件格式和效果滤镜 +> * 多步撤销/重做功能 + +1996 年,GIMP 0.54 版 + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/054.png) + +GIMP 0.54 版需要具备 X11 显示、X-server 以及 Motif 1.2 微件,支持 8 位、15 位、16 位和 24 位的颜色深度和灰度,支持 GIF、JPEG、PNG、TIFF 和 XPM 图像格式。 + +基本功能:具备矩形、椭圆、自由、模糊、贝塞尔曲线和智能等选择工具,旋转、缩放、剪切、克隆、混合和翻转等变换工具。 + +扩展工具:文字添加、效果滤镜、通道和颜色操纵工具、撤销/重做功能。由于第一个版本支持组件扩展,才方便添加这些功能。 + +GIMP 0.54 版可以在 Linux、HP-UX、Solaris 和 SGI IRIX 中运行。 + +### 1997 年,GIMP 0.60 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/060.gif) + +这只是一个开发版本,并非面向用户发布的。GIMP 有了新的工具包——GDK(GIMP Drawing Kit,GIMP 绘图工具)和 GTK(GIMP Toolkit,GIMP 工具包),并弃用 Motif。GIMP 工具包随后也发展成为了 GTK+ 跨平台的微件工具包。新特性: + +- 基本的图层功能 +- 子像素采集 +- 笔刷间距 +- 改进剂喷枪功能 +- 绘制模式 + +### 1997 年,GIMP 0.99 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/099.png) + +从 0.99 版本开始,GIMP 有了宏脚本的支持。GTK 及 GTK 功能增强版正式更名为 GTK+。其他更新: + +- 支持大体积图像(大于 100M) +- 新增原生格式 – XCF +- 新的 API – 使得更加容易编写组件和扩展 + +### 1998 年,GIMP 1.0 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/100.gif) + +GIMP 和 GTK+ 开始分为两个不同的项目。GIMP 官网进行重构,包含新教程、组件和文档。新特性: + +- 基于瓦片式的内存管理 +- 组件 API 做了较大改变 +- XFC 格式现在支持图层、导航和选择 +- web 界面 +- 在线图像生成 + +### 2000 年,GIMP 1.2 版 ### + +新特性: + +- 进行了非英文语言翻译 +- 修复 GTK+ 和 GIMP 中的大量bug +- 增加大量组件 +- 图像映射 +- 新工具:调整大小、测量、加亮、燃烧效果、颜色吸管和翻转等。 +- 图像管道 +- 保存前可以进行图像预览 +- 按比例缩放的笔刷进行预览 +- 通过路径进行递归选择 +- 新的窗口导航 +- 支持图像拖拽 +- 支持水印 + +### 2004 年,GIMP 2.0 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/200.png) + +重大更新 – 更新 GTK+ 2.x toolkit. + +### 2004 年,GIMP 2.2 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/220.png) + +修复大量 Bug 并支持图像拖拽 + +### 2007 年,GIMP 2.4 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/240.png) + +新特性: + +- 更好的图像拖拽体验 +- 使用新的脚本解释器 Script-Fu 替代了 旧的 Ti-Fu +- 新组件:影印效果、光晕效果、霓虹灯效果、卡通效果、小狗笔刷、水珠笔刷以及其他组件 + +### 2008 年,GIMP 2.6 版 ### + +新特性: + +- 更新了图形界面 +- 新的选择工具 +- 继承了 GEGL (GEneric Graphics Library,通用图形库) +- 为 MDI 行为实现了实用程序窗口提示 + +### 2012 年,GIMP 2.8 版 ### + +![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/280.png) + +新特性: + +- GUI 在视觉上做了一些改变 +- 新的保存和导出菜单 +- 更新文本框工具 +- 支持图层群组 +- 支持 JPEG2000 和导出为 pdf +- 网页截图工具 + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/20-years-of-gimp-evolution/ + +作者:[Pavlo Rudyi][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:https://gimp.org/ +[2]:http://www.gnu.org/ From 4a27b3e387bfd731022e3a123c392550d9dd525e Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Tue, 5 Jan 2016 13:40:28 +0800 Subject: [PATCH 0782/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020151208=206=20creative=20ways=20to=20use=20ownCloud?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【开始翻译】使用 onwCloud 的六个创意方法 --- .../yearbook2015/20151208 6 creative ways to use ownCloud.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md b/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md index 969e0637b5..dd099648a7 100644 --- a/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md +++ b/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md @@ -1,3 +1,5 @@ +GHLandy Translating + 6 creative ways to use ownCloud ================================================================================ ![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc-open-source-yearbook-lead1-inc0335020sw-201511-01.png) @@ -91,4 +93,4 @@ via: https://opensource.com/life/15/12/6-creative-ways-use-owncloud [12]:https://owncloud.com/owncloud45-community/ [13]:http://karlitschek.de/2015/08/announcing-the-draft-federated-cloud-sharing-api/ [14]:https://owncloud.com/customer/sciebo/ -[15]:https://owncloud.org/federation/ \ No newline at end of file +[15]:https://owncloud.org/federation/ From 377bb6fbf55a1073e97dd7cc42858afa0eed2265 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Tue, 5 Jan 2016 13:41:14 +0800 Subject: [PATCH 0783/1710] Delete 20151125 20 Years of GIMP Evolution--Step by Step.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译后进行删除原文 --- ...0 Years of GIMP Evolution--Step by Step.md | 173 ------------------ 1 file changed, 173 deletions(-) delete mode 100644 sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md diff --git a/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md b/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md deleted file mode 100644 index 681a1d6258..0000000000 --- a/sources/talk/20151125 20 Years of GIMP Evolution--Step by Step.md +++ /dev/null @@ -1,173 +0,0 @@ -GHLandy Translating - -20 Years of GIMP Evolution: Step by Step -================================================================================ -注:youtube 视频 - - -[GIMP][1] (GNU Image Manipulation Program) – superb open source and free graphics editor. Development began in 1995 as students project of the University of California, Berkeley by Peter Mattis and Spencer Kimball. In 1997 the project was renamed in “GIMP” and became an official part of [GNU Project][2]. During these years the GIMP is one of the best graphics editor and platinum holy wars “GIMP vs Photoshop” – one of the most popular. - -The first announce, 21.11.1995: - -> From: Peter Mattis -> -> Subject: ANNOUNCE: The GIMP -> -> Date: 1995-11-21 -> -> Message-ID: <48s543$r7b@agate.berkeley.edu> -> -> Newsgroups: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps -> -> The GIMP: the General Image Manipulation Program -> ------------------------------------------------ -> -> The GIMP is designed to provide an intuitive graphical interface to a -> variety of image editing operations. Here is a list of the GIMP's -> major features: -> -> Image viewing -> ------------- -> -> * Supports 8, 15, 16 and 24 bit color. -> * Ordered and Floyd-Steinberg dithering for 8 bit displays. -> * View images as rgb color, grayscale or indexed color. -> * Simultaneously edit multiple images. -> * Zoom and pan in real-time. -> * GIF, JPEG, PNG, TIFF and XPM support. -> -> Image editing -> ------------- -> -> * Selection tools including rectangle, ellipse, free, fuzzy, bezier -> and intelligent. -> * Transformation tools including rotate, scale, shear and flip. -> * Painting tools including bucket, brush, airbrush, clone, convolve, -> blend and text. -> * Effects filters (such as blur, edge detect). -> * Channel & color operations (such as add, composite, decompose). -> * Plug-ins which allow for the easy addition of new file formats and -> new effect filters. -> * Multiple undo/redo. - -GIMP 0.54, 1996 - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/054.png) - -GIMP 0.54 was required X11 displays, X-server and Motif 1.2 wigdets and supported 8, 15, 16 & 24 color depths with RGB & grayscale colors. Supported images format: GIF, JPEG, PNG, TIFF and XPM. - -Basic functionality: rectangle, ellipse, free, fuzzy, bezier, intelligent selection tools, and rotate, scale, shear, clone, blend and flip images. - -Extended tools: text operations, effects filters, tools for channel and colors manipulation, undo and redo operations. Since the first version GIMP support the plugin system. - -GIMP 0.54 can be ran in Linux, HP-UX, Solaris, SGI IRIX. - -### GIMP 0.60, 1997 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/060.gif) - -This is development release, not for all users. GIMP has the new toolkits – GDK (GIMP Drawing Kit) and GTK (GIMP Toolkit), Motif support is deprecated. GIMP Toolkit is also begin of the GTK+ cross-platform widget toolkit. New features: - -- basic layers -- sub-pixel sampling -- brush spacing -- improver airbrush -- paint modes - -### GIMP 0.99, 1997 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/099.png) - -Since 0.99 version GIMP has the scripts add macros (Script-Fus) support. GTK and GDK with some improvements has now the new name – GTK+. Other improvements: - -- support big images (rather than 100 MB) -- new native format – XCF -- new API – write plugins and extensions is easy - -### GIMP 1.0, 1998 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/100.gif) - -GIMP and GTK+ was splitted into separate projects. The GIMP official website has -reconstructed and contained new tutorials, plugins and documentation. New features: - -- tile-based memory management -- massive changes in plugin API -- XFC format now support layers, guides and selections -- web interface -- online graphics generation - -### GIMP 1.2, 2000 ### - -New features: - -- translation for non-english languages -- fixed many bugs in GTK+ and GIMP -- many new plugins -- image map -- new toolbox: resize, measure, dodge, burn, smugle, samle colorize and curve bend -- image pipes -- images preview before saving -- scaled brush preview -- recursive selection by path -- new navigation window -- drag’n’drop -- watermarks support - -### GIMP 2.0, 2004 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/200.png) - -The biggest change – new GTK+ 2.x toolkit. - -### GIMP 2.2, 2004 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/220.png) - -Many bugfixes and drag’n’drop support. - -### GIMP 2.4, 2007 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/240.png) - -New features: - -- better drag’n’drop support -- Ti-Fu was replaced to Script-Fu – the new script interpreter -- new plugins: photocopy, softglow, neon, cartoon, dog, glob and others - -### GIMP 2.6, 2008 ### - -New features: - -- renew graphics interface -- new select and tool -- GEGL (GEneric Graphics Library) integration -- “The Utility Window Hint” for MDI behavior - -### GIMP 2.8, 2012 ### - -![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/280.png) - -New features: - -- GUI has some visual changes -- new save and export menu -- renew text editor -- layers group support -- JPEG2000 and export to PDF support -- webpage screenshot tool - --------------------------------------------------------------------------------- - -via: https://tlhp.cf/20-years-of-gimp-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://gimp.org/ -[2]:http://www.gnu.org/ From 328fccd1126cb319515c3d194222a5cce444e4ce Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 5 Jan 2016 22:27:55 +0800 Subject: [PATCH 0784/1710] PUB:20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04 @NearTan --- ...P Framework on CentOS 7 or Ubuntu 15.04.md | 34 ++++++------------- 1 file changed, 11 insertions(+), 23 deletions(-) rename {translated/tech => published}/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md (80%) diff --git a/translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/published/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md similarity index 80% rename from translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md rename to published/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md index fe8da81be3..5b60ec5f1a 100644 --- a/translated/tech/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md +++ b/published/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md @@ -1,7 +1,7 @@ - 如何在 CentOS 7 / Ubuntu 15.04 上安装 PHP 框架 Laravel ================================================================================ -大家好,这篇文章将要讲述如何在 CentOS 7 / Ubuntu 15.04 上安装 Laravel。如果你是一个 PHP Web 的开发者,你并不需要关心各种琳琅满目的现代 PHP 框架,Laravel 是最轻松启动和运行的,它省时省力,能让你享受到 web 开发的乐趣。Laravel 信奉着一个普世的开发哲学,作为一个好的框架它为你提供了高度优先权,让你在简单的使用指导下创建出可维护代码,你应该保持着高速的开发效率,能够随时毫不畏惧更改你的代码来打破现有功能。 + +大家好,这篇文章将要讲述如何在 CentOS 7 / Ubuntu 15.04 上安装 Laravel。如果你是一个 PHP Web 的开发者,你并不需要考虑如何在琳琅满目的现代 PHP 框架中选择,Laravel 是最轻松启动和运行的,它省时省力,能让你享受到 web 开发的乐趣。Laravel 信奉着一个普世的开发哲学,通过简单的指导创建出可维护代码具有最高优先级,你将保持着高速的开发效率,能够随时毫不畏惧更改你的代码来改进现有功能。 Laravel 安装并不繁琐,你只要跟着本文章一步步操作就能在 CentOS 7 或者 Ubuntu 15 服务器上安装。 @@ -15,13 +15,9 @@ Laravel 安装并不繁琐,你只要跟着本文章一步步操作就能在 Ce # yum install epel-release ----------- - # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm ----------- - # yum update #### Ubuntu #### @@ -29,23 +25,19 @@ Laravel 安装并不繁琐,你只要跟着本文章一步步操作就能在 Ce # apt-get install python-software-properties # add-apt-repository ppa:ondrej/php5 ----------- - # apt-get update ----------- - # apt-get install -y php5 mcrypt php5-mcrypt php5-gd ### 2) 防火墙安装 ### -系统防火墙和 SELinux 设置对于用于产品应用安全来说非常重要,当你使用测试服务器的时候可以关闭防火墙,用以下命令行设置 SELinux 成宽容模式(permissive)模式来保证安装程序不受它们的影响。 +系统防火墙和 SELinux 设置对于用于产品应用安全来说非常重要,当你使用测试服务器的时候可以关闭防火墙,用以下命令行设置 SELinux 成宽容模式(permissive)来保证安装程序不受它们的影响。 # setenforce 0 ### 3) Apache, MariaDB, PHP 安装 ### -Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 OpenSSL、PDO,Mbstring 和 Tokenizer PHP Extensions。如果 LAMP 已经运行在你的服务器上你可以跳过这一步,直接确认一些必要的 PHP 插件是否安装好。 +Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 OpenSSL、PDO,Mbstring 和 Tokenizer 等 PHP 扩展。如果 LAMP 已经运行在你的服务器上你可以跳过这一步,直接确认一些必要的 PHP 插件是否安装好。 要安装完整 AMP 你需要在自己的服务器上运行以下命令。 @@ -58,8 +50,6 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op # systemctl start httpd # systemctl enable httpd ----------- - #systemctl start mysqld #systemctl enable mysqld @@ -73,7 +63,7 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op ### 4) 安装 Composer ### -在我们安装 Laravel 前,先让我们开始安装 composer。安装 composer 对于安装 Laravel 是最重要的步骤之一,因为 composer 能帮我们安装 Laravel 的各种依赖。 +在我们安装 Laravel 前,先让我们开始安装 composer。安装 composer 是安装 Laravel 的最重要步骤之一,因为 composer 能帮我们安装 Laravel 的各种依赖。 #### CentOS/Ubuntu #### @@ -95,8 +85,6 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op # unzip develop.zip ----------- - # mv laravel-develop /var/www/ 现在使用 compose 命令来安装目录下所有 Laravel 所需要的依赖。 @@ -120,17 +108,15 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op ![Key encryption](http://blog.linoxide.com/wp-content/uploads/2015/11/45.png) -### 7) 虚拟 Host 和 所属用户 ### +### 7) 虚拟主机和所属用户 ### 在 composer 安装好后,分配 document 根目录的权限和所属用户,如下所示。 # chmod 775 /var/www/laravel-develop/app/storage ----------- - # chown -R apache:apache /var/www/laravel-develop -用任意一款编辑器打开 apache 服务器的默认配置文件,在文件最后加上虚拟 host 入口。 +用任意一款编辑器打开 apache 服务器的默认配置文件,在文件最后加上虚拟主机配置。 # vim /etc/httpd/conf/httpd.conf @@ -155,13 +141,15 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op ### 8) Laravel 5 网络访问 ### -打开浏览器然后输入你配置的 IP 地址或者绝对域名(Fully qualified domain name)你将会看到 Laravel 5 的默认页面。 +打开浏览器然后输入你配置的 IP 地址或者完整域名(Fully qualified domain name)你将会看到 Laravel 5 的默认页面。 ![Laravel Default](http://blog.linoxide.com/wp-content/uploads/2015/11/35.png) ### 总结 ### -Laravel 框架对于开发网页应用来说是一个绝好的的工具。所以,看了这篇文章你将学会在 Ubuntu 15 和 CentOS 7 上安装 Laravel, 之后你就可以使用这个超棒的PHP框架提供的各种功能和舒适便捷性来进行你的开发工作。如果您有什么意见或者建议请在以下评论区中回复,我们将根据您宝贵的反馈来使我们的文章更加浅显易懂。 +Laravel 框架对于开发网页应用来说是一个绝好的的工具。所以,看了这篇文章你将学会在 Ubuntu 15 和 CentOS 7 上安装 Laravel, 之后你就可以使用这个超棒的 PHP 框架提供的各种功能和舒适便捷性来进行你的开发工作。 + +如果您有什么意见或者建议请在以下评论区中回复,我们将根据您宝贵的反馈来使我们的文章更加浅显易懂。 -------------------------------------------------------------------------------- From c607a359687a93d330991e050b8aeaa88af5409e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 5 Jan 2016 22:38:48 +0800 Subject: [PATCH 0785/1710] PUB:20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10 @ictlyh --- ...le IP Addresses To One Interface On Ubuntu 15.10.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md (95%) diff --git a/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/published/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md similarity index 95% rename from translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md rename to published/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md index 5c35da569b..9c1465d255 100644 --- a/translated/tech/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md +++ b/published/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md @@ -1,5 +1,6 @@ 在 Ubuntu 15.10 上为单个网卡设置多个 IP 地址 ================================================================================ + 有时候你可能想在你的网卡上使用多个 IP 地址。遇到这种情况你会怎么办呢?买一个新的网卡并分配一个新的 IP?不,没有这个必要(至少在小型网络中)。现在我们可以在 Ubuntu 系统中为一个网卡分配多个 IP 地址。想知道怎么做到的?跟着我往下看,其实并不难。 这个方法也适用于 Debian 以及它的衍生版本。 @@ -138,7 +139,7 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 sudo nano /etc/network/interfaces -按照黑色字体标注的添加额外的 IP 地址。 +如下添加额外的 IP 地址。 # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). @@ -217,10 +218,9 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。 想知道怎么给 CentOS/RHEL/Scientific Linux/Fedora 系统添加额外的 IP 地址,可以点击下面的链接。 -注:此篇文章以前做过选题:20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md -- [Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7][1] +- [在CentOS 7上给一个网卡分配多个IP地址][1] -周末愉快! +工作愉快! -------------------------------------------------------------------------------- @@ -233,4 +233,4 @@ via: http://www.unixmen.com/assign-multiple-ip-addresses-to-one-interface-on-ubu 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-network-interface-card-centos-7/ +[1]:https://linux.cn/article-5127-1.html From 94cf047807dc9d5852e7f1fd29ca6cf9acffba96 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 5 Jan 2016 23:16:24 +0800 Subject: [PATCH 0786/1710] PUB:20151123 How to Configure Apache Solr on Ubuntu 14 or 15 @taichirain --- ...onfigure Apache Solr on Ubuntu 14 or 15.md | 131 +++++++++++++++++ ...onfigure Apache Solr on Ubuntu 14 or 15.md | 134 ------------------ 2 files changed, 131 insertions(+), 134 deletions(-) create mode 100644 published/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md delete mode 100644 translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md diff --git a/published/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/published/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md new file mode 100644 index 0000000000..2f934be732 --- /dev/null +++ b/published/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md @@ -0,0 +1,131 @@ +如何在 Ubuntu 14/15 上配置 Apache Solr +================================================================================ + +大家好,欢迎来阅读我们今天这篇 Apache Solr 的文章。简单的来说,Apache Solr 是一个最负盛名的开源搜索平台,配合运行在网站后端的 Apache Lucene,能够让你轻松创建搜索引擎来搜索网站、数据库和文件。它能够索引和搜索多个网站并根据搜索文本的相关内容返回搜索建议。 + +Solr 使用 HTTP 可扩展标记语言(XML),可以为 JSON、Python 和 Ruby 等提供应用程序接口(API)。根据Apache Lucene 项目所述,Solr 提供了非常多的功能,很受管理员们的欢迎: + +- 全文检索 +- 分面导航(Faceted Navigation) +- 拼写建议/自动完成 +- 自定义文档排序/排列 + +#### 前提条件: #### + +在一个使用最小化安装包的全新 Ubuntu 14/15 系统上,你仅仅需要少量的准备,就开始安装 Apache Solor. + +### 1)System Update 系统更新### + +使用一个具有 sudo 权限的非 root 用户登录你的 Ubuntu 服务器,在接下来的所有安装和使用 Solr 的步骤中都会使用它。 + +登录成功后,使用下面的命令,升级你的系统到最新的更新及补丁: + + $ sudo apt-get update + +### 2) 安装 JRE### + +要安装 Solr,首先需要安装 JRE(Java Runtime Environment)作为基础环境,因为 solr 和 tomcat 都是基于Java.所以,我们需要安装最新版的 Java 并配置 Java 本地环境. + +要想安装最新版的 Java 8,我们需要通过以下命令安装 Python Software Properties 工具包 + + $ sudo apt-get install python-software-properties + +完成后,配置最新版 Java 8的仓库 + + $ sudo add-apt-repository ppa:webupd8team/java + +现在你可以通过以下命令更新包源列表,使用‘apt-get’来安装最新版本的 Oracle Java 8。 + + $ sudo apt-get update + + $ sudo apt-get install oracle-java8-installer + +在安装和配置过程中,点击'OK'按钮接受 Java SE Platform 和 JavaFX 的 Oracle 二进制代码许可协议(Oracle Binary Code License Agreement)。 + +在安装完成后,运行下面的命令,检查是否安装成功以及查看安装的版本。 + + kash@solr:~$ java -version + java version "1.8.0_66" + Java(TM) SE Runtime Environment (build 1.8.0_66-b17) + Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) + +执行结果表明我们已经成功安装了 Java,并达到安装 Solr 最基本的要求了,接着我们进行下一步。 + +### 安装 Solr### + +有两种不同的方式可以在 Ubuntu 上安装 Solr,在本文中我们只用最新的源码包来演示源码安装。 + +要使用源码安装 Solr,先要从[官网][1]下载最新的可用安装包。复制以下链接,然后使用 'wget' 命令来下载。 + + $ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz + +运行下面的命令,将这个已归档的服务解压到 /bin 目录。 + + $ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2 + +运行脚本来启动 Solr 服务,这将会先创建一个 solr 的用户,然后将 Solr 安装成服务。 + + $ sudo bash ./install_solr_service.sh solr-5.3.1.tgz + +![Solr 安装](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) + +使用下面的命令来检查 Solr 服务的状态。 + + $ service solr status + +![Solr 状态](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) + +### 创建 Solr 集合: ### + +我们现在可以使用 Solr 用户添加多个集合。就像下图所示的那样,我们只需要在命令行中指定集合名称和指定其配置集就可以创建多个集合了。 + + $ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs" + +![创建集合](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) + +我们已经成功的为我们的第一个集合创建了新核心实例目录,并可以将数据添加到里面。要查看库中的默认模式文件,可以在这里找到: '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' 。 + +### 使用 Solr Web### + +可以使用默认的端口8983连接 Apache Solr。打开浏览器,输入 http://your\_server\_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口. + + http://172.25.10.171:8983/solr/ + +![Web访问Solr](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) + +在 Solr 的 Web 控制台左侧菜单点击 'Core Admin' 按钮,你将会看见我们之前使用命令行方式创建的集合。你可以点击 'Add Core' 按钮来创建新的核心。 + +![添加核心](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) + +就像下图中所示,你可以选择某个集合并指向文档来向里面添加内容或从文档中查询数据。如下显示的那样添加指定格式的数据。 + + { + "number": 1, + "Name": "George Washington", + "birth_year": 1989, + "Starting_Job": 2002, + "End_Job": "2009-04-30", + "Qualification": "Graduation", + "skills": "Linux and Virtualization" + } + +添加文件后点击 'Submit Document'按钮. + +![添加文档](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) + +### 总结### + +在 Ubuntu 上安装成功后,你就可以使用 Solr Web 接口插入或查询数据。如果你想通过 Solr 来管理更多的数据和文件,可以创建更多的集合。希望你能喜欢这篇文章并且希望它能够帮到你。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ + +作者:[Kashif][a] +译者:[taichirain](https://github.com/taichirain) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ +[1]:http://lucene.apache.org/solr/ diff --git a/translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md deleted file mode 100644 index e6f3f05552..0000000000 --- a/translated/tech/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md +++ /dev/null @@ -1,134 +0,0 @@ - -如何在Ubuntu 14/15上配置Apache Solr -================================================================================ -大家好,欢迎来阅读我们今天Apache Solr的文章。Apache Solr是一个最有名的开源搜索平台,基于在网站后端运行的Apache Lucene,能够让你轻松创建搜索引擎来搜索网站、数据库和文件。它能够索引和搜索多个网站并根据搜索文本的相关内容返回搜索建议. - -Solr工作在可扩展标记语言(XML),并可以为JSON、Python和Ruby提供应用程序接口(APIs)。根据Apache Lucene项目,Solr提供了非常多的功能,让它很受管理员们的欢迎: -- 全文检索 -- 分面导航 -- 拼写建议/自动完成 -- 自定义文档排序/排列 - -#### 前提条件: #### - -在一个使用最小化安装包的全新 Ubuntu 14/15 系统上,你仅仅需要少量的准备,就开始安装 Apache Solor. - -### 1)System Update 系统更新### - -使用一个具有sudo权限的非root用户登录你的Ubuntu服务器,这将会在接下来的所有安装和使用Solr的步骤中使用。 - -登录成功后,使用下面的命令,升级你的系统到最新的更新及补丁 - - $ sudo apt-get update - -### 2) JRE Setup 安装JRE### - -要安装Solr,首先需要安装JRE(Java Runtime Environment)作为基础环境,因为solr和tomcat都是基于Java.所以,我们需要安装最新版的Java和配置Java本地环境. - -要想安装最新版的Java 8,我们需要通过以下命令安装Python Software Properties工具包 - - $ sudo apt-get install python-software-properties - -完成后,配置最新版Java 8的仓库 - - $ sudo add-apt-repository ppa:webupd8team/java - -现在你可以通过以下命令更新包源列表,使用‘wget’来安装最新版本的Oracle Java 8,然后安装Java。 - - $ sudo apt-get update - ----------- - - $ sudo apt-get install oracle-java8-installer - -在安装和配置Java SE Platform 和 JavaFX 过程中点击'OK'按钮接受 Oracle二进制代码许可协议(Oracle Binary Code License Agreement)。 - -在安装完成后,运行下面的命令,检查是否安装成功以及查看安装的版本。 - - kash@solr:~$ java -version - java version "1.8.0_66" - Java(TM) SE Runtime Environment (build 1.8.0_66-b17) - Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) - -执行结果表明我们已经成功安装了Java,并达到安装Solr最基本的要求了,接着我们进行下一步。 - -### 安装Solr### - -有两种不同的方式可以在Ubuntu上安装Solr,在本文中我们只用最新的源码包来演示源码安装。 - -要使用源码安装Solr,先要从官网 [Web Page][1] 下载最新的可用安装包。复制以下链接,然后使用 'wget'命令来下载。 - - $ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz - -运行下面的命令,将已存档的服务解压到 /bin目录。 - - $ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2 - - -运行脚本来启动Solr服务,这将会先创建一个solr的用户,然后将Solr安装成服务。 - - $ sudo bash ./install_solr_service.sh solr-5.3.1.tgz - -![Solr 安装](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png) - -使用下面的命令来检查Solr服务的状态。 - - $ service solr status - -![Solr 状态](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png) - -### 创建Solr集合: ### - -我们现在可以使用Solr用户添加多个集合。就像下图所示的那样,我们只需要在命令行中指定集合名称和指定其配置集就可以创建多个集合了。 - - $ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs" - -![创建集合](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png) - -我们已经成功的为我们的第一个集合创建了新的内核实例目录,并可以将数据添加到里面。 -查看库中的默认模式文件 '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' - -### 使用Solr页面### - -可以使用默认的端口8983连接Apache Solr.打开浏览器,输入 http://your_server_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口. - - http://172.25.10.171:8983/solr/ - -![Web访问Solr](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png) - -在Solr的Web控制台左侧菜单点击'Core Admin'按钮,你将会看见我们之前使用CLI方式创建的集合。你可以点击'Add Core'按钮来创建新的内核。 - -![添加核心](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png) - -就像下图中所示,你可以选择某个集合和指向文档向里面添加内容或从文档中查询数据。像方框中显示的那样添加指定格式的数据。 - - { - "number": 1, - "Name": "George Washington", - "birth_year": 1989, - "Starting_Job": 2002, - "End_Job": "2009-04-30", - "Qualification": "Graduation", - "skills": "Linux and Virtualization" - } - -添加文件后点击'Submit Document'按钮. - -![添加文档](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png) - -### 总结### - -在Ubuntu上安装成功后,你就可以使用Solr WEB接口插入或查询数据。如果你想通过Solr来管理更多的数据和文件,可以创建更多的集合。希望你能喜欢这篇文章并且希望它能够帮到你。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/ - -作者:[Kashif][a] -译者:[taichirain](https://github.com/taichirain) -校对:[Caroline](https://github.com/carolinewuyan) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/kashifs/ -[1]:http://lucene.apache.org/solr/ From 9a9de0be12f8e21da859476cad6ef9ac048517cc Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 6 Jan 2016 08:55:58 +0800 Subject: [PATCH 0787/1710] =?UTF-8?q?=E6=92=A4=E9=94=80=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r Using Windows 10 After More than 8 Years--See Comparison.md | 1 - 1 file changed, 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 22a0acdbf1..702783b6b0 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,4 +1,3 @@ -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. From 0353bd29faeeb683e6c974a8669fab9a72dbf138 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Wed, 6 Jan 2016 16:01:23 +0800 Subject: [PATCH 0788/1710] =?UTF-8?q?[=E7=BF=BB=E5=AE=8C=E6=88=90=E8=AF=91?= =?UTF-8?q?]=2020150921=2014=20tips=20for=20teaching=20open=20source=20dev?= =?UTF-8?q?elopment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【翻完成译】 开源代码开发的十四点教学技巧 --- ...ps for teaching open source development.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 translated/talk/20150921 14 tips for teaching open source development.md diff --git a/translated/talk/20150921 14 tips for teaching open source development.md b/translated/talk/20150921 14 tips for teaching open source development.md new file mode 100644 index 0000000000..aef6304789 --- /dev/null +++ b/translated/talk/20150921 14 tips for teaching open source development.md @@ -0,0 +1,75 @@ +GHLandy Translated + +开源代码开发的十四点教学技巧 +================================================================================ + +对于培养和塑造开源代码开发者,学术界就是一个很好的平台。研究中发现,我们偶尔会开源自己编写的软件。这样做有两个理由,一是为了提升自己编写的工具的使用率,二是为了了解人们使用这些工具时会遇到哪些问题。在这样一个编写研究软件的背景下,我的任务就是为 Bradford 大学重新设计二年级的软件工程课程。 + +这是一个巨大的挑战,因为我所面对的 80 个学生是来自不同专业的,包括 IT、商务计算和软件工程,这些学生将要在一起上课。最有难度的是,需要和这些编程经验差距很大的学生一起编写代码。按照传统,该课程允许学生选择自己的小组,然后布置他们构建一个存储数据库系统构的任务,最后提交报告作为评估的一部分。 + +而我决定重新设计课程,让学生了解现实中的软件团队是如何协作的过程。根据学生的专业和编程技能,我将他们分为五六个人一组。这是为了确保每个小组的整体水平相当,避免小组之间的不公平。 + +### 核心课程 ### + +课程的形式升级为文化课和实践课两项结合在一起。然而实践部分只是充当辅助,主要是老师监督各个小组的实践进度以及他们如何处理客户和产品之间的关系。传统的教学方式由项目管理、软件测试、工程需求分析以及类似主题的讲座组成,再辅以实践和导师会议。这些会议可以很好的考核学生的水平以及检测出他们是否可以跟得上我们在讲座部分中的软件工程方法。本年的教学主题包括以下内容: + +- 工程需求分析 +- 如何与客户及其他团队成员互动 +- 程序设计方法,如敏捷和极限编程方法 +- 如何通过学习不同的软件工程方法进行短期的水平提高 +- 小组会议及文档编写 +- 项目管理及项目进展图表 +- UML 图表及系统描述 +- 使用 Git 来进行代码的版本控制 +- 软件测试及 BUG 跟踪 +- 使用开源库 +- 开源代码许可及其选择 +- 软件分发 + +在这些讲座之后,我会有一些来自世界各地的嘉宾为我们说说他们在软件分发过程中的经验。我们也设法请来大学里知识产权律师谈关于软件在英国的知识产权问题,以及如何处理软件的知识产权问题。 + +### 协作工具 ### + +为了让上述教学内容的顺利进行,我们将会介绍一些工具,并训练学生在他们的项目中使用这些工具。如下: + +- Google Drive:团队与导师之间进行共享的工具,暂时存储用于描述项目的文档和图表、需求收集、会议纪要以及项目跟踪等信息。采取这样一个方式来监控并提供直接反馈到每个团队,是非常有效的。 +- [Basecamp][1]:同样是用于分享文档,在随后的课程中,我们可能会考虑用它取代 Google Drive。 +- BUG 报告工具,如 [Mantis][2]:只能让有限的用户自由提交 BUG。稍后我们提到的 Git 可以让小组内的所有人员用做 BUG 提交。 +- 远程视频会议工具:在人员不在校内,甚至去了其他城市的情况下使用。学生们可以定期通过 Skype 来交流并记录会议内容或则进行录音作为今后其他用处。 +- 同时,学生们的项目中还会用到大量的开源工具包。他们可以根据自己小组的项目需求来选择自己使用的工具包和编程语言。唯一的条件是,这些项目必须开源,最后成果可以安装到大学里的实验室,并且大多的研究人员都支持这个条件。 +- 最后,所有团队必须向客户交付他们的项目,包括完整的工作版本的软件、文档和他们自己选择的开放源码许可。大多数的团队选择了 GPLv3 许可证。 + +### 技巧和经验教训 ### + +在最后,这一年过的很愉快,并且所有学生的项目都做的非常棒。这里有一些我学到的经验教训,可能有助于提高明年的课程质量: + +1. 提供各种各样的有趣的选择项目给学生选择。比如说,游戏开发或者移动应用开发以及完成各种目标的项目等。建立普通的数据库系统已经不能提起学生的兴趣了,而参与到有趣的项目中去,学生本身就是自学者,同时可以帮助解决小组成员和小组之间的常见问题。再通过一个消息列表,学生们发表他们在测试中遇到的任何问题,以寻求其他人的帮助建议。然而,这种方法有一个缺点。外部考官建议我们使用统一种类型的项目和统一的编程语言以帮助缩小对学生的评估标准。 +2. 定期给学生在每一个阶段的表现进行反馈。比方说,可以在和各个小组开指导会议的时候、或者每个阶段进行反馈,以帮助他在接下来的工作中自我改进。 +3. 学生更加愿意与校外的客户一起协作。他们期待着与外部公司代表或大学以外的人协作,不过是为了获得新体验而已。与导师进行交流时,他们都能够表现得很专业,这样使得老师非常放心。 +4. 很多团队版开发单元测试的部分放到项目结束之后,从极限编程方法的角度来说,这是一个严重的禁忌。也许测试应包括在不同阶段的评估中,来提醒他们需要与并行开展软件开发和单元测试。 +5. 在这个班的 80 个人里边,仅有 4 个女生,每个女都分在不同的小组里边。我观察到,男生们总是准备充分地承担起领队角色,并将最有趣的代码分配个他们自己来编写,女生则多大遵循安排或则是编写文档。出于某种原因,女生选择不显示权威,即使在女性辅导员鼓励下,她们也不愿编写代码。这仍然是一个需要解决的主要问题。 +6.允许不同风格文项目文档,比方说,UML 图表、状态图或其他形式的。让学生学习这些并与其他课程融汇贯通来提高他们的学习经验。 +7. 学生里边,有些是很好的开发人员,有些做商务计算的则没有多少编程经验。我们要鼓励团队共同努力,避免开发人员做得比那些只做会议记录或文档的其他成员更好的错误认知。我们常在辅导课程中鼓励角色转换,让每个人都有机会学习如何编程。 +8. 各个小组进行导师会议室非常重要的,可以有效监督各个小组进展情况,还可以了解是谁做了大部分工作。通常,没来参加会议的小组成员基本就是没有参与到他们的团队工作中去的,并且通过其他成员提交的工作报告也可以确定哪些人不活跃。 +9. 我们鼓励学生们把许可证附加到项目中去,使用外部库以及和客户协作的时候要表明确切知识产权问题。 这样可让解放学生的思考能力,了解真实的软件交付问题。 +10. 给学生们自己选择技术空间。 +11. 助教是关键。同时管理 80 个显示显然很有难度,特别是需要对他们进行评估的那几周。明年我一定会找个助教来帮我一起管理各个小组。 +12. 实验室的技术支持是非常重要的。大学里的技术支持对于本课程是非常赞同的。学习正在考虑明年将虚拟机分配给每个团队,这样没个团队可以根据需要自行在虚拟机中安装任何软件。 +13. 团队合作,相互帮助。大多数团队自然而然的支持其他团队成员,同时指导人在中间也帮助了不少。 +14. 来自其他技术人员的帮助只能作为辅助方法。作为一个新的学术,我需要从经验中学习,同时当我如何知道学生是,我会通过多个角度来建议学生和小组去尝试处理问。来自高级技术人员的支持对我来说就是一种鼓励。 + +最后,对于作为导师的我以及所有的学生来说,这都是个有趣的课程。在学习目标和传统的分级方案上还有有一些问题需,以解决减少教师的工作量。明年,我计划会保留这种教学模式,并希望能够提出更好的分级方案以及介绍更多的软件来帮助监督项目和控制代码版本。 + +-------------------------------------------------------------------------------- + +via: http://opensource.com/education/15/9/teaching-open-source-development-undergraduates + +作者:[Mariam Kiran][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者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/ From ed66e7954440d97d41de62c4dd8ac91cd7fcc3e4 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Wed, 6 Jan 2016 16:02:05 +0800 Subject: [PATCH 0789/1710] Delete 20150921 14 tips for teaching open source development.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译,译文放在相应位置。 --- ...ps for teaching open source development.md | 74 ------------------- 1 file changed, 74 deletions(-) delete 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 deleted file mode 100644 index fb250ac4c6..0000000000 --- a/sources/talk/20150921 14 tips for teaching open source development.md +++ /dev/null @@ -1,74 +0,0 @@ -GHLandy 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. - -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/ From 8e9f7304e048e221c0dd25f073717c7abc6bb696 Mon Sep 17 00:00:00 2001 From: Feng Wei Date: Wed, 6 Jan 2016 23:41:49 +0800 Subject: [PATCH 0790/1710] Update 20160104 What is good stock portfolio management software on Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申领任务 --- ... What is good stock portfolio management software on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160104 What is good stock portfolio management software on Linux.md b/sources/tech/20160104 What is good stock portfolio management software on Linux.md index 258cf104fc..b7c372ce71 100644 --- a/sources/tech/20160104 What is good stock portfolio management software on Linux.md +++ b/sources/tech/20160104 What is good stock portfolio management software on Linux.md @@ -1,3 +1,4 @@ +translating by fw8899 What is good stock portfolio management software on Linux ================================================================================ If you are investing in the stock market, you probably understand the importance of a sound portfolio management plan. The goal of portfolio management is to come up with the best investment plan tailored for you, considering your risk tolerance, time horizon and financial goals. Given its importance, no wonder there are no shortage of commercial portfolio management apps and stock market monitoring software, each touting various sophisticated portfolio performance tracking and reporting capabilities. From a1511399316d334594d75452d7ac380b8a10423d Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Thu, 7 Jan 2016 00:01:05 +0800 Subject: [PATCH 0791/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译中 --- ...Information on Linux Using Command Line.md | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md b/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md index c793db21b2..29ec43f74b 100644 --- a/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md +++ b/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md @@ -1,82 +1,102 @@ sonofelice translating +Linux系统下使用命令行来查看硬件信息 How to Check Hardware Information on Linux Using Command Line ================================================================================ ![](https://maketecheasier-holisticmedia.netdna-ssl.com/assets/uploads/2015/12/hdd_info_featured-1.png) +有许多可用的命令可以用来查看Linux系统上的硬件信息。有些命令只能够打印出像CPU和内存这一特定的硬件组件信息,其余的命令可以查看其余硬件单元的信息。 + There are many commands available to check hardware information of your Linux system. Some commands report only specific hardware components like CPU or memory while the rest cover multiple hardware units. -This tutorial takes a quick look at some of the most commonly used commands to check information and configuration details about various hardware devices. +这个教程可以带大家快速学习一下核查各种硬件设备的信息和配置详情的最常用的命令。 +This tutorial takes a quick look at some of the most commonly used commands to check information and configuration details about various hardware devices. ### lscpu ### +`lscpu`命令能够查看CPU和处理单元的信息。该命令没有任何其他选项或者别的功能。 The `lscpu` command gives you information about the CPU and processing units. It does not have any other options or functionality. lscpu +运行该命令会看到下面输出: You will see the following output by running the above command. ![hdd_info_lscpu](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lscpu.png) ### lspci ### +`lspci`是另一个命令行工具,可以用来列出所有的PCI总线,还有与PCI总线相连的设备的详细信息,比如VGA适配器、显卡、网络适配器、usb端口、SATA控制器等。 The lspci is another command line tool that lists all the PCI buses and details about the devices connected to them like VGA adapter, graphics card, network adapter, usb ports, SATA controller, etc. lspci +你可以看到类似下图的输出信息。 You will see an output similar to the following image. ![hdd_info_lspci](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci-1.png) +可以通过运行下面的命令来过滤出特定的设备的信息。 You can also filter out specific device information by running the following command: lspci -v | grep "VGA" -A 12 +运行上面的命令可以看到类似下图的关于显卡的信息。 You will see graphics card information similar to the following. ![hdd_info_lspci_vga](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci_vga.png) ### lshw ### +`lshw`是一个通用的工具,可以列出多种硬件单元的详细或者概要的信息,比如CPU、内存、usb控制器、硬盘等。`lshw`能够从不同的“/proc”文件中提取出相关的信息。 The `lshw` is a general purpose utility that reports detailed and brief information about multiple hardware units like CPU, memory, usb controller, disk, etc. Lshw extracts the information from different “/proc” files. lshw -short +通过运行上面的命令可以看到下面的信息。 You will see the following information by running the above command. ![hdd_info_lshw](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lshw.png) ### lsscsi ### +通过运行下面的命令可以列出像硬盘和光驱等scsi/sata设备的信息: You can list all scsi/sata devices like hard drives and optical drives by running the following command: lsscsi +会得到类似下面的输出。 The output wI’ll look something like this image. ![hdd_info_lsscsi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsscsi-1.png) ### lsusb ### +`lsusb`命令能够列出USB控制器和与USB控制相连的设备的详细信息。默认情况下,`lsusb`命令只打印出概要信息。可以通过使用-v参数打印每一个usb端口的详细信息。 This command shows you the USB controllers and details about devices connected to them. By default, the lsusb command prints brief information. You can also use the verbose option -v to print detailed information about each usb port. lsusb +可以看到下面输出。 You will see the following output. ![hdd_info_lsusb](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsusb.png) ### Inxi ### +`Inxi`是一个bash脚本,能够从系统的多个源文件和命令行抓取硬件信息,并打印出一个非技术人员也能看懂的友好的报告。 `Inxi` is a bash script that fetches hardware information from multiple sources and commands on the system and gives you goodlooking reports that non-technical users can read easily. +默认情况下,Ubuntu上没有安装`inxi`。可以通过运行下面命令来安装`Inxi`: By default, `inxi` is not installed in Ubuntu. You can install it by running the following command: sudo apt-get install inxi +安装完`Inxi`之后,通过运行下面命令能够得到硬件相关的信息: After installing inxi, you can get hardware information by running the following command: inxi -Fx +能够得到类似下图的输出。 You will see an output similar to the image below. ![hdd_info_inxi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_inxi.jpg) @@ -84,10 +104,12 @@ You will see an output similar to the image below. ### df ### This command gives you brief information about various partitions, their mount points and the used and available space on each. +可以在使用`df`命令的时候加上`-H`参数。 You can run the `df` command with the `-H` parameter. df -H +会得到下面的输出。 You will see the following output. ![hdd_info_df](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_df-1.png) @@ -134,8 +156,9 @@ You will see the following output. ![hdd_info_hdparm](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_hdparm.png) -### Conclusion ### +### 总结 ### +每个命令都有不同的方式来获取硬件的信息。在查看特定的硬件信息的时候,可以尝试使用不同的方式。上面所有的命令行工具在大部分的Linux发型版本中都是可以使用的,可以很容易的从仓库中获取安装。 Each of the commands has a different method of extracting hardware information. You can try more than one of them while looking for specific hardware details. All of the above tools are available in most Linux distros, and can be easily installed from the default repository. -------------------------------------------------------------------------------- From 6e35530646285c02fb478a4b81f0416ad94af5e0 Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Thu, 7 Jan 2016 00:30:06 +0800 Subject: [PATCH 0792/1710] =?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 翻译完成 --- ...Information on Linux Using Command Line.md | 49 +++++-------------- 1 file changed, 12 insertions(+), 37 deletions(-) rename {sources => translated}/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md (57%) diff --git a/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md b/translated/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md similarity index 57% rename from sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md rename to translated/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md index 29ec43f74b..9806dd8b0d 100644 --- a/sources/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md +++ b/translated/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md @@ -1,146 +1,122 @@ -sonofelice translating Linux系统下使用命令行来查看硬件信息 -How to Check Hardware Information on Linux Using Command Line ================================================================================ ![](https://maketecheasier-holisticmedia.netdna-ssl.com/assets/uploads/2015/12/hdd_info_featured-1.png) 有许多可用的命令可以用来查看Linux系统上的硬件信息。有些命令只能够打印出像CPU和内存这一特定的硬件组件信息,其余的命令可以查看其余硬件单元的信息。 -There are many commands available to check hardware information of your Linux system. Some commands report only specific hardware components like CPU or memory while the rest cover multiple hardware units. - -这个教程可以带大家快速学习一下核查各种硬件设备的信息和配置详情的最常用的命令。 - -This tutorial takes a quick look at some of the most commonly used commands to check information and configuration details about various hardware devices. +这个教程可以带大家快速学习一下查看各种硬件设备的信息和配置详情的最常用的命令。 ### lscpu ### `lscpu`命令能够查看CPU和处理单元的信息。该命令没有任何其他选项或者别的功能。 -The `lscpu` command gives you information about the CPU and processing units. It does not have any other options or functionality. lscpu 运行该命令会看到下面输出: -You will see the following output by running the above command. ![hdd_info_lscpu](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lscpu.png) ### lspci ### `lspci`是另一个命令行工具,可以用来列出所有的PCI总线,还有与PCI总线相连的设备的详细信息,比如VGA适配器、显卡、网络适配器、usb端口、SATA控制器等。 -The lspci is another command line tool that lists all the PCI buses and details about the devices connected to them like VGA adapter, graphics card, network adapter, usb ports, SATA controller, etc. lspci 你可以看到类似下图的输出信息。 -You will see an output similar to the following image. ![hdd_info_lspci](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci-1.png) -可以通过运行下面的命令来过滤出特定的设备的信息。 -You can also filter out specific device information by running the following command: +可以通过运行下面的命令来过滤出特定设备的信息: lspci -v | grep "VGA" -A 12 运行上面的命令可以看到类似下图的关于显卡的信息。 -You will see graphics card information similar to the following. ![hdd_info_lspci_vga](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci_vga.png) ### lshw ### `lshw`是一个通用的工具,可以列出多种硬件单元的详细或者概要的信息,比如CPU、内存、usb控制器、硬盘等。`lshw`能够从不同的“/proc”文件中提取出相关的信息。 -The `lshw` is a general purpose utility that reports detailed and brief information about multiple hardware units like CPU, memory, usb controller, disk, etc. Lshw extracts the information from different “/proc” files. lshw -short 通过运行上面的命令可以看到下面的信息。 -You will see the following information by running the above command. ![hdd_info_lshw](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lshw.png) ### lsscsi ### 通过运行下面的命令可以列出像硬盘和光驱等scsi/sata设备的信息: -You can list all scsi/sata devices like hard drives and optical drives by running the following command: lsscsi 会得到类似下面的输出。 -The output wI’ll look something like this image. ![hdd_info_lsscsi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsscsi-1.png) ### lsusb ### `lsusb`命令能够列出USB控制器和与USB控制相连的设备的详细信息。默认情况下,`lsusb`命令只打印出概要信息。可以通过使用-v参数打印每一个usb端口的详细信息。 -This command shows you the USB controllers and details about devices connected to them. By default, the lsusb command prints brief information. You can also use the verbose option -v to print detailed information about each usb port. lsusb 可以看到下面输出。 -You will see the following output. ![hdd_info_lsusb](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsusb.png) ### Inxi ### `Inxi`是一个bash脚本,能够从系统的多个源文件和命令行抓取硬件信息,并打印出一个非技术人员也能看懂的友好的报告。 -`Inxi` is a bash script that fetches hardware information from multiple sources and commands on the system and gives you goodlooking reports that non-technical users can read easily. 默认情况下,Ubuntu上没有安装`inxi`。可以通过运行下面命令来安装`Inxi`: -By default, `inxi` is not installed in Ubuntu. You can install it by running the following command: sudo apt-get install inxi 安装完`Inxi`之后,通过运行下面命令能够得到硬件相关的信息: -After installing inxi, you can get hardware information by running the following command: inxi -Fx 能够得到类似下图的输出。 -You will see an output similar to the image below. ![hdd_info_inxi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_inxi.jpg) ### df ### -This command gives you brief information about various partitions, their mount points and the used and available space on each. +`df`命令能够列出不同分区的概要信息,挂载点,已用的和可用的空间。 可以在使用`df`命令的时候加上`-H`参数。 -You can run the `df` command with the `-H` parameter. df -H 会得到下面的输出。 -You will see the following output. ![hdd_info_df](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_df-1.png) ### Free ### -You can check the amount of used, free and total amount of RAM on your system with the free command. +通过使用`free`命令可以查看系统中使用的、闲置的和总体的RAM数量。 free -m -You will see the following output. +会看到下面输出。 ![hdd_info_free](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_free.png) ### Dmidecode ### -The `dmidecode` command is different from all other commands. It extracts hardware information by reading data from the DMI tables. +`dmidecode`命令与其他命令不同。该命令是从DMI表中读取硬件信息的。 -To display information about the processor, run: +要查看处理器的信息,运行下面命令: sudo dmidecode -t processor ![hdd_info_dmi_processor](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_processor.jpg) -To display information about the memory, run: +要查看内存的信息,运行下面命令: sudo dmidecode -t memory ![hdd_info_dmi_memory](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_memory.png) -To display information about the bios, run: +要查看bios的信息,运行下面命令: sudo dmidecode -t bios @@ -148,25 +124,24 @@ To display information about the bios, run: ### Hdparm ### -The hdparm command gives you information about sata devices like hard disks. +`hdparm`命令可以用来显示想硬盘这样的sata设备的信息。 sudo hdparm -You will see the following output. +可以看到下面的输出。 ![hdd_info_hdparm](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_hdparm.png) ### 总结 ### 每个命令都有不同的方式来获取硬件的信息。在查看特定的硬件信息的时候,可以尝试使用不同的方式。上面所有的命令行工具在大部分的Linux发型版本中都是可以使用的,可以很容易的从仓库中获取安装。 -Each of the commands has a different method of extracting hardware information. You can try more than one of them while looking for specific hardware details. All of the above tools are available in most Linux distros, and can be easily installed from the default repository. -------------------------------------------------------------------------------- via: https://www.maketecheasier.com/check-hardware-information-linux/ 作者:[Hitesh Jethva][a] -译者:[译者ID](https://github.com/译者ID) +译者:[sonofelice](https://github.com/sonofelice) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 49630096c8bbc0f92bc36c35ee8fa82740724ac0 Mon Sep 17 00:00:00 2001 From: kylepeng93 <958983476@qq.com> Date: Thu, 7 Jan 2016 16:23:04 +0800 Subject: [PATCH 0793/1710] translated --- ...om the command line on Debian or Ubuntu.md | 313 ------------------ ...om the command line on Debian or Ubuntu.md | 297 +++++++++++++++++ 2 files changed, 297 insertions(+), 313 deletions(-) delete mode 100644 sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md create mode 100644 translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md diff --git a/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md deleted file mode 100644 index c91fa32afc..0000000000 --- a/sources/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md +++ /dev/null @@ -1,313 +0,0 @@ -kylepeng93翻译中... -How to use KVM from the command line on Debian or Ubuntu -================================================================================ -There are different ways to manage virtual machines (VMs) running on KVM hypervisor. For example, virt-manager is a popular GUI-based front-end for VM management. However, if you would like to use KVM on a headless server, GUI-based solutions will not be ideal. In fact, you can create and manage KVM VMs purely from the command line using kvm command-line wrapper script. Alternatively, you can use virsh which is an easier-to-use command-line user interface for managing guest VMs. Underneath virsh, it communicates wtih libvirtd service which can control several different hypervisors including KVM, Xen, QEMU, LXC and OpenVZ. - -A command-line management interface such as virsh is also useful when you would like to "automate" the provisioning and management of VMs. Also, the fact that virsh supports multiple hypervisors means you can manage different hypervisors via the same virsh interface. - -In this tutorial, I will demonstrate **how to run KVM from the command line by using virsh on Debian or Ubuntu**. - -### Step One: Verify Hardware Virtualization Support ### - -As a first step, verify that the host CPU is equipped with hardware virtualization extensions (e.g., Intel VT or AMD-V), which are required for KVM. The following command will do. - - $ egrep '(vmx|svm)' --color /proc/cpuinfo - -![](https://c2.staticflickr.com/2/1505/24050288606_758a44c4c6_c.jpg) - -If the output does not contain vmx or svm flag, it means the host CPU does not have hardware virtualization support. Thus you cannot use KVM on the host. After verifying that the host CPU comes with vmx or svm, proceed to install KVM next. - -For KVM, it is not required to run a 64-bit kernel on the KVM host, but generally it is recommended. - -### Step Two: Install KVM ### - -Using apt-get, install KVM and related user-space tools. - - $ sudo apt-get install qemu-kvm libvirt-bin - -During installation, libvirtd group (or libvirt-qemu on Debian) will be created, and your userID will be automatically added to the group. This will allows you to manage VMs as a non-root regular user. You can verify that by using id command, which will show your group IDs: - - $ id - -![](https://c2.staticflickr.com/6/5597/15432586092_64dfb867d3_c.jpg) - -If for some reason, libvirtd (or libvirt-qemu) is not found in your groupID list, you can manually add yourself to the group as follows. - -On Ubuntu: - - $ sudo adduser [youruserID] libvirtd - -On Debian: - - $ sudo adduser [youruserID] libvirt-qemu - -Reload updated group membership info as follows. Upon asked for a password, enter your login password. - - $ exec su -l $USER - -At this point, you should be able to run virsh as a regular user. As a test, try the command below, which will show a list of available VMs (currently none). If you do not encounter a permission error, it means everything is okay so far. - - $ virsh list - ----------- - - Id Name State - ---------------------------------------------------- - -### Step Three: Configure Bridged Networking ### - -One way to enable KVM VMs to access external networks is via a Linux bridge created on a KVM host. The bridge interconnects the virtual interfaces of VMs with the physical interface of the host, so that the VMs can send or receive traffic via the physical interface. This is called bridged networking. - -Here is how to create and configure a Linux bridge br0 for bridged networking with KVM. - -First, install a necessary package, and create a Linux bridge from the command line. - - $ sudo apt-get install bridge-utils - $ sudo brctl addbr br0 - -The next step is to configure Linux bridge in /etc/network/interfaces, so that the bridge is configured automatically upon boot. To use /etc/network/interfaces, you need to disable Network Manager on your system (if you are using it). Follow the [this instruction][1] to disable Network Manager. - -After disabling Network Manager, go ahead and configure Linux bridge br0 in /etc/network/interfaces as follows. - - #auto eth0 - #iface eth0 inet dhcp - - auto br0 - iface br0 inet dhcp - bridge_ports eth0 - bridge_stp off - bridge_fd 0 - bridge_maxwait 0 - -In the above I assume that eth0 is the primary network interface that is connected to external networks. Also, I assume that eth0 is getting its IP address via DHCP. Note that there is no configuration for eth0 in /etc/network/interface. The Linux bridge br0 takes up the configuration of eth0 as eth0 is enslaved to the bridge br0. - -Restart network service, and verify that Linux bridge is configured successfully. If successful, br0 should be assigned the eth0's DHCP IP address, and eth0 should not have any IP address assigned. - - $ sudo /etc/init.d/networking restart - $ ifconfig - -If for any reason eth0 still retains the IP address which is assigned to br0, you may have to explicitly remove the IP address from eth0. - -![](https://c2.staticflickr.com/2/1698/23780708850_66cd7ba6ea_c.jpg) - -### Step Four: Create a VM from the Command Line ### - -With KVM, the configuration of a VM is stored in a domain XML file. Thus, the first step to create a VM is to prepare its domain XML file. - -The following is a sample domain XML file of a VM. You can customize it as needed. - - - alice - f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa - 1048576 - 1048576 - 1 - - hvm - - - - - - - destroy - restart - destroy - - /usr/bin/kvm - - - - -
- - - - - - -
- - - - - - -
- - - - - - - - - -The above domain XML file defines the following VM. - -- 1GB memory, one vCPU and one hard drive. -- Disk image: /home/dev/images/alice.img. -- Boot from CD-ROM (/home/dev/iso/CentOS-6.5-x86_64-minimal.iso). -- Networking: one network interface bridged to br0 -- Remote access via VNC. - -The UUID string inside can be randomly generated. To get a random UUID, you can use uuid command-line tool. - - $ sudo apt-get install uuid - $ uuid - -Another way to create a domain XML file is to dump the domain information of an existing VM as follows. - - $ virsh dumpxml alice > bob.xml - -![](https://c2.staticflickr.com/6/5808/23968234602_25e8019ec8_c.jpg) - -### Step Five: Start VM from the Command Line ### - -Before starting a VM, you need to create its initial disk image. For that, you can use qemu-img command, which comes with qemu-kvm package you installed. The following command creates 10GB size empty disk image of qcow2 type: - - $ qemu-img create -f qcow2 /home/dev/images/alice.img 10G - -The advantage of using "qcow2" (as opposed to "raw") as a disk image format is that a "qcow2"-type disk image is not created as a full size (10GB) initially, but grows as the disk gets populated. So it is more space-efficient. - -Now you are ready to start a VM using the domain XML file you created earlier. The following command will create a VM, and automatically start it. - - $ virsh create alice.xml - ----------- - - Domain alice created from alice.xml - -**NOTE**: If you run the above command with an already created VM, it will wipe out the VM without warning. If you already created a VM, you can instead use the following command to just start the VM. - - $ virsh start alice.xml - -Verify that a new domain has been created and started successfully with: - - $ virsh list - ----------- - - Id Name State - ---------------------------------------------------- - 3 alice running - -Also, verify that the virtual interface for the VM (e.g., vnet0) is successfully added to the Linux bridge br0 that you created earlier. - - $ sudo brctl show - -![](https://c2.staticflickr.com/2/1546/23449585383_a371e9e579_c.jpg) - -### Step Six: Remote Access a VM ### - -To access the console of a running VM remotely, you can use any VNC client. - -First, find out the VNC port number for the VM as follows. - - $ sudo netstat -nap | egrep '(kvm|qemu)' - -![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg) - -In this example, the VNC port number for alice VM is 5900. - -Then launch a VNC client, and connect to a VNC server running at :5900. In our example, the VM is supposed to boot into CentOS CD-ROM. - -![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg) - -### Manage VMs with virsh ### - -The following lists common usages of virsh command. - -To create a new guest domain and start a VM: - - $ virsh create alice.xml - -To stop a VM and destroy a guest domain: - - $ virsh destroy alice - -To shutdown a VM (without destroying a domain): - - $ virsh shutdown alice - -To suspend a VM: - - $ virsh suspend alice - -To resume a suspended VM: - - $ virsh resume alice - -To access login console of a running VM: - - $ virsh console alice - -To autostart a VM upon host booting: - - $ virsh autostart alice - -To get domain information of a VM: - - $ virsh dominfo alice - -To edit domain XML of a VM: - - $ virsh edit alice - -The above will invoke the domain XML file of the VM with a default text editor. Any change in the XML will automatically be validated by libvirt for correctness. - -You can also manage VMs from within a virsh session. To create and enter a new virsh session, simply run: - - $ virsh - -At the virsh prompt, you can use any virsh commands. - -![](https://c2.staticflickr.com/6/5645/23708565129_b1ef968b30_c.jpg) - -### Troubleshooting ### - -1. I am getting the error while trying to create a VM: - - error: internal error: no supported architecture for os type 'hvm' - -You can get this error if your hardware does not have hardware virtualization support (e.g., Intel VT or AMD-V), which is required to run KVM. If you are getting this error even when your CPU comes with Intel VT or AMD-V, here are possible solutions: - -First, check if kvm kernel module is missing. - - $ lsmod | grep kvm - -If kvm kernel module is not loaded, you must load it as follows. - - $ sudo modprobe kvm_intel (for Intel processor) - $ sudo modprobe kvm_amd (for AMD processor) - -The second solution is adding "--connect qemu:///system" argument to virsh command as follows. This argument may be needed when you are using more than one hypervisor (e.g., VMware, VirtualBox) on the server hardware. - - $ virsh --connect qemu:///system create alice.xml - -2. I am getting the error while trying to access login console of my VM: - - $ virsh console alice - ----------- - - error: internal error: cannot find character device - -This error occurs because you did not define a console device in the VM's XML file. Add the following inside the "device" section of the XML file. - - - - - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/use-kvm-command-line-debian-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://xmodulo.com/author/nanni -[1]:http://xmodulo.com/disable-network-manager-linux.html diff --git a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md new file mode 100644 index 0000000000..6f9f3690cb --- /dev/null +++ b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -0,0 +1,297 @@ + +怎样在ubuntu和debian中用命令行使用KVM +================================================================================ +有很多不同的方式去管理运行在KVM管理程序上的虚拟机。例如,virt-manager就是一个流行的基于图形用户界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用KVM,那么基于图形用户界面的解决方案显然是行不通的。事实上,你可以纯粹的使用包装了kvm命令行脚本的命令行来管理KVM虚拟机。作为替代方案,你可以使用virsh这个容易使用的命令行用户接口来管理客户虚拟机。在virsh中,它通过和libvirtd服务通信来达到控制虚拟机的目的,而libvirtd可以控制几个不同的虚拟机管理器,包括KVM,Xen,QEMU,LXC和OpenVZ。 + 当你想要对虚拟机的前期准备和后期管理实现自动化操作时,像virsh这样的命令行管理工具是非常有用的。同样,virsh支持多个管理器的事实也意味着你可以通过相同的virsh接口去管理不同的虚拟机管理器。 + 在这篇文章中,我会示范**怎样在ubuntu和debian上通过使用virsh命令行去运行KVM**。 + +### 第一步:确认你的硬件平台支持虚拟化 ### + +作为第一步,首先要确认你的主机CPU配备了硬件虚拟化拓展(e.g.,Intel VT或者AMD-V),这是KVM对硬件的要求。下面的命令可以检查硬件是否支持虚拟化。 + + $ egrep '(vmx|svm)' --color /proc/cpuinfo + +![](https://c2.staticflickr.com/2/1505/24050288606_758a44c4c6_c.jpg) + + 如果在输出中不包含vmx或者svm标识,那么就意味着你的主机cpu不支持硬件虚拟化。因此你不能在你的机器上使用KVM。确认了主机cpu存在vmx或者svm之后,接下来开始安装KVM。 +对于KVM来说,它不要求运行在拥有64位内核系统的主机上,但是通常我们会推荐在64位系统的主机上面运行KVM。 + +### 第二步:安装KVM ### + +使用apt-get安装KVM和相关的用户空间工具。 + + $ sudo apt-get install qemu-kvm libvirt-bin + +安装期间,libvirtd组(在debian上是libvirtd-qemu组)将会被创建,并且你的用户id将会被自动添加到该组中。这样做的目的是让你可以以一个普通用户而不是root用户的身份去管理虚拟机。你可以使用id命令来确认这一点,下面将会告诉你怎么去显示你的组id: + + $ id + +![](https://c2.staticflickr.com/6/5597/15432586092_64dfb867d3_c.jpg) + +如果因为某些原因,libvirt(在debian中是libvirt-qemu)没有在你的组id中被找到,你也可以手动将你自己添加到对应的组中,如下所示: +在ubuntu上: + + $ sudo adduser [youruserID] libvirtd + +在debian上: + + $ sudo adduser [youruserID] libvirt-qemu + +按照如下形式重修载入更新后的组成员关系。如果要求输入密码,那么输入你的登陆密码即可。 + + $ exec su -l $USER + +这时,你应该可以以普通用户的身份去执行virsh了。做一个如下所示的测试,这个命令将会以列表的形式列出可用的虚拟机(当前的列表是空的)。如果你没有遇到权限问题,那意味着迄今为止一切都是正常的。 + + $ virsh list + +---------- + + Id Name State + ---------------------------------------------------- + +### 第三步:配置桥接网络 ### + +为了使KVM虚拟机能够访问外部网络,一种方法是通过在KVM宿主机上创建Linux桥来实现。创建之后的桥能够将虚拟机的虚拟网卡和宿主机的物理网卡连接起来,因此,虚拟机能够发送和接受由物理网卡发送过来的流量数据包。这种方式叫做网桥连接。 +下面将告诉你如何创建并且配置网桥,我们称它为br0. +首先,安装一个必需的包,然后用命令行创建一个网桥。 + + $ sudo apt-get install bridge-utils + $ sudo brctl addbr br0 + +下一步就是配置已经创建好的网桥,即修改位于/etc/network/interfaces的配置文件。我们需要将该桥接网卡设置成开机启动。为了修改该配置文件,你需要关闭你的操作系统上的网络管理器(如果你在使用它的话)。跟随[操作指南][1]的说明去关闭网络管理器。 + 关闭网络管理器之后,接下来就是通过修改配置文件来配置网桥了。 + + #auto eth0 + #iface eth0 inet dhcp + + auto br0 + iface br0 inet dhcp + bridge_ports eth0 + bridge_stp off + bridge_fd 0 + bridge_maxwait 0 + + +在上面的配置中,我假设eth0是主要网卡,它也是连接到外网的网卡,同样,我假设eth0将会通过DHCP得到它的ip地址。注意,之前在/etc/network/interfaces中还没有对eth0进行任何配置。桥接网卡br0引用了eth0的配置,而eth0也会受到br0的制约。 +重启网络服务,并确认网桥已经被成功的配置好。如果成功的话,br0的ip地址将会是eth0的被自动分配的ip地址,而且eth0不会被分配任何ip地址。 + + $ sudo /etc/init.d/networking restart + $ ifconfig + +如果因为某些原因,eth0仍然保留了之前分配给了br0的ip地址,那么你可能必须明确的删除eth0的ip地址。 + +![](https://c2.staticflickr.com/2/1698/23780708850_66cd7ba6ea_c.jpg) + +###第四步:用命令行创建一个虚拟机 ### + +对于虚拟机来说,它的配置信息被存储在它对应的xml文件中。因此,创建一个虚拟机的第一步就是准备一个与主机名对应的xml文件。 +下面是一个示例xml文件,你可以根据需要手动修改它。 + + + alice + f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa + 1048576 + 1048576 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/kvm + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + +上面的主机xml配置文件定义了如下的虚拟机内容。 + +- 1GB内存,一个虚拟cpu和一个硬件驱动。 +- Disk image:/home/dev/images/alice.img。 +- Boot from CD-ROM(/home/dev/iso/CentOS-6.5-x86_64-minomal.iso)。 +- Networking:一个桥接到br0的虚拟网卡。 +- 通过VNC远程访问。 +中的UUID字符串可以随机生成。为了得到一个随机的uuid字符串,你可能需要使用uuid命令行工具。 + + $ sudo apt-get install uuid + $ uuid + +生成一个主机xml配置文件的方式就是通过一个已经存在的虚拟机来导出它的xml配置文件。如下所示。 + + $ virsh dumpxml alice > bob.xml + +![](https://c2.staticflickr.com/6/5808/23968234602_25e8019ec8_c.jpg) + +###第五步:使用命令行启动虚拟机### + +在启动虚拟机之前,我们需要创建它的初始磁盘镜像。为此,你需要使用qemu-img命令来生成一个你已经安装的qemu-kvm镜像。下面的命令将会创建10GB大小的空磁盘,并且它是qcow2格式的。 + + $ qemu-img create -f qcow2 /home/dev/images/alice.img 10G + +使用qcow2格式的磁盘镜像的好处就是它在创建之初并不会给它分配全部大小磁盘容量(这里是10GB),而是随着虚拟机中文件的增加而逐渐增大。因此,它对空间的使用更加有效。 +现在,你可以准备通过使用之前创建的xml配置文件启动你的虚拟机了。下面的命令将会创建一个虚拟机,然后自动启动它。 + + $ virsh create alice.xml + +---------- + + Domain alice created from alice.xml + +**注意**:如果你对一个已经存在的虚拟机运行了上面的命令,那么这个操作将会在没有警告信息的情况下抹去那个已经存在的虚拟机的全部信息。如果你已经创建了一个虚拟机,你可能会使用下面的命令来启动虚拟机。 + + $ virsh start alice.xml + +使用如下命令确认一个新的虚拟机已经被创建并成功的被启动。 + + $ virsh list + +---------- + + Id Name State + ---------------------------------------------------- + 3 alice running + +同样,使用如下命令确认你的虚拟机的虚拟网卡已经被成功的添加到了你先前创建的br0网桥中。 + + $ sudo brctl show + +![](https://c2.staticflickr.com/2/1546/23449585383_a371e9e579_c.jpg) + +### 远程连接虚拟机 ### + +为了远程访问一个正在运行的虚拟机的控制台,你可以使用VNC客户端。 +首先,你需要使用如下命令找出用于虚拟机的VNC端口号。 + + $ sudo netstat -nap | egrep '(kvm|qemu)' + +![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg) + +在这个例子中,用于alice虚拟机的VNC端口号是5900 +然后启动一个VNC客户端,连接到一个端口号为5900的VNC服务器。在我们的例子中,虚拟机支持由CentOS光盘文件启动。 + +![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg) + +### 使用virsh管理虚拟机 ### + +下面列出了virsh命令的常规用法 +创建客户机并且启动虚拟机: + + $ virsh create alice.xml + +停止虚拟机并且删除客户机 + + $ virsh destroy alice + +关闭虚拟机(不用删除它) + + $ virsh shutdown alice + +暂停虚拟机 + + $ virsh suspend alice + +恢复虚拟机 + + $ virsh resume alice + +访问正在运行的虚拟机的登陆控制台 + + $ virsh console alice + +设置虚拟机开机启动: + + $ virsh autostart alice + +查看虚拟机的详细信息 + + $ virsh dominfo alice + +编辑虚拟机的配置文件: + + $ virsh edit alice + +上面的这个命令将会使用一个默认的编辑器来调用主机配置文件。该配置文件中的任何改变都将自动被libvirt验证其正确性。 +你也可以在一个virsh会话中管理虚拟机。下面的命令会创建并进入到一个virsh会话中: + + $ virsh +在virsh提示中,你可以使用任何virsh命令。 + +![](https://c2.staticflickr.com/6/5645/23708565129_b1ef968b30_c.jpg) + +### 问题处理 ### + +1. 我在创建虚拟机的时候遇到了一个错误: + + error: internal error: no supported architecture for os type 'hvm' + + 如果你的硬件不支持虚拟化的话你可能就会遇到这个错误。(例如,Intel VT或者AMD-V),这是运行KVM所必需的。如果你遇到了这个错误,而你的cpu支持虚拟化,那么这里可以给你一些可用的解决方案: + +首先,检查你的内核模块是否丢失。 + + $ lsmod | grep kvm + +如果内核模块没有加载,你必须按照如下方式加载它。 + + $ sudo modprobe kvm_intel (for Intel processor) + $ sudo modprobe kvm_amd (for AMD processor) + +第二个解决方案就是添加“--connect qemu:///system”参数到virsh命令中,如下所示。当你正在你的硬件平台上使用超过一个虚拟机管理器的时候就需要添加这个参数(例如,VirtualBox,VMware)。 + $ virsh --connect qemu:///system create alice.xml + +2. 当我试着访问我的虚拟机的登陆控制台的时候遇到了错误: + + $ virsh console alice + +---------- + + error: internal error: cannot find character device + +这个错误发生的原因是你没有在你的虚拟机配置文件中定义控制台设备。在xml文件中加上下面的内部设备部分即可。 + + + + + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/use-kvm-command-line-debian-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://xmodulo.com/author/nanni +[1]:http://xmodulo.com/disable-network-manager-linux.html From e581c4c0c2c125bad231811b46edcaea46805cd4 Mon Sep 17 00:00:00 2001 From: Stdio A Date: Thu, 7 Jan 2016 17:00:41 +0800 Subject: [PATCH 0794/1710] Translated Hackers Successfully Install Linux on a Potato --- ...l Linux on a Potato - StdioA_translated.md | 31 +++++++++++++++++++ ... Linux on a Potato - hittlle_translated.md | 31 +++++++++++++++++++ ... Successfully Install Linux on a Potato.md | 31 +++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - StdioA_translated.md create mode 100644 translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - hittlle_translated.md create mode 100644 translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato.md diff --git a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - StdioA_translated.md b/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - StdioA_translated.md new file mode 100644 index 0000000000..d6708676e6 --- /dev/null +++ b/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - StdioA_translated.md @@ -0,0 +1,31 @@ +# 黑客成功在马铃薯上安装Linux + +================================================================================ + +来自荷兰阿姆斯特丹的消息称,来自`LinuxOnAnything.nl网站的黑客在马铃薯上成功安装了Linux。这是操作系统第一次在根用蔬菜上安装成功。 + +![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) + +“土豆没有CPU,内存和海量存储器,所以这确实是一个挑战,” Linux On Anything (LOA) 小组的Johan Piest说。“显然我们不能使用一个像Fedora或Ubuntu一样的大型发行版,所以我们使用了Damn Small Linux.” + +经过几周的尝试,这个小组制作了一个经过特殊修改的Linux内核,这个内核可以装载到土豆上,而且可以使用vi修改一个小的文本文件。他们将Linux通过一个小型USB存储器加载到土豆上,而命令通过一组红色和黑色线以二进制形式传输至土豆中。 + +LOA小组是一个由一群尝试在任何东西上加载Linux的黑客们构成的、不断壮大的小组。他们从电子设备(如Gameboy和iPod)开始,不过最近这个小组开始面对一些更严峻的挑战,比如在电灯泡和小狗上加载Linux. + +LOA小组在与另一个Stuttering Monarchs——另一个黑客小组竞赛,看谁先拿到土豆这一分。“马铃薯是一种非常抢手的蔬菜,因为它的用途极其广泛,就像Linux本身一样。你可以煮它,捣碎它,在焖锅中杵它,” Piest说道,“你可以认为我们完成这个挑战可以获得某些奖项,但我们认为这是我们吹嘘的一种成本。” + +LOA是第一个将Linux安装到一匹设得兰矮种马上的小组,但最近五年这个竞争愈演愈烈,其它黑客小组的进度已经反超了他们。 + +“我们本来可以成为在薄脆饼干上面加载Linux的第一个小组,但是那群来自挪威的混蛋把我们赢了。” Piest说。 + +第一个成功安装Linux的蔬菜是一头卷心菜,它由一个来自土耳其的一个黑客小组完成安装。 + + +-------------------------------------------------------------------------------- + +via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html + +译者:[StdioA](https://github.com/StdioA) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - hittlle_translated.md b/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - hittlle_translated.md new file mode 100644 index 0000000000..0f77926425 --- /dev/null +++ b/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - hittlle_translated.md @@ -0,0 +1,31 @@ +# 黑客成功在马铃薯上安装Linux + +================================================================================ + +来自荷兰阿姆斯特丹的消息称,LinuxOnAnything.nl站点的黑客在马铃著上成功安装了Linux。这是操作系统第一次在根用蔬菜(译注:root vetetable, 一语双关,root在Linux是超级用户)上安装成功。 + +![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) + +『马铃著上没有CPU, 内存和其它存储空间,这真的是一个挑战』, 来自LOA(LinuxOnAnything)的Johan Piest如是说。『很显然我们不能安装像Fedora或者Ubuntu这些体量比较大的Linux发行版,我们用的是Damn Small Linux这个发行版』 + +在尝试了几周之后,LOA小组的同学们弄出了一个适合马铃薯体量的Linux内核;这玩艺儿上面可以用vi来编辑小的文本文件。这个内核通过U盘加载到马铃薯上;并通过一组红黑线用二进制的方式向这个内核发送命令。 + +LOA小组是一个不断壮大的黑客组织的一个分支;这个组织致力于将Linux安装到所有物体上;他们先是将Linux装到Gameboys和iPods等电子产品上,不过最近他们在挑战一些高难度的东西,譬如将Linux安装到灯泡和小狗(????puppies确实是小狗啊,难道有其它意思???)身上。 + +The LOA group was in a race with another hacker group, the Stuttering Monarchs, to be the first to bag the potato. “The potato has been the vegetable that everyone has been gunning for, because it's so versatile like Linux itself. You can boil 'em, mash 'em, stick 'em in a stew,” said Piest. “You'd think we'd get some sort of reward for this, but it's all about bragging rights for us.” + +LOA was the group that first installed Linux on a Shetland pony in 2003, but growing competition from other hacker groups have shut them out in the past five years. + +“We were close to being the first with Linux on a cracker, but those jerks from Norway beat us out,” said Piest. + +The first vegetable Linux install was on a head of iceberg lettuce by a group of hackers in Turkey. + + +-------------------------------------------------------------------------------- + +via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html + +译者:[hittlle](https://github.com/hittlle) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato.md b/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato.md new file mode 100644 index 0000000000..b33e43b2ed --- /dev/null +++ b/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato.md @@ -0,0 +1,31 @@ +# Hackers Successfully Install Linux on a Potato + +================================================================================ + +Amsterdam, Netherlands – Hackers from the LinuxOnAnything.nl Web site successfully installed Linux on a potato. It's the first time the operating system has been successfully installed on a root vegetable. + +![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) + +“A potato doesn't have a CPU, memory or storage space, so it was quite a challenge,” said Johan Piest of the Linux on Anything (LOA) group. “Obviously we couldn't use a large distribution like Fedora or Ubuntu, so we went with Damn Small Linux.” + +After weeks of trying the group got a Linux kernel specially modified for a potato loaded, and were able to edit a small text file in vi. Linux was loaded onto the potato using a USB thumb drive and commands were sent in binary to the potato using a set of red and black wires. + +The LOA group is a part of a growing group of hackers attempting to get Linux loaded on anything. It started on electronic devices like Gameboys and iPods, but recently groups have taken on tougher challenges like light bulbs and puppies. + +The LOA group was in a race with another hacker group, the Stuttering Monarchs, to be the first to bag the potato. “The potato has been the vegetable that everyone has been gunning for, because it's so versatile like Linux itself. You can boil 'em, mash 'em, stick 'em in a stew,” said Piest. “You'd think we'd get some sort of reward for this, but it's all about bragging rights for us.” + +LOA was the group that first installed Linux on a Shetland pony in 2003, but growing competition from other hacker groups have shut them out in the past five years. + +“We were close to being the first with Linux on a cracker, but those jerks from Norway beat us out,” said Piest. + +The first vegetable Linux install was on a head of iceberg lettuce by a group of hackers in Turkey. + + +-------------------------------------------------------------------------------- + +via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html + +译者:[翻译者ID](https://github.com/翻译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 020d0f12fc9288587d69bb9059db5f9e9a03a37a Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 7 Jan 2016 19:07:04 +0800 Subject: [PATCH 0795/1710] PUB:20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @KnightJoker @carolinewuyan 这篇翻译质量不佳,还需改进。 --- ...everse Proxy for Apache on FreeBSD 10.2.md | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) rename {translated/tech => published}/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md (54%) diff --git a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/published/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md similarity index 54% rename from translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md rename to published/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md index abd69a9cab..bf97fc16d7 100644 --- a/translated/tech/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md +++ b/published/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md @@ -1,61 +1,61 @@ - -如何在FreeBSD 10.2上安装Nginx作为Apache的反向代理 +如何在 FreeBSD 10.2 上安装 Nginx 作为 Apache 的反向代理 ================================================================================ -Nginx是一款免费的开源HTTP和反向代理服务器, 以及一个POP3/IMAP的邮件代理服务器。Nginx是一款高性能的web服务器,其特点是丰富的功能,简单的结构以及低内存的占用. 第一个版本由 Igor Sysoev在2002年发布,迄今为止很多大的科技公司依然在使用,包括 Netflix, Github, Cloudflare, WordPress.com等等。 -在这篇教程里我们会 "**在freebsd 10.2系统上,安装和配置Nginx网络服务器作为Apache的反向代理**". Apache 会用PHP在8080端口上运行,并且我们需要在80端口配置Nginx的运行,用来接收用户/访问者的请求.如果网页的用户请求来自于浏览器的80端口, 那么Nginx会用Apache网络服务器和PHP来通过这个请求,并运行在8080端口。 +Nginx 是一款自由开源的 HTTP 和反向代理服务器,也可以用作 POP3/IMAP 的邮件代理服务器。Nginx 是一款高性能的 web 服务器,其特点是功能丰富,结构简单以及内存占用低。 第一个版本由 Igor Sysoev 发布于2002年,到现在有很多大型科技公司在使用,包括 Netflix、 Github、 Cloudflare、 WordPress.com 等等。 -#### 前提条件 #### +在这篇教程里我们会“**在 freebsd 10.2 系统上,安装和配置 Nginx 网络服务器作为 Apache 的反向代理**”。 Apache 将在8080端口上运行 PHP ,而我们会配置 Nginx 运行在80端口以接收用户/访问者的请求。如果80端口接收到用户浏览器的网页请求,那么 Nginx 会将该请求传递给运行在8080端口上的 Apache 网络服务器和 PHP。 -- FreeBSD 10.2. -- Root 权限. +#### 前提条件 #### + +- FreeBSD 10.2 +- Root 权限 ### 步骤 1 - 更新系统 ### -使用SSH证书登录到你的FreeBSD服务器以及使用下面命令来更新你的系统 : +使用 SSH 认证方式登录到你的 FreeBSD 服务器,使用下面命令来更新你的系统: freebsd-update fetch freebsd-update install ### 步骤 2 - 安装 Apache ### -Apache是现在使用范围最广的web服务器以及开源的HTTP服务器.在FreeBSD里Apache是未被默认安装的, 但是我们可以直接通过端口或者在"/usr/ports/www/apache24" 目录下的解压包安装,再或者直接从PKG命令的FreeBSD系统信息库安装。在本教程中,我们将使用PKG命令从FreeBSD的库中安装: +Apache 是开源的、使用范围最广的 web 服务器。在 FreeBSD 里默认没有安装 Apache, 但是我们可以直接通过 /usr/ports/www/apache24 下的 ports 或软件包来安装,也可以直接使用 pkg 命令从 FreeBSD 软件库中安装。在本教程中,我们将使用 pkg 命令从 FreeBSD 软件库中安装: pkg install apache24 ### 步骤 3 - 安装 PHP ### -一旦成功安装Apache, 接着将会安装PHP并由一个用户处理一个PHP的文件请求. 我们将会用到如下的PKG命令来安装PHP : +一旦成功安装 Apache,接着将会安装 PHP ,它来负责处理用户对 PHP 文件的请求。我们将会用到如下的 pkg 命令来安装 PHP: pkg install php56 mod_php56 php56-mysql php56-mysqli ### 步骤 4 - 配置 Apache 和 PHP ### -一旦所有都安装好了, 我们将会配置Apache在8080端口上运行, 并让PHP与Apache一同工作. 要想配置Apache,我们可以编辑 "httpd.conf"这个配置文件, 然而PHP我们只需要复制"/usr/local/etc/"目录下的PHP配置文件 php.ini 。 +一旦所有都安装好了,我们将会配置 Apache 运行在8080端口上, 并让 PHP 与 Apache 一同工作。 要想配置Apache,我们可以编辑“httpd.conf”这个配置文件, 对于 PHP 我们只需要复制 “/usr/local/etc/”目录下的 PHP 配置文件 php.ini。 -进入到 "/usr/local/etc/" 目录 并且复制 php.ini-production 文件到 php.ini : +进入到“/usr/local/etc/”目录,并且复制 php.ini-production 文件到 php.ini : cd /usr/local/etc/ cp php.ini-production php.ini -下一步, 在Apache目录下通过编辑 "httpd.conf"文件来配置Apache : +下一步,在 Apache 目录下通过编辑“httpd.conf”文件来配置 Apache: cd /usr/local/etc/apache24 nano -c httpd.conf -端口配置在第 **52**行 : +端口配置在第**52**行 : Listen 8080 -服务器名称配置在第 **219** 行: +服务器名称配置在第**219**行: ServerName 127.0.0.1:8080 -在第 **277**行,如果目录需要,添加的DirectoryIndex文件,Apache将直接作用于它 : +在第**277**行,添加 DirectoryIndex 文件,Apache 将用它来服务对目录的请求: DirectoryIndex index.php index.html -在第 **287**行下,配置Apache通过添加脚本来支持PHP : +在第**287**行下,配置 Apache ,添加脚本支持: SetHandler application/x-httpd-php @@ -66,47 +66,47 @@ Apache是现在使用范围最广的web服务器以及开源的HTTP服务器.在 保存并退出。 -现在用sysrc命令,来添加Apache作为开机启动项目 : +现在用 sysrc 命令,来添加 Apache 为开机启动项目: sysrc apache24_enable=yes -然后用下面的命令测试Apache的配置 : +然后用下面的命令测试 Apache 的配置: apachectl configtest -如果到这里都没有问题的话,那么就启动Apache吧 : +如果到这里都没有问题的话,那么就启动 Apache 吧: service apache24 start -如果全部完毕, 在"/usr/local/www/apache24/data" 目录下创建一个phpinfo文件来验证PHP在Apache下完美运行: +如果全部完毕,在“/usr/local/www/apache24/data”目录下创建一个 phpinfo 文件来验证 PHP 在 Apache 下顺利运行: cd /usr/local/www/apache24/data echo "" > info.php -现在就可以访问 freebsd 的服务器 IP : 192.168.1.123:8080/info.php. +现在就可以访问 freebsd 的服务器 IP : 192.168.1.123:8080/info.php 。 ![Apache and PHP on Port 8080](http://blog.linoxide.com/wp-content/uploads/2015/11/Apache-and-PHP-on-Port-8080.png) -Apache 是使用 PHP 在 8080 端口下运行的。 +Apache 及 PHP 运行在 8080 端口。 ### 步骤 5 - 安装 Nginx ### -Nginx 以低内存的占用作为一款高性能的web服务器以及反向代理服务器。在这个步骤里,我们将会使用Nginx作为Apache的反向代理, 因此让我们用pkg命令来安装它吧 : +Nginx 可以以较低内存占用提供高性能的 Web 服务器和反向代理服务器。在这个步骤里,我们将会使用 Nginx 作为Apache 的反向代理,因此让我们用 pkg 命令来安装它吧: pkg install nginx ### 步骤 6 - 配置 Nginx ### -一旦 Nginx 安装完毕, 在 "**nginx.conf**" 文件里,我们需要做一个新的配置文件来替换掉原来的nginx文件。更改到 "/usr/local/etc/nginx/"目录下,并且备份默认 nginx.conf 文件: +一旦 Nginx 安装完毕,在“**nginx.conf**”文件里,我们需要做一个新的配置文件来替换掉原来的 nginx 配置文件。切换到“/usr/local/etc/nginx/”目录下,并且备份默认 nginx.conf 文件: cd /usr/local/etc/nginx/ mv nginx.conf nginx.conf.oroginal -现在就可以创建一个新的 nginx 配置文件了 : +现在就可以创建一个新的 nginx 配置文件了: nano -c nginx.conf -然后粘贴下面的配置: +然后粘贴下面的配置: user www; worker_processes 1; @@ -166,12 +166,12 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 保存并退出。 -下一步, 在nginx目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 : +下一步,在 nginx 目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 : cd /usr/local/etc/nginx/ nano -c proxy.conf -粘贴如下配置 : +粘贴如下配置: proxy_buffering on; proxy_redirect off; @@ -186,27 +186,27 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 proxy_buffers 100 8k; add_header X-Cache $upstream_cache_status; -保存并退出. +保存并退出。 -最后一步, 为 nginx 的高速缓存创建一个 "/var/nginx/cache"的新目录 : +最后一步,为 nginx 的高速缓存创建一个“/var/nginx/cache”的新目录: mkdir -p /var/nginx/cache ### 步骤 7 - 配置 Nginx 的虚拟主机 ### -在这个步骤里面,我们需要创建一个新的虚拟主机域 "saitama.me", 以跟文件 "/usr/local/www/saitama.me" 和日志文件一同放在 "/var/log/nginx" 目录下。 +在这个步骤里面,我们需要创建一个新的虚拟主机域“saitama.me”,其文档根目录为“/usr/local/www/saitama.me”,日志文件放在“/var/log/nginx”目录下。 -我们必须做的第一件事情就是创建新的目录来存放虚拟主机文件, 在这里我们将用到一个"**vhost**"的新文件. 并创建它 : +我们必须做的第一件事情就是创建新的目录来存放虚拟主机配置文件,我们创建的新目录名为“**vhost**”。创建它: cd /usr/local/etc/nginx/ mkdir vhost -创建好vhost 目录, 那么我们就进入这个目录并创建一个新的虚拟主机文件。这里我取名为 "**saitama.conf**" : +创建好 vhost 目录,然后我们就进入这个目录并创建一个新的虚拟主机文件。这里我取名为“**saitama.conf**”: cd vhost/ nano -c saitama.conf -粘贴如下虚拟主机的配置 : +粘贴如下虚拟主机的配置: server { # Replace with your freebsd IP @@ -254,65 +254,65 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代 保存并退出。 -下一步, 为nginx和虚拟主机创建一个新的日志目录 "/var/log/" : +下一步,为 nginx 和虚拟主机创建一个新的日志目录“/var/log/”: mkdir -p /var/log/nginx/ -如果一切顺利, 在文件的根目录下创建文件 saitama.me : +如果一切顺利,在文件的根目录下创建目录 saitama.me 用作文档根: cd /usr/local/www/ mkdir saitama.me ### 步骤 8 - 测试 ### -在这个步骤里面,我们只是测试我们的nginx和虚拟主机的配置。 +在这个步骤里面,我们只是测试我们的 nginx 和虚拟主机的配置。 -用如下命令测试nginx的配置 : +用如下命令测试 nginx 的配置: nginx -t -如果一切都没有问题, 用 sysrc 命令添加nginx为启动项,并且启动nginx和重启apache: +如果一切都没有问题,用 sysrc 命令添加 nginx 为开机启动项,并且启动 nginx 和重启 apache: sysrc nginx_enable=yes service nginx start service apache24 restart -一切完毕后, 在 saitama.me 目录下,添加一个新的phpinfo文件来验证php的正常运行 : +一切完毕后,在 saitama.me 目录下,添加一个新的 phpinfo 文件来验证 php 的正常运行: cd /usr/local/www/saitama.me echo "" > info.php -然后访问这个域名 : **www.saitama.me/info.php**. +然后访问这个域名: **www.saitama.me/info.php**。 ![Virtualhost Configured saitamame](http://blog.linoxide.com/wp-content/uploads/2015/11/Virtualhost-Configured-saitamame.png) -Nginx 作为Apache的反向代理正在运行了,PHP也同样在进行工作了。 +Nginx 作为 Apache 的反向代理运行了,PHP 也同样工作了。 -这是另一种结果 : +这是另一个结果: -无缓存的 Test .html 文件。 +测试无缓存的 .html 文件。 curl -I www.saitama.me ![html with no-cache](http://blog.linoxide.com/wp-content/uploads/2015/11/html-with-no-cache.png) -有三十天缓存的 Test .css 文件。 +测试有三十天缓存的 .css 文件。 curl -I www.saitama.me/test.css ![css file 30day cache](http://blog.linoxide.com/wp-content/uploads/2015/11/css-file-30day-cache.png) -正常缓存的 Test .php 文件: +测试缓存的 .php 文件: curl -I www.saitama.me/info.php ![PHP file cached](http://blog.linoxide.com/wp-content/uploads/2015/11/PHP-file-cached.png) -全部完成。 +全部搞定。 ### 总结 ### -Nginx 是最受欢迎的 HTTP 和反向代理服务器,拥有丰富的高性能和低内存/RAM的使用功能。Nginx使用了太多的缓存, 我们可以在网络上缓存静态文件使得网页加速,并且在用户需要的时候再缓存php文件。这样 Nginx 的轻松配置和使用可以让它用作HTTP服务器或者 apache的反向代理。 +Nginx 是最受欢迎的 HTTP 和反向代理服务器,拥有丰富的功能、高性能、低内存/RAM 占用。Nginx 也用于缓存, 我们可以在网络上缓存静态文件使得网页加速,并且缓存用户请求的 php 文件。 Nginx 容易配置和使用,可以将它用作 HTTP 服务器或者 apache 的反向代理。 -------------------------------------------------------------------------------- @@ -320,7 +320,7 @@ via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-freebsd 作者:[Arul][a] 译者:[KnightJoker](https://github.com/KnightJoker) -校对:[Caroline(https://github.com/carolinewuyan) +校对:[Caroline](https://github.com/carolinewuyan),[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From fb9ddc590d5bec38420f2fd57acb924a1cf05026 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 7 Jan 2016 20:07:39 +0800 Subject: [PATCH 0796/1710] PUB:20151013 DFileManager--Cover Flow File Manager @bestony --- ...3 DFileManager--Cover Flow File Manager.md | 64 +++++++++++++++++++ ...3 DFileManager--Cover Flow File Manager.md | 61 ------------------ 2 files changed, 64 insertions(+), 61 deletions(-) create mode 100644 published/20151013 DFileManager--Cover Flow File Manager.md delete mode 100644 translated/tech/20151013 DFileManager--Cover Flow File Manager.md diff --git a/published/20151013 DFileManager--Cover Flow File Manager.md b/published/20151013 DFileManager--Cover Flow File Manager.md new file mode 100644 index 0000000000..31e953c8da --- /dev/null +++ b/published/20151013 DFileManager--Cover Flow File Manager.md @@ -0,0 +1,64 @@ +DFileManager:封面流(CoverFlow)文件管理器 +================================================================================ + +这个一个 Ubuntu 标准软件仓库中缺失的像宝石般的、有着其独特的功能的文件管理器。这是 DFileManager 在推特中的宣称。 + +有一个不好回答的问题,如何知道到底有多少个 Linux 的开源软件?好奇的话,你可以在 Shell 里输入如下命令: + + ~$ for f in /var/lib/apt/lists/*Packages; do printf '%5d %s\n' $(grep '^Package: ' "$f" | wc -l) ${f##*/} done | sort -rn + +在我的 Ubuntu 15.04 系统上,产生结果如下: + +![Ubuntu 15.04 Packages](http://www.linuxlinks.com/portal/content/reviews/FileManagers/UbuntuPackages.png) + +正如上面的截图所示,在 Universe 仓库中,大约有39000个包,在 main 仓库中大约有8500个包。这听起来很多。但是这些包括了开源应用、工具、库,有很多不是由 Ubuntu 开发者打包的。更重要的是,有很多重要的软件不在库中,只能通过源代码编译。DFileManager 就是这样一个软件。它是仍处在开发早期的一个基于 QT 的跨平台文件管理器。QT提供单一源码下的跨平台可移植性。 + +现在还没有二进制文件包,用户需要编译源代码才行。对于一些工具来说,这个可能会产生很大的问题,特别是如果这个应用依赖于某个复杂的依赖库,或者需要与已经安装在系统中的软件不兼容的某个版本。 + +### 安装 ### + +幸运的是,DFileManager 非常容易编译。对于我的老 Ubutnu 机器来说,在开发者网站上的安装介绍提供了大部分的重要步骤,不过少量的基础包没有列出(为什么总是这样?虽然许多库会让文件系统变得一团糟!)。在我的系统上,从github 下载源代码并且编译这个软件,我在 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 + +你可以通过在shell中输入如下命令来启动它: + + ~$ dfm + +下面是运行中的 DFileManager,完全展示了其最吸引人的地方:封面流(Cover Flow)视图。可以在当前文件夹的项目间滑动,提供了一个相当有吸引力的体验。这是看图片的理想选择。这个文件管理器酷似 Finder(苹果操作系统下的默认文件管理器),可能会吸引你。 + +![DFileManager in action](http://www.linuxlinks.com/portal/content/reviews/FileManagers/Screenshot-dfm.png) + +### 特点: ### + +- 4种视图:图标、详情、列视图和封面流 +- 按位置和设备归类书签 +- 标签页 +- 简单的搜索和过滤 +- 自定义文件类型的缩略图,包括多媒体文件 +- 信息栏可以移走 +- 单击打开文件和目录 +- 可以排队 IO 操作 +- 记住每个文件夹的视图属性 +- 显示隐藏文件 + +DFileManager 不是 KDE 的 Dolphin 的替代品,但是能做相同的事情。这个是一个真正能够帮助人们的浏览文件的文件管理器。还有,别忘了反馈信息给开发者,任何人都可以做出这样的贡献。 + +-------------------------------------------------------------------------------- + +via: http://gofk.tumblr.com/post/131014089537/dfilemanager-cover-flow-file-manager-a-real-gem + +作者:[gofk][a] +译者:[bestony](https://github.com/bestony) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://gofk.tumblr.com/ diff --git a/translated/tech/20151013 DFileManager--Cover Flow File Manager.md b/translated/tech/20151013 DFileManager--Cover Flow File Manager.md deleted file mode 100644 index 39b376c113..0000000000 --- a/translated/tech/20151013 DFileManager--Cover Flow File Manager.md +++ /dev/null @@ -1,61 +0,0 @@ -DFileManager:文件流文件管理器 -================================================================================ -一个像宝石一样的文件管理器从Ubuntu标准库中缺失,但是有器自己的独特的特色。DFileManager是一个推特一样的产品 - -一个很棘手的问题是,如何知道有多少个Linux开源软件可以被使用。出于好奇,你可以在Shell里输入如下命令 - - ~$ for f in /var/lib/apt/lists/*Packages; do printf ’%5d %s\n’ $(grep ’^Package: ’ “$f” | wc -l) ${f##*/} done | sort -rn - -在我的Ubuntu15.04系统上,会产生如下结果 -![Ubuntu 15.04 Packages](http://www.linuxlinks.com/portal/content/reviews/FileManagers/UbuntuPackages.png) - -正如上面的截图所示,在所有的库中,大约有39000个包,在主库中有8500个包。这听起来很少.但是这些自助形式的开源软件、组件、支持库有很多不是由Ubuntu开发者打包的。重要的是,有很多重要的组件不在库中,只能通过源代码编译。DFileManager就是这样一个组件。他是仍处在早期阶段的一个QT跨平台文件管理器.QT提供单一源码的跨平台可移植性。 - -在缺失二进制文件的包里,用户需要编译源代码。对于一些工具来说,这个可能会产生很大的问题,特别是如果这个应用依赖于任何一个含糊不清的依赖库,或者某个没有被编译在系统中的特殊软件版本。 -### 安装 ### - -幸运的是,DFileManager非常容易编译。对于我的老Ubutnu来说,这个在开发者网站上的安装介绍提供了大部分的重要步骤,不过,少量的基础包没有在上面(为什么总是这样?虽然支持库会让文件系统变得一团糟!)。在我的系统上,为了做好准备,从github上下载源代码并且编译这个软件,我在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 - -你可以通过在shell中输入如下命令来启动它 - - ~$ dfm - -下面是在最吸引人的操作界面下操作的DFileManager,文件流视图.这提供了一个拥有相当有吸引力的体验的滑动当前文件夹下的文件的能力。这是看图片的理想选择。这个文件管理器酷似Finder(Macintosh 操作系统下的默认文件管理器),可能会对你有吸引力。 - -![DFileManager in action](http://www.linuxlinks.com/portal/content/reviews/FileManagers/Screenshot-dfm.png) - -### 特点: ### - -- 4种视图:图标、详请、列和文件流 -- 通过位置和设备归类书签 -- 标签页 -- 简单的搜索和过滤 -- 自定义文件类型的缩略图,包括多媒体文件 -- 可以移动的信息栏 -- 单击打开文件和目录 -- 控制队列IO操作 -- 记住每个文件夹的视图属性 -- 显示隐藏文件 - -DFileManager 不是KDE 的Dolphin,但是能做相同的事情。这个是一个真正能够帮助人们的浏览文件的文件管理器。还有,别忘了反馈信息给开发者,任何人都可以做出这样的贡献 - --------------------------------------------------------------------------------- - -via: http://gofk.tumblr.com/post/131014089537/dfilemanager-cover-flow-file-manager-a-real-gem - -作者:[gofk][a] -译者:[bestony](https://github.com/bestony) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://gofk.tumblr.com/ From a119909cde08f45ba88235f54b25e6982439f12c Mon Sep 17 00:00:00 2001 From: Stdio A Date: Thu, 7 Jan 2016 20:19:20 +0800 Subject: [PATCH 0797/1710] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=95=B4=E7=90=86?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Successfully Install Linux on a Potato.md} | 3 +- ... Linux on a Potato - hittlle_translated.md | 31 ------------------- ... Successfully Install Linux on a Potato.md | 31 ------------------- 3 files changed, 2 insertions(+), 63 deletions(-) rename translated/share/{Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - StdioA_translated.md => Hackers Successfully Install Linux on a Potato.md} (90%) delete mode 100644 translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - hittlle_translated.md delete mode 100644 translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato.md diff --git a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - StdioA_translated.md b/translated/share/Hackers Successfully Install Linux on a Potato.md similarity index 90% rename from translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - StdioA_translated.md rename to translated/share/Hackers Successfully Install Linux on a Potato.md index d6708676e6..1e9d3fc723 100644 --- a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - StdioA_translated.md +++ b/translated/share/Hackers Successfully Install Linux on a Potato.md @@ -2,7 +2,7 @@ ================================================================================ -来自荷兰阿姆斯特丹的消息称,来自`LinuxOnAnything.nl网站的黑客在马铃薯上成功安装了Linux。这是操作系统第一次在根用蔬菜上安装成功。 +来自荷兰阿姆斯特丹的消息称,LinuxOnAnything.nl网站的黑客在马铃薯上成功安装了Linux。这是操作系统第一次在根用蔬菜上安装成功。 ![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) @@ -26,6 +26,7 @@ LOA是第一个将Linux安装到一匹设得兰矮种马上的小组,但最近 via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html 译者:[StdioA](https://github.com/StdioA) +协同翻译:[hittlle](https://github.com/hittlle) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - hittlle_translated.md b/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - hittlle_translated.md deleted file mode 100644 index 0f77926425..0000000000 --- a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato - hittlle_translated.md +++ /dev/null @@ -1,31 +0,0 @@ -# 黑客成功在马铃薯上安装Linux - -================================================================================ - -来自荷兰阿姆斯特丹的消息称,LinuxOnAnything.nl站点的黑客在马铃著上成功安装了Linux。这是操作系统第一次在根用蔬菜(译注:root vetetable, 一语双关,root在Linux是超级用户)上安装成功。 - -![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) - -『马铃著上没有CPU, 内存和其它存储空间,这真的是一个挑战』, 来自LOA(LinuxOnAnything)的Johan Piest如是说。『很显然我们不能安装像Fedora或者Ubuntu这些体量比较大的Linux发行版,我们用的是Damn Small Linux这个发行版』 - -在尝试了几周之后,LOA小组的同学们弄出了一个适合马铃薯体量的Linux内核;这玩艺儿上面可以用vi来编辑小的文本文件。这个内核通过U盘加载到马铃薯上;并通过一组红黑线用二进制的方式向这个内核发送命令。 - -LOA小组是一个不断壮大的黑客组织的一个分支;这个组织致力于将Linux安装到所有物体上;他们先是将Linux装到Gameboys和iPods等电子产品上,不过最近他们在挑战一些高难度的东西,譬如将Linux安装到灯泡和小狗(????puppies确实是小狗啊,难道有其它意思???)身上。 - -The LOA group was in a race with another hacker group, the Stuttering Monarchs, to be the first to bag the potato. “The potato has been the vegetable that everyone has been gunning for, because it's so versatile like Linux itself. You can boil 'em, mash 'em, stick 'em in a stew,” said Piest. “You'd think we'd get some sort of reward for this, but it's all about bragging rights for us.” - -LOA was the group that first installed Linux on a Shetland pony in 2003, but growing competition from other hacker groups have shut them out in the past five years. - -“We were close to being the first with Linux on a cracker, but those jerks from Norway beat us out,” said Piest. - -The first vegetable Linux install was on a head of iceberg lettuce by a group of hackers in Turkey. - - --------------------------------------------------------------------------------- - -via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html - -译者:[hittlle](https://github.com/hittlle) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato.md b/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato.md deleted file mode 100644 index b33e43b2ed..0000000000 --- a/translated/share/Hackers Successfully Install Linux on a Potato/Hackers Successfully Install Linux on a Potato.md +++ /dev/null @@ -1,31 +0,0 @@ -# Hackers Successfully Install Linux on a Potato - -================================================================================ - -Amsterdam, Netherlands – Hackers from the LinuxOnAnything.nl Web site successfully installed Linux on a potato. It's the first time the operating system has been successfully installed on a root vegetable. - -![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) - -“A potato doesn't have a CPU, memory or storage space, so it was quite a challenge,” said Johan Piest of the Linux on Anything (LOA) group. “Obviously we couldn't use a large distribution like Fedora or Ubuntu, so we went with Damn Small Linux.” - -After weeks of trying the group got a Linux kernel specially modified for a potato loaded, and were able to edit a small text file in vi. Linux was loaded onto the potato using a USB thumb drive and commands were sent in binary to the potato using a set of red and black wires. - -The LOA group is a part of a growing group of hackers attempting to get Linux loaded on anything. It started on electronic devices like Gameboys and iPods, but recently groups have taken on tougher challenges like light bulbs and puppies. - -The LOA group was in a race with another hacker group, the Stuttering Monarchs, to be the first to bag the potato. “The potato has been the vegetable that everyone has been gunning for, because it's so versatile like Linux itself. You can boil 'em, mash 'em, stick 'em in a stew,” said Piest. “You'd think we'd get some sort of reward for this, but it's all about bragging rights for us.” - -LOA was the group that first installed Linux on a Shetland pony in 2003, but growing competition from other hacker groups have shut them out in the past five years. - -“We were close to being the first with Linux on a cracker, but those jerks from Norway beat us out,” said Piest. - -The first vegetable Linux install was on a head of iceberg lettuce by a group of hackers in Turkey. - - --------------------------------------------------------------------------------- - -via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html - -译者:[翻译者ID](https://github.com/翻译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 67aaf2119147a94fb9245eb0444d4f6996a534c6 Mon Sep 17 00:00:00 2001 From: cposture Date: Thu, 7 Jan 2016 20:28:33 +0800 Subject: [PATCH 0798/1710] =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E6=88=90,=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...es – Creating & Managing System Backups.md | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md diff --git a/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md new file mode 100644 index 0000000000..94ffe0d7f7 --- /dev/null +++ b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md @@ -0,0 +1,155 @@ +[未完成,不要合并-Translating By cposture 2016-01-07] +LFCS 系列第六讲://创建和管理系统备份 +==== + +Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时上游团队请求支持的决策能力。 + +//图片 + +LFCS 系列第五讲 + +以下视频介绍了 Linux 基金会认证程序。 + +本讲是《十套教程》系列中的第六讲,在这一讲里,我们将会解释如何组装分区作为RAID设备——创建和管理系统备份。这些都是 LFCS 认证中的必备知识。 + +# 了解RAID + +被称为独立磁盘冗余阵列(RAID)的技术是一种将多个硬盘组合成一个单独逻辑单元的存储解决方案,它提供了数据冗余功能并且改善硬盘的读写性能。 + +然而,实际的容错和磁盘I/O性能硬盘取决于如何将多个硬盘组装成磁盘阵列。根据可用的设备和容错/性能的需求,RAID被分为不同的级别,你可以在Tecmint.com上参考RAID系列文章以获得每个RAID级别更详细的解释。 + +* //网址 + +我们选择用于创建、组装、管理、监视软件RAID的工具,叫做mdadm(multiple disk 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 # +``` + +## 组装分区作为RAID设备 + +组装已有分区作为RAID设备的过程由以下步骤组成。 + +1. 使用mdadm创建阵列 + +如果先前其中一个分区被格式化,或者作为了另一个RAID阵列的一部分,你会被提示以确认创建一个新的阵列。假设你已经采取了必要的预防措施以避免丢失重要数据,那么可以安全地输入Y并且按下回车。 + +``` +# mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 +``` + +//图片 + +创建RAID阵列 + +2. 检查阵列的创建状态 + +在创建了RAID阵列之后,你可以检查使用以下命令检查阵列的状态 + +``` +# cat /proc/mdstat +or +# mdadm --detail /dev/md0 [More detailed summary] +``` + +//图片 + +检查RAID阵列的状态 + +3. 格式化RAID设备 + +如本系列4部分所介绍的,按照你的需求/要求采用某种文件系统格式化你的设备 + +4. 监控RAID阵列服务 + +指示监控服务时刻监视你的RAID阵列。把```# mdadm --detail --scan```命令输出结果添加到/etc/mdadm/mdadm.conf(Debian和derivatives)或者/etc/mdadm.conf(Cent0S/openSUSE),如下。 +``` +# mdadm --detail --scan +``` +//图片 + +监控RAID阵列 + +``` +# mdadm --assemble --scan [Assemble the array] +``` +为了确保服务能够开机启动,需要以root权限运行以下命令。 + +## Debian 和 Derivatives + +Debian 和 Derivatives能够通过下面步骤使服务默认开机启动 +``` +# update-rc.d mdadm defaults +``` +在/etc/default/mdadm文件中添加下面这一行 +``` +AUTOSTART=true +``` + +## CentOS 和 openSUSE(systemd-based) + +``` +# systemctl start mdmonitor +# systemctl enable mdmonitor +``` + +## CentOS 和 openSUSEi(SysVinit-based) + +``` +# service mdmonitor start +# chkconfig mdmonitor on +``` + +5. 检查RAID磁盘故障 + +在支持冗余的的RAID级别中,在需要时会替换故障的驱动器。当磁盘阵列中的设备出现故障时,仅当存在我们第一次创建阵列时预留的备用设备时,磁盘阵列会将自动启动重建。 + +//图片 + +检查RAID故障磁盘 + +否则,我们需要手动连接一个额外的物理驱动器到我们的系统,并且运行。 + +``` +# mdadm /dev/md0 --add /dev/sdX1 +``` + +/dev/md0是出现了问题的阵列,而/dev/sdx1是新添加的设备。 + +6. 分解一个工作阵列 + +如果你需要使用工作阵列的设备创建一个新的阵列,你可能不得不去分解已有工作阵列——(可选步骤) + +``` +# 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. 设置邮件通知 + +你可以配置一个用于发送通知的有效邮件地址或者系统账号(确保在mdadm.conf文件中有下面这一行)。——(可选步骤) +``` +MAILADDR root +``` + +在这种情况下,来自RAID后台监控程序所有的通知将会发送到你的本地root账号的邮件箱中。其中一个类似的通知如下。 + +说明:此次通知事件和第5步中的例子相关。一个设备被标志为错误并且一个空闲的设备自动地被mdadm加入到阵列。我们用完了所有"健康的"空闲设备,因此我们得到了通知。 + +//图片 + +RAID监控通知 + + From 38d82260bb5e9ce295fa940322335f4a4c37b6f1 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 7 Jan 2016 22:11:41 +0800 Subject: [PATCH 0799/1710] PUB:20151107 Hackers Successfully Install Linux on a Potato MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @StdioA @hittlle 这是一篇恶搞,翻译的挺好玩~~ --- ... Successfully Install Linux on a Potato.md | 32 +++++++++++++++++++ ... Successfully Install Linux on a Potato.md | 32 ------------------- 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 published/20151107 Hackers Successfully Install Linux on a Potato.md delete mode 100644 translated/share/Hackers Successfully Install Linux on a Potato.md diff --git a/published/20151107 Hackers Successfully Install Linux on a Potato.md b/published/20151107 Hackers Successfully Install Linux on a Potato.md new file mode 100644 index 0000000000..b35220730b --- /dev/null +++ b/published/20151107 Hackers Successfully Install Linux on a Potato.md @@ -0,0 +1,32 @@ +黑客们成功地在土豆上安装了 Linux ! +================================================================================ + +来自荷兰阿姆斯特丹的消息称,LinuxOnAnything.nl 网站的黑客们成功地在土豆上安装了 Linux!这是该操作系统第一次在根用蔬菜(root vegetable)上安装成功(LCTT 译注:root vetetable,一语双关,root 在 Linux 是指超级用户)。 + +![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) + +“土豆没有 CPU,内存和存储器,这真的是个挑战,” Linux On Anything (LOA) 小组的 Johan Piest 说。“显然我们不能使用一个像 Fedora 或 Ubuntu 这些体量较大的发行版,所以我们用的是 Damn Small Linux。” + +在尝试了几周之后,LOA 小组的的同学们弄出了一个适合土豆的 Linux 内核,这玩艺儿上面可以用 vi 来编辑小的文本文件。这个 Linux 通过一个小型的 U 盘加载到土豆上,并通过一组红黑线以二进制的方式向这个土豆发送命令。 + +LOA 小组是一个不断壮大的黑客组织的分支;这个组织致力于将 Linux 安装到所有物体上;他们先是将 Linux 装到Gameboy 和 iPod 等电子产品上,不过最近他们在挑战一些高难度的东西,譬如将Linux安装到灯泡和小狗身上! + +LOA 小组在与另一个黑客小组 Stuttering Monarchs 竞赛,看谁先拿到土豆这一分。“土豆是一种每个人都会接触到的蔬菜,它的用途就像 Linux 一样极其广泛。无论你是想煮捣烹炸还是别的都可以” Piest 说道,“你也许认为我们完成这个挑战是为了获得某些好处,而我们只是追求逼格而已。” + +LOA 是第一个将 Linux 安装到一匹设德兰矮种马上的小组,但这五年来竞争愈演愈烈,其它黑客小组的进度已经反超了他们。 + +“我们本来可以成为在饼干上面安装 Linux 的第一个小组,但是那群来自挪威的混蛋把我们击败了。” Piest 说。 + +第一个成功安装了 Linux 的蔬菜是一头卷心菜,它是由一个土耳其的一个黑客小组完成的。 + +(好啦——是不是已经目瞪口呆,事实上,这是一篇好几年前的恶搞文,你看出来了吗?哈哈哈哈) + +-------------------------------------------------------------------------------- + +via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html + +作者:[Brian Briggs](briggsb@bbspot.com) +译者:[StdioA](https://github.com/StdioA), [hittlle](https://github.com/hittlle) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/share/Hackers Successfully Install Linux on a Potato.md b/translated/share/Hackers Successfully Install Linux on a Potato.md deleted file mode 100644 index 1e9d3fc723..0000000000 --- a/translated/share/Hackers Successfully Install Linux on a Potato.md +++ /dev/null @@ -1,32 +0,0 @@ -# 黑客成功在马铃薯上安装Linux - -================================================================================ - -来自荷兰阿姆斯特丹的消息称,LinuxOnAnything.nl网站的黑客在马铃薯上成功安装了Linux。这是操作系统第一次在根用蔬菜上安装成功。 - -![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg) - -“土豆没有CPU,内存和海量存储器,所以这确实是一个挑战,” Linux On Anything (LOA) 小组的Johan Piest说。“显然我们不能使用一个像Fedora或Ubuntu一样的大型发行版,所以我们使用了Damn Small Linux.” - -经过几周的尝试,这个小组制作了一个经过特殊修改的Linux内核,这个内核可以装载到土豆上,而且可以使用vi修改一个小的文本文件。他们将Linux通过一个小型USB存储器加载到土豆上,而命令通过一组红色和黑色线以二进制形式传输至土豆中。 - -LOA小组是一个由一群尝试在任何东西上加载Linux的黑客们构成的、不断壮大的小组。他们从电子设备(如Gameboy和iPod)开始,不过最近这个小组开始面对一些更严峻的挑战,比如在电灯泡和小狗上加载Linux. - -LOA小组在与另一个Stuttering Monarchs——另一个黑客小组竞赛,看谁先拿到土豆这一分。“马铃薯是一种非常抢手的蔬菜,因为它的用途极其广泛,就像Linux本身一样。你可以煮它,捣碎它,在焖锅中杵它,” Piest说道,“你可以认为我们完成这个挑战可以获得某些奖项,但我们认为这是我们吹嘘的一种成本。” - -LOA是第一个将Linux安装到一匹设得兰矮种马上的小组,但最近五年这个竞争愈演愈烈,其它黑客小组的进度已经反超了他们。 - -“我们本来可以成为在薄脆饼干上面加载Linux的第一个小组,但是那群来自挪威的混蛋把我们赢了。” Piest说。 - -第一个成功安装Linux的蔬菜是一头卷心菜,它由一个来自土耳其的一个黑客小组完成安装。 - - --------------------------------------------------------------------------------- - -via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html - -译者:[StdioA](https://github.com/StdioA) -协同翻译:[hittlle](https://github.com/hittlle) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 56a00be6aff15d1bf960a68cf974a0d944d10aea Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Fri, 8 Jan 2016 09:35:52 +0800 Subject: [PATCH 0800/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]=2020151208=206=20useful=20LibreOffice=20extensions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0151208 6 useful LibreOffice extensions.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 translated/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md diff --git a/translated/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md b/translated/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md new file mode 100644 index 0000000000..b8d4f1fa1c --- /dev/null +++ b/translated/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md @@ -0,0 +1,78 @@ +GHLandy Translated + +LibreOffice 中的六大实用扩展组件 +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png) + +图片来源:Opensource.com + +LibreOffice 是最好的免费办公套件,并在所有的主要 Linux 发行版中得到应用。尽管 LibreOffice 已经拥有了大多数特性,它仍然可以添加特定的附加组件,即扩展。 + +LibreOffice 的扩展组件的网站是 [extensions.libreoffice.org][1]。扩展组件只是一些工具,可以在安装主体上进行独立添加或者移除,以便增加新功能或者让已有功能更容易使用。 + +### 1. 多格式保存组件 ### + +多格式保存组件可以根据用户的设置,同时将文档保存为开源文档、微软 Office 文档或者 PDF 文档。在你将微软 Office 文档格式转为标准的[开源文档格式][2]的时候,这个组件就很实用了,因为该组件同时提供了两种选择:互操作性较强的 ODF 文档格式以及为所有用户让在实用的微软 Office 文档格式保持兼容性。这样使管理员的文档迁移过程变得更具弹性、更易于管理。 + +**[下载 多格式保存组件][3]** + +![Multiformatsave extension](https://opensource.com/sites/default/files/images/business-uploads/multiformatsave.png) + +### 2. Writer 中可交替使用的查找与替换组件(交替搜索) ### + +该组件向 Writer 中的查找与替换功能添加了许多新特性:可以查找和替换一段或多段文本;一次执行在多个查找和替换;搜索:书签、笔记、文本字段、交叉引用和参考标志内容、名称或标志及其插入;搜索和插入脚注和尾注;通过名称来搜索表格对象、图像和文本框;搜索帮助手册页的分栏符以及创建和失活时间;根据光标位置搜索相同格式的文本。还可以保存/加载查找和替换参数,并在多个同时打开的文件中执行批处理。 + +**[下载 Writer 中可交替使用的查找与替换组件(交替搜索)][4]** + +![Alternative Find&amp;Replace add-on](https://opensource.com/sites/default/files/images/business-uploads/alternativefindreplace.png) + +### 3. Pepito 清除组件 ### +中 LibreOffice 中, Pepito 清除组件主要用来快速清除并修复旧扫描件、导入的 PDF 以及每个电子文本文档的格式错误。通过点击 LibreOffice 工具栏中的 Pepito 图标,用户可以打开一个用于分析文档并呈现文档错误类型。当你将 PDF 文档转换为 ODF 文档时,这个工具就非常有用了,它会自动清除转换过程中出现的错误。 + +**[下载 Pepito 清除组件][5]** + +![Pepito cleaner screenshot](https://opensource.com/sites/default/files/images/business-uploads/pepitocleaner.png) + +### 4. ImpressRunner 组件### +Impress Runner 是将 [Impress][6] 文档转换成自动播放文件的扩展组件。该组件会添加两个图标,用以设置或移除自动开始播放的功能,我们还可以通过编辑 文件 | 属性 | 自定义属性 菜单来手动添加这两个图标,并将自动运行按钮添加到四个文本域之前。在会议与活动组织而且幻灯片无人主持的时候,这个扩展组件就变得非常有用。 + +**[下载 ImpressRunner 组件][7]** + +### 5. 导出为图像组件 ### + +导出为图像组件是 Impress 和 [Draw][8] 中文件菜单里边的一个入口——导出为图像...,,主要用于将所有的幻灯片和页面导出成 JPG、PNG、GIF、BMP 和 TIFF 等图像格式,并且允许用户自定义导出图像的名称、大小以及其他参数。 + +**[下载 导出为图像组件][9]** + +![Export as images extension](https://opensource.com/sites/default/files/images/business-uploads/exportasimages.png) + +### 6. Anaphraseus 组件### +Anaphraseus 是一个 CAT(Computer-Aided Translation,计算机辅助翻译)工具组件,用来创建、管理双语翻译。Anaphraseus 是一个设置成扩展组件或者独立文档的 LibreOffice 宏。最开始,开发者设计 Anaphraseus 为快速翻译(Wordfast)格式,但现在它可以将文件导入或者到出成 TMX 格式。其主要特性:分本分割、在翻译记录中模糊搜索、术语识别以及导入导出 TMX(OmegaT translation memory format,OmegaT 翻译存储格式)。 + +**[下载 Anaphraseus 组件][10]** + +![Anaphraseus screenshot](https://opensource.com/sites/default/files/images/business-uploads/anaphraseus.png) + +你是否也有自己喜欢和推荐的 LibreOffice 组件呢?在评论中告诉大家吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions + +作者:[Italo Vignoli][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/italovignoli +[1]:http://extensions.libreoffice.org/ +[2]:http://www.opendocumentformat.org/ +[3]:http://extensions.libreoffice.org/extension-center/multisave-1 +[4]:http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer +[5]:http://pepitoweb.altervista.org/pepito_cleaner/index.php +[6]:https://www.libreoffice.org/discover/impress/ +[7]:http://extensions.libreoffice.org/extension-center/impressrunner +[8]:https://www.libreoffice.org/discover/draw/ +[9]:http://extensions.libreoffice.org/extension-center/export-as-images +[10]:http://anaphraseus.sourceforge.net/ From bfa8b3aa3e77fa8bb582474a5fe461d76d9a3ef2 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Fri, 8 Jan 2016 09:36:10 +0800 Subject: [PATCH 0801/1710] Delete 20151208 6 useful LibreOffice extensions.md --- ...0151208 6 useful LibreOffice extensions.md | 81 ------------------- 1 file changed, 81 deletions(-) delete mode 100644 sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md diff --git a/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md b/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md deleted file mode 100644 index be1bb2d553..0000000000 --- a/sources/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md +++ /dev/null @@ -1,81 +0,0 @@ -GHLandy Translating - -6 useful LibreOffice extensions -================================================================================ -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png) - -Image by : Opensource.com - -LibreOffice is the best free office suite around, and as such has been adopted by all major Linux distributions. Although LibreOffice is already packed with features, it can be extended by using specific add-ons, called extensions. - -The main LibreOffice extensions website is [extensions.libreoffice.org][1]. Extensions are tools that can be added or removed independently from the main installation, and may add new functionality or make existing functionality easier to use. - -### 1. MultiFormatSave ### - -MultiFormatSave lets users save a document in the OpenDocument, Microsoft Office (old and new), and/or PDF formats simultaneously, according to user settings. This extension is extremely useful during the migration from Microsoft Office document formats to the [Open Document Format][2] standard, because it offers the option to save in both flavors: ODF for interoperability, and Microsoft Office for compatibility with all users sticking to legacy formats. This makes the migration process softer, and easier to administer. - -**[Download MultiFormatSave][3]** - -![Multiformatsave extension](https://opensource.com/sites/default/files/images/business-uploads/multiformatsave.png) - -### 2. Alternative dialog Find & Replace for Writer (AltSearch) ### - -This extension adds many new features to Writer's find & replace function: searched or replaced text can contain one or more paragraphs; multiple search and replacement in one step; searching: Bookmarks, Notes, Text fields, Cross-references and Reference marks to their content, name or mark and their inserting; searching and inserting Footnote and Endnote; searching object of Table, Pictures and Text frames according to their name; searching out manual page and column break and their set up or deactivation; and searching similarly formatted text, according to cursor point. It is also possible to save and load search and replacement parameters, and execute the batch on several opened documents at the same time. - -**[Download Alternative dialog Find & Replace for Writer (AltSearch)][4]** - -![Alternative Find&amp;Replace add-on](https://opensource.com/sites/default/files/images/business-uploads/alternativefindreplace.png) - -### 3. Pepito Cleaner ### - -Pepito Cleaner is an extension of LibreOffice created to quickly resolve the most common formatting mistakes of old scans, PDF imports, and every digital text file. By clicking the Pepito Cleaner icon on the LibreOffice toolbar, users will open a window that will analyze the document and show the results broken down by category. This is extremely useful when converting PDF documents to ODF, as it cleans all the cruft left in place by the automatic process. - -**[Download Pepito Cleaner][5]** - -![Pepito cleaner screenshot](https://opensource.com/sites/default/files/images/business-uploads/pepitocleaner.png) - -### 4. ImpressRunner ### - -Impress Runner is a simple extension that transforms an [Impress][6] presentation into an auto-running file. The extension adds two icons, to set and remove the autostart function, which can also be added manually by editing the File | Properties | Custom Properties menu, and adding the term autostart in one of the first four text fields. This extension is especially useful for booths at conferences and events, where the slides are supposed to run unattended. - -**[Download ImpressRunner][7]** - -### 5. Export as Images ### - -The Export as Images extension adds a File menu entry export as Images... in Impress and [Draw][8], to export all slides or pages as images in JPG, PNG, GIF, BMP, and TIFF format, and allows users to choose a file name for exported images, the image size, and other parameters. - -**[Download Export as Images][9]** - -![Export as images extension](https://opensource.com/sites/default/files/images/business-uploads/exportasimages.png) - -### 6. Anaphraseus ### - -Anaphraseus is a CAT (Computer-Aided Translation) tool for creating, managing, and using bilingual Translation Memories. Anaphraseus is a LibreOffice macro set available as an extension or a standalone document. Originally, Anaphraseus was developed to work with the Wordfast format, but it can also export and import files in TMX format. Anaphraseus main features are: text segmentation, fuzzy search in Translation Memory, terminology recognition, and TMX Export/Import (OmegaT translation memory format). - -**[Download Anaphraseus][10]** - -![Anaphraseus screenshot](https://opensource.com/sites/default/files/images/business-uploads/anaphraseus.png) - -Do you have a favorite LibreOffice extension to recommend? Let us know about it in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions - -作者:[Italo Vignoli][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/italovignoli -[1]:http://extensions.libreoffice.org/ -[2]:http://www.opendocumentformat.org/ -[3]:http://extensions.libreoffice.org/extension-center/multisave-1 -[4]:http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer -[5]:http://pepitoweb.altervista.org/pepito_cleaner/index.php -[6]:https://www.libreoffice.org/discover/impress/ -[7]:http://extensions.libreoffice.org/extension-center/impressrunner -[8]:https://www.libreoffice.org/discover/draw/ -[9]:http://extensions.libreoffice.org/extension-center/export-as-images -[10]:http://anaphraseus.sourceforge.net/ From f73f698f171617cbc4b86513e2b2743ce0774959 Mon Sep 17 00:00:00 2001 From: runningwater Date: Fri, 8 Jan 2016 10:02:20 +0800 Subject: [PATCH 0802/1710] =?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 --- ...rep Count Lines If a String or Word Matches.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename {sources => translated}/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md (55%) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md similarity index 55% rename from sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md rename to translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md index c145320e5a..63cb1aa189 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md +++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md @@ -1,25 +1,24 @@ -(translating by runningwater) -Grep Count Lines If a String / Word Matches +Grep 命令统计匹配的字符串/单词行数 ================================================================================ -How do I count lines if given word or string matches for each input file under Linux or UNIX operating systems? +在 Linux 或 UNIX 操作系统下,对于给定的单词或字符串,我们应该怎么统计它们在每个输入文件中存在的行数呢? -You need to pass the -c or --count option to suppress normal output. It will display a count of matching lines for each input file: +您需要通过添加 -c 或者 --count 选项参数来抑制正常的输出。它将会显示对输入文件单词匹配的行数,如下示: $ grep -c vivek /etc/passwd -OR +或者 $ grep -w -c vivek /etc/passwd -Sample outputs: +输出的示例: 1 -However, with the -v or --invert-match option it will count non-matching lines, enter: +相反的,使用 -v 或者 --invert 选项参数可以统计出不匹配的输入文件行数,键入: $ grep -c vivek /etc/passwd -Sample outputs: +输出的示例: 45 From 8eb8d82fb5dfe75a1a647e2f8cc8e0fe140a1788 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Fri, 8 Jan 2016 14:09:03 +0800 Subject: [PATCH 0803/1710] =?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 --- ... Light Table 0.8 in Ubuntu 14.04, 15.10.md | 105 ------------------ 1 file changed, 105 deletions(-) delete mode 100644 sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md diff --git a/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md b/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md deleted file mode 100644 index fd26cb0104..0000000000 --- a/sources/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md +++ /dev/null @@ -1,105 +0,0 @@ -翻译中 -How to Install Light Table 0.8 in Ubuntu 14.04, 15.10 -================================================================================ -![](http://ubuntuhandbook.org/wp-content/uploads/2014/11/LightTable-IDE-logo-icon.png) - -The Light Table IDE has just reached a new stable release after more than one year of development. Now it provides 64-bit only binary for Linux. - -Changes in LightTable 0.8.0: - -- CHANGED: We have switched to Electron from NW.js -- CHANGED: LT’s releases and self-updating processes are completely in the open on Github -- ADDED: LT can be built from source with provided scripts across supported platforms -- ADDED: Most of LT’s node libraries are installed as npm dependencies instead of as forked libraries -- ADDED: Significant documentation. See more below -- FIX: Major usability issues on >= OSX 10.10 -- CHANGED: 32-bit linux is no longer an official download. Building from source will still be supported -- FIX: ClojureScript eval for modern versions of ClojureScript -- More details at [github.com/LightTable/LightTable/releases][1] - -![LightTable 0.8.0](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-08.jpg) - -### How to Install Light Table 0.8.0 in Ubuntu: ### - -Below steps show you how to install the official binary in Ubuntu. Works on all current Ubuntu releases (**64-bit only**). - -Before getting started, please make a backup if you have a previous release installed. - -**1.** Download the Linux binary from link below: - -- [lighttable-0.8.0-linux.tar.gz][2] - -**2.** Open terminal from Unity Dash, App Launcher, or via Ctrl+Alt+T keys. When it opens, paste below command and hit enter: - - gksudo file-roller ~/Downloads/lighttable-0.8.0-linux.tar.gz - -![open-via-fileroller](http://ubuntuhandbook.org/wp-content/uploads/2015/12/open-via-fileroller.jpg) - -Install `gksu` from Ubuntu Software Center if the command does not work. - -**3.** Previous command opens the downloaded archive via Archive Manager using root user privilege. - -When it opens, do: - -- right-click and rename the folder name to **LightTable** -- extract it to **Computer -> /opt/** directory. - -![extract-lighttable](http://ubuntuhandbook.org/wp-content/uploads/2015/12/extract-lighttable.jpg) - -Finally you should have the LightTable installed to /opt/ directory: - -![lighttable-in-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-in-opt.jpg) - -**4.** Create a launcher so you can start LightTable from Unity Dash or App Launcher. - -Open terminal and run below command to create & edit a launcher file for LightTable: - - gksudo gedit /usr/share/applications/lighttable.desktop - -When the file opens via Gedit text editor, paste below and save the file: - - [Desktop Entry] - Version=1.0 - Type=Application - Name=Light Table - GenericName=Text Editor - Comment=Open source IDE that modify, from running programs to embed websites and games - Exec=/opt/LightTable/LightTable %F - Terminal=false - MimeType=text/plain; - Icon=/opt/LightTable/resources/app/core/img/lticon.png - Categories=TextEditor;Development;Utility; - StartupNotify=true - Actions=Window;Document; - - Name[en_US]=Light Table - - [Desktop Action Window] - Name=New Window - Exec=/opt/LightTable/LightTable -n - OnlyShowIn=Unity; - - [Desktop Action Document] - Name=New File - Exec=/opt/LightTable/LightTable --command new_file - OnlyShowIn=Unity; - -So it looks like: - -![lighttable-launcher](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-launcher.jpg) - -Finally launch the IDE from Unity Dash or Application Launcher and enjoy! - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/12/install-light-table-0-8-ubuntu-14-04/ - -作者:[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://github.com/LightTable/LightTable/releases -[2]:https://github.com/LightTable/LightTable/releases/download/0.8.0/lighttable-0.8.0-linux.tar.gz From 5fae30508aaf1b4e6671c7b4363d12ddbddac0aa Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Fri, 8 Jan 2016 14:10:13 +0800 Subject: [PATCH 0804/1710] =?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 --- ... Light Table 0.8 in Ubuntu 14.04, 15.10.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md diff --git a/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md b/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md new file mode 100644 index 0000000000..322697bfe4 --- /dev/null +++ b/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md @@ -0,0 +1,108 @@ +翻译中 + 如何在 Ubuntu 14.04, 15.10 中安装Light Table 0.8 +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2014/11/LightTable-IDE-logo-icon.png) + +Light Table 在经过一年以上的开发,已经推出了新的稳定发行版本。现在它只为Linux提供64位的二进制包。 +LightTable 0.8.0的改动: + +- 更改: 我们从 NW.js 中选择了 Electron +- 更改: LT’s 发行版本与自更新进程在github上面完全的公开 +- 增加: LT 可以由提供的脚本从源码在支持的不同平台上安装 +- 增加: LT’s 大部分的代码库将用npm依赖来安装以取代以forked库安装 +- 增加: 有效文档. 更多详情内容见下面 +- 修复: 版本号>= OSX 10.10的系统下工作的主要的可用性问题 +- 更改: 32位Linux不再提供官方包文件下载,从源码安装仍旧将被支持 +- 修复: ClojureScript eval 在ClojureScript的现代版本可以正常工作 +- 参阅更多 [github.com/LightTable/LightTable/releases][1] + +![LightTable 0.8.0](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-08.jpg) + +### 如何在Ubuntu中安Light Table 0.8.0: ### + +下面的步骤回指导你怎么样在Ubuntu下安装官方的二进制包,在目前Ubuntu发行版本都适用(**仅仅针对64位**)。 + +在开始之前,如果你安装了之前的版本请做好备份。 + +**1.** +从以下链接下载LightTable Linux下的二进制文件: + +- [lighttable-0.8.0-linux.tar.gz][2] + +**2.** +从dash或是应用启动器,或者是Ctrl+Alt+T快捷键打开终端,并且在输入以下命令后敲击回车键: + + gksudo file-roller ~/Downloads/lighttable-0.8.0-linux.tar.gz + +![open-via-fileroller](http://ubuntuhandbook.org/wp-content/uploads/2015/12/open-via-fileroller.jpg) + +如果命令不工作的话从Ubuntu软件中心安装`gksu`。 + +**3.** +之前的命令使用了root用户权限通过档案管理器打开了下载好的存档。 + + +打开它后,请做以下步骤: + +- 右击文件并且将其重命名为 **LightTable** +- 将其解压到 **Computer -> /opt/** 目录下。 + +![extract-lighttable](http://ubuntuhandbook.org/wp-content/uploads/2015/12/extract-lighttable.jpg) + +最终你应该安装好了LightTable,可以在/opt/ 目录下查看: + +![lighttable-in-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-in-opt.jpg) + +**4.** 创建一个启动器使你可以从dash工具或是应用启动器打开LightTable。 + +打开终端,运行以下命令来创建与编辑一个LightTable的启动文件: + + gksudo gedit /usr/share/applications/lighttable.desktop + +通过Gedit文本编辑器打开文件后, 粘贴下面的内容并保存: + + [Desktop Entry] + Version=1.0 + Type=Application + Name=Light Table + GenericName=Text Editor + Comment=Open source IDE that modify, from running programs to embed websites and games + Exec=/opt/LightTable/LightTable %F + Terminal=false + MimeType=text/plain; + Icon=/opt/LightTable/resources/app/core/img/lticon.png + Categories=TextEditor;Development;Utility; + StartupNotify=true + Actions=Window;Document; + + Name[en_US]=Light Table + + [Desktop Action Window] + Name=New Window + Exec=/opt/LightTable/LightTable -n + OnlyShowIn=Unity; + + [Desktop Action Document] + Name=New File + Exec=/opt/LightTable/LightTable --command new_file + OnlyShowIn=Unity; + +因此它看起来像: + +![lighttable-launcher](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-launcher.jpg) + +最后,从dash工具或者是应用启动器打开IDE,好好享受它吧! + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/12/install-light-table-0-8-ubuntu-14-04/ + +作者:[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://github.com/LightTable/LightTable/releases +[2]:https://github.com/LightTable/LightTable/releases/download/0.8.0/lighttable-0.8.0-linux.tar.gz From ce08bbb6ad9cb58e79f29c21a3d9d93e7a608e45 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Fri, 8 Jan 2016 14:11:12 +0800 Subject: [PATCH 0805/1710] =?UTF-8?q?=E5=88=A0=E6=8E=89=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md b/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md index 322697bfe4..3b3f72ac4c 100644 --- a/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md +++ b/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md @@ -1,4 +1,3 @@ -翻译中 如何在 Ubuntu 14.04, 15.10 中安装Light Table 0.8 ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2014/11/LightTable-IDE-logo-icon.png) From cc56e44e979ee13fef9392b0047bd53c7755bad4 Mon Sep 17 00:00:00 2001 From: kylepeng93 <958983476@qq.com> Date: Sat, 9 Jan 2016 13:47:13 +0800 Subject: [PATCH 0806/1710] kylepeng93 translating --- sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md b/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md index 5cfbc31ace..ea7c1f93b9 100644 --- a/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md +++ b/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md @@ -1,3 +1,4 @@ +translating by kylepeng93 KDE vs GNOME vs XFCE Desktop ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2013/07/300px-Xfce_logo.svg_.png) @@ -50,4 +51,4 @@ via: http://www.unixmen.com/kde-vs-gnome-vs-xfce-desktop/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/pirat9/ \ No newline at end of file +[a]:http://www.unixmen.com/author/pirat9/ From dbd404795633a16a39bfe7caec5da115727c1f67 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 9 Jan 2016 16:16:31 +0800 Subject: [PATCH 0807/1710] [Translated] tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md --- ...How To Find Files by Content Under UNIX.md | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) rename {sources => translated}/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md (59%) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md similarity index 59% rename from sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md rename to translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md index 3d5943fc07..9bf698136a 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md +++ b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md @@ -1,15 +1,20 @@ +如何在 UNIX 中根据文件内容查找文件 How To Find Files by Content Under UNIX ================================================================================ +为了完成课程作业,我写了很多 C 语言代码并把它们保存为 /home/user/c/*.c and *.h。那么在 UNIX shell 窗口中我如何能通过字符串或者单词(例如函数名 main())文件内容来查找文件呢? I had written lots of code in C for my school work and saved it as source code under /home/user/c/*.c and *.h. How do I find files by content such as string or words (function name such as main() under UNIX shell prompt? +你需要用到以下工具: You need to use the following tools: -[a] **grep command** : print lines matching a pattern. +[a] **grep 命令** : 输出匹配模式的行。 -[b] **find command**: search for files in a directory hierarchy. +[b] **find 命令**: 在目录层次中查找文件。 +### [使用 grep 命令根据内容查找文件][1] ### [grep Command To Find Files By][1] Content ### +输入以下命令: Type the command as follows: grep 'string' *.txt @@ -19,36 +24,48 @@ Type the command as follows: grep -i 'ultra' *.conf grep -iR 'ultra' *.conf +其中 Where +- **-i** : 忽视模式(匹配字符串 valid、 VALID、 ValID )和输入文件(匹配 file.c FILE.c FILE.C)的大小写。 +- **-R** : 递归读取每个目录下的所有文件。 - **-i** : Ignore case distinctions in both the PATTERN (match valid, VALID, ValID string) and the input files (math file.c FILE.c FILE.C filename). - **-R** : Read all files under each directory, recursively +### 高亮匹配到的模式 ### ### Highlighting searched patterns ### +在搜索大量文件的时候你可以轻松地高亮模式: You can highlight patterns easily while searching large number of files: $ grep --color=auto -iR 'getChar();' *.c +### 为查找到的模式显示文件名和行号 ### ### Displaying file names and line number for searched patterns ### +你也许需要显示文件名和行号: You may also need to display filenames and numbers: $ grep --color=auto -iRnH 'getChar();' *.c +其中, Where, +- **-n** : 在输出的每行前面添加文件中以 1 开始的行号。 +- **-H** : 为每个匹配打印文件名。要搜索多个文件时这是默认选项。 - **-n** : Prefix each line of output with the 1-based line number within its input file. - **-H** Print the file name for each match. This is the default when there is more than one file to search. $grep --color=auto -nH 'DIR' * +输出样例: Sample output: -![Fig.01: grep command displaying searched pattern](http://www.cyberciti.biz/faq/wp-content/uploads/2008/09/grep-command.png) +![Fig.01: grep 命令显示搜索到的模式](http://www.cyberciti.biz/faq/wp-content/uploads/2008/09/grep-command.png) -Fig.01: grep command displaying searched pattern +Fig.01: grep 命令显示搜索到的模式 +你也可以使用 find 命令: You can also use find command: $ find . -name "*.c" -print | xargs grep "main(" @@ -58,7 +75,7 @@ You can also use find command: via: http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/ 作者:Vivek Gite -译者:[译者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 d3ed5411cbf34005b2530d4a6e2574e5011464a8 Mon Sep 17 00:00:00 2001 From: kylepeng93 <958983476@qq.com> Date: Sat, 9 Jan 2016 18:52:50 +0800 Subject: [PATCH 0808/1710] translated --- .../20151202 KDE vs GNOME vs XFCE Desktop.md | 54 ------------------- .../20151202 KDE vs GNOME vs XFCE Desktop.md | 47 ++++++++++++++++ 2 files changed, 47 insertions(+), 54 deletions(-) delete mode 100644 sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md create mode 100644 translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md diff --git a/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md b/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md deleted file mode 100644 index ea7c1f93b9..0000000000 --- a/sources/talk/20151202 KDE vs GNOME vs XFCE Desktop.md +++ /dev/null @@ -1,54 +0,0 @@ -translating by kylepeng93 -KDE vs GNOME vs XFCE Desktop -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2013/07/300px-Xfce_logo.svg_.png) - -Over many years, many people spent a long time with Linux desktop using either KDE or GNOME. These two environments have grown through the previous years and each of these desktops continued to expand their current user-base. For example, sleeper desktop environment has been XFCE as XFCE offers more robustness than LXDE that lacks much of XFCE’s polish in the default configuration. The XFCE provides all benefits which users enjoyed in the GNOME 2, but with some lightweight experiences which made it a hit on the older computers. - -### The Desktop Theming ### - -After the user has fresh installation, the XFCE will be a bit boring, which lacks some certain visual attractiveness to it. So, don’t misunderstand my words here, the XFCE is still having nice looking desktop, but it may be like vanilla in users’ eyes as well as most people who are new to the XFCE desktop environment. The good news here is that while installing new theme to the XFCE, it is a reasonably easy process as you can easily find the right XFCE theme which appeals to you, after that, you can extract that theme to the proper directory. From this point, the XFCE comes with an important tool located under the Appearance for helping the user to select the chosen theme easily throughout the Graphical User Interface (GUID). There’re no other tools that might be required here, and if the user follows the above directions, it will be a bit simple for everyone who is caring to have a try. - -On the GNOME desktop, the user should follow the similar above approach. The main key difference for this point is that users have to download and then install GNOME Tweak Tool before proceeding with anything. It does not have any huge barriers under any means, but it is simple valid oversight when the user consider that the XFCE does not require any tweak tool in order for installing and activating the new desktop themes. By being under the GNOME, and especially after installing that Tweak tool which is mentioned above, you will need to go ahead and also to make sure that you have the extension of User Themes installed. - -The same as with the XFCE, the user will want to search for, and then download the theme which most appeals personally to him. Then, user can revisit to the GNOME Tweak tool, and click on the Appearance option on left side of that Tweak tool. Then, the user can simply look at the bottom of the page and click on file browse button to right of the Shell Theme. User then can browse to the zipped folder, and click open. In case if this process was successfully done, the user will see an alert that tell him that it was installed without any problems. From this point, user can simply use the pull down menu in order for selecting the theme he wants to use. The same as with the XFCE, process of theme activation is very easy, however, a need to download the non-included application for using a new theme will leave much to be desired. - -Finally, there is the process of the KDE desktop theming. The same as with XFCE, there is no need at all to install any extra tools for making it work. This is one area where there is a feeling that the XFCE has to make the KDE the winner. Not only the installing themes in the KDE is accomplished entirely within the Graphical User Interface, but it’s also even possible to click on (Get New Themes) button and user will be able to locate, view, and also install the new themes automatically. - -However, it should be noted that the KDE is a bit more robust desktop environment comparing to the XFCE. Therefore, it is a bit reasonable now to see why such extra functionalities could be missing from the desktops which are mainly designed to be minimalist. So, we all have to give the KDE props for such outstanding functionality. - -### MATE is not Lightweight Desktop ### - -Before continuing with the comparison between the XFCE, the GNOME 3 and the KDE, it should be clear for experts that we can’t touch the MATE desktop as an option in the comparison. MATE can be considered as the GNOME 2 desktop’s next incarnation, but it’s not mainly marketed to be a lightweight or fast desktop. But instead of that, its primary goal is to be more traditional and comfortable desktop environment where the users can feel right at their home to use it. - -On the other hand, the XFCE comes with a completely other goal set. The XFCE offers its users a more lightweight and yet still visually appealing desktop experience. Then, for everyone who points out that MATE is a lightweight desktop too, it isn’t really targeting that lightweight desktop crowd. Both options may be dressed up for looking quite attractive with the proper theme installed. - -### The Navigation of Desktop ### - -The XFCE honestly offers an obvious navigation which is out of the box. Anyone who is used to the traditional Windows or the GNOME 2/MATE desktop experience will be going to have the ability to navigate around the new XFCE installation without any kind of help. Straight away, adding the applets to panel is still very obvious. The same as with locating installed applications, just use the launcher and simply click on any desired application. With an exception of LXDE and MATE, there is no other desktop that can make the navigation that simple. What can be even better is that fact which the control panel is very easy to use, that is a really big benefit to everyone who is new to the desktop environment. If the user prefer older methods to use his desktop, then GNOME is not an option. With the hot corners as well as the no minimize button, plus the other application layout method, it’ll take the most newcomers getting easily used to it. - -If the user is coming from, as an example, Windows environment, then he is going to be put off by the inability to add applets to the top of his workspace simply with just a mere right-click. Just instead of this, it can be handled by using extensions. Installing extensions in the GNOME is granted and is a brain-dead easy, based on the easy to use (on/off) toggle switches located on the extensions page of the GNOME. Users have to know, sadly, to actually visit that page to enjoy this functionality. - -On the other side, the GNOME is sharing its desire for providing a straight forward and an easy to use control panel, which many of you may think that it is not be a big deal, but it is really something that I by myself find commendable and worth to be mentioned. The KDE offers its users a bit more traditional desktop experience, throughout familiar launchers as well as the ability for getting to the software in more familiar way if they are coming from Windows desktop. The process of adding widgets or applets to the KDE desktop is an easy matter of just right-clicking on the bottom of the desktop. Only the problem with the KDE’s approach is to be that, as many things KDE, the feature which users are actually looking for are hidden. The KDE users might berate my opinion for this, but I still stand by my statement. - -In order for adding a Widget, just right-click on “my panel”, just to see the panel options, but not as an immediate method to install Widgets. You will not actually see the Add Widgets until you select the Panel Options, then the Add Widgets. This not a big deal to me, but later for some users, it becomes unnecessary tidbit of confusion. To make things here more convoluted, after the users manage to locate Widgets area they discover later a brand new term called “Activities”. It is in the same area as the Widgets, yet it is somehow in its own area as to what it does. - -Now don’t misunderstand me, the Activities feature in the KDE is totally great and actually valued. But to look at it from the usability standpoint, I think that it would be better suited in another menu option in order to not confuse the newbies. User is welcome to differ, but to test this with newbies for some extended periods of time can prove the correct over and over again. The rant against the Activities placement aside, the KDE approach to add new widgets is really great. The same as with the KDE themes, user can’t browse through and install the Widgets automatically via using the provided Graphical User Interface. It is a bit fantastic of functionality, and also it could be celebrated such way. The control panel of the KDE is not as easy as the user might like it to be, yet it is a bit clear that this’s something that they are still working on. - -### So, the XFCE is the best desktop, right? ### - -I, by myself, actually run GNOME, KDE, and XFCE on my computers in my office and home. I also have some older machines with OpenBox and LXDE too. Each desktop experience can offer something that is a bit useful to me and may help me to use each machine as I see that it is fit. For me, I have a soft spot in my heart for the XFCE as it is one of the desktop environments which I stuck with for years. But in this article, I’m just writing it on my daily use computer which is in fact, GNOME. - -The main idea here is that I still feel that the XFCE provides a bit better user experience for users who are looking for stable, traditional, and easy to understand desktop environment. You are also welcome to share with us your opinion in the comments section. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/kde-vs-gnome-vs-xfce-desktop/ - -作者:[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/ diff --git a/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md b/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md new file mode 100644 index 0000000000..bdbaf2cdbd --- /dev/null +++ b/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md @@ -0,0 +1,47 @@ +translating by kylepeng93 +KDE,GNOME和XFCE的较量 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2013/07/300px-Xfce_logo.svg_.png) +这么多年来,很多人一直都在他们的linux桌面端使用KDE或者GNOME桌面环境。这两个桌面环境经过多年的发展之后仍然在继续增加他们的用户基数。然而,在轻量级桌面环境下,XFCE一举成为了最受欢迎的桌面环境,相较于LXDE缺少的优美视觉效果,默认配置下的XFCE就可以在这方面打败前者。XFCE提供了用户能在GNOME2下使用的所有功能特性。但是,必须承认,在一些太老的计算机上,它的轻量级的特性并不能得到很好的效果。 + +### 桌面主题定制 ### +用户完成安装之后,XFCE看起来可能会有一点无聊,因为它在视觉上还缺少一些吸引力。但是,请不要误解我的话,XFCE仍然拥有漂亮的桌面,可能看起来像是用户眼中的香草,正如大多数刚刚接触XFCE桌面环境的人。好消息是当我们给XFCE安装新的主题的时候,这会是一个十分容易的过程,因为你能够快速的找到你喜欢的XFCE主题,之后,你可以将它解压到一个合适的目录中。从这一点上来说,XFCE自带的一个重要的图形界面工具可以帮助用户更加容易的选中你已经选好的主题,这可能是目前在XFCE上最好用的工具了。如果用户按照上面的指示去做的话,对于任何想要尝试使用XFCE的用户来说将不存在任何困难。 + +在GNOME桌面上,用户也可以按照上面的方法去做。不过,其中最主要的不同点就是用户必须手动下载并安装GNOME Tweak Tool,这样才能继续你想做的事。当然,对于使用任何一种方式都不会有什么障碍,但是对于用户来说,使用XFCE安装和激活主题并不需要去额外的下载并安装任何tweak tool可能是他们无法忽略的一个优势。而在GNOME上,尤其是在用户已经下载并安装了GNOME Tweak tool之后,你仍将必须确保你已经安装了用户主题拓展。 + +在XFCE一样,用户将会去搜索并下载自己喜欢的主题,然后,用户可以重新使用GNOME Tweak tool,并点击该工具界面左边的Appearance按钮,接着用户便可以简单的通过点击相应的按钮并选择自己已经下载好的主题来使用自己的主题,当一切都完成之后,用户将会看到一个告诉用户已经成功应用了主题的对话框,这样,你的主题便已经安装完成。对于这一点,用户可以简单的使用滚动条来选择他们想要的主题。和XFCE一样,主题激活的过程也是十分简单的,然而,对于因为要使用一个新的主题而下载一个不被包含的应用的需求也是需要考虑的。 + +最后,就是KDE桌面主题定制的过程了。和XFCE一样,不需要去下载额外的工具来安装主题。从这点来看,让人有种XFCE必将使KDE成为最后的赢家的感觉。不仅在KDE上可以完全使用图形用户界面来安装主题,而且甚至只需要用户点击获取新主题的按钮就可以定位,查看,并且最后自动安装新的主题。 + +然而,我们不应该认为KDE相比XFCE是一个更加稳定的桌面环境。因此,现在正是我们思考为什么一些额外的功能可能会从桌面环境中移除来达到最小化的目的。为此,我们都必须为拥有这样出色的功能而给予KDE更多的支持。 + +### MATE不是一个轻量级的桌面环境 ### +在继续比较XFCE,GNOME3和KDE之前,必须对这方面的老手作一个事先说明,我们不会将MATE桌面环境加入到我们的比较中。MATE可被认为是GNOME2的另一个衍生品,但是它并没有声称是作为一款轻量级或者快捷桌面。相反,它的主要目的是成为一款更加传统和舒适的桌面环境,并使它的用户感觉就像在家里使用它一样。 + +另一方面,XFCE生来就是要实现他自己的一系列使命。XFCE给它的用户提供一个更加轻量级的桌面环境,至今仍然有着吸引人的桌面视觉体验。然后,对于一些认为MATE也是一款轻量级的桌面环境的人来说,其实MATE真正的目标并不是成为一款轻量级的桌面环境。这两个选择在各自安装了一款好的主题之后看起来都会让人觉得非常具有吸引力。 + +### 桌面导航 ### +XFCE在窗口之外提供了一个显眼的导航器。任何使用过传统的windows或者GNOME 2/MATE桌面环境的用户都可以在没有任何帮助的情况下自如的使用新安装的XFCE桌面环境的导航器。紧接着,添加小程序到面板中也是很明显的。和找到已经安装的应用程序一样,直接使用启动器并点击你想要运行的应用程序图标。除了LXDE和MATE之外,还没有其他的桌面的导航器可以做到如此简单。不仅如此,更加简单的是对控制面板的使用,对于刚刚使用这个新桌面的每个用户来说这是一个非常大的好处。如果用户更喜欢通过老式的方法去使用他们的桌面,对于GNOME来说,这不是一个问题。和没有最小化按钮形成的用户关注热点一样,加上其他应用布局方法,这将使新用户更加容易习惯这个风格设计。 + +如果用户来自windows桌面环境,那么这些用户将要放弃这些习惯,因为,他们将不能简单的通过鼠标右击一下就可以将一个小程序添加到他们的工作空间的顶部。与此相反,它可以通过使用拓展来实现。GNOME中的KDE拓展是可用的,并且是非常的容易,这些容易之处体现在只需要用户简单的使用位于GNOME拓展页面上的on/off开关。用户必须清楚,只能通过访问该页面才能使用这个功能。 + +另一方面,GNOME正在它的外观中体现它的设计理念,即为用户提供一个直观和易用的控制面板。你可能认为那并不是什么大事,但是,在我看来,它确实是我认为值得称赞并且有必要被提及的方面。KDE提供给它的用户大量传统的桌面使用体验,并通过提供相似的启动器和一种更加类似的获取软件的方式的能力来迎合来自windows的用户。添加小图标或者小程序到KDE桌面是件非常简单的事情,只需要在桌面的底部右击即可。只有在KDE的使用中才会存在的的问题,对于KDE用户寻找的很多KDE的特性实际上都是隐藏的。KDE的用户可能会指责这我的观点,但我仍然坚持我的说法。 + +为了增加小部件,仅仅在我的面板上右击就可以看见面板选项,但是并不是安装小部件的一个快速的方法。通常在你选择面板选项之前你都不会看到添加的小部件,然后,就添加小部件吧。这对我来说不是个问题,但是后来对于一些用户来说,它变成了不必要的困惑。而使事情变得更加复杂,用户管理定位部件区域后,他们后来发现一种称为“Activities”的品牌新术语。在同一地区的小部件,但它是在自己的领域是什么。 + +现在请不要误解我,KDE中的活动特性是很不错的,也是很有价值的,但是从可用性的角度看,为了不让新手感到困惑,它更加适合于应用在另一个目录选项。欢迎来自用户的分歧,,但为了测试这个新手对一些长时间的可以一遍又一遍的证明它是正确的。责骂放在一边,KDE添加新部件的方法的确很棒。与KDE的主题一样,用户不能通过使用提供的图形用户界面浏览和自动安装部件。这是一个神奇的功能,也可以是这样的方式去庆祝。KDE的控制面板可能和用户希望的样子不一样,它不是足够的简单。但是有一点很清楚,这将是他们致力于改进的地方。 + +### 因此,XFCE是最好的桌面环境,对吗? ### +我在我的计算机上使用GNOME,KDE,并在我的办公室和家里的电脑上使用Xfce。我也有一些老机器在使用Openbox和LXDE。每一个使用桌面的经验都可以给我提供一些有用的东西,可以帮助我使用每台机器,因为我认为它是合适的。对我来说,在我的心里有一个柔软的地方,因为Xfce作为一个桌面环境,我坚持使用了很多年。但在这篇文章中,我只是在写我使用电脑的日常,事实上,它是GNOME。 +这篇文章的主要思想是我还是觉得Xfce能提供好一点的用户体验,对于那些正在寻找稳定的、传统的、容易理解的桌面环境的用户来说,XFCE是理想的。欢迎您在评论部分和我们分享你的意见。 +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/kde-vs-gnome-vs-xfce-desktop/ + +作者:[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/ From a7b5995b2cef1609f1b23b07bffd0a6124368158 Mon Sep 17 00:00:00 2001 From: Bestony Date: Sat, 9 Jan 2016 22:13:51 +0800 Subject: [PATCH 0809/1710] Delete 20151012 Remember sed and awk All Linux admins should.md --- ...ber sed and awk All Linux admins should.md | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 sources/tech/20151012 Remember sed and awk All Linux admins should.md 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 deleted file mode 100644 index 6f1aba9ed8..0000000000 --- a/sources/tech/20151012 Remember sed and awk All Linux admins should.md +++ /dev/null @@ -1,61 +0,0 @@ -translating By Bestony -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/ From d52c8bcd144a43582e9f1f6489ced36af6148916 Mon Sep 17 00:00:00 2001 From: Bestony Date: Sat, 9 Jan 2016 22:14:56 +0800 Subject: [PATCH 0810/1710] Create 20151012 Remember sed and awk All Linux admins should.md --- ...ber sed and awk All Linux admins should.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 translated/tech/20151012 Remember sed and awk All Linux admins should.md diff --git a/translated/tech/20151012 Remember sed and awk All Linux admins should.md b/translated/tech/20151012 Remember sed and awk All Linux admins should.md new file mode 100644 index 0000000000..7117e9f06d --- /dev/null +++ b/translated/tech/20151012 Remember sed and awk All Linux admins should.md @@ -0,0 +1,69 @@ + +# 学会Sed和Awk? 所有的Linux管理员都应该会的技能 + +![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) + +图片来源: Shutterstock + +**我们不希望下一代Linux和Unix的管理员忘记任何初始化脚本和基本工具的好处** + +我曾经有一次在Reddit发表文章的机会, [asking about textfile manipulation][1].这是一个很简单请求,就像我们平时常用Unix的人所见到的。他的问题是,如何删除文件中的重复行,并保存在独立的实例里。 这听起来似乎很简单,但是当文件足够大时,就会有些复杂。 + +这个问题有很多种不同的答案。我怀疑你可以使用几乎任何一种语言来写这样的一个脚本,只是时间的投入和代码的复杂性不同罢了。根据你的个人水平,它大概会花费20-60分钟。但是如果你使用了Perl,Python,Ruby中的一种,你可能很快实现它。 + +或者你可以使用下面的一个方法,让你无比暖心的: 只用 awk. + +这个答案是迄今为止最简明、最简单的解决问题的方法。他只要一行: + +``` +awk '!seen[$0]++' . +``` + +让我们来分析一下 + +在这段代码中,其实隐藏了很多代码。AWK是一种文本处理语言,并且他内部做了大量的假设。首先,你看到的实际上是一个循环的结果。Awk假定你想通过循环输入文件的每一行,所以你不需要明确的去设定它。Awk还假定了你需要打印数据的输出,所以你也不需要去指定它。最好,Awk假定循环在最后一句话执行完结束,这一块也不再需要你去指定它 + +这个例子中看到的字符串是一个关联的数组的名字。$0是一个变量,表示当前行的全部。所以,这个命令翻译成话就是“对这个文件的每一行进行检查,如果你之前没有见过他,就打印出来。”Awk通过做这些来看这个数组是否早已存在或值不相等的,这样就不匹配参数,下次就不会再打印了。 + +一些人认为这样是优雅的,另外的人认为这可能会造成混淆。任何在日常基础事情上使用Awk的都是第一类人。Awk就是被设计做这个的。在Awk中,你可以写多行。甚至是一些复杂的功能。你甚至可以[用awk写一些让人不安的复杂功能][2]。但,最终,Awk还是一个通过管道进行文字处理的程序。去除循环定义的外部缺陷是很常见的用法,你可以用下面的代码做同样的事情 + + + +``` +awk '{ if (!seen[$0]) print $0; seen[$0]++ }’ +``` + +这必将导致相同的结果 + +Awk是完成这项工作的完美工具。不过,我相信很多管理员--特别是新管理员会跳转到[Bash][ 3 ]或Python来完成这一任务,因为Awk的知识和他所能做的事情总是随着时间而褪色。我认为这是一个标识性的事情。几十年来,以前的解决方案总是缺乏对新的问题的处理方法 + +The shell, grep, sed, and awk 是Unix的计算基础.如果你不能非常轻松的使用他们,你将会变得十分脆弱。因为他们通过命令行和脚本的相互作用来实现。学习这些工具如何工作最好的方法之一就是观察和正在运行的范例一起工作,通过Unix系统特有的Init系统,或者在Linux发行版被称为 [systemd][4]. + +数以百万计的Unix管理员了解Shell脚本和Unix工具同读、写、修改和研究Init脚本。不同系统的Init脚本有很大不同,甚至是不同的发行版。但是他们都源自sh,而且他他们都用核心命令行工具像sed,awk还有grep + +我每天都会挺到很多抱怨init脚本太“古老”而且很“难”。但是实际上,Init脚本和Unix管理员每天使用的工具一样,而且还提供了一个非常好的方式来更加熟悉和习惯这些工具。说Init脚本难的应该承认,你缺乏对Unix基础工具的熟悉。 + +说起在Reddit上的事情,我也碰到过这个问题,从一个初露头角的Linux系统管理员, [问他是否应该去学Sysvinit][5]. 大多数的答案都是好的方向--是的,应该学习sysvinit和systemd.一位评论者甚至指出,Init脚本是学习Bash的好方法。而另一个国家50强的公司不会搬到一个以系统为基础的发行版 + +但是,这提醒了我这是一个问题。如果我们继续沿着消除脚本和脱离我们操作系统的系统核心组件。由于出现的太少,我们将会不经意间的使新的管理员学习基本的Unix工具变得更难 + +我不知道为什么有些人想掩盖Unix内核抽象化和反抽象化,但是这样的一条路径可以减少一代Unix管理员出事后对服务支持的依赖。我相信这不是一件好事情。 + +------ + +via: http://www.infoworld.com/article/2985804/linux/remember-sed-awk-linux-admins-should.html + +作者:[Paul Venezia][a] + +译者:[Bestony](https://github.com/Bestony) + +校对:[校对者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/ From 0bbb5b3e4694dc16d5ed558a7954adf85e154561 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Sat, 9 Jan 2016 22:19:30 +0800 Subject: [PATCH 0811/1710] delete sf by sg --- .../20151229 Grub 2--Heal your bootloader.md | 236 ------------------ 1 file changed, 236 deletions(-) delete mode 100644 sources/tech/20151229 Grub 2--Heal your bootloader.md diff --git a/sources/tech/20151229 Grub 2--Heal your bootloader.md b/sources/tech/20151229 Grub 2--Heal your bootloader.md deleted file mode 100644 index 19fcca7d08..0000000000 --- a/sources/tech/20151229 Grub 2--Heal your bootloader.md +++ /dev/null @@ -1,236 +0,0 @@ -翻译中。。。。。 -Grub 2: Heal your bootloader -================================================================================ -**There are few things as irritating as a broken bootloader. Get the best out of Grub 2 and keep it shipshape.** - -Why do this? - -- Grub 2 is the most popular bootloader that’s used by almost every Linux distribution. -- A bootloader is a vital piece of software, but they are susceptible to damage. -- Grub 2 is an expansive and flexible boot loader that offers various customisable options. - -The Grub 2 Linux bootloader is a wonderful and versatile piece of software. While it isn’t the only bootloader out there, it’s the most popular and almost all the leading desktop distros use it. The job of the Grub bootloader is twofold. First, it displays a menu of all installed operating systems on a computer and invites you to pick one. Second, Grub loads the Linux kernel if you choose a Linux operating system from the boot menu. - -As you can see, if you use Linux, you can’t escape the bootloader. Yet it’s one the least understood components inside a Linux distro. In this tutorial we’ll familiarise you with some of Grub 2’s famed versatility and equip you with the skills to help yourself when you have a misbehaving bootloader. - -The most important parts of Grub 2 are a bunch of text files and a couple of scripts. The first piece to know is **/etc/default/grub**. This is the text file in which you can set the general configuration variables and other characteristics of the Grub 2 menu (see box titled “Common user settings”). - -The other important aspect of Grub 2 is the **/etc/grub.d** folder. All the scripts that define each menu entry are housed there. The names of these scripts must have a two-digit numeric prefix. Its purpose is to define the order in which the scripts are executed and the order of the corresponding entries when the Grub 2 menu is built. The **00_header** file is read first, which parses the **/etc/default/grub** configuration file. Then come the entries for the Linux kernels in the **10_linux** file. This script creates one regular and one recovery menu entry for each kernel in the default **/boot** partition. - -This script is followed by others for third-party apps such as **30_os-prober** and **40_custom**. The **os-prober** script creates entries for kernels and other operating systems found on other partitions. It can recognise Linux, Windows, BSD and Mac OS X installations. If your hard disk layout is too exotic for the **os-prober** script to pick up an installed distro, you can add it to the **40_custom** file (see the “Add custom entries” box). - -**Grub** 2 does not require you to manually maintain your boot options’ configuration file: instead it generates the **/boot/grub/grub.cfg** file with the **grub2-mkconfig** command. This utility will parse the scripts in the **/etc/grub.d** directory and the **/etc/default/grub** settings file to define your setup. - -Graphical boot repair - -A vast majority of Grub 2 issues can easily be resolved with the touch of a button thanks to the Boot Repair app. This nifty little application has an intuitive user interface and can scan and comprehend various kinds of disk layouts and partitioning schemes, and can sniff out and correctly identify operating system installations inside them. The utility works on traditional computers with a Master Boot Record (MBR) as well as the newer UEFI computers with the UID Partition Table (GPT) layout. - -The easiest way to use Boot Repair is to install it inside a Live Ubuntu session. Fire up an Ubuntu Live distro on a machine with a broken bootloader and install Boot Repair by first adding its PPA repository with - - sudo add-apt-repository ppa:yannubuntu/Boot Repair - -Then refresh the list of repositories with - - sudo apt-get update - -before installing the app with - - sudo apt-get install -y Boot Repair - -Fire up the tool once it’s installed. The app will scan your hard disk before displaying its interface, which is made up of a couple of buttons. To follow the advice of the tool, simply press the Recommended Repair button, which should fix most broken bootloaders. After it’s restored your bootloader, the tool also spits out a small URL which you should note. The URL contains a detailed summary of your disks, including your partitions along with the contents of important Grub 2 files including **/etc/default/grub** and **boot/grub/grub.cfg**. If the tool hasn’t been able to fix your bootloader, you can share the URL on your distro’s forum boards to allow others to understand your disk layout and offer suggestions. - -![](http://www.linuxvoice.com/wp-content/uploads/2015/10/boot-repair-large.jpg) - -**Boot Repair also lets you customise Grub 2’s options.** - -#### Bootloader bailout #### - -Grub 2 boot problems can leave the system in several states. The text on the display where you’d expect the bootloader menu gives an indication of the current state of the system. If the system stops booting at the **grub>** prompt, it means the Grub 2 modules were loaded but it couldn’t find the **grub.cfg** file. This is the full Grub 2 command shell and you can do quite a bit here to help yourself. If you see the **grub rescue>** prompt, it means that the bootloader couldn’t find the Grub 2 modules nor could it find any of your boot files. However, if your screen just displays the word ‘GRUB’, it means the bootloader has failed to find even the most basic information that’s usually contained in the Master Boot Record. - -You can correct these Grub failures either by using a live CD or from Grub 2’s command shell. If you’re lucky and your bootloader drops you at the **grub>** prompt, you have the power of the Grub 2 shell at your disposal to correct any errors. - -The next few commands work with both **grub>** and **grub rescue>**. The **set pager=1** command invokes the pager, which prevents text from scrolling off the screen. You can also use the **ls** command which lists all partitions that Grub sees, like this: - - grub> ls - (hd0) (hd0,msdos5) (hd0,msdos6) (hd1,msdos1) - -As you can see, the command also lists the partition table scheme along with the partitions. - -You can also use the **ls** command on each partition to find your root filesystem: - - grub> ls (hd0,5)/ - lost+found/ var/ etc/ media/ bin/ initrd.gz - boot/ dev/ home/ selinux/ srv/ tmp/ vmlinuz - -You can drop the **msdos** bit from the name of the partition. Also, if you miss the trailing slash and instead say **ls (hd0,5)** you’ll get information about the partition including its filesystem type, total size, and last modification time. If you have multiple partitions, read the contents of the **/etc/issue** file with the **cat** command to identify the distro, such as **cat (hd0,5)/etc/issue**. - -Assuming you find the root filesystem you’re looking for inside **(hd0,5)**, make sure that it contains the /**boot/grub** directory and the Linux kernel image you wish to boot into, such as **vmlinuz-3.13.0-24-generic**. Now type the following: - - grub> set root=(hd0,5) - grub> linux /boot/vmlinuz-3.13.0-24-generic root=/dev/sda5 - grub> initrd /boot/initrd.img-3.13.0-24-generic - -The first command points Grub to the partition housing the distro we wish to boot into. The second command then tells Grub the location of the kernel image inside the partition as well as the location of the root filesystem. The final line sets the location of the initial ramdisk file. You can use tab autocompletion to fill in the name of the kernel and the initrd, which will save you a lot of time and effort. - -Once you’ve keyed these in, type **boot** at the next **grub>** prompt and Grub will boot into the specified operating system. - -Things are a little different if you’re at the **grub rescue>** prompt. Since the bootloader hasn’t been able to find and load any of the required modules, you’ll have to insert them manually: - - grub rescue> set root=(hd0,5) - grub rescue> insmod (hd0,5)/boot/grub/normal.mod - grub rescue> normal - grub> insmod linux - -As you can see, just like before, after we use the **ls** command to hunt down the Linux partition, we mark it with the **set** command. We then insert the **normal** module, which when activated will return us to the standard **grub>** mode. The next command then inserts the linux module in case it hasn’t been loaded. Once this module has been loaded you can proceed to point the boot loader to the kernel image and initrd files just as before and round off the procedure with the **boot** command to bring up the distro. - -Once you’ve successfully booted into the distro, don’t forget to regenerate a new configuration file for Grub with the - - grub-mkconfig -o /boot/grub/grub.cfg - -command. You’ll also have to install a copy of the bootloader into the MBR with the - - sudo grub2-install /dev/sda - -command. - -![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cfg-large.jpg) - -**To disable a script under the /etc/grub.d, all you need to do is remove the executable bit, for example with chmod -x /etc/grub.d/20_memtest86+ which will remove the ‘Memory Test’ option from the menu.** - -### Grub 2 and UEFI ### - -UEFI-enabled machines (more or less, any machine sold in the last couple of years) have added another layer of complexity to debugging a broken **Grub 2** bootloader. While the procedure for restoring a **Grub 2** install on a UEFI machine isn’t much different than it is on a non-UEFI machine, the newer firmware handles things differently, which results in mixed restoration results. - -On a UEFI-based system, you do not install anything in the MBR. Instead you install a Linux EFI bootloader in the EFI System Partition (ESP) and set it as the EFI’s default boot program using a tool such as **efibootmgr** for Linux, or **bcdedit** for Windows. - -As things stand now, the Grub 2 bootloader should be installed properly when installing any major desktop Linux distro, which will happily coexist with Windows 8. However, if you end up with a broken bootloader, you can restore the machine with a live distro. When you boot the live medium, make sure you boot it in the UEFI mode. The computer’s boot menu will have two boot options for each removable drive – a vanilla option and an option tagged with UEFI. Use the latter to expose the EFI variables in **/sys/firmware/efi/**. - -From the live environment, mount the root filesystem of the broken installation as mentioned in the tutorial. You’ll also have to mount the ESP partition. Assuming it’s **/dev/sda1**, you can mount it with - - sudo mount /dev/sda1 /mnt/boot/efi - -Then load the **efivars** module with **modprobe efivars** before chrooting into the installed distribution as shown in the tutorial. - -Here on, if you’re using Fedora, reinstall the bootloader with the - - yum reinstall grub2-efi shim - -command followed by - - grub2-mkconfig -o /boot/grub2/grub.cfg - -to generate the new configuration file. Ubuntu users can do this with - - apt-get install --reinstall grub-efi-amd64 - -With the bootloader in place, exit chroot, unmount all partitions and reboot to the Grub 2 menu. - -#### Dude, where’s my Grub? #### - -The best thing about Grub 2 is that you can reinstall it whenever you want. So if you lose the Grub 2 bootloader, say when another OS like Windows replaces it with its own bootloader, you can restore Grub within a few steps with the help of a live distro. Assuming you’ve installed a distro on **/dev/sda5**, you can reinstall Grub by first creating a mount directory for the distro with - - sudo mkdir -p /mnt/distro - -and then mounting the partition with - - mount /dev/sda5 /mnt/distro - -You can then reinstall Grub with - - grub2-install --root-directory=/mnt/distro /dev/sda - -This command will rewrite the MBR information on the **/dev/sda** device, point to the current Linux installation and rewrite some Grub 2 files such as **grubenv** and **device.map**. - -Another common issue pops up on computers with multiple distros. When you install a new Linux distro, its bootloader should pick up the already installed distros. In case it doesn’t, just boot into the newly installed distro and run - - grub2-mkconfig - -Before running the command, make sure that the root partitions of the distros missing from the boot menu are mounted. If the distro you wish to add has **/root** and **/home** on separate partitions, only mount the partition that contains /root, before running the **grub2-mkconfig** command. - -While Grub 2 will be able to pick most distros, trying to add a Fedora installation from within Ubuntu requires one extra step. If you’ve installed Fedora with its default settings, the distro’s installer would have created LVM partitions. In this case, you’ll first have to install the **lvm2** driver using the distro’s package management system, such as with - - sudo apt-get install lvm2 - -before Grub 2’s **os-prober** script can find and add Fedora to the boot menu. - -### Common user settings ### - -Grub 2 has lots of configuration variables. Here are some of the common ones that you’re most likely to modify in the **/etc/default/grub** file. The **GRUB_DEFAULT** variable specifies the default boot entry. It will accept a numeric value such as 0, which denotes the first entry, or “saved” which will point it to the selected option from the previous boot. The **GRUB_TIMEOUT** variable specifies the delay before booting the default menu entry and the **GRUB_CMDLINE_LINUX** variable lists the parameters that are passed on the kernel command line for all Linux menu entries. - -If the **GRUB_DISABLE_RECOVERY** variable is set to **true**, the recovery mode menu entries will not be generated. These entries boot the distro into single-user mode from where you can repair your system with command line tools. Also useful is the **GRUB_GFXMODE** variable, which specifies the resolution of the text shown in the menu. The variable can take any value supported by your graphics card. - -![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cli-large.jpg) - -**Grub 2 has a command line, which you can invoke by pressing C at the bootloader menu.** - -#### Thorough fix #### - -If the **grub2-install** command didn’t work for you, and you still can’t boot into Linux, you’ll need to completely reinstall and reconfigure the bootloader. For this task, we’ll use the venerable **chroot** utility to change the run environment from that of the live CD to the Linux install we want to recover. You can use any Linux live CD for this purpose as long as it has the **chroot** tool. However, make sure the live medium is for the same architecture as the architecture of the installation on the hard disk. So if you wish to **chroot** to a 64-bit installation you must use an amd64 live distro. - -After you’ve booted the live distro, the first order of business is to check the partitions on the machine. Use **fdisk -l** to list all the partitions on the disk and make note of the partition that holds the Grub 2 installation that you want to fix. - -Let’s assume we wish to restore the bootloader from the distro installed in **/dev/sda5**. Fire up a terminal and mount it with: - - sudo mount /dev/sda5 /mnt - -Now you’ll have to bind the directories that the Grub 2 bootloader needs access to in order to detect other operating systems: - - $ sudo mount --bind /dev /mnt/dev - $ sudo mount --bind /dev/pts /mnt/dev/pts - $ sudo mount --bind /proc /mnt/proc - $ sudo mount --bind /sys /mnt/sys - -We’re now all set to leave the live environment and enter into the distro installed inside the **/dev/sda5** partition via **chroot**: - - $ sudo chroot /mnt /bin/bash - -You’re now all set to install, check, and update Grub. Just like before, use the - - sudo grub2-install /dev/sda - -command to reinstall the bootloader. Since the **grub2-install** command doesn’t touch the **grub.cfg** file, we’ll have to create it manually with - - sudo grub-mkconfig -o /boot/grub/grub.cfg - -That should do the trick. You now have a fresh copy of Grub 2 with a list of all the operating systems and distros installed on your machine. Before you can restart the computer, you’ll have to exit the chrooted system and unmount all the partitions in the following order: - - $ exit - $ sudo umount /mnt/sys - $ sudo umount /mnt/proc - $ sudo umount /mnt/dev/pts - $ sudo umount /mnt/dev - $ sudo umount /mnt - -You can now safely reboot the machine, which should be back under Grub 2’s control, and the bootloader under yours! - -### Add custom entries ### - -If you wish to add an entry to the bootloader menu, you should add a boot stanza to the **40_custom** script. You can, for example, use it to display an entry to boot a Linux distro installed on a removable USB drive. Assuming your USB drive is **sdb1**, and the vmlinuz kernel image and the initrd files are under the root (/) directory, add the following to the **40_custom** file: - - menuentry “Linux on USB” { - set root=(hd1,1) - linux /vmlinuz root=/dev/sdb1 ro quiet splash - initrd /initrd.img - } - -For more accurate results, instead of device and partition names you can use their UUIDs, such as - - set root=UUID=54f22dd7-eabe - -Use - - sudo blkid - -to find the UUIDs of all the connected drives and partitions. You can also add entries for any distros on your disk that weren’t picked up by the os-prober script, as long as you know where the distro’s installed and the location of its kernel and initrd image files. - --------------------------------------------------------------------------------- - -via: https://www.linuxvoice.com/grub-2-heal-your-bootloader/ - -作者:[Mayank Sharma][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linuxvoice.com/author/mayank/ From eee30717f4da23489fbf9ba02a4e34eef4dfe796 Mon Sep 17 00:00:00 2001 From: soooogreen <54364732@qq.com> Date: Sat, 9 Jan 2016 22:21:10 +0800 Subject: [PATCH 0812/1710] done by sg --- .../20151229 Grub 2--Heal your bootloader.md | 235 ++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 translated/tech/20151229 Grub 2--Heal your bootloader.md diff --git a/translated/tech/20151229 Grub 2--Heal your bootloader.md b/translated/tech/20151229 Grub 2--Heal your bootloader.md new file mode 100644 index 0000000000..f9005762b6 --- /dev/null +++ b/translated/tech/20151229 Grub 2--Heal your bootloader.md @@ -0,0 +1,235 @@ +Grub 2:拯救你的 bootloader +================================================================================ +**没什么事比 bootloader 坏掉更让气人的了。充分发挥 Grub 2 的作用,让 bootloader 安分工作吧。** + +为什么这么说? + +- Grub 2 是最受欢迎的 bootloader ,受用于几乎所有 Linux 发行版。 +- bootloader 是一个至关重要的软件,但是非常容易损坏。 +- Grub 2 是具有扩展性和灵活性一款引导加载程序,提供了大量可定制选项。 + +Grub 2 是一款精彩的功能强大的软件。它不是 bootloader 界一枝独秀,但却最受欢迎,几乎所有主要的桌面发行版都在使用它。 Grub 的工作有两个。首先,它用一个菜单展示计算机上所有已经安装的操作系统供你选择。然后,当你从启动菜单中选择了一个 Linux 操作系统, Grub 便加载这个 Linux 的内核。 + +你知道,如果使用 Linux ,你就离不开 bootloader 。然而它却是 Linux 发行版内部最鲜为人知的部分。在这个教程里,我们将带你熟悉 Grub 2 一些著名的特性,强化你相关技能,使你在 bootloader 跑飞的时候能够自行处理。 + +Grub 2 最重要的特色在于大量的 text 格式文件和两个脚本文件。首先需要了解的是 **/etc/default/grub** 。这是一个 text 文件,你可以在里面设置通用配置变量和 Grub 2 菜单(见标题为 “Common user settings(普通用户设置)” 的窗口)的其它特性。 + +Grub 2 另一个重要的特点在于 **/etc/grub.d** 文件夹。定义菜单入口的所有脚本都放置在这里。这些脚本的名称必须有两位的数字前缀。其目的是,在构建 Grub 2 菜单时定义脚本的执行顺序以及相应入口的顺序。文件 **00_header** 首先被读取,负责解析 **/etc/default/grub** 配置文件。然后是 Linux 内核的入口,位于 **10_linux** 文件中。这个脚本在默认的 **/boot** 分区为每个内核创建一个正规菜单入口和一个恢复菜单入口。 + +紧接着的是为第三方应用所用的脚本,如 **30_os-prober** 和 **40_custom** 。 **os-prober** 脚本为内核和其它分区里的操作系统创建入口。它能识别 Linux、 Windows、 BSD 以及 Mac OS X 的装置(译注,指 bootloader )。 如果你的硬盘设计比较独特,使得 **os-prober** 无法捕获已经安装的发行版,你可以在 **40_custom** 文件(见 “Add custom entries(添加定制入口)”窗口)中添加入口。 + +**Grub** 2 不需要你手动维护你的启动选项的配置文件:取而代之的是使用 **grub2-mkconfig** 命令产生 **/boot/grub/grub.cfg** 文件。这个功能会解析 **/etc/grub.d** 目录中的脚本以及 **/etc/default/grub** 设置文件来定义你的安装。 + +图形化引导修复 + +多亏了 Boot Repair 应用,只需要点击按钮,Grub 2 许许多多的问题都能轻易解决。这个小巧的应用有一个直观的用户界面,可以扫描并包含多种硬盘设计和分区方案,还能发现并正确识别里面的操作系统的装置(译注,指 bootloader )。这个应用可以以主引导记录 (MBR)形式存在于传统计算机里,也可以在新型 UEFI 计算机中以 GUID(译改,应为GUID)分区表布局方式工作。 + +Boot Repair 最简单的使用方式是在 Live Ubuntu 会话中安装。在机器上用一个坏的 bootloader 启动 Ubuntu Live 发行版,通过首次添加它的 PPA 版本库,安装 Boot Repair ,命令如下 + + sudo add-apt-repository ppa:yannubuntu/Boot Repair + +然后刷新版本库列表,使用 + + sudo apt-get update + +安装应用(译改,删了 before ),如下 + + sudo apt-get install -y Boot Repair + +安装完毕立刻启动应用。在显示它的界面(由一对按键组成)之前将会扫描你的硬盘。根据工具的指示,只需按下 Recommended Repair(推荐修复)按钮,即可修复大部分坏掉的 bootloader 。修复 bootloader 之后,这个工具会输出一串短小的 URL ,你应该把它记录下来。这个 URL 包含了硬盘详尽的信息:分区信息以及 Grub 2 重要的文件(如 **/etc/default/grub** 和 **boot/grub/grub.cfg** )的内容。如果工具不能解决 bootloader 的问题,可以把你这个 URL 共享在你的发行版的论坛公告牌上,让其他人分析你的硬盘设计以便给你建议。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/boot-repair-large.jpg) + +**Boot Repair 同样支持定制 Grub 2 的选项。** + +#### Bootloader 急救 #### + +Grub 2 引导问题会导致系统处于几种不同状态。屏幕(如你所想,本该显示 bootloader 菜单的地方)所展示的文本,指示系统的当前状态。如果系统中止于 **grub>** 提示符,表明 Grub 2 模块已经被加载,但是找不到 **grub.cfg** 文件。当前是全 Grub 2 命令shell,你可以通过多种方式解决此问题。如果你看到的是 **grub rescue>** 提示符,表明 bootloader 不能找到 Grub 2 模块或者找不到任何引导文件( boot files )。然而,如果你的屏幕只显示 ‘GRUB’ 一词,表明 bootloader 找不到通常位于主引导记录( Master Boot Record )里的最基本的信息。 + +你可以通过使用 live CD 或者在 Grub 2 shell中修正此类错误。如果你够幸运, bootloader 中止于 **grub>** 提示符,你将能获得 Grub 2 shell 的支配权,来帮助你排错。 + +接下来几个命令工作在 **grub>** 和 **grub rescue>** 提示符下。 **set pager=1** 命令产生分页器( pager ),防止文本在屏幕上被刷掉。你还可以使用 **ls** 命令列出 Grub 识别的分区,如下: + + grub> ls + (hd0) (hd0,msdos5) (hd0,msdos6) (hd1,msdos1) + +如你所见,这个命令列出分区的同时一并列出了分区表计划。 + +你还可以在每个分区上面使用 **ls** 来查找根文件系统: + + grub> ls (hd0,5)/ + lost+found/ var/ etc/ media/ bin/ initrd.gz + boot/ dev/ home/ selinux/ srv/ tmp/ vmlinuz + +你可以不写上分区名的 **msdos** 位。同样,如果你忘记尾斜杠( the trailing slash )只输入 **ls (hd0,5)** ,那你将获得分区的信息比如文件系统类型,总体大小和最后修改时间。如果你有多个分区,可以使用 **cat** 读取 **/etc/issue** 文件中的内容,来确定发行版,格式如 **cat (hd0,5)/etc/issue** 。 + +假设你在 **(hd0,5)** 中找到根文件系统,请确保它包含 /**boot/grub** 目录,以及你想引导进入的内核镜像,如 **vmlinuz-3.13.0-24-generic** 。此时输入以下命令: + + grub> set root=(hd0,5) + grub> linux /boot/vmlinuz-3.13.0-24-generic root=/dev/sda5 + grub> initrd /boot/initrd.img-3.13.0-24-generic + +第一个命令把 Grub 指向我们想引导进入的发行版所在的分区。接着第二个命令告知 Grub 内核镜像在分区中的位置,以及根文件系统的位置。最后一行设置虚拟文件系统( initial ramdisk )文件的位置。你可以使用 tab 补全功能补全内核名字和虚拟文件系统( initrd: initial ramdisk )名字,节省时间和精力。 + +输入完毕,在下一个 **grub>** 提示符后输入 **boot** , Grub 将会引导进入指定的操作系统。 + +在 **grub rescue>** 提示符下,情况会有些许不同。因为 bootloader 未能够找到并加载任何必需的模块,你需要手动添加这些模块: + + grub rescue> set root=(hd0,5) + grub rescue> insmod (hd0,5)/boot/grub/normal.mod + grub rescue> normal + grub> insmod linux + +如上所示,跟之前一样,使用 **ls** 命令列出所有分区之后,使用 **set** 命令标记起来。然后添加 **normal** 模块,此模块激活时将会恢复标准 **grub>** 模式。如果 linux 模块没加载,接下来的命令会进行添加。如果这个模块已经加载,你可以跟之前一样,把引导加载程序指向内核镜像和虚拟文件系统( initrd )文件,然后使用 **boot** 启动发行版,完美收官。 + +一旦成功启动发行版,别忘了为 Grub 重新产生新的配置文件,使用 + + grub-mkconfig -o /boot/grub/grub.cfg + +命令。你还需要往 MBR 里安装一份 bootloader 的拷贝,使用 + + sudo grub2-install /dev/sda + +命令。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cfg-large.jpg) + +**想要禁能 /etc/grub.d 目录下的脚本,你只需移除可执行位,比如使用 chmod -x /etc/grub.d/20_memtest86+ 就能将 ‘Memory Test’ 选项从菜单中移除。** + +### Grub 2 和 UEFI ### + +支持UEFI的机器(最近几年上市的机器大部分都是)添加了另一复杂的层次,用以调试坏掉的 **Grub 2**。恢复 **Grub 2** 的程序在 UEFI 机器上安装和在非 UEFI 机器上安装并没多大区别,只是新程序处理方式不一样,从而导致了很多种恢复结果。 + +对于基于 UEFI 的系统,不要在 MBR上安装任何东西。相反,你要在 EFI 系统分区( ESP )里安装 EFI bootloader,并且借助工具把它设置为 EFI 的默认启动程序,这个工具对于 Linux 用户是 **efibootmgr** ,对于 window 用户则是 **bcdedit** 。 + +照目前情况看,在安装任何与 Windows 8 兼容的主流桌面 Linux 发行版前, Grub 2 应该完成正确安装。然而,如果 bootloader 损坏,你可以使用 live 发行版进行机器修复。在启动 live 媒介之时,请确保是以 UEFI模式启动。计算机每个可移动驱动的启动菜单将会有两个选项: vanilla 选项和以 EFI 标记的选项。使用后者开放 **/sys/firmware/efi/** 文件中的 EFI 变量。 + +在 live 环境中,挂载教程前面所提的安装失败的装置(译注,指 bootloader )的根文件系统。除此之外,还需要挂载 ESP 分区。假设分区是 **/dev/sda1** ,你可以如下所示挂载 + + sudo mount /dev/sda1 /mnt/boot/efi + +接着在 chroot 到安装完毕的发行版前之前,使用 **modprobe efivars** 加载 **efivars** 模块。 + +这个时候, Fedora 用户使用如下命令重新安装 bootloader + + yum reinstall grub2-efi shim + +在此之前,需要使用 + + grub2-mkconfig -o /boot/grub2/grub.cfg + +来产生新的配置文件。 Ubuntu 用户则改用以下命令 + + apt-get install --reinstall grub-efi-amd64 + +一旦 bootloader 正确就位,退出 chroot ,取消挂载所有分区,重启让 Grub 2 菜单显示。 + +#### 伙计,我的 Grub 哪去了? #### + +Grub 2 最好的特性是可以随时重新安装。因此,当其它像 Windows 之类的系统用自己的 bootloader 替换之,导致 Grub 2 丢失,你可以使用 live 发行版,寥寥数步即可重装 Grub 。假设你在 **/dev/sda5** 安装了一个发行版,若要重装 Grub ,你只需首先使用以下命令,为发行版创建一个挂载目录 + + sudo mkdir -p /mnt/distro + +然后挂载分区,如下 + + mount /dev/sda5 /mnt/distro + +接着就能重装 Grub 了,如下 + + grub2-install --root-directory=/mnt/distro /dev/sda + +这个命令会改写 **/dev/sda** 设备上的 MBR 信息,指向当前 Linux 的装置(译注,指 bootloader ),并改写 Grub 2 部分文件如 **grubenv** 和 **device.map** 。 + +另一个问题常见于装有多个发行版的计算机上。安装了新的 Linux 发行版,它的 bootloader 应当要能捕获所有已经安装的发行版。一旦不能够,只要引导进入新安装的发行版,并运行 + + grub2-mkconfig + +运行命令之前,请确保发行版的启动菜单中缺失的 root 分区已经完成挂载。如果你想添加的发行版有独立 **/root** 和 **/home** 分区,在运行 **grub2-mkconfig** 之前,只需挂载包含 /root 的分区。 + +虽然 Grub 2 能够捕获大部分发行版,但是在 Ubuntu 中尝试添加 Fedora 的装置(译注,指 bootloader )需要额外的一个步骤。如果你以默认设置安装了 Fedora ,则发行版的安装器(译注,同样指 bootloader )已经创建了 LVM 分区。此时你需要使用发行版的包管理系统,安装 **lvm2** 驱动,如下 + + sudo apt-get install lvm2 + +才能使得 Grub 2 的 **os-prober** 脚本能够找到并将 Fedora 添加进启动菜单。 + +### 普通用户设置 ### + +Grub 2 有很多可配置变量。 **/etc/default/grub** 文件里有很多你最可能会修改到的普通变量。 **GRUB_DEFAULT** 变量指定默认的启动入口,可以设置为数字值,比如 0 ,表示第一个入口,或者设置为 “saved” ,将它从指向上一次启动时选中的选项。 **GRUB_TIMEOUT** 变量指定启动默认菜单入口之前的停留时间。 **GRUB_CMDLINE_LINUX** 为所有 Linux 菜单入口列出在内核命令行上传递的参数。 + +如果 **GRUB_DISABLE_RECOVERY** 变量设置为 **true** ,那么将不产生恢复模式菜单入口。这些入口以单用户模式启动发行版,这种模式下允许你利用命令行工具修复系统。 **GRUB_GFXMODE** 变量同样有用,它指定了菜单上文本显示的分辨率,它可以设置为你的显卡所支持的任何数值。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cli-large.jpg) + +** Grub 2 有其命令行,通过在 bootloader 菜单上按 C 调用。** + +#### 彻底的修复 #### + +如果 **grub2-install** 命令不能正常运作,使得你无法引导进入 Linux ,你需要完整地重装以及重新配置 bootloader 。为此目的,需要用到神圣的 **chroot** 应用将 live CD 环境切换至并运行我们想修复的 Linux 的安装环境。任何拥有 **chroot** 工具的 Linux live CD 都可以实现这个目的。不过需要确保 live 媒介的架构和硬盘上系统的架构一致。因此当你希望 **chroot** 到 64 位系统,你必须使用 amd64 live 发行版。 + +启动进入 live 发行版之后,首先需要检查机器上的分区。使用 **fdisk -l** 列出磁盘上所有分区,记录你想修复的 Grub 2 装置所在的分区。 + +假设我们希望从安装在 **/dev/sda5** 中的发行版中恢复 bootloader 。启动终端使用如下命令挂载分区: + + sudo mount /dev/sda5 /mnt + +此时需要绑定 Grub 2 bootloader 需要进入的目录,以便检测其它操作系统: + + $ sudo mount --bind /dev /mnt/dev + $ sudo mount --bind /dev/pts /mnt/dev/pts + $ sudo mount --bind /proc /mnt/proc + $ sudo mount --bind /sys /mnt/sys + +此时可以离开 live 环境进入安装在 **/dev/sda5** 分区中的发行版了,通过 **chroot** : + + $ sudo chroot /mnt /bin/bash + +现在可以安装、检测、以及升级 Grub 了,跟之前一样,使用 + + sudo grub2-install /dev/sda + +命令来重装 bootloader 。因为 **grub2-install** 命令不能 创建**grub.cfg** 文件,需要手动创建,如下 + + sudo grub-mkconfig -o /boot/grub/grub.cfg + +这样应该就可以了。现在你就有了 Grub 2 的一份全新拷贝,罗列机器上所有的操作系统和发行版。在重启电脑之前,你需要依次退出 chroot 系统,卸载所有分区,如下所示: + + $ exit + $ sudo umount /mnt/sys + $ sudo umount /mnt/proc + $ sudo umount /mnt/dev/pts + $ sudo umount /mnt/dev + $ sudo umount /mnt + +现在你可以安全地重启电脑了,而它应该会回退到 Grub 2 的控制之中,而你又控制着这个 bootloader 。 + +### 添加自定义入口 ### + +如果希望往 bootloader 菜单里添加入口,你需要在 **40_custom** 文件里添加一个启动段( boot stanza )。例如,你可以使用它展示一个入口来启动安装在可移动 USB 驱动里的 Linux 发行版。假设你的 USB 驱动是 **sdb1** ,并且 vmlinuz 内核镜像和虚拟文件系统( initrd )都位于根 (/)目录下,在 **40_custom** 文件中添加以下内容: + + menuentry “Linux on USB” { + set root=(hd1,1) + linux /vmlinuz root=/dev/sdb1 ro quiet splash + initrd /initrd.img + } + +相比使用设备和分区名,使用它们的 UUID 可以获得更精确结果,比如 + + set root=UUID=54f22dd7-eabe + +使用 + + sudo blkid + +来获得所有已连接驱动和分区的 UUID 。你还可以为你磁盘上没被 os-prober 脚本捕获的发行版添加入口,只要你知道该发行版的安装位置以及其内核和虚拟文件系统( initrd )的定位即可。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxvoice.com/grub-2-heal-your-bootloader/ + +作者:[Mayank Sharma][a] +译者:[soooogreen](https://github.com/soooogreen) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linuxvoice.com/author/mayank/ From ec97b605339a26b6884ec0156a2c9c7d127cacac Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 9 Jan 2016 22:43:51 +0800 Subject: [PATCH 0813/1710] [translating]20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins --- ...Tape Managements Commands For Sysadmins.md | 122 +++++++++--------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md index ff0e0219fb..d93670e012 100644 --- a/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md +++ b/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md @@ -1,3 +1,5 @@ +alim0x translating + 15 Useful Linux and Unix Tape Managements Commands For Sysadmins ================================================================================ Tape devices should be used on a regular basis only for archiving files or for transferring data from one server to another. Usually, tape devices are all hooked up to Unix boxes, and controlled with mt or mtx. You must backup all data to both disks (may be in cloud) and tape device. In this tutorial you will learn about: @@ -62,24 +64,24 @@ Type the following commands: ## Linux (read man pages for more info) ## lsscsi lsscsi -g - + ## IBM AIX ## lsdev -Cc tape lsdev -Cc adsm lscfg -vl rmt* - + ## Solaris Unix ## cfgadm –a cfgadm -al luxadm probe iostat -En - + ## HP-UX Unix ## ioscan Cf ioscan -funC tape ioscan -fnC tape ioscan -kfC tape - + Sample outputs from my Linux server: @@ -105,26 +107,26 @@ You can set TAPE shell variable. This is the pathname of the tape drive. The def ### 1: Display status of the tape/drive ### - mt status #Use default + mt status #Use default mt -f /dev/rmt/0 status #Unix - mt -f /dev/st0 status #Linux + mt -f /dev/st0 status #Linux mt -f /dev/nsa0 status #FreeBSD - mt -f /dev/rmt/1 status #Unix unity 1 i.e. tape device no. 1 - + mt -f /dev/rmt/1 status #Unix unity 1 i.e. tape device no. 1 + You can use shell loop as follows to poll a system and locate all of its tape drives: for d in 0 1 2 3 4 5 do mt -f "/dev/rmt/${d}" status done - + ### 2: Rewinds the tape ### mt rew mt rewind mt -f /dev/mt/0 rewind mt -f /dev/st0 rewind - + ### 3: Eject the tape ### mt off @@ -132,27 +134,27 @@ You can use shell loop as follows to poll a system and locate all of its tape dr mt eject mt -f /dev/mt/0 off mt -f /dev/st0 eject - + ### 4: Erase the tape (rewind the tape and, if applicable, unload the tape) ### mt erase - mt -f /dev/st0 erase #Linux - mt -f /dev/rmt/0 erase #Unix - + mt -f /dev/st0 erase #Linux + mt -f /dev/rmt/0 erase #Unix + ### 5: Retensioning a magnetic tape cartridge ### If errors occur when a tape is being read, you can retension the tape, clean the tape drive, and then try again as follows: mt retension mt -f /dev/rmt/1 retension #Unix - mt -f /dev/st0 retension #Linux - + mt -f /dev/st0 retension #Linux + ### 6: Writes n EOF marks in the current position of tape ### mt eof mt weof mt -f /dev/st0 eof - + ### 7: Forward space count files i.e. jumps n EOF marks ### The tape is positioned on the first block of the next file i.e. tape will position on first block of the field (see fig.01): @@ -160,7 +162,7 @@ The tape is positioned on the first block of the next file i.e. tape will positi mt fsf mt -f /dev/rmt/0 fsf mt -f /dev/rmt/1 fsf 1 #go 1 forward file/tape (see fig.01) - + ### 8: Backward space count files i.e. rewinds n EOF marks ### The tape is positioned on the first block of the next file i.e. tape positions after EOF mark (see fig.01): @@ -168,27 +170,27 @@ The tape is positioned on the first block of the next file i.e. tape positions a mt bsf mt -f /dev/rmt/1 bsf mt -f /dev/rmt/1 bsf 1 #go 1 backward file/tape (see fig.01) - + Here is a list of the tape position commands: fsf Forward space count files. The tape is positioned on the first block of the next file. - + fsfm Forward space count files. The tape is positioned on the last block of the previous file. - + bsf Backward space count files. The tape is positioned on the last block of the previous file. - + bsfm Backward space count files. The tape is positioned on the first block of the next file. - + asf The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks. - + fsr Forward space count records. - + bsr Backward space count records. - + fss (SCSI tapes) Forward space count setmarks. - + bss (SCSI tapes) Backward space count setmarks. - + ### Basic backup commands ### Let us see commands to backup and restore files @@ -197,31 +199,31 @@ Let us see commands to backup and restore files tar cvf /dev/rmt/0n /etc tar cvf /dev/st0 /etc - + ### 10: To restore directory (tar format) ### tar xvf /dev/rmt/0n -C /path/to/restore tar xvf /dev/st0 -C /tmp - + ### 11: List or check tape contents (tar format) ### mt -f /dev/st0 rewind; dd if=/dev/st0 of=- - + ## tar format ## tar tvf {DEVICE} {Directory-FileName} tar tvf /dev/st0 tar tvf /dev/st0 desktop tar tvf /dev/rmt/0 foo > list.txt - + ### 12: Backup partition with dump or ufsdump ### ## Unix backup c0t0d0s2 partition ## ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s2 - + ## Linux backup /home partition ## dump 0uf /dev/nst0 /dev/sda5 dump 0uf /dev/nst0 /home - + ## FreeBSD backup /usr partition ## dump -0aL -b64 -f /dev/nsa0 /usr @@ -231,12 +233,12 @@ Let us see commands to backup and restore files ufsrestore xf /dev/rmt/0 ## Unix interactive restore ## ufsrestore if /dev/rmt/0 - + ## Linux ## restore rf /dev/nst0 ## Restore interactive from the 6th backup on the tape media ## restore isf 6 /dev/nst0 - + ## FreeBSD restore ufsdump format ## restore -i -f /dev/nsa0 @@ -244,10 +246,10 @@ Let us see commands to backup and restore files ## This will overwrite all data on tape ## mt -f /dev/st1 rewind - + ### Backup home ## tar cvf /dev/st1 /home - + ## Offline and unload tape ## mt -f /dev/st0 offline @@ -256,28 +258,28 @@ To restore from the beginning of the tape: mt -f /dev/st0 rewind tar xvf /dev/st0 mt -f /dev/st0 offline - + ### 14: Start writing after the last tar (see fig.02) ### ## This will kee all data written so far ## mt -f /dev/st1 eom - + ### Backup home ## tar cvf /dev/st1 /home - + ## Unload ## mt -f /dev/st0 offline - + ### 15: Start writing after tar number 2 (see fig.02) ### ## To wrtite after tar number 2 (should be 2+1) mt -f /dev/st0 asf 3 tar cvf /dev/st0 /usr - + ## asf equivalent command done using fsf ## mt -f /dev/sf0 rewind mt -f /dev/st0 fsf 2 - + To restore tar from tar number 2: mt -f /dev/st0 asf 3 @@ -308,28 +310,28 @@ It is important that you do regular full system restorations and service testing # Last updated on : Feb-2007 - Added support for excluding files / dirs. # ------------------------------------------------------------------------- LOGBASE=/root/backup/log - + # Backup dirs; do not prefix / BACKUP_ROOT_DIR="home sales" - + # Get todays day like Mon, Tue and so on NOW=$(date +"%a") - + # Tape devie name TAPE="/dev/st0" - + # Exclude file TAR_ARGS="" EXCLUDE_CONF=/root/.backup.exclude.conf - + # Backup Log file LOGFIILE=$LOGBASE/$NOW.backup.log - + # Path to binaries TAR=/bin/tar MT=/bin/mt MKDIR=/bin/mkdir - + # ------------------------------------------------------------------------ # Excluding files when using tar # Create a file called $EXCLUDE_CONF using a text editor @@ -338,7 +340,7 @@ It is important that you do regular full system restorations and service testing # home/vivek/*.cpp~ # ------------------------------------------------------------------------ [ -f $EXCLUDE_CONF ] && TAR_ARGS="-X $EXCLUDE_CONF" - + #### Custom functions ##### # Make a full backup full_backup(){ @@ -349,7 +351,7 @@ It is important that you do regular full system restorations and service testing $MT -f $TAPE offline cd $old } - + # Make a partial backup partial_backup(){ local old=$(pwd) @@ -359,7 +361,7 @@ It is important that you do regular full system restorations and service testing $MT -f $TAPE offline cd $old } - + # Make sure all dirs exits verify_backup_dirs(){ local s=0 @@ -374,15 +376,15 @@ It is important that you do regular full system restorations and service testing # if not; just die [ $s -eq 1 ] && exit 1 } - + #### Main logic #### - + # Make sure log dir exits [ ! -d $LOGBASE ] && $MKDIR -p $LOGBASE - + # Verify dirs verify_backup_dirs - + # Okay let us start backup procedure # If it is Monday make a full backup; # For Tue to Fri make a partial backup @@ -392,7 +394,7 @@ It is important that you do regular full system restorations and service testing Tue|Wed|Thu|Fri) partial_backup;; *) ;; esac > $LOGFIILE 2>&1 - + ### A note about third party backup utilities ### Both Linux and Unix-like system provides many third-party utilities which you can use to schedule the creation of backups including tape backups such as: @@ -422,4 +424,4 @@ via: http://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands [3]:http://www.manpager.com/linux/man1/mtx.1.html [4]:http://www.manpager.com/linux/man1/tar.1.html [5]:http://www.manpager.com/linux/man8/dump.8.html -[6]:http://www.manpager.com/linux/man8/restore.8.html \ No newline at end of file +[6]:http://www.manpager.com/linux/man8/restore.8.html From 49d5d089d8574762e096899cf290d53a8e3b1229 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 10 Jan 2016 18:34:07 +0800 Subject: [PATCH 0814/1710] [translate]Useful Linux and Unix Tape Managements Commands For Sysadmins --- ...Tape Managements Commands For Sysadmins.md | 208 +++++++++--------- 1 file changed, 103 insertions(+), 105 deletions(-) diff --git a/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md index d93670e012..f115444665 100644 --- a/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md +++ b/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md @@ -1,67 +1,65 @@ -alim0x translating - -15 Useful Linux and Unix Tape Managements Commands For Sysadmins +15条给系统管理员的实用 Linux/Unix 磁带管理命令 ================================================================================ -Tape devices should be used on a regular basis only for archiving files or for transferring data from one server to another. Usually, tape devices are all hooked up to Unix boxes, and controlled with mt or mtx. You must backup all data to both disks (may be in cloud) and tape device. In this tutorial you will learn about: +磁带设备应只用于定期的文件归档或将数据从一台服务器传送至另一台。通常磁带设备与 Unix 机器连接,用 mt 或 mtx 控制。你可以将所有的数据备份到磁盘(也许是云中)和磁带设备。在这个教程中你将会了解到: -- Tape device names -- Basic commands to manage tape drive -- Basic backup and restore commands +- 磁带设备名 +- 管理磁带驱动器的基本命令 +- 基本的备份和恢复命令 -### Why backup? ### +### 为什么备份? ### -A backup plant is important: +一个备份设备是很重要的: -- Ability to recover from disk failure -- Accidental file deletion -- File or file system corruption -- Complete server destruction, including destruction of on-site backups due to fire or other problems. +- 从磁盘故障中恢复的能力 +- 意外的文件删除 +- 文件或文件系统损坏 +- 服务器完全毁坏,包括由于火灾或其他问题导致的同盘备份毁坏 -You can use tape based archives to backup the whole server and move tapes off-site. +你可以使用磁带归档备份整个服务器并将其离线存储。 -### Understanding tape file marks and block size ### +### 理解磁带文件标记和块大小 ### ![Fig.01: Tape file marks](http://s0.cyberciti.org/uploads/cms/2015/10/tape-format.jpg) -Fig.01: Tape file marks +图01:磁带文件标记 -Each tape device can store multiple tape backup files. Tape backup files are created using cpio, tar, dd, and so on. However, tape device can be opened, written data to, and closed by various program. You can store several backups (tapes) on physical tape. Between each tape file is a "tape file mark". This is used to indicate where one tape file ends and another begins on physical tape. You need to use mt command to positions the tape (winds forward and rewinds and marks). +每个磁带设备能存储多个备份文件。磁带备份文件通过 cpio,tar,dd 等命令创建。但是,磁带设备可以由各种程序打开,写入数据,并关闭。你可以存储若干备份(磁带文件)到一个物理磁带上。在每个磁带文件之间有个“磁带文件标记”。这个是用来指示一个物理磁带上磁带文件的结尾以及另一个文件的开始。你需要使用 mt 命令来定位磁带(快进,倒带和标记)。 -#### How data is stored on a tape #### +#### 磁带上的数据是如何存储的 #### ![Fig.02: How data is stored on a tape](http://s0.cyberciti.org/uploads/cms/2015/10/how-data-is-stored-on-a-tape.jpg) -Fig.02: How data is stored on a tape +图02:磁带上的数据是如何存储的 -All data is stored subsequently in sequential tape archive format using tar. The first tape archive will start on the physical beginning of the tape (tar #0). The next will be tar #1 and so on. +所有的数据使用 tar 以连续磁带存储格式连续地存储。第一个磁带归档会从磁带的物理开始端开始存储(tar #0)。接下来的就是 tar #1,以此类推。 -### Tape device names on Unix ### +### Unix 上的磁带设备名 ### -1. /dev/rmt/0 or /dev/rmt/1 or /dev/rmt/[0-127] : Regular tape device name on Unix. The tape is rewound. -1. /dev/rmt/0n : This is know as no rewind i.e. after using tape, leaves the tape in current status for next command. -1. /dev/rmt/0b : Use magtape interface i.e. BSD behavior. More-readable by a variety of OS's such as AIX, Windows, Linux, FreeBSD, and more. -1. /dev/rmt/0l : Set density to low. -1. /dev/rmt/0m : Set density to medium. -1. /dev/rmt/0u : Set density to high. -1. /dev/rmt/0c : Set density to compressed. -1. /dev/st[0-9] : Linux specific SCSI tape device name. -1. /dev/sa[0-9] : FreeBSD specific SCSI tape device name. -1. /dev/esa0 : FreeBSD specific SCSI tape device name that eject on close (if capable). +1. /dev/rmt/0 或 /dev/rmt/1 或 /dev/rmt/[0-127] :Unix 上的常规磁带设备名。磁带自动倒回。 +1. /dev/rmt/0n :以无倒回为特征,换言之,磁带使用之后,停留在当前状态等待下个命令。 +1. /dev/rmt/0b :使用磁带接口,也就是 BSD 的行为。各种类型的操作系统比如 AIX,Windows,Linux,FreeBSD 等的行为更有可读性。 +1. /dev/rmt/0l :设置密度为低。 +1. /dev/rmt/0m :设置密度为中。 +1. /dev/rmt/0u :设置密度为高。 +1. /dev/rmt/0c :设置密度为压缩。 +1. /dev/st[0-9] :Linux 特定 SCSI 磁带设备名。 +1. /dev/sa[0-9] :FreeBSD 特定 SCSI 磁带设备名。 +1. /dev/esa0 :FreeBSD 特定 SCSI 磁带设备名,在关闭时弹出(如果可以的话)。 -#### Tape device name examples #### +#### 磁带设备名示例 #### -- The /dev/rmt/1cn indicate that I'm using unity 1, compressed density and no rewind. -- The /dev/rmt/0hb indicate that I'm using unity 0, high density and BSD behavior. -- The auto rewind SCSI tape device name on Linux : /dev/st0 -- The non-rewind SCSI tape device name on Linux : /dev/nst0 -- The auto rewind SCSI tape device name on FreeBSD: /dev/sa0 -- The non-rewind SCSI tape device name on FreeBSD: /dev/nsa0 +- /dev/rmt/1cn 指明正在使用 unity 1,压缩密度,无倒回。 +- /dev/rmt/0hb 指明正在使用 unity 0,高密度,BSD 行为。 +- Linux 上的自动倒回 SCSI 磁带设备名:/dev/st0 +- Linux 上的无倒回 SCSI 磁带设备名:/dev/nst0 +- FreeBSD 上的自动倒回 SCSI 磁带设备名:/dev/sa0 +- FreeBSD 上的无倒回 SCSI 磁带设备名:/dev/nsa0 -#### How do I list installed scsi tape devices? #### +#### 如何列出已安装的 scsi 磁带设备? #### -Type the following commands: +输入下列命令: - ## Linux (read man pages for more info) ## + ## Linux(更多信息参阅 man) ## lsscsi lsscsi -g @@ -83,51 +81,51 @@ Type the following commands: ioscan -kfC tape -Sample outputs from my Linux server: +来自我的 Linux 服务器的输出示例: ![Fig.03: Installed tape devices on Linux server](http://s0.cyberciti.org/uploads/cms/2015/10/linux-find-tape-devices-command.jpg) -Fig.03: Installed tape devices on Linux server +图03:Linux 服务器上已安装的磁带设备 -### mt command examples ### +### mt 命令实例 ### -In Linux and Unix-like system, mt command is used to control operations of the tape drive, such as finding status or seeking through files on a tape or writing tape control marks to the tape. You must most of the following command as root user. The syntax is: +在 Linux 和类Unix系统上,mt 命令用来控制磁带驱动器的操作,比如查看状态或查找磁带上的文件或写入磁带控制标记。下列大多数命令需要作为 root 用户执行。语法如下: mt -f /tape/device/name operation -#### Setting up environment #### +#### 设置环境 #### -You can set TAPE shell variable. This is the pathname of the tape drive. The default (if the variable is unset, but not if it is null) is /dev/nsa0 on FreeBSD. It may be overridden with the -f option passed to the mt command as explained below. +你可以设置 TAPE shell 变量。这是磁带驱动器的路径名。在 FreeBSD 上默认的(如果变量没有设置,而不是 null)是 /dev/nsa0。可以通过 mt 命令的 -f 参数传递变量覆盖它,就像下面解释的那样。 - ## Add to your shell startup file ## + ## 添加到你的 shell 配置文件 ## TAPE=/dev/st1 #Linux TAPE=/dev/rmt/2 #Unix TAPE=/dev/nsa3 #FreeBSD export TAPE -### 1: Display status of the tape/drive ### +### 1:显示磁带/驱动器状态 ### mt status #Use default mt -f /dev/rmt/0 status #Unix mt -f /dev/st0 status #Linux mt -f /dev/nsa0 status #FreeBSD - mt -f /dev/rmt/1 status #Unix unity 1 i.e. tape device no. 1 + mt -f /dev/rmt/1 status #Unix unity 1 也就是 tape device no. 1 -You can use shell loop as follows to poll a system and locate all of its tape drives: +你可以像下面一样使用 shell 循环调查系统并定位所有的磁带驱动器: for d in 0 1 2 3 4 5 do mt -f "/dev/rmt/${d}" status done -### 2: Rewinds the tape ### +### 2:倒带 ### mt rew mt rewind mt -f /dev/mt/0 rewind mt -f /dev/st0 rewind -### 3: Eject the tape ### +### 3:弹出磁带 ### mt off mt offline @@ -135,162 +133,162 @@ You can use shell loop as follows to poll a system and locate all of its tape dr mt -f /dev/mt/0 off mt -f /dev/st0 eject -### 4: Erase the tape (rewind the tape and, if applicable, unload the tape) ### +### 4:擦除磁带(倒带,在可以的情况下卸载磁带) ### mt erase mt -f /dev/st0 erase #Linux mt -f /dev/rmt/0 erase #Unix -### 5: Retensioning a magnetic tape cartridge ### +### 5:张紧磁带盒 ### -If errors occur when a tape is being read, you can retension the tape, clean the tape drive, and then try again as follows: +如果磁带在读取时发生错误,你重新张紧磁带,清洁磁带驱动器,像下面这样再试一次: mt retension mt -f /dev/rmt/1 retension #Unix mt -f /dev/st0 retension #Linux -### 6: Writes n EOF marks in the current position of tape ### +### 6:在磁带当前位置写入 EOF 标记 ### mt eof mt weof mt -f /dev/st0 eof -### 7: Forward space count files i.e. jumps n EOF marks ### +### 7:将磁带前进指定的文件标记数目,即跳过指定个 EOF 标记 ### -The tape is positioned on the first block of the next file i.e. tape will position on first block of the field (see fig.01): +磁带定位在下一个文件的第一个块,即磁带会定位在下一区域的第一个块(见图01): mt fsf mt -f /dev/rmt/0 fsf mt -f /dev/rmt/1 fsf 1 #go 1 forward file/tape (see fig.01) -### 8: Backward space count files i.e. rewinds n EOF marks ### +### 8:将磁带后退指定的文件标记数目,即倒带指定个 EOF 标记 ### -The tape is positioned on the first block of the next file i.e. tape positions after EOF mark (see fig.01): +磁带定位在下一个文件的第一个块,即磁带会定位在 EOF 标记之后(见图01): mt bsf mt -f /dev/rmt/1 bsf mt -f /dev/rmt/1 bsf 1 #go 1 backward file/tape (see fig.01) -Here is a list of the tape position commands: +这里是磁带定位命令列表: - fsf Forward space count files. The tape is positioned on the first block of the next file. + fsf 前进指定的文件标记数目。磁带定位在下一个文件的第一块。 - fsfm Forward space count files. The tape is positioned on the last block of the previous file. + fsfm 前进指定的文件标记数目。磁带定位在前一文件的最后一块。 - bsf Backward space count files. The tape is positioned on the last block of the previous file. + bsf 后退指定的文件标记数目。磁带定位在前一文件的最后一块。 - bsfm Backward space count files. The tape is positioned on the first block of the next file. + bsfm 后退指定的文件标记数目。磁带定位在下一个文件的第一块。 - asf The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks. + asf The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks.磁带定位在 - fsr Forward space count records. + fsr 前进指定的记录数。 - bsr Backward space count records. + bsr 后退指定的记录数。 - fss (SCSI tapes) Forward space count setmarks. + fss (SCSI tapes)前进指定的 setmarks。 - bss (SCSI tapes) Backward space count setmarks. + bss (SCSI tapes)后退指定的 setmarks。 -### Basic backup commands ### +### 基本备份命令 ### -Let us see commands to backup and restore files +让我们来看看备份和恢复命令。 -### 9: To backup directory (tar format) ### +### 9:备份目录(tar 格式) ### tar cvf /dev/rmt/0n /etc tar cvf /dev/st0 /etc -### 10: To restore directory (tar format) ### +### 10:恢复目录(tar 格式) ### tar xvf /dev/rmt/0n -C /path/to/restore tar xvf /dev/st0 -C /tmp -### 11: List or check tape contents (tar format) ### +### 11:列出或检查磁带内容(tar 格式) ### mt -f /dev/st0 rewind; dd if=/dev/st0 of=- - ## tar format ## + ## tar 格式 ## tar tvf {DEVICE} {Directory-FileName} tar tvf /dev/st0 tar tvf /dev/st0 desktop tar tvf /dev/rmt/0 foo > list.txt -### 12: Backup partition with dump or ufsdump ### +### 12:使用 dump 或 ufsdump 备份分区 ### - ## Unix backup c0t0d0s2 partition ## + ## Unix 备份 c0t0d0s2 分区 ## ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s2 - ## Linux backup /home partition ## + ## Linux 备份 /home 分区 ## dump 0uf /dev/nst0 /dev/sda5 dump 0uf /dev/nst0 /home - ## FreeBSD backup /usr partition ## + ## FreeBSD 备份 /usr 分区 ## dump -0aL -b64 -f /dev/nsa0 /usr -### 12: Restore partition with ufsrestore or restore ### +### 12:使用 ufsrestore 或 restore 恢复分区 ### ## Unix ## ufsrestore xf /dev/rmt/0 - ## Unix interactive restore ## + ## Unix 交互式恢复 ## ufsrestore if /dev/rmt/0 ## Linux ## restore rf /dev/nst0 - ## Restore interactive from the 6th backup on the tape media ## + ## 从磁带媒介上的第6个备份交互式恢复 ## restore isf 6 /dev/nst0 - ## FreeBSD restore ufsdump format ## + ## FreeBSD 恢复 ufsdump 格式 ## restore -i -f /dev/nsa0 -### 13: Start writing at the beginning of the tape (see fig.02) ### +### 13:从磁带开头开始写入(见图02) ### - ## This will overwrite all data on tape ## + ## 这会覆盖磁带上的所有数据 ## mt -f /dev/st1 rewind - ### Backup home ## + ### 备份 home ## tar cvf /dev/st1 /home - ## Offline and unload tape ## + ## 离线并卸载磁带 ## mt -f /dev/st0 offline -To restore from the beginning of the tape: +从磁带开头开始恢复: mt -f /dev/st0 rewind tar xvf /dev/st0 mt -f /dev/st0 offline -### 14: Start writing after the last tar (see fig.02) ### +### 14:从最后一个 tar 后开始写入(见图02) ### - ## This will kee all data written so far ## + ## 这会保留之前写入的数据 ## mt -f /dev/st1 eom - ### Backup home ## + ### 备份 home ## tar cvf /dev/st1 /home - ## Unload ## + ## 卸载 ## mt -f /dev/st0 offline -### 15: Start writing after tar number 2 (see fig.02) ### +### 15:从 tar number 2 后开始写入(见图02) ### - ## To wrtite after tar number 2 (should be 2+1) + ## 在 tar number 2 之后写入(应该是 2+1) mt -f /dev/st0 asf 3 tar cvf /dev/st0 /usr - ## asf equivalent command done using fsf ## + ## asf 等效于 fsf ## mt -f /dev/sf0 rewind mt -f /dev/st0 fsf 2 -To restore tar from tar number 2: +从 tar number 2 恢复 tar: mt -f /dev/st0 asf 3 tar xvf /dev/st0 mt -f /dev/st0 offline -### How do I verify backup tapes created using tar? ### +### 如何验证使用 tar 创建的备份磁带? ### -It is important that you do regular full system restorations and service testing, it's the only way to know for sure that the entire system is working correctly. See our [tutorial on verifying tar command tape backups][1] for more information. +定期做全系统修复和服务测试是很重要的,这是唯一确定整个系统正确工作的途径。参见我们的[验证 tar 命令磁带备份的教程][1]以获取更多信息。 -### Sample shell script ### +### 示例 shell 脚本 ### #!/bin/bash # A UNIX / Linux shell script to backup dirs to tape device like /dev/st0 (linux) @@ -395,9 +393,9 @@ It is important that you do regular full system restorations and service testing *) ;; esac > $LOGFIILE 2>&1 -### A note about third party backup utilities ### +### 关于第三方备份工具 ### -Both Linux and Unix-like system provides many third-party utilities which you can use to schedule the creation of backups including tape backups such as: +Linux 和类Unix系统都提供了许多第三方工具,可以用来安排备份,包括磁带备份在内,如: - Amanda - Bacula @@ -405,7 +403,7 @@ Both Linux and Unix-like system provides many third-party utilities which you ca - duplicity - rsnapshot -See also +另行参阅 - Man pages - [mt(1)][2], [mtx(1)][3], [tar(1)][4], [dump(8)][5], [restore(8)][6] @@ -414,7 +412,7 @@ See also via: http://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands/ 作者: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 e27ff32c7c114c5c5552af0c86f7bb6336b64fe3 Mon Sep 17 00:00:00 2001 From: Rubik Date: Sun, 10 Jan 2016 22:49:18 +0800 Subject: [PATCH 0815/1710] [Translating] 18 Years of GNOME Design and Software Evolution: Step by Step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新手第一次翻译,若有不当望指正。 --- ...rs of GNOME Design and Software Evolution--Step by Step.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 index 174fc55262..ea43c7af47 100644 --- 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 @@ -1,3 +1,5 @@ +HaohongWANG Translating + 18 Years of GNOME Design and Software Evolution: Step by Step ================================================================================ 注:youtube 视频 @@ -196,4 +198,4 @@ via: https://tlhp.cf/18-years-of-gnome-evolution/ [a]:https://tlhp.cf/author/paul/ [1]:https://www.gnome.org/ -[2]:https://en.wikipedia.org/wiki/GNOME \ No newline at end of file +[2]:https://en.wikipedia.org/wiki/GNOME From aa7446561ca9eaab4ce216b48d6923ae62da81bf Mon Sep 17 00:00:00 2001 From: Yu Haixin <836401406@qq.com> Date: Mon, 11 Jan 2016 07:14:05 +0800 Subject: [PATCH 0816/1710] Update 20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md --- ... Using Windows 10 After More than 8 Years--See Comparison.md | 2 ++ 1 file changed, 2 insertions(+) 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 702783b6b0..21a6fc9ca2 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,5 @@ +#name1e5s 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. From 64165a70a8cbcb5bbaa3c9ce38b926cc6c00820d Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Mon, 11 Jan 2016 10:15:28 +0800 Subject: [PATCH 0817/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E7=AF=87=E7=BF=BB=E8=AF=91=E7=9A=84=E4=B8=8D=E5=A5=BD=EF=BC=8C?= =?UTF-8?q?=E4=BA=A4=E8=BF=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 还是交给对gcc-Inline-Assembly有研究的人来翻译,我的翻译的太渣了。 --- sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index 45dbf42e96..99f1ceed04 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -1,4 +1,3 @@ -translate by zky001 * * * # GCC-Inline-Assembly-HOWTO @@ -626,6 +625,6 @@ If you have found any glaring typos, or outdated info in this document, please l * * * via: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html - 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[zky001](https://github.com/zky001) 校对:[]() + 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[](https://github.com/) 校对:[]() 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From cbc9c4bc0d5df56fb4475bb8ca95b30d7a759753 Mon Sep 17 00:00:00 2001 From: icecoobe Date: Mon, 11 Jan 2016 10:17:27 +0800 Subject: [PATCH 0818/1710] =?UTF-8?q?icecoobe=E8=AE=A4=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0151223 What' s the Best File System for My Linux Install.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20151223 What' s the Best File System for My Linux Install.md b/sources/talk/20151223 What' s the Best File System for My Linux Install.md index 1e8af12179..52f2ac8e88 100644 --- a/sources/talk/20151223 What' s the Best File System for My Linux Install.md +++ b/sources/talk/20151223 What' s the Best File System for My Linux Install.md @@ -1,3 +1,5 @@ +Translating by icecoobe. + What’s the Best File System for My Linux Install? ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-feature-image.jpg) From 12530959088786f1c96cd5a19f92e10ce7a37e14 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 11 Jan 2016 14:28:16 +0800 Subject: [PATCH 0819/1710] =?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 --- ...ps for teaching open source development.md | 54 +++++++++++-------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/translated/talk/20150921 14 tips for teaching open source development.md b/translated/talk/20150921 14 tips for teaching open source development.md index aef6304789..c6464977ac 100644 --- a/translated/talk/20150921 14 tips for teaching open source development.md +++ b/translated/talk/20150921 14 tips for teaching open source development.md @@ -1,11 +1,10 @@ -GHLandy Translated 开源代码开发的十四点教学技巧 ================================================================================ -对于培养和塑造开源代码开发者,学术界就是一个很好的平台。研究中发现,我们偶尔会开源自己编写的软件。这样做有两个理由,一是为了提升自己编写的工具的使用率,二是为了了解人们使用这些工具时会遇到哪些问题。在这样一个编写研究软件的背景下,我的任务就是为 Bradford 大学重新设计二年级的软件工程课程。 +对于培养和塑造开源代码开发者,Academia就是一个很好的平台。研究中发现,我们偶尔会开源自己编写的软件。这样做有两个理由,一是为了提升自己编写的工具使用率,二是为了了解人们使用这些工具时会遇到哪些问题。在这样一个编写研究软件的背景下,我的任务就是为 Bradford 大学重新设计二年级的软件工程课程。 -这是一个巨大的挑战,因为我所面对的 80 个学生是来自不同专业的,包括 IT、商务计算和软件工程,这些学生将要在一起上课。最有难度的是,需要和这些编程经验差距很大的学生一起编写代码。按照传统,该课程允许学生选择自己的小组,然后布置他们构建一个存储数据库系统构的任务,最后提交报告作为评估的一部分。 +这是一个巨大的挑战,因为我所面对的 80 个学生是来自不同专业的,包括 IT、商务计算和软件工程,这些学生将要在一起上课。最有难度的是,需要和这些编程经验差距很大的学生一起编写代码。按照传统,该课程允许学生选择自己的小组,然后给他们布置构建一个存储数据库系统构的任务,最后提交报告作为评估的一部分。 而我决定重新设计课程,让学生了解现实中的软件团队是如何协作的过程。根据学生的专业和编程技能,我将他们分为五六个人一组。这是为了确保每个小组的整体水平相当,避免小组之间的不公平。 @@ -26,13 +25,13 @@ GHLandy Translated - 开源代码许可及其选择 - 软件分发 -在这些讲座之后,我会有一些来自世界各地的嘉宾为我们说说他们在软件分发过程中的经验。我们也设法请来大学里知识产权律师谈关于软件在英国的知识产权问题,以及如何处理软件的知识产权问题。 +在这些讲座之后,会有一些来自世界各地的嘉宾为我们说说他们在软件分发过程中的经验。我们也设法请来大学里知识产权律师谈关于软件在英国的知识产权问题,以及如何处理软件的知识产权问题。 ### 协作工具 ### 为了让上述教学内容的顺利进行,我们将会介绍一些工具,并训练学生在他们的项目中使用这些工具。如下: -- Google Drive:团队与导师之间进行共享的工具,暂时存储用于描述项目的文档和图表、需求收集、会议纪要以及项目跟踪等信息。采取这样一个方式来监控并提供直接反馈到每个团队,是非常有效的。 +- Google Drive:团队与导师之间进行共享的工具,暂时存储用于描述项目的文档和图表、需求收集、会议纪要以及项目时间跟踪等信息。采取这样一个方式来监控并提供直接反馈到每个团队,是非常有效的。 - [Basecamp][1]:同样是用于分享文档,在随后的课程中,我们可能会考虑用它取代 Google Drive。 - BUG 报告工具,如 [Mantis][2]:只能让有限的用户自由提交 BUG。稍后我们提到的 Git 可以让小组内的所有人员用做 BUG 提交。 - 远程视频会议工具:在人员不在校内,甚至去了其他城市的情况下使用。学生们可以定期通过 Skype 来交流并记录会议内容或则进行录音作为今后其他用处。 @@ -43,22 +42,35 @@ GHLandy Translated 在最后,这一年过的很愉快,并且所有学生的项目都做的非常棒。这里有一些我学到的经验教训,可能有助于提高明年的课程质量: -1. 提供各种各样的有趣的选择项目给学生选择。比如说,游戏开发或者移动应用开发以及完成各种目标的项目等。建立普通的数据库系统已经不能提起学生的兴趣了,而参与到有趣的项目中去,学生本身就是自学者,同时可以帮助解决小组成员和小组之间的常见问题。再通过一个消息列表,学生们发表他们在测试中遇到的任何问题,以寻求其他人的帮助建议。然而,这种方法有一个缺点。外部考官建议我们使用统一种类型的项目和统一的编程语言以帮助缩小对学生的评估标准。 -2. 定期给学生在每一个阶段的表现进行反馈。比方说,可以在和各个小组开指导会议的时候、或者每个阶段进行反馈,以帮助他在接下来的工作中自我改进。 -3. 学生更加愿意与校外的客户一起协作。他们期待着与外部公司代表或大学以外的人协作,不过是为了获得新体验而已。与导师进行交流时,他们都能够表现得很专业,这样使得老师非常放心。 -4. 很多团队版开发单元测试的部分放到项目结束之后,从极限编程方法的角度来说,这是一个严重的禁忌。也许测试应包括在不同阶段的评估中,来提醒他们需要与并行开展软件开发和单元测试。 -5. 在这个班的 80 个人里边,仅有 4 个女生,每个女都分在不同的小组里边。我观察到,男生们总是准备充分地承担起领队角色,并将最有趣的代码分配个他们自己来编写,女生则多大遵循安排或则是编写文档。出于某种原因,女生选择不显示权威,即使在女性辅导员鼓励下,她们也不愿编写代码。这仍然是一个需要解决的主要问题。 -6.允许不同风格文项目文档,比方说,UML 图表、状态图或其他形式的。让学生学习这些并与其他课程融汇贯通来提高他们的学习经验。 -7. 学生里边,有些是很好的开发人员,有些做商务计算的则没有多少编程经验。我们要鼓励团队共同努力,避免开发人员做得比那些只做会议记录或文档的其他成员更好的错误认知。我们常在辅导课程中鼓励角色转换,让每个人都有机会学习如何编程。 -8. 各个小组进行导师会议室非常重要的,可以有效监督各个小组进展情况,还可以了解是谁做了大部分工作。通常,没来参加会议的小组成员基本就是没有参与到他们的团队工作中去的,并且通过其他成员提交的工作报告也可以确定哪些人不活跃。 -9. 我们鼓励学生们把许可证附加到项目中去,使用外部库以及和客户协作的时候要表明确切知识产权问题。 这样可让解放学生的思考能力,了解真实的软件交付问题。 -10. 给学生们自己选择技术空间。 -11. 助教是关键。同时管理 80 个显示显然很有难度,特别是需要对他们进行评估的那几周。明年我一定会找个助教来帮我一起管理各个小组。 -12. 实验室的技术支持是非常重要的。大学里的技术支持对于本课程是非常赞同的。学习正在考虑明年将虚拟机分配给每个团队,这样没个团队可以根据需要自行在虚拟机中安装任何软件。 -13. 团队合作,相互帮助。大多数团队自然而然的支持其他团队成员,同时指导人在中间也帮助了不少。 -14. 来自其他技术人员的帮助只能作为辅助方法。作为一个新的学术,我需要从经验中学习,同时当我如何知道学生是,我会通过多个角度来建议学生和小组去尝试处理问。来自高级技术人员的支持对我来说就是一种鼓励。 +1. 提供各种各样有趣的选择项目给学生选择。比如说,游戏开发或者移动应用开发以及完成各种目标的项目等。建立普通的数据库系统已经不能提起学生的兴趣了,而参与到有趣的项目中去,学生本身就是自学者,同时可以帮助解决小组成员和小组之间的常见问题。再通过一个消息列表,学生们发表他们在测试中遇到的任何问题,以寻求其他人的帮助建议。然而,这种方法有一个缺点。外部考官建议我们使用统一种类型的项目和统一的编程语言以帮助缩小对学生的评估标准。 -最后,对于作为导师的我以及所有的学生来说,这都是个有趣的课程。在学习目标和传统的分级方案上还有有一些问题需,以解决减少教师的工作量。明年,我计划会保留这种教学模式,并希望能够提出更好的分级方案以及介绍更多的软件来帮助监督项目和控制代码版本。 +2. 定期给学生在每一个阶段的表现进行反馈。比方说,可以在和各个小组开指导会议的时候,或者每个阶段进行反馈,以帮助他们在接下来的工作中自我改进。 + +3. 学生更加愿意与校外的客户一起协作。他们期待着与外部公司代表或校外人员协作,不过是为了获得新体验而已。与导师进行交流时,他们都能够表现得很专业,这样使得老师非常放心。 + +4. 很多团队版开发单元测试的部分放到项目结束之后,从极限编程方法的角度来说,这是一个严重的禁忌。也许测试应包括在不同阶段的评估中,来提醒他们需要与并行开展软件开发和单元测试。 + +5. 在这个班的 80 个人里边,仅有 4 个女生,每个女都分在不同的小组里边。我观察到,男生们总是充分准备好来承担起领队角色,并将最有趣的代码分配给他们自己来编写,女生则多大遵循安排或者是编写文档。出于某种原因,女生选择不显示权威,即使在女性辅导员鼓励下,她们也不愿编写代码。这仍然是一个需要解决的主要问题。 + +6.允许不同风格项目文档,比方说,UML 图表、状态图或其他形式的。让学生学习这些并与其他课程融汇贯通来提高他们的学习经验。 + +7. 学生里边,有些是很好的开发人员,有些做商务计算的则没有多少编程经验。我们要鼓励团队共同努力,避免开发人员做得比那些只做会议记录或文档的其他成员更好的错误认知。我们常在辅导课程中鼓励角色转换,让每个人都有机会学习如何编程。 + +8. 小组进行与导师每周见面沟通是非常重要的,可以有效监督各个小组进展情况,还可以了解是谁做了大部分工作。通常,没来参加会议的小组成员基本就是没有参与到他们的团队工作中去的,并且通过其他成员提交的工作报告也可以确定哪些人不活跃。 + +9. 我们鼓励学生们把许可证附加到项目中去,使用外部库以及和客户协作的时候要表明确切知识产权问题。 这样可让打破陈规,开拓思维,并了解真实的软件交付问题。 + +10. 给学生们自己选择技术空间。 + +11. 助教是关键。同时管理 80 个学生显然很有难度,特别是需要对他们进行评估的那几周。明年我一定会找个助教来帮我一起管理各个小组。 + +12. 实验室的技术支持是非常重要的。大学里的技术支持对于本课程是非常赞同的。他们正在考虑明年将虚拟机分配给每个团队,这样没个团队可以根据需要自行在虚拟机中安装任何软件。 + +13. 团队合作,相互帮助。大多数团队自然而然的支持其他团队成员,同时指导员在中间也帮助了不少。 + +14. 来自其他技术人员的帮助会锦上添花。作为一名新的大学导师,我需要从经验中学习,如果我想了解如何管理某些学生和团队,或者对如何让学生适应课程感到困惑时,我会通过多个方面来寻求建议。来自高级技术人员的支持对我来说是一种极大的鼓励。 + +最后,对于作为导师的我以及所有的学生来说,这都是个有趣的课程。在学习目标和传统的分级方案上还有有一些问题需解决,以减少教师的工作量。明年,我计划会保留这种教学模式,并希望能够提出更好的分级方案以及介绍更多的软件来帮助监督项目和控制代码版本。 -------------------------------------------------------------------------------- @@ -66,7 +78,7 @@ via: http://opensource.com/education/15/9/teaching-open-source-development-under 作者:[Mariam Kiran][a] 译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 79a95eec3eeffd8078de6ce9a4f0bbd1c54b40ad Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 11 Jan 2016 14:33:40 +0800 Subject: [PATCH 0820/1710] =?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 --- .../20150921 14 tips for teaching open source development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/20150921 14 tips for teaching open source development.md b/translated/talk/20150921 14 tips for teaching open source development.md index c6464977ac..e1c340ba95 100644 --- a/translated/talk/20150921 14 tips for teaching open source development.md +++ b/translated/talk/20150921 14 tips for teaching open source development.md @@ -52,7 +52,7 @@ 5. 在这个班的 80 个人里边,仅有 4 个女生,每个女都分在不同的小组里边。我观察到,男生们总是充分准备好来承担起领队角色,并将最有趣的代码分配给他们自己来编写,女生则多大遵循安排或者是编写文档。出于某种原因,女生选择不显示权威,即使在女性辅导员鼓励下,她们也不愿编写代码。这仍然是一个需要解决的主要问题。 -6.允许不同风格项目文档,比方说,UML 图表、状态图或其他形式的。让学生学习这些并与其他课程融汇贯通来提高他们的学习经验。 +6. 允许不同风格项目文档,比方说,UML 图表、状态图或其他形式的。让学生学习这些并与其他课程融汇贯通来提高他们的学习经验。 7. 学生里边,有些是很好的开发人员,有些做商务计算的则没有多少编程经验。我们要鼓励团队共同努力,避免开发人员做得比那些只做会议记录或文档的其他成员更好的错误认知。我们常在辅导课程中鼓励角色转换,让每个人都有机会学习如何编程。 From e5e2cb9603981b7589553db809119c4745575414 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 11 Jan 2016 17:04:18 +0800 Subject: [PATCH 0821/1710] =?UTF-8?q?20160111-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...re Will Be Disabled In Ubuntu 16.04 LTS.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md diff --git a/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md b/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md new file mode 100644 index 0000000000..083ca3b595 --- /dev/null +++ b/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md @@ -0,0 +1,86 @@ +Ubuntu ‘Spyware’ Will Be Disabled In Ubuntu 16.04 LTS +================================================================================ +Controversial feature scaled back to help boost Ubuntu's privacy credentials + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/as2.jpg) + +**Unity’s controversial online search feature is being disabled by default in Ubuntu 16.04 LTS, due for release in April.** + +Search terms typed into the Unity 7 Dash search bar will **only show local file, folder and app results**. No search terms will be sent to Canonical or passed to third party results providers, as is currently the case. + +> ‘Unity online searches are now turned off by default.’ + +In currently supported versions of Ubuntu the Dash sends search queries the user enters to a remote web server run by Canonical, the company behind Ubuntu. + +No user-identifiable data is included with these queries, which are used to retrieve contextually relevant results from over 50 online services, including Wikipedia, YouTube and The Weather Channel. + +A switch to disable online search entirely is available in Ubuntu through the **Ubuntu System Settings > Privacy pane**. + +But some in the open-source community object to the feature being turned on by default. + +### Ubuntu Online Search Controversy ### + +> ‘Richard Stallman describes the feature as ‘spyware” + +Boiling over since 2012, the open-source community was quick to express concerns about user privacy in the wake of Ubuntu Amazon integration. Concerns continued with the rollout of the comprehensive ‘Smart Scopes Service’ a year later. + +The furore was so big it led free software stalwart [Richard Stallman to call Ubuntu ‘spyware’][1]. + +[The Electronic Frontier Foundation][2] also shared its concerns in a series of blog posts and suggested that Canonical make the feature opt-in. Privacy International went further than most by awarding Ubuntu’s makers a ‘[Big Brother award][3]‘ for work on, quote: “invading personal privacy”. + +[Canonical][4] maintains that the data collected through Unity’s online search feature is anonymised and “not user-identifiable”. + +In [blog post from 2013 the company explains][5] that it “**make[s] users aware of what data will be collected and which third party services will be queried through a notice right in the Dash, and we only collect data that allows us to deliver a great search experience to Ubuntu users.**” + +### Ubuntu Gets Serious About Data Privacy ### + +Canonical disabled Amazon product results on fresh installs of Ubuntu 14.04 LTS and up (though results from other online sources and services continue to appear until the opt-out is chosen). + +For the next LTS, Ubuntu 16.04, Canonical curtails the contentious online searching feature entirely, right out of the box, just like the EFF asked them to do in 2012. + +“None of your search terms will leave your computer,” [Ubuntu desktop manager Will Cooke][6] explains, noting that the “finer control over what is searched and [the] more targeted results” that Unity 8 offers “cannot be added into Unity 7.” + +It’s for this reason that “the online search features [of Unity 7] will be retired.” + +The change will also lower the support and infrastructure burden of Unity 7. With fewer Unity search results to handle Canonical can redirect time and engineering effort to more exciting avenues, like the promising Unity 8 desktop. + +### You Will Need to Opt-In To Get Online Results ### + +![Privacy settings in Ubuntu let you opt in to seeing online results](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/privacy.jpg) + +Privacy settings in Ubuntu let you opt in to seeing online results + +The decision to disable the online search element of the Ubuntu desktop will be greeted with considerable cheer by many in the open-source and free software communities. + +But not everyone is antagonised by the semantic search skills being served up in the Dash. + +If you think you’ll miss the efficiency of searching and previewing weather, news and other content through the Dash, **you can re-enable online search results** in a couple of clicks. Just head to Ubuntu **System Settings > Privacy > Search** and set the slider to ‘**On**‘. + +Flicking this won’t automatically bring back Amazon product results. The ‘shopping lens’ is decoupled from the opt-in toggle. You’ll need to okay a second opt-in to see product results from Amazon (and Skimlinks). + +### Summary ### + +- Ubuntu 16.04 LTS will no longer search online sources in the Dash by default +- Online results can be turned back on manually using a toggle +- A second opt-in allows Amazon product results +- The change only affects new installs. In-place upgrades will retain user preferences + +Do you agree with this decision? Or is Canonical about to reduce the experience of Ubuntu for new users? Let us know in the comments. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2016/01/ubuntu-online-search-feature-disabled-16-04 + +作者:[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://arstechnica.com/information-technology/2012/12/richard-stallman-calls-ubuntu-spyware-because-it-tracks-searches/?utm_source=omgubuntu +[2]:https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks?utm_source=omgubuntu +[3]:http://www.omgubuntu.co.uk/2013/10/ubuntu-wins-big-brother-austria-privacy-award +[4]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/ +[5]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/?utm_source=omgubuntu +[6]:http://www.whizzy.org/2015/12/online-searches-in-the-dash-to-be-off-by-default?utm_source=omgubuntu From 9c3d1b6cd20ec3d5ccc442c8b9ae1124b50e379d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 11 Jan 2016 17:08:05 +0800 Subject: [PATCH 0822/1710] =?UTF-8?q?20160111-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... DJ Software Mixxx Version 2.0 Released.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md diff --git a/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md b/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md new file mode 100644 index 0000000000..87522476a7 --- /dev/null +++ b/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md @@ -0,0 +1,69 @@ +Open Source DJ Software Mixxx Version 2.0 Released +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2016/01/DJ-Software-Mixxx-2-Released.jpg) + +After three years, Open Source DJ mixing software [Mixxx][1] sees a major release in the form of Mixxx version 2.0. + +Mixxx is a cross-platform, free and open source DJ mixing software that provides almost all the features you would need for creating your own mixes. Used by professionals and amateurs alike, Mixxx has been a hot favorite for several years. + +In Mixxx you can use your iTunes library. Its powerful mixing engine supports a number of file format. Over 85 MIDI DJ controllers are supported out-of-the-box along with several HID controllers. There is an Auto DJ option as well to give you a break from mixing. + +Complete features of Mixxx can be found [here][2]. But before that, let’s see what is new in the latest release. + +### What’s new in Mixxx 2.0 ### + +- Dynamic, Resizable Skins +- 4 Decks with Master Sync +- Built-in Effects +- Harmonic Mixing with Musical Key Detection +- RGB Waveforms +- Four Microphones, Four AUX Inputs, Microphone Ducking +- Vinyl Passthrough +- Cover Art Support +- Core Mixing Engine Improvements +- Upgraded Library +- Improved, Expanded Support for DJ Controllers + +You can find the new features of Mixxx 2.0 in details [here][3]. + +### Install Mixxx 2.0 in Ubuntu based Linux distributions ### + +Mixxx provides its own PPA too easily install Mixxx in Ubuntu based Linux distributions such as Linux Mint, elementary OS, Zorin OS etc. The PPA is valid for Ubuntu 12.04, 14.04 and 15.10. + +Open a terminal and use the following commands: + + sudo add-apt-repository ppa:mixxx/mixxx + sudo apt-get update + sudo apt-get install mixxx + +To uninstall Mixxx, use the following commands: + + sudo apt-get remove mixxx + sudo add-apt-repository --remove ppa:mixxx/mixxx + +If you are already using an older version of Mixxx, it will be upgraded soon. + +For other Linux distributions, you can install Mixxx from the source code. You can download Mixxx 2.0 source code from the link below: + +- [Get Mixxx 2.0 Source Code][4] + +Since Mixxx is a cross platform application, you can download it for Windows and Mac OS X as well. You can visit the Mixxx download page to get the installer for other platforms. + +- [Download Mixxx 2.0][5] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/dj-mixxx-2/ + +作者:[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://mixxx.org/ +[2]:http://mixxx.org/features/ +[3]:http://mixxx.org/whats-new-in-mixxx-2-0/ +[4]:http://downloads.mixxx.org/mixxx-2.0.0/mixxx-2.0.0-src.tar.gz +[5]:http://mixxx.org/download/ From 2fbb87c7086cac08f4b7740fb745a9fb95ced7bc Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 11 Jan 2016 17:18:49 +0800 Subject: [PATCH 0823/1710] =?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 --- ...80 Linux Monitoring Tools for SysAdmins.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md b/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md index 7c16ca9fc8..25fdc1df44 100644 --- a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md +++ b/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md @@ -1,12 +1,12 @@ -为 Linux 系统管理员准备的80个监控工具 +Linux 系统管理员必备的80个监控工具 ================================================================================ ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-monitoring.jpg) -随着行业的不断发展,有许多比你想象中更棒的工具。这里列着网上最全的(工具)。拥有超过80种方式来管理你的机器。在本文中,我们主要讲述以下方面: +随着行业的不断发展,各种工具多得不可胜数。这里列出网上最全的(工具)。拥有超过80种方式来管理你的机器。在本文中,我们主要讲述以下方面: - 命令行工具 -- 与网络相关的 +- 网络相关内容 - 系统相关的监控工具 - 日志监控工具 - 基础设施监控工具 @@ -19,7 +19,7 @@ ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/top.jpg) -这是一个被预安装在许多 UNIX 系统中的小工具。当你想要查看在系统中运行的进程或线程时:top 是一个很好的工具。你可以对这些进程以不同的标准进行排序,默认是以 CPU 进行排序的。 +这是一个被预装在许多 UNIX 系统中的小工具。当你想要查看在系统中运行的进程或线程时:top 是一个很好的工具。你可以对这些进程以不同的标准进行排序,默认是以 CPU 进行排序的。 #### 2. [htop][1] #### @@ -33,7 +33,7 @@ Atop 和 top,htop 非常相似,它也能监控所有进程,但不同于 to #### 4. [apachetop][3] #### -Apachetop 会监视 apache 网络服务器的整体性能。它主要是基于 mytop。它会显示当前 reads, writes 的数量以及 requests 进程的总数。 +Apachetop 会监控 apache 网络服务器的整体性能。它主要是基于 mytop。它会显示当前 reads, writes 的数量以及 requests 进程的总数。 #### 5. [ftptop][4] #### @@ -43,7 +43,7 @@ ftptop 给你提供了当前所有连接到 ftp 服务器的基本信息,如 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mytop.jpg) -mytop 是一个很方便的工具,用于监控线程和 mysql 的性能。它给了你一个实时的数据库查询处理结果。 +mytop 是一个很简洁的工具,用于监控线程和 mysql 的性能。它给了你一个实时的数据库来查询处理结果。 #### 7. [powertop][6] #### @@ -69,19 +69,19 @@ ntopng 是 ntop 的升级版,它提供了一个能使用浏览器进行网络 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iftop.jpg) -iftop 类似于 top,但它主要不是检查 cpu 的使用率而是监听网卡的流量,并以表格的形式显示当前的使用量。像“为什么我的网速这么慢呢?!”这样的问题它可以直接回答。 +iftop 类似于 top,但它主要不是检查 cpu 的使用率而是监听所选择网络接口的流量,并以表格的形式显示当前的使用量。像“为什么我的网速这么慢呢?!”这样的问题它可以直接回答。 #### 11. [jnettop][10] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/jnettop.jpg) -jnettop 以相同的方式来监测网络流量但比 iftop 更形象。它还支持自定义的文本输出并能以友好的交互方式来快速分析日志。 +jnettop 以相同的方式来监测网络流量但比 iftop 更形象。它还支持自定义的文本输出并能以友好的交互方式来深度分析日志。 #### 12. [bandwidthd][11] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bandwidthd.jpg) -bandwidthd 可以跟踪 TCP/IP 网络子网的使用情况并能在浏览器中通过 png 图片形象化的构建一个 HTML 页面。它有一个数据库驱动系统,支持搜索,过滤,多传感器和自定义报表。 +bandwidthd 可以跟踪 TCP/IP 网络子网的使用情况并能在浏览器中通过 png 图片形象化地构建一个 HTML 页面。它有一个数据库驱动系统,支持搜索、过滤,多传感器和自定义报表。 #### 13. [EtherApe][12] #### @@ -103,7 +103,7 @@ NetHogs 打破了网络流量按协议或子网进行统计的原理。它以进 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iptraf.jpg) -iptraf 收集的各种指标,如 TCP 连接数据包和字节数,接口界面和活动指标,TCP/UDP 通信故障,站内数据包和字节数。 +iptraf 收集的各种指标,如 TCP 连接数据包和字节数,端口统计和活动指标,TCP/UDP 通信故障,站内数据包和字节数。 #### 17. [ngrep][16] #### From 5eda19dcf6f443a75257adeda34ce2e8f0ecf974 Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 11 Jan 2016 17:37:28 +0800 Subject: [PATCH 0824/1710] mv file to the proper place --- ...eful Linux and Unix Tape Managements Commands For Sysadmins.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md (100%) diff --git a/sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md similarity index 100% rename from sources/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md rename to translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md From 910adb31eaf6da813dd2c9b2bafc8c2e4e2a3d8f Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Tue, 12 Jan 2016 05:19:44 +0800 Subject: [PATCH 0825/1710] [translated] 20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison --- ...After More than 8 Years--See Comparison.md | 346 ------------------ ...After More than 8 Years--See Comparison.md | 344 +++++++++++++++++ 2 files changed, 344 insertions(+), 346 deletions(-) delete mode 100644 sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md create mode 100644 translated/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.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 deleted file mode 100644 index 21a6fc9ca2..0000000000 --- a/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md +++ /dev/null @@ -1,346 +0,0 @@ -#name1e5s 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. - -![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 diff --git a/translated/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md b/translated/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md new file mode 100644 index 0000000000..6f821f777d --- /dev/null +++ b/translated/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md @@ -0,0 +1,344 @@ +对比Windows 10与Linux:Linux用户已经使用'Windows 10'超过8年 +============================================================================================================================================================== +Windows 10 是2015年7月29日上市的最新一代Windows NT系列系统,Windows 8.1 的继任者.Windows 10 支持Intel 32位平台,AMD64以及ARM v7处理器. + +![Windows 10 and Linux Comparison](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-vs-Linux.jpg) + +对比:Windows 10与Linux + +作为一个连续使用linux超过8年的用户,我想要去测试Windows 10 ,因为它最近制造了很多新闻.这篇文章是我观察力的一个重大突破.我将从一个linux用户的角度去看待一切,所以这篇文章可能会有些偏向于linux.尽管如此,本文也应该不会有任何错误信息. + +1. 用谷歌搜索"download Windows 10" 并且点击第一个链接. + +![Search Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Windows-10.jpg) + +搜索Windows 10 + +你也可以直接打开: [https://www.microsoft.com/en_us/software-download/Windows10[1] + +2. 微软要求我从Windows 10, Windows 10 KN, Windows 10 N 和Windows 10 单语言版中选择一个版本 + +![Select Windows 10 Edition](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Windows-10-Edition.jpg) + +选择版本 + +以下是各个版本的简略信息: + +- Windows 10 - 包含微软提供给我们的所有软件 +- Windows 10N - 此版本不包含媒体播放器 +- Windows 10KN - 此版本没有媒体播放能力 +- Windows 10单语言版 - 仅预装一种语言 + +3. 我选择了第一个选项 " Windows 10"并且单击"确认".之后我要选择语言,我选择了"英语" + +微软给我提供了两个下载链接.一个是32位版,另一个是64位版.我单击了64位版--这与我的电脑架构相同. + +![Download Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Download-Windows-10.jpg) + +下载Windows 10 + +我的带宽是15M的,下载了整整3个小时.不幸的是微软没有提供系统的种子文件,否则整个过程会更加舒畅.镜像大小为 3.8 GB(译者注:就我的10M小水管,我使用迅雷下载用时50分钟). + +我找不到更小的镜像,微软并没有为Windows提供网络安装镜像.我也没有办法在下载完成后去校验哈希值. + +我十分惊讶,Windows在这样的问题上居然如此漫不经心.为了验证这个镜像是否正确下载,我需要把它刻到光盘上或者复制到我的U盘上然后启动它,一直静静的看着它安装直到安装完成. + +首先,我用dd命令将win10的iso镜像刻录到U盘上 + + # dd if=/home/avi/Downloads/Win10_English_x64.iso of=/dev/sdb1 bs=512M; sync + +这需要一点时间.在此之后我重启系统并在UEFI(BIOS)设置中选择从我的U盘启动. + +#### 系统要求 #### + +升级 + +- 仅支持从Windows 7 SP1或者Windows 8.1升级 + +重新安装 + +- 处理器: 1GHz 以上 +- 内存: 1GB以上(32位),2GB以上(64位) +- 硬盘: 16GB以上(32位),20GB以上(64位) +- 显卡: 支持DirectX 9或更新 + WDDM 1.0 驱动 + +###Windows 10 安装过程### + +1. Windows 10启动成功了.他们又换了logo,但是仍然没有信息提示我它正在做什么. + +![Windows 10 Logo](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Logo.jpg) + +Windows 10 Logo + +2. 选择安装语言,时区,键盘,输入法,点击下一步 + +![Select Language and Time](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Language-and-Time.jpg) + +选择语言和时区 + +3. 点击'现在安装' + +![Install Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Windows-10.jpg) + +安装Windows 10 + +4. 下一步是输入密钥,我点击了跳过 + +![Windows 10 Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Product-Key.jpg) + +Windows 10 产品密钥 + +5. 从列表中选择一个系统版本.我选择了Windows 10专业版 + +![Select Install Operating System](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Operating-System.jpg) + +选择系统版本 + +6. 到了协议部分,选中"我接受"然后点击下一步 + +![Accept License](http://www.tecmint.com/wp-content/uploads/2015/08/Accept-License.jpg) + +同意协议 + +7. 下一步是选择(从Windows的老版本)升级到Windows 10或者安装Windows.我搞不懂为什么微软要让我自己选择:"安装Windows"被微软建议为"高级"选项.但是我还是选择了"安装Windows". + +![Select Installation Type](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Installation-Type.jpg) + +选择安装类型 + +8. 选择驱动器,点击"下一步" + +![Select Install Drive](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Drive.jpg) + +选择安装盘 + +9. 安装程序开始复制文件,准备文件,安装更新,之后进行收尾.(如果安装程序能在安装时输出一堆字符来表示他在做什么就更好了) + +![Installing Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Installing-Windows.jpg) + +安装 Windows + +10. 在此之后Windows重启了.他们说为了继续,我们需要重启 + +![Windows Installation Process](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Installation-Process.jpg) + +安装进程 + +11. 我看到了一个写着"正在准备Windows"的界面.它停了整整五分多钟,仍然没有说明它正在做什么.没有输出. + +![Windows Getting Ready](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Getting-Ready.jpg) + +正在准备Windows + +12. 又到了输入产品密钥的时间.我点击了"以后再说",并使用快速设置 + +![Enter Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Enter-Product-Key.jpg) + +输入产品密钥 + +![Select Express Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Express-Settings.jpg) + +使用快速设置 + + +13. 又出现了三个界面,作为Linux用户我认为此处应有信息来告诉我安装程序在做什么,但是我想多了 +![Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Loading-Windows.jpg) + +载入 Windows + +![Getting Updates](http://www.tecmint.com/wp-content/uploads/2015/08/Getting-Updates.jpg) + +获取更新 + +![Still Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Still-Loading-Windows.jpg) + +还是载入 Windows + +14. 安装程序想要知道谁拥有这台机器,"我的组织"或者我自己 + +![Select Organization](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Organization.jpg) + +选择组织 + +15. 安装程序提示我加入"Aruze Ad"或者"加入域".在单击继续之前,我选择了后者. + +![Connect Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Connect-Windows.jpg) + +连接网络 + +16. 安装程序让我新建一个账户.所以我输入了 "user_name"并点击下一步,我觉得我会收到一个要求我必须输入密码的信息. + +![Create Account](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Account.jpg) + +新建账户 + +17. 让我惊讶的是Windows甚至都没有警告/发现我必须创建密码.真粗心.不管怎样,现在我可以体验系统了. + +![Windows 10 Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Desktop.jpg) + +Windows 10的桌面环境 + +#### Linux用户(我)直到现在的体验 #### + +- 没有网络安装镜像 +- 镜像文件太臃肿了 +- 没有验证iso是否为正确的方法(官方没有提供哈希值) +- 启动与安装方式仍然与XP,Win 7,Win 8相同(可能吧...) +- 和以前一样,安装程序没有输出他正在干什么 - 正在复制什么和正在安装什么软件包 +- 安装程序比Linux发行版的更加直白和简单 + +####测试 Windows#### + +18. 默认桌面很干净,上面只有一个回收站图标.我们可以直接从桌面搜索网络.底部的快捷方式分别是任务预览,网络,微软应用商店.和以前的版本一样,消息栏在右下角. + +![ ](http://www.tecmint.com/wp-content/uploads/2015/08/Deskop-Shortcut-icons.jpg) + +桌面图标 + +19. IE浏览器被换成了Edge浏览器.微软把他们的老IE换成了Edge(斯巴达计划) + +![Microsoft Edge Browser](http://www.tecmint.com/wp-content/uploads/2015/08/Edge-browser.jpg) + +Edge浏览器 + +这个浏览器至少比IE要快.他们有相同的用户界面.它的主页包含新的更新.它还有一个标题是"下一步怎么走".由于它全面的性能提升,它的加载速度非常快.Edge的内存占用看起来一般般. + +![Windows Performance](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Performance.jpg) + +性能 + +Edge也有小娜加成 -- 智能个人助理.支持笔记(在浏览网页时记笔记),分享(在本TAB分享而不必打开其他TAB) + +#### Linux用户(我)此时体验 #### + +20. 微软确实提升了网页浏览体验.我们要看的就是他的稳定性和质量.现在它并不落后. + +21. 对我来说,Edge的内存占用不算太大.但是有很多用户抱怨他的内存占用. + +22. 很难说目前Edge已经准备好了与火狐或Chrome竞争.让我们静观其变. + +#### 更多的视觉体验 #### + +23. 重新设计的开始菜单 -- 看起来很简洁高效.Merto磁贴大部分都会动.预先放置了最通用的应用. + +![Windows Look and Feel](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Look.jpg) + +Windows + +在Linux的Gnome桌面环境下.我仅仅需要按下Win键并输入应用名就可以搜索应用. + +![Search Within Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Within-Desktop.jpg) + +桌面内进行搜索 + +24. 文件浏览器 -- 设计的很简洁.左边是进入文件夹的快捷方式. + +![Windows File Explorer](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-File-Explorer.jpg) + +Windows资源管理器 + +我们的Gnome下的文件管理也同样的简洁高效. + +![File Browser on Gnome](http://www.tecmint.com/wp-content/uploads/2015/08/File-Browser.jpg) + +Gnome 的文件管理 + +25. 设置 -- 尽管Windows 10的设置有点精炼,但是我们还是可以把它与linux的设置进行对比. + +**Windows 的设置** + +![Windows 10 Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Settings.jpg) + +Windows 10 设置 + +**Linux Gnome 上的设置** + +![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Settings.jpg) + +Gnome 的设置 + +26. 应用列表 -- 目前,Linux上的应用列表比之前的版本要好一些 + +**Windows 的应用列表** + +![Application List on Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Application-List-on-Windows-10.jpg) + +Windows 10 的应用列表 + +**Gnome3 的应用列表** + +![Gnome Application List on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Application-List-on-Linux.jpg) + +Gnome3 的应用列表 + +27. 虚拟桌面 -- Windows 10 上的虚拟桌面是近来被提及最多的特性之一 + +这是Windows 10 上的虚拟桌面. + +![Windows Virtual Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Virtual-Desktop.jpg) + +Windows的虚拟桌面 + +这是我们Linux用户使用了超过20年的虚拟桌面. + +![Virtual Desktop on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Virtual-Desktop-on-Linux.jpg) + +Linux的虚拟桌面 + +#### Windows 10 的其他新特性 #### + +28. Windows 10 自带wifi感知.它会把你的wifi密码分享给他人.任何在你wifi范围内并且曾经通过Skype, Outlook, Hotmail 或 Facebook与你联系的人都能够获得你的网络接入权.这个特性的本意是让用户可以省时省力的连接网络. + +在微软对于 Tecmint 的问题的回答中,他们说道 -- 用户需要在每次到一个新的网络环境时自己去同意打开wifi感知.如果我们考虑到网络安全这将是很不安全的一件事.微软的说法并没有说服我. + +29. 从Windows 7 和 Windows 8.1升级可以省下买新版的花费.(家庭版$119 专业版$199 ) + +30. 微软发布了第一个累积更新,这个更新在一小部分设备上会让系统一直重启.Windows可能不知道这个问题或者不知道它发生的原因. + +31. 微软内建的禁用/隐藏我不想要的更新的功能在我这不起作用.这意味着一旦更新开始推送,你没有方法去禁用/隐藏他们.对不住啦,Windows 用户. + +#### Windows 10 包含的来源于Linux的功能 #### + +Windows 10有很多直接取自Linux的功能.如果Linux不已GPL发布的话,以下下这些功能永远不会出现在Windows上. + +32. 包管理器 -- 是的,你没有听错!Windows 10内建了一个包管理器.它只在Power Shell下工作.OneGet是Windows的官方包管理器. + +![Windows 10 Package Manager](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Package-Manager.jpg) + + Windows 10的包管理器 + +- 无国界的Windows +- 扁平化图标 +- 虚拟桌面 +- 离线/在线搜索一体化 +- 手机/桌面系统一体化 + +### 总体印象### + +- 响应速度提升 +- 动画很好看 +- 资源占用少 +- 电池续航提升 +- Edge浏览器坚如磐石 +- 支持树莓派 2 +- Windows 10好的原因是Windows 8/8.1没有达到公众预期并且坏的可以 +- 旧瓶装新酒:Windows 10基本上就是以前的那一套换上新的图标 + +测试后我对Windows 10的评价是:Windows 10 在视觉和感觉上做了一些更新(就如同Windows经常做的那样).我要为斯巴达计划,虚拟桌面,命令行包管理器,整合在线/离线搜索的搜索栏点赞.这确实是一个更新后的产品 ,但是认为Windows 10将是Linux的最后一个棺材钉的人错了. + +Linux走在Windows前面.它们的做事方法并不相同.在以后的一段时间里Windows不会站到Linux这一旁.Linux用户也不必去使用Windows 10. + +这就是我要说的.希望你喜欢本文.如果你们喜欢本篇文章我会再写一些你们喜欢读的有趣的文章.在下方留下你的有价值的评论. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/a-linux-user-using-Windows-10-after-more-than-8-years-see-comparison/ + +作者:[vishek Kumar][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者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 From e90ae8c9e8a056935842727bb7e2bdb9510139be Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Tue, 12 Jan 2016 05:27:49 +0800 Subject: [PATCH 0826/1710] [translating] Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS --- ...60111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md b/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md index 083ca3b595..c11a4ff04c 100644 --- a/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md +++ b/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md @@ -1,3 +1,5 @@ +#translating by name1e5s + Ubuntu ‘Spyware’ Will Be Disabled In Ubuntu 16.04 LTS ================================================================================ Controversial feature scaled back to help boost Ubuntu's privacy credentials From 812b43daf1b08dff738e044fa628f24ea42d16af Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Mon, 11 Jan 2016 23:35:34 +0800 Subject: [PATCH 0827/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]=2020151208=206=20creative=20ways=20to=20use=20ownCloud?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【翻译完成】使用 ownCloud 的六个创意方法 --- ...0151208 6 creative ways to use ownCloud.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 translated/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md diff --git a/translated/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md b/translated/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md new file mode 100644 index 0000000000..5d81ed9cdf --- /dev/null +++ b/translated/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md @@ -0,0 +1,95 @@ +GHLandy Translated + +使用 ownCloud 的六个创意方法 +================================================================================ +![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc-open-source-yearbook-lead1-inc0335020sw-201511-01.png) + +图片来源:Opensource.com + +[ownCloud][1] 是一个自我托管且开源的文件同步和共享服务上。就像 "big boys" Dropbox、Google Drive、Box 和其他的同类服务一样,ownCloud 可以让你访问自己的文件、日历、联系人和其他数据。你可以在自己设备之间进行任意数据(包括它自身的一部分)同步以及给其他人分享文件。然而,ownCloud 并非只能运行在它自己的开发商之中,试试[将 ownCloud 运行在其他服务器上][2] + +现在,一起来看看在 ownCloud 上的六件创意事件。其中一些是由于 ownCloud 的开源才得以完成,而另外的则是 ownCloud 自身特有的功能。 + +### 1. 可扩展的 ownCloud 派集群 ### + +由于 ownCloud 是开源的,你可以选择将它运行在自己的服务器中,或者从你信任的服务器提供商那里获取空间——没必要将你的文件存储在大公司的服务器中,谁知他们将你的文件存储到哪里去。[点击此处查看部分 ownCloud 服务商][3],或者下载该服务软件到你的虚拟主机中[搭建自己的服务器][4]. + +![](https://opensource.com/sites/default/files/images/life-uploads/banana-pi-owncloud-cluster.jpg) + +拍摄: Jörn Friedrich Dreyer. [CC BY-SA 4.0.][5] + +我们见过最具创意的事情就是组建 [香蕉派集群][6] 和 [树莓派集群][7]。ownCloud 的扩展性通常是成千上万的用户来完成的,这些人则将它往不同方向发展,通过大量的小型系统集群在一起,就可以创建出运行速度非常快的 ownCloud。酷毙了! + +### 2. 密码同步 ### + +为了让 ownCloud 更容易扩展,我们需要将它模块化,并拥有 [ownCloud app store][8]。然后你就可以在里边搜索音乐、视频播放器、日历、联系人、生产应用、游戏、应用框架等。 + +仅从 200 多个可用应用中挑选一个是一件非常困难的事,但密码管理则是一个很好的特性。ownCloud app store 里边至少有三款这种应用:[Passwords][9]、[Secure Container][10] 和 [Passman][11]。 + +![](https://opensource.com/sites/default/files/images/life-uploads/password.png) + +### 3. 随心所欲地存储文件 ### + +外部存储允许你通过接口将现有数据联系到 ownCloud,让你轻松访问存储在FTP、WebDAV、Amazon S3,甚至 Dropbox 和Google Drive。 + +注:youtube 视频 + + +DropBox 喜欢创建自己的 “围墙式花园”,只有注册用户之间才可以进行协作;假如你通过Google Drive 来分享文件,你的同伴也必须要有一个 Google 账号才可以访问的分享。通过 ownCloud 的外部存储功能,你可以轻松打破这些规则障碍。 + +最有创意的就是把 Google Drive 和 Dropbox 添加为外部存储。这样你就可以无缝的使用它们,并使用不需要账户地链接把文件分享给和你协作的人。 + +### 4. 下载以上传的文件 ### + +由于 ownCloud 的开源,人们可以不受公司需求限制地向它共享代码,增加新特性。共献者关注的往往是安全和隐私,所以 ownCloud 引入的特性常常比别人的要早,比如通过密码保护的公共链接和[设置失效期限][12]。 + +现在,ownCloud 可以配置分享链接的读写权限了,这就是说链接的访问者可以无缝的编辑你分享给他们的文件(不管是否有密码保护),或者在不提供他们的私人数据来登录其他服务的情况下将文件上传到服务器。 + +注:youtube 视频 + + +对于有人想给你分享大体积的文件时,这个特性就非常有用了。相比于上传到第三方站点、然后给你发送一个连接、你再去下载文件(通常需要登录),ownCloud 仅需要上传文件到你提供的分享文件夹、你就可以买上获取到文件了。 + +### 5. 免费却又安全的存储空间 ### + +之前就强调过,我们的代码贡献者最关注的就是安全和隐私,这就是 ownCloud 中有用于加密和解密存储数据的应用的原因。 + +通过使用 ownCloud 将你的文件存储到 Dropbox 或者 Google Drive,则会违背控制数据以及保持数据隐私的原则。但是加密应用则刚好可以满足安全及隐私问题。在发送数据给这些提供商前进行数据加密,并在取回数据的时候进行解密,你的数据就会变得很安全。 + +### 6. 在你的可控范围内分享文件 ### + +作为开源项目,ownCloud 没有必要自建 “围墙式花园”。进入联邦云共享:[developed and published by ownCloud][13] 协议使不同的文件同步和共享服务器可以彼此之间进行通信,并能够安全地传输文件。联邦云共享本身有一个有趣的故事:[22 所德国大学][14] 想要为自身的 500,000 学生建立一个庞大的云服务,但是每个大学都想控制自己学生数据。于是乎,我们需要一个可行性解决方案:也就是联邦云服务。该解决方案让让学生保持连接,使得他们可以无缝的协同工作。同时,每个大学的系统管理员保持着对自己学生创建的文件的控制权,如限制存储或者限制什么人、什么文件以及如何共享。 + +注:youtube 视频 + + +并且,这项令人崇敬的技术并没有限制于德国的大学之间,而是每个 ownCloud 用户都能在自己的用户设置中找到自己的 [联邦云 ID][15],并将之分享给同伴。 + +现在你明白了吧。仅六个方法,ownCloud 就能让人们完成特殊和特别的事。而是这一切成为可能的,就是 ownCloud 的开源 —— 设计用来释放你数据。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/15/12/6-creative-ways-use-owncloud + +作者:[Jos Poortvliet][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jospoortvliet +[1]:https://owncloud.com/ +[2]:https://blogs.fsfe.org/mk/new-stickers-and-leaflets-no-cloud-and-e-mail-self-defense/ +[3]:https://owncloud.org/providers +[4]:https://owncloud.org/install/#instructions-server +[5]:https://creativecommons.org/licenses/by-sa/4.0/ +[6]:http://www.owncluster.de/ +[7]:https://christopherjcoleman.wordpress.com/2013/01/05/host-your-owncloud-on-a-raspberry-pi-cluster/ +[8]:https://apps.owncloud.com/ +[9]:https://apps.owncloud.com/content/show.php/Passwords?content=170480 +[10]:https://apps.owncloud.com/content/show.php/Secure+Container?content=167268 +[11]:https://apps.owncloud.com/content/show.php/Passman?content=166285 +[12]:https://owncloud.com/owncloud45-community/ +[13]:http://karlitschek.de/2015/08/announcing-the-draft-federated-cloud-sharing-api/ +[14]:https://owncloud.com/customer/sciebo/ +[15]:https://owncloud.org/federation/ From bd58213f19fde26d63555e89da187ed54204cb0b Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Mon, 11 Jan 2016 23:36:25 +0800 Subject: [PATCH 0828/1710] Delete 20151208 6 creative ways to use ownCloud.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成译文,并放在相应位置。 --- ...0151208 6 creative ways to use ownCloud.md | 96 ------------------- 1 file changed, 96 deletions(-) delete mode 100644 sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md diff --git a/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md b/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md deleted file mode 100644 index dd099648a7..0000000000 --- a/sources/talk/yearbook2015/20151208 6 creative ways to use ownCloud.md +++ /dev/null @@ -1,96 +0,0 @@ -GHLandy Translating - -6 creative ways to use ownCloud -================================================================================ -![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc-open-source-yearbook-lead1-inc0335020sw-201511-01.png) - -Image by : Opensource.com - -[ownCloud][1] is a self-hosted open source file sync and share server. Like "big boys" Dropbox, Google Drive, Box, and others, ownCloud lets you access your files, calendar, contacts, and other data. You can synchronize everything (or part of it) between your devices and share files with others. But ownCloud can do much more than its proprietary, [hosted-on-somebody-else's-computer competitors][2]. - -Let's look at six creative things ownCloud can do. Some of these are possible because ownCloud is open source, whereas others are just unique features it offers. - -### 1. A scalable ownCloud Pi cluster ### - -Because ownCloud is open source, you can choose between self-hosting on your own server or renting space from a provider you trust—no need to put your files at a big company that stores it who knows where. [Find some ownCloud providers here][3] or grab packages or a virtual machine for [your own server here][4]. - -![](https://opensource.com/sites/default/files/images/life-uploads/banana-pi-owncloud-cluster.jpg) - -Photo by Jörn Friedrich Dreyer. [CC BY-SA 4.0.][5] - -The most creative things we've seen are a [Banana Pi cluster][6] and a [Raspberry Pi cluster][7]. Although ownCloud's scalability is often used to deploy to hundreds of thousands of users, some folks out there take it in a different direction, bringing multiple tiny systems together to make a super-fast ownCloud. Kudos! - -### 2. Keep your passwords synced ### - -To make ownCloud easier to extend, we have made it extremely modular and have an [ownCloud app store][8]. There you can find things like music and video players, calendars, contacts, productivity apps, games, a sketching app, and much more. - -Picking only one app from the almost 200 available is hard, but managing passwords is certainly a unique feature. There are no less than three apps providing this functionality: [Passwords][9], [Secure Container][10], and [Passman][11]. - -![](https://opensource.com/sites/default/files/images/life-uploads/password.png) - -### 3. Store your files where you want ### - -External storage allows you to hook your existing data storage into ownCloud, letting you to access files stored on FTP, WebDAV, Amazon S3, and even Dropbox and Google Drive through one interface. - -注:youtube 视频 - - -The "big boys" like to create their own little walled gardens—Box user can only collaborate with other Box users; and if you want to share your files from Google Drive, your mate needs a Google account or they can't do much. With ownCloud's external storage, you can break these barriers. - -A very creative solution is adding Google Drive and Dropbox as external storage. You can work with files on both seamlessly and share them with others through a simple link—no account needed to work with you! - -### 4. Get files uploaded ### - -Because ownCloud is open source, people contribute interesting features without being limited by corporate requirements. Our contributors have always cared about security and privacy, so ownCloud introduced features such as protecting a public link with a password and setting an expire date [years before anybody else did][12]. - -Today, ownCloud has the ability to configure a shared link as read-write, which means visitors can seamlessly edit the files you share with them (protected with a password or not) or upload new files to your server without being forced to sign up to another web service that wants their private data. - -注:youtube 视频 - - -This is great for when people want to share a large file with you. Rather than having to upload it to a third-party site, send you a link, and make you go there and download it (often requiring a login), they can just upload it to a shared folder you provide, and you can get to work right away. - -### 5. Get free secure storage ### - -We already talked about how many of our contributors care about security and privacy. That's why ownCloud has an app that can encrypt and decrypt stored data. - -Using ownCloud to store your files on Dropbox or Google Drive defeats the whole idea of retaking control of your data and keeping it private. The Encryption app changes that. By encrypting data before sending it to these providers and decrypting it upon retrieval, your data is safe as kittens. - -### 6. Share your files and stay in control ### - -As an open source project, ownCloud has no stake in building walled gardens. Enter Federated Cloud Sharing: a protocol [developed and published by ownCloud][13] that enables different file sync and share servers to talk to one another and exchange files securely. Federated Cloud Sharing has an interesting history. [Twenty-two German universities][14] decided to build a huge cloud for their 500,000 students. But as each university wanted to stay in control of the data of their own students, a creative solution was needed: Federated Cloud Sharing. The solution now connects all these universities so the students can seamlessly work together. At the same time, the system administrators at each university stay in control of the files their students have created and can apply policies, such as storage restrictions, or limitations on what, with whom, and how files can be shared. - -注:youtube 视频 - - -And this awesome technology isn't limited to German universities: Every ownCloud user can find their [Federated Cloud ID][15] in their user settings and share it with others. - -So there you have it. Six ways ownCloud enables people to do special and unique things, all made possible because it is open source and designed to help you liberate your data. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/15/12/6-creative-ways-use-owncloud - -作者:[Jos Poortvliet][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/jospoortvliet -[1]:https://owncloud.com/ -[2]:https://blogs.fsfe.org/mk/new-stickers-and-leaflets-no-cloud-and-e-mail-self-defense/ -[3]:https://owncloud.org/providers -[4]:https://owncloud.org/install/#instructions-server -[5]:https://creativecommons.org/licenses/by-sa/4.0/ -[6]:http://www.owncluster.de/ -[7]:https://christopherjcoleman.wordpress.com/2013/01/05/host-your-owncloud-on-a-raspberry-pi-cluster/ -[8]:https://apps.owncloud.com/ -[9]:https://apps.owncloud.com/content/show.php/Passwords?content=170480 -[10]:https://apps.owncloud.com/content/show.php/Secure+Container?content=167268 -[11]:https://apps.owncloud.com/content/show.php/Passman?content=166285 -[12]:https://owncloud.com/owncloud45-community/ -[13]:http://karlitschek.de/2015/08/announcing-the-draft-federated-cloud-sharing-api/ -[14]:https://owncloud.com/customer/sciebo/ -[15]:https://owncloud.org/federation/ From 873ab1321daa82422f39c792ba06ea810cfc1632 Mon Sep 17 00:00:00 2001 From: Rubik Date: Tue, 12 Jan 2016 00:37:07 +0800 Subject: [PATCH 0829/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]Haohong=20WANG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gn and Software Evolution--Step by Step.md | 65 +++++++++---------- 1 file changed, 32 insertions(+), 33 deletions(-) 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 index ea43c7af47..614f10bb85 100644 --- 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 @@ -1,19 +1,18 @@ -HaohongWANG Translating -18 Years of GNOME Design and Software Evolution: Step by Step +一步一脚印:GNOME十八年进化史 ================================================================================ 注: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. +[GNOME][1] (GNU Object Model Environment)由两位墨西哥的程序员Miguel de Icaza和Federico Mena 始创于1997年8月15日。GNOME自由软件的桌面环境和应用程序计划由志愿者和全职开发者来开发。所有的GNOME桌面环境都由开源软件组成,并且支持Linux, FreeBSD, OpenBSD 等操作系统。 -Now we move to 1997 and see the first version of GNOME: +现在就让我穿越到1997年来看看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.0** (1997) – GNOME 发布的第一个版本 ![GNOME 1.2 Bongo](https://raw.githubusercontent.com/paulcarroty/Articles/master/GNOME_History/1.2/1361441938.or.86429.png) @@ -29,103 +28,103 @@ Now we move to 1997 and see the first version of GNOME: **GNOME 2.0**, 2002 -Major upgrade based on GTK+2. Introduction of the Human Interface Guidelines. +基于GTK+2的重大更新。引入了人机界面指南。 ![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. +首次发布Epiphany浏览器,增添了辅助功能。 ![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. +启用Nautilus空间文件管理工具同时引入了新的GTK+ (译注:跨平台图形用户界面工具包)对话框。这个转瞬即逝的版本变更被称做是GNOME的一个分支:GoneME。 ![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 +改良了对可移动设备的支持并新增了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. +减小内存需求,改进显示界面。增加网络控制、磁盘挂载和回收站组件以及Totem影片播放器和Sound Juicer CD抓取工具。 ![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 +改进了Nautilus以及跨平台剪切/粘贴功能的整合。 新增Evince PDF阅读器;新预设主题Clearlooks;新增菜单编辑器、管理员工具与环状管理器。基于支持Cairo的GTK+2.8。 ![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. +改善显示效果;增强易用性;基于GStreamer 0.10多媒体框架。增加了Ekiga视频会议应用,Deskbar搜索工具,Pessulus权限管理器,和Sabayon系统管理员工具和快速切换用户功能。 ![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 +界面改良。增加了Tomboy笔记应用,Baobab磁盘用量分析应用,Orca屏幕朗读器以及GNOME 电源管理程序(以延长笔记本电池寿命);改进了Totem, Nautilus, 使用了新的图标主题。基于GTK+ 2.0 的全新显示对话框。 ![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. +界面改良。增加了Seahorse GPG安全应用,可以对邮件和本地文件进行加密;Baobab增加了环状图表显示方式;改进了Orca,Evince, Epiphany, GNOME电源管理,音量控制;增加了两款新游戏:GNOME数独和国际象棋。支持MP3和AAC音频解码。 ![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. +发布十周年版本。Evolution增加了备份功能;改进了Epiphany,EOG,GNOME电源管理以及Seahorse中的Keyring密码管理方式;在Evince中可以编辑PDF文档;文件管理界面中整合了搜索模块;自动安装多媒体解码器。 ![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. +新增Cheese应用,它是一个可以截取网络摄像头和远程桌面图像的工具;Metacity支持基本的窗口叠加复合;引入GVFS(译注:GNOME Virtual file system,GNOME虚拟文件系统);改善了Totem播放DVD 和YouTube的效果,支持播放MythTV;在Evolution中新增了谷歌日历以及为信息添加标签的功能;改进了Evince, Tomboy, Sound Juicer和计算器。 ![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. +新增了Empathy即时通讯软件,Ekiga升级至3.0版本;Nautilus支持标签式浏览,更好的支持了多屏幕显示方式和数字电视功能。 ![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. +新增光盘刻录应用Brasero;简化了文件分享的流程,改进了媒体播放器的性能;支持多显示器和指纹识别器。 ![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 蓝牙模块;改进了Epiphany ,Empathy,时间追踪器和辅助功能。GTK+升级至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. +改进了Nautilus,Empathy,Tomboy,Evince,Time Tracker,Epiphany和 Vinagre。借助基于libimobiledevice(译注:支持iOS®设备跨平台使用的工具协议库)的GVFS可以访问部分iPod 和iPod Touch。 ![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. +新增Rygel 媒体分享工具和GNOME色彩管理器;改进了Empathy即时通讯客户端,Evince,Nautilus文件管理器等。计划于2010年9月发布3.0版本,因此大部分开发者的精力都由2.3x转移至了3.0版本。 ### GNOME 3 ### @@ -133,57 +132,57 @@ Addition of Rygel and GNOME Color Manager. Improvements to Empathy instant messe **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 Shell,一个重新设计的、具有更简练更集中的选项的框架。基于Mallard标记语言的话题导向型帮助。支持窗口并列堆叠。启用新的视觉主题和字体。采用GTK+3.0,具有更好的语言绑定,主题,触控以及多平台支持。去除了长期弃用的API。 ![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. +支持在线帐户,Web应用;新增通讯录应用和文档文件管理器;文件管理器支持快速预览;整合性能,更新文档以及对外观的一些小改进。 ![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 应用程序外观:文件,Epiphany(更名为Web),GNOME 通讯录。可以在Activities Overview中搜索本地文件。支持应用菜单。焕然一新的界面元素:崭新的颜色拾取器,重新设计的滚动条,更易使用的旋转按钮以及可隐藏的标题栏。支持视角平滑。全新的动态壁纸。在系统设置中增添了对Wacom数位板的支持。更简便的扩展应用管理。更好的硬件支持。面向主题的文档。在Empathy中提供了对视频电话和动态信息的支持。更好的辅助功能:提升Orca整合度,增强高对比度模式适配性,以及全新的缩放设置。大量应用和细节的改进。 ![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. +全新设计的核心元素:新的应用按钮和改进的Activities Overview布局。新的登陆锁定界面。重新设计的通知栏。通知现在更智能,可见性更高,同时更容易操作。改进了系统设置的界面和设定逻辑。用户菜单默认显示关机操作。整合了输入法。辅助功能一直开启。新的应用:Boxes虚拟机,在GNOME 3.4中发布了预览版。Clocks时钟, 可以显示世界时间。升级了磁盘用量分析,Empathy和 Font Viewer的外观。改进了Orca对布莱叶盲文的支持。 在Web浏览器中, 用最常访问页面取代了之前的空白起始页,增添了更好的全屏模式并使用了WebKit2测试版引擎. Evolution 开始使用WebKit提交邮件。 改进了磁盘功能。 改进了文件管理应用即之前的Nautilus, 新增诸如最近访问的文件和搜索等功能。 ![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 在线帐户添加了对更多供应商的支持。浏览器正式启用WebKit2引擎。文档支持双页模式并且整合了Google 文档。通讯录的UI升级。GNOME Files,GNOME Boxes和GNOME Disks都得到了大幅改进。两款全新的GNOME核心应用:GNOME时钟和GNOME天气。 ![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 Maps, GNOME Notes, GNOME Music 和GNOME Photos。新的基于位置的功能,如自动时区和世界时间。支持高分辨率及智能卡。 基于GLib 2.38提供了对D-Bus的支持。 ![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. +改进了Overview中的键盘导航和窗口选择,基于易用性测试对初始设置进行了修改。有线网络重新回到了状态栏上,在应用预览中可以自定义应用文件夹。在大量应用的对话框中引入了新的GTK+小工具同时使用了新的GTK+标签风格。GNOME Videos,GNOME 终端以及Gedit都改用了全新外观,更贴合HIG(译注:Human Interface Guidelines,人机界面指南)。在GNOME Shell的终端仿真器中提供了搜索预测功能。增强了对GNOME软件和高密度显示屏的支持。提供了新的录音工具。增加了新的桌面通知接口。在Wayland中的进程被置于更易使用的位置并可以进行选择性预览。 ![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 Software supports managing installed add-ons. 在GNOME Photos中可以访问Google相册。重绘了Evince,数独,扫雷和天气应用的用户界面,同时增加了一款叫做Hitori 的GNOME游戏。 ![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. +33,000处改变。主要修改了UI的配色方案。 增加了即现式滚动条。通知窗口中整合了日历应用。对文件管理器,图像查看器和地图等大量应用进行了微调。可以预览应用程序。进一步使用Wayland取代X11。 -Thanks to [Wikipedia][2] for short changelogs review and another big thanks for GNOME Project! Stay tuned! +感谢GNOME Project及[Wikipedia][2]提供的变更日志!感谢阅读!(译注:原文此处为“敬请期待”。) -------------------------------------------------------------------------------- @@ -191,7 +190,7 @@ Thanks to [Wikipedia][2] for short changelogs review and another big thanks for via: https://tlhp.cf/18-years-of-gnome-evolution/ 作者:[Pavlo Rudyi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Haohong WANG](https://github.com/HaohongWANG) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5aa3c9a910659ca434eaf56db459a190e0f7e29c Mon Sep 17 00:00:00 2001 From: Rubik Date: Tue, 12 Jan 2016 00:55:57 +0800 Subject: [PATCH 0830/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]Haohong=20WANG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 初次翻译,欢迎批评指正,谢谢。 --- ... Years of GNOME Design and Software Evolution--Step by Step.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md (100%) diff --git a/sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md b/translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md similarity index 100% rename from sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md rename to translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md From 7613015e25632507870990f471f0a0af3a23e7ec Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 12 Jan 2016 14:38:14 +0800 Subject: [PATCH 0831/1710] =?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 --- ...20151030 80 Linux Monitoring Tools for SysAdmins.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md b/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md index 25fdc1df44..4733a41d17 100644 --- a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md +++ b/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md @@ -109,7 +109,7 @@ iptraf 收集的各种指标,如 TCP 连接数据包和字节数,端口统 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ngrep.jpg) -ngrep 就是 grep 但是相对于网络层的。pcap 意识到后允许其指定扩展规则或十六进制表达式来匹配数据包。 +如果不是网络层的话,ngrep 就是 grep。pcap 意识到后允许其指定扩展规则或十六进制表达式来匹配数据包。 #### 18. [MRTG][17] #### @@ -127,7 +127,7 @@ Bmon 能监控并帮助你调试网络。它能捕获网络相关的统计数据 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/traceroute.jpg) -Traceroute 一个内置工具,能测试路由和数据包在网络中的延迟。 +Traceroute 是一个内置工具,能显示路由和测试数据包在网络中的延迟。 #### 21. [IPTState][19] #### @@ -137,7 +137,7 @@ IPTState 可以让你跨越 iptables 来监控流量,并通过你指定的条 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/darkstat.jpg) -Darkstat 能捕获网络流量并计算统计的数据。该报告需要在浏览器中进行查看,它为你提供了一个非常棒的图形用户界面。 +Darkstat 能捕获网络流量并计算使用情况的统计数据。该报告保存在一个简单的HTTP服务器中,它为你提供了一个非常棒的图形用户界面。 #### 23. [vnStat][21] #### @@ -153,7 +153,7 @@ netstat 是一个内置的工具,它能显示 TCP 网络连接,路由表和 #### 25. ss #### -并非 netstat,最好使用 ss。ss 命令能够显示的信息比 netstat 更多,也更快。如果你想查看统计结果的总信息,你可以使用命令 `ss -s`。 +比起 netstat,使用 ss 更好。ss 命令能够显示的信息比 netstat 更多,也更快。如果你想查看统计结果的总信息,你可以使用命令 `ss -s`。 #### 26. [nmap][22] #### @@ -211,7 +211,7 @@ Saidar 是一个非常小的工具,为你提供有关系统资源的基础信 RRDtool 是用来处理 RRD 数据库的工具。RRDtool 旨在处理时间序列数据,如 CPU 负载,温度等。该工具提供了一种方法来提取 RRD 数据并以图形界面显示。 -#### 35. [monit][31] #### +#### 35. [monit][31] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/monit.jpg) From 5657efbe1a0e345c61c0ceea992c0bd436012ace Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Tue, 12 Jan 2016 23:35:50 +0800 Subject: [PATCH 0832/1710] [translated]Ubuntu-\342\200\230Spyware\342\200\231-Will-Be-Disabled-In-Ubuntu-16.04-LTS --- ...re Will Be Disabled In Ubuntu 16.04 LTS.md | 88 ------------------- ...are’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md | 85 ++++++++++++++++++ 2 files changed, 85 insertions(+), 88 deletions(-) delete mode 100644 sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md create mode 100644 translated/news/Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md diff --git a/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md b/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md deleted file mode 100644 index c11a4ff04c..0000000000 --- a/sources/news/20160111 Ubuntu Spyware Will Be Disabled In Ubuntu 16.04 LTS.md +++ /dev/null @@ -1,88 +0,0 @@ -#translating by name1e5s - -Ubuntu ‘Spyware’ Will Be Disabled In Ubuntu 16.04 LTS -================================================================================ -Controversial feature scaled back to help boost Ubuntu's privacy credentials - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/as2.jpg) - -**Unity’s controversial online search feature is being disabled by default in Ubuntu 16.04 LTS, due for release in April.** - -Search terms typed into the Unity 7 Dash search bar will **only show local file, folder and app results**. No search terms will be sent to Canonical or passed to third party results providers, as is currently the case. - -> ‘Unity online searches are now turned off by default.’ - -In currently supported versions of Ubuntu the Dash sends search queries the user enters to a remote web server run by Canonical, the company behind Ubuntu. - -No user-identifiable data is included with these queries, which are used to retrieve contextually relevant results from over 50 online services, including Wikipedia, YouTube and The Weather Channel. - -A switch to disable online search entirely is available in Ubuntu through the **Ubuntu System Settings > Privacy pane**. - -But some in the open-source community object to the feature being turned on by default. - -### Ubuntu Online Search Controversy ### - -> ‘Richard Stallman describes the feature as ‘spyware” - -Boiling over since 2012, the open-source community was quick to express concerns about user privacy in the wake of Ubuntu Amazon integration. Concerns continued with the rollout of the comprehensive ‘Smart Scopes Service’ a year later. - -The furore was so big it led free software stalwart [Richard Stallman to call Ubuntu ‘spyware’][1]. - -[The Electronic Frontier Foundation][2] also shared its concerns in a series of blog posts and suggested that Canonical make the feature opt-in. Privacy International went further than most by awarding Ubuntu’s makers a ‘[Big Brother award][3]‘ for work on, quote: “invading personal privacy”. - -[Canonical][4] maintains that the data collected through Unity’s online search feature is anonymised and “not user-identifiable”. - -In [blog post from 2013 the company explains][5] that it “**make[s] users aware of what data will be collected and which third party services will be queried through a notice right in the Dash, and we only collect data that allows us to deliver a great search experience to Ubuntu users.**” - -### Ubuntu Gets Serious About Data Privacy ### - -Canonical disabled Amazon product results on fresh installs of Ubuntu 14.04 LTS and up (though results from other online sources and services continue to appear until the opt-out is chosen). - -For the next LTS, Ubuntu 16.04, Canonical curtails the contentious online searching feature entirely, right out of the box, just like the EFF asked them to do in 2012. - -“None of your search terms will leave your computer,” [Ubuntu desktop manager Will Cooke][6] explains, noting that the “finer control over what is searched and [the] more targeted results” that Unity 8 offers “cannot be added into Unity 7.” - -It’s for this reason that “the online search features [of Unity 7] will be retired.” - -The change will also lower the support and infrastructure burden of Unity 7. With fewer Unity search results to handle Canonical can redirect time and engineering effort to more exciting avenues, like the promising Unity 8 desktop. - -### You Will Need to Opt-In To Get Online Results ### - -![Privacy settings in Ubuntu let you opt in to seeing online results](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/privacy.jpg) - -Privacy settings in Ubuntu let you opt in to seeing online results - -The decision to disable the online search element of the Ubuntu desktop will be greeted with considerable cheer by many in the open-source and free software communities. - -But not everyone is antagonised by the semantic search skills being served up in the Dash. - -If you think you’ll miss the efficiency of searching and previewing weather, news and other content through the Dash, **you can re-enable online search results** in a couple of clicks. Just head to Ubuntu **System Settings > Privacy > Search** and set the slider to ‘**On**‘. - -Flicking this won’t automatically bring back Amazon product results. The ‘shopping lens’ is decoupled from the opt-in toggle. You’ll need to okay a second opt-in to see product results from Amazon (and Skimlinks). - -### Summary ### - -- Ubuntu 16.04 LTS will no longer search online sources in the Dash by default -- Online results can be turned back on manually using a toggle -- A second opt-in allows Amazon product results -- The change only affects new installs. In-place upgrades will retain user preferences - -Do you agree with this decision? Or is Canonical about to reduce the experience of Ubuntu for new users? Let us know in the comments. - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2016/01/ubuntu-online-search-feature-disabled-16-04 - -作者:[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://arstechnica.com/information-technology/2012/12/richard-stallman-calls-ubuntu-spyware-because-it-tracks-searches/?utm_source=omgubuntu -[2]:https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks?utm_source=omgubuntu -[3]:http://www.omgubuntu.co.uk/2013/10/ubuntu-wins-big-brother-austria-privacy-award -[4]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/ -[5]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/?utm_source=omgubuntu -[6]:http://www.whizzy.org/2015/12/online-searches-in-the-dash-to-be-off-by-default?utm_source=omgubuntu diff --git a/translated/news/Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md b/translated/news/Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md new file mode 100644 index 0000000000..286ca7472c --- /dev/null +++ b/translated/news/Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md @@ -0,0 +1,85 @@ +Ubuntu的"间谍软件"将在Ubuntu 16.04 LTS中被禁用 +================================================================================ + +出于用户隐私的考虑,Ubuntu阉割了一个有争议的功能. + + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/as2.jpg) + +** Unity 中有争议的在线搜索功能将在四月份发布的Ubuntu 16.04 LTS中被默认禁用 ** + +目前,用户在Unity 7 的Dash搜索栏里**只能搜索到本地文件,文件夹以及应用**.目前的状况是,用户输入的关键词将不会被发送到Canonical或任何第三方内容提供商的服务器里. + +> '现在,Unity的在线搜索在默认状况下是关闭的' + +在目前ubuntu的支持版本中,Dash栏会将用户搜索的关键词发送到Canonical运营的远程服务器中.它发送这些数据以用于从50多家在线服务获取搜索结果,这些服务包括维基百科,YouTube和The Weather Channel. + + + +我们可以选择去**系统设置 > 隐私控制**关闭这项功能.但是,一些在开源社区的功能被默认打开。 + + + +### Ubuntu 在线搜索引发的争议 ### + +> 'Richard Stallman 将这个功能描述为 "间谍软件"' + +早在2012年,在Ubuntu搜索中整合来自亚马逊的内容之后,开源社区表示为其用户的隐私感到担忧.在2013年,‘Smart Scopes 服务’全面推出后,开源社区再度表示担忧. + +风波如此之大,以至于开源界大神[Richard Stallman 都称Ubuntu为"间谍软件"][1]. + +[电子前哨基金会(EFF)][2]也在一系列博文中表达出对此的关注,并且建议Canonical将这个功能做成用户自由选择是否开启的功能.Privacy International比其他的组织走的更远,对于Ubuntu的工作,他给Ubuntu的缔造者发了一个"[老大哥奖][3]" + +[Canonical][4] 坚称Unity的在线搜索功能所收集的数据是匿名的以及"不可识别是来自哪个用户的". + +在[2013年Canoical发布的博文中][5]他们解释道 "** (我们)会使用户了解我们收集哪些信息以及哪些第三方服务商将会在他们搜索时从Dash栏中给出结果.我们只会收集能够提升用户体验的信息.**" + +### Ubuntu开始严肃对待的用户数据隐私### + +Canonical在给Ubuntu 14.04 LTS以及以上版本的更新中禁用了来自亚马逊的结果(尽管来自其他服务商的搜索结果仍然在出现直到你关闭这个选项) + +在下一个LTS(长期支持)版,也就是Ubuntu 16.04,Canonical完全关闭了这个有争议的在线搜索功能,这个功能在用户安装完后就是关闭的.就如同EFF在2012年让他们做的那样. + +"你搜索的关键词将不会逃出你的计算机." [Ubuntu 桌面环境经理Will Cooke][6]解释道,Unity提供的"对于搜索结果的更精细的控制不能添加到Unity 7" + +这也就是"[Unity 7]的在线搜索功能将会退役"的原因. + +这个变化也会减少Unity的支持以及基础设施对于Canonical的负担.Unity提供的搜索结果越少,Canonical就能把时间和工程师放到更加振奋人心的地方,比如更早的发布Unity 8桌面环境. + +### 在Ubuntu 16.04中你需要自己开启在线搜索功能 ### + +![Privacy settings in Ubuntu let you opt in to seeing online results](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/privacy.jpg) + +可以让你打开在线搜索功能的Ubuntu隐私设置 + +禁用Ubuntu桌面的在线搜索功能的决定将获得众多开源/免费软件社区的欢呼.但是并不是每一个人都对Dash提供的语义搜索功能反感,如果你认为你失去了在搜索时预览天气,查看新闻或其他来自Dash在线搜索提供的内容的效率的话.你只需要简单的点几下鼠标就可以**再次打开这个功能**,定位到Ubuntu的**系统设置 > 隐私控制 > 搜索**然后将选项调至'**开启**'/ + +这个选项不会自动把亚马逊的产品信息加入到搜索结果中.如果你想看产品信息的话,需要同意那个设置中的"shipping lens"选项. + +### 总结 ### + + +- 默认情况下,Ubuntu 16.04 LTS的Dash栏将不会搜索到在线结果 +- 可以手动打开在线搜索 +- *系统设置 > 隐私控制 > 搜索**中的第二个选项允许你看到亚马逊的产品信息 +- 这个变动只会影响新安装的系统.从老版本升级的将会保留用户的喜好 + +你同意这个决定吗?还是Cononical要以此提升Ubuntu对于新用户的体验?让我们在评论中揭晓./ + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2016/01/ubuntu-online-search-feature-disabled-16-04 + +作者:[Joey-Elijah Sneddon][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者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://arstechnica.com/information-technology/2012/12/richard-stallman-calls-ubuntu-spyware-because-it-tracks-searches/?utm_source=omgubuntu +[2]:https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks?utm_source=omgubuntu +[3]:http://www.omgubuntu.co.uk/2013/10/ubuntu-wins-big-brother-austria-privacy-award +[4]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/ +[5]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/?utm_source=omgubuntu +[6]:http://www.whizzy.org/2015/12/online-searches-in-the-dash-to-be-off-by-default?utm_source=omgubuntu From 2c35f8488914ebb5e517f924ffbf165ff2a46fc9 Mon Sep 17 00:00:00 2001 From: Yu Haixin <836401406@qq.com> Date: Tue, 12 Jan 2016 15:38:31 +0800 Subject: [PATCH 0833/1710] Update 20160111 Open Source DJ Software Mixxx Version 2.0 Released.md --- ...160111 Open Source DJ Software Mixxx Version 2.0 Released.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md b/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md index 87522476a7..6c7fa5838a 100644 --- a/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md +++ b/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md @@ -1,3 +1,5 @@ +#name1e5s translating + Open Source DJ Software Mixxx Version 2.0 Released ================================================================================ ![](http://itsfoss.com/wp-content/uploads/2016/01/DJ-Software-Mixxx-2-Released.jpg) From bc03fd0fc2929d38057af8135233ab727277577b Mon Sep 17 00:00:00 2001 From: Yu Haixin <836401406@qq.com> Date: Tue, 12 Jan 2016 17:50:40 +0800 Subject: [PATCH 0834/1710] Delete 20160111 Open Source DJ Software Mixxx Version 2.0 Released.md --- ... DJ Software Mixxx Version 2.0 Released.md | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md diff --git a/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md b/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md deleted file mode 100644 index 6c7fa5838a..0000000000 --- a/sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md +++ /dev/null @@ -1,71 +0,0 @@ -#name1e5s translating - -Open Source DJ Software Mixxx Version 2.0 Released -================================================================================ -![](http://itsfoss.com/wp-content/uploads/2016/01/DJ-Software-Mixxx-2-Released.jpg) - -After three years, Open Source DJ mixing software [Mixxx][1] sees a major release in the form of Mixxx version 2.0. - -Mixxx is a cross-platform, free and open source DJ mixing software that provides almost all the features you would need for creating your own mixes. Used by professionals and amateurs alike, Mixxx has been a hot favorite for several years. - -In Mixxx you can use your iTunes library. Its powerful mixing engine supports a number of file format. Over 85 MIDI DJ controllers are supported out-of-the-box along with several HID controllers. There is an Auto DJ option as well to give you a break from mixing. - -Complete features of Mixxx can be found [here][2]. But before that, let’s see what is new in the latest release. - -### What’s new in Mixxx 2.0 ### - -- Dynamic, Resizable Skins -- 4 Decks with Master Sync -- Built-in Effects -- Harmonic Mixing with Musical Key Detection -- RGB Waveforms -- Four Microphones, Four AUX Inputs, Microphone Ducking -- Vinyl Passthrough -- Cover Art Support -- Core Mixing Engine Improvements -- Upgraded Library -- Improved, Expanded Support for DJ Controllers - -You can find the new features of Mixxx 2.0 in details [here][3]. - -### Install Mixxx 2.0 in Ubuntu based Linux distributions ### - -Mixxx provides its own PPA too easily install Mixxx in Ubuntu based Linux distributions such as Linux Mint, elementary OS, Zorin OS etc. The PPA is valid for Ubuntu 12.04, 14.04 and 15.10. - -Open a terminal and use the following commands: - - sudo add-apt-repository ppa:mixxx/mixxx - sudo apt-get update - sudo apt-get install mixxx - -To uninstall Mixxx, use the following commands: - - sudo apt-get remove mixxx - sudo add-apt-repository --remove ppa:mixxx/mixxx - -If you are already using an older version of Mixxx, it will be upgraded soon. - -For other Linux distributions, you can install Mixxx from the source code. You can download Mixxx 2.0 source code from the link below: - -- [Get Mixxx 2.0 Source Code][4] - -Since Mixxx is a cross platform application, you can download it for Windows and Mac OS X as well. You can visit the Mixxx download page to get the installer for other platforms. - -- [Download Mixxx 2.0][5] - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/dj-mixxx-2/ - -作者:[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://mixxx.org/ -[2]:http://mixxx.org/features/ -[3]:http://mixxx.org/whats-new-in-mixxx-2-0/ -[4]:http://downloads.mixxx.org/mixxx-2.0.0/mixxx-2.0.0-src.tar.gz -[5]:http://mixxx.org/download/ From 432ab8e6999e7f0e1a602631c887189254daa4db Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Wed, 13 Jan 2016 02:15:55 +0800 Subject: [PATCH 0835/1710] [translated]sources/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md --- ... DJ Software Mixxx Version 2.0 Released.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 translated/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md diff --git a/translated/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md b/translated/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md new file mode 100644 index 0000000000..d5cf9d998d --- /dev/null +++ b/translated/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md @@ -0,0 +1,75 @@ +开源Dj软件Mixxx 2.0版发布 +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2016/01/DJ-Software-Mixxx-2-Released.jpg) + +时隔三年,开源Dj混音软件[Mixxx][1]再度发布一个大的版本更新----Mixxx 2.0. + +Mixxx是一个跨平台的免费开源的Dj混音软件,它几乎提供了当你想自己混音时需要的一切功能.Mixxx近几年在专业人士以及业余爱好者中都很火. + +在Mixxx中你能使用你的iTunes音乐库.它的强有力的引擎使它支持多种文件格式.Mixxx默认即支持超过85种MIDI Dj调节器以及少部分HID调节器.它也包含一个自动选项,可以让你在混音时休息一下. + +Mixxx的完整功能列表可以在[这里][2]找到.在查看完整列表之前,让我们看看最新版有何更新. + +### Mixxx 2.0更新 ### + +- 可自定义的用户界面 +- 4 轨道混音并且和主轨道同步 +- 内置特效 +- 谐波混频与音乐按键检测 +- RGB 音频波形 +- 4 个麦克风输入和 4 个音频输出 +- 黑胶音源输入、输出 +- 支持自定义封面 +- 核心升级 +- 升级库文件 +- 更先进的Dj 调节器 + +你可以在[这里][3]中看到所有的新功能. + +### 在基于Ubuntu的发行版中安装Mixxx 2.0 ### + +Mixxx提供了他们自己的ppa源,这使得在在基于Ubuntu的发行版----如Linux Mint, elementary OS, Zorin OS----安装Mixxx 2.0变得十分简单. + +打开终端,并输入如下命令: + + sudo add-apt-repository ppa:mixxx/mixxx + sudo apt-get update + sudo apt-get install mixxx + +使用如下命令卸载Mixxx: + + sudo apt-get remove mixxx + sudo add-apt-repository --remove ppa:mixxx/mixxx + +如果你使用老版本的Mixxx.它将很快升级到2.0版. + +### 在其他发行版中安装Mixxx 2.0 ### + +Archliunx + + sudo pacman -S mixxx + +对于其他发行版,你可以从源码编译安装Mixxx. + +- [源码地址][4] + +由于Mixxx是个跨平台的应用,你也可以下载它的Windows版或者Mac OS 版 + +- [下载地址][5] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/dj-mixxx-2/ + +作者:[Abhishek][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://mixxx.org/ +[2]:http://mixxx.org/features/ +[3]:http://mixxx.org/whats-new-in-mixxx-2-0/ +[4]:http://downloads.mixxx.org/mixxx-2.0.0/mixxx-2.0.0-src.tar.gz +[5]:http://mixxx.org/download/ From 0bc5f7c9b39cf14e9893e2bd98b19bce53cde57f Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 12 Jan 2016 22:43:57 +0800 Subject: [PATCH 0836/1710] =?UTF-8?q?PUB:20160111=20Ubuntu-=E2=80=98Spywar?= =?UTF-8?q?e=E2=80=99-Will-Be-Disabled-In-Ubuntu-16.04-LTS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @name1e5s 翻译的很好!有两个细节希以后注意: 1、保持文件名不动,只是移动位置,即,保留文件名前面的日期 2、使用中文标点,并在英文单词两侧留空格 明天一早,你会在如下 URL 看到: https://linux.cn/article-6878-1.html --- ...are’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md | 80 +++++++++++++++++ ...are’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md | 85 ------------------- 2 files changed, 80 insertions(+), 85 deletions(-) create mode 100644 published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md delete mode 100644 translated/news/Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md diff --git a/published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md b/published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md new file mode 100644 index 0000000000..ed6addfde7 --- /dev/null +++ b/published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md @@ -0,0 +1,80 @@ +Ubuntu 里的“间谍软件”将在 Ubuntu 16.04 LTS 中被禁用 +================================================================================ + +出于用户隐私的考虑,Ubuntu 阉割了一个有争议的功能。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/as2.jpg) + +**Unity 中有争议的在线搜索功能将在今年四月份发布的 Ubuntu 16.04 LTS 中被默认禁用** + +用户在 Unity 7 的 Dash 搜索栏里将**只能搜索到本地文件、文件夹以及应用**。这样,用户输入的关键词将不会被发送到 Canonical 或任何第三方内容提供商的服务器里。 + +> “现在,Unity 的在线搜索在默认状况下是关闭的” + +在目前 ubuntu 的支持版本中,Dash 栏会将用户搜索的关键词发送到 Canonical 运营的远程服务器中。它发送这些数据以用于从50多家在线服务获取搜索结果,这些服务包括维基百科、YouTube 和 The Weather Channel 等。 + +我们可以选择去**系统设置 > 隐私控制**关闭这项功能。但是,一些开源社区针对的是默认打开这个事情。 + +### Ubuntu 在线搜索引发的争议 ### + +> “Richard Stallman 将这个功能描述为 ‘间谍软件’” + +早在2012年,在 Ubuntu 搜索中整合了来自亚马逊的内容之后,开源社区就表示为其用户的隐私感到担忧。在2013年,“Smart Scopes 服务”全面推出后,开源社区再度表示担忧. + +风波如此之大,以至于开源界大神 [Richard Stallman 都称 Ubuntu 为"间谍软件"][1]。 + +[电子前哨基金会 (EFF)][2]也在一系列博文中表达出对此的关注,并且建议 Canonical 将这个功能做成用户自由选择是否开启的功能。Privacy International 比其他的组织走的更远,对于 Ubuntu 的工作,他们给 Ubuntu 的缔造者发了一个“[老大哥奖][3]”。 + +[Canonical][4] 坚称] Unity 的在线搜索功能所收集的数据是匿名的以及“不可识别是来自哪个用户的”。 + +在[2013年 Canoical 发布的博文中][5]他们解释道:“**(我们)会使用户了解我们收集哪些信息以及哪些第三方服务商将会在他们搜索时从 Dash 栏中给出结果。我们只会收集能够提升用户体验的信息。**” + +### Ubuntu 开始严肃对待的用户数据隐私### + +Canonical 在给新安装的 Ubuntu 14.04 LTS 以及以上版本中禁用了来自亚马逊的产品搜索结果(尽管来自其他服务商的搜索结果仍然在出现,直到你关闭这个选项) + +在下一个LTS(长期支持)版,也就是 Ubuntu 16.04 中,Canonical 完全关闭了这个有争议的在线搜索功能,这个功能在用户安装完后就是关闭的。就如同 EFF 在2012年建议他们做的那样。 + +“你搜索的关键词将不会逃出你的计算机。” [Ubuntu 桌面主管 Will Cooke][6]解释道,“对于搜索结果的更精细的控制”和 Unity 8 所提供的“更有针对性的结果添加不到 Unity 7 里”。 + +这也就是“[Unity 7]的在线搜索功能将会退役”的原因。 + +这个变化也会降低对 Unity 7 的支持以及对 Canonical 基础设施的压力。Unity 提供的搜索结果越少,Canonical 就能把时间和工程师放到更加振奋人心的地方,比如更早的发布 Unity 8 桌面环境。 + +### 在 Ubuntu 16.04 中你需要自己开启在线搜索功能 ### + +![Privacy settings in Ubuntu let you opt in to seeing online results](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/privacy.jpg) + +*在 Ubuntu 隐私设置中你可以打开在线搜索功能* + +禁用 Ubuntu 桌面的在线搜索功能的决定将获得众多开源/免费软件社区的欢呼。但是并不是每一个人都对 Dash 提供的语义搜索功能反感,如果你认为你失去了在搜索时预览天气、查看新闻或其他来自 Dash 在线搜索提供的内容所带来的效率的话,你只需要简单的点几下鼠标就可以**再次打开这个功能**,定位到 Ubuntu 的**系统设置 > 隐私控制 > 搜索**然后将选项调至“**开启**”。 + +这个选项不会自动把亚马逊的产品信息加入到搜索结果中。如果你想看产品信息的话,需要打开第二个可选项“shipping lens”才能看到来自 Amazon (和 Skimlinks)的内容。 + +### 总结 ### + + +- 默认情况下,Ubuntu 16.04 LTS 的 Dash 栏将不会搜索到在线结果 +- 可以手动打开在线搜索 +- **系统设置 > 隐私控制 > 搜索**中的第二个可选项允许你看到亚马逊的产品信息 +- 这个变动只会影响新安装的系统。从老版本升级的将会保留用户的喜好 + +你同意这个决定吗?抑或是 Cononical 可能降低了新用户的体验?在评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2016/01/ubuntu-online-search-feature-disabled-16-04 + +作者:[Joey-Elijah Sneddon][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[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://arstechnica.com/information-technology/2012/12/richard-stallman-calls-ubuntu-spyware-because-it-tracks-searches/?utm_source=omgubuntu +[2]:https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks?utm_source=omgubuntu +[3]:http://www.omgubuntu.co.uk/2013/10/ubuntu-wins-big-brother-austria-privacy-award +[4]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/ +[5]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/?utm_source=omgubuntu +[6]:http://www.whizzy.org/2015/12/online-searches-in-the-dash-to-be-off-by-default?utm_source=omgubuntu diff --git a/translated/news/Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md b/translated/news/Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md deleted file mode 100644 index 286ca7472c..0000000000 --- a/translated/news/Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md +++ /dev/null @@ -1,85 +0,0 @@ -Ubuntu的"间谍软件"将在Ubuntu 16.04 LTS中被禁用 -================================================================================ - -出于用户隐私的考虑,Ubuntu阉割了一个有争议的功能. - - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/as2.jpg) - -** Unity 中有争议的在线搜索功能将在四月份发布的Ubuntu 16.04 LTS中被默认禁用 ** - -目前,用户在Unity 7 的Dash搜索栏里**只能搜索到本地文件,文件夹以及应用**.目前的状况是,用户输入的关键词将不会被发送到Canonical或任何第三方内容提供商的服务器里. - -> '现在,Unity的在线搜索在默认状况下是关闭的' - -在目前ubuntu的支持版本中,Dash栏会将用户搜索的关键词发送到Canonical运营的远程服务器中.它发送这些数据以用于从50多家在线服务获取搜索结果,这些服务包括维基百科,YouTube和The Weather Channel. - - - -我们可以选择去**系统设置 > 隐私控制**关闭这项功能.但是,一些在开源社区的功能被默认打开。 - - - -### Ubuntu 在线搜索引发的争议 ### - -> 'Richard Stallman 将这个功能描述为 "间谍软件"' - -早在2012年,在Ubuntu搜索中整合来自亚马逊的内容之后,开源社区表示为其用户的隐私感到担忧.在2013年,‘Smart Scopes 服务’全面推出后,开源社区再度表示担忧. - -风波如此之大,以至于开源界大神[Richard Stallman 都称Ubuntu为"间谍软件"][1]. - -[电子前哨基金会(EFF)][2]也在一系列博文中表达出对此的关注,并且建议Canonical将这个功能做成用户自由选择是否开启的功能.Privacy International比其他的组织走的更远,对于Ubuntu的工作,他给Ubuntu的缔造者发了一个"[老大哥奖][3]" - -[Canonical][4] 坚称Unity的在线搜索功能所收集的数据是匿名的以及"不可识别是来自哪个用户的". - -在[2013年Canoical发布的博文中][5]他们解释道 "** (我们)会使用户了解我们收集哪些信息以及哪些第三方服务商将会在他们搜索时从Dash栏中给出结果.我们只会收集能够提升用户体验的信息.**" - -### Ubuntu开始严肃对待的用户数据隐私### - -Canonical在给Ubuntu 14.04 LTS以及以上版本的更新中禁用了来自亚马逊的结果(尽管来自其他服务商的搜索结果仍然在出现直到你关闭这个选项) - -在下一个LTS(长期支持)版,也就是Ubuntu 16.04,Canonical完全关闭了这个有争议的在线搜索功能,这个功能在用户安装完后就是关闭的.就如同EFF在2012年让他们做的那样. - -"你搜索的关键词将不会逃出你的计算机." [Ubuntu 桌面环境经理Will Cooke][6]解释道,Unity提供的"对于搜索结果的更精细的控制不能添加到Unity 7" - -这也就是"[Unity 7]的在线搜索功能将会退役"的原因. - -这个变化也会减少Unity的支持以及基础设施对于Canonical的负担.Unity提供的搜索结果越少,Canonical就能把时间和工程师放到更加振奋人心的地方,比如更早的发布Unity 8桌面环境. - -### 在Ubuntu 16.04中你需要自己开启在线搜索功能 ### - -![Privacy settings in Ubuntu let you opt in to seeing online results](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/privacy.jpg) - -可以让你打开在线搜索功能的Ubuntu隐私设置 - -禁用Ubuntu桌面的在线搜索功能的决定将获得众多开源/免费软件社区的欢呼.但是并不是每一个人都对Dash提供的语义搜索功能反感,如果你认为你失去了在搜索时预览天气,查看新闻或其他来自Dash在线搜索提供的内容的效率的话.你只需要简单的点几下鼠标就可以**再次打开这个功能**,定位到Ubuntu的**系统设置 > 隐私控制 > 搜索**然后将选项调至'**开启**'/ - -这个选项不会自动把亚马逊的产品信息加入到搜索结果中.如果你想看产品信息的话,需要同意那个设置中的"shipping lens"选项. - -### 总结 ### - - -- 默认情况下,Ubuntu 16.04 LTS的Dash栏将不会搜索到在线结果 -- 可以手动打开在线搜索 -- *系统设置 > 隐私控制 > 搜索**中的第二个选项允许你看到亚马逊的产品信息 -- 这个变动只会影响新安装的系统.从老版本升级的将会保留用户的喜好 - -你同意这个决定吗?还是Cononical要以此提升Ubuntu对于新用户的体验?让我们在评论中揭晓./ - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2016/01/ubuntu-online-search-feature-disabled-16-04 - -作者:[Joey-Elijah Sneddon][a] -译者:[name1e5s](https://github.com/name1e5s) -校对:[校对者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://arstechnica.com/information-technology/2012/12/richard-stallman-calls-ubuntu-spyware-because-it-tracks-searches/?utm_source=omgubuntu -[2]:https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks?utm_source=omgubuntu -[3]:http://www.omgubuntu.co.uk/2013/10/ubuntu-wins-big-brother-austria-privacy-award -[4]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/ -[5]:http://blog.canonical.com/2012/12/07/searching-in-the-dash-in-ubuntu-13-04/?utm_source=omgubuntu -[6]:http://www.whizzy.org/2015/12/online-searches-in-the-dash-to-be-off-by-default?utm_source=omgubuntu From 397a19245d0135187c25da72788b502db8c40183 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Tue, 12 Jan 2016 23:32:16 +0800 Subject: [PATCH 0837/1710] [Translated]20151215 How to block network traffic by country on Linux --- .../201407/Encrypting Your Cat Photos.md | 0 ... up server monitoring system with Monit.md | 0 ...ock network traffic by country on Linux.md | 112 ------------------ ...ock network traffic by country on Linux.md | 110 +++++++++++++++++ 4 files changed, 110 insertions(+), 112 deletions(-) mode change 100755 => 100644 published/201407/Encrypting Your Cat Photos.md mode change 100755 => 100644 published/201505/20150326 How to set up server monitoring system with Monit.md delete mode 100644 sources/tech/20151215 How to block network traffic by country on Linux.md create mode 100644 translated/tech/20151215 How to block network traffic by country on Linux.md diff --git a/published/201407/Encrypting Your Cat Photos.md b/published/201407/Encrypting Your Cat Photos.md old mode 100755 new mode 100644 diff --git a/published/201505/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 old mode 100755 new mode 100644 diff --git a/sources/tech/20151215 How to block network traffic by country on Linux.md b/sources/tech/20151215 How to block network traffic by country on Linux.md deleted file mode 100644 index 14bdbad711..0000000000 --- a/sources/tech/20151215 How to block network traffic by country on Linux.md +++ /dev/null @@ -1,112 +0,0 @@ -FSSlc translating - -How to block network traffic by country on Linux -================================================================================ -As a system admin who maintains production Linux servers, there are circumstances where you need to **selectively block or allow network traffic based on geographic locations**. For example, you are experiencing denial-of-service attacks mostly originating from IP addresses registered with a particular country. You want to block SSH logins from unknown foreign countries for security reasons. Your company has a distribution right to online videos, which requires it to legally stream to particular countries only. You need to prevent any local host from uploading documents to any non-US remote cloud storage due to geo-restriction company policies. - -All these scenarios require an ability to set up a firewall which does **country-based traffic filtering**. There are a couple of ways to do that. For one, you can use TCP wrappers to set up conditional blocking for individual applications (e.g., SSH, NFS, httpd). The downside is that the application you want to protect must be built with TCP wrappers support. Besides, TCP wrappers are not universally available across different platforms (e.g., Arch Linux [dropped][2] its support). An alternative approach is to set up [ipset][3] with country-based GeoIP information and apply it to iptables rules. The latter approach is more promising as the iptables-based filtering is application-agnostic and easy to set up. - -In this tutorial, I am going to present **another iptables-based GeoIP filtering which is implemented with xtables-addons**. For those unfamiliar with it, xtables-addons is a suite of extensions for netfilter/iptables. Included in xtables-addons is a module called xt_geoip which extends the netfilter/iptables to filter, NAT or mangle packets based on source/destination countries. For you to use xt_geoip, you don't need to recompile the kernel or iptables, but only need to build xtables-addons as modules, using the current kernel build environment (/lib/modules/`uname -r`/build). Reboot is not required either. As soon as you build and install xtables-addons, xt_geoip is immediately usable with iptables. - -As for the comparison between xt_geoip and ipset, the [official source][3] mentions that xt_geoip is superior to ipset in terms of memory foot print. But in terms of matching speed, hash-based ipset might have an edge. - -In the rest of the tutorial, I am going to show **how to use iptables/xt_geoip to block network traffic based on its source/destination countries**. - -### Install Xtables-addons on Linux ### - -Here is how you can compile and install xtables-addons on various Linux platforms. - -To build xtables-addons, you need to install a couple of dependent packages first. - -#### Install Dependencies on Debian, Ubuntu or Linux Mint #### - - $ sudo apt-get install iptables-dev xtables-addons-common libtext-csv-xs-perl pkg-config - -#### Install Dependencies on CentOS, RHEL or Fedora #### - -CentOS/RHEL 6 requires EPEL repository being set up first (for perl-Text-CSV_XS). - - $ sudo yum install gcc-c++ make automake kernel-devel-`uname -r` wget unzip iptables-devel perl-Text-CSV_XS - -#### Compile and Install Xtables-addons #### - -Download the latest `xtables-addons` source code from the [official site][4], and build/install it as follows. - - $ wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/xtables-addons-2.10.tar.xz - $ tar xf xtables-addons-2.10.tar.xz - $ cd xtables-addons-2.10 - $ ./configure - $ make - $ sudo make install - -Note that for Red Hat based systems (CentOS, RHEL, Fedora) which have SELinux enabled by default, it is necessary to adjust SELinux policy as follows. Otherwise, SELinux will prevent iptables from loading xt_geoip module. - - $ sudo chcon -vR --user=system_u /lib/modules/$(uname -r)/extra/*.ko - $ sudo chcon -vR --type=lib_t /lib64/xtables/*.so - -### Install GeoIP Database for Xtables-addons ### - -The next step is to install GeoIP database which will be used by xt_geoip for IP-to-country mapping. Conveniently, the xtables-addons source package comes with two helper scripts for downloading GeoIP database from MaxMind and converting it into a binary form recognized by xt_geoip. These scripts are found in geoip folder inside the source package. Follow the instructions below to build and install GeoIP database on your system. - - $ cd geoip - $ ./xt_geoip_dl - $ ./xt_geoip_build GeoIPCountryWhois.csv - $ sudo mkdir -p /usr/share/xt_geoip - $ sudo cp -r {BE,LE} /usr/share/xt_geoip - -According to [MaxMind][5], their GeoIP database is 99.8% accurate on a country-level, and the database is updated every month. To keep the locally installed GeoIP database up-to-date, you want to set up a monthly [cron job][6] to refresh the local GeoIP database as often. - -### Block Network Traffic Originating from or Destined to a Country ### - -Once xt_geoip module and GeoIP database are installed, you can immediately use the geoip match options in iptables command. - - $ sudo iptables -m geoip --src-cc country[,country...] --dst-cc country[,country...] - -Countries you want to block are specified using [two-letter ISO3166 code][7] (e.g., US (United States), CN (China), IN (India), FR (France)). - -For example, if you want to block incoming traffic from Yemen (YE) and Zambia (ZM), the following iptables command will do. - - $ sudo iptables -I INPUT -m geoip --src-cc YE,ZM -j DROP - -If you want to block outgoing traffic destined to China (CN), run the following command. - - $ sudo iptables -A OUTPUT -m geoip --dst-cc CN -j DROP - -The matching condition can also be "negated" by prepending "!" to "--src-cc" or "--dst-cc". For example: - -If you want to block all incoming non-US traffic on your server, run this: - - $ sudo iptables -I INPUT -m geoip ! --src-cc US -j DROP - -![](https://c2.staticflickr.com/6/5654/23665427845_050241b03f_c.jpg) - -#### For Firewall-cmd Users #### - -Some distros such as CentOS/RHEL 7 or Fedora have replaced iptables with firewalld as the default firewall service. On such systems, you can use firewall-cmd to block traffic using xt_geoip similarly. The above three examples can be rewritten with firewall-cmd as follows. - - $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip --src-cc YE,ZM -j DROP - $ sudo firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -m geoip --dst-cc CN -j DROP - $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip ! --src-cc US -j DROP - -### Conclusion ### - -In this tutorial, I presented iptables/xt_geoip which is an easy way to filter network packets based on their source/destination countries. This can be a useful arsenal to deploy in your firewall system if needed. As a final word of caution, I should mention that GeoIP-based traffic filtering is not a foolproof way to ban certain countries on your server. GeoIP database is by nature inaccurate/incomplete, and source/destination geography can easily be spoofed using VPN, Tor or any compromised relay hosts. Geography-based filtering can even block legitimate traffic that should not be banned. Understand this limitation before you decide to deploy it in your production environment. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/block-network-traffic-by-country-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://www.archlinux.org/news/dropping-tcp_wrappers-support/ -[2]:http://xmodulo.com/block-unwanted-ip-addresses-linux.html -[3]:http://xtables-addons.sourceforge.net/geoip.php -[4]:http://xtables-addons.sourceforge.net/ -[5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/ -[6]:http://ask.xmodulo.com/add-cron-job-linux.html -[7]:https://en.wikipedia.org/wiki/ISO_3166-1 diff --git a/translated/tech/20151215 How to block network traffic by country on Linux.md b/translated/tech/20151215 How to block network traffic by country on Linux.md new file mode 100644 index 0000000000..5d04b20a2b --- /dev/null +++ b/translated/tech/20151215 How to block network traffic by country on Linux.md @@ -0,0 +1,110 @@ +如何在 Linux 中根据国家位置来阻断网络流量 +================================================================================ +作为一名维护 Linux 生产服务器的系统管理员,你可能会遇到这样一些情形:你需要 **根据地理位置,选择性地阻断或允许网络流量通过。** 例如你正经历一次由注册在某个特定国家的 IP 发起的 DoS 攻击;或者基于安全考虑,你想阻止来自未知国家的 SSH 登陆请求;又或者你的公司对某些在线视频有分销权,它要求只能合法地在特定的国家内发行;抑或是由于公司的政策,你需要阻止任意一个本地主机将文件上传至任意一个非美国的远程云端存储。 + +所有的上述情形都需要设置防火墙,使之具有 **过滤基于国家位置的流量** 的功能。有几个方法可以做到这一点,其中之一是你可以使用 TCP wrappers 来为个人应用(例如 SSH,NFS, httpd)设置有条件的阻塞。但其缺点是你想要保护的那个应用必须以支持 TCP wrappers 的方式构建。另外,TCP wrappers 并不总是能够在各个平台中获取到(例如,Arch Linux [放弃了][2]对它的支持)。另一种方式是结合基于国家的 GeoIP 信息,设置 [ipset][3],并将它应用到 iptables 的规则中。后一种方式看起来更有希望一些,因为基于 iptables 的过滤器是与应用无关的,且容易设置。 + +在本教程中,我将展示 **另一个基于 iptables 的 GeoIP 过滤器,它由 xtables-addons 来实现**。对于那些不熟悉它的人来说, xtables-addons 是针对 netfilter/iptables 的一系列扩展。一个包含在 xtables-addons 中的名为 xt_geoip 的模块扩展了 netfilter/iptables 的功能,使得它可以根据流量来自或流向的国家来进行过滤,IP 掩蔽(NAT) 或丢包。若你想使用 xt_geoip,你不必重新编译内核或 iptables,你只需要使用当前的内核构建环境(/lib/modules/`uname -r`/build) 以模块的形式构建 xtables-addons。同时也不需要进行重启。只要你构建并安装了 xtables-addons , xt_geoip 便能够配合 iptables 使用。 + +至于 xt_geoip 和 ipset 之间的比较,[xtables-addons 的官方网站][3] 上是这么说的: 相比于 ipset,xt_geoip 在内存占用上更胜一筹,但对于匹配速度,基于哈希的 ipset 可能更有优势。 + +在教程的余下部分,我将展示 ** 如何使用 iptables/xt_geoip 来根据流量的来源地或流入的国家阻断网络流量 **。 + +### 在 Linux 中安装 xtables-addons ### + +下面介绍如何在各种 Linux 平台中编译和安装 xtables-addons。 + +为了编译 xtables-addons,首先你需要安装一些依赖软件包。 + +#### 在 Debian,Ubuntu 或 Linux Mint 中安装依赖 #### + + $ sudo apt-get install iptables-dev xtables-addons-common libtext-csv-xs-perl pkg-config + +#### 在 CentOS,RHEL 或 Fedora 中安装依赖 #### + +CentOS/RHEL 6 需要事先设置好 EPEL 仓库(为 perl-Text-CSV_XS 所需要)。 + + $ sudo yum install gcc-c++ make automake kernel-devel-`uname -r` wget unzip iptables-devel perl-Text-CSV_XS + +#### 编译并安装 xtables-addons #### + +从 `xtables-addons` 的[官方网站][4] 下载源码包,然后按照下面的指令编译安装它。 + + $ wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/xtables-addons-2.10.tar.xz + $ tar xf xtables-addons-2.10.tar.xz + $ cd xtables-addons-2.10 + $ ./configure + $ make + $ sudo make install + +需要注意的是,对于基于红帽的系统(CentOS, RHEL, Fedora),它们默认开启了 SELinux,所以有必要像下面这样调整 SELinux 的策略。否则,SELinux 将阻止 iptables 加载 xt_geoip 模块。 + + $ sudo chcon -vR --user=system_u /lib/modules/$(uname -r)/extra/*.ko + $ sudo chcon -vR --type=lib_t /lib64/xtables/*.so + +### 为 xtables-addons 安装 GeoIP 数据库 ### + +下一步是安装 GeoIP 数据库,它将被 xt_geoip 用来查询 IP 地址与国家地区之间的对应关系。方便的是,`xtables-addons` 的源码包中带有两个帮助脚本,它们被用来从 MaxMind 下载 GeoIP 数据库并将它转化为 xt_geoip 可识别的二进制形式文件;而它们可以在源码包中的 geoip 目录下找到。请遵循下面的指导来在你的系统中构建和安装 GeoIP 数据库。 + + $ cd geoip + $ ./xt_geoip_dl + $ ./xt_geoip_build GeoIPCountryWhois.csv + $ sudo mkdir -p /usr/share/xt_geoip + $ sudo cp -r {BE,LE} /usr/share/xt_geoip + +根据 [MaxMind][5] 的说明,他们的 GeoIP 数据库能够以 99.8% 的准确率识别出 ip 所对应的国家,并且每月这个数据库将进行更新。为了使得本地安装的 GeoIP 数据是最新的,或许你需要设置一个按月执行的 [cron job][6] 来时常更新你本地的 GeoIP 数据库。 + +### 阻断来自或流向某个国家的网络流量 ### + +一旦 xt_geoip 模块和 GeoIP 数据库安装好后,你就可以在 iptabels 命令中使用 geoip 的匹配选项。 + + $ sudo iptables -m geoip --src-cc country[,country...] --dst-cc country[,country...] + +你想要阻断流量的那些国家是使用[2个字母的 ISO3166 代码][7] 来特别指定的(例如 US(美国)、CN(中国)、IN(印度)、FR(法国))。 + +例如,假如你想阻断来自也门(YE) 和 赞比亚(ZM) 的流量,下面的 iptabels 命令便可以达到此目的。 + + $ sudo iptables -I INPUT -m geoip --src-cc YE,ZM -j DROP + +假如你想阻断流向中国(CN) 的流量,可以运行下面的命令: + + $ sudo iptables -A OUTPUT -m geoip --dst-cc CN -j DROP + +匹配条件也可以通过在 "--src-cc" 或 "--dst-cc" 选项前加 "!" 来达到相反的目的: + +假如你想在你的服务器上阻断来自所有非美国的流量,可以运行: + + $ sudo iptables -I INPUT -m geoip ! --src-cc US -j DROP + +![](https://c2.staticflickr.com/6/5654/23665427845_050241b03f_c.jpg) + +#### 对于使用 Firewall-cmd 的用户 #### + +某些发行版本例如 CentOS/RHEL7 或 Fedora 已经用 firewalld 替代了 iptables 来作为默认的防火墙服务。在这些系统中,你可以类似使用 xt_geoip 那样,使用 firewall-cmd 来阻断流量。利用 firewall-cmd 命令,上面的三个例子可被重新写为: + + $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip --src-cc YE,ZM -j DROP + $ sudo firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -m geoip --dst-cc CN -j DROP + $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip ! --src-cc US -j DROP + +### 总结 ### + +在本教程中,我展示了使用 iptables/xt_geoip 来根据流量的来源地或流入的国家轻松地阻断网络流量。假如你有这方面的需求,把它部署到你的防火墙系统中可以使之成为一个实用的办法。作为最后的警告,我应该提醒你的是:在你的服务器上通过基于 GeoIP 的流量过滤来禁止特定国家的流量并不总是万无一失的。GeoIP 数据库本身就不是很准确或齐全,且流量的来源或目的地可以轻易地通过使用 VPN、Tor 或其他任意易受攻击的中继主机来达到欺骗的目的。基于地理位置的过滤器甚至可能会阻止本不该阻止的合法网络流量。在你决定把它部署到你的生产环境之前请仔细考虑这个限制。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/block-network-traffic-by-country-linux.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]:https://www.archlinux.org/news/dropping-tcp_wrappers-support/ +[2]:http://xmodulo.com/block-unwanted-ip-addresses-linux.html +[3]:http://xtables-addons.sourceforge.net/geoip.php +[4]:http://xtables-addons.sourceforge.net/ +[5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/ +[6]:http://ask.xmodulo.com/add-cron-job-linux.html +[7]:https://en.wikipedia.org/wiki/ISO_3166-1 From c51521e1157dc1e7a402b18adf719411d145c6ff Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 13 Jan 2016 09:37:19 +0800 Subject: [PATCH 0838/1710] PUB:20160111 Open Source DJ Software Mixxx Version 2.0 Released MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @name1e5s 要尽量忠实原文,如果原文有误,可以注明。 --- ... DJ Software Mixxx Version 2.0 Released.md | 75 +++++++++++++++++++ ... DJ Software Mixxx Version 2.0 Released.md | 75 ------------------- 2 files changed, 75 insertions(+), 75 deletions(-) create mode 100644 published/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md delete mode 100644 translated/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md diff --git a/published/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md b/published/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md new file mode 100644 index 0000000000..972d52e035 --- /dev/null +++ b/published/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md @@ -0,0 +1,75 @@ +开源 DJ 软件 Mixxx 2.0 版发布 +================================================================================ +![](http://itsfoss.com/wp-content/uploads/2016/01/DJ-Software-Mixxx-2-Released.jpg) + +时隔三年,开源 DJ 混音软件 [Mixxx][1] 再度发布一个大的版本更新----Mixxx 2.0。 + +Mixxx 是一个跨平台的自由、开源的 DJ 混音软件,它几乎提供了当你想自己混音时需要的一切功能。Mixxx 近几年在专业人士以及业余爱好者中都很火。 + +甚至在 Mixxx 中你能使用你的 iTunes 音乐库。它的强有力的引擎使它支持多种文件格式。Mixxx 默认即支持超过85种MIDI DJ 调节器以及少部分 HID 调节器。它也包含一个自动选项,可以让你在混音时休息一下。 + +Mixxx 的完整功能列表可以在[这里][2]找到。在查看完整列表之前,让我们看看最新版有何更新。 + +### Mixxx 2.0更新 ### + +- 可动态调整大小的外观 +- 4 轨道混音并且和主轨道同步 +- 内置特效 +- 谐波混频(Harmonic Mixing)与音乐按键检测 +- RGB 音频波形 +- 4 个麦克风输入和 4 个音频输入,麦克风音量可调 +- 黑胶音源输入、输出 +- 支持自定义封面 +- 核心混音引擎改进 +- 更新的音乐库 +- 改进增强了 DJ 调节器 + +你可以在[这里][3]中看到所有的新功能。 + +### 在基于 Ubuntu 的发行版中安装 Mixxx 2.0 ### + +Mixxx 提供了他们自己的ppa源,这使得在基于 Ubuntu 的发行版,如 Linux Mint、elementary OS、 Zorin OS 上安装Mixxx 2.0 变得十分简单. + +打开终端,并输入如下命令: + + sudo add-apt-repository ppa:mixxx/mixxx + sudo apt-get update + sudo apt-get install mixxx + +使用如下命令卸载 Mixxx: + + sudo apt-get remove mixxx + sudo add-apt-repository --remove ppa:mixxx/mixxx + +如果你已经在使用旧版本的 Mixxx。它将很快升级到2.0版。 + +### 在其他发行版中安装 Mixxx 2.0 ### + +Archliunx + + sudo pacman -S mixxx + +对于其他发行版,你还可以从源码编译安装 Mixxx。从下列地址下载源代码: + +- [源码地址][4] + +由于 Mixxx 是个跨平台的应用,你也可以下载它的 Windows 版或者 Mac OS 版,请访问 Mixxx 下载页面找到对应的下载链接: + +- [下载地址][5] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/dj-mixxx-2/ + +作者:[Abhishek][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://mixxx.org/ +[2]:http://mixxx.org/features/ +[3]:http://mixxx.org/whats-new-in-mixxx-2-0/ +[4]:http://downloads.mixxx.org/mixxx-2.0.0/mixxx-2.0.0-src.tar.gz +[5]:http://mixxx.org/download/ diff --git a/translated/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md b/translated/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md deleted file mode 100644 index d5cf9d998d..0000000000 --- a/translated/share/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md +++ /dev/null @@ -1,75 +0,0 @@ -开源Dj软件Mixxx 2.0版发布 -================================================================================ -![](http://itsfoss.com/wp-content/uploads/2016/01/DJ-Software-Mixxx-2-Released.jpg) - -时隔三年,开源Dj混音软件[Mixxx][1]再度发布一个大的版本更新----Mixxx 2.0. - -Mixxx是一个跨平台的免费开源的Dj混音软件,它几乎提供了当你想自己混音时需要的一切功能.Mixxx近几年在专业人士以及业余爱好者中都很火. - -在Mixxx中你能使用你的iTunes音乐库.它的强有力的引擎使它支持多种文件格式.Mixxx默认即支持超过85种MIDI Dj调节器以及少部分HID调节器.它也包含一个自动选项,可以让你在混音时休息一下. - -Mixxx的完整功能列表可以在[这里][2]找到.在查看完整列表之前,让我们看看最新版有何更新. - -### Mixxx 2.0更新 ### - -- 可自定义的用户界面 -- 4 轨道混音并且和主轨道同步 -- 内置特效 -- 谐波混频与音乐按键检测 -- RGB 音频波形 -- 4 个麦克风输入和 4 个音频输出 -- 黑胶音源输入、输出 -- 支持自定义封面 -- 核心升级 -- 升级库文件 -- 更先进的Dj 调节器 - -你可以在[这里][3]中看到所有的新功能. - -### 在基于Ubuntu的发行版中安装Mixxx 2.0 ### - -Mixxx提供了他们自己的ppa源,这使得在在基于Ubuntu的发行版----如Linux Mint, elementary OS, Zorin OS----安装Mixxx 2.0变得十分简单. - -打开终端,并输入如下命令: - - sudo add-apt-repository ppa:mixxx/mixxx - sudo apt-get update - sudo apt-get install mixxx - -使用如下命令卸载Mixxx: - - sudo apt-get remove mixxx - sudo add-apt-repository --remove ppa:mixxx/mixxx - -如果你使用老版本的Mixxx.它将很快升级到2.0版. - -### 在其他发行版中安装Mixxx 2.0 ### - -Archliunx - - sudo pacman -S mixxx - -对于其他发行版,你可以从源码编译安装Mixxx. - -- [源码地址][4] - -由于Mixxx是个跨平台的应用,你也可以下载它的Windows版或者Mac OS 版 - -- [下载地址][5] - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/dj-mixxx-2/ - -作者:[Abhishek][a] -译者:[name1e5s](https://github.com/name1e5s) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://mixxx.org/ -[2]:http://mixxx.org/features/ -[3]:http://mixxx.org/whats-new-in-mixxx-2-0/ -[4]:http://downloads.mixxx.org/mixxx-2.0.0/mixxx-2.0.0-src.tar.gz -[5]:http://mixxx.org/download/ From 53d7ac0c9e944cc0364fb2a258e242696e7c8c94 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 13 Jan 2016 09:42:46 +0800 Subject: [PATCH 0839/1710] PUB:20151215 Fix--Cannot establish FTP connection to an SFTP server @geekpi --- ...ablish FTP connection to an SFTP server.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) rename {translated/tech => published}/20151215 Fix--Cannot establish FTP connection to an SFTP server.md (52%) diff --git a/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/published/20151215 Fix--Cannot establish FTP connection to an SFTP server.md similarity index 52% rename from translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md rename to published/20151215 Fix--Cannot establish FTP connection to an SFTP server.md index 79e26abd64..02ce43fcf4 100644 --- a/translated/tech/20151215 Fix--Cannot establish FTP connection to an SFTP server.md +++ b/published/20151215 Fix--Cannot establish FTP connection to an SFTP server.md @@ -1,8 +1,9 @@ -修复:无法与SFTP服务器建立FTP连接 +错误:无法与 SFTP 服务器建立 FTP 连接 ================================================================================ + ### 问题 ### -有一天我要连接到我的web服务器。我使用[FileZilla][1]连接到FTP服务器。当我输入主机名和密码后来连接服务器后,我得到了下面的错误。 +有一天我要连接到我的 web 服务器。我使用 [FileZilla][1] 连接到 FTP 服务器。当我输入主机名和密码连接服务器后,我得到了下面的错误。 > Error: Cannot establish FTP connection to an SFTP server. Please select proper protocol. > @@ -12,25 +13,25 @@ ### 原因 ### -看见错误信息后我意识到了我的错误。我尝试与一台SFTP服务器建立一个[FTP][2]连接。很明显我没有使用一个正确的协议(应该是SFTP而不是FTP)。 +看见错误信息后我意识到了我的错误是什么。我尝试与一台 **SFTP** 服务器建立一个 **[FTP][2]** 连接。很明显我没有使用一个正确的协议(应该是SFTP而不是FTP)。 -如你在上图所见,FileZilla默认使用的是FTP协议。 +如你在上图所见,FileZilla 默认使用的是FTP协议。 -### 解决“Cannot establish FTP connection to an SFTP server”的方案 ### +### 解决 “Cannot establish FTP connection to an SFTP server” 的方案 ### -解决方案很简单。使用SFTP协议而不是FTP。一个你或许要面对的问题是把协议修改成SFTP。这就是我要帮助你的。 +解决方案很简单。使用 SFTP 协议而不是 FTP。你要做的就是把协议修改成 SFTP。这就是我要告诉你的。 -再FileZilla菜单中,进入 **文件->站点管理**. +在 FileZilla 菜单中,进入 **文件->站点管理**。 ![FileZilla Site Manager](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_2.jpeg) -在站点管理中,进入通用选项并选择SFTP协议。同样填上主机、端口号、用户密码等。 +在站点管理中,进入通用选项并选择 SFTP 协议。同样填上主机、端口号、用户密码等。 ![Cannot establish FTP connection to an SFTP server](http://itsfoss.com/wp-content/uploads/2015/12/FileZilla_FTP_SFTP_Problem_3.png) -我希望你从这里可以开始处理。 +我希望你从这里可以开始工作了。 -我希望本篇教程可以帮助你修复“Cannot establish FTP connection to an SFTP server. Please select proper protocol.”这个问题。在相关的文章中,你可以读[了解在Linux中如何设置FTP][4]。 +我希望本篇教程可以帮助你修复 “Cannot establish FTP connection to an SFTP server. Please select proper protocol.”这个问题。在相关的文章中,你可以读[了解在 Linux 中如何设置 FTP][4]。 -------------------------------------------------------------------------------- @@ -38,7 +39,7 @@ via: http://itsfoss.com/fix-establish-ftp-connection-sftp-server/ 作者:[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 52feca56f95055ad3711e35e0aa70fd7eef257be Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 13 Jan 2016 14:10:22 +0800 Subject: [PATCH 0840/1710] =?UTF-8?q?=E6=9B=B4=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md b/published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md index ed6addfde7..e1824fe0e6 100644 --- a/published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md +++ b/published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md @@ -25,7 +25,7 @@ Ubuntu 里的“间谍软件”将在 Ubuntu 16.04 LTS 中被禁用 [电子前哨基金会 (EFF)][2]也在一系列博文中表达出对此的关注,并且建议 Canonical 将这个功能做成用户自由选择是否开启的功能。Privacy International 比其他的组织走的更远,对于 Ubuntu 的工作,他们给 Ubuntu 的缔造者发了一个“[老大哥奖][3]”。 -[Canonical][4] 坚称] Unity 的在线搜索功能所收集的数据是匿名的以及“不可识别是来自哪个用户的”。 +[Canonical][4] 坚称 Unity 的在线搜索功能所收集的数据是匿名的以及“不可识别是来自哪个用户的”。 在[2013年 Canoical 发布的博文中][5]他们解释道:“**(我们)会使用户了解我们收集哪些信息以及哪些第三方服务商将会在他们搜索时从 Dash 栏中给出结果。我们只会收集能够提升用户体验的信息。**” From 94627800ec28a8c0783091947ef85a096cb816de Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 13 Jan 2016 14:10:59 +0800 Subject: [PATCH 0841/1710] PUB:20151012 Remember sed and awk All Linux admins should MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Bestony 翻译的不错 --- ...ber sed and awk All Linux admins should.md | 66 ++++++++++++++++++ ...ber sed and awk All Linux admins should.md | 69 ------------------- 2 files changed, 66 insertions(+), 69 deletions(-) create mode 100644 published/20151012 Remember sed and awk All Linux admins should.md delete mode 100644 translated/tech/20151012 Remember sed and awk All Linux admins should.md diff --git a/published/20151012 Remember sed and awk All Linux admins should.md b/published/20151012 Remember sed and awk All Linux admins should.md new file mode 100644 index 0000000000..346557684b --- /dev/null +++ b/published/20151012 Remember sed and awk All Linux admins should.md @@ -0,0 +1,66 @@ +sed 和 awk,所有的 Linux 管理员都应该会的技能! +========================== + +![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) + +*图片来源: Shutterstock* + +**我们不要让下一代 Linux 和 Unix 的管理员忘记初始化脚本和基本工具的好处** + +我曾经有一次在 Reddit 看到一个帖子,“[请问如何操作文本文件][1]”。这是一个很简单的需求,就像我们常用 Unix 的人每天遇到的一样。他的问题是,如何删除文件中的重复行,只保留不重复的。 这听起来似乎很简单,但是当文件足够大时,就会有些复杂。 + +这个问题有很多种不同的答案。你可以使用几乎任何一种语言来写这样的一个脚本,只是时间的投入和代码的复杂性不同罢了。根据你的个人水平,它大概会花费20-60分钟。但是如果你使用了 Perl、Python、Ruby 中的一种,你可能很快实现它。 + +或者你可以使用下面的一个方法,让你无比暖心的: 只用 awk。 + +这个答案是迄今为止最简明、最简单的解决问题的方法。它只要一行! + +``` +awk '!seen[$0]++' +``` + +让我们来看看发生了什么: + +在这个命令中,其实隐藏了很多代码。awk 是一种文本处理语言,并且它内部有很多预设。首先,你看到的实际上是一个 for 循环的结果。awk 假定你想通过循环处理输入文件的每一行,所以你不需要明确的去指定它。awk 还假定了你需要打印输出处理后的数据,所以你也不需要去指定它。最后,awk 假定循环在最后一句指令执行完结束,这一块也不再需要你去指定它。 + +这个例子中的字符串 seen 是一个关联数组的名字。$0 是一个变量,表示整个当前行。所以,这个命令翻译成人类语言就是“对这个文件的每一行进行检查,如果你之前没有见过它,就打印出来。” 如果该关联数组的键名还不存在就添加到数组,并增加其取值,这样 awk 下次遇到同样的行时就会不匹配(条件判断为“假”),从而不打印出来。 + +一些人认为这样是优雅的,另外的人认为这可能会造成混淆。任何在日常工作上使用 awk 的都是第一类人。awk 就是设计用来做这个的。在 awk 中,你可以写多行代码。你甚至可以[用 awk 写一些让人不安的复杂功能][2]。但终究来说,awk 还是一个进行文本处理的程序,一般是通过管道。去掉(没必要的)循环定义是很常见的快捷用法,不过如果你乐意,你也可以用下面的代码做同样的事情: + + +``` +awk '{ if (!seen[$0]) print $0; seen[$0]++ }’ +``` + +这会产生相同的结果。 + +awk 是完成这项工作的完美工具。不过,我相信很多管理员--特别是新管理员会转而使用 [Bash][3] 或 Python 来完成这一任务,因为对 awk 的知识和对它的能力的了解看起来随着时间而慢慢被人淡忘。我认为这是标志着一个问题,由于对之前的解决方案缺乏了解,那些已经解决了几十年的问题又突然出现了。 + +shell、grep、sed 和 awk 是 Unix 的基础。如果你不能非常轻松的使用它们,你将会被自己束缚住,因为它们构成了通过命令行和脚本与 Unix 系统交互的基础。学习这些工具如何工作最好的方法之一就是观察真实的例子和实验,你可以在各种 Unix 衍生系统的初始化系统中找到很多,但在 Linux 发行版中它们已经被 [systemd][4] 取代了。 + +数以百万计的 Unix 管理员了解 Shell 脚本和 Unix 工具如何读、写、修改和用在初始化脚本上。不同系统的初始化脚本有很大不同,甚至是不同的 Linux 发行版也不同。但是它们都源自 sh,而且它们都用像 sed、awk 还有 grep 这样的核心的命令行工具。 + +我每天都会听到很多人抱怨初始化脚本太“古老”而且很“难”。但是实际上,初始化脚本和 Unix 管理员每天使用的工具一样,还提供了一个非常好的方式来更加熟悉和习惯这些工具。说初始化脚本难于阅读和难于使用实际上是承认你缺乏对 Unix 基础工具的熟悉。 + +说起在 Reddit 上看到的内容,我也碰到过这个问题,来自一个新入行的 Linux 系统管理员, “[问他是否应该还要去学老式的初始化系统 sysvinit][5]”。 这个帖子的大多数的答案都是正面的——是的,应该学习 sysvinit 和 systemd 两个。一位评论者甚至指出,初始化脚本是学习 Bash 的好方法。而另一个消息是,Fortune 50 强的公司还没有计划迁移到以 systemd 为基础的发行版上。 + +但是,这提醒了我这确实是一个问题。如果我们继续沿着消除脚本和脱离操作系统核心组件的方式发展下去,由于疏于接触,我们将会不经意间使新管理员难于学习基本的 Unix 工具。 + +我不知道为什么有些人想在一层又一层的抽象化来掩盖 Unix 内部,但是这样发展下去可能会让新一代的系统管理员们变成只会按下按钮的工人。我觉得这不是一件好事情。 + +------ + +via: http://www.infoworld.com/article/2985804/linux/remember-sed-awk-linux-admins-should.html + +作者:[Paul Venezia][a] +译者:[Bestony](https://github.com/Bestony) +校对:[wxy](https://github.com/wxy) + +本文由 [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/ diff --git a/translated/tech/20151012 Remember sed and awk All Linux admins should.md b/translated/tech/20151012 Remember sed and awk All Linux admins should.md deleted file mode 100644 index 7117e9f06d..0000000000 --- a/translated/tech/20151012 Remember sed and awk All Linux admins should.md +++ /dev/null @@ -1,69 +0,0 @@ - -# 学会Sed和Awk? 所有的Linux管理员都应该会的技能 - -![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) - -图片来源: Shutterstock - -**我们不希望下一代Linux和Unix的管理员忘记任何初始化脚本和基本工具的好处** - -我曾经有一次在Reddit发表文章的机会, [asking about textfile manipulation][1].这是一个很简单请求,就像我们平时常用Unix的人所见到的。他的问题是,如何删除文件中的重复行,并保存在独立的实例里。 这听起来似乎很简单,但是当文件足够大时,就会有些复杂。 - -这个问题有很多种不同的答案。我怀疑你可以使用几乎任何一种语言来写这样的一个脚本,只是时间的投入和代码的复杂性不同罢了。根据你的个人水平,它大概会花费20-60分钟。但是如果你使用了Perl,Python,Ruby中的一种,你可能很快实现它。 - -或者你可以使用下面的一个方法,让你无比暖心的: 只用 awk. - -这个答案是迄今为止最简明、最简单的解决问题的方法。他只要一行: - -``` -awk '!seen[$0]++' . -``` - -让我们来分析一下 - -在这段代码中,其实隐藏了很多代码。AWK是一种文本处理语言,并且他内部做了大量的假设。首先,你看到的实际上是一个循环的结果。Awk假定你想通过循环输入文件的每一行,所以你不需要明确的去设定它。Awk还假定了你需要打印数据的输出,所以你也不需要去指定它。最好,Awk假定循环在最后一句话执行完结束,这一块也不再需要你去指定它 - -这个例子中看到的字符串是一个关联的数组的名字。$0是一个变量,表示当前行的全部。所以,这个命令翻译成话就是“对这个文件的每一行进行检查,如果你之前没有见过他,就打印出来。”Awk通过做这些来看这个数组是否早已存在或值不相等的,这样就不匹配参数,下次就不会再打印了。 - -一些人认为这样是优雅的,另外的人认为这可能会造成混淆。任何在日常基础事情上使用Awk的都是第一类人。Awk就是被设计做这个的。在Awk中,你可以写多行。甚至是一些复杂的功能。你甚至可以[用awk写一些让人不安的复杂功能][2]。但,最终,Awk还是一个通过管道进行文字处理的程序。去除循环定义的外部缺陷是很常见的用法,你可以用下面的代码做同样的事情 - - - -``` -awk '{ if (!seen[$0]) print $0; seen[$0]++ }’ -``` - -这必将导致相同的结果 - -Awk是完成这项工作的完美工具。不过,我相信很多管理员--特别是新管理员会跳转到[Bash][ 3 ]或Python来完成这一任务,因为Awk的知识和他所能做的事情总是随着时间而褪色。我认为这是一个标识性的事情。几十年来,以前的解决方案总是缺乏对新的问题的处理方法 - -The shell, grep, sed, and awk 是Unix的计算基础.如果你不能非常轻松的使用他们,你将会变得十分脆弱。因为他们通过命令行和脚本的相互作用来实现。学习这些工具如何工作最好的方法之一就是观察和正在运行的范例一起工作,通过Unix系统特有的Init系统,或者在Linux发行版被称为 [systemd][4]. - -数以百万计的Unix管理员了解Shell脚本和Unix工具同读、写、修改和研究Init脚本。不同系统的Init脚本有很大不同,甚至是不同的发行版。但是他们都源自sh,而且他他们都用核心命令行工具像sed,awk还有grep - -我每天都会挺到很多抱怨init脚本太“古老”而且很“难”。但是实际上,Init脚本和Unix管理员每天使用的工具一样,而且还提供了一个非常好的方式来更加熟悉和习惯这些工具。说Init脚本难的应该承认,你缺乏对Unix基础工具的熟悉。 - -说起在Reddit上的事情,我也碰到过这个问题,从一个初露头角的Linux系统管理员, [问他是否应该去学Sysvinit][5]. 大多数的答案都是好的方向--是的,应该学习sysvinit和systemd.一位评论者甚至指出,Init脚本是学习Bash的好方法。而另一个国家50强的公司不会搬到一个以系统为基础的发行版 - -但是,这提醒了我这是一个问题。如果我们继续沿着消除脚本和脱离我们操作系统的系统核心组件。由于出现的太少,我们将会不经意间的使新的管理员学习基本的Unix工具变得更难 - -我不知道为什么有些人想掩盖Unix内核抽象化和反抽象化,但是这样的一条路径可以减少一代Unix管理员出事后对服务支持的依赖。我相信这不是一件好事情。 - ------- - -via: http://www.infoworld.com/article/2985804/linux/remember-sed-awk-linux-admins-should.html - -作者:[Paul Venezia][a] - -译者:[Bestony](https://github.com/Bestony) - -校对:[校对者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/ From 24eda1cd59fd577e80eb32108768cc303d989d80 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 13 Jan 2016 14:32:07 +0800 Subject: [PATCH 0842/1710] PUB:20151223 How to Use Glances to Monitor System on Ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bianjp 翻译的很好,我基本上没动~ --- ... Use Glances to Monitor System on Ubuntu.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/20151223 How to Use Glances to Monitor System on Ubuntu.md (77%) diff --git a/translated/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md b/published/20151223 How to Use Glances to Monitor System on Ubuntu.md similarity index 77% rename from translated/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md rename to published/20151223 How to Use Glances to Monitor System on Ubuntu.md index 46541196a6..08c03efb93 100644 --- a/translated/tech/20151223 How to Use Glances to Monitor System on Ubuntu.md +++ b/published/20151223 How to Use Glances to Monitor System on Ubuntu.md @@ -3,7 +3,7 @@ ![](https://www.maketecheasier.com/assets/uploads/2015/12/glances_featured.jpg) -Glances 是一个跨平台、基于命令行、文本模式的系统监控工具。它是用 Python 编写的,使用 `psutil` 库从系统获取信息。你可以用它来监控 CPU、平均负载、内存、网络接口、磁盘 I/O,文件系统空间利用率、挂载的设备、所有活动进程以及消耗资源最多的进程。Glances 有很多有趣的选项。它的主要特性之一是可以在配置文件中设置阀值(careful[小心]、warning[警告]、critical[致命]),然后它会用不同颜色显示信息以表明系统的瓶颈。 +Glances 是一个用于监控系统的跨平台、基于文本模式的命令行工具。它是用 Python 编写的,使用 `psutil` 库从系统获取信息。你可以用它来监控 CPU、平均负载、内存、网络接口、磁盘 I/O,文件系统空间利用率、挂载的设备、所有活动进程以及消耗资源最多的进程。Glances 有很多有趣的选项。它的主要特性之一是可以在配置文件中设置阀值(careful[小心]、warning[警告]、critical[致命]),然后它会用不同颜色显示信息以表明系统的瓶颈。 ### Glances 的功能 @@ -18,11 +18,11 @@ Glances 是一个跨平台、基于命令行、文本模式的系统监控工具 ### 安装 Glances -Glances 在 Ubuntu 的软件源中,所以安装很简单。执行下面的命令安装 Glances: +Glances 在 Ubuntu 的软件仓库中,所以安装很简单。执行下面的命令安装 Glances: sudo apt-get install glances -(LCTT 译注:若安装后无法正常使用,可考虑使用 pip 安装/升级glances:`sudo pip install --upgrade glances`) +(LCTT 译注:若安装后无法正常使用,可考虑使用 pip 安装/升级 glances:`sudo pip install --upgrade glances`) ### Glances 使用方法 @@ -34,7 +34,7 @@ Glances 在 Ubuntu 的软件源中,所以安装很简单。执行下面的命 ![glances monitor system output](https://www.maketecheasier.com/assets/uploads/2015/12/glances_output1.png) -要退出 Glances 终端,按 ESC 键或 “Ctrl + C”。 +要退出 Glances 终端,按 ESC 键或 `Ctrl + C`。 默认情况下,时间间隔(LCTT 译注:显示数据刷新的时间间隔)是 1s,不过你可以在从终端启动 Glances 时自定义时间间隔。 @@ -46,10 +46,10 @@ Glances 在 Ubuntu 的软件源中,所以安装很简单。执行下面的命 Glances 中不同颜色的含义: -- `绿色`:正常 -- `蓝色`:需要注意 -- `紫色`:警告 -- `红色`:严重 +- `绿色`:正常(OK) +- `蓝色`:小心(careful) +- `紫色`:警告(warning) +- `红色`:致命(critical) 默认设置下,Glances 的阀值设置是:careful=50,warning=70,critical=90。你可以通过 “/etc/glances/” 目录下的默认配置文件 glances.conf 来自定义这些阀值。 @@ -101,7 +101,7 @@ via: https://www.maketecheasier.com/glances-monitor-system-ubuntu/ 作者:[Hitesh Jethva][a] 译者:[bianjp](https://github.com/bianjp) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 18b1d57410dae8d149093bfa8fda0221151eab7f Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 14 Jan 2016 05:55:34 +0800 Subject: [PATCH 0843/1710] PUB:20150921 14 tips for teaching open source development @GHLandy --- ...ps for teaching open source development.md | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) rename {translated/talk => published}/20150921 14 tips for teaching open source development.md (55%) diff --git a/translated/talk/20150921 14 tips for teaching open source development.md b/published/20150921 14 tips for teaching open source development.md similarity index 55% rename from translated/talk/20150921 14 tips for teaching open source development.md rename to published/20150921 14 tips for teaching open source development.md index e1c340ba95..2d5cfaf302 100644 --- a/translated/talk/20150921 14 tips for teaching open source development.md +++ b/published/20150921 14 tips for teaching open source development.md @@ -1,42 +1,43 @@ - -开源代码开发的十四点教学技巧 +在大学培养学生们参与开源代码开发的十四个技巧 ================================================================================ -对于培养和塑造开源代码开发者,Academia就是一个很好的平台。研究中发现,我们偶尔会开源自己编写的软件。这样做有两个理由,一是为了提升自己编写的工具使用率,二是为了了解人们使用这些工具时会遇到哪些问题。在这样一个编写研究软件的背景下,我的任务就是为 Bradford 大学重新设计二年级的软件工程课程。 +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/EDU_TeachingOS.png) -这是一个巨大的挑战,因为我所面对的 80 个学生是来自不同专业的,包括 IT、商务计算和软件工程,这些学生将要在一起上课。最有难度的是,需要和这些编程经验差距很大的学生一起编写代码。按照传统,该课程允许学生选择自己的小组,然后给他们布置构建一个存储数据库系统构的任务,最后提交报告作为评估的一部分。 +学术界是培养和塑造未来的开源开发者的最佳平台。研究中发现,我们偶尔会开源自己编写的软件。这样做有两个理由,一是为了推广自己编写的工具的使用,二是为了了解人们使用这些工具时会遇到哪些问题。在这样一个编写研究软件的背景下,我的任务就是为 Bradford 大学重新设计二年级的本科软件工程课程。 -而我决定重新设计课程,让学生了解现实中的软件团队是如何协作的过程。根据学生的专业和编程技能,我将他们分为五六个人一组。这是为了确保每个小组的整体水平相当,避免小组之间的不公平。 +这是一个挑战,因为我所面对的 80 个学生是来自不同专业的,包括 IT、商务计算和软件工程,这些学生将要在一起上课。最有难度的是,需要和这些编程经验差距很大的学生一起编写代码。按照传统,该课程允许学生选择自己的小组,然后给他们布置构建一个加油站数据库系统的任务,最后提交报告作为评估的一部分。 + +而我决定重新设计课程,让学生了解现实中的软件团队是如何协作的过程。根据学生的专业和编程技能,我将他们分为五、六个人一组。这是为了确保每个小组的整体水平相当,避免小组之间的不等。 ### 核心课程 ### -课程的形式升级为文化课和实践课两项结合在一起。然而实践部分只是充当辅助,主要是老师监督各个小组的实践进度以及他们如何处理客户和产品之间的关系。传统的教学方式由项目管理、软件测试、工程需求分析以及类似主题的讲座组成,再辅以实践和导师会议。这些会议可以很好的考核学生的水平以及检测出他们是否可以跟得上我们在讲座部分中的软件工程方法。本年的教学主题包括以下内容: +课程的形式改为讲座和实践课两项结合在一起。然而实践课作为指导过程,主要是老师监督各个小组的实践进度以及他们如何处理客户和产品之间的关系。而传统的教学方式由项目管理、软件测试、工程需求分析以及类似主题的讲座组成,再辅以实践和导师会议。这些会议可以很好的考核学生的水平以及检测出他们是否可以跟得上我们在讲座部分中的软件工程方法。本年的教学主题包括以下内容: - 工程需求分析 - 如何与客户及其他团队成员互动 - 程序设计方法,如敏捷和极限编程方法 - 如何通过学习不同的软件工程方法进行短期的水平提高 - 小组会议及文档编写 -- 项目管理及项目进展图表 +- 项目管理及项目进展图表(甘特图) - UML 图表及系统描述 - 使用 Git 来进行代码的版本控制 - 软件测试及 BUG 跟踪 - 使用开源库 - 开源代码许可及其选择 -- 软件分发 +- 软件交付 -在这些讲座之后,会有一些来自世界各地的嘉宾为我们说说他们在软件分发过程中的经验。我们也设法请来大学里知识产权律师谈关于软件在英国的知识产权问题,以及如何处理软件的知识产权问题。 +在这些讲座之后,会有一些来自世界各地的嘉宾为我们说说他们在软件交付过程中的经验。我们也设法请来大学里知识产权律师谈关于软件在英国的知识产权问题,以及如何处理软件的知识产权问题。 ### 协作工具 ### -为了让上述教学内容的顺利进行,我们将会介绍一些工具,并训练学生在他们的项目中使用这些工具。如下: +为了让上述教学内容的顺利进行,我们将会引入一些工具,并训练学生在他们的项目中使用这些工具。如下: - Google Drive:团队与导师之间进行共享的工具,暂时存储用于描述项目的文档和图表、需求收集、会议纪要以及项目时间跟踪等信息。采取这样一个方式来监控并提供直接反馈到每个团队,是非常有效的。 - [Basecamp][1]:同样是用于分享文档,在随后的课程中,我们可能会考虑用它取代 Google Drive。 -- BUG 报告工具,如 [Mantis][2]:只能让有限的用户自由提交 BUG。稍后我们提到的 Git 可以让小组内的所有人员用做 BUG 提交。 +- BUG 报告工具,如 [Mantis][2]:只能让有限的用户免费提交 BUG。稍后我们提到的 Git 可以让小组内的所有人员用做 BUG 提交。 - 远程视频会议工具:在人员不在校内,甚至去了其他城市的情况下使用。学生们可以定期通过 Skype 来交流并记录会议内容或则进行录音作为今后其他用处。 -- 同时,学生们的项目中还会用到大量的开源工具包。他们可以根据自己小组的项目需求来选择自己使用的工具包和编程语言。唯一的条件是,这些项目必须开源,最后成果可以安装到大学里的实验室,并且大多的研究人员都支持这个条件。 -- 最后,所有团队必须向客户交付他们的项目,包括完整的工作版本的软件、文档和他们自己选择的开放源码许可。大多数的团队选择了 GPLv3 许可证。 +- 同时,学生们的项目中还会用到大量的开源工具包。他们可以根据自己小组的项目需求来选择自己使用的工具包和编程语言。唯一的条件是,这些项目必须开源,最后成果可以安装到大学里的实验室,并且大多的研究人员都非常支持这个条件。 +- 最后,所有团队必须向客户交付他们的项目,包括完整的可以工作的软件版本、文档和他们自己选择的开放源码许可。大多数的团队选择了 GPLv3 许可证。 ### 技巧和经验教训 ### @@ -48,29 +49,29 @@ 3. 学生更加愿意与校外的客户一起协作。他们期待着与外部公司代表或校外人员协作,不过是为了获得新体验而已。与导师进行交流时,他们都能够表现得很专业,这样使得老师非常放心。 -4. 很多团队版开发单元测试的部分放到项目结束之后,从极限编程方法的角度来说,这是一个严重的禁忌。也许测试应包括在不同阶段的评估中,来提醒他们需要与并行开展软件开发和单元测试。 +4. 很多团队版将开发单元测试的部分放到项目结束之后,从极限编程方法的角度来说,这是一个严重的禁忌。也许测试应包括在不同阶段的评估中,来提醒他们需要并行开展软件开发和单元测试。 -5. 在这个班的 80 个人里边,仅有 4 个女生,每个女都分在不同的小组里边。我观察到,男生们总是充分准备好来承担起领队角色,并将最有趣的代码分配给他们自己来编写,女生则多大遵循安排或者是编写文档。出于某种原因,女生选择不显示权威,即使在女性辅导员鼓励下,她们也不愿编写代码。这仍然是一个需要解决的主要问题。 +5. 在这个班的 80 个人里边,仅有 4 个女生,每个女生都分在不同的小组里边。我观察到,男生们总是充分准备好来承担起领队角色,并将最有趣的代码部分留给他们自己来编写,女生则多大遵循安排或者是编写文档。出于某种原因,女生选择不出头,即使在女性辅导员鼓励下,她们也不愿编写代码。这仍然是一个需要解决的主要问题。 6. 允许不同风格项目文档,比方说,UML 图表、状态图或其他形式的。让学生学习这些并与其他课程融汇贯通来提高他们的学习经验。 7. 学生里边,有些是很好的开发人员,有些做商务计算的则没有多少编程经验。我们要鼓励团队共同努力,避免开发人员做得比那些只做会议记录或文档的其他成员更好的错误认知。我们常在辅导课程中鼓励角色转换,让每个人都有机会学习如何编程。 -8. 小组进行与导师每周见面沟通是非常重要的,可以有效监督各个小组进展情况,还可以了解是谁做了大部分工作。通常,没来参加会议的小组成员基本就是没有参与到他们的团队工作中去的,并且通过其他成员提交的工作报告也可以确定哪些人不活跃。 +8. 小组与导师每周见面沟通是非常重要的,可以有效监督各个小组进展情况,还可以了解是谁做了大部分工作。通常,没来参加会议的小组成员基本就是没有参与到他们的团队工作中去的,并且通过其他成员所提交的工作报告也可以确定哪些人不活跃。 9. 我们鼓励学生们把许可证附加到项目中去,使用外部库以及和客户协作的时候要表明确切知识产权问题。 这样可让打破陈规,开拓思维,并了解真实的软件交付问题。 -10. 给学生们自己选择技术空间。 +10. 给学生们自己选择所用技术的空间。 11. 助教是关键。同时管理 80 个学生显然很有难度,特别是需要对他们进行评估的那几周。明年我一定会找个助教来帮我一起管理各个小组。 -12. 实验室的技术支持是非常重要的。大学里的技术支持对于本课程是非常赞同的。他们正在考虑明年将虚拟机分配给每个团队,这样没个团队可以根据需要自行在虚拟机中安装任何软件。 +12. 实验室的技术支持是非常重要的。大学里的技术支持人员对于本课程是非常赞同的。他们正在考虑明年将虚拟机分配给每个团队,这样没个团队可以根据需要自行在虚拟机中安装任何软件。 13. 团队合作,相互帮助。大多数团队自然而然的支持其他团队成员,同时指导员在中间也帮助了不少。 -14. 来自其他技术人员的帮助会锦上添花。作为一名新的大学导师,我需要从经验中学习,如果我想了解如何管理某些学生和团队,或者对如何让学生适应课程感到困惑时,我会通过多个方面来寻求建议。来自高级技术人员的支持对我来说是一种极大的鼓励。 +14. 来自其他同事的帮助会锦上添花。作为一名新的大学导师,我需要从经验中学习,如果我想了解如何管理某些学生和团队,或者对如何让学生适应课程感到困惑时,我会通过多个方面来寻求建议。来自资深同事的支持对我来说是一种极大的鼓励。 -最后,对于作为导师的我以及所有的学生来说,这都是个有趣的课程。在学习目标和传统的分级方案上还有有一些问题需解决,以减少教师的工作量。明年,我计划会保留这种教学模式,并希望能够提出更好的分级方案以及介绍更多的软件来帮助监督项目和控制代码版本。 +最后,对于作为导师的我以及所有的学生来说,这都是个有趣的课程。在学习目标和传统评分方案上还有有一些问题需解决,以减少教师的工作量。明年,我计划会保留这种教学模式,并希望能够提出更好的评分方案以及引入更多的软件来帮助监督项目和控制代码版本。 -------------------------------------------------------------------------------- From 10eea621ce486fd8d26aa60cebf03454d0483fd2 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 14 Jan 2016 06:23:52 +0800 Subject: [PATCH 0844/1710] PUB:20151215 How to block network traffic by country on Linux @FSSlc --- ...ock network traffic by country on Linux.md | 111 ++++++++++++++++++ ...ock network traffic by country on Linux.md | 110 ----------------- 2 files changed, 111 insertions(+), 110 deletions(-) create mode 100644 published/20151215 How to block network traffic by country on Linux.md delete mode 100644 translated/tech/20151215 How to block network traffic by country on Linux.md diff --git a/published/20151215 How to block network traffic by country on Linux.md b/published/20151215 How to block network traffic by country on Linux.md new file mode 100644 index 0000000000..0a70e7d49b --- /dev/null +++ b/published/20151215 How to block network traffic by country on Linux.md @@ -0,0 +1,111 @@ +如何在 Linux 中根据国家位置来阻断网络流量 +================================================================================ + +作为一名维护 Linux 生产服务器的系统管理员,你可能会遇到这样一些情形:你需要**根据地理位置,选择性地阻断或允许网络流量通过。** 例如你正经历一次由注册在某个特定国家的 IP 发起的 DoS 攻击;或者基于安全考虑,你想阻止来自未知国家的 SSH 登录请求;又或者你的公司对某些在线视频有分销权,它要求只能在特定的国家内合法发行;抑或是由于公司的政策,你需要阻止某个本地主机将文件上传至任意一个非美国的远程云端存储。 + +所有的上述情形都需要设置防火墙,使之具有**基于国家位置过滤流量**的功能。有几个方法可以做到这一点,其中之一是你可以使用 TCP wrappers 来为某个应用(例如 SSH,NFS, httpd)设置条件阻塞。但其缺点是你想要保护的那个应用必须以支持 TCP wrappers 的方式构建。另外,TCP wrappers 并不总是能够在各个平台中获取到(例如,Arch Linux [放弃了][2]对它的支持)。另一种方式是结合基于国家的 GeoIP 信息,设置 [ipset][3],并将它应用到 iptables 的规则中。后一种方式看起来更有希望一些,因为基于 iptables 的过滤器是与应用无关的,且容易设置。 + +在本教程中,我将展示 **另一个基于 iptables 的 GeoIP 过滤器,它由 xtables-addons 来实现**。对于那些不熟悉它的人来说, xtables-addons 是用于 netfilter/iptables 的一系列扩展。一个包含在 xtables-addons 中的名为 xt\_geoip 的模块扩展了 netfilter/iptables 的功能,使得它可以根据流量来自或流向的国家来进行过滤,IP 掩蔽(NAT)或丢包。若你想使用 xt\_geoip,你不必重新编译内核或 iptables,你只需要使用当前的内核构建环境(/lib/modules/\`uname -r`/build)以模块的形式构建 xtables-addons。同时也不需要进行重启。只要你构建并安装了 xtables-addons , xt\_geoip 便能够配合 iptables 使用。 + +至于 xt\_geoip 和 ipset 之间的比较,[xtables-addons 的官方网站][3] 上是这么说的: 相比于 ipset,xt\_geoip 在内存占用上更胜一筹,但对于匹配速度,基于哈希的 ipset 可能更有优势。 + +在教程的余下部分,我将展示**如何使用 iptables/xt\_geoip 来根据流量的来源地或流入的国家阻断网络流量**。 + +### 在 Linux 中安装 xtables-addons ### + +下面介绍如何在各种 Linux 平台中编译和安装 xtables-addons。 + +为了编译 xtables-addons,首先你需要安装一些依赖软件包。 + +#### 在 Debian,Ubuntu 或 Linux Mint 中安装依赖 #### + + $ sudo apt-get install iptables-dev xtables-addons-common libtext-csv-xs-perl pkg-config + +#### 在 CentOS,RHEL 或 Fedora 中安装依赖 #### + +CentOS/RHEL 6 需要事先设置好 EPEL 仓库(为 perl-Text-CSV\_XS 所需要)。 + + $ sudo yum install gcc-c++ make automake kernel-devel-`uname -r` wget unzip iptables-devel perl-Text-CSV_XS + +#### 编译并安装 xtables-addons #### + +从 `xtables-addons` 的[官方网站][4] 下载源码包,然后按照下面的指令编译安装它。 + + $ wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/xtables-addons-2.10.tar.xz + $ tar xf xtables-addons-2.10.tar.xz + $ cd xtables-addons-2.10 + $ ./configure + $ make + $ sudo make install + +需要注意的是,对于基于红帽的系统(CentOS、RHEL、Fedora),它们默认开启了 SELinux,所以有必要像下面这样调整 SELinux 的策略。否则,SELinux 将阻止 iptables 加载 xt\_geoip 模块。 + + $ sudo chcon -vR --user=system_u /lib/modules/$(uname -r)/extra/*.ko + $ sudo chcon -vR --type=lib_t /lib64/xtables/*.so + +### 为 xtables-addons 安装 GeoIP 数据库 ### + +下一步是安装 GeoIP 数据库,它将被 xt\_geoip 用来查询 IP 地址与国家地区之间的对应关系。方便的是,`xtables-addons` 的源码包中带有两个帮助脚本,它们被用来从 MaxMind 下载 GeoIP 数据库并将它转化为 xt\_geoip 可识别的二进制形式文件;它们可以在源码包中的 geoip 目录下找到。请遵循下面的指导来在你的系统中构建和安装 GeoIP 数据库。 + + $ cd geoip + $ ./xt_geoip_dl + $ ./xt_geoip_build GeoIPCountryWhois.csv + $ sudo mkdir -p /usr/share/xt_geoip + $ sudo cp -r {BE,LE} /usr/share/xt_geoip + +根据 [MaxMind][5] 的说明,他们的 GeoIP 数据库能够以 99.8% 的准确率识别出 ip 所对应的国家,并且每月这个数据库将进行更新。为了使得本地安装的 GeoIP 数据是最新的,或许你需要设置一个按月执行的 [cron job][6] 来时常更新你本地的 GeoIP 数据库。 + +### 阻断来自或流向某个国家的网络流量 ### + +一旦 xt\_geoip 模块和 GeoIP 数据库安装好后,你就可以在 iptabels 命令中使用 geoip 的匹配选项。 + + $ sudo iptables -m geoip --src-cc country[,country...] --dst-cc country[,country...] + +你想要阻断流量的那些国家是使用[2个字母的 ISO3166 代码][7] 来特别指定的(例如 US(美国)、CN(中国)、IN(印度)、FR(法国))。 + +例如,假如你想阻断来自也门(YE) 和 赞比亚(ZM)的流量,下面的 iptabels 命令便可以达到此目的。 + + $ sudo iptables -I INPUT -m geoip --src-cc YE,ZM -j DROP + +假如你想阻断流向中国(CN) 的流量,可以运行下面的命令: + + $ sudo iptables -A OUTPUT -m geoip --dst-cc CN -j DROP + +匹配条件也可以通过在 `--src-cc` 或 `--dst-cc` 选项前加 `!` 来达到相反的目的: + +假如你想在你的服务器上阻断来自所有非美国的流量,可以运行: + + $ sudo iptables -I INPUT -m geoip ! --src-cc US -j DROP + +![](https://c2.staticflickr.com/6/5654/23665427845_050241b03f_c.jpg) + +#### 对于使用 Firewall-cmd 的用户 #### + +某些发行版本例如 CentOS/RHEL7 或 Fedora 已经用 firewalld 替代了 iptables 来作为默认的防火墙服务。在这些系统中,你可以类似使用 xt\_geoip 那样,使用 firewall-cmd 来阻断流量。利用 firewall-cmd 命令,上面的三个例子可被重新写为: + + $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip --src-cc YE,ZM -j DROP + $ sudo firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -m geoip --dst-cc CN -j DROP + $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip ! --src-cc US -j DROP + +### 总结 ### + +在本教程中,我展示了使用 iptables/xt\_geoip 来根据流量的来源地或流入的国家轻松地阻断网络流量。假如你有这方面的需求,把它部署到你的防火墙系统中可以使之成为一个实用的办法。作为最后的警告,我应该提醒你的是:在你的服务器上通过基于 GeoIP 的流量过滤来禁止特定国家的流量并不总是万无一失的。GeoIP 数据库本身就不是很准确或齐全,且流量的来源或目的地可以轻易地通过使用 VPN、Tor 或其他任意易受攻击的中继主机来达到欺骗的目的。基于地理位置的过滤器甚至可能会阻止本不该阻止的合法网络流量。在你决定把它部署到你的生产环境之前请仔细考虑这个限制。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/block-network-traffic-by-country-linux.html + +作者:[Dan Nanni][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://www.archlinux.org/news/dropping-tcp_wrappers-support/ +[2]:http://xmodulo.com/block-unwanted-ip-addresses-linux.html +[3]:http://xtables-addons.sourceforge.net/geoip.php +[4]:http://xtables-addons.sourceforge.net/ +[5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/ +[6]:http://ask.xmodulo.com/add-cron-job-linux.html +[7]:https://en.wikipedia.org/wiki/ISO_3166-1 diff --git a/translated/tech/20151215 How to block network traffic by country on Linux.md b/translated/tech/20151215 How to block network traffic by country on Linux.md deleted file mode 100644 index 5d04b20a2b..0000000000 --- a/translated/tech/20151215 How to block network traffic by country on Linux.md +++ /dev/null @@ -1,110 +0,0 @@ -如何在 Linux 中根据国家位置来阻断网络流量 -================================================================================ -作为一名维护 Linux 生产服务器的系统管理员,你可能会遇到这样一些情形:你需要 **根据地理位置,选择性地阻断或允许网络流量通过。** 例如你正经历一次由注册在某个特定国家的 IP 发起的 DoS 攻击;或者基于安全考虑,你想阻止来自未知国家的 SSH 登陆请求;又或者你的公司对某些在线视频有分销权,它要求只能合法地在特定的国家内发行;抑或是由于公司的政策,你需要阻止任意一个本地主机将文件上传至任意一个非美国的远程云端存储。 - -所有的上述情形都需要设置防火墙,使之具有 **过滤基于国家位置的流量** 的功能。有几个方法可以做到这一点,其中之一是你可以使用 TCP wrappers 来为个人应用(例如 SSH,NFS, httpd)设置有条件的阻塞。但其缺点是你想要保护的那个应用必须以支持 TCP wrappers 的方式构建。另外,TCP wrappers 并不总是能够在各个平台中获取到(例如,Arch Linux [放弃了][2]对它的支持)。另一种方式是结合基于国家的 GeoIP 信息,设置 [ipset][3],并将它应用到 iptables 的规则中。后一种方式看起来更有希望一些,因为基于 iptables 的过滤器是与应用无关的,且容易设置。 - -在本教程中,我将展示 **另一个基于 iptables 的 GeoIP 过滤器,它由 xtables-addons 来实现**。对于那些不熟悉它的人来说, xtables-addons 是针对 netfilter/iptables 的一系列扩展。一个包含在 xtables-addons 中的名为 xt_geoip 的模块扩展了 netfilter/iptables 的功能,使得它可以根据流量来自或流向的国家来进行过滤,IP 掩蔽(NAT) 或丢包。若你想使用 xt_geoip,你不必重新编译内核或 iptables,你只需要使用当前的内核构建环境(/lib/modules/`uname -r`/build) 以模块的形式构建 xtables-addons。同时也不需要进行重启。只要你构建并安装了 xtables-addons , xt_geoip 便能够配合 iptables 使用。 - -至于 xt_geoip 和 ipset 之间的比较,[xtables-addons 的官方网站][3] 上是这么说的: 相比于 ipset,xt_geoip 在内存占用上更胜一筹,但对于匹配速度,基于哈希的 ipset 可能更有优势。 - -在教程的余下部分,我将展示 ** 如何使用 iptables/xt_geoip 来根据流量的来源地或流入的国家阻断网络流量 **。 - -### 在 Linux 中安装 xtables-addons ### - -下面介绍如何在各种 Linux 平台中编译和安装 xtables-addons。 - -为了编译 xtables-addons,首先你需要安装一些依赖软件包。 - -#### 在 Debian,Ubuntu 或 Linux Mint 中安装依赖 #### - - $ sudo apt-get install iptables-dev xtables-addons-common libtext-csv-xs-perl pkg-config - -#### 在 CentOS,RHEL 或 Fedora 中安装依赖 #### - -CentOS/RHEL 6 需要事先设置好 EPEL 仓库(为 perl-Text-CSV_XS 所需要)。 - - $ sudo yum install gcc-c++ make automake kernel-devel-`uname -r` wget unzip iptables-devel perl-Text-CSV_XS - -#### 编译并安装 xtables-addons #### - -从 `xtables-addons` 的[官方网站][4] 下载源码包,然后按照下面的指令编译安装它。 - - $ wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/xtables-addons-2.10.tar.xz - $ tar xf xtables-addons-2.10.tar.xz - $ cd xtables-addons-2.10 - $ ./configure - $ make - $ sudo make install - -需要注意的是,对于基于红帽的系统(CentOS, RHEL, Fedora),它们默认开启了 SELinux,所以有必要像下面这样调整 SELinux 的策略。否则,SELinux 将阻止 iptables 加载 xt_geoip 模块。 - - $ sudo chcon -vR --user=system_u /lib/modules/$(uname -r)/extra/*.ko - $ sudo chcon -vR --type=lib_t /lib64/xtables/*.so - -### 为 xtables-addons 安装 GeoIP 数据库 ### - -下一步是安装 GeoIP 数据库,它将被 xt_geoip 用来查询 IP 地址与国家地区之间的对应关系。方便的是,`xtables-addons` 的源码包中带有两个帮助脚本,它们被用来从 MaxMind 下载 GeoIP 数据库并将它转化为 xt_geoip 可识别的二进制形式文件;而它们可以在源码包中的 geoip 目录下找到。请遵循下面的指导来在你的系统中构建和安装 GeoIP 数据库。 - - $ cd geoip - $ ./xt_geoip_dl - $ ./xt_geoip_build GeoIPCountryWhois.csv - $ sudo mkdir -p /usr/share/xt_geoip - $ sudo cp -r {BE,LE} /usr/share/xt_geoip - -根据 [MaxMind][5] 的说明,他们的 GeoIP 数据库能够以 99.8% 的准确率识别出 ip 所对应的国家,并且每月这个数据库将进行更新。为了使得本地安装的 GeoIP 数据是最新的,或许你需要设置一个按月执行的 [cron job][6] 来时常更新你本地的 GeoIP 数据库。 - -### 阻断来自或流向某个国家的网络流量 ### - -一旦 xt_geoip 模块和 GeoIP 数据库安装好后,你就可以在 iptabels 命令中使用 geoip 的匹配选项。 - - $ sudo iptables -m geoip --src-cc country[,country...] --dst-cc country[,country...] - -你想要阻断流量的那些国家是使用[2个字母的 ISO3166 代码][7] 来特别指定的(例如 US(美国)、CN(中国)、IN(印度)、FR(法国))。 - -例如,假如你想阻断来自也门(YE) 和 赞比亚(ZM) 的流量,下面的 iptabels 命令便可以达到此目的。 - - $ sudo iptables -I INPUT -m geoip --src-cc YE,ZM -j DROP - -假如你想阻断流向中国(CN) 的流量,可以运行下面的命令: - - $ sudo iptables -A OUTPUT -m geoip --dst-cc CN -j DROP - -匹配条件也可以通过在 "--src-cc" 或 "--dst-cc" 选项前加 "!" 来达到相反的目的: - -假如你想在你的服务器上阻断来自所有非美国的流量,可以运行: - - $ sudo iptables -I INPUT -m geoip ! --src-cc US -j DROP - -![](https://c2.staticflickr.com/6/5654/23665427845_050241b03f_c.jpg) - -#### 对于使用 Firewall-cmd 的用户 #### - -某些发行版本例如 CentOS/RHEL7 或 Fedora 已经用 firewalld 替代了 iptables 来作为默认的防火墙服务。在这些系统中,你可以类似使用 xt_geoip 那样,使用 firewall-cmd 来阻断流量。利用 firewall-cmd 命令,上面的三个例子可被重新写为: - - $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip --src-cc YE,ZM -j DROP - $ sudo firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -m geoip --dst-cc CN -j DROP - $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -m geoip ! --src-cc US -j DROP - -### 总结 ### - -在本教程中,我展示了使用 iptables/xt_geoip 来根据流量的来源地或流入的国家轻松地阻断网络流量。假如你有这方面的需求,把它部署到你的防火墙系统中可以使之成为一个实用的办法。作为最后的警告,我应该提醒你的是:在你的服务器上通过基于 GeoIP 的流量过滤来禁止特定国家的流量并不总是万无一失的。GeoIP 数据库本身就不是很准确或齐全,且流量的来源或目的地可以轻易地通过使用 VPN、Tor 或其他任意易受攻击的中继主机来达到欺骗的目的。基于地理位置的过滤器甚至可能会阻止本不该阻止的合法网络流量。在你决定把它部署到你的生产环境之前请仔细考虑这个限制。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/block-network-traffic-by-country-linux.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]:https://www.archlinux.org/news/dropping-tcp_wrappers-support/ -[2]:http://xmodulo.com/block-unwanted-ip-addresses-linux.html -[3]:http://xtables-addons.sourceforge.net/geoip.php -[4]:http://xtables-addons.sourceforge.net/ -[5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/ -[6]:http://ask.xmodulo.com/add-cron-job-linux.html -[7]:https://en.wikipedia.org/wiki/ISO_3166-1 From 41f5508b4c826c826f639eda0e35e8c1e02a105c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 14 Jan 2016 06:37:10 +0800 Subject: [PATCH 0845/1710] PUB:20151223 Monitor Linux System Performance Using Nmon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @sonofelice 翻译的不错,用心了。https://linux.cn/article-6886-1.html --- ...tor Linux System Performance Using Nmon.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename {translated/tech => published}/20151223 Monitor Linux System Performance Using Nmon.md (51%) diff --git a/translated/tech/20151223 Monitor Linux System Performance Using Nmon.md b/published/20151223 Monitor Linux System Performance Using Nmon.md similarity index 51% rename from translated/tech/20151223 Monitor Linux System Performance Using Nmon.md rename to published/20151223 Monitor Linux System Performance Using Nmon.md index 70d0f3a11f..26f3f3f1e2 100644 --- a/translated/tech/20151223 Monitor Linux System Performance Using Nmon.md +++ b/published/20151223 Monitor Linux System Performance Using Nmon.md @@ -1,15 +1,16 @@ -使用Nmon监控Linux的系统性能 +使用 Nmon 监控 Linux 的系统性能 ================================================================================ -Nmon(得名于Nigel's的监控器)是IBM的员工Nigel Griffiths为AIX和Linux系统开发的一款计算机性能系统监控工具。Nmon可以把操作系统的统计数据展示在屏幕上或者存储到一份数据文件里,来帮助理解计算机资源的使用情况、调整选项和系统瓶颈。这个系统基准测试工具只需要使用一条命令就能得到大量重要的性能数据。使用Nmon可以很轻松的监控系统的CPU、内存、网络、硬盘、文件系统、NFS、高耗进程、资源和微分区功率的信息。 +Nmon(得名于 Nigel 的监控器)是IBM的员工 Nigel Griffiths 为 AIX 和 Linux 系统开发的一款计算机性能系统监控工具。Nmon 可以把操作系统的统计数据展示在屏幕上或者存储到一份数据文件里,来帮助了解计算机资源的使用情况、调整方向和系统瓶颈。这个系统基准测试工具只需要使用一条命令就能得到大量重要的性能数据。使用 Nmon 可以很轻松的监控系统的 CPU、内存、网络、硬盘、文件系统、NFS、高耗进程、资源和 IBM Power 系统的微分区的信息。 ### Nmon 安装 ### -Nmon默认是存在于Ubuntu的仓库中的。你可以通过下面的命令安装Nmon: +Nmon 默认是存在于 Ubuntu 的仓库中的。你可以通过下面的命令安装 Nmon: sudo apt-get install nmon -怎么使用Nmon来监控Linux的性能 -安装完成后,通过在终端输入`nmon` 命令来启动Nmon +### 怎么使用Nmon来监控Linux的性能 ### + +安装完成后,通过在终端输入`nmon` 命令来启动 Nmon nmon @@ -17,25 +18,24 @@ Nmon默认是存在于Ubuntu的仓库中的。你可以通过下面的命令安 ![nmon-output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon-output.png) -从上面的截图可以看到nmon命令行工具完全是交互式运行的,你可以使用快捷键来轻松查看对应的统计数据。 -你可以使用下面的nmon快捷键来显示不同的系统统计数据: +从上面的截图可以看到 nmon 命令行工具完全是交互式运行的,你可以使用快捷键来轻松查看对应的统计数据。你可以使用下面的 nmon 快捷键来显示不同的系统统计数据: -- `q` : 停止或编辑Nmon +- `q` : 停止并退出 Nmon - `h` : 查看帮助 -- `c` : 查看CPU统计数据 +- `c` : 查看 CPU 统计数据 - `m` : 查看内存统计数据 - `d` : 查看硬盘统计数据 - `k` : 查看内核统计数据 - `n` : 查看网络统计数据 -- `N` : 查看NFS统计数据 +- `N` : 查看 NFS 统计数据 - `j` : 查看文件系统统计数据 - `t` : 查看高耗进程 - `V` : 查看虚拟内存统计数据 - `v` : 详细模式 -### 核查CPU处理器 ### +### 核查 CPU 处理器 ### -如果你想收集关于CPU性能相关的统计数据,你应该按下键盘上的`c`键,之后你将会看到下面的输出: +如果你想收集关于 CPU 性能相关的统计数据,你应该按下键盘上的`c`键,之后你将会看到下面的输出: ![nmon_cpu_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_cpu_output.png) @@ -47,7 +47,7 @@ Nmon默认是存在于Ubuntu的仓库中的。你可以通过下面的命令安 ### 核查网络统计数据 ### -如果想收集Linux系统网络统计数据,按下`n`键,你将会看到下面输出: +如果想收集 Linux 系统的网络统计数据,按下`n`键,你将会看到下面输出: ![n_network_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_network_output.png) @@ -59,19 +59,19 @@ Nmon默认是存在于Ubuntu的仓库中的。你可以通过下面的命令安 ### 核查内核信息 ### -Nmon一个非常重要的快捷键是`k`键,用来显示系统内核相关的概要信息。按下`k`键之后,会看到下面输出: +Nmon 一个非常重要的快捷键是`k`键,用来显示系统内核相关的概要信息。按下`k`键之后,会看到下面输出: ![nmon_kernel_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_kernel_output.png) ### 获取系统信息 ### -对每个系统管理员来说一个非常有用的快捷键是`r`键,可以用来显示计算机系统结构、操作系统版本号和CPU等不同资源的信息。按下`r`键之后会看到下面输出: +对每个系统管理员来说一个非常有用的快捷键是`r`键,可以用来显示计算机的系统结构、操作系统版本号和 CPU 等不同资源的信息。按下`r`键之后会看到下面输出: ![nmon_system_output](https://www.maketecheasier.com/assets/uploads/2015/12/nmon_system_output.png) ### 总结 ### -还有许多其他的工具实现的功能和Nmon一样,不过Nmon对一个Linux新手来说还是很友好的。如果你有什么问题,尽管评论。 +还有许多其他的工具做的和 Nmon 同样的工作,不过 Nmon 对一个 Linux 新手来说还是很友好的。如果你有什么问题,尽管评论。 -------------------------------------------------------------------------------- @@ -79,7 +79,7 @@ via: https://www.maketecheasier.com/monitor-linux-system-performance/ 作者:[Hitesh Jethva][a] 译者:[sonofelice](https://github.com/sonofelice) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 99e9065073cab133e18e2d27903d364c0168bd4b Mon Sep 17 00:00:00 2001 From: icecoobe Date: Thu, 14 Jan 2016 09:56:50 +0800 Subject: [PATCH 0846/1710] [Translated] 20151223 What' s the Best File System for My Linux Install.md --- ...e Best File System for My Linux Install.md | 98 ------------------- ...e Best File System for My Linux Install.md | 96 ++++++++++++++++++ 2 files changed, 96 insertions(+), 98 deletions(-) delete mode 100644 sources/talk/20151223 What' s the Best File System for My Linux Install.md create mode 100644 translated/talk/20151223 What' s the Best File System for My Linux Install.md diff --git a/sources/talk/20151223 What' s the Best File System for My Linux Install.md b/sources/talk/20151223 What' s the Best File System for My Linux Install.md deleted file mode 100644 index 52f2ac8e88..0000000000 --- a/sources/talk/20151223 What' s the Best File System for My Linux Install.md +++ /dev/null @@ -1,98 +0,0 @@ -Translating by icecoobe. - -What’s the Best File System for My Linux Install? -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-feature-image.jpg) - -File systems: they’re not the most exciting things in the world, but important nonetheless. In this article we’ll go over the popular choices for file systems on Linux – what they’re about, what they can do, and who they’re for. - -### Ext4 ### - -![file-systems-ext4](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-ext4.png) - -If you’ve ever installed Linux before, chances are you’ve seen the “Ext4” during installation. There’s a good reason for that: it’s the file system of choice for just about every Linux distribution available right now. Sure, there are some that choose other options, but there’s no denying that Extended 4 is the file system of choice for almost all Linux users. - -#### What can it do? #### - -Extended 4 has all of the goodness that you’ve come to expect from past file system iterations (Ext2/Ext3) but with enhancements. There’s a lot to dig into, but here are the best parts of what Ext4 can do for you: - -- file system journaling -- journal checksums -- multi-block file allocation -- backwards compatibility support for Extended 2 and 3 -- persistent pre-allocation of free space -- improved file system checking (over previous versions) -- and of course, support for larger files - -#### Who is it for? #### - -Extended 4 is for those looking for a super-stable foundation to build upon, or for those looking for something that just works. This file system won’t snapshot your system; it doesn’t even have the greatest SSD support, but If your needs aren’t too extravagant, you’ll get along with it just fine. - -### BtrFS ### - -![file-systems-btrFS](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-btrFS-e1450065697580.png) - -The B-tree file system (also known as butterFS) is a file system for Linux developed by Oracle. It’s a new file system and is in heavy development stages. The Linux community considers it unstable to use for some. The core principle of BtrFS is based around the principle of copy-on-write. **Copy on write** basically means that the system has one single copy of a bit of data before the data has been written. When the data has been written, a copy of it is made. - -#### What can it do? #### - -Besides supporting copy-on-write, BtrFS can do many other things – so many things, in fact, that it’d take forever to list everything. Here are the most notable features: The file system supports read-only snapshots, file cloning, subvolumes, transparent compression, offline file system check, in-place conversion from ext3 and 4 to Btrfs, online defragmentation, anew has support for RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10. - -#### Who is it for? #### - -The developers of BtrFS have promised that this file system is the next-gen replacement for other file systems out there. That much is true, though it certainly is a work in progress. There are many killer features for advanced users and basic users alike (including great performance on SSDs). This file system is for those looking to get a little bit more out of their file system and who want to try the copy-on-write way of doing things. - -### XFS ### - -![file-systems-xfs](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-xfs.jpg) - -Developed and created by Silicon Graphics, XFS is a high-end file system that specializes in speed and performance. XFS does extremely well when it comes to parallel input and output because of its focus on performance. The XFS file system can handle massive amounts of data, so much in fact that some users of XFS have close to 300+ terabytes of data. - -#### What can it do? #### - -XFS is a well-tested data storage file system created for high performance operations. Its features include: - -- striped allocation of RAID arrays -- file system journaling -- variable block sizes -- direct I/O -- guaranteed-rate I/O -- snapshots -- online defragmentation -- online resizing - -#### Who is it for? #### - -XFS is for those looking for a rock-solid file solution. The file system has been around since 1993 and has only gotten better and better with time. If you have a home server and you’re perplexed on where you should go with storage, consider XFS. A lot of the features the file system comes with (like snapshots) could aid in your file storage system. It’s not just for servers, though. If you’re a more advanced user and you’re interested in a lot of what was promised in BtrFS, check out XFS. It does a lot of the same stuff and doesn’t have stability issues. - -### Reiser4 ### - -![file-system-riser4](https://www.maketecheasier.com/assets/uploads/2015/05/file-system-riser4.gif) - -Reiser4, the successor to ReiserFS, is a file system created and developed by Namesys. The creation of Reiser4 was backed by the Linspire project as well as DARPA. What makes Reiser4 special is its multitude of transaction models. There isn’t one single way data can be written; instead, there are many. - -#### What can it do? #### - -Reiser4 has the unique ability to use different transaction models. It can use the copy-on-write model (like BtrFS), write-anywhere, journaling, and the hybrid transaction model. It has a lot of improvements upon ReiserFS, including better file system journaling via wandering logs, better support for smaller files, and faster handling of directories. Reiser4 has a lot to offer. There are a lot more features to talk about, but suffice it to say it’s a huge improvement over ReiserFS with tons of added features. - -#### Who is it for? #### - -Resier4 is for those looking to stretch one file system across multiple use-cases. Maybe you want to set up one machine with copy-on-write, another with write-anywhere, and another with hybrid transaction, and you don’t want to use different types of file systems to accomplish this task. Reiser4 is perfect for this type of use-case. - -### Conclusion ### - -There are many file systems available on Linux. Each serves a unique purpose for unique users looking to solve different problems.This post focuses on the most popular choices for the platform. There is no doubt there are other choices out there for other use-cases. - -What’s your favorite file system to use on Linux? Tell us why below! - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/best-file-system-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/ diff --git a/translated/talk/20151223 What' s the Best File System for My Linux Install.md b/translated/talk/20151223 What' s the Best File System for My Linux Install.md new file mode 100644 index 0000000000..2d093cb83f --- /dev/null +++ b/translated/talk/20151223 What' s the Best File System for My Linux Install.md @@ -0,0 +1,96 @@ + +我的Linux系统应该安装的最好的文件系统是什么? +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-feature-image.jpg) + +文件系统: 它们不是世界上最激动人心的技术,但是仍然很重要。本文我们将细数那些流行的Linux文件系统 - 它们是什么,它们能够做什么,以及它们的目标用户。 + +### Ext4 ### + +![file-systems-ext4](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-ext4.png) + +如果你曾经安装过Linux,你可能在安装过程中看到过"Ext4"字样。关于这个有一个不错的理由: 它是当前每个可用Linux发行版所选择的文件系统。当然,还有其他的一些选择,但是不可否认的是,Ext4(Extended 4)几乎是所有Linux用户都会选择的文件系统。 + +#### 它能做什么? #### + +Ext4拥有你预期的曾经的文件系统(Ext2/Ext3)的所有优点, 同时还带来了一些改进。还有很多内容可以发掘,这里列举出Ext4为你带来的最好的部分: + +- 文件系统日志 +- 日志校验 +- 多重块文件的分配 +- 对Ext2 && Ext3向后兼容 +- 持续的预分配空闲空间 +- 改进的文件系统校验(相比于之前的版本) +- 当然,同时支持更大的文件 + +#### 目标用户 #### + +Ext4针对那些寻找超级可靠的构建环境或者那些仅仅需要可用环境的用户。这个文件系统不会对你的系统做快照;它甚至没有最好的SSD支持,但是如果你的要求不是太过严格的话,你会觉得它也还不错。 + +### BtrFS ### + +![file-systems-btrFS](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-btrFS-e1450065697580.png) + +B树(B-tree)文件系统 (也被认为是butterFS,黄油文件系统) 是Oracle为Linux研发的一款文件系统。它是一个全新的文件系统,而且正处于重度开发阶段。Linux社区认为其目前使用上还有些不稳定。BtrFS的核心原则是基于写时复制(copy-on-write). **写时复制**基本上意味着在写入数据前,这份数据的每一比特都有单独的一份副本。当数据写入完毕后,它相应的副本也随之生成。 + +#### 它能做什么 #### + +除了支持写时复制之外,BtrFS也能够胜任许多其他的事务 - 事实上,如此多的事务支持以致于它能永久列出一切(数据)。这里列举最值得一提的特性:支持只读快照,文件克隆,子卷,透明压缩,离线文件系统校验,无缝地从ext3&&4转换到BtrFS,在线碎片整理,还支持RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10。 + +#### 目标用户 #### + +BtrFS的开发者门许诺过,该文件系统是当前其他文件系统的新一代替代者。非常正确,虽然目前其处于开发中。它有很多杀手级的特性面向高级用户,也包括基本用户 (包括SSDs上面的表现)。这个文件系统针对那些想要从文件系统中获取更多(特性),以及那些想尝试用写时复制机制做一些事情的用户。 + +### XFS ### + +![file-systems-xfs](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-xfs.jpg) + +由Silicon Graphics公司创造开发,XFS是一个高端文件系统,定位于速度和性能。对于性能方面的专注,使得在并行输入输出方面,XFS表现的尤其出色。XFS文件系统能够处理数量庞大的数据,事实上某些XFS用户的数据接近300+TB。 + +#### 它能做什么 #### + +XFS是一个经历良好测试的数据存储文件系统,它是为了高性能操作而诞生的。其特性包括: + +- RAID阵列的条纹(striped)模式分配 +- 文件系统日志 +- 多种块大小 +- 直接I/O +- 指定速率(guaranteed-rate)I/O +- 快照 +- 在线碎片整理 +- 在线调整大小 + +#### 目标用户 #### + +XFS针对那些想要一个坚如磐石的文件系统方案的用户。它起源于1993年,并且随着时间的变迁它变得越来越好。如果你有一台家庭服务器,而且你苦恼于如何部署存储环境,那么可以考虑下XFS。它拥有的众多特性(比如快照)能够协助你的文件存储系统。尽管如此,它不局限于服务器端。如果你是一个相对高级一点的用户或者你对BtrFS所承诺的很多特性感兴趣的话,尝试一下XFS。它实现了很多与BtrFS相似的特性,并且没有稳定性方面的问题。 + +### Reiser4 ### + +![file-system-riser4](https://www.maketecheasier.com/assets/uploads/2015/05/file-system-riser4.gif) + +Reiser4,ReiserFS的继任者,由Namesys公司创造研发。它的诞生追溯到Linspire工程和DARPA。它与众不同的地方在于众多的事务模式。没有一个单一的方式来写入数据;取而代之的是,有很多方式(来写入)。 + +#### 它能做什么 #### + +Reiser4拥有着使用多种不同事务模式的独特能力。它能够使用写时复制模式 (像BtrFS),任意位置写入(write-anywhere),日志,以及超级事务模式。它在ReiserFS的基础上做了许多的改进,包括更好的基于漫游日志的文件系统日志,对更小的文件较好的支持,以及更快速的目录处理。Reiser4提供了许多功能特性。还有更多的特性可以探讨,不过简单来讲,相比于ReiserFS它对众多新增特性做了非常大的改进。 + +#### 目标用户 #### + +Resier4适合那些想要将一个文件系统应用到多中场景下的用户。可能你想在一台机器上使用copy-on-write机制,在另一台机器上使用write-anywhere机制,还会在另一台机器上使用超级事务,而你又不希望使用多种不同类型的文件系统来完成这项任务。Reiser4是适合这种情况的完美方案。 + +### 结论 ### + +Linux上有许多可用的文件系统。每个文件系统都有其特定的用途,以便于特定用户解决不同的问题。本文的焦点集中在平台上文件系统的主流的选择。毫无疑问,其它的场景下还有一些别的选择。 + +你在Linux上最喜欢的文件系统是什么?在下面(的评论区)告诉我们吧! +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/best-file-system-linux/ + +作者:[Derrik Diener][a] +译者:[icecoobe](https://github.com/icecoobe) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/derrikdiener/ From 16e79babe31a787b33c8de96e2175583e230062e Mon Sep 17 00:00:00 2001 From: cposture Date: Thu, 14 Jan 2016 15:19:35 +0800 Subject: [PATCH 0847/1710] translated by cposture 2016-01-14 --- ...es – Creating & Managing System Backups.md | 277 ------------------ ...es – Creating & Managing System Backups.md | 254 ++++++++++++---- 2 files changed, 192 insertions(+), 339 deletions(-) delete mode 100644 sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md 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 deleted file mode 100644 index 21f1d0523b..0000000000 --- a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md +++ /dev/null @@ -1,277 +0,0 @@ -[Translating by cposture 15-12-31] -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/ diff --git a/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md index 94ffe0d7f7..8f7ca3dda1 100644 --- a/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md +++ b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md @@ -1,24 +1,26 @@ [未完成,不要合并-Translating By cposture 2016-01-07] -LFCS 系列第六讲://创建和管理系统备份 -==== - +LFCS 系列第六讲:组装分区为RAID设备——创建和管理系统备份 +========================================================= Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时上游团队请求支持的决策能力。 -//图片 +![Linux Foundation Certified Sysadmin – Part 6](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-6.png) -LFCS 系列第五讲 +LFCS 系列第六讲 以下视频介绍了 Linux 基金会认证程序。 -本讲是《十套教程》系列中的第六讲,在这一讲里,我们将会解释如何组装分区作为RAID设备——创建和管理系统备份。这些都是 LFCS 认证中的必备知识。 +注:youtube 视频 + -# 了解RAID +本讲是《十套教程》系列中的第六讲,在这一讲里,我们将会解释如何组装分区为RAID设备——创建和管理系统备份。这些都是 LFCS 认证中的必备知识。 -被称为独立磁盘冗余阵列(RAID)的技术是一种将多个硬盘组合成一个单独逻辑单元的存储解决方案,它提供了数据冗余功能并且改善硬盘的读写性能。 +### 了解RAID ### + +一种被称为独立磁盘冗余阵列(RAID)的技术是将多个硬盘组合成一个单独逻辑单元的存储解决方案,它提供了数据冗余功能并且改善硬盘的读写操作性能。 然而,实际的容错和磁盘I/O性能硬盘取决于如何将多个硬盘组装成磁盘阵列。根据可用的设备和容错/性能的需求,RAID被分为不同的级别,你可以在Tecmint.com上参考RAID系列文章以获得每个RAID级别更详细的解释。 -* //网址 +- RAID Guide: [What is RAID, Concepts of RAID and RAID Levels Explained][1] 我们选择用于创建、组装、管理、监视软件RAID的工具,叫做mdadm(multiple disk admin的简写)。 @@ -37,11 +39,11 @@ LFCS 系列第五讲 # zypper refresh && zypper install mdadm # ``` -## 组装分区作为RAID设备 +#### 组装分区作为RAID设备 #### 组装已有分区作为RAID设备的过程由以下步骤组成。 -1. 使用mdadm创建阵列 +**1. 使用mdadm创建阵列** 如果先前其中一个分区被格式化,或者作为了另一个RAID阵列的一部分,你会被提示以确认创建一个新的阵列。假设你已经采取了必要的预防措施以避免丢失重要数据,那么可以安全地输入Y并且按下回车。 @@ -49,107 +51,235 @@ LFCS 系列第五讲 # 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) 创建RAID阵列 -2. 检查阵列的创建状态 +**2. 检查阵列的创建状态** -在创建了RAID阵列之后,你可以检查使用以下命令检查阵列的状态 +在创建了RAID阵列之后,你可以检查使用以下命令检查阵列的状态。 -``` -# cat /proc/mdstat -or -# mdadm --detail /dev/md0 [More detailed summary] -``` -//图片 + # 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) 检查RAID阵列的状态 -3. 格式化RAID设备 +**3. 格式化RAID设备** -如本系列4部分所介绍的,按照你的需求/要求采用某种文件系统格式化你的设备 +如本系列[Part 4][2]所介绍的,按照你的需求/要求采用某种文件系统格式化你的设备。 4. 监控RAID阵列服务 指示监控服务时刻监视你的RAID阵列。把```# mdadm --detail --scan```命令输出结果添加到/etc/mdadm/mdadm.conf(Debian和derivatives)或者/etc/mdadm.conf(Cent0S/openSUSE),如下。 -``` -# mdadm --detail --scan -``` -//图片 + + # mdadm --detail --scan + + +![Monitor RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Monitor-RAID-Array.png) 监控RAID阵列 -``` -# mdadm --assemble --scan [Assemble the array] -``` + # mdadm --assemble --scan [Assemble the array] + 为了确保服务能够开机启动,需要以root权限运行以下命令。 -## Debian 和 Derivatives +**Debian 和 Derivatives** Debian 和 Derivatives能够通过下面步骤使服务默认开机启动 -``` -# update-rc.d mdadm defaults -``` + + # update-rc.d mdadm defaults + 在/etc/default/mdadm文件中添加下面这一行 -``` -AUTOSTART=true -``` -## CentOS 和 openSUSE(systemd-based) + AUTOSTART=true -``` -# systemctl start mdmonitor -# systemctl enable mdmonitor -``` -## CentOS 和 openSUSEi(SysVinit-based) +**CentOS 和 openSUSE(systemd-based)** -``` -# service mdmonitor start -# chkconfig mdmonitor on -``` + # systemctl start mdmonitor + # systemctl enable mdmonitor -5. 检查RAID磁盘故障 +**CentOS 和 openSUSEi(SysVinit-based)** + + # service mdmonitor start + # chkconfig mdmonitor on + +**5. 检查RAID磁盘故障** 在支持冗余的的RAID级别中,在需要时会替换故障的驱动器。当磁盘阵列中的设备出现故障时,仅当存在我们第一次创建阵列时预留的备用设备时,磁盘阵列会将自动启动重建。 -//图片 +![Check RAID Faulty Disk](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Faulty-Disk.png) 检查RAID故障磁盘 否则,我们需要手动连接一个额外的物理驱动器到我们的系统,并且运行。 -``` -# mdadm /dev/md0 --add /dev/sdX1 -``` + # mdadm /dev/md0 --add /dev/sdX1 /dev/md0是出现了问题的阵列,而/dev/sdx1是新添加的设备。 -6. 分解一个工作阵列 +**6. 分解一个工作阵列** 如果你需要使用工作阵列的设备创建一个新的阵列,你可能不得不去分解已有工作阵列——(可选步骤) -``` -# 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 -``` + # 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. 设置邮件通知 +**7. 设置邮件通知** 你可以配置一个用于发送通知的有效邮件地址或者系统账号(确保在mdadm.conf文件中有下面这一行)。——(可选步骤) -``` -MAILADDR root -``` + + MAILADDR root 在这种情况下,来自RAID后台监控程序所有的通知将会发送到你的本地root账号的邮件箱中。其中一个类似的通知如下。 说明:此次通知事件和第5步中的例子相关。一个设备被标志为错误并且一个空闲的设备自动地被mdadm加入到阵列。我们用完了所有"健康的"空闲设备,因此我们得到了通知。 -//图片 +![RAID Monitoring Alerts](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Monitoring-Alerts.png) RAID监控通知 +#### 了解RAID级别 #### + +** RAID 0 ** + +阵列总大小是最小分区大小的n倍,n是阵列中独立磁盘的个数(你至少需要两个驱动器/磁盘)。运行下面命令,使用/dev/sdb1和/dev/sdc1分区组装一个RAID 0 阵列。 + + # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 + +常见用途:用于支持性能比容错更重要的实时应用程序的设置 + +**RAID 1 (又名镜像/Mirroring)** + +阵列总大小等于最小分区大小(你至少需要两个驱动器/磁盘)。运行下面命令,使用/dev/sdb1和/dev/sdc1分区组装一个RAID 1 阵列。 + + # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 + +常见用途:操作系统的安装或者重要的子文件夹,例如 /home + +**RAID 5 (又名奇偶校验码盘/drives with Parity)** + +阵列总大小将是最小分区大小的(n-1)倍。//用于奇偶校验(冗余)计算(你至少需要3个驱动器/磁盘)。 + +说明:你可以指定一个空闲设备(/dev/sde1)替换问题出现时的故障部分(分区)。运行下面命令,使用/dev/sdb1, /dev/sdc1, /dev/sdd1,/dev/sde1组装一个RAID 5 阵列,其中/dev/sde1作为空闲分区。 + + # mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --spare-devices=1 /dev/sde1 + +常见用途:Web和文件服务 + +**RAID 6 (又名双重奇偶校验码盘/drives with double Parity)** + +阵列总大小为(n*s)-2*s,其中n为阵列中独立磁盘的个数,s为最小磁盘大小。 + +说明:你可以指定一个空闲分区(在这个例子为/dev/sdf1)替换问题出现时的故障部分(分区)。 + +运行下面命令,使用/dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1和/dev/sdf1组装RAID 6阵列,其中/dev/sdf1作为空闲分区。 + + # mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde --spare-devices=1 /dev/sdf1 + +常见用途:大容量、高可用性要求的文件服务器和备份服务器。 + +**RAID 1+0 (又名镜像条带/stripe of mirrors)** + +因为RAID 1+0是RAID 0 和 RAID 1的组合,所以阵列总大小是基于两者的公式计算的。首先,计算每一个镜像的大小,然后再计算条带的大小。 + + + # mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 --spare-devices=1 /dev/sdf1 + +常见用途:需要快速IO操作的数据库和应用服务器 + +#### 创建和管理系统备份 #### + +记住RAID其所有的价值不是在于备份的替换者是对你有益的!在黑板上写上1000次,如果你需要的话,但无论何时一定要记住它。在我们开始前,我们必须注意的是,没有一个放之四海皆准的针对所有系统备份的解决方案,但这里有一些东西,是你在规划一个备份策略时需要考虑的。 + +- 你的系统将用于什么?(桌面或者服务器?如果系统是应用于后者,那么最重要的服务是什么——//其配置?) +- 你每隔多久备份你的系统? +- 你需要备份的数据是什么(比如 文件/文件夹/数据库转储)?你还可以考虑是否需要备份大型文件(比如音频和视频文件)。 +- 这些备份将会存储在哪里(物理位置和媒体)? + +**备份你的数据** + +方法1:使用dd命令备份整个磁盘。你可以在任意时间点通过创建一个准确的镜像来备份一整个硬盘或者是分区。注意当设备是离线时,这种方法效果最好,也就是说它没有被挂载并且没有任何进程的I/O操作访问它。 + +这种备份方法的缺点是镜像将具有和磁盘或分区一样的大小,即使实际数据占用的是一个很小的比例。比如,如果你想要为只使用了10%的20GB的分区创建镜像,那么镜像文件将仍旧是20GB。换句话来讲,它不仅包含了备份的实际数据,而且也包含了整个分区。如果你想完整备份你的设备,那么你可以考虑使用这个方法。 + +**从现有的设备创建一个镜像文件** + + # dd if=/dev/sda of=/system_images/sda.img + 或者 + --------------------- 可选地,你可以压缩镜像文件 ------------------- + # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz + +**从镜像文件恢复备份** + + # dd if=/system_images/sda.img of=/dev/sda + 或者 + --------------------- 根据你创建镜像文件时的选择(译者注:比如压缩) ---------------- + # gzip -dc /system_images/sda.img.gz | dd of=/dev/sda + +方法2:使用tar命令备份确定的文件/文件夹——已经在本系列[Part 3][3]中讲了。如果你想要备份指定的文件/文件夹(配置文件,用户主目录等等),你可以使用这种方法。 + +方法3:使用rsync命令同步文件。rsync是一种多功能远程(和本地)文件复制工具。如果你想要从网络设备备份或同步文件,rsync是一种选择。 + + +无论是你是正在同步两个本地文件夹还是本地 < — > 挂载在本地文件系统的远程文件夹,其基本语法是一样的。 + + # rsync -av source_directory destination directory + +在这里,-a 递归遍历子目录(如果它们存在的话),维持符号链接、时间戳、权限以及原本的属主/属组,-v 显示详细过程。 + +![rsync Synchronizing Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronizing-Files.png) + +rsync 同步文件 + +除此之外,如果你想增加在网络上传输数据的安全性,你可以通过rsync使用ssh协议。 + +**通过ssh同步本地 → 远程文件夹** + + # rsync -avzhe ssh backups root@remote_host:/remote_directory/ + +这个示例,本地主机上的backups文件夹将与远程主机上的/root/remote_directory的内容同步。 + +在这里,-h 选项以人可读的格式显示文件的大小,-e 标志用于表示一个ssh连接。 + +![rsync Synchronize Remote Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronize-Remote-Files.png) + +rsync 同步远程文件 + +**通过ssh同步远程 → 本地 文件夹** + +在这种情况下,交换前面示例中的source和destination文件夹。 + + # rsync -avzhe ssh root@remote_host:/remote_directory/ backups + +请注意这些只是rsync用法的三个示例而已(你可能遇到的最常见的情形)。对于更多有关rsync命令的示例和用法 ,你可以查看下面的文章。 + +- Read Also: [10 rsync Commands to Sync Files in Linux][4] + +### Summary ### + +作为一个系统管理员,你需要确保你的系统表现得尽可能好。如果你做好了充分准备,并且如果你的数据完整性能被诸如RAID和系统日常备份的存储技术支持,那你将是安全的。 + +如果你有有关完善这篇文章的问题、评论或者进一步的想法,可以在下面畅所欲言。除此之外,请考虑通过你的社交网络简介分享这系列文章。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[cpsoture](https://github.com/cposture) +校对:[校对者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/ From 814c58ee1b4eb2d1b24c3d8be769cb8bdb08f7f8 Mon Sep 17 00:00:00 2001 From: cposture Date: Thu, 14 Jan 2016 15:52:16 +0800 Subject: [PATCH 0848/1710] Translated by cposture 2016-01-14 --- ...tions as RAID Devices – Creating & Managing System Backups.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md index 8f7ca3dda1..5de5004424 100644 --- a/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md +++ b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md @@ -1,4 +1,3 @@ -[未完成,不要合并-Translating By cposture 2016-01-07] LFCS 系列第六讲:组装分区为RAID设备——创建和管理系统备份 ========================================================= Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时上游团队请求支持的决策能力。 From 9f4da42a2fc93454825f621c612a2ee0634dd7b5 Mon Sep 17 00:00:00 2001 From: zpl Date: Thu, 14 Jan 2016 19:06:12 +0800 Subject: [PATCH 0849/1710] [translated] 20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md --- ...oid On BQ Aquaris Ubuntu Phone In Linux.md | 126 ------------------ ...oid On BQ Aquaris Ubuntu Phone In Linux.md | 125 ----------------- ...oid On BQ Aquaris Ubuntu Phone In Linux.md | 125 +++++++++++++++++ 3 files changed, 125 insertions(+), 251 deletions(-) delete mode 100644 sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md delete mode 100644 sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md create mode 100644 translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md 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 deleted file mode 100644 index 864068eb91..0000000000 --- a/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md +++ /dev/null @@ -1,126 +0,0 @@ -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) - -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 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 deleted file mode 100644 index 94e7ef69ce..0000000000 --- a/sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md +++ /dev/null @@ -1,125 +0,0 @@ -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/translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md new file mode 100644 index 0000000000..73397819cd --- /dev/null +++ b/translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md @@ -0,0 +1,125 @@ +在 Linux 上将 BQ Aquaris Ubuntu 手机刷成 Android 系统 +================================================================================ +![How to install Android on Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-on-Ubuntu-Phone.jpg) + +如果你正好拥有全球第一支运行 Ubuntu 的手机并且希望将 **BQ Aquaris E4.5 自带的 Ubuntu 系统换成 Android **,那这篇文章能帮你点小忙。 + +有一万种理由来解释为什么要将 Ubuntu 换成主流 Android OS。其中最主要的一个,就是这个系统本身仍然处于非常早期的阶段,针对的目标用户仍然是开发者和爱好者。不管你的理由是什么,要谢谢 bq 提供的工具,让我们能非常轻松地在 BQ Aquaris 上安装 Android OS。 + +下面让我们一起看下在 BQ Aquaris 上安装 Android 需要做哪些事情。 + +### 前提条件 ### + +- 可用的因特网连接,用来下载 Android 出厂固件以及安装刷机工具。 +- USB 数据线 +- 运行 Linux 的电脑 + +本文是基于 Ubuntu 15.10 操作的。但是这些步骤应该也可以应用于其他大多数 Linux 发行版。 + +### 将 BQ Aquaris E4.5 上的 Ubuntu 换成 Android ### + +#### 第一步:下载 Android 固件 #### + +首先是下载可以在 BQ Aquaris E4.5 上运行的 Android 固件。幸运的是我们可以在 bq 的技术支持网站找到。可以从下面的链接直接下载,差不多 650 MB: + +- [下载为 BQ Aquaris E4.5 制作的 Android][1] + +是的,这个版本还支持 OTA 自动升级。目前,固件版本是 2.0.1,基于 Android Lolipop 开发。过一段时间,应该就会放出基于 Marshmallow 的新版本,上边的链接可能就无效了。 + +我建议去[ bq 的技术支持网站][2]下载最新的固件。 + +下载完成后解压。在解压后的目录里,找到一个名字是 **MT6582_Android_scatter.txt** 的文件。后面将要用到它。 + +#### 第二步:下载刷机工具 #### + +bq 已经提供了自己的刷机工具,Herramienta MTK Flash Tool,可以轻松地给设备安装 Andriod 或者 Ubuntu 系统。你可以从下面的链接下载工具: + +- [下载 MTK Flash Tool][3] + +考虑到刷机工具在以后可能会升级,你总是可以从[bq 技术支持网站][4]上找到最新的版本。 + +下载完后解压。之后应该可以在目录里找到一个叫 **flash_tool** 的可执行文件。我们稍后会用到。 + +#### 第三步:移除冲突的软件包(可选) #### + +如果你正在用最新版本的 Ubuntu 或 基于 Ubuntu 的 Linux 发行版,稍后可能会碰到 “BROM ERROR : S_UNDEFINED_ERROR (1001)” 错误。 + +要避免这个错误,你需要卸载有冲突的软件包。可以使用下面的命令: + + sudo apt-get remove modemmanager + +用下面的命令重启 udev 服务: + + sudo service udev restart + +检查一下内核模块 cdc_acm 可能存在的边际效应,运行下面的命令: + + lsmod | grep cdc_acm + +如果上面命令输出是空,你将需要重新加载一下这个内核模块: + + sudo modprobe cdc_acm + +#### 第四步:准备刷入 Android #### + +切换到下载好并解压完成的刷机工具目录(第二步)。请使用命令行来完成,这是因为将要用到 root 权限。 + +假设你保存在下载目录里,使用下面的命令切换目录(为那些不懂如何在命令行下切换目录的朋友考虑)。 + + cd ~/Downloads/SP_Flash* + +然后使用下面的命令以 root 权限启动刷机工具: + + sudo ./flash_tool + +然后你会看到一个像下面的窗口界面。不用在意 Download Agent 区域,它将会被自动填入。只要关心 Scatter-loading 区域。 + +![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-1.jpeg) + +还记得之前第一步里提到的 **MT6582_Android_scatter.txt** 文件吗?这个文本文件就在你第一步中下载的 Android 固件解压后的目录里。点击 Scatter-loading(上图中)然后选中 MT6582_Android_scatter.txt 文件。 + +之后,你将看到类似下面图片里的一些绿色线条: + +![Install-Android-bq-aquaris-Ubuntu-2](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-2.jpeg) + +#### 第五步:刷入 Android #### + +已经差不多了。把你的手机关机,然后通过 USB 线连接到电脑上。 + +在下拉列表里选择 Firmware Upgrade,然后点击那个大的 Download 按钮。 + +![flash Android with Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu.jpeg) + +如果一切顺利,你应该可以在工具下方的状态栏里看到刷机状态: + +![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-3.jpeg) + +当所有过程都完成后,你将看到一个类似这样的提示: + +![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) + +将手机从电脑上移除然后开机。你应该看到屏幕上显示白色并在中间和底部有 AQUARIS 文字,还应该有 “powered by Android” 字样。差不多需要差不多十分钟,你才可以设置和开始使用 Android。 + +注意:如果中间出了什么问题,同时按下电源、音量加、音量减按键可以进入 fast boot 模式。然后再次关机并连接电脑。重复升级固件的过程。应该可以。 + +### 总结 ### + +要感谢厂商提供的工具,让我们可以轻松地 **在 bq Ubuntu 手机上刷 Android**。当然,你可以使用相同的步骤将 Android 替换回 Ubuntu。只是下载的时候选 Ubuntu 固件而不是 Android。 + +希望这篇文章可以帮你将你的 bq 手机上的 Ubuntu 刷成 Android。如果有什么问题或建议,可以在下面留言区里讨论。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-android-ubuntu-phone/ + +作者:[Abhishek][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者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 From 4c3cf266fe6ea2f891f7346135aa9773a906193f Mon Sep 17 00:00:00 2001 From: cposture Date: Fri, 15 Jan 2016 00:13:27 +0800 Subject: [PATCH 0850/1710] Translating by cposture --- sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index 99f1ceed04..80031c7fd8 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -1,3 +1,4 @@ +[Translating by cposture 16-01-14] * * * # GCC-Inline-Assembly-HOWTO From fb1cc19c32fc77e478c21d9c275c73ce8010d47b Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Jan 2016 06:40:06 +0800 Subject: [PATCH 0851/1710] PUB:20151117 Linux 101--Get the most out of Systemd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Ricky-Gong 翻译的很好,出乎意料地我校对非常省力! --- ... Linux 101--Get the most out of Systemd.md | 171 ++++++++++++++++++ ... Linux 101--Get the most out of Systemd.md | 171 ------------------ 2 files changed, 171 insertions(+), 171 deletions(-) create mode 100644 published/20151117 Linux 101--Get the most out of Systemd.md delete mode 100644 translated/tech/20151117 Linux 101--Get the most out of Systemd.md diff --git a/published/20151117 Linux 101--Get the most out of Systemd.md b/published/20151117 Linux 101--Get the most out of Systemd.md new file mode 100644 index 0000000000..b0df8fdfb9 --- /dev/null +++ b/published/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 的特性,并向您展示如何最有效地利用这些特性。即便您此刻并不是这款软件的粉丝,读完本文后您至少可以更加了解和适应它。 + +![](http://narf-archive.com/pix/bd0fb252416206158627fb0b1bff9b4779dca13f.gif) + +*这部没正经的动画片来自[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)的概念,它是一些存有关于服务(service)(在运行在后台的程序)、设备、挂载点、和操作系统其他方面信息的配置文件。Systemd 的其中一个目标就是简化这些事物之间的相互作用,因此如果你有程序需要在某个挂载点被创建或某个设备被接入后开始运行,Systemd 可以让这一切正常运作起来变得相当容易。(在没有 Systemd 的日子里,要使用脚本来把这些事情调配好,那可是相当丑陋的。)要列出您 Linux 系统上的所有单元,输入以下命令: + + systemctl list-unit-files + +现在,`systemctl` 是与 Systemd 交互的主要工具,它有不少选项。在单元列表中,您会注意到这儿有一些格式化:被使能(enabled)的单元显示为绿色,被禁用(disabled)的显示为红色。标记为“static”的单元不能直接启用,它们是其他单元所依赖的对象。若要限制输出列表只包含服务,使用以下命令: + + systemctl list-unit-files --type=service + +注意,一个单元显示为“enabled”,并不等于对应的服务正在运行,而只能说明它可以被开启。要获得某个特定服务的信息,以 GDM (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 命令后面跟一个单元名,来查看对应的服务有什么情况。* + +### “目标(target)”锁定 ### + +如果您在 `/usr/lib/systemd/system` 目录中输入 `ls` 命令,您将看到各种以 `.target` 结尾的文件。*启动目标* (target)是一种将多个单元聚合在一起以致于将它们同时启动的方式。例如,对大多数类 Unix 操作系统而言有一种“多用户(multi-user)”状态,意思是系统已被成功启动,后台服务正在运行,并且已准备好让一个或多个用户登录并工作——至少在文本模式下。(其他状态包括用于进行管理工作的单用户(single-user)状态,以及用于机器关机的重启(reboot)状态。) + +如果您打开 **multi-user.target** 文件一探究竟,您可能期待看到的是一个要被启动的单元列表。但您会发现这个文件内部几乎空空如也——其实,一个服务会通过 **WantedBy** 选项让自己成为启动目标的依赖。因此如果您去打开 **avahi-daemon.service**, **NetworkManager.service** 及其他 **.service** 文件看看,您将在 Install 段看到这一行: + + WantedBy=multi-user.target + +因此,切换到多用户启动目标会使能(enable)那些包含上述语句的单元。还有其他一些启动目标可用(例如 **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** 祈求保佑了)(LCTT 译注: $DEITY 是一个计算机方面的幽默,DEITY 是指广义上的“神”,$前缀表示这是一个变量),为 7 的话会显示所有消息,包括调试消息。请查看手册 (`man journalctl`) 获取更多关于优先级的信息。 + +值得指出的是,您也可以将多个选项结合在一起,若想查看在当前启动中由 GDM 服务输出的优先级数小于等于 3 的消息,请使用下述命令: + + journalctl -u gdm.service -p 3 -b + +最后,如果您仅仅想打开一个随 journal 持续更新的终端窗口,就像在没有 Systemd 时使用 `tail` 命令实现的那样,输入 `journalctl -f` 就好了。 + +![](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) +校对:[wxy](https://github.com/wxy) + +本文由 [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/ 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 deleted file mode 100644 index 1a382479ec..0000000000 --- a/translated/tech/20151117 Linux 101--Get the most out of Systemd.md +++ /dev/null @@ -1,171 +0,0 @@ -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 3cddd4e586cf0ca9b5c8e27b84c96ba0b25374a9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Jan 2016 06:40:24 +0800 Subject: [PATCH 0852/1710] PUB:20151208 How to renew the ISPConfig 3 SSL Certificate @geekpi --- ...o renew the ISPConfig 3 SSL Certificate.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {translated/tech => published}/20151208 How to renew the ISPConfig 3 SSL Certificate.md (55%) diff --git a/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md b/published/20151208 How to renew the ISPConfig 3 SSL Certificate.md similarity index 55% rename from translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md rename to published/20151208 How to renew the ISPConfig 3 SSL Certificate.md index a2ce4f1d1c..ea132d4185 100644 --- a/translated/tech/20151208 How to renew the ISPConfig 3 SSL Certificate.md +++ b/published/20151208 How to renew the ISPConfig 3 SSL Certificate.md @@ -1,20 +1,20 @@ -如何更新ISPConfig 3 SSL证书 +如何更新 ISPConfig 3 SSL 证书 ================================================================================ -本教程描述了如何再ISPConfig 3控制面板中更新SSL证书。有两个可选的方法: +本教程描述了如何在 ISPConfig 3控制面板中更新 SSL 证书。有两个可选的方法: -- 用OpenSSL创建一个新的OpenSSL证书和CSR。 -- 用ISPConfig updater更新SSL证书 +- 用 OpenSSL 创建一个新的 OpenSSL 证书和 CSR。 +- 用 ISPConfig updater 更新 SSL 证书 -我将会用手工的方法更新ssl证书。 +我将从用手工的方法更新 SSL 证书开始。 -### 1)用OpenSSL创建一个新的ISPConfig 3 SSL 证书 ### +### 1)用 OpenSSL 创建一个新的 ISPConfig 3 SSL 证书 ### -用root用户登录你的服务器。在创建一个新的SSL证书之前,备份现有的。SSL证书是安全敏感的,因此我将它存储在/root/目录下。 +用 root 用户登录你的服务器。在创建一个新的 SSL 证书之前,先备份现有的。SSL 证书是安全敏感的,因此我将它存储在 /root/ 目录下。 tar pcfz /root/ispconfig_ssl_backup.tar.gz /usr/local/ispconfig/interface/ssl chmod 600 /root/ispconfig_ssl_backup.tar.gz -> 现在创建一个新的SSL证书密钥,证书请求(csr)和自签发证书。 +> 现在创建一个新的 SSL 证书密钥,证书请求(CSR)和自签发证书。 cd /usr/local/ispconfig/interface/ssl openssl genrsa -des3 -out ispserver.key 4096 @@ -25,13 +25,13 @@ mv ispserver.key ispserver.key.secure mv ispserver.key.insecure ispserver.key -重启apache来加载新的SSL证书 +重启 apache 来加载新的 SSL 证书 service apache2 restart -### 2)用ISPConfig安装器来更新SSL证书 ### +### 2)用 ISPConfig 安装器来更新 SSL 证书 ### -另一个获取新的SSL证书的替代方案是使用ISPConfig更新脚本。下载ISPConfig到/tmp目录下,解压包并运行脚本。 +另一个获取新的 SSL 证书的替代方案是使用 ISPConfig 更新脚本。下载 ISPConfig 到 /tmp 目录下,解压包并运行脚本。 cd /tmp wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz @@ -39,11 +39,11 @@ cd ispconfig3_install/install php -q update.php -更新脚本会在更新时询问下面的额问题: +更新脚本会在更新时询问下面的问题: Create new ISPConfig SSL certificate (yes,no) [no]: -这里回答“yes”,SSL证书创建对话框就会启动。 +这里回答“yes”,SSL 证书创建对话框就会启动。 -------------------------------------------------------------------------------- @@ -51,7 +51,7 @@ via: http://www.faqforge.com/linux/how-to-renew-the-ispconfig-3-ssl-certificate/ 作者:[Till][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 a1eaadc2e82367bfbfb32c260f7515daa81e424d Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Jan 2016 10:48:23 +0800 Subject: [PATCH 0853/1710] PUB:20151225 What are the best plugins to increase productivity on Emacs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zky001 有些地方还是不够细致,建议翻译完了自己通读一遍,或者稍微放放再去读。 --- ...ugins to increase productivity on Emacs.md | 79 ++++++++++++++++ ...ugins to increase productivity on Emacs.md | 91 ------------------- 2 files changed, 79 insertions(+), 91 deletions(-) create mode 100644 published/20151225 What are the best plugins to increase productivity on Emacs.md delete mode 100644 translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md diff --git a/published/20151225 What are the best plugins to increase productivity on Emacs.md b/published/20151225 What are the best plugins to increase productivity on Emacs.md new file mode 100644 index 0000000000..8e063d3693 --- /dev/null +++ b/published/20151225 What are the best plugins to increase productivity on Emacs.md @@ -0,0 +1,79 @@ +提升 emacs 生产力的十大最佳插件 +================================================================================ + +一年前的这个时候,我想要寻找[将 Vim 打造成一个成熟的全功能的 IDE][1] 的最好插件。有趣的是,那篇文章的很多评论提到了 Emacs 已经大部分有了这些内置插件,已经是一个很棒的 IDE 了。尽管我对 Emacs 的难以置信的多样化表示赞同,它依旧不是一个可以开箱即用的高级编辑器。还好,其庞大的插件库可以解决这个问题。但在过多的选择中,有时很难弄清该如何入手。因此,现在让我试着收集一个不可或缺的插件的简短列表,来提升你使用 Emacs 时的工作效率。 虽然我主要侧重于与编程相关的生产力提升,但是这些插件对所有人或不同用途都是有用的。 + +### 1. Ido-mode ### + +![](https://c2.staticflickr.com/6/5718/23311895573_c1fb34337c_c.jpg) + +Ido 或许是对新手最有用的一个插件,Ido 的意思是交互式工作(interactively do)。它取代了大部分的用花哨字符匹配菜单的枯燥提示。好比说,它用列出了当前目录所有文件的列表来取代了常规的打开文件提示符。输入一些字符,Ido 将尝试匹配最合适的文件。它通过可视化让你的操作变得更容易,这也是一个快速遍历所有文件都有相同前缀的文件夹的方法。 + +### 2. Smex ### + +![](https://c2.staticflickr.com/2/1517/23310442314_2a22a60c34_c.jpg) + +它不算最著名的一个、但却是一个替代 Ido-mode 的好选择:Smex 可以优雅的替代普通的`M-x`提示符,灵感大部分来自于 Ido-mode。它也给调用`M-x`后输入的命令带来了同样的交互搜索能力。它简单而有效,是一个为常用操作提升效率的最好方法。 + +### 3. Auto Complete ### + +![](https://c2.staticflickr.com/6/5794/23643004900_3042f77952_c.jpg) + +知道这个插件的存在之前,我在 Emacs 里面有一半的时间花在敲击 `M-/` 来补完单词上。现在,我有一个漂亮的弹出菜单可以为我做自动补全。无须多说,我们都需要它。 + +### 4. YASnippet ### + +![](https://c2.staticflickr.com/2/1688/23830403072_0d8df6ef4c_b.jpg) + +这是真正的程序员必备利器。总有一些代码片段会让我们觉得我们一辈子都在写它。对我来说,就是调试 PHP 时不断输入的 `var_dump(...);exit;`。经过一段时间一遍又一遍的输入`var_dump(...);exit;`,我觉得我可以预先把其做成录制好的、方便用到的代码片段。使用 YASnippets,可以很容易导入代码片段文件或者自己做个。之后,只要按下一个 tab 键,就可以将一个小的关键词扩展成一大段预先写好的代码,然后可以很方便地在里面修改。 + +### 5. Org-mode ### + +![](https://c2.staticflickr.com/6/5687/23570808789_d683c949e4.jpg) + +免责声明,我最近才开始使用 Org-mode,但它已经深深的吸引了我。从我看过数以百计的文章来说,Org-mode 可以改变你的生活。它背后的想法很简单:它是一种用普通文本做简单备注的模式,可以很容易地在任务列表和各种数据中转来转去,并进行一些比如按优先级或到期日期的过滤,或设置一个重复日期。然而,虽然思路简单,但你可以做到很多,用各种方法用于各种用途。与其去看一个长长的介绍,我觉得你可以去读读[现有教程][2],有很多视频可以看,自己去体验一下 Org-mode 是多么强大。 + +### 6. Helm ### + +![](https://c2.staticflickr.com/2/1489/23310442334_5e6db22b79_c.jpg) + +一些使用者喜欢它,但是其他人没有这么大的使用热情。我是后者的一部分。但在拥有这样一个庞大的追随者的情况下,是不能不提到它的。Helm 旨在完全变换你的 Emacs 使用体验。简单来说,Helm 是一个在 Emacs 中帮助你快速找到一个文件或命令的框架。根据你的输入,它将尝试使用词语自动完成来引导你将大脑的念头变为行动。起初感觉有点奇怪,但对一些人来说,Helm 本身就是一个信仰。虽然我不是 Helm 的粉丝,我欣赏 helm-occur 这一个伟大的工具可以在一个大文档搜索字符串并且在一个单独的缓冲区显示所有匹配结果,以便很容易在它们之间跳转。如果你正在寻找一个快速演示来了解 Helm 能做什么,我推荐[这篇文章][3]。 + +### 7. ace-jump-mode ### + +![](https://c2.staticflickr.com/2/1710/23856168871_6df1faa565_c.jpg) + +这是另一个有一大群追随者的插件,我正在试图成为 ace-jump-mode 的粉丝。掌握这个插件,你会体验到超越鼠标感受。简单描述一下,通过你选择的快捷方式触发 ace-jump-mode 后,你会被提示输入字符。输入一个字符,所有以该字符开头的单词中的那个字符就会替换成一个唯一字符并被高亮。输入一个屏幕上的高亮字符,你的光标会直接跳转到高亮显示的那个词。我不得不承认,这让我使用它时有点反应不过来,但是,一旦你掌握它,它将显著提升你在一个文档里的移动速度。(LCTT 译注:用文字描述比较困难,如截图中,你输入的是一个“i”,然后屏幕中所有以“i”开头的单词中的那个“i”都被替换成了从 a 到 z 的字符,并高亮;你可以输入这些高亮的字符直接跳转到那个位置。) + +### 8. find-file-in-project ### + +![](https://c2.staticflickr.com/2/1492/23570808809_96ec8454a9_c.jpg) + +如果你喜欢 Sublime text 以及它可以用非常方便的`Ctrl-p`模糊搜索来打开一个项目中的任何文件的功能,你将会喜欢上 find-file-in-project (简称 ffip)的。使用设置指定了您的版本控制的根文件夹后,您可以轻松地调出一个很酷的文本条,通过快速扫描和搜索你的代码,来根据你输入的名称找到匹配的文件。我喜欢把它绑定到键盘上的 F6 键。如果你不知道整个目录从上到下的复杂结构,这很简单,而且非常易用。 + +### 9. Flymake ### + +![](https://c2.staticflickr.com/6/5708/23310442354_cbba657ed3.jpg) + +对 IDE 的爱好者来说,我认为语法检查器是 IDE 最强大的特性之一,它非常适合初学者和方便了那些疲惫的程序员。感谢 Flymake,Emacs 用户也可以享受到了语法检查器。因为我工作中用 PHP 很多,Flymake 就不需要任何额外的配置。当我写代码的时候,它会自动检查我的代码和高亮任何一个包含问题的行。对于编译语言,Flymake 将寻找一个用于检查你的代码的 Makefile。真神奇。 + +### 10. electric-pair ### + +最后,但并非最不重要,在我看来,electric-pair 是最简单但最强大的插件之一。它会自动关闭你输入的括号。它起初看起来并不是很有用,但相信我,在被寻找配对括号折磨几百次之后,你会很高兴有这么一个插件,可以确保你所有的表达式的括号都是一一对应的。 + +总结一下,Emacs 是一个奇妙的工具。这可不是一个令人惊讶的说法。试试这些插件,看着你的效率直线飙升吧。这个列表当然不是详尽的列表。如果你想贡献你的建议,请在评论中这样做。我自己一直在寻找新的插件来试着发现 Emacs 的新体验。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/best-plugins-to-increase-productivity-on-emacs.html + +作者:[Adrien Brochard][a] +译者:[zky001](https://github.com/zky001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://xmodulo.com/turn-vim-full-fledged-ide.html +[2]:http://orgmode.org/worg/org-tutorials/ +[3]:http://tuhdo.github.io/helm-intro.html diff --git a/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md b/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md deleted file mode 100644 index 86f163b7ff..0000000000 --- a/translated/tech/20151225 What are the best plugins to increase productivity on Emacs.md +++ /dev/null @@ -1,91 +0,0 @@ -提高emacs生产力的最好插件是什么 -================================================================================ -一年前的这个时候, 我想要寻找一个最好的插件 [将VIM打造成一个成熟的全功能的IDE][1]. 有趣的是, 很多评论那篇文章的是关于Emacs集成大部分这些插件,已经是一个伟大的IDE了. 尽管我对Emacs的难以置信的多样化表示赞成, 它依旧不是可以开箱即用(安装好不安插件即可用)的高级编辑器. 还好, 其庞大的插件库可以解决这个问题. 但在过多的选项中, 有时很难清楚该如何入手. 因此现在, 让我试着收集一个虽然简短但是不可或缺的插件列表来让你使用Emacs时提高工作效率. 虽然我主要侧重于与编程相关的生产力,但是这些插件将对任何人或对任何使用方法都是有用的. - -### 1. Ido-模式 ### - -![](https://c2.staticflickr.com/6/5718/23311895573_c1fb34337c_c.jpg) - -Ido 或许是对新手最有用的一个插件, Ido 表示交互式的去做.它取代大部分的用花哨的匹配字符提示的枯燥菜单 . 好比说, 它将取代正常的提示来打开一个拥有当前目录中的所有文件列表的文件. 任何字符串类型,Ido 将尝试匹配最合适的文件。它很容易想象你的行为,并迅速通过一个文件夹的所有文件命名相同的前缀来查找. - -### 2. Smex ### - -![](https://c2.staticflickr.com/2/1517/23310442314_2a22a60c34_c.jpg) - -不算最著名的一个,但却是一个好选择来完成那些由Ido-mode开始的工作:Smex可以优雅的替代正常的“M-x”提示,也有由Ido-mode带来的很大的启发。通常输入的命令调用“M-x”之后它带来同样的互动搜索。它既简单又有效,是一个很好的节省那些额外的你通常需要1秒的短时间方式 - -### 3. Auto Complete ### - -![](https://c2.staticflickr.com/6/5794/23643004900_3042f77952_c.jpg) - -知道这个插件的存在之前,我花了我一半的时间在使用Emacs敲击"M-/"来完成代码上。现在,我有一个漂亮的弹出为我去做自动补全。无须多说,只是我们都需要它。 - -### 4. YASnippet ### - -![](https://c2.staticflickr.com/2/1688/23830403072_0d8df6ef4c_b.jpg) - -这是真正的程序员所需利器。总有一些代码,我们觉得我们在它们上面用掉了所有的时间。对我来说,用"var_dump(…);exit;"来调试PHP。经过一段时间一遍又一遍的输入"var_dump(…);exit;",我就想到我可以预先把其作为录制好的,方便的代码片段。YASnippets,很容易导入片段文件或者自己制做。之后,一个简单的按制表键可以将一小关键词扩展成一块预先写好的代码易于使用者浏览和修改。 - - -### 5. Org-mode ### - -![](https://c2.staticflickr.com/6/5687/23570808789_d683c949e4.jpg) - -免责声明,我最近才开始使用Org-mode。但它已经深深的吸引了我。从我看过数以百计的书面作品来说,Org-mode可以改变你的生活。它背后的想法很简单:它是一种模式,简化了笔记,同时保持一个纯文本格式,便于浏览列表的任务和各种数据,并执行操作,如按优先级过滤或到期日期,或设置一个复发日期 。然而,从这个简单的想法,你可以完成很多,但也容易被所有的选项弄的不堪重负。与其去看一个长长的解释,我敦促你去通过[可用教程][2],看很多视频,自己去看看Org-mode是多么强大。 - - -### 6. Helm ### - -![](https://c2.staticflickr.com/2/1489/23310442334_5e6db22b79_c.jpg) - -一些使用者喜欢它,但是其他人没有这么大的使用热情。我是后者的一部分。但在拥有这样一个庞大的追随者群体的情况下,是不可能避免提到它的。Helm旨在完全变换你的Emacs使用体验。简单描述,Helm是一个这样的框架,在Emacs下将帮助您快速找到一个文件或命令。根据您的输入,它将尝试使用词语自动完成指导你大脑的念头变为行动。起初感觉有点奇怪,但对一些人来说,Helm本身就是一个信仰。虽然我不是Helm的粉丝,我欣赏helm-occur这一个伟大的工具在一个大文档搜索字符串并且在一个单独的缓冲区显示所有,因此很容易导航。如果你正在寻找一个快速演示来了解Helm能做什么,我推荐这篇文章[3]。 - - -### 7. ace-jump-mode ### - -![](https://c2.staticflickr.com/2/1710/23856168871_6df1faa565_c.jpg) - -另一个插件有一大群追随者,我试图加入ace-jump-mode的粉丝群。拥有这个插件,你会体验到胜于鼠标的使用。简单的描述,通过触发ace-jump-mode您选择的快捷方式,你将被提示字符。输入一个字符,所有单词将会出现,独特的字母字符将突出显示。输入一个字母在屏幕上,和你的光标会直接跳转到词高亮显示。我不得不承认,这是让反射很难使用它,但是,一旦你拥有它,它会增加你的在一个文档里光标的移动速度。 - - - -### 8. find-file-in-project ### - -![](https://c2.staticflickr.com/2/1492/23570808809_96ec8454a9_c.jpg) - -如果你喜欢Sublime text和它非常方便的“Ctrl-p”模糊搜索打开在一个项目中的任何文件,你将会喜欢上find-file-in-project(或ffip)。通过声明您的版本控制的根文件夹设置后,您可以轻松地收集一个快速扫描的很酷的标题文本并根据您输入的名称匹配的通过代码库搜索文件。我喜欢把它绑定到键盘上面F6键。如果你不知道从你的顶层目录到最基本文件的复杂结构,它很简单,很方便。 - - -### 9. Flymake ### - -![](https://c2.staticflickr.com/6/5708/23310442354_cbba657ed3.jpg) - -IDE的爱好者,我认为语法检查器是IDE最强大的特性之一。它非常适合初学者和方便码累了的程序员。感谢Flymake,Emacs用户也可以享受语法检查器 。因为我工作很多需要PHP,Flymake不需要任何额外的配置。当我写代码的时候,它会自动检查我的代码和高亮任何一个包含一个问题的行。对于编译语言,Flymake将寻找一个Makefile,它将用来检查代码。绝对不可思议。 - - - -### 10. electric-pair ### - -  最后,但并非最不重要,在我看来,electric-pair是最简单但最强大的插件之一。它就自动关闭括号或打开括号。它期初看起来不是很好,但相信我。第一百次挣扎后发现匹配的括号,你会很高兴有一个插件,确保你所有的表达式都是平衡的。   -   - - -总结一下,Emacs是一个奇妙的工具。这可不是一个令人惊哑的说法。试试这些插件和看着你的效率直线飙升。这当然不是详尽的列表。如果你想带来你的贡献,请在评论中这样做。我自己一直在寻找新的插件来体验Emacs,也在找寻新方法来体验Emacs。 - - - - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/best-plugins-to-increase-productivity-on-emacs.html - -作者:[Adrien Brochard][a] -译者:[zky001](https://github.com/zky001) -校对:[校对者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/turn-vim-full-fledged-ide.html -[2]:http://orgmode.org/worg/org-tutorials/ -[3]:http://tuhdo.github.io/helm-intro.html From 37acc33327f61e0563317f904e31d41bdf291388 Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Fri, 15 Jan 2016 12:36:39 +0800 Subject: [PATCH 0854/1710] translating sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md --- ...51202 8 things to do after installing openSUSE Leap 42.1.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md index bbd79c19a3..183d39252f 100644 --- a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md +++ b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md @@ -1,3 +1,4 @@ +#name1e5s Translating 8 things to do after installing openSUSE Leap 42.1 ================================================================================ ![Credit: Metropolitan Transportation/Flicrk](http://images.techhive.com/images/article/2015/11/things-to-do-100626947-primary.idge.jpg) @@ -105,4 +106,4 @@ via: http://www.itworld.com/article/3003865/open-source-tools/8-things-to-do-aft [3]:https://www.linux.com/learn/tutorials/857788-how-to-convert-videos-in-linux-using-the-command-line [4]:https://www.google.com/intl/en/chrome/browser/desktop/index.html#brand=CHMB&utm_campaign=en&utm_source=en-ha-na-us-sk&utm_medium=ha [5]:http://opensuse-community.org/ -[6]:http://www.itworld.com/article/2875981/the-5-best-open-source-email-clients-for-linux.html \ No newline at end of file +[6]:http://www.itworld.com/article/2875981/the-5-best-open-source-email-clients-for-linux.html From 1dd35ace0759c966803c46fa97844f5a10827c63 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Jan 2016 22:54:25 +0800 Subject: [PATCH 0855/1710] PUB:20151229 Grub 2--Heal your bootloader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @soooogreen 好长的文章,翻译的很不错,我修复了个别错误和用语——下周一发布出来。 --- .../20151229 Grub 2--Heal your bootloader.md | 236 ++++++++++++++++++ .../20151229 Grub 2--Heal your bootloader.md | 235 ----------------- 2 files changed, 236 insertions(+), 235 deletions(-) create mode 100644 published/20151229 Grub 2--Heal your bootloader.md delete mode 100644 translated/tech/20151229 Grub 2--Heal your bootloader.md diff --git a/published/20151229 Grub 2--Heal your bootloader.md b/published/20151229 Grub 2--Heal your bootloader.md new file mode 100644 index 0000000000..ef246a203a --- /dev/null +++ b/published/20151229 Grub 2--Heal your bootloader.md @@ -0,0 +1,236 @@ +Grub 2:拯救你的 bootloader +================================================================================ + +**没有什么事情比 bootloader 坏掉更让气人的了。充分发挥 Grub 2 的作用,让 bootloader 安分工作吧。** + +为什么这么说? + +- Grub 2 是最受欢迎的 bootloader ,几乎用在所有 Linux 发行版上。 +- bootloader 是一个至关重要的软件,但是非常容易损坏。 +- Grub 2 是兼具扩展性和灵活性的一款引导加载程序,提供了大量可定制选项。 + +Grub 2 是一款精彩的功能强大的软件。它不是 bootloader 界的一枝独秀,但却最受欢迎,几乎所有主要的桌面发行版都在使用它。 Grub 的工作有两个。首先,它用一个菜单展示计算机上所有已经安装的操作系统供你选择。其次,当你从启动菜单中选择了一个 Linux 操作系统, Grub 便加载这个 Linux 的内核。 + +你知道,如果使用 Linux ,你就离不开 bootloader 。然而它却是 Linux 发行版内部最鲜为人知的部分。在这篇文章里,我们将带你熟悉 Grub 2 一些著名的特性,强化你相关技能,使你在 bootloader 跑飞的时候能够自行处理。 + +Grub 2 最重要的部分是一堆文本文件和两个脚本文件。首先需要了解的是 `/etc/default/grub` 。这是一个文本文件,你可以在里面设置通用配置变量和 Grub 2 菜单(见下方 “常见用户设置” )的其它特性。 + +Grub 2 另一个重要的部分是 `/etc/grub.d` 文件夹。定义每个菜单项的所有脚本都放置在这里。这些脚本的名称必须有两位的数字前缀。其目的是,在构建 Grub 2 菜单时定义脚本的执行顺序以及相应菜单项的顺序。文件 `00_header` 首先被读取,负责解析 `/etc/default/grub` 配置文件。然后是 Linux 内核的菜单项,位于 `10_linux` 文件中。这个脚本在默认的 `/boot` 分区为每个内核创建一个正规菜单项和一个恢复菜单项。 + +紧接着的是为第三方应用所用的脚本,如 `30_os-prober` 和 `40_custom` 。 **os-prober** 脚本为内核和其它分区里的操作系统创建菜单项。它能识别安装的 Linux、 Windows、 BSD 以及 Mac OS X 。 如果你的硬盘布局比较独特,使得 **os-prober** 无法找到已经安装的发行版,你可以在 `40_custom` 文件(见下方 “添加自定义菜单项”)中添加菜单项。 + +**Grub** 2 不需要你手动维护你的启动选项的配置文件:取而代之的是使用 `grub2-mkconfig` 命令产生 `/boot/grub/grub.cfg` 文件。这个功能会解析 `/etc/grub.d` 目录中的脚本以及 `/etc/default/grub` 设置文件来定义你的设置情况。 + +###图形化的引导修复### + +多亏了 Boot Repair 应用,只需要点击按钮,Grub 2 许许多多的问题都能轻易解决。这个漂亮小巧的应用有一个直观的用户界面,可以扫描并识别多种硬盘布局和分区方案,还能发现并正确识别安装在其中的操作系统。这个应用可以处理传统计算机里的主引导记录(Master Boot Record) (MBR),也可以处理新型 UEFI 计算机中的 GUID 分区表(GUID Partition Table)(GPT)。 + +Boot Repair 最简单的使用方式是安装到 Live Ubuntu 会话中。在一个 bootloader 损坏的机器上启动 Ubuntu Live 发行版,先通过添加它的 PPA 版本库来安装 Boot Repair ,命令如下: + + sudo add-apt-repository ppa:yannubuntu/Boot Repair + +然后刷新版本库列表: + + sudo apt-get update + +安装应用,如下: + + sudo apt-get install -y Boot Repair + +安装完毕后就启动应用。在显示它的界面(由一对按键组成)之前将会扫描你的硬盘。根据工具的指示,只需按下 Recommended Repair(推荐的修复)按钮,即可修复大部分坏掉的 bootloader 。修复 bootloader 之后,这个工具会输出一个短小的 URL ,你应该把它记录下来。这个 URL 包含了硬盘详尽的信息:分区信息以及重要的 Grub 2 文件(如 `/etc/default/grub` 和 `/boot/grub/grub.cfg` )的内容。如果工具不能解决 bootloader 的问题,可以把你这个 URL 共享在你的发行版的论坛上,让其他人可以分析你的硬盘布局以便给你建议。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/boot-repair-large.jpg) + +*Boot Repair 也可以让你定制 Grub 2 的选项。* + +### Bootloader 急救 ### + +Grub 2 引导问题会让系统处于几种不同状态。屏幕(如你所想,本该显示 bootloader 菜单的地方)所展示的文本会指示出系统的当前状态。如果系统中止于 **grub>** 提示符,表明 Grub 2 模块已经被加载,但是找不到 **grub.cfg** 文件。当前是完全版的 Grub 2 命令行 shell,你可以通过多种方式解决此问题。如果你看到的是 **grub rescue>** 提示符,表明 bootloader 不能找到 Grub 2 模块或者找不到任何引导文件( boot files )。然而,如果你的屏幕只显示 ‘GRUB’ 一词,表明 bootloader 找不到通常位于主引导记录( Master Boot Record )里的最基本的信息。 + +你可以通过使用 live CD 或者在 Grub 2 shell 中修正此类错误。如果你够幸运, bootloader 出现了 **grub>** 提示符,你就能获得 Grub 2 shell 的支配权,来帮助你排错。 + +接下来几个命令工作在 **grub>** 和 **grub rescue>** 提示符下。 **set pager=1** 命令设置显示分页( pager ),防止文本在屏幕上一滚而过。你还可以使用 **ls** 命令列出 Grub 识别出的所有分区,如下: + + grub> ls + (hd0) (hd0,msdos5) (hd0,msdos6) (hd1,msdos1) + +如你所见,这个命令列出分区的同时一并列出了分区表方案(即 msdos)。 + +你还可以在每个分区上面使用 **ls** 来查找你的根文件系统: + + grub> ls (hd0,5)/ + lost+found/ var/ etc/ media/ bin/ initrd.gz + boot/ dev/ home/ selinux/ srv/ tmp/ vmlinuz + +你可以不写上分区名的 **msdos** 部分。同样,如果你忘记了尾部的斜杠( trailing slash )只输入 `ls (hd0,5)` ,那你将获得分区的信息,比如文件系统类型、总体大小和最后修改时间。如果你有多个分区,可以使用 `cat` 读取 `/etc/issue` 文件中的内容,来确定发行版,格式如 `cat (hd0,5)/etc/issue` 。 + +假设你在 **(hd0,5)** 中找到根文件系统,请确保它包含 `/boot/grub` 目录,以及你想引导进入的内核镜像,如 **vmlinuz-3.13.0-24-generic** 。此时输入以下命令: + + grub> set root=(hd0,5) + grub> linux /boot/vmlinuz-3.13.0-24-generic root=/dev/sda5 + grub> initrd /boot/initrd.img-3.13.0-24-generic + +第一个命令把 Grub 指向我们想引导进入的发行版所在的分区。接着第二个命令告知 Grub 内核镜像在分区中的位置,以及根文件系统的位置。最后一行设置虚拟文件系统( initial ramdisk )文件的位置。你可以使用 tab 补全功能补全内核名字和虚拟文件系统( initrd: initial ramdisk )的名字,节省时间和精力。 + +输入完毕,在下一个 **grub>** 提示符后输入 `boot` , Grub 将会引导进入指定的操作系统。 + +如果你在 **grub rescue>** 提示符下,情况会有些许不同。因为 bootloader 未能够找到并加载任何必需的模块,你需要手动添加这些模块: + + grub rescue> set root=(hd0,5) + grub rescue> insmod (hd0,5)/boot/grub/normal.mod + grub rescue> normal + grub> insmod linux + +如上所示,跟之前一样,使用 `ls` 命令列出所有分区之后,使用 `set` 命令标记起来。然后添加 **normal** 模块,此模块激活时将会恢复到标准 **grub>** 模式。如果 linux 模块没加载,接下来的命令会进行添加。如果这个模块已经加载,你可以跟之前一样,把引导加载程序指向内核镜像和虚拟文件系统( initrd )文件,然后使用 `boot` 启动发行版,完美收官。 + +一旦成功启动发行版,别忘了为 Grub 重新产生新的配置文件,使用 + + grub-mkconfig -o /boot/grub/grub.cfg + +命令。你还需要往 MBR 里安装一份 bootloader 的拷贝,使用 + + sudo grub2-install /dev/sda + +命令。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cfg-large.jpg) + +*想要禁用 `/etc/grub.d` 目录下的脚本,你只需移除其可执行位,比如使用 `chmod -x /etc/grub.d/20_memtest86+` 就能将 ‘Memory Test’ 选项从菜单中移除。* + +### Grub 2 和 UEFI ### + +在支持 UEFI 的机器(最近几年上市的机器大部分都是)调试坏掉的 Grub 2 增加了另一复杂的层次。恢复安装在 UEFI 机器上的 **Grub 2** 的和安装在非 UEFI 机器上的并没多大区别,只是新的固件处理方式不一样,从而导致了很多种恢复结果。 + +对于基于 UEFI 的系统,不要在 MBR 上安装任何东西。相反,你要在 EFI 系统分区(EFI System Partition)( ESP )里安装 Linux EFI bootloader,并且借助工具把它设置为 EFI 的默认启动程序,这个工具对于 Linux 用户是 `efibootmgr` ,对于 window 用户则是 `bcdedit` 。 + +照目前情况看,在安装任何与 Windows 8 兼容的主流桌面 Linux 发行版前,应该正确安装好 Grub 2。然而,如果 bootloader 损坏,你可以使用 live 发行版修复机器。在启动 live 介质之时,请确保是以 UEFI 模式启动。计算机每个可移动驱动器的启动菜单将会有两个: 一个普通的和一个以 EFI 标记的。使用后者会用到 **/sys/firmware/efi/** 文件中的 EFI 变量。 + +在 live 环境中,挂载教程前面所提的安装挂掉系统的根文件系统。除此之外,还需要挂载 ESP 分区。假设分区是 **/dev/sda1** ,你可以如下所示挂载: + + sudo mount /dev/sda1 /mnt/boot/efi + +接着在 chroot 到安装完毕的发行版前之前,使用 `modprobe efivars` 加载 **efivars** 模块。 + +在这里, Fedora 用户可以使用如下命令重新安装 bootloader + + yum reinstall grub2-efi shim + +但在此之前,需要使用 + + grub2-mkconfig -o /boot/grub2/grub.cfg + +来产生新的配置文件。 Ubuntu 用户则改用以下命令 + + apt-get install --reinstall grub-efi-amd64 + +一旦 bootloader 正确就位,退出 chroot ,卸载所有分区,重启到 Grub 2 菜单。 + +### 伙计,我的 Grub 哪去了? ### + +Grub 2 最好的特性是可以随时重新安装。因此,当其它像 Windows 之类的系统用它们自己的 bootloader 替换后,导致 Grub 2 丢失,你可以使用 live 发行版,寥寥数步即可重装 Grub 。假设你在 `/dev/sda5` 安装了一个发行版,若要重装 Grub ,你只需首先使用以下命令为发行版创建一个挂载目录: + + sudo mkdir -p /mnt/distro + +然后挂载分区,如下: + + mount /dev/sda5 /mnt/distro + +接着就能重装 Grub 了,如下: + + grub2-install --root-directory=/mnt/distro /dev/sda + +这个命令会改写 `/dev/sda` 设备上的 MBR 信息,指向当前 Linux 系统,并重写一些 Grub 2 文件,如 **grubenv** 和 **device.map** 。 + +另一个问题常见于装有多个发行版的计算机上。当你安装了新的 Linux 发行版,它的 bootloader 应当要能找到所有已经安装的发行版。一旦不行,只要引导进入新安装的发行版,并运行 + + grub2-mkconfig + +在运行这个命令之前,请确保启动菜单中缺失的发行版的 root 分区已经挂载。如果你想添加的发行版有单独的 `/root` 和 `/home` 分区,在运行 `grub2-mkconfig` 之前,只需挂载包含 `/root` 的分区。 + +虽然 Grub 2 能够找到大部分发行版,但是在 Ubuntu 中尝试添加安装的 Fedora 系统需要额外的一个步骤。如果你以默认设置安装了 Fedora ,则发行版的安装器已经创建了 LVM 分区。此时你需要使用发行版的包管理系统安装 **lvm2** 驱动,如下 + + sudo apt-get install lvm2 + +才能使得 Grub 2 的 `os-prober` 脚本能够找到并将 Fedora 添加进启动菜单。 + +### 常见用户设置 ### + +Grub 2 有很多可配置变量。 这里有一些 `/etc/default/grub` 文件中你最可能会修改到的常见变量。 **GRUB_DEFAULT** 变量指定默认的启动项,可以设置为数字值,比如 0 ,表示第一个菜单项,或者设置为 “saved” ,将指向上一次启动时选中的菜单项。 **GRUB\_TIMEOUT** 变量指定启动默认菜单项之前的停留时间。 **GRUB\_CMDLINE\_LINUX** 列出了要传递给所有 Linux 菜单项的内核命令行参数。 + +如果 **GRUB\_DISABLE\_RECOVERY** 变量设置为 **true** ,那么将不生成恢复模式菜单项。这些菜单项会以单用户模式启动发行版,这种模式下允许你利用命令行工具修复系统。 **GRUB_GFXMODE** 变量同样有用,它指定了菜单上文本显示的分辨率,它可以设置为你的显卡所支持的任何数值。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cli-large.jpg) + +*Grub 2 有个命令行模式,通过在 bootloader 菜单上按 C 进入。* + +### 彻底的修复 ### + +如果 `grub2-install` 命令不能正常运作,使得你无法引导进入 Linux ,你需要完整地重装以及重新配置 bootloader 。为此目的,需要用到强大的 **chroot** 功能将运行环境从 live CD 环境切换至我们想修复的 Linux 的安装位置。任何拥有 **chroot** 工具的 Linux live CD 都可以实现这个目的。不过需要确保 live 介质的系统架构和硬盘上系统的架构一致。因此当你希望 **chroot** 到 64 位系统,你必须使用 amd64 live 发行版。 + +启动进入 live 发行版之后,首先需要检查机器上的分区。使用 `fdisk -l` 列出磁盘上所有分区,记录你想修复的 Grub 2 系统所在的分区。 + +假设我们希望从安装在 `/dev/sda5` 中的发行版中恢复 bootloader 。启动终端使用如下命令挂载分区: + + sudo mount /dev/sda5 /mnt + +此时需要绑定(bind)Grub 2 bootloader 需要进入的目录,以便检测其它操作系统: + + $ sudo mount --bind /dev /mnt/dev + $ sudo mount --bind /dev/pts /mnt/dev/pts + $ sudo mount --bind /proc /mnt/proc + $ sudo mount --bind /sys /mnt/sys + +此时可以离开 live 环境进入安装在 **/dev/sda5** 分区中的发行版了,通过 **chroot** : + + $ sudo chroot /mnt /bin/bash + +现在可以安装、检测、以及升级 Grub 了,跟之前一样,使用 + + sudo grub2-install /dev/sda + +命令来重装 bootloader 。因为 **grub2-install** 命令不能创建**grub.cfg** 文件,需要手动创建,如下 + + sudo grub-mkconfig -o /boot/grub/grub.cfg + +这样应该就可以了。现在你就有了 Grub 2 的一份全新拷贝,罗列了机器上所有的操作系统和发行版。在重启电脑之前,你需要依次退出 chroot 系统,卸载所有分区,如下所示: + + $ exit + $ sudo umount /mnt/sys + $ sudo umount /mnt/proc + $ sudo umount /mnt/dev/pts + $ sudo umount /mnt/dev + $ sudo umount /mnt + +现在你可以安全地重启电脑了,而它应该会回退到 Grub 2 的控制之中,你已经修好了这个 bootloader。 + +### 添加自定义菜单项 ### + +如果希望往 bootloader 菜单里添加菜单项,你需要在 **40_custom** 文件里添加一个启动段( boot stanza )。例如,你可以使用它展示一个菜单项来启动安装在可移动 USB 驱动里的 Linux 发行版。假设你的 USB 驱动器是 **sdb1** ,并且 vmlinuz 内核镜像和虚拟文件系统( initrd )都位于根 (/)目录下,在 **40_custom** 文件中添加以下内容: + + menuentry “Linux on USB” { + set root=(hd1,1) + linux /vmlinuz root=/dev/sdb1 ro quiet splash + initrd /initrd.img + } + +相比使用设备和分区名,使用它们的 UUID 可以获得更精确结果,比如 + + set root=UUID=54f22dd7-eabe + +使用 + + sudo blkid + +来获得所有已连接的驱动器和分区的 UUID 。你还可以为你磁盘上没被 os-prober 脚本找到的发行版添加菜单项,只要你知道该发行版的安装位置以及其内核和虚拟文件系统( initrd )的位置即可。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxvoice.com/grub-2-heal-your-bootloader/ + +作者:[Mayank Sharma][a] +译者:[soooogreen](https://github.com/soooogreen) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linuxvoice.com/author/mayank/ diff --git a/translated/tech/20151229 Grub 2--Heal your bootloader.md b/translated/tech/20151229 Grub 2--Heal your bootloader.md deleted file mode 100644 index f9005762b6..0000000000 --- a/translated/tech/20151229 Grub 2--Heal your bootloader.md +++ /dev/null @@ -1,235 +0,0 @@ -Grub 2:拯救你的 bootloader -================================================================================ -**没什么事比 bootloader 坏掉更让气人的了。充分发挥 Grub 2 的作用,让 bootloader 安分工作吧。** - -为什么这么说? - -- Grub 2 是最受欢迎的 bootloader ,受用于几乎所有 Linux 发行版。 -- bootloader 是一个至关重要的软件,但是非常容易损坏。 -- Grub 2 是具有扩展性和灵活性一款引导加载程序,提供了大量可定制选项。 - -Grub 2 是一款精彩的功能强大的软件。它不是 bootloader 界一枝独秀,但却最受欢迎,几乎所有主要的桌面发行版都在使用它。 Grub 的工作有两个。首先,它用一个菜单展示计算机上所有已经安装的操作系统供你选择。然后,当你从启动菜单中选择了一个 Linux 操作系统, Grub 便加载这个 Linux 的内核。 - -你知道,如果使用 Linux ,你就离不开 bootloader 。然而它却是 Linux 发行版内部最鲜为人知的部分。在这个教程里,我们将带你熟悉 Grub 2 一些著名的特性,强化你相关技能,使你在 bootloader 跑飞的时候能够自行处理。 - -Grub 2 最重要的特色在于大量的 text 格式文件和两个脚本文件。首先需要了解的是 **/etc/default/grub** 。这是一个 text 文件,你可以在里面设置通用配置变量和 Grub 2 菜单(见标题为 “Common user settings(普通用户设置)” 的窗口)的其它特性。 - -Grub 2 另一个重要的特点在于 **/etc/grub.d** 文件夹。定义菜单入口的所有脚本都放置在这里。这些脚本的名称必须有两位的数字前缀。其目的是,在构建 Grub 2 菜单时定义脚本的执行顺序以及相应入口的顺序。文件 **00_header** 首先被读取,负责解析 **/etc/default/grub** 配置文件。然后是 Linux 内核的入口,位于 **10_linux** 文件中。这个脚本在默认的 **/boot** 分区为每个内核创建一个正规菜单入口和一个恢复菜单入口。 - -紧接着的是为第三方应用所用的脚本,如 **30_os-prober** 和 **40_custom** 。 **os-prober** 脚本为内核和其它分区里的操作系统创建入口。它能识别 Linux、 Windows、 BSD 以及 Mac OS X 的装置(译注,指 bootloader )。 如果你的硬盘设计比较独特,使得 **os-prober** 无法捕获已经安装的发行版,你可以在 **40_custom** 文件(见 “Add custom entries(添加定制入口)”窗口)中添加入口。 - -**Grub** 2 不需要你手动维护你的启动选项的配置文件:取而代之的是使用 **grub2-mkconfig** 命令产生 **/boot/grub/grub.cfg** 文件。这个功能会解析 **/etc/grub.d** 目录中的脚本以及 **/etc/default/grub** 设置文件来定义你的安装。 - -图形化引导修复 - -多亏了 Boot Repair 应用,只需要点击按钮,Grub 2 许许多多的问题都能轻易解决。这个小巧的应用有一个直观的用户界面,可以扫描并包含多种硬盘设计和分区方案,还能发现并正确识别里面的操作系统的装置(译注,指 bootloader )。这个应用可以以主引导记录 (MBR)形式存在于传统计算机里,也可以在新型 UEFI 计算机中以 GUID(译改,应为GUID)分区表布局方式工作。 - -Boot Repair 最简单的使用方式是在 Live Ubuntu 会话中安装。在机器上用一个坏的 bootloader 启动 Ubuntu Live 发行版,通过首次添加它的 PPA 版本库,安装 Boot Repair ,命令如下 - - sudo add-apt-repository ppa:yannubuntu/Boot Repair - -然后刷新版本库列表,使用 - - sudo apt-get update - -安装应用(译改,删了 before ),如下 - - sudo apt-get install -y Boot Repair - -安装完毕立刻启动应用。在显示它的界面(由一对按键组成)之前将会扫描你的硬盘。根据工具的指示,只需按下 Recommended Repair(推荐修复)按钮,即可修复大部分坏掉的 bootloader 。修复 bootloader 之后,这个工具会输出一串短小的 URL ,你应该把它记录下来。这个 URL 包含了硬盘详尽的信息:分区信息以及 Grub 2 重要的文件(如 **/etc/default/grub** 和 **boot/grub/grub.cfg** )的内容。如果工具不能解决 bootloader 的问题,可以把你这个 URL 共享在你的发行版的论坛公告牌上,让其他人分析你的硬盘设计以便给你建议。 - -![](http://www.linuxvoice.com/wp-content/uploads/2015/10/boot-repair-large.jpg) - -**Boot Repair 同样支持定制 Grub 2 的选项。** - -#### Bootloader 急救 #### - -Grub 2 引导问题会导致系统处于几种不同状态。屏幕(如你所想,本该显示 bootloader 菜单的地方)所展示的文本,指示系统的当前状态。如果系统中止于 **grub>** 提示符,表明 Grub 2 模块已经被加载,但是找不到 **grub.cfg** 文件。当前是全 Grub 2 命令shell,你可以通过多种方式解决此问题。如果你看到的是 **grub rescue>** 提示符,表明 bootloader 不能找到 Grub 2 模块或者找不到任何引导文件( boot files )。然而,如果你的屏幕只显示 ‘GRUB’ 一词,表明 bootloader 找不到通常位于主引导记录( Master Boot Record )里的最基本的信息。 - -你可以通过使用 live CD 或者在 Grub 2 shell中修正此类错误。如果你够幸运, bootloader 中止于 **grub>** 提示符,你将能获得 Grub 2 shell 的支配权,来帮助你排错。 - -接下来几个命令工作在 **grub>** 和 **grub rescue>** 提示符下。 **set pager=1** 命令产生分页器( pager ),防止文本在屏幕上被刷掉。你还可以使用 **ls** 命令列出 Grub 识别的分区,如下: - - grub> ls - (hd0) (hd0,msdos5) (hd0,msdos6) (hd1,msdos1) - -如你所见,这个命令列出分区的同时一并列出了分区表计划。 - -你还可以在每个分区上面使用 **ls** 来查找根文件系统: - - grub> ls (hd0,5)/ - lost+found/ var/ etc/ media/ bin/ initrd.gz - boot/ dev/ home/ selinux/ srv/ tmp/ vmlinuz - -你可以不写上分区名的 **msdos** 位。同样,如果你忘记尾斜杠( the trailing slash )只输入 **ls (hd0,5)** ,那你将获得分区的信息比如文件系统类型,总体大小和最后修改时间。如果你有多个分区,可以使用 **cat** 读取 **/etc/issue** 文件中的内容,来确定发行版,格式如 **cat (hd0,5)/etc/issue** 。 - -假设你在 **(hd0,5)** 中找到根文件系统,请确保它包含 /**boot/grub** 目录,以及你想引导进入的内核镜像,如 **vmlinuz-3.13.0-24-generic** 。此时输入以下命令: - - grub> set root=(hd0,5) - grub> linux /boot/vmlinuz-3.13.0-24-generic root=/dev/sda5 - grub> initrd /boot/initrd.img-3.13.0-24-generic - -第一个命令把 Grub 指向我们想引导进入的发行版所在的分区。接着第二个命令告知 Grub 内核镜像在分区中的位置,以及根文件系统的位置。最后一行设置虚拟文件系统( initial ramdisk )文件的位置。你可以使用 tab 补全功能补全内核名字和虚拟文件系统( initrd: initial ramdisk )名字,节省时间和精力。 - -输入完毕,在下一个 **grub>** 提示符后输入 **boot** , Grub 将会引导进入指定的操作系统。 - -在 **grub rescue>** 提示符下,情况会有些许不同。因为 bootloader 未能够找到并加载任何必需的模块,你需要手动添加这些模块: - - grub rescue> set root=(hd0,5) - grub rescue> insmod (hd0,5)/boot/grub/normal.mod - grub rescue> normal - grub> insmod linux - -如上所示,跟之前一样,使用 **ls** 命令列出所有分区之后,使用 **set** 命令标记起来。然后添加 **normal** 模块,此模块激活时将会恢复标准 **grub>** 模式。如果 linux 模块没加载,接下来的命令会进行添加。如果这个模块已经加载,你可以跟之前一样,把引导加载程序指向内核镜像和虚拟文件系统( initrd )文件,然后使用 **boot** 启动发行版,完美收官。 - -一旦成功启动发行版,别忘了为 Grub 重新产生新的配置文件,使用 - - grub-mkconfig -o /boot/grub/grub.cfg - -命令。你还需要往 MBR 里安装一份 bootloader 的拷贝,使用 - - sudo grub2-install /dev/sda - -命令。 - -![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cfg-large.jpg) - -**想要禁能 /etc/grub.d 目录下的脚本,你只需移除可执行位,比如使用 chmod -x /etc/grub.d/20_memtest86+ 就能将 ‘Memory Test’ 选项从菜单中移除。** - -### Grub 2 和 UEFI ### - -支持UEFI的机器(最近几年上市的机器大部分都是)添加了另一复杂的层次,用以调试坏掉的 **Grub 2**。恢复 **Grub 2** 的程序在 UEFI 机器上安装和在非 UEFI 机器上安装并没多大区别,只是新程序处理方式不一样,从而导致了很多种恢复结果。 - -对于基于 UEFI 的系统,不要在 MBR上安装任何东西。相反,你要在 EFI 系统分区( ESP )里安装 EFI bootloader,并且借助工具把它设置为 EFI 的默认启动程序,这个工具对于 Linux 用户是 **efibootmgr** ,对于 window 用户则是 **bcdedit** 。 - -照目前情况看,在安装任何与 Windows 8 兼容的主流桌面 Linux 发行版前, Grub 2 应该完成正确安装。然而,如果 bootloader 损坏,你可以使用 live 发行版进行机器修复。在启动 live 媒介之时,请确保是以 UEFI模式启动。计算机每个可移动驱动的启动菜单将会有两个选项: vanilla 选项和以 EFI 标记的选项。使用后者开放 **/sys/firmware/efi/** 文件中的 EFI 变量。 - -在 live 环境中,挂载教程前面所提的安装失败的装置(译注,指 bootloader )的根文件系统。除此之外,还需要挂载 ESP 分区。假设分区是 **/dev/sda1** ,你可以如下所示挂载 - - sudo mount /dev/sda1 /mnt/boot/efi - -接着在 chroot 到安装完毕的发行版前之前,使用 **modprobe efivars** 加载 **efivars** 模块。 - -这个时候, Fedora 用户使用如下命令重新安装 bootloader - - yum reinstall grub2-efi shim - -在此之前,需要使用 - - grub2-mkconfig -o /boot/grub2/grub.cfg - -来产生新的配置文件。 Ubuntu 用户则改用以下命令 - - apt-get install --reinstall grub-efi-amd64 - -一旦 bootloader 正确就位,退出 chroot ,取消挂载所有分区,重启让 Grub 2 菜单显示。 - -#### 伙计,我的 Grub 哪去了? #### - -Grub 2 最好的特性是可以随时重新安装。因此,当其它像 Windows 之类的系统用自己的 bootloader 替换之,导致 Grub 2 丢失,你可以使用 live 发行版,寥寥数步即可重装 Grub 。假设你在 **/dev/sda5** 安装了一个发行版,若要重装 Grub ,你只需首先使用以下命令,为发行版创建一个挂载目录 - - sudo mkdir -p /mnt/distro - -然后挂载分区,如下 - - mount /dev/sda5 /mnt/distro - -接着就能重装 Grub 了,如下 - - grub2-install --root-directory=/mnt/distro /dev/sda - -这个命令会改写 **/dev/sda** 设备上的 MBR 信息,指向当前 Linux 的装置(译注,指 bootloader ),并改写 Grub 2 部分文件如 **grubenv** 和 **device.map** 。 - -另一个问题常见于装有多个发行版的计算机上。安装了新的 Linux 发行版,它的 bootloader 应当要能捕获所有已经安装的发行版。一旦不能够,只要引导进入新安装的发行版,并运行 - - grub2-mkconfig - -运行命令之前,请确保发行版的启动菜单中缺失的 root 分区已经完成挂载。如果你想添加的发行版有独立 **/root** 和 **/home** 分区,在运行 **grub2-mkconfig** 之前,只需挂载包含 /root 的分区。 - -虽然 Grub 2 能够捕获大部分发行版,但是在 Ubuntu 中尝试添加 Fedora 的装置(译注,指 bootloader )需要额外的一个步骤。如果你以默认设置安装了 Fedora ,则发行版的安装器(译注,同样指 bootloader )已经创建了 LVM 分区。此时你需要使用发行版的包管理系统,安装 **lvm2** 驱动,如下 - - sudo apt-get install lvm2 - -才能使得 Grub 2 的 **os-prober** 脚本能够找到并将 Fedora 添加进启动菜单。 - -### 普通用户设置 ### - -Grub 2 有很多可配置变量。 **/etc/default/grub** 文件里有很多你最可能会修改到的普通变量。 **GRUB_DEFAULT** 变量指定默认的启动入口,可以设置为数字值,比如 0 ,表示第一个入口,或者设置为 “saved” ,将它从指向上一次启动时选中的选项。 **GRUB_TIMEOUT** 变量指定启动默认菜单入口之前的停留时间。 **GRUB_CMDLINE_LINUX** 为所有 Linux 菜单入口列出在内核命令行上传递的参数。 - -如果 **GRUB_DISABLE_RECOVERY** 变量设置为 **true** ,那么将不产生恢复模式菜单入口。这些入口以单用户模式启动发行版,这种模式下允许你利用命令行工具修复系统。 **GRUB_GFXMODE** 变量同样有用,它指定了菜单上文本显示的分辨率,它可以设置为你的显卡所支持的任何数值。 - -![](http://www.linuxvoice.com/wp-content/uploads/2015/10/grub2-cli-large.jpg) - -** Grub 2 有其命令行,通过在 bootloader 菜单上按 C 调用。** - -#### 彻底的修复 #### - -如果 **grub2-install** 命令不能正常运作,使得你无法引导进入 Linux ,你需要完整地重装以及重新配置 bootloader 。为此目的,需要用到神圣的 **chroot** 应用将 live CD 环境切换至并运行我们想修复的 Linux 的安装环境。任何拥有 **chroot** 工具的 Linux live CD 都可以实现这个目的。不过需要确保 live 媒介的架构和硬盘上系统的架构一致。因此当你希望 **chroot** 到 64 位系统,你必须使用 amd64 live 发行版。 - -启动进入 live 发行版之后,首先需要检查机器上的分区。使用 **fdisk -l** 列出磁盘上所有分区,记录你想修复的 Grub 2 装置所在的分区。 - -假设我们希望从安装在 **/dev/sda5** 中的发行版中恢复 bootloader 。启动终端使用如下命令挂载分区: - - sudo mount /dev/sda5 /mnt - -此时需要绑定 Grub 2 bootloader 需要进入的目录,以便检测其它操作系统: - - $ sudo mount --bind /dev /mnt/dev - $ sudo mount --bind /dev/pts /mnt/dev/pts - $ sudo mount --bind /proc /mnt/proc - $ sudo mount --bind /sys /mnt/sys - -此时可以离开 live 环境进入安装在 **/dev/sda5** 分区中的发行版了,通过 **chroot** : - - $ sudo chroot /mnt /bin/bash - -现在可以安装、检测、以及升级 Grub 了,跟之前一样,使用 - - sudo grub2-install /dev/sda - -命令来重装 bootloader 。因为 **grub2-install** 命令不能 创建**grub.cfg** 文件,需要手动创建,如下 - - sudo grub-mkconfig -o /boot/grub/grub.cfg - -这样应该就可以了。现在你就有了 Grub 2 的一份全新拷贝,罗列机器上所有的操作系统和发行版。在重启电脑之前,你需要依次退出 chroot 系统,卸载所有分区,如下所示: - - $ exit - $ sudo umount /mnt/sys - $ sudo umount /mnt/proc - $ sudo umount /mnt/dev/pts - $ sudo umount /mnt/dev - $ sudo umount /mnt - -现在你可以安全地重启电脑了,而它应该会回退到 Grub 2 的控制之中,而你又控制着这个 bootloader 。 - -### 添加自定义入口 ### - -如果希望往 bootloader 菜单里添加入口,你需要在 **40_custom** 文件里添加一个启动段( boot stanza )。例如,你可以使用它展示一个入口来启动安装在可移动 USB 驱动里的 Linux 发行版。假设你的 USB 驱动是 **sdb1** ,并且 vmlinuz 内核镜像和虚拟文件系统( initrd )都位于根 (/)目录下,在 **40_custom** 文件中添加以下内容: - - menuentry “Linux on USB” { - set root=(hd1,1) - linux /vmlinuz root=/dev/sdb1 ro quiet splash - initrd /initrd.img - } - -相比使用设备和分区名,使用它们的 UUID 可以获得更精确结果,比如 - - set root=UUID=54f22dd7-eabe - -使用 - - sudo blkid - -来获得所有已连接驱动和分区的 UUID 。你还可以为你磁盘上没被 os-prober 脚本捕获的发行版添加入口,只要你知道该发行版的安装位置以及其内核和虚拟文件系统( initrd )的定位即可。 - --------------------------------------------------------------------------------- - -via: https://www.linuxvoice.com/grub-2-heal-your-bootloader/ - -作者:[Mayank Sharma][a] -译者:[soooogreen](https://github.com/soooogreen) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linuxvoice.com/author/mayank/ From c82917b4d4b71a3923553fbf2df7ae0360b95e38 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 16 Jan 2016 11:32:57 +0800 Subject: [PATCH 0856/1710] [Translating] sources/share/20151028 Bossie Awards 2015--The best open source big data tools.md --- ...28 Bossie Awards 2015--The best open source big data tools.md | 1 + 1 file changed, 1 insertion(+) 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 index 0cf65ea3a8..942e4b3076 100644 --- 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 @@ -1,3 +1,4 @@ +ictlyh Translating 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 From 9d2c14b70857b24a80102939fe58a87527d01e1c Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 16 Jan 2016 12:16:39 +0800 Subject: [PATCH 0857/1710] =?UTF-8?q?[=E5=8F=96=E6=B6=88=E8=AE=A4=E9=A2=86?= =?UTF-8?q?]=20sources/share/20151028=20Bossie=20Awards=202015--The=20best?= =?UTF-8?q?=20open=20source=20big=20data=20tools.md=20[Translating]=20sour?= =?UTF-8?q?ces/tech/20151204=20Install=20and=20Configure=20Munin=20monitor?= =?UTF-8?q?ing=20server=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...28 Bossie Awards 2015--The best open source big data tools.md | 1 - ...204 Install and Configure Munin monitoring server in Linux.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) 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 index 942e4b3076..0cf65ea3a8 100644 --- 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 @@ -1,4 +1,3 @@ -ictlyh Translating 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 diff --git a/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md b/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md index 314d721e38..05f2ead9c3 100644 --- a/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md +++ b/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md @@ -1,3 +1,4 @@ +ictlyh Translating Install and Configure Munin monitoring server in Linux ================================================================================ ![](http://www.linuxnix.com/wp-content/uploads/2015/12/munin_page.jpg) From 8f940123251d25c2f5809406c68c8a588d345e4a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 16 Jan 2016 12:53:14 +0800 Subject: [PATCH 0858/1710] [Translated] sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md --- ...figure Munin monitoring server in Linux.md | 146 ------------------ ...figure Munin monitoring server in Linux.md | 145 +++++++++++++++++ 2 files changed, 145 insertions(+), 146 deletions(-) delete mode 100644 sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md create mode 100644 translated/tech/20151204 Install and Configure Munin monitoring server in Linux.md diff --git a/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md b/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md deleted file mode 100644 index 05f2ead9c3..0000000000 --- a/sources/tech/20151204 Install and Configure Munin monitoring server in Linux.md +++ /dev/null @@ -1,146 +0,0 @@ -ictlyh Translating -Install and Configure Munin monitoring server in Linux -================================================================================ -![](http://www.linuxnix.com/wp-content/uploads/2015/12/munin_page.jpg) - -Munin is an excellent system monitoring tool similar to [RRD tool][1] which will give you ample information about system performance in multiple fronts like **disk, network, process, system and users**. These are some of the default properties Munin monitors. - -### How Munin works? ### - -Munin works in a client-server model. Munin server process on main server try to collect data from client daemon which is running locally(Munin can monitor it’ss own resources) or from remote client(Munin can monitor hundreds of machines) and displays them in graphs on its web interface. - -### Configuring Munin in nutshell ### - -This is of two steps as we have to configure both server and client. -1)Install Munin server package and configure it so that it get data from clients. -2)Configure Munin client so that server will connect to client daemon for data collocation. - -### Install munin server in Linux ### - -Munin server installation on Ubuntu/Debian based machines - - apt-get install munin apache2 - -Munin server installation on Redhat/Centos based machines. Make sure that you [enable EPEL repo][2] before installing Munin on Redhat based machines as by default Redhat based machines do not have Munin in their repos. - - yum install munin httpd - -### Configuring Munin server in Linux ### - -Below are the steps we have to do in order to bring server up. - -1. Add host details which need monitoring in /etc/munin/munin.conf -1. Configure apache web server to include munin details. -1. Create User name and password for web interface -1. Restart apache server - -**Step 1**: Add hosts entry in this file in **/etc/munin/munin.conf**. Go to end of the file and a client to monitor. Here in this example, I added my DB server and its IP address to monitor - -Example: - - [db.linuxnix.com] - address 192.168.1.25 - use_node_name yes - -Save the file and exit. - -**Step 2**: Edit/create munin.conf file in /etc/apache2/conf.d folder to include Munin Apache related configs. In another note, by default other Munin web related configs are kept in /var/www/munin folder. - - vi /etc/apache2/conf.d/munin.conf - -Content: - - Alias /munin /var/www/munin - - Order allow,deny - Allow from localhost 127.0.0.0/8 ::1 - AllowOverride None - Options ExecCGI FollowSymlinks - AddHandler cgi-script .cgi - DirectoryIndex index.cgi - AuthUserFile /etc/munin/munin.passwd - AuthType basic - AuthName "Munin stats" - require valid-user - - ExpiresActive On - ExpiresDefault M310 - - - -Save the file and exit - -**Step 3**: Now create a username and password for viewing muning graphs: - - htpasswd -c /etc/munin/munin-htpasswd munin - -**Note**: For Redhat/Centos machines replace “**apache2**” with “**httpd**” in each path to access your config files. - -**Step 3**: Restart Apache server so that Munin configurations are picked-up by Apache. - -#### Ubuntu/Debian based: #### - - service apache2 restart - -#### Centos/Redhat based: #### - - service httpd restart - -### Install and configure Munin client in Linux ### - -**Step 1**: Install Munin client in Linux - - apt-get install munin-node - -**Note**: If you want to monitor your Munin server, then you have to install munin-node on that as well. - -**Step 2**: Configure client by editing munin-node.conf file. - - vi /etc/munin/munin-node.conf - -Example: - - allow ^127\.0\.0\.1$ - allow ^10\.10\.20\.20$ - ----------- - - # Which address to bind to; - host * - ----------- - - # And which port - port 4949 - -**Note**: 10.10.20.20 is my Munin server and it connections to 4949 port on client to get its data. - -**Step 3**: Restart munin-node on client server - - service munin-node restart - -### Testing connection ### - -check if you are able to connect client from server on 4949 port, other wise you have to open that port on client machine. - - telnet db.linuxnix.com 4949 - -Accessing Munin web interface - - http://munin.linuxnix.com/munin/index.html - -Hope this helps to configure basic Munin server. - --------------------------------------------------------------------------------- - -via: http://www.linuxnix.com/install-and-configure-munin-monitoring-server-in-linux/ - -作者:[Surendra Anne][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxnix.com/author/surendra/ -[1]:http://www.linuxnix.com/network-monitoringinfo-gathering-tools-in-linux/ -[2]:http://www.linuxnix.com/how-to-install-and-enable-epel-repo-in-rhel-centos-oracle-scentific-linux/ diff --git a/translated/tech/20151204 Install and Configure Munin monitoring server in Linux.md b/translated/tech/20151204 Install and Configure Munin monitoring server in Linux.md new file mode 100644 index 0000000000..d26c1b0d8e --- /dev/null +++ b/translated/tech/20151204 Install and Configure Munin monitoring server in Linux.md @@ -0,0 +1,145 @@ +在 Linux 上安装和配置 Munin 检测服务器 +================================================================================ +![](http://www.linuxnix.com/wp-content/uploads/2015/12/munin_page.jpg) + +Munin 是一款和 [RRD][1] 类似很好的系统检测工具,它能提供给你多方面的系统性能信息,例如 **磁盘、网络、进程、系统和用户**。这些是 Munin 默认检测的属性。 + +### Munin 如何工作? ### + +Munin 以客户端-服务器模式运行。主服务器上运行的 Munin 服务器进程尝试从本地运行的客户端守护进程(Munin 可以检测它自己的资源)或者远程客户端(Munin 可以检测上百台机器)收集数据,然后在它的 web 页面以图的形式显示出来。 + +### 在 nutshell 中配置 Munin ### + +要配置服务器端和客户端,我们需要完成以下两步。 +1) 安装 Munin 服务器软件包并配置,使得它能从客户端收集数据。 +2) 安装 Munin 客户端使得服务器能连接到客户端守护进程用于收集数据。 + +### 在 Linux 上安装 munin 服务器端 ### + +在基于 Ubuntu/Debian 的机器上安装 Munin 服务器 + + apt-get install munin apache2 + +在基于 Redhat/CentOS 的机器上安装 Munin 服务器。在基于 Redhat 的机器上安装 Munin 之前,你需要确保 [启用 EPEL 软件仓库][2],因为基于 Redhead 的机器它们的软件仓库默认没有 Munin。 + + yum install munin httpd + +### 在 Linux 上配置 Munin 服务器端 ### + +下面是我们要启动服务器按按顺序执行的步骤。 + +1. 在 /etc/munin/munin.conf 中添加需要检测的主机详情 +2. 配置 apache web 服务器使其包括 munin 配置。 +3. 为 web 页面创建用户名和密码 +4. 重启 apache 服务器 + +**步骤 1**: 在 **/etc/munin/munin.conf** 文件中添加主机条目。调到文件末尾添加要检测的客户端。在这个例子中,我添加了要检测的数据库服务器和它的 IP 地址。 + +事例: + + [db.linuxnix.com] + address 192.168.1.25 + use_node_name yes + +保存文件并退出。 + +**步骤 2**: 在 /etc/apache2/conf.d 目录中编辑/创建文件 munin.conf 用于包括 Munin 和 Apache 相关的配置。另外注意一点,默认其它和 web 相关的 Munin 配置保存在 /var/www/munin 目录。 + + vi /etc/apache2/conf.d/munin.conf + +内容: + + Alias /munin /var/www/munin + + Order allow,deny + Allow from localhost 127.0.0.0/8 ::1 + AllowOverride None + Options ExecCGI FollowSymlinks + AddHandler cgi-script .cgi + DirectoryIndex index.cgi + AuthUserFile /etc/munin/munin.passwd + AuthType basic + AuthName "Munin stats" + require valid-user + + ExpiresActive On + ExpiresDefault M310 + + + +保存文件并退出 + +**步骤 3**: 现在为查看 munin 的图示创建用户名和密码: + + htpasswd -c /etc/munin/munin-htpasswd munin + +**注意**:对于 Redhat/Centos 机器,为了访问你的配置文件,需要在每个路径中用 “**httpd**” 替换 “**apache2**”。 + +**步骤 4**: 重启 Apache 服务器,使得 Munin 配置生效。 + +#### 基于 Ubuntu/Debian : #### + + service apache2 restart + +#### 基于 Centos/Redhat : #### + + service httpd restart + +### 在 Linux 上安装和配置 Munin 客户端 ### + +**步骤 1**: 在 Linux 上安装 Munin 客户端 + + apt-get install munin-node + +**注意**:如果你想检测你的 Munin 服务器端,你也需要在那里安装 munin-node。 + +**步骤 2**: 编辑 munin-node.conf 文件配置客户端。 + + vi /etc/munin/munin-node.conf + +事例: + + allow ^127\.0\.0\.1$ + allow ^10\.10\.20\.20$ + +---------- + + # Which address to bind to; + host * + +---------- + + # And which port + port 4949 + +**注意**: 10.10.20.20 是我的 Munin 服务器,它连接到客户端的 4949 端口获取数据。 + +**步骤 3**: 在客户端机器中重启 munin-node + + service munin-node restart + +### 测试连接 ### + +检查你是否能从服务器的连接到客户端的 4949 端口,如果不行,你需要在客户端机器中打开该端口。 + + telnet db.linuxnix.com 4949 + +访问 Munin web 页面 + + http://munin.linuxnix.com/munin/index.html + +希望这些能对你配置基本的 Munin 服务器有所帮助。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxnix.com/install-and-configure-munin-monitoring-server-in-linux/ + +作者:[Surendra Anne][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxnix.com/author/surendra/ +[1]:http://www.linuxnix.com/network-monitoringinfo-gathering-tools-in-linux/ +[2]:http://www.linuxnix.com/how-to-install-and-enable-epel-repo-in-rhel-centos-oracle-scentific-linux/ From 5d59b422ea67469c4e0307181c869b0619988fea Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 16 Jan 2016 20:56:57 +0800 Subject: [PATCH 0859/1710] PUB:20151125 Running a mainline kernel on a cellphone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @kylepeng93 翻译的不错,就是应该保留原文的 Markdown 格式啊,我还得一个个补充回来。https://linux.cn/article-6897-1.html --- ...unning a mainline kernel on a cellphone.md | 45 +++++++++++++++++++ ...unning a mainline kernel on a cellphone.md | 14 ------ 2 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 published/20151125 Running a mainline kernel on a cellphone.md delete mode 100644 translated/tech/20151125 Running a mainline kernel on a cellphone.md diff --git a/published/20151125 Running a mainline kernel on a cellphone.md b/published/20151125 Running a mainline kernel on a cellphone.md new file mode 100644 index 0000000000..0de1daf0c4 --- /dev/null +++ b/published/20151125 Running a mainline kernel on a cellphone.md @@ -0,0 +1,45 @@ +为什么主线内核不能运行在我的手机上? +================== + +对于自由软件来说,其最大的自由之一就是能够用一个更新或修改的版本来替换原始版本的程序。尽管如此,数千万使用那些手机里面装着所谓 Linux 的用户却很少能够在他们的手机上运行主线内核(mainline kernel),即使他们拥有替换内核代码的专业技能。可悲的是,我们必须承认目前仍然没有可以运行主线内核的主流手机。在由 Rob Herring 主持的2015届内核峰会(Kernel Summit)上,与会人员共同探讨了这个问题,并进一步谈论了他们应该怎么做才能解决这个问题。 + +当主持人提问的时候,在座的大多数开发人员都表示他们更乐意在他们的手机上面运行主线内核,然而也有少数人持相反的看法。在 Project Ara 的支持下,Rob 在这个问题上已经研究了近一年半的时间(参见:https://lwn.net/Articles/648400/ )。但是最新的研究成果并不理想。 + +Rob 表示,通常手机上运行了太多的过期(out-of-tree)代码;主线内核只是缺少能使手机正常运行所必须的驱动。每台常规的手机都在运行着100万行到300万行的过期(out-of-tree)代码。几乎所有的这些手机的内核版本都不超过3.10,有一些甚至更加古老。造成这种情况的原因有很多,但是有一点是很清楚的,在手机的世界里,一切都变化的太快以至于无法跟上内核社区的步伐。如果真是那样,他问到,我们还担心什么呢? + +Tim Bird 指出,第一台 Android 手机 Nexus 1 从来没有运行过任何一个主线内核,并且以后也不会。它打破了开源的承诺,也使得用户不可能做到将一个新的内核放到手机中。从这一点上来说,没有任何一款手机支持这种能力。Peter Zijlstra 想知道从一台手机到另一台手机到底复制了多少能够工作的过期代码;Rob表示,迄今为止,他已经见到了三个独立开发的热插拔 [Governors][1]。 + +Dirk Hohndel 提出了很少有人注意到的建议。他说,对于世界上的数以亿计的手机,大约只有他们27个人关心他们的手机是否运行着主线内核。剩下的用户仅仅只是想让他们的手机正常工作。或许那些关注手机是否在运行主线内核的开发者正在努力去解决这个令人不解的问题。 + +Chris Mason 说,那些手机厂商当前正面临着相同类型的问题,而这些问题也是那些 Linux 发行版过去所面临过的问题。他们疲于应付大量的无效且重复和能被复用的工作。一旦这些发行版决定将他们的工作配合主线内核而不是使用自己维护的内核,那么问题将会变得好解决的多。解决问题的关键就是去帮助手机制造商们认识到他们可以通过同样的方式获得便利,形成这种认识的关键并不是通过来自用户的压力。这样一来,问题就可以解决了。 + +Grant Likely 提出了对于安全问题的担忧,这种担忧来自于那些不能升级他们的手机系统的 android 设备。他说,我们需要的是一个真正专为手机设立的发行版。但是,只要手机厂商仍然掌控着手机中的应用软件,那么手机的同步更新将无法实现。我们接下来将面临一个很大的安全难题。Peter 补充说,随着 [Stagefright 漏洞][2]的出现,难题已经出现在我们面前了。 + +Ted Ts'o 说,运行主线内核并不是他的主要关注点。他很乐于见到这个假期中所售卖的手机能够运行3.18或者4.1的内核,而不是继续停留在3.10。他认为这是一个更可能被解决的问题。Steve Rostedt 认为,按照 Ted Ts'o 所说的那样去做并不能解决手机的安全问题,但是,Ted 认为使用一个更新一些的内核至少可以让漏洞修复变得更加容易。Grant 对此回应说,接下来的一年里,这一切都将再次发生。过渡到更新的内核也是一个渐进式的对系统的完善。Kees Cook 补充说,我们无法从修复旧版本的内核漏洞的过程中得到太多的益处,真正的问题是我们没有对 bug 的应对措施(他会在今天的另外一个对话中讲到这个话题)。 + +Rob 说,任何一种解决方案都需要得到当前市场上的手机供应商的支持。否则,由于厂商对安装到他们生产的手机上的操作系统的封锁,运行主线内核的策略将会陷入麻烦。Paolo Bonzini 提问说是否可以因为那些没有修复的安全漏洞而控告手机厂商,尤其当手机仍然处于保修期内。Grant 认为对于手机的可更新能力(upgradeability)的保证必须来源于市场需求,否则是无法实现的。而促使它实现的原因可能会是一个严重的安全问题,然后用户开始对手机的可更新能力提出要求。同时,内核开发人员必须不断朝着这个方向努力。Rob 表示,除了到目前为止指出的所有优点之外,运行主线内核也能帮助开发者对安卓设备上的新特性进行测试和验证。 + +Josh Triplett 提问说,如果手机厂商提出对主线内核提供支持的想法,那么内核社区又将采取什么措施呢?那样将会针对手机各方面的特性要求对内核进行大量的测试和验证;[Android 的兼容性测试套件][3]中出现的失败将不得不被再次回归到内核。Rob 提议这个问题可以在明年讨论,即先将最基本的功能做好。但是,Josh 强调说,如果这个需求出现了,我们就应该能够给出一个好的答案。 + +Tim 认为,当前,我们和厂商之间存在很大的脱节。厂商根本不会主动报告或者贡献任何反馈给社区。他们之间完全脱节了,这样的话永远不会有进步。Josh 表示,当厂商们开始报告他们正在使用的旧内核的相关 bug 时,双方之间的接受度将变得更加友好。Arnd Bergmann 认为,我们需要的是得到一个大芯片厂商对使用主线内核的认可,并且将该厂商的硬件提升到能够支持主线内核的运行的这样一个水平,而这样将会在其他方面增加负担。但是,他补充说,实现这个目标要求存在一个跟随硬件一起分发的自由 GPU 驱动程序——然而这种程序当前并不存在。 + +Rob 给存在问题的领域列了一个清单,但是现在已经没有太多的时间去讨论其中的细节了。WiFi 驱动仍然是一个问题,尤其是当这个新特性被添加到 Android 设备上的时候。Johannes Berg 对新特性仍然存在问题表示赞同;Android 的开发人员甚至在这些新特性被应用到 Android 设备上之前都不会去谈论它们是否存在问题。然而,对这些特性中的大多数的技术支持最终都会落实在主线内核中。 + +随着会议逐渐接近尾声,Ben Herrenschmidt 再次重申:实现在 Android 手机上运行主线内核的关键还是在于让厂商认识到使用主线内核是它们获得最大利润的最好选择。从长远看,使用主线内核能节省大量的工作。Mark Brown 认为,以前,当搭载在 Android 设备上的内核版本以更稳定的方式向前推进的时候,上游工作的好处对运营商来说更加明显。以现在的情况来看,手机上的内核版本似乎停留在了3.10,那种压力是不一样的。 + +这次谈话以开发者决定进一步改善当前的状况而结束,但是却并没有对如何改善提出一个明确的计划。 + +--------------------------------------------------------------------------------- + +via: https://lwn.net/Articles/662147/ + +作者:[Jonathan Corbet][a] +译者:[kylepeng93](https://github.com/kylepeng93) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://lwn.net/Articles/KernelSummit2015/ +[1]:http://androidmodguide.blogspot.com/p/blog-page.html +[2]:https://lwn.net/Articles/652728/ +[3]:https://source.android.com/compatibility/cts/index.html diff --git a/translated/tech/20151125 Running a mainline kernel on a cellphone.md b/translated/tech/20151125 Running a mainline kernel on a cellphone.md deleted file mode 100644 index 88f21b55d7..0000000000 --- a/translated/tech/20151125 Running a mainline kernel on a cellphone.md +++ /dev/null @@ -1,14 +0,0 @@ -在手机上面运行主线内核 - 对于自由软件来说,其最大的自由之一就是能够用一个更新或修改的版本来替换原始版本的程序。尽管如此,数千万使用linux内核作为支持的手机用户却很少能够在他们的手机上运行主线内核,即使他们拥有替换内核代码的专业技能。可悲的是,我们必须承认目前仍然无法使用到运行主线内核的主流手机。在由Rob Herring主持的2015届内核峰会上,与会人员共同探讨了这个问题,并进一步谈论了他们应该怎么做才能解决这个问题。 - 当主持人提问的时候,在座的大多数开发人员都表示他们更喜欢在他们的手机上面运行主线内核,然而也有少数人持相反的看法。在Project Ara的支持下,Rob在这个问题上已经研究了近一年半的时间。但是最新的研究成果并不理想。 - Rob表示,有太多的树(out-of-tree)代码运行在手机上,主线内核只是缺少能使手机正常运行所必须的驱动。每台合格的手机都在运行着100万到300万的树(out-of-tree)代码。几乎所有的这些手机的内核版本都不超过3.1,有一些甚至更加古老。造成这种情况的原因有很多,但是有一点是很清楚的,在手机的世界里,一切都变化的太快以至于内核社区无法跟上它们的步伐。如果真是那样,他问到,我们还担心什么呢? - Tim Bird指出,第一台Android手机Nexus1从来没有运行过任何一个主线内核,并且以后也不会。它打破了开源的承诺,也使得用户不可能做到将一个新的内核放到手机中。从这一点上来说,没有任何一款手机支持这种能力。Peter Zijlstra想知道从一台手机到另一台手机到底有多少正发挥作用的被复制的代码。Rob表示,迄今为止,他已经见到了三个独立开发的热插拔调速器。 - Dirk Hohndel提出了很少有人注意到的建议。他说,对于世界上的成千上亿万台手机,其中大约有百分之27的手机用户关心他们的手机是否运行着主线内核。剩下的用户仅仅只是想让他们的手机正常工作。或许那些关注手机是否在运行主线内核的开发者正在努力去解决这个令人不解的问题。 - Chris Mason说,那些手机卖家当前正面临着相同类型的问题,而这些问题也是那些linux发行版过去所面临过的问题。他们疲于应付大量的无效且重复和能被复制的工作。一旦这些发行版决定将他们的工作重心转入到主线内核而不是让它顺其自然的发展,那么问题将会变得好解决的多。解决问题的关键就是去帮助手机制造商们认识到他们可以通过同样的方式获利,形成这种认识的关键并不是通过来自用户的压力。这样一来,问题就可以解决了。 - Grant Likely提出了对于安全问题的担忧,这种担忧来自于那些不能升级他们的手机系统的android设备。他说,我们需要的是一个真正专为手机设立的发行市场。但是,只要手机卖家仍然掌控着手机中的应用软件,那么手机的同步更新将无法实现。我们接下来将面临一个很大的安全难题。Peter补充说,随着Stagefright漏洞的出现,难题已经出现在我们面前了。 - Ted Ts'o说,运行主线内核并不是他的主要关注点。他很乐于见到这个假期中所售卖的手机能够运行3.18或者4.1的内核,而不是继续停留在3.10。他认为这是一个更可能被解决的问题。Steve Rostedt认为,按照Ted Ts'o所说的那样去做并不能解决手机的安全问题,但是,Ted认为使用一个更新的内核至少可以让漏洞修复变得更加容易。Grant对此回应说,接下来的一年里,这一切都将再次发生。过渡到更新的内核也是一个渐进式的对系统的完善。Kees Cook补充说,我们无法从修复旧版本的内核漏洞的过程中得到太多的益处,真正的问题是我们没有对bug的应对措施。 - Rob说,任何一种解决方案都需要得到当前的手机供应商的支持。否则,由于厂商对应用到他们生产的手机上的操作系统的封锁,运行主线内核的策略将会陷入麻烦。Paolo Bonzini提问说是否可以因为那些没有修复的安全漏洞而控告手机厂商,尤其当手机仍然处于保修期内。Grant认为对于手机的可更新能力的保证必须来源于市场需求,否则是无法实现的。而促使它实现的原因可能会是一个严重的安全问题,然后用户开始对手机的可更新能力提出要求。同时,内核开发人员必须不断朝着这个方向努力。Rob表示,除了到目前为止指出的所有优点之外,运行主线内核也能帮助开发者对安卓设备上的新特性进行测试和验证。 - Josh Triplett提问说,如果手机产商提出对主线内核提供支持的想法,那么内核社区又将采取什么措施呢?那样将会针对手机各方面的特性要求对内核进行大量的测试和验证;Android的兼容性测试套件中出现的失败将不得不被再次回归。Rob提议这个问题将会在明年被讨论,即先将最基本的功能做好。但是,Josh强调说,如果这个需求出现了,我们就应该能够给出一个好的答案。 - Tim认为,当前,我们和厂商之间存在很大的脱节。厂商根本不会主动报告或者贡献任何反馈给社区。他们之间完全脱节了,这样的话永远不会有进步。Josh表示,当厂商们报告他们正在使用的旧内核的相关bug时,双方之间的接受度将变得更加友好。Arnd Bergmann认为,我们需要的是得到一个大芯片厂商对使用主线内核的认可,并且将该厂商的硬件提升到能够支持主线内核的运行的这样一个水平,而这样将会在其他方面增加负担。但是,他补充说,实现这个目标要求存在一个跟随硬件一起分发的自由GPU驱动程序——然而这种程序当前并不存在。 - Rob给存在问题的领域列了一个清单,但是现在已经没有太多的时间去讨论其中的细节了。WIFI驱动仍然是一个问题,尤其是当新特性被添加到Android设备上的时候。Johannes Berg对新特性仍然存在问题表示赞同;android的开发人员甚至在这些新特性被应用到Android设备上之前都不会去谈论它们是否存在问题。然而,对这些特性中的大多数的技术支持最终都会落实在主线内核中。 - 随着会议逐渐接近尾声,Ben Herrenschmidt再次重申:实现在andoroid手机上运行主线内核的关键还是在于让厂商认识到使用主线内核是它们获得最大利润的最好选择。从长远看,使用主线内核能节省大量的工作。Mark Brown认为,以前,当搭载在Android设备上的内核版本以更稳定的方式向前推进的时候,上游工作的好处对运营商来说更加明显。以现在的情况来看,手机上的内核版本似乎停留在了3.10,那种压力是不一样的。这次会话以开发者决定进一步改善当前的状况而结束,但是却并没有对如何改善提出一个明确的计划。 From 221e8815445e84e604045978f648f8e5da2125b7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 Jan 2016 11:49:50 +0800 Subject: [PATCH 0860/1710] PUB:20151204 Linux or Unix--jobs Command Examples @strugglingyouth --- ...04 Linux or Unix--jobs Command Examples.md | 71 ++++++------------- 1 file changed, 23 insertions(+), 48 deletions(-) rename {translated/tech => published}/20151204 Linux or Unix--jobs Command Examples.md (57%) diff --git a/translated/tech/20151204 Linux or Unix--jobs Command Examples.md b/published/20151204 Linux or Unix--jobs Command Examples.md similarity index 57% rename from translated/tech/20151204 Linux or Unix--jobs Command Examples.md rename to published/20151204 Linux or Unix--jobs Command Examples.md index fbb52a2544..70e5138862 100644 --- a/translated/tech/20151204 Linux or Unix--jobs Command Examples.md +++ b/published/20151204 Linux or Unix--jobs Command Examples.md @@ -1,14 +1,13 @@ - -Linux / Unix: jobs 命令示例 +jobs 命令示例 ================================================================================ -我是个新的 Linux 或 Unix 用户。如何在 Linux 或类 Unix 系统中使用 BASH/KSH/TCSH 或者基于 POSIX 的 shell 来查看当前正在进行的作业?在 Unix/Linux 上怎样显示当前作业的状态? +我是个新的 Linux/Unix 用户。我该如何在 Linux 或类 Unix 系统中使用 BASH/KSH/TCSH 或者基于 POSIX 的 shell 来查看当前正在进行的作业(job)?在 Unix/Linux 上怎样显示当前作业的状态?(LCTT 译注:job,也常称为“任务”) -作业控制的是什么,停止/暂停进程(命令)的执行并按你的要求继续/恢复它们的执行。这是根据你的操作系统和 shell 如,bash/ksh 或 POSIX shell 来执行的。 +作业控制是一种能力,可以停止/暂停进程(命令)的执行并按你的要求继续/恢复它们的执行。这是通过你的操作系统和诸如 bash/ksh 或 POSIX shell 等 shell 来执行的。 shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命令来显示。 -### 目的 ### +### 用途 ### > 在当前 shell 会话中显示作业的状态。 @@ -30,7 +29,7 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 在开始使用 jobs 命令前,你需要在系统上先启动多个作业。执行以下命令来启动作业: - ## 启动 xeyes, calculator, 和 gedit 文本编辑器 ### + ### 启动 xeyes, calculator, 和 gedit 文本编辑器 ### xeyes & gnome-calculator & gedit fetch-stock-prices.py & @@ -39,7 +38,7 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 ping www.cyberciti.biz -按 **Ctrl-Z** 键来暂停 ping 命令的作业。 +按 **Ctrl-Z** 键来挂起(suspend) ping 命令的作业。 ### jobs 命令示例 ### @@ -54,7 +53,7 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 [3]- 7910 Running gedit fetch-stock-prices.py & [4]+ 7946 Stopped ping cyberciti.biz -要显示进程 ID 或作业名称请使用 “P” 选项,输入: +要显示名字以“p”开头的进程 ID 或作业名称,输入: $ jobs -p %p @@ -66,7 +65,7 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 [4]- Stopped ping cyberciti.biz -字符 % 后加一个作业。在这个例子中,你需要使用作业的名称来暂停它,如 %ping。 +字符 % 是一个指定任务的方法。在这个例子中,你可以使用作业名称开头字符串来来暂停它,如 %ping。 ### 如何显示进程 ID 不包含其他正常的信息? ### @@ -77,7 +76,8 @@ shell 会将当前所执行的作业保存在一个表中,可以用 jobs 命 示例输出: ![Fig.01: Displaying the status of jobs in the shell](http://s0.cyberciti.org/uploads/faq/2013/02/jobs-command-output.jpg) -Fig.01: 在 shell 中显示 jobs 的状态 + +*Fig.01: 在 shell 中显示 jobs 的状态* ### 如何只列出最近一次状态改变的进程? ### @@ -85,7 +85,7 @@ Fig.01: 在 shell 中显示 jobs 的状态 $ sleep 100 & -现在,只显示作业最近一次的状态(停止或退出),输入: +现在,只显示自从上次提示过停止或退出之后的作业,输入: $ jobs -n @@ -137,43 +137,18 @@ Fig.01: 在 shell 中显示 jobs 的状态 摘自 [bash(1)][1] 命令 man 手册页: -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
-lShow process id's in addition to the normal information.
-pShow process id's only.
-nShow only processes that have changed status since the last notification are printed.
-rRestrict output to running jobs only.
-sRestrict output to stopped jobs only.
-xCOMMAND is run after all job specifications that appear in ARGS have been replaced with the process ID of that job's process group leader./td>
+|选项|描述| +|---|------------------| +|`-l`| 列出进程 ID 及其它信息。| +|`-p`| 仅列出进程 ID。| +|`-n`| 仅列出自从上次输出了状态变化提示(比如显示有进程退出)后的发生了状态变化的进程。| +|`-r`| 仅显示运行中的作业。| +|`-s`| 仅显示停止的作业。| +|`-x`| 运行命令及其参数,并用新的命令的进程 ID 替代所匹配的原有作业的进程组 ID。| ### 关于 /usr/bin/jobs 和 shell 内建的说明 ### -输入以下 type 命令找出是否 jobs 命令是 shell 的内建命令或是外部命令: +输入以下 type 命令找出是否 jobs 命令是 shell 的内建命令或是外部命令还是都是: $ type -a jobs @@ -182,15 +157,15 @@ Fig.01: 在 shell 中显示 jobs 的状态 jobs is a shell builtin jobs is /usr/bin/jobs -在几乎所有情况下,jobs 命令都是作为 BASH/KSH/POSIX shell 内建命令被实现的。/usr/bin/jobs 命令不能被用在当前 shell 中。/usr/bin/jobs 命令工作在不同的环境中不共享父 bash/ksh 的 shells 来执行作业。 +在几乎所有情况下,你都需要使用 BASH/KSH/POSIX shell 内建的jobs 命令。/usr/bin/jobs 命令不能被用在当前 shell 中。/usr/bin/jobs 命令工作在不同的环境中,并不共享其父 bash/ksh 的 shell 作业。 -------------------------------------------------------------------------------- -via: +via: http://www.cyberciti.biz/faq/unix-linux-jobs-command-examples-usage-syntax/ 作者:Vivek Gite 译者:[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 34d5bfc306acb7965fd000a3454e6db2379696d7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 Jan 2016 13:04:44 +0800 Subject: [PATCH 0861/1710] PUB:20151208 Top 5 open source community metrics to track MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @sonofelice 翻译的不错,语言组织的很好,部分理解错误的专业术语我修正了。 --- ... open source community metrics to track.md | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) rename {translated/tech => published}/20151208 Top 5 open source community metrics to track.md (55%) diff --git a/translated/tech/20151208 Top 5 open source community metrics to track.md b/published/20151208 Top 5 open source community metrics to track.md similarity index 55% rename from translated/tech/20151208 Top 5 open source community metrics to track.md rename to published/20151208 Top 5 open source community metrics to track.md index ac0e26b645..5b616f8116 100644 --- a/translated/tech/20151208 Top 5 open source community metrics to track.md +++ b/published/20151208 Top 5 open source community metrics to track.md @@ -1,62 +1,61 @@ -五大开源社区指标追踪 +衡量开源社区的五大指标 ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-1.png) -如果你决定使用指标来追踪你的免费开源的软件社区。那么问题来了:我应该去追踪哪些指标呢? +如果你想要使用指标来追踪你的自由开源软件(FOSS)的社区。现在就面临着一个问题:我应该去追踪哪些指标呢? -要回答这个问题,你必须知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。一个社区对问题的应对速度有多快。一个社区怎么吸引、维护或者流失贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,免费开源软件社区(FOSS)一些遵从开放式开发模型的项目在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 +要回答这个问题,你必须知道你需要什么信息。比如,你可能想要知道一个项目社区的可持续性。一个社区对问题的应对速度有多快。一个社区怎么吸引、维护或者流失贡献者。一旦你知道需要哪类信息,你就可以找出哪些社区活动可以提供你想要知道的内容。幸运的是,自由开源软件(FOSS)遵从开放式开发模型,在其软件开发仓库里留下了大量的公共数据,我们可以对这些数据进行分析,并从中收集到一些有用的数据。 在这篇文章中,我会介绍一些指标,从而为你的项目社区提供一个多方位的视角分析。 -### 1. 社区活动 ### +### 1. 社区活动(Activity) ### -一个社区的总体活动和这个社区怎样随着时间演变,是度量所有社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过开放的投票数我们可以大概知道提交了多少bug或者又提出了多少新特性。邮件列表的数量或者论坛帖子的数量可以让我们了解到有过多少次公开的讨论。 +一个社区的总体活动和这个社区怎样随着时间演变,是度量所有社区好坏的非常有用的指标。社区活动是评价一个社区工作量的第一印象,也可以用来追踪不同种类的活动。比如,提交次数,给人的第一印象就是跟开发工作量挂钩。通过提出的问题(tickets opened)我们可以大概知道提交了多少 bug 或者又提出了多少新特性。邮件列表中的邮件数量或者论坛帖子的数量可以让我们了解到有过多少次公开讨论。 ![Activity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/activity-metrics.png) -[OpenStack活动看板][1]上面显示的项目代码提交次数和代码评审之后代码合并次数随时间变化的趋势图(周数据) +[OpenStack 活动看板][1]上面显示的项目代码提交次数和代码评审之后代码合并次数随时间变化的趋势图(周数据)。 -### 2. 社区规模 ### +### 2. 社区规模(Size) ### -社区的规模指的是参与到这个社区的人数,但是,基于不同形式的参与人数也有很大的差别。好消息是,通常你只对积极活跃的贡献者比较感兴趣。活跃的贡献者会在项目的仓库留下一些线索。这意味着你可以通过查看git仓库存放的代码中**author**字段来统计积极贡献代码的人数,或者通过看积极参与问题解决的人的得票数来统计活跃人数。 +社区的规模指的是参与到这个社区的人数,但是,基于不同形式的参与人数也有很大的差别。好消息是,通常你只对积极活跃的贡献者比较感兴趣。活跃的贡献者会在项目的仓库留下一些线索。这意味着你可以通过查看git仓库存放的代码中**author**字段来统计积极贡献代码的人数,或者通过看积极参与问题解决的人数来统计活跃人数。 -所谓活跃(某些人做了某些事)可以扩展到很多方面。一种常见的跟踪活动的方式是看有多少人做了工作量相当可观的任务。比如,通常一个项目代码的贡献者是来自这个项目社区的一小部分人。了解了这一小部分人,就对核心的工作组(比如,领导这个社区的人)有一个基本的认识了。 +所谓活动(某些人做了某些事)可以扩展到很多方面。一种常见的跟踪活动的方式是看有多少人做了工作量相当可观的任务。比如,通常一个项目代码的贡献者是来自这个项目社区的一小部分人。了解了这一小部分人,就对核心的工作组(比如,领导这个社区的人)有一个基本的认识了。 ![Size metrics chart](https://opensource.com/sites/default/files/images/business-uploads/size-metrics.png) -[Xen项目开发看板][2]上展示的该项目邮件列表上作者人数和提交人数随时间的变化趋势(每月数据) +[Xen 项目开发看板][2]上展示的该项目邮件列表上作者人数和提交人数随时间的变化趋势(每月数据) -### 3. 社区表现 ### +### 3. 社区表现(Performance) ### +到目前为止,关注点主要集中在活动数量和贡献者数量的统计上了。你也可以分析流程还有用户的表现如何。比如,你可以测量某流程需要多久才能执行完成。解决或者关闭问题的时间可以表明一个需要及时响应的项目对新信息的应对如何,比如修复一个报告过来的 bug 或者实现一个新需求。代码评审花费的时间,即从代码修改提交到被通过的时间,可以看出更新一个提出的改变要达到社区期望的标准需要多久。 -到目前为止,关注点主要集中在活动数量和贡献者数量的统计上了。你也可以分析流程还有用户的表现如何。比如,你可以测量某流程需要多久才能执行完成。解决或者关闭投票的时间可以表明一个需要及时响应的项目对新信息的应对如何,比如修复一个已经提出的bug或者实现一个新需求。代码评审花费的时间,即从代码修改提交到被通过的时间,可以看出更新一个提出的改变要达到社区期望的标准需要多久。 - -其他的一些指标主要与项目处理挂起的工作表现如何有关,比如新的和被关闭投票的比例,或者仍然没有关闭的代码评审的后台日志。这些参数能告诉我们像投入到解决这些问题的资源是否充足这样的一些信息。 +其他的一些指标主要与项目处理挂起的工作表现如何有关,比如新的和被关闭问题的比例,或者仍然没有完成的代码评审的队列。这些参数能告诉我们像投入到解决这些问题的资源是否充足这样的一些信息。 ![Efficiency metrics chart](https://opensource.com/sites/default/files/images/business-uploads/efficiency-metrics.png) -在[2015第三季度OpenStack开发报告][3]上显示的,每季度关闭与打开状态的投票数之比,接受与放弃的改变提案与最新的改变提案之比。 +在[2015第三季度 OpenStack 开发报告][3]上显示的,每季度关闭与打开状态的问题数之比,接受与放弃的改变提案与最新的改变提案之比。 -### 4. 社区人口统计 ### +### 4. 社区人口特征(Demographics) ### -随着贡献者的参与或者退出,社区也在不断改变。社区的年龄(从社区成员加入时算起)取决于随着时间变化,人们怎么加入和退出社区。[社区年龄统计图表][4]很直观的展现了这些改变随时间的变化。图标是由一系列的水平条组成,每两条水平条代表加入到社区的一代人。对于每一代,Attracted水平条表示在相应的时间里有多少人加入到了社区。Retained水平条表示有多少人目前仍然活跃在社区。 +随着贡献者的参与或者退出,社区也在不断改变。随着人们加入和退出社区,社区成员的会龄(从社区成员加入时算起)也各异。[社区会龄统计图表][4]很直观的展现了这些改变随时间的变化。图表是由一系列的水平条组成,每两条水平条代表加入到社区的一代人。对于每一代,吸引力(Attracted)水平条表示在相应的时间里有多少人加入到了社区。活跃度(Retained)水平条表示有多少人目前仍然活跃在社区。 -代表一代人的两个水平条的关系就是滞留比例:依然在这个项目中的那一代人的一部分。Attracted水平条的完整集合表示这个项目在过去有多么受欢迎。Retained水平条的完整集合则表示社区目前的年龄结构。 +代表一代人的两个水平条的关系就是滞留比例:依然在这个项目中的那一代人的一部分。吸引力(Attracted)水平条的完整集合表示这个项目在过去有多么受欢迎。活跃度(Retained)水平条的完整集合则表示社区目前的会龄结构。 ![Demographics metrics chart](https://opensource.com/sites/default/files/images/business-uploads/demography-metrics.png) -[Eclipse开发看板][5]上显示的Eclipse社区的社区年龄表。每六个月定义一次。 +[Eclipse 开发看板][5]上显示的 Eclipse 社区的社区年龄表。每六个月定义一次。 -### 5. 社区多样性 ### +### 5. 社区多样性(Diversity) ### -多样性是一个社区保持弹性的很关键的因素。通常来说,一个社区越具有多样性(人或者组织参与的多元化),那么这个社区的弹性也就越大。比如,如果一个公司要决定离开一个免费开源社区,那么这个公司的员工贡献5%要远比贡献85%所可能引起的潜在问题要小很多。 +多样性是一个社区保持弹性的很关键的因素。通常来说,一个社区越具有多样性(人或者组织参与的多元化),那么这个社区的弹性也就越大。比如,如果一个公司要决定离开一个自由开源社区,那么这个公司的员工贡献5%要远比贡献85%所可能引起的潜在问题要小很多。 -[小马因素][6],是[Daniel Gruno][7] 为“最少的开发者贡献了50%的代码提交量”这一现象定义的术语。基于这一小马因素,大象因素则是指最少量的公司其员工贡献了50%的代码提交量。这两个数据提供了一种指示,即这个社区依赖多少人或者公司。 +[小马因素(Pony Factor)][6],是 [Daniel Gruno][7] 为“最少的开发者贡献了50%的代码提交量”这一现象定义的术语。基于小马因素,大象因素(Elephant Factor)则是指最少量的公司其员工贡献了50%的代码提交量。这两个数据提供了一种指示,即这个社区依赖多少人或者公司。 ![Diversity metrics chart](https://opensource.com/sites/default/files/images/business-uploads/diversity-metrics.png) -[2015开发云数量状态统计][8]显示的在云计算领域的几个免费开源社区项目的小马和大象因素。 +[2015开发云数量状态统计][8]显示的在云计算领域的几个自由开源社区项目的小马和大象因素。 还有许多其他的指标来衡量一个社区。在决定收集哪些指标时,可以考虑一下社区的目标,还有哪些指标能帮到你。 @@ -66,7 +65,7 @@ via: https://opensource.com/business/15/12/top-5-open-source-community-metrics-t 作者:[Jesus M. Gonzalez-Barahona][a] 译者:[sonofelice](https://github.com/sonofelice) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8ccde3a4b74336a1bb3f8f47fb055c3675ad2abd Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 Jan 2016 21:10:01 +0800 Subject: [PATCH 0862/1710] PUB:20151223 How to Setup SSH Login Without Password CentOS or RHEL @fw8899 --- ...H Login Without Password CentOS or RHEL.md | 105 ++++++++++++++++++ ...H Login Without Password CentOS or RHEL.md | 105 ------------------ 2 files changed, 105 insertions(+), 105 deletions(-) create mode 100644 published/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md delete mode 100644 translated/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md diff --git a/published/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/published/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md new file mode 100644 index 0000000000..6f9cb3e793 --- /dev/null +++ b/published/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md @@ -0,0 +1,105 @@ +如何在 CentOS / RHEL 上设置 SSH 免密码登录 +================================================================================ +![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg) + +作为系统管理员,你计划在 Linux 上使用 OpenSSH,完成日常工作的自动化,比如文件传输、备份数据库转储文件到另一台服务器等。为实现该目标,你需要从主机 A 能自动登录到主机 B。自动登录也就是说,要在 shell 脚本中使用ssh,而无需要输入任何密码。 + +本文会告诉你怎样在 CentOS/RHEL 上设置 SSH 免密码登录。自动登录配置好以后,你可以通过它使用 SSH (Secure Shell)和安全复制 (SCP)来移动文件。 + +SSH 是开源的,是用于远程登录的最为可靠的网络协议。系统管理员用它来执行命令,以及通过 SCP 协议在网络上向另一台电脑传输文件。 + +通过配置 SSH 免密码登录,你可以享受到如下的便利: + +- 用脚本实现日常工作的自动化。 +- 增强 Linux 服务器的安全性。这是防范虚拟专用服务器(VPS)遭受暴力破解攻击的一个推荐的方法,SSH 密钥单凭暴力破解是几乎不可攻破的。 + +### 什么是 ssh-keygen ### + +ssh-keygen 是一个用来生成、创建和管理 SSH 认证用的公私钥的工具。通过 ssh-keygen 命令,用户可以创建支持SSH1 和 SSH2 两个协议的密钥。ssh-keygen 为 SSH1 协议创建 RSA 密钥,SSH2 则可以是 RSA 或 DSA。 + +### 什么是 ssh-copy-id ### + +ssh-copy-id 是用来将本地公钥拷贝到远程的 authorized_keys 文件的脚本命令,它还会将身份标识文件追加到远程机器的 ~/.ssh/authorized_keys 文件中,并给远程主机的用户主目录适当的的权限。 + +### SSH 密钥 ### + +SSH 密钥为登录 Linux 服务器提供了更好且安全的机制。运行 ssh-keygen 后,将会生成公私密钥对。你可以将公钥放置到任意服务器,从持有私钥的客户端连接到服务器的时,会用它来解锁。两者匹配时,系统无需密码就能解除锁定。 + +### 在 CentOS 和 RHEL 上设置免密码登录 SSH ### + +以下步骤在 CentOS 5/6/7、RHEL 5/6/7 和 Oracle Linux 6/7 上测试通过。 + +节点1 : 192.168.0.9 +节点2 : 192.168.l.10 + +#### 步骤1 : #### + +测试节点1到节点2的连接和访问: + + [root@node1 ~]# ssh root@192.168.0.10 + The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established. + RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42. + Are you sure you want to continue connecting (yes/no)? yes + Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts. + root@192.168.0.10's password: + Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1 + [root@node2 ~]# + +#### 步骤二: #### + +使用 ssh-key-gen 命令生成公钥和私钥,这里要注意的是可以对私钥进行加密保护以增强安全性。 + + [root@node1 ~]# ssh-keygen + Generating public/private rsa key pair. + Enter file in which to save the key (/root/.ssh/id_rsa): + 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: + b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local + The key's randomart image is: + +--[ RSA 2048]----+ + | . ++ | + | o o o | + | o o o . | + | . o + .. | + | S . . | + | . .. .| + | o E oo.o | + | = ooo. | + | . o.o. | + +-----------------+ + +#### 步骤三: #### + +用 ssh-copy-id 命令将公钥复制或上传到远程主机,并将身份标识文件追加到节点2的 ~/.ssh/authorized_keys 中: + + [root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10 + root@192.168.0.10's password: + Now try logging into the machine, with "ssh '192.168.0.10'", and check in: + + .ssh/authorized_keys + + to make sure we haven't added extra keys that you weren't expecting. + +#### 步骤四: #### + +验证免密码 SSH 登录节点2: + + [root@node1 ~]# ssh root@192.168.0.10 + Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local + +我希望这篇文章能帮助到你,为你提供 SSH 免密码登录 CentOS / RHEL 的基本认知和快速指南。 + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/ssh-login-without-password-centos/ + +作者:[skytech][a] +译者:[fw8899](https://github.com/fw8899) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/skytech/ diff --git a/translated/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/translated/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md deleted file mode 100644 index a806d76491..0000000000 --- a/translated/tech/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md +++ /dev/null @@ -1,105 +0,0 @@ -如何在CentOS / RHEL上设置SSH免密码登录 -================================================================================ -![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg) - -作为系统管理员,你计划在Linux上使用OpenSSHell,完成日常工作的自动化,比如文件传输、备份数据库转储文件到另一台服务器。为实现该目标,你需要从主机A能自动登录到主机B。自动登录也就是说,要在shell脚本中使用ssh,而无需要输入任何密码。 - -本文会告诉你怎样在CentOS/RHEL上设置SSH免密码登录。自动登录配置好以后,你可以在它基础上用SSH (Secure Shell) 和secure copy (SCP)移动文件。 - -SSH是开源的,用于远程登录的最为可靠的网络协议。系统管理员用它来执行命令,以及通过SCP协议在网络上向另一台电脑传输文件。 - -通过配置SSH免密码登录,你可以享受到如下的便利: - -a) 用脚本实现日常工作的自动化。 -b) 增强Linux服务器的安全性。这是防范虚拟专用服务器(VPS)遭受暴力破解攻击的一个推荐的方法,SSH 密钥单凭暴力破解是几乎不可攻破的。 - -### 什么是ssh-keygen ### - -ssh-keygen是Unix实用工具包里的一个命令,用来生成、创建和管理SSH认证用的公私钥。通过ssh-keygen命令,用户可以创建支持SSH1和SSH2的密钥。ssh-keygen为SSH1创建RSA密钥,SSH2则可以是RSA或DSA。 - -### 什么是ssh-copy-id ### - -ssh-copy-id是用来将本地公钥拷贝到远程authorized_keys文件的脚本命令,它还会将身份标识文件追加到远程机器的~/.ssh/authorized_keys文件中,并给远程主机的用户主目录适当的的权限 - -### SSH keys ### - -SSH keys为登录Linux服务器提供了更好且安全的机制。运行ssh-keygen后,将会生成公私密钥对。你可以将公钥放置到任意服务器,从持有私钥的客户端连接到服务器的时,会用它来解锁。两者匹配时,系统无需密码就能解除锁定。 - -### 在CentOS和RHEL上设置免密码登录SSH ### - -以下步骤在CentOS 5/6/7、RHEL 5/6/7和Oracle Linux 6/7上测试通过。 - -节点1 : 192.168.0.9 -节点2 : 192.168.l.10 - -#### 步骤1 : #### - -测试节点1到节点2的连接和访问: - - [root@node1 ~]# ssh root@192.168.0.10 - The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established. - RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42. - Are you sure you want to continue connecting (yes/no)? yes - Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts. - root@192.168.0.10's password: - Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1 - [root@node2 ~]# - -#### 步骤二: #### - -使用ssh-key-gen命令生成公钥和私钥,这里要注意的是可以对私钥进行加密保护以增强安全性。 - - [root@node1 ~]# ssh-keygen - Generating public/private rsa key pair. - Enter file in which to save the key (/root/.ssh/id_rsa): - 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: - b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local - The key's randomart image is: - +--[ RSA 2048]----+ - | . ++ | - | o o o | - | o o o . | - | . o + .. | - | S . . | - | . .. .| - | o E oo.o | - | = ooo. | - | . o.o. | - +-----------------+ - -#### 步骤三: #### - - 用ssh-copy-di命令将公钥复制或上传到远程主机,并将身份标识文件追加到节点2的~/.ssh/authorized_keys中: - - [root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10 - root@192.168.0.10's password: - Now try logging into the machine, with "ssh '192.168.0.10'", and check in: - - .ssh/authorized_keys - - to make sure we haven't added extra keys that you weren't expecting. - -#### 步骤四: #### - -验证免密码SSH登录节点2: - - [root@node1 ~]# ssh root@192.168.0.10 - Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local - -我希望这篇文章能帮助到你,为你提供SSH免密码登录CentOS / RHEL的基本认知和快速指南。 - --------------------------------------------------------------------------------- - -原载: http://www.ehowstuff.com/ssh-login-without-password-centos/ - -作者:[skytech][a] -译者:[fw8899](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.ehowstuff.com/author/skytech/ From ce9804c8aaf5ed99961e3b66ca246dc7ca1e70d7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 Jan 2016 21:27:20 +0800 Subject: [PATCH 0863/1710] PUB:Learn with Linux--Learning to Type @bazz2 --- .../Learn with Linux--Learning to Type.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename {translated/tech/Learn with Linux => published}/Learn with Linux--Learning to Type.md (74%) diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md b/published/Learn with Linux--Learning to Type.md similarity index 74% rename from translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md rename to published/Learn with Linux--Learning to Type.md index 75694225aa..01c2dbc70d 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Learning to Type.md +++ b/published/Learn with Linux--Learning to Type.md @@ -1,36 +1,36 @@ -Linux 教学之教你练打字 +与 Linux 一起学习:学习打字 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-featured.png) -[Linux 学习系列][1]的所有文章: +[与 Linux 一起学习][1]的所有文章: -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] +- [与 Linux 一起学习:学习打字][2] +- [与 Linux 一起学习:物理模拟][3] +- [与 Linux 一起学习:玩音乐][4] +- [与 Linux 一起学习:两款地理软件][5] +- [与 Linux 一起学习: 使用这些 Linux 应用来征服你的数学学习][6] -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 +Linux 提供大量的教学软件和工具,面向各个年级以及不同年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“与 Linux 一起学习”系列就来介绍一些教学软件。 -很多人都要打字,操作键盘已经成为他们的第二天性。 但是这些人中有多少是依然使用两个手指头来快速地按键盘的?即使学校有教我们使用键盘的方法(LCTT 译注:呃。。。),我们也会慢慢地抛弃正确的打字姿势,养成只用两个大拇指玩键盘的习惯。 +很多人都要打字,操作键盘已经成为他们的第二天性。但是这些人中有多少是依然使用两个手指头来快速地按键盘的?即使学校有教我们使用键盘的方法,我们也会慢慢地抛弃正确的打字姿势,养成只用两个大拇指玩键盘的习惯。(LCTT 译注:呃,你确认是拇指而不是食指?) -下面要介绍的两款软件可以帮你掌控你的键盘,然后你就可以让你的手指跟上你的思维,然后你的思维就不会被打断了。当然,还有很多更炫更酷的软件可供选择,但本文所选的这两款是最简单、最容易上手的。 +下面要介绍的两款软件可以帮你掌控你的键盘,然后你就可以让你的手指跟上你的思维,这样你的思维就不会被打断了。当然,还有很多更炫更酷的软件可供选择,但本文所选的这两款是最简单、最容易上手的。 ### TuxType (或者叫 TuxTyping) ### -TuxType 是给小孩子玩的。在一些有趣的游戏中,小学生们可以通过完成一些简单的练习来 get “10个手指打字”的新技能。 +TuxType 是给小孩子玩的。在一些有趣的游戏中,小学生们可以通过完成一些简单的练习来 Get “双手打字以示清白”的新技能。 Debian 及其衍生版本(包含所有 Ubuntu 衍生版本)的标准软件仓库都有 TuxType,使用下面的命令安装: sudo apt-get install tuxtype -软件开始时有一个简单的 Tux 界面和一段难听的 midi 音乐,幸运的是你可以通过右下角的喇叭按钮把声音调低了。(LCTT译注:Tux 就是那只 Linux 吉祥物,Linus 说它的表情被设计成刚喝完啤酒后的满足感,见《Just For Fun》。) +软件开始时有一个简单的 Tux 界面和一段难听的 midi 音乐,幸运的是你可以通过右下角的喇叭按钮把声音调低了。(LCTT 译注:Tux 就是那只 Linux 吉祥物,Linus 说它的表情被设计成刚喝完啤酒后的满足感,见《Just For Fun》。) ![learntotype-tuxtyping-main](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-main.jpg) -最开始处的两个选项“Fish Cascade”和“Comet Zap”是打字游戏,当你开始游戏时,你需要很投入到这个课程。 +最开始处的两个选项“Fish Cascade”和“Comet Zap”是打字游戏,当你开始游戏时,你就投入到了这个课程。 -第3个选项为“Lession”,提供40多个简单的课程,每个课程会增加一个字母让你来练习,练习过程中会给出一些提示,比如应该用哪个手指按键盘上的字母。 +第3个选项为“Lessions”,提供40多个简单的课程,每个课程会增加一个字母让你来练习,练习过程中会给出一些提示,比如应该用哪个手指按键盘上的字母。 ![learntotype-tuxtyping-exd1](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-exd1.jpg) @@ -68,7 +68,7 @@ GNU Typist 也在大多数 Debian 衍生版本的软件库中,运行下面的 ![learntotype-gtype-lesson](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-lesson.png) -在交互练习的过程中,如果你输入错误,会将错误点高亮显示。不会像其他漂亮界面分散你的注意力,你可以专注于练习。每个课程的右下角都有一组统计数据来展示你的表现,如果你犯了很多错误,就可能无法通过关卡了。 +在交互练习的过程中,如果你输入错误,会将错误位置高亮显示。不会像其他漂亮界面分散你的注意力,你可以专注于练习。每个课程的右下角都有一组统计数据来展示你的表现,如果你犯了很多错误,就可能无法通过关卡了。 ![learntotype-gtype-mistake](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-mistake.png) @@ -106,7 +106,7 @@ via: https://www.maketecheasier.com/learn-to-type-in-linux/ 作者:[Attila Orosz][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/) 荣誉推出 @@ -116,4 +116,4 @@ via: 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 +[6]:https://linux.cn/article-6546-1.html \ No newline at end of file From 0f6a6eefb17577574b3e2978761d0218b2da1713 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 17 Jan 2016 21:33:29 +0800 Subject: [PATCH 0864/1710] =?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 --- ...dation--Best Quotes of Richard Stallman.md | 170 ----------------- ...dation--Best Quotes of Richard Stallman.md | 171 ++++++++++++++++++ 2 files changed, 171 insertions(+), 170 deletions(-) delete mode 100644 sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md create mode 100644 translated/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 deleted file mode 100644 index af8bb311db..0000000000 --- a/sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md +++ /dev/null @@ -1,170 +0,0 @@ -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 diff --git a/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md new file mode 100644 index 0000000000..a8d1616106 --- /dev/null +++ b/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md @@ -0,0 +1,171 @@ +30 年自由软件基金会:理查德·斯托曼语录集锦 +================================================================================ +注:youtube 视频 + + +**理查德·马修·斯托曼** (rms) – IT大牛之一。他是一名程序员,GCC、GDB、Emacs 的构建者,软件自由传教士,[GNU Project][1] 和 [FSF][2] 的创办人。 + +**GNU** 是 “GNU’s Not Unix!”的缩写。GNU 是基于 Unix 操作系统的自由计算机软件集合。支持 GNU/Hurd 和 Linux 内核。于1983年9月27日公诸于众。常有组件: + +- 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 + +注:视频 + + +**自由软件基金会** (FSF) – 一个自由软件的非营利组织,致力于计算机用户自由的提升和权力的捍卫。于 1985 年 10 月 4 日成立。阅读[更多][3]。 + +- 于目的无关,随心运行程序的自由(自由0)。 +- 学习程序如何运作,并改变它为你所用的自由(自由1)。可以访问源码是这条的前提。 +- 重新发布副本的自由,如此你便可以帮助你的邻居了 (自由 2)。 +- 发布自己修改版本给他人的自由(自由 3)。这样能让整个社区有机会从你的改变中受益。可以访问源码是这条的前提。 + +以上为自由软件的四项自由原则。 + +以下为理查德·斯托曼关于自由、软件、社交、哲学等的名言摘引。 + +**关于 Facebook:** + +> Facebook 不是你的朋友,是监控引擎。 + +**关于 Android:** + +> Android 和 GNU/Linux 有很大的区别,因为其中几乎没有 GNU。的确,Android 和 GNU/Linux 之间仅有一个共同组件,那就是内核 - Linux。 + +**关于计算机行业:** + +> 计算机行业是唯一一个比时尚女装更被时尚驱动的行业。 + +**关于云计算:** + +> 关于云计算,有趣的是我们已经重新定义了云计算来包含我们曾干的所有事。 + +**关于伦理:** + +> 无论神存在与否,都没有绝对的伦理道德。没有这份理所当然,我们该如何?也唯有尽善吧。 + +**关于自由:** + +> 自由软件是尊重个人自由和社会团结的软件。所以才能如自由般自由自在。 + +**关于目标和理想:** + +> 如果你想为这世界做些什么,仅有理想是不够的,你需要找条通往目标的道路并走完。 + +**关于分享:** + +> 分享很棒,而且数字化技术也使分享变得容易。 + +**关于 facebook(进阶版):** + +> Facebook 蹂躏它们的用户。它不是你们的朋友;它就是个监控引擎。举个例子,你是否曾在一些网页或网站上看到 Facebook 的 “like” 按键。对,Facebook 知道你的电脑曾访问过那些网页。 + +**关于 web 应用:** + +> 给你个为什么不应该使用 web 应用的理由,因为你失去了计算机的控制权。 +> +> 如果你使用私有程序或他人的 web 服务器,那么你只能任人鱼肉。被软件的软件的开发者轻易操纵。 + +**关于书:** + +> 印刷出来的书,当然是自由的。即使你买了别人也不知道,这也是我一直买书的方式。买时不会被任何数据库认出。是亚马逊把自由夺走了。 + +**关于 MPAA:** + +> MPAA 其实是美国电影协会(Motion Picture Association of America),但我认为叫做攻击万物的邪恶力量(Malicious Power Attacking All)更为合适。 + +**关于金钱与职业:** + +> 我可以这样赚钱,并沉浸在编码的快乐中。但在职业生涯结束后,回首目睹自己筑就的高墙将人与人分隔开,我会觉得我耗尽毕生精力只换来了一个更糟糕的世界。 + +**关于私有软件:** + +> 私有软件使用户孤立、无助。因为禁止将软件给他人使用所以孤立,因为无法改变源码所以无助。他们学不了其中正真的工作方式。所以整个私有软件体系就是一种不公的力量。 + +**关于智能手机:** + +> 智能手机就是电脑 - 虽然做的和常用的电脑不同 - 但是却能干电脑能干的活。所以我们所说的一切有关于电脑上的软件应该能自由运行 - 必须坚持 - 在智能手机上也是这样。当然也包括平板。 + +**关于 CD 和数字内容:** + +> CD 商店有一个弱势就是需要昂贵的库存,但是电子商店就没有这方面的需求:他们只需要将售卖的副本写入记忆棒,并在你忘带自己的记忆棒时卖你一个就是了。 + +**关于竞争范式:About paradigm of competition:** + +> 竞争范式就像是赛跑:鼓励每一个跑得更快的人。当资本主义真的这样运作时,当然是件好事;但是维护者若是假设它一直这样运作的话那就大错特错了。 + +**关于 vi 和 emacs:** + +> 有时会有人问我在 Emacs 的阵营使用 vi 是不是一种罪过。使用自由版的 vi 并不是一种罪过;是一种忏悔。所以好好享受其中乐趣吧。 + +**关于自由和历史:** + +> 历史教会我们:珍惜自由,否则你将失去他。“别和我们谈政治”,对听不进的人这就是答复。 + +**关于专利:** + +> 和专利一个一个的战斗并不能解决软件专利带来的危害,就像打再多的蚊子也消灭不了疟疾一样。 +> +> 软件专利对于软件的开发者来说十分危险,因为它们加剧了对于软件理念的垄断。 + +**关于版权:** + +> 其实,版权制度对作者也没有什么好处,撇开最受欢迎的那个,其他作者的主旨可能更好理解,所以分享无论对他们还是你的读者都是一件好事。 + +**关于工作与报酬:** + +> 劳有所得,或寻求收入的最大化并没有什么错,只要不是不择手段。 + +**关于 Chrome OS:** + +> Chrome OS 确实是 GNU/Linux 的操作系统。但是,它在发布时没有安装常用应用,并为安装他们设置了阻碍。 + +**关于 Linux 用户:** + +> 许多的 GNU/Linux 用户并没有听过自由软件。他们并没有意识到,这个系统是因为道德理想才存在的,与此一起被忽视的还有所谓的“开源”。 + +**关于 facebook 的隐私:** + +> 如果页面上有 “like” 按键,Facebook 就能知道谁访问了页面。即使不是 Facebook 的用户,也可以得到访问该页面电脑的 IP 地址。 + +**关于编程:** + +> 编程不是科学,编程是手艺。 +> +> Lisp 和 C 语言是我的最爱。然自 1992 年以来高频的自由软件活动,确实反映了我编的太过匆忙。大概在 2008 年我便停止了编程开发。 +> +> C++ 设计的真糟糕、真丑陋。在 Emacs 上用他应该觉得羞愧。 + +**关于钻研(hacking)和学习编程:** + +> 今时不同往日,大家再也不用走我的老路了,完全可以在实际的操作系统上提升自己。上世纪 80 年代,我常遇见计算机专业的毕业生,自出生以来没见过真正的程序。他们接触的到的只有小玩意和学校的作业,因为每一个程序都是商业机密。他们没有机会去写真正实用的特性,修复用户真正遭遇的问题。做这些事便是你应知晓的最好的提升方式。 +> +> 对于如 hacking 这般多样化的东西真的很难简单的下定义,不过在我看来诸如此类的行为都会有以下的这些共同点:嬉乐、智慧和探索。因此,hacking 意味着对可能的极限的探索,一颗向往快乐与智慧心。能带来快乐与智慧的行为就有 “hack 的价值” 。 + +**关于浏览网页:** + +> 由于个人原因,我不会在我的电脑上浏览网页。(大部分时间处于没有网络连接的状态。)要浏览网页,我需要给守护进程发 mail,然后它会运行 wget 并把页面通过 mail 发还给我。这对我而言已经是最效率了,但那真的比实时慢太多了。 + +**关于音乐共享:** + +> 朋友之间彼此分享音乐,绝不会希望因为系统的一句:禁止私下拷贝!而生分。 + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/fsf-richard-stallman/ + +作者:[Pavlo Rudyi][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/fsf-richard-stallman/ +[1]:http://www.gnu.org/ +[2]:http://www.fsf.org/ +[3]:https://www.fsf.org/about/ \ No newline at end of file From 1503c77a9be608066d1c27945cb75e9baaa25bdc Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sun, 17 Jan 2016 22:21:35 +0800 Subject: [PATCH 0865/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020151126=20Linux=20Foundation=20Explains=20a=20'World=20wit?= =?UTF-8?q?hout=20Linux'=20and=20Open=20Source?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dation Explains a 'World without Linux' and Open Source.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md index 90f8b22e32..c9d08b73bf 100644 --- a/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md +++ b/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md @@ -1,3 +1,5 @@ +GHLandy Translating + Linux Foundation Explains a "World without Linux" and Open Source ================================================================================ > The Linux Foundation responds to questions about its "World without Linux" movies, including what the Internet would be like without Linux and other open source software. @@ -48,4 +50,4 @@ via: http://thevarguy.com/open-source-application-software-companies/linux-found [1]:http://linuxfoundation.org/ [2]:http://www.linuxfoundation.org/world-without-linux [3]:http://thevarguy.com/open-source-application-software-companies/new-linux-foundation-video-highlights-role-open-source-3d -[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc \ No newline at end of file +[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc From ff337778161f56454ed7001876b34987012fa5a9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 Jan 2016 22:45:03 +0800 Subject: [PATCH 0866/1710] PUB:Learn with Linux--Physics Simulation @bazz2 --- .../Learn with Linux--Physics Simulation.md | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) rename {translated/tech/Learn with Linux => published}/Learn with Linux--Physics Simulation.md (66%) diff --git a/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md b/published/Learn with Linux--Physics Simulation.md similarity index 66% rename from translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md rename to published/Learn with Linux--Physics Simulation.md index 273ff72d5a..452ec3a9eb 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Physics Simulation.md +++ b/published/Learn with Linux--Physics Simulation.md @@ -1,22 +1,22 @@ -Linux 教学之物理模拟 +与 Linux 一起学习:物理模拟 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/physics-fetured.jpg) -[Linux 学习系列][1]的所有文章: +[与 Linux 一起学习][1]的所有文章: -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] +- [与 Linux 一起学习:学习打字][2] +- [与 Linux 一起学习:物理模拟][3] +- [与 Linux 一起学习:玩音乐][4] +- [与 Linux 一起学习:两款地理软件][5] +- [与 Linux 一起学习:掌握数学][6] -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 +Linux 提供大量的教学软件和工具,面向各个年级段以及不同年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“与 Linux 一起学习”系列就来介绍一些教学软件。 物理是一个有趣的课题,证据就是任何物理课程都可以用具体的图片演示给你看。能看到物理变化过程是一个很妙的体验,特别是你不需要到教室就能体验到。Linux 上有很多很好的科学软件来为你提供这种美妙感觉,本篇文章只着重介绍其中几种。 ### 1. Step ### -[Step][7] 是一个交互型物理模拟器,KDEEdu[8](KDE 教育)项目的一部分。没人会比它的作者更了解它的作用。在项目官网主页上写着“[Step] 是这样玩的:你放点东西进来,添加一些力(地心引力或者弹簧),然后点击‘模拟’按钮,这款软件就会为你模拟这个物体在真实世界的物理定律影响下的运动状态。你可以改变物体或力的属性(允许在模拟过程中进行修改),然后观察不同属性下产生的现象。Step 可以让你从体验中学习物理!” +[Step][7] 是一个交互型物理模拟器,属于 [KDEEdu][8](KDE 教育)项目的一部分。没人会比它的作者更了解它的作用。在项目官网主页上写着“[Step] 是这样玩的:你放点东西进来,添加一些力(地心引力或者弹簧),然后点击‘模拟(Simulate)’按钮,这款软件就会为你模拟这个物体在真实世界的物理定律影响下的运动状态。你可以改变物体或力的属性(允许在模拟过程中进行修改),然后观察不同属性下产生的现象。Step 可以让你从体验中学习物理!” Step 依赖 Qt 以及其他一些 KDE 所依赖的软件,正是由于像 KDEEdu 之类的项目存在,才使得 KDE 变得如此强大,当然,你可能需要忍受由此带来的庞大的桌面系统。 @@ -30,7 +30,7 @@ Step 有个简单的交互界面,你进去后直接可以进行模拟操作。 ![physics-step-main](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-main.png) -你会发现所有物品在屏幕左边,包括不同的质点,空气,不同形状的物体,弹簧,以及不同的力(见1区域) 。如果你选中一个物体,屏幕右边会出现简短的描述信息(见2区域),以及你创造的世界的介绍(主要介绍这个世界中包含的物体)(见3区域),以及你当前选中的物体的属性(见4区域),以及你的操作历史(见5区域)。 +你会发现所有物品在屏幕左边,包括不同的质点,空气,不同形状的物体,弹簧,以及不同的力(见区域1) 。如果你选中一个物体,屏幕右边会出现简短的描述信息(见区域2),以及你创造的世界的介绍(主要介绍这个世界中包含的物体)(见区域3),以及你当前选中的物体的属性(见区域4),以及你的操作历史(见区域5)。 ![physics-step-parts](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-parts.png) @@ -42,7 +42,7 @@ Step 有个简单的交互界面,你进去后直接可以进行模拟操作。 ![physics-step-simulate3](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-simulate3.png) -想要更多了解 Step,按 F1 键,KDE 帮助中心会打印详细的软件操作手册。 +想要更多了解 Step,按 F1 键,KDE 帮助中心会显示出详细的软件操作手册。 ### 2. Lightspeed ### @@ -50,10 +50,10 @@ Lightspeed 是一个简单的基于 GTK+ 和 OpenGL 的模拟器,可以模拟 受到相对速度影响的现象如下(LCTT 译注:都可以从“光速不变”理论推导出来): -- **洛伦兹收缩** —— 物体看起来变短了 -- **多普乐红移/蓝移** —— 物体的颜色变了 -- **前灯效应** —— 物体的明暗变化(LCTT 译注:当物体接近光速移动时,会在它前进的方向强烈地辐射光子,从这个角度看,物体会变得很亮,相反,从物体背后观察,会发现它很暗) -- **光行差效应** —— 物体扭曲变形了 +- **洛伦兹收缩(The Lorentz contraction)** —— 物体看起来变短了 +- **多普勒红移/蓝移(The Doppler red/blue shift)** —— 物体的颜色变了 +- **前灯效应(The headlight effect)** —— 物体的明暗变化(LCTT 译注:当物体接近光速移动时,会在它前进的方向强烈地辐射光子,从这个角度看,物体会变得很亮,相反,从物体背后观察,会发现它很暗) +- **光行差效应(Optical aberration)** —— 物体扭曲变形了 Lightspeed 有 Debian 的源,执行下面的命令来安装: @@ -75,9 +75,13 @@ Lightspeed 有 Debian 的源,执行下面的命令来安装: ### 特别推荐: Physion ### -Physion 是个非常有趣并且美观的物理模拟软件,比上面介绍的两款软件都好玩好看。可惜在写本文章的时候它的[官网][10]出现问题了,下载页面无法使用。 +Physion 是个非常有趣并且美观的物理模拟软件,比上面介绍的两款软件都好玩好看。 -从他们放在 Youtube 上的视频来看,Physion 还是值得我们下载下来玩玩的。在官网恢复之前,我们只能看看演示视频了。 +可以从它的[官网][10]下载: + +- [Linux][11] + +从他们放在 Youtube 上的视频来看,Physion 还是值得我们下载下来玩玩的。\ 注:youtube 视频 @@ -90,18 +94,19 @@ via: https://www.maketecheasier.com/linux-physics-simulation/ 作者:[Attila Orosz][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/) 荣誉推出 [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/ +[2]:https://linux.cn/article-6902-1.html [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/ +[6]:https://linux.cn/article-6546-1.html [7]:https://edu.kde.org/applications/all/step [8]:https://edu.kde.org/ [9]:http://lightspeed.sourceforge.net/ [10]:http://www.physion.net/ +[11]:http://physion.net/en/downloads/linux/13-physion-linux-x8664/download \ No newline at end of file From 3dc99bc5841404843ea819fd823deeaef76799c1 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 Jan 2016 23:31:12 +0800 Subject: [PATCH 0867/1710] PUB:20151109 How to Install GitLab on Ubuntu or Fedora or Debian @FSSlc --- ...ll GitLab on Ubuntu or Fedora or Debian.md | 59 ++++++++++--------- 1 file changed, 31 insertions(+), 28 deletions(-) rename {translated/tech => published}/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md (62%) diff --git a/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md b/published/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md similarity index 62% rename from translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md rename to published/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md index 524fc1e2c1..7dbeb72f95 100644 --- a/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md +++ b/published/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md @@ -1,12 +1,13 @@ -如何在 Ubuntu / Fedora / Debian 中安装 GitLab +如何在 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 社区版的简单步骤。 + +在 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 所依赖的软件包。我们将安装 `curl`,用以下载我们所需的文件;安装`openssh-server` ,以此来通过 ssh 协议登录到我们的机器上;安装`ca-certificates`,用它来添加 CA 认证;以及 `postfix`,把它作为一个 MTA(Mail Transfer Agent,邮件传输代理)。 -注: 若要安装 GitLab 社区版,我们需要一个至少包含 2 GB 内存和 2 核 CPU 的 linux 机子。 +注: 若要安装 GitLab 社区版,我们需要一个至少包含 2 GB 内存和 2 核 CPU 的 linux 机器。 #### 在 Ubuntu 14 .04/Debian 8.x 中 #### @@ -18,7 +19,7 @@ #### 在 Fedora 22 中 #### -在 Fedora 22 中,由于 `yum` 已经被弃用了,所以默认的包管理器是 `dnf`。为了安装上面那些需要的软件包,我们只需运行下面的 dnf 命令: +在 Fedora 22 中,由于 `yum` 已经被弃用了,默认的包管理器是 `dnf`。为了安装上面那些需要的软件包,我们只需运行下面的 dnf 命令: # dnf install curl openssh-server postfix @@ -26,11 +27,11 @@ ### 2. 打开并开启服务 ### -现在,我们将使用我们默认的 init 系统来打开 sshd 和 postfix 服务。并且我们将使得它们在每次系统启动时被自动开启。 +现在,我们将使用我们默认的初始化系统来打开 sshd 和 postfix 服务。并且我们将使得它们在每次系统启动时被自动开启。 #### 在 Ubuntu 14.04 中 #### -由于 SysVinit 在 Ubuntu 14.04 中作为 init 系统被安装,我们将使用 service 命令来开启 sshd 和 postfix 守护进程: +由于在 Ubuntu 14.04 中安装的是 SysVinit 初始化系统,我们将使用 service 命令来开启 sshd 和 postfix 守护进程: # service sshd start # service postfix start @@ -42,24 +43,24 @@ #### 在 Fedora 22/Debian 8.x 中 #### -鉴于 Fedora 22 和 Debi 8.x 已经用 Systemd 代替了 SysVinit 来作为默认的 init 系统,我们只需运行下面的命令来开启 sshd 和 postfix 服务: +鉴于 Fedora 22 和 Debian 8.x 已经用 Systemd 代替了 SysVinit 来作为默认的初始化系统,我们只需运行下面的命令来开启 sshd 和 postfix 服务: # systemctl start sshd postfix -现在,为了使得它们在每次开机启动时被自动地开启,我们需要运行下面的 systemctl 命令: +现在,为了使得它们在每次开机启动时可以自动运行,我们需要运行下面的 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. + 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. 下载 GitLab ### -现在,我们将使用 curl 从官方的 GitLab 社区版仓库下载二进制安装文件。首先,为了得到所需文件的下载链接,我们需要浏览到该软件仓库的页面。为此,我们需要在运行着相应操作系统的 linux 机子上运行下面的命令。 +现在,我们将使用 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 来下载它。 +由于 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 @@ -67,7 +68,7 @@ #### 在 Debian 8.x 中 #### -与 Ubuntu 类似,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][3] 页面中搜索所需版本的 GitLab,然后点击带有 debian/jessie 标签的链接,这是因为我们运行的是 Debian 8.x。接着,一个新的页面将会出现,然后我们在下载按钮上右击,得到文件的下载链接。最后我们像下面这样使用 curl 来下载该文件。 +与 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 @@ -83,11 +84,11 @@ ### 4. 安装 GitLab ### -在相应的软件源被添加到我们的 linux 机子上之后,现在我们将使用相应 linux 发行版本中的默认包管理器来安装 GitLab 社区版。 +在相应的软件源被添加到我们的 linux 机器上之后,现在我们将使用相应 linux 发行版本中的默认包管理器来安装 GitLab 社区版。 #### 在 Ubuntu 14.04/Debian 8.x 中 #### -要在运行着 Ubuntu 14.04 或 Debian 8.x linux 发行版本的机子上安装 GitLab 社区版,我们只需运行如下的命令: +要在运行着 Ubuntu 14.04 或 Debian 8.x linux 发行版本的机器上安装 GitLab 社区版,我们只需运行如下的命令: # dpkg -i gitlab-ce_8.1.2-ce.0_amd64.deb @@ -95,7 +96,7 @@ #### 在 Fedora 22 中 #### -我们只需执行下面的 dnf 命令来在我们的 Fedora 22 机子上安装 GitLab。 +我们只需执行下面的 dnf 命令来在我们的 Fedora 22 机器上安装 GitLab。 # dnf install gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm @@ -103,7 +104,7 @@ ### 5. 配置和开启 GitLab ### -由于 GitLab 社区版已经成功地安装在我们的 linux 系统中了,接下来我们将要配置和开启它了。为此,我们需要运行下面的命令,这在 Ubuntu、Debian 和 Fedora 发行版本上都一样: +GitLab 社区版已经成功地安装在我们的 linux 系统中了,接下来我们将要配置和开启它了。为此,我们需要运行下面的命令,这在 Ubuntu、Debian 和 Fedora 发行版本上都一样: # gitlab-ctl reconfigure @@ -111,19 +112,19 @@ ### 6. 允许通过防火墙 ### -假如在我们的 linux 机子中已经启用了防火墙程序,为了使得 GitLab 社区版的 web 界面可以通过网络进行访问,我们需要允许 80 端口通过防火墙,这个端口是 GitLab 社区版的默认端口。为此,我们需要运行下面的命令。 +假如在我们的 linux 机器中已经启用了防火墙程序,为了使得 GitLab 社区版的 web 界面可以通过网络进行访问,我们需要允许 80 端口通过防火墙,这个端口是 GitLab 社区版的默认端口。为此,我们需要运行下面的命令。 -#### 在 Iptables 中 #### +#### 在 iptables 中 #### -Ubuntu 14.04 默认安装和使用 Iptables。所以,我们将运行下面的 iptables 命令来打开 80 端口: +Ubuntu 14.04 默认安装和使用的是 iptables。所以,我们将运行下面的 iptables 命令来打开 80 端口: # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT # /etc/init.d/iptables save -#### 在 Firewalld 中 #### +#### 在 firewalld 中 #### -由于 Fedora 22 和 Debian 8.x 默认安装了 systemd,它包含了作为防火墙程序的 firewalld。为了使得 80 端口(http 服务) 能够通过 firewalld,我们需要执行下面的命令。 +由于 Fedora 22 和 Debian 8.x 默认安装了 systemd,它包含了作为防火墙程序的 firewalld。为了使得 80 端口(http 服务) 能够通过 firewalld,我们需要执行下面的命令。 # firewall-cmd --permanent --add-service=http @@ -139,13 +140,13 @@ Ubuntu 14.04 默认安装和使用 Iptables。所以,我们将运行下面的 ![Gitlab Login Screen](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-login-screen.png) -现在,为了登陆进面板,我们需要点击登陆按钮,它将询问我们的用户名和密码。然后我们将输入默认的用户名和密码,即 **root** 和 **5iveL!fe** 。在登陆进控制面板后,我们将被强制要求为我们的 GitLab root 用户输入新的密码。 +现在,为了登录进面板,我们需要点击登录按钮,它将询问我们的用户名和密码。然后我们将输入默认的用户名和密码,即 **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) @@ -153,13 +154,15 @@ Ubuntu 14.04 默认安装和使用 Iptables。所以,我们将运行下面的 ![Creating New Project](http://blog.linoxide.com/wp-content/uploads/2015/10/configuring-git-project.png) -做完这些后,我们将能够使用任何包含基本 git 命令行的 Git 客户端来访问我们的 Git 仓库。我们可以看到在仓库中进行的任何活动,例如创建一个里程碑,管理 issue,合并请求,管理成员,便签,Wiki 等。 +做完这些后,我们将能够使用任何包含基本 git 命令行的 Git 客户端来访问我们的 Git 仓库。我们可以看到在仓库中进行的任何活动,例如创建一个里程碑,管理问题,合并请求,管理成员,便签,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 个用户,但它也可以被扩展到多个活动的服务器上。假如你有任何的问题,建议,回馈,请将它们写在下面的评论框中,以便我们可以提升或更新我们的内容。谢谢! +GitLab 是一个用来管理 git 仓库的很棒的开源 web 应用。它有着漂亮的带有诸多酷炫功能的响应式界面。它还打包有许多酷炫功能,例如管理群组,分发密钥,持续集成,查看日志,广播消息,钩子,系统 OAuth 应用,模板等。(注:OAuth 是一个开放标准,允许用户让第三方应用访问该用户在某一网站上存储的私密的资源(如照片,视频,联系人列表),而无需将用户名和密码提供给第三方应用。--- 摘取自 [维基百科上的 OAuth 词条](https://zh.wikipedia.org/wiki/OAuth)) 它还可以和大量的工具进行交互如 Slack,Hipchat,LDAP,JIRA,Jenkins,有很多类型的钩子和完整的 API。它至少需要 2 GB 的内存和 2 核 CPU 来流畅运行,支持多达 500 个用户,但它也可以被扩展到多个工作服务器上。 + +假如你有任何的问题,建议,回馈,请将它们写在下面的评论框中,以便我们可以提升或更新我们的内容。谢谢! -------------------------------------------------------------------------------- @@ -167,7 +170,7 @@ 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) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ce8bcc3906959aac7c790c734a0fbe688bef2371 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 18 Jan 2016 15:37:15 +0800 Subject: [PATCH 0868/1710] Delete 20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md --- ...o install Ubuntu desktop behind a proxy.md | 62 ------------------- 1 file changed, 62 deletions(-) delete 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 install Ubuntu desktop behind a proxy.md b/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md deleted file mode 100644 index 7ceced012d..0000000000 --- a/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md +++ /dev/null @@ -1,62 +0,0 @@ -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? - -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 From 487f7eb455812a7b1b6a14ee60b5ca2a16231df2 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 18 Jan 2016 15:38:07 +0800 Subject: [PATCH 0869/1710] Create 20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md --- ...o install Ubuntu desktop behind a proxy.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md diff --git a/translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md new file mode 100644 index 0000000000..b7c86609bd --- /dev/null +++ b/translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -0,0 +1,63 @@ + +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 桌面**。 + +其基本思路如下。不是直接使用 Ubuntu 的安装程序开始安装,首先进入 live Ubuntu 桌面,配置代理服务器,最后从 live 桌面手动启动 Ubuntu 的安装程序。以下是程序的安装步骤。 + +从 CD/DVD 或 USB 启动 Ubuntu 桌面后,点击第一个欢迎屏幕上的"Try Ubuntu"。 + +![](https://c1.staticflickr.com/1/586/22195371892_3816ba09c3_c.jpg) + +一旦进入 live Ubuntu 桌面,点击左侧设置图标。 + +![](https://c1.staticflickr.com/1/723/22020327738_058610c19d_c.jpg) + +进入 Network 菜单。 + +![](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] +译者:[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 943a6dc243a32426c19843afc511c9e1004d8c3c Mon Sep 17 00:00:00 2001 From: zpl Date: Mon, 18 Jan 2016 16:44:26 +0800 Subject: [PATCH 0870/1710] [translating] 20151206 Supporting secure DNS in glibc.md --- sources/tech/20151206 Supporting secure DNS in glibc.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151206 Supporting secure DNS in glibc.md b/sources/tech/20151206 Supporting secure DNS in glibc.md index 8933c3c891..0547719a72 100644 --- a/sources/tech/20151206 Supporting secure DNS in glibc.md +++ b/sources/tech/20151206 Supporting secure DNS in glibc.md @@ -1,3 +1,4 @@ +zpl1025 Supporting secure DNS in glibc ======================== From cbdeba1bc57742cdf5a1af768092c3fcd1d4f9d0 Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Mon, 18 Jan 2016 20:04:34 +0800 Subject: [PATCH 0871/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=ADMicrosoft?= =?UTF-8?q?=20and=20Linux--True=20Romance=20or=20Toxic=20Love?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译中Microsoft and Linux--True Romance or Toxic Love --- .../20151126 Microsoft and Linux--True Romance or Toxic Love.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md index 92705b4b5c..8659cd787c 100644 --- a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md +++ b/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md @@ -1,3 +1,4 @@ +sonofelice translating Microsoft and Linux: True Romance or Toxic Love? ================================================================================ Every now and then, you come across a news story that makes you choke on your coffee or splutter hot latte all over your monitor. Microsoft's recent proclamations of love for Linux is an outstanding example of such a story. From dc163f6114e443fb399fc9759f08406194abc9c9 Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 18 Jan 2016 21:52:30 +0800 Subject: [PATCH 0872/1710] =?UTF-8?q?Revert=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 This reverts commit 0f6a6eefb17577574b3e2978761d0218b2da1713. --- ...dation--Best Quotes of Richard Stallman.md | 170 +++++++++++++++++ ...dation--Best Quotes of Richard Stallman.md | 171 ------------------ 2 files changed, 170 insertions(+), 171 deletions(-) create mode 100644 sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md delete mode 100644 translated/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 diff --git a/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md deleted file mode 100644 index a8d1616106..0000000000 --- a/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md +++ /dev/null @@ -1,171 +0,0 @@ -30 年自由软件基金会:理查德·斯托曼语录集锦 -================================================================================ -注:youtube 视频 - - -**理查德·马修·斯托曼** (rms) – IT大牛之一。他是一名程序员,GCC、GDB、Emacs 的构建者,软件自由传教士,[GNU Project][1] 和 [FSF][2] 的创办人。 - -**GNU** 是 “GNU’s Not Unix!”的缩写。GNU 是基于 Unix 操作系统的自由计算机软件集合。支持 GNU/Hurd 和 Linux 内核。于1983年9月27日公诸于众。常有组件: - -- 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 - -注:视频 - - -**自由软件基金会** (FSF) – 一个自由软件的非营利组织,致力于计算机用户自由的提升和权力的捍卫。于 1985 年 10 月 4 日成立。阅读[更多][3]。 - -- 于目的无关,随心运行程序的自由(自由0)。 -- 学习程序如何运作,并改变它为你所用的自由(自由1)。可以访问源码是这条的前提。 -- 重新发布副本的自由,如此你便可以帮助你的邻居了 (自由 2)。 -- 发布自己修改版本给他人的自由(自由 3)。这样能让整个社区有机会从你的改变中受益。可以访问源码是这条的前提。 - -以上为自由软件的四项自由原则。 - -以下为理查德·斯托曼关于自由、软件、社交、哲学等的名言摘引。 - -**关于 Facebook:** - -> Facebook 不是你的朋友,是监控引擎。 - -**关于 Android:** - -> Android 和 GNU/Linux 有很大的区别,因为其中几乎没有 GNU。的确,Android 和 GNU/Linux 之间仅有一个共同组件,那就是内核 - Linux。 - -**关于计算机行业:** - -> 计算机行业是唯一一个比时尚女装更被时尚驱动的行业。 - -**关于云计算:** - -> 关于云计算,有趣的是我们已经重新定义了云计算来包含我们曾干的所有事。 - -**关于伦理:** - -> 无论神存在与否,都没有绝对的伦理道德。没有这份理所当然,我们该如何?也唯有尽善吧。 - -**关于自由:** - -> 自由软件是尊重个人自由和社会团结的软件。所以才能如自由般自由自在。 - -**关于目标和理想:** - -> 如果你想为这世界做些什么,仅有理想是不够的,你需要找条通往目标的道路并走完。 - -**关于分享:** - -> 分享很棒,而且数字化技术也使分享变得容易。 - -**关于 facebook(进阶版):** - -> Facebook 蹂躏它们的用户。它不是你们的朋友;它就是个监控引擎。举个例子,你是否曾在一些网页或网站上看到 Facebook 的 “like” 按键。对,Facebook 知道你的电脑曾访问过那些网页。 - -**关于 web 应用:** - -> 给你个为什么不应该使用 web 应用的理由,因为你失去了计算机的控制权。 -> -> 如果你使用私有程序或他人的 web 服务器,那么你只能任人鱼肉。被软件的软件的开发者轻易操纵。 - -**关于书:** - -> 印刷出来的书,当然是自由的。即使你买了别人也不知道,这也是我一直买书的方式。买时不会被任何数据库认出。是亚马逊把自由夺走了。 - -**关于 MPAA:** - -> MPAA 其实是美国电影协会(Motion Picture Association of America),但我认为叫做攻击万物的邪恶力量(Malicious Power Attacking All)更为合适。 - -**关于金钱与职业:** - -> 我可以这样赚钱,并沉浸在编码的快乐中。但在职业生涯结束后,回首目睹自己筑就的高墙将人与人分隔开,我会觉得我耗尽毕生精力只换来了一个更糟糕的世界。 - -**关于私有软件:** - -> 私有软件使用户孤立、无助。因为禁止将软件给他人使用所以孤立,因为无法改变源码所以无助。他们学不了其中正真的工作方式。所以整个私有软件体系就是一种不公的力量。 - -**关于智能手机:** - -> 智能手机就是电脑 - 虽然做的和常用的电脑不同 - 但是却能干电脑能干的活。所以我们所说的一切有关于电脑上的软件应该能自由运行 - 必须坚持 - 在智能手机上也是这样。当然也包括平板。 - -**关于 CD 和数字内容:** - -> CD 商店有一个弱势就是需要昂贵的库存,但是电子商店就没有这方面的需求:他们只需要将售卖的副本写入记忆棒,并在你忘带自己的记忆棒时卖你一个就是了。 - -**关于竞争范式:About paradigm of competition:** - -> 竞争范式就像是赛跑:鼓励每一个跑得更快的人。当资本主义真的这样运作时,当然是件好事;但是维护者若是假设它一直这样运作的话那就大错特错了。 - -**关于 vi 和 emacs:** - -> 有时会有人问我在 Emacs 的阵营使用 vi 是不是一种罪过。使用自由版的 vi 并不是一种罪过;是一种忏悔。所以好好享受其中乐趣吧。 - -**关于自由和历史:** - -> 历史教会我们:珍惜自由,否则你将失去他。“别和我们谈政治”,对听不进的人这就是答复。 - -**关于专利:** - -> 和专利一个一个的战斗并不能解决软件专利带来的危害,就像打再多的蚊子也消灭不了疟疾一样。 -> -> 软件专利对于软件的开发者来说十分危险,因为它们加剧了对于软件理念的垄断。 - -**关于版权:** - -> 其实,版权制度对作者也没有什么好处,撇开最受欢迎的那个,其他作者的主旨可能更好理解,所以分享无论对他们还是你的读者都是一件好事。 - -**关于工作与报酬:** - -> 劳有所得,或寻求收入的最大化并没有什么错,只要不是不择手段。 - -**关于 Chrome OS:** - -> Chrome OS 确实是 GNU/Linux 的操作系统。但是,它在发布时没有安装常用应用,并为安装他们设置了阻碍。 - -**关于 Linux 用户:** - -> 许多的 GNU/Linux 用户并没有听过自由软件。他们并没有意识到,这个系统是因为道德理想才存在的,与此一起被忽视的还有所谓的“开源”。 - -**关于 facebook 的隐私:** - -> 如果页面上有 “like” 按键,Facebook 就能知道谁访问了页面。即使不是 Facebook 的用户,也可以得到访问该页面电脑的 IP 地址。 - -**关于编程:** - -> 编程不是科学,编程是手艺。 -> -> Lisp 和 C 语言是我的最爱。然自 1992 年以来高频的自由软件活动,确实反映了我编的太过匆忙。大概在 2008 年我便停止了编程开发。 -> -> C++ 设计的真糟糕、真丑陋。在 Emacs 上用他应该觉得羞愧。 - -**关于钻研(hacking)和学习编程:** - -> 今时不同往日,大家再也不用走我的老路了,完全可以在实际的操作系统上提升自己。上世纪 80 年代,我常遇见计算机专业的毕业生,自出生以来没见过真正的程序。他们接触的到的只有小玩意和学校的作业,因为每一个程序都是商业机密。他们没有机会去写真正实用的特性,修复用户真正遭遇的问题。做这些事便是你应知晓的最好的提升方式。 -> -> 对于如 hacking 这般多样化的东西真的很难简单的下定义,不过在我看来诸如此类的行为都会有以下的这些共同点:嬉乐、智慧和探索。因此,hacking 意味着对可能的极限的探索,一颗向往快乐与智慧心。能带来快乐与智慧的行为就有 “hack 的价值” 。 - -**关于浏览网页:** - -> 由于个人原因,我不会在我的电脑上浏览网页。(大部分时间处于没有网络连接的状态。)要浏览网页,我需要给守护进程发 mail,然后它会运行 wget 并把页面通过 mail 发还给我。这对我而言已经是最效率了,但那真的比实时慢太多了。 - -**关于音乐共享:** - -> 朋友之间彼此分享音乐,绝不会希望因为系统的一句:禁止私下拷贝!而生分。 - --------------------------------------------------------------------------------- - -via: https://tlhp.cf/fsf-richard-stallman/ - -作者:[Pavlo Rudyi][a] -译者:[martin2011qi](https://github.com/martin2011qi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://tlhp.cf/fsf-richard-stallman/ -[1]:http://www.gnu.org/ -[2]:http://www.fsf.org/ -[3]:https://www.fsf.org/about/ \ No newline at end of file From 75cee609a6500ab06d13f1bcd27a6e3058448b7b Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 18 Jan 2016 21:54:20 +0800 Subject: [PATCH 0873/1710] =?UTF-8?q?=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 --- ...dation--Best Quotes of Richard Stallman.md | 172 ------------------ ...dation--Best Quotes of Richard Stallman.md | 171 +++++++++++++++++ 2 files changed, 171 insertions(+), 172 deletions(-) delete mode 100644 sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md create mode 100644 translated/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 deleted file mode 100644 index e7dbefff62..0000000000 --- a/sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md +++ /dev/null @@ -1,172 +0,0 @@ -For my dear RMS - -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/ diff --git a/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md new file mode 100644 index 0000000000..a8d1616106 --- /dev/null +++ b/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md @@ -0,0 +1,171 @@ +30 年自由软件基金会:理查德·斯托曼语录集锦 +================================================================================ +注:youtube 视频 + + +**理查德·马修·斯托曼** (rms) – IT大牛之一。他是一名程序员,GCC、GDB、Emacs 的构建者,软件自由传教士,[GNU Project][1] 和 [FSF][2] 的创办人。 + +**GNU** 是 “GNU’s Not Unix!”的缩写。GNU 是基于 Unix 操作系统的自由计算机软件集合。支持 GNU/Hurd 和 Linux 内核。于1983年9月27日公诸于众。常有组件: + +- 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 + +注:视频 + + +**自由软件基金会** (FSF) – 一个自由软件的非营利组织,致力于计算机用户自由的提升和权力的捍卫。于 1985 年 10 月 4 日成立。阅读[更多][3]。 + +- 于目的无关,随心运行程序的自由(自由0)。 +- 学习程序如何运作,并改变它为你所用的自由(自由1)。可以访问源码是这条的前提。 +- 重新发布副本的自由,如此你便可以帮助你的邻居了 (自由 2)。 +- 发布自己修改版本给他人的自由(自由 3)。这样能让整个社区有机会从你的改变中受益。可以访问源码是这条的前提。 + +以上为自由软件的四项自由原则。 + +以下为理查德·斯托曼关于自由、软件、社交、哲学等的名言摘引。 + +**关于 Facebook:** + +> Facebook 不是你的朋友,是监控引擎。 + +**关于 Android:** + +> Android 和 GNU/Linux 有很大的区别,因为其中几乎没有 GNU。的确,Android 和 GNU/Linux 之间仅有一个共同组件,那就是内核 - Linux。 + +**关于计算机行业:** + +> 计算机行业是唯一一个比时尚女装更被时尚驱动的行业。 + +**关于云计算:** + +> 关于云计算,有趣的是我们已经重新定义了云计算来包含我们曾干的所有事。 + +**关于伦理:** + +> 无论神存在与否,都没有绝对的伦理道德。没有这份理所当然,我们该如何?也唯有尽善吧。 + +**关于自由:** + +> 自由软件是尊重个人自由和社会团结的软件。所以才能如自由般自由自在。 + +**关于目标和理想:** + +> 如果你想为这世界做些什么,仅有理想是不够的,你需要找条通往目标的道路并走完。 + +**关于分享:** + +> 分享很棒,而且数字化技术也使分享变得容易。 + +**关于 facebook(进阶版):** + +> Facebook 蹂躏它们的用户。它不是你们的朋友;它就是个监控引擎。举个例子,你是否曾在一些网页或网站上看到 Facebook 的 “like” 按键。对,Facebook 知道你的电脑曾访问过那些网页。 + +**关于 web 应用:** + +> 给你个为什么不应该使用 web 应用的理由,因为你失去了计算机的控制权。 +> +> 如果你使用私有程序或他人的 web 服务器,那么你只能任人鱼肉。被软件的软件的开发者轻易操纵。 + +**关于书:** + +> 印刷出来的书,当然是自由的。即使你买了别人也不知道,这也是我一直买书的方式。买时不会被任何数据库认出。是亚马逊把自由夺走了。 + +**关于 MPAA:** + +> MPAA 其实是美国电影协会(Motion Picture Association of America),但我认为叫做攻击万物的邪恶力量(Malicious Power Attacking All)更为合适。 + +**关于金钱与职业:** + +> 我可以这样赚钱,并沉浸在编码的快乐中。但在职业生涯结束后,回首目睹自己筑就的高墙将人与人分隔开,我会觉得我耗尽毕生精力只换来了一个更糟糕的世界。 + +**关于私有软件:** + +> 私有软件使用户孤立、无助。因为禁止将软件给他人使用所以孤立,因为无法改变源码所以无助。他们学不了其中正真的工作方式。所以整个私有软件体系就是一种不公的力量。 + +**关于智能手机:** + +> 智能手机就是电脑 - 虽然做的和常用的电脑不同 - 但是却能干电脑能干的活。所以我们所说的一切有关于电脑上的软件应该能自由运行 - 必须坚持 - 在智能手机上也是这样。当然也包括平板。 + +**关于 CD 和数字内容:** + +> CD 商店有一个弱势就是需要昂贵的库存,但是电子商店就没有这方面的需求:他们只需要将售卖的副本写入记忆棒,并在你忘带自己的记忆棒时卖你一个就是了。 + +**关于竞争范式:About paradigm of competition:** + +> 竞争范式就像是赛跑:鼓励每一个跑得更快的人。当资本主义真的这样运作时,当然是件好事;但是维护者若是假设它一直这样运作的话那就大错特错了。 + +**关于 vi 和 emacs:** + +> 有时会有人问我在 Emacs 的阵营使用 vi 是不是一种罪过。使用自由版的 vi 并不是一种罪过;是一种忏悔。所以好好享受其中乐趣吧。 + +**关于自由和历史:** + +> 历史教会我们:珍惜自由,否则你将失去他。“别和我们谈政治”,对听不进的人这就是答复。 + +**关于专利:** + +> 和专利一个一个的战斗并不能解决软件专利带来的危害,就像打再多的蚊子也消灭不了疟疾一样。 +> +> 软件专利对于软件的开发者来说十分危险,因为它们加剧了对于软件理念的垄断。 + +**关于版权:** + +> 其实,版权制度对作者也没有什么好处,撇开最受欢迎的那个,其他作者的主旨可能更好理解,所以分享无论对他们还是你的读者都是一件好事。 + +**关于工作与报酬:** + +> 劳有所得,或寻求收入的最大化并没有什么错,只要不是不择手段。 + +**关于 Chrome OS:** + +> Chrome OS 确实是 GNU/Linux 的操作系统。但是,它在发布时没有安装常用应用,并为安装他们设置了阻碍。 + +**关于 Linux 用户:** + +> 许多的 GNU/Linux 用户并没有听过自由软件。他们并没有意识到,这个系统是因为道德理想才存在的,与此一起被忽视的还有所谓的“开源”。 + +**关于 facebook 的隐私:** + +> 如果页面上有 “like” 按键,Facebook 就能知道谁访问了页面。即使不是 Facebook 的用户,也可以得到访问该页面电脑的 IP 地址。 + +**关于编程:** + +> 编程不是科学,编程是手艺。 +> +> Lisp 和 C 语言是我的最爱。然自 1992 年以来高频的自由软件活动,确实反映了我编的太过匆忙。大概在 2008 年我便停止了编程开发。 +> +> C++ 设计的真糟糕、真丑陋。在 Emacs 上用他应该觉得羞愧。 + +**关于钻研(hacking)和学习编程:** + +> 今时不同往日,大家再也不用走我的老路了,完全可以在实际的操作系统上提升自己。上世纪 80 年代,我常遇见计算机专业的毕业生,自出生以来没见过真正的程序。他们接触的到的只有小玩意和学校的作业,因为每一个程序都是商业机密。他们没有机会去写真正实用的特性,修复用户真正遭遇的问题。做这些事便是你应知晓的最好的提升方式。 +> +> 对于如 hacking 这般多样化的东西真的很难简单的下定义,不过在我看来诸如此类的行为都会有以下的这些共同点:嬉乐、智慧和探索。因此,hacking 意味着对可能的极限的探索,一颗向往快乐与智慧心。能带来快乐与智慧的行为就有 “hack 的价值” 。 + +**关于浏览网页:** + +> 由于个人原因,我不会在我的电脑上浏览网页。(大部分时间处于没有网络连接的状态。)要浏览网页,我需要给守护进程发 mail,然后它会运行 wget 并把页面通过 mail 发还给我。这对我而言已经是最效率了,但那真的比实时慢太多了。 + +**关于音乐共享:** + +> 朋友之间彼此分享音乐,绝不会希望因为系统的一句:禁止私下拷贝!而生分。 + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/fsf-richard-stallman/ + +作者:[Pavlo Rudyi][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/fsf-richard-stallman/ +[1]:http://www.gnu.org/ +[2]:http://www.fsf.org/ +[3]:https://www.fsf.org/about/ \ No newline at end of file From b9b6629a9194851fc1e16f57bb518c2a375f8a72 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 18 Jan 2016 23:23:24 +0800 Subject: [PATCH 0874/1710] PUB:20151223 Ten Biggest Linux Stories Of The Year 2015 @StdioA --- ... Biggest Linux Stories Of The Year 2015.md | 127 ++++++++++++++++++ ... Biggest Linux Stories Of The Year 2015.md | 125 ----------------- 2 files changed, 127 insertions(+), 125 deletions(-) create mode 100644 published/20151223 Ten Biggest Linux Stories Of The Year 2015.md delete mode 100644 translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md diff --git a/published/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/published/20151223 Ten Biggest Linux Stories Of The Year 2015.md new file mode 100644 index 0000000000..0a844a4cd7 --- /dev/null +++ b/published/20151223 Ten Biggest Linux Stories Of The Year 2015.md @@ -0,0 +1,127 @@ +2015年 Linux 世界的十个大事件 +====================== + +![2015年的大事件](http://itsfoss.com/wp-content/uploads/2015/12/Biggest-Linux-Stories-2015.jpg) + +2015年已经过去,我在这里(It's FOSS)发表《2015年的大事件》系列。这个系列的第一篇文章为《2015年 Linux 世界的十个大事件》。这些事件在 Linux 世界中产生了极大的影响,无论它们是积极的还是消极的。 + +我总结了2015发生的十件产生了最大影响的事件。让我们来看看: + +### 2015年度十大 Linux /开源相关事件 + +补充一句,以下这些事件没有按照时间顺序排列。 + +#### 微软与 Linux 的结盟 + +在9月下旬,所有人听到[微软构建了自己的 Linux 发行版][1]这个消息时都大吃一惊。其在后来被揭露,这其实是一个微软开发的用于它的 Azure cloud switches 的[软件][2]。 + +但故事还没结束。微软真的与 Canonical(Ubuntu Linux 的母公司)达成合作来开发 [HDInsight][3],这是微软在 Azure 上构建的 Hadoop 大数据服务。 Ubuntu 是[微软在其上部署应用][4]的第一个 Linux 系统。 + +微软会继续保持它与 Linux 的关系吗? 还是在使用 Linux 达到其目的(Azure)就会收手?只有时间能告诉我们一切。 + +#### 微软发布适用于 Linux 的 Visual Studio Code + +在微软发布 Linux 发行版引起喧嚣之前,微软扔下了另一枚炸弹——发布 [Linux 版 Visual Studio Code][27], 与其一并发布的还有 Windows 版以及 OS X 版。尽管 Visual Studio Code 并不是开源的,从某种意义上讲,发布 Linux 版本仍然是 Linux 用户的胜利。(LCTT 译注:此处原文消息有误,[Visual Studio Code 已开源][28]。)无论如何,Linus Torvalds 曾说过一句很著名的话:“如果微软给 Linux 开发过一款应用的话,这就意味着我已经赢了”。 + +你可以看这个教程来学习[如何在 Ubuntu 中安装 Visual Studio Code][5]。 + +#### 苹果公司开源编程语言 Swift + +在向 Linux 及开源“示爱”方面,苹果公司也不甘示弱。苹果用来制作 iOS 应用的首选编程语言 Swift,[现已开源][6]并移植到 Linux 中。虽然其还在测试中,但你已经可以轻易地[在 Ubuntu 中安装 Swift][7]。 + +但是,苹果就是苹果,它[开始吹嘘][8]其为“第一个视开源开发为公司关键的软件开发策略的计算机公司巨头(原文如此)”。 + +#### Ubuntu 手机终于发布 + +Ubuntu 手机终于在今年年初发布。因其早期使用者及开发者,Ubuntu 深受 Ubuntu 社区喜爱。主流智能机用户仍然回避它,主要是[因为该系统还在重度开发中][9]。对于 Ubuntu 手机的问世,2016年将成为决定性的一年。 + +#### Jolla 遭受经济危机 + +Jolla 是 Sailfish OS 这个基于 Linux 的智能手机系统的幕后公司,它遭受了严重的财政困难。这导致了[一半的Jolla 员工被裁][10]。 + +Jolla 在2014年针对它的平板电脑完成了一次非常[成功的众筹][11],显然,他们将大部分预算都花在了 Sailfish OS 的开发上,而在主要投资者退出后,公司正在挣扎以求生存。 + +不过有一个好消息,Jolla 成功拿到了一些雄厚的资金,而且他们[已经继续运营了][12]。 + +#### Firefox OS 已死 + +作为安卓的开源替代品,Mozila 的移动操作系统 Firefox OS 在去年底慢性死亡。本打算在发展中国家售卖低至25美金的智能手机,可基于 Firefox OS 的手机却一直没有流行起来。我认为主要原因是它的硬件配置不高,以及它缺少流行应用。 + +在十二月,[Mozilla 宣布][13]其将停止开发 Firefox OS,并停止出售 Firefox 智能手机。 + +虽然没有正式宣布过,我认为 [Tizen][14],这个 Linux 基金会旗下的基于 Linux 的移动操作系统,也已经消失了。我没有看到任何关于 Tizen 开发的消息,而且 Linux 基金会从未推动过它的开发。Tizen 何时死亡只是一个时间问题。(LCTT 译注:此处原文消息有误,[Tizen 在2015年发布了 3.0 版本][29]。) + +#### “Ubuntu 家族”内讧 + +五月份时,Kubuntu 项目的领导者 Jonathan Riddell [被 Ubuntu 社区委员会强制要求下台][15],这引起了很多激烈的讨论。Jonathan 曾质问 Ubuntu 所收捐款的使用情况,他抱怨 Kubuntu 从未见到过这些钱。 + +这导致了两方的互相谴责。最终。Ubuntu 的大老板,[Mark Shuttleworth 要求 Jonathan 下台][16]。 + +#### 女性 Linux 内核开发者因“野蛮的沟通方式”而退出 + +Linux 之父 Linus Torvalds 以其粗俗的语言而著称。Linux 内核开发者 [Sarah Sharp][17] 也因为嘴快心直而闻名。 + +Sarah Sharp 曾在2013年与 Linus Torvalds 公开争执,[建议 Linus 将“语言暴力”赶出邮件列表][18]。但 Linus 也没有[委婉地][19]回复她。 + +那是在2013年。2015年,Sarah 宣布她正在[逐步停止她在内核社区的工作][20],因为他们的交流方式缺乏基本礼仪,并且野蛮而充满亵渎。 + +这一举动让人们开始讨论 Linux 内核社区是否真的应该改变他们的行为方式,还是 Sarah 做的太过分了。 + +#### Unity 游戏编辑器移植到 Linux平台 + +尽管[在 Linux 上玩游戏][21]仍是 Linux 用户们的阿克琉斯之踵,而在游戏引擎 Unity 宣布其正在测试[Linux 下的游戏编辑器][22]时整个社区都沸腾了。因为在渲染图像时,Linux 是一个最流行的选择,所以我们推测这将使游戏开发者向 Linux 靠拢。不过,Unity 是否真的会推出一个最终版本的游戏编辑器,这个问题还未被证实。 + +#### 政府机构采用开源软件 + +欧洲数个城市的管理机构决定[抛弃先前的软件][23],并使用其开源的替代品。大多数城市管理机构将 Microsoft Office 替换为 LibreOffice 或 OpenOffice. 一些城市管理机构和[公立学校][24]也在跟进,将 Microsoft Windows 换成 Linux。 + +对于这一行为,削减成本是一个重要的因素,因为城市管理机构通过采用开源软件省下了无数欧元。 + +大学也并没有在采用开源软件的道路上落后。这一年,我们听到了[大学如何抛弃 Photoshop 改用 Krita][25] 以及[大学使用开源 Office 软件][26]的消息。 + +### 总结 + +与其他年一样,2015年同样有许多令 Linux 爱好者感到积极或消极的时刻。我们看到 Linux 的竞争者,如微软和苹果,向 Linux 靠拢,政府机构采用开源软件。同时,我们还见证了 Firefox 智能手机系统的失败。我想说,这真是喜忧参半的一年。 + +你认为呢?我希望你们分享你所认为对于 Linuxer 们来说最重要的新闻,和你们对这一年的整体感受。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/biggest-linux-stories-2015/ + +作者:[Abhishek][a] +译者:[StdioA](https://github.com/StdioA) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://itsfoss.com/author/abhishek/ +[1]: https://linux.cn/article-6269-1.html +[2]: http://arstechnica.com/information-technology/2015/09/microsoft-has-built-software-but-not-a-linux-distribution-for-its-software-switches/ +[3]: https://azure.microsoft.com/en-us/services/hdinsight/ +[4]: http://www.zdnet.com/article/microsoft-deploys-first-major-server-application-on-ubuntu-linux/ +[5]: https://linux.cn/article-5423-1.html +[6]: https://linux.cn/article-6689-1.html +[7]: https://linux.cn/article-6781-1.html +[8]: https://business.facebook.com/itsfoss/photos/pb.115098615297581.-2207520000.1450817108./634288916711879/?type=3&theater +[9]: http://www.engadget.com/2015/07/24/ubuntu-phone-review/ +[10]: https://linux.cn/article-6621-1.html +[11]: https://www.indiegogo.com/projects/jolla-tablet-world-s-first-crowdsourced-tablet#/ +[12]: https://linux.cn/article-6757-1.html +[13]: https://linux.cn/article-6800-1.html +[14]: https://www.tizen.org/ +[15]: https://linux.cn/article-5529-1.html +[16]: http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html +[17]: http://sarah.thesharps.us/ +[18]: http://www.techeye.net/chips/linus-torvalds-and-intel-woman-in-sweary-spat +[19]: http://marc.info/?l=linux-kernel&m=137392506516022&w=2 +[20]: https://linux.cn/article-6361-1.html +[21]: https://linux.cn/article-6258-1.html +[22]: http://itsfoss.com/unity-gaming-engine-linux/ +[23]: https://linux.cn/article-6459-1.html +[24]: http://itsfoss.com/spanish-school-ditches-windows-ubuntu/ +[25]: http://itsfoss.com/french-university-dumps-adobe-photoshop-open-source-app-krita/ +[26]: http://itsfoss.com/hungarian-universities-switch-eurooffice/ +[27]: https://linux.cn/article-5376-1.html +[28]: https://linux.cn/article-6604-1.html +[29]: https://linux.cn/article-6261-1.html diff --git a/translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md deleted file mode 100644 index 90c8f2f6a7..0000000000 --- a/translated/talk/20151223 Ten Biggest Linux Stories Of The Year 2015.md +++ /dev/null @@ -1,125 +0,0 @@ -# 2015年度十大Linux事件 - -![2015年的大事件](http://itsfoss.com/wp-content/uploads/2015/12/Biggest-Linux-Stories-2015.jpg) - -2015年即将结束,我在这里(It's FOSS)发表《2015年的大事件》系列。这个系列的第一篇文章为《2015十大Linux事件》。这些事件在Linux世界中产生了极大的影响,无论它们是积极的还是消极的。 - -我总结了2015发生的十个像这样——产生了最大影响的事件。黑喂狗! - -### 2015年度十大Linux/开源相关事件 - -补充一句,以下这些项目没有按照时间顺序排列。 - -#### 微软与Linux的结盟 - -在9月下旬,所有人听到[微软构建了自己的Linux发行版][1]这个消息时都大吃一惊。其在后来被揭露,这其实是一个微软开发的用于`Azur cloud switches`的[软件][2]。 - -但故事还没结束。微软真的与Canonical (Ubuntu Linux的母公司)达成合作 来开发[HDInsight][3]——微软在通过Azure上构建Hadoop来进行大数据处理的服务. Ubuntu是[微软在其上部署软件][4]的第一个Linux系统。 - -微软会继续保持它与Linux的关系吗? 还是在使用Linux达到其目的(Azur)就会收手?只有时间能告诉我们一切。 - -#### 微软发布适用于Linux的Visual Studio Code - -在微软发布Linux发行版引起喧嚣之前,微软扔下了另一枚炸弹——发布Linux版Visual Studio Code, 与其一并发布的还有Windows以及OS X版。尽管Visual Studio Code并不是开源的,从某种意义上讲,发布Linux版本仍然是Linux用户的胜利。 无论如何,Linus Torvalds曾说过一句很著名的话:“如果微软给Linux开发过一款应用的话,这就意味着我已经赢了”。 - -你可以看这个教程来学习[如何在Ubuntu中安装Visual Studio Code][5]。 - -#### 苹果公司开源编程语言Swift - -在向Linux及开源“示爱”方面,苹果公司也不甘示弱。苹果用来制作iOS应用的首选编程语言Swift, [现已开源][6]并移植到Linux中。虽然其还在测试中,但你可以轻易地[在Ubuntu中安装Swift][7]。 - -但是,苹果就是苹果,它[开始吹嘘][8]其为“第一个视开源开发为公司的关键软件开发策略的计算机公司巨头(原文如此)”。 - -#### Ubuntu手机终于发布 - -Ubuntu手机终于在今年年初发布。 因其早期使用者及开发者,Ubuntu深受Ubuntu社区喜爱。主流智能机用户仍然回避它,主要[因为该系统还在大规模开发中][9]。对于Ubuntu手机的问世,2016年将成为决定性的一年。 - -#### Jolla遭受经济危机 - -Jolla, Sailfish OS —— 以Linux为基础的智能手机系统的幕后公司,遭受了严重的财政障碍。这导致了[一半的Jolla员工罢工][10]。 - -Jolla在2014年针对它的平板电脑完成了一次非常[成功的众筹][11],显然,他们将大部分预算都花在了Sailfish OS的开发上,而在主要投资者退出后,公司在挣扎以求生存。 - -不过有一个好消息,Jolla成功拿到了一些雄厚的资金,而且他们已[回归经营生意][12]。 - -#### Firefox OS已死 - -作为安卓的开源替代品,Mozila的移动操作系统Firefox OS在这个月初慢性死亡。本打算在发展中国家售卖低至25美金的智能手机,可Firefox OS永远没有流行起来。我认为主要原因是它的硬件廉价,以及它缺少流行应用。 - -在十二月,[Mozilla宣布][13]其将停止开发Firefox OS, 并停止出售Firefox智能手机。 - -我认为[Tizen][14], Linux基金会旗下的基于Linux的移动操作系统,也已经消失了,尽管其从未发布过。我没有看到任何关于Tizen开发的消息,而且Linux基金会从未推动过它的开发。Tizen何时死亡只是一个时间问题。 - -#### “Ubuntu家族”内讧 - -今年五月,Jonathan Riddell,Kubuntu项目的领导者,[被Ubuntu社区委员会强制要求下台][15],这引起了很多激烈的讨论。Jonathan曾质问Ubuntu所收捐款的使用情况,他抱怨Kubuntu从未见到过这些钱。 - -这导致了两方的互相谴责。最终。Ubuntu的老爹,[Mark Shuttleworth要求Jonathan下台][16]。 - -#### 女性Linux内核开发者因“野蛮的沟通方式”而退出 - -Linux之父Linus Torvalds因其粗俗的语言而著称。Linux内核开发者[Sarah Sharp][17]也因为嘴快心直而著称。 - -Sarah Sharp曾在2013年与Linus Torvalds公开争执,[建议Linus将“语言暴力”赶出邮件列表][18]。Linus也没有[委婉地][19]回复她。 - -那是在2013年。2015年,Sarah宣布她正在[逐步停止她在内核社区的工作][20]因为他们的交流方式缺乏基本礼仪,并且野蛮而充满亵渎。 - -这一举动让人们开始讨论Linux内核社区是否真的应该改变他们的行为方式,还是Sarah做的太过分了。 - -#### Unity游戏编辑器移植到Linux平台 - -尽管[在Linux上玩游戏][21]认识Linux用户们的阿克琉斯之踵,整个社区在游戏引擎Unity宣布其正在测试[Linux下的游戏编辑器][22]时都沸腾了。因为在渲染图像时,Linux是一个最流行的选择,所以我们推测这将使游戏开发者向Linux靠拢。不过,Unity是否真的会推出一个最终版本的游戏编辑器,这个问题还未被证实。 - -#### 政府机构采用开源软件 - -欧洲数个城市的管理机构决定[抛弃先前的软件][23],并使用其开源的替代品。大多数城市管理机构将Microsoft Office替换为LibreOffice或OpenOffice. 一些城市管理机构和[公立学校][24]也跟进,将Microsoft Windows换成Linux. - -对于这一行为,削减成本是一个重要的因素,因为城市管理机构通过采用开源软件省下了无数欧元。 - -大学也并没有在采用开源软件的道路上落后。这一年,我们听到了[大学如何抛弃Photoshop改用Krita][25]以及[大学使用开源Office软件][26]的消息。 - -### 总结 - -与其他年一样,2015年同样有许多另Linux爱好者感到积极或消极的时刻。我们看到Linux的竞争者,如微软和苹果,向Linux靠拢,政府机构采用开源软件。同时,我们特见证了Firefox智能手机系统的失败。我想说,这真是喜忧参半的一年。 - -你认为呢?我希望你们分享你们所认为对于Linuxer们来说最重要的新闻,和你们对这一年的整体感受。 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/biggest-linux-stories-2015/ - -作者:[Abhishek][a] - -译者:[ StdioA](https://github.com/StdioA) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://itsfoss.com/author/abhishek/ -[1]: http://www.theregister.co.uk/2015/09/18/microsoft_has_developed_its_own_linux_repeat_microsoft_has_developed_its_own_linux/ -[2]: http://arstechnica.com/information-technology/2015/09/microsoft-has-built-software-but-not-a-linux-distribution-for-its-software-switches/ -[3]: https://azure.microsoft.com/en-us/services/hdinsight/ -[4]: http://www.zdnet.com/article/microsoft-deploys-first-major-server-application-on-ubuntu-linux/ -[5]: http://itsfoss.com/install-visual-studio-code-ubuntu/ -[6]: http://itsfoss.com/swift-open-source-linux/ -[7]: http://itsfoss.com/use-swift-linux/ -[8]: https://business.facebook.com/itsfoss/photos/pb.115098615297581.-2207520000.1450817108./634288916711879/?type=3&theater -[9]: http://www.engadget.com/2015/07/24/ubuntu-phone-review/ -[10]: http://techcrunch.com/2015/11/20/jolla-running-out-of-runway-for-its-android-alternative/ -[11]: https://www.indiegogo.com/projects/jolla-tablet-world-s-first-crowdsourced-tablet#/ -[12]: https://blog.jolla.com/jolla-back-business/ -[13]: http://arstechnica.com/gadgets/2015/12/firefox-os-smartphones-are-dead/ -[14]: https://www.tizen.org/ -[15]: http://www.omgubuntu.co.uk/2015/05/kubuntu-project-lead-asked-to-step-down-by-ubuntu-community-council -[16]: http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html -[17]: http://sarah.thesharps.us/ -[18]: http://www.techeye.net/chips/linus-torvalds-and-intel-woman-in-sweary-spat -[19]: http://marc.info/?l=linux-kernel&m=137392506516022&w=2 -[20]: http://www.networkworld.com/article/2988850/opensource-subnet/linux-kernel-dev-sarah-sharp-quits-citing-brutal-communications-style.html -[21]: http://itsfoss.com/linux-gaming-guide/ -[22]: http://itsfoss.com/unity-gaming-engine-linux/ -[23]: http://itsfoss.com/tag/open-source-adoption/ -[24]: http://itsfoss.com/spanish-school-ditches-windows-ubuntu/ -[25]: http://itsfoss.com/french-university-dumps-adobe-photoshop-open-source-app-krita/ -[26]: http://itsfoss.com/hungarian-universities-switch-eurooffice/ From 119d9c3efdc914791efbfa272a858c7e1e144373 Mon Sep 17 00:00:00 2001 From: GHLandy Date: Tue, 19 Jan 2016 13:52:13 +0800 Subject: [PATCH 0875/1710] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B7=B2=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E7=9A=84=E5=8E=9F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...a 'World without Linux' and Open Source.md | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md diff --git a/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md deleted file mode 100644 index c9d08b73bf..0000000000 --- a/sources/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md +++ /dev/null @@ -1,53 +0,0 @@ -GHLandy Translating - -Linux Foundation Explains a "World without Linux" and Open Source -================================================================================ -> The Linux Foundation responds to questions about its "World without Linux" movies, including what the Internet would be like without Linux and other open source software. - -![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/hey_22.png) - -Would the world really be tremendously different if Linux, the open source operating system kernel, did not exist? Would there be no Internet or movies? Those are the questions some viewers of the [Linux Foundation's][1] ongoing "[World without Linux][2]" video series are asking. Here are some answers. - -In case you've missed it, the "World without Linux" series is a collection of quirky short films that depict, well, a world without Linux (and open source software more generally). They have emphasized themes like [Linux's role in movie-making][3] and in [serving the Internet][4]. - -To offer perspective on the series's claims, direction and hidden symbols, Jennifer Cloer, vice president of communications at The Linux Foundation, recently sent The VAR Guy responses to some common queries about the movies. Below are the answers, in her own words. - -### The latest episode takes Sam and Annie to the movies. Would today's graphics really be that much different without Linux? ### - -In episode #4, we do a bit of a parody on "Avatar." Love it or hate it, the graphics in the real "Avatar" are pretty impressive. In a world without Linux, the graphics would be horrible but we wouldn't even know it because we wouldn't know any better. But in fact, "Avatar" was created using Linux. Weta Digital used one of the world's largest Linux clusters to render the film and do 3D modeling. It's also been reported that "Lord of the Rings," "Fantastic Four" and "King Kong," among others, have used Linux. We hope this episode can bring attention to that work, which hasn't been widely reported. - -### Some people criticized the original episode for concluding there would be no Internet without Linux. What's your reaction? ### - -We enjoyed the debate that resulted from the debut episode. With more than 100,000 views to date of that episode alone, it brought awareness to the role that Linux plays in society and to the worldwide community of contributors and supporters. Of course the Internet would exist without Linux but it wouldn't be the Internet we know today and it wouldn't have matured at the pace it has. Each episode makes a bold and fun statement about Linux's role in our every day lives. We hope this can help extend the story of Linux to more people around the world. - -### Why is Sam and Annie's cat named String? ### - -Nothing in the series is a coincidence. Look closely and you'll find all kinds of inside Linux and geek jokes. String is named after String theory and was named by our Linux.com Editor Libby Clark. In physics, string theory is a theoretical framework in which the point-like particles of particle physics are replaced by one-dimensional objects called strings. String theory describes how these strings propagate through space and interact with each other. Kind of like Sam, Annie and String in a World Without Linux. - -### What can we expect from the next two episodes and, in particular, the finale? When will it air? ### - -In episode #5, we'll go to space and experience what a world without Linux would mean to exploration. It's a wild ride. In the finale, we finally get to see Linus in a world without Linux. There have been clues throughout the series as to what this finale will include but I can't give more than that away since there are ongoing contests to find the clues. And I can't give away the air date for the finale! You'll have to follow #WorldWithoutLinux to learn more. - -### Can you give us a hint on the clues in episode #4? ### - -There is another reference to the Free Burger Restaurant in this episode. Linux also actually does appear in this world without Linux but in a very covert way; you could say it's like reading Linux in another language. And, of course, just for fun, String makes another appearance. - -### Is the series achieving what you hoped? ### - -Yes. We're really happy to see people share and engage with these stories. We hope that it's reaching people who might not otherwise know the story of Linux or understand its pervasiveness in the world today. It's really about surfacing this to a broader audience and giving thanks to the worldwide community of developers and companies that support Linux and all the things it makes possible. - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/linux-foundation-explains-world-without-linux-and-open-so - -作者:[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://linuxfoundation.org/ -[2]:http://www.linuxfoundation.org/world-without-linux -[3]:http://thevarguy.com/open-source-application-software-companies/new-linux-foundation-video-highlights-role-open-source-3d -[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc From 366eba880f5ccce632a10f3524a0d8a8d2177e5e Mon Sep 17 00:00:00 2001 From: GHLandy Date: Tue, 19 Jan 2016 13:54:32 +0800 Subject: [PATCH 0876/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]=2020151126=20Linux=20Foundation=20Explains=20a=20'World=20wit?= =?UTF-8?q?hout=20Linux'=20and=20Open=20Source?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...a 'World without Linux' and Open Source.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 translated/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md diff --git a/translated/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/translated/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md new file mode 100644 index 0000000000..3f0170de0a --- /dev/null +++ b/translated/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md @@ -0,0 +1,52 @@ +没有 Linux 和开源软件的世界会变得怎么样 —— 听听来自 Linux 基金会的解释 +================================================================================ +> Linux 基金会针最近对人们关于 “没有 Linux 的世界” 系列短片提出的问题做了回应:包括没有 Linux 和其他的开源软件的因特网会变得怎么样等问题。 + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/hey_22.png) + +假如 Linux —— 一个开源的操作系统内核 —— 不曾出现过,我们现在的世界是否会是另一番景象。会不会没有了因特网,或者没有了电影?这些都是 [Linux 基金会][1] 正在连续播出的 “[没有 Linux 的世界][2]” 系列短片的观众提出来的问题。 + +假如你错过了观看这些短片也不要紧,“没有 Linux 的世界” 系列短片是一个古怪的短片集合,里边描述了没有了 Linux (或者说没有开源软件)的世界发生的事情。这些短片强调了 Linux 在 [电影制作][3] 以及 [服务于因特网][4] 中充当的角色。 + +为了提供该系列短片的一些主张、方向和隐藏元素,Linux 基金会副主席 Jennifer Cloer 最近在 The VAR Guy 上回应了关于该短片的一些问题。以下是她的原话解答。 + +### 最新一集短片 —— Sam 和 Annie 一起看电影。假如没有 Linux,我们现在的荧屏是不是也和短片中的一样? ### + +在 #4 剧情中,我们恶搞了一下电影 “Avatar”。不管你喜欢还是讨厌,现实中的 “Avatar” 在荧屏上的效果还是让人产生记忆深刻的。在没有 Linux 的世界中,电影的效果就变得非常恐怖,但是我们并不介意它,因为那已经是最好的了。但实际上,“Avatar” 是使用了 Linux 来进行效果制作的。Weta 数码使用了当时世界上最大的 Linux 集群来给电影做效果渲染和 3D 建模。据报道,指环王(Lord of the Rings)、神奇四侠(Fantastic Four)和金刚(King Kong)等电影都用到了 Linux。我希望该短片能引起电影制作工作者的关注,还有很多我们不知道的用到 Linux 来制作的电影。(译者注:这句应该是强度 Linux 在电影制作中的重要应用,可能翻译的不是很好。that work应该指的电影制作,只是直译感觉有点怪,这暂时没想到怎么译的最好。原话为:We hope this episode can bring attention to that work, which hasn't been widely reported.) + +### 很多人对短片的原始剧情进行了批判,其中包括没有 Linux 将没有因特网。你对此持什么样的看法? ### + +我们很喜欢人们从短片刚上映就进行激烈的辩论。该短片上映当天就超过了 100,000 的观众,这引起了人们对 Linux 在社会中扮演的角色以及全球的社区贡献者和维护者的关注。当然了,没有 Linux 的话,因特网也是会出现的,只是不会像当前我们所熟知的互联网那么成熟而已。每一个短片都对 Linux 在我们每天生活中扮演的角色进行了大胆且有趣的描述。我们希望,这些短片能够把关于 Linux 的故事推广到全世界的人的心里去。 + +### 为什么 Sam 和 Annie 的那只猫叫做 String? ### + +该短片系列中没有一处剧情是偶然的。仔细的观看话,你就会发现其中关于 Linux 和极客们的各种玩笑。小猫 String 是我们的 Linux.com 主编 Libby Clark 以弦理论(string theory)亲自来命名的。在物理学里,弦理论(string theory)是一个理论框架,它用一个叫做弦(String)的一维对象替换了粒子物理学中粒子状粒子。弦理论(string theory)描述了这些弦(String)如何在空间传播以及相互影响。就像 Sam、Annie 和 String 在那个没有 Linux 的世界里的关系那样。 + +### 我们期待已久的下两集是什么样的,特别是,最后那集什么时候上映? ### + +在 #5 短片中,我们将到太空并体验一下没有 Linux 的世界对太空探索的影响。这就像是一场疯狂的骑行。在短片的最后,我们最终还是会见到没有 Linux 的世界里的 Linus。贯穿整个短片系列,里边已经给出关于结局的线索,我在这就不能给太多提示了,因为还有好多人在找线索比赛中继续寻找着。并且我也不能给你们说出关于结局短片的上映日期。你们要自己跟进 #WorldWithoutLinux 主题帖来获取跟多信息。 + +### 你可给一些关于 #4 短片相关线索的提示吗? ### + +在该短片中有另外一个关于免费汉堡餐厅(Free Burger Restaurant)的线索。在那个没有 Linux 的世界里,Linux 最后还是以一种很隐秘的方式出现了,可以说,就像是以另一种语言来解读 Linux。当然,这只是为了好玩,String 也是另外一个模样。 + +### 那么,该系列短片达到你所想要的效果了吗? ### + +是的,达到了。我们很高兴看到人们分享并参与到这些故事中去。 +我们希望向那些可能不知道 Linux 的人传达更多关于 Linux 的故事并了解 Linux 在当今世界中是无处不在的。全部的短片就是为了把这些关于 Linux 的真相推广给大家,并感谢那些全球性社区的开发者和公司对 Linux 的支持,Linux 使得一切成为可能。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/linux-foundation-explains-world-without-linux-and-open-so + +作者:[Christopher Tozzi][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://linuxfoundation.org/ +[2]:http://www.linuxfoundation.org/world-without-linux +[3]:http://thevarguy.com/open-source-application-software-companies/new-linux-foundation-video-highlights-role-open-source-3d +[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc From d5003c1d43fc3e03a6634e7f9e4d5bfdea157ceb Mon Sep 17 00:00:00 2001 From: Ping Date: Wed, 20 Jan 2016 10:03:06 +0800 Subject: [PATCH 0877/1710] Mark the translaing Article. --- ... to install Suricata intrusion detection system on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 736a6577de..02e6153c60 100644 --- 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 @@ -1,4 +1,5 @@ -translated by ivo-wang +translating by Ping + 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]. From 2daaf49e6808fc5c69542c2d311b9698d97d25ae Mon Sep 17 00:00:00 2001 From: Ping Date: Wed, 20 Jan 2016 13:57:23 +0800 Subject: [PATCH 0878/1710] translated 20150906 How to install Suricata intrusion detection system on Linux.md --- ...ata intrusion detection system on Linux.md | 199 ----------------- ...ata intrusion detection system on Linux.md | 203 ++++++++++++++++++ 2 files changed, 203 insertions(+), 199 deletions(-) delete mode 100644 sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md create mode 100644 translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md 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 deleted file mode 100644 index 02e6153c60..0000000000 --- a/sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md +++ /dev/null @@ -1,199 +0,0 @@ -translating by Ping - -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 diff --git a/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md b/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md new file mode 100644 index 0000000000..b92f69df82 --- /dev/null +++ b/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md @@ -0,0 +1,203 @@ +如何在Linux系统上安装Suricata入侵检测系统 +================================================================================ + +随着安全威胁的不断发生,入侵检测系统(IDS)在如今的数据中心环境中显得尤为必要。然而,随着越来越多的服务器将他们的网卡升级到10GB/40GB网络,对如此线路上的硬件进行计算密集型的入侵检测越来越困难。其中一种扩展入侵检测系统性能的途径是**多线程入侵检测系统**,它将CPU密集型的深度包检测工作并行的分配给多个并发任务来完成。这样的并行检测可以充分利用多核硬件的优势来轻松扩展入侵检测系统的吞吐量。在这方面有两个知名的开源项目,分别是[Suricata][1] 和 [Bro][2]。 + +这个教程里,我会向大家演示**如何在Linux服务器上安装和配置Suricata入侵检测系统** + +### 在Linux上安装Suricata IDS ### + +让我们从源文件来构建 Suricata,但在此之前,需要按如下所示安装几个依赖包先。 + +#### 在Debian, Ubuntu 或者 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 + +#### 在CentOS, Fedora 或者 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 + +一旦将所有依赖包安装完毕,我们就可以继续安装 Suricata 了。 + + +首先从 [http://suricata-ids.org/download/][3] 下载 Suricata 源代码,然后构建它。撰写这篇文章的时候,其最新版本号为 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 + +以下是配置信息的样例。 + + 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 + +现在可以编译、安装了。 + + $ make + $ sudo make install + +Suricata 源代码带有默认的配置文件。按照如下方法安装这些默认配置文件即可。 + + $ sudo make install-conf + +正如你所料,如果没有IDS规则集的话,Suricata 毛用没有。幸好 Makefile 为我们提供了 IDS 规则集的安装选项。安装方法如下。 + + + $ sudo make install-rules + +以上的规则安装命令会从 [EmergingThreats.net][4] 上下载可用的现存社区规则集快照,并且将其存储在 /etc/suricata/rules 目录下。 + +![](https://farm1.staticflickr.com/691/20482669553_8b67632277_c.jpg) + +### 首次配置 Suricata IDS ### + +现在到了配置 Suricata 的时候了。配置文件的位置是 **/etc/suricata/suricata.yaml**。参照以下命令,用文本编辑器打开这个文件。 + + $ sudo vi /etc/suricata/suricata.yaml + +文件中有一些基本的配置供你使用。 + +为"default-log-dir"关键字指定Suricata日至文件所在的位置。 + + default-log-dir: /var/log/suricata/ + +在"vars"部分下方,你会发现几项对 Suricata 来说很重要变量。"HOME_NET"变量需要指定 Suricata 检查的网络。被分配给 EXTERNAL_NET 变量的 "!$HOME_NET" 代表除本地网络之外的其他网络。"XXX_PORTS"变量用来辨别不同服务所用到的端口号。需要注意的是无论使用什么端口,Suricata 都可以自动检测HTTP流量。所以是不是正确指定端口就显得没那么重要了。 + + + vars: + HOME_NET: "[192.168.122.0/24]" + EXTERNAL_NET: "!$HOME_NET" + HTTP_PORTS: "80" + SHELLCODE_PORTS: "!80" + SSH_PORTS: 22 + +"host-os-policy" 部分用于防御利用操作系统网络栈(例如:TCP reassembly)的自身行为来逃避检测的一些知名攻击手段。作为对策,通过针对目标操作系统而对检测引擎算法进行微调,现代IDC提供了“基于目标”的检测手段。因此,如果你知道某台主机运行了什么操作系统的话,将这个信息提供给 Suricata 就可以大幅提高检测的成功率。这就是 "host-os-policy" 存在的意义。本例中,默认的IDC对策是Linux系统。如果针对某个IP地址没有指定操作系统信息,Suricata 会默认应用基于Linux系统的检测策略。当捕获到对192.168.122.0/28 和 192.168.122.155通讯时,Suricata就会应用基于Windows系统的检测策略。 + + 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: [] + +在 "threading" 部分下,你可以为不同的 Suricata 线程指定CPU关联。默认状态下,[CPU 关联][5] 是被禁止使用的 ("set-cpu-affinity: no"),这意味着 Suricata 会分配其线程到所有可用的CPU核心上。Suricata 会默认为每一个CPU核心创建一个检测线程。你可以通过指定 "detect-thread-ratio: N" 来调整此行为。此处会创建 N*M 个检测线程,M代表CPU核心总数。 + + threading: + set-cpu-affinity: no + detect-thread-ratio: 1.5 + +通过以上对线程的设置,Suricata会创建 1.5*M 个检测线程,M是系统的CPU核心总数。 + +如果你想对Suricata配置有更多的了解,可以去翻阅默认配置文件。里边配有有大量的注释以供你清晰理解。 + +### 使用Suricata进行入侵监控 ### + +现在是时候让 Suricata 跑起来了,但在这之前还有一个步骤需要去完成。 + +当你使用 pcap捕获模式 的时候,强烈建议关闭Suricata监听网卡上的任何的包卸载(例如 LRO/GRO)功能。这些功能会干扰包的实时捕获行为。 + +按照以下方法关闭 eth0 接口的 LRO/GRO 功能。 + + $ sudo ethtool -K eth0 gro off lro off + +这里要注意,在使用部分网卡的情况下,你会看到如下警告信息。忽略它们就行了,这些信息只不过告诉你你的网卡不支持LRO功能而已。 + + Cannot change large-receive-offload + +Suricata 支持许多运行模式。运行模式决定着IDC会使用何种线程。以下命令可以查看所有 [可用的运行模式][6]。 + + $ sudo /usr/local/bin/suricata --list-runmodes + +![](https://farm6.staticflickr.com/5730/20481140934_25080d04d7_c.jpg) + + +Suricata 使用的默认运行模式是autofp("auto flow pinned load balancing"==“自动流绑定负载均衡” 的缩写)。这个模式下,来自某一个流的包会被分配到一个单独的检测线程中。这些流会根据未被处理的包的最低数量来分配相应的线程。 + +最后,让我们将 Suricata 运行起来,看看它表现如何。 + + $ sudo /usr/local/bin/suricata -c /etc/suricata/suricata.yaml -i eth0 --init-errors-fatal + +![](https://farm1.staticflickr.com/701/21077552366_c577746e36_c.jpg) + +本例中,我们在一个8核心系统中监控eth0网络接口。如上所示,Suricata 创建了13个包处理线程和3个管理线程。包处理线程中包括一个PCAP包捕获线程,12个检测线程(由8*1.5得出)。这表示IDS内的1个包捕获线程均衡负载到12个检测线程中。管理线程包括1个流管理和2个计数/统计相关线程。 + +Here is a thread-view of Suricata process (plotted by [htop][7]). +以下是一个关于Suricata处理的线程截图(由 [htop][7] 绘制)。 + +![](https://farm6.staticflickr.com/5775/20482669593_174f8f41cb_c.jpg) + +Suricata检测日志存储在 /var/log/suricata 目录下。 + + $ 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 + +日志也可以提供Json格式,被当做引用实例去使用: + + $ 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}} + +### 总结 ### + +这篇教程中,我为大家演示了如何在一台多核Linux服务器上安装Suricata入侵检测系统。不同于单线程的 [Snort IDS][8] ,Suricata 可以很容易的从多核硬件的多进程特性所带来的红利中获益。定制Suricata来最大化其效能和检测范围是一个很好的主意。Suricata的粉丝们维护着一个 [在线 Wiki][9],如果你打算将Suricata部署到你的环境中,我强烈建议你去那儿取取经。 + +如果你现在已经开始使用Suricata了的话,把你的经验也分享出来吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/install-suricata-intrusion-detection-system-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](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/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 From ab449052bcd01fe412259008ccd216b6614a4f59 Mon Sep 17 00:00:00 2001 From: Ping Date: Wed, 20 Jan 2016 15:41:17 +0800 Subject: [PATCH 0879/1710] add my nick-name --- ...w to install Suricata intrusion detection system on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md b/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md index b92f69df82..0eab03088c 100644 --- a/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md +++ b/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md @@ -186,7 +186,7 @@ Suricata检测日志存储在 /var/log/suricata 目录下。 via: http://xmodulo.com/install-suricata-intrusion-detection-system-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/mr-ping) +译者:[mr-ping](https://github.com/mr-ping) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 235fbb22136983daa5255cc0c347d426937c8d76 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 20 Jan 2016 20:34:06 +0800 Subject: [PATCH 0880/1710] PUB:20151223 What' s the Best File System for My Linux Install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @icecoobe 翻译的不错 --- ...e Best File System for My Linux Install.md | 97 +++++++++++++++++++ ...e Best File System for My Linux Install.md | 96 ------------------ 2 files changed, 97 insertions(+), 96 deletions(-) create mode 100644 published/20151223 What' s the Best File System for My Linux Install.md delete mode 100644 translated/talk/20151223 What' s the Best File System for My Linux Install.md diff --git a/published/20151223 What' s the Best File System for My Linux Install.md b/published/20151223 What' s the Best File System for My Linux Install.md new file mode 100644 index 0000000000..6bb9dcd898 --- /dev/null +++ b/published/20151223 What' s the Best File System for My Linux Install.md @@ -0,0 +1,97 @@ +哪个文件系统最适合你的 Linux 系统? +================================================================================ + +![](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-feature-image.jpg) + +文件系统: 它们不是世界上最激动人心的技术,但是仍然很重要。本文我们将细数那些流行的 Linux 文件系统 - 它们是什么,它们能够做什么,以及它们的目标用户。 + +### Ext4 ### + +![file-systems-ext4](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-ext4.png) + +如果你曾经安装过 Linux,你可能在安装过程中看到过“Ext4”字样。用它有一个不错的理由: 它是当前每个可用的 Linux 发行版所选择的文件系统。当然,还有其他的一些选择,但是不可否认的是,Ext4(Extended 4)几乎是所有 Linux 用户都会选择的文件系统。 + +#### 它能做什么? #### + +Ext4 拥有之前的文件系统(Ext2/Ext3)中你所期待的所有优点, 同时还带来了一些改进。还有很多内容可以发掘,这里列举出了 Ext4 为你带来的最好的部分: + +- 日志型文件系统 +- 日志校验 +- 多重块文件分配 +- 向后兼容 Ext2 && Ext3 +- 持续的空闲空间预分配 +- 改进的文件系统校验(相比于之前的版本) +- 当然,同时支持更大的文件 + +#### 目标用户 #### + +Ext4 针对那些寻找超级可靠的基础环境或者那些只需要能工作就行的用户。这个文件系统不会对你的系统做快照;它甚至没有最好的 SSD 支持,但是如果你不是太挑剔的话,你会觉得它也还不错。 + +### BtrFS ### + +![file-systems-btrFS](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-btrFS-e1450065697580.png) + +B 树(B-tree)文件系统 (也被当做是 butterFS,黄油文件系统) 是 Oracle 为 Linux 研发的一款文件系统。它是一个全新的文件系统,而且正处于主要开发阶段。Linux 社区认为其有时候使用上还有些不稳定。BtrFS 的核心原则是围绕着写时复制(copy-on-write)原则展开的。**写时复制**基本上意味着在写入数据完成前,这份数据的每一比特都有单独的一份副本。当数据写入完毕后,相当于它做了一份副本。 + +#### 它能做什么 #### + +除了支持写时复制之外,BtrFS 也能够胜任许多其他的事务 - 事实上,它可以一直列出各种特性。这里列举最值得一提的特性:支持只读快照、文件克隆、子卷、透明压缩、离线文件系统校验、从 ext3 & 4 原地转换到 BtrFS、在线碎片整理,还支持 RAID 0, RAID 1, RAID 5, RAID 6 和 RAID 10。 + +#### 目标用户 #### + +BtrFS 的开发者们许诺过,该文件系统是当前其他文件系统的新一代替代者。非常正确,虽然目前其处于开发中。它有很多面向高级用户的杀手级特性,对于基本用户也是这样(包括 SSD 上面的更佳性能)。这个文件系统针对那些想要从文件系统中获取更多(特性),以及那些想尝试用写时复制机制做一些事情的用户。 + +### XFS ### + +![file-systems-xfs](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-xfs.jpg) + +由 Silicon Graphics 公司创造开发,XFS 是一个高端文件系统,定位于速度和性能方面。处于对性能方面的专注,使得在并行 IO 方面,XFS 表现的尤其出色。XFS 文件系统能够处理数量庞大的数据,事实上某些 XFS 用户的数据接近300TB 以上。 + +#### 它能做什么 #### + +XFS 是一个经历良好测试的数据存储文件系统,它是为了高性能操作而诞生的。其特性包括: + +- RAID 阵列的条带化分配 +- 日志型文件系统 +- 块大小可变 +- 直接 I/O +- 指定速率(guaranteed-rate) I/O +- 快照 +- 在线碎片整理 +- 在线调整文件系统大小 + +#### 目标用户 #### + +XFS 针对那些想要一个坚如磐石的文件系统方案的用户。它始于1993年,并且随着时间的变迁它变得越来越好。如果你有一台家庭服务器,而且你苦恼于如何部署存储环境,那么可以考虑下 XFS。它拥有的众多特性(比如快照)能够有助于你的文件存储系统。尽管如此,它不局限于服务器端。如果你是一个相对高级一点的用户或者你对 BtrFS 所承诺的很多特性感兴趣的话,尝试一下 XFS。它实现了很多与 BtrFS 相似的特性,并且没有稳定性方面的问题。 + +### Reiser4 ### + +![file-system-riser4](https://www.maketecheasier.com/assets/uploads/2015/05/file-system-riser4.gif) + +Reiser4 是 ReiserFS 的继任者,由 Namesys 公司创造研发。它的诞生可以追溯到 Linspire 项目和 DARPA。它与众不同的地方在于众多的事务模式。并不止于单一的一种写入数据的方式;取而代之的是,有很多方式(来写入)。 + +#### 它能做什么 #### + +Reiser4 拥有着使用多种不同事务模式的独特能力。它能够使用写时复制模式 (像 BtrFS),任意位置写入(write-anywhere),日志,以及混合事务模式。它在 ReiserFS 的基础上做了许多的改进,包括更好的基于漫游日志的文件系统日志,对较小文件的支持更好,以及更快速的目录处理。Reiser4 提供了许多功能特性。还有更多的特性可以探讨,不过简单来讲,相比于 ReiserFS 它不但做了非常大的改进,而且增加了众多特性。 + +#### 目标用户 #### + +Resier4 适合那些想要将一个文件系统应用到多种场景下的用户。可能你想在一台机器上使用写时复制机制,在另一台机器上使用任意位置写入机制,还会在另一台机器上使用混合事务,而你又不希望使用多种不同类型的文件系统来完成这项任务。Reiser4 是适合这种情况的完美方案。 + +### 结论 ### + +Linux 上有许多可用的文件系统。每个文件系统都有其特定的用途,以便于特定用户解决不同的问题。本文的焦点集中在 Linux 平台上文件系统的主流选择。毫无疑问,其它的场景下还有一些别的选择。 + +你在 Linux 上最喜欢的文件系统是什么?在下面的评论区告诉我们吧! + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/best-file-system-linux/ + +作者:[Derrik Diener][a] +译者:[icecoobe](https://github.com/icecoobe) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/derrikdiener/ diff --git a/translated/talk/20151223 What' s the Best File System for My Linux Install.md b/translated/talk/20151223 What' s the Best File System for My Linux Install.md deleted file mode 100644 index 2d093cb83f..0000000000 --- a/translated/talk/20151223 What' s the Best File System for My Linux Install.md +++ /dev/null @@ -1,96 +0,0 @@ - -我的Linux系统应该安装的最好的文件系统是什么? -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-feature-image.jpg) - -文件系统: 它们不是世界上最激动人心的技术,但是仍然很重要。本文我们将细数那些流行的Linux文件系统 - 它们是什么,它们能够做什么,以及它们的目标用户。 - -### Ext4 ### - -![file-systems-ext4](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-ext4.png) - -如果你曾经安装过Linux,你可能在安装过程中看到过"Ext4"字样。关于这个有一个不错的理由: 它是当前每个可用Linux发行版所选择的文件系统。当然,还有其他的一些选择,但是不可否认的是,Ext4(Extended 4)几乎是所有Linux用户都会选择的文件系统。 - -#### 它能做什么? #### - -Ext4拥有你预期的曾经的文件系统(Ext2/Ext3)的所有优点, 同时还带来了一些改进。还有很多内容可以发掘,这里列举出Ext4为你带来的最好的部分: - -- 文件系统日志 -- 日志校验 -- 多重块文件的分配 -- 对Ext2 && Ext3向后兼容 -- 持续的预分配空闲空间 -- 改进的文件系统校验(相比于之前的版本) -- 当然,同时支持更大的文件 - -#### 目标用户 #### - -Ext4针对那些寻找超级可靠的构建环境或者那些仅仅需要可用环境的用户。这个文件系统不会对你的系统做快照;它甚至没有最好的SSD支持,但是如果你的要求不是太过严格的话,你会觉得它也还不错。 - -### BtrFS ### - -![file-systems-btrFS](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-btrFS-e1450065697580.png) - -B树(B-tree)文件系统 (也被认为是butterFS,黄油文件系统) 是Oracle为Linux研发的一款文件系统。它是一个全新的文件系统,而且正处于重度开发阶段。Linux社区认为其目前使用上还有些不稳定。BtrFS的核心原则是基于写时复制(copy-on-write). **写时复制**基本上意味着在写入数据前,这份数据的每一比特都有单独的一份副本。当数据写入完毕后,它相应的副本也随之生成。 - -#### 它能做什么 #### - -除了支持写时复制之外,BtrFS也能够胜任许多其他的事务 - 事实上,如此多的事务支持以致于它能永久列出一切(数据)。这里列举最值得一提的特性:支持只读快照,文件克隆,子卷,透明压缩,离线文件系统校验,无缝地从ext3&&4转换到BtrFS,在线碎片整理,还支持RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10。 - -#### 目标用户 #### - -BtrFS的开发者门许诺过,该文件系统是当前其他文件系统的新一代替代者。非常正确,虽然目前其处于开发中。它有很多杀手级的特性面向高级用户,也包括基本用户 (包括SSDs上面的表现)。这个文件系统针对那些想要从文件系统中获取更多(特性),以及那些想尝试用写时复制机制做一些事情的用户。 - -### XFS ### - -![file-systems-xfs](https://www.maketecheasier.com/assets/uploads/2015/05/file-systems-xfs.jpg) - -由Silicon Graphics公司创造开发,XFS是一个高端文件系统,定位于速度和性能。对于性能方面的专注,使得在并行输入输出方面,XFS表现的尤其出色。XFS文件系统能够处理数量庞大的数据,事实上某些XFS用户的数据接近300+TB。 - -#### 它能做什么 #### - -XFS是一个经历良好测试的数据存储文件系统,它是为了高性能操作而诞生的。其特性包括: - -- RAID阵列的条纹(striped)模式分配 -- 文件系统日志 -- 多种块大小 -- 直接I/O -- 指定速率(guaranteed-rate)I/O -- 快照 -- 在线碎片整理 -- 在线调整大小 - -#### 目标用户 #### - -XFS针对那些想要一个坚如磐石的文件系统方案的用户。它起源于1993年,并且随着时间的变迁它变得越来越好。如果你有一台家庭服务器,而且你苦恼于如何部署存储环境,那么可以考虑下XFS。它拥有的众多特性(比如快照)能够协助你的文件存储系统。尽管如此,它不局限于服务器端。如果你是一个相对高级一点的用户或者你对BtrFS所承诺的很多特性感兴趣的话,尝试一下XFS。它实现了很多与BtrFS相似的特性,并且没有稳定性方面的问题。 - -### Reiser4 ### - -![file-system-riser4](https://www.maketecheasier.com/assets/uploads/2015/05/file-system-riser4.gif) - -Reiser4,ReiserFS的继任者,由Namesys公司创造研发。它的诞生追溯到Linspire工程和DARPA。它与众不同的地方在于众多的事务模式。没有一个单一的方式来写入数据;取而代之的是,有很多方式(来写入)。 - -#### 它能做什么 #### - -Reiser4拥有着使用多种不同事务模式的独特能力。它能够使用写时复制模式 (像BtrFS),任意位置写入(write-anywhere),日志,以及超级事务模式。它在ReiserFS的基础上做了许多的改进,包括更好的基于漫游日志的文件系统日志,对更小的文件较好的支持,以及更快速的目录处理。Reiser4提供了许多功能特性。还有更多的特性可以探讨,不过简单来讲,相比于ReiserFS它对众多新增特性做了非常大的改进。 - -#### 目标用户 #### - -Resier4适合那些想要将一个文件系统应用到多中场景下的用户。可能你想在一台机器上使用copy-on-write机制,在另一台机器上使用write-anywhere机制,还会在另一台机器上使用超级事务,而你又不希望使用多种不同类型的文件系统来完成这项任务。Reiser4是适合这种情况的完美方案。 - -### 结论 ### - -Linux上有许多可用的文件系统。每个文件系统都有其特定的用途,以便于特定用户解决不同的问题。本文的焦点集中在平台上文件系统的主流的选择。毫无疑问,其它的场景下还有一些别的选择。 - -你在Linux上最喜欢的文件系统是什么?在下面(的评论区)告诉我们吧! --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/best-file-system-linux/ - -作者:[Derrik Diener][a] -译者:[icecoobe](https://github.com/icecoobe) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.maketecheasier.com/author/derrikdiener/ From b6282e980e73935b2c237da88c5b9a67a04bbd66 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 20 Jan 2016 21:01:56 +0800 Subject: [PATCH 0881/1710] PUB:Learn with Linux--Two Geography Apps @bazz2 --- .../Learn with Linux--Learning Music.md | 35 ++++++++++--------- .../Learn with Linux--Two Geography Apps.md | 22 ++++++------ 2 files changed, 29 insertions(+), 28 deletions(-) rename {translated/tech/Learn with Linux => published}/Learn with Linux--Learning Music.md (82%) rename {translated/tech/Learn with Linux => published}/Learn with Linux--Two Geography Apps.md (89%) diff --git a/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md b/published/Learn with Linux--Learning Music.md similarity index 82% rename from translated/tech/Learn with Linux/Learn with Linux--Learning Music.md rename to published/Learn with Linux--Learning Music.md index c732344a19..83f522bfba 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Learning Music.md +++ b/published/Learn with Linux--Learning Music.md @@ -1,22 +1,22 @@ -Linux 教学之教你玩音乐 +与 Linux 一起学习:玩音乐 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-featured.png) -[Linux 学习系列][1]的所有文章: +[与 Linux 一起学习:][1]的所有文章: -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] +- [与 Linux 一起学习:学习打字][2] +- [与 Linux 一起学习:物理模拟][3] +- [与 Linux 一起学习:玩音乐][4] +- [与 Linux 一起学习:两款地理软件][5] +- [与 Linux 一起学习:掌握数学][6] -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及不同年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“与 Linux 一起学习:”系列就来介绍一些教学软件。 -学习音乐是一个很好的消遣方式。训练你的耳朵能识别音阶与和弦、掌握一门乐器、控制自己的嗓音,这些都需要大量的练习,以及会遇到很多困难。音乐理论非常博大精深,有太多东西需要记忆,你需要非常勤奋才能讲这些东西变成你的“技术”。在你的音乐之路上,Linux 提供了杰出的软件来帮助你前行。它们不能让你立刻成为一个音乐家,但可以作为一个降低学习难度的好助手。 +学习音乐是一个很好的消遣方式。训练你的耳朵能识别音阶与和弦、掌握一门乐器、控制自己的嗓音,这些都需要大量的练习,以及会遇到很多困难。音乐理论非常博大精深,有太多东西需要记忆,你需要非常勤奋才能将这些东西变成你的“技术”。在你的音乐之路上,Linux 提供了杰出的软件来帮助你前行。它们不能让你立刻成为一个音乐家,但可以作为一个降低学习难度的好助手。 ### Gnu Solfège ### -[Solfège][7] 是一个世界流行的音乐教学工具,适用于各个级别的音乐教育。很多流行的教学方法(比如著名的柯达伊教学法)就使用 Solfège 作为它们的基础。相比于学到音乐知识,Solfège 更关注于让用户不断练习音乐。它假想的用户是那些已经有一些音乐基础,并且想不断练习音乐技巧的学生。 +[Solfège][7] 是一个世界流行的音乐教学工具,适用于各个级别的音乐教育。很多流行的教学方法(比如著名的柯达伊教学法)就使用 Solfège 作为它们的基础。相比于学到音乐知识,Solfège 更关注于让用户不断练习音乐。它预期的用户是那些已经有一些音乐基础,并且想不断练习音乐技巧的学生。 以下是 GNU 网站的开发者声明: @@ -24,7 +24,7 @@ Linux 教学之教你玩音乐 这款软件兑现了它的承诺,你可以在试听帮手的帮助下练习几乎所有音乐技巧。 -Debian 和 Ubuntu 的远端库上有这款软件,在终端运行下面命令安装软件: +Debian 和 Ubuntu 的仓库上有这款软件,在终端运行下面命令安装软件: sudo apt-get install solfege @@ -78,9 +78,9 @@ Tete 只有一个简单的界面,所有内容都在这里了。 ### JalMus ### -Jalmus 是用 JAVA 写的键盘音符阅读训练器。可以外接 MIDI 键盘,也可以使用虚拟键盘。它提供很多简单的课程练习来训练你的音符阅读能力。这个软件在2013年之后就不再更新了,但还是比较实用的。 +Jalmus 是用 JAVA 写的键盘音符阅读训练器。可以外接 MIDI 键盘,也可以使用虚拟键盘。它提供很多简单的课程练习来训练你的音符阅读能力。虽然这个软件在2013年之后就不再更新了,但还是比较实用的。 -进入[sourceforge 页面][11]下载最后版本(v2.3)的 JAVA 安装器,或者在终端输入下面的命令下载: +进入 [sourceforge 页面][11]下载最后版本(v2.3)的 JAVA 安装器,或者在终端输入下面的命令下载: wget http://garr.dl.sourceforge.net/project/jalmus/Jalmus-2.3/installjalmus23.jar @@ -102,11 +102,11 @@ Jalmus 的主界面非常朴素。 ![learnmusic-jalmus-multinote](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-multinote.png) -Jalmus 也包含一些训练,内容和课程相似,只是没有那些视觉上的提示了。当完成训练后,屏幕上会显示你的乐谱。它还提供不同难度的节拍训练,你能听到看到这些训练里面播放的旋律。在多行乐谱同时播放时,一个节拍器(能听见能看见)可以帮你理解 +Jalmus 也包含一些阅读单个音符的训练,内容和课程相似,只是没有那些视觉上的提示了。当完成训练后,屏幕上会显示你的乐谱。它还提供不同难度的节拍训练,你能听到并看到这些训练里面播放的节拍。在多行乐谱同时播放时,一个节拍器(能听见能看见)可以帮你理解 ![learnmusic-jalmus-rhythm](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-rhythm.png) -和阅读乐谱。(LCTT 写给王老板的话:我特么实在编不下去了,这段你得帮我改改。) +和阅读乐谱。 ![learnmusic-jalmus-score](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-score.png) @@ -121,11 +121,12 @@ Jalmus 也包含一些训练,内容和课程相似,只是没有那些视觉 对于吉他练习者,[TuxGuitar][12] 看起来很像 Windows 下面的 Guitar Pro 软件(它也可以读 Guitar Pro 格式的文件)。 #### PianoBooster #### + [Piano Booster][13] 可以练习钢琴技巧,它能播放 MIDI 文件,你可以使用外接键盘来弹钢琴,同时还能查看屏幕上滑过的乐谱。 ### 总结 ### -Linux 提供很多优秀的工具供你学习,如果你对音乐感兴趣,你完全不用担心没有软件能帮你练习音乐技术。实际上,可供学习音乐的学生选择的优秀软件数量远比上面介绍的要多。如果你还知道其他的音乐训练软件,请在写下你的评论,让我们能够知道。 +Linux 提供很多优秀的工具供你学习,如果你对音乐感兴趣,你完全不用担心没有帮你练习音乐技术的软件。实际上,可供学习音乐的学生选择的优秀软件数量远比上面介绍的要多。如果你还知道其他的音乐训练软件,请在写下你的评论,让我们能够知道。 -------------------------------------------------------------------------------- @@ -133,7 +134,7 @@ via: https://www.maketecheasier.com/linux-learning-music/ 作者:[Attila Orosz][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/) 荣誉推出 diff --git a/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md b/published/Learn with Linux--Two Geography Apps.md similarity index 89% rename from translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md rename to published/Learn with Linux--Two Geography Apps.md index 8ce6b052af..bdbcb36a42 100644 --- a/translated/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md +++ b/published/Learn with Linux--Two Geography Apps.md @@ -1,16 +1,16 @@ -Linux 教学之两款地理软件 +与 Linux 一起学习:学习地理 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-featured.png) -[Linux 学习系列][1]的所有文章: +[与 Linux 一起学习][1]的所有文章: -- [Linux 教学之教你练打字][2] -- [Linux 教学之物理模拟][3] -- [Linux 教学之教你玩音乐][4] -- [Linux 教学之两款地理软件][5] -- [Linux 教学之掌握数学][6] +- [与 Linux 一起学习:学习打字][2] +- [与 Linux 一起学习:物理模拟][3] +- [与 Linux 一起学习:玩音乐][4] +- [与 Linux 一起学习:学习地理][5] +- [与 Linux 一起学习:掌握数学][6] -引言:Linux 提供大量的教学软件和工具,面向各个年级段以及年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“Linux 教学”系列就来介绍一些教学软件。 +引言:Linux 提供大量的教学软件和工具,面向各个年级段以及各个年龄段,提供大量学科的练习实践,其中大多数是可以与用户进行交互的。本“与 Linux 一起学习”系列就来介绍一些教学软件。 地理是一门有趣的学科,我们每天都能接触到,虽然可能没有意识到,但当你打开 GPS、SatNav 或谷歌地图时,你就已经在使用这些软件提供的地理数据了;当你在新闻中看到一个国家的消息或听到一些金融数据时,这些信息都可以归于地理学范畴。Linux 提供了很多学习地理学的软件,可用于教学,也可用于自学。 @@ -62,11 +62,11 @@ Marble 专注于地图绘制,它的主界面就是一张地图。 ![learn-geography-marble-history](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-history.jpg) -除了有包含不同界面和大量数据的离线地图,Marble 还提供其他信息。你可以在菜单中打开或关闭不同的离线 info-boxes +除了有包含不同界面和大量数据的离线地图,Marble 还提供其他信息。你可以在菜单中打开或关闭不同的离线信息框 ![learn-geography-marble-offline](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-offline.png) -和在线的 online services。 +和在线服务。 ![learn-geography-marble-online](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-online.png) @@ -86,7 +86,7 @@ via: https://www.maketecheasier.com/linux-geography-apps/ 作者:[Attila Orosz][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 d82e137209072bd1754f483d6f4059730d020b9d Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 20 Jan 2016 23:25:42 +0800 Subject: [PATCH 0882/1710] PUB:20151206 NetworkManager and privacy in the IPv6 internet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @itsang 翻译的很好 --- ...anager and privacy in the IPv6 internet.md | 56 +++++++++++++++++++ ...anager and privacy in the IPv6 internet.md | 54 ------------------ 2 files changed, 56 insertions(+), 54 deletions(-) create mode 100644 published/20151206 NetworkManager and privacy in the IPv6 internet.md delete mode 100644 translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md diff --git a/published/20151206 NetworkManager and privacy in the IPv6 internet.md b/published/20151206 NetworkManager and privacy in the IPv6 internet.md new file mode 100644 index 0000000000..b20c8d93bf --- /dev/null +++ b/published/20151206 NetworkManager and privacy in the IPv6 internet.md @@ -0,0 +1,56 @@ +IPv6 互联网中的隐私保护和网络管理器 +============================== + +IPv6 的使用量正在不断增加,让我们始料未及的是,伴随这个协议不断增加的使用量,大量的隐私问题涌现出来。互联网社区在积极发布相关解决方案。当前状况是怎样的呢?网络管理器(NetworkManager)又是如何跟上的呢?让我们来瞧瞧吧! + +![](https://blogs.gnome.org/lkundrak/files/2015/12/cameras1.jpg) + +## 通过 IPv6 方式连接的主机的特性 + +启用了 IPv6 的节点(LCTT 译注:节点在网络中指一个联网的设备)并不需要类似 IPv4 网络中 [DHCP](https://tools.ietf.org/html/rfc2132) 服务器的中央机构来配置他们的地址。它们发现(discover)自己所在的网络,然后通过生成主机部分来[自主生成地址](https://tools.ietf.org/html/rfc4862)。这种方式使得网络配置更加简单,并且能够更好的扩展到更大规模的网络。然而,这种方式也有一些缺点。首先,这个节点需要确保它的地址不会和网络上其他节点冲突。其次,如果这个节点在进入的每一个网络中使用相同的主机部分,它的运动就可以被追踪,如此一来,隐私便处于危险之中。 + +负责制定因特网标准的组织 Internet 工程任务组(Internet Engineering Task Force,IETF)[意识到了这个问题](https://tools.ietf.org/html/draft-iesg-serno-privacy-00),这个组织建议取消使用硬件序列号来识别网络上的节点。 + +但实际的实施情况是怎样的呢? + +地址唯一性问题可以通过[重复地址检测(Duplicate Address Detection, DAD)](https://tools.ietf.org/html/rfc4862#section-5.4)机制来解决。当节点为自身创建地址的时候,它首先通过[邻居发现协议(Neighbor Discovery Protocol)](https://tools.ietf.org/html/rfc4861)(一种不同于 IPv4 [ARP](https://tools.ietf.org/html/rfc826)协议的机制)来检查另一个节点是否使用了相同的地址。当它发现地址已经被使用,它必须抛弃掉这个地址。 + +解决另一个问题——隐私问题,有一点困难。一个 IP 地址(无论 IPv4 或 IPv6)由网络部分和主机部分组成(LCTT 译注:网络部分用来划分子网,主机部分用来从相应子网中找到具体的主机)。主机查找出相关的地址的网络部分,并且生成地址的主机部分。传统上它只使用了源自网络硬件(MAC)地址的接口识别器(Interface Identifier)。MAC 地址在硬件制造的时候就被设置好了,它可以唯一的识别机器。这样就确保了地址的稳定性和唯一性。这对避免地址冲突来说是件好事,但是对隐私来说一点也不好。主机部分在不同网络下保持恒定意味着机器在进入不同网络时可以被唯一的识别。这在协议制定的时候看起来无可非议,但是随着 IPv6 的流行,人们对于隐私问题的担忧也愈演愈烈。幸运的是,解决办法还是有的。 + +## 使用隐私扩展(privacy extensions) + +IPv4 的最大问题——地址枯竭,已经不是什么秘密。对 IPv6 来说,这一点不再成立,事实上,使用 IPv6 的主机能够相当大方的利用地址。多个 IPv6 地址对应一块网卡绝对没有任何不合适,正好相反,这是一种标准情形。最起码每个节点都有一个“本地连接(link-local)地址”,它被用来与同一物理链路的节点联络。当网络包含了一个连接其他网络的路由器,这个网络中的每个节点都有一个与每个直接连接的网络相联络的地址。如果主机在同一个网络有更多的地址,该节点(LCTT 译注:指路由器)将接受它们全部的传入流量。对于外发连接,它会把地址显示给远程主机,内核会挑选最适合的地址。但到底是哪一个呢? + +启用了隐私扩展,就像 [RFC4941](https://tools.ietf.org/html/rfc4941) 定义的那样,时常会生成带有随机主机部分的新地址。最新的那个被用于最新的外发连接,与此同时,那些不被使用了的旧地址将被丢弃。这是一个极好的策略——主机不会对外暴露其固定地址,因为它不用于外发连接,但它仍然会接受知道其固定地址的主机连接。 + +但这也存在美中不足之处——某些应用会把地址与用户识别绑定在一起。让我们来考虑一下这种情形,一个 web 应用在用户认证的时候生成一个 HTTP Cookie,但它只接受实施认证的地址的连接。当内核生成了一个新的临时地址,服务器会拒绝使用这个地址的请求,实际上相当于用户登出了。地址是不是建立用户认证的合适机制值得商榷,但这确实是现实中应用程序正在做的。 + +## 解救之道——隐私固定寻址(Privacy stable addressing) + +解决这个问题可能需要另辟蹊径。唯一的(当然咯)地址确实有必要,对于特定网络来说是稳定的,但当用户进入了另一个网络后仍然会变,这样的话追踪就变得几乎不可能。RFC7217 介绍了一种如上所述的机制。 + +创建隐私固定地址依赖于伪随机值,这个随机值只被主机本身知晓,它不会暴露给网络上的其他主机。这个随机值随后被一个密码安全算法加密,一起被加密的还有一些与网络连接的特定值。这些值包含:用以标识网卡的名称;网络地址;对于这个网络来说有可能的其他特殊值,例如无线网络的 SSID。使用这个安全密钥使其他主机很难预测结果地址,与此同时,当进入不同的网络时,网络的特殊数据会让地址变得不同。 + +这也巧妙的解决了地址重复问题。因为有随机值的存在,冲突也不太可能发生。万一发生了冲突,结果地址会得到重复地址检测失败的记录,这时会生成一个不同的地址而不会断开网络连接。看,这种方式很聪明吧。 + +使用隐私固定地址一点儿也不会妨碍隐私扩展。你可以在使用 RFC4941 所描述的临时地址的同时使用 [RFC7217](https://tools.ietf.org/html/rfc7217)中的固定地址。 + +## 网络管理器(NetworkManager)处于什么样的状况? + +我们已经在网络管理器1.0.4版本中实现了隐私扩展(privacy extensions)。在这个版本中,隐私扩展默认开启。你可以用 ipv6.ip6-privacy 参数来控制它。 + +在网络管理器1.2版本中,我们将会加入固定隐私寻址(stable privacy addressing)。应该指出的是,目前的隐私扩展还不符合这种需求。我们可以使用 ipv6.addr-gen-mode 参数来控制这个特性。如果它被设置成固定隐私,那么将会使用固定隐私寻址。设置成“eui64”或者干脆不设置它将会保持传统的默认寻址方式。 + +敬请期待2016年年初网络管理器1.2版本的发布吧!如果你想尝试一下最新的版本,不妨试试 Fedora Rawhide,它最终会变成 Fedora 24。 + +*我想感谢 Hannes Frederic Sowa,他给了我很有价值的反馈。如果没有他的帮助,这篇文章的作用将会逊色很多。另外,Hannes 也是 RFC7217 所描述机制的内核实现者,当网络管理器不起作用的时候,它将发挥作用。* + +-------------------------------------------------------------------------------- + +via: https://blogs.gnome.org/lkundrak/2015/12/03/networkmanager-and-privacy-in-the-ipv6-internet/ + +作者:Lubomir Rintel +译者:[itsang](https://github.com/itsang) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md b/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md deleted file mode 100644 index cfd203da33..0000000000 --- a/translated/tech/20151206 NetworkManager and privacy in the IPv6 internet.md +++ /dev/null @@ -1,54 +0,0 @@ -IPv6因特网中的隐私保护和网络管理器 -====================== - -IPv6的使用量正在不断增加,让我们始料未及的是,伴随这个协议不断增加的使用量,大量隐私问题涌现出来。互联网社区在积极发表相关解决方案,当前状况是怎样的呢?网络管理器又是如何跟上的呢?让我们来瞧瞧吧! - -![](https://blogs.gnome.org/lkundrak/files/2015/12/cameras1.jpg) - -## 通过IPv6方式连接的主机的特性 - -通过IPv6方式激活的结点(译者注:结点在网络中指一个联网的设备)不需要类似IPv4网络中[DHCP](https://tools.ietf.org/html/rfc2132)服务器的中央机构来配置他们的地址。它们发现自己所在的网络然后通过生成主机部分来[自主生成地址](https://tools.ietf.org/html/rfc2132)。这种方式使得网络配置更加简单,并且能够更好的扩展到更大规模的网络。然而,这种方式也有一些缺点。首先,这个结点需要确保它的地址不会和网络上其他结点冲突。其次,如果这个结点在进入的每一个网络中使用相同的主机部分,它的运动就可以被追踪,如此一来,隐私便处于危险之中。 - -负责制定因特网标准的组织Internet工程任务组(Internet Engineering Task Force,IETF)[意识到了这个问题](https://tools.ietf.org/html/draft-iesg-serno-privacy-00),这个组织建议取消使用硬件序列号来识别网络上的结点。 - -但实际的实施情况是怎样的呢? - -地址唯一性问题可以通过[重复地址检测(Duplicate Address Detection, DAD)](https://tools.ietf.org/html/rfc4862#section-5.4)机制来解决。当结点为自身创建地址的时候,他首先通过[邻居发现协议(Neighbor Discovery Protocol)](https://tools.ietf.org/html/rfc4861)(一种不同于IPv4 [ARP](https://tools.ietf.org/html/rfc826)协议的机制)来检查另一个结点是否使用了相同的地址。当它发现地址已经被使用,它必须抛弃掉这个地址。 - -解决另一个问题——隐私问题,有一点困难。一个IP地址(无论IPv4或IPv6)由网络部分和主机部分组成(译者注:网络部分用来划分子网,主机部分用来从相应子网中找到具体的主机)。主机查找出相关的网络部分,并且生成主机部分。传统上它只使用了源自网络硬件(MAC)地址的接口识别器。MAC地址在硬件制造的时候就被设置好了,它可以唯一的识别机器。这样就确保了地址的稳定性和唯一性。这对避免地址冲突来说是件好事,但是对隐私来说一点也不好。主机部分在不同网络下保持恒定意味着机器在进入不同网络时可以被唯一的识别。这在协议制定的时候看起来无可非议,但是随着IPv6的流行,人们对于隐私问题的担忧也愈演愈烈。幸运的是,解决办法还是有的。 - -## 进入隐私扩展 - -Pv4的最大问题——地址枯竭,已经不是什么秘密。对IPv6来说,这一点不再成立,事实上,使用IPv6的主机能够相当大方的利用地址。多个IPv6地址对应一块网卡绝对没有任何错误,正好相反,这是一种标准情形。最起码每个结点都有一个“本地连接地址”,它被用来与同一物理链路的结点联络。当网络包含了一个连接其他网络的路由器,这个网络中的每一个结点都有一个与每个直接连接网络联络的地址。如果主机在相同网络有更多的地址,结点(译者注:指路由器)将接受它们全部的传入流量。对于输出连接,它会把地址显示给远程主机,内核会挑选最适合的地址。但到底是哪一个呢? - -隐私扩展可用时,就像[RFC4941](https://tools.ietf.org/html/rfc4941)定义的那样,时常会生成带有随机主机部分的新地址。最新的那个被用于最新的输出连接,与此同时,那些不被使用了的旧地址将被丢弃。这是一个极好的窍略——当固定地址不用于输出连接的时候,主机就不会显示它,但它仍然会接受注意到它的主机的连接。 - -但这也存在美中不足之处——某些应用会把地址与用户识别绑定在一起。让我们来考虑一下这种情形,一个web应用在用户认证的时候生成一个HTTP Cookie,但它只接受实施认证的地址的连接。当内核生成了一个新的临时地址,服务器会拒绝使用这个地址的请求,实际上相当于将用户登出。地址是不是建立用户认证的合适机制值得商榷,但这确实是现实中应用程序正在做的。 - -## 解救之道——隐私固定寻址 - -解决这个问题可能需要另辟蹊径。唯一的(当然咯)地址确实有必要,对于特定网络来说是稳定的,但当用户进入了另一个网络后仍然会变,这样的话追踪就变得几乎不可能。RFC7217介绍了一种如上所述的机制。 - -创建隐私固定地址依赖于伪随机值,这个随机值只被主机本身知晓,它不会显示给网络上的其他主机。这个随机值随后被一个密码安全算法加密,一起被加密的还有一些与网络连接的特殊值。这些值包含:用以标识网卡的标识符;网络前缀;对于这个网络来说有可能的其他特殊值,例如无线的SSID。使用安全值使其他主机很难预测结果地址,与此同时,当进入不同的网络时,网络的特殊数据会让地址变得不同。 - -这也巧妙的解决了地址重复问题。因为有随机值的存在,冲突也不太可能发生。万一发生了冲突,结果地址会得到重复地址检测失败的记录,这时会生成一个不同的地址而不会断开网络连接。看,这种方式很聪明吧。 - -使用隐私固定地址一点儿也不会妨碍隐私扩展。你可以在使用RFC4941所描述的临时地址的同时使用[RFC7217](https://tools.ietf.org/html/rfc7217)中的固定地址。 - -## 网络管理器处于什么样的状况? - -我们已经在网络管理器1.0.4版本中实现了隐私扩展。在这个版本中,隐私扩展默认开启。你可以用ipv6.ip6-privacy参数来控制它。 - -在网络管理器1.2版本中,我们将会加入固定隐私寻址。应该指出的是,目前的隐私扩展还不符合这种需求。我们可以使用ipv6.addr-gen-mode参数来控制这个特性。如果它被设置成固定隐私,那么将会使用固定隐私寻址。设置成“eui64”或者干脆不设置它将会保持传统的默认寻址方式。 - -敬请期待明年,也就是2016年年初网络管理器1.2版本的发布吧!如果你想尝试一下最新的版本,不妨试试Fedora Rawhide,它最终会变成Fedora24。 - -*我想感谢Hannes Frederic Sowa,他给了我很有价值的反馈。如果没有他的帮助,这篇文章的作用将会逊色很多。另外,Hannes也是RFC7217所描述机制的内核实现者,当网络管理器不起作用的时候,它将发挥作用。* - --------------------------------------------------------------------------------- - -via: https://blogs.gnome.org/lkundrak/2015/12/03/networkmanager-and-privacy-in-the-ipv6-internet/ -作者:[Lubomir Rintel] -译者:[itsang](https://github.com/itsang) -校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a0b2c61f80597dddd3648001802fdaa99d2e84ce Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Thu, 21 Jan 2016 10:40:12 +0800 Subject: [PATCH 0883/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1126 Microsoft and Linux--True Romance or Toxic Love.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md index 8659cd787c..41d68798ce 100644 --- a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md +++ b/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md @@ -1,12 +1,19 @@ sonofelice translating Microsoft and Linux: True Romance or Toxic Love? +微软和 Linux :真正的浪漫还是有毒的爱情?(微软和Linux的爱恨情仇) ================================================================================ +时不时的我们会读到一个能让你喝咖啡呛到或者把热拿铁喷到你显示器上的新闻故事。微软最近宣布的对Linux的钟爱就是这样一个鲜明的例子。 Every now and then, you come across a news story that makes you choke on your coffee or splutter hot latte all over your monitor. Microsoft's recent proclamations of love for Linux is an outstanding example of such a story. +从常识来讲,微软和自由开源软件(FOSS)运动就是恒久的敌人。在很多人眼里,微软体现了过分的贪婪,而这正为自由开源软件运动(FOSS)所拒绝。另外,之前微软就已经给自由开源软件社区贴上了"一伙强盗"的标签。 + Common sense says that Microsoft and the FOSS movement should be perpetual enemies. In the eyes of many, Microsoft embodies most of the greedy excesses that the Free Software movement rejects. In addition, Microsoft previously has labeled Linux as a cancer and the FOSS community as a "pack of thieves". +我们能够理解为什么微软一直以来都害怕免费的操作系统。免费操作系统结合挑战微软核心产品线的开源应用时,就威胁到了微软在台式机和笔记本电脑的控制地位。 + We can understand why Microsoft has been afraid of a free operating system. When combined with open-source applications that challenge Microsoft's core line, it threatens Microsoft's grip on the desktop/laptop market. +尽管微软有对在台式机主导地位的担忧,在网络服务器市场 Linux 却有着最高的影响力。今天,大多数的服务器都是Linux系统。包括世界上最繁忙的站点服务器。 In spite of Microsoft's fears over its desktop dominance, the Web server marketplace is one arena where Linux has had the greatest impact. Today, the majority of Web servers are Linux boxes. This includes most of the world's busiest sites. The sight of so much unclaimed licensing revenue must be painful indeed for Microsoft. Handheld devices are another realm where Microsoft has lost ground to free software. At one point, its Windows CE and Pocket PC operating systems were at the forefront of mobile computing. Windows-powered PDA devices were the shiniest and flashiest gadgets around. But, that all ended when Apple released its iPhone. Since then, Android has stepped into the limelight, with Windows Mobile largely ignored and forgotten. The Android platform is built on free and open-source components. From a86ab7a0f0fcade07be81a97a3d3338441246dc6 Mon Sep 17 00:00:00 2001 From: zpl Date: Fri, 22 Jan 2016 17:43:23 +0800 Subject: [PATCH 0884/1710] [translated] 20151206 Supporting secure DNS in glibc.md --- ...20151206 Supporting secure DNS in glibc.md | 47 ------------------- ...20151206 Supporting secure DNS in glibc.md | 46 ++++++++++++++++++ 2 files changed, 46 insertions(+), 47 deletions(-) delete mode 100644 sources/tech/20151206 Supporting secure DNS in glibc.md create mode 100644 translated/tech/20151206 Supporting secure DNS in glibc.md diff --git a/sources/tech/20151206 Supporting secure DNS in glibc.md b/sources/tech/20151206 Supporting secure DNS in glibc.md deleted file mode 100644 index 0547719a72..0000000000 --- a/sources/tech/20151206 Supporting secure DNS in glibc.md +++ /dev/null @@ -1,47 +0,0 @@ -zpl1025 -Supporting secure DNS in glibc -======================== - -Credit: Jonathan Corbet - -One of the many weak links in Internet security is the domain name system (DNS); it is subject to attacks that, among other things, can mislead applications regarding the IP address of a system they wish to connect to. That, in turn, can cause connections to go to the wrong place, facilitating man-in-the-middle attacks and more. The DNSSEC protocol extensions are meant to address this threat by setting up a cryptographically secure chain of trust for DNS information. When DNSSEC is set up properly, applications should be able to trust the results of domain lookups. As the discussion over an attempt to better integrate DNSSEC into the GNU C Library shows, though, ensuring that DNS lookups are safe is still not a straightforward problem. - -In a sense, the problem was solved years ago; one can configure a local nameserver to perform full DNSSEC verification and use that server via glibc calls in applications. DNSSEC can even be used to increase security in other areas; it can, for example, carry SSH or TLS key fingerprints, allowing applications to verify that they are talking to the right server. Things get tricky, though, when one wants to be sure that DNS results claiming to have DNSSEC verification are actually what they claim to be — when one wants the security that DNSSEC is meant to provide, in other words. - -The /etc/resolv.conf problem - -Part of the problem, from the glibc perspective, is that glibc itself does not do DNSSEC verification. Instead, it consults /etc/resolv.conf and asks the servers found therein to do the lookup and verification; the results are then returned to the application. If the application is using the low-level res_query() interface, those results may include the "authenticated data" (AD) flag (if the nameserver has set it) indicating that DNSSEC verification has been successfully performed. But glibc knows nothing about the trustworthiness of the nameserver that has provided those results, so it cannot tell the application anything about whether they should really be trusted. - -One of the first steps suggested by glibc maintainer Carlos O'Donell is to add an option (dns-strip-dnssec-ad-bit) to the resolv.conf file telling glibc to unconditionally remove the AD bit. This option could be set by distributions to indicate that the DNS lookup results cannot be trusted at a DNSSEC level. Once things have been set up so that the results can be trusted, that option can be removed. In the meantime, though, applications would have a way to judge the DNS lookup results they get from glibc, something that does not exist now. - -What would a trustworthy setup look like? The standard picture looks something like this: there is a local nameserver, accessed via the loopback interface, as the only entry in /etc/resolv.conf. That nameserver would be configured to do verification and, in the case that verification fails, simply return no results at all. There would, in almost all cases, be no need to worry about whether applications see the AD bit or not; if the results are not trustworthy, applications will simply not see them at all. A number of distributions are moving toward this model, but the situation is still not as simple as some might think. - -One problem is that this scheme makes /etc/resolv.conf into a central point of trust for the system. But, in a typical Linux system, there are no end of DHCP clients, networking scripts, and more that will make changes to that file. As Paul Wouters pointed out, locking down this file in the short term is not really an option. Sometimes those changes are necessary: when a diskless system is booting, it may need name-resolution service before it is at a point where it can start up its own nameserver. A system's entire DNS environment may change depending on which network it is attached to. Systems in containers may be best configured to talk to a nameserver on the host. And so on. - -So there seems to be a general belief that /etc/resolv.conf cannot really be trusted on current systems. Ideas to add secondary configuration files (/etc/secure-resolv.conf or whatever) have been floated, but they don't much change the basic nature of the situation. Beyond that, some participants felt that even a local nameserver running on the loopback interface is not really trustworthy; Zack Weinberg suggested that administrators might intentionally short out DNSSEC validation, for example. - -Since the configuration cannot be trusted on current systems, the reasoning goes, glibc needs to have a way to indicate to applications when the situation has improved and things can be trusted. That could include the AD-stripping option described above (or, conversely, an explicit "this nameserver is trusted" option); that, of course, would require that the system be locked down to a level where surprising changes to /etc/resolv.conf no longer happen. A variant, as suggested by Petr Spacek, is to have a way for an application to ask glibc whether it is talking to a local nameserver or not. - -Do it in glibc? - -An alternative would be to dispense with the nameserver and have glibc do DNSSEC validation itself. There is, however, resistance to putting a big pile of cryptographic code into glibc itself. That would increase the size of the library and, it is felt, increase the attack surface of any application using it. A variant of this idea, suggested by Zack, would be to put the validation code into the name-service caching daemon (nscd) instead. Since nscd is part of glibc, it is under the control of the glibc developers and there could be a certain amount of confidence that DNSSEC validation is being performed properly. The location of the nscd socket is well known, so the /etc/resolv.confissues don't come into play. Carlos worried, though, that this approach might deter adoption by users who do not want the caching features of nscd; in his mind, that seems to rule out the nscd option. - -So, in the short term, at least, it seems unlikely that glibc will take on the full task of performing validated DNSSEC lookups. That means that, if security-conscious applications are going to use glibc for their name lookups, the library will have to provide an indication of how trustworthy the results received from a separate nameserver are. And that will almost certainly require explicit action on the part of the distributor and/or system administrator. As Simo Sorce put it: - -A situation in which glibc does not use an explicit configuration option to signal applications that it is using a trusted resolver is not useful ... no scratch that, it is actively harmful, because applications developers will quickly realize they cannot trust any information coming from glibc and will simply not use it for DNSSEC related information. - -Configuring a system to properly use DNSSEC involves change to many of the components of that system — it is a distribution-wide problem that will take time to solve fully. The role that glibc plays in this transition is likely to be relatively small, but it is an important one: glibc is probably the only place where applications can receive some assurance that their DNS results are trustworthy without implementing their own resolver code. Running multiple DNSSEC implementations on a system seems like an unlikely path to greater security, so it would be good to get this right. - -The glibc project has not yet chosen a path by which it intends to get things right, though some sort of annotation in /etc/resolv.conf looks like a likely outcome. Any such change would then have to get into a release; given the conservative nature of glibc development, it may already be late for the 2.23 release, which is likely to happen in February. So higher DNSSEC awareness in glibc may not happen right away, but there is at least some movement in that direction. - ---------------------------- - -via: https://lwn.net/Articles/663474/ - -作者:Jonathan Corbet - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151206 Supporting secure DNS in glibc.md b/translated/tech/20151206 Supporting secure DNS in glibc.md new file mode 100644 index 0000000000..c66a28257c --- /dev/null +++ b/translated/tech/20151206 Supporting secure DNS in glibc.md @@ -0,0 +1,46 @@ +通过修改 glibc 支持 DNS 加密 +======================== + +感谢:Jonathan Corbet + +域名解析系统(DNS)是因特网安全许多薄弱环节之一;可以误导应用程序所访问的主机相应的 IP 地址。也就是说,会连接到错误的位置,可以引发中间人攻击以及更多攻击。而 DNSSEC 扩展协议是通过为 DNS 信息建立一条加密的可信通道来解决这个漏洞。在正确地配置好 DNSSEC 后,应用程序将可以得到可靠的主机查询信息。通过关于尝试将 DNSSEC 更好地集成到 GNU C 库里的讨论,确保 DNS 查询信息安全并不是那么简单。 + +某种意义上来说,这个问题多年以前就解决了,我们可以配置一个本地域名服务实现完整的 DNSSEC 认证并允许应用程序通过 glibc 函数来使用该服务。DNSSEC 甚至还可以用于提高其他领域的安全性,比如,它可以携带 SSH 或 TLS 密钥指纹,让应用程序可以确认其在与正确的服务器通话。不过,当我们希望确认这条自称带有 DNSSEC 认证的 DNS 结果是不是真的已通过认证的时候 - 也就是说,当我们想依赖 DNSSEC 所承诺的安全的时候,事情变得有点复杂。 + +/etc/resolv.conf 问题 + +从 glibc 的角度来看,这个问题一部分是因为 glibc 本身并没有做 DNSSEC 认证。而是引用 /etc/resolv.conf 文件,从该文件里读出的服务器来做解析以及认证,再将结果返回给应用程序。如果应用程序使用底层 res_query() 接口,那结果中将会包含“已认证数据”(AD)标识(如果域名服务器设定了的话)以表示 DNSSEC 认证已经成功。但是 glibc 却完全不知道提供这些结果的域名服务器的信用,所以它其实并不能告诉应用程序结果是否真的可靠。 + +由 glibc 的维护者 Carlos O'Donell 提出的建议是在 resolv.conf 文件里增加一个选项(dns-strip-dnssec-ad-bit)告诉 glibc 无条件移除 AD 标识。这个选项可以由各发行版设定,表示 DNSSEC 级别的 DNS 查询结果并不可靠。而一旦建立好合适的环境可以获得可靠的查询结果后,再移除这个选项。这样一来,虽然问题还没有完全解决,至少应用程序有依据来评价从 glibc 获取的 DNS 查询结果的可靠性。 + +一个可靠的环境配置应该是什么样?标准情况应该和这个差不太多:有一个本地域名服务器,通过环路接口访问,作为访问 /etc/resolv.conf 文件的唯一入口。这个域名服务器应该配置来做认证,而在认证失败后就只是简单地不返回任何结果。绝大多数情况下,应用程序就不再需要关心 AD 标识,如果结果不可靠,应用程序就根本看不到。一些发行版已经偏向这种模型,不过情况仍然不像一些人所设想的没那么简单。 + +其中一个问题是,这种方式将 /etc/resolv.conf 文件放到整个系统可信任度的中心。但是,在一个典型的 Linux 系统里,有无数的 DHCP 客户端、网络脚本以及其他更多,可以修改这个文件。就像 Paul Wouters 所指出的,在短时间内锁定这个文件是不可能的。有时候这种改变是必须的:在一个无盘系统启动的时候,在自身的域名服务器启动之前也是需要域名服务的;一个系统的整个 DNS 环境也会根据所连接的网络不同而有所改变;运行在容器里的系统也最好是配制成使用宿主机的域名服务器;等等。 + +所以,现在一般认为,现有系统里的 /etc/resolv.conf 文件并不可信。于是有人提出增加另一个配置文件(/etc/secure-resolv.conf 或其他什么),但这并没有从根本上解决问题。除此之外,有些参与人员觉得就算有一个运行在环路接口上的域名服务器也不是真正可靠,比如 Zack Weinberg 甚至建议系统管理员可以有意禁用 DNSSEC 认证。 + +既然当前系统里的配置不足以信任,那可以这样推断,在情况有改善能够取得可信的结果后,glibc 需要有一种方式来通知应用程序。可以是上面讨论的屏蔽 AD 标识的方式(或者与之相反,增加一个显示的“此域名服务器可以信任”选项);当然,这都需要一定程度上锁定系统以免 /etc/resolv.conf 受到任何不可预计的修改。按 Petr Spacek 的建议,还有一种引申方式,就是提供一种途径允许应用程序查询 glibc 当前通讯的是不是本地域名服务器。 + +在 glibc 里来处理? + +另一种方式是去掉域名服务器,而是让 glibc 本身来做 DNSSEC 认证。不过,把这么大一坨加密相关代码放进 glibc 也是有很大阻力。这样将增加库本身的大小,从而感觉会增加使用它的应用程序的受攻击面积。这个方向再引申一下,由 Zack 提出的建议,可以把认证相关代码放到域名服务缓冲守护进程(nscd)里。因为 nscd 也是 glibc 的一部分,由 glibc 开发人员维护,因此在一定程度上可以相信能正确执行 DNSSEC 认证。而且 nscd 的通讯 socket 所在位置也是公开的,所以可以不考虑 /etc/resolv.conf 问题。不过,Carlos 担心这种方式不能让那些不想使用 nscd 缓存功能的用户所接受;在他看来,基本可以排除 nscd 的方式。 + +所以,至少近期内,glibc 不太可能全部执行带 DNSSEC 认证的整个查询过程。这意味着,如果一个有安全考虑的应用要使用 glibc 库来查询域名,库将需要提供一个标识来评价从独立域名服务器返回的结果有多大程度的可靠性。这几乎肯定需要发行商或系统管理员做出一些明确的改动。就像 Simo Sorce 说的那样: + +如果 glibc 不使用明确的配置选项来通知应用程序它所用的域名解析是可信的,不会有什么用。。。不改一下还有很大弊端,因为应用程序开发者将马上认识到他们不能信任从 glibc 获取的任何信息,从而在处理 DNSSEC 相关信息时就简单地不用它。 + +要配置一个系统能正常使用 DNSSEC 需要改动该系统的很多组件 - 这是一个发行版范围的问题,需要时间来完全解决。在这个转变过程中 glibc 所扮演的角色很可能会比较小,但是很重要的一部分:如果应用程序不实现一套自己的域名解析代码,glibc 很可能是保证 DNS 结果可信的唯一方式。在一个系统中运行多个 DNSSEC 实现方式看起来不像是一种安全的方式,所以最好还是把事情做对了。 + +glibc 项目目前并没有确定用哪种方式来做这个事情,虽然从 /etc/resolv.conf 文件里的某些标记看上去快好了。这种改动应该需要发布新版本;考虑到 glibc 开发的保守天性,很可能来不及加入预计二月份发布的 2.23 版本了。所以 glibc 中暂时还不会有更高安全性的 DNSSEC ,不过在这个方向上也有一些进展了。 + +--------------------------- + +via: https://lwn.net/Articles/663474/ + +作者:Jonathan Corbet + +译者:[zpl1025](https://github.com/zpl1025) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6a81bf7bd2f301b6859e365f54816020255664cc Mon Sep 17 00:00:00 2001 From: zpl Date: Fri, 22 Jan 2016 17:51:31 +0800 Subject: [PATCH 0885/1710] [translating] 20151202 A new Mindcraft moment.md --- sources/tech/20151202 A new Mindcraft moment.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151202 A new Mindcraft moment.md b/sources/tech/20151202 A new Mindcraft moment.md index 79930e8202..92c645ea4b 100644 --- a/sources/tech/20151202 A new Mindcraft moment.md +++ b/sources/tech/20151202 A new Mindcraft moment.md @@ -1,3 +1,4 @@ +zpl1025 A new Mindcraft moment? ======================= From c4b1535743d241474dc5bad34d4a0b23f4e999ad Mon Sep 17 00:00:00 2001 From: SonoFelice Date: Sun, 24 Jan 2016 17:26:59 +0800 Subject: [PATCH 0886/1710] =?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 and Linux--True Romance or Toxic Love.md | 85 ------------------- ...t and Linux--True Romance or Toxic Love.md | 77 +++++++++++++++++ 2 files changed, 77 insertions(+), 85 deletions(-) delete mode 100644 sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md create mode 100644 translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md diff --git a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md deleted file mode 100644 index 41d68798ce..0000000000 --- a/sources/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md +++ /dev/null @@ -1,85 +0,0 @@ -sonofelice translating -Microsoft and Linux: True Romance or Toxic Love? -微软和 Linux :真正的浪漫还是有毒的爱情?(微软和Linux的爱恨情仇) -================================================================================ -时不时的我们会读到一个能让你喝咖啡呛到或者把热拿铁喷到你显示器上的新闻故事。微软最近宣布的对Linux的钟爱就是这样一个鲜明的例子。 -Every now and then, you come across a news story that makes you choke on your coffee or splutter hot latte all over your monitor. Microsoft's recent proclamations of love for Linux is an outstanding example of such a story. - -从常识来讲,微软和自由开源软件(FOSS)运动就是恒久的敌人。在很多人眼里,微软体现了过分的贪婪,而这正为自由开源软件运动(FOSS)所拒绝。另外,之前微软就已经给自由开源软件社区贴上了"一伙强盗"的标签。 - -Common sense says that Microsoft and the FOSS movement should be perpetual enemies. In the eyes of many, Microsoft embodies most of the greedy excesses that the Free Software movement rejects. In addition, Microsoft previously has labeled Linux as a cancer and the FOSS community as a "pack of thieves". - -我们能够理解为什么微软一直以来都害怕免费的操作系统。免费操作系统结合挑战微软核心产品线的开源应用时,就威胁到了微软在台式机和笔记本电脑的控制地位。 - -We can understand why Microsoft has been afraid of a free operating system. When combined with open-source applications that challenge Microsoft's core line, it threatens Microsoft's grip on the desktop/laptop market. - -尽管微软有对在台式机主导地位的担忧,在网络服务器市场 Linux 却有着最高的影响力。今天,大多数的服务器都是Linux系统。包括世界上最繁忙的站点服务器。 -In spite of Microsoft's fears over its desktop dominance, the Web server marketplace is one arena where Linux has had the greatest impact. Today, the majority of Web servers are Linux boxes. This includes most of the world's busiest sites. The sight of so much unclaimed licensing revenue must be painful indeed for Microsoft. - -Handheld devices are another realm where Microsoft has lost ground to free software. At one point, its Windows CE and Pocket PC operating systems were at the forefront of mobile computing. Windows-powered PDA devices were the shiniest and flashiest gadgets around. But, that all ended when Apple released its iPhone. Since then, Android has stepped into the limelight, with Windows Mobile largely ignored and forgotten. The Android platform is built on free and open-source components. - -The rapid expansion in Android's market share is due to the open nature of the platform. Unlike with iOS, any phone manufacturer can release an Android handset. And, unlike with Windows Mobile, there are no licensing fees. This has been really good news for consumers. It has led to lots of powerful and cheap handsets appearing from manufacturers all over the world. It's a very definite vindication of the value of FOSS software. - -Losing the battle for the Web and mobile computing is a brutal loss for Microsoft. When you consider the size of those two markets combined, the desktop market seems like a stagnant backwater. Nobody likes to lose, especially when money is on the line. And, Microsoft does have a lot to lose. You would expect Microsoft to be bitter about it. And in the past, it has been. - -Microsoft has fought back against Linux and FOSS using every weapon at its disposal, from propaganda to patent threats, and although these attacks have slowed the adoption of Linux, they haven't stopped it. - -So, you can forgive us for being shocked when Microsoft starts handing out t-shirts and badges that say "Microsoft Loves Linux" at open-source conferences and events. Could it be true? Does Microsoft really love Linux? - -Of course, PR slogans and free t-shirts do not equal truth. Actions speak louder than words. And when you consider Microsoft's actions, Microsoft's stance becomes a little more ambiguous. - -On the one hand, Microsoft is recruiting hundreds of Linux developers and sysadmins. It's releasing its .NET Core framework as an open-source project with cross-platform support (so that .NET apps can run on OS X and Linux). And, it is partnering with Linux companies to bring popular distros to its Azure platform. In fact, Microsoft even has gone so far as to create its own Linux distro for its Azure data center. - -On the other hand, Microsoft continues to launch legal attacks on open-source projects directly and through puppet corporations. It's clear that Microsoft hasn't had some big moral change of heart over proprietary vs. free software, so why the public declarations of adoration? - -To state the obvious, Microsoft is a profit-making entity. It's an investment vehicle for its shareholders and a source of income for its employees. Everything it does has a single ultimate goal: revenue. Microsoft doesn't act out of love or even hate (although that's a common accusation). - -So the question shouldn't be "does Microsoft really love Linux?" Instead, we should ask how Microsoft is going to profit from all this. - -Let's take the open-source release of .NET Core. This move makes it easy to port the .NET runtime to any platform. That extends the reach of Microsoft's .NET framework far beyond the Windows platform. - -Opening .NET Core ultimately will make it possible for .NET developers to produce cross-platform apps for OS X, Linux, iOS and even Android--all from a single codebase. - -From a developer's perspective, this makes the .NET framework much more attractive than before. Being able to reach many platforms from a single codebase dramatically increases the potential target market for any app developed using the .NET framework. - -What's more, a strong Open Source community would provide developers with lots of code to reuse in their own projects. So, the availability of open-source projects would make the .NET framework. - -On the plus side, opening .NET Core reduces fragmentation across different platforms and means a wider choice of apps for consumers. That means more choice, both in terms of open-source software and proprietary apps. - -From Microsoft's point of view, it would gain a huge army of developers. Microsoft profits by selling training, certification, technical support, development tools (including Visual Studio) and proprietary extensions. - -The question we should ask ourselves is does this benefit or hurt the Free Software community? - -Widespread adoption of the .NET framework could mean the eventual death of competing open-source projects, forcing us all to dance to Microsoft's tune. - -Moving beyond .NET, Microsoft is drawing a lot of attention to its Linux support on its Azure cloud computing platform. Remember, Azure originally was Windows Azure. That's because Windows Server was the only supported operating system. Today, Azure offers support for a number of Linux distros too. - -There's one reason for this: paying customers who need and want Linux services. If Microsoft didn't offer Linux virtual machines, those customers would do business with someone else. - -It looks like Microsoft is waking up to the fact that Linux is here to stay. Microsoft cannot feasibly wipe it out, so it has to embrace it. - -This brings us back to the question of why there is so much buzz about Microsoft and Linux. We're all talking about it, because Microsoft wants us to think about it. After all, all these stories trace back to Microsoft, whether it's through press releases, blog posts or public announcements at conferences. The company is working hard to draw attention to its Linux expertise. - -What other possible purpose could be behind Chief Architect Kamala Subramaniam's blog post announcing Azure Cloud Switch? ACS is a custom Linux distro that Microsoft uses to automate the configuration of its switch hardware in the Azure data centers. - -ACS is not publicly available. It's intended for internal use in the Azure data center, and it's unlikely that anyone else would be able to find a use for it. In fact, Subramaniam states the same thing herself in her post. - -So, Microsoft won't be making any money from selling ACS, and it won't attract a user base by giving it away. Instead, Microsoft gets to draw attention to Linux and Azure, strengthening its position as a Linux cloud computing platform. - -Is Microsoft's new-found love for Linux good news for the community? - -We shouldn't be slow to forget Microsoft's mantra of Embrace, Extend and Exterminate. Right now, Microsoft is very much in the early stages of embracing Linux. Will Microsoft seek to splinter the community through custom extensions and proprietary "standards"? - -Let us know what you think in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.linuxjournal.com/content/microsoft-and-linux-true-romance-or-toxic-love-0 - -作者:[James Darvell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/users/james-darvell \ No newline at end of file diff --git a/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md new file mode 100644 index 0000000000..d16ed99114 --- /dev/null +++ b/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md @@ -0,0 +1,77 @@ +微软和 Linux :真正的浪漫还是有毒的爱情? +================================================================================ +时不时的我们会读到一个能让你喝咖啡呛到或者把热拿铁喷到你显示器上的新闻故事。微软最近宣布的对 Linux 的钟爱就是这样一个鲜明的例子。 + +从常识来讲,微软和自由开源软件(FOSS)运动就是恒久的敌人。在很多人眼里,微软体现了过分的贪婪,而这正为自由开源软件运动(FOSS)所拒绝。另外,之前微软就已经给自由开源软件社区贴上了"一伙强盗"的标签。 + +我们能够理解为什么微软一直以来都害怕免费的操作系统。免费操作系统结合挑战微软核心产品线的开源应用时,就威胁到了微软在台式机和笔记本电脑市场的控制地位。 + +尽管微软有对在台式机主导地位的担忧,在网络服务器市场 Linux 却有着最高的影响力。今天,大多数的服务器都是 Linux 系统。包括世界上最繁忙的站点服务器。对微软来说,看到这么多没有被声明的许可证收入一定是非常痛苦的。 + +掌上设备是微软输给免费软件的另一个领域。曾几何时,微软的 Windows CE 和 Pocket PC 操作系统走在移动计算的前沿。Windows PDA 设备是最闪亮的和豪华的产品。但是这一切在苹果公司发布了iphone之后都结束了。从那时起,安卓已经开始进入公众视野,Windows的移动产品开始被忽略被遗忘。而安卓平台是建立在免费开源的组件的基础上的。 + +由于安卓平台的开放性,安卓的市场份额在迅速扩大。不像 IOS,任何一个手机制造商都可以发布安卓手机。也不像Windows手机,安卓没有许可费用。这对消费者来说是件好事。这也导致了许多强大却又价格低廉的手机制造商在世界各地涌现。这非常明确的证明了自由开源软件(FOSS)的价值。 + +在服务器和移动计算的角逐中失利对微软来说是非常惨重的损失。考虑一下服务器和移动计算这两个加起来所占有的市场大小,台式机市场似乎是死水一潭。没有人喜欢失败,尤其是涉及到金钱。并且,微软确实有许多正在慢慢失去。你可能期望着微软自尝苦果。在过去,确实如此。 + +微软使用了各种可以支配的手段来对 Linux 和自由开源软件(FOSS)进行反击,从宣传到专利威胁。尽管这种攻击确实减慢了适配 Linux 的步伐,但却从来没有让 Linux 的脚步停下。 + +所以,当微软在开源大会和重大事件上拿出印有"Microsoft Loves Linux"的T-恤和徽章时,请原谅我们表现出来的震惊。这是真的吗?微软真的爱 Linux ? + +当然,公关的口号和免费的T-恤并不代表真理。行动胜于雄辩。当你思考一下微软的行动时,微软的立场就变得有点模棱两可了。 + +一方面,微软招募了几百名 Linux 开发者和系统管理员。将 .NET 核心框架作为一个开源的项目进行了发布,并提供了跨平台的支持(这样 .NET 就可以跑在 OS X 和 Linux 上了)。并且,微软与 Linux 公司合作把最流行的发型版本放到了Azure平台上。事实上,微软已经走的如此之远以至于要为Azure数据中心开发自己的Linux发行版了。 + +另一方面,微软继续直接通过法律或者傀儡公司来对开源项目进行攻击。很明显,微软在与自由软件的所有权较量上并没有发自内心的进行大的道德转变。那为什么要公开生命对Linux的钟爱之情呢? + +一个显而易见的事实:微软是一个经营性实体。对股东来说是一个投资工具,对雇员来说是收入来源。微软所做的只有一个终极目标:盈利。微软并没有表现出来爱或者恨(尽管这是一个最常见的指控)。 + +所以问题不应该是"微软真的爱 Linux 吗?"相反,我们应该问,微软是怎么从这一切中获利的。 + +让我们以 .NET 核心框架的开源发行为例。这一举动使得任何平台都很容易进入 .NET 的运行时环境。这使得微软的.NET框架所涉及到的范围远远大于Windows平台。 + +开放 .NET 的核心包,最终使得 .NET 开发者开发跨平台的app成为可能,比如OS X,Linux甚至安卓——都基于同一个核心代码库。 + +从开发者角度来讲,这使得.NET框架比之前更有吸引力了。能够从单一的代码库就可以触及到多个平台,使得使用.NET框架开发的任何app戏剧性的扩大了潜在的目标市场。 + +另外,一个强大的开源社区能够提供给开发者一些代码来在他们自己的项目中进行服用。所以,开源项目的可利用性也将会成就.NET框架。 + +更进一步讲,开放 .NET 的核心代码能够减少跨越不同平台锁产生的碎片,意味着对消费者来说有对app更广的选择。无论是开源软件还是专用的app,都有更多的选择。 + +从微软的角度来讲,会得到一队开发者大军。微软可以通过销售培训、证书、技术支持、开发者工具(包括Visual Studio)和应用扩展来获利。 + +我们应该自问的是,这对自由软件社区有利还是有弊? + +.NET 框架的大范围适用意味着许多参与竞争的开源项目的消亡,迫使我们会跟着微软的节奏走下去。 + +先抛开.NET不谈,微软正在花费大量的精力在Linux对Azure云计算平台的支持上。要记得,Azure最初是Windows的Azure。Windows服务器是唯一能够支持Azure的操作系统。今天,Azure也提供了对多个Linux发行版的支持。 + +关于此,有一个原因:付费给需要或者想要Linux服务的顾客。如果微软不提供Linux虚拟机,那些顾客就会跟别人合作了。 + +看上去好像是微软意识到"Linux就在这里"的这样一个现实。微软不能真正的消灭它,所以必须接收它。 + +这又把我们带回到那个问题:关于微软和Linux为什么有这么多的流言?我们在谈论这个问题,因为微软希望我们思考这个问题。毕竟,所有这些谈资都会追溯到微软,不管是在新闻稿、博客还是会议上的公开声明。微软在努力吸引大家对其在Linux专业知识方面的注意力。 + +首席架构师 Kamala Subramaniam 的博文声明Azure Cloud Switch背后的其他企图会是什么?ACS是一个定制的Linux发行版。微软用它来对Azure数据中心的开关硬件进行自动配置。 + +ACS不是公开的。它是用于Azure内部使用的。别人也不太可能找到这个发行版其他的用途。事实上,Subramaniam 在她的博文中也表述了同样的观点。 + +所以,微软不会通过卖ACS来获利,也不会因为放弃使用而获得一个用户基础。相反,微软在Linux和Azure上花费经历,加强其在Linux云计算平台方面的地位。 + +微软最近迷上Linux对社区来说是好消息吗? + +我们不应该慢慢忘记微软的"拥抱、扩展、消灭"的诅咒。现在,微软处在拥抱Linux的初期阶段。微软会通过定制扩展和专有标准来分裂社区吗? + +赶紧评论吧,让我们知道你是怎么想的。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/microsoft-and-linux-true-romance-or-toxic-love-0 + +作者:[James Darvell][a] +译者:[sonofelice](https://github.com/sonofelice) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/james-darvell \ No newline at end of file From 0d8d7f05e6e52f08810354fba489805fc61a8077 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 Jan 2016 07:23:57 +0800 Subject: [PATCH 0887/1710] PUB:20151204 Install and Configure Munin monitoring server in Linux @ictlyh --- ...figure Munin monitoring server in Linux.md | 162 ++++++++++++++++++ ...figure Munin monitoring server in Linux.md | 145 ---------------- 2 files changed, 162 insertions(+), 145 deletions(-) create mode 100644 published/20151204 Install and Configure Munin monitoring server in Linux.md delete mode 100644 translated/tech/20151204 Install and Configure Munin monitoring server in Linux.md diff --git a/published/20151204 Install and Configure Munin monitoring server in Linux.md b/published/20151204 Install and Configure Munin monitoring server in Linux.md new file mode 100644 index 0000000000..9845ad8503 --- /dev/null +++ b/published/20151204 Install and Configure Munin monitoring server in Linux.md @@ -0,0 +1,162 @@ +在 Linux 上安装和配置 Munin 监控服务器 +================================================================================ +![](http://www.linuxnix.com/wp-content/uploads/2015/12/munin_page.jpg) + +Munin 是一款类似 [RRD tool][1] 的非常棒的系统监控工具,它能提供给你多方面的系统性能信息,例如 **磁盘、网络、进程、系统和用户**。这些是 Munin 默认监控的内容。 + +### Munin 如何工作? ### + +Munin 以客户端-服务器模式运行。主服务器上运行的 Munin 服务器进程会从本地运行的客户端守护进程(Munin 可以监控它自己的资源)或者远程客户端(Munin 可以监控上百台机器)收集数据,然后在它的 web 界面上以图形的方式显示出来。 + +### 在 nutshell 中配置 Munin ### + +要配置服务器端和客户端,我们需要完成以下两步。 + +1. 安装 Munin 服务器软件包并配置,使得它能从客户端收集数据。 +2. 安装 Munin 客户端,使得服务器能连接到客户端守护进程进行数据收集。 + +### 在 Linux 上安装 munin 服务器端 ### + +在基于 Ubuntu/Debian 的机器上安装 Munin 服务器: + + apt-get install munin apache2 + +在基于 Redhat/CentOS 的机器上安装 Munin 服务器: + +在基于 Redhat 的机器上安装 Munin 之前,你需要确保 [启用 EPEL 软件仓库][2],因为基于 Redhat 的机器的软件仓库默认没有 Munin。 + + yum install munin httpd + +### 在 Linux 上配置 Munin 服务器端 ### + +下面是我们要在服务器上启动 Munini 所进行的步骤: + +1. 在 /etc/munin/munin.conf 中添加需要监控的主机详情。 +2. 配置 apache web 服务器使其包括 munin 配置。 +3. 为 web 界面创建用户名和密码 +4. 重启 apache 服务器 + +####步骤 1#### + +在 **/etc/munin/munin.conf** 文件中添加主机条目。调到文件末尾添加要监控的客户端。在这个例子中,我添加了要监控的数据库服务器和它的 IP 地址。 + +示例: + + [db.linuxnix.com] + address 192.168.1.25 + use_node_name yes + +保存文件并退出。 + +####步骤 2#### + +在 /etc/apache2/conf.d 目录中编辑或创建文件 munin.conf 用于包括 Munin 和 Apache 相关的配置。另外注意一点,默认其它和 web 相关的 Munin 配置保存在 /var/www/munin 目录。 + + vi /etc/apache2/conf.d/munin.conf + +内容: + + Alias /munin /var/www/munin + + Order allow,deny + Allow from localhost 127.0.0.0/8 ::1 + AllowOverride None + Options ExecCGI FollowSymlinks + AddHandler cgi-script .cgi + DirectoryIndex index.cgi + AuthUserFile /etc/munin/munin.passwd + AuthType basic + AuthName "Munin stats" + require valid-user + + ExpiresActive On + ExpiresDefault M310 + + + +保存文件并退出。 + +####步骤 3#### + +现在为查看 munin 的图示而创建用户名和密码: + + htpasswd -c /etc/munin/munin-htpasswd munin + +**注意**:对于 Redhat/Centos 机器,要访问你的配置文件,需要在每个路径中用 “**httpd**” 替换 “**apache2**”。 + +####步骤 4#### + +重启 Apache 服务器,使得 Munin 配置生效。 + +基于 Ubuntu/Debian : + + service apache2 restart + +基于 Centos/Redhat : + + service httpd restart + +### 在 Linux 上安装和配置 Munin 客户端 ### + +####步骤 1#### + +在 Linux 上安装 Munin 客户端 + + apt-get install munin-node + +**注意**:如果你想监控你的 Munin 服务器端,你也需要在服务器端安装 munin-node。 + +####步骤 2#### + +编辑 munin-node.conf 文件配置客户端。 + + vi /etc/munin/munin-node.conf + +示例: + + allow ^127\.0\.0\.1$ + allow ^10\.10\.20\.20$ + +---------- + + # 监听到哪个地址上 + host * + +---------- + + # 以及哪个端口 + port 4949 + +**注意**: 10.10.20.20 是我的 Munin 服务器,它连接到客户端的 4949 端口获取数据。 + +####步骤 3#### + +在客户端机器中重启 munin-node: + + service munin-node restart + +### 测试连接 ### + +检查你是否能从服务器的连接到客户端的 4949 端口,如果不行,你需要在客户端机器中的防火墙打开该端口。 + + telnet db.linuxnix.com 4949 + +访问 Munin web 页面 + + http://munin.linuxnix.com/munin/index.html + +希望这些能对你配置基本的 Munin 服务器有所帮助。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxnix.com/install-and-configure-munin-monitoring-server-in-linux/ + +作者:[Surendra Anne][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxnix.com/author/surendra/ +[1]:http://www.linuxnix.com/network-monitoringinfo-gathering-tools-in-linux/ +[2]:https://linux.cn/article-2324-1.html diff --git a/translated/tech/20151204 Install and Configure Munin monitoring server in Linux.md b/translated/tech/20151204 Install and Configure Munin monitoring server in Linux.md deleted file mode 100644 index d26c1b0d8e..0000000000 --- a/translated/tech/20151204 Install and Configure Munin monitoring server in Linux.md +++ /dev/null @@ -1,145 +0,0 @@ -在 Linux 上安装和配置 Munin 检测服务器 -================================================================================ -![](http://www.linuxnix.com/wp-content/uploads/2015/12/munin_page.jpg) - -Munin 是一款和 [RRD][1] 类似很好的系统检测工具,它能提供给你多方面的系统性能信息,例如 **磁盘、网络、进程、系统和用户**。这些是 Munin 默认检测的属性。 - -### Munin 如何工作? ### - -Munin 以客户端-服务器模式运行。主服务器上运行的 Munin 服务器进程尝试从本地运行的客户端守护进程(Munin 可以检测它自己的资源)或者远程客户端(Munin 可以检测上百台机器)收集数据,然后在它的 web 页面以图的形式显示出来。 - -### 在 nutshell 中配置 Munin ### - -要配置服务器端和客户端,我们需要完成以下两步。 -1) 安装 Munin 服务器软件包并配置,使得它能从客户端收集数据。 -2) 安装 Munin 客户端使得服务器能连接到客户端守护进程用于收集数据。 - -### 在 Linux 上安装 munin 服务器端 ### - -在基于 Ubuntu/Debian 的机器上安装 Munin 服务器 - - apt-get install munin apache2 - -在基于 Redhat/CentOS 的机器上安装 Munin 服务器。在基于 Redhat 的机器上安装 Munin 之前,你需要确保 [启用 EPEL 软件仓库][2],因为基于 Redhead 的机器它们的软件仓库默认没有 Munin。 - - yum install munin httpd - -### 在 Linux 上配置 Munin 服务器端 ### - -下面是我们要启动服务器按按顺序执行的步骤。 - -1. 在 /etc/munin/munin.conf 中添加需要检测的主机详情 -2. 配置 apache web 服务器使其包括 munin 配置。 -3. 为 web 页面创建用户名和密码 -4. 重启 apache 服务器 - -**步骤 1**: 在 **/etc/munin/munin.conf** 文件中添加主机条目。调到文件末尾添加要检测的客户端。在这个例子中,我添加了要检测的数据库服务器和它的 IP 地址。 - -事例: - - [db.linuxnix.com] - address 192.168.1.25 - use_node_name yes - -保存文件并退出。 - -**步骤 2**: 在 /etc/apache2/conf.d 目录中编辑/创建文件 munin.conf 用于包括 Munin 和 Apache 相关的配置。另外注意一点,默认其它和 web 相关的 Munin 配置保存在 /var/www/munin 目录。 - - vi /etc/apache2/conf.d/munin.conf - -内容: - - Alias /munin /var/www/munin - - Order allow,deny - Allow from localhost 127.0.0.0/8 ::1 - AllowOverride None - Options ExecCGI FollowSymlinks - AddHandler cgi-script .cgi - DirectoryIndex index.cgi - AuthUserFile /etc/munin/munin.passwd - AuthType basic - AuthName "Munin stats" - require valid-user - - ExpiresActive On - ExpiresDefault M310 - - - -保存文件并退出 - -**步骤 3**: 现在为查看 munin 的图示创建用户名和密码: - - htpasswd -c /etc/munin/munin-htpasswd munin - -**注意**:对于 Redhat/Centos 机器,为了访问你的配置文件,需要在每个路径中用 “**httpd**” 替换 “**apache2**”。 - -**步骤 4**: 重启 Apache 服务器,使得 Munin 配置生效。 - -#### 基于 Ubuntu/Debian : #### - - service apache2 restart - -#### 基于 Centos/Redhat : #### - - service httpd restart - -### 在 Linux 上安装和配置 Munin 客户端 ### - -**步骤 1**: 在 Linux 上安装 Munin 客户端 - - apt-get install munin-node - -**注意**:如果你想检测你的 Munin 服务器端,你也需要在那里安装 munin-node。 - -**步骤 2**: 编辑 munin-node.conf 文件配置客户端。 - - vi /etc/munin/munin-node.conf - -事例: - - allow ^127\.0\.0\.1$ - allow ^10\.10\.20\.20$ - ----------- - - # Which address to bind to; - host * - ----------- - - # And which port - port 4949 - -**注意**: 10.10.20.20 是我的 Munin 服务器,它连接到客户端的 4949 端口获取数据。 - -**步骤 3**: 在客户端机器中重启 munin-node - - service munin-node restart - -### 测试连接 ### - -检查你是否能从服务器的连接到客户端的 4949 端口,如果不行,你需要在客户端机器中打开该端口。 - - telnet db.linuxnix.com 4949 - -访问 Munin web 页面 - - http://munin.linuxnix.com/munin/index.html - -希望这些能对你配置基本的 Munin 服务器有所帮助。 - --------------------------------------------------------------------------------- - -via: http://www.linuxnix.com/install-and-configure-munin-monitoring-server-in-linux/ - -作者:[Surendra Anne][a] -译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxnix.com/author/surendra/ -[1]:http://www.linuxnix.com/network-monitoringinfo-gathering-tools-in-linux/ -[2]:http://www.linuxnix.com/how-to-install-and-enable-epel-repo-in-rhel-centos-oracle-scentific-linux/ From 8f69032b711738df010afa5c7acc83400a945bb3 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 Jan 2016 08:04:19 +0800 Subject: [PATCH 0888/1710] PUB:20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples @zky001 --- ...grep Command In Linux or UNIX--Examples.md | 153 ++++++++++++++++++ ...grep Command In Linux or UNIX--Examples.md | 143 ---------------- 2 files changed, 153 insertions(+), 143 deletions(-) create mode 100644 published/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md delete mode 100644 translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/published/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md new file mode 100644 index 0000000000..b48b9675a3 --- /dev/null +++ b/published/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md @@ -0,0 +1,153 @@ +grep 命令系列:如何在 Linux/UNIX 中使用 grep 命令 +========================================== + +我该怎样在 Linux、Apple OS X 及其他类 UNIX 系统中使用 grep 命令,你能给我展示一些简单的例子吗? + +grep 命令用来搜索文本,或从给定的文件中搜索行内包含了给定字符串或单词的文件。通常来说,grep 显示匹配到的行。使用 grep 来搜索包括一个或多个正则表达式匹配到的文本行,然后只显示匹配到的行。grep 被视作在 Linux/ Unix 系统中最有用的命令之一。 + +### 你知道吗 ### + +grep 这个名字,来源于一个 Unix/Linux 中的古老的文本编辑器 ed 中执行相似操作的命令: + + g/re/p + +### grep 命令的语法 ### + +语法如下所示: + + grep 'word' 文件名 + grep 'word' 文件1 文件2 文件3 + grep '字符串1 字符串2' 文件名 + cat 某个文件 | grep '某个东西' + command | grep '某个东西' + command 选项1 | grep '数据' + grep --color '数据' 文件名 + +###怎么样使用 grep 来搜索一个文件### + +搜索 /etc/passwd 文件下的 boo 用户,输入: + + $ grep boo /etc/passwd + +输出内容: + + foo:x:1000:1000:foo,,,:/home/foo:/bin/ksh + +可以使用 grep 去强制忽略大小写。例如,使用 -i 选项可以匹配 boo, Boo, BOO 和其他组合: + + $ grep -i "boo" /etc/passwd + +### 递归使用 grep ### + +你可以递归地使用 grep 进行搜索。例如,在文件目录下面搜索所有包含字符串“192.168.1.5”的文件 + + $ grep -r "192.168.1.5" /etc/ + +或者是: + + $ grep -R "192.168.1.5" /etc/ + +示例输出: + + /etc/ppp/options:# ms-wins 192.168.1.50 + /etc/ppp/options:# ms-wins 192.168.1.51 + /etc/NetworkManager/system-connections/Wired connection 1:addresses1=192.168.1.5;24;192.168.1.2; + +你会看到搜索到 192.168.1.5 的结果每一行都前缀以找到匹配的文件名(例如:/etc/ppp/options)。输出之中包含的文件名可以加 -h 选项来禁止输出: + + $ grep -h -R "192.168.1.5" /etc/ + +或者 + + $ grep -hR "192.168.1.5" /etc/ + +示例输出: + + # ms-wins 192.168.1.50 + # ms-wins 192.168.1.51 + addresses1=192.168.1.5;24;192.168.1.2; + +### 使用 grep 去搜索文本 ### + +当你搜索 boo 时,grep 命令将会匹配 fooboo,boo123, barfoo35 和其他所有包含 boo 的字符串,你可以使用 -w 选项去强制只输出那些仅仅包含那个整个单词的行(LCTT译注:即该字符串两侧是英文单词分隔符,如空格,标点符号,和末端等,因此对中文这种没有断字符号的语言并不适用。)。 + + $ grep -w "boo" file + +### 使用 grep 命令去搜索两个不同的单词 ### + +使用 egrep 命令如下: + + $ egrep -w 'word1|word2' /path/to/file + +(LCTT 译注:这里使用到了正则表达式,因此使用的是 egrep 命令,即扩展的 grep 命令。) + +### 统计文本匹配到的行数 ### + +grep 命令可以通过加 -c 参数显示每个文件中匹配到的次数: + + $ grep -c 'word' /path/to/file + +传递 -n 选项可以输出的行前加入匹配到的行的行号: + + $ grep -n 'root' /etc/passwd + +示例输出: + + 1:root:x:0:0:root:/root:/bin/bash + 1042:rootdoor:x:0:0:rootdoor:/home/rootdoor:/bin/csh + 3319:initrootapp:x:0:0:initrootapp:/home/initroot:/bin/ksh + +### 反转匹配(不匹配) ### + +可以使用 -v 选项来输出不包含匹配项的内容,输出内容仅仅包含那些不含给定单词的行,例如输出所有不包含 bar 单词的行: + + $ grep -v bar /path/to/file + +### UNIX/Linux 管道与 grep 命令 ### + +grep 常常与管道一起使用,在这个例子中,显示硬盘设备的名字: + + # dmesg | egrep '(s|h)d[a-z]' + +显示 CPU 型号: + + # cat /proc/cpuinfo | grep -i 'Model' + +然而,以上命令也可以按照以下方法使用,不使用管道: + + # grep -i 'Model' /proc/cpuinfo + +示例输出: + + model : 30 + model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz + model : 30 + model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz + +### 如何仅仅显示匹配到内容的文件名字? ### + +使用 -l 选项去显示那些文件内容中包含 main() 的文件名: + + $ grep -l 'main' *.c + +最后,你可以强制 grep 以彩色输出: + + $ grep --color vivek /etc/passwd + +示例输出: + +![Grep command in action](http://files.cyberciti.biz/uploads/faq/2007/08/grep_command_examples.png) + + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/ + +作者:Vivek Gite +译者:[zky001](https://github.com/zky001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +校对者ID: +[1]:http://bash.cyberciti.biz/guide/Pipes \ No newline at end of file diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md deleted file mode 100644 index b539b9a4a8..0000000000 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md +++ /dev/null @@ -1,143 +0,0 @@ -grepƥַ򵥴ʸʽļļͨ˵grep ʾƥ䵽Уʹgrepһʽƥ䵽УֻʾʵУgrepΪLinuxUnixϵͳõ -### ֪ ### -grep֣ԴڱʾһƵΪgrepUnixLinuxı༭ǣ - - g/re/p - -### grep﷨ ### - -﷨ʾ: - - grep 'word' filename - grep 'word' file1 file2 file3 - grep 'string1 string2' filename - cat otherfile | grep 'something' - command | grep 'something' - command option1 | grep 'data' - grep --color 'data' fileName - -###ôʹgrepһļ### - - /etc/passwd ļµbooû,: - - $ grep boo /etc/passwd - -: - - foo:x:1000:1000:foo,,,:/home/foo:/bin/ksh - -ʹgrepȥǿƺԴСд i.e ʹ-iƥ boo, Boo, BOO ѡ: - - $ grep -i "boo" /etc/passwd - -### ݹʹgrep ### - -ʹgrepݹ i.e. ļĿ¼аַ192.168.1.5ļ - - $ grep -r "192.168.1.5" /etc/ - -ǣ - - $ grep -R "192.168.1.5" /etc/ - -ʾ: - - /etc/ppp/options:# ms-wins 192.168.1.50 - /etc/ppp/options:# ms-wins 192.168.1.51 - /etc/NetworkManager/system-connections/Wired connection 1:addresses1=192.168.1.5;24;192.168.1.2; - -ῴҵ 192.168.1.5 ĽļΪʾڵ棬֮аļԼ-hѡֹ - $ grep -h -R "192.168.1.5" /etc/ - - - - $ grep -hR "192.168.1.5" /etc/ - -ʾ: - - # ms-wins 192.168.1.50 - # ms-wins 192.168.1.51 - addresses1=192.168.1.5;24;192.168.1.2; - -### ʹgrepȥı ### - -boogrepƥfoobooboo123, barfoo35 booַʹ-wѡȥǿѡЩǸʵС - - $ grep -w "boo" file - -### ʹegrepȥȽϲͬ ### - -ʹegrep: - - $ egrep -w 'word1|word2' /path/to/file - -### ıƥʱͳ ### - -grepͨ-cʾÿļƥ䵽Ĵ - - $ grep -c 'word' /path/to/file - --nѡȥʾǰƥ䵽ļ - - $ grep -n 'root' /etc/passwd - -ʾ: - - 1:root:x:0:0:root:/root:/bin/bash - 1042:rootdoor:x:0:0:rootdoor:/home/rootdoor:/bin/csh - 3319:initrootapp:x:0:0:initrootapp:/home/initroot:/bin/ksh - -### תƥ ### - -ʹ-vѡȥӡƥݣݽЩʵУɾbarʵУ - - $ grep -v bar /path/to/file - -### UNIX / Linux ܵ grep ### - -grep ܵһʹãУʾӲ֣ - - # dmesg | egrep '(s|h)d[a-z]' - -ʾCPUģ - - # cat /proc/cpuinfo | grep -i 'Model' - -Ȼ԰·ʹõͬʱʹùܵ: - - # grep -i 'Model' /proc/cpuinfo - -ʾ: - - model : 30 - model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz - model : 30 - model name : Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz - -### νʾƥ䵽ݵļ? ### - -ʹ-lѡȥʾЩļаmainļ: - - $ grep -l 'main' *.c - -ʹgrepɫʵʾ: - - $ grep --color vivek /etc/passwd - -ʾ: - -![Grep command in action](http://files.cyberciti.biz/uploads/faq/2007/08/grep_command_examples.png) - - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/ - -ߣVivek Gite -ߣ[zky001](https://github.com/zky001) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -УID -[1]:http://bash.cyberciti.biz/guide/Pipes \ No newline at end of file From 67369f4a3294451c370fbdfa005a5b5dd4dfdf8d Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 Jan 2016 08:24:34 +0800 Subject: [PATCH 0889/1710] PUB:20160104 How to Check Hardware Information on Linux Using Command Line @sonofelice --- ...Information on Linux Using Command Line.md | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) rename {translated/tech => published}/20160104 How to Check Hardware Information on Linux Using Command Line.md (65%) diff --git a/translated/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md b/published/20160104 How to Check Hardware Information on Linux Using Command Line.md similarity index 65% rename from translated/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md rename to published/20160104 How to Check Hardware Information on Linux Using Command Line.md index 9806dd8b0d..cce96867e8 100644 --- a/translated/tech/20160104 How to Check Hardware Information on Linux Using Command Line.md +++ b/published/20160104 How to Check Hardware Information on Linux Using Command Line.md @@ -1,13 +1,15 @@ -Linux系统下使用命令行来查看硬件信息 +Linux 系统下查看硬件信息命令大全 ================================================================================ + ![](https://maketecheasier-holisticmedia.netdna-ssl.com/assets/uploads/2015/12/hdd_info_featured-1.png) -有许多可用的命令可以用来查看Linux系统上的硬件信息。有些命令只能够打印出像CPU和内存这一特定的硬件组件信息,其余的命令可以查看其余硬件单元的信息。 +有许多命令可以用来查看 Linux 系统上的硬件信息。有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息。 + +这个教程可以带大家快速了解一下查看各种硬件设备的信息和配置详情的最常用的命令。 -这个教程可以带大家快速学习一下查看各种硬件设备的信息和配置详情的最常用的命令。 ### lscpu ### -`lscpu`命令能够查看CPU和处理单元的信息。该命令没有任何其他选项或者别的功能。 +`lscpu`命令能够查看 CPU 和处理单元的信息。该命令没有任何其他选项或者别的功能。 lscpu @@ -17,7 +19,7 @@ Linux系统下使用命令行来查看硬件信息 ### lspci ### -`lspci`是另一个命令行工具,可以用来列出所有的PCI总线,还有与PCI总线相连的设备的详细信息,比如VGA适配器、显卡、网络适配器、usb端口、SATA控制器等。 +`lspci`是另一个命令行工具,可以用来列出所有的 PCI 总线,还有与 PCI 总线相连的设备的详细信息,比如 VGA 适配器、显卡、网络适配器、usb 端口、SATA 控制器等。 lspci @@ -35,7 +37,7 @@ Linux系统下使用命令行来查看硬件信息 ### lshw ### -`lshw`是一个通用的工具,可以列出多种硬件单元的详细或者概要的信息,比如CPU、内存、usb控制器、硬盘等。`lshw`能够从不同的“/proc”文件中提取出相关的信息。 +`lshw`是一个通用的工具,可以列出多种硬件单元的详细或者概要的信息,比如 CPU、内存、usb 控制器、硬盘等。`lshw`能够从各个“/proc”文件中提取出相关的信息。 lshw -short @@ -45,7 +47,7 @@ Linux系统下使用命令行来查看硬件信息 ### lsscsi ### -通过运行下面的命令可以列出像硬盘和光驱等scsi/sata设备的信息: +通过运行下面的命令可以列出像硬盘和光驱等 scsi/sata 设备的信息: lsscsi @@ -55,7 +57,7 @@ Linux系统下使用命令行来查看硬件信息 ### lsusb ### -`lsusb`命令能够列出USB控制器和与USB控制相连的设备的详细信息。默认情况下,`lsusb`命令只打印出概要信息。可以通过使用-v参数打印每一个usb端口的详细信息。 +`lsusb`命令能够列出 USB 控制器和与 USB 控制器相连的设备的详细信息。默认情况下,`lsusb`命令只打印出概要信息。可以通过使用-v参数打印每一个usb端口的详细信息。 lsusb @@ -65,9 +67,9 @@ Linux系统下使用命令行来查看硬件信息 ### Inxi ### -`Inxi`是一个bash脚本,能够从系统的多个源文件和命令行抓取硬件信息,并打印出一个非技术人员也能看懂的友好的报告。 +`Inxi`是一个 bash 脚本,能够从系统的多个来源和命令获取硬件信息,并打印出一个非技术人员也能看懂的友好的报告。 -默认情况下,Ubuntu上没有安装`inxi`。可以通过运行下面命令来安装`Inxi`: +默认情况下,Ubuntu 上没有安装`inxi`。可以通过运行下面命令来安装`Inxi`: sudo apt-get install inxi @@ -81,7 +83,8 @@ Linux系统下使用命令行来查看硬件信息 ### df ### -`df`命令能够列出不同分区的概要信息,挂载点,已用的和可用的空间。 +`df`命令能够列出不同分区的概要信息、挂载点、已用的和可用的空间。 + 可以在使用`df`命令的时候加上`-H`参数。 df -H @@ -92,7 +95,7 @@ Linux系统下使用命令行来查看硬件信息 ### Free ### -通过使用`free`命令可以查看系统中使用的、闲置的和总体的RAM数量。 +通过使用`free`命令可以查看系统中使用的、闲置的和 RAM 的总体数量。 free -m @@ -102,7 +105,7 @@ Linux系统下使用命令行来查看硬件信息 ### Dmidecode ### -`dmidecode`命令与其他命令不同。该命令是从DMI表中读取硬件信息的。 +`dmidecode`命令与其他命令不同。该命令是从硬件中的 DMI 表中读取信息的。 要查看处理器的信息,运行下面命令: @@ -116,7 +119,7 @@ Linux系统下使用命令行来查看硬件信息 ![hdd_info_dmi_memory](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_memory.png) -要查看bios的信息,运行下面命令: +要查看 bios 的信息,运行下面命令: sudo dmidecode -t bios @@ -124,7 +127,7 @@ Linux系统下使用命令行来查看硬件信息 ### Hdparm ### -`hdparm`命令可以用来显示想硬盘这样的sata设备的信息。 +`hdparm`命令可以用来显示像硬盘这样的 sata 设备的信息。 sudo hdparm @@ -134,7 +137,7 @@ Linux系统下使用命令行来查看硬件信息 ### 总结 ### -每个命令都有不同的方式来获取硬件的信息。在查看特定的硬件信息的时候,可以尝试使用不同的方式。上面所有的命令行工具在大部分的Linux发型版本中都是可以使用的,可以很容易的从仓库中获取安装。 +每个命令都有不同的方式来获取硬件的信息。在查看特定的硬件信息的时候,可以尝试使用不同的方式。上面所有的命令行工具在大部分的 Linux 发行版本中都是可以使用的,可以很容易的从仓库中获取安装。 -------------------------------------------------------------------------------- @@ -142,7 +145,7 @@ via: https://www.maketecheasier.com/check-hardware-information-linux/ 作者:[Hitesh Jethva][a] 译者:[sonofelice](https://github.com/sonofelice) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2cdde3e61fd4023baa166b26e5a990bf1f840ed3 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Mon, 25 Jan 2016 14:52:51 +0800 Subject: [PATCH 0890/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020151028=20Bossie=20Awards=202015--The=20best=20open=20sour?= =?UTF-8?q?ce=20application=20development=20tools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...015--The best open source application development tools.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 index 10da3e7cdc..c135ae0832 100644 --- 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 @@ -1,3 +1,5 @@ +GHLandy Translating + 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 @@ -333,4 +335,4 @@ via: http://www.infoworld.com/article/2982920/open-source-tools/bossie-awards-20 [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 +[46]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html From 4a60db4814867147d93a6a6fde458871242e477c Mon Sep 17 00:00:00 2001 From: wwy Date: Mon, 25 Jan 2016 21:20:17 +0800 Subject: [PATCH 0891/1710] [Translating] Cinnamon 2.8 Review --- sources/talk/20151201 Cinnamon 2.8 Review.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151201 Cinnamon 2.8 Review.md b/sources/talk/20151201 Cinnamon 2.8 Review.md index 0c44eba14f..0529cf80ec 100644 --- a/sources/talk/20151201 Cinnamon 2.8 Review.md +++ b/sources/talk/20151201 Cinnamon 2.8 Review.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Cinnamon 2.8 Review ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2-8-featured.jpg) @@ -84,4 +86,4 @@ via: https://www.maketecheasier.com/cinnamon-2-8-review/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:https://www.maketecheasier.com/author/ayoisaiah/ \ No newline at end of file +[a]:https://www.maketecheasier.com/author/ayoisaiah/ From 533734cae7c595f020760737ea5f8b389432831c Mon Sep 17 00:00:00 2001 From: wwy Date: Mon, 25 Jan 2016 23:56:10 +0800 Subject: [PATCH 0892/1710] starting to translate --- translated/talk/20151201 Cinnamon 2.8 Review.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 translated/talk/20151201 Cinnamon 2.8 Review.md diff --git a/translated/talk/20151201 Cinnamon 2.8 Review.md b/translated/talk/20151201 Cinnamon 2.8 Review.md new file mode 100644 index 0000000000..e539136ce1 --- /dev/null +++ b/translated/talk/20151201 Cinnamon 2.8 Review.md @@ -0,0 +1,10 @@ +Cinnamon 2.8 评论 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2-8-featured.jpg) + +除了Gnome和KDE外,Cinnamon是另一个很多人使用的桌面环境。它是由创作Linux Mint的团队制作的,并且可以被安装在许多其他发行版上。该桌面环境的最新版本 - Cinnamon 2.8 - 于本月早些时间发布,此版本修复了许多的Bug、做了许多改进并添加了一些新功能。 + +我将仔细介绍该发行版本的主要改进,以及如何更新到Cinnamon 2.8或者第一次安装它。 + +### 对Applets的改进 ### + From e8c02dc6f62d813c526359cbf9fbf2c5f65a8b2e Mon Sep 17 00:00:00 2001 From: Ping Date: Tue, 26 Jan 2016 09:33:00 +0800 Subject: [PATCH 0893/1710] Add new source article --- ...ernative Python version on Debian Linux.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md diff --git a/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md b/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md new file mode 100644 index 0000000000..c498ea0763 --- /dev/null +++ b/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md @@ -0,0 +1,91 @@ +How to change from default to alternative Python version on Debian Linux +==================================================== + +Your Debian Linux installation may include multiple python versions and thus also include multiple python binary executables. You can run the following `ls` command to find out what python binary executables are available on your system: + +``` +$ ls /usr/bin/python* +/usr/bin/python /usr/bin/python2 /usr/bin/python2.7 /usr/bin/python3 /usr/bin/python3.4 /usr/bin/python3.4m /usr/bin/python3m +``` + +To check what is your default python version execute: + +``` +$ python --version +Python 2.7.8 +``` + +1、Change python version on per user basis +To change a python version on per user basis you simply create an `alias` within user's home directory. Open `~/.bashrc` file and add new alias to change your default python executable: + +``` +alias python='/usr/bin/python3.4' +``` + +Once you make the above change, re-login or source your `.bashrc` file: + + +``` +$ . ~/.bashrc +``` + +Check your default python version: + +``` +$ python --version +Python 3.4.2 +``` + +2、 Change python version system-wide +To change python version system-wide we can use `update-alternatives` command. Logged in as a root user, first list all available python alternatives: + +``` +# update-alternatives --list python +update-alternatives: error: no alternatives for python +``` + +The above error message means that no python alternatives has been recognized by `update-alternatives` command. For this reason we need to update our alternatives table and include both `python2.7` and `python3.4`: + +``` +# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 +update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode +# update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2 +update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode +``` + +The `--install` option take multiple arguments from which it will be able to create a symbolic link. The last argument specified it priority means, if no manual alternative selection is made the alternative with the highest priority number will be set. In our case we have set a priority 2 for `/usr/bin/python3.4` and as a result the `/usr/bin/python3.4` was set as default python version automatically by `update-alternatives` command. + +``` +# python --version +Python 3.4.2 +``` + +Next, we can again list all python alternatives: + +``` +# update-alternatives --list python +/usr/bin/python2.7 +/usr/bin/python3.4 +``` + +From now on, we can anytime switch between the above listed python alternative versions using below command and entering a selection number: + +``` +# update-alternatives --config python +``` + +![](http://linuxconfig.org/images/change-python-alternative-version-debian-linux.png) + +``` +# python --version +Python 2.7.8 +``` + +3、 Appendix +In case we no longer have the alternative python version installed on our system we can remove its `update-alternatives` listing. For example let's remove python2.7 version: + +``` +# update-alternatives --remove python /usr/bin/python2.7 +update-alternatives: removing manually selected alternative - switching python to auto mode +update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode +``` From 47816aa16d78d56ea813233c74b143f335358ba2 Mon Sep 17 00:00:00 2001 From: Ping Date: Tue, 26 Jan 2016 09:34:58 +0800 Subject: [PATCH 0894/1710] Translating by Ping --- ...rom default to alternative Python version on Debian Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md b/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md index c498ea0763..4dafe1b604 100644 --- a/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md +++ b/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md @@ -1,3 +1,5 @@ +Translating by Ping + How to change from default to alternative Python version on Debian Linux ==================================================== From 7ecec2e32745b6139851681b47fd0c5234e6ea6d Mon Sep 17 00:00:00 2001 From: Ping Date: Tue, 26 Jan 2016 10:07:07 +0800 Subject: [PATCH 0895/1710] Add copyright on the tail --- ...lt to alternative Python version on Debian Linux.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md b/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md index 4dafe1b604..e5b26e3c13 100644 --- a/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md +++ b/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md @@ -91,3 +91,13 @@ In case we no longer have the alternative python version installed on our system update-alternatives: removing manually selected alternative - switching python to auto mode update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode ``` + +-------------------------------------------------------------------------------- + +via: http://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux + +作者:[作者][] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 904f3fb4cd3da52bcee28319670564d9a02e6ae4 Mon Sep 17 00:00:00 2001 From: sailing Date: Tue, 26 Jan 2016 11:37:42 +0800 Subject: [PATCH 0896/1710] claim an article --- ...20150709 Interviews--Linus Torvalds Answers Your Question.md | 2 ++ 1 file changed, 2 insertions(+) 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 bb04ddf0c8..c27e90fd7d 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,5 @@ +[translating by ray] + 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]. From ca77778c20319ef06304cb4fdd432f8ea23e5029 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 Jan 2016 11:32:24 +0800 Subject: [PATCH 0897/1710] PUB:20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep @runningwater --- ...l series 2--Regular Expressions In grep.md | 240 +++++++++++++++ ...l series 2--Regular Expressions In grep.md | 288 ------------------ 2 files changed, 240 insertions(+), 288 deletions(-) create mode 100755 published/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md delete mode 100755 translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/published/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md new file mode 100755 index 0000000000..11e656c666 --- /dev/null +++ b/published/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md @@ -0,0 +1,240 @@ +grep 命令系列:grep 中的正则表达式 +================================================================================ + +在 Linux 、类 Unix 系统中我该如何使用 Grep 命令的正则表达式呢? + +Linux 附带有 GNU grep 命令工具,它支持扩展正则表达式(extended regular expressions),而且 GNU grep 在所有的 Linux 系统中都是默认有的。Grep 命令被用于搜索定位存储在您服务器或工作站上的任何信息。 + +### 正则表达式 ### + +正则表达式就是用于匹配每行输入的一种模式,模式是指一串字符序列。下面是范例: + + ^w1 + w1|w2 + [^ ] + +#### grep 正则表达式示例 #### + +在 /etc/passswd 目录中搜索 'vivek' + + grep vivek /etc/passwd + +输出例子: + + vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash + vivekgite:x:1001:1001::/home/vivekgite:/bin/sh + gitevivek:x:1002:1002::/home/gitevivek:/bin/sh + +搜索大小写任意的 vivek(即不区分大小写的搜索) + + grep -i -w vivek /etc/passwd + +搜索大小写任意的 vivek 或 raj + + grep -E -i -w 'vivek|raj' /etc/passwd + +上面最后的例子显示的,就是一个扩展的正则表达式的模式。 + +### 锚点 ### + +你可以分别使用 ^ 和 $ 符号来正则匹配输入行的开始或结尾。下面的例子搜索显示仅仅以 vivek 开始的输入行: + + grep ^vivek /etc/passwd + +输出例子: + + vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash + vivekgite:x:1001:1001::/home/vivekgite:/bin/sh + +你可以仅仅只搜索出以单词 vivek 开始的行,即不显示 vivekgit、vivekg 等(LCTT 译注:即该单词后面是空格、符号等英文的单词分隔符。) + + grep -w ^vivek /etc/passwd + +找出以单词 word 结尾的行: + + grep 'foo$' 文件名 + +匹配仅仅只包含 foo 的行: + + grep '^foo$' 文件名 + +如下所示的例子可以搜索空行: + + grep '^$' 文件名 + +### 字符类 ### + +匹配 Vivek 或 vivek: + + grep '[vV]ivek' 文件名 + +或者 + + grep '[vV][iI][Vv][Ee][kK]' 文件名 + +也可以匹配数字 (即匹配 vivek1 或 Vivek2 等等): + + grep -w '[vV]ivek[0-9]' 文件名 + +可以匹配两个数字字符(即 foo11、foo12 等): + + grep 'foo[0-9][0-9]' 文件名 + +不仅仅局限于数字,也能匹配至少一个字母的: + + grep '[A-Za-z]' 文件名 + +显示含有 "w" 或 "n" 字符的所有行: + + grep [wn] 文件名 + +放在括号内的表达式,即包在 "[:" 和 ":]" 之间的字符类的名字,它表示的是属于此类的所有字符列表。标准的字符类名称如下: + +- [:alnum:] - 字母数字字符 +- [:alpha:] - 字母字符 +- [:blank:] - 空字符: 空格键符 和 制表符 +- [:digit:] - 数字: '0 1 2 3 4 5 6 7 8 9' +- [:lower:] - 小写字母: 'a b c d e f g h i j k l m n o p q r s t u v w x y z' +- [:space:] - 空格字符: 制表符、换行符、垂直制表符、换页符、回车符和空格键符 +- [:upper:] - 大写字母: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z' + +在这个例子所示的是匹配所有大写字母: + + grep '[:upper:]' 文件名 + +### 通配符 ### + +你可以使用 "." 来匹配单个字符。例子中匹配以 "b" 开头以 "t" 结尾的3个字符的单词: + + grep '\' 文件名 + +在这儿, + +- `\<` 匹配单词前面的空字符串 +- `\>` 匹配单词后面的空字符串 + +打印出只有两个字符的所有行: + + grep '^..$' 文件名 + +显示以一个点和一个数字开头的行: + + grep '^\.[0-9]' 文件名 + +#### 点字符转义 #### + +下面要匹配到 IP 地址为 192.168.1.254 的正则式是不正确的:(LCTT 译注:可以匹配到该 IP 地址,但是也有可能匹配到间隔符号不是点的类似格式) + + grep '192.168.1.254' /etc/hosts + +三个点字符都需要转义: + + grep '192\.168\.1\.254' /etc/hosts + +下面的例子只能匹配出 IP 地址:(LCTT 译注:实际上由于 IP 地址中数字的取值范围,该正则表达式并不精确) + + egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' 文件名 + +### 怎么样搜索以 - 符号开头的匹配模式? ### + +要使用 -e 选项来搜索匹配 '--test--' 字符串,如果不使用 -e 选项,grep 命令会试图把 '--test--' 当作自己的选项参数来解析: + + grep -e '--test--' 文件名 + +### 怎么使用 grep 的“或”匹配? ### + +使用如下的语法: + + grep -E 'word1|word2' 文件名 + 或 + egrep 'word1|word2' 文件名 + +或者是 + + grep 'word1\|word2' 文件名 + +### 怎么使用 grep 的“和”匹配? ### + +使用下面的语法来显示既包含 'word1' 又包含 'word2' 的所有行 + + grep 'word1' 文件名 | grep 'word2' + +### 怎么样使用序列检测? ### + +使用如下的语法,您可以检测一个字符在序列中重复出现次数: + + {N} + {N,} + {min,max} + +要匹配字符 “v" 出现两次: + + egrep "v{2}" 文件名 + +下面的命令能匹配到 "col" 和 "cool" : + + egrep 'co{1,2}l' 文件名 + +下面的命令将会匹配出至少有三个 'c' 字符的所有行。 + + egrep 'c{3,}' 文件名 + +下面的例子会匹配 91-1234567890(即二个数字-十个数字) 这种格式的手机号。 + + grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" 文件名 + +### 怎么样使 grep 命令高亮显示?### + +使用如下的语法: + + grep --color 正则表达式 文件名 + +### 怎么样仅仅只显示匹配出的字符,而不是匹配出的行? ### + +使用如下语法: + + grep -o 正则表达式 文件名 + +### 正则表达式限定符### + +| 限定符 | 描述| +|------|----| +|`.`|匹配任意的一个字符。| +|`?`|匹配前面的子表达式,最多一次。| +|`*`|匹配前面的子表达式零次或多次。| +|`+`|匹配前面的子表达式一次或多次。| +|`{N}`|匹配前面的子表达式 N 次。| +|`{N,}`|匹配前面的子表达式 N 次到多次。| +|`{N,M}`|匹配前面的子表达式 N 到 M 次,至少 N 次至多 M 次。| +|`-`|只要不是在序列开始、结尾或者序列的结束点上,表示序列范围。| +|`^`|匹配一行开始的空字符串;也表示字符不在要匹配的列表中。| +|`$`|匹配一行末尾的空字符串。| +|`\b`|匹配一个单词前后的空字符串。| +|`\B`|匹配一个单词中间的空字符串。| +|`\<`|匹配单词前面的空字符串。| +|`\>`|匹配单词后面的空字符串。| + +#### grep 和 egrep #### + +egrep 等同于 **grep -E** 。它会以扩展的正则表达式的模式来解释模式。下面来自 grep 的帮助页: + + 基本的正则表达式元字符 ?、+、 {、 |、 ( 和 ) 已经失去了它们原来的意义,要使用的话用反斜线的版本 \?、\+、\{、\|、\( 和 \) 来代替。 + 传统的 egrep 并不支持 { 元字符,一些 egrep 的实现是以 \{ 替代的,所以一个可移植的脚本应该避免在 grep -E 使用 { 符号,要匹配字面的 { 应该使用 [}]。 + GNU grep -E 试图支持传统的用法,如果 { 出在在无效的间隔规范字符串这前,它就会假定 { 不是特殊字符。 + 例如,grep -E '{1' 命令搜索包含 {1 两个字符的串,而不会报出正则表达式语法错误。 + POSIX.2 标准允许这种操作的扩展,但在可移植脚本文件里应该避免这样使用。 + +参考: + +- grep 和 regex 帮助手册页(7) +- grep 的 info 页 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/grep-regular-expressions/ + +作者:Vivek Gite +译者:[runningwater](https://github.com/runningwater) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md deleted file mode 100755 index 8389f4c339..0000000000 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md +++ /dev/null @@ -1,288 +0,0 @@ -## grep 中的正则表达式 -================================================================================ -在 Linux 、类 Unix 系统中我该如何使用 Grep 命令的正则表达式呢? - -Linux 附带有 GNU grep 命令工具,它支持正则表达式,而且 GNU grep 在所有的 Linux 系统中都是默认有的。Grep 命令被用于搜索定位存储在您服务器或工作站的信息。 - -### 正则表达式 ### - -正则表达式仅仅是对每个输入行的匹配的一种模式,即对字符序列的匹配模式。下面是范例: - - ^w1 - w1|w2 - [^ ] - -#### grep 正则表达式示例 #### - -在 /etc/passswd 目录中搜索 'vivek' - - grep vivek /etc/passwd - -输出例子: - - vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash - vivekgite:x:1001:1001::/home/vivekgite:/bin/sh - gitevivek:x:1002:1002::/home/gitevivek:/bin/sh - -摸索任何情况下的 vivek(即不区分大小写的搜索) - - grep -i -w vivek /etc/passwd - -摸索任何情况下的 vivek 或 raj - - grep -E -i -w 'vivek|raj' /etc/passwd - -上面最后的例子显示的,就是一个正则表达式扩展的模式。 - -### 锚 ### - -你可以分别使用 ^ 和 $ 符号来正则匹配输入行的开始或结尾。下面的例子搜索显示仅仅以 vivek 开始的输入行: - - grep ^vivek /etc/passwd - -输出例子: - - vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash - vivekgite:x:1001:1001::/home/vivekgite:/bin/sh - -你可以仅仅只搜索出以单词 vivek 开始的行,即不显示 vivekgit、vivekg 等 - - grep -w ^vivek /etc/passwd - -找出以单词 word 结尾的行: - - grep 'foo$' 文件名 - -匹配仅仅只包含 foo 的行: - - grep '^foo$' 文件名 - -如下所示的例子可以搜索空行: - - grep '^$' 文件名 - -### 字符类 ### - -匹配 Vivek 或 vivek: - - grep '[vV]ivek' 文件名 - -或者 - - grep '[vV][iI][Vv][Ee][kK]' 文件名 - -也可以匹配数字 (即匹配 vivek1 或 Vivek2 等等): - - grep -w '[vV]ivek[0-9]' 文件名 - -可以匹配两个数字字符(即 foo11、foo12 等): - - grep 'foo[0-9][0-9]' 文件名 - -不仅仅局限于数字,也能匹配至少一个字母的: - - grep '[A-Za-z]' 文件名 - -显示含有"w" 或 "n" 字符的所有行: - - grep [wn] 文件名 - -在括号内的表达式,即包在"[:" 和 ":]" 之间的字符类的名字,它表示的是属于此类的所有字符列表。标准的字符类名称如下: - -- [:alnum:] - 字母数字字符. -- [:alpha:] - 字母字符 -- [:blank:] - 空字符: 空格键符 和 制表符. -- [:digit:] - 数字: '0 1 2 3 4 5 6 7 8 9'. -- [:lower:] - 小写字母: 'a b c d e f g h i j k l m n o p q r s t u v w x y z'. -- [:space:] - 空格字符: 制表符、换行符、垂直制表符、换页符、回车符和空格键符. -- [:upper:] - 大写字母: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'. - -例子所示的是匹配所有大写字母: - - grep '[:upper:]' 文件名 - -### 通配符 ### - -你可以使用 "." 来匹配单个字符。例子中匹配以"b"开头以"t"结尾的3个字符的单词: - - grep '\' 文件名 - -在这儿, - -- \< 匹配单词前面的空字符串 -- \> 匹配单词后面的空字符串 - -打印出只有两个字符的所有行: - - grep '^..$' 文件名 - -显示以一个点和一个数字开头的行: - - grep '^\.[0-9]' 文件名 - -#### 点号转义 #### - -下面要匹配到 IP 地址为 192.168.1.254 的正则式是不会工作的: - - egrep '192.168.1.254' /etc/hosts - -三个点符号都需要转义: - - grep '192\.168\.1\.254' /etc/hosts - -下面的例子仅仅匹配出 IP 地址: - - egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' 文件名 - -下面的例子会匹配任意大小写的 Linux 或 UNIX 这两个单词: - - egrep -i '^(linux|unix)' 文件名 - -### 怎么样搜索以 - 符号开头的匹配模式? ### - -要使用 -e 选项来搜索匹配 '--test--' 字符串,如果不使用 -e 选项,grep 命令会试图把 '--test--' 当作自己的选项参数来解析: - - grep -e '--test--' 文件名 - -### 怎么使用 grep 的 OR 匹配? ### - -使用如下的语法: - - grep 'word1|word2' 文件名 - -或者是 - - grep 'word1\|word2' 文件名 - -### 怎么使用 grep 的 AND 匹配? ### - -使用下面的语法来显示既包含 'word1' 又包含 'word2' 的所有行 - - grep 'word1' 文件名 | grep 'word2' - -### 怎么样使用序列检测? ### - -使用如下的语法,您可以检测一个字符在序列中重复出现次数: - - {N} - {N,} - {min,max} - -要匹配字符 “v" 出现两次: - - egrep "v{2}" 文件名 - -下面的命令能匹配到 "col" 和 "cool" : - - egrep 'co{1,2}l' 文件名 - -下面的命令将会匹配出至少有三个 'c' 字符的所有行。 - - egrep 'c{3,}' 文件名 - -下面的例子会匹配 91-1234567890(即二个数字-十个数字) 这种格式的手机号。 - - grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" 文件名 - -### 怎么样使 grep 命令突出显示?### - -使用如下的语法: - - grep --color regex 文件名 - -### 怎么样仅仅只显示匹配出的字符,而不是匹配出的行? ### - -使用如下语法: - - grep -o regex 文件名 - -### 正则表达式限定符### - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
限定符描述
.匹配任意的一个字符.
?匹配前面的子表达式,最多一次。
*匹配前面的子表达式零次或多次。
+匹配前面的子表达式一次或多次。
{N}匹配前面的子表达式 N 次。
{N,}匹配前面的子表达式 N 次到多次。
{N,M}匹配前面的子表达式 N 到 M 次,至少 N 次至多 M 次。
-只要不是在序列开始、结尾或者序列的结束点上,表示序列范围
^匹配一行开始的空字符串;也表示字符不在要匹配的列表中。
$匹配一行末尾的空字符串。
\b匹配一个单词前后的空字符串。
\B匹配一个单词中间的空字符串
\<匹配单词前面的空字符串。
\> 匹配单词后面的空字符串。
- -#### grep 和 egrep #### - -egrep 跟 **grep -E** 是一样的。他会以正则表达式的模式来解释。下面是 grep 的帮助页(man): - - 基本的正则表达式元字符 ?、+、 {、 |、 ( 和 ) 已经失去了他们特殊的意义,要使用的话用反斜线的版本 \?、\+、\{、\|、\( 和 \) 来代替。 - 传统的 egrep 不支持 { 元字符,一些 egrep 的实现是以 \{ 替代的,所以有 grep -E 的通用脚本应该避免使用 { 符号,要匹配字面的 { 应该使用 [}]。 - GNU grep -E 试图支持传统的用法,如果 { 出在在无效的间隔规范字符串这前,它就会假定 { 不是特殊字符。 - 例如,grep -E '{1' 命令搜索包含 {1 两个字符的串,而不会报出正则表达式语法错误。 - POSIX.2 标准允许对这种操作的扩展,但在可移植脚本文件里应该避免这样使用。 - -引用: - -- grep 和 regex 帮助手册页(7) -- grep 的 info 页` - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/grep-regular-expressions/ - -作者:Vivek Gite -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From 8cca4d5f4f90e8cd352afff25df2fdf3791adb82 Mon Sep 17 00:00:00 2001 From: wwy Date: Wed, 27 Jan 2016 16:06:14 +0800 Subject: [PATCH 0898/1710] another translation --- .../talk/20151201 Cinnamon 2.8 Review.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/translated/talk/20151201 Cinnamon 2.8 Review.md b/translated/talk/20151201 Cinnamon 2.8 Review.md index e539136ce1..e06ba31a93 100644 --- a/translated/talk/20151201 Cinnamon 2.8 Review.md +++ b/translated/talk/20151201 Cinnamon 2.8 Review.md @@ -8,3 +8,43 @@ Cinnamon 2.8 评论 ### 对Applets的改进 ### +在此版本中,对已经在面板中存在的Applets做了若干的改进。 + +#### 声音 Applet #### + +![cinnamon-28-sound-applet](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-sound-applet.jpg) + +声音Applet经过修订,目前可以显示音轨信息并且可以在音频文件的艺术家封面上面进行媒体控制。对于支持拖动的音乐播放器来说(例如Banshee),会有一个进度条在同样的位置,您可以用它来改变音轨位置。在applet的面板上右击将显示对输入和输出静音的选项。 + +#### 电源 Applet #### + +电源applet则会使用制造商的数据而不是通用名称显示每一个连接的电池和设备。 + +#### 窗口缩略图 #### + +![cinnamon-2.8-window-thumbnails](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-window-thumbnails.png) + +Cinnamon 2.8带来了可以在鼠标悬停于面板里窗口列表中的窗口时展示窗口缩略图的选项。如果您不喜欢该功能,您还可以关闭它。 + +#### 工作区切换 Applet #### + +![cinnamon-2.8-workspace-switcher](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-workspace-switcher.png) + +添加工作区切换applet到您的面板将为您显示一个代表工作区的可视化的图像,一些矩形嵌套在其中,代表您的窗口的位置。 + +#### 系统托盘 #### + +Cinnamon 2.8带来了对系统托盘中的应用程序指示器的支持。您可以容易地在设置中禁用它,这将强制应用程序回滚以使用 + + + + + + + + + + + + + From 1d242fa4c4cfff054326f52f223f36a348cdd3a0 Mon Sep 17 00:00:00 2001 From: wwy Date: Wed, 27 Jan 2016 17:02:04 +0800 Subject: [PATCH 0899/1710] finish translation --- .../talk/20151201 Cinnamon 2.8 Review.md | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/translated/talk/20151201 Cinnamon 2.8 Review.md b/translated/talk/20151201 Cinnamon 2.8 Review.md index e06ba31a93..209ee05cd6 100644 --- a/translated/talk/20151201 Cinnamon 2.8 Review.md +++ b/translated/talk/20151201 Cinnamon 2.8 Review.md @@ -34,17 +34,54 @@ Cinnamon 2.8带来了可以在鼠标悬停于面板里窗口列表中的窗口 #### 系统托盘 #### -Cinnamon 2.8带来了对系统托盘中的应用程序指示器的支持。您可以容易地在设置中禁用它,这将强制应用程序回滚以使用 +Cinnamon 2.8带来了对系统托盘中的应用程序指示器的支持。您可以很容易地在设置中禁用它,这将强制应用程序回滚以使用状态图标作为替代。 +### 视觉改进 ### +Cinnamon 2.8还做了很多视觉上的改进。经典的切换器和Alt + Tab预览切换器都被细细打磨,有了显著的改进,同时修复了Alt + F2对话框的bug,并赋予了它更好的命令自动补全功能。 +而且,在于最小化窗口时的存在的传统的动画效果中的问题现已被解决并可用于多个面板。 +### Nemo 的改进 ### +![cinnamon-2.8-nemo](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-nemo.jpg) +Cinnamon默认的文件管理器也修复了一些bug,并有了新的“快速重命名”的功能,用于重命名文件和文件夹。可以通过两次点击文件或文件夹并在两次点击之前进行简短的停顿以重命名文件。 +Nemo也会自动地检测缩略图存在的问题,并提示您快速地修复它们。 +### 其他值得注意的改进 ### +- Applets如今会在它们被更新的时候自动地重新加载一次。 +- 对于多个监视器的支持有了显著的提高。 +- 对话框窗口有了提高,并且会附加到它的父窗口上。 +- HiDPI检测有了改进。 +- QT5应用程序现在看起来更加原生并使用了默认的GTK主题。 +- 窗口管理和渲染性能有了提升。 +- 修复了许多bug。 +### 如何获得 Cinnamon 2.8 ### +如果您在运行Linux Mint,您会在更新Linux Mint 17.3 “Rosa”Cinnamon版本的时候获得Cinnamon 2.8的更新。BETA版本现在已经放出,因此,如果您想立刻尝试新的软件,您可以试试。 +对于Arch的用户来说,Cinnamon 2.8已经在Arch的官方仓库了,您可以通过更新软件包和系统级的更新获得Cinnamon的最新版本。 +最后,对于Ubuntu用户来说,您可以通过下面的命令安装或更新Cinnamon 2.8: + + sudo add-apt-repository -y ppa:moorkai/cinnamon + sudo apt-get update + sudo apt-get install cinnamon + +您已经尝试了Cinnamon 2.8了么?感觉如何呢? + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/cinnamon-2-8-review/ + +作者:[Ayo Isaiah][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/ayoisaiah/ From c3168e64e88f5d362c8f80bd1908d3615f20a72d Mon Sep 17 00:00:00 2001 From: wwy Date: Wed, 27 Jan 2016 17:03:14 +0800 Subject: [PATCH 0900/1710] remove source --- sources/talk/20151201 Cinnamon 2.8 Review.md | 89 -------------------- 1 file changed, 89 deletions(-) delete mode 100644 sources/talk/20151201 Cinnamon 2.8 Review.md diff --git a/sources/talk/20151201 Cinnamon 2.8 Review.md b/sources/talk/20151201 Cinnamon 2.8 Review.md deleted file mode 100644 index 0529cf80ec..0000000000 --- a/sources/talk/20151201 Cinnamon 2.8 Review.md +++ /dev/null @@ -1,89 +0,0 @@ -translating by wwy-hust - -Cinnamon 2.8 Review -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2-8-featured.jpg) - -Other than Gnome and KDE, Cinnamon is another desktop environment that is used by many people. It is made by the same team that produces Linux Mint (and ships with Linux Mint) and can also be installed on several other distributions. The latest version of this DE – Cinnamon 2.8 – was released earlier this month, and it brings a host of bug fixes and improvements as well as some new features. - -I’m going to go over the major improvements made in this release as well as how to update to Cinnamon 2.8 or install it for the first time. - -### Improvements to Applets ### - -There are several improvements to already existing applets for the panel. - -#### Sound Applet #### - -![cinnamon-28-sound-applet](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-sound-applet.jpg) - -The Sound applet was revamped and now displays track information as well as the media controls on top of the cover art of the audio file. For music players with seeking support (such as Banshee), a progress bar will be displayed in the same region which you can use to change the position of the audio track. Right-clicking on the applet in the panel will display the options to mute input and output devices. - -#### Power Applet #### - -The Power applet now displays the status of each of the connected batteries and devices using the manufacturer’s data instead of generic names. - -#### Window Thumbnails #### - -![cinnamon-2.8-window-thumbnails](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-window-thumbnails.png) - -Cinnamon 2.8 brings the option to show window thumbnails when hovering over the window list in the panel. You can turn it off if you don’t like it, though. - -#### Workspace Switcher Applet #### - -![cinnamon-2.8-workspace-switcher](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-workspace-switcher.png) - -Adding the Workspace switcher applet to your panel will show you a visual representation of your workspaces with little rectangles embedded inside to show the position of your windows. - -#### System Tray #### - -Cinnamon 2.8 brings support for app indicators in the system tray. You can easily disable this in the settings which will force affected apps to fall back to using status icons instead. - -### Visual Improvements ### - -A host of visual improvements were made in Cinnamon 2.8. The classic and preview Alt + Tab switchers were polished with noticeable improvements, while the Alt + F2 dialog received bug fixes and better auto completion for commands. - -Also, the issue with the traditional animation effect for minimizing windows is now sorted and works with multiple panels. - -### Nemo Improvements ### - -![cinnamon-2.8-nemo](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-nemo.jpg) - -The default file manager for Cinnamon also received several bug fixes and has a new “Quick-rename” feature for renaming files and directories. This works by clicking the file or directory twice with a short pause in between to rename the files. - -Nemo also detects issues with thumbnails automatically and prompts you to quickly fix them. - -### Other Notable improvements ### - -- Applets now reload themselves automatically once they are updated. -- Support for multiple monitors was improved significantly. -- Dialog windows have been improved and now attach themselves to their parent windows. -- HiDPI dectection has been improved. -- QT5 applications now look more native and use the default GTK theme. -- Window management and rendering performance has been improved. -- There are various bugfixes. - -### How to Get Cinnamon 2.8 ### - -If you’re running Linux Mint you will get Cinnamon 2.8 as part of the upgrade to Linux Mint 17.3 “Rosa” Cinnamon Edition. The BETA release is already out, so you can grab that if you’d like to get your hands on the new software immediately. - -For Arch users, Cinnamon 2.8 is already in the official Arch repositories, so you can just update your packages and do a system-wide upgrade to get the latest version. - -Finally, for Ubuntu users, you can install or upgrade to Cinnamon 2.8 by running in turn the following commands: - - sudo add-apt-repository -y ppa:moorkai/cinnamon - sudo apt-get update - sudo apt-get install cinnamon - -Have you tried Cinnamon 2.8? What do you think of it? - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/cinnamon-2-8-review/ - -作者:[Ayo Isaiah][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/ayoisaiah/ From 6df20a2e20a3909187912b001f95235bb28e25f6 Mon Sep 17 00:00:00 2001 From: Ping Date: Thu, 28 Jan 2016 14:38:36 +0800 Subject: [PATCH 0901/1710] [Translated] 20160126 How to change from default to alternative Python version on Debian Linux --- ...ernative Python version on Debian Linux.md | 103 ------------------ ...ernative Python version on Debian Linux.md | 102 +++++++++++++++++ 2 files changed, 102 insertions(+), 103 deletions(-) delete mode 100644 sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md create mode 100644 translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md diff --git a/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md b/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md deleted file mode 100644 index e5b26e3c13..0000000000 --- a/sources/tech/20160126 How to change from default to alternative Python version on Debian Linux.md +++ /dev/null @@ -1,103 +0,0 @@ -Translating by Ping - -How to change from default to alternative Python version on Debian Linux -==================================================== - -Your Debian Linux installation may include multiple python versions and thus also include multiple python binary executables. You can run the following `ls` command to find out what python binary executables are available on your system: - -``` -$ ls /usr/bin/python* -/usr/bin/python /usr/bin/python2 /usr/bin/python2.7 /usr/bin/python3 /usr/bin/python3.4 /usr/bin/python3.4m /usr/bin/python3m -``` - -To check what is your default python version execute: - -``` -$ python --version -Python 2.7.8 -``` - -1、Change python version on per user basis -To change a python version on per user basis you simply create an `alias` within user's home directory. Open `~/.bashrc` file and add new alias to change your default python executable: - -``` -alias python='/usr/bin/python3.4' -``` - -Once you make the above change, re-login or source your `.bashrc` file: - - -``` -$ . ~/.bashrc -``` - -Check your default python version: - -``` -$ python --version -Python 3.4.2 -``` - -2、 Change python version system-wide -To change python version system-wide we can use `update-alternatives` command. Logged in as a root user, first list all available python alternatives: - -``` -# update-alternatives --list python -update-alternatives: error: no alternatives for python -``` - -The above error message means that no python alternatives has been recognized by `update-alternatives` command. For this reason we need to update our alternatives table and include both `python2.7` and `python3.4`: - -``` -# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 -update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode -# update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2 -update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode -``` - -The `--install` option take multiple arguments from which it will be able to create a symbolic link. The last argument specified it priority means, if no manual alternative selection is made the alternative with the highest priority number will be set. In our case we have set a priority 2 for `/usr/bin/python3.4` and as a result the `/usr/bin/python3.4` was set as default python version automatically by `update-alternatives` command. - -``` -# python --version -Python 3.4.2 -``` - -Next, we can again list all python alternatives: - -``` -# update-alternatives --list python -/usr/bin/python2.7 -/usr/bin/python3.4 -``` - -From now on, we can anytime switch between the above listed python alternative versions using below command and entering a selection number: - -``` -# update-alternatives --config python -``` - -![](http://linuxconfig.org/images/change-python-alternative-version-debian-linux.png) - -``` -# python --version -Python 2.7.8 -``` - -3、 Appendix -In case we no longer have the alternative python version installed on our system we can remove its `update-alternatives` listing. For example let's remove python2.7 version: - -``` -# update-alternatives --remove python /usr/bin/python2.7 -update-alternatives: removing manually selected alternative - switching python to auto mode -update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode -``` - --------------------------------------------------------------------------------- - -via: http://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux - -作者:[作者][] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md b/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md new file mode 100644 index 0000000000..0438614ddb --- /dev/null +++ b/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md @@ -0,0 +1,102 @@ +如何将 Debian Linux 系统中默认的 Python 替代为其他版本 +==================================================== + +当你安装 Debian Linux 时,安装过程有可能同时为你提供多个可用的 Python 版本,因此系统中会存在多个 Python 的可执行二进制文件。你可以按照以下方法使用 `ls` 命令来查看你的系统中都有那些 Python 的二进制文件可供使用。 + +``` +$ ls /usr/bin/python* +/usr/bin/python /usr/bin/python2 /usr/bin/python2.7 /usr/bin/python3 /usr/bin/python3.4 /usr/bin/python3.4m /usr/bin/python3m +``` + +执行如下命令查看默认的 Python 版本信息: + +``` +$ python --version +Python 2.7.8 +``` + +1、基于用户修改 Python 版本: +想要为某个特定用户修改 Python 版本,只需要在其 home 目录下创建一个 `alias(别名)` 即可。打开 `~/.bashrc` 文件,添加新的别名信息来修改默认使用的 Python 版本。 + +``` +alias python='/usr/bin/python3.4' +``` + +一旦完成以上操作,重新登录或者重新加载 `.bashrc` 文件,使操作生效。 + +``` +$ . ~/.bashrc +``` + +检查当前的 Python 版本。 + +``` +$ python --version +Python 3.4.2 +``` + +2、 基于系统级别修改 Python 版本 +我们可以使用 `update-alternatives` 来为整个系统更改 Python 版本。以 root 身份登录,首先罗列出所有可用的 python 替代版本信息: + +``` +# update-alternatives --list python +update-alternatives: error: no alternatives for python +``` + +如果出现以上所示的错误信息,则表示 Python 的替代版本尚未被 `update-alternatives` 命令识别。想解决这个问题,我们需要更新一下替代表,将 `python2.7` 和 `python3.4` 放入其中。 + +``` +# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 +update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode +# update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2 +update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode +``` + +`--install` 选项使用了多个参数用于创建符号链接。最后一个参数指定了此选项的优先级,如果我们没有手动来设置替代选项,那么具有最高优先级的选项就会被选中。这个例子中,我们为 `/usr/bin/python3.4` 设置的优先级为2,所以 `update-alternatives` 命令会自动将它设置为默认 Python 版本。 + +``` +# python --version +Python 3.4.2 +``` + +接下来,我们继续列出可用的 Python 替代版本。 + +``` +# update-alternatives --list python +/usr/bin/python2.7 +/usr/bin/python3.4 +``` + +现在开始,我们就可以使用下方的命令随时在列出的 Python 替代版本中任意切换了。 + +``` +# update-alternatives --config python +``` + +![](http://linuxconfig.org/images/change-python-alternative-version-debian-linux.png) + +``` +# python --version +Python 2.7.8 +``` + +3、附录 + +一旦我们的系统中不再存在某个 Python 的替代版本时,我们可以将其从 `update-alternatives` 列表中删除掉。例如,我们可以将列表中的 python2.7 版本移除掉。 + +``` +# update-alternatives --remove python /usr/bin/python2.7 +update-alternatives: removing manually selected alternative - switching python to auto mode +update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode +``` + +-------------------------------------------------------------------------------- + +via: http://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux + +作者:[作者][] +译者:[mr-ping](https://github.com/mr-ping) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + From ec187dbd52544c934bca8c88f5556e84524dc0c5 Mon Sep 17 00:00:00 2001 From: Ping Date: Thu, 28 Jan 2016 14:45:54 +0800 Subject: [PATCH 0902/1710] Reformat somewhere --- ...rom default to alternative Python version on Debian Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md b/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md index 0438614ddb..5ff89d7944 100644 --- a/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md +++ b/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md @@ -16,6 +16,7 @@ Python 2.7.8 ``` 1、基于用户修改 Python 版本: + 想要为某个特定用户修改 Python 版本,只需要在其 home 目录下创建一个 `alias(别名)` 即可。打开 `~/.bashrc` 文件,添加新的别名信息来修改默认使用的 Python 版本。 ``` @@ -36,6 +37,7 @@ Python 3.4.2 ``` 2、 基于系统级别修改 Python 版本 + 我们可以使用 `update-alternatives` 来为整个系统更改 Python 版本。以 root 身份登录,首先罗列出所有可用的 python 替代版本信息: ``` From 9f36a2ebdfc07804a99e3fa41c8bec867e47105d Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 29 Jan 2016 07:00:55 +0800 Subject: [PATCH 0903/1710] PUB:20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command @runningwater --- ...iple Words or String Pattern Using grep Command.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {translated/tech/Linux or UNIX grep Command Tutorial series => published}/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md (81%) diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md b/published/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md similarity index 81% rename from translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md rename to published/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md index 9af1afa163..ed44522d70 100644 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md +++ b/published/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md @@ -1,5 +1,6 @@ -使用 grep 命令来搜索多个单词/字符串模式 +grep 命令系列:使用 grep 命令来搜索多个单词 ================================================================================ + 要使用 grep 命令来搜索多个字符串或单词,我们该怎么做?例如我想要查找 /path/to/file 文件中的 word1、word2、word3 等单词,我怎么样命令 grep 查找这些单词呢? [grep 命令支持正则表达式][1]匹配模式。要使用多单词搜索,请使用如下语法: @@ -10,7 +11,7 @@ $ grep 'warning\|error\|critical' /var/log/messages -仅仅只是要匹配单词的话,可以加上 -w 选项参数: +仅仅只是要匹配单词(即该词两侧是单词分界符,针对西方以空格分隔的语言而言)的话,可以加上 -w 选项参数: $ grep -w 'warning\|error\|critical' /var/log/messages @@ -26,7 +27,7 @@ egrep 命令可以跳过上面的语法格式,其使用的语法格式如下 ![Fig.01: Linux / Unix egrep Command Search Multiple Words Demo Output](http://s0.cyberciti.org/uploads/faq/2008/04/egrep-words-output.png) -Fig.01: Linux / Unix egrep 命令查找多个单词输出例子 +图一: Linux / Unix egrep 命令查找多个单词输出例子 -------------------------------------------------------------------------------- @@ -34,8 +35,8 @@ via: http://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/ 作者:Vivek Gite 译者:[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/) 荣誉推出 -[1]:http://www.cyberciti.biz/faq/grep-regular-expressions/ \ No newline at end of file +[1]:https://linux.cn/article-6941-1.html \ No newline at end of file From 2343b8358acc60ce0667e33ff6b9fdedabec5692 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 29 Jan 2016 07:05:18 +0800 Subject: [PATCH 0904/1710] PUB:20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches @runningwater --- ...ries 4--Grep Count Lines If a String or Word Matches.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {translated/tech/Linux or UNIX grep Command Tutorial series => published}/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md (88%) diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md b/published/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md similarity index 88% rename from translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md rename to published/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md index 63cb1aa189..081ecdb9b6 100644 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md +++ b/published/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md @@ -1,8 +1,9 @@ -Grep 命令统计匹配的字符串/单词行数 +grep 命令系列:用 grep 命令统计匹配字符串的行数 ================================================================================ + 在 Linux 或 UNIX 操作系统下,对于给定的单词或字符串,我们应该怎么统计它们在每个输入文件中存在的行数呢? -您需要通过添加 -c 或者 --count 选项参数来抑制正常的输出。它将会显示对输入文件单词匹配的行数,如下示: +您需要通过添加 -c 或者 --count 选项参数来抑制正常的输出。它将会显示对输入文件单词匹配的行数,如下所示: $ grep -c vivek /etc/passwd @@ -28,6 +29,6 @@ via: http://www.cyberciti.biz/faq/grep-count-lines-if-a-string-word-matches/ 作者:Vivek Gite 译者:[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/) 荣誉推出 \ No newline at end of file From acc6502c8766f86eef2433bdecf7c96119149517 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 29 Jan 2016 08:09:57 +0800 Subject: [PATCH 0905/1710] PUB:20101020 19 Years of KDE History--Step by Step @jerryling315 --- ...0 19 Years of KDE History--Step by Step.md | 232 ++++++++++++++++++ ...0 19 Years of KDE History--Step by Step.md | 209 ---------------- 2 files changed, 232 insertions(+), 209 deletions(-) create mode 100644 published/20101020 19 Years of KDE History--Step by Step.md delete mode 100644 translated/talk/20101020 19 Years of KDE History--Step by Step.md diff --git a/published/20101020 19 Years of KDE History--Step by Step.md b/published/20101020 19 Years of KDE History--Step by Step.md new file mode 100644 index 0000000000..50cfff73fb --- /dev/null +++ b/published/20101020 19 Years of KDE History--Step by Step.md @@ -0,0 +1,232 @@ +KDE 的19年进化历程 +================ + +注:youtube 视频 + + +## 概述 + +KDE – 史上功能最强大的桌面环境之一;开源且可自由使用。19年前,1996年10月14日,德国程序员 Matthias Ettrich 开始了这个美观的桌面环境的开发。KDE 提供了用户界面以及其他很多日常使用的程序。今日,KDE 被成千上万人在 Unix 和 Windows 上使用。19年,一个对软件项目而言极为漫长的年岁。现在是时候让我们回到最初,看看这一切肇始于何处。 + +K Desktop Environment(KDE)有很多创新之处:新设计,美观,一致的体验,易于使用,对普通用户和专业用户都足够强大的应用库。“KDE”这个名字是对单词“通用桌面环境”(Common Desktop Environment)玩的一个简单谐音游戏,“K”即“Cool”。 第一代 KDE 在双许可证授权下使用了 Trolltech 公司专利的 Qt framework(现 Qt 的前身),这两个许可证分别是开源的 QPL(Q public license)和商业专利许可证(proprietary commercial license)。在2000年 Trolltech 公司让一部分 Qt 软件库开始发布在 GPL 证书下; Qt 4.5 发布在了 LGPL 2.1 许可证下。自2009起 KDE 桌面环境由三部分构成:Plasma Workspaces(用做交互界面),KDE Applications,作为 KDE Software 编译的 KDE Platform。 + +## 各发布版本 + +### 预发布版本 – 1996年10月14日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/0b3.png) + +当时名称为 Kool Desktop Environment;“Kool”这个单词在很快就被弃用了。最初,所有 KDE 的组件都是被单独发布在开发社区里的,它们并没有被一个大的项目所贯穿起来。开发组邮件列表中的首选通信是发往kde@fiwi02.wiwi.uni-Tubingen.de 邮件列表。 + +### KDE 1.0 – 1998年7月12日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/10.png) + +这个版本受到了颇有争议的反馈。很多人反对使用 Qt 框架,因为当时的 FreeQt 许可证和自由软件许可证并不兼容,他们建议开发组使用 Motif 或者 LessTif 替代。尽管有着这些反对声,KDE 仍然被很多用户所青睐,并且成功作为第一个 Linux 发行版的环境被集成了进去。 + +![28 January 1999](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/11.png) + +*1999年1月28日* + +有一次升级,**K Desktop Environment 1.1**,更快,更稳定的同时加入了很多小的改进。这个版本同时也加入了很多新的图标,背景和材质纹理。和这些全面翻新同时出现的还有 Torsten Rahn 绘制的全新 KDE 图标----一个放在齿轮前的字母 K ;这个图标的修改版也一直沿用至今。 + +### KDE 2.0 – 2000年10月23日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/20.png) + +重大更新: + +- DCOP (Desktop COmmunication Protocol),一个端到端的通信协议 +- KIO,一个应用程序 I/O 库 +- KParts,组件对象模型 +- KHTML,一个符合 HTML 4.0 标准的渲染绘制引擎。 + +![26 February 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/21.png) + +*2001年2月26日* + +**K Desktop Environment 2.1** 首次发布了媒体播放器 noatun,它使用了模组化、插件设计。为了便利开发者,K Desktop Environment 2.1 打包了 KDevelop。 + +![15 August 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/22.png) + +*2001年8月15日* + +**KDE 2.2**版本在 GNU/Linux 上加快了50%的应用启动速度,同时提高了 HTML 渲染、JavaScript 稳定性和性能,同时还增加了一些 KMail 的功能。 + +### KDE 3.0 – 2002年4月3日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/30.png) + +K Desktop Environment 3.0 加入了更好的限制使用功能,这个功能在电话亭、网咖,企业公用电脑上被广泛需求,它可以禁止用户完全使用软件的某些能力。 + +![28 January 2003](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/31.png) + +*2003年1月28日* + +**K Desktop Environment 3.1** 加入了新的默认窗口(Keramik)和图标样式(Crystal)和其他一些改进。 + +![3 February 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/32.png) + +*2004年2月3日* + +**K Desktop Environment 3.2** 加入了诸如在网页表格、书写邮件中拼写检查的新功能;增强了邮件和日历功能。完善了 Konqueror 中的标签机制和对 Microsoft Windows 桌面共享协议(RDP)的支持。 + +![19 August 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/33.png) + +*2004年8月19日* + +**K Desktop Environment 3.3** 侧重于组合不同的桌面组件。Kontact 被放进了群件应用 Kolab 并与 Kpilot 结合。Konqueror 的加入让 KDE 有了更好的 IM 交流功能,比如支持发送文件,以及其他 IM 协议(如IRC)的支持。 + +![16 March 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/34.png) + +*2005年3月16日* + +**K Desktop Environment 3.4** 侧重于提高易用性。这次更新为 Konqueror、Kate、KPDF 加入了文字-语音转换功能;也在桌面系统中加入了独立的 KSayIt 文字-语音转换软件。 + +![29 November 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/35.png) + +*2005年11月29日* + +**The K Desktop Environment 3.5** 发布加入了 SuperKaramba,为桌面环境提供了易于安装的插件(widgets)机制。 Konqueror 加入了广告屏蔽功能并成为了有史以来第二个通过 Acid2 CSS 测试的浏览器。 + +### KDE SC 4.0 – 2008年1月11日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/400.png) + +大部分的开发投身于把最新的技术和开发框架整合进 KDE 4 当中。Plasma 和 Oxygen 是两次最大的用户界面风格变更。同时,Dolphin 替代 Konqueror 成为默认文件管理器,Okular 成为了默认文档浏览器。 + +![29 July 2008](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/401.png) + +*2008年7月29日* + +**KDE 4.1** 引入了一个在 PIM 和 Kopete 中共享使用的表情主题系统;引入了可以让用户便利地从互联网上一键下载数据的 DXS。同时引入了 GStreamer、QuickTime 和 DirectShow 9 Phonon 后端。加入了新应用如: + +- Dragon Player +- Kontact +- Skanlite — 扫描仪软件 +- Step —— 物理模拟软件 +- 新游戏: Kdiamond、Kollision、KBreakout 和更多...... + +![27 January 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/402.png) + +*2009年1月27日* + +**KDE 4.2** 被认为是在已经极佳的 KDE 4.1 基础上的又一次全面超越,同时也成为了大多数用户替换旧 3.5 版本的完美选择。 + +![4 August 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/403.png) + +*2009年8月4日* + +**KDE 4.3** 修复了超过10000个 bug,同时加入了让近2000个用户要求的功能。整合一些新的技术例如:PolicyKit、NetworkManage & Geolocation services 等也是这个版本的一大重点。 + +![9 February 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/404.png) + +*2010年2月9日* + +**KDE SC 4.4** 基于 Qt 4 toolkit 的 4.6 版本,加入新的应用 KAddressBook。 + +![10 August 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/405.png) + +*2010年8月10日* + +**KDE SC 4.5** 增加了一些新特性:整合了开源的浏览器引擎 WebKit 库,其现在也在 Apple Safari 和 Google Chrome 中广泛使用。KPackageKit 替换了 Kpackage。 + +![26 January 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/406.png) + +*2011年1月26日* + +**KDE SC 4.6** 加强了 OpenGl 的性能,同时照常更新了无数bug和小改进。 + +![27 July 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/407.png) + +*2011年7月27日* + +**KDE SC 4.7** 升级 KWin 以兼容 OpenGL ES 2.0 ,更新了 Qt Quick,Plasma Desktop 带来许多增强和在应用里的大量新特性, 修复了1.2万个 bug。 + +![25 January 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/408.png) + +*2012年1月25日* + +**KDE SC 4.8**: 更好的 KWin 性能与 Wayland 支持,更崭新的 Doplhin 的外观设计。 + +![1 August 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/409.png) + +*2012年8月1日* + +**KDE SC 4.9**: 向 Dolphin 文件管理器增加了一些更新,比如重新加入了实时文件重命名,鼠标辅助按钮支持,更好的位置面板和更多文件分类管理功能。 + +![6 February 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/410.png) + +*2013年2月6日* + +**KDE SC 4.10**: 很多 Plasma 插件使用 QML 重写; Nepomuk、Kontact 和 Okular 得到了很大程度的性能和功能提升。 + +![14 August 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/411.png) + +*2013年8月14日* + +**KDE SC 4.11**: Kontact 和 Nepomuk 有了很多优化。 第一代 Plasma Workspaces 进入了单纯维护阶段。 + +![18 December 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/412.png) + +*2013年12月18日* + +**KDE SC 4.12**: Kontact 得到了极大的提升,包括许多小的改进。 + +![16 April 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/413.png) + +*2014年4月16日* + +**KDE SC 4.13**: Nepomuk 语义搜索功能替代了桌面上的原有的 Baloo 搜索。 KDE SC 4.13 以53个语言版本发布。 + +![20 August 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/414.png) + +*2014年8月20日* + +**KDE SC 4.14**: 这个发布版本侧重于稳定性提升:大量的 bug 修复和增加了一些小的功能。这是最后一个 KDE SC 4 发布版本。 + +### KDE Plasma 5.0 – 2014年7月15日 + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/500.png) + +KDE Plasma 5 – 第五代 KDE。大幅改进了设计和系统,新的默认主题 Breeze 完全迁移到了 QML,更好的 OpenGL 性能,更完美的 HiDPI (高分辨率)显示支持。 + +![11 November 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/501.png) + +*2014年11月11日* + +**KDE Plasma 5.1**:迁移了从 Plasma 4 里丢失的功能。 + +![27 January 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/502.png) + +*2015年1月27日* + +**KDE Plasma 5.2**:新组件:BlueDevil、KSSHAskPass、Muon、SDDM 主题设置、KScreen、GTK+ 样式设置和 KDecoration。 + +![28 April 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/503.png) + +*2015年4月28日* + +**KDE Plasma 5.3**:Plasma Media Center 技术预览。新的蓝牙和触摸板小程序;改良了电源管理。 + +![25 August 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/504.png) + +*2015年8月25日* + +**KDE Plasma 5.4**:Wayland 登场,新的基于 QML 的音频管理程序,一个全屏的程序启动器替代品。 + +万分感谢 [KDE][1] 开发者及社区,并感谢 Wikipedia 为书写 [概述][2] 带来的帮助,同时,感谢所有读者。让我们保持自由精神(be free)并继续支持如同 KDE 一样的开源的自由软件发展。 + +-------------------------------------------------------------------------------- + +via: [https://tlhp.cf/kde-history/](https://tlhp.cf/kde-history/) + +作者:[Pavlo Rudyi][a] +译者:[jerryling315](https://github.com/jerryling315) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://www.kde.org/ +[2]: https://en.wikipedia.org/wiki/KDE_Plasma_5 +[a]: https://tlhp.cf/author/paul/ diff --git a/translated/talk/20101020 19 Years of KDE History--Step by Step.md b/translated/talk/20101020 19 Years of KDE History--Step by Step.md deleted file mode 100644 index ef90acd91f..0000000000 --- a/translated/talk/20101020 19 Years of KDE History--Step by Step.md +++ /dev/null @@ -1,209 +0,0 @@ -# 19年KDE进化历程 -注:youtube 视频 - - -## 概述 -KDE – 史上功能最强大的桌面环境之一; 开源且免费。19年前,1996年10月14日,德国程序员 Matthias Ettrich 开始了编写这个美观的桌面环境。KDE提供了诸如shell以及其他很多日常使用的程序。今日,KDE被成千上万人在 Unix 和 Windows 上使用。19年----一个对软件项目而言极为漫长的年岁。现在是时候让我们回到最初,看看这一切从哪里开始了。 - -K Desktop Environment(KDE)有很多创新之处:新设计,美观,连贯性,易于使用,对普通用户和专业用户都足够强大的应用库。"KDE"这个名字是对单词"通用桌面环境"(Common Desktop Environment)玩的一个简单谐音游戏,"K"----"Cool"。 第一代KDE在双证书授权下使用了有专利的 Trolltech's Qt 框架 (现Qt的前身),这两个许可证分别是 open source QPL(Q public license) 和 商业专利许可证(proprietary commercial license)。在2000年 Trolltech 让一部分 Qt 软件库开始发布在 GPL 证书下; Qt 4.5 发布在了 LGPL 2.1 许可证下。自2009起 KDE 桌面环境由三部分构成:Plasma Workspaces (作Shell),KDE 应用,作为 KDE Software 编译的 KDE Platform. - -## 各发布版本 -### Pre-Release – 1996年10月14日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/0b3.png) - -当时名称为 Kool Desktop Environment;"Kool"这个单词在很快就被弃用了。最初,所有KDE的组件都是被单独发布在开发社区里的,他们之间没有任何环绕大项目的组装配合。开发组邮件列表中的第一封通信是发往kde@fiwi02.wiwi.uni-Tubingen.de 的邮件。 - -### KDE 1.0 – 1998年7月12日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/10.png) - -这个版本受到了颇有争议的反馈。很多人反对使用Qt框架----当时的 FreeQt 许可证和自由软件许可证并不兼容----并建议开发组使用 Motif 或者 LessTif 替代。尽管有着这些反对声,KDE 仍然被很多用户所青睐,并且成功作为第一个Linux发行版的环境被集成了进去。(made its way into the first Linux distributions) - -![28 January 1999](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/11.png) - -1999年1月28日 - -一次升级,**K Desktop Environment 1.1**,更快,更稳定的同时加入了很多小升级。这个版本同时也加入了很多新的图标,背景,外观文理。和这些全面翻新同时出现的还有 Torsten Rahn 绘制的全新KDE图标----齿轮前的3个K字母;这个图标的修改版也一直沿用至今。 - -### KDE 2.0 – 2000年10月23日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/20.png) - -重大更新:_ DCOP (Desktop COmmunication Protocol),一个端到端的通信协议 _ KIO,一个应用程序I/O库 _ KParts,组件对象模板 _ KHTML,一个符合 HTML 4.0 标准的图像绘制引擎。 - -![26 February 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/21.png) - -2001年2月26日 - -**K Desktop Environment 2.1** 首次发布了媒体播放器 noatun,noatun使用了先进的模组-插件设计。为了便利开发者,K Desktop Environment 2.1 打包了 KDevelop - -![15 August 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/22.png) - -2001年8月15日 - -**KDE 2.2**版本在GNU/Linux上加快了50%的应用启动速度,同时提高了稳定性和 HTML、JavaScript的解析性能,同时还增加了一些 KMail 的功能。 - -### KDE 3.0 – 2002年4月3日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/30.png) - -K Desktop Environment 3.0 加入了更好的限制使用功能,这个功能在网咖,企业公用电脑上被广泛需求。 - -![28 January 2003](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/31.png) - -2003年1月28日 - -**K Desktop Environment 3.1** 加入了新的默认窗口(Keramik)和图标样式(Crystal)和其他一些改进。 - -![3 February 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/32.png) - -2004年2月3日 - -**K Desktop Environment 3.2** 加入了诸如网页表格,书写邮件中拼写检查的新功能;补强了邮件和日历功能。完善了Konqueror 中的标签机制和对 Microsoft Windows 桌面共享协议的支持。 - -![19 August 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/33.png) - -2004年8月19日 - -**K Desktop Environment 3.3** 侧重于组合不同的桌面组件。Kontact 被放进了群件应用Kolab 并与 Kpilot 结合。Konqueror 的加入让KDE有了更好的 IM 交流功能,比如支持发送文件,以及其他 IM 协议(如IRC)的支持。 - -![16 March 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/34.png) - -2005年3月16日 - -**K Desktop Environment 3.4** 侧重于提高易用性。这次更新为Konqueror,Kate,KPDF加入了文字-语音转换功能;也在桌面系统中加入了独立的 KSayIt 文字-语音转换软件。 - -![29 November 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/35.png) - -2005年11月29日 - -**The K Desktop Environment 3.5** 发布加入了 SuperKaramba,为桌面环境提供了易于安装的插件机制。 desktop. Konqueror 加入了广告屏蔽功能并成为了有史以来第二个通过Acid2 CSS 测试的浏览器。 - -### KDE SC 4.0 – 2008年1月11日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/400.png) - -大部分开组投身于把最新的技术和开发框架整合进 KDE 4 当中。Plasma 和 Oxygen 是两次最大的用户界面风格变更。同时,Dolphin 替代 Konqueror 成为默认文件管理器,Okular 成为了默认文档浏览器。 - -![29 July 2008](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/401.png) - -2008年7月29日 - -**KDE 4.1** 引入了一个在 PIM 和 Kopete 中使用的表情主题系统;引入了可以让用户便利地从互联网上一键下载数据的DXS。同时引入了 GStreamer,QuickTime,和 DirectShow 9 Phonon 后台。加入了新应用如:_ Dragon Player _ Kontact _ Skanlite – 扫描仪软件,_ Step – 物理模拟软件 * 新游戏: Kdiamond,Kollision,KBreakout 和更多...... - -![27 January 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/402.png) - -2009年1月27日 - -**KDE 4.2** 被认为是在已经极佳的 KDE 4.1 基础上的又一次全面超越,同时也成为了大多数用户替换旧 3.5 版本的完美选择。 - -![4 August 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/403.png) - -2009年8月4日 - -**KDE 4.3** 修复了超过10,000个 bugs,同时加入了让近2,000个被用户需求的功能。整合一些新的技术例如:PolicyKit,NetworkManage & Geolocation services 等也是这个版本的一大重点。 - -![9 February 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/404.png) - -2010年2月9日 - -**KDE SC 4.4** 基础 Qt 4 开框架的 4.6 版本,新的应用 KAddressBook 被加入,同时也是is based on version 4.6 of the Qt 4 toolkit. New application – KAddressBook,Kopete首次发布。 - -![10 August 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/405.png) - -2010年8月10日 - -**KDE SC 4.5** 增加了一些新特性:整合了 WebKit 库----一个开源的浏览器引擎库,现在也被在 Apple Safari 和 Google Chrome 中广泛使用。KPackageKit 替换了 Kpackage。 - -![26 January 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/406.png) - -2011年1月26日 - -**KDE SC 4.6** 加强了 OpenGl 的性能,同时照常更新了无数bug和小改进。 - -![27 July 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/407.png) - -2011年7月27日 - -**KDE SC 4.7** 升级 KWin 以兼容 OpenGL ES 2.0 ,更新了 Qt Quick,Plasma Desktop 中在应用里普遍使用的新特性 1.2万个bug被修复。 - -![25 January 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/408.png) - -2012年1月25日 - -**KDE SC 4.8**: 更好的 KWin 性能与 Wayland 支持,更新了 Doplhin 的外观设计。 - -![1 August 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/409.png) - -2012年8月1日 - -**KDE SC 4.9**: 向 Dolphin 文件管理器增加了一些更新,比如加入了实时文件重命名,鼠标辅助按钮支持,更好的位置标签和更多文件分类管理功能。 - -![6 February 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/410.png) - -2013年2月6日 - -**KDE SC 4.10**: 很多 Plasma 插件使用 QML 重写; Nepomuk,Kontact 和 Okular 得到了很大程度的性能和功能提升。 - -![14 August 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/411.png) - -2013年8月14日 - -**KDE SC 4.11**: Kontact 和 Nepomuk 有了很大的优化。 第一代 Plasma Workspaces 进入了仅有维护而没有新生开发的软件周期。 - -![18 December 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/412.png) - -2013年12月18日 - -**KDE SC 4.12**: Kontact 得到了极大的提升。 - -![16 April 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/413.png) - -2014年4月16日 - -**KDE SC 4.13**: Nepomuk 语义搜索功能替代了桌面上的原有的Baloo搜索。 KDE SC 4.13 发布了53个语言版本。 - -![20 August 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/414.png) - -2014年8月20日 - -**KDE SC 4.14**: 这个发布版本侧重于稳定性提升:大量的bug修复和小更新。这是最后一个 KDE SC 4 发布版本。 - -### KDE Plasma 5.0 – 2014年7月15日 -![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/500.png) - -KDE Plasma 5 – 第五代 KDE。大幅改进了设计和系统,新的默认主题 ---- Breeze,完全迁移到了 QML,更好的 OpenGL 性能,更完美的 HiDPI (高分辨率)显示支持。 - -![11 November 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/501.png) - -2014年11月11日 - -**KDE Plasma 5.1**:加入了Plasma 4里原先没有补完的功能。 - -![27 January 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/502.png) - -2015年1月27日 - -**KDE Plasma 5.2**:新组件:BlueDevil,KSSHAskPass,Muon,SDDM 主题设置,KScreen,GTK+ 样式设置 和 KDecoration. - -![28 April 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/503.png) - -2015年4月28日 - -**KDE Plasma 5.3**:Plasma Media Center 技术预览。新的蓝牙和触摸板小程序;改良了电源管理。 - -![25 August 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/504.png) - -2015年8月25日 - -**KDE Plasma 5.4**:Wayland 登场,新的基于 QML 的音频管理程序,交替式全屏程序显示。 - -万分感谢 [KDE][1] 开发者和社区及Wikipedia 为书写 [概述][2] 带来的帮助,同时,感谢所有读者。希望大家保持自由精神(be free)并继续支持如同 KDE 一样的开源的自由软件发展。 - --------------------------------------------------------------------------------- - -via: [https://tlhp.cf/kde-history/](https://tlhp.cf/kde-history/) - -作者:[Pavlo RudyiCategories][a] 译者:[jerryling315](https://github.com/jerryling315) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]: https://www.kde.org/ -[2]: https://en.wikipedia.org/wiki/KDE_Plasma_5 -[a]: https://tlhp.cf/author/paul/ From 0cde68a7de1a3d2bb34a8b961fb25ae9bc7519ce Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Fri, 29 Jan 2016 19:19:37 +0800 Subject: [PATCH 0906/1710] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AE=A4=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 2015--The best open source application development tools.md | 2 -- 1 file changed, 2 deletions(-) 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 index c135ae0832..b99752ea7b 100644 --- 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 @@ -1,5 +1,3 @@ -GHLandy Translating - 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 From 696e8481b55224e5919ce4257881d63d4d462b62 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 30 Jan 2016 14:16:30 +0800 Subject: [PATCH 0907/1710] PUB:20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @runningwater 这篇你给忘记了吧~~ --- ...ep From Files and Display the File Name.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {sources/tech/Linux or UNIX grep Command Tutorial series => published}/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md (71%) diff --git a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md b/published/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md similarity index 71% rename from sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md rename to published/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md index 3b683746eb..4953cae431 100644 --- a/sources/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md +++ b/published/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md @@ -1,14 +1,14 @@ -(translating by runningwater) -Grep From Files and Display the File Name +grep 命令系列:从文件中搜索并显示文件名 ================================================================================ -How do I grep from a number of files and display the file name only? -When there is more than one file to search it will display file name by default: +我怎样从几个文件中搜索(grep),并只显示匹配到的文件的文件名? - grep "word" filename +当你从不止一个的文件中搜索时,默认它将显示文件名: + + grep "word" 文件名 grep root /etc/* -Sample outputs: +示例输出: /etc/bash.bashrc: See "man sudo_root" for details. /etc/crontab:17 * * * * root cd / && run-parts --report /etc/cron.hourly @@ -20,12 +20,12 @@ Sample outputs: /etc/logrotate.conf: create 0664 root utmp /etc/logrotate.conf: create 0660 root utmp -The first name is file name (e.g., /etc/crontab, /etc/group). The -l option will only print filename if th +每行开始的第一个部分是文件名(如:/etc/crontab、/etc/group)。使用 -l 选项可以只显示文件名: grep -l "string" filename grep -l root /etc/* -Sample outputs: +示例输出: /etc/aliases /etc/arpwatch.conf @@ -36,12 +36,12 @@ Sample outputs: /etc/crontab /etc/group -You can suppress normal output; instead print the name of each input file from **which no output would normally have been** printed: +你也可以逆转输出;使用 -L 选项来输出**那些不匹配的文件的文件名**: grep -L "word" filename grep -L root /etc/* -Sample outputs: +示例输出: /etc/apm /etc/apparmor @@ -62,7 +62,7 @@ Sample outputs: via: http://www.cyberciti.biz/faq/grep-from-files-and-display-the-file-name/ 作者:Vivek Gite -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From a8951fce7de9fd81e8a4a6ccb0a1cc769632027d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 30 Jan 2016 14:27:02 +0800 Subject: [PATCH 0908/1710] PUB:20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX @ictlyh --- ...How To Find Files by Content Under UNIX.md | 31 +++++-------------- 1 file changed, 8 insertions(+), 23 deletions(-) rename {translated/tech/Linux or UNIX grep Command Tutorial series => published}/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md (56%) diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md b/published/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md similarity index 56% rename from translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md rename to published/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md index 9bf698136a..5616548d54 100644 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md +++ b/published/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md @@ -1,21 +1,17 @@ -如何在 UNIX 中根据文件内容查找文件 -How To Find Files by Content Under UNIX +grep 命令系列:如何在 UNIX 中根据文件内容查找文件 ================================================================================ -为了完成课程作业,我写了很多 C 语言代码并把它们保存为 /home/user/c/*.c and *.h。那么在 UNIX shell 窗口中我如何能通过字符串或者单词(例如函数名 main())文件内容来查找文件呢? -I had written lots of code in C for my school work and saved it as source code under /home/user/c/*.c and *.h. How do I find files by content such as string or words (function name such as main() under UNIX shell prompt? + +为了完成课程作业,我写了很多 C 语言代码并把它们保存为 /home/user/c/*.c 和 *.h。那么在 UNIX shell 窗口中我如何能通过字符串或者单词(例如函数名 main())文件内容来查找文件呢? 你需要用到以下工具: -You need to use the following tools: [a] **grep 命令** : 输出匹配模式的行。 [b] **find 命令**: 在目录层次中查找文件。 ### [使用 grep 命令根据内容查找文件][1] -### [grep Command To Find Files By][1] Content ### 输入以下命令: -Type the command as follows: grep 'string' *.txt grep 'main(' *.c @@ -25,48 +21,37 @@ Type the command as follows: grep -iR 'ultra' *.conf 其中 -Where -- **-i** : 忽视模式(匹配字符串 valid、 VALID、 ValID )和输入文件(匹配 file.c FILE.c FILE.C)的大小写。 +- **-i** : 忽略模式(匹配字符串 valid、 VALID、 ValID )和输入文件(匹配 file.c FILE.c FILE.C)的大小写。 - **-R** : 递归读取每个目录下的所有文件。 -- **-i** : Ignore case distinctions in both the PATTERN (match valid, VALID, ValID string) and the input files (math file.c FILE.c FILE.C filename). -- **-R** : Read all files under each directory, recursively + ### 高亮匹配到的模式 ### -### Highlighting searched patterns ### 在搜索大量文件的时候你可以轻松地高亮模式: -You can highlight patterns easily while searching large number of files: $ grep --color=auto -iR 'getChar();' *.c ### 为查找到的模式显示文件名和行号 ### -### Displaying file names and line number for searched patterns ### 你也许需要显示文件名和行号: -You may also need to display filenames and numbers: $ grep --color=auto -iRnH 'getChar();' *.c 其中, -Where, -- **-n** : 在输出的每行前面添加文件中以 1 开始的行号。 +- **-n** : 在输出的每行前面添加以 1 开始的行号。 - **-H** : 为每个匹配打印文件名。要搜索多个文件时这是默认选项。 -- **-n** : Prefix each line of output with the 1-based line number within its input file. -- **-H** Print the file name for each match. This is the default when there is more than one file to search. $grep --color=auto -nH 'DIR' * 输出样例: -Sample output: ![Fig.01: grep 命令显示搜索到的模式](http://www.cyberciti.biz/faq/wp-content/uploads/2008/09/grep-command.png) -Fig.01: grep 命令显示搜索到的模式 +*Fig.01: grep 命令显示搜索到的模式* 你也可以使用 find 命令: -You can also use find command: $ find . -name "*.c" -print | xargs grep "main(" @@ -76,7 +61,7 @@ via: http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/ 作者:Vivek Gite 译者:[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 13dade0c1325cf49108f8e61b43b4d7fab4527db Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 30 Jan 2016 14:35:17 +0800 Subject: [PATCH 0909/1710] PUB:20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File @sonofelice --- ...ives Uncommented Lines of a Config File.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech/Linux or UNIX grep Command Tutorial series => published}/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md (83%) diff --git a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md b/published/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md similarity index 83% rename from translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md rename to published/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md index 9de5e1d64d..28ae0b5122 100644 --- a/translated/tech/Linux or UNIX grep Command Tutorial series/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md +++ b/published/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md @@ -1,10 +1,9 @@ -Linux / UNIX 下只查看配置文件的有效配置行(配置文件中未被注释的命令行) +grep 命令系列:如何只查看配置文件中未被注释的有效配置行 ========================================================= 大多数的Linux和类Unix系统的配置文件中都有许多的注释行,但是有时候我只想看其中的有效配置行。那我怎么才能只看到quid.conf或httpd.conf这样的配置文件中的非注释命令行呢?怎么去掉这些注释或者空行呢? -我们可以使用UNIX / BSD / OS X / Linux 这些操作系统自身提供的grep,sed,awk,perl或者其他文本处理工具来查看配置文件中的有效配置命令行。 - +我们可以使用 UNIX/BSD/OS X/Linux 这些操作系统自身提供的 grep,sed,awk,perl或者其他文本处理工具来查看配置文件中的有效配置命令行。 ### grep 命令示例——去掉注释 ### @@ -100,7 +99,7 @@ Linux / UNIX 下只查看配置文件的有效配置行(配置文件中未被 Include /etc/apache2/sites-enabled/ -想要跳过空行,可以使用 [egrep 命令][1], 示例: +想要跳过其中的空行,可以使用 [egrep 命令][1], 示例: egrep -v "^#|^$" /etc/apache2/apache2.conf ## or pass it to the page such as more or less ## @@ -119,23 +118,24 @@ Linux / UNIX 下只查看配置文件的有效配置行(配置文件中未被 ![Fig.01: Unix/Linux Egrep Strip Out Comments Blank Lines](http://s0.cyberciti.org/uploads/faq/2008/05/grep-strip-out-comments-blank-lines.jpg) -Fig.01: Unix/Linux Egrep 除去注释行和空行 +*图 01: Unix/Linux Egrep 除去注释行和空行* ### 理解 grep/egrep 命令行选项 ### --v 选项,选择出不匹配的命令行。该选项适用于所有基于posix的系统。正则表达式 ^$ 匹配出所有的非空行, ^#匹配出所有的不以“#”开头的非注释行。 +-v 选项,选择出不匹配的命令行。该选项适用于所有基于posix的系统。正则表达式 `^$` 匹配出所有的非空行, `^#` 匹配出所有的不以“#”开头的非注释行。 ### sed 命令示例 ### -可以按照如下示例使用 GNU / sed 命令: +可以按照如下示例使用 GNU 上的 sed 命令: $ sed '/ *#/d; /^ *$/d' /path/to/file $ sed '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf -GNU or BSD sed 也可以修改配置文件。下面的语法是编辑文件,修改扩展名(比如 .bak)进行文件备份: + +GNU 或 BSD 上的 sed 也可以修改配置文件。下面的命令的作用是原地编辑文件,并以特定(比如 .bak)备份文件: sed -i'.bak.2015.12.27' '/ *#/d; /^ *$/d' /etc/apache2/apache2.conf -更多信息见参考手册 - [grep(1)][2], [sed(1)][3] +更多信息见参考手册 - [grep(1)][2], [sed(1)][3]。 -------------------------------------------------------------------------------- @@ -143,7 +143,7 @@ via: http://www.cyberciti.biz/faq/shell-display-uncommented-lines-only/ 作者:Vivek Gite 译者:[sonofelice](https://github.com/sonofelice) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b9f9aa3c58b98c8ed92acdb93307ae46456b6578 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 1 Feb 2016 07:48:36 +0800 Subject: [PATCH 0910/1710] PUB:20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal @soooogreen --- ...esktop Fun--Christmas Tree For Your Terminal.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md (88%) diff --git a/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md b/published/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md similarity index 88% rename from translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md rename to published/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md index dbbab5ef8c..48b6d23f18 100644 --- a/translated/tech/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md +++ b/published/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md @@ -1,16 +1,16 @@ -Linux / Unix桌面之趣:终端上的圣诞树 +Linux/Unix 桌面趣事:终端上的圣诞树 ================================================================================ -给你的Linux或Unix控制台创造一棵圣诞树玩玩吧。在此之前,需要先安装一个Perl模块,命名为Acme::POE::Tree。这是一棵很喜庆的圣诞树,我已经在Linux、OSX和类Unix系统上验证过了。 +给你的Linux或Unix控制台创造一棵圣诞树玩玩吧。在此之前,需要先安装一个Perl模块,命名为Acme::POE::Tree。这是一棵很喜庆的圣诞树,我已经在Linux、OSX和类Unix系统上验证过了。 ### 安装 Acme::POE::Tree ### -安装perl模块最简单的办法就是使用cpan(Perl综合典藏网)。打开终端,把下面的指令敲进去便可安装Acme::POE::Tree。 +安装perl模块最简单的办法就是使用CPAN(Perl综合典藏网(Comprehensive Perl Archive Network))。打开终端,把下面的指令敲进去便可安装Acme::POE::Tree。 ## 以root身份运行 ## perl -MCPAN -e 'install Acme::POE::Tree' -**案例输出:** +**示例输出:** Installing /home/vivek/perl5/man/man3/POE::NFA.3pm Installing /home/vivek/perl5/man/man3/POE::Kernel.3pm @@ -49,7 +49,7 @@ Linux / Unix桌面之趣:终端上的圣诞树 perl -MAcme::POE::Tree -e 'Acme::POE::Tree->new()->run()' -**案例输出** +**示例输出** ![Gif 01: An animated christmas tree in Perl](http://s0.cyberciti.org/uploads/cms/2015/12/perl-tree.gif) @@ -71,7 +71,7 @@ Gif 01: 一棵用Perl写的喜庆圣诞树 ); $tree->run(); -这样就可以通过修改star_delay、run_for和light_delay参数的值来自定义你的树了。一棵提供消遣的终端圣诞树就此诞生。 +这样就可以通过修改star_delay、run_for和light_delay参数的值来自定义你的树了。一棵好玩的终端圣诞树就此诞生。 -------------------------------------------------------------------------------- @@ -79,6 +79,6 @@ via: http://www.cyberciti.biz/open-source/command-line-hacks/linux-unix-desktop- 作者:Vivek Gite 译者:[soooogreen](https://github.com/soooogreen) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b6b13ea3c377dc969bb1df0fdac58181427b4762 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 1 Feb 2016 07:50:52 +0800 Subject: [PATCH 0911/1710] PUB:20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman @martin2011qi --- ...dation--Best Quotes of Richard Stallman.md | 241 ++++++++++++++++++ ...dation--Best Quotes of Richard Stallman.md | 171 ------------- 2 files changed, 241 insertions(+), 171 deletions(-) create mode 100644 published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md delete mode 100644 translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md diff --git a/published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md new file mode 100644 index 0000000000..40a0607bef --- /dev/null +++ b/published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md @@ -0,0 +1,241 @@ +理查德·斯托曼经典语录集锦 +================================================================================ +注:youtube 视频 + + +**理查德·马修·斯托曼(Richard Matthew Stallman)** (RMS) – 神级程序员之一。他是一名程序员,是 GCC、GDB、Emacs 的构建者,软件自由的传教士,[GNU Project][1] 和 [FSF][2] 的创办人。 + +**GNU** 是 “GNU’s Not Unix!”的递归缩写。GNU 是一系列用于基于 Unix 的操作系统的自由软件集合。它能用于 GNU/Hurd 和 Linux 内核。于1983年9月27日公诸于众。常用组件有: + +- GNU Compiler Collection (GCC) +- GNU C library (glibc) +- GNU Core Utilities (coreutils) +- GNU Debugger (GDB) +- GNU Binary Utilities (binutils) +- GNU Bash shell +- GNOME desktop environment + +注:视频 + + +**自由软件基金会(Free Software Foundation)** (FSF) – 一个自由软件的非营利组织,致力于推进计算机用户的自由和捍卫他们的权力。于 1985年10月4日成立。阅读[更多][3]。 + +许多人不理解开源代码(open source code)和自由软件(free software)的区别。每个程序都应该是自由软件: + +- 与目的无关,随心运行程序的自由(自由0)。 +- 学习程序如何运作,并改变它为你所用的自由(自由1)。可以访问源码是这一条的前提。 +- 重新发布副本的自由,如此你便可以帮助你周围的人(自由 2)。 +- 发布自己修改版本给他人的自由(自由 3)。这样能让整个社区有机会从你的改变中受益。可以访问源码是这条的前提。 + +以上为自由软件的四项自由原则。 + +以下为理查德·斯托曼关于自由、软件、社交、哲学等方面的名言摘引。 + +**关于 Facebook:** + +> Facebook is not your friend, it is a surveillance engine. + +Facebook 不是你的朋友,是监控引擎。 + +**关于 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. + +Android 和 GNU/Linux 有很大的区别,因为其中几乎没有 GNU。的确,Android 和 GNU/Linux 之间仅有一个共同组件,那就是内核 - Linux。 + +**关于计算机行业:** + +> The computer industry is the only industry that is more fashion-driven than women's fashion. + +计算机行业是唯一一个比女性时尚业更容易受潮流影响的行业了。 + +**关于云计算:** + +> The interesting thing about cloud computing is that we've redefined cloud computing to include everything that we already do. + +关于云计算,有趣的是我们已经重新定义了云计算来包含我们曾干过的所有事。 + +**关于伦理:** + +> 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. + +无论神存在与否,都没有绝对的伦理道德。没有这份理所当然,我们该如何?也唯有尽善吧。 + +**关于自由:** + +> Free software is software that respects your freedom and the social solidarity of your community. So it's free as in freedom. + +自由软件是尊重个人自由和社会团结的软件。所以才能如自由般自由自在。 + +**关于目标和理想:** + +> 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. + +如果你想为这世界做些什么,仅有理想是不够的,你需要找条通往目标的道路并走完。 + +**关于分享:** + +> Sharing is good, and with digital technology, sharing is easy. + +分享很棒,而且数字化技术也使分享变得容易。 + +**关于 facebook(进阶版):** + +> 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. + +Facebook 蹂躏它们的用户。它不是你们的朋友;它就是个监控引擎。举个例子,你是否曾在一些网页或网站上看到 Facebook 的 “like” 按键。对,Facebook 知道你的电脑曾访问过那些网页。 + +**关于 web 应用:** + +> One reason you should not use web applications to do your computing is that you lose control. + +给你个为什么不应该使用 web 应用的理由,因为你失去了计算机的控制权。 + +> 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. + +如果你使用私有程序或他人的 web 服务器,那么你只能任人鱼肉。被软件的开发者轻易操纵。 + +**关于书:** + +> 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. + +印刷出来的书,当然是自由的。你可以付现金匿名买书,这也是我一直买书的方式。我绝不会使用信用卡,我买书时不会被任何数据库记下。是亚马逊把自由夺走了。 + +**关于 MPAA:** + +> Officially, MPAA stands for Motion Picture Association of America, but I suggest that MPAA stands for Malicious Power Attacking All. + +MPAA 其实是美国电影协会(Motion Picture Association of America),但我认为叫做攻击万物的邪恶力量(Malicious Power Attacking All)更为合适。 + +**关于金钱与职业:** + +> 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. + +我可以找份工作赚钱,并沉浸在编码的快乐中。但在职业生涯结束后,回首目睹自己筑就的高墙将人与人分隔开,我会觉得我耗尽毕生精力只换来了一个更糟糕的世界。 + +**关于私有软件:** + +> 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. + +私有软件使用户孤立、无助。因为禁止将软件给他人使用所以孤立,因为无法改变源码所以无助。他们不能学习其中真正的工作方式,所以整个私有软件体系就是一种不公的力量。 + +**关于智能手机:** + +> 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. + +智能手机就是电脑 —— 虽然做的和常用的电脑不同 —— 但是却能干电脑能干的活。所以我们所说的一切有关于电脑上的软件应该能自由运行 —— 必须坚持这一点 —— 在智能手机上也是这样,当然也包括平板。 + +**关于 CD 和数字内容:** + +> 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. + +CD 商店有一个弱势就是需要昂贵的库存,但是电子商店就没有这方面的需求:他们只需要将售卖的副本写入记忆棒,并在你忘带自己的记忆棒时卖你一个就是了。 + +**关于竞争范式(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. + +竞争范式就像是赛跑:奖励胜者,鼓励每一个跑得更快的人。当资本主义真的这样运作时,当然是件好事;但是维护它的人若是假设它一直这样运作的话那就大错特错了。 + +**关于 vi 和 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. + +有时会有人问我在 Emacs 的阵营使用 vi 是不是一种罪过。使用自由版的 vi 并不是一种罪过;是一种自我惩罚。所以好好享受其中乐趣吧。 + +**关于自由和历史:** + +> Value your freedom or you will lose it, teaches history. 'Don't bother us with politics', respond those who don't want to learn. + +历史告诉我们不珍惜自由便失去自由,然而有的人不懂吸取教训,只知道说“别拿政治烦我们”。 + +**关于专利:** + +> 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. + +软件专利对于软件的开发者来说十分危险,因为它们加剧了对于软件理念的垄断。 + +**关于版权:** + +> 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. + +其实,版权制度对作者也没有什么好处,撇开最受欢迎的那个,其他作者的主旨可能更好理解,所以分享无论对他们还是你的读者都是一件好事。 + +**关于工作与报酬:** + +> 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. + +劳有所得,或寻求收入的最大化并没有什么错,只要不是不择手段。 + +**关于 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. + +Chrome OS 确实是 GNU/Linux 的操作系统。但是,它在发布时没有安装常用应用,并为安装他们设置了阻碍。 + +**关于 Linux 用户:** + +> 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.' + +许多的 GNU/Linux 用户并没有听过自由软件。他们并没有意识到,这个系统是因为道德理想才存在的,与此一起被忽视的还有所谓的“开源”。 + +**关于 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. + +如果页面上有 “like” 按键,Facebook 就能知道谁访问了页面。即使不是 Facebook 的用户,也可以得到访问该页面电脑的 IP 地址。 + +**关于编程:** + +> 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. + +Lisp 和 C 语言是我的最爱。然自 1992 年以来我主要工作在自由软件活动上,导致我太忙了,没法做更多的编程。大概在 2008 年我便停止了做编程项目。 + +> C++ is a badly designed and ugly language. It would be a shame to use it in Emacs. + +C++ 设计的真糟糕、真丑陋。在 Emacs 上用它应该觉得羞愧。 + +**关于钻研(hacking)和学习编程:** + +> 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. + +(时过境迁,)人们没法再像我当初那样通过改进实实在在的操作系统来学习编程了。上世纪 80 年代,我常遇见计算机专业的毕业生,有生以来没见过真正的程序。他们接触的到的只有小玩意和学校的作业,因为每一个程序都是商业机密。他们没有机会为用户去写真正实用的特性,修复用户真正遭遇的问题。而这些正是真正的工作中你需要掌握的(东西)。 + +> 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". + +对于如“hacking”这般多样化的东西真的很难简单的下定义,不过在我看来诸如此类的行为都会有以下的这些共同点:嬉乐、智慧和探索。因此,hacking 意味着对可能的极限的探索,一颗向往快乐与智慧的心。能带来快乐与智慧的行为就有 “hack 的价值” 。 + +**关于浏览网页:** + +> 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. + +出于个人原因,我不会在我的电脑上浏览网页。(大部分时间处于没有网络连接的状态。)要浏览网页,我需要给一个守护进程发 mail,然后它会运行 wget 并把页面通过 mail 发还给我。这对我而言已经是最效率了,但那真的比实时慢太多了。 + +**关于音乐共享:** + +> 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] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/fsf-richard-stallman/ +[1]:http://www.gnu.org/ +[2]:http://www.fsf.org/ +[3]:https://www.fsf.org/about/ \ No newline at end of file diff --git a/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md deleted file mode 100644 index a8d1616106..0000000000 --- a/translated/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md +++ /dev/null @@ -1,171 +0,0 @@ -30 年自由软件基金会:理查德·斯托曼语录集锦 -================================================================================ -注:youtube 视频 - - -**理查德·马修·斯托曼** (rms) – IT大牛之一。他是一名程序员,GCC、GDB、Emacs 的构建者,软件自由传教士,[GNU Project][1] 和 [FSF][2] 的创办人。 - -**GNU** 是 “GNU’s Not Unix!”的缩写。GNU 是基于 Unix 操作系统的自由计算机软件集合。支持 GNU/Hurd 和 Linux 内核。于1983年9月27日公诸于众。常有组件: - -- 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 - -注:视频 - - -**自由软件基金会** (FSF) – 一个自由软件的非营利组织,致力于计算机用户自由的提升和权力的捍卫。于 1985 年 10 月 4 日成立。阅读[更多][3]。 - -- 于目的无关,随心运行程序的自由(自由0)。 -- 学习程序如何运作,并改变它为你所用的自由(自由1)。可以访问源码是这条的前提。 -- 重新发布副本的自由,如此你便可以帮助你的邻居了 (自由 2)。 -- 发布自己修改版本给他人的自由(自由 3)。这样能让整个社区有机会从你的改变中受益。可以访问源码是这条的前提。 - -以上为自由软件的四项自由原则。 - -以下为理查德·斯托曼关于自由、软件、社交、哲学等的名言摘引。 - -**关于 Facebook:** - -> Facebook 不是你的朋友,是监控引擎。 - -**关于 Android:** - -> Android 和 GNU/Linux 有很大的区别,因为其中几乎没有 GNU。的确,Android 和 GNU/Linux 之间仅有一个共同组件,那就是内核 - Linux。 - -**关于计算机行业:** - -> 计算机行业是唯一一个比时尚女装更被时尚驱动的行业。 - -**关于云计算:** - -> 关于云计算,有趣的是我们已经重新定义了云计算来包含我们曾干的所有事。 - -**关于伦理:** - -> 无论神存在与否,都没有绝对的伦理道德。没有这份理所当然,我们该如何?也唯有尽善吧。 - -**关于自由:** - -> 自由软件是尊重个人自由和社会团结的软件。所以才能如自由般自由自在。 - -**关于目标和理想:** - -> 如果你想为这世界做些什么,仅有理想是不够的,你需要找条通往目标的道路并走完。 - -**关于分享:** - -> 分享很棒,而且数字化技术也使分享变得容易。 - -**关于 facebook(进阶版):** - -> Facebook 蹂躏它们的用户。它不是你们的朋友;它就是个监控引擎。举个例子,你是否曾在一些网页或网站上看到 Facebook 的 “like” 按键。对,Facebook 知道你的电脑曾访问过那些网页。 - -**关于 web 应用:** - -> 给你个为什么不应该使用 web 应用的理由,因为你失去了计算机的控制权。 -> -> 如果你使用私有程序或他人的 web 服务器,那么你只能任人鱼肉。被软件的软件的开发者轻易操纵。 - -**关于书:** - -> 印刷出来的书,当然是自由的。即使你买了别人也不知道,这也是我一直买书的方式。买时不会被任何数据库认出。是亚马逊把自由夺走了。 - -**关于 MPAA:** - -> MPAA 其实是美国电影协会(Motion Picture Association of America),但我认为叫做攻击万物的邪恶力量(Malicious Power Attacking All)更为合适。 - -**关于金钱与职业:** - -> 我可以这样赚钱,并沉浸在编码的快乐中。但在职业生涯结束后,回首目睹自己筑就的高墙将人与人分隔开,我会觉得我耗尽毕生精力只换来了一个更糟糕的世界。 - -**关于私有软件:** - -> 私有软件使用户孤立、无助。因为禁止将软件给他人使用所以孤立,因为无法改变源码所以无助。他们学不了其中正真的工作方式。所以整个私有软件体系就是一种不公的力量。 - -**关于智能手机:** - -> 智能手机就是电脑 - 虽然做的和常用的电脑不同 - 但是却能干电脑能干的活。所以我们所说的一切有关于电脑上的软件应该能自由运行 - 必须坚持 - 在智能手机上也是这样。当然也包括平板。 - -**关于 CD 和数字内容:** - -> CD 商店有一个弱势就是需要昂贵的库存,但是电子商店就没有这方面的需求:他们只需要将售卖的副本写入记忆棒,并在你忘带自己的记忆棒时卖你一个就是了。 - -**关于竞争范式:About paradigm of competition:** - -> 竞争范式就像是赛跑:鼓励每一个跑得更快的人。当资本主义真的这样运作时,当然是件好事;但是维护者若是假设它一直这样运作的话那就大错特错了。 - -**关于 vi 和 emacs:** - -> 有时会有人问我在 Emacs 的阵营使用 vi 是不是一种罪过。使用自由版的 vi 并不是一种罪过;是一种忏悔。所以好好享受其中乐趣吧。 - -**关于自由和历史:** - -> 历史教会我们:珍惜自由,否则你将失去他。“别和我们谈政治”,对听不进的人这就是答复。 - -**关于专利:** - -> 和专利一个一个的战斗并不能解决软件专利带来的危害,就像打再多的蚊子也消灭不了疟疾一样。 -> -> 软件专利对于软件的开发者来说十分危险,因为它们加剧了对于软件理念的垄断。 - -**关于版权:** - -> 其实,版权制度对作者也没有什么好处,撇开最受欢迎的那个,其他作者的主旨可能更好理解,所以分享无论对他们还是你的读者都是一件好事。 - -**关于工作与报酬:** - -> 劳有所得,或寻求收入的最大化并没有什么错,只要不是不择手段。 - -**关于 Chrome OS:** - -> Chrome OS 确实是 GNU/Linux 的操作系统。但是,它在发布时没有安装常用应用,并为安装他们设置了阻碍。 - -**关于 Linux 用户:** - -> 许多的 GNU/Linux 用户并没有听过自由软件。他们并没有意识到,这个系统是因为道德理想才存在的,与此一起被忽视的还有所谓的“开源”。 - -**关于 facebook 的隐私:** - -> 如果页面上有 “like” 按键,Facebook 就能知道谁访问了页面。即使不是 Facebook 的用户,也可以得到访问该页面电脑的 IP 地址。 - -**关于编程:** - -> 编程不是科学,编程是手艺。 -> -> Lisp 和 C 语言是我的最爱。然自 1992 年以来高频的自由软件活动,确实反映了我编的太过匆忙。大概在 2008 年我便停止了编程开发。 -> -> C++ 设计的真糟糕、真丑陋。在 Emacs 上用他应该觉得羞愧。 - -**关于钻研(hacking)和学习编程:** - -> 今时不同往日,大家再也不用走我的老路了,完全可以在实际的操作系统上提升自己。上世纪 80 年代,我常遇见计算机专业的毕业生,自出生以来没见过真正的程序。他们接触的到的只有小玩意和学校的作业,因为每一个程序都是商业机密。他们没有机会去写真正实用的特性,修复用户真正遭遇的问题。做这些事便是你应知晓的最好的提升方式。 -> -> 对于如 hacking 这般多样化的东西真的很难简单的下定义,不过在我看来诸如此类的行为都会有以下的这些共同点:嬉乐、智慧和探索。因此,hacking 意味着对可能的极限的探索,一颗向往快乐与智慧心。能带来快乐与智慧的行为就有 “hack 的价值” 。 - -**关于浏览网页:** - -> 由于个人原因,我不会在我的电脑上浏览网页。(大部分时间处于没有网络连接的状态。)要浏览网页,我需要给守护进程发 mail,然后它会运行 wget 并把页面通过 mail 发还给我。这对我而言已经是最效率了,但那真的比实时慢太多了。 - -**关于音乐共享:** - -> 朋友之间彼此分享音乐,绝不会希望因为系统的一句:禁止私下拷贝!而生分。 - --------------------------------------------------------------------------------- - -via: https://tlhp.cf/fsf-richard-stallman/ - -作者:[Pavlo Rudyi][a] -译者:[martin2011qi](https://github.com/martin2011qi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://tlhp.cf/fsf-richard-stallman/ -[1]:http://www.gnu.org/ -[2]:http://www.fsf.org/ -[3]:https://www.fsf.org/about/ \ No newline at end of file From 39e253925b31c506e525c28c909c5e90dc3155a4 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 1 Feb 2016 07:53:55 +0800 Subject: [PATCH 0912/1710] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201601?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20101020 19 Years of KDE History--Step by Step.md | 0 .../20150921 14 tips for teaching open source development.md | 0 .../20151012 Remember sed and awk All Linux admins should.md | 0 .../20151013 DFileManager--Cover Flow File Manager.md | 0 .../20151107 Hackers Successfully Install Linux on a Potato.md | 0 ...0151109 How to Install GitLab on Ubuntu or Fedora or Debian.md | 0 .../20151117 Linux 101--Get the most out of Systemd.md | 0 ...sign Multiple IP Addresses To One Interface On Ubuntu 15.10.md | 0 .../20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md | 0 .../20151125 Running a mainline kernel on a cellphone.md | 0 ...o Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md | 0 ...eries 1--HowTo--Use grep Command In Linux or UNIX--Examples.md | 0 ...grep Command Tutorial series 2--Regular Expressions In grep.md | 0 ...-Search Multiple Words or String Pattern Using grep Command.md | 0 ...rial series 4--Grep Count Lines If a String or Word Matches.md | 0 ...utorial series 5--Grep From Files and Display the File Name.md | 0 ... Tutorial series 6--How To Find Files by Content Under UNIX.md | 0 ...guration File Directives Uncommented Lines of a Config File.md | 0 ...o Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md | 0 ...1204 Install and Configure Munin monitoring server in Linux.md | 0 .../{ => 201601}/20151204 Linux or Unix--jobs Command Examples.md | 0 .../20151206 NetworkManager and privacy in the IPv6 internet.md | 0 .../20151208 How to renew the ISPConfig 3 SSL Certificate.md | 0 .../20151208 Top 5 open source community metrics to track.md | 0 ...1215 Fix--Cannot establish FTP connection to an SFTP server.md | 0 .../20151215 How to block network traffic by country on Linux.md | 0 published/{ => 201601}/20151222 Turn Tor socks to http.md | 0 ...1223 How to Setup SSH Login Without Password CentOS or RHEL.md | 0 .../20151223 How to Use Glances to Monitor System on Ubuntu.md | 0 .../20151223 Monitor Linux System Performance Using Nmon.md | 0 .../20151223 Ten Biggest Linux Stories Of The Year 2015.md | 0 .../20151223 What' s the Best File System for My Linux Install.md | 0 ...What are the best plugins to increase productivity on Emacs.md | 0 published/{ => 201601}/20151229 Grub 2--Heal your bootloader.md | 0 ...w to Check Hardware Information on Linux Using Command Line.md | 0 ...20160111 Open Source DJ Software Mixxx Version 2.0 Released.md | 0 ...60111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md | 0 published/{ => 201601}/Learn with Linux--Learning Music.md | 0 published/{ => 201601}/Learn with Linux--Learning to Type.md | 0 published/{ => 201601}/Learn with Linux--Physics Simulation.md | 0 published/{ => 201601}/Learn with Linux--Two Geography Apps.md | 0 41 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201601}/20101020 19 Years of KDE History--Step by Step.md (100%) rename published/{ => 201601}/20150921 14 tips for teaching open source development.md (100%) rename published/{ => 201601}/20151012 Remember sed and awk All Linux admins should.md (100%) rename published/{ => 201601}/20151013 DFileManager--Cover Flow File Manager.md (100%) rename published/{ => 201601}/20151107 Hackers Successfully Install Linux on a Potato.md (100%) rename published/{ => 201601}/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md (100%) rename published/{ => 201601}/20151117 Linux 101--Get the most out of Systemd.md (100%) rename published/{ => 201601}/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md (100%) rename published/{ => 201601}/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md (100%) rename published/{ => 201601}/20151125 Running a mainline kernel on a cellphone.md (100%) rename published/{ => 201601}/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md (100%) rename published/{ => 201601}/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md (100%) rename published/{ => 201601}/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md (100%) mode change 100755 => 100644 rename published/{ => 201601}/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md (100%) rename published/{ => 201601}/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md (100%) rename published/{ => 201601}/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md (100%) rename published/{ => 201601}/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md (100%) rename published/{ => 201601}/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md (100%) rename published/{ => 201601}/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md (100%) rename published/{ => 201601}/20151204 Install and Configure Munin monitoring server in Linux.md (100%) rename published/{ => 201601}/20151204 Linux or Unix--jobs Command Examples.md (100%) rename published/{ => 201601}/20151206 NetworkManager and privacy in the IPv6 internet.md (100%) rename published/{ => 201601}/20151208 How to renew the ISPConfig 3 SSL Certificate.md (100%) rename published/{ => 201601}/20151208 Top 5 open source community metrics to track.md (100%) rename published/{ => 201601}/20151215 Fix--Cannot establish FTP connection to an SFTP server.md (100%) rename published/{ => 201601}/20151215 How to block network traffic by country on Linux.md (100%) rename published/{ => 201601}/20151222 Turn Tor socks to http.md (100%) rename published/{ => 201601}/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md (100%) rename published/{ => 201601}/20151223 How to Use Glances to Monitor System on Ubuntu.md (100%) rename published/{ => 201601}/20151223 Monitor Linux System Performance Using Nmon.md (100%) rename published/{ => 201601}/20151223 Ten Biggest Linux Stories Of The Year 2015.md (100%) rename published/{ => 201601}/20151223 What' s the Best File System for My Linux Install.md (100%) rename published/{ => 201601}/20151225 What are the best plugins to increase productivity on Emacs.md (100%) rename published/{ => 201601}/20151229 Grub 2--Heal your bootloader.md (100%) rename published/{ => 201601}/20160104 How to Check Hardware Information on Linux Using Command Line.md (100%) rename published/{ => 201601}/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md (100%) rename published/{ => 201601}/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md (100%) rename published/{ => 201601}/Learn with Linux--Learning Music.md (100%) rename published/{ => 201601}/Learn with Linux--Learning to Type.md (100%) rename published/{ => 201601}/Learn with Linux--Physics Simulation.md (100%) rename published/{ => 201601}/Learn with Linux--Two Geography Apps.md (100%) diff --git a/published/20101020 19 Years of KDE History--Step by Step.md b/published/201601/20101020 19 Years of KDE History--Step by Step.md similarity index 100% rename from published/20101020 19 Years of KDE History--Step by Step.md rename to published/201601/20101020 19 Years of KDE History--Step by Step.md diff --git a/published/20150921 14 tips for teaching open source development.md b/published/201601/20150921 14 tips for teaching open source development.md similarity index 100% rename from published/20150921 14 tips for teaching open source development.md rename to published/201601/20150921 14 tips for teaching open source development.md diff --git a/published/20151012 Remember sed and awk All Linux admins should.md b/published/201601/20151012 Remember sed and awk All Linux admins should.md similarity index 100% rename from published/20151012 Remember sed and awk All Linux admins should.md rename to published/201601/20151012 Remember sed and awk All Linux admins should.md diff --git a/published/20151013 DFileManager--Cover Flow File Manager.md b/published/201601/20151013 DFileManager--Cover Flow File Manager.md similarity index 100% rename from published/20151013 DFileManager--Cover Flow File Manager.md rename to published/201601/20151013 DFileManager--Cover Flow File Manager.md diff --git a/published/20151107 Hackers Successfully Install Linux on a Potato.md b/published/201601/20151107 Hackers Successfully Install Linux on a Potato.md similarity index 100% rename from published/20151107 Hackers Successfully Install Linux on a Potato.md rename to published/201601/20151107 Hackers Successfully Install Linux on a Potato.md diff --git a/published/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md b/published/201601/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md similarity index 100% rename from published/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md rename to published/201601/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md diff --git a/published/20151117 Linux 101--Get the most out of Systemd.md b/published/201601/20151117 Linux 101--Get the most out of Systemd.md similarity index 100% rename from published/20151117 Linux 101--Get the most out of Systemd.md rename to published/201601/20151117 Linux 101--Get the most out of Systemd.md diff --git a/published/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md b/published/201601/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md similarity index 100% rename from published/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md rename to published/201601/20151123 Assign Multiple IP Addresses To One Interface On Ubuntu 15.10.md diff --git a/published/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md b/published/201601/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md similarity index 100% rename from published/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md rename to published/201601/20151123 How to Configure Apache Solr on Ubuntu 14 or 15.md diff --git a/published/20151125 Running a mainline kernel on a cellphone.md b/published/201601/20151125 Running a mainline kernel on a cellphone.md similarity index 100% rename from published/20151125 Running a mainline kernel on a cellphone.md rename to published/201601/20151125 Running a mainline kernel on a cellphone.md diff --git a/published/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md b/published/201601/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md similarity index 100% rename from published/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md rename to published/201601/20151126 How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md similarity index 100% rename from published/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 1--HowTo--Use grep Command In Linux or UNIX--Examples.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md old mode 100755 new mode 100644 similarity index 100% rename from published/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 2--Regular Expressions In grep.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md similarity index 100% rename from published/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 3--Search Multiple Words or String Pattern Using grep Command.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md similarity index 100% rename from published/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 4--Grep Count Lines If a String or Word Matches.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md similarity index 100% rename from published/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 5--Grep From Files and Display the File Name.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md similarity index 100% rename from published/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 6--How To Find Files by Content Under UNIX.md diff --git a/published/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md similarity index 100% rename from published/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md diff --git a/published/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md b/published/201601/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md similarity index 100% rename from published/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md rename to published/201601/20151204 How to Install Laravel PHP Framework on CentOS 7 or Ubuntu 15.04.md diff --git a/published/20151204 Install and Configure Munin monitoring server in Linux.md b/published/201601/20151204 Install and Configure Munin monitoring server in Linux.md similarity index 100% rename from published/20151204 Install and Configure Munin monitoring server in Linux.md rename to published/201601/20151204 Install and Configure Munin monitoring server in Linux.md diff --git a/published/20151204 Linux or Unix--jobs Command Examples.md b/published/201601/20151204 Linux or Unix--jobs Command Examples.md similarity index 100% rename from published/20151204 Linux or Unix--jobs Command Examples.md rename to published/201601/20151204 Linux or Unix--jobs Command Examples.md diff --git a/published/20151206 NetworkManager and privacy in the IPv6 internet.md b/published/201601/20151206 NetworkManager and privacy in the IPv6 internet.md similarity index 100% rename from published/20151206 NetworkManager and privacy in the IPv6 internet.md rename to published/201601/20151206 NetworkManager and privacy in the IPv6 internet.md diff --git a/published/20151208 How to renew the ISPConfig 3 SSL Certificate.md b/published/201601/20151208 How to renew the ISPConfig 3 SSL Certificate.md similarity index 100% rename from published/20151208 How to renew the ISPConfig 3 SSL Certificate.md rename to published/201601/20151208 How to renew the ISPConfig 3 SSL Certificate.md diff --git a/published/20151208 Top 5 open source community metrics to track.md b/published/201601/20151208 Top 5 open source community metrics to track.md similarity index 100% rename from published/20151208 Top 5 open source community metrics to track.md rename to published/201601/20151208 Top 5 open source community metrics to track.md diff --git a/published/20151215 Fix--Cannot establish FTP connection to an SFTP server.md b/published/201601/20151215 Fix--Cannot establish FTP connection to an SFTP server.md similarity index 100% rename from published/20151215 Fix--Cannot establish FTP connection to an SFTP server.md rename to published/201601/20151215 Fix--Cannot establish FTP connection to an SFTP server.md diff --git a/published/20151215 How to block network traffic by country on Linux.md b/published/201601/20151215 How to block network traffic by country on Linux.md similarity index 100% rename from published/20151215 How to block network traffic by country on Linux.md rename to published/201601/20151215 How to block network traffic by country on Linux.md diff --git a/published/20151222 Turn Tor socks to http.md b/published/201601/20151222 Turn Tor socks to http.md similarity index 100% rename from published/20151222 Turn Tor socks to http.md rename to published/201601/20151222 Turn Tor socks to http.md diff --git a/published/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md b/published/201601/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md similarity index 100% rename from published/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md rename to published/201601/20151223 How to Setup SSH Login Without Password CentOS or RHEL.md diff --git a/published/20151223 How to Use Glances to Monitor System on Ubuntu.md b/published/201601/20151223 How to Use Glances to Monitor System on Ubuntu.md similarity index 100% rename from published/20151223 How to Use Glances to Monitor System on Ubuntu.md rename to published/201601/20151223 How to Use Glances to Monitor System on Ubuntu.md diff --git a/published/20151223 Monitor Linux System Performance Using Nmon.md b/published/201601/20151223 Monitor Linux System Performance Using Nmon.md similarity index 100% rename from published/20151223 Monitor Linux System Performance Using Nmon.md rename to published/201601/20151223 Monitor Linux System Performance Using Nmon.md diff --git a/published/20151223 Ten Biggest Linux Stories Of The Year 2015.md b/published/201601/20151223 Ten Biggest Linux Stories Of The Year 2015.md similarity index 100% rename from published/20151223 Ten Biggest Linux Stories Of The Year 2015.md rename to published/201601/20151223 Ten Biggest Linux Stories Of The Year 2015.md diff --git a/published/20151223 What' s the Best File System for My Linux Install.md b/published/201601/20151223 What' s the Best File System for My Linux Install.md similarity index 100% rename from published/20151223 What' s the Best File System for My Linux Install.md rename to published/201601/20151223 What' s the Best File System for My Linux Install.md diff --git a/published/20151225 What are the best plugins to increase productivity on Emacs.md b/published/201601/20151225 What are the best plugins to increase productivity on Emacs.md similarity index 100% rename from published/20151225 What are the best plugins to increase productivity on Emacs.md rename to published/201601/20151225 What are the best plugins to increase productivity on Emacs.md diff --git a/published/20151229 Grub 2--Heal your bootloader.md b/published/201601/20151229 Grub 2--Heal your bootloader.md similarity index 100% rename from published/20151229 Grub 2--Heal your bootloader.md rename to published/201601/20151229 Grub 2--Heal your bootloader.md diff --git a/published/20160104 How to Check Hardware Information on Linux Using Command Line.md b/published/201601/20160104 How to Check Hardware Information on Linux Using Command Line.md similarity index 100% rename from published/20160104 How to Check Hardware Information on Linux Using Command Line.md rename to published/201601/20160104 How to Check Hardware Information on Linux Using Command Line.md diff --git a/published/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md b/published/201601/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md similarity index 100% rename from published/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md rename to published/201601/20160111 Open Source DJ Software Mixxx Version 2.0 Released.md diff --git a/published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md b/published/201601/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md similarity index 100% rename from published/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md rename to published/201601/20160111 Ubuntu-‘Spyware’-Will-Be-Disabled-In-Ubuntu-16.04-LTS.md diff --git a/published/Learn with Linux--Learning Music.md b/published/201601/Learn with Linux--Learning Music.md similarity index 100% rename from published/Learn with Linux--Learning Music.md rename to published/201601/Learn with Linux--Learning Music.md diff --git a/published/Learn with Linux--Learning to Type.md b/published/201601/Learn with Linux--Learning to Type.md similarity index 100% rename from published/Learn with Linux--Learning to Type.md rename to published/201601/Learn with Linux--Learning to Type.md diff --git a/published/Learn with Linux--Physics Simulation.md b/published/201601/Learn with Linux--Physics Simulation.md similarity index 100% rename from published/Learn with Linux--Physics Simulation.md rename to published/201601/Learn with Linux--Physics Simulation.md diff --git a/published/Learn with Linux--Two Geography Apps.md b/published/201601/Learn with Linux--Two Geography Apps.md similarity index 100% rename from published/Learn with Linux--Two Geography Apps.md rename to published/201601/Learn with Linux--Two Geography Apps.md From e7af5ba25b0f04def15fff3b473346146e538e90 Mon Sep 17 00:00:00 2001 From: sonofelice Date: Mon, 1 Feb 2016 23:10:22 +0800 Subject: [PATCH 0913/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=ADHow=20bad?= =?UTF-8?q?=20a=20boss=20is=20Linus=20Torvalds=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译中How bad a boss is Linus Torvalds? --- sources/talk/20151117 How bad a boss is Linus Torvalds.md | 1 + 1 file changed, 1 insertion(+) 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 8b10e44584..76e9f4c244 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 @@ -1,3 +1,4 @@ +sonofelice translating How bad a boss is Linus Torvalds? ================================================================================ ![linus torvalds](http://images.techhive.com/images/article/2015/08/linus_torvalds-100600260-primary.idge.jpg) From b74befbdb37e452359c9b6e23bac7926d448765a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Feb 2016 11:45:02 +0800 Subject: [PATCH 0914/1710] PUB:20151201 How to use Mutt email client with encrypted passwords @wyangsun --- ...t email client with encrypted passwords.md | 135 +++++++++++++++++ ...t email client with encrypted passwords.md | 138 ------------------ 2 files changed, 135 insertions(+), 138 deletions(-) create mode 100644 published/20151201 How to use Mutt email client with encrypted passwords.md delete mode 100644 translated/tech/20151201 How to use Mutt email client with encrypted passwords.md diff --git a/published/20151201 How to use Mutt email client with encrypted passwords.md b/published/20151201 How to use Mutt email client with encrypted passwords.md new file mode 100644 index 0000000000..2c57a73d91 --- /dev/null +++ b/published/20151201 How to use Mutt email client with encrypted passwords.md @@ -0,0 +1,135 @@ +如何 Mutt 邮件客户端中使用密文密码 +================================================================================ +Mutt 是一个 Linux/UNIX 终端环境下的开源的邮件客户端。Mutt 以及 [Alpine][1] 在 Linux 命令行爱好者中有着最忠诚的追随者,这不是没有原因的。想一下你所期待邮件客户端应有的功能,Mutt 拥有:多协议支持(例如,POP3、IMAP 和 SMTP),S/MIME 和 PGP/GPG 集成,会话线索,颜色标记,可定制宏/快捷键,等等。另外,基于命令行的 Mutt 相比粗重的基于浏览器的邮件客户端(如:Gmail,Ymail)或图形用户界面的邮件客户端(如:Thunderbird,MS Outlook)而言,是一个使用电子邮件的轻量级替代品。 + +当你想使用 Mutt 通过公司的 SMTP/IMAP 服务器访问或发送邮件,或取代网页邮件服务,可能所关心的一个问题是如何保护您的邮件凭据(如:SMTP/IMAP 密码),它们存储在一个纯文本 Mutt 配置文件(~/.muttrc)中。 + +对于这些人对安全的担忧,确实有一个容易的方法来**加密 Mutt 配置文件***,以防止这种风险。在这个教程中,我描述了如何加密 Mutt 敏感配置,比如使用 GnuPG(GPG)加密 SMTP/IMAP 密码,GPG 是一个开源的 OpenPGP 实现。 + +### 第一步 (可选):创建 GPG 密钥 ### + +因为我们将要使用 GPG 加密 Mutt 配置文件,如果你没有 GPG 密钥,第一步就是创建一个(公钥/私钥对)。如果有,请忽略这步。 + +创建一个新 GPG 密钥,输入下面命令: + + $ gpg --gen-key + +选择密钥类型(RSA),密钥长度(2048 bits),和过期时间(0 代表不过期)。当出现用户 ID 提示时,输入关联到该公钥/私钥对的名字(Dan Nanni) 和邮箱地址(myemail@email.com)。最后,输入一个密码来保护你的私钥。 + +![](https://c2.staticflickr.com/6/5726/22808727824_7735f11157_c.jpg) + +生成一个 GPG 密钥需要大量的随机字节来构成熵,所以在生成密钥期间确保在你的系统上执行一些随机行为(如:敲打键盘,移动鼠标或者读写磁盘)。根据密钥长度,生成 GPG 密钥要花几分钟或更多时间。 + +![](https://c1.staticflickr.com/1/644/23328597612_6ac5a29944_c.jpg) + +### 第二步:加密 Mutt 敏感配置 ### + +下一步,在 ~/.mutt 目录创建一个新的文本文件,然后把一些你想隐藏的 Mutt 敏感配置放进去。这个例子里,我指定了 SMTP/IMAP 密码。 + + $ mkdir ~/.mutt + $ vi ~/.mutt/password + +---------- + + set smtp_pass="XXXXXXX" + set imap_pass="XXXXXXX" + +现在通过 GPG 使用你的公钥加密这个文件如下: + + $ gpg -r myemail@email.com -e ~/.mutt/password + +这将创建 ~/.mutt/password.gpg,这是一个原始文件的 GPG 加密版本。 + +然后删除 ~/.mutt/password,只保留 GPG 加密版本。 + +### 第三步:创建完整 Mutt 配置文件 ### + +现在你已经在一个单独的文件放置了加密的 Mutt 敏感配置,你可以在 ~/.muttrc 指定其余的 Mutt 配置。然后增加下面这行在 ~/.muttrc 末尾。 + + source "gpg -d ~/.mutt/password.gpg |" + +当你启动 Mutt 时,这行将解密 ~/.mutt/password.gpg ,然后将解密内容应用到你的 Mutt 配置中。 + +下面展示一个完整 Mutt 配置例子,这可以让你通过 Mutt 访问 Gmail,而没有暴露你的 SMTP/IMAP 密码。用你的 Gmail ID 替代下面的 `yourgmailaccount`,此外你也需要在[你的 Goolgle 账户设置][3]中启用“支持不太安全的应用访问”。 + + set from = "yourgmailaccount@gmail.com" + set realname = "Your Name" + set smtp_url = "smtp://yourgmailaccount@smtp.gmail.com:587/" + set imap_user = "yourgmailaccount@gmail.com" + set folder = "imaps://imap.gmail.com:993" + set spoolfile = "+INBOX" + set postponed = "+[Google Mail]/Drafts" + set trash = "+[Google Mail]/Trash" + set header_cache =~/.mutt/cache/headers + set message_cachedir =~/.mutt/cache/bodies + set certificate_file =~/.mutt/certificates + set move = no + set imap_keepalive = 900 + + # encrypted IMAP/SMTP passwords + source "gpg -d ~/.mutt/password.gpg |" + +### 第四步(可选):配置 GPG 代理 ### + +这时候,你将可以使用加密了IMAP/SMTP 密码的 Mutt。然而,每次你运行 Mutt,你都要先被提示输入一个 GPG 密码来使用你的私钥解密 IMAP/SMTP 密码。 + +![](https://c2.staticflickr.com/6/5667/23437064775_20c874940f_c.jpg) + +如果你想避免这样的 GPG 密码提示,你可以部署一个 gpg-agent。它以后台守护进程方式运行,gpg-agent 可以安全地缓存你的 GPG 密码,无需手工干预,gpg 可以自动从 gpg-agent 获得你的 GPG 密码。如果你正在使用 Linux 桌面,你可以配置使用一些等同于 gpg-agent 的特定的桌面软件,例如,GNOME 桌面的 gnome-keyring-daemon。 + +你可以在基于 Debian 系统安装 gpg-agent: + + $ sudo apt-get install gpg-agent + +gpg-agent 在基于 Red Hat 的系统上是预装好的。 + +现在增加下面这些到你的 .bashrc 文件中。 + + envfile="$HOME/.gnupg/gpg-agent.env" + if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then + eval "$(cat "$envfile")" + else + eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")" + fi + export GPG_AGENT_INFO + +重载 .bashrc,或简单的登出然后重新登录。 + + $ source ~/.bashrc + +现在确认 GPG_AGENT_INFO 环境变量已经设置妥当。 + + $ echo $GPG_AGENT_INFO + + /tmp/gpg-0SKJw8/S.gpg-agent:942:1 + +并且,当你输入 gpg-agent 命令时,你应该看到下面的信息。 + + $ gpg-agent + + gpg-agent: gpg-agent running and available + +一旦 gpg-agent 启动运行,它将会在第一次提示你输入密码时缓存你的 GPG 密码。随后你多次运行 Mutt ,都不会被提示要 GPG 密码(gpg-agent 一直开着,缓存就不会过期)。 + +![](https://c1.staticflickr.com/1/664/22809928093_3be57698ce_c.jpg) + +### 结论 ### + +在这个指导里,我提供一个使用 GnuPG 加密如 SMTP/IMAP 密码这样的 Mutt 敏感配置的方法。注意,如果你想在 Mutt 上使用 GnuPG 来加密或签名你的邮件,你可以参考[官方指南][2]关于 GPG 与 Mutt 结合的部分。 + +如果你知道任何使用 Mutt 的安全技巧,欢迎分享它。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/mutt-email-client-encrypted-passwords.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]:http://xmodulo.com/gmail-command-line-linux-alpine.html +[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG +[3]:https://www.google.com/settings/u/1/security \ No newline at end of file diff --git a/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md b/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md deleted file mode 100644 index 1e8a032a04..0000000000 --- a/translated/tech/20151201 How to use Mutt email client with encrypted passwords.md +++ /dev/null @@ -1,138 +0,0 @@ -如何使用加密过密码的Mutt邮件客户端 -================================================================================ -Mutt是一个开源的Linux/UNIX终端环境下的邮件客户端。连同[Alpine][1],Mutt有充分的理由在Linux命令行热衷者中有最忠诚的追随者。想一下你对邮件客户端的期待的事情,Mutt拥有:多协议支持(e.g., POP3, IMAP and SMTP),S/MIME和PGP/GPG集成,线程会话,颜色编码,可定制宏/快捷键,等等。另外,基于命令行的Mutt相比笨重的web浏览器(如:Gmail,Ymail)或可视化邮件客户端(如:Thunderbird,MS Outlook)是一个轻量访问电子邮件的选择。 - -当你想使用Mutt通过公司的SMTP/IMAP服务器访问或发送邮件,或取代网页邮件服务,可能所关心的一个问题是如何保护您的邮件凭据(如:SMTP/IMAP密码)存储在一个纯文本Mutt配置文件(~/.muttrc)。 - -对于一些人安全的担忧,确实有一个容易的方法来**加密Mutt配置文件***,防止这种风险。在这个教程中,我描述了如何加密Mutt敏感配置,比如SMTP/IMAP密码使用GnuPG(GPG),一个开源的OpenPGP实现。 - -### 第一步 (可选):创建GPG密钥 ### - -因为我们将要使用GPG加密Mutt配置文件,如果你没有,第一步就是创建一个GPG密钥(公有/私有 密钥对)。如果有,忽略这步。 - -创建一个新GPG密钥,输入下面的。 - - $ gpg --gen-key - -选择密钥类型(RSA),密钥长度(2048 bits),和过期时间(0,不过期)。当出现用户ID提示时,输入你的名字(Dan Nanni) 和邮箱地址(myemail@email.com)关联到私有/公有密钥对。最后,输入一个密码来保护你的私钥。 - -![](https://c2.staticflickr.com/6/5726/22808727824_7735f11157_c.jpg) - -生成一个GPG密钥需要大量的随机字节熵,所以在生成密钥期间确保在你的系统上执行一些随机行为(如:打键盘,移动鼠标或者读写磁盘)。根据密钥长度决定生成GPG密钥要花几分钟或更多时间。 - -![](https://c1.staticflickr.com/1/644/23328597612_6ac5a29944_c.jpg) - -### 第二部:加密Mutt敏感配置 ### - -下一步,在~/.mutt目录创建一个新的文本文件,然后把一些你想隐藏的Mutt敏感配置放进去。这个例子里,我指定了SMTP/IMAP密码。 - - $ mkdir ~/.mutt - $ vi ~/.mutt/password - ----------- - - set smtp_pass="XXXXXXX" - set imap_pass="XXXXXXX" - -现在gpg用你的公钥加密这个文件如下。 - - $ gpg -r myemail@email.com -e ~/.mutt/password - -这将创建~/.mutt/password.gpg,这个是一个GPG加密原始版本文件。 - -继续删除~/.mutt/password,只保留GPG加密版本。 - -### 第三部:创建完整Mutt配置文件 ### - -由于你已经在一个单独的文件加密了Mutt敏感配置,你可以在~/.muttrc指定其余的Mutt配置。然后增加下面这行在~/.muttrc末尾。 - - source "gpg -d ~/.mutt/password.gpg |" - -当你使用Mutt,这行将解密~/.mutt/password.gpg,然后将解密内容应用到你的Mutt配置。 - -下面展示一个完整Mutt配置例子,这允许你用Mutt访问Gmail,没有暴露你的SMTP/IMAP密码。取代你用Gmail ID登陆你的账户。 - - set from = "yourgmailaccount@gmail.com" - set realname = "Your Name" - set smtp_url = "smtp://yourgmailaccount@smtp.gmail.com:587/" - set imap_user = "yourgmailaccount@gmail.com" - set folder = "imaps://imap.gmail.com:993" - set spoolfile = "+INBOX" - set postponed = "+[Google Mail]/Drafts" - set trash = "+[Google Mail]/Trash" - set header_cache =~/.mutt/cache/headers - set message_cachedir =~/.mutt/cache/bodies - set certificate_file =~/.mutt/certificates - set move = no - set imap_keepalive = 900 - - # encrypted IMAP/SMTP passwords - source "gpg -d ~/.mutt/password.gpg |" - -### 第四部(可选):配置GPG代理 ### - -这时候,你将可以使用加密了IMAP/SMTP密码的Mutt。无论如何,每次你运行Mutt,你都要先被提示输入一个GPG密码来使用你的私钥解密IMAP/SMTP密码。 - -![](https://c2.staticflickr.com/6/5667/23437064775_20c874940f_c.jpg) - -如果你想避免这样的GPG密码提示,你可以部署gpg代理。运行一个后台程序,gpg代理安全的缓存你的GPG密码,无需手工干预gpg自动从gpg代理获得你的GPG密码。如果你正在使用Linux桌面,你可以使用桌面特定方式来配置一些东西等价于gpg代理,例如,GNOME桌面的gnome-keyring-daemon。 - -你可以在基于Debian系统安装gpg代理: - -$ sudo apt-get install gpg-agent - -gpg代理是基于Red Hat系统预装的。 - -现在增加下面这些道你的.bashrc文件。 - - envfile="$HOME/.gnupg/gpg-agent.env" - if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then - eval "$(cat "$envfile")" - else - eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")" - fi - export GPG_AGENT_INFO - -重载.bashrc,或单纯的登出然后登陆回来。 - - $ source ~/.bashrc - -现在确认GPG_AGENT_INFO环境变量已经设置妥当。 - - $ echo $GPG_AGENT_INFO - ----------- - - /tmp/gpg-0SKJw8/S.gpg-agent:942:1 - -并且,当你输入gpg-agent命令时,你应该看到下面的信息。 - - $ gpg-agent - ----------- - - gpg-agent: gpg-agent running and available - -一旦gpg-agent启动运行,它将会在第一次提示你输入密码时缓存你的GPG密码。随后你运行Mutt多次,你将不会被提示要GPG密码(gpg-agent一直开着,缓存就不会过期)。 - -![](https://c1.staticflickr.com/1/664/22809928093_3be57698ce_c.jpg) - -### 结论 ### - -在这个指导里,我提出一个方法加密Mutt敏感配置如SMTP/IMAP密码使用GnuPG。注意,如果你想在Mutt上使用GnuPG或者登陆你的邮件信息,你可以参考[官方指南][2]在使用GPG与Mutt结合。 - -如果你知道任何使用Mutt的安全技巧,随时分享他。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/mutt-email-client-encrypted-passwords.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]:http://xmodulo.com/gmail-command-line-linux-alpine.html -[2]:http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG From a67b583872904f9ee242bc363289f8a3ab5ddb83 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Feb 2016 20:12:15 +0800 Subject: [PATCH 0915/1710] PUB:20160126 How to change from default to alternative Python version on Debian Linux @mr-ping --- ...lternative Python version on Debian Linux.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) rename {translated/tech => published}/20160126 How to change from default to alternative Python version on Debian Linux.md (85%) diff --git a/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md b/published/20160126 How to change from default to alternative Python version on Debian Linux.md similarity index 85% rename from translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md rename to published/20160126 How to change from default to alternative Python version on Debian Linux.md index 5ff89d7944..a33c0fcaaf 100644 --- a/translated/tech/20160126 How to change from default to alternative Python version on Debian Linux.md +++ b/published/20160126 How to change from default to alternative Python version on Debian Linux.md @@ -1,4 +1,4 @@ -如何将 Debian Linux 系统中默认的 Python 替代为其他版本 +如何将 Debian Linux 中的默认的 Python 版本切换为替代版本 ==================================================== 当你安装 Debian Linux 时,安装过程有可能同时为你提供多个可用的 Python 版本,因此系统中会存在多个 Python 的可执行二进制文件。你可以按照以下方法使用 `ls` 命令来查看你的系统中都有那些 Python 的二进制文件可供使用。 @@ -15,9 +15,9 @@ $ python --version Python 2.7.8 ``` -1、基于用户修改 Python 版本: +###1、基于用户修改 Python 版本: -想要为某个特定用户修改 Python 版本,只需要在其 home 目录下创建一个 `alias(别名)` 即可。打开 `~/.bashrc` 文件,添加新的别名信息来修改默认使用的 Python 版本。 +想要为某个特定用户修改 Python 版本,只需要在其 home 目录下创建一个 `alias`(别名) 即可。打开该用户的 `~/.bashrc` 文件,添加新的别名信息来修改默认使用的 Python 版本。 ``` alias python='/usr/bin/python3.4' @@ -36,7 +36,7 @@ $ python --version Python 3.4.2 ``` -2、 基于系统级别修改 Python 版本 +###2、 在系统级修改 Python 版本 我们可以使用 `update-alternatives` 来为整个系统更改 Python 版本。以 root 身份登录,首先罗列出所有可用的 python 替代版本信息: @@ -45,7 +45,7 @@ Python 3.4.2 update-alternatives: error: no alternatives for python ``` -如果出现以上所示的错误信息,则表示 Python 的替代版本尚未被 `update-alternatives` 命令识别。想解决这个问题,我们需要更新一下替代表,将 `python2.7` 和 `python3.4` 放入其中。 +如果出现以上所示的错误信息,则表示 Python 的替代版本尚未被 `update-alternatives` 命令识别。想解决这个问题,我们需要更新一下替代列表,将 `python2.7` 和 `python3.4` 放入其中。 ``` # update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 @@ -61,7 +61,7 @@ update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python Python 3.4.2 ``` -接下来,我们继续列出可用的 Python 替代版本。 +接下来,我们再次列出可用的 Python 替代版本。 ``` # update-alternatives --list python @@ -82,7 +82,7 @@ Python 3.4.2 Python 2.7.8 ``` -3、附录 +###3、移除替代版本 一旦我们的系统中不再存在某个 Python 的替代版本时,我们可以将其从 `update-alternatives` 列表中删除掉。例如,我们可以将列表中的 python2.7 版本移除掉。 @@ -96,9 +96,8 @@ update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python via: http://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux -作者:[作者][] 译者:[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 71059bb550dbaa260f6d979972fb64186ed4d119 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Thu, 4 Feb 2016 11:38:06 +0800 Subject: [PATCH 0916/1710] Create 20160129 Recognizing correct code.md --- .../news/20160129 Recognizing correct code.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sources/news/20160129 Recognizing correct code.md diff --git a/sources/news/20160129 Recognizing correct code.md b/sources/news/20160129 Recognizing correct code.md new file mode 100644 index 0000000000..ad5028d622 --- /dev/null +++ b/sources/news/20160129 Recognizing correct code.md @@ -0,0 +1,51 @@ +# Recognizing correct code + +Automatic bug-repair system fixes 10 times as many errors as its predecessors. +------ +MIT researchers have developed a machine-learning system that can comb through repairs to open-source computer programs and learn their general properties, in order to produce new repairs for a different set of programs. + +The researchers tested their system on a set of programming errors, culled from real open-source applications, that had been compiled to evaluate automatic bug-repair systems. Where those earlier systems were able to repair one or two of the bugs, the MIT system repaired between 15 and 18, depending on whether it settled on the first solution it found or was allowed to run longer. + +While an automatic bug-repair tool would be useful in its own right, professor of electrical engineering and computer science Martin Rinard, whose group developed the new system, believes that the work could have broader ramifications. + +“One of the most intriguing aspects of this research is that we’ve found that there are indeed universal properties of correct code that you can learn from one set of applications and apply to another set of applications,” Rinard says. “If you can recognize correct code, that has enormous implications across all software engineering. This is just the first application of what we hope will be a brand-new, fabulous technique.” + +Fan Long, a graduate student in electrical engineering and computer science at MIT, presented a paper describing the new system at the Symposium on Principles of Programming Languages last week. He and Rinard, his advisor, are co-authors. + +Users of open-source programs catalogue bugs they encounter on project websites, and contributors to the projects post code corrections, or “patches,” to the same sites. So Long was able to write a computer script that automatically extracted both the uncorrected code and patches for 777 errors in eight common open-source applications stored in the online repository GitHub. + +**Feature performance** + +As with [all][1] machine-learning systems, the crucial aspect of Long and Rinard’s design was the selection of a “[feature set][2]” that the system would analyze. The researchers concentrated on values stored in memory — either variables, which can be modified during a program’s execution, or constants, which can’t. They identified 30 prime characteristics of a given value: It might be involved in an operation, such as addition or multiplication, or a comparison, such as greater than or equal to; it might be local, meaning it occurs only within a single block of code, or global, meaning that it’s accessible to the program as a whole; it might be the variable that represents the final result of a calculation; and so on. + +Long and Rinard wrote a computer program that evaluated all the possible relationships between these characteristics in successive lines of code. More than 3,500 such relationships constitute their feature set. Their machine-learning algorithm then tried to determine what combination of features most consistently predicted the success of a patch. + +“All the features we’re trying to look at are relationships between the patch you insert and the code you are trying to patch,” Long says. “Typically, there will be good connections in the correct patches, corresponding to useful or productive program logic. And there will be bad patterns that mean disconnections in program logic or redundant program logic that are less likely to be successful.” + +**Ranking candidates** + +In earlier work, Long had developed an algorithm that attempts to repair program bugs by systematically modifying program code. The modified code is then subjected to a suite of tests designed to elicit the buggy behavior. This approach may find a modification that passes the tests, but it could take a prohibitively long time. Moreover, the modified code may still contain errors that the tests don’t trigger. + +Long and Rinard’s machine-learning system works in conjunction with this earlier algorithm, ranking proposed modifications according to the probability that they are correct before subjecting them to time-consuming tests. + +The researchers tested their system, which they call Prophet, on a set of 69 program errors that had cropped up in eight popular open-source programs. Of those, 19 are amenable to the type of modifications that Long’s algorithm uses; the other 50 have more complicated problems that involve logical inconsistencies across larger swaths of code. + +When Long and Rinard configured their system to settle for the first solution that passed the bug-eliciting tests, it was able to correctly repair 15 of the 19 errors; when they allowed it to run for 12 hours per problem, it repaired 18. + +Of course, that still leaves the other 50 errors in the test set untouched. In ongoing work, Long is working on a machine-learning system that will look at more coarse-grained manipulation of program values across larger stretches of code, in the hope of producing a bug-repair system that can handle more complex errors. + +“A revolutionary aspect of Prophet is how it leverages past successful patches to learn new ones,” says Eran Yahav, an associate professor of computer science at the Technion in Israel. “It relies on the insight that despite differences between software projects, fixes — patches — applied to projects often have commonalities that can be learned from. Using machine learning to learn from ‘big code’ holds the promise to revolutionize many programming tasks — code completion, reverse-engineering, et cetera.” + +-------------------------------------------------------------------------------- + +via: http://news.mit.edu/2016/faster-automatic-bug-repair-code-errors-0129 + +作者:Larry Hardesty +译者:[译者ID](https://github.com/翻译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://news.mit.edu/2013/teaching-computers-to-see-by-learning-to-see-like-computers-0919 +[2]:http://news.mit.edu/2015/automating-big-data-analysis-1016 + From 1c79e513dbf63cc0f61099af12f5ba2fcd978c07 Mon Sep 17 00:00:00 2001 From: ZhangXiangping Date: Fri, 5 Feb 2016 10:41:46 +0800 Subject: [PATCH 0917/1710] Update 20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chisper 翻译中 --- ...w to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md index 3b6277da80..7fd80c5ce6 100644 --- a/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md +++ b/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md @@ -1,3 +1,4 @@ +chisper 翻译中 How to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 ================================================================================ Revive AdserverHow to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 is a free and open source advertisement management system that enables publishers, ad networks and advertisers to serve ads on websites, apps, videos and manage campaigns for multiple advertiser with many features. Revive Adserver is licensed under GNU Public License which is also known as OpenX Source. It features an integrated banner management interface, URL targeting, geo-targeting and tracking system for gathering statistics. This application enables website owners to manage banners from both in-house advertisement campaigns as well as from paid or third-party sources, such as Google's AdSense. Here, in this tutorial, we'll gonna install Revive Adserver in our machine running Ubuntu 15.04 or CentOS 7. @@ -239,4 +240,4 @@ via: http://linoxide.com/linux-how-to/install-revive-adserver-ubuntu-15-04-cento [a]:http://linoxide.com/author/arunp/ [1]:http://www.revive-adserver.com/download/ -[2]:http://www.adserverplugins.com/ \ No newline at end of file +[2]:http://www.adserverplugins.com/ From b9fe009cf445c8f11f6ae1e8db8886cdf0b6ced6 Mon Sep 17 00:00:00 2001 From: ZhangXiangping Date: Fri, 5 Feb 2016 15:20:49 +0800 Subject: [PATCH 0918/1710] Delete 20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除原稿 --- ...ve Adserver on Ubuntu 15.04 or CentOS 7.md | 243 ------------------ 1 file changed, 243 deletions(-) delete mode 100644 sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md diff --git a/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md deleted file mode 100644 index 7fd80c5ce6..0000000000 --- a/sources/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md +++ /dev/null @@ -1,243 +0,0 @@ -chisper 翻译中 -How to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 -================================================================================ -Revive AdserverHow to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 is a free and open source advertisement management system that enables publishers, ad networks and advertisers to serve ads on websites, apps, videos and manage campaigns for multiple advertiser with many features. Revive Adserver is licensed under GNU Public License which is also known as OpenX Source. It features an integrated banner management interface, URL targeting, geo-targeting and tracking system for gathering statistics. This application enables website owners to manage banners from both in-house advertisement campaigns as well as from paid or third-party sources, such as Google's AdSense. Here, in this tutorial, we'll gonna install Revive Adserver in our machine running Ubuntu 15.04 or CentOS 7. - -### 1. Installing LAMP Stack ### - -First of all, as Revive Adserver requires a complete LAMP Stack to work, we'll gonna install it. LAMP Stack is the combination of Apache Web Server, MySQL/MariaDB Database Server and PHP modules. To run Revive properly, we'll need to install some PHP modules like apc, zlib, xml, pcre, mysql and mbstring. To setup LAMP Stack, we'll need to run the following command with respect to the distribution of linux we are currently running. - -#### On Ubuntu 15.04 #### - - # apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libapache2-mod-php5 zip - -#### On CentOS 7 #### - - # yum install httpd mariadb php php-gd php-mysql php-curl php-mbstring php-xml php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev zip - -### 2. Starting Apache and MariaDB server ### - -We’ll now start our newly installed Apache web server and MariaDB database server in our linux machine. To do so, we'll need to execute the following commands. - -#### On Ubuntu 15.04 #### - -Ubuntu 15.04 is shipped with Systemd as its default init system, so we'll need to execute the following commands to start apache and mariadb daemons. - - # systemctl start apache2 mysql - -After its started, we'll now make it able to start automatically in every system boot by running the following command. - - # systemctl enable apache2 mysql - - Synchronizing state for apache2.service with sysvinit using update-rc.d... - Executing /usr/sbin/update-rc.d apache2 defaults - Executing /usr/sbin/update-rc.d apache2 enable - Synchronizing state for mysql.service with sysvinit using update-rc.d... - Executing /usr/sbin/update-rc.d mysql defaults - Executing /usr/sbin/update-rc.d mysql enable - -#### On CentOS 7 #### - -Also in CentOS 7, systemd is the default init system so, we'll run the following command to start them. - - # systemctl start httpd mariadb - -Next, we'll enable them to start automatically in every startup of init system using the following command. - - # systemctl enable httpd mariadb - - ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' - ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' - -### 3. Configuring MariaDB ### - -#### On CentOS 7/Ubuntu 15.04 #### - -Now, as we are starting MariaDB for the first time and no password has been assigned for MariaDB so, we’ll first need to configure a root password for it. Then, we’ll gonna create a new database so that it can store data for our Revive Adserver installation. - -To configure MariaDB and assign a root password, we’ll need to run the following command. - - # mysql_secure_installation - -This will ask us to enter the password for root but as we haven’t set any password before and its our first time we’ve installed mariadb, we’ll simply press enter and go further. Then, we’ll be asked to set root password, here we’ll hit Y and enter our password for root of MariaDB. Then, we’ll simply hit enter to set the default values for the further configurations. - - …. - so you should just press enter here. - - 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! - … - installation should now be secure. - Thanks for using MariaDB! - -![Configuring MariaDB](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-mariadb.png) - -### 4. Creating new Database ### - -After we have assigned the password to our root user of mariadb server, we'll now create a new database for Revive Adserver application so that it can store its data into the database server. To do so, first we'll need to login to our MariaDB console by running the following command. - - # mysql -u root -p - -Then, it will ask us to enter the password of root user which we had just set in the above step. Then, we'll be welcomed into the MariaDB console in which we'll create our new database, database user and assign its password and grant all privileges to create, remove and edit the tables and data stored in it. - - > CREATE DATABASE revivedb; - > CREATE USER 'reviveuser'@'localhost' IDENTIFIED BY 'Pa$$worD123'; - > GRANT ALL PRIVILEGES ON revivedb.* TO 'reviveuser'@'localhost'; - > FLUSH PRIVILEGES; - > EXIT; - -![Creating Mariadb Revive Database](http://blog.linoxide.com/wp-content/uploads/2015/11/creating-mariadb-revive-database.png) - -### 5. Downloading Revive Adserver Package ### - -Next, we'll download the latest release of Revive Adserver ie version 3.2.2 in the time of writing this article. So, we'll first get the download link from the official Download Page of Revive Adserver ie [http://www.revive-adserver.com/download/][1] then we'll download the compressed zip file using wget command under /tmp/ directory as shown bellow. - - # cd /tmp/ - # wget http://download.revive-adserver.com/revive-adserver-3.2.2.zip - - --2015-11-09 17:03:48-- http://download.revive-adserver.com/revive-adserver-3.2.2.zip - Resolving download.revive-adserver.com (download.revive-adserver.com)... 54.230.119.219, 54.239.132.177, 54.230.116.214, ... - Connecting to download.revive-adserver.com (download.revive-adserver.com)|54.230.119.219|:80... connected. - HTTP request sent, awaiting response... 200 OK - Length: 11663620 (11M) [application/zip] - Saving to: 'revive-adserver-3.2.2.zip' - revive-adserver-3.2 100%[=====================>] 11.12M 1.80MB/s in 13s - 2015-11-09 17:04:02 (906 KB/s) - 'revive-adserver-3.2.2.zip' saved [11663620/11663620] - -After the file is downloaded, we'll simply extract its files and directories using unzip command. - - # unzip revive-adserver-3.2.2.zip - -Then, we'll gonna move the entire Revive directories including every files from /tmp to the default webroot of Apache Web Server ie /var/www/html/ directory. - - # mv revive-adserver-3.2.2 /var/www/html/reviveads - -### 6. Configuring Apache Web Server ### - -We'll now configure our Apache Server so that revive will run with proper configuration. To do so, we'll create a new virtualhost by creating a new configuration file named reviveads.conf . The directory here may differ from one distribution to another, here is how we create in the following distributions of linux. - -#### On Ubuntu 15.04 #### - - # touch /etc/apache2/sites-available/reviveads.conf - # ln -s /etc/apache2/sites-available/reviveads.conf /etc/apache2/sites-enabled/reviveads.conf - # nano /etc/apache2/sites-available/reviveads.conf - -Now, we'll gonna add the following lines of configuration into this file using our favorite text editor. - - - ServerAdmin info@reviveads.linoxide.com - DocumentRoot /var/www/html/reviveads/ - ServerName reviveads.linoxide.com - ServerAlias www.reviveads.linoxide.com - - Options FollowSymLinks - AllowOverride All - - ErrorLog /var/log/apache2/reviveads.linoxide.com-error_log - CustomLog /var/log/apache2/reviveads.linoxide.com-access_log common - - -![Configuring Apache2 Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-apache2-ubuntu.png) - -After done, we'll gonna save the file and exit our text editor. Then, we'll restart our Apache Web server. - - # systemctl restart apache2 - -#### On CentOS 7 #### - -In CentOS, we'll directly create the file reviveads.conf under /etc/httpd/conf.d/ directory using our favorite text editor. - - # nano /etc/httpd/conf.d/reviveads.conf - -Then, we'll gonna add the following lines of configuration into the file. - - - ServerAdmin info@reviveads.linoxide.com - DocumentRoot /var/www/html/reviveads/ - ServerName reviveads.linoxide.com - ServerAlias www.reviveads.linoxide.com - - Options FollowSymLinks - AllowOverride All - - ErrorLog /var/log/httpd/reviveads.linoxide.com-error_log - CustomLog /var/log/httpd/reviveads.linoxide.com-access_log common - - -![Configuring httpd Centos](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-httpd-centos.png) - -Once done, we'll simply save the file and exit the editor. And then, we'll gonna restart our apache web server. - - # systemctl restart httpd - -### 7. Fixing Permissions and Ownership ### - -Now, we'll gonna fix some file permissions and ownership of the installation path. First, we'll gonna set the ownership of the installation directory to Apache process owner so that apache web server will have full access of the files and directories to edit, create and delete. - -#### On Ubuntu 15.04 #### - - # chown www-data: -R /var/www/html/reviveads - -#### On CentOS 7 #### - - # chown apache: -R /var/www/html/reviveads - -### 8. Allowing Firewall ### - -Now, we'll gonna configure our firewall programs to allow port 80 (http) so that our apache web server running Revive Adserver will be accessible from other machines in the network across the default http port ie 80. - -#### On Ubuntu 15.04/CentOS 7 #### - -As CentOS 7 and Ubuntu 15.04 both 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 following commands. - - # firewall-cmd --permanent --add-service=http - - success - - # firewall-cmd --reload - - success - -### 9. Web Installation ### - -Finally, after everything is done as expected, we'll now be able to access the web interface of the application using a web browser. We can go further towards the web installation, by pointing the web browser to the web server we are running in our linux machine. To do so, we'll need to point our web browser to http://ip-address/ or http://domain.com assigned to our linux machine. Here, in this tutorial, we'll point our browser to http://reviveads.linoxide.com/ . - -Here, we'll see the Welcome page of the installation of Revive Adserver with the GNU General Public License V2 as Revive Adserver is released under this license. Then, we'll simply click on I agree button in order to continue the installation. - -In the next page, we'll need to enter the required database information in order to connect Revive Adserver with the MariaDB database server. Here, we'll need to enter the database name, user and password that we had set in the above step. In this tutorial, we entered database name, user and password as revivedb, reviveuser and Pa$$worD123 respectively then, we set the hostname as localhost and continue further. - -![Configuring Revive Adserver](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-revive-adserver.png) - -We'll now enter the required information like administration username, password and email address so that we can use these information to login to the dashboard of our Adserver. After done, we'll head towards the Finish page in which we'll see that we have successfully installed Revive Adserver in our server. - -Next, we'll be redirected to the Adverstiser page where we'll add new Advertisers and manage them. Then, we'll be able to navigate to our Dashboard, add new users to the adserver, add new campaign for our advertisers, banners, websites, video ads and everything that its built with. - -For enabling more configurations and access towards the administrative settings, we can switch our Dashboard user to the Administrator account. This will add new administrative menus in the dashboard like Plugins, Configuration through which we can add and manage plugins and configure many features and elements of Revive Adserver. - -### Conclusion ### - -In this article, we learned some information on what is Revive Adserver and how we can setup on linux machine running Ubuntu 15.04 and CentOS 7 distributions. Though Revive Adserver's initial source code was bought from OpenX, currently the code base for OpenX Enterprise and Revive Adserver are completely separate. To extend more features, we can install more plugins which we can also find from [http://www.adserverplugins.com/][2] . Really, this piece of software has changed the way of managing the ads for websites, apps, videos and made it very easy and efficient. 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-revive-adserver-ubuntu-15-04-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.revive-adserver.com/download/ -[2]:http://www.adserverplugins.com/ From fbb48eaac4b5c36e59b127a32f8887c61fe41047 Mon Sep 17 00:00:00 2001 From: ZhangXiangping Date: Fri, 5 Feb 2016 15:54:05 +0800 Subject: [PATCH 0919/1710] Create 20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成。 --- ...ve Adserver on Ubuntu 15.04 or CentOS 7.md | 237 ++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 translated/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md diff --git a/translated/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md b/translated/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..25bea6cf72 --- /dev/null +++ b/translated/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,237 @@ +在Ubuntu 15.04 / CentOS 7上安装Revive Adserver +================================================================================ +Revive Adserver是一个免费且开源的广告管理系统,能使出版商,广告平台和广告商把广告投放在网页,应用,视频上并且管理的系统。Revive Adserver又名OpenX,遵循GNU通用公共授权协议。它集广告管理、网站定位、地理定位和跟踪系统于一体 +,用于数据收集。能使网站站长管理内部,付费以及第三方来源的广告,如谷歌的AdSense。本教程中,将会教会你在Ubuntu 15.04或CentOS 7安装并运行Revive Adserver。 +### 1. 安装LAMP### + +首先,Revive Adserver需要完整的LAMP环境才能运行,所以我们先安装LAMP。LAMP是Apache网页服务器,MySQL/MariaDB数据库和PHP模块的集合。要使Revive正常运行,需要安装PHP的众多模块,如apc,zlib,xml,pcre,mysql和mbstring。在不同的Linux发行版中,我们可以用下列命令进行LAMP的配置: + +#### 在Ubuntu 15.04下#### + + # apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libapache2-mod-php5 zip + +#### 在CentOS 7下 #### + + # yum install httpd mariadb php php-gd php-mysql php-curl php-mbstring php-xml php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev zip + +### 2. 启动Apache Web和MariaDB服务 + +可以用下列命令启动刚刚安装好的Apache Web服务和MariaDB数据库服务。 + +#### 在Ubuntu 15.04下#### + +Ubuntu15.04使用Systemd作为默认初始系统,所以用下列命令启动Apache和MariaDB进程: + + # systemctl start apache2 mysql + +可以用下列命令使其开机自动运行: + + # systemctl enable apache2 mysql + + Synchronizing state for apache2.service with sysvinit using update-rc.d... + Executing /usr/sbin/update-rc.d apache2 defaults + Executing /usr/sbin/update-rc.d apache2 enable + Synchronizing state for mysql.service with sysvinit using update-rc.d... + Executing /usr/sbin/update-rc.d mysql defaults + Executing /usr/sbin/update-rc.d mysql enable + +#### 在CentOS 7下 + +CentOS 7同样是以Systemd作为默认初始系统,可以用下列命令启动: + + # systemctl start httpd mariadb + + ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' + ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' + +### 3. 配置MariaDB + +#### 在CentOS 7/Ubuntu 15.04下 #### + +当我们第一次启动MariaDB时,MariaDB是没有分配密码的,所以要先设置一个root密码。之后再创建一个新的数据库用来储存Revive Adserver的数据。 + +使用以下命令配置MariaDB并设置其root密码: + + # mysql_secure_installation + +这时会要我们输入root密码,但我们之前什么密码都没设置,所以按回车下一步。之后,要求设置root密码,这时我们输入Y,然后输入自己想要的密码。回车继续下一步。 + + …. + so you should just press enter here. + + 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! + … + installation should now be secure. + Thanks for using MariaDB! + +![Configuring MariaDB](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-mariadb.png) + +### 4. 创建新的数据库 ### +为MariaDB的root用户设置了密码之后,就可以创建用来储存Revive Adserver应用数据的数据库。首先通过以下命令登陆MariaDB控制台: + + # mysql -u root -p + +这时要求输入root用户的密码,我们只要输入上一步设置好的密码。然后进入MariaDB控制台创建新的数据库,数据库用户及其密码,并且授予其创建、删除、编辑和存储表与数据的全部权限。 + + > CREATE DATABASE revivedb; + > CREATE USER 'reviveuser'@'localhost' IDENTIFIED BY 'Pa$$worD123'; + > GRANT ALL PRIVILEGES ON revivedb.* TO 'reviveuser'@'localhost'; + > FLUSH PRIVILEGES; + > EXIT; + +![Creating Mariadb Revive Database](http://blog.linoxide.com/wp-content/uploads/2015/11/creating-mariadb-revive-database.png) + +### 5. 下载Revive Adserver + +接下来下载Revive Adserver的最新版本Revive Adserver.3.2.2(写本文时)。可以使用wget命令从Revive Adserverde 官方网站下载压缩包,网址是:[http://www.revive-adserver.com/download/][1] 。命令如下: + + # cd /tmp/ + # wget http://download.revive-adserver.com/revive-adserver-3.2.2.zip + + --2015-11-09 17:03:48-- http://download.revive-adserver.com/revive-adserver-3.2.2.zip + Resolving download.revive-adserver.com (download.revive-adserver.com)... 54.230.119.219, 54.239.132.177, 54.230.116.214, ... + Connecting to download.revive-adserver.com (download.revive-adserver.com)|54.230.119.219|:80... connected. + HTTP request sent, awaiting response... 200 OK + Length: 11663620 (11M) [application/zip] + Saving to: 'revive-adserver-3.2.2.zip' + revive-adserver-3.2 100%[=====================>] 11.12M 1.80MB/s in 13s + 2015-11-09 17:04:02 (906 KB/s) - 'revive-adserver-3.2.2.zip' saved [11663620/11663620] + +解压到临时目录下: + + # unzip revive-adserver-3.2.2.zip + +把解压后的整个文件夹移动到Apache Web服务器的默认根目录/var/www/html/下: + + # mv revive-adserver-3.2.2 /var/www/html/reviveads + +### 6. 配置Apache Web服务 + +现在配置Apache服务使Revive正常运行。通过创建配置文件reviveads.conf来创建一个新的虚拟主机。这个目录在不同的Linux发行版上有所不同。 + +#### 在Ubuntu 15.04下 + + # touch /etc/apache2/sites-available/reviveads.conf + # ln -s /etc/apache2/sites-available/reviveads.conf /etc/apache2/sites-enabled/reviveads.conf + # nano /etc/apache2/sites-available/reviveads.conf + +在这个文件中添加下列几行文本: + + + ServerAdmin info@reviveads.linoxide.com + DocumentRoot /var/www/html/reviveads/ + ServerName reviveads.linoxide.com + ServerAlias www.reviveads.linoxide.com + + Options FollowSymLinks + AllowOverride All + + ErrorLog /var/log/apache2/reviveads.linoxide.com-error_log + CustomLog /var/log/apache2/reviveads.linoxide.com-access_log common + + +![Configuring Apache2 Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-apache2-ubuntu.png) +保存并退出,重启Apache Web服务: + + # systemctl restart apache2 + +#### 在CentOS 7下 #### + +在CentOS下,我们直接在/etc/httpd/conf.d/ 目录下创建reviveads.conf : + + # nano /etc/httpd/conf.d/reviveads.conf + +在这个文件中添加下列几行文本: + + + ServerAdmin info@reviveads.linoxide.com + DocumentRoot /var/www/html/reviveads/ + ServerName reviveads.linoxide.com + ServerAlias www.reviveads.linoxide.com + + Options FollowSymLinks + AllowOverride All + + ErrorLog /var/log/httpd/reviveads.linoxide.com-error_log + CustomLog /var/log/httpd/reviveads.linoxide.com-access_log common + + +![Configuring httpd Centos](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-httpd-centos.png) + +保存并退出,重启Apache Web服务: + + # systemctl restart httpd + +### 7. 修复权限和所有权 + +现在我们修改安装路径下文件的权限和所有权。把安装目录的所有权改成Apache进程所有以便Apache Web服务有文件和目录的编辑,创建和删除的完全权限。 + +#### 在Ubuntu 15.04下#### + + # chown www-data: -R /var/www/html/reviveads + +#### 在CentOS 7下 + + # chown apache: -R /var/www/html/reviveads + +### 8. 设置防火墙 + + 现在要配置防火墙,打开80端口使Apache Web服务运行的Revive Adserver能够被网络上的其他机器所访问。 + +#### 在Ubuntu 15.04/CentOS 7下 + +Ubuntu15.04/CentOS 7都使用Systemd作为默认初始系统,使用firewalld作为其防火墙。要打开80端口(http服务端口),执行以下命令: + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 9. 网站的安装 + +顺利的话我们能够使用浏览器进行交互,并可以将浏览器指向正在运行的网络服务器。只要在浏览器输入http://ip-address/ 或者 http://domain.com 。这里我们要访问 http://reviveads.linoxide.com/ + +打开后可以看到Revive Adserver的欢迎页面,上面还有作为它发行许可证的GNU通用公共许可证V2。点击 I agree 继续下一步安装。 + +在下一页中,我们要输入数据库信息以便把Revive Adserver和MariaDB数据库服务连接起来。要输入之前设置的数据库名称,用户名以及密码。在本教程中,我们分别输入数据库名称为revivedb,用户名为reviveuser,密码为Pa$$worD123,并且令主机名为localhost,点击continue继续。 + +![Configuring Revive Adserver](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-revive-adserver.png) + +输入要填的信息,如:管理员用户名,密码和邮箱。可以以这些信息登录Adserver的控制界面。然后跳到最后一页,可以看到Revive Adserver已经安装成功了。 + +接着,转到Adverstiser页面,添加新的广告管理。在控制界面添加新用户到adserver,为广告库户添加标题,网页,视频 +广告。 + + +### 总结 ### +本文中,我们学习了如何在Ubuntu 15.04和CentOS 7上安装并配置Revive Adserver。尽管Revive Adserver的原始代码是从OpenX那买的,但现在它们已经完全分开了。可以从[http://www.adserverplugins.com/][2] 获得更多插件来扩展新特性。讲真,这个软件确实让网页,应用,视频上的广告管理变得容易了许多。 + + + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-revive-adserver-ubuntu-15-04-centos-7/ + +作者:[Arun Pyasi][a] +译者:[chisper](https://github.com/chisper) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.revive-adserver.com/download/ +[2]:http://www.adserverplugins.com/ From fb355018990cd275d8a0e370ebe591da75f8f336 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 5 Feb 2016 21:52:18 +0800 Subject: [PATCH 0920/1710] PUB:20151206 Supporting secure DNS in glibc @zpl1025 --- ...20151206 Supporting secure DNS in glibc.md | 51 +++++++++++++++++++ ...20151206 Supporting secure DNS in glibc.md | 46 ----------------- 2 files changed, 51 insertions(+), 46 deletions(-) create mode 100644 published/20151206 Supporting secure DNS in glibc.md delete mode 100644 translated/tech/20151206 Supporting secure DNS in glibc.md diff --git a/published/20151206 Supporting secure DNS in glibc.md b/published/20151206 Supporting secure DNS in glibc.md new file mode 100644 index 0000000000..25e1004b09 --- /dev/null +++ b/published/20151206 Supporting secure DNS in glibc.md @@ -0,0 +1,51 @@ +通过修改 glibc 支持 DNS 加密 +======================== + +域名解析系统(DNS)是互联网安全的许多薄弱环节之一;可以将应用程序所访问的主机对应的 IP 地址误导到其它地方。也就是说,会连接到错误的位置,从而引发中间人(man-in-the-middle )攻击等等。而 [DNSSEC][1] 扩展协议则通过为 DNS 信息建立一条加密的可信通道来解决这个漏洞。在正确地配置好 DNSSEC 后,应用程序将可以得到可靠的主机查询信息。通过关于[尝试将 DNSSEC 更好地集成到 GNU C 库里][2]的讨论,我们知道,确保 DNS 查询信息安全这件事并不是那么简单。 + +从某种意义上来说,这个问题多年以前就解决了,我们可以配置一个本地域名服务实现完整的 DNSSEC 校验(verification)并允许应用程序通过 glibc 函数来使用该服务。DNSSEC 甚至还可以用于提高其他领域的安全性,比如,它可以携带 SSH 或 TLS 密钥指纹,让应用程序可以确认其在与正确的服务器对话。不过,当我们希望确认这条自称带有 DNSSEC 校验的 DNS 结果是不是真的已通过认证的时候 - 也就是说,当我们想依赖 DNSSEC 所承诺的安全的时候,事情变得有点复杂。 + +### /etc/resolv.conf 问题 + +从 glibc 的角度来看,这个问题一部分是因为 glibc 本身并没有做 DNSSEC 校验,而是引用 /etc/resolv.conf 文件,从该文件里读出的服务器来做解析以及校验,再将结果返回给应用程序。如果应用程序使用底层 res_query() 接口,那结果中将会包含“已认证数据(authenticated data)”(AD)标识(如果域名服务器设定了的话)以表示 DNSSEC 校验已经成功。但是 glibc 却完全不知道提供这些结果的域名服务器的信用,所以它其实并不能告诉应用程序结果是否真的可靠。 + +由 glibc 的维护者 Carlos O'Donell 提出的建议是在 resolv.conf 文件里增加一个选项(dns-strip-dnssec-ad-bit)告诉 glibc 无条件移除 AD 标识。这个选项可以由各发行版设定,表示 DNSSEC 级别的 DNS 查询结果并不可靠。而一旦建立好合适的环境可以获得可靠的查询结果后,再移除这个选项。这样一来,虽然问题还没有完全解决,至少应用程序有依据来评价从 glibc 获取的 DNS 查询结果的可靠性。 + +一个可靠的环境配置应该是什么样?标准情况应该和这个差不太多:有一个本地域名服务器,通过环路(loopback)接口访问,作为访问 /etc/resolv.conf 文件的唯一条目。这个域名服务器应该配置来做校验,而在校验失败后就只是简单地不返回任何结果。绝大多数情况下,应用程序就不再需要关心 AD 标识,如果结果不可靠,应用程序就根本看不到。一些发行版已经倾向于这种模型,不过情况仍然不像一些人所设想的那么简单。 + +其中一个问题是,这种方式将 /etc/resolv.conf 文件放到整个系统可信任度的中心。但是,在一个典型的 Linux 系统里,有无数的 DHCP 客户端、网络脚本以及其他更多的程序可以修改这个文件。就像 Paul Wouters 所[指出][3]的,在短时间内锁定这个文件是不可能的。有时候这种修改是必须的:在一个无盘系统启动的时候,在自身的域名服务器启动之前也是需要域名服务的;一个系统的整个 DNS 环境也会根据所连接的网络不同而有所改变;运行在容器里的系统也最好是配置成使用宿主机的域名服务器;等等。 + +所以,现在一般认为,现有系统里的 /etc/resolv.conf 文件并不可信。于是有人提出增加另一个配置文件(/etc/secure-resolv.conf 或其他什么),但这并没有从根本上解决问题。除此之外,有些参与者觉得就算有一个运行在环路接口上的域名服务器也不是真正可靠,比如 Zack Weinberg 甚至[建议][4]系统管理员可以有意禁用 DNSSEC 确认(validation)。 + +既然当前系统里的配置不足以信任,那可以这样推断,在情况有改善能够取得可信的结果后,glibc 需要有一种方式来通知应用程序。可以是上面讨论的屏蔽 AD 标识的方式(或者与之相反,增加一个显示的“此域名服务器可以信任”选项);当然,这都需要一定程度上锁定系统以免 /etc/resolv.conf 受到任何不可预计的修改。按 Petr Spacek 的[建议][5],还有一种引申方式,就是提供一种途径允许应用程序查询 glibc 当前通讯的是不是本地域名服务器。 + +### 在 glibc 里来处理? + +另一种方式是不管域名服务器,而是让 glibc 本身来做 DNSSEC 确认。不过,把这么大一坨加密相关代码放进 glibc 也是有很大阻力。这样将增加库本身的大小,从而感觉会增加使用它的应用程序的受攻击可能性。这个方向再引申一下,由 Zack 提出的[建议][6],可以把确认相关代码放到域名服务缓冲守护进程(nscd)里。因为 nscd 也是 glibc 的一部分,由 glibc 开发人员维护,因此在一定程度上可以相信能正确执行 DNSSEC 确认。而且 nscd 的通讯 socket 所在位置也是公开的,所以可以不考虑 /etc/resolv.conf 问题。不过,Carlos [担心][7]这种方式不能让那些不想使用 nscd 缓存功能的用户所接受;在他看来,基本可以排除 nscd 的方式。 + +所以,至少近期内,glibc 不太可能全部执行 DNSSEC 确认了的整个查询过程。这意味着,如果一个有安全考虑的应用要使用 glibc 库来查询域名,该库将需要提供一个标识来评价从独立域名服务器返回的结果有多大程度的可靠性。这几乎肯定需要发行版或系统管理员做出一些明确的改动。就像 Simo Sorce [说的][8]那样: + +> 如果 glibc 不使用明确的配置选项来通知应用程序它所用的域名解析是可信的,不会有什么用……不改一下还有很大弊端,因为应用程序开发者将马上认识到他们不能信任从 glibc 获取的任何信息,从而在处理 DNSSEC 相关信息时就简单地不用它。 + +要配置一个系统能正常使用 DNSSEC 需要改动该系统的很多组件 - 这是一个发行版范围的问题,需要时间来完全解决。在这个转变过程中 glibc 所扮演的角色很可能会比较小,但是很重要的一部分:如果应用程序不实现一套自己的域名解析代码,glibc 很可能是保证 DNS 结果可信的唯一方式。在一个系统中运行多个 DNSSEC 实现方式看起来不像是一种安全的方式,所以最好还是把事情做对了。 + +glibc 项目目前并没有确定用哪种方式来做这个事情,虽然从 /etc/resolv.conf 文件里的某些标记看上去快好了。这种改动应该需要发布新版本;考虑到 glibc 开发的保守天性,很可能来不及加入预计二月份发布的 2.23 版本了。所以 glibc 中暂时还不会有更高安全性的 DNSSEC ,不过在这个方向上也有一些进展了。 + +--------------------------- + +via: https://lwn.net/Articles/664776/ + +作者:Jonathan Corbet +译者:[zpl1025](https://github.com/zpl1025) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions +[2]: http://lwn.net/Articles/664790/ +[3]: http://lwn.net/Articles/664794/ +[4]: http://lwn.net/Articles/664782/ +[5]: http://lwn.net/Articles/664784/ +[6]: http://lwn.net/Articles/664796/ +[7]: http://lwn.net/Articles/664786/ +[8]: http://lwn.net/Articles/664787/ \ No newline at end of file diff --git a/translated/tech/20151206 Supporting secure DNS in glibc.md b/translated/tech/20151206 Supporting secure DNS in glibc.md deleted file mode 100644 index c66a28257c..0000000000 --- a/translated/tech/20151206 Supporting secure DNS in glibc.md +++ /dev/null @@ -1,46 +0,0 @@ -通过修改 glibc 支持 DNS 加密 -======================== - -感谢:Jonathan Corbet - -域名解析系统(DNS)是因特网安全许多薄弱环节之一;可以误导应用程序所访问的主机相应的 IP 地址。也就是说,会连接到错误的位置,可以引发中间人攻击以及更多攻击。而 DNSSEC 扩展协议是通过为 DNS 信息建立一条加密的可信通道来解决这个漏洞。在正确地配置好 DNSSEC 后,应用程序将可以得到可靠的主机查询信息。通过关于尝试将 DNSSEC 更好地集成到 GNU C 库里的讨论,确保 DNS 查询信息安全并不是那么简单。 - -某种意义上来说,这个问题多年以前就解决了,我们可以配置一个本地域名服务实现完整的 DNSSEC 认证并允许应用程序通过 glibc 函数来使用该服务。DNSSEC 甚至还可以用于提高其他领域的安全性,比如,它可以携带 SSH 或 TLS 密钥指纹,让应用程序可以确认其在与正确的服务器通话。不过,当我们希望确认这条自称带有 DNSSEC 认证的 DNS 结果是不是真的已通过认证的时候 - 也就是说,当我们想依赖 DNSSEC 所承诺的安全的时候,事情变得有点复杂。 - -/etc/resolv.conf 问题 - -从 glibc 的角度来看,这个问题一部分是因为 glibc 本身并没有做 DNSSEC 认证。而是引用 /etc/resolv.conf 文件,从该文件里读出的服务器来做解析以及认证,再将结果返回给应用程序。如果应用程序使用底层 res_query() 接口,那结果中将会包含“已认证数据”(AD)标识(如果域名服务器设定了的话)以表示 DNSSEC 认证已经成功。但是 glibc 却完全不知道提供这些结果的域名服务器的信用,所以它其实并不能告诉应用程序结果是否真的可靠。 - -由 glibc 的维护者 Carlos O'Donell 提出的建议是在 resolv.conf 文件里增加一个选项(dns-strip-dnssec-ad-bit)告诉 glibc 无条件移除 AD 标识。这个选项可以由各发行版设定,表示 DNSSEC 级别的 DNS 查询结果并不可靠。而一旦建立好合适的环境可以获得可靠的查询结果后,再移除这个选项。这样一来,虽然问题还没有完全解决,至少应用程序有依据来评价从 glibc 获取的 DNS 查询结果的可靠性。 - -一个可靠的环境配置应该是什么样?标准情况应该和这个差不太多:有一个本地域名服务器,通过环路接口访问,作为访问 /etc/resolv.conf 文件的唯一入口。这个域名服务器应该配置来做认证,而在认证失败后就只是简单地不返回任何结果。绝大多数情况下,应用程序就不再需要关心 AD 标识,如果结果不可靠,应用程序就根本看不到。一些发行版已经偏向这种模型,不过情况仍然不像一些人所设想的没那么简单。 - -其中一个问题是,这种方式将 /etc/resolv.conf 文件放到整个系统可信任度的中心。但是,在一个典型的 Linux 系统里,有无数的 DHCP 客户端、网络脚本以及其他更多,可以修改这个文件。就像 Paul Wouters 所指出的,在短时间内锁定这个文件是不可能的。有时候这种改变是必须的:在一个无盘系统启动的时候,在自身的域名服务器启动之前也是需要域名服务的;一个系统的整个 DNS 环境也会根据所连接的网络不同而有所改变;运行在容器里的系统也最好是配制成使用宿主机的域名服务器;等等。 - -所以,现在一般认为,现有系统里的 /etc/resolv.conf 文件并不可信。于是有人提出增加另一个配置文件(/etc/secure-resolv.conf 或其他什么),但这并没有从根本上解决问题。除此之外,有些参与人员觉得就算有一个运行在环路接口上的域名服务器也不是真正可靠,比如 Zack Weinberg 甚至建议系统管理员可以有意禁用 DNSSEC 认证。 - -既然当前系统里的配置不足以信任,那可以这样推断,在情况有改善能够取得可信的结果后,glibc 需要有一种方式来通知应用程序。可以是上面讨论的屏蔽 AD 标识的方式(或者与之相反,增加一个显示的“此域名服务器可以信任”选项);当然,这都需要一定程度上锁定系统以免 /etc/resolv.conf 受到任何不可预计的修改。按 Petr Spacek 的建议,还有一种引申方式,就是提供一种途径允许应用程序查询 glibc 当前通讯的是不是本地域名服务器。 - -在 glibc 里来处理? - -另一种方式是去掉域名服务器,而是让 glibc 本身来做 DNSSEC 认证。不过,把这么大一坨加密相关代码放进 glibc 也是有很大阻力。这样将增加库本身的大小,从而感觉会增加使用它的应用程序的受攻击面积。这个方向再引申一下,由 Zack 提出的建议,可以把认证相关代码放到域名服务缓冲守护进程(nscd)里。因为 nscd 也是 glibc 的一部分,由 glibc 开发人员维护,因此在一定程度上可以相信能正确执行 DNSSEC 认证。而且 nscd 的通讯 socket 所在位置也是公开的,所以可以不考虑 /etc/resolv.conf 问题。不过,Carlos 担心这种方式不能让那些不想使用 nscd 缓存功能的用户所接受;在他看来,基本可以排除 nscd 的方式。 - -所以,至少近期内,glibc 不太可能全部执行带 DNSSEC 认证的整个查询过程。这意味着,如果一个有安全考虑的应用要使用 glibc 库来查询域名,库将需要提供一个标识来评价从独立域名服务器返回的结果有多大程度的可靠性。这几乎肯定需要发行商或系统管理员做出一些明确的改动。就像 Simo Sorce 说的那样: - -如果 glibc 不使用明确的配置选项来通知应用程序它所用的域名解析是可信的,不会有什么用。。。不改一下还有很大弊端,因为应用程序开发者将马上认识到他们不能信任从 glibc 获取的任何信息,从而在处理 DNSSEC 相关信息时就简单地不用它。 - -要配置一个系统能正常使用 DNSSEC 需要改动该系统的很多组件 - 这是一个发行版范围的问题,需要时间来完全解决。在这个转变过程中 glibc 所扮演的角色很可能会比较小,但是很重要的一部分:如果应用程序不实现一套自己的域名解析代码,glibc 很可能是保证 DNS 结果可信的唯一方式。在一个系统中运行多个 DNSSEC 实现方式看起来不像是一种安全的方式,所以最好还是把事情做对了。 - -glibc 项目目前并没有确定用哪种方式来做这个事情,虽然从 /etc/resolv.conf 文件里的某些标记看上去快好了。这种改动应该需要发布新版本;考虑到 glibc 开发的保守天性,很可能来不及加入预计二月份发布的 2.23 版本了。所以 glibc 中暂时还不会有更高安全性的 DNSSEC ,不过在这个方向上也有一些进展了。 - ---------------------------- - -via: https://lwn.net/Articles/663474/ - -作者:Jonathan Corbet - -译者:[zpl1025](https://github.com/zpl1025) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6714641232da02832b9cdf0b288fb27bb7a4cbd0 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 5 Feb 2016 23:10:29 +0800 Subject: [PATCH 0921/1710] PUB:20150824 Great Open Source Collaborative Editing Tools @H-mudcup --- ...Open Source Collaborative Editing Tools.md | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) rename {translated/share => published}/20150824 Great Open Source Collaborative Editing Tools.md (77%) diff --git a/translated/share/20150824 Great Open Source Collaborative Editing Tools.md b/published/20150824 Great Open Source Collaborative Editing Tools.md similarity index 77% rename from translated/share/20150824 Great Open Source Collaborative Editing Tools.md rename to published/20150824 Great Open Source Collaborative Editing Tools.md index bc0a841477..aab783c627 100644 --- a/translated/share/20150824 Great Open Source Collaborative Editing Tools.md +++ b/published/20150824 Great Open Source Collaborative Editing Tools.md @@ -1,12 +1,13 @@ -优秀的开源合作编辑工具 +六款优秀的开源协作编辑工具 ================================================================================ -一句话,合作编著就是多个人进行编著。合作有好处也有风险。好处包括更加全面/协调的方式,更好的利用现有资源和一个更加有力的、团结的声音。对于我来说,最大的好处是极大的透明度。那是当我需要采纳同事的观点。同事之间来来回回地传文件效率非常低,导致不必要的延误还让人(比如,我)对整个合作这件事都感到不满意。有个好的合作软件,我就能实时地或异步地分享笔记,数据和文件,并用评论来分享自己的想法。这样在文档、图片、视频、演示文稿上合作就不会那么的琐碎而无聊。 -有很多种方式能在线进行合作,简直不能更简便了。这篇文章表明了我最喜欢的开源实时文档合作编辑工具。 +简而言之,协作编辑(Collaborative Edit)就是多个人进行编辑。协作有好处也有风险。好处之一是更加全面/协调的方式,更好的利用现有资源和一个更加有力一致的声音。对于我来说,最大的好处是极大的透明度。那是当我需要采纳同事的观点。同事之间来来回回地传文件效率非常低,导致不必要的延误还让人(比如,我)对整个协作这件事都感到不满意。有个好的协作软件,我就能实时地或异步地分享笔记,数据和文件,并用评论来分享自己的想法。这样在文档、图片、视频、演示文稿上协作就不会那么的琐碎而无聊。 -Google Docs 是个非常好的高效应用,有着大部分我所需要的功能。它可以作为一个实时地合作编辑文档的工具提供服务。文档可以被分享、打开并被多位用户同时编辑,用户还能看见其他合作者一个字母一个字母的编辑过程。虽然 Google Docs 对个人是免费的,但并不开源。 +有很多种方式能在线进行协作,简直不能更简便了。这篇文章展示了我最喜欢的开源的实时文档协作编辑工具。 -下面是我带来的最棒的开源合作编辑器,它们能帮你不被打扰的集中精力进行写作,而且是和其他人协同完成。 +Google Docs 是个非常好的高效应用,有着大部分我所需要的功能。它可以作为一个实时地协作编辑文档的工具提供服务。文档可以被分享、打开并被多位用户同时编辑,用户还能看见其他协作者一个字母一个字母的编辑过程。虽然 Google Docs 对个人是免费的,但并不开源。 + +下面是我带来的最棒的开源协作编辑器,它们能帮你不被打扰的集中精力进行写作,而且是和其他人协同完成。 ---------- @@ -14,17 +15,17 @@ Google Docs 是个非常好的高效应用,有着大部分我所需要的功 ![Hackpad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Hackpad.png) -Hackpad 是个开源的基于网页的实时 wiki,基于开源 EtherPad 合作文档编辑器。 +Hackpad 是个开源的基于网页的实时 wiki,基于开源 EtherPad 协作文档编辑器。 Hackpad 允许用户实时分享你的文档,它还用彩色编码显示各个作者分别贡献了哪部分。它还允许插入图片、清单,由于提供了语法高亮功能,它还能用来写代码。 -当2014年4月 Dropbox 获得了 Hackpad 后,这款软件就以开源的形式在本月发行。让我们经历的等待非常值得。 +当2014年4月 Dropbox 收购了 Hackpad 后,就在这个月这款软件以开源的形式发布。让我们经历的等待非常值得。 特性: - 有类似 wiki 所提供的,一套非常完善的功能 -- 实时或者异步地记合作笔记,共享数据和文件,或用评论分享你们的想法 -- 细致的隐私许可让你可以邀请单个朋友,一个十几人的团队或者上千的 Twitter 粉丝 +- 实时或者异步地记录协作笔记,共享数据和文件,或用评论分享你们的想法 +- 细致的隐私许可让你可以邀请单个朋友、一个十几人的团队或者上千的 Twitter 粉丝 - 智能执行 - 直接从流行的视频分享网站上插入视频 - 表格 @@ -42,9 +43,9 @@ Hackpad 允许用户实时分享你的文档,它还用彩色编码显示各个 ![Etherpad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Etherpad.png) -Etherpad 是个基于网页的开源实时合作编辑器,允许多个作者同时编辑一个文本文档,写评论,并与其他作者用群聊方式进行交流。 +Etherpad 是个基于网页的开源实时协作编辑器,允许多个作者同时编辑一个文本文档,写评论,并与其他作者用群聊方式进行交流。 -Etherpad 是用 JavaScript 运行的,在 AppJet 平台的顶端,通过 Comet 流实现实时的功能。 +Etherpad 是用 JavaScript 编写的,运行在 AppJet 平台之上,通过 Comet 流实现实时的功能。 特性: @@ -55,9 +56,9 @@ Etherpad 是用 JavaScript 运行的,在 AppJet 平台的顶端,通过 Comet - 每隔一段很短的时间就会自动保存 - 可个性化程度高 - 有客户端插件可以扩展编辑的功能 -- 几百个支持 Etherpad 的扩展包括支持 email 提醒,pad 管理,授权 +- 几百个支持 Etherpad 的扩展,包括支持 email 提醒,pad 管理,授权 - 可访问性开启 -- 可从 Node 里或通过 CLI(命令行界面)和 Pad 目录实时交互 +- 可从 Node 里或通过 CLI(命令行界面)和 EtherPad 的内容交互 - 网站: [etherpad.org][4] - 源代码:[github.com/ether/etherpad-lite][5] @@ -71,7 +72,7 @@ Etherpad 是用 JavaScript 运行的,在 AppJet 平台的顶端,通过 Comet ![Firepad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Firepad.png) -Firepad 是个开源的合作文本编辑器。它的设计目的是被嵌入到更大的网页应用中对几天内新加入的代码进行批注。 +Firepad 是个开源的协作文本编辑器。它的设计目的是被嵌入到更大的网页应用中对几天内新加入的代码进行批注。 Firepad 是个全功能的文本编辑器,有解决冲突,光标同步,用户属性,用户在线状态检测功能。它使用 Firebase 作为后台,而且不需要任何服务器端的代码。他可以被加入到任何网页应用中。Firepad 可以使用 CodeMirror 编辑器或者 Ace 编辑器提交文本,它的操作转换代码是从 ot.js 上借鉴的。 @@ -81,7 +82,7 @@ Firepad 已被多个编辑器使用,包括Atlassian Stash Realtime Editor、Ni 特性: -- 纯正的合作编辑 +- 纯正的协作编辑 - 基于 OT 的智能合并及解决冲突 - 支持多种格式的文本和代码的编辑 - 光标位置同步 @@ -106,13 +107,13 @@ Firepad 已被多个编辑器使用,包括Atlassian Stash Realtime Editor、Ni ![ownCloud Documents in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-ownCloud.png) -ownCloud Documents 是个可以单独并/或合作进行办公室文档编辑 ownCloud 应用。它允许最多5个人同时在网页浏览器上合作进行编辑 .odt 和 .doc 文件。 +ownCloud Documents 是个可以单独并/或协作进行办公室文档编辑 ownCloud 应用。它允许最多5个人同时在网页浏览器上协作进行编辑 .odt 和 .doc 文件。 ownCloud 是个自托管文件同步和分享服务器。他通过网页界面,同步客户端或 WebDAV 提供你数据的使用权,同时提供一个容易在设备间进行浏览、同步和分享的平台。 特性: -- 合作编辑,多个用户同时进行文件编辑 +- 协作编辑,多个用户同时进行文件编辑 - 在 ownCloud 里创建文档 - 上传文档 - 在浏览器里分享和编辑文件,然后在 ownCloud 内部或通过公共链接进行分享这些文件 @@ -131,16 +132,16 @@ ownCloud 是个自托管文件同步和分享服务器。他通过网页界面 ![Gobby in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Gobby.png) -Gobby 是个支持在一个会话内进行多个用户聊天并打开多个文档的合作编辑器。所有的用户都能同时在文件上进行工作,无需锁定。不同用户编写的部分用不同颜色高亮显示,它还支持多个编程和标记语言的语法高亮。 +Gobby 是个支持在一个会话内进行多个用户聊天并打开多个文档的协作编辑器。所有的用户都能同时在文件上进行工作,无需锁定。不同用户编写的部分用不同颜色高亮显示,它还支持多个编程和标记语言的语法高亮。 -Gobby 允许多个用户在互联网上实时共同编辑同一个文档。他很好的整合了 GNOME 环境。它拥有一个客户端-服务端结构,这让它能支持一个会话开多个文档,文档同步请求,密码保护和 IRC 式的聊天方式可以在多个频道进行交流。用户可以选择一个颜色对他们在文档中编写的文本进行高亮。 +Gobby 允许多个用户在互联网上实时共同编辑同一个文档。它很好的整合了 GNOME 环境。它拥有一个客户端-服务端结构,这让它能支持一个会话开多个文档,文档同步请求,密码保护和 IRC 式的聊天方式可以在多个频道进行交流。用户可以选择一个颜色对他们在文档中编写的文本进行高亮。 还供有一个叫做 infinoted 的专用服务器。 特性: - 成熟的文本编辑能力包括使用 GtkSourceView 的语法高亮功能 -- 实时、无需锁定、通过加密(包括PFS)连接的合作文本编辑 +- 实时、无需锁定、通过加密(包括PFS)连接的协作文本编辑 - 整合了群聊 - 本地组撤销:撤销不会影响远程用户的修改 - 显示远程用户的光标和选择区域 @@ -170,9 +171,9 @@ Gobby 允许多个用户在互联网上实时共同编辑同一个文档。他 ONLYOFFICE(从前叫 Teamlab Office)是个多功能云端在线办公套件,整合了 CRM(客户关系管理)系统、文档和项目管理工具箱、甘特图以及邮件整合器 -它能让你整理商业任务和时间表,保存并分享你的合作或个人文档,使用网络社交工具如博客和论坛,还可以和你的队员通过团队的即时聊天工具进行交流。 +它能让你整理商业任务和时间表,保存并分享你的协作或个人文档,使用网络社交工具如博客和论坛,还可以和你的队员通过团队的即时聊天工具进行交流。 -能在同一个地方管理文档、项目、团队和顾客关系。OnlyOffice 结合了文本,电子表格和电子幻灯片编辑器,他们的功能跟微软桌面应用(Word、Excel 和 PowerPoint)的功能相同。但是他允许实时进行合作编辑、评论和聊天。 +能在同一个地方管理文档、项目、团队和顾客关系。OnlyOffice 结合了文本,电子表格和电子幻灯片编辑器,他们的功能跟微软桌面应用(Word、Excel 和 PowerPoint)的功能相同。但是他允许实时进行协作编辑、评论和聊天。 OnlyOffice 是用 ASP.NET 编写的,基于 HTML5 Canvas 元素,并且被翻译成21种语言。 @@ -182,7 +183,7 @@ OnlyOffice 是用 ASP.NET 编写的,基于 HTML5 Canvas 元素,并且被翻 - 文档可以在浏览/编辑模式下分享 - 文档嵌入 - 电子表格和电子幻灯片编辑器 -- 合作编辑 +- 协作编辑 - 评论 - 群聊 - 移动应用 @@ -209,7 +210,7 @@ via: http://www.linuxlinks.com/article/20150823085112605/CollaborativeEditing.ht 作者:Frazer Kline 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 7c4742db05a9909d2010cbb31a2a2bb4450eb627 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sat, 6 Feb 2016 09:08:09 +0800 Subject: [PATCH 0922/1710] DongShuaike is translating --- sources/news/20160129 Recognizing correct code.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20160129 Recognizing correct code.md b/sources/news/20160129 Recognizing correct code.md index ad5028d622..60b94b895d 100644 --- a/sources/news/20160129 Recognizing correct code.md +++ b/sources/news/20160129 Recognizing correct code.md @@ -2,6 +2,8 @@ Automatic bug-repair system fixes 10 times as many errors as its predecessors. ------ +DongShuaike is translating. + MIT researchers have developed a machine-learning system that can comb through repairs to open-source computer programs and learn their general properties, in order to produce new repairs for a different set of programs. The researchers tested their system on a set of programming errors, culled from real open-source applications, that had been compiled to evaluate automatic bug-repair systems. Where those earlier systems were able to repair one or two of the bugs, the MIT system repaired between 15 and 18, depending on whether it settled on the first solution it found or was allowed to run longer. From 35511700a51b0b1b9382e321efafc007952fb4a5 Mon Sep 17 00:00:00 2001 From: ZhangXiangping Date: Sat, 6 Feb 2016 14:29:59 +0800 Subject: [PATCH 0923/1710] Update 20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chisper翻译中 --- ...151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 3d898340d8..10a40233e8 100644 --- 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 @@ -1,3 +1,4 @@ +chisper 翻译中 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. @@ -151,4 +152,4 @@ via: http://linoxide.com/linux-how-to/install-pure-ftpd-tls-freebsd-10-2/ 本文由 [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 3f2e68fa22c9684f7103d0cb2e786997d20100cc Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 6 Feb 2016 20:19:23 +0800 Subject: [PATCH 0924/1710] PUB:20150906 How to install Suricata intrusion detection system on Linux @mr-ping --- ...ata intrusion detection system on Linux.md | 59 +++++++++---------- 1 file changed, 27 insertions(+), 32 deletions(-) rename {translated/tech => published}/20150906 How to install Suricata intrusion detection system on Linux.md (54%) diff --git a/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md b/published/20150906 How to install Suricata intrusion detection system on Linux.md similarity index 54% rename from translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md rename to published/20150906 How to install Suricata intrusion detection system on Linux.md index 0eab03088c..89eccf5650 100644 --- a/translated/tech/20150906 How to install Suricata intrusion detection system on Linux.md +++ b/published/20150906 How to install Suricata intrusion detection system on Linux.md @@ -1,25 +1,24 @@ -如何在Linux系统上安装Suricata入侵检测系统 +如何在 Linux 系统上安装 Suricata 入侵检测系统 ================================================================================ -随着安全威胁的不断发生,入侵检测系统(IDS)在如今的数据中心环境中显得尤为必要。然而,随着越来越多的服务器将他们的网卡升级到10GB/40GB网络,对如此线路上的硬件进行计算密集型的入侵检测越来越困难。其中一种扩展入侵检测系统性能的途径是**多线程入侵检测系统**,它将CPU密集型的深度包检测工作并行的分配给多个并发任务来完成。这样的并行检测可以充分利用多核硬件的优势来轻松扩展入侵检测系统的吞吐量。在这方面有两个知名的开源项目,分别是[Suricata][1] 和 [Bro][2]。 +随着安全威胁的不断发生,入侵检测系统(IDS)在如今的数据中心环境中显得尤为必要。然而,随着越来越多的服务器将他们的网卡升级到10GB/40GB以太网,对如此线路上的硬件进行计算密集型的入侵检测越来越困难。其中一种提升入侵检测系统性能的途径是**多线程入侵检测系统**,它将 CPU 密集型的深度包检测工作并行的分配给多个并发任务来完成。这样的并行检测可以充分利用多核硬件的优势来轻松提升入侵检测系统的吞吐量。在这方面有两个知名的开源项目,分别是 [Suricata][1] 和 [Bro][2]。 -这个教程里,我会向大家演示**如何在Linux服务器上安装和配置Suricata入侵检测系统** +这个教程里,我会向大家演示**如何在 Linux 服务器上安装和配置 Suricata 入侵检测系统** -### 在Linux上安装Suricata IDS ### +### 在 Linux 上安装 Suricata IDS ### -让我们从源文件来构建 Suricata,但在此之前,需要按如下所示安装几个依赖包先。 +让我们从源文件来构建 Suricata,但在此之前,需要按如下所示先安装几个依赖包。 -#### 在Debian, Ubuntu 或者 Linux Mint 操作系统上安装依赖包 #### +#### 在 Debian, Ubuntu 或者 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 -#### 在CentOS, Fedora 或者 RHEL 操作系统上安装依赖包 #### +#### 在 CentOS, Fedora 或者 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 一旦将所有依赖包安装完毕,我们就可以继续安装 Suricata 了。 - 首先从 [http://suricata-ids.org/download/][3] 下载 Suricata 源代码,然后构建它。撰写这篇文章的时候,其最新版本号为 2.0.8 。 $ wget http://www.openinfosecfoundation.org/download/suricata-2.0.8.tar.gz @@ -61,12 +60,11 @@ Suricata 源代码带有默认的配置文件。按照如下方法安装这些 $ sudo make install-conf -正如你所料,如果没有IDS规则集的话,Suricata 毛用没有。幸好 Makefile 为我们提供了 IDS 规则集的安装选项。安装方法如下。 - +正如你所料,如果没有IDS规则集的话,Suricata 什么用也没有。幸好 Makefile 为我们提供了 IDS 规则集的安装选项。安装方法如下。 $ sudo make install-rules -以上的规则安装命令会从 [EmergingThreats.net][4] 上下载可用的现存社区规则集快照,并且将其存储在 /etc/suricata/rules 目录下。 +以上的规则安装命令会从 [EmergingThreats.net][4] 上下载可用的社区规则集快照,并且将其存储在 /etc/suricata/rules 目录下。 ![](https://farm1.staticflickr.com/691/20482669553_8b67632277_c.jpg) @@ -76,14 +74,13 @@ Suricata 源代码带有默认的配置文件。按照如下方法安装这些 $ sudo vi /etc/suricata/suricata.yaml -文件中有一些基本的配置供你使用。 +文件中有一些运行所需的基本配置。 -为"default-log-dir"关键字指定Suricata日至文件所在的位置。 +为`default-log-dir`关键字指定 Suricata 日志文件所在的位置。 default-log-dir: /var/log/suricata/ -在"vars"部分下方,你会发现几项对 Suricata 来说很重要变量。"HOME_NET"变量需要指定 Suricata 检查的网络。被分配给 EXTERNAL_NET 变量的 "!$HOME_NET" 代表除本地网络之外的其他网络。"XXX_PORTS"变量用来辨别不同服务所用到的端口号。需要注意的是无论使用什么端口,Suricata 都可以自动检测HTTP流量。所以是不是正确指定端口就显得没那么重要了。 - +在`vars`部分下方,你会发现几项对 Suricata 来说很重要变量。`HOME_NET`变量需要指定 Suricata 检查的网络。被分配给 `EXTERNAL_NET` 变量的 `!$HOME_NET` 代表除本地网络之外的其他网络。`XXX_PORTS`变量用来辨别不同服务所用到的端口号。需要注意的是无论使用什么端口,Suricata 都可以自动检测 HTTP 流量。所以是不是正确指定端口就显得没那么重要了。 vars: HOME_NET: "[192.168.122.0/24]" @@ -92,7 +89,7 @@ Suricata 源代码带有默认的配置文件。按照如下方法安装这些 SHELLCODE_PORTS: "!80" SSH_PORTS: 22 -"host-os-policy" 部分用于防御利用操作系统网络栈(例如:TCP reassembly)的自身行为来逃避检测的一些知名攻击手段。作为对策,通过针对目标操作系统而对检测引擎算法进行微调,现代IDC提供了“基于目标”的检测手段。因此,如果你知道某台主机运行了什么操作系统的话,将这个信息提供给 Suricata 就可以大幅提高检测的成功率。这就是 "host-os-policy" 存在的意义。本例中,默认的IDC对策是Linux系统。如果针对某个IP地址没有指定操作系统信息,Suricata 会默认应用基于Linux系统的检测策略。当捕获到对192.168.122.0/28 和 192.168.122.155通讯时,Suricata就会应用基于Windows系统的检测策略。 +`host-os-policy` 部分用于防御利用操作系统网络栈的自身行为来逃避检测的一些知名攻击手段(例如:TCP reassembly)。作为对策,通过针对目标操作系统而对检测引擎算法进行微调,现代 IDC 提供了“基于目标”的检测手段。因此,如果你知道某台主机运行了什么操作系统的话,将这个信息提供给 Suricata 就可以大幅提高检测的成功率。这就是 `host-os-policy` 存在的意义。本例中,默认的 IDC 策略是 Linux 系统。如果针对某个 IP 地址没有指定操作系统信息,Suricata 会默认应用基于 Linux 系统的检测策略。如下,当捕获到对 192.168.122.0/28 和 192.168.122.155通讯时,Suricata 就会应用基于 Windows 系统的检测策略。 host-os-policy: # These are Windows machines. @@ -111,38 +108,37 @@ Suricata 源代码带有默认的配置文件。按照如下方法安装这些 vista: [] windows2k3: [] -在 "threading" 部分下,你可以为不同的 Suricata 线程指定CPU关联。默认状态下,[CPU 关联][5] 是被禁止使用的 ("set-cpu-affinity: no"),这意味着 Suricata 会分配其线程到所有可用的CPU核心上。Suricata 会默认为每一个CPU核心创建一个检测线程。你可以通过指定 "detect-thread-ratio: N" 来调整此行为。此处会创建 N*M 个检测线程,M代表CPU核心总数。 +在 `threading` 部分下,你可以为不同的 Suricata 线程指定 CPU 关联。默认状态下,[CPU 关联][5] 是被禁止使用的 (`set-cpu-affinity: no`),这意味着 Suricata 会分配其线程到所有可用的 CPU 核心上。Suricata 会默认为每一个 CPU 核心创建一个检测线程。你可以通过指定 `detect-thread-ratio: N` 来调整此行为。此处会创建 N*M 个检测线程,M 代表 CPU 核心总数。 threading: set-cpu-affinity: no detect-thread-ratio: 1.5 -通过以上对线程的设置,Suricata会创建 1.5*M 个检测线程,M是系统的CPU核心总数。 +通过以上对线程的设置,Suricata 会创建 1.5*M 个检测线程,M 是系统的 CPU 核心总数。 -如果你想对Suricata配置有更多的了解,可以去翻阅默认配置文件。里边配有有大量的注释以供你清晰理解。 +如果你想对 Suricata 配置有更多的了解,可以去翻阅默认配置文件。里边配有有大量的注释以供你清晰理解。 -### 使用Suricata进行入侵监控 ### +### 使用 Suricata 进行入侵监控 ### 现在是时候让 Suricata 跑起来了,但在这之前还有一个步骤需要去完成。 -当你使用 pcap捕获模式 的时候,强烈建议关闭Suricata监听网卡上的任何的包卸载(例如 LRO/GRO)功能。这些功能会干扰包的实时捕获行为。 +当你使用 pcap 捕获模式的时候,强烈建议关闭 Suricata 监听网卡上的任何的包卸载(例如 LRO/GRO)功能。这些功能会干扰包的实时捕获行为。 按照以下方法关闭 eth0 接口的 LRO/GRO 功能。 $ sudo ethtool -K eth0 gro off lro off -这里要注意,在使用部分网卡的情况下,你会看到如下警告信息。忽略它们就行了,这些信息只不过告诉你你的网卡不支持LRO功能而已。 +这里要注意,在使用某些网卡的情况下,你会看到如下警告信息。忽略它们就行了,这些信息只不过告诉你你的网卡不支持 LRO 功能而已。 Cannot change large-receive-offload -Suricata 支持许多运行模式。运行模式决定着IDC会使用何种线程。以下命令可以查看所有 [可用的运行模式][6]。 +Suricata 支持许多运行模式。运行模式决定着 IDC 会使用何种线程。以下命令可以查看所有 [可用的运行模式][6]。 $ sudo /usr/local/bin/suricata --list-runmodes ![](https://farm6.staticflickr.com/5730/20481140934_25080d04d7_c.jpg) - -Suricata 使用的默认运行模式是autofp("auto flow pinned load balancing"==“自动流绑定负载均衡” 的缩写)。这个模式下,来自某一个流的包会被分配到一个单独的检测线程中。这些流会根据未被处理的包的最低数量来分配相应的线程。 +Suricata 使用的默认运行模式是 autofp("auto flow pinned load balancing"==“自动流绑定负载均衡” 的缩写)。这个模式下,来自某一个流的包会被分配到一个单独的检测线程中。这些流会根据未被处理的包的最低数量来分配相应的线程。 最后,让我们将 Suricata 运行起来,看看它表现如何。 @@ -150,14 +146,13 @@ Suricata 使用的默认运行模式是autofp("auto flow pinned load balancing ![](https://farm1.staticflickr.com/701/21077552366_c577746e36_c.jpg) -本例中,我们在一个8核心系统中监控eth0网络接口。如上所示,Suricata 创建了13个包处理线程和3个管理线程。包处理线程中包括一个PCAP包捕获线程,12个检测线程(由8*1.5得出)。这表示IDS内的1个包捕获线程均衡负载到12个检测线程中。管理线程包括1个流管理和2个计数/统计相关线程。 +本例中,我们在一个8核心系统中监控 eth0 网络接口。如上所示,Suricata 创建了13个包处理线程和3个管理线程。包处理线程中包括一个 PCAP 包捕获线程,12个检测线程(由8*1.5得出)。这表示 IDS 内的1个包捕获线程均衡负载到12个检测线程中。管理线程包括1个流管理和2个计数/统计相关线程。 -Here is a thread-view of Suricata process (plotted by [htop][7]). 以下是一个关于Suricata处理的线程截图(由 [htop][7] 绘制)。 ![](https://farm6.staticflickr.com/5775/20482669593_174f8f41cb_c.jpg) -Suricata检测日志存储在 /var/log/suricata 目录下。 +Suricata 检测日志存储在 /var/log/suricata 目录下。 $ tail -f /var/log/suricata/fast.log @@ -167,7 +162,7 @@ Suricata检测日志存储在 /var/log/suricata 目录下。 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 -日志也可以提供Json格式,被当做引用实例去使用: +日志也可以提供 Json 格式以便导入: $ tail -f /var/log/suricata/eve.json @@ -177,9 +172,9 @@ Suricata检测日志存储在 /var/log/suricata 目录下。 ### 总结 ### -这篇教程中,我为大家演示了如何在一台多核Linux服务器上安装Suricata入侵检测系统。不同于单线程的 [Snort IDS][8] ,Suricata 可以很容易的从多核硬件的多进程特性所带来的红利中获益。定制Suricata来最大化其效能和检测范围是一个很好的主意。Suricata的粉丝们维护着一个 [在线 Wiki][9],如果你打算将Suricata部署到你的环境中,我强烈建议你去那儿取取经。 +这篇教程中,我为大家演示了如何在一台多核 Linux 服务器上安装 Suricata 入侵检测系统。不同于单线程的 [Snort IDS][8] ,Suricata 可以很容易的从多核硬件的多进程特性所带来的好处中获益。定制 Suricata 来最大化其效能和检测范围是一个很好的主意。Suricata 的粉丝们维护着一个 [在线 Wiki][9],如果你打算将 Suricata 部署到你的环境中,我强烈建议你去那儿取取经。 -如果你现在已经开始使用Suricata了的话,把你的经验也分享出来吧。 +如果你现在已经开始使用 Suricata 了的话,把你的经验也分享出来吧。 -------------------------------------------------------------------------------- @@ -187,7 +182,7 @@ via: http://xmodulo.com/install-suricata-intrusion-detection-system-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 9ccb1e7e67891d48f09f85e2fb4bba49066c96d7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 6 Feb 2016 21:00:09 +0800 Subject: [PATCH 0925/1710] PUB:20151201 Cinnamon 2.8 Review @wwy-hust --- .../20151201 Cinnamon 2.8 Review.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/talk => published}/20151201 Cinnamon 2.8 Review.md (70%) diff --git a/translated/talk/20151201 Cinnamon 2.8 Review.md b/published/20151201 Cinnamon 2.8 Review.md similarity index 70% rename from translated/talk/20151201 Cinnamon 2.8 Review.md rename to published/20151201 Cinnamon 2.8 Review.md index 209ee05cd6..ac84601cab 100644 --- a/translated/talk/20151201 Cinnamon 2.8 Review.md +++ b/published/20151201 Cinnamon 2.8 Review.md @@ -1,52 +1,52 @@ -Cinnamon 2.8 评论 +Cinnamon 2.8 新变化一览 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2-8-featured.jpg) -除了Gnome和KDE外,Cinnamon是另一个很多人使用的桌面环境。它是由创作Linux Mint的团队制作的,并且可以被安装在许多其他发行版上。该桌面环境的最新版本 - Cinnamon 2.8 - 于本月早些时间发布,此版本修复了许多的Bug、做了许多改进并添加了一些新功能。 +除了Gnome和KDE外,Cinnamon是另一个很多人使用的桌面环境。它是由创作Linux Mint的团队制作的,并且可以被安装在许多其他发行版上。该桌面环境的最新版本 - Cinnamon 2.8 - 于去年底发布,此版本修复了许多的Bug、做了许多改进并添加了一些新功能。 我将仔细介绍该发行版本的主要改进,以及如何更新到Cinnamon 2.8或者第一次安装它。 ### 对Applets的改进 ### -在此版本中,对已经在面板中存在的Applets做了若干的改进。 +在此版本中,对面板中已有的Applets做了若干的改进。 #### 声音 Applet #### ![cinnamon-28-sound-applet](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-sound-applet.jpg) -声音Applet经过修订,目前可以显示音轨信息并且可以在音频文件的艺术家封面上面进行媒体控制。对于支持拖动的音乐播放器来说(例如Banshee),会有一个进度条在同样的位置,您可以用它来改变音轨位置。在applet的面板上右击将显示对输入和输出静音的选项。 +声音Applet经过修正,目前可以显示音轨信息并且可以在音频文件的艺术家封面上面进行媒体控制。对于支持拖动的音乐播放器来说(例如Banshee),会有一个进度条显示同样的播放进度,您可以用它来改变音轨位置。在applet的面板上右击将显示对输入和输出设备静音的选项。 #### 电源 Applet #### -电源applet则会使用制造商的数据而不是通用名称显示每一个连接的电池和设备。 +电源applet则会使用电池制造商的数据而不是通用名称来显示每一个连接的电池和设备。 #### 窗口缩略图 #### ![cinnamon-2.8-window-thumbnails](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-window-thumbnails.png) -Cinnamon 2.8带来了可以在鼠标悬停于面板里窗口列表中的窗口时展示窗口缩略图的选项。如果您不喜欢该功能,您还可以关闭它。 +在Cinnamon 2.8中,可以在鼠标悬停于面板里窗口列表时展示窗口缩略图。如果您不喜欢该功能,您还可以关闭该选项。 #### 工作区切换 Applet #### ![cinnamon-2.8-workspace-switcher](https://www.maketecheasier.com/assets/uploads/2015/11/cinnamon-2.8-workspace-switcher.png) -添加工作区切换applet到您的面板将为您显示一个代表工作区的可视化的图像,一些矩形嵌套在其中,代表您的窗口的位置。 +添加工作区切换applet到您的面板将为您显示一个代表该工作区的可视化图像,一些矩形嵌套显示在其中,代表您的窗口的位置。 #### 系统托盘 #### -Cinnamon 2.8带来了对系统托盘中的应用程序指示器的支持。您可以很容易地在设置中禁用它,这将强制应用程序回滚以使用状态图标作为替代。 +Cinnamon 2.8支持在系统托盘中显示应用程序指示器。您可以很容易地在设置中禁用它,这将强制应用程序到以前使用状态图标的方式。 ### 视觉改进 ### -Cinnamon 2.8还做了很多视觉上的改进。经典的切换器和Alt + Tab预览切换器都被细细打磨,有了显著的改进,同时修复了Alt + F2对话框的bug,并赋予了它更好的命令自动补全功能。 +Cinnamon 2.8还做了很多视觉上的改进。经典的切换器和Alt + Tab预览切换器都被精细打磨,有了显著的改进,同时修复了Alt + F2对话框的bug,并赋予了它更好的命令自动补全功能。 -而且,在于最小化窗口时的存在的传统的动画效果中的问题现已被解决并可用于多个面板。 +而且,传统的最小化窗口时动画效果的问题现已被解决,并可用于多个面板。 ### Nemo 的改进 ### ![cinnamon-2.8-nemo](https://www.maketecheasier.com/assets/uploads/2015/11/rsz_cinnamon-28-nemo.jpg) -Cinnamon默认的文件管理器也修复了一些bug,并有了新的“快速重命名”的功能,用于重命名文件和文件夹。可以通过两次点击文件或文件夹并在两次点击之前进行简短的停顿以重命名文件。 +Cinnamon默认的文件管理器也修复了一些bug,并有了新的“快速重命名”的功能,用于重命名文件和文件夹。可以通过两次点击文件或文件夹并在两次点击之间进行简短的停顿以重命名文件。 Nemo也会自动地检测缩略图存在的问题,并提示您快速地修复它们。 @@ -54,7 +54,7 @@ Nemo也会自动地检测缩略图存在的问题,并提示您快速地修复 - Applets如今会在它们被更新的时候自动地重新加载一次。 - 对于多个监视器的支持有了显著的提高。 -- 对话框窗口有了提高,并且会附加到它的父窗口上。 +- 对话框窗口有了改进,并且会附加到它的父窗口上。 - HiDPI检测有了改进。 - QT5应用程序现在看起来更加原生并使用了默认的GTK主题。 - 窗口管理和渲染性能有了提升。 @@ -80,7 +80,7 @@ via: https://www.maketecheasier.com/cinnamon-2-8-review/ 作者:[Ayo Isaiah][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中国](https://linux.cn/) 荣誉推出 From 92536f4a2cd2839526f76860ec35bca646288ffb Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 7 Feb 2016 23:52:41 +0800 Subject: [PATCH 0926/1710] PUB:20151030 80 Linux Monitoring Tools for SysAdmins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 好长的文章 --- ...80 Linux Monitoring Tools for SysAdmins.md | 156 +++++++++--------- 1 file changed, 78 insertions(+), 78 deletions(-) rename {translated/share => published}/20151030 80 Linux Monitoring Tools for SysAdmins.md (68%) diff --git a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md b/published/20151030 80 Linux Monitoring Tools for SysAdmins.md similarity index 68% rename from translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md rename to published/20151030 80 Linux Monitoring Tools for SysAdmins.md index 4733a41d17..b78c23fa41 100644 --- a/translated/share/20151030 80 Linux Monitoring Tools for SysAdmins.md +++ b/published/20151030 80 Linux Monitoring Tools for SysAdmins.md @@ -1,9 +1,9 @@ - -Linux 系统管理员必备的80个监控工具 +最全列表: 80 多个 Linux 系统管理员必备的监控工具 ================================================================================ + ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-monitoring.jpg) -随着行业的不断发展,各种工具多得不可胜数。这里列出网上最全的(工具)。拥有超过80种方式来管理你的机器。在本文中,我们主要讲述以下方面: +随着互联网行业的不断发展,各种监控工具多得不可胜数。这里列出网上最全的监控工具。让你可以拥有超过80种方式来管理你的机器。在本文中,我们主要包括以下方面: - 命令行工具 - 网络相关内容 @@ -11,51 +11,51 @@ Linux 系统管理员必备的80个监控工具 - 日志监控工具 - 基础设施监控工具 -监控和调试性能问题非常困难,但用对了正确的工具有时也是很容易的。下面是一些你可能听说过的工具,当你使用它们时可能存在一些问题: +监控和调试性能问题是一个艰巨的任务,但用对了正确的工具有时也是很容易的。下面是一些你可能听说过的工具,也有可能没有听说过——何不赶快开始试试? -### 十大系统监控工具 ### +### 八大系统监控工具 ### -#### 1. Top #### +#### 1. top #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/top.jpg) -这是一个被预装在许多 UNIX 系统中的小工具。当你想要查看在系统中运行的进程或线程时:top 是一个很好的工具。你可以对这些进程以不同的标准进行排序,默认是以 CPU 进行排序的。 +这是一个被预装在许多 UNIX 系统中的小工具。当你想要查看在系统中运行的进程或线程时:top 是一个很好的工具。你可以对这些进程以不同的方式进行排序,默认是以 CPU 进行排序的。 #### 2. [htop][1] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/htop.jpg) -HTOP 实质上是 top 的增强版本。它更容易对进程排序。它在视觉上更容易理解并且已经内建了许多通用的命令。它也是完全交互的。 +htop 实质上是 top 的一个增强版本。它更容易对进程排序。它看起来上更容易理解,并且已经内建了许多通用操作。它也是完全交互式的。 #### 3. [atop][2] #### -Atop 和 top,htop 非常相似,它也能监控所有进程,但不同于 top 和 htop 的是,它会记录进程的日志供以后分析。它也能显示所有进程的资源消耗。它还会高亮显示已经达到临界负载的资源。 +atop 和 top,htop 非常相似,它也能监控所有进程,但不同于 top 和 htop 的是,它可以按日记录进程的日志供以后分析。它也能显示所有进程的资源消耗。它还会高亮显示已经达到临界负载的资源。 #### 4. [apachetop][3] #### -Apachetop 会监控 apache 网络服务器的整体性能。它主要是基于 mytop。它会显示当前 reads, writes 的数量以及 requests 进程的总数。 +apachetop 会监控 apache 网络服务器的整体性能。它主要是基于 mytop。它会显示当前的读取进程、写入进程的数量以及请求进程的总数。 #### 5. [ftptop][4] #### -ftptop 给你提供了当前所有连接到 ftp 服务器的基本信息,如会话总数,正在上传和下载的客户端数量以及客户端信息。 +ftptop 给你提供了当前所有连接到 ftp 服务器的基本信息,如会话总数,正在上传和下载的客户端数量以及客户端是谁。 #### 6. [mytop][5] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mytop.jpg) -mytop 是一个很简洁的工具,用于监控线程和 mysql 的性能。它给了你一个实时的数据库来查询处理结果。 +mytop 是一个很简洁的工具,用于监控 mysql 的线程和性能。它能让你实时查看数据库以及正在处理哪些查询。 #### 7. [powertop][6] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/powertop.jpg) -powertop 可以帮助你诊断与电量消耗和电源管理相关的问题。它也可以帮你进行电源管理设置,以实现对你服务器最有效的配置。你可以使用 tab 键进行选项切换。 +powertop 可以帮助你诊断与电量消耗和电源管理相关的问题。它也可以帮你进行电源管理设置,以实现对你服务器最有效的配置。你可以使用 tab 键切换选项卡。 #### 8. [iotop][7] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iotop.jpg) -iotop 用于检查 I/O 的使用情况,并为你提供了一个类似 top 的界面来显示。它每列显示读和写的速率,每行代表一个进程。当出现等待 I/O 交换时,它也显示进程消耗时间的百分比。 +iotop 用于检查 I/O 的使用情况,并为你提供了一个类似 top 的界面来显示。它按列显示读和写的速率,每行代表一个进程。当发生交换或 I/O 等待时,它会显示进程消耗时间的百分比。 ### 与网络相关的监控 ### @@ -63,7 +63,7 @@ iotop 用于检查 I/O 的使用情况,并为你提供了一个类似 top 的 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ntopng.jpg) -ntopng 是 ntop 的升级版,它提供了一个能使用浏览器进行网络监控的图形用户界面。它还有其他用途,如:定位主机,显示网络流量和 ip 流量分布并能进行分析。 +ntopng 是 ntop 的升级版,它提供了一个能通过浏览器进行网络监控的图形用户界面。它还有其他用途,如:地理定位主机,显示网络流量和 ip 流量分布并能进行分析。 #### 10. [iftop][9] #### @@ -75,17 +75,17 @@ iftop 类似于 top,但它主要不是检查 cpu 的使用率而是监听所 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/jnettop.jpg) -jnettop 以相同的方式来监测网络流量但比 iftop 更形象。它还支持自定义的文本输出并能以友好的交互方式来深度分析日志。 +jnettop 以相同的方式来监测网络流量但比 iftop 更形象。它还支持自定义的文本输出,并能以友好的交互方式来深度分析日志。 #### 12. [bandwidthd][11] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bandwidthd.jpg) -bandwidthd 可以跟踪 TCP/IP 网络子网的使用情况并能在浏览器中通过 png 图片形象化地构建一个 HTML 页面。它有一个数据库驱动系统,支持搜索、过滤,多传感器和自定义报表。 +BandwidthD 可以跟踪 TCP/IP 网络子网的使用情况,并能在浏览器中通过 png 图片形象化地构建一个 HTML 页面。它有一个数据库系统,支持搜索、过滤,多传感器和自定义报表。 #### 13. [EtherApe][12] #### -EtherApe 以图形化显示网络流量,可以支持更多的节点。它可以捕获实时流量信息,也可以从 tcpdump 进行读取。也可以使用具有 pcap 语法的网络过滤显示特定信息。 +EtherApe 以图形化显示网络流量,可以支持更多的节点。它可以捕获实时流量信息,也可以从 tcpdump 进行读取。也可以使用 pcap 格式的网络过滤器来显示特定信息。 #### 14. [ethtool][13] #### @@ -97,7 +97,7 @@ ethtool 用于显示和修改网络接口控制器的一些参数。它也可以 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nethogs.jpg) -NetHogs 打破了网络流量按协议或子网进行统计的原理。它以进程组来计算。所以,当网络流量猛增时,你可以使用 NetHogs 查看是由哪个进程造成的。 +NetHogs 打破了网络流量按协议或子网进行统计的惯例,它以进程来分组。所以,当网络流量猛增时,你可以使用 NetHogs 查看是由哪个进程造成的。 #### 16. [iptraf][15] #### @@ -109,7 +109,7 @@ iptraf 收集的各种指标,如 TCP 连接数据包和字节数,端口统 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ngrep.jpg) -如果不是网络层的话,ngrep 就是 grep。pcap 意识到后允许其指定扩展规则或十六进制表达式来匹配数据包。 +ngrep 就是网络层的 grep。它使用 pcap ,允许通过指定扩展正则表达式或十六进制表达式来匹配数据包。 #### 18. [MRTG][17] #### @@ -121,29 +121,29 @@ MRTG 最初被开发来监控路由器的流量,但现在它也能够监控网 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bmon.jpg) -Bmon 能监控并帮助你调试网络。它能捕获网络相关的统计数据,并以友好的方式进行展示。你还可以与 bmon 通过脚本进行交互。 +bmon 能监控并帮助你调试网络。它能捕获网络相关的统计数据,并以友好的方式进行展示。你还可以与 bmon 通过脚本进行交互。 #### 20. traceroute #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/traceroute.jpg) -Traceroute 是一个内置工具,能显示路由和测试数据包在网络中的延迟。 +traceroute 是一个内置工具,能显示路由和测量数据包在网络中的延迟。 #### 21. [IPTState][19] #### -IPTState 可以让你跨越 iptables 来监控流量,并通过你指定的条件来进行排序。该工具还允许你从表中删除状态信息。 +IPTState 可以让你观察流量是如何通过 iptables,并通过你指定的条件来进行排序。该工具还允许你从 iptables 的表中删除状态信息。 #### 22. [darkstat][20] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/darkstat.jpg) -Darkstat 能捕获网络流量并计算使用情况的统计数据。该报告保存在一个简单的HTTP服务器中,它为你提供了一个非常棒的图形用户界面。 +darkstat 能捕获网络流量并计算使用情况的统计数据。该报告保存在一个简单的 HTTP 服务器中,它为你提供了一个非常棒的图形用户界面。 #### 23. [vnStat][21] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/vnstat.jpg) -vnStat 是一个网络流量监控工具,它的数据统计是由内核进行提供的,其消耗的系统资源非常少。系统重新启动后,它收集的数据仍然存在。它具有颜色选项供系统管理员使用。 +vnStat 是一个网络流量监控工具,它的数据统计是由内核进行提供的,其消耗的系统资源非常少。系统重新启动后,它收集的数据仍然存在。有艺术感的系统管理员可以使用它的颜色选项。 #### 24. netstat #### @@ -159,19 +159,19 @@ netstat 是一个内置的工具,它能显示 TCP 网络连接,路由表和 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nmap.jpg) -Nmap 可以扫描你服务器开放的端口并且可以检测正在使用哪个操作系统。但你也可以使用 SQL 注入漏洞,网络发现和渗透测试相关的其他手段。 +Nmap 可以扫描你服务器开放的端口并且可以检测正在使用哪个操作系统。但你也可以将其用于 SQL 注入漏洞、网络发现和渗透测试相关的其他用途。 #### 27. [MTR][23] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mtr.jpg) -MTR 结合了 traceroute 和 ping 的功能到一个网络诊断工具上。当使用该工具时,它会限制单个数据包的跳数,同时也监视它们的到期时间。然后每秒进行重复。 +MTR 将 traceroute 和 ping 的功能结合到了一个网络诊断工具上。当使用该工具时,它会限制单个数据包的跳数,然后监视它们的到期时到达的位置。然后每秒进行重复。 #### 28. [Tcpdump][24] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/tcpdump.jpg) -Tcpdump 将输出一个你在命令中匹配并捕获到的数据包的信息。你还可以将此数据保存并进一步分析。 +Tcpdump 将按照你在命令行中指定的表达式输出匹配捕获到的数据包的信息。你还可以将此数据保存并进一步分析。 #### 29. [Justniffer][25] #### @@ -185,13 +185,13 @@ Justniffer 是 tcp 数据包嗅探器。使用此嗅探器你可以选择收集 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nmon.jpg) -nmon 将数据输出到屏幕上的,或将其保存在一个以逗号分隔的文件中。你可以查看 CPU,内存,网络,文件系统,top 进程。数据也可以被添加到 RRD 数据库中用于进一步分析。 +nmon 将数据输出到屏幕上的,或将其保存在一个以逗号分隔的文件中。你可以查看 CPU,内存,网络,文件系统,前列 进程。数据也可以被添加到 RRD 数据库中用于进一步分析。 #### 31. [conky][27] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/cpulimit.jpg) -Conky 能监视不同操作系统并统计数据。它支持 IMAP 和 POP3, 甚至许多流行的音乐播放器!出于方便不同的人,你可以使用自己的 Lua 脚本或程序来进行扩展。 +Conky 能监视很多的操作系统数据。它支持 IMAP 和 POP3, 甚至许多流行的音乐播放器!出于方便不同的人,你可以使用自己的 Lua 脚本或程序来进行扩展。 #### 32. [Glances][28] #### @@ -211,17 +211,17 @@ Saidar 是一个非常小的工具,为你提供有关系统资源的基础信 RRDtool 是用来处理 RRD 数据库的工具。RRDtool 旨在处理时间序列数据,如 CPU 负载,温度等。该工具提供了一种方法来提取 RRD 数据并以图形界面显示。 -#### 35. [monit][31] #### +#### 35. [monit][31] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/monit.jpg) -如果出现故障时,monit 有发送警报以及重新启动服务的功能。它可以对任何类型进行检查,你可以为 monit 写一个脚本,它有一个 Web 用户界面来分担你眼睛的压力。 +如果出现故障时,monit 有发送警报以及重新启动服务的功能。它可以对各种数据进行检查,你可以为 monit 写一个脚本,它有一个 Web 用户界面来分担你眼睛的压力。 #### 36. [Linux process explorer][32] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-process-monitor.jpg) -Linux process explorer 是类似 OSX 或 Windows 的在线监视器。它比 top 或 ps 的使用范围更广。你可以查看每个进程的内存消耗以及 CPU 的使用情况。 +Linux process explorer 是类似 OSX 或 Windows 的活动监视器。它比 top 或 ps 的使用范围更广。你可以查看每个进程的内存消耗以及 CPU 的使用情况。 #### 37. df #### @@ -233,37 +233,37 @@ df 是 disk free 的缩写,它是所有 UNIX 系统预装的程序,用来显 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/discus.jpg) -Discus 类似于 df,它的目的是通过使用更吸引人的特性,如颜色,图形和数字来对 df 进行改进。 +discus 类似于 df,它的目的是通过使用更吸引人的特性,如颜色,图形和数字来对 df 进行改进。 #### 39. [xosview][34] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/xosview.jpg) -xosview 是一款经典的系统监控工具,它给你提供包括 IRQ 的各个不同部分的总览。 +xosview 是一款经典的系统监控工具,它给你提供包括 IRQ 在内的各个不同部分的简单总览。 #### 40. [Dstat][35] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/dstat.jpg) -Dstat 旨在替代 vmstat,iostat,netstat 和 ifstat。它可以让你查实时查看所有的系统资源。这些数据可以导出为 CSV。最重要的是 dstat 允许使用插件,因此其可以扩展到更多领域。 +dstat 旨在替代 vmstat,iostat,netstat 和 ifstat。它可以让你查实时查看所有的系统资源。这些数据可以导出为 CSV。最重要的是 dstat 允许使用插件,因此其可以扩展到更多领域。 #### 41. [Net-SNMP][36] #### -SNMP 是“简单网络管理协议”,Net-SNMP 工具套件使用该协议可帮助你收集服务器的准确信息。 +SNMP 即“简单网络管理协议”,Net-SNMP 工具套件使用该协议可帮助你收集服务器的准确信息。 #### 42. [incron][37] #### -Incron 允许你监控一个目录树,然后对这些变化采取措施。如果你想将目录‘a’中的新文件复制到目录‘b’,这正是 incron 能做的。 +incron 允许你监控一个目录树,然后对这些变化采取措施。如果你想在目录‘a’中出现新文件时,将其复制到目录‘b’,这正是 incron 能做的。 #### 43. [monitorix][38] #### -Monitorix 是轻量级的系统监控工具。它可以帮助你监控一台机器,并为你提供丰富的指标。它也有一个内置的 HTTP 服务器,来查看图表和所有指标的报告。 +Monitorix 是轻量级的系统监控工具。它可以帮助你监控单独一台机器,并为你提供丰富的指标。它也有一个内置的 HTTP 服务器,来查看图表和所有指标的报告。 #### 44. vmstat #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/vmstat.jpg) -vmstat(virtual memory statistics)是一个小的内置工具,能监控和显示机器的内存。 +vmstat(virtual memory statistics)是一个小型内置工具,能监控和显示机器的内存。 #### 45. uptime #### @@ -273,13 +273,13 @@ vmstat(virtual memory statistics)是一个小的内置工具,能监控和 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mpstat.jpg) -mpstat 是一个内置的工具,能监视 cpu 的使用情况。最常见的使用方法是 `mpstat -P ALL`,它给你提供 cpu 的使用情况。你也可以间隔更新 cpu 的使用情况。 +mpstat 是一个内置的工具,能监视 cpu 的使用情况。最常见的使用方法是 `mpstat -P ALL`,它给你提供 cpu 的使用情况。你也可以间歇性地更新 cpu 的使用情况。 #### 47. pmap #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/pmap.jpg) -pmap 是一个内置的工具,报告一个进程的内存映射。你可以使用这个命令来找出内存瓶颈的原因。 +pmap 是一个内置的工具,报告一个进程的内存映射。你可以使用这个命令来找出导致内存瓶颈的原因。 #### 48. ps #### @@ -291,13 +291,13 @@ pmap 是一个内置的工具,报告一个进程的内存映射。你可以使 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/sar.jpg) -sar 是 sysstat 包的一部分,可以帮助你收集,报告和保存不同系统的指标。使用不同的参数,它会给你提供 CPU, 内存 和 I/O 使用情况及其他东西。 +sar 是 sysstat 包的一部分,可以帮助你收集、报告和保存不同系统的指标。使用不同的参数,它会给你提供 CPU、 内存和 I/O 使用情况及其他东西。 #### 50. [collectl][40] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/collectl.jpg) -类似于 sar,collectl 收集你机器的性能指标。默认情况下,显示 cpu,网络和磁盘统计数据,但它实际收集了很多信息。与 sar 不同的是,collectl 能够处理比秒更小的单位,它可以被直接送入绘图工具并且 collectl 的监控过程更广泛。 +类似于 sar,collectl 收集你机器的性能指标。默认情况下,显示 cpu、网络和磁盘统计数据,但它实际收集了很多信息。与 sar 不同的是,collectl 能够处理比秒更小的单位,它可以被直接送入绘图工具并且 collectl 的监控过程更广泛。 #### 51. [iostat][41] #### @@ -309,23 +309,23 @@ iostat 也是 sysstat 包的一部分。此命令用于监控系统的输入/输 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/free.jpg) -这是一个内置的命令用于显示你机器上可用的内存大小以及已使用的内存大小。它还可以显示某时刻内核所使用的缓冲区大小。 +这是一个内置的命令,用于显示你机器上可用的内存大小以及已使用的内存大小。它还可以显示某时刻内核所使用的缓冲区大小。 -#### 53. /Proc 文件系统 #### +#### 53. /proc 文件系统 #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/procfile.jpg) -proc 文件系统可以让你查看内核的统计信息。从这些统计数据可以得到你机器上不同硬件设备的详细信息。看看这个 [ proc文件统计的完整列表 ][42]。 +proc 文件系统可以让你查看内核的统计信息。从这些统计数据可以得到你机器上不同硬件设备的详细信息。看看这个 [proc 文件统计的完整列表][42]。 #### 54. [GKrellM][43] #### -GKrellm 是一个图形应用程序来监控你硬件的状态信息,像CPU,内存,硬盘,网络接口以及其他的。它也可以监视并启动你所选择的邮件阅读器。 +GKrellm 是一个图形应用程序,用来监控你硬件的状态信息,像CPU,内存,硬盘,网络接口以及其他的。它也可以监视并启动你所选择的邮件阅读器。 #### 55. [Gnome 系统监控器][44] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/gnome-system-monitor.jpg) -Gnome 系统监控器是一个基本的系统监控工具,其能通过一个树状结构来查看进程的依赖关系,能杀死及调整进程优先级,还能以图表形式显示所有服务器的指标。 +Gnome 系统监控器是一个基本的系统监控工具,其能通过一个树状结构来查看进程的依赖关系,能杀死进程及调整进程优先级,还能以图表形式显示所有服务器的指标。 ### 日志监控工具 ### @@ -333,11 +333,11 @@ Gnome 系统监控器是一个基本的系统监控工具,其能通过一个 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/goaccess.jpg) -GoAccess 是一个实时的网络日志分析器,它能分析 apache, nginx 和 amazon cloudfront 的访问日志。它也可以将数据输出成 HTML,JSON 或 CSV 格式。它会给你一个基本的统计信息,访问量,404页面,访客位置和其他东西。 +GoAccess 是一个实时的网络日志分析器,它能分析 apache, nginx 和 amazon cloudfront 的访问日志。它也可以将数据输出成 HTML,JSON 或 CSV 格式。它会给你一个基本的统计信息、访问量、404 页面,访客位置和其他东西。 #### 57. [Logwatch][46] #### -Logwatch 是一个日志分析系统。它通过分析系统的日志,并为你所指定的区域创建一个分析报告。它每天给你一个报告可以让你花费更少的时间来分析日志。 +Logwatch 是一个日志分析系统。它通过分析系统的日志,并为你所指定的部分创建一个分析报告。它每天给你一个报告,以便让你花费更少的时间来分析日志。 #### 58. [Swatch][47] #### @@ -349,13 +349,13 @@ Logwatch 是一个日志分析系统。它通过分析系统的日志,并为 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/multitail.jpg) -MultiTail 可帮助你在多窗口下监控日志文件。你可以将这些日志文件合并成一个。它也像正则表达式一样使用不同的颜色来显示日志文件以方便你阅读。 +MultiTail 可帮助你在多个窗口之下监控日志文件。你可以将这些日志文件合并到一个窗口。它可以通过正则表达式的帮助,使用不同的颜色来显示日志文件以方便你阅读。 -#### 系统工具 #### +### 系统工具 ### #### 60. [acct or psacct][49] #### -acct 也称 psacct(取决于如果你使用 apt-get 还是 yum)可以监控所有用户执行的命令,包括 CPU 和内存在系统内所使用的时间。一旦安装完成后你可以使用命令 ‘sa’ 来查看。 +acct 也称 psacct(取决于如果你使用 apt-get 还是 yum)可以监控所有用户执行的命令,包括 CPU 时间和内存占用。一旦安装完成后你可以使用命令 `sa` 来查看统计。 #### 61. [whowatch][50] #### @@ -365,31 +365,31 @@ acct 也称 psacct(取决于如果你使用 apt-get 还是 yum)可以监控 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/strace.jpg) -strace 被用于诊断,调试和监控程序之间的相互调用过程。最常见的做法是用 strace 打印系统调用的程序列表,其可以看出程序是否像预期那样被执行了。 +strace 被用于诊断、调试和监控程序之间的相互调用过程。最常见的做法是用 strace 打印系统调用的程序列表,其可以看出程序是否像预期那样被执行了。 #### 63. [DTrace][52] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/dtrace.jpg) -DTrace 可以说是 strace 的大哥。它动态地跟踪与检测代码实时运行的指令。它允许你深入分析其性能和诊断故障。但是,它并不简单,大约有1200本书中提到过它。 +DTrace 可以说是 strace 的大哥。它动态地跟踪与检测代码实时运行的指令。它允许你深入分析其性能和诊断故障。但是,它并不简单,关于这个话题有1200本书之多。 #### 64. [webmin][53] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/webmin.jpg) -Webmin 是一个基于 Web 的系统管理工具。它不需要手动编辑 UNIX 配置文件,并允许你远程管理系统。它有一对监控模块用于连接它。 +Webmin 是一个基于 Web 的系统管理工具。它不需要手动编辑 UNIX 配置文件,可以让你远程管理系统。它有一对监控模块用于连接它。 #### 65. stat #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/stat.jpg) -Stat 是一个内置的工具,用于显示文件和文件系统的状态信息。它会显示文件被修改,访问或更改的信息。 +Stat 是一个内置的工具,用于显示文件和文件系统的状态信息。它会显示文件何时被修改、访问或更改。 #### 66. ifconfig #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ifconfig.jpg) -ifconfig 是一个内置的工具用于配置网络接口。大多数网络监控工具背后都使用 ifconfig 将其设置成混乱模式来捕获所有的数据包。你可以手动执行 `ifconfig eth0 promisc` 并使用 `ifconfig eth0 -promisc` 返回正常模式。 +ifconfig 是一个内置的工具,用于配置网络接口。大多数网络监控工具背后都使用 ifconfig 将网卡设置成混乱模式来捕获所有的数据包。你可以手动执行 `ifconfig eth0 promisc` 进入混乱模式,使用 `ifconfig eth0 -promisc` 返回正常模式。 #### 67. [ulimit][54] #### @@ -399,23 +399,23 @@ ulimit 是一个内置的工具,可监控系统资源,并可以限制任何 #### 68. [cpulimit][55] #### -CPULimit 是一个小工具用于监控并限制进程对 CPU 的使用率。其特别有用,能限制批处理作业对 CPU 的使用率保持在一定范围。 +CPULimit 是一个小工具,用于监控并限制进程对 CPU 的使用率。其特别可以用于将批处理作业对 CPU 的使用率保持在一定范围。 #### 69. lshw #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/lshw.jpg) -lshw 是一个小的内置工具能提取关于本机硬件配置的详细信息。它可以输出 CPU 版本和主板配置。 +lshw 是一个小的内置工具,能提取关于本机硬件配置的详细信息。它可以输出 CPU 版本和主板配置。 #### 70. w #### -w 是一个内置命令用于显示当前登录用户的信息及他们所运行的进程。 +w 是一个内置命令,用于显示当前登录用户的信息及他们所运行的进程。 #### 71. lsof #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/lsof.jpg) -lsof 是一个内置的工具可让你列出所有打开的文件和网络连接。从那里你可以看到文件是由哪个进程打开的,基于进程名,可通过一个特定的用户来杀死属于某个用户的所有进程。 +lsof 是一个内置的工具,可让你列出所有打开的文件和网络连接。从那里你可以看到文件是由哪个进程打开的,基于进程名可找到其特定的用户,或杀死属于某个用户的所有进程。 ### 基础架构监控工具 ### @@ -423,13 +423,13 @@ lsof 是一个内置的工具可让你列出所有打开的文件和网络连接 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/server-density-monitoring.png) -我们的 [服务器监控工具][56]!它有一个 web 界面,使你可以进行报警设置并可以通过图表来查看所有系统的网络指标。你还可以设置监控的网站,无论是否在线。Server Density 允许你设置用户的权限,你可以根据我们的插件或 api 来扩展你的监控。该服务已经支持 Nagios 的插件了。 +我们的 [服务器监控工具][56] 它有一个 web 界面,使你可以进行报警设置并可以通过图表来查看所有系统的网络指标。你还可以设置监控的网站,无论是否在线。Server Density 允许你设置用户的权限,你可以根据我们的插件或 api 来扩展你的监控。该服务已经支持 Nagios 的插件了。 #### 73. [OpenNMS][57] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/opennms.jpg) -OpenNMS 主要有四个功能区:事件管理和通知;发现和配置;服务监控和数据收集。其设计可被在多种网络环境中定制。 +OpenNMS 主要有四个功能区:事件管理和通知;发现和配置;服务监控和数据收集。其设计为可被在多种网络环境中定制。 #### 74. [SysUsage][58] #### @@ -441,19 +441,19 @@ SysUsage 通过 Sar 和其他系统命令持续监控你的系统。一旦达到 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/brainypdm.jpg) -brainypdm 是一个数据管理和监控工具,它能收集来自 nagios 或其它公共资源的数据并以图表显示。它是跨平台的,其基于 Web 并可自定义图形。 +brainypdm 是一个数据管理和监控工具,它能收集来自 nagios 或其它常规来源的数据并以图表显示。它是跨平台的,其基于 Web 并可自定义图形。 #### 76. [PCP][60] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/pcp.jpg) -PCP 可以收集来自多个主机的指标,并且效率很高。它也有一个插件框架,所以你可以把它收集的对你很重要的指标使用插件来管理。你可以通过任何一个 Web 界面或 GUI 访问图形数据。它比较适合大型监控系统。 +PCP 可以收集来自多个主机的指标,并且效率很高。它也有一个插件框架,所以你可以让它收集对你很重要的指标。你可以通过任何一个 Web 界面或 GUI 访问图形数据。它比较适合大型监控系统。 -#### 77. [KDE 系统保护][61] #### +#### 77. [KDE 系统守护][61] #### ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/kdesystemguard.jpg) -这个工具既是一个系统监控器也是一个任务管理器。你可以通过工作表来查看多台机器的服务指标,如果一个进程需要被杀死或者你需要启动一个进程,它可以在 KDE 系统保护中来完成。 +这个工具既是一个系统监控器也是一个任务管理器。你可以通过工作表来查看多台机器的服务指标,如果需要杀死一个进程或者你需要启动一个进程,它可以在 KDE 系统守护中来完成。 #### 78. [Munin][62] #### @@ -471,7 +471,7 @@ Nagios 是系统和网络监控工具,可帮助你监控多台服务器。当 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/zenoss.jpg) -Zenoss 提供了一个 Web 界面,使你可以监控所有的系统和网络指标。此外,它能自动发现网络资源和修改网络配置。并且会提醒你采取行动,它也支持 Nagios 的插件。 +Zenoss 提供了一个 Web 界面,使你可以监控所有的系统及网络指标。此外,它能自动发现网络资源和修改网络配置。并且会提醒你采取行动,它也支持 Nagios 的插件。 #### 81. [Cacti][65] #### @@ -483,7 +483,7 @@ Zenoss 提供了一个 Web 界面,使你可以监控所有的系统和网络 ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/zabbix-monitoring.png) -Zabbix 是一个开源的基础设施监控解决方案。它使用了许多数据库来存放监控统计信息。其核心是用 C 语言编写,并在前端中使用 PHP。如果你不喜欢安装代理,Zabbix 可能是一个最好选择。 +Zabbix 是一个开源的基础设施监控解决方案。它使用了许多数据库来存放监控统计信息。其核心是用 C 语言编写,并在前端中使用 PHP。如果你不喜欢安装代理端,Zabbix 可能是一个最好选择。 ### 附加部分: ### @@ -491,15 +491,15 @@ Zabbix 是一个开源的基础设施监控解决方案。它使用了许多数 #### 83. [collectd][67] #### -Collectd 是一个 Unix 守护进程来收集所有的监控数据。它采用了模块化设计并使用插件来填补一些缺陷。这样能使 collectd 保持轻量级并可进行定制。 +Collectd 是一个 Unix 守护进程,用来收集所有的监控数据。它采用了模块化设计并使用插件来填补一些缺陷。这样能使 collectd 保持轻量级并可进行定制。 #### 84. [Observium][68] #### -Observium 是一个自动发现网络的监控平台,支持普通的硬件平台和操作系统。Observium 专注于提供一个优美,功能强大,简单直观的界面来显示网络的健康和状态。 +Observium 是一个自动发现网络的监控平台,支持大量硬件平台和操作系统。Observium 专注于提供一个优美、功能强大、简单直观的界面来显示网络的健康和状态。 #### 85. Nload #### -这是一个命令行工具来监控网络的吞吐量。它很整洁,因为它使用两个图表和其他一些有用的数据类似传输的数据总量来对进出站流量进行可视化。你可以使用如下方法安装它: +这是一个命令行工具来监控网络的吞吐量。它很整洁,因为它使用两个图表和其他一些类似传输的数据总量这样的有用数据来对进出站流量进行可视化。你可以使用如下方法安装它: yum install nload @@ -509,15 +509,15 @@ Observium 是一个自动发现网络的监控平台,支持普通的硬件平 #### 86. [SmokePing][69] #### -SmokePing 可以跟踪你网络延迟,并对他们进行可视化。SmokePing 有一个流行的延迟测量插件。如果图形用户界面对你来说非常重要,现在有一个正在开发中的插件来实现此功能。 +SmokePing 可以跟踪你网络延迟,并对他们进行可视化。有各种为 SmokePing 开发的延迟测量插件。如果图形用户界面对你来说非常重要,现在有一个正在开发中的插件来实现此功能。 #### 87. [MobaXterm][70] #### -如果你整天在 windows 环境下工作。你可能会觉得 Windows 下受终端窗口的限制。MobaXterm 正是由此而来的,它允许你使用多个在 Linux 中相似的终端。这将会极大地帮助你在监控方面的需求! +如果你整天在 windows 环境下工作。你可能会觉得 Windows 下终端窗口的限制。MobaXterm 正是由此而来的,它允许你使用多个通常出现在 Linux 中的命令。这将会极大地帮助你在监控方面的需求! #### 88. [Shinken monitoring][71] #### -Shinken 是一个监控框架,其是由 python 对 Nagios 进行完全重写的。它的目的是增强灵活性和管理更大环境。但仍保持所有的 nagios 配置和插件。 +Shinken 是一个监控框架,其是采用 python 对 Nagios 进行了完全重写。它的目的是增强灵活性和管理更大环境。但仍保持所有的 nagios 配置和插件。 -------------------------------------------------------------------------------- @@ -525,7 +525,7 @@ via: https://blog.serverdensity.com/80-linux-monitoring-tools-know/ 作者:[Jonathan Sundqvist][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 87408809307d007f635eb9c06ad734fbce103705 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 8 Feb 2016 12:13:05 +0800 Subject: [PATCH 0927/1710] =?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 --- ...lla with Apache and SSL on FreeBSD 10.2.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index f709ba5582..784c7d03aa 100644 --- a/translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -1,8 +1,8 @@ -如何在FreeBSD 10.2上配置Apache和SSL并安装Bugzilla +在FreeBSD 10.2上如何通过配置Apache和SSL安装Bugzilla ================================================================================ -Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由mozilla计划开发并由Mozilla公共许可证授权。它经常被一些高科技公司如mozilla、红帽公司和gnome使用。Bugzilla起初由Terry Weissman在1998年创立,它用perl语言编写,用MySQL作为后端数据库。它是一款旨在帮助管理软件开发的服务器软件,它功能丰富、高优化度的数据库、卓越的安全性、高级的搜索工具、整合邮件功能等等。 +Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由mozilla计划开发并由Mozilla公共许可证授权。它经常被一些高科技公司如mozilla、红帽公司和gnome使用。Bugzilla起初由Terry Weissman在1998年创立,它用perl语言编写,用MySQL作为后端数据库。它是一款旨在帮助管理软件开发的服务器软件,它有丰富的功能、高优化度的数据库、卓越的安全性、高级的搜索工具、整合的邮件功能等等。 -在本教程中,我们将给web服务器安装bugzilla 5.0的apache并为它启用SSL,然后在freebsd 10.2上安装mysql 5.1来作为数据库系统。 +在本教程中,我们将给web服务器安装 bugzilla 5.0 的apache,并为它启用SSL,然后安装 mysql 5.1 来作为 freebsd 10.2 的数据库系统。 #### 准备 #### @@ -19,7 +19,7 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz ### 第二步 - 安装并配置Apache ### -在这一步我们将从freebsd库中用pkg命令安装apache,然后在apache24目录下编辑"httpd.conf"文件,启用SSL和CGI支持。 +在这一步我们将使用pkg命令从freebsd库中安装apache,然后在apache24目录下编辑"httpd.conf"文件,启用SSL和CGI支持来配置apache。 用pkg命令安装apache: @@ -70,7 +70,7 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz 保存并退出。 -在启用apache之前,用sysrc命令添加以下行来在引导的时候启动: +在启用apache之前,用sysrc命令添加以下行作为开机启动项: sysrc apache24_enable=yes service apache24 start @@ -81,7 +81,7 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz pkg install p5-DBD-mysql51 mysql51-server mysql51-client -现在我们要在启动时添加mysql服务并启动,然后为mysql配置root密码。 +现在我们要添加mysql服务到开机启动,然后为mysql配置root密码。 运行以下命令来完成所有操作: @@ -209,19 +209,19 @@ bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分 ./checksetup.pl -你会看到一条关于数据库配置错误,你得用nano编辑器编辑一下"localconfig"文件: +你会看到一条关于数据库配置错误的消息,你得用nano编辑器编辑一下"localconfig"文件: nano -c localconfig 现在添加第三步创建的数据库。 - #第五十七行 + #第57行 $db_name = 'bugzilladb'; - #第六十行 + #第60行 $db_user = 'bugzillauser'; - #第六十七行 + #第67行 $db_pass = 'bugzillauser@'; 保存并退出。 @@ -230,7 +230,7 @@ bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分 ./checksetup.pl -你会收到输入邮箱名和管理员账号的提示,你只要输入你得邮箱、用户名和密码就行了。 +你会收到输入邮箱名和管理员账号的提示,你只要输入你的邮箱、用户名和密码就行了。 ![Admin Setup](http://blog.linoxide.com/wp-content/uploads/2015/12/Admin-Setup.png) @@ -252,7 +252,7 @@ Bugzilla admin面板: ### 结论 ### -Bugzilla是一个基于web并能帮助你管理软件开发的应用,它用perl开发并使用MySQL作为数据库系统。Bugzilla被mozilla,redhat,gnome等等公司用来帮助它们的软件开发工作。Bugzilla有很多功能并易于配置和安装。 +Bugzilla是一个基于web并能帮助你管理软件开发的应用,它用perl开发并使用MySQL作为数据库系统。Bugzilla帮助mozilla、redhat,gnome等公司完成软件开发工作。Bugzilla有很多功能并易于配置和安装。 -------------------------------------------------------------------------------- @@ -260,7 +260,7 @@ via: http://linoxide.com/tools/install-bugzilla-apache-ssl-freebsd-10-2/ 作者:[Arul][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ba22a3d4e504c0f7ecd7c9cb9ecc093c445ef3f1 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 8 Feb 2016 21:19:08 +0800 Subject: [PATCH 0928/1710] PUB:20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04 @oska874 --- ...3.9.1 with JSON Support on Ubuntu 15.04.md | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) rename {translated/tech => published}/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md (55%) diff --git a/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md b/published/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md similarity index 55% rename from translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md rename to published/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md index b79dc3657e..fcb65c6344 100644 --- a/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md +++ b/published/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md @@ -1,57 +1,58 @@ -如何在Ubuntu 15.04 上安装带JSON 支持的SQLite 3.9.1 +如何在 Ubuntu 15.04 上安装带 JSON 支持的 SQLite 3.9.1 ================================================================================ -欢迎阅读我们关于SQLite 的文章,SQLite 是当今时间上使用最广泛的SQL 数据库引擎,它他基本不需要配置,不需要安装或者管理就可以运行。SQLite 是一个是开放领域的软件,是关系数据库的管理系统,或者说RDBMS,用来在大表存储用户定义的记录。对于数据存储和管理来说,数据库引擎要处理复杂的查询命令,这些命令可能会从多个表获取数据然后生成报告的数据总结。 +欢迎阅读我们关于SQLite 的文章,SQLite 是当今世界上使用最广泛的 SQL 数据库引擎,它基本不需要配置,不需要设置或管理就可以运行。SQLite 是一个是开放领域(public-domain)的软件,是一个关系型数据库管理系统(RDBMS),用来在一个大数据表中存储用户定义的记录。对于数据存储和管理来说,数据库引擎要处理复杂的查询命令,这些命令可能会从多个表获取数据然后生成报告和数据总结。 -SQLite 是一个非常小、轻量级,不需要分离的服务进程或系统。他可以运行在UNIX,Linux,Mac OS-X,Android,iOS 和Windows 上,已经被大量的软件程序使用,如Opera, Ruby On Rails, Adobe System, Mozilla Firefox, Google Chrome 和 Skype。 +SQLite 是一个非常小、轻量级,不需要独立的服务进程或系统。它可以运行在 UNIX,Linux,Mac OS-X,Android,iOS 和 Windows 上,已经被大量的软件程序使用,如 Opera, Ruby On Rails, Adobe System, Mozilla Firefox, Google Chrome 和 Skype。 ### 1) 基本需求: ### -在几乎全部支持SQLite 的平台上安装SQLite 基本上没有复杂的要求。 +在绝大部分支持 SQLite 的平台上安装 SQLite 基本上并没有复杂的要求。 -所以让我们在CLI 或者Secure Shell 上使用sudo 或者root 权限登录Ubuntu 服务器。然后更新系统,这样子就可以让操作系统的软件更新到新版本。 +让我们在 CLI 或者 Secure Shell 上使用 sudo 或者 root 权限登录 Ubuntu 服务器。然后更新系统,这样子就可以让操作系统的软件更新到新版本。 -在Ubuntu 上,下面的命令是用来更新系统的软件源的。 +在 Ubuntu 上,使用如下的命令来更新系统的软件源。 # apt-get update -如果你要在新安装的Ubuntu 上部署SQLite,那么你需要安装一些基础的系统管理工具,如wget, make, unzip, gcc。 +如果你要在新安装的 Ubuntu 上部署 SQLite,那么你需要安装一些基础的系统管理工具,如 wget, make, unzip, gcc。 -要安装wget,可以使用下面的命令,然后输入Y 如果系统提示的话: +要安装 wget,可以使用下面的命令,如果系统提示的话,输入 Y : # apt-get install wget make gcc ### 2) 下载 SQLite ### -要下载SQLite 最好是在[SQLite 官网][1]下载,如下所示 +要下载 SQLite ,最好是在 [SQLite 官网][1]下载,如下所示 ![SQLite download](http://blog.linoxide.com/wp-content/uploads/2015/10/Selection_014.png) -你也可以直接复制资源的连接然后再命令行使用wget 下载,如下所示: +你也可以直接复制资源的连接然后在命令行使用 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 目录,使用下面的命令。 +下载完成之后,解压缩安装包,切换工作目录到解压缩后的 SQLite 目录,使用下面的命令。 # tar -zxvf sqlite-autoconf-3090100.tar.gz ### 3) 安装 SQLite ### -现在我们要开始安装、配置刚才下载的SQLite。所以在Ubuntu 上编译、安装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 +配置要上面的安装位置前缀(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 的安装得运行下面的命令。 +运行完上面的命令之后,要在 Ubuntu 上完成 SQLite 的安装得运行下面的命令。 # make install @@ -59,7 +60,7 @@ DEPDIR=.deps depmode=none /bin/bash ./depcomp \ ### 4) 测试 SQLite 安装 ### -要保证SQLite 3.9 安装成功了,运行下面的命令。 +要保证 SQLite 3.9 安装成功了,运行下面的命令。 # sqlite3 @@ -77,7 +78,7 @@ SQLite 很容易上手。要获得详细的使用方法,在SQLite 控制台里 ![SQLite Help](http://blog.linoxide.com/wp-content/uploads/2015/10/62.png) -现在开始最后一部分,使用一点SQLite 命令创建数据库。 +现在开始最后一部分,使用一点 SQLite 命令创建数据库。 要创建一个新的数据库需要运行下面的命令。 @@ -103,17 +104,18 @@ SQLite 很容易上手。要获得详细的使用方法,在SQLite 控制台里 sqlite> .exit ![Using SQLite3](http://blog.linoxide.com/wp-content/uploads/2015/10/73.png) + ### 结论 ### -通过本文你可以了解如果安装支持JSON1 的最新版的SQLite,SQLite 从3.9.0 开始支持JSON1。这是一个非常棒的库,可以用来获取内嵌到应用程序,利用它可以很有效而且很轻量的管理资源。我们希望你能觉得本文有所帮助,请自由的像我们反馈你遇到的问题和困难。 +通过本文你可以了解如果安装支持 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) +译者:[oska874](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5da8a2a2cf4138694e11c3604a854ebe8edc6a4d Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 12 Feb 2016 10:35:48 +0800 Subject: [PATCH 0929/1710] PUB:20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7 @chisper --- ...ve Adserver on Ubuntu 15.04 or CentOS 7.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md (88%) diff --git a/translated/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md b/published/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md similarity index 88% rename from translated/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md rename to published/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md index 25bea6cf72..c7f5a5d71f 100644 --- a/translated/tech/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md +++ b/published/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md @@ -1,10 +1,10 @@ -在Ubuntu 15.04 / CentOS 7上安装Revive Adserver +在 Ubuntu 15.04 / CentOS 7 上安装广告服务器 Revive Adserver ================================================================================ -Revive Adserver是一个免费且开源的广告管理系统,能使出版商,广告平台和广告商把广告投放在网页,应用,视频上并且管理的系统。Revive Adserver又名OpenX,遵循GNU通用公共授权协议。它集广告管理、网站定位、地理定位和跟踪系统于一体 -,用于数据收集。能使网站站长管理内部,付费以及第三方来源的广告,如谷歌的AdSense。本教程中,将会教会你在Ubuntu 15.04或CentOS 7安装并运行Revive Adserver。 +Revive Adserver是一个自由开源的广告管理系统,能使出版商,广告平台和广告商在网页、应用、视频上投放并管理广告的系统。Revive Adserver以前叫做OpenX Source,遵循GNU通用公共授权协议。它集广告管理、网站定位、地理定位和一个用于数据收集的跟踪系统于一体。能使网站站长管理内部的、付费的以及第三方来源的广告,如谷歌的AdSense。本教程中,将会教会你在Ubuntu 15.04或CentOS 7安装并运行Revive Adserver。 + ### 1. 安装LAMP### -首先,Revive Adserver需要完整的LAMP环境才能运行,所以我们先安装LAMP。LAMP是Apache网页服务器,MySQL/MariaDB数据库和PHP模块的集合。要使Revive正常运行,需要安装PHP的众多模块,如apc,zlib,xml,pcre,mysql和mbstring。在不同的Linux发行版中,我们可以用下列命令进行LAMP的配置: +首先,Revive Adserver需要完整的LAMP环境才能运行,所以我们先安装LAMP。LAMP是Apache网页服务器,MySQL/MariaDB数据库和PHP模块的集合。要使Revive正常运行,需要安装PHP的众多模块,如apc, zlib, xml, pcre, mysql和mbstring。在不同的Linux发行版中,我们可以用下列命令进行LAMP的配置: #### 在Ubuntu 15.04下#### @@ -78,7 +78,8 @@ CentOS 7同样是以Systemd作为默认初始系统,可以用下列命令启 ![Configuring MariaDB](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-mariadb.png) ### 4. 创建新的数据库 ### -为MariaDB的root用户设置了密码之后,就可以创建用来储存Revive Adserver应用数据的数据库。首先通过以下命令登陆MariaDB控制台: + +为MariaDB的root用户设置了密码之后,就可以创建用来储存Revive Adserver应用数据的数据库。首先通过以下命令登录MariaDB控制台: # mysql -u root -p @@ -142,6 +143,7 @@ CentOS 7同样是以Systemd作为默认初始系统,可以用下列命令启 ![Configuring Apache2 Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-apache2-ubuntu.png) + 保存并退出,重启Apache Web服务: # systemctl restart apache2 @@ -174,8 +176,8 @@ CentOS 7同样是以Systemd作为默认初始系统,可以用下列命令启 # systemctl restart httpd ### 7. 修复权限和所有权 - -现在我们修改安装路径下文件的权限和所有权。把安装目录的所有权改成Apache进程所有以便Apache Web服务有文件和目录的编辑,创建和删除的完全权限。 + +现在我们修改安装路径下文件的权限和所有权。把安装目录的所有权改成Apache进程所有,以便Apache Web服务有文件和目录的编辑、创建和删除的完全权限。 #### 在Ubuntu 15.04下#### @@ -202,7 +204,7 @@ Ubuntu15.04/CentOS 7都使用Systemd作为默认初始系统,使用firewalld success ### 9. 网站的安装 - + 顺利的话我们能够使用浏览器进行交互,并可以将浏览器指向正在运行的网络服务器。只要在浏览器输入http://ip-address/ 或者 http://domain.com 。这里我们要访问 http://reviveads.linoxide.com/ 打开后可以看到Revive Adserver的欢迎页面,上面还有作为它发行许可证的GNU通用公共许可证V2。点击 I agree 继续下一步安装。 @@ -216,11 +218,9 @@ Ubuntu15.04/CentOS 7都使用Systemd作为默认初始系统,使用firewalld 接着,转到Adverstiser页面,添加新的广告管理。在控制界面添加新用户到adserver,为广告库户添加标题,网页,视频 广告。 - ### 总结 ### -本文中,我们学习了如何在Ubuntu 15.04和CentOS 7上安装并配置Revive Adserver。尽管Revive Adserver的原始代码是从OpenX那买的,但现在它们已经完全分开了。可以从[http://www.adserverplugins.com/][2] 获得更多插件来扩展新特性。讲真,这个软件确实让网页,应用,视频上的广告管理变得容易了许多。 - +本文中,我们学习了如何在Ubuntu 15.04和CentOS 7上安装并配置Revive Adserver。尽管Revive Adserver的原始代码是从OpenX那买的,但现在OpenX Enterprise和Revive Adserver已经完全分开了。可以从[http://www.adserverplugins.com/][2] 获得更多插件来扩展新特性。讲真,这个软件确实让网页,应用,视频上的广告管理变得容易了许多。 -------------------------------------------------------------------------------- @@ -228,7 +228,7 @@ via: http://linoxide.com/linux-how-to/install-revive-adserver-ubuntu-15-04-cento 作者:[Arun Pyasi][a] 译者:[chisper](https://github.com/chisper) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 615e2fa7b90d13a2d845870ae2ce85569010d677 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 12 Feb 2016 11:35:35 +0800 Subject: [PATCH 0930/1710] PUB:20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison @name1e5s --- ...After More than 8 Years--See Comparison.md | 345 ++++++++++++++++++ ...After More than 8 Years--See Comparison.md | 344 ----------------- 2 files changed, 345 insertions(+), 344 deletions(-) create mode 100644 published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md delete mode 100644 translated/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md diff --git a/published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md b/published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md new file mode 100644 index 0000000000..21e8fcb748 --- /dev/null +++ b/published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md @@ -0,0 +1,345 @@ +一个八年的 Linux 老用户使用 Windows 10 的体验 +========================================================== + +Windows 10 是2015年7月29日上市的最新一代 Windows NT 系列系统,它是 Windows 8.1 的继任者。Windows 10 支持 Intel 32位平台,AMD64 以及 ARM v7 处理器。 + +![Windows 10 and Linux Comparison](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-vs-Linux.jpg) + +*对比:Windows 10与Linux* + +作为一个连续使用 linux 超过8年的用户,我想要去体验一下 Windows 10 ,因为有很多关于它的消息。这篇文章是我观察力的一个重大突破。我将从一个 linux 用户的角度去看待一切,所以这篇文章可能会有些偏向于 linux。尽管如此,本文也绝对不会有任何虚假信息。 + +1、用谷歌搜索“download Windows 10”并且点击第一个链接。 + +![Search Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Windows-10.jpg) + +*搜索 Windows 10* + +你也可以直接打开: [https://www.microsoft.com/en_us/software-download/Windows10[1] + +2、微软要求我从 Windows 10, Windows 10 KN, Windows 10 N 和 Windows 10 单语言版中选择一个版本。 + +![Select Windows 10 Edition](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Windows-10-Edition.jpg) + +*选择版本* + +以下是各个版本的简略信息: + +- Windows 10 - 包含微软提供给我们的所有软件 +- Windows 10N - 此版本不包含媒体播放器 +- Windows 10KN - 此版本没有媒体播放能力 +- Windows 10 单语言版 - 仅预装一种语言 + +3、我选择了第一个选项“Windows 10”并且单击“确认”。之后我要选择语言,我选择了“英语”。 + +微软给我提供了两个下载链接。一个是32位版,另一个是64位版。我单击了64位版--这与我的电脑架构相同。 + +![Download Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Download-Windows-10.jpg) + +*下载 Windows 10* + +我的带宽是15M的,下载了整整3个小时。不幸的是微软没有提供系统的种子文件,否则整个过程会更加舒畅。镜像大小为 3.8 GB(LCTT译者注:就我的10M小水管,我使用迅雷下载用时50分钟)。 + +我找不到更小的镜像,微软并没有为 Windows 提供网络安装镜像。我也没有办法在下载完成后去校验哈希值。(LCTT 译注:你知道的,这对于 Linux 来说都是常识了) + +我十分惊讶,Windows 在这样的问题上居然如此漫不经心。为了验证这个镜像是否正确下载,我需要把它刻到光盘上或者复制到我的U盘上然后启动它,一直静静的看着它安装直到安装完成。 + +首先,我用 dd 命令将 win10 的 iso 镜像刻录到U盘上。 + + # dd if=/home/avi/Downloads/Win10_English_x64.iso of=/dev/sdb1 bs=512M; sync + +这需要一点时间。在此之后我重启系统并在 UEFI(BIOS)设置中选择从我的U盘启动。 + +#### 系统要求 #### + +升级 + +- 仅支持从 Windows 7 SP1 或者 Windows 8.1 升级 + +全新安装 + +- 处理器: 1GHz 以上 +- 内存: 1GB以上(32位),2GB以上(64位) +- 硬盘: 16GB以上(32位),20GB以上(64位) +- 显卡: 支持DirectX 9或更新 + WDDM 1.0 驱动 + +###Windows 10 安装过程### + +1、Windows 10启动成功了。他们又换了logo,但是仍然没有信息提示我它正在做什么。 + +![Windows 10 Logo](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Logo.jpg) + +*Windows 10 Logo* + +2、选择安装语言,时区,键盘,输入法,点击下一步。 + +![Select Language and Time](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Language-and-Time.jpg) + +*选择语言和时区* + +3、点击“现在安装”。 + +![Install Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Windows-10.jpg) + +*安装Windows 10* + +4、下一步是输入密钥,我点击了“跳过”。 + +![Windows 10 Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Product-Key.jpg) + +*Windows 10 产品密钥* + +5、从列表中选择一个系统版本。我选择了 Windows 10专业版。 + +![Select Install Operating System](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Operating-System.jpg) + +*选择系统版本* + +6、到了协议部分,选中"我接受"然后点击下一步。 + +![Accept License](http://www.tecmint.com/wp-content/uploads/2015/08/Accept-License.jpg) + +*同意协议* + +7、下一步是选择(从 Windows 的老版本)升级到 Windows 10 或者安装 Windows。我搞不懂为什么微软要让我自己选择:“安装Windows”被微软建议为“高级”选项。但是我还是选择了“安装Windows”。 + +![Select Installation Type](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Installation-Type.jpg) + +*选择安装类型* + +8、选择驱动器,点击“下一步”。 + +![Select Install Drive](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Drive.jpg) + +*选择安装盘* + +9、安装程序开始复制文件,准备文件,安装更新,之后进行收尾。如果安装程序能在安装时输出一堆字符来表示它在做什么就更好了。 + +![Installing Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Installing-Windows.jpg) + +*安装 Windows* + +10、在此之后 Windows 重启了。它们说要继续的话,我们需要重启。 + +![Windows Installation Process](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Installation-Process.jpg) + +*安装进程* + +11、我看到了一个写着“正在准备 Windows”的界面。它停了整整五分多钟!仍然没有说明它正在做什么。没有输出。 + +![Windows Getting Ready](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Getting-Ready.jpg) + +*正在准备 Windows* + +12、又到了输入产品密钥的时间。我点击了“以后再说”,并使用快速设置。 + +![Enter Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Enter-Product-Key.jpg) + +*输入产品密钥* + +![Select Express Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Express-Settings.jpg) + +*使用快速设置* + +13、又出现了三个界面,作为 Linux 用户我认为此处应有信息来告诉我安装程序在做什么,但是我想多了。 + +![Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Loading-Windows.jpg) + +*载入 Windows* + +![Getting Updates](http://www.tecmint.com/wp-content/uploads/2015/08/Getting-Updates.jpg) + +*获取更新* + +![Still Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Still-Loading-Windows.jpg) + +*还是载入 Windows* + +14、安装程序想要知道谁拥有这台机器,“我的组织”或者我自己。选择我自己并继续。 + +![Select Organization](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Organization.jpg) + +*选择组织* + +15、在单击继续之前,安装程序提示我加入“Aruze Ad”或者“加入域”。我选择了后者。 + +![Connect Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Connect-Windows.jpg) + +*连接网络* + +16、安装程序让我新建一个账户。所以我输入了“user_name”就点击了下一步,我觉得我会收到一个要求我必须输入密码的信息。 + +![Create Account](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Account.jpg) + +*新建账户* + +17、让我惊讶的是 Windows 甚至都没有显示一个警告或提示信息,告诉我必须创建密码。真粗心。不管怎样,现在我可以体验系统了。 + +![Windows 10 Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Desktop.jpg) + +*Windows 10的桌面环境* + +#### Linux 用户(我)直到现在的体验 #### + +- 没有网络安装镜像 +- 镜像文件太臃肿了 +- 没有验证 iso 是否为正确的方法(官方没有提供哈希值) +- 启动与安装方式仍然与 XP,Win 7,Win 8 相同(可能吧...) +- 和以前一样,安装程序没有输出它正在干什么 - 正在复制什么和正在安装什么软件包 +- 安装程序比 Linux 发行版的更加傻瓜和简单 + +####测试 Windows 10#### + +18、默认桌面很干净,上面只有一个回收站图标。我们可以直接从桌面搜索网络。底部的快捷方式分别是任务预览、网络、微软应用商店。和以前的版本一样,消息栏在右下角。 + +![ ](http://www.tecmint.com/wp-content/uploads/2015/08/Deskop-Shortcut-icons.jpg) + +*桌面图标* + +19、IE 浏览器被换成了 Edge 浏览器。微软把他们的老IE换成了 Edge (斯巴达计划) + +![Microsoft Edge Browser](http://www.tecmint.com/wp-content/uploads/2015/08/Edge-browser.jpg) + +*Edge 浏览器* + +测试起来,这个浏览器至少比 IE 要快。他们有相同的用户界面。它的主页包含新闻更新。它还有一个搜索标题栏是“下一步怎么走”。由于浏览器的全面性能提升,它的加载速度非常快。Edge 的内存占用看起来正常。 + +![Windows Performance](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Performance.jpg) + +*性能* + +Edge 也有小娜加成(智能个人助理)、支持 Chrome 扩展、支持笔记(在浏览网页时记笔记)、分享(在选项卡上右击而不必打开其他选项卡) + +#### Linux 用户(我)此时体验 #### + +20、微软确实提升了网页浏览体验。我绝对稳定性和质量还好。现在它并不落后。 + +21、对我来说,Edge 的内存占用不算太大。但是有很多用户抱怨它的内存占用太多。 + +22、很难说目前 Edge 已经准备好了与火狐或 Chrome竞争。让我们静观其变。 + +#### 更多的视觉体验 #### + +23、重新设计的开始菜单 -- 看起来很简洁高效。Merto 磁贴大部分都会动。预先放置了最通用的应用。 + +![Windows Look and Feel](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Look.jpg) + +*Windows* + +而在 Linux 的 Gnome 桌面环境下。我仅仅需要按下 Win 键并输入应用名就可以搜索应用。 + +![Search Within Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Within-Desktop.jpg) + +*桌面内进行搜索* + +24、文件浏览器 -- 设计的很简洁。左边是进入文件夹的快捷方式。 + +![Windows File Explorer](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-File-Explorer.jpg) + +*Windows 文件管理器* + +我们的 Gnome 下的文件管理也同样的简洁高效。从图标上移走了不需要的图形图像是个加分点。 + +![File Browser on Gnome](http://www.tecmint.com/wp-content/uploads/2015/08/File-Browser.jpg) + +*Gnome 的文件管理* + +25、设置 -- 尽管 Windows 10的设置有点精炼,但是我们还是可以把它与 linux 的设置进行对比。 + +**Windows 的设置** + +![Windows 10 Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Settings.jpg) + +*Windows 10 设置* + +**Linux Gnome 上的设置** + +![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Settings.jpg) + +*Gnome 的设置* + +26、应用列表 -- 目前,Linux上的应用列表要好于之前的版本(据我所记,那时我还是一个普通的 Windows 用户),但是 Windows 10 的还比 Gnome 3 的差一点。 + +**Windows 的应用列表** + +![Application List on Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Application-List-on-Windows-10.jpg) + +*Windows 10 的应用列表* + +**Gnome3 的应用列表** + +![Gnome Application List on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Application-List-on-Linux.jpg) + +*Gnome3 的应用列表* + +27、虚拟桌面 -- Windows 10 上的虚拟桌面是近来被提及最多的特性之一。 + +这是 Windows 10 上的虚拟桌面。 + +![Windows Virtual Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Virtual-Desktop.jpg) + +*Windows 的虚拟桌面* + +这是我们 Linux 用户使用了超过20年的虚拟桌面。 + +![Virtual Desktop on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Virtual-Desktop-on-Linux.jpg) + +*Linux 的虚拟桌面* + +#### Windows 10 的其他新特性 #### + +28、Windows 10 自带 wifi 感知。它会把你的 wifi 密码分享给他人。任何在你 wifi 范围内并且曾经通过 Skype, Outlook, Hotmail 或 Facebook与你联系的人都能够获得你的网络接入权。这个特性的本意是让用户可以省时省力的连接网络。 + +在微软对于 Tecmint 的问题的回答中,他们说道 -- 用户需要在每次到一个新的网络环境时自己去同意打开 wifi 感知。如果我们考虑到网络安全这将是很不安全的一件事。微软的说法并没有说服我。 + +29、从 Windows 7 和 Windows 8.1 升级可以省下买新版的花费。(家庭版 $119 专业版$199) + +30、微软发布了第一个累积更新,这个更新在一小部分设备上会让系统一直重启。Windows可能不知道这个问题或者不知道它发生的原因。 + +31、微软内建的“禁用/隐藏我不想要的更新”的功能在我这不起作用。这意味着一旦更新开始推送,你没有方法去禁用/隐藏他们。对不住啦,Windows 用户。 + +#### Windows 10 包含的来源于 Linux 的功能 #### + +Windows 10 有很多直接取自 Linux 的功能。如果 Linux 不以 GPL 发布的话,也许以下这些功能永远不会出现在 Windows上。 + +32、命令行的包管理器 -- 是的,你没有听错!Windows 10内建了一个包管理器。它只在 Power Shell 下工作。OneGet 是Windows 的官方包管理器。 + +![Windows 10 Package Manager](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Package-Manager.jpg) + +*Windows 10的包管理器* + +- 无边窗口 +- 扁平化图标 +- 虚拟桌面 +- 离线/在线搜索一体化 +- 手机/桌面系统融合 + +### 总体印象### + +- 响应速度提升 +- 动画很好看 +- 资源占用少 +- 电池续航提升 +- Edge 浏览器很稳定 +- 支持树莓派 2 +- Windows 10 好的原因是 Windows 8/8.1 没有达到公众预期并且坏的可以 +- 旧瓶装新酒:Windows 10基本上就是以前的那一套换上新的图标 + +测试后我对 Windows 10 的评价是:Windows 10 在视觉和感觉上做了一些更新(就如同 Windows 经常做的那样)。我要为斯巴达计划、虚拟桌面、命令行包管理器、整合在线/离线搜索的搜索栏点赞。这确实是一个更新后的产品 ,但是认为 Windows 10 将是 Linux 的最后一个棺材钉的人错了。 + +Linux 走在 Windows 前面。它们的做事方法并不相同。在以后的一段时间里 Windows 不会站到 Linux这一旁。也没有什么让 Linux 用户值得去使用 Windows 10。 + +这就是我要说的。希望你喜欢本文。如果你们喜欢本篇文章我会再写一些你们喜欢读的有趣的文章。在下方留下你的有价值的评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/a-linux-user-using-Windows-10-after-more-than-8-years-see-comparison/ + +作者:[Avishek Kumar][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[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.microsoft.com/en-us/software-download/Windows10ISO diff --git a/translated/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md b/translated/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md deleted file mode 100644 index 6f821f777d..0000000000 --- a/translated/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md +++ /dev/null @@ -1,344 +0,0 @@ -对比Windows 10与Linux:Linux用户已经使用'Windows 10'超过8年 -============================================================================================================================================================== -Windows 10 是2015年7月29日上市的最新一代Windows NT系列系统,Windows 8.1 的继任者.Windows 10 支持Intel 32位平台,AMD64以及ARM v7处理器. - -![Windows 10 and Linux Comparison](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-vs-Linux.jpg) - -对比:Windows 10与Linux - -作为一个连续使用linux超过8年的用户,我想要去测试Windows 10 ,因为它最近制造了很多新闻.这篇文章是我观察力的一个重大突破.我将从一个linux用户的角度去看待一切,所以这篇文章可能会有些偏向于linux.尽管如此,本文也应该不会有任何错误信息. - -1. 用谷歌搜索"download Windows 10" 并且点击第一个链接. - -![Search Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Windows-10.jpg) - -搜索Windows 10 - -你也可以直接打开: [https://www.microsoft.com/en_us/software-download/Windows10[1] - -2. 微软要求我从Windows 10, Windows 10 KN, Windows 10 N 和Windows 10 单语言版中选择一个版本 - -![Select Windows 10 Edition](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Windows-10-Edition.jpg) - -选择版本 - -以下是各个版本的简略信息: - -- Windows 10 - 包含微软提供给我们的所有软件 -- Windows 10N - 此版本不包含媒体播放器 -- Windows 10KN - 此版本没有媒体播放能力 -- Windows 10单语言版 - 仅预装一种语言 - -3. 我选择了第一个选项 " Windows 10"并且单击"确认".之后我要选择语言,我选择了"英语" - -微软给我提供了两个下载链接.一个是32位版,另一个是64位版.我单击了64位版--这与我的电脑架构相同. - -![Download Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Download-Windows-10.jpg) - -下载Windows 10 - -我的带宽是15M的,下载了整整3个小时.不幸的是微软没有提供系统的种子文件,否则整个过程会更加舒畅.镜像大小为 3.8 GB(译者注:就我的10M小水管,我使用迅雷下载用时50分钟). - -我找不到更小的镜像,微软并没有为Windows提供网络安装镜像.我也没有办法在下载完成后去校验哈希值. - -我十分惊讶,Windows在这样的问题上居然如此漫不经心.为了验证这个镜像是否正确下载,我需要把它刻到光盘上或者复制到我的U盘上然后启动它,一直静静的看着它安装直到安装完成. - -首先,我用dd命令将win10的iso镜像刻录到U盘上 - - # dd if=/home/avi/Downloads/Win10_English_x64.iso of=/dev/sdb1 bs=512M; sync - -这需要一点时间.在此之后我重启系统并在UEFI(BIOS)设置中选择从我的U盘启动. - -#### 系统要求 #### - -升级 - -- 仅支持从Windows 7 SP1或者Windows 8.1升级 - -重新安装 - -- 处理器: 1GHz 以上 -- 内存: 1GB以上(32位),2GB以上(64位) -- 硬盘: 16GB以上(32位),20GB以上(64位) -- 显卡: 支持DirectX 9或更新 + WDDM 1.0 驱动 - -###Windows 10 安装过程### - -1. Windows 10启动成功了.他们又换了logo,但是仍然没有信息提示我它正在做什么. - -![Windows 10 Logo](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Logo.jpg) - -Windows 10 Logo - -2. 选择安装语言,时区,键盘,输入法,点击下一步 - -![Select Language and Time](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Language-and-Time.jpg) - -选择语言和时区 - -3. 点击'现在安装' - -![Install Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Windows-10.jpg) - -安装Windows 10 - -4. 下一步是输入密钥,我点击了跳过 - -![Windows 10 Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Product-Key.jpg) - -Windows 10 产品密钥 - -5. 从列表中选择一个系统版本.我选择了Windows 10专业版 - -![Select Install Operating System](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Operating-System.jpg) - -选择系统版本 - -6. 到了协议部分,选中"我接受"然后点击下一步 - -![Accept License](http://www.tecmint.com/wp-content/uploads/2015/08/Accept-License.jpg) - -同意协议 - -7. 下一步是选择(从Windows的老版本)升级到Windows 10或者安装Windows.我搞不懂为什么微软要让我自己选择:"安装Windows"被微软建议为"高级"选项.但是我还是选择了"安装Windows". - -![Select Installation Type](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Installation-Type.jpg) - -选择安装类型 - -8. 选择驱动器,点击"下一步" - -![Select Install Drive](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Drive.jpg) - -选择安装盘 - -9. 安装程序开始复制文件,准备文件,安装更新,之后进行收尾.(如果安装程序能在安装时输出一堆字符来表示他在做什么就更好了) - -![Installing Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Installing-Windows.jpg) - -安装 Windows - -10. 在此之后Windows重启了.他们说为了继续,我们需要重启 - -![Windows Installation Process](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Installation-Process.jpg) - -安装进程 - -11. 我看到了一个写着"正在准备Windows"的界面.它停了整整五分多钟,仍然没有说明它正在做什么.没有输出. - -![Windows Getting Ready](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Getting-Ready.jpg) - -正在准备Windows - -12. 又到了输入产品密钥的时间.我点击了"以后再说",并使用快速设置 - -![Enter Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Enter-Product-Key.jpg) - -输入产品密钥 - -![Select Express Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Express-Settings.jpg) - -使用快速设置 - - -13. 又出现了三个界面,作为Linux用户我认为此处应有信息来告诉我安装程序在做什么,但是我想多了 -![Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Loading-Windows.jpg) - -载入 Windows - -![Getting Updates](http://www.tecmint.com/wp-content/uploads/2015/08/Getting-Updates.jpg) - -获取更新 - -![Still Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Still-Loading-Windows.jpg) - -还是载入 Windows - -14. 安装程序想要知道谁拥有这台机器,"我的组织"或者我自己 - -![Select Organization](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Organization.jpg) - -选择组织 - -15. 安装程序提示我加入"Aruze Ad"或者"加入域".在单击继续之前,我选择了后者. - -![Connect Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Connect-Windows.jpg) - -连接网络 - -16. 安装程序让我新建一个账户.所以我输入了 "user_name"并点击下一步,我觉得我会收到一个要求我必须输入密码的信息. - -![Create Account](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Account.jpg) - -新建账户 - -17. 让我惊讶的是Windows甚至都没有警告/发现我必须创建密码.真粗心.不管怎样,现在我可以体验系统了. - -![Windows 10 Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Desktop.jpg) - -Windows 10的桌面环境 - -#### Linux用户(我)直到现在的体验 #### - -- 没有网络安装镜像 -- 镜像文件太臃肿了 -- 没有验证iso是否为正确的方法(官方没有提供哈希值) -- 启动与安装方式仍然与XP,Win 7,Win 8相同(可能吧...) -- 和以前一样,安装程序没有输出他正在干什么 - 正在复制什么和正在安装什么软件包 -- 安装程序比Linux发行版的更加直白和简单 - -####测试 Windows#### - -18. 默认桌面很干净,上面只有一个回收站图标.我们可以直接从桌面搜索网络.底部的快捷方式分别是任务预览,网络,微软应用商店.和以前的版本一样,消息栏在右下角. - -![ ](http://www.tecmint.com/wp-content/uploads/2015/08/Deskop-Shortcut-icons.jpg) - -桌面图标 - -19. IE浏览器被换成了Edge浏览器.微软把他们的老IE换成了Edge(斯巴达计划) - -![Microsoft Edge Browser](http://www.tecmint.com/wp-content/uploads/2015/08/Edge-browser.jpg) - -Edge浏览器 - -这个浏览器至少比IE要快.他们有相同的用户界面.它的主页包含新的更新.它还有一个标题是"下一步怎么走".由于它全面的性能提升,它的加载速度非常快.Edge的内存占用看起来一般般. - -![Windows Performance](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Performance.jpg) - -性能 - -Edge也有小娜加成 -- 智能个人助理.支持笔记(在浏览网页时记笔记),分享(在本TAB分享而不必打开其他TAB) - -#### Linux用户(我)此时体验 #### - -20. 微软确实提升了网页浏览体验.我们要看的就是他的稳定性和质量.现在它并不落后. - -21. 对我来说,Edge的内存占用不算太大.但是有很多用户抱怨他的内存占用. - -22. 很难说目前Edge已经准备好了与火狐或Chrome竞争.让我们静观其变. - -#### 更多的视觉体验 #### - -23. 重新设计的开始菜单 -- 看起来很简洁高效.Merto磁贴大部分都会动.预先放置了最通用的应用. - -![Windows Look and Feel](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Look.jpg) - -Windows - -在Linux的Gnome桌面环境下.我仅仅需要按下Win键并输入应用名就可以搜索应用. - -![Search Within Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Within-Desktop.jpg) - -桌面内进行搜索 - -24. 文件浏览器 -- 设计的很简洁.左边是进入文件夹的快捷方式. - -![Windows File Explorer](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-File-Explorer.jpg) - -Windows资源管理器 - -我们的Gnome下的文件管理也同样的简洁高效. - -![File Browser on Gnome](http://www.tecmint.com/wp-content/uploads/2015/08/File-Browser.jpg) - -Gnome 的文件管理 - -25. 设置 -- 尽管Windows 10的设置有点精炼,但是我们还是可以把它与linux的设置进行对比. - -**Windows 的设置** - -![Windows 10 Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Settings.jpg) - -Windows 10 设置 - -**Linux Gnome 上的设置** - -![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Settings.jpg) - -Gnome 的设置 - -26. 应用列表 -- 目前,Linux上的应用列表比之前的版本要好一些 - -**Windows 的应用列表** - -![Application List on Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Application-List-on-Windows-10.jpg) - -Windows 10 的应用列表 - -**Gnome3 的应用列表** - -![Gnome Application List on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Application-List-on-Linux.jpg) - -Gnome3 的应用列表 - -27. 虚拟桌面 -- Windows 10 上的虚拟桌面是近来被提及最多的特性之一 - -这是Windows 10 上的虚拟桌面. - -![Windows Virtual Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Virtual-Desktop.jpg) - -Windows的虚拟桌面 - -这是我们Linux用户使用了超过20年的虚拟桌面. - -![Virtual Desktop on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Virtual-Desktop-on-Linux.jpg) - -Linux的虚拟桌面 - -#### Windows 10 的其他新特性 #### - -28. Windows 10 自带wifi感知.它会把你的wifi密码分享给他人.任何在你wifi范围内并且曾经通过Skype, Outlook, Hotmail 或 Facebook与你联系的人都能够获得你的网络接入权.这个特性的本意是让用户可以省时省力的连接网络. - -在微软对于 Tecmint 的问题的回答中,他们说道 -- 用户需要在每次到一个新的网络环境时自己去同意打开wifi感知.如果我们考虑到网络安全这将是很不安全的一件事.微软的说法并没有说服我. - -29. 从Windows 7 和 Windows 8.1升级可以省下买新版的花费.(家庭版$119 专业版$199 ) - -30. 微软发布了第一个累积更新,这个更新在一小部分设备上会让系统一直重启.Windows可能不知道这个问题或者不知道它发生的原因. - -31. 微软内建的禁用/隐藏我不想要的更新的功能在我这不起作用.这意味着一旦更新开始推送,你没有方法去禁用/隐藏他们.对不住啦,Windows 用户. - -#### Windows 10 包含的来源于Linux的功能 #### - -Windows 10有很多直接取自Linux的功能.如果Linux不已GPL发布的话,以下下这些功能永远不会出现在Windows上. - -32. 包管理器 -- 是的,你没有听错!Windows 10内建了一个包管理器.它只在Power Shell下工作.OneGet是Windows的官方包管理器. - -![Windows 10 Package Manager](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Package-Manager.jpg) - - Windows 10的包管理器 - -- 无国界的Windows -- 扁平化图标 -- 虚拟桌面 -- 离线/在线搜索一体化 -- 手机/桌面系统一体化 - -### 总体印象### - -- 响应速度提升 -- 动画很好看 -- 资源占用少 -- 电池续航提升 -- Edge浏览器坚如磐石 -- 支持树莓派 2 -- Windows 10好的原因是Windows 8/8.1没有达到公众预期并且坏的可以 -- 旧瓶装新酒:Windows 10基本上就是以前的那一套换上新的图标 - -测试后我对Windows 10的评价是:Windows 10 在视觉和感觉上做了一些更新(就如同Windows经常做的那样).我要为斯巴达计划,虚拟桌面,命令行包管理器,整合在线/离线搜索的搜索栏点赞.这确实是一个更新后的产品 ,但是认为Windows 10将是Linux的最后一个棺材钉的人错了. - -Linux走在Windows前面.它们的做事方法并不相同.在以后的一段时间里Windows不会站到Linux这一旁.Linux用户也不必去使用Windows 10. - -这就是我要说的.希望你喜欢本文.如果你们喜欢本篇文章我会再写一些你们喜欢读的有趣的文章.在下方留下你的有价值的评论. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/a-linux-user-using-Windows-10-after-more-than-8-years-see-comparison/ - -作者:[vishek Kumar][a] -译者:[name1e5s](https://github.com/name1e5s) -校对:[校对者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 From d28b10a297ae9f8b6fc8ca292f70766b94e8fc43 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Fri, 12 Feb 2016 22:22:09 +0800 Subject: [PATCH 0931/1710] =?UTF-8?q?20160212-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...isk in Linux CentOS 7 Without Rebooting.md | 172 ++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md diff --git a/sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md b/sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md new file mode 100644 index 0000000000..b9e906a435 --- /dev/null +++ b/sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md @@ -0,0 +1,172 @@ +How to Add New Disk in Linux CentOS 7 Without Rebooting +================================================================================ + +Increasing disk spaces on the Linux servers is a daily routine work for very system administrator. So, in this article we are going to show you some simple simple steps that you can use to increase your disk spaces on Linux CentOS 7 without rebooting to your production server using Linux commands. We will cover multiple methods and possibilities to increase and add new disks to the Linux systems, so that you can follow the one that you feel comfortable while using according to your requirements. + +### 1. Increasing Disk of VM Guest: ### + +Before increasing the disk volume inside your Linux system, you need to add a new disk or increase the one its has already attached with the system by editing its settings from your VMware vShere, Workstation or any other infrastructure environment that you are using. + +![Increase disk](http://blog.linoxide.com/wp-content/uploads/2016/02/1.png) + +### 2. Check Disk Space: ### + +Run the following command to check the current size of your disk space. + + # df -h + # fdisk -l + +![Fdisk check](http://blog.linoxide.com/wp-content/uploads/2016/02/2.png) + +Here we can see that the total disk size is still the same that is 10 GB while we have already increased it to 50 GB from the back end. + +### 3. Expanding Space without Rebooting VM ### + +Now run the following commands to expand the disk space in the physical volume of the Operating System without rebooting the virtual machine by Re-scanning the SCSI Bus and then adding SCSI Device. + + # ls /sys/class/scsi_host/ + # echo "- - -" > /sys/class/scsi_host/host0/scan + # echo "- - -" > /sys/class/scsi_host/host1/scan + # echo "- - -" > /sys/class/scsi_host/host2/scan + +Check the names of your SCSI devices and then rescan the SCSI buses using below commands. + + # ls /sys/class/scsi_device/ + # echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan + +That will rescan the current scsi bus and the disk size that we increased from the VM guest settings will be show up as you can see in the below image. + +![Rescan disk device](http://blog.linoxide.com/wp-content/uploads/2016/02/3.png) + +### 4. New Disk Partition: ### + +Once you are able to see the increased disk space inside your system then the run the following command to format your disk for creating a new partition by following the steps to increase your physical disk volume. + + # fdisk /dev/sda + Welcome to fdisk (util-linux 2.23.2) press the 'm' key for help + Command (m for help): m + Command action + a toggle a bootable flag + b edit bsd disklabel + c toggle the dos compatibility flag + d delete a partition + g create a new empty GPT partition table + G create an IRIX (SGI) partition table + l list known partition types + m print this menu + n add a new partition + o create a new empty DOS partition table + p print the partition table + q quit without saving changes + s create a new empty Sun disklabel + t change a partition's system id + u change display/entry units + v verify the partition table + w write table to disk and exit + x extra functionality (experts only) + + Command (m for help): + +Type the 'p' to print the current partition table then create a new primary partition by typing the 'n' key and selecting the available sectors. Change the disk type to 'Linux LVM' by using 't' command and selecting the code to '8e' or leave as it to its default type that is '83'. + +Now write the table to disk and exit by Entring 'w' key as shown. + + Command (m for help): w + The partition table has been altered! + + Calling ioctl() to re-read partition table. + + WARNING: Re-reading the partition table failed with error 16: Device or resource busy. + The kernel still uses the old table. The new table will be used at + the next reboot or after you run partprobe(8) or kpartx(8) + +![New disk Volume](http://blog.linoxide.com/wp-content/uploads/2016/02/3A.png) + +### 5. Creating Physical Volume: ### + +As indicated above run the 'partprobe' or kpartx command so that the tables are ready to use and then create the new Physical Volume using the below commands. + + # partprobe + # pvresize /dev/sda3 + +To check the newly created volume run the following command to see if the new physical volume has been created and visible. After that we will extend the Volume Group 'centos' with the newly create Physical Volume as shown. + + # pvdisplay + # vgextend centos /dev/sda3 + +![Extend volume Group](http://blog.linoxide.com/wp-content/uploads/2016/02/3B.png) + +### 6. Extending Logical Volume: ### + +Now we will extend the Logical Volume to increase the disk space on it using the the below command. + + # lvextend -L +40G /dev/mapper/centos-root + +Once you get the successfully increased message, run the command as shown below to extend the size of your logical volume . + + # xfs_growfs /dev/mapper/centos-root + +The size of the '/' partition has been increased successfully, you can check the size of your disk drives by using the 'df' command as shown. + +![Increase disk space](http://blog.linoxide.com/wp-content/uploads/2016/02/3C.png) + +### 7. Extending Root Partition by Adding New Disk Without Reboot: ### + +This is the second method with but with quite similar commands to increase the size of the Logical volume in CentOS 7. + +So, the first step is to Open the setting of your VM guest settings and click on the 'Add' new button and proceed to the next option. + +![Add new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3D.png) + +Choose the required configuration for the new disk by selecting the size of the new disk and its type as shown in the below image. + +![New disk setup](http://blog.linoxide.com/wp-content/uploads/2016/02/3E.png) + +Then come to the server side and repeat the following commands to scan your disk devices to the new disk is visible on the system. + + # echo "- - -" > /sys/class/scsi_host/host0/scan + # echo "- - -" > /sys/class/scsi_host/host1/scan + # echo "- - -" > /sys/class/scsi_host/host2/scan + +List the names of your SCSi devices + + # ls /sys/class/scsi_device/ + # echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/3\:0\:0\:0/device/rescan + # fdisk -l + +![Scanning new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3F.png) + +Once the new disk is visible run the below commands to create the new physical volume and add it to the volume group as shown. + + # pvcreate /dev/sdb + # vgextend centos /dev/sdb + # vgdisplay + +![Extending Volume Group](http://blog.linoxide.com/wp-content/uploads/2016/02/3G.png) + +Now extend the Logical Volume by adding the disk space on it and then add it to the root partition. + + # lvextend -L +20G /dev/mapper/centos-root + # xfs_growfs /dev/mapper/centos-root + # df -h + +![Increase / Partition](http://blog.linoxide.com/wp-content/uploads/2016/02/3H.png) + +### Conclusion: ### + +Managing disk partitions in Linux CentOS 7 is a simple process to increase the disk space of any of your logical volumes by using the steps as described in this article. You don't need to give your production server's reboot for this purpose but simply rescan your SCSi devices and expand your desired LVM. We hope you find this article much helpful. Feel free to leave your valuable comments or suggestions. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/add-new-disk-centos-7-without-rebooting/ + +作者:[Kashif S][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 fab54d093ced2df32f11ca3d61e13831e7663e1c Mon Sep 17 00:00:00 2001 From: runningwater Date: Sat, 13 Feb 2016 13:24:22 +0800 Subject: [PATCH 0932/1710] =?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 --- ...How to Add New Disk in Linux CentOS 7 Without Rebooting.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md b/sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md index b9e906a435..006d4f9905 100644 --- a/sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md +++ b/sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) How to Add New Disk in Linux CentOS 7 Without Rebooting ================================================================================ @@ -164,7 +165,8 @@ Managing disk partitions in Linux CentOS 7 is a simple process to increase the d via: http://linoxide.com/linux-how-to/add-new-disk-centos-7-without-rebooting/ 作者:[Kashif S][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 a60212ce1570b2bb004b3781fc308743f6ffc2fc Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 13 Feb 2016 22:09:35 +0800 Subject: [PATCH 0933/1710] =?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 @tastynoodle @bazz2 @213edu @taichirain @iov-wang @zky001 @KnightJoker @DongShuaike @name1e5s @zpl1025 @strugglingyouth @ezio @cposture @fw8899 --- .../20150901 5 best open source board games to play online.md | 1 - sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md | 1 - .../talk/20151019 Gaming On Linux--All You Need To Know.md | 2 -- ...0151208 5 great Raspberry Pi projects for the classroom.md | 4 ---- ...tall OsTicket Ticketing System in Fedora 22 or Centos 7.md | 1 - .../tech/20150906 How to Configure OpenNMS on CentOS 7.x.md | 1 - .../tech/20151109 How to Configure Tripwire IDS on Debian.md | 1 - ...nd email notifications using Gmail SMTP server on Linux.md | 1 - sources/tech/20151123 Data Structures in the Linux Kernel.md | 2 -- ...1202 8 things to do after installing openSUSE Leap 42.1.md | 1 - sources/tech/20151202 A new Mindcraft moment.md | 1 - ...--Summon Swarms Of Penguins To Waddle About The Desktop.md | 1 - ...esktop Fun--Text Mode ASCII-art Box and Comment Drawing.md | 3 +-- ...ri-Pi--Using the Raspberry Pi as a Secure Landing Point.md | 4 ---- sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md | 1 - ...at is good stock portfolio management software on Linux.md | 1 - ...ic Shell Scripting and Linux Filesystem Troubleshooting.md | 1 - ...artup Process and Services SysVinit Systemd and Upstart.md | 2 -- 18 files changed, 1 insertion(+), 28 deletions(-) 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 eee49289e0..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 tastynoodle 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/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md index f6e40d4286..d370b87822 100644 --- a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md +++ b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -1,4 +1,3 @@ -bazz2222222222222222222222222222222222222222222 Review EXT4 vs. Btrfs vs. XFS ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) 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 525d08838b..332136112a 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,5 +1,3 @@ -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) diff --git a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md index 302034c330..cefad8cc6b 100644 --- a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md +++ b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md @@ -1,12 +1,8 @@ -taichirain 翻译中 - 5 great Raspberry Pi projects for the classroom -5 伟大的树莓派项目教室 ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png) Image by : opensource.com -图片来源 : opensource.com ### 1. Minecraft Pi ### 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 index 7a56750804..6624a3c590 100644 --- 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 @@ -1,4 +1,3 @@ -translated by iov-wang 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. 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 index aca2b04bba..f209c8e45c 100644 --- 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 @@ -1,4 +1,3 @@ -translated by ivo-wang 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. 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 11e7dbad60..b5068348e4 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,4 +1,3 @@ -正在翻译: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. 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 index 22e8606c6c..5ffcb5aea8 100644 --- 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 @@ -1,4 +1,3 @@ -Translating by KnightJoker 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. diff --git a/sources/tech/20151123 Data Structures in the Linux Kernel.md b/sources/tech/20151123 Data Structures in the Linux Kernel.md index d344eacd97..187b3ce9cd 100644 --- a/sources/tech/20151123 Data Structures in the Linux Kernel.md +++ b/sources/tech/20151123 Data Structures in the Linux Kernel.md @@ -1,5 +1,3 @@ -Translating by DongShuaike - Data Structures in the Linux Kernel ================================================================================ diff --git a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md index 183d39252f..b941c3d611 100644 --- a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md +++ b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md @@ -1,4 +1,3 @@ -#name1e5s Translating 8 things to do after installing openSUSE Leap 42.1 ================================================================================ ![Credit: Metropolitan Transportation/Flicrk](http://images.techhive.com/images/article/2015/11/things-to-do-100626947-primary.idge.jpg) diff --git a/sources/tech/20151202 A new Mindcraft moment.md b/sources/tech/20151202 A new Mindcraft moment.md index 92c645ea4b..79930e8202 100644 --- a/sources/tech/20151202 A new Mindcraft moment.md +++ b/sources/tech/20151202 A new Mindcraft moment.md @@ -1,4 +1,3 @@ -zpl1025 A new Mindcraft moment? ======================= diff --git a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md index b544517f5e..73d16fe1bd 100644 --- a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md +++ b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md @@ -1,4 +1,3 @@ -translation by strugglingyouth Linux Desktop Fun: Summon Swarms Of Penguins To Waddle About The Desktop ================================================================================ XPenguins is a program for animating cute cartoons animals in your root window. By default it will be penguins they drop in from the top of the screen, walk along the tops of your windows, up the side of your windows, levitate, skateboard, and do other similarly exciting things. Now you can send an army of cute little penguins to invade the screen of someone else on your network. diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md index 268c6c9477..fad7c6443b 100644 --- a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md +++ b/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md @@ -1,4 +1,3 @@ -翻译中 Linux / Unix Desktop Fun: Text Mode ASCII-art Box and Comment Drawing ================================================================================ Boxes command is a text filter and a little known tool that can draw any kind of ASCII art box around its input text or code for fun and profit. You can quickly create email signatures, or create regional comments in any programming language. This command was intended to be used with the vim text editor, but can be tied to any text editor which supports filters, as well as from the command line as a standalone tool. @@ -191,7 +190,7 @@ See also via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text-editor.html 作者:Vivek Gite -译者:[zky001](https://github.com/zky001) +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md b/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md index 7388b7693e..36c28d25d6 100644 --- a/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md +++ b/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md @@ -1,7 +1,3 @@ -translating by ezio - - - Securi-Pi: Using the Raspberry Pi as a Secure Landing Point ================================================================================ diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index 80031c7fd8..99f1ceed04 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -1,4 +1,3 @@ -[Translating by cposture 16-01-14] * * * # GCC-Inline-Assembly-HOWTO diff --git a/sources/tech/20160104 What is good stock portfolio management software on Linux.md b/sources/tech/20160104 What is good stock portfolio management software on Linux.md index b7c372ce71..258cf104fc 100644 --- a/sources/tech/20160104 What is good stock portfolio management software on Linux.md +++ b/sources/tech/20160104 What is good stock portfolio management software on Linux.md @@ -1,4 +1,3 @@ -translating by fw8899 What is good stock portfolio management software on Linux ================================================================================ If you are investing in the stock market, you probably understand the importance of a sound portfolio management plan. The goal of portfolio management is to come up with the best investment plan tailored for you, considering your risk tolerance, time horizon and financial goals. Given its importance, no wonder there are no shortage of commercial portfolio management apps and stock market monitoring software, each touting various sophisticated portfolio performance tracking and reporting capabilities. 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 841d5c0625..4d0a5a229a 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,4 +1,3 @@ -Being translated by hittlle...... 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 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 3a2dfa844a..2a822e8a45 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 Flowsnow - 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. From 1318b4f220f427102d05c4d5ada4bfc712404fb8 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Sun, 14 Feb 2016 15:45:59 +0800 Subject: [PATCH 0934/1710] =?UTF-8?q?20160214-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ll MariaDB 10 on CentOS 7 CPanel Server.md | 326 ++++++++++++++++++ 1 file changed, 326 insertions(+) create mode 100644 sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md diff --git a/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md b/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md new file mode 100644 index 0000000000..53160a0c31 --- /dev/null +++ b/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md @@ -0,0 +1,326 @@ +How to Install MariaDB 10 on CentOS 7 CPanel Server +================================================================================ + +MariaDB is a enhanced open source and drop-in replacement for MySQL. It is developed by MariaDB community and available under the terms of the GPL v2 license. Software Security is the main focus for the MariaDB developers. They maintain its own set of security patches for each MariaDB releases. When any critical security issues are discovered, the developers introduces a new release of MariaDB to get the fix out as soon as possible. + +MariaDB is always up-to-date with the latest MySQL releases. It is highly compatible and works exactly like the MySQL. Almost all commands, data, table definition files, Client APIs, protocols, interfaces, structures, filenames, binaries, ports, database storage locations etc are same as the MySQL. It isn't even needed to convert databases to switch to MariaDB. + +### Advantages of MariaDB ### + +- Truly Open source +- More quicker and transparent security releases +- Highly Compatible with MySQL +- Improved Performance +- More storage engines compared to MySQL + +In this article, I provides guidelines on how to upgrade MySQL 5.5 to the latest MariaDB on a CentOS 7 CPanel server. Let's walk through the Pre-installation steps. + +### Pre-requisites: ### + +#### 1. Stop current MySQL Service #### + + root@server1 [/var/# mysql + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 5859 + Server version: 5.5.47-cll MySQL Community Server (GPL) + + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. + + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + + root@server1 [~]# systemctl stop mysql + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: failed (Result: exit-code) since Sun 2016-01-31 10:00:02 UTC; 1min 31s ago + Docs: man:systemd-sysv-generator(8) + Main PID: 23430 (code=exited, status=203/EXEC) + + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Started MySQL Server. + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Starting MySQL Server... + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service: main process exited, code=exited, status=203/EXEC + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Unit mysql.service entered failed state. + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service failed. + +#### 2. Move all configuration files and databases prior to the upgrade #### + +Move the DB storage path and MySQL configuration files + + root@server1 [~]# cp -Rf /var/lib/mysql /var/lib/mysql-old + + root@server1 [/var/lib/mysql]# cat /etc/my.cnf + [mysqld] + default-storage-engine=MyISAM + innodb_file_per_table=1 + max_allowed_packet=268435456 + open_files_limit=10000 + + root@server1 [~]#mv /etc/my.cnf /etc/my.cnf-old + +#### 3. Remove and uninstall all MySQL rpms from the server #### + +Run the following commands to disable the MySQL RPM targets. By running this commands, cPanel will no longer handle MySQL updates, and mark these rpm.versions as uninstalled on the system. + + /scripts/update_local_rpm_versions --edit target_settings.MySQL50 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL51 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL55 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL56 uninstalled + +Now run the this command: + +/scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 to remove all existing MySQL rpms on the server and leave a clean environment for MariaDB installation. Please see its output below: + + root@server1 [/var/lib/mysql]# /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] Problems were detected with cPanel-provided files which are RPM controlled. + [2016-01-31 09:53:59 +0000] If you did not make these changes intentionally, you can correct them by running: + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] > /usr/local/cpanel/scripts/check_cpanel_rpms --fix + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] The following RPMs are unneeded on your system and should be uninstalled: + [2016-01-31 09:53:59 +0000] MySQL55-client-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-devel-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-server-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-shared-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-test-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] compat-MySQL50-shared-5.0.96-4.cp1136 + [2016-01-31 09:53:59 +0000] compat-MySQL51-shared-5.1.73-1.cp1150 + [2016-01-31 09:53:59 +0000] Removing 0 broken rpms: + [2016-01-31 09:53:59 +0000] rpm: no packages given for erase + [2016-01-31 09:53:59 +0000] No new RPMS needed for install + [2016-01-31 09:53:59 +0000] Disabling service monitoring. + [2016-01-31 09:54:01 +0000] Uninstalling unneeded rpms: MySQL55-test MySQL55-server MySQL55-client compat-MySQL51-shared compat-MySQL50-shared MySQL55-shared MySQL55-devel + [2016-01-31 09:54:04 +0000] Removed symlink /etc/systemd/system/multi-user.target.wants/mysql.service. + [2016-01-31 09:54:04 +0000] Restoring service monitoring. + +With these steps, we've uninstalled existing MySQL RPMs, marked targets to prevent further MySQL updates and made the server ready and clean for the MariaDB installation. + +To startup with the installation, we need to create a yum repository for MariaDB depending on the MariaDB & CentOS versions. This is how I did it! + +### Installation procedures: ### + +#### Step 1: Creating a YUM repository. #### + + root@server1 [~]# vim /etc/yum.repos.d/MariaDB.repo + [mariadb] + name = MariaDB + baseurl = http://yum.mariadb.org/10.0/centos7-amd64/ + gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + gpgcheck=1 + root@server1 [/etc/yum.repos.d]# cat /etc/yum.repos.d/MariaDB.repo + [mariadb] + name = MariaDB + baseurl = http://yum.mariadb.org/10.0/centos7-amd64/ + gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + gpgcheck=1 + +#### Step 2: Open the /etc/yum.conf and modify the exclude line as below: #### + +**Remove this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* + +**And replace with this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* nsd* proftpd* pure-ftpd* spamassassin* squirrelmail* + +**\*\*\* IMPORTANT \*\*\*** + +We need to make sure, we've removed the MySQL and PHP from the exclude list. + +#### Step 3: Run the following command to install MariaDB and related packages. #### + +**yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql** + + root@server1 [~]#yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + MariaDB-client x86_64 10.0.23-1.el7.centos mariadb 10 M + MariaDB-devel x86_64 10.0.23-1.el7.centos mariadb 6.3 M + MariaDB-server x86_64 10.0.23-1.el7.centos mariadb 55 M + php-mysql x86_64 5.4.16-36.el7_1 base 99 k + Installing for dependencies: + MariaDB-common x86_64 10.0.23-1.el7.centos mariadb 43 k + MariaDB-shared x86_64 10.0.23-1.el7.centos mariadb 1.2 M + libzip x86_64 0.10.1-8.el7 base 48 k + php-common x86_64 5.4.16-36.el7_1 base 563 k + php-pdo x86_64 5.4.16-36.el7_1 base 97 k + + Transaction Summary + =============================================================================================================================================== + Install 4 Packages (+5 Dependent package) + +#### Step 4: Restart and make sure the MySQL service is up. #### + + root@server1 [~]# systemctl start mysql + root@server1 [~]# + root@server1 [~]# + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: active (exited) since Sun 2016-01-31 10:01:46 UTC; 3s ago + Docs: man:systemd-sysv-generator(8) + Process: 23717 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS) + Main PID: 23430 (code=exited, status=203/EXEC) + + Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Starting LSB: start and stop MySQL... + Jan 31 10:01:46 server1.centos7-test.com mysql[23717]: Starting MySQL SUCCESS! + Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. + +#### Step 5: Run mysql_upgrade command #### + +It will examine all tables in all databases for incompatibilities with the current installed version and upgrades the system tables if necessary to take advantage of new privileges or capabilities that might have added with the current version. + + root@server1 [~]# mysql_upgrade + MySQL upgrade detected + Phase 1/6: Checking and upgrading mysql database + Processing databases + mysql + mysql.columns_priv OK + mysql.db OK + mysql.event OK + mysql.func OK + mysql.help_category OK + mysql.help_keyword OK + mysql.help_relation OK + mysql.help_topic OK + mysql.host OK + mysql.ndb_binlog_index OK + mysql.plugin OK + mysql.proc OK + mysql.procs_priv OK + mysql.proxies_priv OK + mysql.servers OK + mysql.tables_priv OK + mysql.time_zone OK + mysql.time_zone_leap_second OK + mysql.time_zone_name OK + mysql.time_zone_transition OK + mysql.time_zone_transition_type OK + mysql.user OK + Phase 2/6: Fixing views from mysql + Phase 3/6: Running 'mysql_fix_privilege_tables' + Phase 4/6: Fixing table and database names + Phase 5/6: Checking and upgrading tables + Processing databases + cphulkd + cphulkd.auths OK + cphulkd.blacklist OK + cphulkd.brutes OK + cphulkd.good_logins OK + cphulkd.ip_lists OK + cphulkd.known_netblocks OK + cphulkd.login_track OK + cphulkd.logins OK + cphulkd.report OK + cphulkd.whitelist OK + eximstats + eximstats.defers OK + eximstats.failures OK + eximstats.sends OK + eximstats.smtp OK + information_schema + leechprotect + leechprotect.hits OK + modsec + modsec.hits OK + performance_schema + roundcube + roundcube.cache OK + roundcube.cache_index OK + roundcube.cache_messages OK + roundcube.cache_shared OK + roundcube.cache_thread OK + roundcube.contactgroupmembers OK + roundcube.contactgroups OK + roundcube.contacts OK + roundcube.cp_schema_version OK + roundcube.dictionary OK + roundcube.identities OK + roundcube.searches OK + roundcube.session OK + roundcube.system OK + roundcube.users OK + saheetha_test + saheetha_test.authors OK + whmxfer + whmxfer.sessions OK + Phase 6/6: Running 'FLUSH PRIVILEGES' + OK + +#### Step 6 : Restart the MySQL service once again to ensure everything works perfect. #### + + root@server1 [~]# systemctl restart mysql + root@server1 [~]# + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: active (running) since Sun 2016-01-31 10:04:11 UTC; 9s ago + Docs: man:systemd-sysv-generator(8) + Process: 23831 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS) + Process: 23854 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS) + Main PID: 23430 (code=exited, status=203/EXEC) + CGroup: /system.slice/mysql.service + ├─23861 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server1.centos7-test.com.pid + └─23933 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/v... + + Jan 31 10:04:10 server1.centos7-test.com systemd[1]: Starting LSB: start and stop MySQL... + Jan 31 10:04:11 server1.centos7-test.com mysql[23854]: Starting MySQL. SUCCESS! + Jan 31 10:04:11 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. + +#### Step 7: Run EasyApache to rebuild Apache/PHP with MariaDB and ensure all PHP modules remains intact. #### + + root@server1 [~]#/scripts/easyapache --build + + ****IMPORTANT ***** + If you forget to rebuild Apache/PHP after the MariaDB installation, it will report the library error as below: + + root@server1 [/etc/my.cnf.d]# php -v + php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory + +#### Step 8: Now verify the installation and databases. #### + + root@server1 [/var/lib/mysql]# mysql + Welcome to the MariaDB monitor. Commands end with ; or \g. + Your MariaDB connection id is 15 + Server version: 10.0.23-MariaDB MariaDB Server + + Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. + + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + + MariaDB [(none)]> show storage engines; + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + | Engine | Support | Comment | Transactions | XA | Savepoints | + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + | CSV | YES | CSV storage engine | NO | NO | NO | + | MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | + | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | + | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | + | MyISAM | YES | MyISAM storage engine | NO | NO | NO | + | InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES | + | ARCHIVE | YES | Archive storage engine | NO | NO | NO | + | FEDERATED | YES | FederatedX pluggable storage engine | YES | NO | YES | + | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | + | Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO | + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + 10 rows in set (0.00 sec) + +That's all :). Now we're all set to go with MariaDB with its improved and efficient features. Hope you enjoyed reading this documentation. I would recommend your valuable suggestions and feedback on this! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-mariadb-10-centos-7-cpanel/ + +作者:[Saheetha Shameer][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/saheethas/ \ No newline at end of file From 3cf5e80b1fe1c90057255ae7e54166effb8d340c Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Sun, 14 Feb 2016 15:48:09 +0800 Subject: [PATCH 0935/1710] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=2020160212-1=20?= =?UTF-8?q?=E9=80=89=E9=A2=98=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...12 How to Add New Disk in Linux CentOS 7 Without Rebooting.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/{20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md => 20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md} (100%) diff --git a/sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md b/sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md similarity index 100% rename from sources/tech/20160104 How to Add New Disk in Linux CentOS 7 Without Rebooting.md rename to sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md From 658a0d21820840882519c9aab60f1e0b92765777 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 15 Feb 2016 09:57:04 +0800 Subject: [PATCH 0936/1710] translating --- .../tech/20151109 How to Configure Tripwire IDS on Debian.md | 4 ++++ 1 file changed, 4 insertions(+) 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 b5068348e4..d7bee4b745 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,5 @@ +Translating---geekpi + 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. @@ -377,3 +379,5 @@ via: http://linoxide.com/security/configure-tripwire-ids-debian/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/naveeda/ + + From 685413ea138e996eb55019661de498287ca3c97e Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 15 Feb 2016 11:03:02 +0800 Subject: [PATCH 0937/1710] translated --- ...How to Configure Tripwire IDS on Debian.md | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) rename {sources => translated}/tech/20151109 How to Configure Tripwire IDS on Debian.md (78%) diff --git a/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md b/translated/tech/20151109 How to Configure Tripwire IDS on Debian.md similarity index 78% rename from sources/tech/20151109 How to Configure Tripwire IDS on Debian.md rename to translated/tech/20151109 How to Configure Tripwire IDS on Debian.md index d7bee4b745..23bf8eef65 100644 --- a/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md +++ b/translated/tech/20151109 How to Configure Tripwire IDS on Debian.md @@ -1,50 +1,49 @@ -Translating---geekpi - -How to Configure Tripwire IDS on Debian +如何在Debian中配置Tripewire IDS ================================================================================ -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. +本文是一篇关于Debian中安装和配置Tripewire的文章。它是Linux环境下基于主机的入侵检测系统(IDS)。tripwire的高级功能有检测并报告任何Linux中未授权的更改(文件和目录)。tripewire安装之后,会先创建一个基本的数据库,tripewire监控并检测新文件的创建修改和谁修改了它等等。如果修改过是合法的,你可以接受修改并更新tripwire的数据库。 -### Installation and Configuration ### +### 安装和配置 ### -Tripwire installation on Debian VM is shown below. +tripwire在Debian VM中的安装如下。 # apt-get install tripwire ![installation](http://blog.linoxide.com/wp-content/uploads/2015/11/installation.png) -During installation, tripwire prompt for following configuration. +安装中,tripwire会有下面的配置提示。 -#### Site key Creation #### +#### 站点密钥创建 #### + +tripwire需要一个站点口令来加密tripwire的配置文件tw.cfg和策略文件tw.pol。tripewire使用指定的密码加密两个文件。一个tripewire实例必须指定站点口令。 -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. +本地口令用来保护tripwire数据库和报告文件。本地密钥用于阻止非授权的tripewire数据库修改。 ![local key1](http://blog.linoxide.com/wp-content/uploads/2015/11/local-key1.png) -#### Tripwire configuration path #### +#### Tripwire配置路径 #### -Tripwire configuration saved in the /etc/tripwire/twcfg.txt file. It is used to generate encrypted configuration file tw.cfg. +tripewire配置存储在/etc/tripwire/twcfg.txt。它用于生成加密的配置文件tw.cfg。 ![configuration file](http://blog.linoxide.com/wp-content/uploads/2015/11/configuration-file.png) -**Tripwire Policy path** +**Tripwire策略路径** -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在/etc/tripwire/twpol.txt中保存策略文件。它用于生成加密的策略文件tw.pol。 ![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配置文件 (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. +tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件(tw.pol),站点密钥(site.key)和本地密钥(hostname-local.key)如下所示。 ROOT =/usr/sbin @@ -80,9 +79,9 @@ Tripwire configuration file (twcfg.txt) details is given below. Paths of encrypt TEMPDIRECTORY =/tmp -#### Tripwire Policy Configuration #### +#### Tripwire策略配置 #### -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. +在生成基础数据库之前先配置tripwire配置。有必要经用一些策略如/dev、 /proc 、/root/mail等。详细的twpol.txt策略文件如下所示。 @@section GLOBAL TWBIN = /usr/sbin; @@ -238,13 +237,13 @@ Configure tripwire configuration before generation of baseline database. It is n #/proc -> $(Device) ; } -#### Tripwire Report #### +#### Tripwire 报告 #### -**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 –check** 命令检查twpol.txt文件并基于此文件生成tripwire报告如下。如果twpol.txt中有任何错误,tripwire不会生成报告。 ![tripwire report](http://blog.linoxide.com/wp-content/uploads/2015/11/tripwire-report.png) -**Report in text form** +**文本形式报告** root@VMdebian:/home/labadmin# tripwire --check @@ -364,16 +363,16 @@ Configure tripwire configuration before generation of baseline database. It is n 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. +本篇中,我们学习安装配置开源入侵检测软件tripwire。首先生成基础数据库并通过比较检测出任何改动(文件/文件夹)。然而,tripwire并不是实时监测的IDS。 -------------------------------------------------------------------------------- via: http://linoxide.com/security/configure-tripwire-ids-debian/ 作者:[nido][a] -译者:[译者zky001](https://github.com/zky001) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a77967d1b11d2b0241533aab62dac4b7bcd437d4 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 15 Feb 2016 20:59:49 +0800 Subject: [PATCH 0938/1710] PUB:20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2 @ZTinoZ --- ...lla with Apache and SSL on FreeBSD 10.2.md | 87 ++++++++++--------- 1 file changed, 44 insertions(+), 43 deletions(-) rename {translated/tech => published}/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md (54%) diff --git a/translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/published/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md similarity index 54% rename from translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md rename to published/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md index 784c7d03aa..a60b5d7589 100644 --- a/translated/tech/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md +++ b/published/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md @@ -1,36 +1,37 @@ -在FreeBSD 10.2上如何通过配置Apache和SSL安装Bugzilla +在 FreeBSD 10.2 上如何通过配置 Apache 和 SSL 安装 Bugzilla ================================================================================ -Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由mozilla计划开发并由Mozilla公共许可证授权。它经常被一些高科技公司如mozilla、红帽公司和gnome使用。Bugzilla起初由Terry Weissman在1998年创立,它用perl语言编写,用MySQL作为后端数据库。它是一款旨在帮助管理软件开发的服务器软件,它有丰富的功能、高优化度的数据库、卓越的安全性、高级的搜索工具、整合的邮件功能等等。 -在本教程中,我们将给web服务器安装 bugzilla 5.0 的apache,并为它启用SSL,然后安装 mysql 5.1 来作为 freebsd 10.2 的数据库系统。 +Bugzilla 是一款开源的 Web 应用,用于 bug 跟踪系统和测试工具,由 mozilla 开发,并采用 Mozilla 公共许可证授权(MPL)。它经常被一些高科技公司如 mozilla、红帽公司和 gnome 使用。Bugzilla 起初由 Terry Weissman开发于1998年,它用 perl 语言编写,用 MySQL 作为后端数据库。它是一款旨在帮助管理软件开发的服务器软件,它有丰富的功能、高度优化的数据库、卓越的安全性、高级的搜索工具、集成了邮件功能等等。 + +在本教程中,我们将安装 bugzilla 5.0 ,采用 apache 作为 Web 服务器,并为它启用 SSL,然后在 freebsd 10.2 上安装 mysql 5.1 来作为数据库系统。 #### 准备 #### - FreeBSD 10.2 - 64位 - Root权限 +- FreeBSD 10.2 - 64位 +- Root 权限 ### 第一步 - 更新系统 ### -用ssl登录freebsd服务器,并更新库: +用 ssh 登录 freebsd 服务器,并更新软件库: sudo su freebsd-update fetch freebsd-update install -### 第二步 - 安装并配置Apache ### +### 第二步 - 安装并配置 Apache ### -在这一步我们将使用pkg命令从freebsd库中安装apache,然后在apache24目录下编辑"httpd.conf"文件,启用SSL和CGI支持来配置apache。 +在这一步我们将使用 pkg 命令从 freebsd 软件库中安装 apache,然后在 apache24 目录下编辑 "httpd.conf" 文件,来配置 apache 以启用 SSL 和 CGI 支持。 -用pkg命令安装apache: +用 pkg 命令安装 apache: pkg install apache24 -进入apache目录并用nano编辑器编辑"httpd.conf"文件: +进入 apache 目录并用 nano 编辑器编辑"httpd.conf"文件: cd /usr/local/etc/apache24 nano -c httpd.conf -反注释掉下面列出的行: +取消下面列出行的注释: #第70行 LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so @@ -55,11 +56,11 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz 保存并退出。 -接着,我们需要从freebsd库中安装mod perl,并启用它: +接着,我们需要从 freebsd 库中安装 mod perl,并启用它: pkg install ap24-mod_perl2 -启用mod_perl,编辑"httpd.conf"文件并添加"Loadmodule"行: +启用 mod_perl,编辑"httpd.conf"文件并添加"Loadmodule"行: nano -c httpd.conf @@ -70,20 +71,20 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz 保存并退出。 -在启用apache之前,用sysrc命令添加以下行作为开机启动项: +在启用 apache 之前,用 sysrc 命令添加以下行作为开机启动项: sysrc apache24_enable=yes service apache24 start -### 第三步 - 安装并配置MySQL数据库 ### +### 第三步 - 安装并配置 MySQL 数据库 ### -我们要用mysql 5.1来作为后端数据库并且支持perl模块。用pkg命令安装mysql 5.1: +我们要用 mysql 5.1 来作为后端数据库并且支持 perl 模块。用 pkg 命令安装 mysql 5.1: pkg install p5-DBD-mysql51 mysql51-server mysql51-client -现在我们要添加mysql服务到开机启动,然后为mysql配置root密码。 +现在我们要将 mysql 服务设置为开机启动,然后为 mysql 配置 root 密码。 -运行以下命令来完成所有操作: +运行以下命令来完成上述所有操作: sysrc mysql_enable=yes service mysql-server start @@ -91,13 +92,13 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz 注意: -这里mysql密码为:aqwe123 +这里 mysql 密码为:aqwe123 ![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png) -以上步骤都完成之后,我们用root登录mysql shell,然后为bugzilla安装创建一个新的数据库和用户。 +以上步骤都完成之后,我们用 root 登录 mysql shell,然后为 bugzilla 安装创建一个新的数据库和用户。 -用以下命令登录mysql shell: +用以下命令登录 mysql shell: mysql -u root -p password: aqwe123 @@ -112,32 +113,32 @@ Bugzilla是一款bug跟踪系统和测试工具,它基于web且开源,由moz ![Creating Database for Bugzilla](http://blog.linoxide.com/wp-content/uploads/2015/12/Creating-Database-for-Bugzilla.png) -bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分别为"bugzillauser"和"bugzillauser@"。 +bugzilla 的数据库创建好了,名字为"bugzilladb",用户名和密码分别为"bugzillauser"和"bugzillauser@"。 -### 第四步 - 生成新的SSL证书 ### +### 第四步 - 生成新的 SSL 证书 ### -在bugzilla站点的"ssl"目录里生成新的自签名SSL证书。 +在 bugzilla 站点的 "ssl" 目录里生成新的自签名 SSL 证书。 -前往apache24目录并在此创建新目录"ssl": +前往 apache24 目录并在此创建新目录 "ssl": cd /usr/local/etc/apache24/ mkdir ssl; cd ssl -接着,用openssl命令生成证书文件,然后更改其权限: +接着,用 openssl 命令生成证书文件,然后更改其权限: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt chmod 600 * ### 第五步 - 配置虚拟主机 ### -我们将在"/usr/local/www/bugzilla"目录里安装bugzilla,所以我们必须为它创建新的虚拟主机配置。 +我们将在 "/usr/local/www/bugzilla" 目录里安装 bugzilla,所以我们必须为它创建新的虚拟主机配置。 -前往apache目录并为虚拟主机文件创建名为"vhost"的新目录: +前往 apache 目录并为虚拟主机文件创建名为 "vhost" 的新目录: cd /usr/local/etc/apache24/ mkdir vhost; cd vhost -现在为虚拟主机文件创建新文件"bugzilla.conf": +现在为虚拟主机文件创建新文件 "bugzilla.conf": nano -c bugzilla.conf @@ -173,9 +174,9 @@ bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分 保存并退出。 -上述都完成之后,为bugzilla安装创建新目录并通过添加虚拟主机配置至httpd.conf文件来启用bugzilla虚拟主机。 +上述都完成之后,为 bugzilla 安装创建新目录,并在 httpd.conf 文件添加虚拟主机配置来启用 bugzilla虚拟主机。 -在"apache24"目录下运行以下命令: +在 "apache24" 目录下运行以下命令: mkdir -p /usr/local/www/bugzilla cd /usr/local/etc/apache24/ @@ -187,29 +188,29 @@ bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分 保存并退出。 -现在用"apachectl"命令测试一下apache的配置并重启它: +现在用 "apachectl" 命令测试一下 apache 的配置并重启它: apachectl configtest service apache24 restart -### 第六步 - 安装Bugzilla ### +### 第六步 - 安装 Bugzilla ### -我们可以通过下载源来手动安装bugzilla了,或从freebsd库中安装也可以。在这一步中我们将用pkg命令从freebsd库中安装bugzilla: +我们可以通过下载源来手动安装 bugzilla 了,或从 freebsd 库中安装也可以。在这一步中我们将用 pkg 命令从 freebsd 库中安装 bugzilla: pkg install bugzilla50 -以上步骤都完成之后,前往bugzilla安装目录并安装所有bugzilla需要的perl模块。 +以上步骤都完成之后,前往 bugzilla 安装目录并安装所有 bugzilla 需要的 perl 模块。 cd /usr/local/www/bugzilla ./install-module --all 要等到所有都完成,这需要点时间。 -下一步,在bugzilla的安装目录中执行"checksetup.pl"文件来生成配置文件"localconfig"。 +下一步,在 bugzilla 的安装目录中执行 "checksetup.pl" 文件来生成配置文件 "localconfig"。 ./checksetup.pl -你会看到一条关于数据库配置错误的消息,你得用nano编辑器编辑一下"localconfig"文件: +你会看到一条关于数据库配置错误的消息,你得用 nano 编辑器编辑一下 "localconfig" 文件: nano -c localconfig @@ -226,7 +227,7 @@ bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分 保存并退出。 -然后再次运行"checksetup.pl": +然后再次运行 "checksetup.pl": ./checksetup.pl @@ -234,25 +235,25 @@ bugzilla的数据库创建好了,名字为"bugzilladb",用户名和密码分 ![Admin Setup](http://blog.linoxide.com/wp-content/uploads/2015/12/Admin-Setup.png) -最后,我们需要把安装目录的属主改成"www",然后用服务命令重启apache: +最后,我们需要把安装目录的属主改成 "www",然后用服务命令重启 apache: cd /usr/local/www/ chown -R www:www bugzilla service apache24 restart -现在Bugzilla已经安装好了,你可以通过访问mybugzilla.me来查看,并且将会重定向到https连接。 +现在 Bugzilla 已经安装好了,你可以通过访问 mybugzilla.me 来查看,并且将会重定向到 https 连接。 -Bugzilla首页: +Bugzilla 首页: ![Bugzilla Home](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Home.png) -Bugzilla admin面板: +Bugzilla admin 面板: ![Bugzilla Admin Page](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Admin-Page.png) ### 结论 ### -Bugzilla是一个基于web并能帮助你管理软件开发的应用,它用perl开发并使用MySQL作为数据库系统。Bugzilla帮助mozilla、redhat,gnome等公司完成软件开发工作。Bugzilla有很多功能并易于配置和安装。 +Bugzilla 是一个基于 web 的应用,并能帮助你管理软件开发,它用 perl 开发并以 MySQL 作为数据库系统。Bugzilla 帮助 mozilla、redhat、gnome 等公司完成软件开发工作。Bugzilla 有很多功能并易于配置和安装。 -------------------------------------------------------------------------------- From 4067bc9522f90acf97ee31e13a58a2509f2e615d Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 15 Feb 2016 23:13:51 +0800 Subject: [PATCH 0939/1710] Update 20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md --- ...0214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md b/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md index 53160a0c31..ccd14d1410 100644 --- a/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md +++ b/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to Install MariaDB 10 on CentOS 7 CPanel Server ================================================================================ @@ -323,4 +324,4 @@ via: http://linoxide.com/how-tos/install-mariadb-10-centos-7-cpanel/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/saheethas/ \ No newline at end of file +[a]:http://linoxide.com/author/saheethas/ From 5d936a2ac8298afcb0e0a2bfbe2348554b85fb59 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 16 Feb 2016 16:42:06 +0800 Subject: [PATCH 0940/1710] PUB:20151208 6 useful LibreOffice extensions @GHLandy --- ...0151208 6 useful LibreOffice extensions.md | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) rename {translated/talk/yearbook2015 => published}/20151208 6 useful LibreOffice extensions.md (54%) diff --git a/translated/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md b/published/20151208 6 useful LibreOffice extensions.md similarity index 54% rename from translated/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md rename to published/20151208 6 useful LibreOffice extensions.md index b8d4f1fa1c..5fed70cb74 100644 --- a/translated/talk/yearbook2015/20151208 6 useful LibreOffice extensions.md +++ b/published/20151208 6 useful LibreOffice extensions.md @@ -1,53 +1,54 @@ -GHLandy Translated - LibreOffice 中的六大实用扩展组件 ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png) 图片来源:Opensource.com -LibreOffice 是最好的免费办公套件,并在所有的主要 Linux 发行版中得到应用。尽管 LibreOffice 已经拥有了大多数特性,它仍然可以添加特定的附加组件,即扩展。 +LibreOffice 是最好的自由办公套件,并在所有的主要 Linux 发行版中得到应用。尽管 LibreOffice 已经拥有了大多数特性,它仍然可以通过添加一种叫做扩展(extension)的特定的附加组件来增加功能。 LibreOffice 的扩展组件的网站是 [extensions.libreoffice.org][1]。扩展组件只是一些工具,可以在安装主体上进行独立添加或者移除,以便增加新功能或者让已有功能更容易使用。 ### 1. 多格式保存组件 ### -多格式保存组件可以根据用户的设置,同时将文档保存为开源文档、微软 Office 文档或者 PDF 文档。在你将微软 Office 文档格式转为标准的[开源文档格式][2]的时候,这个组件就很实用了,因为该组件同时提供了两种选择:互操作性较强的 ODF 文档格式以及为所有用户让在实用的微软 Office 文档格式保持兼容性。这样使管理员的文档迁移过程变得更具弹性、更易于管理。 +多格式保存组件可以根据用户的设置,同时将文档保存为开源文档(OpenDocument)、微软 Office 文档或者 PDF 文档。在你需要将微软 Office 文档格式转为标准的[开源文档格式][2]的时候,这个组件就很实用了,因为该组件同时提供了两种选择:互操作性较强的 ODF 文档格式,以及微软 Office 文档格式,以便同所有需要使用老旧的文档格式的用户保持兼容性。这样使管理员的文档迁移过程变得更具弹性、更易于管理。 **[下载 多格式保存组件][3]** ![Multiformatsave extension](https://opensource.com/sites/default/files/images/business-uploads/multiformatsave.png) -### 2. Writer 中可交替使用的查找与替换组件(交替搜索) ### +### 2. Writer 中可备选使用的查找与替换组件(备选搜索 (AltSearch)) ### -该组件向 Writer 中的查找与替换功能添加了许多新特性:可以查找和替换一段或多段文本;一次执行在多个查找和替换;搜索:书签、笔记、文本字段、交叉引用和参考标志内容、名称或标志及其插入;搜索和插入脚注和尾注;通过名称来搜索表格对象、图像和文本框;搜索帮助手册页的分栏符以及创建和失活时间;根据光标位置搜索相同格式的文本。还可以保存/加载查找和替换参数,并在多个同时打开的文件中执行批处理。 +该组件向 Writer 中的查找与替换功能添加了许多新特性:可以查找和替换一段或多段文本;一次执行多个查找和替换;搜索:书签、笔记、文本字段、交叉引用和参考标志内容、名称或标志及其插入;搜索和插入脚注和尾注;通过名称来搜索表格对象、图像和文本框;搜索帮助手册页和分栏符以及创建和失活时间;根据光标位置搜索相同格式的文本。还可以保存/加载查找和替换参数,并在多个同时打开的文件中执行批处理。 -**[下载 Writer 中可交替使用的查找与替换组件(交替搜索)][4]** +**[下载 Writer 中可交替使用的查找与替换组件(交替搜索 (AltSearch))][4]** ![Alternative Find&amp;Replace add-on](https://opensource.com/sites/default/files/images/business-uploads/alternativefindreplace.png) ### 3. Pepito 清除组件 ### -中 LibreOffice 中, Pepito 清除组件主要用来快速清除并修复旧扫描件、导入的 PDF 以及每个电子文本文档的格式错误。通过点击 LibreOffice 工具栏中的 Pepito 图标,用户可以打开一个用于分析文档并呈现文档错误类型。当你将 PDF 文档转换为 ODF 文档时,这个工具就非常有用了,它会自动清除转换过程中出现的错误。 + +Pepito 清除组件是一个 LibreOffice 扩展,主要用来快速清除并修复旧式扫描件、导入的 PDF 以及每个电子文本文档的格式错误。通过点击 LibreOffice 工具栏中的 Pepito 图标,用户可以打开一个用于分析文档并按类型呈现文档错误。当你将 PDF 文档转换为 ODF 文档时,这个工具就非常有用了,它会自动清除转换过程中出现的错误。 **[下载 Pepito 清除组件][5]** ![Pepito cleaner screenshot](https://opensource.com/sites/default/files/images/business-uploads/pepitocleaner.png) ### 4. ImpressRunner 组件### -Impress Runner 是将 [Impress][6] 文档转换成自动播放文件的扩展组件。该组件会添加两个图标,用以设置或移除自动开始播放的功能,我们还可以通过编辑 文件 | 属性 | 自定义属性 菜单来手动添加这两个图标,并将自动运行按钮添加到四个文本域之前。在会议与活动组织而且幻灯片无人主持的时候,这个扩展组件就变得非常有用。 + +Impress Runner 是将 [Impress][6] 文档转换成自动播放文件的扩展组件。该组件会添加两个图标,用以设置或移除自动开始播放的功能,我们还可以通过编辑 文件 | 属性 | 自定义属性 菜单来手动添加这两个图标,并将自动运行按钮添加到前四个文本域之一前面。在会议与组织活动时,如果幻灯片无人主持,这个扩展组件就变得非常有用。 **[下载 ImpressRunner 组件][7]** ### 5. 导出为图像组件 ### -导出为图像组件是 Impress 和 [Draw][8] 中文件菜单里边的一个入口——导出为图像...,,主要用于将所有的幻灯片和页面导出成 JPG、PNG、GIF、BMP 和 TIFF 等图像格式,并且允许用户自定义导出图像的名称、大小以及其他参数。 +导出为图像组件为 Impress 和 [Draw][8] 中文件菜单里增加了一个入口——“导出为图像...”,主要用于将所有的幻灯片和页面导出成 JPG、PNG、GIF、BMP 和 TIFF 等图像格式,并且允许用户自定义导出图像的名称、大小以及其他参数。 **[下载 导出为图像组件][9]** ![Export as images extension](https://opensource.com/sites/default/files/images/business-uploads/exportasimages.png) ### 6. Anaphraseus 组件### -Anaphraseus 是一个 CAT(Computer-Aided Translation,计算机辅助翻译)工具组件,用来创建、管理双语翻译。Anaphraseus 是一个设置成扩展组件或者独立文档的 LibreOffice 宏。最开始,开发者设计 Anaphraseus 为快速翻译(Wordfast)格式,但现在它可以将文件导入或者到出成 TMX 格式。其主要特性:分本分割、在翻译记录中模糊搜索、术语识别以及导入导出 TMX(OmegaT translation memory format,OmegaT 翻译存储格式)。 + +Anaphraseus 是一个 CAT(Computer-Aided Translation,计算机辅助翻译)工具组件,用来创建、管理双语翻译。Anaphraseus 是一个 LibreOffice 宏集合,可以作为扩展组件或者用在单独的文档中。最开始,Anaphraseus 支持快速翻译(Wordfast)格式,但现在它可以导入或者导出成 TMX 格式。其主要特性:分本分割、在翻译记录(Translation Memory)中模糊搜索、术语识别以及导入导出 TMX(OmegaT translation memory format,OmegaT 翻译存储格式)。 **[下载 Anaphraseus 组件][10]** @@ -60,8 +61,8 @@ Anaphraseus 是一个 CAT(Computer-Aided Translation,计算机辅助翻译 via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions 作者:[Italo Vignoli][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[GHLandy](https://github.com/GHLandy) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 56271618f9b1d32d5e6e63455a9c4526b17d5551 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 17 Feb 2016 09:57:16 +0800 Subject: [PATCH 0941/1710] translating --- ...esktop Fun--Text Mode ASCII-art Box and Comment Drawing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md index fad7c6443b..f5321bd83e 100644 --- a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md +++ b/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux / Unix Desktop Fun: Text Mode ASCII-art Box and Comment Drawing ================================================================================ Boxes command is a text filter and a little known tool that can draw any kind of ASCII art box around its input text or code for fun and profit. You can quickly create email signatures, or create regional comments in any programming language. This command was intended to be used with the vim text editor, but can be tied to any text editor which supports filters, as well as from the command line as a standalone tool. @@ -199,3 +201,5 @@ via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text [2]:http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/ [3]:http://www.cyberciti.biz/faq/fedora-sl-centos-redhat6-enable-epel-repo/ [4]:http://www.cyberciti.biz/faq/vim-inserting-current-date-time-under-linux-unix-osx/ + + From 859f199aed135a93f11d9b8a09608aba37ac2cc5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 17 Feb 2016 10:31:36 +0800 Subject: [PATCH 0942/1710] translated --- ... Mode ASCII-art Box and Comment Drawing.md | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) rename {sources => translated}/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md (74%) diff --git a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md similarity index 74% rename from sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md rename to translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md index f5321bd83e..01b0051fef 100644 --- a/sources/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md +++ b/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md @@ -1,16 +1,15 @@ -Translating----geekpi - -Linux / Unix Desktop Fun: Text Mode ASCII-art Box and Comment Drawing +Linux/Unix桌面趣事:文本模式艺术框及注释图 ================================================================================ Boxes command is a text filter and a little known tool that can draw any kind of ASCII art box around its input text or code for fun and profit. You can quickly create email signatures, or create regional comments in any programming language. This command was intended to be used with the vim text editor, but can be tied to any text editor which supports filters, as well as from the command line as a standalone tool. +boxes是一个文本过滤器并且是一个鲜为人知的可以在文字或者代码周围绘出任何形式的ASCII艺术框的工具。你可以快速地创建一个email签名或者在任何语言中创建一个注释。这个命令可以和vim一起使用,但是可以和任何支持过滤和可以在命令行中使用独立工具的文本编辑器绑定在一起。。 -### Task: Install boxes ### +### 任务: 安装 boxes ### -Use the [apt-get command][1] to install boxes under Debian / Ubuntu Linux: +在Debian/Ubuntu中使用[apt-get命令][1]来安装boxes: $ sudo apt-get install boxes -Sample outputs: +示例输出: Reading package lists... Done Building dependency tree @@ -26,11 +25,11 @@ Sample outputs: Processing triggers for man-db ... Setting up boxes (1.0.1a-2.3) ... -RHEL / CentOS / Fedora Linux users, use the [yum command to install boxes][2] (first [enable EPEL repo as described here][3]): +对于RHEL / CentOS / Fedora用户,使用[yum命令来安装boxes][2](首先[启用EPEL仓库][3]) # yum install boxes -Sample outputs: +示例输出: Loaded plugins: rhnplugin Setting up Install Process @@ -63,50 +62,51 @@ Sample outputs: Complete! FreeBSD user can use the port as follows: +FreeBSD用户可以使用port: cd /usr/ports/misc/boxes/ && make install clean -Or, add the package using the pkg_add command: +或者使用pkg_add命令添加包: # pkg_add -r boxes -### Draw any kind of box around some given text ### +### 用给定的文字画出任何形式的框 ### -Type the following command: +输入下面的额命令: echo "This is a test" | boxes -Or specify the name of the design to use: +或者指定设计: echo -e "\n\tVivek Gite\n\tvivek@nixcraft.com\n\twww.cyberciti.biz" | boxes -d dog -Sample outputs: +示例输出: ![Unix / Linux: Boxes Command To Draw Various Designs](http://s0.cyberciti.org/uploads/l/tips/2012/06/unix-linux-boxes-draw-dog-design.png) -Fig.01: Unix / Linux: Boxes Command To Draw Various Designs +图01:Unix / Linux:Box命令来画出不同的设计 -#### How do I list all designs? #### +#### 我如何列出所有的设计? #### -The syntax is: +语法是: boxes option pipe | boxes options echo "text" | boxes -d foo boxes -l -The -d design option sets the name of the design to use. The syntax is: +-d选项设置使用的设计。语法是: echo "Text" | boxes -d design pipe | boxes -d desig -The -l option list designs. It produces a listing of all available box designs in the config file, along with a sample box and information about it's creator: +-l选项列出设计列表。它会列出配置文件中所有的设计,以及它的设计者的一些信息: boxes -l boxes -l | more boxes -l | less -Sample outputs: +示例输出: 43 Available Styles in "/etc/boxes/boxes-config": ------------------------------------------------- @@ -142,32 +142,32 @@ Sample outputs: output truncated .. -### How do I filter text via boxes while using vi/vim text editor? ### +### 我如何在vi/vim中使用boxes过滤文本? ### -You can use any external command with vi or vim. In this example, [insert current date and time][4], enter: +你可以在vi或者vim中使用任何外部命令。比如,[插入日期和时间][4],输入: !!date -OR +或者 :r !date -You need to type above command in Vim to read the output from the date command. This will insert the date and time after the current line: +你需要在vim中输入上面的命令来读取date命令的输出。这可以在当前行中插入时间和日期: Tue Jun 12 00:05:38 IST 2012 -You can do the same with boxes command. Create a sample shell script or a c program as follows: +你可以用boxes命令做同样的事情。如下创建一个示例脚本或者程序: #!/bin/bash Purpose: Backup mysql database to remote server. Author: Vivek Gite Last updated on: Tue Jun, 12 2012 -Now type the following (move cursor to the second line i.e. line which starts with "Purpose: ...") +现在输入下面的命令(移动光标到第二行,也就是说以Purpose开头的那行) 3!!boxes -And voila you will get the output as follows: +你就会得到下面的示例输出: #!/bin/bash /****************************************************/ @@ -177,22 +177,22 @@ And voila you will get the output as follows: /****************************************************/ This video will give you an introduction to boxes command: +这个视频是boxes命令的一个介绍 注:youtube 视频 -(Video:01: boxes command in action. BTW, this is my first video so go easy on me and let me know what you think.) +(视频01:boxes命令实践。顺便说一下,这是我的第一个视频,所以对我不要太认真并让我知道你们所想) +同样可见 -See also - -- boxes man page +- boxes man页 -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text-editor.html 作者:Vivek Gite -译者:[译者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 e8d9170b3976f2c2f5c25de2a1bee2c96e4e3353 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 17 Feb 2016 23:31:17 +0800 Subject: [PATCH 0943/1710] =?UTF-8?q?20160217-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... PHP-FPM Instances with Nginx or Apache.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md diff --git a/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md new file mode 100644 index 0000000000..68af7da0a4 --- /dev/null +++ b/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md @@ -0,0 +1,121 @@ +How to Enable Multiple PHP-FPM Instances with Nginx / Apache +================================================================================ + +PHP-FPM is also known as PHP FastCGI Process Manager. It is an advancement of PHP FastCGI implementation with more useful features for handling heavy-loaded servers and websites. Some of those features are listed below: + +### New Features ### + + - Advanced process managament capability with graceful start/stop options. + - Ability to run the processes with different userids/groupids listening on different ports and using different PHP configurations. + - Error logging. + - Acceleration upload support + - Special function to finish request and flush all data while doing some time consuming tasks + - Both Dynamic and Static Child process Spawning + - IP Address restriction + +In this article, I'm going to discuss about installing PHP-FPM along with Nginx and Apache on a CentOS 7 server running cPanel 11.52 with EA3(EasyApache) and how to manage those installed multiple PHP-FPM instances via CPanel. + +Before going to the installation procedures, let us take a look on the pre-requisites. + +### Pre-requisites ### + + # Enable Mod_proxy_fcgi module + # Enable MPM_Event + +Since, we are installing PHP-FPM on a EA3 server, we need to run EasyApache to compile Apache to enable these modules. + +You can refer my previous document on how to install Nginx as reverse proxy on a Apache server to confirm with the Nginx installation. + +I'll brief those installation steps once again here. You can refer to my previous documentation **(How to Set Nginx as Reverse Proxy on CentOS 7 /CPanel Server)** for details. + + Step 1: Install the Epel repo + Step 2: Install nDeploy RPM repo which is the most **IMPORTANT** step in this installation. + Step 3: Install nDeploy and Nginx plugin using yum from the nDeploy repo. + Step 4: Enable/Configure Nginx as reverse proxy + +Once this is done, install the PHP-FPM packages for all PHP versions available in the server. EA3 uses remi repository for installing these packages. You can run this nDeploy script to download all packages. + + root@server1 [~]# /opt/nDeploy/scripts/easy_php_setup.sh + Loaded plugins: fastestmirror, tsflags, universal-hooks + EA4 | 2.9 kB 00:00:00 + base | 3.6 kB 00:00:00 + epel/x86_64/metalink | 9.7 kB 00:00:00 + epel | 4.3 kB 00:00:00 + extras | 3.4 kB 00:00:00 + updates | 3.4 kB 00:00:00 + (1/2): epel/x86_64/updateinfo | 460 kB 00:00:00 + (2/2): epel/x86_64/primary_db + +Running this script will install all these FPM packages for PHP 54, PHP 55, PHP 56 and PHP 70. + + Installed Packages + php54-php-fpm.x86_64 5.4.45-3.el7.remi @remi + php55-php-fpm.x86_64 5.5.31-1.el7.remi @remi + php56-php-fpm.x86_64 5.6.17-1.el7.remi @remi + php70-php-fpm.x86_64 7.0.2-1.el7.remi @remi + +After this installation, you need to enable PHP-FPM SAPI for Apache. You can run this script to enable PHP-FPM instances. + + root@server1 [~]# /opt/nDeploy/scripts/apache_php-fpm_setup.sh enable + mod_proxy_fcgi.c + Please choose one default PHP version from the list below + PHP70 + PHP56 + PHP54 + PHP55 + Provide the exact desired version string here and press ENTER: PHP54 + ConfGen:: lxblogger + ConfGen:: blogr + ConfGen:: saheetha + ConfGen:: satest + which: no cagefsctl in (/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin) + info [rebuildhttpdconf] Missing owner for domain server1.centos7-test.com, force lookup to root + Built /usr/local/apache/conf/httpd.conf OK + Waiting for “httpd” to restart gracefully …waiting for “httpd” to initialize …… + …finished. + +It will ask the required PHP version which you prefer to run as default on the server. You can enter those details and proceed to configure and generate the virtual host files for the existing domains. + +I've chosen PHP 54 as the default PHP-FPM version on my server. + +![confirm-php-fpm](http://blog.linoxide.com/wp-content/uploads/2016/01/confirm-php-fpm-1024x525.png) + +Even though, the server is configured with PHP-FPM 54, we can modify the PHP-FPM instances for the individual domains via cPanel. + +I'll explain you on how to modify the PHP-FPM instances for individual domains via cPanel using some screenshots. + +The installation of Nginx plugin will provide you with an icon of Nginx Webstack in your domain's cPanel. You can click on that icon to configure your Web server. I've logged into one of my domain's cPanel to configure it's Web server. + +Please check these snapshots. + +![nginx webstack](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx-webstack.png) + +![nginxicon1](http://blog.linoxide.com/wp-content/uploads/2016/01/nginxicon1-1024x253.png) + +Now you can configure the web-server for the selected main domain as required(I've selected the main domain saheetha.com here). I've gone ahead with automatic configuration options since, I don't have any manual settings to add. + +![nginx_auto_proxy](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx_auto_proxy-1024x408.png) + +Once Nginx is configured, you can select the PHP-FPM instance for your domain here. + +![php-fpm1](http://blog.linoxide.com/wp-content/uploads/2016/01/php-fpm1-1024x408.png) + +![php54](http://blog.linoxide.com/wp-content/uploads/2016/01/php54-1024x169.png) + +![php55](http://blog.linoxide.com/wp-content/uploads/2016/01/php55.png) + +As you can see in these snapshots, my default PHP-FPM on the server is **PHP 54** and I'm changing the PHP-FPM instance for my domain alone to **PHP 55**. Once you've modified the PHP-FPM for your domain, you can confirm it by accessing the **phpinfo** page. + +Thank you for referring to this article. I believe this article is really informative and useful for you. I would recommend your valuable comments on this :). + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/enable-multiple-php-fpm-instances-nginx-apache/ + +作者:[Saheetha Shameer][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/saheethas/ \ No newline at end of file From 6535efbb56e01671dfbd878f02da697afff38163 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 18 Feb 2016 00:14:05 +0800 Subject: [PATCH 0944/1710] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8E=9F=E6=96=87?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=BA=8F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Enable Multiple PHP-FPM Instances with Nginx or Apache.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md index 68af7da0a4..4037c4aa92 100644 --- a/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md +++ b/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md @@ -19,8 +19,8 @@ Before going to the installation procedures, let us take a look on the pre-requi ### Pre-requisites ### - # Enable Mod_proxy_fcgi module - # Enable MPM_Event + 1. Enable Mod_proxy_fcgi module + 2. Enable MPM_Event Since, we are installing PHP-FPM on a EA3 server, we need to run EasyApache to compile Apache to enable these modules. From 8402f139fa2a53c878cbb7724f3f3355502ca970 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 18 Feb 2016 10:23:29 +0800 Subject: [PATCH 0945/1710] =?UTF-8?q?20160218-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ginx as Reverse Proxy on Centos7 CPanel.md | 201 ++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md diff --git a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md new file mode 100644 index 0000000000..e3cc72cd8d --- /dev/null +++ b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md @@ -0,0 +1,201 @@ +How to Set Nginx as Reverse Proxy on Centos7 CPanel +================================================================================ + +Nginx is one of the fastest and most powerful web-server. It is known for its high performance and low resource utilization. It can be installed as both a standalone and a Reverse Proxy Web-server. In this article, I'm discussing about the installation of Nginx as a reverse proxy along with Apache on a CPanel server with latest CentOS 7 installed. + +Nginx as a reverse proxy will work as a frontend webserver serving static contents along with Apache serving the dynamic files in backend. This setup will boost up the overall server performance. + +Let's walk through the installation steps for Nginx as reverse proxy in CentOS7 x86_64 bit server with cPanel 11.52 installed. + +First of all, we need to install the EPEL repo to start-up with the process. + +### Step 1: Install the EPEL repo. ### + + root@server1 [/usr]# yum -y install epel-release + Loaded plugins: fastestmirror, tsflags, universal-hooks + Loading mirror speeds from cached hostfile + * EA4: 66.23.237.210 + * base: mirrors.linode.com + * extras: mirrors.linode.com + * updates: mirrors.linode.com + Resolving Dependencies + --> Running transaction check + ---> Package epel-release.noarch 0:7-5 will be installed + --> Finished Dependency Resolution + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + epel-release noarch 7-5 extras 14 k + +### Step 2: After installing the repo, we can start with the installation of the nDeploy RPM repo for CentOS to install our required nDeploy Webstack and Nginx plugin. ### + + root@server1 [/usr]# yum -y install http://rpm.piserve.com/nDeploy-release-centos-1.0-1.noarch.rpm + Loaded plugins: fastestmirror, tsflags, universal-hooks + nDeploy-release-centos-1.0-1.noarch.rpm | 1.7 kB 00:00:00 + Examining /var/tmp/yum-root-ei5tWJ/nDeploy-release-centos-1.0-1.noarch.rpm: nDeploy-release-centos-1.0-1.noarch + Marking /var/tmp/yum-root-ei5tWJ/nDeploy-release-centos-1.0-1.noarch.rpm to be installed + Resolving Dependencies + --> Running transaction check + ---> Package nDeploy-release-centos.noarch 0:1.0-1 will be installed + --> Finished Dependency Resolution + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + nDeploy-release-centos noarch 1.0-1 /nDeploy-release-centos-1.0-1.noarch 110 + +### Step 3: Install the nDeploy and Nginx nDeploy plugins. ### + + root@server1 [/usr]# yum --enablerepo=ndeploy install nginx-nDeploy nDeploy + Loaded plugins: fastestmirror, tsflags, universal-hooks + epel/x86_64/metalink | 9.9 kB 00:00:00 + epel | 4.3 kB 00:00:00 + ndeploy | 2.9 kB 00:00:00 + (1/4): ndeploy/7/x86_64/primary_db | 14 kB 00:00:00 + (2/4): epel/x86_64/group_gz | 169 kB 00:00:00 + (3/4): epel/x86_64/primary_db | 3.7 MB 00:00:02 + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + nDeploy noarch 2.0-11.el7 ndeploy 80 k + nginx-nDeploy x86_64 1.8.0-34.el7 ndeploy 36 M + Installing for dependencies: + PyYAML x86_64 3.10-11.el7 base 153 k + libevent x86_64 2.0.21-4.el7 base 214 k + memcached x86_64 1.4.15-9.el7 base 84 k + python-inotify noarch 0.9.4-4.el7 base 49 k + python-lxml x86_64 3.2.1-4.el7 base 758 k + + Transaction Summary + =============================================================================================================================================== + Install 2 Packages (+5 Dependent packages) + +With these steps, we've completed with the installation of Nginx plugin in our server. Now we need to configure Nginx as reverse proxy and create the virtualhost for the existing cPanel user accounts. For that we can run the following script. + +### Step 4: To enable Nginx as a front end Web Server and create the default configuration files. ### + + root@server1 [/usr]# /opt/nDeploy/scripts/cpanel-nDeploy-setup.sh enable + Modifying apache http and https port in cpanel + + httpd restarted successfully. + Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service. + Created symlink from /etc/systemd/system/multi-user.target.wants/ndeploy_watcher.service to /usr/lib/systemd/system/ndeploy_watcher.service. + Created symlink from /etc/systemd/system/multi-user.target.wants/ndeploy_backends.service to /usr/lib/systemd/system/ndeploy_backends.service. + ConfGen:: saheetha + ConfGen:: satest + +As you can see these script will modify the Apache port from 80 to another port to make Nginx run as a front end web server and create the virtual host configuration files for the existing cPanel accounts. Once it is done, confirm the status of both Apache and Nginx. + +### Apache Status: ### + + root@server1 [/var/run/httpd]# systemctl status httpd + ● httpd.service - Apache Web Server + Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) + Active: active (running) since Mon 2016-01-18 06:34:23 UTC; 12s ago + Process: 25606 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS) + Main PID: 24760 (httpd) + CGroup: /system.slice/httpd.service + ‣ 24760 /usr/local/apache/bin/httpd -k start + + Jan 18 06:34:23 server1.centos7-test.com systemd[1]: Starting Apache Web Server... + Jan 18 06:34:23 server1.centos7-test.com apachectl[25606]: httpd (pid 24760) already running + Jan 18 06:34:23 server1.centos7-test.com systemd[1]: Started Apache Web Server. + +### Nginx Status: ### + + root@server1 [~]# systemctl status nginx + ● nginx.service - nginx-nDeploy - high performance web server + Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) + Active: active (running) since Sun 2016-01-17 17:18:29 UTC; 13h ago + Docs: http://nginx.org/en/docs/ + Main PID: 3833 (nginx) + CGroup: /system.slice/nginx.service + ├─ 3833 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf + ├─25473 nginx: worker process + ├─25474 nginx: worker process + └─25475 nginx: cache manager process + + Jan 17 17:18:29 server1.centos7-test.com systemd[1]: Starting nginx-nDeploy - high performance web server... + Jan 17 17:18:29 server1.centos7-test.com nginx[3804]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok + Jan 17 17:18:29 server1.centos7-test.com nginx[3804]: nginx: configuration file /etc/nginx/nginx.conf test is successful + Jan 17 17:18:29 server1.centos7-test.com systemd[1]: Started nginx-nDeploy - high performance web server. + +Nginx act as a frontend webserver running on port 80 and Apache configuration is modified to listen on http port 9999 and https port 4430. Please see their status below: + + root@server1 [/usr/local/src]# netstat -plan | grep httpd + tcp 0 0 0.0.0.0:4430 0.0.0.0:* LISTEN 17270/httpd + tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 17270/httpd + tcp6 0 0 :::4430 :::* LISTEN 17270/httpd + tcp6 0 0 :::9999 :::* LISTEN 17270/httpd + +![apacheport](http://blog.linoxide.com/wp-content/uploads/2016/01/apacheport.png) + + root@server1 [/usr/local/src]# netstat -plan | grep nginx + tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 17802/nginx: master + tcp 0 0 45.79.183.73:80 0.0.0.0:* LISTEN 17802/nginx: master + +The virtualhost entries created for the existing users as located in the folder "**/etc/nginx/sites-enabled**". This file path is included in the Nginx main configuration file. + + root@server1 [/etc/nginx/sites-enabled]# ll | grep .conf + -rw-r--r-- 1 root root 311 Jan 17 09:02 saheetha.com.conf + -rw-r--r-- 1 root root 336 Jan 17 09:02 saheethastest.com.conf + +### Sample Vhost for a domain: ### + + server { + + listen 45.79.183.73:80; + #CPIPVSIX:80; + + # ServerNames + server_name saheetha.com www.saheetha.com; + access_log /usr/local/apache/domlogs/saheetha.com main; + access_log /usr/local/apache/domlogs/saheetha.com-bytes_log bytes_log; + + include /etc/nginx/sites-enabled/saheetha.com.include; + + } + +We can confirm the working of the web server status by calling a website in the browser. Please see the web server information on my server after the installation. + + root@server1 [/home]# ip a | grep -i eth0 + 3: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000 + inet 45.79.183.73/24 brd 45.79.183.255 scope global dynamic eth0 + root@server1 [/home]# nginx -v + nginx version: nginx/1.8.0 + +![webserver-status](http://blog.linoxide.com/wp-content/uploads/2016/01/webserver.png) + +Nginx will create the virtual host automatically for any newly created accounts in cPanel. With these simple steps we can configure Nginx as reverse proxy on a CentOS 7/CPanel server. + +### Advantages of Nginx as Reverse Proxy: ### + + 1. Easy to install and configure + 2. Performance and efficiency + 3. Prevent DDOS attacks + 4. Allows .htaccess PHP rewrite rules + +I hope this article is useful for you guys. Thank you for referring to this. I would appreciate your valuable comments and suggestions on this for further improvements. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/set-nginx-reverse-proxy-centos-7-cpanel/ + +作者:[Saheetha Shameer][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/saheethas/ \ No newline at end of file From f9dfc8e24cba3b6f0f45b8f487db74e130db33b9 Mon Sep 17 00:00:00 2001 From: Markgolzh <1134386961@qq.com> Date: Thu, 18 Feb 2016 17:01:56 +0800 Subject: [PATCH 0946/1710] =?UTF-8?q?=E6=88=91=E7=BF=BB=E8=AF=91=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rp请合并 --- ... Mode ASCII-art Box and Comment Drawing.md | 75 ++++++++++--------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md index 01b0051fef..ce9c76f324 100644 --- a/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md +++ b/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md @@ -1,15 +1,18 @@ -Linux/Unix桌面趣事:文本模式艺术框及注释图 + +Linux / Unix 桌面娱乐 : +文字模式的带有ASCII艺术的Box与评论绘制 + ================================================================================ -Boxes command is a text filter and a little known tool that can draw any kind of ASCII art box around its input text or code for fun and profit. You can quickly create email signatures, or create regional comments in any programming language. This command was intended to be used with the vim text editor, but can be tied to any text editor which supports filters, as well as from the command line as a standalone tool. -boxes是一个文本过滤器并且是一个鲜为人知的可以在文字或者代码周围绘出任何形式的ASCII艺术框的工具。你可以快速地创建一个email签名或者在任何语言中创建一个注释。这个命令可以和vim一起使用,但是可以和任何支持过滤和可以在命令行中使用独立工具的文本编辑器绑定在一起。。 +Boxes 命令不仅是一个文本过滤器,同时是一个很少人知道的可以为了乐趣或者需要在它的输入文本或者代码周围画各种ASCII艺术画的工具。你可以迅速创建邮件签名,或者使用各种编程语言创建局部评论。这个命令计划被vim文本编辑器使用,但是也可以被支持过滤的文本编辑器使用,同时从命令行作为一个单独的工具使用。 -### 任务: 安装 boxes ### -在Debian/Ubuntu中使用[apt-get命令][1]来安装boxes: +### 任务: 安装 boxes ### + +使用 [apt-get command][1] 在 Debian / Ubuntu Linux中安装 boxes : $ sudo apt-get install boxes -示例输出: +输出示例 : Reading package lists... Done Building dependency tree @@ -25,11 +28,11 @@ boxes是一个文本过滤器并且是一个鲜为人知的可以在文字或者 Processing triggers for man-db ... Setting up boxes (1.0.1a-2.3) ... -对于RHEL / CentOS / Fedora用户,使用[yum命令来安装boxes][2](首先[启用EPEL仓库][3]) +RHEL / CentOS / Fedora Linux 用户, 使用 [yum command to install boxes][2] (首先 [enable EPEL repo as described here][3]): # yum install boxes -示例输出: +输出示例 : Loaded plugins: rhnplugin Setting up Install Process @@ -61,52 +64,53 @@ boxes是一个文本过滤器并且是一个鲜为人知的可以在文字或者 boxes.x86_64 0:1.1-8.el6 Complete! -FreeBSD user can use the port as follows: -FreeBSD用户可以使用port: +FreeBSD 用户可以按如下来使用 : cd /usr/ports/misc/boxes/ && make install clean -或者使用pkg_add命令添加包: +或者,使用 pkg_add 命令来增加包: # pkg_add -r boxes -### 用给定的文字画出任何形式的框 ### +### 在一些给定文本周围画出任何种类的box ### -输入下面的额命令: +输入下列命令 : echo "This is a test" | boxes -或者指定设计: +或者,通过设置要使用的设计的名字来使用 : echo -e "\n\tVivek Gite\n\tvivek@nixcraft.com\n\twww.cyberciti.biz" | boxes -d dog -示例输出: +输出示例 : ![Unix / Linux: Boxes Command To Draw Various Designs](http://s0.cyberciti.org/uploads/l/tips/2012/06/unix-linux-boxes-draw-dog-design.png) -图01:Unix / Linux:Box命令来画出不同的设计 +Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计 -#### 我如何列出所有的设计? #### +#### 怎么样输出所有的设计 #### -语法是: +语法如下: boxes option pipe | boxes options echo "text" | boxes -d foo boxes -l --d选项设置使用的设计。语法是: +设计 -d 选项设置要使用的设计的名字 . 语法如下: + echo "Text" | boxes -d design pipe | boxes -d desig --l选项列出设计列表。它会列出配置文件中所有的设计,以及它的设计者的一些信息: +-l 选项列出所有设计 . 它显示在配置文件中的所有的box设计图,同时也显示关于其创作者的信息。 + boxes -l boxes -l | more boxes -l | less -示例输出: +输出示例: 43 Available Styles in "/etc/boxes/boxes-config": ------------------------------------------------- @@ -142,32 +146,32 @@ FreeBSD用户可以使用port: output truncated .. -### 我如何在vi/vim中使用boxes过滤文本? ### +### 在使用vi/vim文本编辑器时如何通过boxes过滤文本? ### -你可以在vi或者vim中使用任何外部命令。比如,[插入日期和时间][4],输入: +你可以使用vi或vim支持的任何附加命令,在这个例子中, [insert current date and time][4], 输入: !!date 或者 :r !date - -你需要在vim中输入上面的命令来读取date命令的输出。这可以在当前行中插入时间和日期: +你需要在vim中输入以上命令来读取数据命令的输出,这将在当前行后面加入日期和时分秒: Tue Jun 12 00:05:38 IST 2012 -你可以用boxes命令做同样的事情。如下创建一个示例脚本或者程序: +你可以用boxes命令做到同样的. 创建一个作为样本的shell脚本或者如下的一个c程序: + #!/bin/bash Purpose: Backup mysql database to remote server. Author: Vivek Gite Last updated on: Tue Jun, 12 2012 -现在输入下面的命令(移动光标到第二行,也就是说以Purpose开头的那行) +现在输入如下 (将光标移到第二行,也就是以"Purpose: ..."开头的行) 3!!boxes -你就会得到下面的示例输出: +瞧,你就会看到如下的输出 : #!/bin/bash /****************************************************/ @@ -175,24 +179,23 @@ FreeBSD用户可以使用port: /* Author: Vivek Gite */ /* Last updated on: Tue Jun, 12 2012 */ /****************************************************/ - -This video will give you an introduction to boxes command: -这个视频是boxes命令的一个介绍 +这个短片将会给你介绍boxes命令: 注:youtube 视频 -(视频01:boxes命令实践。顺便说一下,这是我的第一个视频,所以对我不要太认真并让我知道你们所想) -同样可见 +(Video:01: boxes command in action. BTW, this is my first video so go easy on me and let me know what you think.) -- boxes man页 +另见 + +- boxes man 手册 -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text-editor.html 作者:Vivek Gite -译者:[geekpi](https://github.com/geekpi) +译者:[zky001](https://github.com/zky001) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -201,5 +204,3 @@ via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text [2]:http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/ [3]:http://www.cyberciti.biz/faq/fedora-sl-centos-redhat6-enable-epel-repo/ [4]:http://www.cyberciti.biz/faq/vim-inserting-current-date-time-under-linux-unix-osx/ - - From bf55379eef0d8b14bfa0555568300fc2b2c2168e Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 18 Feb 2016 17:44:20 +0800 Subject: [PATCH 0947/1710] Update 20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md --- ...o Enable Multiple PHP-FPM Instances with Nginx or Apache.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md index 4037c4aa92..10eaaf1388 100644 --- a/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md +++ b/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to Enable Multiple PHP-FPM Instances with Nginx / Apache ================================================================================ @@ -118,4 +119,4 @@ via: http://linoxide.com/linux-how-to/enable-multiple-php-fpm-instances-nginx-ap 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/saheethas/ \ No newline at end of file +[a]:http://linoxide.com/author/saheethas/ From a4c3b419ee534969c86abfef15325f8db75d7f5b Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 18 Feb 2016 18:57:14 +0800 Subject: [PATCH 0948/1710] [Translated]How to Enable Multiple PHP-FPM Instances with Nginx/Apache.md --- ... PHP-FPM Instances with Nginx or Apache.md | 122 ------------------ 1 file changed, 122 deletions(-) delete mode 100644 sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md diff --git a/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md deleted file mode 100644 index 10eaaf1388..0000000000 --- a/sources/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md +++ /dev/null @@ -1,122 +0,0 @@ -Translating by GOLinux! -How to Enable Multiple PHP-FPM Instances with Nginx / Apache -================================================================================ - -PHP-FPM is also known as PHP FastCGI Process Manager. It is an advancement of PHP FastCGI implementation with more useful features for handling heavy-loaded servers and websites. Some of those features are listed below: - -### New Features ### - - - Advanced process managament capability with graceful start/stop options. - - Ability to run the processes with different userids/groupids listening on different ports and using different PHP configurations. - - Error logging. - - Acceleration upload support - - Special function to finish request and flush all data while doing some time consuming tasks - - Both Dynamic and Static Child process Spawning - - IP Address restriction - -In this article, I'm going to discuss about installing PHP-FPM along with Nginx and Apache on a CentOS 7 server running cPanel 11.52 with EA3(EasyApache) and how to manage those installed multiple PHP-FPM instances via CPanel. - -Before going to the installation procedures, let us take a look on the pre-requisites. - -### Pre-requisites ### - - 1. Enable Mod_proxy_fcgi module - 2. Enable MPM_Event - -Since, we are installing PHP-FPM on a EA3 server, we need to run EasyApache to compile Apache to enable these modules. - -You can refer my previous document on how to install Nginx as reverse proxy on a Apache server to confirm with the Nginx installation. - -I'll brief those installation steps once again here. You can refer to my previous documentation **(How to Set Nginx as Reverse Proxy on CentOS 7 /CPanel Server)** for details. - - Step 1: Install the Epel repo - Step 2: Install nDeploy RPM repo which is the most **IMPORTANT** step in this installation. - Step 3: Install nDeploy and Nginx plugin using yum from the nDeploy repo. - Step 4: Enable/Configure Nginx as reverse proxy - -Once this is done, install the PHP-FPM packages for all PHP versions available in the server. EA3 uses remi repository for installing these packages. You can run this nDeploy script to download all packages. - - root@server1 [~]# /opt/nDeploy/scripts/easy_php_setup.sh - Loaded plugins: fastestmirror, tsflags, universal-hooks - EA4 | 2.9 kB 00:00:00 - base | 3.6 kB 00:00:00 - epel/x86_64/metalink | 9.7 kB 00:00:00 - epel | 4.3 kB 00:00:00 - extras | 3.4 kB 00:00:00 - updates | 3.4 kB 00:00:00 - (1/2): epel/x86_64/updateinfo | 460 kB 00:00:00 - (2/2): epel/x86_64/primary_db - -Running this script will install all these FPM packages for PHP 54, PHP 55, PHP 56 and PHP 70. - - Installed Packages - php54-php-fpm.x86_64 5.4.45-3.el7.remi @remi - php55-php-fpm.x86_64 5.5.31-1.el7.remi @remi - php56-php-fpm.x86_64 5.6.17-1.el7.remi @remi - php70-php-fpm.x86_64 7.0.2-1.el7.remi @remi - -After this installation, you need to enable PHP-FPM SAPI for Apache. You can run this script to enable PHP-FPM instances. - - root@server1 [~]# /opt/nDeploy/scripts/apache_php-fpm_setup.sh enable - mod_proxy_fcgi.c - Please choose one default PHP version from the list below - PHP70 - PHP56 - PHP54 - PHP55 - Provide the exact desired version string here and press ENTER: PHP54 - ConfGen:: lxblogger - ConfGen:: blogr - ConfGen:: saheetha - ConfGen:: satest - which: no cagefsctl in (/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin) - info [rebuildhttpdconf] Missing owner for domain server1.centos7-test.com, force lookup to root - Built /usr/local/apache/conf/httpd.conf OK - Waiting for “httpd” to restart gracefully …waiting for “httpd” to initialize …… - …finished. - -It will ask the required PHP version which you prefer to run as default on the server. You can enter those details and proceed to configure and generate the virtual host files for the existing domains. - -I've chosen PHP 54 as the default PHP-FPM version on my server. - -![confirm-php-fpm](http://blog.linoxide.com/wp-content/uploads/2016/01/confirm-php-fpm-1024x525.png) - -Even though, the server is configured with PHP-FPM 54, we can modify the PHP-FPM instances for the individual domains via cPanel. - -I'll explain you on how to modify the PHP-FPM instances for individual domains via cPanel using some screenshots. - -The installation of Nginx plugin will provide you with an icon of Nginx Webstack in your domain's cPanel. You can click on that icon to configure your Web server. I've logged into one of my domain's cPanel to configure it's Web server. - -Please check these snapshots. - -![nginx webstack](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx-webstack.png) - -![nginxicon1](http://blog.linoxide.com/wp-content/uploads/2016/01/nginxicon1-1024x253.png) - -Now you can configure the web-server for the selected main domain as required(I've selected the main domain saheetha.com here). I've gone ahead with automatic configuration options since, I don't have any manual settings to add. - -![nginx_auto_proxy](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx_auto_proxy-1024x408.png) - -Once Nginx is configured, you can select the PHP-FPM instance for your domain here. - -![php-fpm1](http://blog.linoxide.com/wp-content/uploads/2016/01/php-fpm1-1024x408.png) - -![php54](http://blog.linoxide.com/wp-content/uploads/2016/01/php54-1024x169.png) - -![php55](http://blog.linoxide.com/wp-content/uploads/2016/01/php55.png) - -As you can see in these snapshots, my default PHP-FPM on the server is **PHP 54** and I'm changing the PHP-FPM instance for my domain alone to **PHP 55**. Once you've modified the PHP-FPM for your domain, you can confirm it by accessing the **phpinfo** page. - -Thank you for referring to this article. I believe this article is really informative and useful for you. I would recommend your valuable comments on this :). - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/enable-multiple-php-fpm-instances-nginx-apache/ - -作者:[Saheetha Shameer][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/saheethas/ From a8c18cbe391dac6abd9e8279d7974dc20f440456 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 18 Feb 2016 19:00:24 +0800 Subject: [PATCH 0949/1710] [Translated]How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md --- ... PHP-FPM Instances with Nginx or Apache.md | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md diff --git a/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md new file mode 100644 index 0000000000..befa31312f --- /dev/null +++ b/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md @@ -0,0 +1,119 @@ +启用Nginx/Apache的PHP-FPM多实例 +================================================================================ + +PHP-FPM作为FastCGI进程管理器而广为熟知,它是PHP FastCGI实现的改进,带有更为有用的功能,用于处理高负载的服务器和网站。下面列出其中一些功能: +### 新功能 ### + + - 拥有具有优雅启动/停止选项的高级进程管理能力。 + - 可以以监听不同端口以及使用不同PHP配置的不同用户身份/组身份来运行进程。 + - 错误日志记录。 + - 支持上传加速。 + - 用于在处理一些耗时任务时结束请求和清空所有数据的特别功能。 + - 同时支持动态和静态子进程重生。 + - 支持IP地址限制。 + +在本文中,我将要讨论的是,在运行EA3下CPanel 11.52的CentOS 7服务器上与Nginx和Apache一起安装PHP-FPM,以及如何来通过CPanel管理这些安装好的多个PHP-FPM实例。 +Before going to the installation procedures, let us take a look on the pre-requisites. + +### 先决条件 ### + + 1. 启用 Mod_proxy_fcgi模块 + 2. 启用 MPM_Event + +由于我们要将PHP-FPM安装到一台EA3服务器,我们需要运行EasyApache来编译Apache以启用这些模块。 + +你们可以参考我以前写的,关于如何在Apache服务器上安装Nginx作为反向代理的文档来确认Nginx的安装。 + +这里,我将再次简述那些安装步骤。具体细节,你可以参考我之前写的**(如何在CentOS 7/CPanel服务器上配置Nginx反向代理)**一文。 + + 步骤 1:安装Epel仓库 + 步骤 2:安装nDeploy RPM仓库,这是此次安装中最为**重要**的步骤。 + 步骤 3:使用yum从nDeploy仓库安装nDeploy和Nginx插件。 + 步骤 4:启用/配置Nginx为反向代理。 + +完成这些步骤后,下面为服务器中所有可用PHP版本安装PHP-FPM包,EA3使用remi仓库来安装这些包。你可以运行这个nDeploy脚本来下载所有的包。 + + root@server1 [~]# /opt/nDeploy/scripts/easy_php_setup.sh + Loaded plugins: fastestmirror, tsflags, universal-hooks + EA4 | 2.9 kB 00:00:00 + base | 3.6 kB 00:00:00 + epel/x86_64/metalink | 9.7 kB 00:00:00 + epel | 4.3 kB 00:00:00 + extras | 3.4 kB 00:00:00 + updates | 3.4 kB 00:00:00 + (1/2): epel/x86_64/updateinfo | 460 kB 00:00:00 + (2/2): epel/x86_64/primary_db + +运行该脚本将为PHP 54,PHP 55,PHP 56和PHP 70安装所有这些FPM包。 + + Installed Packages + php54-php-fpm.x86_64 5.4.45-3.el7.remi @remi + php55-php-fpm.x86_64 5.5.31-1.el7.remi @remi + php56-php-fpm.x86_64 5.6.17-1.el7.remi @remi + php70-php-fpm.x86_64 7.0.2-1.el7.remi @remi + +在以上安装完成后,你需要为Apache启用PHP-FPM SAPI。你可以运行下面这个脚本来启用PHP-FPM实例。 + + root@server1 [~]# /opt/nDeploy/scripts/apache_php-fpm_setup.sh enable + mod_proxy_fcgi.c + Please choose one default PHP version from the list below + PHP70 + PHP56 + PHP54 + PHP55 + Provide the exact desired version string here and press ENTER: PHP54 + ConfGen:: lxblogger + ConfGen:: blogr + ConfGen:: saheetha + ConfGen:: satest + which: no cagefsctl in (/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin) + info [rebuildhttpdconf] Missing owner for domain server1.centos7-test.com, force lookup to root + Built /usr/local/apache/conf/httpd.conf OK + Waiting for “httpd” to restart gracefully …waiting for “httpd” to initialize …… + …finished. + +它会问你需要运行哪个PHP版本作为服务器默认版本,你可以输入那些细节内容,然后继续配置并为现存的域生成虚拟主机文件。 + +我选择了PHP 54作为我服务器上的默认PHP-FPM版本。 + +![confirm-php-fpm](http://blog.linoxide.com/wp-content/uploads/2016/01/confirm-php-fpm-1024x525.png) + +虽然服务器配置了PHP-FPM 54,但是我们可以通过CPanel为各个独立的域修改PHP-FPM实例。 + +下面我将通过一些截图来为你们说明一下,怎样通过CPanel为各个独立域修改PHP-FPM实例。 + +Nginx插件的安装将为你的域的CPanel提供一个Nginx Webstack图标,你可以点击该图标来配置你的Web服务器。我已经登陆进了我其中的一个CPanel来配置相应的Web服务器。 + +请看这些截图。 + +![nginx webstack](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx-webstack.png) + +![nginxicon1](http://blog.linoxide.com/wp-content/uploads/2016/01/nginxicon1-1024x253.png) + +现在,你可以根据需要为选中的主域配置web服务器(这里,我已经选择了主域saheetha.com)。我已经继续通过自动化配置选项来进行了,因为我不需要添加任何手动设置。 + +![nginx_auto_proxy](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx_auto_proxy-1024x408.png) + +当Nginx配置完后,你可以在这里为你的域选择PHP-FPM实例。 + +![php-fpm1](http://blog.linoxide.com/wp-content/uploads/2016/01/php-fpm1-1024x408.png) + +![php54](http://blog.linoxide.com/wp-content/uploads/2016/01/php54-1024x169.png) + +![php55](http://blog.linoxide.com/wp-content/uploads/2016/01/php55.png) + +就像你在截图中所看到的,我服务器上的默认PHP-FPM是**PHP 54**,而我正要将我的域的PHP-FPM实例单独修改成**PHP 55**。当你为你的域修改PHP-FPM后,你可以通过访问**phpinfo**页面来确认。 + +谢谢你们参考本文,我相信这篇文章会给你提供不少信息和帮助。我会为你们推荐关于这个内容的有价值的评论 :)。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/enable-multiple-php-fpm-instances-nginx-apache/ + +作者:[Saheetha Shameer][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/saheethas/ From b7d17528a5cc1c83b6e6d8c0c069dcbbdb571310 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 20:05:24 +0800 Subject: [PATCH 0950/1710] Create A Linux-powered microwave oven.md --- .../tech/A Linux-powered microwave oven.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sources/tech/A Linux-powered microwave oven.md diff --git a/sources/tech/A Linux-powered microwave oven.md b/sources/tech/A Linux-powered microwave oven.md new file mode 100644 index 0000000000..f1e35685b7 --- /dev/null +++ b/sources/tech/A Linux-powered microwave oven.md @@ -0,0 +1,51 @@ +A Linux-powered microwave oven +================================================================================ + +Scratching an itch is a recurring theme in presentations at [linux.conf.au](http://linux.conf.au/). As the open-hardware movement gains strength, more and more of these itches relate to the physical world, not just the digital. David Tulloh used his [presentation [WebM]](http://mirror.linux.org.au/linux.conf.au/2016/04_Thursday/D4.303_Costa_Theatre/Linux_driven_microwave.webm) on the “Linux Driven Microwave” to discuss how annoying microwave ovens can be and to describe his project to build something less irritating. + +Tulloh's story began when he obtained a microwave oven, admittedly an inexpensive one, with a user interface even worse than the norm. Setting the time required pressing buttons so hard that the microwave tended to get pushed away — a fact that was elegantly balanced by the door handle requiring a sufficiently hard tug to return the oven to its original position. While this is clearly an extreme case, Tulloh lamented that microwave ovens really hadn't improved noticeably in recent decades. They may have gotten a little cheaper and gained a few features that few people could use without poring over the instruction manual — the implied contrast to smartphones, which are widely used with little instruction, was clear. + +This microwave oven was not a lost cause — it gave its life to the greater good and became the prototype for an idea that Tulloh hopes to turn into a crowd-funded project if he can find the right match between features and demand: a Linux-driven microwave oven. + +![](https://static.lwn.net/images/2016/lca-oven-sm.jpg) + +## Adding novelty + +Adding a smartphone-like touchscreen and a network connection and encouraging a community to build innovative apps such as recipe sharing are fairly obvious ideas once you think to put “Linux” and “microwave oven” together, but Tulloh's vision and prototype lead well beyond there. Two novel features that have been fitted are a thermal camera and a scale for measuring weight. + +The thermal camera provides an eight-by-eight-pixel image of the contents of the oven with a precision of about two degrees. This is enough to detect if a glass of milk is about to boil over, or if the steak being thawed is in danger of getting cooked. In either case, the power can be reduced or removed. If appropriate, an alert can be sounded. This would not be the first microwave to be temperature sensitive — GE sold microwave ovens with temperature probes decades ago — but an always-present sensor is much more useful than a manually inserted probe, especially when there is an accessible API behind it. + +The second innovation is a built-in scale to weigh the food (and container) being cooked. Many recipes give cooking-time guidance based on weight and some microwave ovens allow you to enter the weight manually so it can do a calculation for you. With built-in scales, that can become automatic. Placing a scale reliably under the rotating plate typical of many microwave ovens would be a mechanical challenge that Tulloh did not think worth confronting. Instead his design is based on the “flat-plate” or “flat-bed” style of oven — placing a sensor at each of the four corners is mechanically straightforward and gives good results. + + [User interface] +Once you have these extra sensors — weight and temperature — connected to a suitable logic engine, more interesting possibilities can be explored. A cup of cold milk from the fridge will have a particular weight and temperature profile with a modest degree of error. Tulloh suggested that situation could be detected and some relevant options such as “Boil” or “Warm” could be offered for easy selection (a mock up of the interface is at right, a clickable version is [here](http://mwgui.tulloh.id.au/)). Simple machine learning could extend this to create a personalized experience. It would be easy to collect a history of starting profiles and cooking choices; when those patterns are detected, the most likely cooking choices could be made the easiest to select. + +![](https://static.lwn.net/images/2016/lca-ovengui-sm.png) + +## Overcoming staleness + +Beyond just new functionality, Tulloh wants to improve the functionality that already exists. Door handles as stiff as on Tulloh's cheap microwave may not be common, but few microwave oven doors seem designed to make life easy for people with physical handicaps. There are regulatory restrictions, particularly in the US, that require the oven to function only if there is positive confirmation that the door is actually shut. This confirmation must be resilient against simple fraud, so poking a stick in the hole must not trick the oven into working with the door open. In fact, there must be two independent confirmations and, if they disagree, a fuse must be blown so that a service call is required. Tulloh believes that a magnetic latch would provide much greater flexibility (including easy software control) and that magnetic keying similar to that used in a [magnetic keyed lock](https://en.wikipedia.org/wiki/Magnetic_keyed_lock) would allow the magnetic latch to pass certification. + +Another pain point with microwave ovens is the annoying sounds they make. Tulloh has discarded the beeper and hooked up a speaker to the Banana Pi that is controlling his prototype. This allows for more pleasant and configurable alerts as well as for advice and guidance through a text-to-speech system. Adding a microphone for voice control is an obvious next step. + +Many microwave ovens can do more than just set a time and a power level — they provide a range of power profiles for cooking, warming, defrosting, and so on. Adding precise temperature sensing will allow the community to extend this range substantially. A question from Andrew Tridgell in the audience wondered if tempering chocolate — a process that requires very precise temperature control — would be possible. Tulloh had no experience with the process, and couldn't make promises, but thought it was certainly worth looking in to. Even if that doesn't work out, it shows clear potential for value to be gained from community input. + +## Availability + +Tulloh would very much like to get these Linux-enabled microwave ovens out into the world to create a community and see where it goes. Buying existing ovens and replacing the electronics is not seen as a viable option. The result would be ugly and, given that a small-run smart microwave will inevitably cost more, potential buyers are going to want something that doesn't look completely out of place in their kitchen. + +Many components are available off-the-shelf (magnetron, processor board, thermal sensor) and others, such as a USB interface for the thermal sensor, are easily built. Prototype software is, of course, already available on [GitHub](https://github.com/lod?tab=repositories). The case and door are more of a challenge and would need to be made to order. Tulloh wants to turn this adversity into an opportunity by providing the option for left-handed microwave ovens and a variety of colors. + +A quick survey of the audience suggested that few people would hastily commit to his target price of $AU1000 for a new, improved, open oven. Whether a bit more time for reflection and a wider audience might tip the balance is hard to know. The idea is intriguing, so it seems worth watching Tulloh's [blog](http://david.tulloh.id.au/category/microwave/) for updates. + + +------------------------------------------------------------------------------ + + +via: https://lwn.net/Articles/674877/ + +作者:Neil Brown +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 683d6b5f114edf4a84c92759b702eaff34c62613 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 20:06:54 +0800 Subject: [PATCH 0951/1710] Rename A Linux-powered microwave oven.md to 20160218 A Linux-powered microwave oven.md --- ...crowave oven.md => 20160218 A Linux-powered microwave oven.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/{A Linux-powered microwave oven.md => 20160218 A Linux-powered microwave oven.md} (100%) diff --git a/sources/tech/A Linux-powered microwave oven.md b/sources/tech/20160218 A Linux-powered microwave oven.md similarity index 100% rename from sources/tech/A Linux-powered microwave oven.md rename to sources/tech/20160218 A Linux-powered microwave oven.md From e4f469029bdc99ee22bc0ab8b7a8a0db956c134e Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 20:21:04 +0800 Subject: [PATCH 0952/1710] =?UTF-8?q?20160218-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng List of Raspberry Pi 2 Distributions.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md diff --git a/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md new file mode 100644 index 0000000000..5203be38d8 --- /dev/null +++ b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md @@ -0,0 +1,43 @@ +Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions +============================================================== +Last week’s news that Tizen 3.0 has been ported to the Raspberry Pi 2 Model B is the latest example of how the year-old ARMv7 version of the Pi is attracting ports from more powerful Linux distributions, most notably Fedora, Ubuntu MATE, and Snappy. The [Samsung Open Source Group’s Tizen for Pi](http://blogs.s-osg.org/bringing-tizen-to-a-raspberry-pi-2-near-you/) project has been underway for several years, achieving several beta releases, and now the effort has shifted to the new Tizen 3.0. It’s still in beta, but now you can create builds for the Pi 2 using tools from the [Yocto](https://www.yoctoproject.org/) Project and [OpenEmbedded project](http://www.openembedded.org/wiki/Main_Page). + +Tizen 3.0 offers performance and security improvements, multiple-user and 64-bit support, and an Internet of Things (IoT) framework. Samsung, the principal backer of the [Linux Foundation hosted Tizen project](https://www.tizen.org/), is using the Pi port to expand the base of developers using Tizen for IoT projects, according to an [IDG News Service post](http://www.cio.com/article/3031812/samsung-hopes-raspberry-pi-can-spread-tizen-os-adoption.html) that reported on the port. + +Although Samsung finally [shipped a Tizen-based](http://www.linux.com/news/embedded-mobile/mobile-linux/837843-samsung-sells-a-million-tizen-phones-as-mozilla-rethinks-firefox-os) phone in India last summer, and Gear smartwatches continue to use Tizen, the main focus now appears to be on IoT. At CES last month, Samsung [announced](http://www.linux.com/news/embedded-mobile/mobile-linux/877879-linux-based-drones-upstage-other-mobile-gadgets-at-ces) that all of its Tizen-based, 2016 Smart TVs will be able to act as SmartThings home automation hubs, letting users monitor the household while watching TV. + +## The Growing List of Pi Distros + +[Elinux.org](http://elinux.org/RPi_Distributions) lists some 46 ARMv6-ready distributions that run on all the Raspberry Pi boards. A separate listing notes two ARMv7-only distros that require the ARMv7 Raspberry Pi 2: Ubuntu MATE, which replaces the resource-intensive Unity desktop with the Gnome 2.0 flavored MATE, and Windows 10 IoT Core. The prominent placement of a Microsoft distribution is not as controversial as one might have thought. To many younger Linux developers and casual Pi hackers, Microsoft is just another tech company, not so much the evil empire loathed by old-time Linux hackers. + +Windows 10 IoT Core isn’t the only non-Linux distro running on the Pi. There’s also the Unix-like FreeBSD and NetBSD, as well as the revived RISC OS Pi version of the old Acorn Computers OS. Some of the 48 operating systems on the Elinux.org list are incomplete, out-of-date, or dedicated to limited niches. [DistroWatch](https://distrowatch.com/search.php?category=Raspberry+Pi) offers a more manageable list of 20. + +The [Raspberry Pi Foundation](https://www.raspberrypi.org/) still prominently posts a download page for its homegrown, Debian-based Raspbian, in both standard and NOOBS packages. This lightweight distro is still the most popular and typically the highest rated Linux build for the Pi. The Scratch-ready distro is especially equally suited for desktop use and embedded hacking with home automation gear, robots, and other IoT gizmos. Raspbian recently [received an update](http://news.softpedia.com/news/raspbian-gets-experimental-opengl-driver-gpu-now-used-for-acceleration-500152.shtml) with an experimental OpenGL driver for doing hardware acceleration on the VideoCore IV GPU used with the Pi 2’s Broadcom BCM2836 SoC. + +The Pi Foundation also lists several [third-party downloads](https://www.raspberrypi.org/downloads/). In addition to Windows 10 IoT Core and and Ubuntu MATE, the list includes the lightweight, transactionally focused [Snappy Ubuntu Core](http://www.linux.com/news/embedded-mobile/mobile-linux/804659-ubuntu-snappy-leads-mobile-linux-migration-to-iot) for the Pi 2. Canonical is aiming Snappy at those who want an app platform and cloud integration in embedded devices like drones and IoT devices. Snappy also came out last week in a version designed for [Intel NUC mini-PCs](https://insights.ubuntu.com/2016/02/10/ubuntu-core-is-available-for-the-intel-nuc/). The Pi Foundation also posts images for RISC OS and the education-focused PINET. There are also two media center distros related to KODI/XBMC: OSMC and OpenElec. + +In addition to its list of 48 released distros, Elinux.org lists several “announced” distros including Firefox OS, [openSUSE](https://www.reddit.com/r/openSUSE/comments/3hxrz4/opensuse_on_a_raspberry_pi_2_armv7/), Meego MER & XBMC, Puppy, RPi-Buildroot, and Aros. Missing, however, is Tizen, as well as newly announced ports such as [Manjaro-ARM](http://www.linux-arm.info/index.php/1103-hands-on-more-adventures-with-manjaro-arm-for-the-raspberry-pi-2) and the CentOS 7-based [CentOS AltArch 7](http://www.linux-arm.info/index.php/1054-centos-altarch-7-now-available-for-aarch64-powerpc64-powerpc8-le-and-armhfp) for the Pi 2, Banana Pi, and CubieTruck SBCs. + +## Android Still Pi in the Sky + +Elinux.org’s “announced” list also includes Android and a Miracast-like program called Android Transporter. People have been trying to port Android to the Pi for years; yet, even with the more suitable [Pi 2](http://www.linux.com/news/embedded-mobile/mobile-linux/807087-faster-raspberry-pi-2-says-yes-to-ubuntu-and-windows-but-wheres-android) shipping for a year now, Android is still pretty much a no-show. Android can run on lower-powered SoCs than the Pi 2’s quad-core, Cortex-A7, but the limited 1GB of RAM and the lack of GPU acceleration are big challenges. Perhaps Raspbian’s OpenGL driver could be ported to Android as well, although the Pi Foundation does not seem very interested in Android. + +There are several Android-for-Pi projects in the works, but without the foundation’s backing, there is still nothing close to a complete port. Projects include an [AOSP Marshmallow](http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-joins-growing-list-of-raspberry-pi-2-distros#!topic/android-rpi/YW_gGr8wZkk) patch-set from Peter Yoon, as well as a [RaspAnd](https://extonlinux.wordpress.com/2015/04/05/run-android-5-1-lollipop-exton-build-on-your-raspberry-pi-2/) release based on the Ubuntu-based RaspEx, which makes use of the Aptoide package manager to load some Android 5.1 apps on a Pi 2. The [Razdroid project](https://www.raspberrypi.org/forums/viewtopic.php?f=73&t=19106), which aims to tap into the secrets of Broadcom hardware acceleration, seems to have stalled. + +Most Rasp Pi users, however, appear more interested in [Ubuntu MATE](https://ubuntu-mate.org/raspberry-pi/), which was never optimized for ARMv6, and Fedora. For years, Pi users have run the lightweight spin-down of Fedora called Pidora, but with the Pi 2, they can now try the real thing. The Raspberry Pi Foundation has yet to post Fedora, but the recent [betas of the Pi 2 port](https://chisight.wordpress.com/2015/10/19/fedora-22-or-23-on-raspberry-pi-2/) have received high marks. + +Other Linux distributions that regularly make Top Pi distro lists include Arch Linux, which unlike most ports from mature Linux distros, works just fine on ARMv6. A recent [TechRadar Top 5 list](http://www.techradar.com/us/news/software/5-of-the-most-popular-raspberry-pi-distros-1292537) includes several more niche distros in addition to Raspbian. These include the OSMC media player environment, RetroPie for playing classic games, OpenMediaVault for turning your Pi into a NAS, and Pi MusicBox, based on the Mopidy music streaming server. + +Beyond Ubuntu, Fedora, and Tizen, other distros, both arcane and general, are heading for the Pi 2, as well. The platform is rapidly expanding the boundaries of, as well as redefining the meaning of, desktop Linux. + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-joins-growing-list-of-raspberry-pi-2-distros + +作者:[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) From 47be313d3315e8713b5f4e29ac2350f126b656f2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 20:32:55 +0800 Subject: [PATCH 0953/1710] =?UTF-8?q?20160218-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...160218 Russia Announces Switch to Linux.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sources/news/20160218 Russia Announces Switch to Linux.md diff --git a/sources/news/20160218 Russia Announces Switch to Linux.md b/sources/news/20160218 Russia Announces Switch to Linux.md new file mode 100644 index 0000000000..aa7fb66a86 --- /dev/null +++ b/sources/news/20160218 Russia Announces Switch to Linux.md @@ -0,0 +1,33 @@ +This Week in Linux News:Russia Announces Switch to Linux, Outdated Fight for the Linux Desktop +========================================================================= +This week in Linux news, Russia announces a possible switch to Linux, Jack Wallen ponders the importance of the Linux Desktop in 2016, and more! Get up-to-date on the Latest Linux news with our weekly digest. + +1. Russia announces a possible switch to Linux in retalliation against Western business embargo on Crimea. + + [Russia Might Switch Thousands of Government Computers to Linux to Spite Microsoft](http://www.techradar.com/news/world-of-tech/russia-might-switch-thousands-of-government-computers-to-linux-to-spite-microsoft-1314762) - TechRadar + +2. "It doesn't matter if Linux has 1% or 99% of the desktop market share" writes Jack Wallen. + + [Should the Fight for the Linux Desktop Really Matter?](http://www.techrepublic.com/article/should-the-fight-for-the-linux-desktop-really-matter/) - TechRepublic + +3. The Linux Foundation's Hyperledger Project experiences growth in membership since its launch in December. + + [Linux Foundation-Led Blockchain Project Grows to 30 Members](http://www.coindesk.com/linux-foundation-led-hyperledger-project-swells-to-30-members/) - CoinDesk + +4. Docker's founder and CTO, Solomon Hykes, suggests Alpine Linux will be the company's new default OS. + + [Is Docker Ditching Ubuntu Linux? Confusion Reigns](http://www.infoworld.com/article/3031847/open-source-tools/is-docker-ditching-ubuntu-linux-confusion-reigns.html) - InfoWorld + +5. The Node.js Foundation, a Linux Foundation Collaborative Project, will bring in popular third-party "Express" package. + + [The Node.js Foundation Plans to Incubate One of the Community’s Most Popular Packages](http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more#gref)- The Next Web + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more + +作者:[linux.com][linux.com] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e1423fd93635f7b85b6d9c8b28841108d81edf7a Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 20:43:32 +0800 Subject: [PATCH 0954/1710] =?UTF-8?q?20160218-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Releases Free Linux IDE for 32-Bit MCUs.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md diff --git a/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md new file mode 100644 index 0000000000..d90f6bfbce --- /dev/null +++ b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md @@ -0,0 +1,54 @@ +ST Releases Free Linux IDE for 32-Bit MCUs +================================================= + +![](http://www.linux.com/images/stories/66866/STM32_Nucleo_expansion_board.jpg) + +The 32-bit microcontroller world is starting to open up to Linux. This week, leading ARM Cortex-M vendor STMicroelectronics (ST) [released](http://www.st.com/web/en/press/p3781) a free Linux desktop version of its development software for its line of STM32 microcontroller units (MCUs). The tools include ST’s STM32CubeMX configurator and initialization tool, as well as its [System Workbench for STM32 (SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) , an Eclipse-based IDE created by Ac6 Tools. SW4STM32 is supported with toolchain, forums, blogs, and technical support by the [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) development community. + +"The Linux community is known to attract creative free-thinkers who are adept at sharing ideas and solving challenges efficiently," stated Laurent Desseignes, Microcontroller Ecosystem Marketing Manager, Microcontroller Division, STMicroelectronics. "We are now making it ultra-easy for them to apply their skills to create imaginative new products, leveraging the features and performance of our STM32 family." + +Linux is the leading platform for Internet of Things gateways and hubs, as well as higher-end IoT endpoints. Yet, much of the IoT revolution, as well as the wearables market, is based on tiny, low-power microcontrollers, increasingly Cortex-M chips. A small subset of these can run the stripped-down uCLinux (see below), but none support more comprehensive Linux distributions. Instead, they are controlled with real-time operating systems (RTOSes) or go bare-bones with no OS at all. The firmware development work is typically done on a Windows-based Integrated Development Environment (IDE). + +With ST’s free tools, Linux developers can more easily tap this new realm. ST’s tools, some of which should also be available for Mac OS/X in the second quarter, work with [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) boards, Discovery kits, and Evaluation boards. The Nucleo boards are available in 32-, 64-, and 144-pin versions, and offer hardware add-ons such as Arduino connectors. + +The STM32CubeMX configurator and SW4STM32 IDE enable Linux developers to configure microcontrollers and develop and debug code. SW4STM32 supports the ST-LINK/V2 debugging tool under Linux via an adapted version of the [OpenOCD](http://openocd.org/) community project. + +The software is compatible with microcontroller firmware within the STM32Cube embedded-software packages or Standard Peripheral Library, says ST. Targets include ST’s full range of MCUs, from entry-level Cortex-M0 cores to high-performing M7 chips, including M0+, M3, and DSP-extended M4 cores. + +ST is not the first 32-bit MCU vendor to offer Linux-ready IDEs for Cortex-M chips, but it appears to be one of the first major free Linux platforms. For example, NXP, whose share of the MCU market increased with its recent acquisition of Freescale (Kinetis MCUs, among others), offers an [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO) with Linux, Windows, and Mac support. However, LPCXpresso costs $450 per individual seat. + +Microsemi, which integrates Cortex-M3 chips in its [SmartFusion FPGA SoCs](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3) has a [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support) available for Red Hat Enterprise Linux (RHEL) in addition to Windows. However, Libero requires a license, and the RHEL version lacks support for add-on packages such as FlashPro and SoftConsole. + +## Why Learn MCU-Speak? + +Even if a Linux developer has no plans to load uClinux on a Cortex-M chip, knowledge of MCUs should come in handy. This is especially true with complex, heterogeneous IoT projects that extend from MCU-based endpoints to cloud platforms. + +For prototyping and hobbyist projects, an interface to an Arduino board offers fairly easy access to MCU benefits. Yet beyond prototyping, developers often replace the Arduino board and its 8-bit ATmega32u4 MCU with a faster 32-bit Cortex-M chip with additional functionality. This includes improved memory addressing, independent clock settings for the core and various buses, and in the case of some [Cortex-M7](http://www.electronicsnews.com.au/products/stm32-mcus-with-arm-cortex-m7-processors-and-graph) chips, rudimentary graphics. + +Other categories where MCU development skills might come in handy include wearables, where low power, low cost, and small size give MCUs an edge, and robotics and drones where real-time processing and motor control are the main benefits. In robotics, you’re likely to see Cortex-A and Cortex-M both integrated in the same product. + +There’s also a modest trend toward system-on-chips adding MCUs to Linux-driven Cortex-A cores, as with the [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/). While most embedded projects don’t use such hybrid SoCs or combine applications processor and MCUs on the same product, developers may increasingly find themselves working on product lines that extend from low-end MCU models to Linux- or Android-driven Cortex-A based designs. + +## uClinux Stakes Linux Claim in MCUs + +With the rise of IoT, we’re starting to see more SBCs and computer-on-modules that run uClinux on 32-bit MCUs. Unlike other Linux distributions, uClinux does not require a memory management unit (MMU). uClinux does, however, have higher memory requirements than most MCUs can meet. The distro requires higher end Cortex-M4 and Cortex-M4 MCUs with built-in memory controllers supporting external DRAM chips. + +[Amptek’s iCon](http://www.semiconductorstore.com/Amptek/) SBCs run uClinux on NXP LPC Cortex-M3 and -M4 chips, offering familiar trappings like WiFi, Bluetooth, USB, and other interfaces. Arrow’s [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) IoT development kit runs uClinux on an Emcraft Systems SmartFusion2 COM based on Microsemi’s 166MHz, Cortex-M3/FPGA SmartFusion2 hybrid SoC. + +[Emcraft](http://www.emcraft.com/), which sells uClinux-based COMs based on ST and NXP, as well as Microsemi MCUs, has been actively promoting the role of uClinux on 32-bit MCUs. Increasingly, uClinux is up against ARM’s own [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/), at least on high-end MCU projects that require wireless communications and more sophisticated rules-based operation. Proponents of Mbed and modern, open source RTOSes like FreeRTOS say that uClinux requires too much RAM overhead to make it affordable for IoT endpoints. However, Emcraft and other uCLinux proponents claim the costs are overstated, and are worth the more extensive Linux wireless and interface support available even in a stripped down distro like uClinux. + +When asked for comment on the ST release, Emcraft director of engineering Vladimir Khusainov had this to say: “ST’s decision to port its development tools to Linux is good news for Emcraft since it allows Linux users an easy way to start working with embedded STM MCUs. We expect that, having had a chance to get familiar with STM devices using the ST configurator and embedded libraries, some of those users may become interested in running embedded Linux (in its uClinux form) on the target.” + +For a recent overview of uClinux on Cortex-M4, check out this [slide show](http://events.linuxfoundation.org/sites/events/files/slides/optimize-uclinux.pdf) from last year’s Embedded Linux Conference by Jim Huang and Jeff Liaw. More on Cortex-M processors in general may be found in this tidy [AnandTech overview](http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores). + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus + +作者:[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://www.linux.com/community/forums/person/42808 From 8136b37aaf7dc2ca5ff8ec43994c76b60e37bfdf Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:01:59 +0800 Subject: [PATCH 0955/1710] =?UTF-8?q?20160218-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Getting to Know Linux File Permissions.md | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sources/tech/20160218 Getting to Know Linux File Permissions.md diff --git a/sources/tech/20160218 Getting to Know Linux File Permissions.md b/sources/tech/20160218 Getting to Know Linux File Permissions.md new file mode 100644 index 0000000000..03f6d5018e --- /dev/null +++ b/sources/tech/20160218 Getting to Know Linux File Permissions.md @@ -0,0 +1,147 @@ +Getting to Know Linux File Permissions +========================================== + +![](http://www.linux.com/images/stories/66866/files_a.png) + +One of the most basic tasks in Linux is setting file permissions. Understanding how this is done should be considered a must-know, first step in your travels through the Linux ecosystem. As you might expect, such a fundamental issue within the operating environment hasn’t changed much over the years. In fact, the Linux file permission system is taken directly from the UNIX file permission (and even uses many of the same tools). + +But, don’t think for a second that understanding file permissions is something you’ll wind up having to spend days and days studying...it’s actually quite simple. Let’s walk through what you need to know and how to put it all together. + +## The Bits and Pieces + +The first thing you need to understand is what file permissions apply to. Effectively what you do is apply a permission to a group. When you break it down, the concept really is that simple. But what are the permissions and what are the groups? + +There are three types of permissions you can apply: + +- read — gives the group permission to read the file (indicated with `r`) + +- write — gives the group permission to edit the file (indicated with `w`) + +- execute — gives the group permission to execute (run) the file (indicated with `x`) + +To better explain how this is applied to a group, you could, for example, give a group permission to read and write to a file, but not execute the file. Or, you could give a group permission to read and execute a file, but not write to a file. You can even give a group full permission to read, write, and execute a file or strip a group of any access to a file by removing all permissions. + +Now, what are the groups? There are four: + +- user — the actual owner of the file + +- group — users in the file’s group + +- others — other users not in the file’s group + +- all — all users + +For the most part, you will only really ever bother with the first three groups. The all group is really only used as a shortcut (I’ll explain later). + +So far so simple, right? Let’s layer on a bit of complexity. + +If you open up a terminal window and issue the command ls -l, you will see a line-by-line listing of all files and folders within the current working directory (Figure 1 above). + +If you look in the far left column, you’ll notice listings like `-rw-rw-r--`. + +That listing should actually be looked at like so: + +>rw- rw- r-- + +As you can see, the listing is broken into three sections: + +- rw- + +- rw- + +- r-- + +The order is quite important...for both permissions and for groups. The order is always: + +- User Group Others — for groups + +- Read Write Execute — for permissions + +In our permissions listing example above, the User has read/write permission, the Group has read/write permission, and Others has only read permission. Had any of those groups been given executable permissions, it would have been represented with an x. + +## Numerical Equivalent + +Let’s make this even more complex. Each permission can also be represented by a number. The numbers are: + +- Read — 4 + +- Write — 2 + +- Execute — 1 + +The numerical substitution isn’t an apples to apples change. You can’t drop in: + +>-42-42-4-- + +Instead, what you do is add up the numbers you want for each group. Let’s stick with our example above (`-rw-rw-r—`). To give the User group read and write permission, you would add up 4+2 to get 6. For the Group, you need the same permissions, so they get the same number. You only want Others to have read permissions, so they get 4. The numerical equivalent is now: + +>664 + +So, if you want to give a file 664 permissions, you’d issue the chmod command like this: + +>chmod 664 FILENAME + +where FILENAME is the name of the file. + +## Changing Permissions + +Now that you understand the actual permissions of files, it’s time to learn how to change those permissions. This is done with the chmod command. One of the first things you must understand is that, to be able to change the permissions of a file, either you must be the owner of the file or you must have permission to edit the file (or have admin access by way of su or sudo). Because of that, you cannot just jump around in the directory structure and change permissions of files at will. + +Let’s stick with our example (`-rw-rw-r--`). Suppose this file (we’ll name it script.sh) is actually a shell script and needs to be executed...but you only want to give yourself permission to execute that script. At this point, you should be thinking, “Ah, then I need the permission listing to read `-rwx-rw-r--`!”. To get that `x` bit in there, you’d run the chmod command like so: + +>chmod u+x script.sh + +At this point, the listing will be -rwx-rw-r--. + +If you wanted to give both User and Group executable permission, the command would look like: + +>chmod ug+x script.sh + +See how this works? Let’s make it interesting. Say, for whatever reason, you accidentally give all groups executable permissions for that file (so the listing looks like `-rwx-rwx-r-x`). If you want to strip Others of executable permissions, issue the command: + +>chmod o-x script.sh + +What if you want to completely remove executable permission from the file? You can do that two ways: + +>chmod ugo-x script.sh + +or + +>chmod a-x script.sh + +That’s where all comes into play. This is used to make the process a bit more efficient. I prefer to avoid using a as it could lead to issues (such as, when you accidentally issue the command chmod `a-rwx` script.sh). + +## Directory Permissions + +You can also execute the chmod command on a directory. When you create a new directory as a user, it is typically created with the following permissions: + +>drwxrwxr-x + +NOTE: The leading d indicates it is a directory. + +As you can see, both User and Group have executable permission for the folder. This does not mean that any files created in the folder will have the same permissions (files will be created with the default system permissions of `-rw-rw-r--`). But, suppose you do create files in this new directory, and you want to strip Group of write permissions. You don’t have to change into the directory and then issue the chmod command on all the files. You can add the R option (which means recursive) to the chmod command and change the permission on both the folder and all the containing files. + +Now, suppose our example is a folder named TEST and within it is a number of scripts — all of which (including the TEST folder) have permissions `-rwxrwxr-x`. If you want to strip Group of write permissions, you could issue the command: + +>chmod -R g-w TEST + +If you now issue the command ls `-l`, you will see the TEST folder now has a permission listing of `drwxr-xr-x`. Group has been stripped of its write permissions (as will all the files within). + +## Permission to Conclude + +At this point, you should now have a solid understand of the basic Linux file permissions. There are more advanced issues that you can now easily study, such as setuid and setgid and ACLs. Without a good foundation of the basics, however, you’d quickly get lost with those next-level topics. + +Linux file permissions haven’t changed much, since the early days. And, they most likely won’t change much going into the future. + + +------------------------------------------------------------------------------ + +via: http://www.linux.com/learn/tutorials/885268-getting-to-know-linux-file-permissions + +作者:[Jack Wallen][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/93 From 480813356abe9606acec9037b0c292b8e8bd928d Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:06:17 +0800 Subject: [PATCH 0956/1710] =?UTF-8?q?20160218-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20160218 A Linux-powered microwave oven.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20160218 A Linux-powered microwave oven.md b/sources/tech/20160218 A Linux-powered microwave oven.md index f1e35685b7..109212ad14 100644 --- a/sources/tech/20160218 A Linux-powered microwave oven.md +++ b/sources/tech/20160218 A Linux-powered microwave oven.md @@ -41,7 +41,6 @@ A quick survey of the audience suggested that few people would hastily commit to ------------------------------------------------------------------------------ - via: https://lwn.net/Articles/674877/ 作者:Neil Brown From 10ccb319a19d83164857e9ec94db554b6b9528ae Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:17:42 +0800 Subject: [PATCH 0957/1710] =?UTF-8?q?20160218-7=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...creates diabetes project for the masses.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md diff --git a/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md b/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md new file mode 100644 index 0000000000..7ac86c8045 --- /dev/null +++ b/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md @@ -0,0 +1,34 @@ +Mozilla contributor creates diabetes project for the masses +================================================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) + +My open source story started in high school as a student. I always considered myself to be a hacker—not the malicious type, but the curious type who liked to tinker with code and hardware. My first encounter with open source was in 2001 when I installed my first Linux distro, [Lindows](https://en.wikipedia.org/wiki/Linspire). Of course, I was also an early user of [Mozilla Firefox](https://www.mozilla.org/en-US/firefox/new/?utm_source=firefox-com&utm_medium=referral). + +As a result of my early adoption of Linux, the first version I used was 1.0.4 (if I recall correctly), and I immediately fell in love. While I did not stay long with Lindows, hopping across many distros ([Debian](https://www.debian.org/), [Puppy Linux](http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm), [SUSE](https://www.suse.com/), [Slackware](http://www.slackware.com/), [Ubuntu](http://ubuntu.com/)) over the years I continued to use open source software on a daily basis from my youth into adulthood. + +Eventually, I consistently used Ubuntu. Around the release of Hardy Heron I started some of my first contributions to Ubuntu, helping out on IRC and helping users locally who needed help. With Ubuntu being where I cut my teeth in open source, it has always had a special place in my heart. The community behind Ubuntu is very diverse, passionate, and friendly and everyone comes together with some shared common goals but also individuals' goals as drivers for why they contribute to open source. + +After having contributed to Ubuntu for a while, I started contributing upstream to projects like Debian, [GNOME](https://www.gnome.org/), [Ganeti](https://code.google.com/p/ganeti/), and many others. In the past few years I have contributed to over 40 different open source projects, some small and some very large. + +After some changes in direction in the Ubuntu project, I ended up deciding not only that was it time for me to try something new, but that also I wanted to put my contributions into something new. So I started getting involved in Mozilla around 2009, helping out on IRC and then eventually getting involved with the [Mozilla WebFWD program](https://webfwd.org/), becoming a team member, then the [Mozilla Reps Program](https://reps.mozilla.org/), [Mozilla DevRel Program](https://wiki.mozilla.org/Devrel), and then for just over two years was a Firefox Community Release Manager overseeing the release of Firefox Nightly and Firefox ESR. Contributing to Mozilla was an even more rewarding experience than contributions to other open source projects. Of all the open source communities I've been involved in, Mozilla has been the most diverse, largest, and friendliest. + +One thing that has happened over the years in terms of my feelings about open source is I've become more and more aligned to the values of free software and more defensive of things like privacy and respecting licensing and working in the open. I believe all three of those topics are very important to open source, and while many may not care about these things it's important that people advocate for them. + +And here I am today, no longer a full-time contributor to other people's open source projects. Recently being diagnosed with diabetes, I saw a gap in the open source ecosystem where open source health software was not very abundant. Where it did exist, it was not as active as other open source software applications like Linux distros or browsers. + +I recently founded my own open source project, [Glucosio](http://www.glucosio.org/), to bring open source diabetes management and research software to the masses. My years of contributing to open source projects and observing various structures has really come in handy being a project leader now. I'm very excited about the future of Glucosio, but most importantly about the future open source and how that will play out in health and medicine. + +There is a lot of potential for software innovation in healthcare, and I think we will soon see a startup disrupt healthcare and medicine with open source solutions. + +------------------------------------------------------------------------------ + +via: https://opensource.com/life/15/11/my-open-source-story-ben-kerensa + +作者:[opensource.com][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:opensource.com From 81b7e1c8d8cdae0dbd061f32126392b5ac84d516 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:32:41 +0800 Subject: [PATCH 0958/1710] =?UTF-8?q?20160218-8=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...untu Edition Announced and It's a Beast.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md diff --git a/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md new file mode 100644 index 0000000000..5fb0d286d0 --- /dev/null +++ b/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -0,0 +1,37 @@ +Meizu PRO 5 Ubuntu Edition Announced and It's a Beast +======================================================== + +## Canonical and Meizu have just revealed that Meizu PRO 5 Ubuntu Edition will be available for pre-order during Mobile World Congress 2016. + +It's been a while since we last heard something from Meizu, but it looks like the collaboration between Canonical and the Chinese hardware maker is still alive. From the looks of it, the previous Meizu MX4 Ubuntu Edition was only a limited release, so only a small number of devices have been sold. + +We can only hope that Meizu PRO 5 Ubuntu Edition will be made available in greater numbers, especially since it's a much newer phone that's still supported by Meizu. + +This latest Meizu PRO 5 Ubuntu Edition is the fifth official device that comes with Ubuntu Touch, and we'll likely see many more phones and maybe tablets with this operating system landing in 2016. + +##Meizu PRO 5 Ubuntu Edition is a beast + +Canonical says that it's the most powerful Ubuntu smartphone launched to date, and they are right, not to mention that it's also the biggest, if we don't count the tablet. Meizu PRO 5 features a Samsung Exynos 7420 Octa-core processor, a 5.7-inch 1920x1080 AMOLED display, Corning Gorilla Glass 3, and LPDDR4 memory technology. + +Many of you will probably ask if this new phone is also capable of desktop convergence, and it looks that users are in luck. + +"Canonical remains committed to the vision of reinventing personal computing through a single, adaptive platform for all personal device form factors. As such, while the PRO 5 lacks MHL output, the software running on the Meizu PRO 5 is the latest code which also powers recently announced tablets and other devices and is capable of providing a traditional desktop experience," the company explained. + +Meizu PRO 5 was initially launched back in September 2015. Users will also get a 21 MP back camera, and the phone can shoot video at 2160p and 30fps. It also comes with a fingerprint sensor and a Li-Ion 3050 mAh battery with fast charging. + +For now, the phone will only be available in China and Europe, and the preorders will be opened during the Mobile World Congress 2016 that takes place between February 22 and 25. + +![](http://i1-news.softpedia-static.com/images/fitted/620x/meizu-pro-5-ubuntu-edition-announced-and-it-s-a-beast-photos-500526-11.jpg) + + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/embedded-mobile/mobile-linux/886322-meizu-pro-5-ubuntu-edition-announced-and-its-a-beast + +作者:[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 From 630a8ea4c531cfa7c22da8cb59c333fa6b267fba Mon Sep 17 00:00:00 2001 From: miaolin Date: Thu, 18 Feb 2016 21:35:02 +0800 Subject: [PATCH 0959/1710] Update 20160218 Mozilla contributor creates diabetes project for the masses.md --- ...ozilla contributor creates diabetes project for the masses.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md b/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md index 7ac86c8045..61e5c08883 100644 --- a/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md +++ b/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md @@ -1,3 +1,4 @@ +translating by ynmlml Mozilla contributor creates diabetes project for the masses ================================================================ From 849eb6500f1ee20c228562613ca4c5677507e731 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:38:49 +0800 Subject: [PATCH 0960/1710] =?UTF-8?q?20160218-9=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Systems Patched for Critical glibc Flaw.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md diff --git a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md new file mode 100644 index 0000000000..19c654e27e --- /dev/null +++ b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md @@ -0,0 +1,50 @@ +Linux Systems Patched for Critical glibc Flaw +================================================= + +**Google exposed a critical flaw affecting major Linux distributions. The glibc flaw could have potentially led to remote code execution.** + +Linux users today are scrambling to patch a critical flaw in the core glibc open-source library that could be exposing systems to a remote code execution risk. The glibc vulnerability is identified as CVE-2015-7547 and is titled, "getaddrinfo stack-based buffer overflow." + +The glibc, or GNU C Library, is an open-source implementation of the C and C++ programming language libraries and is part of every major Linux distribution. Google engineers came across the CVE-2015-7547 issue when they were attempting to connect into a certain host system and a segmentation fault (segfault) occurred, causing the connection to crash. Further investigation revealed that glibc was at fault and the crash could potentially achieve an arbitrary remote code execution condition. + +"The glibc DNS client side resolver is vulnerable to a stack-based buffer overflow when the getaddrinfo() library function is used," Google wrote in a blog post. "Software using this function may be exploited with attacker-controlled domain names, attacker-controlled DNS [Domain Name System] servers, or through a man-in-the-middle attack." + +Actually exploiting the CVE-2015-7547 issue is not trivial, but it is possible. To prove that the issue can be exploited, Google has published proof-of-concept (PoC) code on GitHub that demonstrates if an end user or system is vulnerable. + +"The server code triggers the vulnerability and therefore will crash the client code," the GitHub PoC page states. + +Mark Loveless, senior security researcher at Duo Security, explained that the main risk of CVE-2015-7547 is to Linux client-based applications that rely on DNS responses. + +"There are some specific conditions, so not every single application will be impacted, but it appears that several command-line utilities, including the popular SSH [Secure Shell] client could trigger the flaw," Loveless told eWEEK. "We deem this serious mainly because of the existing risks to Linux systems, but also because of the potential for other issues." + +Other issues could potentially include a risk of an email-based attack that triggers the vulnerable glibc getaddrinfo() library call. Also of note is the fact that the vulnerability was in the code for years before it was discovered. + +Google's engineers were not the first or only group to discover the security risk in glibc. The issue was first reported to a glibc bug [tracker](https://sourceware.org/bugzilla/show_bug.cgi?id=1866) on July 13, 2015. The roots of the flaw go back even further with the actual code commit that introduced the flaw first in glibc 2.9, which was released in May 2008. + +Linux vendor Red Hat also independently was looking at the bug in glibc and on Jan. 6, 2016, Google and Red Hat developers confirmed that they had been independently working on the same vulnerability as part of the initial private discussion with upstream glibc maintainers. + +"Once it was confirmed that both teams were working on the same vulnerability, we collaborated on potential fixes, mitigations and regression testing," Florian Weimer, principal software engineer for product security at Red Hat, told eWEEK. "We also worked together to make the test coverage as wide as possible to catch any related problems in the code to help prevent future issues." + +It took years to discover that there was a security issue with the glibc code because that flaw isn't obvious or immediately apparent. + +"To diagnose bugs in a networking component, like a DNS resolver, it is common to look at packet traces which were captured while the issue was encountered," Weimer said. "Such packet captures were not available in this case, so some experimentation was needed to reproduce the exact scenario that triggered the bug." + +Weimer added that once the packet captures were available, considerable effort went into validating the fix, leading to a series of refinements culminating in the regression test suite that was contributed upstream to the glibc project. + +In many cases in Linux, the Security Enhanced Linux (SELinux) mandatory access security controls can mitigate the risk of potential vulnerabilities, but that's not the case with the new glibc issue. + +"The risk is a compromise of important system functionality due to the execution of arbitrary code supplied by an attacker," Weimer said. "A suitable SELinux policy can contain some of the damage an attacker might do and constrain their access to the system, but DNS is used by many applications and system components, so SELinux policies offer only limited containment for this issue." + +Alongside the vulnerability disclosure today, there is now a patch available to mitigate the potential risk of CVE-2015-7547. + +------------------------------------------------------------------------------ + +via: http://www.eweek.com/security/linux-systems-patched-for-critical-glibc-flaw.html + +作者:[Michael Kerner][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://twitter.com/TechJournalist From 53edb51ee2248ea32f3f3dc1da200e4c63799440 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:49:57 +0800 Subject: [PATCH 0961/1710] =?UTF-8?q?20160218-10=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 9 Key Trends in Hybrid Cloud Computing.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md diff --git a/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md b/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md new file mode 100644 index 0000000000..003405b4b7 --- /dev/null +++ b/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md @@ -0,0 +1,74 @@ +9 Key Trends in Hybrid Cloud Computing +======================================== + +All three forms of cloud computing – public, private, and hybrid – have undergone considerable evolution since the concepts first gained the attention of IT years ago. Hybrid cloud is the overwhelming favorite form of the cloud, with [88% of firms surveyed](https://www.greenhousedata.com/blog/hybrid-continues-to-be-most-popular-cloud-option-adoption-accelerating) rating it as important or critical to their business. + +The lightning-fast evolution of hybrid cloud means the conventional wisdom of a year or two back is already obsolete. So we asked several industry analysts where they saw the hybrid cloud headed in 2016 and got some interesting answers. + +1. **2016 might be the year that we get hybrid cloud to actually work.** + + By its very nature, hybrid cloud relies on private cloud, which has proven elusive for most enterprises. The fact is that the public cloud – Amazon, Google, Microsoft – have had much more investment and a longer head start. The private cloud has hamstrung the hybrid cloud's growth and usability. + + There hasn't been as much investment in the private cloud because by its very nature, the private cloud means keeping and investing in your own data center. And many public cloud providers are pushing enterprises to reduce or eliminate their data center spending all together. + + However, this year will see the private cloud start to catch up thanks to advances in OpenStack and Microsoft's Azure Stack, which is basically a private cloud in a box. The tools, infrastructures, and architectures to support hybrid cloud are also becoming much more robust. + +2. **Containers, microservices, and unikernels will bolster the hybrid cloud.** + + These are all cloud native technologies and will all be more or less mainstream by the end of 2016, analysts predict. They are maturing rapidly and serving as a viable alternative to virtual machines, which require more resources. + + More importantly, they work in an on-premises scenario as well as an off-premises scenario. Containerization and orchestration allow rapid scale up, scale out, and service migration between public and private cloud, making it even easier to move your services around. + +3. **Data and relevance take center stage** + + The cloud, in all its forms, has been in growth mode. That makes it a technology story. But with the cloud shifting into maturity, data and relevance become more important, according to the consultancy [Avoa](http://avoa.com/2016/01/01/2016-is-the-year-of-data-and-relevance/). At first, the cloud and Big Data were all about sucking up as much data as possible. Then they worried about what to do with it. + + In 2016, organizations will hone their craft in how data is collected and used. There is still much progress to be made in the technological and cultural aspects that must be dealt with. But 2016 should bring a renewed focus on the importance of data from all aspects and finding the most relevant information, not just lots of it. + +4. **Cloud services move beyond just on-demand workloads** + + AWS got its start as a place where a programmer/developer could spin up a VM real quick, get some work done, and get off. That's the essence of on-demand use, and given how much it can cost to leave those services constantly running, there is almost a disincentive to keep them running 24/7. + + However, IT organizations are starting to act as service brokers to provide all manner of IT services to their in-house users. This can be anything from in-house IT services, public cloud infrastructure providers, platform-as-a-service, and software-as-a-service. + + They will increasingly recognize the value of tools like cloud management platforms to provide consistent policy-based management over many of these different services. And they will see the value of technology such as containers to enhance portability. However, cloud service brokering in the sense of rapidly moving workloads between clouds for price arbitrage and related reasons will continue to be a non-starter. + +5. **Service providers become cloud service providers** + + Up to now, buying cloud services has been a direct sale model. The user was frequently the buyer of AWS EC2 services, either through officially recognized channels at work or through Shadow IT. But as cloud services become more comprehensive, and the menu of services more confusing, more and more people are turning to resellers and services providers to act as the purchaser of IT services for them. + + A recent survey by 2nd Watch, a Seattle-based cloud services provider, found nearly 85 percent of IT executives in the United States would be willing to pay a small premium to buy public cloud from a channel partner if it were to make it less complex. And about four out of every five within that 85 percent would shell out an extra 15 percent or more, the survey found. One in three executives surveyed said they could use the help in buying, using, and managing public cloud services. + +6. **IoT and cloud is to 2016 what mobile and cloud was to 2012** + + IoT is gaining mindshare and, more importantly, it's moving from test beds to real use cases. The cloud is a vital part for IoT due to its distributed nature, and for industrial IoT, where machinery and heavy equipment talk to back-end systems, a hybrid cloud will be most natural driver because the connection, data collection, and processing will happen in a hybrid cloud environment, due to perceived benefits of the private cloud side, like security and privacy. + +7. **The NIST definition of the cloud begins to break down** + + In 2011, the National Institute of Standards and Technology published "[The NIST Definition of Cloud Computing](http://csrc.nist.gov/publications/nistpubs/800-145/SP800-145.pdf)" (PDF) that became the standard definitions of private, public, and hybrid cloud terms and as-a-service models. + + Over time, though, the definitions have changed. IaaS has become much more complex, supporting things like OpenStack, [Swift](https://wiki.openstack.org/wiki/Swift) for object storage and [Neutron networking](https://wiki.openstack.org/wiki/Neutron). PaaS seems to be fading out because there's little that separates it from traditional middleware application development. And SaaS, which was just apps accessed through a browser, is losing steam because with so many cloud APIs for apps and services, you can access them through anything, not just a browser. + +8. **Analytics becomes more important** + + Analytics will be a huge growth opportunity for hybrid cloud because the high volume of data used in analytics is well suited to cloud, with its advantages of large scale and elasticity. For some forms of analytics, like highly sensitive data, then the private cloud will still rule. But the private cloud is part of the hybrid cloud, so either way, hybrid cloud wins. + +9. **Security takes on a new urgency** + + As hybrid cloud grows in 2016 and adds all kinds of new technologies, like IoT and containers, this just adds more vulnerable surface areas for data breaches. Add to it the tendency to rush into a new technology and then secure it later, which happens all the time, along with inexperienced technologists who don't think to secure the system – and you have a recipe for disaster. + + When new technologies come out, management discipline almost always lags and we think about securing the technology later. Containers are a good example. You can download all kinds of sample containers from Docker, but do you know where it came from? Docker had to go back and add security verifications after it started letting people download and run containers without any idea what was really in it. + + Mobile technologies like Path and Snapchat had major security problems a few years back as the smartphone market was taking off. It's inevitable that a new technology will be exploited by the bad guys. So security researchers will have their hands full trying to secure these new technologies. Probably after they get deployed. + +------------------------------------------------------------------------------ + +via: http://www.datamation.com/cloud-computing/9-key-trends-in-hybrid-cloud-computing.html + +作者:[Andy Patrizio][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/Andy-Patrizio-90720.html From 33c670f207f02c2bdec4e7e268991a6bf2864f22 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:53:56 +0800 Subject: [PATCH 0962/1710] =?UTF-8?q?20160218-11=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... in the Series with Hundreds of Changes.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md diff --git a/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md b/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md new file mode 100644 index 0000000000..2bf7e02ce7 --- /dev/null +++ b/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md @@ -0,0 +1,28 @@ +Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes +================================================================================= + +**It looks like renowned kernel maintainer Greg Kroah-Hartman is on vacation, as Sasha Levin has had the great pleasure of [announcing](http://lkml.iu.edu/hypermail/linux/kernel/1602.2/00520.html) earlier today, February 16, 2016, the general availability of the eighteenth maintenance release of Linux kernel 4.1 LTS.** + +Being a long-term supported kernel branch, Linux 4.1 will receive updates and patches for a few more years, and today's maintenance build proves that the kernel developers are committed to keeping the series stable and reliable for all GNU/Linux operating systems that use it. Linux kernel 4.1.18 LTS is a massive release with a total of 228 files changes, consisting of 5,304 insertions and 1,128 deletions. + +What's new in Linux kernel 4.1.18 LTS? Well, let's start with improvements to the ARM, ARM64 (AArch64), MIPS, PA-RISC, m32r, PowerPC (PPC), s390, and x86 hardware architectures. Moreover, there are enhancements to the Btrfs, CIFS, NFS, XFS, OCFS2, OverlayFS, and UDF filesystems, networking stack fixes, especially for mac80211, as well as multiple core, crypto, and mm improvements and sound updates. + +"I'm announcing the release of the 4.1.18 kernel. All users of the 4.1 kernel series must upgrade," says Sasha Levin. "The updated 4.1.y git tree can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.1.y and can be browsed at the normal kernel.org git web browser: http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary." + +## Numerous drivers have been updated + +Besides the architectures, filesystems, sound, networking, crypto, mm, and core kernel improvements, Linux kernel 4.1.18 LTS updates various drivers for better hardware support. This is in particular for things like Bluetooth, DMA, EDAC, GPU (mostly Radeon and Intel i915), InfiniBand, IOMMU, IRQchip, MD, MMC, DVB, networking (mostly wireless), PCI, SCSI, USB, thermal, staging, TTY, and Virtio. + +As usual, we're urging all users of Linux kernel-based operating systems that use kernel packages from the Linux 4.1 LTS series to update to today's 4.1.18 release as soon as possible. This can be done either by installing the update from the default software repositories or by manually compiling the sources, which you can download right now from the [kernel.org](http://kernel.org/) website or via [Softpedia](http://linux.softpedia.com/get/System/Operating-Systems/Kernels/Linux-Kernel-Stable-1960.shtml). + +------------------------------------------------------------------------------ + +via: http://news.softpedia.com/news/linux-kernel-4-1-18-lts-is-the-biggest-in-the-series-with-hundreds-of-changes-500500.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 From 5ae3d0069a2c6bc697827d74ae2c3e28e669308c Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:55:46 +0800 Subject: [PATCH 0963/1710] =?UTF-8?q?20160218-12=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...anonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md diff --git a/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md new file mode 100644 index 0000000000..0b1e9b9502 --- /dev/null +++ b/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md @@ -0,0 +1,8 @@ +Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04 +======================================================= + +Ubuntu developers have been working on [ZFS support for Ubuntu 16.04](http://www.phoronix.com/scan.php?page=news_item&px=ZFS-For-Ubuntu-16.04) and all of that file-system support is getting squared away. + +EXT4 will continue to be the default for Ubuntu 16.04 installations, but ZFS support will be automatically built into the Ubuntu Linux kernel releases, the module will automatically load when needed, zfsutils-linux is part of the main Ubuntu archive, and the support is being backed to commercial customers via Canonical. + +For those interested in official ZFS support for Ubuntu Linux, Canonical's Dustin Kirkland has written [a new blog post](http://blog.dustinkirkland.com/2016/02/zfs-is-fs-for-containers-in-ubuntu-1604.html) covering some of the details and why "ZFS is *the* FS for Containers in Ubuntu 16.04!" From 20d355bab055bfdaa49e0d75d9c8dd6d8945a0f4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 21:58:16 +0800 Subject: [PATCH 0964/1710] =?UTF-8?q?20160218-12=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...l's ZFS Plans Are Lining Up For Ubuntu 16.04.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md index 0b1e9b9502..32c822289c 100644 --- a/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md +++ b/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md @@ -1,8 +1,22 @@ Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04 ======================================================= +![](https://www.phoronix.com/assets/categories/ubuntu.jpg) + Ubuntu developers have been working on [ZFS support for Ubuntu 16.04](http://www.phoronix.com/scan.php?page=news_item&px=ZFS-For-Ubuntu-16.04) and all of that file-system support is getting squared away. EXT4 will continue to be the default for Ubuntu 16.04 installations, but ZFS support will be automatically built into the Ubuntu Linux kernel releases, the module will automatically load when needed, zfsutils-linux is part of the main Ubuntu archive, and the support is being backed to commercial customers via Canonical. For those interested in official ZFS support for Ubuntu Linux, Canonical's Dustin Kirkland has written [a new blog post](http://blog.dustinkirkland.com/2016/02/zfs-is-fs-for-containers-in-ubuntu-1604.html) covering some of the details and why "ZFS is *the* FS for Containers in Ubuntu 16.04!" + +------------------------------------------------------------------------------ + +via: https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-ZFS-Continues-16.04&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Phoronix+%28Phoronix%29 + +作者:[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/ From 3e1eac235ef9b29ad76c130e9a3e99479dc10f20 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 22:08:26 +0800 Subject: [PATCH 0965/1710] =?UTF-8?q?20160218-13=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inux developers think of Git and GitHub.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20160218 What do Linux developers think of Git and GitHub.md diff --git a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md new file mode 100644 index 0000000000..9002025820 --- /dev/null +++ b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md @@ -0,0 +1,93 @@ +What do Linux developers think of Git and GitHub? +===================================================== + +**Also in today’s open source roundup: DistroWatch reviews XStream Desktop 153, and Street Fighter V is coming to Linux and SteamOS in the spring** + +## What do Linux developers think of Git and GitHub? + +The popularity of Git and GitHub among Linux developers is well established. But what do developers think of them? And should GitHub really be synonymous with Git itself? A Linux redditor recently asked about this and got some very interesting answers. + +Dontwakemeup46 asked his question: + +>I am learning Git and Github. What I am interested in is how these two are viewed by the community. That git and github are used extensively, is something I know. But are there serious issues with either Git or Github? Something that the community would love to change? + +[More at Reddit](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580413015211&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=https%3A%2F%2Fwww.reddit.com%2Fr%2Flinux%2Fcomments%2F45jy59%2Fthe_popularity_of_git_and_github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20Reddit) + +His fellow Linux redditors responded with their thoughts about Git and GitHub: + +>Derenir: ”Github is not affliated with Git. + +>Git is made by Linus Torvalds. + +>Github hardly supports Linux. + +>Github is a corporate bordelo that tries to make money from Git. + +>[https://desktop.github.com/](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580415025712&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&type=U&out=https%3A%2F%2Fdesktop.github.com%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=https%3A%2F%2Fdesktop.github.com%2F) see here no Linux Support.” + +>**Bilog78**: ”A minor update: git hasn't been “made by Linus Torvalds” for a while. The maintainer is Junio C Hamano and the main contributors after him are Jeff King and Shawn O. Pearce.” + +>**Fearthefuture**: ”I like git but can't understand why people even use github anymore. From my point of view the only thing it does better than bitbucket are user statistics and the larger userbase. Bitbucket has unlimited free private repos, much better UI and very good integration with other services such as Jenkins.” + +>**Thunger**: ”Gitlab.com is also nice, especially since you can host your own instance on your own servers.” + +>**Takluyver**: ”Lots of people are familiar with the UI of Github and associated services like Travis, and lots of people already have Github accounts, so it's a good place for projects to be. People also use their Github profile as a kind of portfolio, so they're motivated to put more projects on there. Github is a de facto standard for hosting open source projects.” + +>**Tdammers**: ”Serious issue with git would be the UI, which is kind of counterintuitive, to the point that many users just stick with a handful of memorized incantations. + +Github: most serious issue here is that it's a proprietary hosted solution; you buy convenience, and the price is that your code is on someone else's server and not under your control anymore. Another common criticism of github is that its workflow isn't in line with the spirit of git itself, particularly the way pull requests work. And finally, github is monopolizing the code hosting landscape, and that's bad for diversity, which in turn is crucial for a thriving free software community.” + +>**Dies**: ”How is that the case? More importantly, if that is the case, then what's done is done and I guess we're stuck with Github since they control so many projects.” + +>**Tdammers**: ”The code is hosted on someone else's server, "someone else" in this case being github. Which, for an open-source project, is not typically a huge problem, but still, you don't control it. If you have a private project on github, then the only assurance you have that it will remain private is github's word for it. If you decide to delete things, then you can never be sure whether it's been deleted, or just hidden. + +Github doesn't control the projects themselves (you can always take your code and host it elsewhere, declaring the new location the "official" one), it just has deeper access to the code than the developers themselves.” + +>**Drelos**: ”I have read a lot of praises and bad stuff about Github ([here's an example](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580428524613&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fwww.wired.com%2F2015%2F06%2Fproblem-putting-worlds-code-github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=here%27s%20an%20example)) but my simple noob question is why aren't efforts towards a free and open "version" ?” + +>**Twizmwazin**: ”GitLab is sorta pushing there.” + +[More at Reddit](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580429720714&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=https%3A%2F%2Fwww.reddit.com%2Fr%2Flinux%2Fcomments%2F45jy59%2Fthe_popularity_of_git_and_github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20Reddit) + +## DistroWatch reviews XStream Desktop 153 + +XStreamOS is a version of Solaris created by Sonicle. XStream Desktop brings the power of Solaris to desktop users, and distrohoppers might be interested in checking it out. DistroWatch did a full review of XStream Desktop 153 and found that it performed fairly well. + +Jesse Smith reports for DistroWatch: + +>I think XStream Desktop does a lot of things well. Admittedly, my trial got off to a rocky start when the operating system would not boot on my hardware and I could not get the desktop to use my display's full screen resolution when running in VirtualBox. However, after that, XStream performed fairly well. The installer works well, the operating system automatically sets up and uses boot environments, insuring we can recover the system if something goes wrong. The package management tools work well and XStream ships with a useful collection of software. + +>I did run into a few problems playing media, specifically getting audio to work. I am not sure if that is another hardware compatibility issue or a problem with the media software that ships with the operating system. On the other hand, tools such as the web browser, e-mail, productivity suite and configuration tools all worked well. + +>What I appreciate about XStream the most is that the operating system is a branch of the OpenSolaris family that is being kept up to date. Other derivatives of OpenSolaris tend to lag behind, at least with desktop software, but XStream is still shipping recent versions of Firefox and LibreOffice. + +>For me personally, XStream is missing a few components, like a printer manager, multimedia support and drivers for my specific hardware. Other aspects of the operating system are quite attractive. I like the way the developers have set up LXDE, I like the default collection of software and I especially like the way file system snapshots and boot environments are enabled out of the box. Most Linux distributions, openSUSE aside, have not caught on to the usefulness of boot environments yet and I hope it is a technology that is picked up by more projects. + +[More at DistroWatch](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580434172315&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fdistrowatch.com%2Fweekly.php%3Fissue%3D20160215%23xstreamos&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20DistroWatch) + +## Street Fighter V and SteamOS + +Street Fighter is one of the most well known game franchises of all time, and now [Capcom has announced](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580435418216&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fsteamcommunity.com%2Fgames%2F310950%2Fannouncements%2Fdetail%2F857177755595160250&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=Capcom%20has%20announced) that Street Fighter V will be coming to Linux and SteamOS in the spring. This is great news for Linux gamers. + +Joe Parlock reports for Destructoid: + +>Are you one of the less than one percent of Steam users who play on a Linux-based system? Are you part of the even smaller percentage of people who play on Linux and are excited for Street Fighter V? Well, I’ve got some good news for you. + +>Capcom has announced via Steam that Street Fighter V will be coming to SteamOS and other Linux operating systems sometime this spring. It’ll come at no extra cost, so those who already own the PC build of the game will just be able to install it on Linux and be good to go. + +[More at Destructoid](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580435418216&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fsteamcommunity.com%2Fgames%2F310950%2Fannouncements%2Fdetail%2F857177755595160250&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=Capcom%20has%20announced) + +Did you miss a roundup? Check the [Eye On Open home page](http://www.infoworld.com/blog/eye-on-open/) to get caught up with the latest news about open source and Linux. + +------------------------------------------------------------------------------ + +via: http://www.infoworld.com/article/3033059/linux/what-do-linux-developers-think-of-git-and-github.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.infoworld.com/author/Jim-Lynch/ + From 3703d87617b077ca3d757b692fde92ffc13a33ef Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 18 Feb 2016 22:13:18 +0800 Subject: [PATCH 0966/1710] PUB:20151126 Linux Foundation Explains a 'World without Linux' and Open Source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @GHLandy 翻译的不错! --- ...a 'World without Linux' and Open Source.md | 51 ++++++++++++++++++ ...a 'World without Linux' and Open Source.md | 52 ------------------- 2 files changed, 51 insertions(+), 52 deletions(-) create mode 100644 published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md delete mode 100644 translated/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md diff --git a/published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md new file mode 100644 index 0000000000..e86ee8b7f0 --- /dev/null +++ b/published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md @@ -0,0 +1,51 @@ +没有 Linux 和开源软件的世界会变得怎么样 +================================================================================ +> Linux 基金会针最近对人们关于 “没有 Linux 的世界” 系列短片所提出的问题做了回应,解答了包括没有 Linux 和其他的开源软件的因特网会变得怎么样等问题。 + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/hey_22.png) + +假如 Linux —— 这个开源的操作系统内核 —— 不曾出现过,我们现在的世界是否会是另一番景象。会不会没有了因特网,或者没有了电影?这些都是观看 [Linux 基金会][1] 正在连续播出的 “[没有 Linux 的世界][2]” 系列短片的观众提出来的问题。 + +假如你错过了观看这些短片也不要紧,“[没有 Linux 的世界][2]” 系列短片是一个搞笑短片的集合,里边描述了没有了 Linux (或者说没有开源软件)的世界发生的事情。这些短片强调了 Linux 在 [电影制作][3] 以及 [因特网服务][4] 中充当的角色。 + +为了揭示该系列短片的一些主张、倾向和隐藏元素,Linux 基金会副主席 Jennifer Cloer 最近在 The VAR Guy 上回应了关于该短片的一些问题。以下是她的原话解答。 + +### 最新一集短片 —— Sam 和 Annie 一起看电影。假如没有 Linux,我们现在的荧屏是不是也和短片中的一样? ### + +在第 4 集剧情中,我们恶搞了一下电影 “阿凡达(Avatar)”。不管你喜欢还是讨厌,现实中的 “阿凡达(Avatar)” 在荧屏上的效果还是让人记忆深刻的。在没有 Linux 的世界中,电影的效果就变得非常丑陋,但是我们并不知道它有多难看,因为那已经是最好的了。但实际上,“阿凡达(Avatar)” 是使用 Linux 来进行效果制作的。Weta 数码使用了当时世界上最大的 Linux 集群来给电影做效果渲染和 3D 建模。据报道,指环王(Lord of the Rings)、神奇四侠(Fantastic Four)和金刚(King Kong)等电影都用到了 Linux。我希望该短片能引起人们关注,因为它所做的这方面的工作还并不广为人知。 + +### 很多人对短片的原始剧情进行了批判,其中就包括“没有 Linux 将没有因特网”的剧情的指责。你对此持什么样的看法? ### + +我们很喜欢人们在短片刚上映就进行激烈的辩论。该短片上映当天就超过了 100,000 的观众,这引起了人们对 Linux 在社会中扮演的角色以及对全世界的社区贡献者和维护者的关注。当然了,没有 Linux 的话,因特网也是会出现的,只是不会像当前我们所熟知的互联网那么成熟而已。每一个短片都对 Linux 在我们每天生活中扮演的角色进行了大胆且有趣的描述。我们希望,这些短片能够把关于 Linux 的故事推广到全世界的人的心里去。 + +### 为什么 Sam 和 Annie 的那只猫叫做 String? ### + +该短片系列中没有一处剧情是随意的。仔细的观看的话,你就会发现其中关于 Linux 和极客们的各种玩笑。小猫 String 是我们的 Linux.com 主编 Libby Clark 以弦理论(string theory)亲自来命名的。在物理学里,弦理论(string theory)是一个理论框架,它用一个叫做弦(String)的一维对象替换了粒子物理学中粒子状的粒子。弦理论(string theory)描述了这些弦(String)如何在空间传播以及相互影响。就像 Sam、Annie 和 String 在那个没有 Linux 的世界里的关系那样。 + +### 我们期待已久的下两集是什么样的,特别是,最后那集什么时候上映? ### + +在第 5 集短片中,我们将到太空并体验一下没有 Linux 的世界对太空探索的影响。这就像是一场疯狂的骑行。在短片的最后,我们最终还是会见到没有 Linux 的世界里的 Linus。贯穿整个短片系列,里边已经给出关于结局的线索,我在这就不能给太多提示了,因为还有好多人在找线索比赛中继续寻找着。并且我也不能给你们说出关于结局短片的上映日期。你们要自己跟进 #WorldWithoutLinux 主题帖来获取更多信息。 + +### 你可给一些关于第 4 集短片相关线索的提示吗? ### + +在该短片中有另外一个关于免费汉堡餐厅(Free Burger Restaurant)的线索。在那个没有 Linux 的世界里,Linux 最后还是以一种很隐秘的方式出现了,可以说,就像是以另一种语言来解读 Linux。当然,这只是为了好玩,String 也以另外一个模样出现。 + +### 那么,该系列短片达到你所想要的效果了吗? ### + +是的,达到了。我们很高兴看到人们分享并参与到这些故事中去。我们希望向那些可能不知道 Linux 的人传达更多关于 Linux 的故事并了解到 Linux 在当今世界中是无处不在的。全部的短片就是为了把这些关于 Linux 的真相推广给大家,并感谢那些全球性社区的开发者和公司对 Linux 的支持,Linux 使得一切成为可能。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/linux-foundation-explains-world-without-linux-and-open-so + +作者:[Christopher Tozzi][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://linuxfoundation.org/ +[2]:http://www.linuxfoundation.org/world-without-linux +[3]:http://thevarguy.com/open-source-application-software-companies/new-linux-foundation-video-highlights-role-open-source-3d +[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc diff --git a/translated/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/translated/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md deleted file mode 100644 index 3f0170de0a..0000000000 --- a/translated/talk/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md +++ /dev/null @@ -1,52 +0,0 @@ -没有 Linux 和开源软件的世界会变得怎么样 —— 听听来自 Linux 基金会的解释 -================================================================================ -> Linux 基金会针最近对人们关于 “没有 Linux 的世界” 系列短片提出的问题做了回应:包括没有 Linux 和其他的开源软件的因特网会变得怎么样等问题。 - -![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/hey_22.png) - -假如 Linux —— 一个开源的操作系统内核 —— 不曾出现过,我们现在的世界是否会是另一番景象。会不会没有了因特网,或者没有了电影?这些都是 [Linux 基金会][1] 正在连续播出的 “[没有 Linux 的世界][2]” 系列短片的观众提出来的问题。 - -假如你错过了观看这些短片也不要紧,“没有 Linux 的世界” 系列短片是一个古怪的短片集合,里边描述了没有了 Linux (或者说没有开源软件)的世界发生的事情。这些短片强调了 Linux 在 [电影制作][3] 以及 [服务于因特网][4] 中充当的角色。 - -为了提供该系列短片的一些主张、方向和隐藏元素,Linux 基金会副主席 Jennifer Cloer 最近在 The VAR Guy 上回应了关于该短片的一些问题。以下是她的原话解答。 - -### 最新一集短片 —— Sam 和 Annie 一起看电影。假如没有 Linux,我们现在的荧屏是不是也和短片中的一样? ### - -在 #4 剧情中,我们恶搞了一下电影 “Avatar”。不管你喜欢还是讨厌,现实中的 “Avatar” 在荧屏上的效果还是让人产生记忆深刻的。在没有 Linux 的世界中,电影的效果就变得非常恐怖,但是我们并不介意它,因为那已经是最好的了。但实际上,“Avatar” 是使用了 Linux 来进行效果制作的。Weta 数码使用了当时世界上最大的 Linux 集群来给电影做效果渲染和 3D 建模。据报道,指环王(Lord of the Rings)、神奇四侠(Fantastic Four)和金刚(King Kong)等电影都用到了 Linux。我希望该短片能引起电影制作工作者的关注,还有很多我们不知道的用到 Linux 来制作的电影。(译者注:这句应该是强度 Linux 在电影制作中的重要应用,可能翻译的不是很好。that work应该指的电影制作,只是直译感觉有点怪,这暂时没想到怎么译的最好。原话为:We hope this episode can bring attention to that work, which hasn't been widely reported.) - -### 很多人对短片的原始剧情进行了批判,其中包括没有 Linux 将没有因特网。你对此持什么样的看法? ### - -我们很喜欢人们从短片刚上映就进行激烈的辩论。该短片上映当天就超过了 100,000 的观众,这引起了人们对 Linux 在社会中扮演的角色以及全球的社区贡献者和维护者的关注。当然了,没有 Linux 的话,因特网也是会出现的,只是不会像当前我们所熟知的互联网那么成熟而已。每一个短片都对 Linux 在我们每天生活中扮演的角色进行了大胆且有趣的描述。我们希望,这些短片能够把关于 Linux 的故事推广到全世界的人的心里去。 - -### 为什么 Sam 和 Annie 的那只猫叫做 String? ### - -该短片系列中没有一处剧情是偶然的。仔细的观看话,你就会发现其中关于 Linux 和极客们的各种玩笑。小猫 String 是我们的 Linux.com 主编 Libby Clark 以弦理论(string theory)亲自来命名的。在物理学里,弦理论(string theory)是一个理论框架,它用一个叫做弦(String)的一维对象替换了粒子物理学中粒子状粒子。弦理论(string theory)描述了这些弦(String)如何在空间传播以及相互影响。就像 Sam、Annie 和 String 在那个没有 Linux 的世界里的关系那样。 - -### 我们期待已久的下两集是什么样的,特别是,最后那集什么时候上映? ### - -在 #5 短片中,我们将到太空并体验一下没有 Linux 的世界对太空探索的影响。这就像是一场疯狂的骑行。在短片的最后,我们最终还是会见到没有 Linux 的世界里的 Linus。贯穿整个短片系列,里边已经给出关于结局的线索,我在这就不能给太多提示了,因为还有好多人在找线索比赛中继续寻找着。并且我也不能给你们说出关于结局短片的上映日期。你们要自己跟进 #WorldWithoutLinux 主题帖来获取跟多信息。 - -### 你可给一些关于 #4 短片相关线索的提示吗? ### - -在该短片中有另外一个关于免费汉堡餐厅(Free Burger Restaurant)的线索。在那个没有 Linux 的世界里,Linux 最后还是以一种很隐秘的方式出现了,可以说,就像是以另一种语言来解读 Linux。当然,这只是为了好玩,String 也是另外一个模样。 - -### 那么,该系列短片达到你所想要的效果了吗? ### - -是的,达到了。我们很高兴看到人们分享并参与到这些故事中去。 -我们希望向那些可能不知道 Linux 的人传达更多关于 Linux 的故事并了解 Linux 在当今世界中是无处不在的。全部的短片就是为了把这些关于 Linux 的真相推广给大家,并感谢那些全球性社区的开发者和公司对 Linux 的支持,Linux 使得一切成为可能。 - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/linux-foundation-explains-world-without-linux-and-open-so - -作者:[Christopher Tozzi][a] -译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://thevarguy.com/author/christopher-tozzi -[1]:http://linuxfoundation.org/ -[2]:http://www.linuxfoundation.org/world-without-linux -[3]:http://thevarguy.com/open-source-application-software-companies/new-linux-foundation-video-highlights-role-open-source-3d -[4]:http://thevarguy.com/open-source-application-software-companies/100715/would-internet-exist-without-linux-yes-without-open-sourc From b72b91afc506c622cd0f31037e6619c7924ca4a5 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 22:32:31 +0800 Subject: [PATCH 0967/1710] =?UTF-8?q?20160218-14=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...est Linux Desktop Environments for 2016.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/tech/20160218 Best Linux Desktop Environments for 2016.md diff --git a/sources/tech/20160218 Best Linux Desktop Environments for 2016.md b/sources/tech/20160218 Best Linux Desktop Environments for 2016.md new file mode 100644 index 0000000000..a93d38c21a --- /dev/null +++ b/sources/tech/20160218 Best Linux Desktop Environments for 2016.md @@ -0,0 +1,90 @@ +Best Linux Desktop Environments for 2016 +============================================= + +![](http://www.linux.com/images/stories/66866/DE-2.png) + +Linux creates a friendly environment for choices and options. For example, there are many Linux-based distributions out there that use different desktop environments for you to choose from. I have picked some of the best desktop environments that you will see in the Linux world. + +## Plasma + +I consider [KDE’s Plasma desktop](https://www.kde.org/workspaces/plasmadesktop/) to be the most advanced desktop environment (DE). It’s the most feature-rich and customizable desktop environment that I have ever seen; even Mac OS X and Windows don’t come near Plasma when it comes to complete control by the user. + +I also love Plasma because of its awesome file manager, Dolphin. One reason I prefer Plasma over Gnome-based systems is the file manager. One of my biggest gripes with Gnome is that its file manager, Files, can’t handle basic tasks, such as batch-files renaming. That’s important for me because I take a lot of pictures, and Gnome makes it impossible for me to rename image files. On Dolphin, it’s a walk in the park. + +Then, you can add more functionality to Plasma with plugins. Plasma comes with some incredible software including Krita, Kdenlive, Calligra Office Suite, digiKam, Kwrite, and many other applications being developed by the KDE community. + +The only weakness of the Plasma desktop is its default email client, Kmail. It’s way too complicated to set up, and I also wish that setting up Kmail also configured the Address Book and Calendar. + +Plasma is the default desktop environment of many major distributions including openSUSE. + +## GNOME + +[GNOME](https://www.gnome.org/) (GNU Network Object Model Environment) was founded by [Miguel de Icaza](https://en.wikipedia.org/wiki/Miguel_de_Icaza) and Federico Mena in 1997 because KDE used Qt toolkit, which was released under a proprietary license. Unlike KDE, where there were numerous customizations, GNOME focused on keeping things simple. GNOME became extremely popular due to its simplicity and ease of use. A factor that I think contributed heavily to Gnome’s popularity was the fact that Ubuntu, one of the most popular Linux distributions, picked it as their default desktop environment. + +With changing times, GNOME needed a change. Therefore, with GNOME 3 the developers introduced the GNOME 3 Shell, which brought with it an entirely new design paradigm. That in turn led to some conflict with Canonical’s plans with Ubuntu, and they created their own shell for GNOME called Unity. Initially, GNOME 3 Shell was plagued by many issues -- most notably, the fact that extensions would stop working after updates. This major shift in design and the various problems then led to many forks of GNOME, such as the Cinnamon and Mate desktops. + +That said, what makes GNOME desktop interesting is that they are targeting touch-based devices, so if you have new laptops that come with a touchscreen, Gnome is the best suited DE for them. + +With version 3.18, GNOME has made some impressive improvements. The most interesting thing that they have done is Google Drive integration where users can mount their Google Drive as a remote file storage and work with files without having to use a web browser. I also love GNOME’s awesome integration of email client with calendar and address book. Despite all this awesomeness, however, the one thing that keeps me from using GNOME is its file manager, which can’t handle batch file renames. I will stick to Plasma until GNOME developers fix this problem. + +![](http://www.linux.com/images/stories/66866/DE-fig1.png) + +## Unity + +[Unity](https://unity.ubuntu.com/) is technically not a desktop environment, it’s a graphical shell developed by Canonical for Ubuntu. Unity runs on top of GNOME desktop environment and uses most stock GNOME apps and tools. The Ubuntu team has forked a few GNOME components to better suit the needs of Unity users. + +Unity plays a very important role in Ubuntu’s convergence story and with Unity 8, the company is bringing the desktop and mobile world together. Canonical has developed many intriguing technologies for Unity including HUD (Head-up Display). They also took a unique approach with lenses and scopes making it easy for users to find appropriate content. + +The upcoming release of Ubuntu, 16.04, is expected to ship with Unity 8 so users will get to experience all the work that developers have put into this open source software. One of the biggest criticisms with Unity was opt-out integration of Amazon ads and other services. With the upcoming release, though, Canonical is removing Amazon ads from Dash, making it a privacy-respecting OS by default. + +## Cinnamon + +[Cinnamon](https://en.wikipedia.org/wiki/Cinnamon_(software)) was initially developed by [Linux Mint](http://www.linuxmint.com/) -- the most popular distro on DistroWatch. Cinnamon is a fork of GNOME Shell, just like Unity. Later, however, it evolved into a desktop environment as Linux Mint developers forked many components of the GNOME desktop, including Files, to address the needs of their users. + +Because Linux Mint was based on regular releases of Ubuntu, the developers continued to chase the moving target that was Ubuntu. As a result, despite great promises Cinnamon was full of bugs and problems. With the 17.x release, however, Linux Mint developers moved to LTS edition of Ubuntu that allowed them to focus on core components of Cinnamon without having to worry about the base. As a result of this move, Cinnamon has become incredibly stable and bug free. The developers have started adding more features to the desktop. + +For those who prefer the good old Windows-like UI on top of the simplicity of GNOME, Cinnamon is the best desktop environment. + +## MATE Desktop + +The [MATE desktop](http://mate-desktop.com/) environment is also a fork of GNOME. However, unlike Cinnamon, it’s not a fork of GNOME 3; instead it’s a fork of GNOME 2 codebase, which is not unmaintained. A few developers didn’t like Gnome 3 and wanted to “continue” GNOME 2, so they took the codebase and created MATE. The MATE project forked many components of the GNOME project and created a few from scratch. To avoid any conflict with GNOME 3, they renamed all their packages: Nautilus become Caja, Gedit became Pluma, Evince became Atril, and so on. + +Although MATE is a continuation of GNOME 2, that doesn’t mean they are using old and obsolete technologies; they are using newer technologies to offer a modern GNOME 2 experience. + +What makes MATE an impressive desktop environment is that it’s extremely resource efficient. You can run it on older hardware or newer less powerful hardware, such as Raspberry Pi or Chromebook Flip. What’s makes it even more interesting is that using it on powerful systems frees most system resources for applications instead of the resources being consumed by the desktop environment itself. + +## LXQt + +[LXQt](http://lxqt.org/) is the successor of LXDE, one of the most lightweight desktop environments. It’s a merger of two open source projects LXDE and Razor-Qt. The first usable version of LXQt (v 0.9) was released in 2015. Initially, the developers used Qt4 but then all compatibility with it was dropped, and they moved to Qt5 and KDE Frameworks 5 for speedy development. I have tried LXQt on my Arch systems, and its a great lightweight desktop environment, but it has a long way to go before it becomes the rightful successor of LXDE. + +## Xfce + +[Xfce](http://www.xfce.org/) predates the KDE desktop environment. It is one of the oldest and lightest desktop environments around. The latest release of Xfce is 4.15, which was released in 2015 and uses modern technologies like GTK+ 3. Xfce is used by many special purpose distributions, such as Ubuntu Studio, because -- much like MATE -- it frees most system resources for applications. It’s also the default desktop environment of many notable Linux distributions including Manjaro Linux, PC/OS, Salix, and Mythbuntu. + +## Budgie + +[Budgie](https://solus-project.com/budgie/) is a new desktop environment being developed by the Solus Linux team. Solus is new Linux distribution that’s being developed from scratch, and Budgie is a core component of it. Budgie uses many GNOME components and offers a minimalistic UI. Because there’s not much information about the new desktop, I talked to the core developer of Solus, Ikey Doherty, and he explained, “We ship our own desktop, the Budgie Desktop. Unlike some other desktops, this is not a fork, rather it aims for full integration into the GNOME stack. It's written from scratch, and is specifically designed to cater for the experience Solus is offering. We work with upstream GNOME here as much as we can, contributing fixes, and advocate and support their work.” + +## Pantheon + +[Pantheon](https://elementary.io/) needs no introduction, it’s the desktop environment powering the lovely Linux distribution elementary OS. Similar to Budgie, Pantheon is not a fork of GNOME as many may assume. elementary OS team comes from design background so they pay very close attention to minute details, as a result Pantheon is extremely polished desktop environment. At the moment, it may lack many feature found in DEs like Plasma, but the developers are taking their time in order to stick to the design principle. + +![](http://www.linux.com/images/stories/66866/DE-3.png) + +## Conclusion + +As I went through this story, I realized the awesomeness of open source and Linux. There is something for everyone. As Jon “maddog” Hall said during the latest SCaLE 14, “Yes, there are 300 Linux distributions. I can try them and stick to the one that I like!” + +So, enjoy this diversity and use the one that floats your boat! + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/881107-best-linux-desktop-environments-for-2016 + +作者:[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 From 1fe2dae1544fa3bb6641fda1d95ae0c14a0adc6e Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 22:46:11 +0800 Subject: [PATCH 0968/1710] =?UTF-8?q?20160218-15=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20160218 The Best Linux Distros of 2016.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sources/tech/20160218 The Best Linux Distros of 2016.md diff --git a/sources/tech/20160218 The Best Linux Distros of 2016.md b/sources/tech/20160218 The Best Linux Distros of 2016.md new file mode 100644 index 0000000000..ec3bc1390c --- /dev/null +++ b/sources/tech/20160218 The Best Linux Distros of 2016.md @@ -0,0 +1,118 @@ +The Best Linux Distros of 2016 +================================ + +![](http://www.linux.com/images/stories/66866/distro-opensuse.JPG) + +2015 was a very important year for Linux, [both in the enterprise as well as in the consumer space](http://www.cio.com/article/3017983/linux/2015s-most-exciting-linux-devices.html). As a Linux user since 2005, I can see that the operating system has come a long way in the past 10 years. [And, 2016 is going to be even more exciting](http://www.cio.com/article/3017177/linux/11-predictions-for-linux-in-2016.html). In this article, I have picked some of the best distros that will shine in 2016. + +## Best Comeback Distro: openSUSE + +SUSE, the company behind openSUSE, is the oldest Linux company; [it was formed just a year after Linus Torvalds announced Linux](http://www.linux.com/news/software/applications/866964-exclusive-interview-with-suse-president-nils-brauckmann). The company actually predates Linux king Red Hat. SUSE is also the sponsor of the community-based distro [openSUSE](https://www.opensuse.org/). + +In 2015, openSUSE teams decided to come closer to SUSE Linux Enterprise (SLE) so that users could have a distribution that shares its DNA with the enterprise server -- similar to CentOS and Ubuntu. Thus, openSUSE became [openSUSE Leap](https://en.opensuse.org/Portal:Leap), a distribution that’s directly based on SLE SP (service pack) 1. + +The two distros will share the code base to benefit each other -- SUSE will take what’s good in openSUSE and vice versa. With this move, openSUSE is also ditching the regular release cycle, and a new version will be released in sync with SLE. That means each version will have a much longer life cycle. + +As a result of this move, openSUSE has become a very important distribution because potential SLE users can now use openSUSE Leap. That’s not all, however; openSUSE also announced the release of [Tumbleweed](http://www.cio.com/article/3008856/open-source-tools/is-opensuse-tumbleweed-good-enough-for-a-seasoned-arch-user.html), a pure rolling-release version. So, now, users can use either the super-stable openSUSE Leap or the always up-to-date openSUSE Tumbleweed. + +No other distro has made such an impressive comeback in my memory. + +Most Customizable Distro: Arch Linux + +Arch Linux is the best rolling-release distribution out there. Period. Ok, I could be biased because I am an Arch Linux user. However, the reason behind my claim is that Arch excels in many other areas, too, and that’s why I use it as my main operating system. + +[Arch Linux](https://www.archlinux.org/) is a great distro for those who want to learn everything about Linux. Because you have to install everything manually, you learn all the bits and pieces of a Linux-based operating system. + +- Arch is the most customizable distribution. There is no “Arch” flavor of any DE. All you get is a foundation and you can build whatever distro want, on top of it. For good or for worse, unlike openSUSE or Ubuntu there is no extra patching or integration. You get what upstream developers created. Period. + +- Arch Linux is also one of the best rolling releases. It’s always updated. Users always run the latest packages, and they can also run pre-released software through unstable repositories. + +- Arch is also known for having excellent documentation. Arch Wiki is my to-go resource for everything Linux related. + +- What I like the most about Arch is that is offers almost every package and software that’s available for “any” Linux distribution, thanks to the Arch User Repository, aka AUR. + +## Best-Looking Distro: elementary OS + +Different Linux distributions have different focus areas -- in most cases, these are technical differences. In many Linux distributions. the look and feel is an afterthought -- a side project at the mercy of the specific desktop environment. + +[elementary OS](https://elementary.io/) is trying to change all that. Here, design is at the forefront, and the reason is quite obvious. The distro is being developed by designers who have made their name in the Linux world by creating beautiful icons. + +elementary OS is quite strict about the holistic look and feel. The developers have created their own components, including the desktop environment. Additionally, they choose only those applications that fit into the design paradigm. One can find heavy influence of Mac OS X on elementary OS. + +## Best Newcomer: Solus + +![](http://www.linux.com/images/stories/66866/distro-solus.JPG) + +[Solus](https://solus-project.com/) operating system has garnered quite a lot of attention lately. It’s a decent-looking operating system that has been created from scratch. It’s not a derivative of Debian or Ubuntu. It comes with the Budgie desktop environment, which was built from scratch but aims to integrate with Gnome. Solus has the same minimalistic approach as Google’s Chrome OS. + +I have not played with Solus much, but it does look promising. Solus is actually not a “new” OS. It has been around for a while in different forms and names. But the entire project was revived back in 2015 under this new name. + +## Best Cloud OS: Chrome OS + +[Chrome OS](https://www.chromium.org/chromium-os) may not be your typical Linux-based distribution because it’s a browser-based operating system for online activities. However, because it’s based on Linux and its source code is available for anyone to compile, it’s an attractive OS. I use Chrome OS on a daily basis. It’s an excellent, maintenance-free, always updated OS for anyone using a computer purely for web-related activities. Chrome OS, along with Android, deserves all the credit for making Linux popular in the PC and mobile space. + +## Best Laptop OS: Ubuntu MATE + +Most laptops don’t have very high-end hardware, and if you are running a really resource-intensive desktop environment then you won’t have much system resources or battery life at your disposal -- they will be used by the OS itself. That’s where I found [Ubuntu MATE](http://www.cio.com/article/2848475/ubuntu-mate-enterprise-customers.html) to be an excellent operating system. It’s lightweight, yet has all the bells and whistles needed for a pleasant experience. Thanks to its lightweight design, the majority of system resources are free for applications so you can still do some heavy work on it. I also found it to be a great distro on really low-end systems. + +## Best Distro for Old Hardware: Lubuntu + +If you have an old laptop or PC sitting around, breathe new life into it with [Lubuntu](http://lubuntu.net/). Lubuntu uses LXDE, but the project has merged with Razor Qt to create LXQt. Although the latest release 15.04 is still using LXDE, the future versions will be using LXQt. Lubuntu is a decent operating system for old hardware. + +## Best Distro for IoT: Snappy Ubuntu Core + +![](http://www.linux.com/images/stories/66866/distro-ubuntu-studio.JPG) + +Snappy Ubuntu Core is the best Linux-based operating system out there for Internet of Things (IoT) and other such devices. The operating system holds great potential to turn almost everything around us into smart devices -- such as routers, coffeemakers, drones, etc. What makes it even more interesting is the way the software manages updates and offers containerization for added security. + +## Best Distro for Desktops: Linux Mint Cinnamon + +[Linux Mint Cinnamon](http://www.linux.com/news/software/applications/838569-review-linux-mint-172-release/) is the best operating system for desktops and powerful laptops. I will go as far as calling it the Mac OS X of the Linux world. Honestly, I had not been a huge fan of Linux Mint for a long time because of unstable Cinnamon. But, as soon as the developers chose to use LTS as the base, the distro has become incredibly stable. Because the developers don’t have to spend much time worrying about keeping up with Ubuntu, they are now investing all of their time in making Cinnamon better. + +## Best Distro for Games: Steam OS + +Gaming has been a weakness of desktop Linux. Many users dual-boot with Windows just to be able to play games. Valve Software is trying to change that. Valve is a game distributor that offers a client to run games on different platforms. And, Valve has now created their open operating system -- [Steam OS](http://store.steampowered.com/steamos/) -- to create a Linux-based gaming platform. By the end of 2015, partners started shipping Steam machines to the market. + +## Best Distro for Privacy: Tails + +In this age of mass surveillance and tracking by marketers (anonymous tracking for targeted content is acceptable), privacy has become a major issue. If you are someone who needs to keep the government and marketing agencies out of your business, you need an operating system that’s created -- from the ground up -- with privacy in mind. + +And, nothing beats [Tails](https://tails.boum.org/) for this purpose. It’s a Debian-based distribution that offers privacy and anonymity by design. Tails is so good that, according to reports, the NSA considers it a major threat to their mission. + +## Best Distro for Multimedia Production: Ubuntu Studio + +Multimedia production is one of the major weaknesses of Linux-based operating systems. All the professional-grade applications are available for either Windows or Mac OS X. There is no dearth of decent audio/video production software for Linux, but a multimedia production system needs more than just decent applications. It should use a lightweight desktop environment so that precious system resources -- such as CPU and RAM -- are used sparingly by the system itself, leaving them for the multimedia applications. And, the best Linux distribution for multimedia production is [Ubuntu Studio](https://ubuntustudio.org/tour/). It uses Xfce and comes with a broad range of audio, video, and image editing applications. + +## Best Enterprise Distro: SLE/RHEL + +Enterprise customers don’t look for articles like these to choose a distribution to run on their servers. They already know where to go: It’s either [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux) or [SUSE Linux Enterprise](https://www.suse.com/). These two names have become synonymous with enterprise servers. These companies are also pushing boundaries by innovating in this changing landscape where everything is containerized and becoming software defined. + +## Best Server OS: Debian/CentOS + +If you are looking at running a server, but you can’t afford or don’t want to pay a subscription fee for RHEL or SLE, then there is nothing better than [Debian](https://www.debian.org/) or [CentOS](https://www.centos.org/). These distributions are the gold standard when it comes to community-based servers. And, they are supported for a very long time, so you won’t have to worry about upgrading your system so often. + +## Best Mobile OS: Plasma Mobile + +Although the Linux-based distribution Android is ruling the roost, many in the open source community, including me, still desire a distribution that offers traditional Linux desktop apps on mobile devices. At the same time, it’s better if the distro is run by a community instead of a company so that a user remains in the focus and not the company’s financial goals. And that’s where KDE’s [Plasma Mobile](https://community.kde.org/Plasma/Mobile) brings some hope. + +This Kubuntu-based distribution was launched in 2015. Because the KDE community is known for their adherence to standards and developing stuff in public, I am quite excited about the future of Plasma Mobile. + +## Best Distro for ARM Devices: Arch Linux ARM + +With the success of Android, we are now surrounded by ARM-powered devices -- from Raspberry Pi to Chromebook and Nvidia Shield. The traditional distros written for Intel/AMD processors won’t run on these systems. Some distributions are aimed at ARM, but they are mostly for specific hardware only, such as Raspbian for Raspberry Pi. That’s where [Arch Linux ARM](http://archlinuxarm.org/) (ALARM) shines. It’s a purely community-based distribution that’s based on Arch Linux. You can run it on Raspberry Pi, Chromebooks, Android devices, Nvidia Shield, and what not. What makes this distribution even more interesting is that, thanks to the Arch User Repository (AUR), you can install many applications than you may not get on other distributions. + +## Conclusion + +I was astonished and amazed when I worked on this story. It’s very exciting to see that there is something for everyone in the Linux world. It doesn’t matter if the year of the desktop Linux never arrives. We are happy with our Linux moments! + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/878620-the-best-linux-distros-of-2016 + +作者:[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 From 5a2ad668c2413590e73644e9a2b2d3fbcb3934e6 Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Thu, 18 Feb 2016 16:14:11 +0100 Subject: [PATCH 0969/1710] =?UTF-8?q?Ricky=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 --- .../20160218 Linux Systems Patched for Critical glibc Flaw.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md index 19c654e27e..14e950a611 100644 --- a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md +++ b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md @@ -1,3 +1,5 @@ +Ricky Gong 翻译中 + Linux Systems Patched for Critical glibc Flaw ================================================= From 0a56670fc6e507e3fbf1e839a10ba1f9c01b995b Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 23:14:48 +0800 Subject: [PATCH 0970/1710] =?UTF-8?q?20160218-16=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eps to Start Your Linux SysAdmin Career.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md diff --git a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md new file mode 100644 index 0000000000..60b8f7fc75 --- /dev/null +++ b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md @@ -0,0 +1,68 @@ +7 Steps to Start Your Linux SysAdmin Career +=============================================== + +Linux is hot right now. Everybody is looking for Linux talent. Recruiters are knocking down the doors of anybody with Linux experience, and there are tens of thousands of jobs waiting to be filled. But what if you want to take advantage of this trend and you’re new to Linux? How do you get started? + +1. Install Linux + + It should almost go without saying, but the first key to learning Linux is to install Linux. Both the LFS101x and the LFS201 courses include detailed sections on installing and configuring Linux for the first time. + +2. Take LFS101x + + If you are completely new to Linux, the best place to start is our free [LFS101x Introduction](https://www.edx.org/course/introduction-linux-linuxfoundationx-lfs101x-2) to Linux course. This online course is hosted by edX.org, and explores the various tools and techniques commonly used by Linux system administrators and end users to achieve their day-to-day work in a Linux environment. It is designed for experienced computer users who have limited or no previous exposure to Linux, whether they are working in an individual or enterprise environment. This course will give you a good working knowledge of Linux from both a graphical and command line perspective, allowing you to easily navigate through any of the major Linux distributions. + +3. Look into LFS201 + + Once you’ve completed LFS101x, you’re ready to start diving into the more complicated tasks in Linux that will be required of you as a professional sysadmin. To gain those skills, you’ll want to take [LFS201 Essentials of Linux System Administration](http://training.linuxfoundation.org/linux-courses/system-administration-training/essentials-of-system-administration). The course gives you in-depth explanations and instructions for each topic, along with plenty of exercises and labs to help you get real, hands-on experience with the subject matter. + + If you would rather have a live instructor teach you or you have an employer who is interested in helping you become a Linux sysadmin, you might also be interested in LFS220 Linux System Administration. This course includes all the same topics as the LFS201 course, but is taught by an expert instructor who can guide you through the labs and answer any questions you have on the topics covered in the course. + +4. Practice! + + Practice makes perfect, and that’s as true for Linux as it is for any musical instrument or sport. Once you’ve installed Linux, use it regularly. Perform key tasks over and over again until you can do them easily without reference material. Learn the ins and outs of the command line as well as the GUI. This practice will ensure that you’ve got the skills and knowledge to be successful as a professional Linux sysadmin. + +5. Get Certified + + After you’ve taken LFS201 or LFS220 and you’ve gotten some practice, you are now ready to get certified as a system administrator. You’ll need this certification because this is how you will prove to employers that you have the necessary skills to be a professional Linux sysadmin. + + There are several Linux certifications on the market today, and all of them have their place. However, most of these certifications are either centered on a specific distro (like Red Hat) or are purely knowledge-based and don’t demonstrate actual skill with Linux. The Linux Foundation Certified System Administrator certification is an excellent alternative for someone looking for a flexible, meaningful entry-level certification. + +6. Get Involved + + At this point you may also want to consider joining up with a local Linux Users Group (or LUG), if there’s one in your area. These groups are usually composed of people of all ages and experience levels, so regardless of where you are at with your Linux experience, you can find people with similar skill levels to bond with, or more advanced Linux users who can help answer questions and point you towards helpful resources. To find out if there’s a LUG near you, try looking on meetup.com, check with a nearby university, or just do a simple Internet search. + + There are also many online communities available to you as you learn Linux. These sites and communities provide help and support to both individuals new to Linux or experienced administrators: + + - [Linux Admin subreddit](https://www.reddit.com/r/linuxadmin) + + - [Linux.com](http://www.linux.com/) + + - [training.linuxfoundation.org](http://training.linuxfoundation.org/) + + - [http://community.ubuntu.com/help-information/](http://community.ubuntu.com/help-information/) + + - [https://forums.opensuse.org/forum.php](https://forums.opensuse.org/forum.php) + + - [http://wiki.centos.org/Documentation](http://wiki.centos.org/Documentation) + +7. Learn To Love The Documentation + + Last but not least, if you ever get stuck on something within Linux, don’t forget about Linux’s included documentation. Using the commands man (for manual), info and help, you can find information on virtually every aspect of Linux, right from within the operating system. The usefulness of these built-in resources cannot be overstated, and you’ll find yourself using them throughout your career, so you might as well get familiar with them early on. + + Interested in learning more about starting your IT career with Linux? Check out our free ebook “[A Brief Guide To Starting Your IT Career In Linux](http://training.linuxfoundation.org/sysadmin-it-career-guide).” + +[Download Now](http://training.linuxfoundation.org/sysadmin-it-career-guide) + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps-to-start-your-linux-sysadmin-career + +作者:[linux.com][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:linux.com + + From ce654f9d7b969b1d8cd034a9d6b0268577fdf554 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 23:22:31 +0800 Subject: [PATCH 0971/1710] =?UTF-8?q?20160218-17=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to Best Manage Encryption Keys on Linux.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md new file mode 100644 index 0000000000..19aab96541 --- /dev/null +++ b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md @@ -0,0 +1,111 @@ +How to Best Manage Encryption Keys on Linux +============================================= + +![](http://www.linux.com/images/stories/41373/key-management-diagram.png) + +Storing SSH encryption **keys** and memorizing passwords can be a headache. But unfortunately in today's world of malicious hackers and exploits, basic security precautions are an essential practice. For a lot of general users, this amounts to simply memorizing passwords and perhaps finding a good program to store the passwords, as we remind such users not to use the same password for every site. But for those of us in various IT fields, we need to take this up a level. We have to deal with encryption keys such as SSH keys, not just passwords. + +Here's a scenario: I have a server running on a cloud that I use for my main git repository. I have multiple computers I work from. All of those computers need to log into that central server to push to and pull from. I have git set up to use SSH. When git uses SSH, git essentially logs into the server in the same way you would if you were to launch a command line into the server with the SSH command. In order to configure everything, I created a config file in my .ssh directory that contains a Host entry providing a name for the server, the host name, the user to log in as, and the path to a key file. I can then test this configuration out by simply typing the command + +>ssh gitserver + +And soon I'm presented with the server's bash shell. Now I can configure git to use this same entry to log in with the stored key. Easy enough, except for one problem: For each computer I use to log into that server, I need to have a key file. That means more than one key file floating around. I have several such keys on this computer, and several such keys on my other computers. In the same way everyday users have a gazillion passwords, it's easy for us IT folks to end up with a gazillion key files. What to do? + +## Cleaning Up + +Before starting out with a program to help you manage your keys, you have to lay some groundwork on how your keys should be handled, and whether the questions we're asking even make sense. And that requires first and foremost that you understand where your public keys go and where your private keys go. I'm going to assume you know: + +1. The difference between a public key and private key + +2. Why you can't generate a private key from a public key but you can do the reverse + +3. The purpose of the authorized_keys file and what goes in it + +4. How you use private keys to log into a server that has the corresponding public key in its authorized_keys file. + +Here's an example. When you create a cloud server on Amazon Web Services, you have to provide an SSH key that you'll use for connecting to your server. Each key has a public part and a private part. Because you want your server to stay secure, at first glance it might seem you put the private key onto that server, and that you take the public key with you. After all, you don't want that server to be publicly accessible, right? But that's actually backwards. + +You put the public key on the AWS server, and you hold onto your private key for logging into the server. You guard that private key and keep it by your side, not on some remote server, as shown in the figure above. + +Here's why: If the public key were to become known to others, they wouldn't be able to log into the server since they don't have the private key. Further, if somebody did manage to break into your server, all they would find is a public key. You can't generate a private key from a public key. And so if you're using that same key on other servers, they wouldn't be able to use it to log into those other computers. + +And that's why you put your public key on your servers for logging into them through SSH. The private keys stay with you. You don't let those private keys out of your hands. + +But there's still trouble. Consider the case of my git server. I had some decisions to make. Sometimes I'm logged into a development server that's hosted elsewhere. While on that dev box, I need to connect to my git server. How can the dev box connect to the git server? By using the private key. And therein lies trouble. This scenario requires I put a private key on a server that is hosted elsewhere, which is potentially dangerous. + +Now a further scenario: What if I were to use a single key to log into multiple servers? If an intruder got hold of this one private key, he or she would have that private key and gain access to the full virtual network of servers, ready to do some serious damage. Not good at all. + +And that, of course, brings up the other question: Should I really use the same key for those other servers? That's could be dangerous because of what I just described. + +In the end, this sounds messy, but there are some simple solutions. Let's get organized. + +(Note that there are many places you need to use keys besides just logging into servers, but I'm presenting this as one scenario to show you what you're faced with when dealing with keys.) + +## Regarding Passphrases + +When you create your keys, you have the option to include a passphrase that is required when using the private key. With this passphrase, the private key file itself is encrypted using the passphrase. For example, if you have a public key stored on a server and you use the private key to log into that server, you'll be prompted to enter a passphrase. Without the passphrase, the key cannot be used. Alternatively, you can configure your key without a passphrase to begin with. Then all you need is the key file to log into the server. + +Generally going without a passphrase is easier on the users, but one reason I strongly recommend using the passphrase in many situations is this: If the private key file gets stolen, the person who steals it still can't use it until he or she is able to find out the passphrase. In theory, this will save you time as you remove the public key from the server before the attacker can discover the passphrase, thus protecting your system. There are other reasons to use a passphrase, but this one alone makes it worth it to me in many situations. (As an example, I have VNC software on an Android tablet. The tablet holds my private key. If my tablet gets stolen, I'll immediately revoke the public key from the server it logs into, rendering its private key useless, with or without the passphrase.) But in some cases I don't use it, because the server I'm logging into might not have much valuable data on it. It depends on the situation. + +## Server Infrastructure + +How you design your infrastructure of servers will impact how you manage your keys. For example, if you have multiple users logging in, you'll need to decide whether each user gets a separate key. (Generally speaking, they should; you don't want users sharing private keys. That way if one user leaves the organization or loses trust, you can revoke that user's key without having to generate new keys for everyone else. And similarly, by sharing keys they could log in as each other, which is also bad.) But another issue is how you're allocating your servers. Do you allocate a lot of servers using tools such as Puppet, for example? And do you create multiple servers based on your own images? When you replicate your servers, do you need to have the same key for each? Different cloud server software allows you to configure this how you choose; you can have the servers get the same key, or have a new one generated for each. + +If you're dealing with replicated servers, it can get confusing if the users need to use different keys to log into two different servers that are otherwise similar. But on the other hand, there could be security risks by having the servers share the same keys. Or, on the third hand, if your keys are needed for something other than logging in (such as mounting an encrypted drive), then you would need the same key in multiple places. As you can see, whether you need to use the same keys across different servers is not a decision I can make for you; there are trade offs, and you need to decide for yourself what's best. + +In the end, you're likely to have: + +- Multiple servers that need to be logged into + +- Multiple users logging into different servers, each with their own key + +- Multiple keys for each user as they log into different servers. + +(If you're using keys in other situations, as you likely are, the same general concepts will apply regarding how keys are used, how many keys are needed, whether they're shared, and how you handle private and public parts of keys.) + +## Method of safety + +Knowing your infrastructure and unique situation, you need to put together a key management plan that will help guide you on how you distribute and store your keys. For example, earlier I mentioned that if my tablet gets stolen, I will revoke the public key from my server, hopefully before the tablet can be used to access the server. As such, I can allow for the following in my overall plan: + +1. Private keys are okay on mobile devices, but they must include a passphrase + +2. There must exist a way to quickly revoke public keys from a server. + +In your situation, you might decide you just don't want to use passphrases for a system you log into regularly; for example, the system might be a test machine that the developers log into many times a day. That's fine, but then you'll need to adjust your rules a bit. You might include a rule that that machine is not to be logged into from mobile devices. In other words, you need to build your protocols based on your own situation, and not assume one size fits all. + +## Software + +On to software. Surprisingly, there aren't a lot of good, solid software solutions for storing and managing your private keys. But should there be? Consider this: If you have a program storing all your keys for all your servers, and that program is locked down by a quick password, are your keys really secure? Or, similarly, if your private keys are sitting on your hard drive for quick access by the SSH program, is a key management software really providing any protection? + +But for overall infrastructure and creating and managing public keys, there are some solutions. I already mentioned Puppet. In the Puppet world, you create modules to manage your servers in different ways. The idea is that servers are dynamic and not necessarily exact duplicates of each other. [Here's one clever approach](http://manuel.kiessling.net/2014/03/26/building-manageable-server-infrastructures-with-puppet-part-4/) that uses the same keys on different servers, but uses a different Puppet module for each user. This solution may or may not apply to you. + +Or, another option is to shift gears altogether. In the world of Docker, you can take a different approach, as described in [this blog regarding SSH and Docker](http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/). + +But what about managing the private keys? If you search, you're not going to find many software options, for the reasons I mentioned earlier; the private keys are sitting on your hard drive, and a management program might not provide much additional security. But I do manage my keys using this method: + +First, I have multiple Host entries in my .ssh/config file. I have an entry for hosts that I log into, but sometimes I have more than one entry for a single host. That happens if I have multiple logins. I have two different logins for the server hosting my git repository; one is strictly for git, and the other is for general-purpose bash access. The one for git has greatly restricted rights on that machine. Remember what I said earlier about my git keys living on remote development machines? There we go. Although those keys can log into one of my servers, the accounts used are severely limited. + + Second, most of these private keys include a passphrase. (For dealing with having to type the passphrase multiple times, considering using [ssh-agent](http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/).) + +Third, I do have some servers that I want to guard a bit more carefully, and I don't have an entry into my Host file. This is more a social engineering aspect, because the key files are still present, but it might take an intruder a bit longer to locate the key file and figure out which machine they go with. In those cases, I just type out the long ssh command manually. (It's really not that bad.) + +And you can see that I'm not using any special software to manage these private keys. + +## One Size Doesn't Fit All + +We occasionally get questions at linux.com for advice on good software for managing keys. But let's take a step back. The question actually needs to be re-framed, because there isn't a one-size-fits-all solution. The questions you ask should be based on your own situation. Are you simply trying to find a place to store your key files? Are you looking for a way to manage multiple users each with their own public key that needs to be inserted into the authorized_keys file? + +Throughout this article, I've covered the basics of how all this fits together, and hopefully at this point you'll see that how you manage your keys, and whatever software you look for (if you even need additional software at all), should happen only after you ask the right questions. + + +------------------------------------------------------------------------------ + +via: http://www.linux.com/learn/tutorials/838235-how-to-best-manage-encryption-keys-on-linux + +作者:[Jeff Cogswell][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/62256 From 0f472802375809d232f12c4e084dfa34f7c7835d Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 23:38:59 +0800 Subject: [PATCH 0972/1710] =?UTF-8?q?20160218-18=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Top 4 open source issue tracking tools.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sources/tech/20160218 Top 4 open source issue tracking tools.md diff --git a/sources/tech/20160218 Top 4 open source issue tracking tools.md b/sources/tech/20160218 Top 4 open source issue tracking tools.md new file mode 100644 index 0000000000..b2f784e1e7 --- /dev/null +++ b/sources/tech/20160218 Top 4 open source issue tracking tools.md @@ -0,0 +1,63 @@ +Top 4 open source issue tracking tools +======================================== + +Life is full of bugs. + +No matter how carefully planned, no matter how much time went into design, any project is going to have unforseen issues when the rubber hits the road in the implementation stage. And that's okay. Perhaps the best measure of resiliency for any organization is not how well they handle things when everything is functioning as planned, but rather, how they handle the speed bumps when they come along. + +A critical tool for any project management workflow, especially in the software development world, is an issue tracker. The basics are simple; allowing bugs to be opened, tracked, and resolved in a collaborative manner, while making it easy to follow the progress. Beyond the basic functionality, there are a lot of options focused on meeting specific needs, features, and use cases, including software development and beyond. You may be familiar with hosted versions of these tools, like [GitHub Issues](https://guides.github.com/features/issues/) or [Launchpad](https://launchpad.net/), some of which are themselves open source. + +So let's take a look at four excellent choices for managing bugs and issues, all open source and all easy to download and host yourself. To be clear, there's no way we could possibly list every issue tracking tool here; instead, these are four of our favorites, based on feature richness and the size of the community behind the project. There are others, to be sure, and if you've got a good case for your favorite not listed here, be sure to let us know which is your favorite tool and what makes it stand out to you, in the comments below. + +## Redmine + +[Redmine](http://www.redmine.org/) is a popular issue tracking tool built on Ruby on Rails and dating back to 2006. Similar in many regards to Trac, another one of our favorites, Redmine is capable of managing multiple projects and integrates with a number of version control systems. In addition to basic issue tracking, Redmine also offers forums, wikis, time tracking tools, and the ability to generate Gantt charts and calendars to track progress. + +Redmine is fairly flexible in its setup, supporting numerous database backends and dozens of languages, and is customizable as well, featuring the ability to add custom fields to issues, users, projects and more. It can be further customized with a number of community-created plugins and themes. + +An [online demo](http://demo.redmine.org/) is available if you’d like to try it out. Redmine is licensed as open source under the [GPL version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html); the source code can be found in the project’s [subversion repository](https://svn.redmine.org/redmine) or mirrored on [GitHub](https://github.com/redmine/redmine). + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-redmine.png) + +## Bugzilla + +[Bugzilla](https://www.bugzilla.org/) is another popular development tool with issue tracking capabilities. As you might have guessed from the name, Bugzilla was originally created by the [Mozilla Foundation](https://www.mozilla.org/en-US/) to track bugs in the development of the then-called Netscape Communicator suite. Ported to Perl from its original Tcl routes for greater accessibility, Bugzilla is one of the older and more widely adopted issue tracking systems, as it is used by a number of well-known open source projects like GNOME, KDE, and the Linux kernel itself. + +Sporting a number of advanced tools, from notifications to duplicate bug detection to shared searches, Bugzilla is certainly a more feature-rich option. Bugzilla has an advanced search system along with a comprehensive reporting tool, capable of generating charts and automated scheduled reports. Like Redmine, Bugzilla is extensible and customizable, both in the fields themselves as well as featuring the ability to create custom workflows for bugs. It also works with many database backends, and many different languages are supported out of the box. + +Bugzilla is licensed under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License), and you can read their [future roadmap](https://www.bugzilla.org/status/roadmap.html) and try out a [demo server](https://landfill.bugzilla.org/) on the official website. + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-bugzilla.png) + +## Trac + +[Trac](http://trac.edgewall.org/browser) describes itself as taking a minimalistic approach to web-based software project management, but don’t confusing minimalism with a lack of features. + +Written in Python, Trac tightly integrates its bug tracking capabilities with its wiki system and a revision control system of your choosing. It features project management capabilities like generating milestones and roadmaps, a customizable reporting system, timelines, support for multiple repositories, built-in spam filtering, and is available in many common languages. Like the other bug trackers we have looked at, has a number of plugins available for it extending its base feature set even further. + +Trac is made available as open source under a modified [BSD license](http://trac.edgewall.org/wiki/TracLicense), though older versions were released under the GPL. You can view Trac’s source in a [self-hosted repository](http://trac.edgewall.org/browser) or check out their [roadmap](http://trac.edgewall.org/wiki/TracRoadmap) for future plans. + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-trac.png) + +## Mantis + +[Mantis](https://www.mantisbt.org/) is the final tool we’ll look at in this collection, a PHP-based bug tracker with a sixteen year history. Another bug tracker with support for many different revision control systems and an event-driven notification system, Mantis has a similar feature set to other tools here. While it does not itself contain a wiki, it integrates with many popular wiki platforms and is localized into many languages. + +Mantis is licensed as open source under the [GPL version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html); you can browse its source code on [GitHub](https://github.com/mantisbt/mantisbt) or check out the self-hosted [roadmap](https://www.mantisbt.org/bugs/roadmap_page.php?project=mantisbt&version=1.3.x) for future plans. For a demo, you can check out their own internal [bug tracker](https://www.mantisbt.org/bugs/my_view_page.php). + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-mantis.png) + +As we notes, these four are not the only options. Looking to explore some others? [Apache Bloodhound](https://issues.apache.org/bloodhound/), [Fossil](http://fossil-scm.org/index.html/doc/trunk/www/index.wiki), [The Bug Genie](http://www.thebuggenie.com/), and many alternatives all have dedicated followings, each with different strengths and weaknesses. In addtion, some of the tools in our [project management](https://opensource.com/business/15/1/top-project-management-tools-2015) roundup have issue tracking capabilities. So, which is your preferred tool for tracking and squashing bugs? + + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/2/top-issue-support-and-bug-tracking-tools + +作者:[Jason Baker][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jason-baker From a49f2ec78e8cf0dbb8600ec9c28333c191207c4f Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 18 Feb 2016 23:50:38 +0800 Subject: [PATCH 0973/1710] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/news/20160218 Russia Announces Switch to Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20160218 Russia Announces Switch to Linux.md b/sources/news/20160218 Russia Announces Switch to Linux.md index aa7fb66a86..1f5cdd1f49 100644 --- a/sources/news/20160218 Russia Announces Switch to Linux.md +++ b/sources/news/20160218 Russia Announces Switch to Linux.md @@ -1,3 +1,5 @@ +translating by Ezio + This Week in Linux News:Russia Announces Switch to Linux, Outdated Fight for the Linux Desktop ========================================================================= This week in Linux news, Russia announces a possible switch to Linux, Jack Wallen ponders the importance of the Linux Desktop in 2016, and more! Get up-to-date on the Latest Linux news with our weekly digest. From f3ae44aa6236a68149a094dee64a58ecaf1bd7de Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 19 Feb 2016 00:12:04 +0800 Subject: [PATCH 0974/1710] =?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 试水新类型文章 --- ...160218 Russia Announces Switch to Linux.md | 35 ------------------- ...160218 Russia Announces Switch to Linux.md | 35 +++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 sources/news/20160218 Russia Announces Switch to Linux.md create mode 100644 translated/news/20160218 Russia Announces Switch to Linux.md diff --git a/sources/news/20160218 Russia Announces Switch to Linux.md b/sources/news/20160218 Russia Announces Switch to Linux.md deleted file mode 100644 index 1f5cdd1f49..0000000000 --- a/sources/news/20160218 Russia Announces Switch to Linux.md +++ /dev/null @@ -1,35 +0,0 @@ -translating by Ezio - -This Week in Linux News:Russia Announces Switch to Linux, Outdated Fight for the Linux Desktop -========================================================================= -This week in Linux news, Russia announces a possible switch to Linux, Jack Wallen ponders the importance of the Linux Desktop in 2016, and more! Get up-to-date on the Latest Linux news with our weekly digest. - -1. Russia announces a possible switch to Linux in retalliation against Western business embargo on Crimea. - - [Russia Might Switch Thousands of Government Computers to Linux to Spite Microsoft](http://www.techradar.com/news/world-of-tech/russia-might-switch-thousands-of-government-computers-to-linux-to-spite-microsoft-1314762) - TechRadar - -2. "It doesn't matter if Linux has 1% or 99% of the desktop market share" writes Jack Wallen. - - [Should the Fight for the Linux Desktop Really Matter?](http://www.techrepublic.com/article/should-the-fight-for-the-linux-desktop-really-matter/) - TechRepublic - -3. The Linux Foundation's Hyperledger Project experiences growth in membership since its launch in December. - - [Linux Foundation-Led Blockchain Project Grows to 30 Members](http://www.coindesk.com/linux-foundation-led-hyperledger-project-swells-to-30-members/) - CoinDesk - -4. Docker's founder and CTO, Solomon Hykes, suggests Alpine Linux will be the company's new default OS. - - [Is Docker Ditching Ubuntu Linux? Confusion Reigns](http://www.infoworld.com/article/3031847/open-source-tools/is-docker-ditching-ubuntu-linux-confusion-reigns.html) - InfoWorld - -5. The Node.js Foundation, a Linux Foundation Collaborative Project, will bring in popular third-party "Express" package. - - [The Node.js Foundation Plans to Incubate One of the Community’s Most Popular Packages](http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more#gref)- The Next Web - ------------------------------------------------------------------------------- - -via: http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more - -作者:[linux.com][linux.com] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/news/20160218 Russia Announces Switch to Linux.md b/translated/news/20160218 Russia Announces Switch to Linux.md new file mode 100644 index 0000000000..a259ec1e4e --- /dev/null +++ b/translated/news/20160218 Russia Announces Switch to Linux.md @@ -0,0 +1,35 @@ +本周 Linux 新闻: 俄罗斯宣布迁移到 Linux +========================================================================= + +本周 Linux 新闻, 俄罗斯宣布可能会将系统迁移到 Linux 上, Jack Wallen 思考2016 年对 Linux 桌面系统的重要性, 等等。下面就让我们看看本周 Linux 界都有那些重要新闻。 + +1. 俄罗斯宣布有可能切换到 Linux , 以此来反击自克里米亚以来西方实施的商业禁运。 + + [俄罗斯可能讲成千上万台政府的电脑系统从 Windows 切换成 Linux](http://www.techradar.com/news/world-of-tech/russia-might-switch-thousands-of-government-computers-to-linux-to-spite-microsoft-1314762) - TechRadar + +2. Jack Wallen 写到:“对于 Linux 来说占有桌面系统市场 1% 或者 99% 并不重要” + + [为了 Linux 桌面系统奋斗是否真的很重要?](http://www.techrepublic.com/article/should-the-fight-for-the-linux-desktop-really-matter/) - TechRepublic + +3. 自从去年12月以来,参与 Linux 基金会的 HYPERLEDGER 计划的合作伙伴有了显著的增加 + + [Linux 基金会的 HYPERLEDGER 计划已经有了30 个合作伙伴](http://www.coindesk.com/linux-foundation-led-hyperledger-project-swells-to-30-members/) - CoinDesk + +4. Docker 的创始人和 CTO , Solomon Hykes 暗示 Alpine Linux 将会成为公司新的默认操作系统 + + [Docker 将会抛弃 Ubuntu 吗?](http://www.infoworld.com/article/3031847/open-source-tools/is-docker-ditching-ubuntu-linux-confusion-reigns.html) - InfoWorld + +5.Node.js 基金会, 作为Linux 基金会的合作项目, 将会产生流行的第三方快捷(Express)软件包 + + [Node.js 基金会计划孵化社区中最流行的一个软件包](http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more#gref)- The Next Web + + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more + +作者:[linux.com][linux.com] +译者:[译者ID](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 5daff92f5784a06f3d893772eb5d66510bc1fdc7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 19 Feb 2016 00:17:00 +0800 Subject: [PATCH 0975/1710] =?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 --- .../news/20160218 Russia Announces Switch to Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/news/20160218 Russia Announces Switch to Linux.md b/translated/news/20160218 Russia Announces Switch to Linux.md index a259ec1e4e..04da7f31c1 100644 --- a/translated/news/20160218 Russia Announces Switch to Linux.md +++ b/translated/news/20160218 Russia Announces Switch to Linux.md @@ -1,4 +1,4 @@ -本周 Linux 新闻: 俄罗斯宣布迁移到 Linux +本周 Linux 新闻: 俄罗斯宣布政府电脑系统迁移到 Linux ========================================================================= 本周 Linux 新闻, 俄罗斯宣布可能会将系统迁移到 Linux 上, Jack Wallen 思考2016 年对 Linux 桌面系统的重要性, 等等。下面就让我们看看本周 Linux 界都有那些重要新闻。 @@ -19,9 +19,9 @@ [Docker 将会抛弃 Ubuntu 吗?](http://www.infoworld.com/article/3031847/open-source-tools/is-docker-ditching-ubuntu-linux-confusion-reigns.html) - InfoWorld -5.Node.js 基金会, 作为Linux 基金会的合作项目, 将会产生流行的第三方快捷(Express)软件包 +5.Node.js 基金会, 作为Linux 基金会的合作项目, 计划将 Express 引入基金会 - [Node.js 基金会计划孵化社区中最流行的一个软件包](http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more#gref)- The Next Web + [Node.js 基金会计划将社区里最流行的框架软件 Expres 引入基金会进行孵化](http://thenextweb.com/dd/2016/02/10/the-node-js-foundation-plans-to-incubate-one-of-the-communitys-most-popular-packages/)- The Next Web ------------------------------------------------------------------------------ From 315e6e200f255770f1666c16fb8505ce4b6682b9 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 19 Feb 2016 00:17:56 +0800 Subject: [PATCH 0976/1710] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index 5fb0d286d0..d2f3c4ee5c 100644 --- a/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -1,3 +1,5 @@ +translatin by Ezio + Meizu PRO 5 Ubuntu Edition Announced and It's a Beast ======================================================== From a10b20f772d617b13d930ea84d112d26fabd1bdc Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 19 Feb 2016 00:41:54 +0800 Subject: [PATCH 0977/1710] =?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 --- ...untu Edition Announced and It's a Beast.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index d2f3c4ee5c..fceeccc881 100644 --- a/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -1,27 +1,28 @@ translatin by Ezio Meizu PRO 5 Ubuntu Edition Announced and It's a Beast +魅族 Pr 5 Ubuntu 版即将发布 ======================================================== -## Canonical and Meizu have just revealed that Meizu PRO 5 Ubuntu Edition will be available for pre-order during Mobile World Congress 2016. +**Canonical 和魅族刚刚透露魅族 Pro 5 Ubuntu 版将在2016 世界移动大会召开期间开始预售** -It's been a while since we last heard something from Meizu, but it looks like the collaboration between Canonical and the Chinese hardware maker is still alive. From the looks of it, the previous Meizu MX4 Ubuntu Edition was only a limited release, so only a small number of devices have been sold. +自从上次听到魅族的消息到现在已经很久了,但是看起来 Canonical 和这个中国的硬件厂商之间的合作关系仍然存在。从表面来看,之前的魅族 MX4 Ubuntu 版只是进行了有限的发布,所以只有很少的设备被出售出去了。 -We can only hope that Meizu PRO 5 Ubuntu Edition will be made available in greater numbers, especially since it's a much newer phone that's still supported by Meizu. +我们可以仅仅希望 魅族 Pro 5 Ubuntu 版可以增加更多的供货量,特别因为他还是一个魅族仍然提供支持的非常新的手机。 -This latest Meizu PRO 5 Ubuntu Edition is the fifth official device that comes with Ubuntu Touch, and we'll likely see many more phones and maybe tablets with this operating system landing in 2016. +最新的魅族 Pro 5 是第5个支持 Ubuntu Touch 的官方设备,而且在2016 年我们将会看到更多的手机,以及平板会预装这个操作系统。 -##Meizu PRO 5 Ubuntu Edition is a beast +## 魅族 Pro 5 Ubuntu 版将会非常震撼 -Canonical says that it's the most powerful Ubuntu smartphone launched to date, and they are right, not to mention that it's also the biggest, if we don't count the tablet. Meizu PRO 5 features a Samsung Exynos 7420 Octa-core processor, a 5.7-inch 1920x1080 AMOLED display, Corning Gorilla Glass 3, and LPDDR4 memory technology. +Canonical 宣称 Pro 5 是目前已发布了的 Ubuntu 智能手机中最强大的, 他们说的是对的, 除了这一点,它还是平板意外最大的。 魅族 Pro 5 拥有一颗 Exynos 7420 8核处理器,5.7 英寸分辨率未1920x1080 的 AMOLED 屏,覆盖第三代大猩猩屏,以及 LPDDR4 内存技术。 -Many of you will probably ask if this new phone is also capable of desktop convergence, and it looks that users are in luck. +很多人也许会问这个新手机是否可以汇聚桌面版系统, 而且看起来用户是运气不错。 -"Canonical remains committed to the vision of reinventing personal computing through a single, adaptive platform for all personal device form factors. As such, while the PRO 5 lacks MHL output, the software running on the Meizu PRO 5 is the latest code which also powers recently announced tablets and other devices and is capable of providing a traditional desktop experience," the company explained. +公司解释说,“Canonical 一直致力于重塑个人计算的视觉表现,希望为所有的的个人设备提供自适应的平台。因此尽管 Pro 5 缺少 MHL 输出,运行在魅族 Pro 5 上的是最新的代码,同时也是最新发布的支持平板和其它设备系统,它可以提供一种传统桌面的体验。” -Meizu PRO 5 was initially launched back in September 2015. Users will also get a 21 MP back camera, and the phone can shoot video at 2160p and 30fps. It also comes with a fingerprint sensor and a Li-Ion 3050 mAh battery with fast charging. +魅族 Pro 5 最初实在2015 年9 月发布的。用户同时会拥有一个2100 万像素的后置摄像头,可以拍摄2160p 和30 fps 的视频。同时它还带有一个指纹传感器和支持快速充电的3050 mAh 的锂电池。 -For now, the phone will only be available in China and Europe, and the preorders will be opened during the Mobile World Congress 2016 that takes place between February 22 and 25. +目前这款手机只在中国和欧洲有售,预定讲从2016 年世界移动大会期间开始,即2 月22 日至25 日。 ![](http://i1-news.softpedia-static.com/images/fitted/620x/meizu-pro-5-ubuntu-edition-announced-and-it-s-a-beast-photos-500526-11.jpg) @@ -31,7 +32,7 @@ For now, the phone will only be available in China and Europe, and the preorders via: http://www.linux.com/news/embedded-mobile/mobile-linux/886322-meizu-pro-5-ubuntu-edition-announced-and-its-a-beast 作者:[Silviu Stahie][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 95e9d1e3942f583e506738fdc27446efcf694021 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 19 Feb 2016 00:42:51 +0800 Subject: [PATCH 0978/1710] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...60218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources/news => translated/tech}/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md (100%) diff --git a/sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/tech/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md similarity index 100% rename from sources/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md rename to translated/tech/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md From 7769afc60d41d4e642a4bad6ab8fd5c9bdea789e Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Fri, 19 Feb 2016 09:28:55 +0800 Subject: [PATCH 0979/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020160218=20The=20Best=20Linux=20Distros=20of=202016?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20160218 The Best Linux Distros of 2016.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160218 The Best Linux Distros of 2016.md b/sources/tech/20160218 The Best Linux Distros of 2016.md index ec3bc1390c..fa9a6b6ffa 100644 --- a/sources/tech/20160218 The Best Linux Distros of 2016.md +++ b/sources/tech/20160218 The Best Linux Distros of 2016.md @@ -1,3 +1,5 @@ +GHLandy Translating + The Best Linux Distros of 2016 ================================ From 4b24c31143224c785aecf0b82a2874500328bdd8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 19 Feb 2016 10:00:37 +0800 Subject: [PATCH 0980/1710] translating --- ...18 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md index 32c822289c..2f26ef8c91 100644 --- a/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md +++ b/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md @@ -1,3 +1,5 @@ +Translating----geekpi + Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04 ======================================================= @@ -20,3 +22,5 @@ via: https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-ZFS-Continues-16 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.michaellarabel.com/ + + From 8051180f3b87d04e5510bf855284cffe761745ce Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 19 Feb 2016 10:18:23 +0800 Subject: [PATCH 0981/1710] translated --- ...FS Plans Are Lining Up For Ubuntu 16.04.md | 26 ------------------- ...FS Plans Are Lining Up For Ubuntu 16.04.md | 24 +++++++++++++++++ 2 files changed, 24 insertions(+), 26 deletions(-) delete mode 100644 sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md create mode 100644 translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md diff --git a/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md deleted file mode 100644 index 2f26ef8c91..0000000000 --- a/sources/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md +++ /dev/null @@ -1,26 +0,0 @@ -Translating----geekpi - -Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04 -======================================================= - -![](https://www.phoronix.com/assets/categories/ubuntu.jpg) - -Ubuntu developers have been working on [ZFS support for Ubuntu 16.04](http://www.phoronix.com/scan.php?page=news_item&px=ZFS-For-Ubuntu-16.04) and all of that file-system support is getting squared away. - -EXT4 will continue to be the default for Ubuntu 16.04 installations, but ZFS support will be automatically built into the Ubuntu Linux kernel releases, the module will automatically load when needed, zfsutils-linux is part of the main Ubuntu archive, and the support is being backed to commercial customers via Canonical. - -For those interested in official ZFS support for Ubuntu Linux, Canonical's Dustin Kirkland has written [a new blog post](http://blog.dustinkirkland.com/2016/02/zfs-is-fs-for-containers-in-ubuntu-1604.html) covering some of the details and why "ZFS is *the* FS for Containers in Ubuntu 16.04!" - ------------------------------------------------------------------------------- - -via: https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-ZFS-Continues-16.04&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Phoronix+%28Phoronix%29 - -作者:[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/ - - diff --git a/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md new file mode 100644 index 0000000000..efe2ff27bc --- /dev/null +++ b/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md @@ -0,0 +1,24 @@ +Canonical的ZFS计划将会进入Ubuntu 16.04 +======================================================= + +![](https://www.phoronix.com/assets/categories/ubuntu.jpg) + +Ubuntu开发者正在为[Ubuntu 16.04 加上支持ZFS](http://www.phoronix.com/scan.php?page=news_item&px=ZFS-For-Ubuntu-16.04) ,并且所遇的文件系统支持都已经准备就绪。 + +Ubuntu 16.04的默认安装将会继续是ext4,但是ZFS支持将会自动构建进Ubuntu发布中,模块将在需要时自动加载,zfsutils-linux是Ubuntu的一部分,并且通过Canonical对商业客户提供支持 + +对于那些对Ubuntu中的ZFS感兴趣的人,Canonical的Dustin Kirkland已经写了[一篇新的博客](http://blog.dustinkirkland.com/2016/02/zfs-is-fs-for-containers-in-ubuntu-1604.html)覆盖了一些细节及为何“ZFS是Ubuntu 16.04中为容器使用的文件系统!” + +------------------------------------------------------------------------------ + +via: https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-ZFS-Continues-16.04&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Phoronix+%28Phoronix%29 + +作者:[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/ + + From 63981031529b0517976ae2ca1118fcb967f6f38a Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Fri, 19 Feb 2016 10:46:48 +0800 Subject: [PATCH 0982/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020160218=20How=20to=20Best=20Manage=20Encryption=20Keys=20o?= =?UTF-8?q?n=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160218 How to Best Manage Encryption Keys on Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md index 19aab96541..468414fdfa 100644 --- a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md +++ b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md @@ -1,3 +1,5 @@ +GHLandy Translating + How to Best Manage Encryption Keys on Linux ============================================= From 1bb3a1380fc9d4cea13e06eff86ba60ee3ed8522 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 19 Feb 2016 12:52:30 +0800 Subject: [PATCH 0983/1710] Taken by GOLinux --- ... LTS Is the Biggest in the Series with Hundreds of Changes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md b/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md index 2bf7e02ce7..3e6e5e4388 100644 --- a/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md +++ b/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md @@ -1,3 +1,4 @@ +Translating by GOLinux Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes ================================================================================= From 34b7f4f7e6efccc50897a41849fafb0b70ea5a04 Mon Sep 17 00:00:00 2001 From: bioIkke <455256722@qq.com> Date: Fri, 19 Feb 2016 13:32:27 +0800 Subject: [PATCH 0984/1710] Update 20160218 7 Steps to Start Your Linux SysAdmin Career.md --- .../tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md index 60b8f7fc75..6df151f9f6 100644 --- a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md +++ b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md @@ -1,3 +1,4 @@ +bioIkke 翻译中 7 Steps to Start Your Linux SysAdmin Career =============================================== From d427778a695757cc9357a1b256373b36220b56f6 Mon Sep 17 00:00:00 2001 From: miaolin Date: Fri, 19 Feb 2016 13:46:41 +0800 Subject: [PATCH 0985/1710] Create 20160218 Mozilla contributor creates diabetes project for the masses.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第一次翻译,感觉确是需要多翻译,校对费心了了 --- ...creates diabetes project for the masses.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md diff --git a/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md b/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md new file mode 100644 index 0000000000..de61ff1d7b --- /dev/null +++ b/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md @@ -0,0 +1,51 @@ +Mozilla贡献者为群众创建糖尿病项目 +================================================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) + + +我的开源生涯从我还是一名高中生开始,我总想着自己能成为一名黑客,没有什么恶意的,只是喜欢钻研代码和硬件那种。我第一次接触开源是2001年, +我安装了我的第一个Linux发行版[Lindows](https://en.wikipedia.org/wiki/Linspire)。当然,我也是[Mozilla Firefox](https://www.mozilla.org/en-US/firefox/new/?utm_source=firefox-com&utm_medium=referral)的早期用户。 + +由于我很早使用Linux,我用的第一个版本是1.0.4(如果我没记错的话),我就立即爱上了它。我没在Lindows上呆太久, +而是活跃于多个发行版([Debian](https://www.debian.org/), +[Puppy Linux](http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm), [SUSE](https://www.suse.com/), +[Slackware](http://www.slackware.com/), [Ubuntu](http://ubuntu.com/)),多年来我一直每天使用着开源软件,从青少年时候直到我成年。 + +最后,我坚持使用Ubuntu。大概是在Hardy Heron(译者注:Ubuntu8.04 LTS)发布时候,我开始第一次为Ubuntu做些贡献,在IRC频道和当地社区 +帮助那些需要帮助的用户。我是通过Ubuntu认识开源的,它在我心里总有着特殊的意义。Ubuntu背后的社区的是非常多样化的,热情的,友好的, +每个人都做些共享,是他们共同的目标也是个人目标,这成为他们为开源贡献的动力。 + +在为Ubuntu贡献一段时间后,我开始了为一些上游项目作贡献,比如Debian, [GNOME](https://www.gnome.org/), +[Ganeti](https://code.google.com/p/ganeti/),还有许多其他的开源项目。 +在过去的几年里,我为超过40个开源项目贡献过,有些小的,也有很大的。 + +在Ubuntu项目方向上有些变化之后,我最终决定不仅对于我是时候该尝试新东西,而且我也想贡献一些新的东西。所以我在2009年参与Mozilla, +在IRC帮忙,最终通过参与[Mozilla WebFWD program](https://webfwd.org/),成为一名团队成员,接着[Mozilla Reps Program](https://reps.mozilla.org/), +[Mozilla DevRel Program](https://wiki.mozilla.org/Devrel),刚过两年时间,我成为了火狐社区的发布经理,负责监督Firefox Nightly +和Firefox ESR的发布。比为其他开源项目,在为Mozilla贡献中会获得更多有益的经验。在所有我参与过的开源社区中,Mozilla是最不同的 +,最大的也是最友好的。 + +这些年来,关于开源我觉得,免费软件,更具安全的隐私和尊重许可,以及公开的工作,我越来越与这样的价值观相一致。我相信这三个主题 +对于开源来说是非常重要的,虽然许多人并没在意到提倡它们是很重要的。 + +今天在这,我已不再是全职的他人开源项目的贡献者。最近我被诊断出患有糖尿病,我看到了开源软件中健康软件不是很丰富这一缺口。确实, +它不像其它开源软件应用如Linux发行版或浏览器那样活跃。 + +我最近创立了自己的开源项目[Glucosio](http://www.glucosio.org/),带给人们糖尿病管理和研究的开源软件。经过几年来对开源项目的贡献, +和见过的多种架构,使得我作为项目领导能够得心应手。我对于Glucosio的未来很兴奋,但最重要的是未来的开源将在医疗健康领域发展的如何。 + +医疗保健软件的创新具有很大潜力,我想我们很快就会看到用于改善医疗卫生保健的开源新方案。 + + +------------------------------------------------------------------------------ + +via: https://opensource.com/life/15/11/my-open-source-story-ben-kerensa + +作者:[opensource.com][a] +译者:[ynmlml](https://github.com/ynmll) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:opensource.com From 0165d6996ef60fe83bd5294aade577b5bd47de77 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 19 Feb 2016 13:52:56 +0800 Subject: [PATCH 0986/1710] [Translated]20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md --- ... in the Series with Hundreds of Changes.md | 29 ------------------- ... in the Series with Hundreds of Changes.md | 27 +++++++++++++++++ 2 files changed, 27 insertions(+), 29 deletions(-) delete mode 100644 sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md create mode 100644 translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md diff --git a/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md b/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md deleted file mode 100644 index 3e6e5e4388..0000000000 --- a/sources/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md +++ /dev/null @@ -1,29 +0,0 @@ -Translating by GOLinux -Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes -================================================================================= - -**It looks like renowned kernel maintainer Greg Kroah-Hartman is on vacation, as Sasha Levin has had the great pleasure of [announcing](http://lkml.iu.edu/hypermail/linux/kernel/1602.2/00520.html) earlier today, February 16, 2016, the general availability of the eighteenth maintenance release of Linux kernel 4.1 LTS.** - -Being a long-term supported kernel branch, Linux 4.1 will receive updates and patches for a few more years, and today's maintenance build proves that the kernel developers are committed to keeping the series stable and reliable for all GNU/Linux operating systems that use it. Linux kernel 4.1.18 LTS is a massive release with a total of 228 files changes, consisting of 5,304 insertions and 1,128 deletions. - -What's new in Linux kernel 4.1.18 LTS? Well, let's start with improvements to the ARM, ARM64 (AArch64), MIPS, PA-RISC, m32r, PowerPC (PPC), s390, and x86 hardware architectures. Moreover, there are enhancements to the Btrfs, CIFS, NFS, XFS, OCFS2, OverlayFS, and UDF filesystems, networking stack fixes, especially for mac80211, as well as multiple core, crypto, and mm improvements and sound updates. - -"I'm announcing the release of the 4.1.18 kernel. All users of the 4.1 kernel series must upgrade," says Sasha Levin. "The updated 4.1.y git tree can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.1.y and can be browsed at the normal kernel.org git web browser: http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary." - -## Numerous drivers have been updated - -Besides the architectures, filesystems, sound, networking, crypto, mm, and core kernel improvements, Linux kernel 4.1.18 LTS updates various drivers for better hardware support. This is in particular for things like Bluetooth, DMA, EDAC, GPU (mostly Radeon and Intel i915), InfiniBand, IOMMU, IRQchip, MD, MMC, DVB, networking (mostly wireless), PCI, SCSI, USB, thermal, staging, TTY, and Virtio. - -As usual, we're urging all users of Linux kernel-based operating systems that use kernel packages from the Linux 4.1 LTS series to update to today's 4.1.18 release as soon as possible. This can be done either by installing the update from the default software repositories or by manually compiling the sources, which you can download right now from the [kernel.org](http://kernel.org/) website or via [Softpedia](http://linux.softpedia.com/get/System/Operating-Systems/Kernels/Linux-Kernel-Stable-1960.shtml). - ------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/linux-kernel-4-1-18-lts-is-the-biggest-in-the-series-with-hundreds-of-changes-500500.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 diff --git a/translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md b/translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md new file mode 100644 index 0000000000..4a53818b49 --- /dev/null +++ b/translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md @@ -0,0 +1,27 @@ +Linux最大版本4.1.18 LTS发布,带来大量修改 +================================================================================= + +**著名的内核维护者Greg Kroah-Hartman貌似正在度假中,因为Sasha Levin有幸在今天,2016年2月16日,的早些时候来[宣布](http://lkml.iu.edu/hypermail/linux/kernel/1602.2/00520.html),第十八个Linux内核维护版本Linux Kernel 4.1 LTS通用版本正式发布。** + +作为长期支持的内核分支,Linux 4.1将再多几年接收到更新和补丁,而今天的维护构建版本也证明一点,就是内核开发者们正致力于统保持该系列在所有使用该版本的GNU/Linux操作系统上稳定和可靠。Linux Kernel 4.1.18 LTS是一个大规模发行版,它带来了总计达228个文件修改,这些修改包含了多达5304个插入修改和1128个删除修改。 + +Linux Kernel 4.1.18 LTS更新了什么呢?好吧,首先是对ARM,ARM64(AArch64),MIPS,PA-RISC,m32r,PowerPC(PPC),s390以及x86等硬件架构的改进。此外,还有对Btrfs,CIFS,NFS,XFS,OCFS2,OverlayFS以及UDF文件系统的加强。对网络堆栈的修复,尤其是对mac80211的修复。同时,还有多核心、加密和mm等方面的改进和对声音的更新。 + +“我宣布4.1.18内核正式发布,所有4.1内核系列的用户都应当升级。”Sasha Levin说,“更新的4.1.y git树可以在这里找到:git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.1.y,并且可以在常规kernel.org git网站浏览器:http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary 进行浏览。” +## 大量驱动被更新 + +除了架构、文件系统、声音、网络、加密、mm和核心内核方面的改进之外,Linux Kernel 4.1.18 LTS更新了各个驱动,以提供更好的硬件支持,特别是像蓝牙、DMA、EDAC、GPU(主要是Radeon和Intel i915)、无限带宽技术、IOMMU、IRQ芯片、MD、MMC、DVB、网络(主要是无线)、PCI、SCSI、USB、散热、暂存和Virtio等此类东西。 + +和以往一样,我们鼓励所有基于Linux内核的操作系统平台的用户,凡是使用了Linux 4.1 LTS系列内核包的,尽快更新到今天的4.1.18版本。这些用户可以通过默认软件仓库安装更新,也可以手动编译源码包,这些包你现在就可以从[kernel.org](http://kernel.org/)网站或者[Softpedia](http://linux.softpedia.com/get/System/Operating-Systems/Kernels/Linux-Kernel-Stable-1960.shtml)下载。 + +------------------------------------------------------------------------------ + +via: http://news.softpedia.com/news/linux-kernel-4-1-18-lts-is-the-biggest-in-the-series-with-hundreds-of-changes-500500.shtml + +作者:[Marius Nestor ][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor From 401f1507f651c46c8ef44504e5f2d1f454f0fee5 Mon Sep 17 00:00:00 2001 From: miaolin Date: Fri, 19 Feb 2016 14:05:56 +0800 Subject: [PATCH 0987/1710] =?UTF-8?q?=E5=BF=98=E4=BA=86=E5=88=A0=E5=8E=9F?= =?UTF-8?q?=E6=96=87=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...creates diabetes project for the masses.md | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md diff --git a/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md b/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md deleted file mode 100644 index 61e5c08883..0000000000 --- a/sources/tech/20160218 Mozilla contributor creates diabetes project for the masses.md +++ /dev/null @@ -1,35 +0,0 @@ -translating by ynmlml -Mozilla contributor creates diabetes project for the masses -================================================================ - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) - -My open source story started in high school as a student. I always considered myself to be a hacker—not the malicious type, but the curious type who liked to tinker with code and hardware. My first encounter with open source was in 2001 when I installed my first Linux distro, [Lindows](https://en.wikipedia.org/wiki/Linspire). Of course, I was also an early user of [Mozilla Firefox](https://www.mozilla.org/en-US/firefox/new/?utm_source=firefox-com&utm_medium=referral). - -As a result of my early adoption of Linux, the first version I used was 1.0.4 (if I recall correctly), and I immediately fell in love. While I did not stay long with Lindows, hopping across many distros ([Debian](https://www.debian.org/), [Puppy Linux](http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm), [SUSE](https://www.suse.com/), [Slackware](http://www.slackware.com/), [Ubuntu](http://ubuntu.com/)) over the years I continued to use open source software on a daily basis from my youth into adulthood. - -Eventually, I consistently used Ubuntu. Around the release of Hardy Heron I started some of my first contributions to Ubuntu, helping out on IRC and helping users locally who needed help. With Ubuntu being where I cut my teeth in open source, it has always had a special place in my heart. The community behind Ubuntu is very diverse, passionate, and friendly and everyone comes together with some shared common goals but also individuals' goals as drivers for why they contribute to open source. - -After having contributed to Ubuntu for a while, I started contributing upstream to projects like Debian, [GNOME](https://www.gnome.org/), [Ganeti](https://code.google.com/p/ganeti/), and many others. In the past few years I have contributed to over 40 different open source projects, some small and some very large. - -After some changes in direction in the Ubuntu project, I ended up deciding not only that was it time for me to try something new, but that also I wanted to put my contributions into something new. So I started getting involved in Mozilla around 2009, helping out on IRC and then eventually getting involved with the [Mozilla WebFWD program](https://webfwd.org/), becoming a team member, then the [Mozilla Reps Program](https://reps.mozilla.org/), [Mozilla DevRel Program](https://wiki.mozilla.org/Devrel), and then for just over two years was a Firefox Community Release Manager overseeing the release of Firefox Nightly and Firefox ESR. Contributing to Mozilla was an even more rewarding experience than contributions to other open source projects. Of all the open source communities I've been involved in, Mozilla has been the most diverse, largest, and friendliest. - -One thing that has happened over the years in terms of my feelings about open source is I've become more and more aligned to the values of free software and more defensive of things like privacy and respecting licensing and working in the open. I believe all three of those topics are very important to open source, and while many may not care about these things it's important that people advocate for them. - -And here I am today, no longer a full-time contributor to other people's open source projects. Recently being diagnosed with diabetes, I saw a gap in the open source ecosystem where open source health software was not very abundant. Where it did exist, it was not as active as other open source software applications like Linux distros or browsers. - -I recently founded my own open source project, [Glucosio](http://www.glucosio.org/), to bring open source diabetes management and research software to the masses. My years of contributing to open source projects and observing various structures has really come in handy being a project leader now. I'm very excited about the future of Glucosio, but most importantly about the future open source and how that will play out in health and medicine. - -There is a lot of potential for software innovation in healthcare, and I think we will soon see a startup disrupt healthcare and medicine with open source solutions. - ------------------------------------------------------------------------------- - -via: https://opensource.com/life/15/11/my-open-source-story-ben-kerensa - -作者:[opensource.com][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:opensource.com From 6f75af2fabdc9ba1601708501b662c52e5b3841e Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 19 Feb 2016 14:08:28 +0800 Subject: [PATCH 0988/1710] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...18 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 3 --- 1 file changed, 3 deletions(-) rename translated/{tech => news}/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md (97%) diff --git a/translated/tech/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md similarity index 97% rename from translated/tech/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md rename to translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index fceeccc881..1c07796555 100644 --- a/translated/tech/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -1,6 +1,3 @@ -translatin by Ezio - -Meizu PRO 5 Ubuntu Edition Announced and It's a Beast 魅族 Pr 5 Ubuntu 版即将发布 ======================================================== From 3163de29ac2c0e820ec0233af60b2a1ed611f029 Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Fri, 19 Feb 2016 14:25:16 +0800 Subject: [PATCH 0989/1710] Update 20160218 Russia Announces Switch to Linux.md --- ...160218 Russia Announces Switch to Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/news/20160218 Russia Announces Switch to Linux.md b/translated/news/20160218 Russia Announces Switch to Linux.md index 04da7f31c1..4e322fadc4 100644 --- a/translated/news/20160218 Russia Announces Switch to Linux.md +++ b/translated/news/20160218 Russia Announces Switch to Linux.md @@ -1,27 +1,27 @@ 本周 Linux 新闻: 俄罗斯宣布政府电脑系统迁移到 Linux ========================================================================= -本周 Linux 新闻, 俄罗斯宣布可能会将系统迁移到 Linux 上, Jack Wallen 思考2016 年对 Linux 桌面系统的重要性, 等等。下面就让我们看看本周 Linux 界都有那些重要新闻。 +本周 Linux 新闻包括:俄罗斯宣布可能会将系统迁移到 Linux 上、Jack Wallen 思考 2016 年对 Linux 桌面系统的重要性,等等。下面就让我们看看本周 Linux 界都有那些重要新闻。 -1. 俄罗斯宣布有可能切换到 Linux , 以此来反击自克里米亚以来西方实施的商业禁运。 +1. 俄罗斯宣布有可能切换到 Linux , 以此来反击西方因克里米亚问题而实施的商业禁运。 - [俄罗斯可能讲成千上万台政府的电脑系统从 Windows 切换成 Linux](http://www.techradar.com/news/world-of-tech/russia-might-switch-thousands-of-government-computers-to-linux-to-spite-microsoft-1314762) - TechRadar + [俄罗斯可能将成千上万台政府的电脑系统从 Windows 切换成 Linux](http://www.techradar.com/news/world-of-tech/russia-might-switch-thousands-of-government-computers-to-linux-to-spite-microsoft-1314762) - TechRadar -2. Jack Wallen 写到:“对于 Linux 来说占有桌面系统市场 1% 或者 99% 并不重要” +2. Jack Wallen 写到:“对于 Linux 来说,占有桌面系统市场 1% 或者 99% 并不重要” [为了 Linux 桌面系统奋斗是否真的很重要?](http://www.techrepublic.com/article/should-the-fight-for-the-linux-desktop-really-matter/) - TechRepublic -3. 自从去年12月以来,参与 Linux 基金会的 HYPERLEDGER 计划的合作伙伴有了显著的增加 +3. 自从去年 12 月以来,参与 Linux 基金会的 HYPERLEDGER 计划的合作伙伴有了显著的增加 - [Linux 基金会的 HYPERLEDGER 计划已经有了30 个合作伙伴](http://www.coindesk.com/linux-foundation-led-hyperledger-project-swells-to-30-members/) - CoinDesk + [Linux 基金会的 HYPERLEDGER 计划已经有了 30 个合作伙伴](http://www.coindesk.com/linux-foundation-led-hyperledger-project-swells-to-30-members/) - CoinDesk -4. Docker 的创始人和 CTO , Solomon Hykes 暗示 Alpine Linux 将会成为公司新的默认操作系统 +4. Docker 的创始人和 CTO , Solomon Hykes 建议将 Alpine Linux 作为公司新的默认操作系统 [Docker 将会抛弃 Ubuntu 吗?](http://www.infoworld.com/article/3031847/open-source-tools/is-docker-ditching-ubuntu-linux-confusion-reigns.html) - InfoWorld -5.Node.js 基金会, 作为Linux 基金会的合作项目, 计划将 Express 引入基金会 +5. Linux 基金会的合作项目 Node.js 基金会计划引入流行的第三方软件包“Express” - [Node.js 基金会计划将社区里最流行的框架软件 Expres 引入基金会进行孵化](http://thenextweb.com/dd/2016/02/10/the-node-js-foundation-plans-to-incubate-one-of-the-communitys-most-popular-packages/)- The Next Web + [Node.js 基金会计划引入社区里最流行的框架软件 Express 进行孵化](http://thenextweb.com/dd/2016/02/10/the-node-js-foundation-plans-to-incubate-one-of-the-communitys-most-popular-packages/)- The Next Web ------------------------------------------------------------------------------ @@ -30,6 +30,6 @@ via: http://www.linux.com/news/software/applications/885174-this-week-in-linux-n 作者:[linux.com][linux.com] 译者:[译者ID](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +校对:[校对者ID](https://github.com/Yuking-net) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8f9ed3456f44ffbf97894d1e2232c2a0e1345626 Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Fri, 19 Feb 2016 14:26:22 +0800 Subject: [PATCH 0990/1710] Update 20160218 Russia Announces Switch to Linux.md --- translated/news/20160218 Russia Announces Switch to Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/news/20160218 Russia Announces Switch to Linux.md b/translated/news/20160218 Russia Announces Switch to Linux.md index 4e322fadc4..9aa0ee327a 100644 --- a/translated/news/20160218 Russia Announces Switch to Linux.md +++ b/translated/news/20160218 Russia Announces Switch to Linux.md @@ -29,7 +29,7 @@ via: http://www.linux.com/news/software/applications/885174-this-week-in-linux-news-russia-announces-switch-to-linux-outdated-fight-for-the-linux-desktop-a-more 作者:[linux.com][linux.com] -译者:[译者ID](https://github.com/oska874) -校对:[校对者ID](https://github.com/Yuking-net) +译者:[oska874](https://github.com/oska874) +校对:[Yuking_net](https://github.com/Yuking-net) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 65a7ff39d5bcbd4c11509f008c62dccf519c1b32 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 19 Feb 2016 14:48:26 +0800 Subject: [PATCH 0991/1710] Rename translated/news/20160218 Russia Announces Switch to Linux.md to published/20160218 Russia Announces Switch to Linux.md --- .../20160218 Russia Announces Switch to Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/news => published}/20160218 Russia Announces Switch to Linux.md (100%) diff --git a/translated/news/20160218 Russia Announces Switch to Linux.md b/published/20160218 Russia Announces Switch to Linux.md similarity index 100% rename from translated/news/20160218 Russia Announces Switch to Linux.md rename to published/20160218 Russia Announces Switch to Linux.md From 099e7daa37819b2cffc6c9c3b9b1279a7ed785f2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 19 Feb 2016 14:49:18 +0800 Subject: [PATCH 0992/1710] fix some bug --- ... Ubuntu Edition Announced and It's a Beast.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index 1c07796555..7bc06d74b7 100644 --- a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -1,25 +1,25 @@ -魅族 Pr 5 Ubuntu 版即将发布 +魅族 Pro 5 Ubuntu 版即将发布 ======================================================== **Canonical 和魅族刚刚透露魅族 Pro 5 Ubuntu 版将在2016 世界移动大会召开期间开始预售** -自从上次听到魅族的消息到现在已经很久了,但是看起来 Canonical 和这个中国的硬件厂商之间的合作关系仍然存在。从表面来看,之前的魅族 MX4 Ubuntu 版只是进行了有限的发布,所以只有很少的设备被出售出去了。 +自从上次听到魅族的消息到现在已经很久了,但是看起来 Canonical 和这个中国的硬件厂商之间的合作关系仍然存在。从表面来看,之前魅族的 MX4 Ubuntu 版只是进行了小范围的发布,所以只有很少的设备卖出去了。 -我们可以仅仅希望 魅族 Pro 5 Ubuntu 版可以增加更多的供货量,特别因为他还是一个魅族仍然提供支持的非常新的手机。 +我们仅仅希望 魅族 Pro 5 Ubuntu 版可以提高供货量,特别因为它还是一个魅族仍然提供支持的非常新的手机。 -最新的魅族 Pro 5 是第5个支持 Ubuntu Touch 的官方设备,而且在2016 年我们将会看到更多的手机,以及平板会预装这个操作系统。 +最新的魅族 Pro 5 是第5个支持 Ubuntu Touch 的官方设备,而且在2016 年我们将会看到更多的手机以及平板都会预装这个操作系统。 ## 魅族 Pro 5 Ubuntu 版将会非常震撼 -Canonical 宣称 Pro 5 是目前已发布了的 Ubuntu 智能手机中最强大的, 他们说的是对的, 除了这一点,它还是平板意外最大的。 魅族 Pro 5 拥有一颗 Exynos 7420 8核处理器,5.7 英寸分辨率未1920x1080 的 AMOLED 屏,覆盖第三代大猩猩屏,以及 LPDDR4 内存技术。 +Canonical 宣称 Pro 5 是目前已发布了的 Ubuntu 智能手机中最强大的, 他们说的是对的, 除了这一点,它还是平板以外最大的设备。 魅族 Pro 5 拥有一颗 Exynos 7420 8核处理器,5.7 英寸分辨率为1920x1080 的 AMOLED 屏,覆盖第三代大猩猩屏,以及 LPDDR4 内存技术。 -很多人也许会问这个新手机是否可以汇聚桌面版系统, 而且看起来用户是运气不错。 +很多人也许会问这个新手机的系统是否可以和桌面版系统一样, 现在看起来用户是运气不错。 -公司解释说,“Canonical 一直致力于重塑个人计算的视觉表现,希望为所有的的个人设备提供自适应的平台。因此尽管 Pro 5 缺少 MHL 输出,运行在魅族 Pro 5 上的是最新的代码,同时也是最新发布的支持平板和其它设备系统,它可以提供一种传统桌面的体验。” +公司解释说,“Canonical 一直致力于重塑个人计算的视觉表现,希望为所有的的个人设备提供自适应的平台。因此尽管 Pro 5 缺少 MHL 输出,但运行在魅族 Pro 5 上的是最新的代码,同时也是最新发布的支持平板和其它设备的系统,它可以提供一种接近传统桌面的体验。” 魅族 Pro 5 最初实在2015 年9 月发布的。用户同时会拥有一个2100 万像素的后置摄像头,可以拍摄2160p 和30 fps 的视频。同时它还带有一个指纹传感器和支持快速充电的3050 mAh 的锂电池。 -目前这款手机只在中国和欧洲有售,预定讲从2016 年世界移动大会期间开始,即2 月22 日至25 日。 +目前这款手机只在中国和欧洲有售,预定将从2016 年世界移动大会期间开始,即2 月22 日至25 日。 ![](http://i1-news.softpedia-static.com/images/fitted/620x/meizu-pro-5-ubuntu-edition-announced-and-it-s-a-beast-photos-500526-11.jpg) From a5d070d8fbd46fe82edf4eff9480c0fb7ca250fc Mon Sep 17 00:00:00 2001 From: Markgolzh Date: Fri, 19 Feb 2016 17:58:17 +0800 Subject: [PATCH 0993/1710] =?UTF-8?q?=F0=9F=91=80=E7=A5=9E=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit zky001翻译中 --- ...0218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md index e3cc72cd8d..16fc43d0b3 100644 --- a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md +++ b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md @@ -1,3 +1,4 @@ +zky001开始翻译 How to Set Nginx as Reverse Proxy on Centos7 CPanel ================================================================================ @@ -198,4 +199,4 @@ via: http://linoxide.com/linux-how-to/set-nginx-reverse-proxy-centos-7-cpanel/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/saheethas/ \ No newline at end of file +[a]:http://linoxide.com/author/saheethas/ From 8d2861b287ec5319ffc2d395a52ad588ecbb3844 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 19 Feb 2016 21:45:45 +0800 Subject: [PATCH 0994/1710] Martin --- .../tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md index d90f6bfbce..313bf3b9e5 100644 --- a/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md +++ b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md @@ -1,3 +1,4 @@ +martin ST Releases Free Linux IDE for 32-Bit MCUs ================================================= From ec638ca480a1796229bd2675a14036335aa3765e Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Fri, 19 Feb 2016 22:55:51 +0800 Subject: [PATCH 0995/1710] =?UTF-8?q?20160219-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 on Ubuntu 15.04 or CentOS 7.md | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md diff --git a/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..cc0cd57b6d --- /dev/null +++ b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,218 @@ +How to Setup Lighttpd Web server on Ubuntu 15.04 / CentOS 7 +================================================================================ + +Lighttpd is an open source web server which is secure, fast, compliant, and very flexible and is optimized for high-performance environments. It uses very low memory compared to other web servers , small CPU load and speed optimization making it popular among the server for its efficiency and speed. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) makes lighttpd the perfect webserver-software for every server that suffers load problems. + +Here are some simple easy setups on how we can setup Lighttpd web server on our machine running Ubuntu 15.04 or CentOS 7 linux distributions. + +### Installing Lighttpd ### + +#### Installing using Package Manager #### + +Here, we'll install Lighttpd using package manager as its the easiest method to install it. So, we can simply run the following command under sudo mode in a terminal or console to install Lighttpd. + +**CentOS 7** + +As lighttpd is not available in the official repository of CentOS 7, we'll need to install epel additional repository to our system. To do so, we'll need to run the following yum command. + + # yum install epel-release + +Then, we'll gonna update our system and proceed towards the installation of lighttpd. + + # yum update + + # yum install lighttpd + +![Install Lighttpd Centos](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-centos.png) + +**Ubuntu 15.04** + +Lighttpd is available on the official repository of Ubuntu 15.04 so, we'll simply update our local repository index and then go for the installation of lighttpd using apt-get command. + + # apt-get update + + # apt-get install lighttpd + +![Install lighttpd ubuntu](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-ubuntu.png) + +#### Installing from Source #### + +If we wanna install lighttpd from the latest version of source code ie 1.4.39, we'll need to compile the source code and install it into our system. First of all, we'll need to install the dependencies required to compile it. + + # cd /tmp/ + # wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.39.tar.gz + +After its downloaded, we'll need to extract it the tarball by running the following. + + # tar -zxvf lighttpd-1.4.39.tar.gz + +Then, we'll compile it by running the following commands. + + # cd lighttpd-1.4.39 + # ./configure + # make + +**Note:** In this tutorial, we are installing lighttpd with its standard configuration. If you wanna configure beyond the standard configuration and want to install more features like support for SSL, mod_rewrite, mod_redirect then you can configure. + +Once, its compiled, we'll install it in our system. + + # make install + +### Configuring Lighttpd ### + +If we need to configure our lighttpd web server further as our requirements, we can make changes to the default configuration file ie /etc/lighttpd/lighttpd.conf . As wee'll go with the default configuration here in this tutorial, we'll not gonna make changes to it. If we had made any changes and we wanna check for errors in the config file, we'll need to run the following command. + + # lighttpd -t -f /etc/lighttpd/lighttpd.conf + +#### On CentOS 7 #### + +If we are running CentOS 7, we'll need to create a new directory for our webroot defined in our lighttpd's default configuration ie /src/www/htdocs/ . + + # mkdir -p /srv/www/htdocs/ + +Then, we'll copy the default welcome page from /var/www/lighttpd/ directory to the above created directory. + + # cp -r /var/www/lighttpd/* /srv/www/htdocs/ + +### Starting and Enabling Services ### + +Now, we'll gonna restart our database server by executing the following systemctl command. + + # systemctl start lighttpd + +Then, we'll enable it to start automatically in every system boot. + + # systemctl enable lighttpd + +### Allowing Firewall ### + +To allow our webpages or websites running lighttpd web server on the internet or inside the same network, we'll need to allow port 80 from the firewall program. As both CentOS 7 and Ubuntu 15.04 are shipped with systemd as the default init system, we will have firewalld installed as a firewall solution. To allow port 80 or http service, we'll need to run the following commands. + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### Accessing Web Server ### + +As we have allowed port 80 which is the default port of lighttpd, we should be able to access lighttpd's welcome page by default. To do so, we'll need to point our browser to the ip address or domain of our machine running lighttpd according to our configuration. In this tutorial, we'll point our browser to http://lighttpd.linoxide.com/ as we have pointed our sub-domain to its ip address. On doing so, we'll see the following welcome page in our browser. + +![Lighttpd Welcome Page](http://blog.linoxide.com/wp-content/uploads/2016/02/lighttpd-welcome-page.png) + +Further, we can add our website's files to the webroot directory and remove the default lighttpd's index file to make our static website live to the internet. + +If we want to run our PHP application in our lighttpd webserver, we'll need to follow the following steps. + +### Installing PHP5 Modules ### + +Once our lighttpd is installed successfully, we'll need to install PHP and some PHP modules to run PHP5 scripts in our lighttpd web server. + +#### On Ubuntu 15.04 #### + + # apt-get install php5 php5-cgi php5-fpm php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-mcrypt php5-memcache php-pear + +#### On CentOS 7 #### + + # yum install php php-cgi php-fpm php-mysql php-curl php-gd php-intl php-pecl-imagick php-mcrypt php-memcache php-pear lighttpd-fastcgi + +### Configuring Lighttpd with PHP ### + +To make PHP work with lighttpd web server, we'll need to follow the following methods respect to the distribution we are running. + +#### On CentOS 7 #### + +First of all, we'll need to edit our php configuration ie /etc/php.ini and uncomment a line **cgi.fix_pathinfo=1** using a text editor. + + # nano /etc/php.ini + +After its done, we'll need to change the ownership of PHP-FPM process from apache to lighttpd. To do so, we'll need to open the configuration file /etc/php-fpm.d/www.conf using a text editor. + + # nano /etc/php-fpm.d/www.conf + +Then, we'll append the file with the following configurations. + + user = lighttpd + group = lighttpd + +Once done, we'll need to save the file and exit the text editor. Then, we'll need to include fastcgi module from /etc/lighttpd/modules.conf configuration file. + + # nano /etc/lighttpd/modules.conf + +Then, we'll need to uncomment the following line by removing # from it. + + include "conf.d/fastcgi.conf" + +At last, we'll need to configure our fastcgi configuration file using our favorite text editor. + + # nano /etc/lighttpd/conf.d/fastcgi.conf + +Then, we'll need to add the following lines at the end of the file. + + fastcgi.server += ( ".php" => + (( + "host" => "127.0.0.1", + "port" => "9000", + "broken-scriptfilename" => "enable" + )) + ) + +After its done, we'll save the file and exit the text editor. + +#### On Ubuntu 15.04 #### + +To enable fastcgi with lighttpd web server, we'll simply need to execute the following commands. + + # lighttpd-enable-mod fastcgi + + Enabling fastcgi: ok + Run /etc/init.d/lighttpd force-reload to enable changes + + # lighttpd-enable-mod fastcgi-php + + Enabling fastcgi-php: ok + Run /etc/init.d/lighttpd force-reload to enable changes + +Then, we'll reload our lighttpd by running the following command. + + # systemctl force-reload lighttpd + +### Testing if PHP is working ### + +In order to see if PHP is working as expected or not, we'll need to create a new php file under the webroot of our lighttpd web server. Here, in this tutorial we have /var/www/html in Ubuntu and /srv/www/htdocs in CentOS as the default webroot so, we'll create a info.php file under it using a text editor. + +**On CentOS 7** + + # nano /var/www/info.php + +**On Ubuntu 15.04** + + # nano /srv/www/htdocs/info.php + +Then, we'll simply add the following line into the file. + + + +Once done, we'll simply save the file and exit from the text editor. + +Now, we'll point our web browser to our machine running lighttpd using its ip address or domain name with the info.php file path as http://lighttpd.linoxide.com/info.php If everything was done as described above, we will see our PHP information page as shown below. + +![phpinfo lighttpd](http://blog.linoxide.com/wp-content/uploads/2016/02/phpinfo-lighttpd.png) + +### Conclusion ### + +Finally we have successfully installed the world's lightweight, fast and secure web server Lighttpd in our machine running CentOS 7 and Ubuntu 15.04 linux distributions. Once its ready, we can upload our website files into our web root, configure virtual host, enable ssl, connect database, run web apps and much more with our lighttpd 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/setup-lighttpd-web-server-ubuntu-15-04-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/ \ No newline at end of file From a5b318d5abae4250d3b3cd672d142354110e25dd Mon Sep 17 00:00:00 2001 From: miaolin Date: Fri, 19 Feb 2016 23:27:21 +0800 Subject: [PATCH 0996/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20160218 Getting to Know Linux File Permissions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 Getting to Know Linux File Permissions.md b/sources/tech/20160218 Getting to Know Linux File Permissions.md index 03f6d5018e..816f499e36 100644 --- a/sources/tech/20160218 Getting to Know Linux File Permissions.md +++ b/sources/tech/20160218 Getting to Know Linux File Permissions.md @@ -1,3 +1,4 @@ +ynmlml translating Getting to Know Linux File Permissions ========================================== From f70590d3730ff9a47e50699e1363b840bde45e2c Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 00:13:45 +0800 Subject: [PATCH 0997/1710] =?UTF-8?q?20160219-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit felixonmars --- ... Web server on Ubuntu 15.04 or CentOS 7.md | 73 +++++++++---------- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md index cc0cd57b6d..f84e9e1e46 100644 --- a/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md +++ b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md @@ -1,41 +1,39 @@ How to Setup Lighttpd Web server on Ubuntu 15.04 / CentOS 7 -================================================================================ +================================================================================= Lighttpd is an open source web server which is secure, fast, compliant, and very flexible and is optimized for high-performance environments. It uses very low memory compared to other web servers , small CPU load and speed optimization making it popular among the server for its efficiency and speed. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) makes lighttpd the perfect webserver-software for every server that suffers load problems. Here are some simple easy setups on how we can setup Lighttpd web server on our machine running Ubuntu 15.04 or CentOS 7 linux distributions. -### Installing Lighttpd ### +### Installing Lighttpd -#### Installing using Package Manager #### +#### Installing using Package Manager -Here, we'll install Lighttpd using package manager as its the easiest method to install it. So, we can simply run the following command under sudo mode in a terminal or console to install Lighttpd. +Here, we'll install Lighttpd using package manager as its the easiest method to install it. So, we can simply run the following command under `sudo` mode in a terminal or console to install Lighttpd. **CentOS 7** -As lighttpd is not available in the official repository of CentOS 7, we'll need to install epel additional repository to our system. To do so, we'll need to run the following yum command. +As lighttpd is not available in the official repository of CentOS 7, we'll need to install epel additional repository to our system. To do so, we'll need to run the following `yum` command. # yum install epel-release Then, we'll gonna update our system and proceed towards the installation of lighttpd. # yum update - # yum install lighttpd ![Install Lighttpd Centos](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-centos.png) **Ubuntu 15.04** -Lighttpd is available on the official repository of Ubuntu 15.04 so, we'll simply update our local repository index and then go for the installation of lighttpd using apt-get command. +Lighttpd is available on the official repository of Ubuntu 15.04 so, we'll simply update our local repository index and then go for the installation of lighttpd using `apt-get` command. # apt-get update - # apt-get install lighttpd ![Install lighttpd ubuntu](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-ubuntu.png) -#### Installing from Source #### +#### Installing from Source If we wanna install lighttpd from the latest version of source code ie 1.4.39, we'll need to compile the source code and install it into our system. First of all, we'll need to install the dependencies required to compile it. @@ -52,31 +50,31 @@ Then, we'll compile it by running the following commands. # ./configure # make -**Note:** In this tutorial, we are installing lighttpd with its standard configuration. If you wanna configure beyond the standard configuration and want to install more features like support for SSL, mod_rewrite, mod_redirect then you can configure. +**Note:** In this tutorial, we are installing lighttpd with its standard configuration. If you wanna configure beyond the standard configuration and want to install more features like support for SSL, `mod_rewrite`, `mod_redirect` then you can configure. Once, its compiled, we'll install it in our system. # make install -### Configuring Lighttpd ### +### Configuring Lighttpd -If we need to configure our lighttpd web server further as our requirements, we can make changes to the default configuration file ie /etc/lighttpd/lighttpd.conf . As wee'll go with the default configuration here in this tutorial, we'll not gonna make changes to it. If we had made any changes and we wanna check for errors in the config file, we'll need to run the following command. +If we need to configure our lighttpd web server further as our requirements, we can make changes to the default configuration file ie `/etc/lighttpd/lighttpd.conf` . As wee'll go with the default configuration here in this tutorial, we'll not gonna make changes to it. If we had made any changes and we wanna check for errors in the config file, we'll need to run the following command. # lighttpd -t -f /etc/lighttpd/lighttpd.conf -#### On CentOS 7 #### +#### On CentOS 7 -If we are running CentOS 7, we'll need to create a new directory for our webroot defined in our lighttpd's default configuration ie /src/www/htdocs/ . +If we are running CentOS 7, we'll need to create a new directory for our webroot defined in our lighttpd's default configuration ie `/src/www/htdocs/` . # mkdir -p /srv/www/htdocs/ -Then, we'll copy the default welcome page from /var/www/lighttpd/ directory to the above created directory. +Then, we'll copy the default welcome page from `/var/www/lighttpd/` directory to the above created directory. # cp -r /var/www/lighttpd/* /srv/www/htdocs/ -### Starting and Enabling Services ### +### Starting and Enabling Services -Now, we'll gonna restart our database server by executing the following systemctl command. +Now, we'll gonna restart our database server by executing the following `systemctl` command. # systemctl start lighttpd @@ -84,21 +82,18 @@ Then, we'll enable it to start automatically in every system boot. # systemctl enable lighttpd -### Allowing Firewall ### +### Allowing Firewall To allow our webpages or websites running lighttpd web server on the internet or inside the same network, we'll need to allow port 80 from the firewall program. As both CentOS 7 and Ubuntu 15.04 are shipped with systemd as the default init system, we will have firewalld installed as a firewall solution. To allow port 80 or http service, we'll need to run the following commands. # firewall-cmd --permanent --add-service=http - success - # firewall-cmd --reload - success -### Accessing Web Server ### +### Accessing Web Server -As we have allowed port 80 which is the default port of lighttpd, we should be able to access lighttpd's welcome page by default. To do so, we'll need to point our browser to the ip address or domain of our machine running lighttpd according to our configuration. In this tutorial, we'll point our browser to http://lighttpd.linoxide.com/ as we have pointed our sub-domain to its ip address. On doing so, we'll see the following welcome page in our browser. +As we have allowed port 80 which is the default port of lighttpd, we should be able to access lighttpd's welcome page by default. To do so, we'll need to point our browser to the ip address or domain of our machine running lighttpd according to our configuration. In this tutorial, we'll point our browser to [http://lighttpd.linoxide.com/](http://lighttpd.linoxide.com/) as we have pointed our sub-domain to its ip address. On doing so, we'll see the following welcome page in our browser. ![Lighttpd Welcome Page](http://blog.linoxide.com/wp-content/uploads/2016/02/lighttpd-welcome-page.png) @@ -106,29 +101,29 @@ Further, we can add our website's files to the webroot directory and remove the If we want to run our PHP application in our lighttpd webserver, we'll need to follow the following steps. -### Installing PHP5 Modules ### +### Installing PHP5 Modules Once our lighttpd is installed successfully, we'll need to install PHP and some PHP modules to run PHP5 scripts in our lighttpd web server. -#### On Ubuntu 15.04 #### +#### On Ubuntu 15.04 # apt-get install php5 php5-cgi php5-fpm php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-mcrypt php5-memcache php-pear -#### On CentOS 7 #### +#### On CentOS 7 # yum install php php-cgi php-fpm php-mysql php-curl php-gd php-intl php-pecl-imagick php-mcrypt php-memcache php-pear lighttpd-fastcgi -### Configuring Lighttpd with PHP ### +### Configuring Lighttpd with PHP To make PHP work with lighttpd web server, we'll need to follow the following methods respect to the distribution we are running. -#### On CentOS 7 #### +#### On CentOS 7 -First of all, we'll need to edit our php configuration ie /etc/php.ini and uncomment a line **cgi.fix_pathinfo=1** using a text editor. +First of all, we'll need to edit our php configuration ie `/etc/php.ini` and uncomment a line **cgi.fix_pathinfo=1** using a text editor. # nano /etc/php.ini -After its done, we'll need to change the ownership of PHP-FPM process from apache to lighttpd. To do so, we'll need to open the configuration file /etc/php-fpm.d/www.conf using a text editor. +After its done, we'll need to change the ownership of PHP-FPM process from apache to lighttpd. To do so, we'll need to open the configuration file `/etc/php-fpm.d/www.conf` using a text editor. # nano /etc/php-fpm.d/www.conf @@ -137,11 +132,11 @@ Then, we'll append the file with the following configurations. user = lighttpd group = lighttpd -Once done, we'll need to save the file and exit the text editor. Then, we'll need to include fastcgi module from /etc/lighttpd/modules.conf configuration file. +Once done, we'll need to save the file and exit the text editor. Then, we'll need to include fastcgi module from `/etc/lighttpd/modules.conf` configuration file. # nano /etc/lighttpd/modules.conf -Then, we'll need to uncomment the following line by removing # from it. +Then, we'll need to uncomment the following line by removing `#` from it. include "conf.d/fastcgi.conf" @@ -161,7 +156,7 @@ Then, we'll need to add the following lines at the end of the file. After its done, we'll save the file and exit the text editor. -#### On Ubuntu 15.04 #### +#### On Ubuntu 15.04 To enable fastcgi with lighttpd web server, we'll simply need to execute the following commands. @@ -173,15 +168,15 @@ To enable fastcgi with lighttpd web server, we'll simply need to execute the fol # lighttpd-enable-mod fastcgi-php Enabling fastcgi-php: ok - Run /etc/init.d/lighttpd force-reload to enable changes + Run `/etc/init.d/lighttpd` force-reload to enable changes Then, we'll reload our lighttpd by running the following command. # systemctl force-reload lighttpd -### Testing if PHP is working ### +### Testing if PHP is working -In order to see if PHP is working as expected or not, we'll need to create a new php file under the webroot of our lighttpd web server. Here, in this tutorial we have /var/www/html in Ubuntu and /srv/www/htdocs in CentOS as the default webroot so, we'll create a info.php file under it using a text editor. +In order to see if PHP is working as expected or not, we'll need to create a new php file under the webroot of our lighttpd web server. Here, in this tutorial we have `/var/www/html` in Ubuntu and `/srv/www/htdocs` in CentOS as the default webroot so, we'll create a info.php file under it using a text editor. **On CentOS 7** @@ -197,11 +192,11 @@ Then, we'll simply add the following line into the file. Once done, we'll simply save the file and exit from the text editor. -Now, we'll point our web browser to our machine running lighttpd using its ip address or domain name with the info.php file path as http://lighttpd.linoxide.com/info.php If everything was done as described above, we will see our PHP information page as shown below. +Now, we'll point our web browser to our machine running lighttpd using its ip address or domain name with the info.php file path as [http://lighttpd.linoxide.com/info.php](http://lighttpd.linoxide.com/info.php) If everything was done as described above, we will see our PHP information page as shown below. ![phpinfo lighttpd](http://blog.linoxide.com/wp-content/uploads/2016/02/phpinfo-lighttpd.png) -### Conclusion ### +### Conclusion Finally we have successfully installed the world's lightweight, fast and secure web server Lighttpd in our machine running CentOS 7 and Ubuntu 15.04 linux distributions. Once its ready, we can upload our website files into our web root, configure virtual host, enable ssl, connect database, run web apps and much more with our lighttpd 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 :-) @@ -215,4 +210,4 @@ via: http://linoxide.com/linux-how-to/setup-lighttpd-web-server-ubuntu-15-04-cen 本文由 [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 7ae9656b9847563a7850e50bd8267bdb0a430864 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 20 Feb 2016 10:43:24 +0800 Subject: [PATCH 0998/1710] Translating sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md --- sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md index d370b87822..f6a568a55f 100644 --- a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md +++ b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -1,3 +1,4 @@ +ictlyh Translating Review EXT4 vs. Btrfs vs. XFS ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) From b28157e72b1ab231d13c546ae74c7af67e5e7dff Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 15:33:44 +0800 Subject: [PATCH 0999/1710] =?UTF-8?q?20160220-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Linux Is Coming To ARM With Manjaro-ARM.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md diff --git a/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md b/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md new file mode 100644 index 0000000000..0d503b3010 --- /dev/null +++ b/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md @@ -0,0 +1,31 @@ +Manjaro Linux Is Coming To ARM With Manjaro-ARM +=================================================== + +![](http://itsfoss.com/wp-content/uploads/2016/02/manjaro-arm.jpg) + +Recently, the developers of Manjaro have announced the release of an [alpha build for ARM devices](https://manjaro.github.io/Manjaro-ARM-launched/). This is a big step for the Arch-based distro, which up until this point only ran on 32 and 64-bit PCs. + +According to the announcement, “[Manjaro Arm](http://manjaro-arm.org/) is a project aimed to bring you the simplicity and customability that is Manjaro to [ARM devices](https://www.arm.com/). These devices are growing in numbers and can be used for any number of applications. Most famous is the Raspberry Pi series and BeagleBoard series.” The alpha build only supports the Raspberry Pi 2, but that will undoubtedly grow with time. + +The developers currently include dodgejcr, Torei, Strit, and Ringo32. They are looking for more people to help the project grow and develop. Besides developers, [they are looking for maintainers, moderators and admins, and artists](http://manjaro-arm.org/forums/website/looking-for-contributors/?PHPSESSID=876d5c11400e9c25eb727e9965300a9a). + +Manjaro-ARM will be available in four different versions. The Media Edition will allow you to create a media center with very little configuration and will run Kodi. The Server Edition will come with SSH, FTP, and a LAMP server preconfigured so you can use your ARM device as a file or web server. The Base Edition acts as the desktop edition, with an XFCE desktop. If you want to build you own system from scratch, the Minimal Edition is your choice. It will come with no preloaded packages or desktop, only have a root user. + +## Final Thoughts + +As a fan of Manjaro (I have it installed on 4 computers), I’m glad to hear that they are branching out into the ARM world. ARM is being used in more and more devices. According to technology commentator Robert Cringely, [device makers are starting to look at cheap ARM chips over more expensive Intel or AMD chips](http://www.cringely.com/2016/01/21/prediction-8-intel-starts-to-become-irrelevent/). Even Microsoft (please don’t strike me down) is thinking of porting some of its software to ARM. As the use of ARM powered devices increase, Manjaro will be ready to give those users a great Linux experience. + +What do you think? Do you wish that more Linux distros would create ARM ports? Or do you think that ARM is a passing fad? Tell us below. + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/manjaro-linux-arm/ + +作者:[JOHN PAUL][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/john/ + From 90ff0166a2934cd468c1335969b5fba893e8fbe9 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 15:38:47 +0800 Subject: [PATCH 1000/1710] =?UTF-8?q?20160220-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 Each Incorrect Password Attempt.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sources/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md diff --git a/sources/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md b/sources/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md new file mode 100644 index 0000000000..cf2146e73e --- /dev/null +++ b/sources/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md @@ -0,0 +1,57 @@ +Make Sudo Insult User For Each Incorrect Password Attempt +=========================================================== + +You can have lots of fun in Linux terminal. And I am not talking about those funny commands to [run a train in Linux terminal](http://itsfoss.com/ubuntu-terminal-train/). + +I am talking about little tweaks in the terminal that will lighten up your mood. In a previous article, you learnt [how to increase sudo timeout in Linux terminal](http://itsfoss.com/change-sudo-password-timeout-ubuntu/). In today’s fun post, I’ll show you how you can make sudo to insult you (or other users) when incorrect password is attempted with sudo command. + +Confused what I am talking about? Here, take a look at this gif to get a gist of how sudo can insult you for typing in the incorrect password. + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux.gif) + +Now, why would you do that and take insults? After all, insults are not going to brighten up your day, is it? + +To me, this little tweak is funny and is better than the plain old “incorrect password” error message. Moreover, I can show it off to my friends (in this case you, via It’s FOSS) to amuse them. I am pretty sure you can come up with your own reason to use this tweak. + +## Enable insults in sudo + +You can enable insults in `sudo` by adding the following line in `sudo` configuration: + +``` +Defaults insults +``` + +Let’s see how to do that. Open a terminal and use the following command: + +``` +sudo visudo +``` + +This should open the configuration file in [nano](http://www.nano-editor.org/). Yeah, I know that traditionally ‘visudo’ should open the `/etc/sudoers` file in Vi editor, but Ubuntu and Ubuntu based Linux distribution will open it in nano. Since we are talking about Vi, here is a [cheat sheet for Vi editor](http://itsfoss.com/download-vi-cheat-sheet/) that could come handy if you decide to use Vi. + +Coming back to editing the sudeors file, you need to find the section where Defaults are listed. Luckily, it is in the beginning itself. Just add “Defaults insults” line to it, like this: + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint.png) + +If you are using nano, use `Ctrl+X` to quit the editor. At the time of quitting, it will ask you if you want to save the changes or not. To save the changes, press `Y`. + +Once you have saved the changes in sudoers file, open a terminal and use any command with sudo. Deliberately type wrong password and enjoy the abuses :) + +sudo could be nasty. See, it even threatens me of consequences if I type incorrect password again. LOL. + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint-1.jpeg) + +If you like this terminal hack, check out other [terminal tricks](http://itsfoss.com/category/terminal-tricks/) posts as well. If you have other such fun tweaks and hacks, do share it in the comment box below. + + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/sudo-insult-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/ From 1a7507fa03a84027493dab943d275f5f037f7868 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 15:58:20 +0800 Subject: [PATCH 1001/1710] =?UTF-8?q?20160220-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...loud Services For Linux To Replace Copy.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md diff --git a/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md b/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md new file mode 100644 index 0000000000..cd2ffee237 --- /dev/null +++ b/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md @@ -0,0 +1,135 @@ +Best Cloud Services For Linux To Replace Copy +=============================================== + +![](http://itsfoss.com/wp-content/uploads/2016/02/Linux-cloud-services.jpg) + +Cloud storage service Copy is shutting down and it is time for us Linux users to look for a worthy **cloud storage alternative to Copy for Linux**. + +All files will be deleted on May 1st, 2016. If you are a Copy user, you should save your files and move it to other + +Copy has been my favorite cloud storage for past couple of years. It gave me plenty of free storage and came with native apps for desktop platforms including Linux and mobile platforms as iOS and Android. + +It was a perfect Cloud storage for me where I get plenty of free storage (380 GB) with a seamless experience between desktop and mobile OSes. But this ‘easy free storage’, 15GB for signup and 5Gb for each referral, had me thinking that if Copy doesn’t get business customers, they will be running out of business soon. Such huge free storage only meant that they were not targeting individual customers like Dropbox do. + +My fear came true when I read about the shutting down of Copy.com. In fact, Copy is not alone. Its parent company [Barracuda Networks](https://www.barracuda.com/) is going through a rough patch and has [hired Morgan Stanely to look for suitable buyer](http://www.bloomberg.com/news/articles/2016-02-01/barracuda-networks-said-to-work-with-morgan-stanley-to-seek-sale)(s). + +Whatever be the reason, all we know is that Copy will soon be history and we need to find similarly **good cloud services for Linux**. I am putting emphasis on Linux because other popular cloud storage services like [Microsoft’s OneDrive](https://onedrive.live.com/about/en-us/) and [Google Drive](https://www.google.com/drive/) do not provide native Linux client. This is something expected out of Microsoft but [Google’s apathy towards Linux](http://itsfoss.com/google-hates-desktop-linux/) is shocking. + +## Best Copy alternatives for Linux + +Now, what do you want in a cloud storage services as a Linux storage? Let me guess: + +- Lots of free storage. After all, individuals cannot pay hefty amounts every month. +- Native Linux client. So that you can synchronize files easily with the server without doing special tweaking or running scripts at regular intervals. +- Desktop clients for other desktop OSes i.e. Windows and OS X. Portability is a necessity and syncing files between devices is such a good relief. +- Mobile apps for Android and iOS. In today’s modern world, you need to be connected across all the devices. + +I am not counting the self-hosted cloud services like OwnCloud or [Seafile](https://www.seafile.com/en/home/) because they require set-up and run a server. This is not apt for all home users who want a Copy like cloud service. + +Let’s see what are the services that you could use to replace Copy.com on Linux. + +## Mega + +![](http://itsfoss.com/wp-content/uploads/2016/02/Mega-Linux.jpg) + +If you are a regular It’s FOSS reader, you might have come across my earlier article about [Mega on Linux](http://itsfoss.com/install-mega-cloud-storage-linux/). This cloud service is an offering by the infamous [Kim Dotcom](https://en.wikipedia.org/wiki/Kim_Dotcom) of [Megaupload scandal](https://en.wikipedia.org/wiki/Megaupload). This also makes some users skeptical about it because Kim Dotcom has been a target by US authorities for a long time. + +Mega has everything that you would expect in a hassle free cloud service. It provides 50 GB of free storage to individual users. Provide native clients for Linux and other platforms and also has end to end encryption. The native Linux client works fine and the sync across the device is seamless. You can also view and access your files in a web browser. + +### Pros: + +- 50 GB of free storage +- End to end encryption +- Native clients for Linux and other platforms such as Windows, Mac OS X, Android, iOS + +### Cons: + +- Shady past of the owner + +[Mega](https://mega.nz/) + +## Hubic + +![](http://itsfoss.com/wp-content/uploads/2016/02/hubic.jpeg) + +Hubic is a cloud service from French company [OVH](https://www.ovh.com/fr/). Hubic also offers 25 GB of free cloud storage at sign up. You can further extend it to 50GB (for free users) by referring it to friends. + +Hubic has a Linux client which is in beta (for over two years now). Hubic has an official Linux client but it is limited to command line. I did not go on to test the mobile versions. + +Hubic boasts of some nice features though. Apart from simple to use interface, file sharing etc, it has a Backup feature where you can archive your important files regularly. + +### Pros: + +- 25 GB of free storage, extendable up to 50 GB +- Available on multiple platforms +- Backup feature + +### Cons: + +- Linux client in beta, only available in command line + +[Hubic](https://hubic.com/) + +## pCloud + +![](http://itsfoss.com/wp-content/uploads/2016/02/pCloud-Linux.jpeg) + +pCloud is another European offering but this time across the French border, from Switzerland. Focused on encryption and security, pCloud offers 10 GB of free storage for each signup. You can further increase it up to 20 GB by inviting friends, sharing links on social media etc. + +It has all the standard features of a cloud service such as file sharing and synchronization, selective syncing etc. pCloud also has native clients across platforms, including Linux of course. + +Linux client is easy to use and worked well in my limited testing on Linux Mint 17.3. + +### Pros: + +- 10 GB of free storage, extendable up to 20 GB +- A good working Linux client with GUI + +### Cons: + +- Encryption is a premium feature + +[pCloud](https://www.pcloud.com/) + +## Yandex Disk + +![](http://itsfoss.com/wp-content/uploads/2016/02/Yandex.jpg) + +Russian internet giant Yandex has everything that Google has. A search engine, analytics and webmaster tool, email, web browser and cloud storage service. + +Yandex Disk offers 10 GB of free cloud storage on sign up. It has native clients for multiple platforms, including Linux. However, the official Linux client is only command line. You can get [unofficial GUI client for Yandex disk](https://mintguide.org/tools/265-yd-tools-gui-indicator-for-yandexdisk-free-cloud-storage-in-linux-mint.html) though. File sharing via links is available as along with other standard cloud storage feature. + +### Pros: + +- 10 GB of free storage, extendable up to 20 GB via referrals. + +### Cons: + +- Only command line client available + +[Yandex Disk](https://disk.yandex.com/) + +## Honorable and deliberate omissions + +I have deliberately skipped [Dropbox](https://www.dropbox.com/), [SpiderOak](https://spideroak.com/) from the list. Dropbox is excellent for Linux but the free storage is limited to 2 GB. Over the past several years, I have managed to increase it to over 21 GB, but that’s another story. + +SpiderOak also provides only 2 GB of free storage and you cannot access it in a web browser. + +OwnCloud needs its own server and set-up and thus it is not everyone’s cup of tea. And it certainly doesn’t fit the criteria of a typical cloud service. + +## Verdict + +If you ask me what I am going to use in place of Copy, my answer is Mega. It has plenty of free cloud storage and a great Linux desktop client. What is your choice among this list of **best cloud storage services for Linux**? Which one do you prefer? + + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/cloud-services-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/ From 6ff062bb00db4edb580a3183c487d2ae12d2a9b0 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 16:04:28 +0800 Subject: [PATCH 1002/1710] =?UTF-8?q?20160220-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e Becomes Real With First Ubuntu Tablet.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md diff --git a/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md b/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md new file mode 100644 index 0000000000..a7beb58156 --- /dev/null +++ b/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md @@ -0,0 +1,73 @@ +Convergence Becomes Real With First Ubuntu Tablet +==================================================== + +![](http://itsfoss.com/wp-content/uploads/2016/02/front-landscape-1-e1454624669422.jpg) + +First Ubuntu tablet has been just announced. Canonical, parent company of Ubuntu, and Spanish hardware manufacturer BQ are all set to unveil the first Ubuntu tablet at Mobile World Congress, later this month. + +BQ is also the manufacturer of the [first Ubuntu Phone](http://itsfoss.com/ubuntu-phone-specification-release-date-pricing/). The partnership between Canonical and BQ extends to the tablet as well. + +Ubuntu has been running the [#reinvent campaign on social media](https://business.facebook.com/media/set/?set=a.656637987810305.1073741827.115098615297581&type=3) and the web ahead of the launch to generate curiosity over the tablet. But does an Ubuntu fan really need a dedicated campaign to know about such things? I think not. + +Ahead of this launch, specifications of the Ubuntu tablet and some teasers have been released. No surprises that the main focus has been on [convergence](https://insights.ubuntu.com/2015/10/20/ubuntus-path-to-convergence/). + +[Ubuntu Phone has demonstrated convergence](http://www.omgubuntu.co.uk/2015/02/new-video-shows-off-ubuntu-convergence-demoed-on-tablet-phone) several times in the past. Ubuntu tablet takes it to the next level. Just adding an HDMI cable makes it to a full-fledged desktop. All you need is a keyboard and a mouse. + +![](http://itsfoss.com/wp-content/uploads/2016/02/convergence-ubuntu-e1454624459103.jpg) + +## BQ Ubuntu tablet specification + +BQ will be using its trusted [Aquaris M10](http://www.bq.com/es/aquaris-m10) series to launch an Ubuntu edition. This is a strategy they used earlier with Ubuntu Phone where they launched an Ubuntu edition of their Aquaris e4.5 Android smartphone. + +Aquaris M10 boasts of a decent hardware and an enormous 10 inches screen size. A quick list of specification includes: + +- 10.1 inch multi-touch screen +- MediaTek Quad Core MT8163A processor up to 1.5GHz +- High capacity Li-Po battery (7280mAh) +- Full HD (1080p) camera for super-sharp video recording +- 2GB RAM and 16GB internal memory +- MicroSD slot for extra storage (up to 64GB) +- 12 megapixel camera with autofocus and dual flash +- Frontal speakers +- Micro HDMI slot +- Dimensions: 246 x 171 x 8.2mm +- Lightweight at only 470g + +These proposed specifications have been taken from Ubuntu’s official website which doesn’t match up with the Aquaris M10 specification on BQ website though. Ubuntu website shows a 12 MP camera while BQ website has 8 MP max. + +As you can see, first Ubuntu tablet is not really a power horse. In 2016, 2GB of RAM doesn’t seem to be sufficient. Moreover, the closed source MediaTek processors are another let down of the first Ubuntu Phone. + +However, a supposed price tag of Euro 260 (the Android version costs the same) is a positive factor here and considering its capability to converge into a desktop, 10 inches screen keeps it in the entry level Netbook section. + +The 470 g weight is another plus factor. + +## First look at Ubuntu tablet + +While Ubuntu tablet will be officially unveiled at Mobile World Congress, you can have a glimpse of its looks and functionings in the pictures below: + +![](http://itsfoss.com/wp-content/uploads/2016/02/tablet-overview-hero-300x182.png) + +## Price, availability and release date + +BQ Aquaris M10 Ubuntu edition will go on sale in the second quarter of the year 2016. Guessing from Ubuntu Phone experience, it should be available for Europe and UK first and later in other parts of the world. + +The price should be around 260-270 Euro. This too is an estimate based on the price of the Android version. + +## Up for the grab? + +I was not very convinced at the first Ubuntu Phone. However, I think Ubuntu tablet is a better device than the Ubuntu Phone. With Snappy coming in action, Ubuntu tablet has the potential to become a mobile device cum desktop. + +What do you think of it? + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/ubuntu-tablet/ + +作者:[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/ + From 435cab7d902cc27d73763e4152589f691fef4026 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 16:13:48 +0800 Subject: [PATCH 1003/1710] =?UTF-8?q?20160220-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...er Kubuntu Head Unveils New KDE Project.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md diff --git a/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md b/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md new file mode 100644 index 0000000000..dc3b2a1a76 --- /dev/null +++ b/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md @@ -0,0 +1,35 @@ +Former Kubuntu Head Unveils New KDE Project +============================================== + +The name Jonathan Riddell should ring a bell if you read Linux and [open source news](http://itsfoss.com/category/news/). He was the creator and longtime lead developer of the [Kubuntu](http://www.kubuntu.org/) distribution. He was [forced out of his position by Ubuntu boss Mark Shuttleworth](http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html) last year because he dared to ask what happened to the funds Canonical had raised for Kubuntu. (To the best of my knowledge, Canonical never really answered to his questions about finances.) + +![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448724263.png) + +## KDE neon logo + +On Saturday, Riddell [announced](https://dot.kde.org/2016/01/30/fosdem-announcing-kde-neon) a new project: [KDE neon](http://neon.kde.org.uk/). According to Riddell’s announcement “Neon will provide a way to get the latest KDE software on the day it’s released.” + +After reading both the announcement and looking at the brief site, **it appears that neon is a mainly a “rapidly updated software repository” that allows KDE fans to be on the bleeding edge**. Instead of waiting for months for distro developers to release the updated KDE on their repos, you’ll be able to get it hot off the presses. + +KDE did state in the [noen FAQ](http://neon.kde.org.uk/faq) that this is not a KDE created distro. In fact, they say “KDE believes it is important to work with many distributions, as each brings unique value and expertise for their respective users. This is one project out of hundreds from KDE.” + +![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448830870.jpg) + +However, the way the site and the announcement refer to the fact that neon runs on Ubuntu 15.10 (until the next LTS version is available) and that there will soon be images makes me wonder. KDE could be saying this to keep Canonical from seeing this project as a competitor to Kubuntu. If they that there is a demand for KDE neon, they could spin it off as a full distro. Both the announcement and site state that this is a KDE Incubator project, so the future could hold anything for this project. + +[KDE neon](http://neon.kde.org.uk/) + +Does neon sound like it would be useful for you or are you happy with your current distro’s KDE release rate? Do you think there is room for another KDE distro (if KDE decides to head in that direction)? Let me know in the comment section below. + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/kde-neon-unveiled/ + +作者:[JOHN PAUL][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/john/ + From 7d760a6a01194c7250aefc778b9e430676b8aaac Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 16:34:30 +0800 Subject: [PATCH 1004/1710] =?UTF-8?q?20160220-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ux Mint 18 Will Get Its Own Set Of Apps.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md diff --git a/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md b/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md new file mode 100644 index 0000000000..2ef5effbb7 --- /dev/null +++ b/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md @@ -0,0 +1,62 @@ +Linux Mint 18 Will Get Its Own Set Of Apps +============================================= + +![](http://itsfoss.com/wp-content/uploads/2016/01/Linux-Mint-apps.jpg) + +It’s common for distro developers to create and release a series of apps that are designed specifically for their distros. A big example of this is [elementary OS](https://elementary.io/). Nine years in, Linux Mint is finally taking the plunge and doing the same. + +>#LinuxMint to finally get its own apps in Mint 18. + +[Linux Mint](http://www.linuxmint.com/) is one of the best known Linux distros available. Based on Ubuntu and Debian, Linux Mint strives to create a “modern, elegant and comfortable operating system which is both powerful and easy to use”. The team behind Linux Mint is also very involved with the [MATE](http://itsfoss.com/install-mate-desktop-ubuntu-14-04/) and [Cinnamon](http://itsfoss.com/install-cinnamon-ubuntu-14-04/) desktop environments. + +## First X-Men, now X-Apps + +Thursday, Linux Mint project lead Clement Lefebvre [announced](http://blog.linuxmint.com/?p=2985) the creation of the X-Apps. The X-Apps are designed to be desktop-agnostic so that developers can update them without having to tweak them for each desktop environment. Lefebvre stated that these X-Apps would be used as default applications for Cinnamon, MATE and Xfce. + +## Does Linux Need Even More Apps? + +According to Lefebvre, the creation of the X-Apps was necessitated by the release of GNOME 3.18. He said that with the release of GNOME 3.18: + +> “GTK itself and many of the GNOME applications now integrate better with GNOME Shell and look more native in that environment. The bad news, is that they now look completely out of place everywhere else. To make matters worse, Unity, the flagship product of Ubuntu, relies heavily on GTK, GNOME applications and the GNOME environment itself, so we’re not dealing with the upstream version of 3.18 here, but with a collection of patches which bring their own issues (one example is that Ubuntu reintroduces menubars and titlebars in applications but without rewriting their headerbar.. so you sometimes see all three of them).” + +In the past, the Linux Mint team dealt with the problem by “downgrading apps (Linux Mint 17 uses gedit 2.30 for instance), patching GNOME (GTK and various GNOME apps) and using alternatives (mostly in MATE and Xfce)”. + +Lefebvre also said that it didn’t make sense to build specific applications for Cinnamon and MATE this is why they opted to work on apps which would be generic, perfectly suited to run in Cinnamon, MATE and Xfce (and possibly other desktop environments). + +He further added: + +>"X-Apps will be a collection of generic GTK3 applications using traditional interfaces which can be used as default desktop components in Cinnamon, MATE and Xfce. In Mint 18, the “X apps” will allow us to maintain a native look and a good level of integration because they will be used in replacement of GNOME applications which now look foreign (using headerbars and a distinctive layout). Long-term, the X-App project will allow us to innovate and to develop new features and improvements in the applications themselves (this is something we couldn’t do via patches, temporary forks or DE-specific forks like the MATE apps because it was too costly)." + +## What Kind of Apps Will Be Available? + +![](http://itsfoss.com/wp-content/uploads/2016/01/xedit.png) + +Lefebvre only revealed one of the upcoming X-Apps: a text editor named xedit. Here are some of the feature that it will provide: + +- Based on Pluma to lower learning curve +- Makes use of GTK3 +- Doesn’t depend on GNOME or MATE + +## When + +The X-Apps will be coming together with [Linux Mint 18 release](http://itsfoss.com/linux-mint-18-codenamed-sarah/), which will follow the release of Ubuntu 16.04 LTS by several months. [Ubuntu 16.04 is scheduled to release in April](http://itsfoss.com/ubuntu-1604-release-schedule/). + +## Final Thoughts + +Personally, whenever I hear about someone releasing new distro specific apps, I cringe. The Linux universe is already incredibly fragmented. Do we really need more duplicate projects to take time and energy to create? Don’t get me wrong, I like the idea of desktop-agnostic apps. It would fix a lot of problems with how apps look from distro to distro. + +The problem that worries me is “Will they be able to pull it off?” As I stated before, the Linux Mint guys also work on two desktop environments. Now add application development to the mix. I’ve never written a piece of software myself (other than one that said “Hello, World”), but I do know that when you try and complicate a project bad things happen. Many projects have fallen to the dragon of feature creep I hope that doesn’t happen here. + +Do you have a different take? Let me know in the comments below. + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/linux-mint-own-apps/ + +作者:[JOHN PAUL][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/john/ From 291ffd96eaac49b1747ed249c91b290618922662 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 16:46:59 +0800 Subject: [PATCH 1005/1710] =?UTF-8?q?20160220-7=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Download] Vi Cheat Sheet For Beginners.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md diff --git a/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md b/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md new file mode 100644 index 0000000000..0a43387984 --- /dev/null +++ b/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md @@ -0,0 +1,78 @@ +[Free Download] Vi Cheat Sheet For Beginners +================================================ + +![](http://itsfoss.com/wp-content/uploads/2016/01/VI.jpg) + +I have often shared my Linux experience with you. Today I am going to share my **Vi cheat sheet** that has often saved me time in googling for a quick command. + +## Basic Vi commands + +This is not a detailed tutorial to teach you each and every aspect of [Vi editor](https://en.wikipedia.org/wiki/Vi). In fact, it’s not a tutorial at all. It’s just a collection of basic Vi commands and their brief description for a quick reference. + +command|explain +:--|:-- +:x |Save the file and quit +:q!|Quit without saving the file +i|Insert starting left of the cursor +a|Append starting right of the cursor +ESC|Exit insert/append mode +arrows|Move cursor +/text|Search string text (case sensitive) +n|Search next occurrence of the searched item +x|Delete character under the cursor +dd|Delete line under the cursor +u|Undo last change +:0|Beginning of the file +:n|Go to line n +G|End of the file +^|Beginning of the line +$|End of the line +:set list|See special characters in the file +yy|Copy the line into the buffer +5yy|Copy 5 lines into the buffer +p|Paste buffer after the current line + +You can download the above cheat sheet in a PDF format from the link below: + +[Download Vi Cheat Sheet](https://drive.google.com/file/d/0By49_3Av9sT1X3dlWkNQa3g2b2c/view?usp=sharing) + +You can print it and keep it at your desk or just save it for offline use. + +## Why I created the Vi cheat sheet? + +Several years ago, when I started working in Linux terminal, the idea of using a command line editor horrified me. I had used desktop Linux before but it was my personal computer so I happily used the GUI text editor like Gedit. But in the working environment, I was stuck with the command line and there was no scope of using a graphical editor. + +I was forced to use Vi for basic edits in the files on remote Linux boxes and this is where I identified and started to admire the power of command line editing tool Vi. + +Since, at that time, I was new at Vi editor, I found myself baffling with it. The first time, I could not even come out of the file because I did not know how to close Vi editor. No shame in accepting that I had to Google it. + +So, I decided to make a list of all the basic commands that I used frequently for editing in Vi. This list or cheat sheet, as you may call it, helped me a lot in my early days with Vi. With time, I grew up with Vi and now I don’t even need to look at the Vi cheat sheet because I have the commands memorized by heart. + +## Why should you use Vi cheat sheet? + +I can understand your situation if you are just getting started with Vi. Your favorite Ctrl+S doesn’t work for saving files. Ctrl+C and Ctrl+V were supposed to be the universal shortcut for copy and paste but it won’t work in Vi universe.Thousands of people use cheat sheets + +Thousands of people use such cheat sheets for various programming languages and `/` or tools that give them a quick reference to commonly used steps `/` commands. Trust me, using cheat sheets among the best practices advised to programmers. + +This Vi cheat sheet will help you a lot if you are just starting with Vi or if you infrequently use the Vi editor (so you keep forgetting the commands). You can save it and use it for quick reference in future, that too offline. + +## Do you like it? + +So far, I have refrained myself from going into too much on terminal side. How do you find this post? Do you want me to share more such cheat sheets and downloadable items? Your suggestions are welcomed. + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/download-vi-cheat-sheet/ + +作者:[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/ + + + + + From 9100e0c49aca1309ad0191e2c80aab601261aee8 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 20 Feb 2016 17:02:26 +0800 Subject: [PATCH 1006/1710] Translated share/20151204 Review EXT4 vs. Btrfs vs. XFS.md --- .../20151204 Review EXT4 vs. Btrfs vs. XFS.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md diff --git a/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md new file mode 100644 index 0000000000..b2e71c0da3 --- /dev/null +++ b/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -0,0 +1,66 @@ +EXT4、Btrfs、XFS 文件系统回顾 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) + +老实说,人们最不曾考虑的问题之一是他们的个人电脑中使用了什么文件系统。Windows 和 Mac OS X 用户更没有理由去考虑,因为对于他们的操作系统,只有一种选择,那就是 NTFS 和 HFS+。相反,对于 Linux 系统而言,有很多种文件系统可以选择,现在默认的是广泛采用的 ext4。然而,现在也有改用一种称为 btrfs 文件系统的趋势。那是什么使得 btrfs、或者其它文件系统变得更优秀呢?什么时候我们又能看到 Linux 发行版作出改变呢? + +首先让我们对文件系统以及它们真正干什么有个总体的认识,然后我们再对一些有名的文件系统做详细的比较。 + +### 文件系统是干什么的? ### + +如果你不清楚文件系统是干什么的,一句话总结起来也非常简单。文件系统主要用于控制所有程序不再使用数据时如何存储数据、如何访问数据以及有什么其它信息(元数据)和数据本身相关,等等。听起来要编程实现并不是轻而易举的事情,实际上也确实如此。文件系统一直在改进,包括更多的功能、更高效地完成它需要做的事情。总而言之,它是所有计算机的基本需求、但并不像听起来那么简单。 + +### 为什么要分区? ### + +由于每个操作系统都能创建或者删除分区,很多人对分区都有模糊的认识。Linux 操作系统在同一块磁盘上使用多个分区,就算使用标准安装过程,这看起来很奇怪,因此需要一些解释。拥有不同分区的一个主要目的就是为了在灾难发生时能获得更好的数据安全性。 + +通过将硬盘划分为分区,数据会被分隔以及重组。当事故发生的时候,只有存储在被损坏分区的数据会被破坏,很大可能上其它分区的数据能得以保留。这个原因可以追溯到 Linux 操作系统还没有日志文件系统,任何掉电都有可能导致灾难发生的时候。 + +使用分区也考虑到了安全和健壮性原因,因此操作系统部分损坏并不意味着整个计算机就有风险或者会受到破坏。这也是当前采用分区的一个最重要因素。举个例子,用户创建了一些会填满磁盘的脚本、程序或者 web 应用,如果该磁盘只有一个大的分区,如果磁盘满了那么整个系统就不能工作。如果用户把数据保存在不同的分区,那么就只有那个分区会受到影响,而系统分区或者其它数据分区仍能正常运行。 + +记住,拥有一个日志文件系统只能在掉电或者和存储设备意外断开连接时提供数据安全性,并不能在文件系统出现坏块或者发生逻辑错误时保护数据。对于这种情况,用户可以采用廉价磁盘冗余阵列(RAID:Redundant Array of Inexpensive Disks)的方案。 + +### 为什么要选择文件系统? ### + +ext4 文件系统由 ext3 文件系统改进而来,而后者又是从 ext2 文件系统改进而来。虽然 ext4 文件系统已经非常稳定,是过去几年中绝大部分发行版的默认选择,但它是基于陈旧的代码开发而来。另外, Linux 操作系统用户也需要很多 ext4 文件系统本身不提供的新功能。虽然通过某些软件能满足这种需求,但性能会受到影响,在文件系统层次做到这些能获得更好的性能。 + +### Ext4 文件系统 ### + +ext4 还有一些令人印象深刻的限值。最大文件大小是 16tebibytes(大概是 17.6 terabytes),这比普通用户当前能买到的硬盘还要大。使用 ext4 能创建的最大卷/分区是 1 exbibyte(大概是 1,152,921.5 terabytes)。通过使用多种技巧, ext4 比 ext3 有很大的速度提升。类似一些最先进的文件系统,它是一个日志文件系统,意味着它会对文件在磁盘中的位置以及任何其它对磁盘的更改做记录。纵观它的所有功能,它还不支持透明压缩、重复数据删除或者透明加密。技术上支持了快照,但该功能还处于实验性阶段。 + +### Btrfs 文件系统 ### + +btrfs 有很多不同的发音,例如 Better FS、Butter FS 或者 B-Tree FS。它是一个几乎完全从头开发的文件系统。btrfs 存在的原因是它的开发者期初希望扩展文件系统的功能使得它包括快照、池化、校验以及其它一些功能。虽然和 ext4 无关,它也希望能保留 ext4 中能使消费者和商家受益的功能,并整合额外的能使每个人、尤其是企业受益的功能。对于使用大型软件以及大规模数据库的企业,对于多种不同的硬盘看起来一致的文件系统能使他们受益并且使数据整合变得更加简单。删除重复数据能降低数据实际使用的空间,当需要镜像一个单一和广泛文件系统时使用 btrfs 也能使数据镜像变得简单。 + +用户当然可以继续选择创建多个分区从而无需镜像任何东西。考虑到这种情况,btrfs 能横跨多种硬盘,和 ext4 相比,它能支持 16 倍多的驱动空间。btrfs 文件系统一个分区最大是 16 exbibytes,最大的文件大小也是 16 exbibytes。 + +### XFS 文件系统 ### + +XFS 文件系统是扩展文件系统(extent file system)的扩展。XFS 是 64 位高性能日志文件系统。对 XFS 的支持大概在 2002 年合并到了 Linux 内核,到了 2009 年,红帽企业版 Linux 5.4 也支持了 XFS 文件系统。对于 64 位文件系统,XFS 支持最大文件系统大小为 8 exbibytes。XFS 文件系统有一些缺陷,例如它不能压缩,删除大量文件时性能低下。RHEL 7.0 文件系统默认使用 XFS。 + +### 总后总结 ### + +不幸的是,还不知道 btrfs 什么时候能到来。官方说,下一代文件系统仍然被归类到“不稳定”,但是如果用户下载最新版本的 Ubuntu,他就可以选择安装到 btrfs 分区上。什么时候 btrfs 会被归类到 “稳定” 仍然是个谜, 直到真的认为它“稳定”之前,用户也不应该期望 Ubuntu 会默认采用 btrfs。有报道说 Fedora 18 会用 btrfs 作为它的默认文件系统,因为到了发布它的时候,应该有了 btrfs 文件系统校验器。由于还没有实现所有的功能,另外和 ext4 相比性能上也比较缓慢, btrfs 还有很多的工作要做。 + +那么,究竟使用哪个更好呢?尽管性能几乎相同,但 ext4 还是赢家。为什么呢?答案在于易用性以及广泛性。对于桌面或者工作站, ext4 仍然是一个很好的文件系统。由于默认提供,用户可以在上面安装操作系统。同时, ext4 支持最大 1 exabytes 的卷和 16 terabytes 的文件,因此考虑到大小,它也还有很大的进步空间。 + +btrfs 能提供更大的高达 16 exabytes 的卷以及更好的容错,但是,到现在为止,它感觉更像是一个附加文件系统,而没有集成到 Linux 操作系统。比如,尽管 btrfs 支持不同的发行版,使用 btrfs 格式化硬盘之前先要有 btrfs-tools 工具,这意味着安装 Linux 操作系统的时候它并不是一个可选项。 + +尽管传输速率非常重要,评价一个文件系统出了文件传输速度之外还有很多因素。btrfs 有很多好用的功能,例如写复制、扩展校验、快照、清洗、数据自治愈、冗余删除以及其它保证数据完整性的功能。和 ZFS 相比 btrfs 缺少 RAID-Z 功能,因此对于 btrfs, RAID 还处于实验性阶段。对于单纯的数据存储,和 ext4 相比 btrfs 似乎更加优秀,但时间会验证一切。 + +迄今为止,对于桌面系统而言,ext4 似乎是一个更好的选择,因为它是默认的文件系统,传输文件时也比 btrfs 更快。btrfs 当然值得尝试、但要在桌面 Linux 上完全取代 ext4 可能还需要一些时间。数据场和大存储池会揭示关于 ext4、XCF 以及 btrfs 不同的故事和差异。 + +如果你有其它不同的或者额外的观点、在下面的评论框中告诉我们吧。 +If you have a different or additional opinion, kindly let us know by commenting on this article. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/review-ext4-vs-btrfs-vs-xfs/ + +作者:[M.el Khamlichi][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/pirat9/ From baaa02aa74732629f9b5040b43c6e8e174e2ef40 Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Sat, 20 Feb 2016 21:16:24 +0800 Subject: [PATCH 1007/1710] Update 20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md --- ...untu Edition Announced and It's a Beast.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index 7bc06d74b7..e655b4ffba 100644 --- a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -5,32 +5,32 @@ 自从上次听到魅族的消息到现在已经很久了,但是看起来 Canonical 和这个中国的硬件厂商之间的合作关系仍然存在。从表面来看,之前魅族的 MX4 Ubuntu 版只是进行了小范围的发布,所以只有很少的设备卖出去了。 -我们仅仅希望 魅族 Pro 5 Ubuntu 版可以提高供货量,特别因为它还是一个魅族仍然提供支持的非常新的手机。 +我们仅仅希望魅族 Pro 5 Ubuntu 版可以提高供货量,尤其是因为它是魅族的一款相当新且还提供支持的手机。 -最新的魅族 Pro 5 是第5个支持 Ubuntu Touch 的官方设备,而且在2016 年我们将会看到更多的手机以及平板都会预装这个操作系统。 +最新的魅族 Pro 5 是第5个支持 Ubuntu Touch 的官方设备,2016 年我们可能会看到更多的手机甚至是平板都会预装这个操作系统。 ## 魅族 Pro 5 Ubuntu 版将会非常震撼 -Canonical 宣称 Pro 5 是目前已发布了的 Ubuntu 智能手机中最强大的, 他们说的是对的, 除了这一点,它还是平板以外最大的设备。 魅族 Pro 5 拥有一颗 Exynos 7420 8核处理器,5.7 英寸分辨率为1920x1080 的 AMOLED 屏,覆盖第三代大猩猩屏,以及 LPDDR4 内存技术。 +Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它还是最大的Ubuntu设备。魅族 Pro 5 采用一颗 Exynos 7420 8核处理器、5.7 英寸分辨率为1920x1080 的 AMOLED 屏、第三代康宁大猩猩屏以及 LPDDR4 内存技术。 -很多人也许会问这个新手机的系统是否可以和桌面版系统一样, 现在看起来用户是运气不错。 +很多人也许会问这个新手机的系统是否可以和桌面版系统一样,现在看起来用户是运气不错。 -公司解释说,“Canonical 一直致力于重塑个人计算的视觉表现,希望为所有的的个人设备提供自适应的平台。因此尽管 Pro 5 缺少 MHL 输出,但运行在魅族 Pro 5 上的是最新的代码,同时也是最新发布的支持平板和其它设备的系统,它可以提供一种接近传统桌面的体验。” +该公司解释说,“通过向各种个人设备提供一个单一的自适应平台,Canonical 一直致力于重塑个人计算的视觉表现。因此尽管魅族 Pro 5 缺少 MHL 输出,但它 运行的是最新的代码,这些代码与新近发布的平板和其它设备一样,可提供一种接近传统桌面的体验。” -魅族 Pro 5 最初实在2015 年9 月发布的。用户同时会拥有一个2100 万像素的后置摄像头,可以拍摄2160p 和30 fps 的视频。同时它还带有一个指纹传感器和支持快速充电的3050 mAh 的锂电池。 +魅族 Pro 5 最初于 2015 年9 月发布,拥有一个2100 万像素的后置摄像头,可以拍摄30fps 的 2160p 视频。同时它还带有一个指纹传感器和支持快速充电的 3050 mAh 的锂电池。 -目前这款手机只在中国和欧洲有售,预定将从2016 年世界移动大会期间开始,即2 月22 日至25 日。 +目前这款手机只在中国和欧洲有售,预定将从 2016 年 2 月 22 日至 25 日的世界移动大会期间开始。 ![](http://i1-news.softpedia-static.com/images/fitted/620x/meizu-pro-5-ubuntu-edition-announced-and-it-s-a-beast-photos-500526-11.jpg) ------------------------------------------------------------------------------ -via: http://www.linux.com/news/embedded-mobile/mobile-linux/886322-meizu-pro-5-ubuntu-edition-announced-and-its-a-beast +via: http://news.softpedia.com/news/meizu-pro-5-ubuntu-edition-announced-and-it-s-a-beast-photos-500526.shtml 作者:[Silviu Stahie][a] -译者:[译者ID](https://github.com/osk874) -校对:[校对者ID](https://github.com/校对者ID) +译者:[osk874](https://github.com/osk874) +校对:[Yuking](https://github.com/Yuking-net) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3c641f1b3566efda27f43098f18c0f816291d2c4 Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Sat, 20 Feb 2016 21:17:16 +0800 Subject: [PATCH 1008/1710] Update 20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md --- ...218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index e655b4ffba..294866bf67 100644 --- a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -17,7 +17,7 @@ Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机 该公司解释说,“通过向各种个人设备提供一个单一的自适应平台,Canonical 一直致力于重塑个人计算的视觉表现。因此尽管魅族 Pro 5 缺少 MHL 输出,但它 运行的是最新的代码,这些代码与新近发布的平板和其它设备一样,可提供一种接近传统桌面的体验。” -魅族 Pro 5 最初于 2015 年9 月发布,拥有一个2100 万像素的后置摄像头,可以拍摄30fps 的 2160p 视频。同时它还带有一个指纹传感器和支持快速充电的 3050 mAh 的锂电池。 +魅族 Pro 5 最初于 2015 年 9 月发布,拥有一个 2100 万像素的后置摄像头,可以拍摄 30fps 的 2160p 视频。同时它还带有一个指纹传感器和支持快速充电的 3050 mAh 的锂电池。 目前这款手机只在中国和欧洲有售,预定将从 2016 年 2 月 22 日至 25 日的世界移动大会期间开始。 From 208d3f9a288470fa3f0f3447406ad0f961a88ff8 Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Sat, 20 Feb 2016 21:17:58 +0800 Subject: [PATCH 1009/1710] Update 20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md --- ...8 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index 294866bf67..81ad51e3ab 100644 --- a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -7,11 +7,11 @@ 我们仅仅希望魅族 Pro 5 Ubuntu 版可以提高供货量,尤其是因为它是魅族的一款相当新且还提供支持的手机。 -最新的魅族 Pro 5 是第5个支持 Ubuntu Touch 的官方设备,2016 年我们可能会看到更多的手机甚至是平板都会预装这个操作系统。 +最新的魅族 Pro 5 是第 5 个支持 Ubuntu Touch 的官方设备,2016 年我们可能会看到更多的手机甚至是平板都会预装这个操作系统。 ## 魅族 Pro 5 Ubuntu 版将会非常震撼 -Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它还是最大的Ubuntu设备。魅族 Pro 5 采用一颗 Exynos 7420 8核处理器、5.7 英寸分辨率为1920x1080 的 AMOLED 屏、第三代康宁大猩猩屏以及 LPDDR4 内存技术。 +Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它还是最大的Ubuntu设备。魅族 Pro 5 采用一颗 Exynos 7420 8 核处理器、5.7 英寸分辨率为 1920x1080 的 AMOLED 屏、第三代康宁大猩猩屏以及 LPDDR4 内存技术。 很多人也许会问这个新手机的系统是否可以和桌面版系统一样,现在看起来用户是运气不错。 From b5a2d52001890af341fc0dbe3052d69f23aea31b Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Sat, 20 Feb 2016 21:18:45 +0800 Subject: [PATCH 1010/1710] Update 20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md --- ...8 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index 81ad51e3ab..fa75e049cb 100644 --- a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -1,7 +1,7 @@ 魅族 Pro 5 Ubuntu 版即将发布 ======================================================== -**Canonical 和魅族刚刚透露魅族 Pro 5 Ubuntu 版将在2016 世界移动大会召开期间开始预售** +**Canonical 和魅族刚刚透露魅族 Pro 5 Ubuntu 版将在 2016 世界移动大会召开期间开始预售** 自从上次听到魅族的消息到现在已经很久了,但是看起来 Canonical 和这个中国的硬件厂商之间的合作关系仍然存在。从表面来看,之前魅族的 MX4 Ubuntu 版只是进行了小范围的发布,所以只有很少的设备卖出去了。 @@ -11,7 +11,7 @@ ## 魅族 Pro 5 Ubuntu 版将会非常震撼 -Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它还是最大的Ubuntu设备。魅族 Pro 5 采用一颗 Exynos 7420 8 核处理器、5.7 英寸分辨率为 1920x1080 的 AMOLED 屏、第三代康宁大猩猩屏以及 LPDDR4 内存技术。 +Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它还是最大的 Ubuntu 设备。魅族 Pro 5 采用一颗 Exynos 7420 8 核处理器、5.7 英寸分辨率为 1920x1080 的 AMOLED 屏、第三代康宁大猩猩屏以及 LPDDR4 内存技术。 很多人也许会问这个新手机的系统是否可以和桌面版系统一样,现在看起来用户是运气不错。 From 026d0e3ce3ba84f921730320105109b2eabf98c5 Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Sat, 20 Feb 2016 21:21:28 +0800 Subject: [PATCH 1011/1710] Update 20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md --- ...218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index fa75e049cb..b13c639b3d 100644 --- a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -11,7 +11,7 @@ ## 魅族 Pro 5 Ubuntu 版将会非常震撼 -Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它还是最大的 Ubuntu 设备。魅族 Pro 5 采用一颗 Exynos 7420 8 核处理器、5.7 英寸分辨率为 1920x1080 的 AMOLED 屏、第三代康宁大猩猩屏以及 LPDDR4 内存技术。 +Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它还是最大的 Ubuntu 设备。魅族 Pro 5 具备一颗 Exynos 7420 8 核处理器和 5.7 英寸分辨率为 1920x1080 的 AMOLED 屏,采用第三代康宁大猩猩玻璃以及 LPDDR4 内存技术。 很多人也许会问这个新手机的系统是否可以和桌面版系统一样,现在看起来用户是运气不错。 From 8c67721ceac1168266ad338ec7792d7bfcc4d0fa Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 21:50:51 +0800 Subject: [PATCH 1012/1710] Update 20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md --- ...8 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index b13c639b3d..df872dd49e 100644 --- a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -11,11 +11,11 @@ ## 魅族 Pro 5 Ubuntu 版将会非常震撼 -Canonical 宣称 Pro 5 是目前已发布了的最强大的 Ubuntu 智能手机,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它还是最大的 Ubuntu 设备。魅族 Pro 5 具备一颗 Exynos 7420 8 核处理器和 5.7 英寸分辨率为 1920x1080 的 AMOLED 屏,采用第三代康宁大猩猩玻璃以及 LPDDR4 内存技术。 +Canonical 宣称 Pro 5 是目前已发布了的 Ubuntu 智能手机中最强大的一个,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它也是最大的 Ubuntu Touch 设备。魅族 Pro 5 采用了一颗 Exynos 7420 8 核处理器和 5.7 英寸分辨率为 1920x1080 的 AMOLED 屏,配备第三代康宁大猩猩玻璃以及 LPDDR4 内存技术。 很多人也许会问这个新手机的系统是否可以和桌面版系统一样,现在看起来用户是运气不错。 -该公司解释说,“通过向各种个人设备提供一个单一的自适应平台,Canonical 一直致力于重塑个人计算的视觉表现。因此尽管魅族 Pro 5 缺少 MHL 输出,但它 运行的是最新的代码,这些代码与新近发布的平板和其它设备一样,可提供一种接近传统桌面的体验。” +该公司解释说,“Canonical 一直致力于通过向各种个人设备提供一个统一的自适应平台来重塑个人计算的视觉表现。因此尽管魅族 Pro 5 缺少 MHL 输出,但它运行的是最新的代码,这些代码与新近发布的平板和其它设备一样,可提供一种接近传统桌面的体验。” 魅族 Pro 5 最初于 2015 年 9 月发布,拥有一个 2100 万像素的后置摄像头,可以拍摄 30fps 的 2160p 视频。同时它还带有一个指纹传感器和支持快速充电的 3050 mAh 的锂电池。 From d023a49156a57dbe7f9f4599875bc477bec7c90e Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 21:53:09 +0800 Subject: [PATCH 1013/1710] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0published?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...60218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/news => published}/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md (100%) diff --git a/translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md similarity index 100% rename from translated/news/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md rename to published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md From 7503fd7d0b9590547bb0639044b852a6cd496d94 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 20 Feb 2016 22:06:52 +0800 Subject: [PATCH 1014/1710] =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=8E=92=E7=89=88?= =?UTF-8?q?=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用来规范翻译之后的格式 --- chinese-copywriting-guidelines.md | 301 ++++++++++++++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 chinese-copywriting-guidelines.md diff --git a/chinese-copywriting-guidelines.md b/chinese-copywriting-guidelines.md new file mode 100644 index 0000000000..c2d0d207bd --- /dev/null +++ b/chinese-copywriting-guidelines.md @@ -0,0 +1,301 @@ +# 中文文案排版指北 +[![devDependency Status](https://david-dm.org/sparanoid/chinese-copywriting-guidelines/dev-status.svg)](https://david-dm.org/sparanoid/chinese-copywriting-guidelines#info=devDependencies) +[![Built with Almace Scaffolding](https://d349cztnlupsuf.cloudfront.net/amsf-badge.svg)](http://sparanoid.com/note/chinese-copywriting-guidelines/) + +統一中文文案、排版的相關用法,降低團隊成員之間的溝通成本,增強網站氣質。 + +Other languages: + +- [English](README.en.md) +- [Chinese Traditional](README.md) +- [Chinese Simplifed](https://github.com/mzlogin/chinese-copywriting-guidelines) + +----- + +## 目次 + +- [空格](#空格) + - [中英文之間需要增加空格](#中英文之間需要增加空格) + - [中文與數字之間需要增加空格](#中文與數字之間需要增加空格) + - [數字與單位之間需要增加空格](#數字與單位之間需要增加空格) + - [全形標點與其他字符之間不加空格](#全形標點與其他字符之間不加空格) + - [`-ms-text-autospace` to the rescue?](#-ms-text-autospace-to-the-rescue) +- [標點符號](#標點符號) + - [不重複使用標點符號](#不重複使用標點符號) +- [全形和半形](#全形和半形) + - [使用全形中文標點](#使用全形中文標點) + - [數字使用半形字符](#數字使用半形字符) + - [遇到完整的英文整句、特殊名詞,其內容使用半形標點](#遇到完整的英文整句特殊名詞其內容使用半形標點) +- [名詞](#名詞) + - [專有名詞使用正確的大小寫](#專有名詞使用正確的大小寫) + - [不要使用不地道的縮寫](#不要使用不地道的縮寫) +- [爭議](#爭議) + - [鏈接之間增加空格](#鏈接之間增加空格) + - [簡體中文使用直角引號](#簡體中文使用直角引號) +- [工具](#工具) +- [誰在這樣做?](#誰在這樣做) +- [參考文獻](#參考文獻) + +## 空格 + +「有研究顯示,打字的時候不喜歡在中文和英文之間加空格的人,感情路都走得很辛苦,有七成的比例會在 34 歲的時候跟自己不愛的人結婚,而其餘三成的人最後只能把遺產留給自己的貓。畢竟愛情跟書寫都需要適時地留白。 + +與大家共勉之。」——[vinta/paranoid-auto-spacing](https://github.com/vinta/pangu.js) + +### 中英文之間需要增加空格 + +正確: + +> 在 LeanCloud 上,數據存儲是圍繞 `AVObject` 進行的。 + +錯誤: + +> 在LeanCloud上,數據存儲是圍繞`AVObject`進行的。 + +> 在 LeanCloud上,數據存儲是圍繞`AVObject` 進行的。 + +完整的正確用法: + +> 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。每个 `AVObject` 都包含了与 JSON 兼容的 key-value 对应的数据。数据是 schema-free 的,你不需要在每个 `AVObject` 上提前指定存在哪些键,只要直接设定对应的 key-value 即可。 + +例外:「豆瓣FM」等產品名詞,按照官方所定義的格式書寫。 + +### 中文與數字之間需要增加空格 + +正確: + +> 今天出去買菜花了 5000 元。 + +錯誤: + +> 今天出去買菜花了 5000元。 + +> 今天出去買菜花了5000元。 + +### 數字與單位之間需要增加空格 + +正確: + +> 我家的光纖入屋寬頻有 10 Gbps,SSD 一共有 20 TB。 + +錯誤: + +> 我家的光纖入屋寬頻有 10Gbps,SSD 一共有 20TB。 + +例外:度/百分比與數字之間不需要增加空格: + +正確: + +> 今天是 233° 的高溫。 + +> 新 MacBook Pro 有 15% 的 CPU 性能提升。 + +錯誤: + +> 今天是 233 ° 的高溫。 + +> 新 MacBook Pro 有 15 % 的 CPU 性能提升。 + +### 全形標點與其他字符之間不加空格 + +正確: + +> 剛剛買了一部 iPhone,好開心! + +錯誤: + +> 剛剛買了一部 iPhone ,好開心! + +### `-ms-text-autospace` to the rescue? + +Microsoft 有個 [`-ms-text-autospace`](http://msdn.microsoft.com/en-us/library/ie/ms531164(v=vs.85).aspx) 的 CSS 屬性可以實現自動為中英文之間增加空白。不過目前並未普及,另外在其他應用場景,例如 OS X、iOS 的用戶介面目前并不存在這個特性,所以請繼續保持隨手加空格的習慣。 + +## 標點符號 + +### 不重複使用標點符號 + +正確: + +> 德國隊竟然戰勝了巴西隊! + +> 她竟然對你說「喵」?! + +錯誤: + +> 德國隊竟然戰勝了巴西隊!! + +> 德國隊竟然戰勝了巴西隊!!!!!!!! + +> 她竟然對你說「喵」??!! + +> 她竟然對你說「喵」?!?!??!! + +## 全形和半形 + +不明白什麼是全形(全角)與半形(半角)符號?請查看維基百科詞條『[全形和半形](http://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2)』。 + +### 使用全形中文標點 + +正確: + +> 嗨!你知道嘛?今天前台的小妹跟我說「喵」了哎! + +> 核磁共振成像(NMRI)是什麼原理都不知道?JFGI! + +錯誤: + +> 嗨! 你知道嘛? 今天前台的小妹跟我說 "喵" 了哎! + +> 嗨!你知道嘛?今天前台的小妹跟我說"喵"了哎! + +> 核磁共振成像 (NMRI) 是什麼原理都不知道? JFGI! + +> 核磁共振成像(NMRI)是什麼原理都不知道?JFGI! + +### 數字使用半形字符 + +正確: + +> 這件蛋糕只賣 1000 元。 + +錯誤: + +> 這件蛋糕只賣 1000 元。 + +例外:在設計稿、宣傳海報中如出現極少量數字的情形時,為方便文字對齊,是可以使用全形數字的。 + +### 遇到完整的英文整句、特殊名詞,其內容使用半形標點 + +正確: + +> 賈伯斯那句話是怎麼說的?「Stay hungry, stay foolish.」 + +> 推薦你閱讀《Hackers & Painters: Big Ideas from the Computer Age》,非常的有趣。 + +錯誤: + +> 賈伯斯那句話是怎麼說的?「Stay hungry,stay foolish。」 + +> 推薦你閱讀《Hackers&Painters:Big Ideas from the Computer Age》,非常的有趣。 + +## 名詞 + +### 專有名詞使用正確的大小寫 + +大小寫相關用法原屬於英文書寫範疇,不屬於本 wiki 討論內容,在這裡只對部分易錯用法進行簡述。 + +正確: + +> 使用 GitHub 登錄 + +> 我們的客戶有 GitHub、Foursquare、Microsoft Corporation、Google、Facebook, Inc.。 + +錯誤: + +> 使用 github 登錄 + +> 使用 GITHUB 登錄 + +> 使用 Github 登錄 + +> 使用 gitHub 登錄 + +> 使用 gイんĤЦ8 登錄 + +> 我們的客戶有 github、foursquare、microsoft corporation、google、facebook, inc.。 + +> 我們的客戶有 GITHUB、FOURSQUARE、MICROSOFT CORPORATION、GOOGLE、FACEBOOK, INC.。 + +> 我們的客戶有 Github、FourSquare、MicroSoft Corporation、Google、FaceBook, Inc.。 + +> 我們的客戶有 gitHub、fourSquare、microSoft Corporation、google、faceBook, Inc.。 + +> 我們的客戶有 gイんĤЦ8、キouЯƧquムгє、๓เςг๏ร๏Ŧt ς๏гק๏гคtเ๏ภn、900913、ƒ4ᄃëв๏๏к, IПᄃ.。 + +注意:當網頁中需要配合整體視覺風格而出現全部大寫/小寫的情形,HTML 中請使用標準的大小寫規範進行書寫;並通過 `text-transform: uppercase;`/`text-transform: lowercase;` 對表現形式進行定義。 + +### 不要使用不地道的縮寫 + +正確: + +> 我們需要一位熟悉 JavaScript、HTML5,至少理解一种框架(如 Backbone.js、AngularJS、React 等)的前端開發者。 + +錯誤: + +> 我們需要一位熟悉 Js、h5,至少理解一种框架(如 backbone、angular、RJS 等)的 FED。 + +## 爭議 + +以下用法略帶有個人色彩,既:無論是否遵循下述規則,從語法的角度來講都是**正確**的。 + +### 鏈接之間增加空格 + +用法: + +> 请 [提交一个 issue](#) 并分配给相关同事。 + +> 訪問我們網站的最新動態,請 [點擊這裡](#) 進行訂閱! + +對比用法: + +> 请[提交一个 issue](#) 并分配给相关同事。 + +> 訪問我們網站的最新動態,請[點擊這裡](#)進行訂閱! + +### 簡體中文使用直角引號 + +用法: + +> 「老师,『有条不紊』的『紊』是什么意思?」 + +對比用法: + +> “老师,‘有条不紊’的‘紊’是什么意思?” + +## 工具 + +倉庫 | 語言 +--- | --- +[vinta/paranoid-auto-spacing](https://github.com/vinta/paranoid-auto-spacing) | JavaScript +[huei90/pangu.node](https://github.com/huei90/pangu.node) | Node.js +[huacnlee/auto-correct](https://github.com/huacnlee/auto-correct) | Ruby +[sparanoid/space-lover](https://github.com/sparanoid/space-lover) | PHP (WordPress) +[nauxliu/auto-correct](https://github.com/NauxLiu/auto-correct) | PHP +[hotoo/pangu.vim](https://github.com/hotoo/pangu.vim) | Vim +[sparanoid/grunt-auto-spacing](https://github.com/sparanoid/grunt-auto-spacing) | Node.js (Grunt) +[hjiang/scripts/add-space-between-latin-and-cjk](https://github.com/hjiang/scripts/blob/master/add-space-between-latin-and-cjk) | Python + +## 誰在這樣做? + +網站 | 文案 | UGC +--- | --- | --- +[Apple 中國](http://www.apple.com/cn/) | Yes | N/A +[Apple 香港](http://www.apple.com/hk/) | Yes | N/A +[Apple 台灣](http://www.apple.com/tw/) | Yes | N/A +[Microsoft 中國](http://www.microsoft.com/zh-cn/) | Yes | N/A +[Microsoft 香港](http://www.microsoft.com/zh-hk/) | Yes | N/A +[Microsoft 台灣](http://www.microsoft.com/zh-tw/) | Yes | N/A +[LeanCloud](https://leancloud.cn/) | Yes | N/A +[知乎](https://www.zhihu.com/) | Yes | 部分用戶達成 +[V2EX](https://www.v2ex.com/) | Yes | Yes +[SegmentFault](https://segmentfault.com/) | Yes | 部分用戶達成 +[Apple4us](http://apple4us.com/) | Yes | N/A +[豌豆荚](https://www.wandoujia.com/) | Yes | N/A +[Ruby China](https://ruby-china.org/) | Yes | 標題達成 +[PHPHub](https://phphub.org/) | Yes | 標題達成 + +## 參考文獻 + +- [Guidelines for Using Capital Letters - About.com](http://grammar.about.com/od/punctuationandmechanics/a/Guidelines-For-Using-Capital-Letters.htm) +- [Letter case - Wikipedia](http://en.wikipedia.org/wiki/Letter_case) +- [Punctuation - Oxford Dictionaries](http://www.oxforddictionaries.com/words/punctuation) +- [Punctuation - The Purdue OWL](https://owl.english.purdue.edu/owl/section/1/6/) +- [How to Use English Punctuation Correctly - wikiHow](http://www.wikihow.com/Use-English-Punctuation-Correctly) +- [格式 - openSUSE](https://zh.opensuse.org/index.php?title=Help:%E6%A0%BC%E5%BC%8F) +- [全形和半形 - 維基百科](http://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2) +- [引號 - 維基百科](http://zh.wikipedia.org/wiki/%E5%BC%95%E8%99%9F) +- [疑問驚嘆號 - 維基百科](http://zh.wikipedia.org/wiki/%E7%96%91%E5%95%8F%E9%A9%9A%E5%98%86%E8%99%9F) + +## CopyRight + +[中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines) From cc8f4d94673467679a743bb9e80af9e59a84105f Mon Sep 17 00:00:00 2001 From: GHLandy Date: Sun, 21 Feb 2016 00:32:19 +0800 Subject: [PATCH 1015/1710] =?UTF-8?q?[=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020160218=20The=20Best=20Linux=20Distros=20of=202016?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20160218 The Best Linux Distros of 2016.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 translated/tech/20160218 The Best Linux Distros of 2016.md diff --git a/translated/tech/20160218 The Best Linux Distros of 2016.md b/translated/tech/20160218 The Best Linux Distros of 2016.md new file mode 100644 index 0000000000..b0f080a7b6 --- /dev/null +++ b/translated/tech/20160218 The Best Linux Distros of 2016.md @@ -0,0 +1,118 @@ +2016 最佳Linux 发行版 +================================ + +![](http://www.linux.com/images/stories/66866/distro-opensuse.JPG) + +[不管是在企业还是在消费者空间](http://www.cio.com/article/3017983/linux/2015s-most-exciting-linux-devices.html),2015 对于 Linux 来说都是极其重要的一年。作为一个从 2005 年就开始使用 Linux 的老用户,我有幸见证了这个 Linux 过去 10 里的重大发展。[并且,我相信它在 2016 年里会更加令人激动](http://www.cio.com/article/3017177/linux/11-predictions-for-linux-in-2016.html)。在这篇文章里,我会挑选几个将在 2016 年里大放光彩的最佳发行版来介绍个大家。 + +## 最易回归的发行版:openSUSE + +SUSE 是 openSUSE 发行版背后的公司,同时也是起步最早的 Linux 公司;[它在 Linus Torvalds 发布 Linux 的第二年就成立了](http://www.linux.com/news/software/applications/866964-exclusive-interview-with-suse-president-nils-brauckmann)。该公司的成立实际上早于现在的 Linux 公司之王 —— Red Hat。同时 SUSE 也是 [openSUSE](https://www.opensuse.org/) 社区发行版的发起者和赞助商。 + +2015 年,openSUSE 的开发团队决定向 SUSE Linux 企业版 (SLE) 靠拢,以便让用户可以获得企业服务器特性的发行版 —— 类似于 CentOS 和 Ubuntu 那样。因此,openSUSE 变成了 [openSUSE Leap](https://en.opensuse.org/Portal:Leap),一个直接基于 SLE SP1 的发行版。 + +两个发行版共用相同的基础代码,相互受益 —— SUSE 会选用 openSUSE 中好的代码,反之亦然。如此,openSUSE 也放弃了原本常规的发布周期,新版本与 SLE 同步发行。这意味着每个版本将会有更长的生命周期。 + +这样做的结果是,openSUSE 就成了一个非常重要的发行版,因为潜在的 SLE 用户现在可以使用 openSUSE Leap 了。但也并非完全如此,openSUSE 同样也有发行版 [Tumbleweed](http://www.cio.com/article/3008856/open-source-tools/is-opensuse-tumbleweed-good-enough-for-a-seasoned-arch-user.html) —— 一个纯净的滚动式版本。所以,用户们可以选择使用超稳定的 openSUSE Leap 或者经常更新的 openSUSE Tumbleweed。 + +在我的记忆中,还没有其他的发行版做了这样一个令人印象深刻的回归。 + +## 最高可定制性的发行版:Arch Linux + +Arch Linux 是目前最好的滚动式更新的发行版。好吧,我可能有些偏见,因为我是一名 Arch Linux 用户 (GHLandy 译注:本人也是 Arch Linux 用户,它的定制性真的很好)。然而,我认为它好的真正原因是 Arch 在很多其他领域也都表现的非常优越,并且这才是我为什么用它作为主系统的原因。 + +- 对于那些想要学习 Linux 方方面面的用户来说,[Arch Linux](https://www.archlinux.org/) 无疑是一个绝佳的选择。因为你需要手动安装所有自己需要的东西,这样你会慢慢学到 Linux 系统的所有细节。 + +- Arch 是一个可高度定制发行版。任何桌面环境 (DE) 都没有了 “Arch” 的原味。你能够得到的只是一个基础系统,然后你可以在上边构建你所想要的发行版。无论好坏,也不想 openSUSE 或者 Ubuntu 那样,Arch 没有额外的补丁或者集成环境。你得到的基本就是上游开发者所创建的原始软件。 + +- Arch Linux 同时也是最好的滚动式更新的发行版之一。它需要经常保持着更新。用户所运行的基本上是最新的软件,当然,也可以通过非稳定仓库运行预发行版的软件。 + +- Arch 闻名于拥有为数众多的优秀文档。Arch Wiki 是我用以了解所有 Linux 相关事情的外带资源。 + +- Arch 中,我最喜欢的是,它提供了“任何” 其他发行版中可用的的包和软件,同时还要感谢 AUR (Arch User Repository,Arch 用户仓库)。 + +## 最美观的发行版:elementary OS + +不同的发行版会有不同的关注点 —— 多数情况下表现为不同的技术。在大多数的 Linux 发行版中,外观和用户感觉并非他们优先考虑的事情 —— 这通常是桌面环境需要考虑的事情。 + +[elementary OS](https://elementary.io/) 正在尝试改变这一事实。在这个发行版中,设计是占据重要位置,并且原因明显 —— 为该发行版取这个名字的开发者要在 Linux 世界里创建一些漂亮的图标。 + +elementary OS 相当注重整体外观和用户感觉。开发者创建了他们自己的组件,包括桌面环境。此外,他们只会选择那些符合设计规范的应用来加入到软件仓库。你可以发现 elementary OS 有很浓重的 Mac OS X 气息。 + +## 最好的新晋发行版:Solus + +![](http://www.linux.com/images/stories/66866/distro-solus.JPG) + +[Solus](https://solus-project.com/) 最近获得非常大的关注程度。它是一个外观还可以、从零开始构建的操作系统,而并非 Debian 或者 Ubuntu 的衍生版本。它使用的 Budgie 桌面环境同样是从零开始构建的,但它的目标是兼容 Gnome。Solus 和 Google 的 Chrome OS 一样 —— 一切从简。 + +我个人没怎么玩过 Solus,但它看起来很有前途。Solus 实际上并不是一个 “新” 系统。它曾以不同的形式和名称存在来很长时间,但直到 2015 年整个项目才现在这个新名称重归大众视野。 + +## 最好的云操作系统:Chrome OS + +[Chrome OS](https://www.chromium.org/chromium-os) 可能不会成为你的典型 Linux 发行版,毕竟它是基于浏览器的操作系统,主要用以在线活动。但由于基于 Linux 以及任何可以获取其源码进行编译,它同样是一个吸引人的系统。同时我也每天使用 Chrome OS,它是一个优秀、不用自己维护并且总是最新状态的系统,每个人都可以单纯用它来进行 web 相关的活动。Chrome OS 和 Android 对于推动 Linux 在 PC 市场和移动市场的占有率有着不可或缺的功劳。 + +## 最好的笔记本操作系统:Ubuntu MATE + +大多数的笔记本都没有高端的硬件,假如你运行了一个很耗费资源的桌面环境,那么你可能没有足够的系统资源或电量来维持你的基本使用 —— 因为基本上被系统自身消耗了。于是我找到了 [Ubuntu MATE](http://www.cio.com/article/2848475/ubuntu-mate-enterprise-customers.html) 这个优秀的系统。它是轻量级的环境,但提供了能让你拥有不错体验的所有软件。也幸好它的轻量级设计,大部分的系统资源都留来给你的软件使用,让你依旧可以完成一些繁重的任务。我还发现,它对于一些低端的硬件也同样有很好的支持。 + +## 为老旧硬件支持而生的发行版:Lubuntu + +假如你身边拥有一些过时的笔记本或 PC,给它安装 [Lubuntu](http://lubuntu.net/) 来获得重生吧。Lubuntu 使用的是 LXDE 桌面环境,但该项目与 Razor Qt 合并之后,变成了 LXQt。尽管最新的版本 15.04 依旧使用 LXDE,但之后的版本将会使用 LXQt。Lubuntu 对于老旧硬件来说是最合适不过的系统来。 + +## 为物联网 (IoT) 而生的发行版:Snappy Ubuntu Core + +![](http://www.linux.com/images/stories/66866/distro-ubuntu-studio.JPG) + +Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系统。该系统拥有巨大潜力,它可以将我们身边绝大多数的东西 —— 如路由器、咖啡机和玩具飞机等 —— 变成智能设备。让它更有趣的是,软件管理更新的方式以及添加安全性能的模块。 + +## 为桌面系统而生的发行版:Linux Mint Cinnamon + +[Linux Mint Cinnamon](http://www.linux.com/news/software/applications/838569-review-linux-mint-172-release/) 对于台式机和一些有强大硬件的笔记本来说是最好的操作系统。并且我会尽量把它叫做 Linux 世界里的 Mac OS X。老实说,由于 Cinnamon 的不稳定,我在很长一段时间内并不是 Linux Mint 的忠实粉丝。但是,在开发者使用 LTS (Long Term Support,长期支持)作为基础之后,该发行版就变得难以想象的稳定。因为开发者花费经历来跟上 Ubuntu 的开发进度,他们现在可以将所有精力放到把 Cinnamon 做的更好上边来了。 + +## 为游戏而生的发行版:Steam OS + +对于桌面版 Linux 来说,玩游戏同样是短板。很多用户为了能够玩游戏,安装了 Linux 和 Windows 双系统。而 Valve 则尝试改变这个局面。Valve 是一个游戏发行商,它提供一个可以跨平台运行游戏的客户端。并且,Valve 也同样创建来它自己的开源操作系统 —— [Steam OS](http://store.steampowered.com/steamos/) —— 为了创建一个基于 Linux 的游戏平台。截至 2015 年底,它的合作伙伴开始把搭载来 Steam OS 的机子推向市场。 + +## 为隐私而生的发行版:Tails + +在充斥着大量监控和营销者的跟踪 (为目标内容进行的匿名跟踪通常是可接受的),隐私就变成主要问题。如果你向脱离政府或者市场机构的监控和跟踪范围,那么你需要一款始终考虑到隐私问题的操作系统。 + +在出于保护隐私的考虑上,没有任何一款系统可以超越 [Tails](https://tails.boum.org/)。它以基于 Debian 的发行版,在设计之初就考虑了隐私和匿名的支持。Tails 非常优秀,而且据报道说,NSA 认为这是对他们的监控的主要威胁之一。 + +## 为多媒体制作而生的发行版:Ubuntu Studio + +基于 Linux 的操作系统有一个明显的弱点,那就是对多媒体制作的支持并不友好。所有在的专业级应用基本只能运行在 Windows 或者 Mac OS X 上。Linux 系统从来都不缺乏像样的音频/视频制作软件,但这样还是远远不够的。应该要有一款轻量级的桌面环境,使得那些宝贵的系统资源 —— 如 CPU 和 RAM —— 尽量少占用,以便用于多媒体制作。目前,[Ubuntu Studio](https://ubuntustudio.org/tour/) 对多媒体制作的支持最好。它使用了 Xfce 桌面环境,并且有应用广泛的音频、视频以及图像编辑应用。 + +## 最好的企业发行版:SLE/RHEL + +企业级用户并不会通过浏览想这样的文章来了解他们的服务器该运行什么发行版。他们通常非常明确该到哪里获取信息:即 [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux) 或 [SUSE Linux Enterprise](https://www.suse.com/)。这两个名字已经成了企业服务器的代名词了。同时,它们背后的公司也都通过创新来推动一切皆容器并且可以进行软件定义。 + +## 最好的服务器操作系统:Debian/CentOS + +假如你在考虑自己运行一台服务器,但有不希望支付 RHEL 或者 SLE 授权的费用,那么 [Debian](https://www.debian.org/) 或者 [CentOS](https://www.centos.org/) 将是你最好的选择。这两个发行版在社区发行版服务器操作系统有着不可动摇的位置。并且它们有着很长的支持期,从而你不必担忧需要经常去上级系统。 + +## 最好的移动操作系统:Plasma Mobile + +尽管,基于 Linux 的 Android 系统称雄于移动操作系统市场,但是大多数的开源社区 —— 也包括我在内 —— 也仍然强烈希望能有一个发行版能够为移动设备提供传统 Linux 的桌面应用。同时,这样的一个发行版由开源社区来维护会比由商业公司来维护好的多,只有这样用户群才能才能成为这个发行版的焦点,而不应该有公司的商业目标决定这个发行版的发展趋势。而 KDE 的 [Plasma Mobile](https://community.kde.org/Plasma/Mobile) 刚好实现来我们的愿望。 + +这个 基于 Kubuntu 的发行版始于 2015 年。因为 KDE 社区以坚守标准和为公众开发应用而闻名,我非常期待 Plasma Mobile 能够一直坚持下去。 + +## 为 ARM 设备而生的发行版:Arch Linux ARM + +随着 Android 系统的成功,我们的生活也围绕者越来越多的 ARM 设备 —— 从树梅派 (Raspberry Pi) 到 Chromebook 以及 Nvidia Shield。为 Intel/AMD 架构的 CPU 而编写的传统发行版并不能够在这些 ARM 架构的设备上运行。而一些为 ARM 而编写的发行版却仅仅只能在特定的硬件上运行,比如只能运行在树梅派 (Raspberry Pi) 上的 Raspbian 系统。[Arch Linux ARM](http://archlinuxarm.org/) (ALARM) 的闪光点在于:它是一个基于 Arch Linux 的纯社区支持的发行版,可以在树梅派 (Raspberry Pi)、Chromebook、Android 设备以及 Nvidia Shield 等设备上运行。同时,也由于有了 AUR,该发行版变得更加有趣,你可以安装很多在其他发行版可能无法获取的软件。 + +## 结论 + +在我写完本文的时候,连我自己都震惊了。能够在 Linux 的世界里为大家写点东西真的是很令人激动。不必去管 Linux 统治桌面电脑的时代是否会到来,我们都要一样享受自己使用 Linux 的每一刻快乐时光。 + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/878620-the-best-linux-distros-of-2016 + +作者:[Swapnil Bhartiya][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/61003 From 9870239927f18c8e36a0ef4fb5c8da4ad977268d Mon Sep 17 00:00:00 2001 From: GHLandy Date: Sun, 21 Feb 2016 00:34:51 +0800 Subject: [PATCH 1016/1710] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=8E=9F=E6=96=87=EF=BC=8C=E8=AF=91=E6=96=87=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E6=94=BE=E5=9C=A8=E5=AF=B9=E5=BA=94=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20160218 The Best Linux Distros of 2016.md | 120 ------------------ 1 file changed, 120 deletions(-) delete mode 100644 sources/tech/20160218 The Best Linux Distros of 2016.md diff --git a/sources/tech/20160218 The Best Linux Distros of 2016.md b/sources/tech/20160218 The Best Linux Distros of 2016.md deleted file mode 100644 index fa9a6b6ffa..0000000000 --- a/sources/tech/20160218 The Best Linux Distros of 2016.md +++ /dev/null @@ -1,120 +0,0 @@ -GHLandy Translating - -The Best Linux Distros of 2016 -================================ - -![](http://www.linux.com/images/stories/66866/distro-opensuse.JPG) - -2015 was a very important year for Linux, [both in the enterprise as well as in the consumer space](http://www.cio.com/article/3017983/linux/2015s-most-exciting-linux-devices.html). As a Linux user since 2005, I can see that the operating system has come a long way in the past 10 years. [And, 2016 is going to be even more exciting](http://www.cio.com/article/3017177/linux/11-predictions-for-linux-in-2016.html). In this article, I have picked some of the best distros that will shine in 2016. - -## Best Comeback Distro: openSUSE - -SUSE, the company behind openSUSE, is the oldest Linux company; [it was formed just a year after Linus Torvalds announced Linux](http://www.linux.com/news/software/applications/866964-exclusive-interview-with-suse-president-nils-brauckmann). The company actually predates Linux king Red Hat. SUSE is also the sponsor of the community-based distro [openSUSE](https://www.opensuse.org/). - -In 2015, openSUSE teams decided to come closer to SUSE Linux Enterprise (SLE) so that users could have a distribution that shares its DNA with the enterprise server -- similar to CentOS and Ubuntu. Thus, openSUSE became [openSUSE Leap](https://en.opensuse.org/Portal:Leap), a distribution that’s directly based on SLE SP (service pack) 1. - -The two distros will share the code base to benefit each other -- SUSE will take what’s good in openSUSE and vice versa. With this move, openSUSE is also ditching the regular release cycle, and a new version will be released in sync with SLE. That means each version will have a much longer life cycle. - -As a result of this move, openSUSE has become a very important distribution because potential SLE users can now use openSUSE Leap. That’s not all, however; openSUSE also announced the release of [Tumbleweed](http://www.cio.com/article/3008856/open-source-tools/is-opensuse-tumbleweed-good-enough-for-a-seasoned-arch-user.html), a pure rolling-release version. So, now, users can use either the super-stable openSUSE Leap or the always up-to-date openSUSE Tumbleweed. - -No other distro has made such an impressive comeback in my memory. - -Most Customizable Distro: Arch Linux - -Arch Linux is the best rolling-release distribution out there. Period. Ok, I could be biased because I am an Arch Linux user. However, the reason behind my claim is that Arch excels in many other areas, too, and that’s why I use it as my main operating system. - -[Arch Linux](https://www.archlinux.org/) is a great distro for those who want to learn everything about Linux. Because you have to install everything manually, you learn all the bits and pieces of a Linux-based operating system. - -- Arch is the most customizable distribution. There is no “Arch” flavor of any DE. All you get is a foundation and you can build whatever distro want, on top of it. For good or for worse, unlike openSUSE or Ubuntu there is no extra patching or integration. You get what upstream developers created. Period. - -- Arch Linux is also one of the best rolling releases. It’s always updated. Users always run the latest packages, and they can also run pre-released software through unstable repositories. - -- Arch is also known for having excellent documentation. Arch Wiki is my to-go resource for everything Linux related. - -- What I like the most about Arch is that is offers almost every package and software that’s available for “any” Linux distribution, thanks to the Arch User Repository, aka AUR. - -## Best-Looking Distro: elementary OS - -Different Linux distributions have different focus areas -- in most cases, these are technical differences. In many Linux distributions. the look and feel is an afterthought -- a side project at the mercy of the specific desktop environment. - -[elementary OS](https://elementary.io/) is trying to change all that. Here, design is at the forefront, and the reason is quite obvious. The distro is being developed by designers who have made their name in the Linux world by creating beautiful icons. - -elementary OS is quite strict about the holistic look and feel. The developers have created their own components, including the desktop environment. Additionally, they choose only those applications that fit into the design paradigm. One can find heavy influence of Mac OS X on elementary OS. - -## Best Newcomer: Solus - -![](http://www.linux.com/images/stories/66866/distro-solus.JPG) - -[Solus](https://solus-project.com/) operating system has garnered quite a lot of attention lately. It’s a decent-looking operating system that has been created from scratch. It’s not a derivative of Debian or Ubuntu. It comes with the Budgie desktop environment, which was built from scratch but aims to integrate with Gnome. Solus has the same minimalistic approach as Google’s Chrome OS. - -I have not played with Solus much, but it does look promising. Solus is actually not a “new” OS. It has been around for a while in different forms and names. But the entire project was revived back in 2015 under this new name. - -## Best Cloud OS: Chrome OS - -[Chrome OS](https://www.chromium.org/chromium-os) may not be your typical Linux-based distribution because it’s a browser-based operating system for online activities. However, because it’s based on Linux and its source code is available for anyone to compile, it’s an attractive OS. I use Chrome OS on a daily basis. It’s an excellent, maintenance-free, always updated OS for anyone using a computer purely for web-related activities. Chrome OS, along with Android, deserves all the credit for making Linux popular in the PC and mobile space. - -## Best Laptop OS: Ubuntu MATE - -Most laptops don’t have very high-end hardware, and if you are running a really resource-intensive desktop environment then you won’t have much system resources or battery life at your disposal -- they will be used by the OS itself. That’s where I found [Ubuntu MATE](http://www.cio.com/article/2848475/ubuntu-mate-enterprise-customers.html) to be an excellent operating system. It’s lightweight, yet has all the bells and whistles needed for a pleasant experience. Thanks to its lightweight design, the majority of system resources are free for applications so you can still do some heavy work on it. I also found it to be a great distro on really low-end systems. - -## Best Distro for Old Hardware: Lubuntu - -If you have an old laptop or PC sitting around, breathe new life into it with [Lubuntu](http://lubuntu.net/). Lubuntu uses LXDE, but the project has merged with Razor Qt to create LXQt. Although the latest release 15.04 is still using LXDE, the future versions will be using LXQt. Lubuntu is a decent operating system for old hardware. - -## Best Distro for IoT: Snappy Ubuntu Core - -![](http://www.linux.com/images/stories/66866/distro-ubuntu-studio.JPG) - -Snappy Ubuntu Core is the best Linux-based operating system out there for Internet of Things (IoT) and other such devices. The operating system holds great potential to turn almost everything around us into smart devices -- such as routers, coffeemakers, drones, etc. What makes it even more interesting is the way the software manages updates and offers containerization for added security. - -## Best Distro for Desktops: Linux Mint Cinnamon - -[Linux Mint Cinnamon](http://www.linux.com/news/software/applications/838569-review-linux-mint-172-release/) is the best operating system for desktops and powerful laptops. I will go as far as calling it the Mac OS X of the Linux world. Honestly, I had not been a huge fan of Linux Mint for a long time because of unstable Cinnamon. But, as soon as the developers chose to use LTS as the base, the distro has become incredibly stable. Because the developers don’t have to spend much time worrying about keeping up with Ubuntu, they are now investing all of their time in making Cinnamon better. - -## Best Distro for Games: Steam OS - -Gaming has been a weakness of desktop Linux. Many users dual-boot with Windows just to be able to play games. Valve Software is trying to change that. Valve is a game distributor that offers a client to run games on different platforms. And, Valve has now created their open operating system -- [Steam OS](http://store.steampowered.com/steamos/) -- to create a Linux-based gaming platform. By the end of 2015, partners started shipping Steam machines to the market. - -## Best Distro for Privacy: Tails - -In this age of mass surveillance and tracking by marketers (anonymous tracking for targeted content is acceptable), privacy has become a major issue. If you are someone who needs to keep the government and marketing agencies out of your business, you need an operating system that’s created -- from the ground up -- with privacy in mind. - -And, nothing beats [Tails](https://tails.boum.org/) for this purpose. It’s a Debian-based distribution that offers privacy and anonymity by design. Tails is so good that, according to reports, the NSA considers it a major threat to their mission. - -## Best Distro for Multimedia Production: Ubuntu Studio - -Multimedia production is one of the major weaknesses of Linux-based operating systems. All the professional-grade applications are available for either Windows or Mac OS X. There is no dearth of decent audio/video production software for Linux, but a multimedia production system needs more than just decent applications. It should use a lightweight desktop environment so that precious system resources -- such as CPU and RAM -- are used sparingly by the system itself, leaving them for the multimedia applications. And, the best Linux distribution for multimedia production is [Ubuntu Studio](https://ubuntustudio.org/tour/). It uses Xfce and comes with a broad range of audio, video, and image editing applications. - -## Best Enterprise Distro: SLE/RHEL - -Enterprise customers don’t look for articles like these to choose a distribution to run on their servers. They already know where to go: It’s either [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux) or [SUSE Linux Enterprise](https://www.suse.com/). These two names have become synonymous with enterprise servers. These companies are also pushing boundaries by innovating in this changing landscape where everything is containerized and becoming software defined. - -## Best Server OS: Debian/CentOS - -If you are looking at running a server, but you can’t afford or don’t want to pay a subscription fee for RHEL or SLE, then there is nothing better than [Debian](https://www.debian.org/) or [CentOS](https://www.centos.org/). These distributions are the gold standard when it comes to community-based servers. And, they are supported for a very long time, so you won’t have to worry about upgrading your system so often. - -## Best Mobile OS: Plasma Mobile - -Although the Linux-based distribution Android is ruling the roost, many in the open source community, including me, still desire a distribution that offers traditional Linux desktop apps on mobile devices. At the same time, it’s better if the distro is run by a community instead of a company so that a user remains in the focus and not the company’s financial goals. And that’s where KDE’s [Plasma Mobile](https://community.kde.org/Plasma/Mobile) brings some hope. - -This Kubuntu-based distribution was launched in 2015. Because the KDE community is known for their adherence to standards and developing stuff in public, I am quite excited about the future of Plasma Mobile. - -## Best Distro for ARM Devices: Arch Linux ARM - -With the success of Android, we are now surrounded by ARM-powered devices -- from Raspberry Pi to Chromebook and Nvidia Shield. The traditional distros written for Intel/AMD processors won’t run on these systems. Some distributions are aimed at ARM, but they are mostly for specific hardware only, such as Raspbian for Raspberry Pi. That’s where [Arch Linux ARM](http://archlinuxarm.org/) (ALARM) shines. It’s a purely community-based distribution that’s based on Arch Linux. You can run it on Raspberry Pi, Chromebooks, Android devices, Nvidia Shield, and what not. What makes this distribution even more interesting is that, thanks to the Arch User Repository (AUR), you can install many applications than you may not get on other distributions. - -## Conclusion - -I was astonished and amazed when I worked on this story. It’s very exciting to see that there is something for everyone in the Linux world. It doesn’t matter if the year of the desktop Linux never arrives. We are happy with our Linux moments! - ------------------------------------------------------------------------------- - -via: http://www.linux.com/news/software/applications/878620-the-best-linux-distros-of-2016 - -作者:[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 From 0bf780e222e649fe3b499313cc074850f07b57ab Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 21 Feb 2016 14:26:56 +0800 Subject: [PATCH 1017/1710] translating --- ...218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md index e3cc72cd8d..393ff4b878 100644 --- a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md +++ b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md @@ -1,3 +1,5 @@ +translating----geekpi + How to Set Nginx as Reverse Proxy on Centos7 CPanel ================================================================================ @@ -198,4 +200,4 @@ via: http://linoxide.com/linux-how-to/set-nginx-reverse-proxy-centos-7-cpanel/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/saheethas/ \ No newline at end of file +[a]:http://linoxide.com/author/saheethas/ From 60edea5ac41b7f818baa3ed4ce163a7bdee44171 Mon Sep 17 00:00:00 2001 From: mudongliang Date: Sun, 21 Feb 2016 14:30:16 +0800 Subject: [PATCH 1018/1710] Validation --- ...20160218 The Best Linux Distros of 2016.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/translated/tech/20160218 The Best Linux Distros of 2016.md b/translated/tech/20160218 The Best Linux Distros of 2016.md index b0f080a7b6..fdb7cd02b0 100644 --- a/translated/tech/20160218 The Best Linux Distros of 2016.md +++ b/translated/tech/20160218 The Best Linux Distros of 2016.md @@ -3,7 +3,7 @@ ![](http://www.linux.com/images/stories/66866/distro-opensuse.JPG) -[不管是在企业还是在消费者空间](http://www.cio.com/article/3017983/linux/2015s-most-exciting-linux-devices.html),2015 对于 Linux 来说都是极其重要的一年。作为一个从 2005 年就开始使用 Linux 的老用户,我有幸见证了这个 Linux 过去 10 里的重大发展。[并且,我相信它在 2016 年里会更加令人激动](http://www.cio.com/article/3017177/linux/11-predictions-for-linux-in-2016.html)。在这篇文章里,我会挑选几个将在 2016 年里大放光彩的最佳发行版来介绍个大家。 +[不管是在企业还是在消费者空间](http://www.cio.com/article/3017983/linux/2015s-most-exciting-linux-devices.html),2015 对于 Linux 来说都是极其重要的一年。作为一个从 2005 年就开始使用 Linux 的老用户,我有幸见证了 Linux 过去这 10 年里的重大发展,[并且,我相信它在 2016 年里会更加令人激动](http://www.cio.com/article/3017177/linux/11-predictions-for-linux-in-2016.html)。在这篇文章里,我会挑选几个将在 2016 年里大放光彩的最佳发行版给大家介绍一下。 ## 最易回归的发行版:openSUSE @@ -23,13 +23,13 @@ Arch Linux 是目前最好的滚动式更新的发行版。好吧,我可能有 - 对于那些想要学习 Linux 方方面面的用户来说,[Arch Linux](https://www.archlinux.org/) 无疑是一个绝佳的选择。因为你需要手动安装所有自己需要的东西,这样你会慢慢学到 Linux 系统的所有细节。 -- Arch 是一个可高度定制发行版。任何桌面环境 (DE) 都没有了 “Arch” 的原味。你能够得到的只是一个基础系统,然后你可以在上边构建你所想要的发行版。无论好坏,也不想 openSUSE 或者 Ubuntu 那样,Arch 没有额外的补丁或者集成环境。你得到的基本就是上游开发者所创建的原始软件。 +- Arch 是一个可高度定制发行版。任何桌面环境 (DE) 都没有了 “Arch” 的原味。你能够得到的只是一个基础系统,然后你可以在上边构建你所想要的发行版。无论好坏,也不像 openSUSE 或者 Ubuntu 那样,Arch 没有额外的补丁或者集成环境。你得到的基本就是上游开发者所创建的原始软件。 - Arch Linux 同时也是最好的滚动式更新的发行版之一。它需要经常保持着更新。用户所运行的基本上是最新的软件,当然,也可以通过非稳定仓库运行预发行版的软件。 - Arch 闻名于拥有为数众多的优秀文档。Arch Wiki 是我用以了解所有 Linux 相关事情的外带资源。 -- Arch 中,我最喜欢的是,它提供了“任何” 其他发行版中可用的的包和软件,同时还要感谢 AUR (Arch User Repository,Arch 用户仓库)。 +- Arch 中,我最喜欢的是,它提供了“任何”其他发行版中可用的的包和软件,同时还要感谢 AUR (Arch User Repository,Arch 用户仓库)。 ## 最美观的发行版:elementary OS @@ -45,11 +45,11 @@ elementary OS 相当注重整体外观和用户感觉。开发者创建了他们 [Solus](https://solus-project.com/) 最近获得非常大的关注程度。它是一个外观还可以、从零开始构建的操作系统,而并非 Debian 或者 Ubuntu 的衍生版本。它使用的 Budgie 桌面环境同样是从零开始构建的,但它的目标是兼容 Gnome。Solus 和 Google 的 Chrome OS 一样 —— 一切从简。 -我个人没怎么玩过 Solus,但它看起来很有前途。Solus 实际上并不是一个 “新” 系统。它曾以不同的形式和名称存在来很长时间,但直到 2015 年整个项目才现在这个新名称重归大众视野。 +我个人没怎么玩过 Solus,但它看起来很有前途。Solus 实际上并不是一个 “新” 系统。它曾以不同的形式和名称存在了很长时间,但直到 2015 年整个项目才以现在这个新名称重归大众视野。 ## 最好的云操作系统:Chrome OS -[Chrome OS](https://www.chromium.org/chromium-os) 可能不会成为你的典型 Linux 发行版,毕竟它是基于浏览器的操作系统,主要用以在线活动。但由于基于 Linux 以及任何可以获取其源码进行编译,它同样是一个吸引人的系统。同时我也每天使用 Chrome OS,它是一个优秀、不用自己维护并且总是最新状态的系统,每个人都可以单纯用它来进行 web 相关的活动。Chrome OS 和 Android 对于推动 Linux 在 PC 市场和移动市场的占有率有着不可或缺的功劳。 +[Chrome OS](https://www.chromium.org/chromium-os) 可能不会成为你的典型 Linux 发行版,毕竟它是基于浏览器的操作系统,主要用以在线活动。但由于它基于 Linux 以及任何人都可以获取其源码进行编译,它同样是一个吸引人的系统。同时我也每天使用 Chrome OS,它是一个优秀、不用自己维护并且总是最新状态的系统,每个人都可以单纯用它来进行 web 相关的活动。Chrome OS 和 Android 对于推动 Linux 在 PC 市场和移动市场的占有率有着不可或缺的功劳。 ## 最好的笔记本操作系统:Ubuntu MATE @@ -57,7 +57,7 @@ elementary OS 相当注重整体外观和用户感觉。开发者创建了他们 ## 为老旧硬件支持而生的发行版:Lubuntu -假如你身边拥有一些过时的笔记本或 PC,给它安装 [Lubuntu](http://lubuntu.net/) 来获得重生吧。Lubuntu 使用的是 LXDE 桌面环境,但该项目与 Razor Qt 合并之后,变成了 LXQt。尽管最新的版本 15.04 依旧使用 LXDE,但之后的版本将会使用 LXQt。Lubuntu 对于老旧硬件来说是最合适不过的系统来。 +假如你身边拥有一些过时的笔记本或 PC,给它安装 [Lubuntu](http://lubuntu.net/) 来获得重生吧。Lubuntu 使用的是 LXDE 桌面环境,但该项目与 Razor Qt 合并之后,变成了 LXQt。尽管最新的版本 15.04 依旧使用 LXDE,但之后的版本将会使用 LXQt。Lubuntu 对于老旧硬件来说是最合适不过的系统了。 ## 为物联网 (IoT) 而生的发行版:Snappy Ubuntu Core @@ -67,39 +67,39 @@ Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系 ## 为桌面系统而生的发行版:Linux Mint Cinnamon -[Linux Mint Cinnamon](http://www.linux.com/news/software/applications/838569-review-linux-mint-172-release/) 对于台式机和一些有强大硬件的笔记本来说是最好的操作系统。并且我会尽量把它叫做 Linux 世界里的 Mac OS X。老实说,由于 Cinnamon 的不稳定,我在很长一段时间内并不是 Linux Mint 的忠实粉丝。但是,在开发者使用 LTS (Long Term Support,长期支持)作为基础之后,该发行版就变得难以想象的稳定。因为开发者花费经历来跟上 Ubuntu 的开发进度,他们现在可以将所有精力放到把 Cinnamon 做的更好上边来了。 +[Linux Mint Cinnamon](http://www.linux.com/news/software/applications/838569-review-linux-mint-172-release/) 对于台式机和一些有强大硬件的笔记本来说是最好的操作系统。我会尽量把它叫做 Linux 世界里的 Mac OS X。老实说,由于 Cinnamon 的不稳定,我在很长一段时间内并不是 Linux Mint 的忠实粉丝。但是,在开发者使用 LTS (Long Term Support,长期支持)作为基础之后,该发行版就变得难以想象的稳定。因为开发者不必花费经历来跟上 Ubuntu 的开发进度,他们现在可以将所有精力放到提升 Cinnamon 上。 ## 为游戏而生的发行版:Steam OS -对于桌面版 Linux 来说,玩游戏同样是短板。很多用户为了能够玩游戏,安装了 Linux 和 Windows 双系统。而 Valve 则尝试改变这个局面。Valve 是一个游戏发行商,它提供一个可以跨平台运行游戏的客户端。并且,Valve 也同样创建来它自己的开源操作系统 —— [Steam OS](http://store.steampowered.com/steamos/) —— 为了创建一个基于 Linux 的游戏平台。截至 2015 年底,它的合作伙伴开始把搭载来 Steam OS 的机子推向市场。 +对于桌面版 Linux 来说,玩游戏同样是短板。很多用户为了能够玩游戏,安装了 Linux 和 Windows 双系统。而 Valve 则尝试改变这个局面。Valve 是一个游戏发行商,它提供一个可以跨平台运行游戏的客户端。并且,Valve 也同样创建了它自己的开源操作系统 —— [Steam OS](http://store.steampowered.com/steamos/) —— 为了创建一个基于 Linux 的游戏平台。截至 2015 年底,它的合作伙伴开始把搭载了 Steam OS 的机器推向市场。 ## 为隐私而生的发行版:Tails -在充斥着大量监控和营销者的跟踪 (为目标内容进行的匿名跟踪通常是可接受的),隐私就变成主要问题。如果你向脱离政府或者市场机构的监控和跟踪范围,那么你需要一款始终考虑到隐私问题的操作系统。 +在充斥着大量监控和营销者的跟踪 (为目标内容进行的匿名跟踪通常是可接受的)的岁月,隐私就变成主要问题。如果你想脱离政府或者市场机构的监控和跟踪范围,那么你需要一款始终考虑到隐私问题的操作系统。 -在出于保护隐私的考虑上,没有任何一款系统可以超越 [Tails](https://tails.boum.org/)。它以基于 Debian 的发行版,在设计之初就考虑了隐私和匿名的支持。Tails 非常优秀,而且据报道说,NSA 认为这是对他们的监控的主要威胁之一。 +在出于保护隐私的考虑上,没有任何一款系统可以超越 [Tails](https://tails.boum.org/)。它是一款基于 Debian 的发行版,并且在设计之初就考虑了隐私和匿名的支持。Tails 非常优秀,而且据报道说,NSA 认为这是对他们的监控的主要威胁之一。 ## 为多媒体制作而生的发行版:Ubuntu Studio -基于 Linux 的操作系统有一个明显的弱点,那就是对多媒体制作的支持并不友好。所有在的专业级应用基本只能运行在 Windows 或者 Mac OS X 上。Linux 系统从来都不缺乏像样的音频/视频制作软件,但这样还是远远不够的。应该要有一款轻量级的桌面环境,使得那些宝贵的系统资源 —— 如 CPU 和 RAM —— 尽量少占用,以便用于多媒体制作。目前,[Ubuntu Studio](https://ubuntustudio.org/tour/) 对多媒体制作的支持最好。它使用了 Xfce 桌面环境,并且有应用广泛的音频、视频以及图像编辑应用。 +基于 Linux 的操作系统有一个明显的弱点,那就是对多媒体制作的支持并不友好。所有专业级应用基本只能运行在 Windows 或者 Mac OS X 上。Linux 系统从来都不缺乏像样的音频/视频制作软件,但这样还是远远不够的。应该要有一款轻量级的桌面环境,使得那些宝贵的系统资源 —— 如 CPU 和 RAM —— 尽量少占用,以便用于多媒体制作。目前,[Ubuntu Studio](https://ubuntustudio.org/tour/) 对多媒体制作的支持最好。它使用了 Xfce 桌面环境,并且有各种各样的音频、视频以及图像编辑应用。 ## 最好的企业发行版:SLE/RHEL -企业级用户并不会通过浏览想这样的文章来了解他们的服务器该运行什么发行版。他们通常非常明确该到哪里获取信息:即 [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux) 或 [SUSE Linux Enterprise](https://www.suse.com/)。这两个名字已经成了企业服务器的代名词了。同时,它们背后的公司也都通过创新来推动一切皆容器并且可以进行软件定义。 +企业级用户并不会通过浏览像这样的文章来了解他们的服务器该运行什么发行版。他们通常非常明确该到哪里获取信息:即 [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux) 或 [SUSE Linux Enterprise](https://www.suse.com/)。这两个名字已经成了企业服务器的代名词了。同时,它们背后的公司也都通过创新来推动一切皆容器并且可以进行软件定义。 ## 最好的服务器操作系统:Debian/CentOS -假如你在考虑自己运行一台服务器,但有不希望支付 RHEL 或者 SLE 授权的费用,那么 [Debian](https://www.debian.org/) 或者 [CentOS](https://www.centos.org/) 将是你最好的选择。这两个发行版在社区发行版服务器操作系统有着不可动摇的位置。并且它们有着很长的支持期,从而你不必担忧需要经常去上级系统。 +假如你在考虑自己运行一台服务器,但有不希望支付 RHEL 或者 SLE 授权的费用,那么 [Debian](https://www.debian.org/) 或者 [CentOS](https://www.centos.org/) 将是你最好的选择。这两个发行版在社区发行版服务器操作系统有着不可动摇的地位。并且它们有着长期支持,你不必担忧需要经常去升级系统。 ## 最好的移动操作系统:Plasma Mobile -尽管,基于 Linux 的 Android 系统称雄于移动操作系统市场,但是大多数的开源社区 —— 也包括我在内 —— 也仍然强烈希望能有一个发行版能够为移动设备提供传统 Linux 的桌面应用。同时,这样的一个发行版由开源社区来维护会比由商业公司来维护好的多,只有这样用户群才能才能成为这个发行版的焦点,而不应该有公司的商业目标决定这个发行版的发展趋势。而 KDE 的 [Plasma Mobile](https://community.kde.org/Plasma/Mobile) 刚好实现来我们的愿望。 +尽管,基于 Linux 的 Android 系统称雄于移动操作系统市场,但是大多数的开源社区 —— 也包括我在内 —— 也仍然强烈希望能有一个发行版能够为移动设备提供传统 Linux 的桌面应用。同时,这样的一个发行版由开源社区来维护会比由商业公司来维护好的多,只有这样用户群才能成为这个发行版的焦点,而不应该由公司的商业目标来决定这个发行版的发展趋势。而 KDE 的 [Plasma Mobile](https://community.kde.org/Plasma/Mobile) 刚好实现了我们的愿望。 -这个 基于 Kubuntu 的发行版始于 2015 年。因为 KDE 社区以坚守标准和为公众开发应用而闻名,我非常期待 Plasma Mobile 能够一直坚持下去。 +这个基于 Kubuntu 的发行版始于 2015 年。因为 KDE 社区以坚守标准和为公众开发应用而闻名,我非常期待 Plasma Mobile 能够一直坚持下去。 ## 为 ARM 设备而生的发行版:Arch Linux ARM -随着 Android 系统的成功,我们的生活也围绕者越来越多的 ARM 设备 —— 从树梅派 (Raspberry Pi) 到 Chromebook 以及 Nvidia Shield。为 Intel/AMD 架构的 CPU 而编写的传统发行版并不能够在这些 ARM 架构的设备上运行。而一些为 ARM 而编写的发行版却仅仅只能在特定的硬件上运行,比如只能运行在树梅派 (Raspberry Pi) 上的 Raspbian 系统。[Arch Linux ARM](http://archlinuxarm.org/) (ALARM) 的闪光点在于:它是一个基于 Arch Linux 的纯社区支持的发行版,可以在树梅派 (Raspberry Pi)、Chromebook、Android 设备以及 Nvidia Shield 等设备上运行。同时,也由于有了 AUR,该发行版变得更加有趣,你可以安装很多在其他发行版可能无法获取的软件。 +随着 Android 系统的成功,我们的生活也围绕者越来越多的 ARM 设备 —— 从树莓派 (Raspberry Pi) 到 Chromebook 以及 Nvidia Shield。为 Intel/AMD 架构的 CPU 而编写的传统发行版并不能够在这些 ARM 架构的设备上运行。而一些为 ARM 而编写的发行版却仅仅只能在特定的硬件上运行,比如只能运行在树莓派 (Raspberry Pi) 上的 Raspbian 系统。这就是 [Arch Linux ARM](http://archlinuxarm.org/) (ALARM) 的闪光点所在。它是一个基于 Arch Linux 的纯社区支持的发行版,可以在树梅派 (Raspberry Pi)、Chromebook、Android 设备以及 Nvidia Shield 等设备上运行。同时,也由于 AUR,该发行版变得更加有趣,你可以安装很多在其他发行版可能无法获取的软件。 ## 结论 @@ -111,7 +111,7 @@ via: http://www.linux.com/news/software/applications/878620-the-best-linux-distr 作者:[Swapnil Bhartiya][a] 译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[mudongliang](https://github.com/mudongliang) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 4ffed9195b05f144b681d003f4b2d193ac0d576b Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 21 Feb 2016 14:48:14 +0800 Subject: [PATCH 1019/1710] PUB:20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast @oska874 @YuKing-net @locez --- ...218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md index df872dd49e..9eb9e779b9 100644 --- a/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md +++ b/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md @@ -13,7 +13,7 @@ Canonical 宣称 Pro 5 是目前已发布了的 Ubuntu 智能手机中最强大的一个,他们说的是对的,但还有一点没有被提及,即如果不考虑平板,它也是最大的 Ubuntu Touch 设备。魅族 Pro 5 采用了一颗 Exynos 7420 8 核处理器和 5.7 英寸分辨率为 1920x1080 的 AMOLED 屏,配备第三代康宁大猩猩玻璃以及 LPDDR4 内存技术。 -很多人也许会问这个新手机的系统是否可以和桌面版系统一样,现在看起来用户是运气不错。 +很多人也许会问这个新手机的系统是否可以和桌面版系统一样,现在看起来真是如此。 该公司解释说,“Canonical 一直致力于通过向各种个人设备提供一个统一的自适应平台来重塑个人计算的视觉表现。因此尽管魅族 Pro 5 缺少 MHL 输出,但它运行的是最新的代码,这些代码与新近发布的平板和其它设备一样,可提供一种接近传统桌面的体验。” From dd6751d7e7254673b2e51aa8a6f3cb847f0039ce Mon Sep 17 00:00:00 2001 From: mudongliang Date: Sun, 21 Feb 2016 15:04:15 +0800 Subject: [PATCH 1020/1710] Translating --- .../tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md b/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md index 2ef5effbb7..6846dbf49d 100644 --- a/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md +++ b/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md @@ -1,3 +1,5 @@ +mudongliang + Linux Mint 18 Will Get Its Own Set Of Apps ============================================= From 329cff65e44a490cdd9004dc1932cb1665b9cc98 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 21 Feb 2016 15:06:23 +0800 Subject: [PATCH 1021/1710] =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=8E=92=E7=89=88?= =?UTF-8?q?=E6=8C=87=E5=8C=97=EF=BC=88=E7=AE=80=E4=BD=93=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chinese-copywriting-guidelines.md | 301 ------------------------------ 中文排版指北.md | 300 +++++++++++++++++++++++++++++ 2 files changed, 300 insertions(+), 301 deletions(-) delete mode 100644 chinese-copywriting-guidelines.md create mode 100644 中文排版指北.md diff --git a/chinese-copywriting-guidelines.md b/chinese-copywriting-guidelines.md deleted file mode 100644 index c2d0d207bd..0000000000 --- a/chinese-copywriting-guidelines.md +++ /dev/null @@ -1,301 +0,0 @@ -# 中文文案排版指北 -[![devDependency Status](https://david-dm.org/sparanoid/chinese-copywriting-guidelines/dev-status.svg)](https://david-dm.org/sparanoid/chinese-copywriting-guidelines#info=devDependencies) -[![Built with Almace Scaffolding](https://d349cztnlupsuf.cloudfront.net/amsf-badge.svg)](http://sparanoid.com/note/chinese-copywriting-guidelines/) - -統一中文文案、排版的相關用法,降低團隊成員之間的溝通成本,增強網站氣質。 - -Other languages: - -- [English](README.en.md) -- [Chinese Traditional](README.md) -- [Chinese Simplifed](https://github.com/mzlogin/chinese-copywriting-guidelines) - ------ - -## 目次 - -- [空格](#空格) - - [中英文之間需要增加空格](#中英文之間需要增加空格) - - [中文與數字之間需要增加空格](#中文與數字之間需要增加空格) - - [數字與單位之間需要增加空格](#數字與單位之間需要增加空格) - - [全形標點與其他字符之間不加空格](#全形標點與其他字符之間不加空格) - - [`-ms-text-autospace` to the rescue?](#-ms-text-autospace-to-the-rescue) -- [標點符號](#標點符號) - - [不重複使用標點符號](#不重複使用標點符號) -- [全形和半形](#全形和半形) - - [使用全形中文標點](#使用全形中文標點) - - [數字使用半形字符](#數字使用半形字符) - - [遇到完整的英文整句、特殊名詞,其內容使用半形標點](#遇到完整的英文整句特殊名詞其內容使用半形標點) -- [名詞](#名詞) - - [專有名詞使用正確的大小寫](#專有名詞使用正確的大小寫) - - [不要使用不地道的縮寫](#不要使用不地道的縮寫) -- [爭議](#爭議) - - [鏈接之間增加空格](#鏈接之間增加空格) - - [簡體中文使用直角引號](#簡體中文使用直角引號) -- [工具](#工具) -- [誰在這樣做?](#誰在這樣做) -- [參考文獻](#參考文獻) - -## 空格 - -「有研究顯示,打字的時候不喜歡在中文和英文之間加空格的人,感情路都走得很辛苦,有七成的比例會在 34 歲的時候跟自己不愛的人結婚,而其餘三成的人最後只能把遺產留給自己的貓。畢竟愛情跟書寫都需要適時地留白。 - -與大家共勉之。」——[vinta/paranoid-auto-spacing](https://github.com/vinta/pangu.js) - -### 中英文之間需要增加空格 - -正確: - -> 在 LeanCloud 上,數據存儲是圍繞 `AVObject` 進行的。 - -錯誤: - -> 在LeanCloud上,數據存儲是圍繞`AVObject`進行的。 - -> 在 LeanCloud上,數據存儲是圍繞`AVObject` 進行的。 - -完整的正確用法: - -> 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。每个 `AVObject` 都包含了与 JSON 兼容的 key-value 对应的数据。数据是 schema-free 的,你不需要在每个 `AVObject` 上提前指定存在哪些键,只要直接设定对应的 key-value 即可。 - -例外:「豆瓣FM」等產品名詞,按照官方所定義的格式書寫。 - -### 中文與數字之間需要增加空格 - -正確: - -> 今天出去買菜花了 5000 元。 - -錯誤: - -> 今天出去買菜花了 5000元。 - -> 今天出去買菜花了5000元。 - -### 數字與單位之間需要增加空格 - -正確: - -> 我家的光纖入屋寬頻有 10 Gbps,SSD 一共有 20 TB。 - -錯誤: - -> 我家的光纖入屋寬頻有 10Gbps,SSD 一共有 20TB。 - -例外:度/百分比與數字之間不需要增加空格: - -正確: - -> 今天是 233° 的高溫。 - -> 新 MacBook Pro 有 15% 的 CPU 性能提升。 - -錯誤: - -> 今天是 233 ° 的高溫。 - -> 新 MacBook Pro 有 15 % 的 CPU 性能提升。 - -### 全形標點與其他字符之間不加空格 - -正確: - -> 剛剛買了一部 iPhone,好開心! - -錯誤: - -> 剛剛買了一部 iPhone ,好開心! - -### `-ms-text-autospace` to the rescue? - -Microsoft 有個 [`-ms-text-autospace`](http://msdn.microsoft.com/en-us/library/ie/ms531164(v=vs.85).aspx) 的 CSS 屬性可以實現自動為中英文之間增加空白。不過目前並未普及,另外在其他應用場景,例如 OS X、iOS 的用戶介面目前并不存在這個特性,所以請繼續保持隨手加空格的習慣。 - -## 標點符號 - -### 不重複使用標點符號 - -正確: - -> 德國隊竟然戰勝了巴西隊! - -> 她竟然對你說「喵」?! - -錯誤: - -> 德國隊竟然戰勝了巴西隊!! - -> 德國隊竟然戰勝了巴西隊!!!!!!!! - -> 她竟然對你說「喵」??!! - -> 她竟然對你說「喵」?!?!??!! - -## 全形和半形 - -不明白什麼是全形(全角)與半形(半角)符號?請查看維基百科詞條『[全形和半形](http://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2)』。 - -### 使用全形中文標點 - -正確: - -> 嗨!你知道嘛?今天前台的小妹跟我說「喵」了哎! - -> 核磁共振成像(NMRI)是什麼原理都不知道?JFGI! - -錯誤: - -> 嗨! 你知道嘛? 今天前台的小妹跟我說 "喵" 了哎! - -> 嗨!你知道嘛?今天前台的小妹跟我說"喵"了哎! - -> 核磁共振成像 (NMRI) 是什麼原理都不知道? JFGI! - -> 核磁共振成像(NMRI)是什麼原理都不知道?JFGI! - -### 數字使用半形字符 - -正確: - -> 這件蛋糕只賣 1000 元。 - -錯誤: - -> 這件蛋糕只賣 1000 元。 - -例外:在設計稿、宣傳海報中如出現極少量數字的情形時,為方便文字對齊,是可以使用全形數字的。 - -### 遇到完整的英文整句、特殊名詞,其內容使用半形標點 - -正確: - -> 賈伯斯那句話是怎麼說的?「Stay hungry, stay foolish.」 - -> 推薦你閱讀《Hackers & Painters: Big Ideas from the Computer Age》,非常的有趣。 - -錯誤: - -> 賈伯斯那句話是怎麼說的?「Stay hungry,stay foolish。」 - -> 推薦你閱讀《Hackers&Painters:Big Ideas from the Computer Age》,非常的有趣。 - -## 名詞 - -### 專有名詞使用正確的大小寫 - -大小寫相關用法原屬於英文書寫範疇,不屬於本 wiki 討論內容,在這裡只對部分易錯用法進行簡述。 - -正確: - -> 使用 GitHub 登錄 - -> 我們的客戶有 GitHub、Foursquare、Microsoft Corporation、Google、Facebook, Inc.。 - -錯誤: - -> 使用 github 登錄 - -> 使用 GITHUB 登錄 - -> 使用 Github 登錄 - -> 使用 gitHub 登錄 - -> 使用 gイんĤЦ8 登錄 - -> 我們的客戶有 github、foursquare、microsoft corporation、google、facebook, inc.。 - -> 我們的客戶有 GITHUB、FOURSQUARE、MICROSOFT CORPORATION、GOOGLE、FACEBOOK, INC.。 - -> 我們的客戶有 Github、FourSquare、MicroSoft Corporation、Google、FaceBook, Inc.。 - -> 我們的客戶有 gitHub、fourSquare、microSoft Corporation、google、faceBook, Inc.。 - -> 我們的客戶有 gイんĤЦ8、キouЯƧquムгє、๓เςг๏ร๏Ŧt ς๏гק๏гคtเ๏ภn、900913、ƒ4ᄃëв๏๏к, IПᄃ.。 - -注意:當網頁中需要配合整體視覺風格而出現全部大寫/小寫的情形,HTML 中請使用標準的大小寫規範進行書寫;並通過 `text-transform: uppercase;`/`text-transform: lowercase;` 對表現形式進行定義。 - -### 不要使用不地道的縮寫 - -正確: - -> 我們需要一位熟悉 JavaScript、HTML5,至少理解一种框架(如 Backbone.js、AngularJS、React 等)的前端開發者。 - -錯誤: - -> 我們需要一位熟悉 Js、h5,至少理解一种框架(如 backbone、angular、RJS 等)的 FED。 - -## 爭議 - -以下用法略帶有個人色彩,既:無論是否遵循下述規則,從語法的角度來講都是**正確**的。 - -### 鏈接之間增加空格 - -用法: - -> 请 [提交一个 issue](#) 并分配给相关同事。 - -> 訪問我們網站的最新動態,請 [點擊這裡](#) 進行訂閱! - -對比用法: - -> 请[提交一个 issue](#) 并分配给相关同事。 - -> 訪問我們網站的最新動態,請[點擊這裡](#)進行訂閱! - -### 簡體中文使用直角引號 - -用法: - -> 「老师,『有条不紊』的『紊』是什么意思?」 - -對比用法: - -> “老师,‘有条不紊’的‘紊’是什么意思?” - -## 工具 - -倉庫 | 語言 ---- | --- -[vinta/paranoid-auto-spacing](https://github.com/vinta/paranoid-auto-spacing) | JavaScript -[huei90/pangu.node](https://github.com/huei90/pangu.node) | Node.js -[huacnlee/auto-correct](https://github.com/huacnlee/auto-correct) | Ruby -[sparanoid/space-lover](https://github.com/sparanoid/space-lover) | PHP (WordPress) -[nauxliu/auto-correct](https://github.com/NauxLiu/auto-correct) | PHP -[hotoo/pangu.vim](https://github.com/hotoo/pangu.vim) | Vim -[sparanoid/grunt-auto-spacing](https://github.com/sparanoid/grunt-auto-spacing) | Node.js (Grunt) -[hjiang/scripts/add-space-between-latin-and-cjk](https://github.com/hjiang/scripts/blob/master/add-space-between-latin-and-cjk) | Python - -## 誰在這樣做? - -網站 | 文案 | UGC ---- | --- | --- -[Apple 中國](http://www.apple.com/cn/) | Yes | N/A -[Apple 香港](http://www.apple.com/hk/) | Yes | N/A -[Apple 台灣](http://www.apple.com/tw/) | Yes | N/A -[Microsoft 中國](http://www.microsoft.com/zh-cn/) | Yes | N/A -[Microsoft 香港](http://www.microsoft.com/zh-hk/) | Yes | N/A -[Microsoft 台灣](http://www.microsoft.com/zh-tw/) | Yes | N/A -[LeanCloud](https://leancloud.cn/) | Yes | N/A -[知乎](https://www.zhihu.com/) | Yes | 部分用戶達成 -[V2EX](https://www.v2ex.com/) | Yes | Yes -[SegmentFault](https://segmentfault.com/) | Yes | 部分用戶達成 -[Apple4us](http://apple4us.com/) | Yes | N/A -[豌豆荚](https://www.wandoujia.com/) | Yes | N/A -[Ruby China](https://ruby-china.org/) | Yes | 標題達成 -[PHPHub](https://phphub.org/) | Yes | 標題達成 - -## 參考文獻 - -- [Guidelines for Using Capital Letters - About.com](http://grammar.about.com/od/punctuationandmechanics/a/Guidelines-For-Using-Capital-Letters.htm) -- [Letter case - Wikipedia](http://en.wikipedia.org/wiki/Letter_case) -- [Punctuation - Oxford Dictionaries](http://www.oxforddictionaries.com/words/punctuation) -- [Punctuation - The Purdue OWL](https://owl.english.purdue.edu/owl/section/1/6/) -- [How to Use English Punctuation Correctly - wikiHow](http://www.wikihow.com/Use-English-Punctuation-Correctly) -- [格式 - openSUSE](https://zh.opensuse.org/index.php?title=Help:%E6%A0%BC%E5%BC%8F) -- [全形和半形 - 維基百科](http://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2) -- [引號 - 維基百科](http://zh.wikipedia.org/wiki/%E5%BC%95%E8%99%9F) -- [疑問驚嘆號 - 維基百科](http://zh.wikipedia.org/wiki/%E7%96%91%E5%95%8F%E9%A9%9A%E5%98%86%E8%99%9F) - -## CopyRight - -[中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines) diff --git a/中文排版指北.md b/中文排版指北.md new file mode 100644 index 0000000000..8f54947f8f --- /dev/null +++ b/中文排版指北.md @@ -0,0 +1,300 @@ +# 中文文案排版指北 +[![devDependency Status](https://david-dm.org/mzlogin/chinese-copywriting-guidelines/dev-status.svg)](https://david-dm.org/mzlogin/chinese-copywriting-guidelines#info=devDependencies) + +统一中文文案、排版的相关用法,降低团队成员之间的沟通成本,增强网站气质。 + +Other languages: + +- [English](https://github.com/mzlogin/chinese-copywriting-guidelines/blob/Simplified/README.en.md) +- [Chinese Traditional](https://github.com/sparanoid/chinese-copywriting-guidelines) +- [Chinese Simplified](README.md) + +----- + +## 目录 + +- [空格](#空格) + - [中英文之间需要增加空格](#中英文之间需要增加空格) + - [中文与数字之间需要增加空格](#中文与数字之间需要增加空格) + - [数字与单位之间需要增加空格](#数字与单位之间需要增加空格) + - [全角标点与其他字符之间不加空格](#全角标点与其他字符之间不加空格) + - [`-ms-text-autospace` to the rescue?](#-ms-text-autospace-to-the-rescue) +- [标点符号](#标点符号) + - [不重复使用标点符号](#不重复使用标点符号) +- [全角和半角](#全角和半角) + - [使用全角中文标点](#使用全角中文标点) + - [数字使用半角字符](#数字使用半角字符) + - [遇到完整的英文整句、特殊名词,其內容使用半角标点](#遇到完整的英文整句特殊名词其內容使用半角标点) +- [名词](#名词) + - [专有名词使用正确的大小写](#专有名词使用正确的大小写) + - [不要使用不地道的缩写](#不要使用不地道的缩写) +- [争议](#争议) + - [链接之间增加空格](#链接之间增加空格) + - [简体中文使用直角引号](#简体中文使用直角引号) +- [工具](#工具) +- [谁在这样做?](#谁在这样做) +- [参考文献](#参考文献) + +## 空格 + +「有研究显示,打字的时候不喜欢在中文和英文之间加空格的人,感情路都走得很辛苦,有七成的比例会在 34 岁的时候跟自己不爱的人结婚,而其余三成的人最后只能把遗产留给自己的猫。毕竟爱情跟书写都需要适时地留白。 + +与大家共勉之。」——[vinta/paranoid-auto-spacing](https://github.com/vinta/pangu.js) + +### 中英文之间需要增加空格 + +正确: + +> 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。 + +错误: + +> 在LeanCloud上,数据存储是围绕`AVObject`进行的。 + +> 在 LeanCloud上,数据存储是围绕`AVObject` 进行的。 + +完整的正确用法: + +> 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。每个 `AVObject` 都包含了与 JSON 兼容的 key-value 对应的数据。数据是 schema-free 的,你不需要在每个 `AVObject` 上提前指定存在哪些键,只要直接设定对应的 key-value 即可。 + +例外:「豆瓣FM」等产品名词,按照官方所定义的格式书写。 + +### 中文与数字之间需要增加空格 + +正确: + +> 今天出去买菜花了 5000 元。 + +错误: + +> 今天出去买菜花了 5000元。 + +> 今天出去买菜花了5000元。 + +### 数字与单位之间需要增加空格 + +正确: + +> 我家的光纤入户宽带有 10 Gbps,SSD 一共有 20 TB。 + +错误: + +> 我家的光纤入户宽带有 10Gbps,SSD 一共有 10TB。 + +例外:度/百分比与数字之间不需要增加空格: + +正确: + +> 今天是 233° 的高温。 + +> 新 MacBook Pro 有 15% 的 CPU 性能提升。 + +错误: + +> 今天是 233 ° 的高温。 + +> 新 MacBook Pro 有 15 % 的 CPU 性能提升。 + +### 全角标点与其他字符之间不加空格 + +正确: + +> 刚刚买了一部 iPhone,好开心! + +错误: + +> 刚刚买了一部 iPhone ,好开心! + +### `-ms-text-autospace` to the rescue? + +Microsoft 有个 [`-ms-text-autospace`](http://msdn.microsoft.com/en-us/library/ie/ms531164(v=vs.85).aspx) 的 CSS 属性可以实现自动为中英文之间增加空白。不过目前并未普及,另外在其他应用场景,例如 OS X、iOS 的用户界面目前并不存在这个特性,所以请继续保持随手加空格的习惯。 + +## 标点符号 + +### 不重复使用标点符号 + +正确: + +> 德国队竟然战胜了巴西队! + +> 她竟然对你说「喵」?! + +错误: + +> 德国队竟然战胜了巴西队!! + +> 德国队竟然战胜了巴西队!!!!!!!! + +> 她竟然对你说「喵」??!! + +> 她竟然对你说「喵」?!?!??!! + +## 全角和半角 + +不明白什么是全角(全形)与半角(半形)符号?请查看维基百科词条『[全角和半角](http://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2)』。 + +### 使用全角中文标点 + +正确: + +> 嗨!你知道嘛?今天前台的小妹跟我说「喵」了哎! + +> 核磁共振成像(NMRI)是什么原理都不知道?JFGI! + +错误: + +> 嗨! 你知道嘛? 今天前台的小妹跟我说 "喵" 了哎! + +> 嗨!你知道嘛?今天前台的小妹跟我说"喵"了哎! + +> 核磁共振成像 (NMRI) 是什么原理都不知道? JFGI! + +> 核磁共振成像(NMRI)是什么原理都不知道?JFGI! + +### 数字使用半角字符 + +正确: + +> 这件蛋糕只卖 1000 元。 + +错误: + +> 这件蛋糕只卖 1000 元。 + +例外:在设计稿、宣传海报中如出现极少量数字的情形时,为方便文字对齐,是可以使用全角数字的。 + +### 遇到完整的英文整句、特殊名词,其內容使用半角标点 + +正确: + +> 乔布斯那句话是怎么说的?「Stay hungry, stay foolish.」 + +> 推荐你阅读《Hackers & Painters: Big Ideas from the Computer Age》,非常的有趣。 + +错误: + +> 乔布斯那句话是怎么说的?「Stay hungry,stay foolish。」 + +> 推荐你阅读《Hackers&Painters:Big Ideas from the Computer Age》,非常的有趣。 + +## 名词 + +### 专有名词使用正确的大小写 + +大小写相关用法原属于英文书写范畴,不属于本 wiki 讨论內容,在这里只对部分易错用法进行简述。 + +正确: + +> 使用 GitHub 登录 + +> 我们的客户有 GitHub、Foursquare、Microsoft Corporation、Google、Facebook, Inc.。 + +错误: + +> 使用 github 登录 + +> 使用 GITHUB 登录 + +> 使用 Github 登录 + +> 使用 gitHub 登录 + +> 使用 gイんĤЦ8 登录 + +> 我们的客户有 github、foursquare、microsoft corporation、google、facebook, inc.。 + +> 我们的客户有 GITHUB、FOURSQUARE、MICROSOFT CORPORATION、GOOGLE、FACEBOOK, INC.。 + +> 我们的客户有 Github、FourSquare、MicroSoft Corporation、Google、FaceBook, Inc.。 + +> 我们的客户有 gitHub、fourSquare、microSoft Corporation、google、faceBook, Inc.。 + +> 我们的客户有 gイんĤЦ8、キouЯƧquムгє、๓เςг๏ร๏Ŧt ς๏гק๏гคtเ๏ภn、900913、ƒ4ᄃëв๏๏к, IПᄃ.。 + +注意:当网页中需要配合整体视觉风格而出现全部大写/小写的情形,HTML 中请使用标准的大小写规范进行书写;并通过 `text-transform: uppercase;`/`text-transform: lowercase;` 对表现形式进行定义。 + +### 不要使用不地道的缩写 + +正确: + +> 我们需要一位熟悉 JavaScript、HTML5,至少理解一种框架(如 Backbone.js、AngularJS、React 等)的前端开发者。 + +错误: + +> 我们需要一位熟悉 Js、h5,至少理解一种框架(如 backbone、angular、RJS 等)的 FED。 + +## 争议 + +以下用法略带有个人色彩,既:无论是否遵循下述规则,从语法的角度来讲都是**正确**的。 + +### 链接之间增加空格 + +用法: + +> 请 [提交一个 issue](#) 并分配给相关同事。 + +> 访问我们网站的最新动态,请 [点击这里](#) 进行订阅! + +对比用法: + +> 请[提交一个 issue](#) 并分配给相关同事。 + +> 访问我们网站的最新动态,请[点击这里](#)进行订阅! + +### 简体中文使用直角引号 + +用法: + +> 「老师,『有条不紊』的『紊』是什么意思?」 + +对比用法: + +> “老师,‘有条不紊’的‘紊’是什么意思?” + +## 工具 + +仓库 | 语言 +--- | --- +[vinta/paranoid-auto-spacing](https://github.com/vinta/paranoid-auto-spacing) | JavaScript +[huei90/pangu.node](https://github.com/huei90/pangu.node) | Node.js +[huacnlee/auto-correct](https://github.com/huacnlee/auto-correct) | Ruby +[sparanoid/space-lover](https://github.com/sparanoid/space-lover) | PHP (WordPress) +[nauxliu/auto-correct](https://github.com/NauxLiu/auto-correct) | PHP +[hotoo/pangu.vim](https://github.com/hotoo/pangu.vim) | Vim +[sparanoid/grunt-auto-spacing](https://github.com/sparanoid/grunt-auto-spacing) | Node.js (Grunt) +[hjiang/scripts/add-space-between-latin-and-cjk](https://github.com/hjiang/scripts/blob/master/add-space-between-latin-and-cjk) | Python + +## 谁在这样做? + +网站 | 文案 | UGC +--- | --- | --- +[Apple 中国](http://www.apple.com/cn/) | Yes | N/A +[Apple 香港](http://www.apple.com/hk/) | Yes | N/A +[Apple 台湾](http://www.apple.com/tw/) | Yes | N/A +[Microsoft 中国](http://www.microsoft.com/zh-cn/) | Yes | N/A +[Microsoft 香港](http://www.microsoft.com/zh-hk/) | Yes | N/A +[Microsoft 台湾](http://www.microsoft.com/zh-tw/) | Yes | N/A +[LeanCloud](https://leancloud.cn/) | Yes | N/A +[知乎](https://www.zhihu.com/) | Yes | 部分用户达成 +[V2EX](https://www.v2ex.com/) | Yes | Yes +[SegmentFault](https://segmentfault.com/) | Yes | 部分用户达成 +[Apple4us](http://apple4us.com/) | Yes | N/A +[豌豆荚](https://www.wandoujia.com/) | Yes | N/A +[Ruby China](https://ruby-china.org/) | Yes | 标题达成 +[PHPHub](https://phphub.org/) | Yes | 标题达成 + +## 参考文献 + +- [Guidelines for Using Capital Letters](http://grammar.about.com/od/punctuationandmechanics/a/Guidelines-For-Using-Capital-Letters.htm) +- [Letter case - Wikipedia](http://en.wikipedia.org/wiki/Letter_case) +- [Punctuation - Oxford Dictionaries](http://www.oxforddictionaries.com/words/punctuation) +- [Punctuation - The Purdue OWL](https://owl.english.purdue.edu/owl/section/1/6/) +- [How to Use English Punctuation Corrently - wikiHow](http://www.wikihow.com/Use-English-Punctuation-Correctly) +- [格式 - openSUSE](https://zh.opensuse.org/index.php?title=Help:%E6%A0%BC%E5%BC%8F) +- [全角和半角 - 维基百科](http://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2) +- [引号 - 维基百科](http://zh.wikipedia.org/wiki/%E5%BC%95%E8%99%9F) +- [疑问惊叹号 - 维基百科](http://zh.wikipedia.org/wiki/%E7%96%91%E5%95%8F%E9%A9%9A%E5%98%86%E8%99%9F) + +## CopyRight + +[中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines) From d4fc7ecab45e6ce71c4ff1f0fee87e2bf1e97bae Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 21 Feb 2016 15:07:52 +0800 Subject: [PATCH 1022/1710] translated --- ...ser For Each Incorrect Password Attempt.md | 59 ------------------- ...ser For Each Incorrect Password Attempt.md | 58 ++++++++++++++++++ 2 files changed, 58 insertions(+), 59 deletions(-) delete mode 100644 sources/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md create mode 100644 translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md diff --git a/sources/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md b/sources/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md deleted file mode 100644 index 8db9dfa7b4..0000000000 --- a/sources/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md +++ /dev/null @@ -1,59 +0,0 @@ -Translating---geekpi - -Make Sudo Insult User For Each Incorrect Password Attempt -=========================================================== - -You can have lots of fun in Linux terminal. And I am not talking about those funny commands to [run a train in Linux terminal](http://itsfoss.com/ubuntu-terminal-train/). - -I am talking about little tweaks in the terminal that will lighten up your mood. In a previous article, you learnt [how to increase sudo timeout in Linux terminal](http://itsfoss.com/change-sudo-password-timeout-ubuntu/). In today’s fun post, I’ll show you how you can make sudo to insult you (or other users) when incorrect password is attempted with sudo command. - -Confused what I am talking about? Here, take a look at this gif to get a gist of how sudo can insult you for typing in the incorrect password. - -![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux.gif) - -Now, why would you do that and take insults? After all, insults are not going to brighten up your day, is it? - -To me, this little tweak is funny and is better than the plain old “incorrect password” error message. Moreover, I can show it off to my friends (in this case you, via It’s FOSS) to amuse them. I am pretty sure you can come up with your own reason to use this tweak. - -## Enable insults in sudo - -You can enable insults in `sudo` by adding the following line in `sudo` configuration: - -``` -Defaults insults -``` - -Let’s see how to do that. Open a terminal and use the following command: - -``` -sudo visudo -``` - -This should open the configuration file in [nano](http://www.nano-editor.org/). Yeah, I know that traditionally ‘visudo’ should open the `/etc/sudoers` file in Vi editor, but Ubuntu and Ubuntu based Linux distribution will open it in nano. Since we are talking about Vi, here is a [cheat sheet for Vi editor](http://itsfoss.com/download-vi-cheat-sheet/) that could come handy if you decide to use Vi. - -Coming back to editing the sudeors file, you need to find the section where Defaults are listed. Luckily, it is in the beginning itself. Just add “Defaults insults” line to it, like this: - -![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint.png) - -If you are using nano, use `Ctrl+X` to quit the editor. At the time of quitting, it will ask you if you want to save the changes or not. To save the changes, press `Y`. - -Once you have saved the changes in sudoers file, open a terminal and use any command with sudo. Deliberately type wrong password and enjoy the abuses :) - -sudo could be nasty. See, it even threatens me of consequences if I type incorrect password again. LOL. - -![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint-1.jpeg) - -If you like this terminal hack, check out other [terminal tricks](http://itsfoss.com/category/terminal-tricks/) posts as well. If you have other such fun tweaks and hacks, do share it in the comment box below. - - ------------------------------------------------------------------------------- - -via: http://itsfoss.com/sudo-insult-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/ diff --git a/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md b/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md new file mode 100644 index 0000000000..0a0008ab8d --- /dev/null +++ b/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md @@ -0,0 +1,58 @@ +让sudo在用户输错密码时侮辱用户 +=========================================================== + +你在Linux终端中会有很多的乐趣。我今天要讲的不是在[终端中跑火车](http://itsfoss.com/ubuntu-terminal-train/)。 + +我今天要讲的技巧可以放松你的心情。前面一篇文章中,你学习了[如何在命令行中增加sudo命令的超时](http://itsfoss.com/change-sudo-password-timeout-ubuntu/)。今天的文章中,我会向你展示如让sudo在输错密码的时候侮辱你(或者其他人)。 + + +对我讲的感到疑惑?这里,让我们看下这张gif来了解sudo如何在你输错密码之后侮辱你的。 + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux.gif) + +现在,你为什要这么做?毕竟,侮辱不会让你的一天开心,不是么? + +对我来说,一点小技巧都是有趣的,并且要比以前的“密码错误”的错误提示更有趣。另外,我可以向我的朋友展示娱乐(这个例子中是通过自由开源软件)。我很肯定你有你自己的里有来使用这个技巧的。 + +## 在sudo中启用侮辱 + +你可以在`sudo`配置中增加下面的行来启用侮辱功能: + +``` +Defaults insults +``` + +让我们看看该如何做。打开终端并使用下面的命令: + +``` +sudo visudo +``` + +这会在[nano](http://www.nano-editor.org/)中打开配置文件。使得,我知道传统的‘visudo’应该在vi中打开`/etc/sudoers` 文件,但是Ubuntu及基于它的发行版会使用nano打开。由于我们再讨论vi,这里有一份[vi速查表](http://itsfoss.com/download-vi-cheat-sheet)可以在你决定使用vi的时候使用。 + +回到编辑sudeors文件界面,你需要找出Defaults所在的行。幸运的是,只需要在文件的开头加上“Defaults insults”,就像这样: + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint.png) + +如果你正在使用nano,使用`Ctrl+X`来退出编辑器。在退出的时候,它会询问你是否保存更改。要保存更改,按下“Y”。 + +一旦你保存了sudoers文件之后,打开终端并在任何命令中使用sudo。故意输错密码病享受辱骂:) + +sudo可能会讨厌的。看见没,他甚至在我再次输错之后威胁我。哈哈 + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint-1.jpeg) + +如果你喜欢这个终端技巧,你也可以查看[其他终端技巧的文章](http://itsfoss.com/category/terminal-tricks/)。如果你有其他有趣的技巧,在评论中分享。 + + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/sudo-insult-linux/ + +作者:[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 3e8c3e1ce47da456a73ad851d70acae27c7498e7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 21 Feb 2016 15:34:35 +0800 Subject: [PATCH 1023/1710] Update 20160218 The Best Linux Distros of 2016.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按照指北修改几处排版 --- ...20160218 The Best Linux Distros of 2016.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/tech/20160218 The Best Linux Distros of 2016.md b/translated/tech/20160218 The Best Linux Distros of 2016.md index fdb7cd02b0..dee100ad70 100644 --- a/translated/tech/20160218 The Best Linux Distros of 2016.md +++ b/translated/tech/20160218 The Best Linux Distros of 2016.md @@ -9,17 +9,17 @@ SUSE 是 openSUSE 发行版背后的公司,同时也是起步最早的 Linux 公司;[它在 Linus Torvalds 发布 Linux 的第二年就成立了](http://www.linux.com/news/software/applications/866964-exclusive-interview-with-suse-president-nils-brauckmann)。该公司的成立实际上早于现在的 Linux 公司之王 —— Red Hat。同时 SUSE 也是 [openSUSE](https://www.opensuse.org/) 社区发行版的发起者和赞助商。 -2015 年,openSUSE 的开发团队决定向 SUSE Linux 企业版 (SLE) 靠拢,以便让用户可以获得企业服务器特性的发行版 —— 类似于 CentOS 和 Ubuntu 那样。因此,openSUSE 变成了 [openSUSE Leap](https://en.opensuse.org/Portal:Leap),一个直接基于 SLE SP1 的发行版。 +2015 年,openSUSE 的开发团队决定向 SUSE Linux 企业版 (SLE) 靠拢,以便让用户可以获得企业服务器特性的发行版——类似于 CentOS 和 Ubuntu 那样。因此,openSUSE 变成了 [openSUSE Leap](https://en.opensuse.org/Portal:Leap),一个直接基于 SLE SP1 的发行版。 -两个发行版共用相同的基础代码,相互受益 —— SUSE 会选用 openSUSE 中好的代码,反之亦然。如此,openSUSE 也放弃了原本常规的发布周期,新版本与 SLE 同步发行。这意味着每个版本将会有更长的生命周期。 +两个发行版共用相同的基础代码,相互受益—— SUSE 会选用 openSUSE 中好的代码,反之亦然。如此,openSUSE 也放弃了原本常规的发布周期,新版本与 SLE 同步发行。这意味着每个版本将会有更长的生命周期。 -这样做的结果是,openSUSE 就成了一个非常重要的发行版,因为潜在的 SLE 用户现在可以使用 openSUSE Leap 了。但也并非完全如此,openSUSE 同样也有发行版 [Tumbleweed](http://www.cio.com/article/3008856/open-source-tools/is-opensuse-tumbleweed-good-enough-for-a-seasoned-arch-user.html) —— 一个纯净的滚动式版本。所以,用户们可以选择使用超稳定的 openSUSE Leap 或者经常更新的 openSUSE Tumbleweed。 +这样做的结果是,openSUSE 就成了一个非常重要的发行版,因为潜在的 SLE 用户现在可以使用 openSUSE Leap 了。但也并非完全如此,openSUSE 同样也有发行版 [Tumbleweed](http://www.cio.com/article/3008856/open-source-tools/is-opensuse-tumbleweed-good-enough-for-a-seasoned-arch-user.html) ——一个纯净的滚动式版本。所以,用户们可以选择使用超稳定的 openSUSE Leap 或者经常更新的 openSUSE Tumbleweed。 在我的记忆中,还没有其他的发行版做了这样一个令人印象深刻的回归。 ## 最高可定制性的发行版:Arch Linux -Arch Linux 是目前最好的滚动式更新的发行版。好吧,我可能有些偏见,因为我是一名 Arch Linux 用户 (GHLandy 译注:本人也是 Arch Linux 用户,它的定制性真的很好)。然而,我认为它好的真正原因是 Arch 在很多其他领域也都表现的非常优越,并且这才是我为什么用它作为主系统的原因。 +Arch Linux 是目前最好的滚动式更新的发行版。好吧,我可能有些偏见,因为我是一名 Arch Linux 用户 ( LCTT 译注:译者也是 Arch Linux 用户,它的定制性真的很好)。然而,我认为它好的真正原因是 Arch 在很多其他领域也都表现的非常优越,并且这才是我为什么用它作为主系统的原因。 - 对于那些想要学习 Linux 方方面面的用户来说,[Arch Linux](https://www.archlinux.org/) 无疑是一个绝佳的选择。因为你需要手动安装所有自己需要的东西,这样你会慢慢学到 Linux 系统的所有细节。 @@ -33,9 +33,9 @@ Arch Linux 是目前最好的滚动式更新的发行版。好吧,我可能有 ## 最美观的发行版:elementary OS -不同的发行版会有不同的关注点 —— 多数情况下表现为不同的技术。在大多数的 Linux 发行版中,外观和用户感觉并非他们优先考虑的事情 —— 这通常是桌面环境需要考虑的事情。 +不同的发行版会有不同的关注点——多数情况下表现为不同的技术。在大多数的 Linux 发行版中,外观和用户感觉并非他们优先考虑的事情 —— 这通常是桌面环境需要考虑的事情。 -[elementary OS](https://elementary.io/) 正在尝试改变这一事实。在这个发行版中,设计是占据重要位置,并且原因明显 —— 为该发行版取这个名字的开发者要在 Linux 世界里创建一些漂亮的图标。 +[elementary OS](https://elementary.io/) 正在尝试改变这一事实。在这个发行版中,设计是占据重要位置,并且原因明显——为该发行版取这个名字的开发者要在 Linux 世界里创建一些漂亮的图标。 elementary OS 相当注重整体外观和用户感觉。开发者创建了他们自己的组件,包括桌面环境。此外,他们只会选择那些符合设计规范的应用来加入到软件仓库。你可以发现 elementary OS 有很浓重的 Mac OS X 气息。 @@ -43,7 +43,7 @@ elementary OS 相当注重整体外观和用户感觉。开发者创建了他们 ![](http://www.linux.com/images/stories/66866/distro-solus.JPG) -[Solus](https://solus-project.com/) 最近获得非常大的关注程度。它是一个外观还可以、从零开始构建的操作系统,而并非 Debian 或者 Ubuntu 的衍生版本。它使用的 Budgie 桌面环境同样是从零开始构建的,但它的目标是兼容 Gnome。Solus 和 Google 的 Chrome OS 一样 —— 一切从简。 +[Solus](https://solus-project.com/) 最近获得非常大的关注程度。它是一个外观还可以、从零开始构建的操作系统,而并非 Debian 或者 Ubuntu 的衍生版本。它使用的 Budgie 桌面环境同样是从零开始构建的,但它的目标是兼容 Gnome。Solus 和 Google 的 Chrome OS 一样——一切从简。 我个人没怎么玩过 Solus,但它看起来很有前途。Solus 实际上并不是一个 “新” 系统。它曾以不同的形式和名称存在了很长时间,但直到 2015 年整个项目才以现在这个新名称重归大众视野。 @@ -63,7 +63,7 @@ elementary OS 相当注重整体外观和用户感觉。开发者创建了他们 ![](http://www.linux.com/images/stories/66866/distro-ubuntu-studio.JPG) -Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系统。该系统拥有巨大潜力,它可以将我们身边绝大多数的东西 —— 如路由器、咖啡机和玩具飞机等 —— 变成智能设备。让它更有趣的是,软件管理更新的方式以及添加安全性能的模块。 +Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系统。该系统拥有巨大潜力,它可以将我们身边绝大多数的东西 —— 如路由器、咖啡机和玩具飞机等——变成智能设备。让它更有趣的是,软件管理更新的方式以及添加安全性能的模块。 ## 为桌面系统而生的发行版:Linux Mint Cinnamon @@ -71,7 +71,7 @@ Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系 ## 为游戏而生的发行版:Steam OS -对于桌面版 Linux 来说,玩游戏同样是短板。很多用户为了能够玩游戏,安装了 Linux 和 Windows 双系统。而 Valve 则尝试改变这个局面。Valve 是一个游戏发行商,它提供一个可以跨平台运行游戏的客户端。并且,Valve 也同样创建了它自己的开源操作系统 —— [Steam OS](http://store.steampowered.com/steamos/) —— 为了创建一个基于 Linux 的游戏平台。截至 2015 年底,它的合作伙伴开始把搭载了 Steam OS 的机器推向市场。 +对于桌面版 Linux 来说,玩游戏同样是短板。很多用户为了能够玩游戏,安装了 Linux 和 Windows 双系统。而 Valve 则尝试改变这个局面。Valve 是一个游戏发行商,它提供一个可以跨平台运行游戏的客户端。并且,Valve 也同样创建了它自己的开源操作系统——[Steam OS](http://store.steampowered.com/steamos/)——为了创建一个基于 Linux 的游戏平台。截至 2015 年底,它的合作伙伴开始把搭载了 Steam OS 的机器推向市场。 ## 为隐私而生的发行版:Tails @@ -81,7 +81,7 @@ Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系 ## 为多媒体制作而生的发行版:Ubuntu Studio -基于 Linux 的操作系统有一个明显的弱点,那就是对多媒体制作的支持并不友好。所有专业级应用基本只能运行在 Windows 或者 Mac OS X 上。Linux 系统从来都不缺乏像样的音频/视频制作软件,但这样还是远远不够的。应该要有一款轻量级的桌面环境,使得那些宝贵的系统资源 —— 如 CPU 和 RAM —— 尽量少占用,以便用于多媒体制作。目前,[Ubuntu Studio](https://ubuntustudio.org/tour/) 对多媒体制作的支持最好。它使用了 Xfce 桌面环境,并且有各种各样的音频、视频以及图像编辑应用。 +基于 Linux 的操作系统有一个明显的弱点,那就是对多媒体制作的支持并不友好。所有专业级应用基本只能运行在 Windows 或者 Mac OS X 上。Linux 系统从来都不缺乏像样的音频/视频制作软件,但这样还是远远不够的。应该要有一款轻量级的桌面环境,使得那些宝贵的系统资源——如 CPU 和 RAM——尽量少占用,以便用于多媒体制作。目前,[Ubuntu Studio](https://ubuntustudio.org/tour/) 对多媒体制作的支持最好。它使用了 Xfce 桌面环境,并且有各种各样的音频、视频以及图像编辑应用。 ## 最好的企业发行版:SLE/RHEL @@ -93,13 +93,13 @@ Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系 ## 最好的移动操作系统:Plasma Mobile -尽管,基于 Linux 的 Android 系统称雄于移动操作系统市场,但是大多数的开源社区 —— 也包括我在内 —— 也仍然强烈希望能有一个发行版能够为移动设备提供传统 Linux 的桌面应用。同时,这样的一个发行版由开源社区来维护会比由商业公司来维护好的多,只有这样用户群才能成为这个发行版的焦点,而不应该由公司的商业目标来决定这个发行版的发展趋势。而 KDE 的 [Plasma Mobile](https://community.kde.org/Plasma/Mobile) 刚好实现了我们的愿望。 +尽管,基于 Linux 的 Android 系统称雄于移动操作系统市场,但是大多数的开源社区——也包括我在内——也仍然强烈希望能有一个发行版能够为移动设备提供传统 Linux 的桌面应用。同时,这样的一个发行版由开源社区来维护会比由商业公司来维护好的多,只有这样用户群才能成为这个发行版的焦点,而不应该由公司的商业目标来决定这个发行版的发展趋势。而 KDE 的 [Plasma Mobile](https://community.kde.org/Plasma/Mobile) 刚好实现了我们的愿望。 这个基于 Kubuntu 的发行版始于 2015 年。因为 KDE 社区以坚守标准和为公众开发应用而闻名,我非常期待 Plasma Mobile 能够一直坚持下去。 ## 为 ARM 设备而生的发行版:Arch Linux ARM -随着 Android 系统的成功,我们的生活也围绕者越来越多的 ARM 设备 —— 从树莓派 (Raspberry Pi) 到 Chromebook 以及 Nvidia Shield。为 Intel/AMD 架构的 CPU 而编写的传统发行版并不能够在这些 ARM 架构的设备上运行。而一些为 ARM 而编写的发行版却仅仅只能在特定的硬件上运行,比如只能运行在树莓派 (Raspberry Pi) 上的 Raspbian 系统。这就是 [Arch Linux ARM](http://archlinuxarm.org/) (ALARM) 的闪光点所在。它是一个基于 Arch Linux 的纯社区支持的发行版,可以在树梅派 (Raspberry Pi)、Chromebook、Android 设备以及 Nvidia Shield 等设备上运行。同时,也由于 AUR,该发行版变得更加有趣,你可以安装很多在其他发行版可能无法获取的软件。 +随着 Android 系统的成功,我们的生活也围绕者越来越多的 ARM 设备——从树莓派 (Raspberry Pi) 到 Chromebook 以及 Nvidia Shield。为 Intel/AMD 架构的 CPU 而编写的传统发行版并不能够在这些 ARM 架构的设备上运行。而一些为 ARM 而编写的发行版却仅仅只能在特定的硬件上运行,比如只能运行在树莓派 (Raspberry Pi) 上的 Raspbian 系统。这就是 [Arch Linux ARM](http://archlinuxarm.org/) (ALARM) 的闪光点所在。它是一个基于 Arch Linux 的纯社区支持的发行版,可以在树梅派 (Raspberry Pi)、Chromebook、Android 设备以及 Nvidia Shield 等设备上运行。同时,也由于 AUR,该发行版变得更加有趣,你可以安装很多在其他发行版可能无法获取的软件。 ## 结论 From 51dbcd09e3799274318425e3021e4f93cf6d641d Mon Sep 17 00:00:00 2001 From: mudongliang Date: Sun, 21 Feb 2016 20:34:13 +0800 Subject: [PATCH 1024/1710] Translated --- ...ux Mint 18 Will Get Its Own Set Of Apps.md | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md b/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md index 6846dbf49d..e2ee3073b9 100644 --- a/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md +++ b/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md @@ -1,62 +1,60 @@ -mudongliang - -Linux Mint 18 Will Get Its Own Set Of Apps +Linux Mint 18 将会得到自己的应用集 ============================================= ![](http://itsfoss.com/wp-content/uploads/2016/01/Linux-Mint-apps.jpg) -It’s common for distro developers to create and release a series of apps that are designed specifically for their distros. A big example of this is [elementary OS](https://elementary.io/). Nine years in, Linux Mint is finally taking the plunge and doing the same. +对于发行版开发者来说,创建和发布一系列专为他们发行版设计的应用是再平常不过的事情。一个很大的例子就是 [elementary OS](https://elementary.io/) 。九年的投入,Linux Mint 终于孤注一掷做了相同的事情。 ->#LinuxMint to finally get its own apps in Mint 18. +>#LinuxMint 终将在 Mint 18 中得到自己的应用。 -[Linux Mint](http://www.linuxmint.com/) is one of the best known Linux distros available. Based on Ubuntu and Debian, Linux Mint strives to create a “modern, elegant and comfortable operating system which is both powerful and easy to use”. The team behind Linux Mint is also very involved with the [MATE](http://itsfoss.com/install-mate-desktop-ubuntu-14-04/) and [Cinnamon](http://itsfoss.com/install-cinnamon-ubuntu-14-04/) desktop environments. +[Linux Mint](http://www.linuxmint.com/) 是目前可用的最著名的 Linux 发行版之一。基于 Ubuntu 和 Debian,Linux Mint 努力去创建一个现代的,优雅的,舒适的操作系统,同时强大而易于使用。(LCTT 注:Linux Mint 基于 Ubuntu,而 Linux Mint Debian Edition 基于 Debian。)Linux Mint 背后的团队同时也积极参与 [MATE](http://itsfoss.com/install-mate-desktop-ubuntu-14-04/) 和 [Cinnamon](http://itsfoss.com/install-cinnamon-ubuntu-14-04/) 桌面环境开发。 -## First X-Men, now X-Apps +## 原来的 X-Men,现在的 X-Apps -Thursday, Linux Mint project lead Clement Lefebvre [announced](http://blog.linuxmint.com/?p=2985) the creation of the X-Apps. The X-Apps are designed to be desktop-agnostic so that developers can update them without having to tweak them for each desktop environment. Lefebvre stated that these X-Apps would be used as default applications for Cinnamon, MATE and Xfce. +周四 Linux Mint 项目领导者 Clement Lefebvre [宣布](http://blog.linuxmint.com/?p=2985) X-Apps 的创建。X-Apps 被设计为桌面无关以便开发者可以直接更新它们而不必针对每一种桌面环境做调整。Lefebvre 声明这些 X-Apps 将会被作为 Cinnamon,MATE 和 Xfce 桌面环境的默认应用。 -## Does Linux Need Even More Apps? +## Linux是否需要更多的应用? -According to Lefebvre, the creation of the X-Apps was necessitated by the release of GNOME 3.18. He said that with the release of GNOME 3.18: +据 Lefebvre 所述,X-Apps 的创建被 GNOME 3.18 发布所需。对于 GNOME 3.18 的发布,他这样说: + +> “GTK 本身和一些 GNOME 应用都在 GNOME SHELL 上集成地很好,而且看起来很有本地风格。坏消息就是它们在任何别的地方看起来很不相称。使事情变得更糟的是,Unity,Ubuntu的旗舰产品,重度依赖 GTK,GNOME 应用,GNOME 环境本身,所以我们这里才不处理上游的 3.18 版本,但是这一系列的补丁带来它们自己的问题(举一个例子,Ubuntu 在应用中重新引入菜单条和标题栏,但是不重写它们的头部栏..所以你有时会看到它们三者一起出现)。” -> “GTK itself and many of the GNOME applications now integrate better with GNOME Shell and look more native in that environment. The bad news, is that they now look completely out of place everywhere else. To make matters worse, Unity, the flagship product of Ubuntu, relies heavily on GTK, GNOME applications and the GNOME environment itself, so we’re not dealing with the upstream version of 3.18 here, but with a collection of patches which bring their own issues (one example is that Ubuntu reintroduces menubars and titlebars in applications but without rewriting their headerbar.. so you sometimes see all three of them).” +在过去,Linux Mint 团队通过“应用降级(例如 Linux Mint 17 使用 gedit 2.30),给 GNOME 打补丁以及使用替代品(大部分在 MATE 和 Xfce)”来处理这个问题。 -In the past, the Linux Mint team dealt with the problem by “downgrading apps (Linux Mint 17 uses gedit 2.30 for instance), patching GNOME (GTK and various GNOME apps) and using alternatives (mostly in MATE and Xfce)”. +Lefebvre也说为 Cinnamon 和 MATE 构建特定应用没有意义。这就是为什么他们选择开发那些一般的,完美适应地运行在 Cinnamon,MATE 和 Xfce(以及其他可能的桌面环境)。 -Lefebvre also said that it didn’t make sense to build specific applications for Cinnamon and MATE this is why they opted to work on apps which would be generic, perfectly suited to run in Cinnamon, MATE and Xfce (and possibly other desktop environments). +他进一步添加到: -He further added: +>“X-Apps 将会是一个通用的,使用传统的接口 GTK3 应用的集合。它将会被作为 Cinnamon,MATE 和 Xfce 默认的桌面组件。在 Mint 18 中,“X apps” 将允许我们去维护一个本地样子和好的集成标准。因为它们将会被用于替代看起来很外地的 GNOME 桌面应用。长期来讲,X-App 项目将会允许我们去创新和开发更多的,应用本身的特色和提高(这是一些我们无法通过打补丁,临时的复制或者特定桌面的复制,比如说 MATE 桌面应用做到的事情,因为它代价太高)。” ->"X-Apps will be a collection of generic GTK3 applications using traditional interfaces which can be used as default desktop components in Cinnamon, MATE and Xfce. In Mint 18, the “X apps” will allow us to maintain a native look and a good level of integration because they will be used in replacement of GNOME applications which now look foreign (using headerbars and a distinctive layout). Long-term, the X-App project will allow us to innovate and to develop new features and improvements in the applications themselves (this is something we couldn’t do via patches, temporary forks or DE-specific forks like the MATE apps because it was too costly)." - -## What Kind of Apps Will Be Available? +## 什么类型的应用将会可用? ![](http://itsfoss.com/wp-content/uploads/2016/01/xedit.png) -Lefebvre only revealed one of the upcoming X-Apps: a text editor named xedit. Here are some of the feature that it will provide: +Lefebvre 只透露其中一个即将来临的 X-Apps:一个名为 xedit 的文本编辑器。下面是这个软件提供的一些特性: + +- 基于 Pluma 去降低学习曲线 +- 使用 GTK3 +- 不依赖 GNOME 或 MATE -- Based on Pluma to lower learning curve -- Makes use of GTK3 -- Doesn’t depend on GNOME or MATE +## 何时 -## When +X-Apps 将会和 [Linux Mint 18](http://itsfoss.com/linux-mint-18-codenamed-sarah/) 一同到来。而 Linux Mint 18 将会在 Ubuntu 16.04 LTS 发布之后数月后发布。[Ubuntu 16.04 LTS 计划于四月发布。](http://itsfoss.com/ubuntu-1604-release-schedule/) -The X-Apps will be coming together with [Linux Mint 18 release](http://itsfoss.com/linux-mint-18-codenamed-sarah/), which will follow the release of Ubuntu 16.04 LTS by several months. [Ubuntu 16.04 is scheduled to release in April](http://itsfoss.com/ubuntu-1604-release-schedule/). +## 最终想法 -## Final Thoughts +就我而言,无论何时当我听见某人发布一个新发行版特定的应用,我都会局促不安。Linux 世界本身已经难以想象的碎片化了。我们真的需要花费时间和精力去创建更多的副本工程吗?不要误解我,我喜欢桌面无关软件的想法。它将修复大量的关于一个桌面一个应用样子的问题。 -Personally, whenever I hear about someone releasing new distro specific apps, I cringe. The Linux universe is already incredibly fragmented. Do we really need more duplicate projects to take time and energy to create? Don’t get me wrong, I like the idea of desktop-agnostic apps. It would fix a lot of problems with how apps look from distro to distro. +使我发愁的问题是“它们是否会成功?”。正如我之前所说,Linux Mint 团队成员也在两种桌面环境工作。目前去添加应用开发来混合。我自己没有写过一个软件(除了 Hello World),但是我知道当你尝试且使一个项目复杂化,不好的事情将会发生。许多项目已经变成了不断膨胀的巨龙。我希望这样的事不要发生在这里。 -The problem that worries me is “Will they be able to pull it off?” As I stated before, the Linux Mint guys also work on two desktop environments. Now add application development to the mix. I’ve never written a piece of software myself (other than one that said “Hello, World”), but I do know that when you try and complicate a project bad things happen. Many projects have fallen to the dragon of feature creep I hope that doesn’t happen here. - -Do you have a different take? Let me know in the comments below. +你有不同的想法吗?在下方评论以便让我知道。 ------------------------------------------------------------------------------ via: http://itsfoss.com/linux-mint-own-apps/ 作者:[JOHN PAUL][a] -译者:[译者ID](https://github.com/译者ID) +译者:[mudongliang](https://github.com/mudongliang) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 52fe4ccb7f8cba04e4299649903a1cea437a673d Mon Sep 17 00:00:00 2001 From: mudongliang Date: Sun, 21 Feb 2016 20:39:20 +0800 Subject: [PATCH 1025/1710] remove translated file to the translated directory --- .../tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md (100%) diff --git a/sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md b/translated/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md similarity index 100% rename from sources/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md rename to translated/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md From a96939a54f221b1df766fb27dd7e7b8b69740668 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 22 Feb 2016 00:14:05 +0800 Subject: [PATCH 1026/1710] =?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 --- .../20151204 Review EXT4 vs. Btrfs vs. XFS.md | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md index b2e71c0da3..7f93b149ba 100644 --- a/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md +++ b/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -1,8 +1,8 @@ -EXT4、Btrfs、XFS 文件系统回顾 +EXT4,Btrfs和XFS 文件系统之点评 ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) -老实说,人们最不曾考虑的问题之一是他们的个人电脑中使用了什么文件系统。Windows 和 Mac OS X 用户更没有理由去考虑,因为对于他们的操作系统,只有一种选择,那就是 NTFS 和 HFS+。相反,对于 Linux 系统而言,有很多种文件系统可以选择,现在默认的是广泛采用的 ext4。然而,现在也有改用一种称为 btrfs 文件系统的趋势。那是什么使得 btrfs、或者其它文件系统变得更优秀呢?什么时候我们又能看到 Linux 发行版作出改变呢? +老实说,人们最不曾考虑的问题之一是他们的个人电脑中使用了什么文件系统。Windows 和 Mac OS X 用户更没有理由去考虑,因为对于他们的操作系统,只有一种选择,那就是 NTFS 和 HFS+。相反,对于 Linux 系统而言,有很多种文件系统可以选择,现在默认的是广泛采用的 ext4。然而,现在也有改用一种称为 btrfs 文件系统的趋势。那是什么使得 btrfs更优秀,其它的文件系统又是什么,什么时候我们又能看到 Linux 发行版作出改变呢? 首先让我们对文件系统以及它们真正干什么有个总体的认识,然后我们再对一些有名的文件系统做详细的比较。 @@ -12,46 +12,45 @@ EXT4、Btrfs、XFS 文件系统回顾 ### 为什么要分区? ### -由于每个操作系统都能创建或者删除分区,很多人对分区都有模糊的认识。Linux 操作系统在同一块磁盘上使用多个分区,就算使用标准安装过程,这看起来很奇怪,因此需要一些解释。拥有不同分区的一个主要目的就是为了在灾难发生时能获得更好的数据安全性。 +由于每个操作系统都能创建或者删除分区,很多人对分区都有模糊的认识。Linux 操作系统在同一块磁盘上即便使用标准安装过程,仍可以使用多个分区,这看起来很奇怪,因此需要一些解释。拥有不同分区的一个主要目的就是为了在灾难发生时能获得更好的数据安全性。 -通过将硬盘划分为分区,数据会被分隔以及重组。当事故发生的时候,只有存储在被损坏分区的数据会被破坏,很大可能上其它分区的数据能得以保留。这个原因可以追溯到 Linux 操作系统还没有日志文件系统,任何掉电都有可能导致灾难发生的时候。 +通过将硬盘划分为分区,数据会被分隔以及重组。当事故发生的时候,只有存储在被损坏分区的数据会被破坏,很大可能上其它分区的数据能得以保留。这个原因可以追溯到 Linux 操作系统还没有日志文件系统,任何电力故障都有可能导致灾难发生的时候。 使用分区也考虑到了安全和健壮性原因,因此操作系统部分损坏并不意味着整个计算机就有风险或者会受到破坏。这也是当前采用分区的一个最重要因素。举个例子,用户创建了一些会填满磁盘的脚本、程序或者 web 应用,如果该磁盘只有一个大的分区,如果磁盘满了那么整个系统就不能工作。如果用户把数据保存在不同的分区,那么就只有那个分区会受到影响,而系统分区或者其它数据分区仍能正常运行。 记住,拥有一个日志文件系统只能在掉电或者和存储设备意外断开连接时提供数据安全性,并不能在文件系统出现坏块或者发生逻辑错误时保护数据。对于这种情况,用户可以采用廉价磁盘冗余阵列(RAID:Redundant Array of Inexpensive Disks)的方案。 -### 为什么要选择文件系统? ### +### 为什么要改变文件系统? ### ext4 文件系统由 ext3 文件系统改进而来,而后者又是从 ext2 文件系统改进而来。虽然 ext4 文件系统已经非常稳定,是过去几年中绝大部分发行版的默认选择,但它是基于陈旧的代码开发而来。另外, Linux 操作系统用户也需要很多 ext4 文件系统本身不提供的新功能。虽然通过某些软件能满足这种需求,但性能会受到影响,在文件系统层次做到这些能获得更好的性能。 ### Ext4 文件系统 ### -ext4 还有一些令人印象深刻的限值。最大文件大小是 16tebibytes(大概是 17.6 terabytes),这比普通用户当前能买到的硬盘还要大。使用 ext4 能创建的最大卷/分区是 1 exbibyte(大概是 1,152,921.5 terabytes)。通过使用多种技巧, ext4 比 ext3 有很大的速度提升。类似一些最先进的文件系统,它是一个日志文件系统,意味着它会对文件在磁盘中的位置以及任何其它对磁盘的更改做记录。纵观它的所有功能,它还不支持透明压缩、重复数据删除或者透明加密。技术上支持了快照,但该功能还处于实验性阶段。 +ext4 还有一些明显的限值。最大文件大小是 16tebibytes(大概是 17.6 terabytes),这比普通用户当前能买到的硬盘还要大的多。使用 ext4 能创建的最大卷/分区是 1 exbibyte(大概是 1,152,921.5 terabytes)。通过使用多种技巧, ext4 比 ext3 有很大的速度提升。类似一些最先进的文件系统,它是一个日志文件系统,意味着它会对文件在磁盘中的位置以及任何其它对磁盘的更改做记录。纵观它的所有功能,它还不支持透明压缩、重复数据删除或者透明加密。技术上支持了快照,但该功能还处于实验性阶段。 ### Btrfs 文件系统 ### -btrfs 有很多不同的发音,例如 Better FS、Butter FS 或者 B-Tree FS。它是一个几乎完全从头开发的文件系统。btrfs 存在的原因是它的开发者期初希望扩展文件系统的功能使得它包括快照、池化、校验以及其它一些功能。虽然和 ext4 无关,它也希望能保留 ext4 中能使消费者和商家受益的功能,并整合额外的能使每个人、尤其是企业受益的功能。对于使用大型软件以及大规模数据库的企业,对于多种不同的硬盘看起来一致的文件系统能使他们受益并且使数据整合变得更加简单。删除重复数据能降低数据实际使用的空间,当需要镜像一个单一和广泛文件系统时使用 btrfs 也能使数据镜像变得简单。 +btrfs 有很多不同的发音,例如 Better FS、Butter FS 或者 B-Tree FS。它是一个几乎完全从头开发的文件系统。btrfs 存在的原因是它的开发者期初希望扩展文件系统的功能使得它包括快照、池化、校验以及其它一些功能。虽然和 ext4 无关,它也希望能保留 ext4 中能使消费者和商家受益的功能,并整合额外的能使每个人,尤其是企业受益的功能。对于使用大型软件以及大规模数据库的企业,对于多种不同的硬盘看起来一致的文件系统能使他们受益并且使数据整合变得更加简单。删除重复数据能降低数据实际使用的空间,当需要镜像一个单一和广泛文件系统时使用 btrfs 也能使数据镜像变得简单。 -用户当然可以继续选择创建多个分区从而无需镜像任何东西。考虑到这种情况,btrfs 能横跨多种硬盘,和 ext4 相比,它能支持 16 倍多的驱动空间。btrfs 文件系统一个分区最大是 16 exbibytes,最大的文件大小也是 16 exbibytes。 +用户当然可以继续选择创建多个分区从而无需镜像任何东西。考虑到这种情况,btrfs 能横跨多种硬盘,和 ext4 相比,它能支持 16 倍以上的驱动空间。btrfs 文件系统一个分区最大是 16 exbibytes,最大的文件大小也是 16 exbibytes。 ### XFS 文件系统 ### -XFS 文件系统是扩展文件系统(extent file system)的扩展。XFS 是 64 位高性能日志文件系统。对 XFS 的支持大概在 2002 年合并到了 Linux 内核,到了 2009 年,红帽企业版 Linux 5.4 也支持了 XFS 文件系统。对于 64 位文件系统,XFS 支持最大文件系统大小为 8 exbibytes。XFS 文件系统有一些缺陷,例如它不能压缩,删除大量文件时性能低下。RHEL 7.0 文件系统默认使用 XFS。 +XFS 文件系统是扩展文件系统(extent file system)的扩展。XFS 是 64 位高性能日志文件系统。对 XFS 的支持大概在 2002 年合并到了 Linux 内核,到了 2009 年,红帽企业版 Linux 5.4 也支持了 XFS 文件系统。对于 64 位文件系统,XFS 支持最大文件系统大小为 8 exbibytes。XFS 文件系统有一些缺陷,例如它不能压缩,删除大量文件时性能低下。目前RHEL 7.0 文件系统默认使用 XFS。 ### 总后总结 ### -不幸的是,还不知道 btrfs 什么时候能到来。官方说,下一代文件系统仍然被归类到“不稳定”,但是如果用户下载最新版本的 Ubuntu,他就可以选择安装到 btrfs 分区上。什么时候 btrfs 会被归类到 “稳定” 仍然是个谜, 直到真的认为它“稳定”之前,用户也不应该期望 Ubuntu 会默认采用 btrfs。有报道说 Fedora 18 会用 btrfs 作为它的默认文件系统,因为到了发布它的时候,应该有了 btrfs 文件系统校验器。由于还没有实现所有的功能,另外和 ext4 相比性能上也比较缓慢, btrfs 还有很多的工作要做。 +不幸的是,还不知道 btrfs 什么时候能到来。官方说,下一代文件系统仍然被归类为“不稳定”,但是如果用户下载最新版本的 Ubuntu,就可以选择安装到 btrfs 分区上。什么时候 btrfs 会被归类到 “稳定” 仍然是个谜, 直到真的认为它“稳定”之前,用户也不应该期望 Ubuntu 会默认采用 btrfs。有报道说 Fedora 18 会用 btrfs 作为它的默认文件系统,因为到了发布它的时候,应该有了 btrfs 文件系统校验器。由于还没有实现所有的功能,另外和 ext4 相比性能上也比较缓慢,btrfs 还有很多的工作要做。 那么,究竟使用哪个更好呢?尽管性能几乎相同,但 ext4 还是赢家。为什么呢?答案在于易用性以及广泛性。对于桌面或者工作站, ext4 仍然是一个很好的文件系统。由于默认提供,用户可以在上面安装操作系统。同时, ext4 支持最大 1 exabytes 的卷和 16 terabytes 的文件,因此考虑到大小,它也还有很大的进步空间。 -btrfs 能提供更大的高达 16 exabytes 的卷以及更好的容错,但是,到现在为止,它感觉更像是一个附加文件系统,而没有集成到 Linux 操作系统。比如,尽管 btrfs 支持不同的发行版,使用 btrfs 格式化硬盘之前先要有 btrfs-tools 工具,这意味着安装 Linux 操作系统的时候它并不是一个可选项。 +btrfs 能提供更大的高达 16 exabytes 的卷以及更好的容错,但是,到现在为止,它感觉更像是一个附加文件系统,而没有集成到 Linux 操作系统。比如,尽管 btrfs 支持不同的发行版,使用 btrfs 格式化硬盘之前先要有 btrfs-tools 工具,这意味着安装 Linux 操作系统的时候它并不是一个可选项,即便不同发行版之间会有差异。 -尽管传输速率非常重要,评价一个文件系统出了文件传输速度之外还有很多因素。btrfs 有很多好用的功能,例如写复制、扩展校验、快照、清洗、数据自治愈、冗余删除以及其它保证数据完整性的功能。和 ZFS 相比 btrfs 缺少 RAID-Z 功能,因此对于 btrfs, RAID 还处于实验性阶段。对于单纯的数据存储,和 ext4 相比 btrfs 似乎更加优秀,但时间会验证一切。 +尽管传输速率非常重要,评价一个文件系统出了文件传输速度之外还有很多因素。btrfs 有很多好用的功能,例如写复制、扩展校验、快照、清洗、自修复数据、冗余删除以及其它保证数据完整性的功能。和 ZFS 相比 btrfs 缺少 RAID-Z 功能,因此对于 btrfs, RAID 还处于实验性阶段。对于单纯的数据存储,和 ext4 相比 btrfs 似乎更加优秀,但时间会验证一切。 迄今为止,对于桌面系统而言,ext4 似乎是一个更好的选择,因为它是默认的文件系统,传输文件时也比 btrfs 更快。btrfs 当然值得尝试、但要在桌面 Linux 上完全取代 ext4 可能还需要一些时间。数据场和大存储池会揭示关于 ext4、XCF 以及 btrfs 不同的故事和差异。 -如果你有其它不同的或者额外的观点、在下面的评论框中告诉我们吧。 -If you have a different or additional opinion, kindly let us know by commenting on this article. +如果你有不同或者其它的观点,在下面的评论框中告诉我们吧。 -------------------------------------------------------------------------------- @@ -59,7 +58,7 @@ via: http://www.unixmen.com/review-ext4-vs-btrfs-vs-xfs/ 作者:[M.el Khamlichi][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c7e9960c5818b5c17114a3a793de5d32d67c1788 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 22 Feb 2016 11:04:05 +0800 Subject: [PATCH 1027/1710] PUB:20160220 Linux Mint 18 Will Get Its Own Set Of Apps @mudongliang @locez @oska874 --- ...ux Mint 18 Will Get Its Own Set Of Apps.md | 60 ++++++++++++++++++ ...ux Mint 18 Will Get Its Own Set Of Apps.md | 62 ------------------- 2 files changed, 60 insertions(+), 62 deletions(-) create mode 100644 published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md delete mode 100644 translated/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md diff --git a/published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md b/published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md new file mode 100644 index 0000000000..4872f4352a --- /dev/null +++ b/published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md @@ -0,0 +1,60 @@ +Linux Mint 18 将拥有自己的应用集 +============================================= + +![](http://itsfoss.com/wp-content/uploads/2016/01/Linux-Mint-apps.jpg) + +对于发行版开发者来说,创建和发布一系列专为他们发行版设计的应用是再平常不过的事情。一个最典型的例子就是 [elementary OS](https://elementary.io/) 。而在经过九年的努力后,Linux Mint 终于孤注一掷做了相同的事情。 + +[Linux Mint](http://www.linuxmint.com/) 是现今最著名的 Linux 发行版之一。其基于 Ubuntu 和 Debian,Linux Mint 努力去创建一个现代的、优雅的、舒适的操作系统,不但强大而且易用。(LCTT 译注:Linux Mint 基于 Ubuntu,而 Linux Mint Debian Edition 基于 Debian。)Linux Mint 背后的团队同时也积极参与 [MATE](http://itsfoss.com/install-mate-desktop-ubuntu-14-04/) 和 [Cinnamon](http://itsfoss.com/install-cinnamon-ubuntu-14-04/) 桌面环境开发。 + +## 前有 X 战警(X-men),后有 X 应用(X-Apps) + +周四, Linux Mint 项目领导者 Clement Lefebvre [宣布](http://blog.linuxmint.com/?p=2985) X-Apps 的创建。X-Apps 被设计为不依赖特定桌面环境,以便开发者可以直接更新它们而不必针对每一种桌面环境做调整。Lefebvre 声明这些 X-Apps 将会被作为 Cinnamon、MATE 和 Xfce 桌面环境的默认应用。 + +## Linux 是否需要更多的应用? + +据 Lefebvre 所述,X-Apps 的创建是因 GNOME 3.18 发布所需。对于 GNOME 3.18 的发布,他这样说: + +> “GTK 本身和一些 GNOME 应用都在 GNOME SHELL 上集成地很好,而且看起来风格很一致。坏消息就是它们在任何别的地方看起来很不相称。使事情变得更糟的是,Ubuntu 的旗舰产品 Unity 重度依赖 GTK、GNOME 应用及 GNOME 环境本身,所以我们这里不能在上游的 3.18 版本中处理,而这一系列的补丁会带来它们自己的问题(举一个例子,Ubuntu 在应用中重新引入菜单条和标题栏,但是不重写它们的头部栏..所以你有时会看到它们三者一起出现)。” + +在过去,Linux Mint 团队通过“应用降级(例如 Linux Mint 17 使用 gedit 2.30),给 GNOME 打补丁以及使用替代品(大部分在 MATE 和 Xfce)”来处理这个问题。 + +Lefebvre 也说为 Cinnamon 和 MATE 构建特定应用没有意义。这就是为什么他们选择开发那些通用的,可以完美地适应运行在 Cinnamon,MATE 和 Xfce(以及其他可能的桌面环境)的应用。 + +他进一步补充道: + +>“X-Apps 将会是一个通用的,使用传统的接口 GTK3 应用的集合。它能被用作 Cinnamon,MATE 和 Xfce 默认的桌面组件。在 Mint 18 中,“X apps” 将允许我们去维护一个本地风格及更高层面的集成。因为它们将会被用于替代看起来很不一致的 GNOME 桌面应用。长期来讲,X-App 项目将会允许我们去开发新的功能和改进应用本身(这是一些我们无法通过打补丁,临时分支或者特定桌面的分支做到的事情,比如说 MATE 桌面应用,因为它代价太高)。” + +## 将会有什么类型的应用? + +![](http://itsfoss.com/wp-content/uploads/2016/01/xedit.png) + +Lefebvre 只透露其中一个即将来临的 X-Apps:一个名为 xedit 的文本编辑器。下面是这个软件提供的一些特性: + +- 基于 Pluma,很容易学会使用 +- 使用 GTK3 +- 不依赖 GNOME 或 MATE + +## 何时呢? + +X-Apps 将会和 [Linux Mint 18](http://itsfoss.com/linux-mint-18-codenamed-sarah/) 一同到来。而 Linux Mint 18 将会在 Ubuntu 16.04 LTS 发布之后数月后发布。[Ubuntu 16.04 LTS 计划于四月发布。](http://itsfoss.com/ubuntu-1604-release-schedule/) + +## 总结 + +就我而言,无论何时当我听见某人发布一个新发行版特定的应用,我都会局促不安。Linux 世界本身已经难以想象的碎片化了。我们真的需要花费时间和精力去创建更多的重复的项目吗?但不要误解我,我喜欢桌面无关软件的想法。它将修复大量的一个桌面一个应用样子的问题。 + +使我发愁的问题是“它们是否会成功?”。正如我之前所说,Linux Mint 团队成员也在两种桌面环境工作。目前增加了应用开发就让这些混在一起了。我自己没有写过一个软件(除了 Hello World),但是我知道当你尝试且使一个项目复杂化,就会发生不好的事情。许多项目已经变成了不断膨胀的恶龙。我希望这样的事不要发生在这里。 + +你有不同的想法吗?在下方评论以便让我知道。 + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/linux-mint-own-apps/ + +作者:[JOHN PAUL][a] +译者:[mudongliang](https://github.com/mudongliang) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/john/ diff --git a/translated/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md b/translated/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md deleted file mode 100644 index e2ee3073b9..0000000000 --- a/translated/tech/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md +++ /dev/null @@ -1,62 +0,0 @@ -Linux Mint 18 将会得到自己的应用集 -============================================= - -![](http://itsfoss.com/wp-content/uploads/2016/01/Linux-Mint-apps.jpg) - -对于发行版开发者来说,创建和发布一系列专为他们发行版设计的应用是再平常不过的事情。一个很大的例子就是 [elementary OS](https://elementary.io/) 。九年的投入,Linux Mint 终于孤注一掷做了相同的事情。 - ->#LinuxMint 终将在 Mint 18 中得到自己的应用。 - -[Linux Mint](http://www.linuxmint.com/) 是目前可用的最著名的 Linux 发行版之一。基于 Ubuntu 和 Debian,Linux Mint 努力去创建一个现代的,优雅的,舒适的操作系统,同时强大而易于使用。(LCTT 注:Linux Mint 基于 Ubuntu,而 Linux Mint Debian Edition 基于 Debian。)Linux Mint 背后的团队同时也积极参与 [MATE](http://itsfoss.com/install-mate-desktop-ubuntu-14-04/) 和 [Cinnamon](http://itsfoss.com/install-cinnamon-ubuntu-14-04/) 桌面环境开发。 - -## 原来的 X-Men,现在的 X-Apps - -周四 Linux Mint 项目领导者 Clement Lefebvre [宣布](http://blog.linuxmint.com/?p=2985) X-Apps 的创建。X-Apps 被设计为桌面无关以便开发者可以直接更新它们而不必针对每一种桌面环境做调整。Lefebvre 声明这些 X-Apps 将会被作为 Cinnamon,MATE 和 Xfce 桌面环境的默认应用。 - -## Linux是否需要更多的应用? - -据 Lefebvre 所述,X-Apps 的创建被 GNOME 3.18 发布所需。对于 GNOME 3.18 的发布,他这样说: - -> “GTK 本身和一些 GNOME 应用都在 GNOME SHELL 上集成地很好,而且看起来很有本地风格。坏消息就是它们在任何别的地方看起来很不相称。使事情变得更糟的是,Unity,Ubuntu的旗舰产品,重度依赖 GTK,GNOME 应用,GNOME 环境本身,所以我们这里才不处理上游的 3.18 版本,但是这一系列的补丁带来它们自己的问题(举一个例子,Ubuntu 在应用中重新引入菜单条和标题栏,但是不重写它们的头部栏..所以你有时会看到它们三者一起出现)。” - -在过去,Linux Mint 团队通过“应用降级(例如 Linux Mint 17 使用 gedit 2.30),给 GNOME 打补丁以及使用替代品(大部分在 MATE 和 Xfce)”来处理这个问题。 - -Lefebvre也说为 Cinnamon 和 MATE 构建特定应用没有意义。这就是为什么他们选择开发那些一般的,完美适应地运行在 Cinnamon,MATE 和 Xfce(以及其他可能的桌面环境)。 - -他进一步添加到: - ->“X-Apps 将会是一个通用的,使用传统的接口 GTK3 应用的集合。它将会被作为 Cinnamon,MATE 和 Xfce 默认的桌面组件。在 Mint 18 中,“X apps” 将允许我们去维护一个本地样子和好的集成标准。因为它们将会被用于替代看起来很外地的 GNOME 桌面应用。长期来讲,X-App 项目将会允许我们去创新和开发更多的,应用本身的特色和提高(这是一些我们无法通过打补丁,临时的复制或者特定桌面的复制,比如说 MATE 桌面应用做到的事情,因为它代价太高)。” - -## 什么类型的应用将会可用? - -![](http://itsfoss.com/wp-content/uploads/2016/01/xedit.png) - -Lefebvre 只透露其中一个即将来临的 X-Apps:一个名为 xedit 的文本编辑器。下面是这个软件提供的一些特性: - -- 基于 Pluma 去降低学习曲线 -- 使用 GTK3 -- 不依赖 GNOME 或 MATE - -## 何时 - -X-Apps 将会和 [Linux Mint 18](http://itsfoss.com/linux-mint-18-codenamed-sarah/) 一同到来。而 Linux Mint 18 将会在 Ubuntu 16.04 LTS 发布之后数月后发布。[Ubuntu 16.04 LTS 计划于四月发布。](http://itsfoss.com/ubuntu-1604-release-schedule/) - -## 最终想法 - -就我而言,无论何时当我听见某人发布一个新发行版特定的应用,我都会局促不安。Linux 世界本身已经难以想象的碎片化了。我们真的需要花费时间和精力去创建更多的副本工程吗?不要误解我,我喜欢桌面无关软件的想法。它将修复大量的关于一个桌面一个应用样子的问题。 - -使我发愁的问题是“它们是否会成功?”。正如我之前所说,Linux Mint 团队成员也在两种桌面环境工作。目前去添加应用开发来混合。我自己没有写过一个软件(除了 Hello World),但是我知道当你尝试且使一个项目复杂化,不好的事情将会发生。许多项目已经变成了不断膨胀的巨龙。我希望这样的事不要发生在这里。 - -你有不同的想法吗?在下方评论以便让我知道。 - ------------------------------------------------------------------------------- - -via: http://itsfoss.com/linux-mint-own-apps/ - -作者:[JOHN PAUL][a] -译者:[mudongliang](https://github.com/mudongliang) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/john/ From 6468ca248c80bd87cd4df640b8630815194678e6 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 22 Feb 2016 11:57:23 +0800 Subject: [PATCH 1028/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=80=89=E9=A2=98?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng List of Raspberry Pi 2 Distributions.md | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md index 5203be38d8..ee98887448 100644 --- a/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md +++ b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md @@ -1,32 +1,32 @@ Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions ============================================================== -Last week’s news that Tizen 3.0 has been ported to the Raspberry Pi 2 Model B is the latest example of how the year-old ARMv7 version of the Pi is attracting ports from more powerful Linux distributions, most notably Fedora, Ubuntu MATE, and Snappy. The [Samsung Open Source Group’s Tizen for Pi](http://blogs.s-osg.org/bringing-tizen-to-a-raspberry-pi-2-near-you/) project has been underway for several years, achieving several beta releases, and now the effort has shifted to the new Tizen 3.0. It’s still in beta, but now you can create builds for the Pi 2 using tools from the [Yocto](https://www.yoctoproject.org/) Project and [OpenEmbedded project](http://www.openembedded.org/wiki/Main_Page). +Last week’s news that Tizen 3.0 has been ported to the Raspberry Pi 2 Model B is the latest example of how the year-old ARMv7 version of the Pi is attracting ports from more powerful Linux distributions, most notably Fedora, Ubuntu MATE, and Snappy. The [Samsung Open Source Group’s Tizen for Pi][1] project has been underway for several years, achieving several beta releases, and now the effort has shifted to the new Tizen 3.0. It’s still in beta, but now you can create builds for the Pi 2 using tools from the [Yocto][2] Project and [OpenEmbedded project][3]. -Tizen 3.0 offers performance and security improvements, multiple-user and 64-bit support, and an Internet of Things (IoT) framework. Samsung, the principal backer of the [Linux Foundation hosted Tizen project](https://www.tizen.org/), is using the Pi port to expand the base of developers using Tizen for IoT projects, according to an [IDG News Service post](http://www.cio.com/article/3031812/samsung-hopes-raspberry-pi-can-spread-tizen-os-adoption.html) that reported on the port. +Tizen 3.0 offers performance and security improvements, multiple-user and 64-bit support, and an Internet of Things (IoT) framework. Samsung, the principal backer of the [Linux Foundation hosted Tizen project][4], is using the Pi port to expand the base of developers using Tizen for IoT projects, according to an [IDG News Service post][5] that reported on the port. -Although Samsung finally [shipped a Tizen-based](http://www.linux.com/news/embedded-mobile/mobile-linux/837843-samsung-sells-a-million-tizen-phones-as-mozilla-rethinks-firefox-os) phone in India last summer, and Gear smartwatches continue to use Tizen, the main focus now appears to be on IoT. At CES last month, Samsung [announced](http://www.linux.com/news/embedded-mobile/mobile-linux/877879-linux-based-drones-upstage-other-mobile-gadgets-at-ces) that all of its Tizen-based, 2016 Smart TVs will be able to act as SmartThings home automation hubs, letting users monitor the household while watching TV. +Although Samsung finally [shipped a Tizen-based][6] phone in India last summer, and Gear smartwatches continue to use Tizen, the main focus now appears to be on IoT. At CES last month, Samsung [announced][7] that all of its Tizen-based, 2016 Smart TVs will be able to act as SmartThings home automation hubs, letting users monitor the household while watching TV. ## The Growing List of Pi Distros -[Elinux.org](http://elinux.org/RPi_Distributions) lists some 46 ARMv6-ready distributions that run on all the Raspberry Pi boards. A separate listing notes two ARMv7-only distros that require the ARMv7 Raspberry Pi 2: Ubuntu MATE, which replaces the resource-intensive Unity desktop with the Gnome 2.0 flavored MATE, and Windows 10 IoT Core. The prominent placement of a Microsoft distribution is not as controversial as one might have thought. To many younger Linux developers and casual Pi hackers, Microsoft is just another tech company, not so much the evil empire loathed by old-time Linux hackers. +[Elinux.org][8] lists some 46 ARMv6-ready distributions that run on all the Raspberry Pi boards. A separate listing notes two ARMv7-only distros that require the ARMv7 Raspberry Pi 2: Ubuntu MATE, which replaces the resource-intensive Unity desktop with the Gnome 2.0 flavored MATE, and Windows 10 IoT Core. The prominent placement of a Microsoft distribution is not as controversial as one might have thought. To many younger Linux developers and casual Pi hackers, Microsoft is just another tech company, not so much the evil empire loathed by old-time Linux hackers. -Windows 10 IoT Core isn’t the only non-Linux distro running on the Pi. There’s also the Unix-like FreeBSD and NetBSD, as well as the revived RISC OS Pi version of the old Acorn Computers OS. Some of the 48 operating systems on the Elinux.org list are incomplete, out-of-date, or dedicated to limited niches. [DistroWatch](https://distrowatch.com/search.php?category=Raspberry+Pi) offers a more manageable list of 20. +Windows 10 IoT Core isn’t the only non-Linux distro running on the Pi. There’s also the Unix-like FreeBSD and NetBSD, as well as the revived RISC OS Pi version of the old Acorn Computers OS. Some of the 48 operating systems on the Elinux.org list are incomplete, out-of-date, or dedicated to limited niches. [DistroWatch][9] offers a more manageable list of 20. -The [Raspberry Pi Foundation](https://www.raspberrypi.org/) still prominently posts a download page for its homegrown, Debian-based Raspbian, in both standard and NOOBS packages. This lightweight distro is still the most popular and typically the highest rated Linux build for the Pi. The Scratch-ready distro is especially equally suited for desktop use and embedded hacking with home automation gear, robots, and other IoT gizmos. Raspbian recently [received an update](http://news.softpedia.com/news/raspbian-gets-experimental-opengl-driver-gpu-now-used-for-acceleration-500152.shtml) with an experimental OpenGL driver for doing hardware acceleration on the VideoCore IV GPU used with the Pi 2’s Broadcom BCM2836 SoC. +The [Raspberry Pi Foundation][10] still prominently posts a download page for its homegrown, Debian-based Raspbian, in both standard and NOOBS packages. This lightweight distro is still the most popular and typically the highest rated Linux build for the Pi. The Scratch-ready distro is especially equally suited for desktop use and embedded hacking with home automation gear, robots, and other IoT gizmos. Raspbian recently [received an update][11] with an experimental OpenGL driver for doing hardware acceleration on the VideoCore IV GPU used with the Pi 2’s Broadcom BCM2836 SoC. -The Pi Foundation also lists several [third-party downloads](https://www.raspberrypi.org/downloads/). In addition to Windows 10 IoT Core and and Ubuntu MATE, the list includes the lightweight, transactionally focused [Snappy Ubuntu Core](http://www.linux.com/news/embedded-mobile/mobile-linux/804659-ubuntu-snappy-leads-mobile-linux-migration-to-iot) for the Pi 2. Canonical is aiming Snappy at those who want an app platform and cloud integration in embedded devices like drones and IoT devices. Snappy also came out last week in a version designed for [Intel NUC mini-PCs](https://insights.ubuntu.com/2016/02/10/ubuntu-core-is-available-for-the-intel-nuc/). The Pi Foundation also posts images for RISC OS and the education-focused PINET. There are also two media center distros related to KODI/XBMC: OSMC and OpenElec. +The Pi Foundation also lists several [third-party downloads][12]. In addition to Windows 10 IoT Core and and Ubuntu MATE, the list includes the lightweight, transactionally focused [Snappy Ubuntu Core][13] for the Pi 2. Canonical is aiming Snappy at those who want an app platform and cloud integration in embedded devices like drones and IoT devices. Snappy also came out last week in a version designed for [Intel NUC mini-PCs][14]. The Pi Foundation also posts images for RISC OS and the education-focused PINET. There are also two media center distros related to KODI/XBMC: OSMC and OpenElec. -In addition to its list of 48 released distros, Elinux.org lists several “announced” distros including Firefox OS, [openSUSE](https://www.reddit.com/r/openSUSE/comments/3hxrz4/opensuse_on_a_raspberry_pi_2_armv7/), Meego MER & XBMC, Puppy, RPi-Buildroot, and Aros. Missing, however, is Tizen, as well as newly announced ports such as [Manjaro-ARM](http://www.linux-arm.info/index.php/1103-hands-on-more-adventures-with-manjaro-arm-for-the-raspberry-pi-2) and the CentOS 7-based [CentOS AltArch 7](http://www.linux-arm.info/index.php/1054-centos-altarch-7-now-available-for-aarch64-powerpc64-powerpc8-le-and-armhfp) for the Pi 2, Banana Pi, and CubieTruck SBCs. +In addition to its list of 48 released distros, Elinux.org lists several “announced” distros including Firefox OS, [openSUSE][15], Meego MER & XBMC, Puppy, RPi-Buildroot, and Aros. Missing, however, is Tizen, as well as newly announced ports such as [Manjaro-ARM][16] and the CentOS 7-based [CentOS AltArch 7][17] for the Pi 2, Banana Pi, and CubieTruck SBCs. ## Android Still Pi in the Sky -Elinux.org’s “announced” list also includes Android and a Miracast-like program called Android Transporter. People have been trying to port Android to the Pi for years; yet, even with the more suitable [Pi 2](http://www.linux.com/news/embedded-mobile/mobile-linux/807087-faster-raspberry-pi-2-says-yes-to-ubuntu-and-windows-but-wheres-android) shipping for a year now, Android is still pretty much a no-show. Android can run on lower-powered SoCs than the Pi 2’s quad-core, Cortex-A7, but the limited 1GB of RAM and the lack of GPU acceleration are big challenges. Perhaps Raspbian’s OpenGL driver could be ported to Android as well, although the Pi Foundation does not seem very interested in Android. +Elinux.org’s “announced” list also includes Android and a Miracast-like program called Android Transporter. People have been trying to port Android to the Pi for years; yet, even with the more suitable [Pi 2][18] shipping for a year now, Android is still pretty much a no-show. Android can run on lower-powered SoCs than the Pi 2’s quad-core, Cortex-A7, but the limited 1GB of RAM and the lack of GPU acceleration are big challenges. Perhaps Raspbian’s OpenGL driver could be ported to Android as well, although the Pi Foundation does not seem very interested in Android. -There are several Android-for-Pi projects in the works, but without the foundation’s backing, there is still nothing close to a complete port. Projects include an [AOSP Marshmallow](http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-joins-growing-list-of-raspberry-pi-2-distros#!topic/android-rpi/YW_gGr8wZkk) patch-set from Peter Yoon, as well as a [RaspAnd](https://extonlinux.wordpress.com/2015/04/05/run-android-5-1-lollipop-exton-build-on-your-raspberry-pi-2/) release based on the Ubuntu-based RaspEx, which makes use of the Aptoide package manager to load some Android 5.1 apps on a Pi 2. The [Razdroid project](https://www.raspberrypi.org/forums/viewtopic.php?f=73&t=19106), which aims to tap into the secrets of Broadcom hardware acceleration, seems to have stalled. +There are several Android-for-Pi projects in the works, but without the foundation’s backing, there is still nothing close to a complete port. Projects include an [AOSP Marshmallow][19] patch-set from Peter Yoon, as well as a [RaspAnd][20] release based on the Ubuntu-based RaspEx, which makes use of the Aptoide package manager to load some Android 5.1 apps on a Pi 2. The [Razdroid project][21], which aims to tap into the secrets of Broadcom hardware acceleration, seems to have stalled. -Most Rasp Pi users, however, appear more interested in [Ubuntu MATE](https://ubuntu-mate.org/raspberry-pi/), which was never optimized for ARMv6, and Fedora. For years, Pi users have run the lightweight spin-down of Fedora called Pidora, but with the Pi 2, they can now try the real thing. The Raspberry Pi Foundation has yet to post Fedora, but the recent [betas of the Pi 2 port](https://chisight.wordpress.com/2015/10/19/fedora-22-or-23-on-raspberry-pi-2/) have received high marks. +Most Rasp Pi users, however, appear more interested in [Ubuntu MATE][22], which was never optimized for ARMv6, and Fedora. For years, Pi users have run the lightweight spin-down of Fedora called Pidora, but with the Pi 2, they can now try the real thing. The Raspberry Pi Foundation has yet to post Fedora, but the recent [betas of the Pi 2 port][23] have received high marks. -Other Linux distributions that regularly make Top Pi distro lists include Arch Linux, which unlike most ports from mature Linux distros, works just fine on ARMv6. A recent [TechRadar Top 5 list](http://www.techradar.com/us/news/software/5-of-the-most-popular-raspberry-pi-distros-1292537) includes several more niche distros in addition to Raspbian. These include the OSMC media player environment, RetroPie for playing classic games, OpenMediaVault for turning your Pi into a NAS, and Pi MusicBox, based on the Mopidy music streaming server. +Other Linux distributions that regularly make Top Pi distro lists include Arch Linux, which unlike most ports from mature Linux distros, works just fine on ARMv6. A recent [TechRadar Top 5 list][24] includes several more niche distros in addition to Raspbian. These include the OSMC media player environment, RetroPie for playing classic games, OpenMediaVault for turning your Pi into a NAS, and Pi MusicBox, based on the Mopidy music streaming server. Beyond Ubuntu, Fedora, and Tizen, other distros, both arcane and general, are heading for the Pi 2, as well. The platform is rapidly expanding the boundaries of, as well as redefining the meaning of, desktop Linux. @@ -40,4 +40,28 @@ via: http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-join 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a](http://www.linux.com/community/forums/person/42808) +[a]:http://www.linux.com/community/forums/person/42808 +[1]:http://blogs.s-osg.org/bringing-tizen-to-a-raspberry-pi-2-near-you/ +[2]:https://www.yoctoproject.org/ +[3]:http://www.openembedded.org/wiki/Main_Page +[4]:https://www.tizen.org/ +[5]:http://www.cio.com/article/3031812/samsung-hopes-raspberry-pi-can-spread-tizen-os-adoption.html +[6]:http://www.linux.com/news/embedded-mobile/mobile-linux/837843-samsung-sells-a-million-tizen-phones-as-mozilla-rethinks-firefox-os +[7]:http://www.linux.com/news/embedded-mobile/mobile-linux/877879-linux-based-drones-upstage-other-mobile-gadgets-at-ces +[8]:http://elinux.org/RPi_Distributions +[9]:https://distrowatch.com/search.php?category=Raspberry+Pi +[10]:https://www.raspberrypi.org/ +[11]:http://news.softpedia.com/news/raspbian-gets-experimental-opengl-driver-gpu-now-used-for-acceleration-500152.shtml +[12]:https://www.raspberrypi.org/downloads/ +[13]:http://www.linux.com/news/embedded-mobile/mobile-linux/804659-ubuntu-snappy-leads-mobile-linux-migration-to-iot +[14]:https://insights.ubuntu.com/2016/02/10/ubuntu-core-is-available-for-the-intel-nuc/ +[15]:https://www.reddit.com/r/openSUSE/comments/3hxrz4/opensuse_on_a_raspberry_pi_2_armv7/ +[16]:http://www.linux-arm.info/index.php/1103-hands-on-more-adventures-with-manjaro-arm-for-the-raspberry-pi-2 +[17]:http://www.linux-arm.info/index.php/1054-centos-altarch-7-now-available-for-aarch64-powerpc64-powerpc8-le-and-armhfp +[18]:http://www.linux.com/news/embedded-mobile/mobile-linux/807087-faster-raspberry-pi-2-says-yes-to-ubuntu-and-windows-but-wheres-android +[19]:http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-joins-growing-list-of-raspberry-pi-2-distros#!topic/android-rpi/YW_gGr8wZkk +[20]:https://extonlinux.wordpress.com/2015/04/05/run-android-5-1-lollipop-exton-build-on-your-raspberry-pi-2/ +[21]:https://www.raspberrypi.org/forums/viewtopic.php?f=73&t=19106 +[22]:https://ubuntu-mate.org/raspberry-pi/ +[23]:https://chisight.wordpress.com/2015/10/19/fedora-22-or-23-on-raspberry-pi-2/ +[24]:http://www.techradar.com/us/news/software/5-of-the-most-popular-raspberry-pi-distros-1292537 From 64815556c7daf620251ee24ff6de17ba1a1c818a Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 22 Feb 2016 11:59:43 +0800 Subject: [PATCH 1029/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=80=89=E9=A2=98?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...3.0 Joins Growing List of Raspberry Pi 2 Distributions.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md index ee98887448..062fcae483 100644 --- a/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md +++ b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md @@ -1,12 +1,13 @@ Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions ============================================================== + Last week’s news that Tizen 3.0 has been ported to the Raspberry Pi 2 Model B is the latest example of how the year-old ARMv7 version of the Pi is attracting ports from more powerful Linux distributions, most notably Fedora, Ubuntu MATE, and Snappy. The [Samsung Open Source Group’s Tizen for Pi][1] project has been underway for several years, achieving several beta releases, and now the effort has shifted to the new Tizen 3.0. It’s still in beta, but now you can create builds for the Pi 2 using tools from the [Yocto][2] Project and [OpenEmbedded project][3]. Tizen 3.0 offers performance and security improvements, multiple-user and 64-bit support, and an Internet of Things (IoT) framework. Samsung, the principal backer of the [Linux Foundation hosted Tizen project][4], is using the Pi port to expand the base of developers using Tizen for IoT projects, according to an [IDG News Service post][5] that reported on the port. Although Samsung finally [shipped a Tizen-based][6] phone in India last summer, and Gear smartwatches continue to use Tizen, the main focus now appears to be on IoT. At CES last month, Samsung [announced][7] that all of its Tizen-based, 2016 Smart TVs will be able to act as SmartThings home automation hubs, letting users monitor the household while watching TV. -## The Growing List of Pi Distros +### The Growing List of Pi Distros [Elinux.org][8] lists some 46 ARMv6-ready distributions that run on all the Raspberry Pi boards. A separate listing notes two ARMv7-only distros that require the ARMv7 Raspberry Pi 2: Ubuntu MATE, which replaces the resource-intensive Unity desktop with the Gnome 2.0 flavored MATE, and Windows 10 IoT Core. The prominent placement of a Microsoft distribution is not as controversial as one might have thought. To many younger Linux developers and casual Pi hackers, Microsoft is just another tech company, not so much the evil empire loathed by old-time Linux hackers. @@ -18,7 +19,7 @@ The Pi Foundation also lists several [third-party downloads][12]. In addition to In addition to its list of 48 released distros, Elinux.org lists several “announced” distros including Firefox OS, [openSUSE][15], Meego MER & XBMC, Puppy, RPi-Buildroot, and Aros. Missing, however, is Tizen, as well as newly announced ports such as [Manjaro-ARM][16] and the CentOS 7-based [CentOS AltArch 7][17] for the Pi 2, Banana Pi, and CubieTruck SBCs. -## Android Still Pi in the Sky +### Android Still Pi in the Sky Elinux.org’s “announced” list also includes Android and a Miracast-like program called Android Transporter. People have been trying to port Android to the Pi for years; yet, even with the more suitable [Pi 2][18] shipping for a year now, Android is still pretty much a no-show. Android can run on lower-powered SoCs than the Pi 2’s quad-core, Cortex-A7, but the limited 1GB of RAM and the lack of GPU acceleration are big challenges. Perhaps Raspbian’s OpenGL driver could be ported to Android as well, although the Pi Foundation does not seem very interested in Android. From f50d7a402ad215892f822164188988acd01cbb78 Mon Sep 17 00:00:00 2001 From: Jonathan Kang Date: Mon, 22 Feb 2016 14:09:21 +0800 Subject: [PATCH 1030/1710] JonathanKang is translating --- .../20160220 [Free Download] Vi Cheat Sheet For Beginners.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md b/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md index 0a43387984..db69940892 100644 --- a/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md +++ b/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md @@ -1,3 +1,5 @@ +JonathanKang is translating + [Free Download] Vi Cheat Sheet For Beginners ================================================ From 96f17f73af84fdc2689e640c61d47ede5825bfe4 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 22 Feb 2016 13:58:00 +0800 Subject: [PATCH 1031/1710] PUB:20160218 The Best Linux Distros of 2016 @GHLandy @mudongliang @locez @oska874 --- ...20160218 The Best Linux Distros of 2016.md | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) rename {translated/tech => published}/20160218 The Best Linux Distros of 2016.md (58%) diff --git a/translated/tech/20160218 The Best Linux Distros of 2016.md b/published/20160218 The Best Linux Distros of 2016.md similarity index 58% rename from translated/tech/20160218 The Best Linux Distros of 2016.md rename to published/20160218 The Best Linux Distros of 2016.md index dee100ad70..bfd8ddd640 100644 --- a/translated/tech/20160218 The Best Linux Distros of 2016.md +++ b/published/20160218 The Best Linux Distros of 2016.md @@ -1,21 +1,21 @@ -2016 最佳Linux 发行版 +2016:如何选择 Linux 发行版 ================================ ![](http://www.linux.com/images/stories/66866/distro-opensuse.JPG) -[不管是在企业还是在消费者空间](http://www.cio.com/article/3017983/linux/2015s-most-exciting-linux-devices.html),2015 对于 Linux 来说都是极其重要的一年。作为一个从 2005 年就开始使用 Linux 的老用户,我有幸见证了 Linux 过去这 10 年里的重大发展,[并且,我相信它在 2016 年里会更加令人激动](http://www.cio.com/article/3017177/linux/11-predictions-for-linux-in-2016.html)。在这篇文章里,我会挑选几个将在 2016 年里大放光彩的最佳发行版给大家介绍一下。 +[不管是在企业级应用还是在消费者领域](http://www.cio.com/article/3017983/linux/2015s-most-exciting-linux-devices.html),2015 对于 Linux 来说都是极其重要的一年。作为一个从 2005 年就开始使用 Linux 的老用户,我有幸见证了 Linux 过去这 10 年里的重大发展,[并且,我相信它在 2016 年里会更加令人激动](http://www.cio.com/article/3017177/linux/11-predictions-for-linux-in-2016.html)。在这篇文章里,我会挑选几个将在 2016 年里大放光彩的最佳发行版给大家介绍一下。 -## 最易回归的发行版:openSUSE +## 强势归来的发行版:openSUSE SUSE 是 openSUSE 发行版背后的公司,同时也是起步最早的 Linux 公司;[它在 Linus Torvalds 发布 Linux 的第二年就成立了](http://www.linux.com/news/software/applications/866964-exclusive-interview-with-suse-president-nils-brauckmann)。该公司的成立实际上早于现在的 Linux 公司之王 —— Red Hat。同时 SUSE 也是 [openSUSE](https://www.opensuse.org/) 社区发行版的发起者和赞助商。 2015 年,openSUSE 的开发团队决定向 SUSE Linux 企业版 (SLE) 靠拢,以便让用户可以获得企业服务器特性的发行版——类似于 CentOS 和 Ubuntu 那样。因此,openSUSE 变成了 [openSUSE Leap](https://en.opensuse.org/Portal:Leap),一个直接基于 SLE SP1 的发行版。 -两个发行版共用相同的基础代码,相互受益—— SUSE 会选用 openSUSE 中好的代码,反之亦然。如此,openSUSE 也放弃了原本常规的发布周期,新版本与 SLE 同步发行。这意味着每个版本将会有更长的生命周期。 +两个发行版共用相同的基础代码,相互受益 —— SUSE 会选用 openSUSE 中好的代码,反之亦然。如此,openSUSE 也放弃了原本常规的发布周期,新版本与 SLE 同步发行。这意味着每个版本将会有更长的生命周期。 -这样做的结果是,openSUSE 就成了一个非常重要的发行版,因为潜在的 SLE 用户现在可以使用 openSUSE Leap 了。但也并非完全如此,openSUSE 同样也有发行版 [Tumbleweed](http://www.cio.com/article/3008856/open-source-tools/is-opensuse-tumbleweed-good-enough-for-a-seasoned-arch-user.html) ——一个纯净的滚动式版本。所以,用户们可以选择使用超稳定的 openSUSE Leap 或者经常更新的 openSUSE Tumbleweed。 +这样做的结果是,openSUSE 就成了一个非常重要的发行版,因为潜在的 SLE 用户现在可以使用 openSUSE Leap 了。不过,这还不是全部,openSUSE 同样也有发行版 [Tumbleweed](http://www.cio.com/article/3008856/open-source-tools/is-opensuse-tumbleweed-good-enough-for-a-seasoned-arch-user.html) —— 一个纯净的滚动式版本。所以,用户们可以选择使用很稳定的 openSUSE Leap 或者经常更新的 openSUSE Tumbleweed。 -在我的记忆中,还没有其他的发行版做了这样一个令人印象深刻的回归。 +在我的记忆中,还没有其他的发行版做了这样一个令人印象深刻的强势归来。 ## 最高可定制性的发行版:Arch Linux @@ -27,15 +27,15 @@ Arch Linux 是目前最好的滚动式更新的发行版。好吧,我可能有 - Arch Linux 同时也是最好的滚动式更新的发行版之一。它需要经常保持着更新。用户所运行的基本上是最新的软件,当然,也可以通过非稳定仓库运行预发行版的软件。 -- Arch 闻名于拥有为数众多的优秀文档。Arch Wiki 是我用以了解所有 Linux 相关事情的外带资源。 +- Arch 闻名于拥有为数众多的优秀文档。Arch Wiki 是我用以了解所有 Linux 相关事情的完整资源。 - Arch 中,我最喜欢的是,它提供了“任何”其他发行版中可用的的包和软件,同时还要感谢 AUR (Arch User Repository,Arch 用户仓库)。 ## 最美观的发行版:elementary OS -不同的发行版会有不同的关注点——多数情况下表现为不同的技术。在大多数的 Linux 发行版中,外观和用户感觉并非他们优先考虑的事情 —— 这通常是桌面环境需要考虑的事情。 +不同的发行版会有不同的关注点——多数情况下表现为技术的不同。在大多数的 Linux 发行版中,外观和用户感觉并非他们优先考虑的事情 —— 这通常是桌面环境需要考虑的事情。 -[elementary OS](https://elementary.io/) 正在尝试改变这一事实。在这个发行版中,设计是占据重要位置,并且原因明显——为该发行版取这个名字的开发者要在 Linux 世界里创建一些漂亮的图标。 +[elementary OS](https://elementary.io/) 正在尝试改变这一事实。在这个发行版中,设计是占据重要位置,并且原因明显——这个发行版是由那些以在 Linux 世界创建漂亮图标而闻名的设计人员所开发的。 elementary OS 相当注重整体外观和用户感觉。开发者创建了他们自己的组件,包括桌面环境。此外,他们只会选择那些符合设计规范的应用来加入到软件仓库。你可以发现 elementary OS 有很浓重的 Mac OS X 气息。 @@ -43,17 +43,17 @@ elementary OS 相当注重整体外观和用户感觉。开发者创建了他们 ![](http://www.linux.com/images/stories/66866/distro-solus.JPG) -[Solus](https://solus-project.com/) 最近获得非常大的关注程度。它是一个外观还可以、从零开始构建的操作系统,而并非 Debian 或者 Ubuntu 的衍生版本。它使用的 Budgie 桌面环境同样是从零开始构建的,但它的目标是兼容 Gnome。Solus 和 Google 的 Chrome OS 一样——一切从简。 +[Solus](https://solus-project.com/) 最近获得非常大的关注程度。它是一个看起来中规中矩、从零开始构建的操作系统,它并非 Debian 或者 Ubuntu 的衍生版本。它使用的 Budgie 桌面环境同样是从零开始构建的,但它的目标是兼容 Gnome。Solus 和 Google 的 Chrome OS 一样——一切从简。 我个人没怎么玩过 Solus,但它看起来很有前途。Solus 实际上并不是一个 “新” 系统。它曾以不同的形式和名称存在了很长时间,但直到 2015 年整个项目才以现在这个新名称重归大众视野。 ## 最好的云操作系统:Chrome OS -[Chrome OS](https://www.chromium.org/chromium-os) 可能不会成为你的典型 Linux 发行版,毕竟它是基于浏览器的操作系统,主要用以在线活动。但由于它基于 Linux 以及任何人都可以获取其源码进行编译,它同样是一个吸引人的系统。同时我也每天使用 Chrome OS,它是一个优秀、不用自己维护并且总是最新状态的系统,每个人都可以单纯用它来进行 web 相关的活动。Chrome OS 和 Android 对于推动 Linux 在 PC 市场和移动市场的占有率有着不可或缺的功劳。 +[Chrome OS](https://www.chromium.org/chromium-os) 可能不会成为你的典型 Linux 发行版,毕竟它是基于浏览器的操作系统,主要用以在线使用。但由于它基于 Linux ,任何人都可以获取其源码进行编译,它同样是一个吸引人的系统。我每天都使用 Chrome OS,它是一个优秀、不用自己维护并且总是保持最新状态的系统,每个人都可以单纯地用它来进行 web 相关的用途。Chrome OS 和 Android 对于推动 Linux 在 PC 市场和移动市场的占有率有着不可或缺的功劳。 -## 最好的笔记本操作系统:Ubuntu MATE +## 最好的笔记本计算机操作系统:Ubuntu MATE -大多数的笔记本都没有高端的硬件,假如你运行了一个很耗费资源的桌面环境,那么你可能没有足够的系统资源或电量来维持你的基本使用 —— 因为基本上被系统自身消耗了。于是我找到了 [Ubuntu MATE](http://www.cio.com/article/2848475/ubuntu-mate-enterprise-customers.html) 这个优秀的系统。它是轻量级的环境,但提供了能让你拥有不错体验的所有软件。也幸好它的轻量级设计,大部分的系统资源都留来给你的软件使用,让你依旧可以完成一些繁重的任务。我还发现,它对于一些低端的硬件也同样有很好的支持。 +大多数的笔记本计算机都没有高端的硬件,假如你运行了一个很耗费资源的桌面环境,那么你可能没有足够的系统资源或电量来维持你的使用 —— 因为基本上被操作系统自身消耗了。于是我找到了 [Ubuntu MATE](http://www.cio.com/article/2848475/ubuntu-mate-enterprise-customers.html) 这个优秀的系统。它是轻量级的环境,但提供了能让你拥有不错体验的所有软件。也幸好它的轻量级设计,大部分的系统资源都留来给你的软件使用,让你依旧可以完成一些繁重的任务。我认为它对于低端硬件来说是最好的发行版。 ## 为老旧硬件支持而生的发行版:Lubuntu @@ -63,19 +63,19 @@ elementary OS 相当注重整体外观和用户感觉。开发者创建了他们 ![](http://www.linux.com/images/stories/66866/distro-ubuntu-studio.JPG) -Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系统。该系统拥有巨大潜力,它可以将我们身边绝大多数的东西 —— 如路由器、咖啡机和玩具飞机等——变成智能设备。让它更有趣的是,软件管理更新的方式以及添加安全性能的模块。 +Snappy Ubuntu Core 是为物联网 (IoT) 及此类设备而生的 Linux 操作系统。该系统拥有巨大潜力,它可以将我们身边绝大多数的东西 —— 如路由器、咖啡机和无人机等——变成智能设备。让它更有趣的是,软件管理更新的方式以及为增加安全而提供的容器化支持。 ## 为桌面系统而生的发行版:Linux Mint Cinnamon -[Linux Mint Cinnamon](http://www.linux.com/news/software/applications/838569-review-linux-mint-172-release/) 对于台式机和一些有强大硬件的笔记本来说是最好的操作系统。我会尽量把它叫做 Linux 世界里的 Mac OS X。老实说,由于 Cinnamon 的不稳定,我在很长一段时间内并不是 Linux Mint 的忠实粉丝。但是,在开发者使用 LTS (Long Term Support,长期支持)作为基础之后,该发行版就变得难以想象的稳定。因为开发者不必花费经历来跟上 Ubuntu 的开发进度,他们现在可以将所有精力放到提升 Cinnamon 上。 +[Linux Mint Cinnamon](http://www.linux.com/news/software/applications/838569-review-linux-mint-172-release/) 对于台式机和一些有强大硬件的笔记本来说是最好的操作系统。我一般把它叫做 Linux 世界里的 Mac OS X。老实说,由于 Cinnamon 的不稳定,我在很长一段时间内并不是 Linux Mint 的忠实粉丝。但是,在开发者使用Ubuntu LTS (Long Term Support,长期支持)作为基础版本之后,该发行版就变得难以想象的稳定。因为开发者不必花费精力来跟上 Ubuntu 的开发进度,他们现在可以将所有精力放到提升 Cinnamon 上。 ## 为游戏而生的发行版:Steam OS -对于桌面版 Linux 来说,玩游戏同样是短板。很多用户为了能够玩游戏,安装了 Linux 和 Windows 双系统。而 Valve 则尝试改变这个局面。Valve 是一个游戏发行商,它提供一个可以跨平台运行游戏的客户端。并且,Valve 也同样创建了它自己的开源操作系统——[Steam OS](http://store.steampowered.com/steamos/)——为了创建一个基于 Linux 的游戏平台。截至 2015 年底,它的合作伙伴开始把搭载了 Steam OS 的机器推向市场。 +对于桌面版 Linux 来说,玩游戏同样是短板。很多用户为了能够玩游戏,安装了 Linux 和 Windows 双系统。而 Valve 则尝试改变这个局面。Valve 是一个游戏发行商,它提供一个可以在不同平台上运行游戏的客户端。并且,Valve 也同样创建了它自己的开源操作系统——[Steam OS](http://store.steampowered.com/steamos/)——为了创建一个基于 Linux 的游戏平台。截至 2015 年底,它的合作伙伴开始把搭载了 Steam OS 的机器推向市场。 ## 为隐私而生的发行版:Tails -在充斥着大量监控和营销者的跟踪 (为目标内容进行的匿名跟踪通常是可接受的)的岁月,隐私就变成主要问题。如果你想脱离政府或者市场机构的监控和跟踪范围,那么你需要一款始终考虑到隐私问题的操作系统。 +在充斥着大量监控和营销者的跟踪 (对目标内容进行的匿名跟踪通常是可接受的)的岁月,隐私保护就变成了一个重要问题。如果你想脱离政府或者市场机构的监控和跟踪,那么你需要一款始终考虑到隐私问题的操作系统。 在出于保护隐私的考虑上,没有任何一款系统可以超越 [Tails](https://tails.boum.org/)。它是一款基于 Debian 的发行版,并且在设计之初就考虑了隐私和匿名的支持。Tails 非常优秀,而且据报道说,NSA 认为这是对他们的监控的主要威胁之一。 @@ -85,21 +85,21 @@ Snappy Ubuntu Core 为物联网 (IoT) 及此类设备而生的 Linux 操作系 ## 最好的企业发行版:SLE/RHEL -企业级用户并不会通过浏览像这样的文章来了解他们的服务器该运行什么发行版。他们通常非常明确该到哪里获取信息:即 [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux) 或 [SUSE Linux Enterprise](https://www.suse.com/)。这两个名字已经成了企业服务器的代名词了。同时,它们背后的公司也都通过创新来推动一切皆容器并且可以进行软件定义。 +企业级用户并不会通过浏览像这样的文章来了解他们的服务器该运行什么发行版。他们通常非常明确地知道该到哪里获取信息:即 [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux) 或 [SUSE Linux Enterprise](https://www.suse.com/)。这两个名字已经成了企业服务器的代名词了。同时,这些公司也都通过创新来推动将一切都容器化和变成软件定义的。 ## 最好的服务器操作系统:Debian/CentOS -假如你在考虑自己运行一台服务器,但有不希望支付 RHEL 或者 SLE 授权的费用,那么 [Debian](https://www.debian.org/) 或者 [CentOS](https://www.centos.org/) 将是你最好的选择。这两个发行版在社区发行版服务器操作系统有着不可动摇的地位。并且它们有着长期支持,你不必担忧需要经常去升级系统。 +假如你在考虑自己运行一台服务器,但有不希望支付 RHEL 或者 SLE 授权的费用,那么 [Debian](https://www.debian.org/) 或者 [CentOS](https://www.centos.org/) 将是你最好的选择。这两个发行版是社区主导的服务器操作系统,具有不可动摇的地位。并且它们有着长期支持,你不必担忧需要经常去升级系统。 ## 最好的移动操作系统:Plasma Mobile -尽管,基于 Linux 的 Android 系统称雄于移动操作系统市场,但是大多数的开源社区——也包括我在内——也仍然强烈希望能有一个发行版能够为移动设备提供传统 Linux 的桌面应用。同时,这样的一个发行版由开源社区来维护会比由商业公司来维护好的多,只有这样用户群才能成为这个发行版的焦点,而不应该由公司的商业目标来决定这个发行版的发展趋势。而 KDE 的 [Plasma Mobile](https://community.kde.org/Plasma/Mobile) 刚好实现了我们的愿望。 +尽管,基于 Linux 的 Android 系统称雄于移动操作系统市场,但是大多数的开源社区——也包括我在内——也仍然强烈希望能有一个发行版可以为移动设备提供传统 Linux 的桌面应用。同时,这样的一个发行版由开源社区来维护会比由商业公司来维护好的多,只有这样,用户才能成为这个发行版的关注点,而不是由公司的商业目标来决定这个发行版的发展趋势。KDE 的 [Plasma Mobile](https://community.kde.org/Plasma/Mobile) 刚好实现了我们的愿望。 这个基于 Kubuntu 的发行版始于 2015 年。因为 KDE 社区以坚守标准和为公众开发应用而闻名,我非常期待 Plasma Mobile 能够一直坚持下去。 ## 为 ARM 设备而生的发行版:Arch Linux ARM -随着 Android 系统的成功,我们的生活也围绕者越来越多的 ARM 设备——从树莓派 (Raspberry Pi) 到 Chromebook 以及 Nvidia Shield。为 Intel/AMD 架构的 CPU 而编写的传统发行版并不能够在这些 ARM 架构的设备上运行。而一些为 ARM 而编写的发行版却仅仅只能在特定的硬件上运行,比如只能运行在树莓派 (Raspberry Pi) 上的 Raspbian 系统。这就是 [Arch Linux ARM](http://archlinuxarm.org/) (ALARM) 的闪光点所在。它是一个基于 Arch Linux 的纯社区支持的发行版,可以在树梅派 (Raspberry Pi)、Chromebook、Android 设备以及 Nvidia Shield 等设备上运行。同时,也由于 AUR,该发行版变得更加有趣,你可以安装很多在其他发行版可能无法获取的软件。 +随着 Android 系统的成功,我们的生活也围绕者越来越多的 ARM 设备——从树莓派 (Raspberry Pi) 到 Chromebook 以及 Nvidia Shield。为 Intel/AMD 架构的 CPU 而编写的传统发行版并不能够在这些 ARM 架构的设备上运行。而一些为 ARM 而编写的发行版却仅仅只能在特定的硬件上运行,比如只能运行在树莓派 (Raspberry Pi) 上的 Raspbian 系统。这就是为什么 [Arch Linux ARM](http://archlinuxarm.org/) (ALARM) 让人眼前一亮的原因。它是一个基于 Arch Linux 的纯粹由社区主导的发行版,可以在树梅派 (Raspberry Pi)、Chromebook、Android 设备以及 Nvidia Shield 等设备上运行。同时,更好的是,也由于 AUR,你可以安装很多在其他发行版可能无法获取的软件。 ## 结论 @@ -111,7 +111,7 @@ via: http://www.linux.com/news/software/applications/878620-the-best-linux-distr 作者:[Swapnil Bhartiya][a] 译者:[GHLandy](https://github.com/GHLandy) -校对:[mudongliang](https://github.com/mudongliang) +校对:[mudongliang](https://github.com/mudongliang),[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3442410a42843c8d737fe2d58baa763fb8e954e2 Mon Sep 17 00:00:00 2001 From: robot527 Date: Mon, 22 Feb 2016 15:30:56 +0800 Subject: [PATCH 1032/1710] Translating The best open source networking and security software --- ...5--The best open source networking and security software.md | 3 +++ 1 file changed, 3 insertions(+) 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 index 129ce3eff4..78c558b1e6 100644 --- 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 @@ -1,3 +1,6 @@ +robot527 translating + + 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 From 1dd5c99446d1250d643fc6216ebbc901789bcd45 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Mon, 22 Feb 2016 22:31:46 +0800 Subject: [PATCH 1033/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=2020160218=20Best=20Linux=20Desktop=20Environments=20for=2020?= =?UTF-8?q?16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2016:如何选择 Linux 桌面环境 --- .../tech/20160218 Best Linux Desktop Environments for 2016.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160218 Best Linux Desktop Environments for 2016.md b/sources/tech/20160218 Best Linux Desktop Environments for 2016.md index a93d38c21a..7aef79366b 100644 --- a/sources/tech/20160218 Best Linux Desktop Environments for 2016.md +++ b/sources/tech/20160218 Best Linux Desktop Environments for 2016.md @@ -1,3 +1,5 @@ +GHLandy Translating + Best Linux Desktop Environments for 2016 ============================================= From 81dd542a8fe8e62f25b457a42ed2bfc45aca0087 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 23 Feb 2016 09:50:42 +0800 Subject: [PATCH 1034/1710] =?UTF-8?q?20160223-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...er Tools With Wercker’s Open Source CLI.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md diff --git a/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md b/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md new file mode 100644 index 0000000000..81f7467719 --- /dev/null +++ b/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md @@ -0,0 +1,80 @@ +Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI +=========================================== + +For enterprises, containers offer more efficient build environments, cloud-native applications and migration from legacy systems to the cloud. But enterprise adoption of the technology -- Docker specifically -- has been hampered by, among other issues, [a lack of mature developer tools][1]. + +Amsterdam-based [Wercker][2] is one of many early-stage companies looking to meet the need for better tools with its cloud platform for automating microservices and application development, based on Docker. + +The company [announced a $4.5 million Series A][3] funding round this month, which will help it ramp up development on an upcoming on-premise enterprise product. Key to its success, however, will be building a community around its newly [open-sourced CLI][4] tool. Wercker must quickly integrate with myriad other container technologies -- open source Kubernetes and Mesos among them -- to remain competitive in the evolving container space. + +“By open sourcing our CLI technology, we hope to get to dev-prod parity faster and turn “build once, ship anywhere” into an automated reality,” said Wercker CEO and founder Micha Hernández van Leuffen. + +I reached out to van Leuffen to learn more about the company, its CLI tool, and how it’s planning to help grow the pool of enterprise customers actually using containers in production. Below is an edited version of the interview. + +### Linux.com: Can you briefly tell us about Wercker? + +van Leuffen: Wercker is a container-centric platform for automating the development of microservices and applications. + +With Wercker’s Docker-based infrastructure, teams can increase developer velocity with custom automation pipelines using steps that produce containers as artifacts. Once the build passes, users can continue to deploy the steps as specified in the wercker.yml. Continuously repeating these steps allows teams to work in small increments, making it easy to debug and ship faster. + +![](https://www.linux.com/images/stories/66866/wercker-cli.png) + +### Linux.com: How does it help developers? + +van Leuffen: The Wercker CLI helps developers attain greater dev-prod parity. They’re able to release faster and more often because they are developing, building and testing in an environment very similar to that in production. We’ve open sourced the exact same program that we execute in the Wercker cloud platform to run your pipelines. + +### Linux.com: Can you point out some of the features and advantages of your tool as compared to competitors? + +van Leuffen: Unlike some of our competitors, we’re not just offering Docker support. With Wercker, the Docker container is the unit of work. All jobs run inside containers, and each build artifact can be a Docker container. + +Wercker’s Docker container pipeline is completely customizable. A ‘pipeline’ refers to any automated workflow, for instance, a build or deploy pipeline. In those workflows, you want to execute tasks: install dependencies, test your code, push your container, or create a slack notification when something fails, for example. We call these tasks ‘steps,’ and there is no limit to the types of steps created. In fact, we have a marketplace of steps built by the Wercker community. So if you’ve built a step that fits my workflow, I can use that in my pipeline. + +Our Docker container pipelines adapt to any developer workflow. Users can use any Docker container out there — not just those made by or for Wercker. Whether the container is on Docker Hub or a private registry such as CoreOS’s Quay, it works with Wercker. + +Our competitors range from the classic CI/CD tools to larger-scale DevOps solutions like CloudBees. + +### Linux.com: How does it integrate with other cloud technologies? + +van Leuffen: Wercker is vendor-agnostic and can automate development with any cloud platform or service. We work closely with ecosystem partners like Mesosphere, Kubernetes and CoreOS to make integrations as seamless as possible. We also recently partnered with Atlassian to integrate the Wercker platform with Bitbucket. More than 3 million Bitbucket users can install the Wercker Pipeline Viewer and view build status directly from their dashboard. + +### Linux.com: Why did you open source the Wercker CLI tool? + +van Leuffen: Open sourcing the Wercker CLI will help us stay ahead of the curve and strengthen the developer community. The market landscape is changing fast; developers are expected to release more frequently, using infrastructure of increasing complexity. While Docker has solved a lot of infrastructure problems, developer teams are still looking for the perfect tools to test, build and deploy rapidly. + +The Wercker community is already experimenting with these new tools: Kubernetes, Mesosphere, CoreOS. It makes sense to tap that community to create integrations that work with our technology – and make that process as frictionless as possible. By open sourcing our CLI technology, we hope to get to dev-prod parity faster and turn “build once, ship anywhere” into an automated reality. + +### Linux.com: You recently raised over $4.5 million, so how is this fund being used for product development? + +van Leuffen: We’re focused on building out our commercial team and bringing an enterprise product to market. We’ve had a lot of inbound interest from the enterprise looking for VPC and on-premise solutions. While the enterprise is still largely in the discovery stage, we can see the market shifting toward containers. Enterprise software devs need to release often, just like the small, agile teams with whom they are increasingly competing. We need to prove containers can scale, and that Wercker has the organizational permissions and the automation suite to make that process as efficient as possible. + +In addition to continuing to invest in our product, we’ll be focusing our resources on market education and developer evangelism. Developer teams are still looking for the right mix of tools to test, build and deploy rapidly (including Kubernetes, Mesosphere, CoreOS, etc.). As an ecosystem, we need to do more to educate and provide the tutorials and resources to help developers succeed in this changing landscape. + +### Linux.com: What products do you offer and who is your target audience? + +van Leuffen: We currently offer one service level of our product Wercker; however, we’re developing an enterprise offering. Current organizations using Wercker range from startups, such as Open Listings, to larger companies and big agencies, like Pivotal Labs. + + +### Linux.com: What does this recently open-sourced CLI do? + +van Leuffen: Using the Wercker Command Line Interface (CLI), developers can spin up Docker containers on their desktop, automate their build and deploy processes and then deploy them to various cloud providers, like AWS, and scheduler and orchestration platforms, such as Mesosphere and Kubernetes. + +The Wercker Command Line Interface is available as an open source project on GitHub and runs on both OSX and Linux machines. + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/enterprise/systems-management/887177-achieving-enterprise-ready-container-tools-with-werckers-open-source-cli + +作者:[Swapnil Bhartiya][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/community/forums/person/61003 +[1]:http://thenewstack.io/adopting-containers-enterprise/ +[2]:http://wercker.com/ +[3]:http://venturebeat.com/2016/01/28/wercker-raises-4-5-million-open-sources-its-command-line-tool/ +[4]:https://github.com/wercker/wercker + + From de34ee4eff38ed238aefd88c32d27f7d5524f000 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 23 Feb 2016 10:11:49 +0800 Subject: [PATCH 1035/1710] =?UTF-8?q?20160223-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...RM processor for the Internet of Things.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md diff --git a/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md b/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md new file mode 100644 index 0000000000..2acebc8473 --- /dev/null +++ b/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md @@ -0,0 +1,37 @@ +NXP unveils a tiny 64-bit ARM processor for the Internet of Things +========================================================================= + +**TAGS**:[ARM][1], [INTERNET OF THINGS][2], [NXP][3], [NXP SEMICONDUCTORS][4] + +![](http://1u88jj3r4db2x4txp44yqfj1.wpengine.netdna-cdn.com/wp-content/uploads/2016/02/nxp-930x556.jpg) + +[NXP Semiconductors][5] has unveiled what it calls the world’s smallest and lowest-power 64-bit ARM processor for the Internet of Things (IoT). + +The tiny QorIQ LS1012A delivers networking-grade security and performance acceleration to battery-powered, space-constrained applications. This includes powering applications for Internet of Things, or everyday objects that are smart and connected. If IoT is to reach its potential of $1.7 trillion by 2020 (as estimated by market researcher IDC), it’s going to need processors like the new one from NXP, which was unveiled at the Embedded World 2016 event in Nuremberg, Germany. + +The chip has a 64-bit ARMv8 processor with network packet acceleration and built-in security. It fits in a 9.6 mm-square space and draws about 1 watt of power. Potential applications include next-generation IoT gateways, portable entertainment platforms, high-performance portable storage applications, mobile hard disk drives, and mobile storage for cameras, tablets, and other rechargeable devices. + +Additionally, the LS1012A is the first processor designed specifically for an emerging new storage solution, dubbed object-based storage. Object-based storage relies on a smart hard disk drive that is directly connected to the data center’s Ethernet network. The processor must be small enough to be integrated directly on the circuit board for a hard disk drive. + +“The groundbreaking combination of low power, tiny footprint and networking-grade performance of NXP’s LS1012 processor is ideal for consumer, networking and Internet of Things applications alike,” said Tareq Bustami, senior vice president and general manager of NXP’s Digital Networking division, in a statement. “This unique blend of capabilities unleashes embedded systems designers and developers to imagine and create radically innovative end-products across a broad spectrum of high-growth markets.” + +NXP said it is the only 1-watt, 64-bit processor in the market to combine such a comprehensive set of high-speed peripherals in a single chip, thus enabling lower system-level costs. And due to innovative packaging, the processor can be routed on low-cost circuit boards. + +NXP’s LS1012A will be available in April 2016 and can be ordered now. NXP has more than 45,000 employees in 35 countries. + +-------------------------------------------------------------------------------- + +via: http://venturebeat.com/2016/02/21/nxp-unveils-a-small-and-tiny-64-bit-arm-processor-for-the-internet-of-things/ + +作者:[DEAN TAKAHASHI][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://venturebeat.com/author/dean-takahashi/ +[1]:http://venturebeat.com/tag/arm/ +[2]:http://venturebeat.com/tag/internet-of-things/ +[3]:http://venturebeat.com/tag/nxp/ +[4]:http://venturebeat.com/tag/nxp-semiconductors/ +[5]:http://www.nxp.com/ From dd1d0b122aaf6c46de2cd6b0c88aaab8da549b77 Mon Sep 17 00:00:00 2001 From: KS Date: Tue, 23 Feb 2016 10:27:55 +0800 Subject: [PATCH 1036/1710] Update 20160218 Top 4 open source issue tracking tools.md --- sources/tech/20160218 Top 4 open source issue tracking tools.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 Top 4 open source issue tracking tools.md b/sources/tech/20160218 Top 4 open source issue tracking tools.md index b2f784e1e7..060a50db11 100644 --- a/sources/tech/20160218 Top 4 open source issue tracking tools.md +++ b/sources/tech/20160218 Top 4 open source issue tracking tools.md @@ -1,3 +1,4 @@ +wyangsun translating Top 4 open source issue tracking tools ======================================== From 6df2f1212d74a018aeeb2d41e4a29df6c075289b Mon Sep 17 00:00:00 2001 From: BOBO Date: Wed, 24 Feb 2016 12:48:10 +0800 Subject: [PATCH 1037/1710] translating --- ...prise-Ready Container Tools With Wercker’s Open Source CLI.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md b/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md index 81f7467719..2f7d6f7f8d 100644 --- a/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md +++ b/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md @@ -1,5 +1,6 @@ Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI =========================================== +#CoderBOBO translating For enterprises, containers offer more efficient build environments, cloud-native applications and migration from legacy systems to the cloud. But enterprise adoption of the technology -- Docker specifically -- has been hampered by, among other issues, [a lack of mature developer tools][1]. From 14469815a347ce0c13562bd42c906cc4777d2ccd Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 24 Feb 2016 16:29:29 +0800 Subject: [PATCH 1038/1710] =?UTF-8?q?20160224-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Android phone powering big-screen Linux.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md diff --git a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md b/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md new file mode 100644 index 0000000000..29a5c77cd9 --- /dev/null +++ b/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md @@ -0,0 +1,32 @@ +Intel shows budget Android phone powering big-screen Linux +============================================================== + +![](https://regmedia.co.uk/2016/02/23/intel-bigscreen.jpg?x=648&y=348&crop=1) + +**MWC16** Intel is showing what it calls "Big Screen Experience" at Mobile World Congress, an Android smartphone which runs a full Linux desktop when plugged into an external display. + +The concept is broadly similar to Microsoft's Continuum for Windows 10 Mobile, but whereas Continuum devices are towards the high end, Intel's project is aimed, it says, at budget smartphones and emerging markets. + +On display in Barcelona is a prototype SoFIA (Smart or Feature Phone with Intel Architecture) smartphone with an Atom x3 processor, 2GB RAM and 16GB storage, and modified to support an external display. Attach keyboard, mouse and display, and it becomes desktop Linux, with an option to display the Android screen in a window on the large display. + +"Android is based on a Linux kernel, so we're running one kernel, we have an Android stack and a Linux stack, and we're sharing the same context, so the file system is identical. The phone stays fully functional," Intel's Nir Metzer, Path Finding Group Manager, told the Reg. + +"I have a multi-window environment. As soon as I plug in I can do spreadsheets, I can drag and drop, play video. Achieving all this on a low-end platform is a challenge," said Metzer. + +Currently the display on the device goes blank when the external display is attached, but Metzer said that the next version of the Atom X3 will support dual displays. + +The version of Linux used is maintained by Intel. "We need to align between the Linux versions and the Android," said Metzer. "The framework is pre-installed, not an app you can download." + +Intel is pitching the idea at phone manufacturers here at Mobile World Congress, but had nothing to report concerning actual customers for its device. "The chip is ready, this is production-ready. This can go into production tomorrow. It is a business decision," said Metzer.® + +-------------------------------------------------------------------------------- + +via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ + +作者:[Tim Anderson][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.theregister.co.uk/Author/2878 From 6f8f6394d46dd50d9de3e553b7606099e3289761 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 24 Feb 2016 16:34:12 +0800 Subject: [PATCH 1039/1710] =?UTF-8?q?20160224-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...S Parallel File System Goes Open Source.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md diff --git a/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md b/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md new file mode 100644 index 0000000000..d65285a222 --- /dev/null +++ b/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md @@ -0,0 +1,32 @@ +BeeGFS Parallel File System Goes Open Source +================================================== + +![](http://insidehpc.com/wp-content/uploads/2015/08/beegfs.jpg) + +Today ThinkParQ announced that the complete [BeeGFS parallel file system][1] is now available as open source. Developed specifically for performance-critical environments, the BeeGFS parallel file system was developed with a strong focus on easy installation and high flexibility, including converged setups where storage servers are also used for compute jobs. By increasing the number of servers and disks in the system, performance and capacity of the file system can simply be scaled out to the desired level, seamlessly from small clusters up to enterprise-class systems with thousands of nodes. + +The first official announcement to make the BeeGFS sources available was made at the International Supercomputing Conference 2013. This was in the context of the European exascale project [DEEP-ER][2], where several new approaches to address extreme I/O requirements are being designed and implemented. For exascale systems, the different software and hardware layers have to work together very efficiently to achieve maximum scalability. Thus, making the sources of BeeGFS available is one logical step to enabling efficient integration of all layers of an exascale stack. + +“While some of our users are just happy with the fact that BeeGFS is so easy to install and doesn’t require much attention, others really want to understand exactly what is happening under the hood to further optimize the runtime of their applications, improve their monitoring or port it to other platforms like BSD,” said Sven Breuner, CEO of ThinkParQ, the company behind BeeGFS “Also, being able to build BeeGFS for non-x86 architectures like ARM and Power is another important aspect that the community has been waiting for.” + +The steady advances in ARM technology indeed make it a more and more interesting technology to look at for future procurements. Thus, the BeeGFS team is also participating in [ExaNeSt][3], a new European exascale project, which is specifically focused on getting the ARM ecosystem ready for performance-critical workloads. “Although BeeGFS can already run out of the box on ARM systems today, this project will give us the opportunity to make sure that we can deliver the maximum performance on this architecture as well.”, adds Bernd Lietzow, BeeGFS head for ExaNeSt. + +With a rather compact code base of about 25K lines of C++ code for the distributed metadata service and about 15K lines of C++ code for the distributed storage service, BeeGFS should be relatively easy to understand and extend, not only for senior programmers, but also for University students interested in file system research. On GitHub, there are already a number of projects listed related to BeeGFS, e.g. for browser-based monitoring or Docker integration. + +In related news, the [BeeGFS User Meeting][4] will take place May 18-19 in Kaiserslautern, Germany. + +----------------------------------------------------------------------------------------- + +via: http://insidehpc.com/2016/02/beegfs-parallel-file-system-now-open-source/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+InsideHPC+%28insideHPC.com%29 + +作者:[staff][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://insidehpc.com/author/staff/ +[1]: http://www.beegfs.com/ +[2]: http://www.deep-project.eu/deep-project/EN/Home/home_node.html +[3]: http://www.exanest.eu/ +[4]: http://www.beegfs.com/content/user-meeting-2016/ From 1a8398fc6771cc30ba4cf497c9eaf7ef898a3906 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 24 Feb 2016 16:41:13 +0800 Subject: [PATCH 1040/1710] =?UTF-8?q?20160224-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Should Bring Order to Containerization.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md diff --git a/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md b/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md new file mode 100644 index 0000000000..48ea41d7b3 --- /dev/null +++ b/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md @@ -0,0 +1,49 @@ +New Docker Data Center Admin Suite Should Bring Order to Containerization +=============================================================================== + +![](https://tctechcrunch2011.files.wordpress.com/2016/02/shutterstock_119411227.jpg?w=738) + +[Docker][1] announced a new container control center today it’s calling the Docker Datacenter (DDC), an integrated administrative console that has been designed to give large and small businesses control over creating, managing and shipping containers. + +The DDC is a new tool made up of various commercial pieces including Docker Universal Control Plane (which also happens to be generally available today) and Docker Trusted Registry. It also includes open source pieces such as Docker Engine. The idea is to give companies the ability to manage the entire lifecycle of Dockerized applications from one central administrative interface. + +Customers actually were the driving force behind this new tool. While companies liked the agility that Docker containers give them, they also wanted management control over administration, security and governance around the containers they were creating and shipping, Scott Johnston, SVP of product management told TechCrunch. + +The company has called this Containers as a Service (CaaS), mostly because when customers came to them asking for this type of administrative control, that’s how they described it, Johnston said. + + +![](https://tctechcrunch2011.files.wordpress.com/2016/02/screen-shot-2016-02-23-at-7-56-54-am.png?w=680&h=401) + +>Image courtesy of Docker + +Like many open source projects, Docker gained a strong following among developers first, but as it grew in popularity, the companies these developers were working for wanted a straight-forward way to track and manage them. + +That’s exactly what DDC is designed to do. It gives developers the agility they need to create containerized applications, while providing operations with the tools they need to bring order to the process. + +In practice this means that developers can create a set of containerized components, have them approved for deployment by operations and then have access to a library of fully certified images. This lets developers pull the pieces they need across a range of applications without having to reinvent the wheel every time. That should speed up application development and deployment (and add to the agility that containers should in theory be providing in the first place). + +This aspect appealed to Beta customer ADP. The payroll services giant particularly liked having this central repository of images available to developers. + +“As part of our initiative to modernize our business-critical applications to microservices, ADP has been investigating solutions that would enable our developers to leverage a central library of IT-vetted and secured core services that they could rapidly iterate on,” said Keith Fulton, Chief Technology Officer at ADP said in a statement. + +Docker was launched in 2010 by founder Solomon Hykes as dotCloud. He pivoted the company to Docker in 2013, [selling dotCloud in August][2], 2014 to focus completely on Docker. + +The company came out of the gate like gangbusters a couple of years ago raising $180 million ($168 million since becoming Docker) over five rounds, according to CrunchBase. What caught the attention of investors was that Docker offered a way to deliver applications for the modern age called containers, a way of building, managing and shipping distributed applications. + +Containerization enables developers to create these distributed applications made up of small discrete pieces that run across multiple servers, as opposed to the large monolithic applications companies used to create running on a single server. + +Pricing for Docker Datacenter starts at $150 per node per month. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/calico-virtual-private-networking-docker/ + +作者:[ Ron Miller][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://techcrunch.com/author/ron-miller/ +[1]: https://www.docker.com/ +[2]: http://techcrunch.com/2014/08/04/docker-sells-dotcloud-to-cloudcontrol-to-focus-on-core-container-business/ From d2818a9bc4402d2487d9b2f34144aa955850f00b Mon Sep 17 00:00:00 2001 From: Jonathan Kang Date: Wed, 24 Feb 2016 16:44:12 +0800 Subject: [PATCH 1041/1710] Translated --- ... Download] Vi Cheat Sheet For Beginners.md | 80 ------------------- ... Download] Vi Cheat Sheet For Beginners.md | 79 ++++++++++++++++++ 2 files changed, 79 insertions(+), 80 deletions(-) delete mode 100644 sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md create mode 100644 translated/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md diff --git a/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md b/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md deleted file mode 100644 index db69940892..0000000000 --- a/sources/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md +++ /dev/null @@ -1,80 +0,0 @@ -JonathanKang is translating - -[Free Download] Vi Cheat Sheet For Beginners -================================================ - -![](http://itsfoss.com/wp-content/uploads/2016/01/VI.jpg) - -I have often shared my Linux experience with you. Today I am going to share my **Vi cheat sheet** that has often saved me time in googling for a quick command. - -## Basic Vi commands - -This is not a detailed tutorial to teach you each and every aspect of [Vi editor](https://en.wikipedia.org/wiki/Vi). In fact, it’s not a tutorial at all. It’s just a collection of basic Vi commands and their brief description for a quick reference. - -command|explain -:--|:-- -:x |Save the file and quit -:q!|Quit without saving the file -i|Insert starting left of the cursor -a|Append starting right of the cursor -ESC|Exit insert/append mode -arrows|Move cursor -/text|Search string text (case sensitive) -n|Search next occurrence of the searched item -x|Delete character under the cursor -dd|Delete line under the cursor -u|Undo last change -:0|Beginning of the file -:n|Go to line n -G|End of the file -^|Beginning of the line -$|End of the line -:set list|See special characters in the file -yy|Copy the line into the buffer -5yy|Copy 5 lines into the buffer -p|Paste buffer after the current line - -You can download the above cheat sheet in a PDF format from the link below: - -[Download Vi Cheat Sheet](https://drive.google.com/file/d/0By49_3Av9sT1X3dlWkNQa3g2b2c/view?usp=sharing) - -You can print it and keep it at your desk or just save it for offline use. - -## Why I created the Vi cheat sheet? - -Several years ago, when I started working in Linux terminal, the idea of using a command line editor horrified me. I had used desktop Linux before but it was my personal computer so I happily used the GUI text editor like Gedit. But in the working environment, I was stuck with the command line and there was no scope of using a graphical editor. - -I was forced to use Vi for basic edits in the files on remote Linux boxes and this is where I identified and started to admire the power of command line editing tool Vi. - -Since, at that time, I was new at Vi editor, I found myself baffling with it. The first time, I could not even come out of the file because I did not know how to close Vi editor. No shame in accepting that I had to Google it. - -So, I decided to make a list of all the basic commands that I used frequently for editing in Vi. This list or cheat sheet, as you may call it, helped me a lot in my early days with Vi. With time, I grew up with Vi and now I don’t even need to look at the Vi cheat sheet because I have the commands memorized by heart. - -## Why should you use Vi cheat sheet? - -I can understand your situation if you are just getting started with Vi. Your favorite Ctrl+S doesn’t work for saving files. Ctrl+C and Ctrl+V were supposed to be the universal shortcut for copy and paste but it won’t work in Vi universe.Thousands of people use cheat sheets - -Thousands of people use such cheat sheets for various programming languages and `/` or tools that give them a quick reference to commonly used steps `/` commands. Trust me, using cheat sheets among the best practices advised to programmers. - -This Vi cheat sheet will help you a lot if you are just starting with Vi or if you infrequently use the Vi editor (so you keep forgetting the commands). You can save it and use it for quick reference in future, that too offline. - -## Do you like it? - -So far, I have refrained myself from going into too much on terminal side. How do you find this post? Do you want me to share more such cheat sheets and downloadable items? Your suggestions are welcomed. - ------------------------------------------------------------------------------- - -via: http://itsfoss.com/download-vi-cheat-sheet/ - -作者:[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/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md b/translated/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md new file mode 100644 index 0000000000..dbf4ef5011 --- /dev/null +++ b/translated/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md @@ -0,0 +1,79 @@ +【免费下载】初学者Vi备忘单 +================================================ + +![](http://itsfoss.com/wp-content/uploads/2016/01/VI.jpg) + +一直以来,我都在给你们分享我使用Linux的经验。今天我想分享我的**Vi备忘单**。这份备忘单节省了我很多时间,因为我再也不用使用Google去搜索这些命令了。 + +## Basic Vi commands +## 基本Vi命令 + +这并不是一个详尽的教程来教你[Vi编辑器](https://en.wikipedia.org/wiki/Vi)的每一个方面。事实上,这根本就不是一个教程。这仅仅是一些基本Vi命令以及这些命令简单介绍的集合。 + +命令|解释 +:--|:-- +:x |保存文件并退出 +:q!|退出但不保存文件 +i|在光标左侧插入 +a|在光标右侧插入 +ESC|退出插入模式 +arrows|移动光标 +/text|搜索字符串text(大小写敏感) +n|跳到下一个搜索结果 +x|删除当前光标处的字符 +dd|删除当前光标所在的行 +u|撤销上次改变 +:0|将光标移动到文件开头 +:n|将光标移动到第n行 +G|将光标移动到文件结尾 +^|将光标移动到该行开头 +$|将光标移动到该行结尾 +:set list|查看文件中特殊字符 +yy|复制光标所在行 +5yy|复制从光标所在行开始的5行 +p|在光标所在行下面粘贴 + +你可以通过下面的链接下载PDF格式的Vi备忘录: + +[下载Vi备忘录](https://drive.google.com/file/d/0By49_3Av9sT1X3dlWkNQa3g2b2c/view?usp=sharing) + +你可以把它打印出来放到你的办公桌上,或者把它保存到你的电脑上来使用。 + +## 我为什么要建立这个Vi备忘录? + +几年前,当我刚刚接触Linux终端时,使用命令行编辑器这个主意使我一惊。我之前在我自己的电脑上使用过桌面版本的Linux,所以我很乐意使用像Gedit这样的有图形界面的编辑器。但是在工作环境中,我不得不使用命令行,并且无法使用图形界面版的编辑器。 + +我就这么被强迫地使用Vi来对远程Linux终端上的文件做一些基本的编辑。从这时候我开始了解并钦佩Vi的强大之处。 + +因为在那时候我还是一个Vi新手,所以我经常对Vi一些操作很困惑。仍然记得第一次使用Vi的时候,由于我不知道如何退出Vi,所以我都无法关闭某个文件。我也只能通过Google搜索来找到解决办法。我不得不接受这个尴尬的事实。 + +从那以后,我就决定制作一个列表来列出我经常会用到的基本Vi操作。这个列表,或者你可能称它为备忘录。在我早期使用Vi的时候,它对我非常有用。慢慢地,我对Vi更加熟悉,我已经可以熟记那些基本编辑命令。到现在,我甚至不需要再去查看我的Vi备忘录了。 + +## 你为什么需要Vi备忘录? + +我能理解一个刚刚接触Vi的人的感受。你最喜欢的Ctrl+S快捷键不能像在其他编辑器那样方便地保存文件。Ctrl+C和Ctrl+V理应是通用的用来复制和粘贴的快捷键,但是在Vi中却不是这样。 + +很多人都在使用类似的备忘录帮助他们熟悉各种编程语言以及用来进行快速检索的“/”工具。相信我,使用备忘录会给程序员日常工作带来很大便利。 + +如果你刚刚开始接触Vi或者你经常使用但是总是记不住Vi操作,那么这份Vi备忘录对于你来说是非常有用的。你可以把它保存下来留作以后查询使用。 + +## 你怎么看待这份备忘录? + +至今为止,我一直在克制我自己不要过于以来终端。我想知道你是怎么发现这篇文章的?你是否想让我分享更多类似的备忘录出来以供你们下载?我很期待你的意见和建议。 + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/download-vi-cheat-sheet/ + +作者:[ABHISHEK][a] +译者:[JonathanKang](https://github.com/JonathanKang) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ + + + + + From 47727a58486ee50dc5121309ed52e4c7f1aef180 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 24 Feb 2016 16:50:07 +0800 Subject: [PATCH 1042/1710] =?UTF-8?q?20160224-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160204 An Introduction to SELinux.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/tech/20160204 An Introduction to SELinux.md diff --git a/sources/tech/20160204 An Introduction to SELinux.md b/sources/tech/20160204 An Introduction to SELinux.md new file mode 100644 index 0000000000..dc5968ad00 --- /dev/null +++ b/sources/tech/20160204 An Introduction to SELinux.md @@ -0,0 +1,136 @@ +An Introduction to SELinux +=============================== + +![](https://www.linux.com/images/stories/66866/jack2-selinux_a.png) + +>Figure 1: The getenforce command reporting SELinux is set to Enforcing. + +Way back in kernel 2.6, a new security system was introduced to provide a mechanism for supporting access control security policies. This system was [Security Enhanced Linux (SELinux)][1] and was introduced by the [National Security Administration (NSA)][2] to incorporate a strong Mandatory Access Control architecture into the subsystems of the Linux kernel. + +If you’ve spent your entire Linux career either disabling or ignoring SELinux, this article is dedicated to you — an introduction to the system that lives “under the hood” of your Linux desktop or server to limit privilege or even eliminate the possibility of damage should programs or daemons become compromised. + +Before I begin, you should know that SELinux is primarily a tool for Red Hat Linux and its derivatives. The likes of Ubuntu and SUSE (and their derivatives) make use of AppArmor. SELinux and AppArmor are significantly different. You can install SELinux on SUSE, openSUSE, Ubuntu, etc., but it’s an incredibly challenging task unless you’re very well versed in Linux. + +With that said, let me introduce you to SELinux. + +### DAC vs. MAC + +The old-guard standard form of access control on Linux was Discretionary Access Control (DAC). With this form, an application or daemon runs under either User ID (UID) or Set owner User ID (SUID) and holds object permissions (for files, sockets, and other processes) of that user. This made it easier for malicious code to be run with a permission set that would grant it access to crucial subsystems. + +Mandatory Access Control (MAC), on the other hand, enforces the separation of information based on both confidentiality and integrity to enable the confinement of damage. The confinement unit operates independently of the traditional Linux security mechanisms and has no concept of a superuser. + +### How SELinux Works + +Consider these pieces of the SELinux puzzle: + +- Subjects + +- Objects + +- Policy + +- Mode + +When a subject (such as an application) attempts to access an object (such as a file), the SELinux Security Server (inside the kernel) runs a check against the Policy Database. Depending on the current mode, if the SELinux Security Server grants permission, the subject is given access to the object. If the SELinux Security Server denies permission, a denied message is logged in /var/log/messages. + +Sounds relatively simple, right? There’s actually more to it than that, but for the sake of introduction, those are the important steps. + +### The Modes + +SELinux has three modes (which can be set by the user). These modes will dictate how SELinux acts upon subject request. The modes are: + +- Enforcing — SELinux policy is enforced and subjects will be denied or granted access to objects based on the SELinux policy rules + +- Permissive — SELinux policy is not enforced and does not deny access, although denials are logged + +- Disabled — SELinux is completely disabled + +Out of the box, most systems have SELinux set to Enforcing. How do you know what mode your system is currently running? You can use a simple command to report the mode; that command is getenforce. This command is incredibly simple to use (as it has the singular purpose of reporting the SELinux mode). To use this tool, open up a terminal window and issue the command getenforce. The report will come back with either, Enforcing, Permissive, or Disabled (see Figure 1 above). + +Setting the SELinux mode is actually quite simple — depending upon the mode you want to set. Understand this: It is never recommended to set SELinux to Disable. Why? When you do this, you open up the possibility that files on your disk will be mislabeled and require a re-label to fix. It is also not possible to change the mode of a system when it has been booted in Disabled mode. Your best modes are either Enabled or Permissive. + +You can change the SELinux mode from the command line or in the /etc/selinux/config file. To set the mod via command line, you use the setenforce tool. To set the mode to Enforcing, do the following: + +1. Open up a terminal window + +2. Issue the command su and then enter your administrator password + +3. Issue the command setenforce 1 + +4. Issue the command getenforce to ensure the mode has been set (Figure 2) + +![](https://www.linux.com/images/stories/66866/jack-selinux_b.png) + +>Figure 2: Setting the SELinux mode to Enforcing. + +To set the mode to Permissive, do this: + +1. Open up a terminal window + +2. Issue the command su and then enter your administrator password + +3. Issue the command setenforce 0 + +4. Issue the command getenforce to ensure the mode has been set (Figure 3) + +![](https://www.linux.com/images/stories/66866/jack-selinux_c.png) + +>Figure 3: Setting the SELinux mode to Permissive. + +NOTE: Setting the mode via command line overrides the setting in the SELinux config file. + +If you’d prefer to set the mode in the SELinux command file, open up that particular file in your favorite text editor and look for the line: + +>SELINUX=permissive + +You can change the mode to suit your preference and then save the file. + +There is also a third method of changing the SELinux mode (via the bootloader), but I don’t recommend it for a beginning user. + +### Policy Type + +There are two types of SELinux policies: + +- Targeted — only targeted network daemons (dhcpd, httpd, named, nscd, ntpd, portmap, snmpd, squid, and syslogd) are protected + +- Strict — full SELinux protection for all daemons + +You can change the policy type within the /etc/selinux/config file. Open the file in your favorite text editor and look for the line: + +>SELINUXTYPE=targeted + +Change the option in that line to either targeted or strict to match your needs. + +### Checking the Full SELinux Status + +There is a handy SELinux tool you might want to know about that will display a detailed status report of your SELinux-enabled system. The command is run from a terminal window like this: + +>sestatus -v + +You should see output similar to that shown in Figure 4. + +![](https://www.linux.com/images/stories/66866/jack-selinux_d.png) + +>Figure 4: The output of the sestatus -v command. + +### Just Scratching the Surface + +As you might expect, I have only scratched the surface of SELinux. It is quite a complex system and will require diving much deeper to obtain a solid understanding of how it works for you and how you can make it better work for your desktops and servers. I still have yet to cover troubleshooting and creating custom SELinux policies. + +SELinux is a powerful tool that any Linux administrator should know. Now that you’ve been introduced, I highly recommend you return to Linux.com (when more tutorials on the subject are posted) or take a look at the [NSA SELinux documentation][3] for very in-depth tutorials. + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/learn/docs/ldp/883671-an-introduction-to-selinux + +作者:[Jack Wallen][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/community/forums/person/93 +[1]: http://selinuxproject.org/page/Main_Page +[2]: https://www.nsa.gov/research/selinux/ +[3]: https://www.nsa.gov/research/selinux/docs.shtml From cbab5e849861ab2589290cd63cdcf63fb9ddcb77 Mon Sep 17 00:00:00 2001 From: KS Date: Wed, 24 Feb 2016 17:38:38 +0800 Subject: [PATCH 1043/1710] =?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 --- ... Top 4 open source issue tracking tools.md | 64 ------------------- ... Top 4 open source issue tracking tools.md | 63 ++++++++++++++++++ 2 files changed, 63 insertions(+), 64 deletions(-) delete mode 100644 sources/tech/20160218 Top 4 open source issue tracking tools.md create mode 100644 translated/tech/20160218 Top 4 open source issue tracking tools.md diff --git a/sources/tech/20160218 Top 4 open source issue tracking tools.md b/sources/tech/20160218 Top 4 open source issue tracking tools.md deleted file mode 100644 index 060a50db11..0000000000 --- a/sources/tech/20160218 Top 4 open source issue tracking tools.md +++ /dev/null @@ -1,64 +0,0 @@ -wyangsun translating -Top 4 open source issue tracking tools -======================================== - -Life is full of bugs. - -No matter how carefully planned, no matter how much time went into design, any project is going to have unforseen issues when the rubber hits the road in the implementation stage. And that's okay. Perhaps the best measure of resiliency for any organization is not how well they handle things when everything is functioning as planned, but rather, how they handle the speed bumps when they come along. - -A critical tool for any project management workflow, especially in the software development world, is an issue tracker. The basics are simple; allowing bugs to be opened, tracked, and resolved in a collaborative manner, while making it easy to follow the progress. Beyond the basic functionality, there are a lot of options focused on meeting specific needs, features, and use cases, including software development and beyond. You may be familiar with hosted versions of these tools, like [GitHub Issues](https://guides.github.com/features/issues/) or [Launchpad](https://launchpad.net/), some of which are themselves open source. - -So let's take a look at four excellent choices for managing bugs and issues, all open source and all easy to download and host yourself. To be clear, there's no way we could possibly list every issue tracking tool here; instead, these are four of our favorites, based on feature richness and the size of the community behind the project. There are others, to be sure, and if you've got a good case for your favorite not listed here, be sure to let us know which is your favorite tool and what makes it stand out to you, in the comments below. - -## Redmine - -[Redmine](http://www.redmine.org/) is a popular issue tracking tool built on Ruby on Rails and dating back to 2006. Similar in many regards to Trac, another one of our favorites, Redmine is capable of managing multiple projects and integrates with a number of version control systems. In addition to basic issue tracking, Redmine also offers forums, wikis, time tracking tools, and the ability to generate Gantt charts and calendars to track progress. - -Redmine is fairly flexible in its setup, supporting numerous database backends and dozens of languages, and is customizable as well, featuring the ability to add custom fields to issues, users, projects and more. It can be further customized with a number of community-created plugins and themes. - -An [online demo](http://demo.redmine.org/) is available if you’d like to try it out. Redmine is licensed as open source under the [GPL version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html); the source code can be found in the project’s [subversion repository](https://svn.redmine.org/redmine) or mirrored on [GitHub](https://github.com/redmine/redmine). - -![](https://opensource.com/sites/default/files/images/business-uploads/issues-redmine.png) - -## Bugzilla - -[Bugzilla](https://www.bugzilla.org/) is another popular development tool with issue tracking capabilities. As you might have guessed from the name, Bugzilla was originally created by the [Mozilla Foundation](https://www.mozilla.org/en-US/) to track bugs in the development of the then-called Netscape Communicator suite. Ported to Perl from its original Tcl routes for greater accessibility, Bugzilla is one of the older and more widely adopted issue tracking systems, as it is used by a number of well-known open source projects like GNOME, KDE, and the Linux kernel itself. - -Sporting a number of advanced tools, from notifications to duplicate bug detection to shared searches, Bugzilla is certainly a more feature-rich option. Bugzilla has an advanced search system along with a comprehensive reporting tool, capable of generating charts and automated scheduled reports. Like Redmine, Bugzilla is extensible and customizable, both in the fields themselves as well as featuring the ability to create custom workflows for bugs. It also works with many database backends, and many different languages are supported out of the box. - -Bugzilla is licensed under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License), and you can read their [future roadmap](https://www.bugzilla.org/status/roadmap.html) and try out a [demo server](https://landfill.bugzilla.org/) on the official website. - -![](https://opensource.com/sites/default/files/images/business-uploads/issues-bugzilla.png) - -## Trac - -[Trac](http://trac.edgewall.org/browser) describes itself as taking a minimalistic approach to web-based software project management, but don’t confusing minimalism with a lack of features. - -Written in Python, Trac tightly integrates its bug tracking capabilities with its wiki system and a revision control system of your choosing. It features project management capabilities like generating milestones and roadmaps, a customizable reporting system, timelines, support for multiple repositories, built-in spam filtering, and is available in many common languages. Like the other bug trackers we have looked at, has a number of plugins available for it extending its base feature set even further. - -Trac is made available as open source under a modified [BSD license](http://trac.edgewall.org/wiki/TracLicense), though older versions were released under the GPL. You can view Trac’s source in a [self-hosted repository](http://trac.edgewall.org/browser) or check out their [roadmap](http://trac.edgewall.org/wiki/TracRoadmap) for future plans. - -![](https://opensource.com/sites/default/files/images/business-uploads/issues-trac.png) - -## Mantis - -[Mantis](https://www.mantisbt.org/) is the final tool we’ll look at in this collection, a PHP-based bug tracker with a sixteen year history. Another bug tracker with support for many different revision control systems and an event-driven notification system, Mantis has a similar feature set to other tools here. While it does not itself contain a wiki, it integrates with many popular wiki platforms and is localized into many languages. - -Mantis is licensed as open source under the [GPL version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html); you can browse its source code on [GitHub](https://github.com/mantisbt/mantisbt) or check out the self-hosted [roadmap](https://www.mantisbt.org/bugs/roadmap_page.php?project=mantisbt&version=1.3.x) for future plans. For a demo, you can check out their own internal [bug tracker](https://www.mantisbt.org/bugs/my_view_page.php). - -![](https://opensource.com/sites/default/files/images/business-uploads/issues-mantis.png) - -As we notes, these four are not the only options. Looking to explore some others? [Apache Bloodhound](https://issues.apache.org/bloodhound/), [Fossil](http://fossil-scm.org/index.html/doc/trunk/www/index.wiki), [The Bug Genie](http://www.thebuggenie.com/), and many alternatives all have dedicated followings, each with different strengths and weaknesses. In addtion, some of the tools in our [project management](https://opensource.com/business/15/1/top-project-management-tools-2015) roundup have issue tracking capabilities. So, which is your preferred tool for tracking and squashing bugs? - - ------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/2/top-issue-support-and-bug-tracking-tools - -作者:[Jason Baker][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/jason-baker diff --git a/translated/tech/20160218 Top 4 open source issue tracking tools.md b/translated/tech/20160218 Top 4 open source issue tracking tools.md new file mode 100644 index 0000000000..b8f336b120 --- /dev/null +++ b/translated/tech/20160218 Top 4 open source issue tracking tools.md @@ -0,0 +1,63 @@ +排名前4的开源问题追踪工具 +======================================== + +生活充满了漏洞。 + +无论怎样小心计划,无论花多少时间去设计,在执行阶段当轮胎压在路上,任何工程都会有未知的问题。也无妨。也许对于任何一个组织的最佳衡量弹性不是他们如何一切都按计划运行地处理事情,而是,当出现磕磕碰碰时他们处理速度。 + +一个任意工程管理流程的关键工具,特别是在软件开发领域,是一个问题追踪系统。基础很简单;允许漏洞在合作的方式被打开,追踪,和解决,同时很容易跟随进展。除了基本功能,还有很多专注于满足特定需求的选择,和使用案例,包括软件开发和更多。你可能熟悉托管版本的这些工具,像 [GitHub Issues](https://guides.github.com/features/issues/)或者[Launchpad](https://launchpad.net/),这些是他们自己开放的资源。 + +让我们看一看四个管理漏洞和问题的优秀选择,全部开源代码、易于下载和自我托管。要清楚,我们可能没有办法在这里列出每一个问题跟踪工具;然而,这有四个我们偏爱的,基于功能丰富和项目背后的社区项目的规模。还有其他,可以肯定的是,如果你有一个好的理由你喜欢的没有列在这里,一定要让我们知道这是你最喜欢的工具,在下面的评论中使它脱颖而出。 + +## Redmine + +[Redmine](http://www.redmine.org/) 是一个流行的问题追踪工具建立在Ruby on Rails和可以追溯到2006年。很多类似于Trac,另一方面我们最爱的是,Redmine可以管理多个项目然后整合了多种版本控制系统。除了基本问题追踪,Redmine也提供论坛,wiki,时间跟踪工具,和生成甘特图和日历的能力来跟踪项目的进展。 + +Redmine的设置相当灵活,支持多种数据库后端和几十种语言,还是可定制的,可以添加自定义字段到问题,用户,工程和更多。通过社区创建的插件和主题它可以进一步定制。 + +如果你想试一试,一个[在线演示](http://demo.redmine.org/)可提供使用。Redmine在开源[GPL版本2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)下许可;开源代码可以在工程的[svn仓库](https://svn.redmine.org/redmine)或在[GitHub](https://github.com/redmine/redmine)镜像上找到。 + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-redmine.png) + +## Bugzilla + +[Bugzilla](https://www.bugzilla.org/)是另一个流行的有问题追踪功能的开发工具。从名字您可能已经猜到了,Bugzilla最初是[Mozilla基金会](https://www.mozilla.org/en-US/)创建,用来跟踪当时称为网景通信套件开发漏洞的。为了更好的通过性从原来的Tcl移植到Perl路径,Bugzilla是一个比较老的和更广泛采用的问题跟踪系统,因为它用在许多著名的开源项目如GNOME,KDE,Linux内核本身。 + +拥有一些先进的工具,从通知到共享搜索重复的漏洞检测,Bugzilla是一个功能更丰富的选项。Bugzilla有高级搜索系统与全面的报表工具,生成图表和自动化计划报告的能力。像Redmine,Bugzilla是可扩展和可定制的,两者在字段本身像能创建自定义漏洞工作流一样。它也支持多种后端数据库,和自带的多语言支持。 + +Bugzilla在[Mozilla公共许可证](https://en.wikipedia.org/wiki/Mozilla_Public_License)下许可,你可以读取他们[未来路线图](https://www.bugzilla.org/status/roadmap.html)还有在官网测试一个[示例服务](https://landfill.bugzilla.org/) + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-bugzilla.png) + +## Trac + +[Trac](http://trac.edgewall.org/browser)自称是使用基于web简单的方法的软件工程管理软件,但不要混淆极简主义与缺乏功能。 + +python编写,Trac紧密结合它的漏洞跟踪与它的wiki系统和你选择的版本控制系统。项目管理能力突出,如生成的里程碑和路线图,一个可定制的报表系统,大事记,支持多资源库,内置的垃圾邮件过滤,还可以使用很多一般的语言。如其他漏洞追踪软件我们已经看到,有很多插件可进一步扩展其基本特性。 + +Trac是在改进的[BSD许可](http://trac.edgewall.org/wiki/TracLicense)下获得开放源码许可,虽然更老的版本发布在GPL下。你可以在一个[自托管仓库](http://trac.edgewall.org/browser)预览Trac的源码或者查看他们的[路线图](http://trac.edgewall.org/wiki/TracRoadmap)对未来的规划。 + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-trac.png) + +## Mantis + +[Mantis](https://www.mantisbt.org/)是这次收集中我们将看的最后一个工具,一个基于PHP且有16年历史的漏洞跟踪工具。另外漏洞跟踪支持多种不同的版本控制系统和一个事件驱动的通知系统,Mantis有一个与其他工具类似的功能设置。虽然它不本身包含一个wiki,它整合很多流行的wiki平台且本地化到多种语言。 + +Mantis在[GPL版本2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)下获得开源许可证书;你可以在[GitHub](https://github.com/mantisbt/mantisbt)浏览他的源代码或查看自托管[路线图](https://www.mantisbt.org/bugs/roadmap_page.php?project=mantisbt&version=1.3.x)对未来的规划。一个示例,你可以查看他们的内部[漏洞跟踪](https://www.mantisbt.org/bugs/my_view_page.php)。 + +![](https://opensource.com/sites/default/files/images/business-uploads/issues-mantis.png) + +正如我们指出的,这四个不是唯一的选项。想要探索更多?[Apache Bloodhound](https://issues.apache.org/bloodhound/),[Fossil](http://fossil-scm.org/index.html/doc/trunk/www/index.wiki),[The Bug Genie](http://www.thebuggenie.com/),还有很多可替换品都有专注的追随者,每个都有不同的优点和缺点。另外,一些工具在我们[项目管理](https://opensource.com/business/15/1/top-project-management-tools-2015)摘要有问题跟踪功能。所以,哪个是你首选的跟踪和挤压漏洞的工具? + + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/2/top-issue-support-and-bug-tracking-tools + +作者:[Jason Baker][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jason-baker From 9ebe7447e4532865956f9daf127666d418b527f8 Mon Sep 17 00:00:00 2001 From: KS Date: Wed, 24 Feb 2016 17:42:47 +0800 Subject: [PATCH 1044/1710] Update 20160218 Top 4 open source issue tracking tools.md --- .../tech/20160218 Top 4 open source issue tracking tools.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20160218 Top 4 open source issue tracking tools.md b/translated/tech/20160218 Top 4 open source issue tracking tools.md index b8f336b120..d5572a8ff8 100644 --- a/translated/tech/20160218 Top 4 open source issue tracking tools.md +++ b/translated/tech/20160218 Top 4 open source issue tracking tools.md @@ -1,9 +1,9 @@ -排名前4的开源问题追踪工具 +排名前4的开源漏洞追踪工具 ======================================== 生活充满了漏洞。 -无论怎样小心计划,无论花多少时间去设计,在执行阶段当轮胎压在路上,任何工程都会有未知的问题。也无妨。也许对于任何一个组织的最佳衡量弹性不是他们如何一切都按计划运行地处理事情,而是,当出现磕磕碰碰时他们处理速度。 +无论怎样小心计划,无论花多少时间去设计,在执行阶段当轮胎压在路上,任何工程都会有未知的问题。也无妨。也许对于任何一个组织的最佳弹性衡量不是他们如何一切都按计划运行地处理事情,而是,当出现磕磕碰碰时他们处理速度。 一个任意工程管理流程的关键工具,特别是在软件开发领域,是一个问题追踪系统。基础很简单;允许漏洞在合作的方式被打开,追踪,和解决,同时很容易跟随进展。除了基本功能,还有很多专注于满足特定需求的选择,和使用案例,包括软件开发和更多。你可能熟悉托管版本的这些工具,像 [GitHub Issues](https://guides.github.com/features/issues/)或者[Launchpad](https://launchpad.net/),这些是他们自己开放的资源。 From 4aa35794053585c3e94e77f15c8c3a98fe7423ed Mon Sep 17 00:00:00 2001 From: KS Date: Wed, 24 Feb 2016 17:47:30 +0800 Subject: [PATCH 1045/1710] Update 20160218 Top 4 open source issue tracking tools.md --- .../20160218 Top 4 open source issue tracking tools.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/tech/20160218 Top 4 open source issue tracking tools.md b/translated/tech/20160218 Top 4 open source issue tracking tools.md index d5572a8ff8..840a3d80fc 100644 --- a/translated/tech/20160218 Top 4 open source issue tracking tools.md +++ b/translated/tech/20160218 Top 4 open source issue tracking tools.md @@ -11,7 +11,7 @@ ## Redmine -[Redmine](http://www.redmine.org/) 是一个流行的问题追踪工具建立在Ruby on Rails和可以追溯到2006年。很多类似于Trac,另一方面我们最爱的是,Redmine可以管理多个项目然后整合了多种版本控制系统。除了基本问题追踪,Redmine也提供论坛,wiki,时间跟踪工具,和生成甘特图和日历的能力来跟踪项目的进展。 +[Redmine](http://www.redmine.org/) 是一个流行的漏洞追踪工具建立在Ruby on Rails和可以追溯到2006年。很多类似于Trac,另一方面我们最爱的是,Redmine可以管理多个项目然后整合了多种版本控制系统。除了基本问题追踪,Redmine也提供论坛,wiki,时间跟踪工具,和生成甘特图和日历的能力来跟踪项目的进展。 Redmine的设置相当灵活,支持多种数据库后端和几十种语言,还是可定制的,可以添加自定义字段到问题,用户,工程和更多。通过社区创建的插件和主题它可以进一步定制。 @@ -21,17 +21,17 @@ Redmine的设置相当灵活,支持多种数据库后端和几十种语言, ## Bugzilla -[Bugzilla](https://www.bugzilla.org/)是另一个流行的有问题追踪功能的开发工具。从名字您可能已经猜到了,Bugzilla最初是[Mozilla基金会](https://www.mozilla.org/en-US/)创建,用来跟踪当时称为网景通信套件开发漏洞的。为了更好的通过性从原来的Tcl移植到Perl路径,Bugzilla是一个比较老的和更广泛采用的问题跟踪系统,因为它用在许多著名的开源项目如GNOME,KDE,Linux内核本身。 +[Bugzilla](https://www.bugzilla.org/)是另一个流行的有漏洞追踪功能的开发工具。从名字您可能已经猜到了,Bugzilla最初是[Mozilla基金会](https://www.mozilla.org/en-US/)创建,用来跟踪当时称为网景通信套件开发漏洞的。为了更好的通过性从原来的Tcl移植到Perl路径,Bugzilla是一个比较老的和更广泛采用的问题跟踪系统,因为它用在许多著名的开源项目如GNOME,KDE,Linux内核本身。 拥有一些先进的工具,从通知到共享搜索重复的漏洞检测,Bugzilla是一个功能更丰富的选项。Bugzilla有高级搜索系统与全面的报表工具,生成图表和自动化计划报告的能力。像Redmine,Bugzilla是可扩展和可定制的,两者在字段本身像能创建自定义漏洞工作流一样。它也支持多种后端数据库,和自带的多语言支持。 -Bugzilla在[Mozilla公共许可证](https://en.wikipedia.org/wiki/Mozilla_Public_License)下许可,你可以读取他们[未来路线图](https://www.bugzilla.org/status/roadmap.html)还有在官网测试一个[示例服务](https://landfill.bugzilla.org/) +Bugzilla在[Mozilla公共许可证](https://en.wikipedia.org/wiki/Mozilla_Public_License)下许可,你可以读取他们[未来路线图](https://www.bugzilla.org/status/roadmap.html)还有在官网尝试一个[示例服务](https://landfill.bugzilla.org/) ![](https://opensource.com/sites/default/files/images/business-uploads/issues-bugzilla.png) ## Trac -[Trac](http://trac.edgewall.org/browser)自称是使用基于web简单的方法的软件工程管理软件,但不要混淆极简主义与缺乏功能。 +[Trac](http://trac.edgewall.org/browser)自称是使用简单的方法基于web的软件工程管理软件,但不要混淆极简主义与缺乏功能。 python编写,Trac紧密结合它的漏洞跟踪与它的wiki系统和你选择的版本控制系统。项目管理能力突出,如生成的里程碑和路线图,一个可定制的报表系统,大事记,支持多资源库,内置的垃圾邮件过滤,还可以使用很多一般的语言。如其他漏洞追踪软件我们已经看到,有很多插件可进一步扩展其基本特性。 From 83e522b07505011ffe88486379bebed5f0967c68 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 24 Feb 2016 21:20:10 +0800 Subject: [PATCH 1046/1710] Translated --- ...Releases Free Linux IDE for 32-Bit MCUs.md | 43 +++++++-------- ...Releases Free Linux IDE for 32-Bit MCUs.md | 55 +++++++++++++++++++ 2 files changed, 76 insertions(+), 22 deletions(-) create mode 100644 translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md diff --git a/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md index 313bf3b9e5..adc5404a2c 100644 --- a/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md +++ b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md @@ -1,53 +1,52 @@ -martin -ST Releases Free Linux IDE for 32-Bit MCUs +意法半导体为 32 位 微控制器发布了一款自由的 Linux 集成开发环境 ================================================= ![](http://www.linux.com/images/stories/66866/STM32_Nucleo_expansion_board.jpg) -The 32-bit microcontroller world is starting to open up to Linux. This week, leading ARM Cortex-M vendor STMicroelectronics (ST) [released](http://www.st.com/web/en/press/p3781) a free Linux desktop version of its development software for its line of STM32 microcontroller units (MCUs). The tools include ST’s STM32CubeMX configurator and initialization tool, as well as its [System Workbench for STM32 (SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) , an Eclipse-based IDE created by Ac6 Tools. SW4STM32 is supported with toolchain, forums, blogs, and technical support by the [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) development community. +32 位微控制器世界向 Linux 敞开大门。本周,领先的 ARM Cortex-M 供应商意法半导体(ST)[发布了](http://www.st.com/web/en/press/p3781) 一款自由的 Linux 桌面版开发程序,该软件面向其旗下的 STM32 微控制单元(MCU)。包含了 ST 的 STM32CubeMX 配置器和初始化工具,以及其 STM32 [系统工作台(SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) ,这个基于 Eclipse 的 IDE 由工具 Ac6 创建。支撑 SW4STM32 的工具链,论坛,博客以及技术会由 [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) 开发社区提供。 -"The Linux community is known to attract creative free-thinkers who are adept at sharing ideas and solving challenges efficiently," stated Laurent Desseignes, Microcontroller Ecosystem Marketing Manager, Microcontroller Division, STMicroelectronics. "We are now making it ultra-easy for them to apply their skills to create imaginative new products, leveraging the features and performance of our STM32 family." +“Linux 社区以吸引富有创意的自由思想者而闻名,他们善于交流心得、高效地克服挑战。” Laurent Desseignes,意法半导体微控制器产品部,微控制器生态系统市场经理这么说道:“我们正着手做的是让他们能极端简单的借力 STM32 系列的特性和性能施展自己的才能,运用到富有想象力的新产品的创造中去。 -Linux is the leading platform for Internet of Things gateways and hubs, as well as higher-end IoT endpoints. Yet, much of the IoT revolution, as well as the wearables market, is based on tiny, low-power microcontrollers, increasingly Cortex-M chips. A small subset of these can run the stripped-down uCLinux (see below), but none support more comprehensive Linux distributions. Instead, they are controlled with real-time operating systems (RTOSes) or go bare-bones with no OS at all. The firmware development work is typically done on a Windows-based Integrated Development Environment (IDE). +Linux 是物联网(IoT)网关和枢纽,及高端 IoT 终端的领先平台。但是,大部分 IoT 革命,以及可穿戴设备市场基于小型的低功耗微控制器,对 Cortex-M 芯片的运用越来越多。虽然其中的一小部分可以运行精简的 uCLinux (见下文),却没能支持更全面的 Linux 发行版。取而代之的是实时操作系统(RTOS)们或者有时干脆不用 OS 来控制。固件的开发工作一般会在基于 Windows 的集成开发环境(IDE)上完成。 -With ST’s free tools, Linux developers can more easily tap this new realm. ST’s tools, some of which should also be available for Mac OS/X in the second quarter, work with [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) boards, Discovery kits, and Evaluation boards. The Nucleo boards are available in 32-, 64-, and 144-pin versions, and offer hardware add-ons such as Arduino connectors. +通过 ST 的自由工具,Linux 开发者们可以更容易的开疆拓土。ST 工具中的一些技术在第二季度应该登录 Mac OS/X 平台,与 [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) ,开发套件,以及评估板同时面世。Nucleo 支持 32 针, 64 针, 和 144 针的版本,并且提供类似 Arduino 连接器这样的插件。 -The STM32CubeMX configurator and SW4STM32 IDE enable Linux developers to configure microcontrollers and develop and debug code. SW4STM32 supports the ST-LINK/V2 debugging tool under Linux via an adapted version of the [OpenOCD](http://openocd.org/) community project. +STM32CubeMX 配置器和 IDE SW4STM32 使 Linux 开发者能够配置微控制器并开发调试代码。SW4STM32 支持在 Linux 下通过社区更改版的 [OpenOCD](http://openocd.org/) 使用调试工具 ST-LINK/V2。 -The software is compatible with microcontroller firmware within the STM32Cube embedded-software packages or Standard Peripheral Library, says ST. Targets include ST’s full range of MCUs, from entry-level Cortex-M0 cores to high-performing M7 chips, including M0+, M3, and DSP-extended M4 cores. +据 ST 称,软件兼容 STM32Cube 软件包及标准外设库中的微控制器固件。目标是囊括 ST 的全系列 MCU,从入门级的 Cortex-M0 内核到高性能的 M7 芯片,包括 M0+,M3 和 DSP 扩展的 M4 内核。 -ST is not the first 32-bit MCU vendor to offer Linux-ready IDEs for Cortex-M chips, but it appears to be one of the first major free Linux platforms. For example, NXP, whose share of the MCU market increased with its recent acquisition of Freescale (Kinetis MCUs, among others), offers an [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO) with Linux, Windows, and Mac support. However, LPCXpresso costs $450 per individual seat. +ST 并非首个为 Linux 准备 Cortex-M 芯片 IDE 的 32 位 MCU 供应商,但似乎是第一大自由的 Linux 平台。例如NXP,MCU 的市场份额随着近期收购了 Freescale (Kinetis 系列 MCU,等)而增加,提供了一款 IDE [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO)支持 Linux 、Windows 和 Mac。然而,LPCXpresso 每份售价 $450。 -Microsemi, which integrates Cortex-M3 chips in its [SmartFusion FPGA SoCs](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3) has a [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support) available for Red Hat Enterprise Linux (RHEL) in addition to Windows. However, Libero requires a license, and the RHEL version lacks support for add-on packages such as FlashPro and SoftConsole. +在其 [SmartFusion FPGA 系统级芯片(SoC)](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3)上集成了 Cortex-M3 芯片的Microsemi,拥有一款 IDE [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support)适用于 RHEL 和 Windows。然而,Libero 需求许可证,并且 RHEL 版缺乏如 FlashPro 和 SoftConsole 的插件。 -## Why Learn MCU-Speak? +## 为什么要学习 MCU? -Even if a Linux developer has no plans to load uClinux on a Cortex-M chip, knowledge of MCUs should come in handy. This is especially true with complex, heterogeneous IoT projects that extend from MCU-based endpoints to cloud platforms. +即便 Linux 开发者并没有计划在 Cortex-M 上使用 uClinux,但是 MCU 的知识总会派上用场。特别是牵扯到复杂的 IoT 工程,需要扩展 MCU 终端至云端。 -For prototyping and hobbyist projects, an interface to an Arduino board offers fairly easy access to MCU benefits. Yet beyond prototyping, developers often replace the Arduino board and its 8-bit ATmega32u4 MCU with a faster 32-bit Cortex-M chip with additional functionality. This includes improved memory addressing, independent clock settings for the core and various buses, and in the case of some [Cortex-M7](http://www.electronicsnews.com.au/products/stm32-mcus-with-arm-cortex-m7-processors-and-graph) chips, rudimentary graphics. +对于历程和业余爱好者的项目,Arduino 板为其访问 MCU 提供了非常便利的接口。然而历程之外,开发者常常就会用更快的 32 位 Cortex-M 芯片以及所带来的附加功能来替代 Arduino 板和板上的那块 8 位 MCU ATmega32u4。这些附加功能包括改进的存储器寻址,用于芯片和各种总线的独立时钟设置,以及芯片 [Cortex-M7](http://www.electronicsnews.com.au/products/stm32-mcus-with-arm-cortex-m7-processors-and-graph)自带的入门级显示芯片。 -Other categories where MCU development skills might come in handy include wearables, where low power, low cost, and small size give MCUs an edge, and robotics and drones where real-time processing and motor control are the main benefits. In robotics, you’re likely to see Cortex-A and Cortex-M both integrated in the same product. +还有些可能需求 MCU 开发技术的地方有:可穿戴设备、低功耗、低成本和小尺寸给了 MCU 一席之地,还有机器人和无人机这些使用实时处理和电机控制的地方更为受用。在机器人上,你更是有可能看看 Cortex-A 与 Cortex-M 集成在同一个产品中的样子。 -There’s also a modest trend toward system-on-chips adding MCUs to Linux-driven Cortex-A cores, as with the [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/). While most embedded projects don’t use such hybrid SoCs or combine applications processor and MCUs on the same product, developers may increasingly find themselves working on product lines that extend from low-end MCU models to Linux- or Android-driven Cortex-A based designs. +对于 SoC 芯片还有这样的一种温和的局势,即将 MCU 加入到 Linux 驱动的 Cortex-A 核心中,就如同 [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/)。虽然大多数的嵌入式项目并不使用这种混合型 SoC 或者说将应用处理器和 MCU 结合在同一产品中,但开发者会渐渐地发现自己工作的生产线、设计所基于的芯片正渐渐的从低端的 MCU 模块发展到 Linux 或安卓驱动的 Cortex-A。 -## uClinux Stakes Linux Claim in MCUs +## uClinux 是 Linux 在 MCU 领域的筹码 -With the rise of IoT, we’re starting to see more SBCs and computer-on-modules that run uClinux on 32-bit MCUs. Unlike other Linux distributions, uClinux does not require a memory management unit (MMU). uClinux does, however, have higher memory requirements than most MCUs can meet. The distro requires higher end Cortex-M4 and Cortex-M4 MCUs with built-in memory controllers supporting external DRAM chips. +随着物联网的兴起,我们见到越来越多的 SBC 和模块计算机,它们在 32 位的 MCU 上运行着 uClinux。不同于其他的 Linux 发行版,uClinux 并不需要内存管理单元(MMU)。然而,uClinux 对市面上可见 MCU 有更高的内存需求。需求更高端的 Cortex-M4 和 Cortex-M4 微控制器内置内存控制器来支持外部 DRAM 芯片。 -[Amptek’s iCon](http://www.semiconductorstore.com/Amptek/) SBCs run uClinux on NXP LPC Cortex-M3 and -M4 chips, offering familiar trappings like WiFi, Bluetooth, USB, and other interfaces. Arrow’s [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) IoT development kit runs uClinux on an Emcraft Systems SmartFusion2 COM based on Microsemi’s 166MHz, Cortex-M3/FPGA SmartFusion2 hybrid SoC. +[Amptek](http://www.semiconductorstore.com/Amptek/) SBC 在 NXP LPC Cortex-M3 和 -M4 芯片上运行 uClinux,以提供常用的功能类似 WiFi、蓝牙、USB 等众多接口。Arrow 的 [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) 物联网开发套件将 uClinux 运行于 SmartFusion2 模块计算机的 Emcraft 系统上,该模块计算机是 Microsemi 的 166MHz Cortex-M3/FPGA SmartFusion2 混合 SoC。 -[Emcraft](http://www.emcraft.com/), which sells uClinux-based COMs based on ST and NXP, as well as Microsemi MCUs, has been actively promoting the role of uClinux on 32-bit MCUs. Increasingly, uClinux is up against ARM’s own [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/), at least on high-end MCU projects that require wireless communications and more sophisticated rules-based operation. Proponents of Mbed and modern, open source RTOSes like FreeRTOS say that uClinux requires too much RAM overhead to make it affordable for IoT endpoints. However, Emcraft and other uCLinux proponents claim the costs are overstated, and are worth the more extensive Linux wireless and interface support available even in a stripped down distro like uClinux. +[Emcraft](http://www.emcraft.com/) 销售基于 uClinux 的模块计算机,有 ST 和 NXP 的,也有 Microsemi 的 MCU,是 32 位 MCU 上积极推进 uClinux 的重要角色。日益频繁的 uClinux 开始了与 ARM 本身 [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/)的对抗,至少在高端的 MCU 工程中需要无线通信和更为复杂的操作规则。Mbed 和 modern 的支持者,开源的 RTOS 们,类似 FreeRTOS 认为 uClinux 需要对 RAM 的需求太高以至于难以压低 IoT 终端的价格然而 Emcraft 与其他 uCLinux 拥趸表示价格并没有如此夸张,而且扩展 Linux 的无线和接口也是相当值得的,即使只是在像 uClinux 这样的精简版上。 -When asked for comment on the ST release, Emcraft director of engineering Vladimir Khusainov had this to say: “ST’s decision to port its development tools to Linux is good news for Emcraft since it allows Linux users an easy way to start working with embedded STM MCUs. We expect that, having had a chance to get familiar with STM devices using the ST configurator and embedded libraries, some of those users may become interested in running embedded Linux (in its uClinux form) on the target.” +当被问及对于这次 ST 发布的看法,Emcraft 的主任工程师 Vladimir Khusainov 表示:”ST决定将这款开发工具 移植至 Linux 对于 Emcraft 是个好消息,它使得 Linux 用户能轻易的在嵌入式 STM MCU 上展开工作。我们希望那些有机会熟悉 STM 设备,使用 ST 配置器和嵌入式库的用户可以对在目标机上使用嵌入式 Linux (以 uClinux 的形式)感兴趣。“ -For a recent overview of uClinux on Cortex-M4, check out this [slide show](http://events.linuxfoundation.org/sites/events/files/slides/optimize-uclinux.pdf) from last year’s Embedded Linux Conference by Jim Huang and Jeff Liaw. More on Cortex-M processors in general may be found in this tidy [AnandTech overview](http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores). +最近关于 Cortex-M4 上运行 uClinux 的概述,可以查看去年 Jim Huang 与 Jeff Liaws 在嵌入式 Linux 大会上使用的[幻灯片](http://events.linuxfoundation.org/sites/events/files/slides/optimize-uclinux.pdf)。更多关于 Cortex-M 处理器可以查看这里过的 [AnandTech 总结](http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores)。 ------------------------------------------------------------------------------ via: http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[martin2011qi](https://github.com/martin2011qi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md new file mode 100644 index 0000000000..e6dc9cca97 --- /dev/null +++ b/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md @@ -0,0 +1,55 @@ +ST 为 32 位 MCU 发布了一款自由的 Linux IDE +================================================= + +![](http://www.linux.com/images/stories/66866/STM32_Nucleo_expansion_board.jpg) + +32 位微控制器世界向 Linux 敞开大门。本周,领先的 ARM Cortex-M 供应商意法半导体(ST)[发布了](http://www.st.com/web/en/press/p3781) 一款自由的 Linux 桌面版开发程序,该软件面向其旗下的 STM32 微控制单元(MCU)。包含了 ST 的 STM32CubeMX 配置器和初始化工具,以及其 STM32 [系统工作台(SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) ,这个基于 Eclipse 的 IDE 由工具 Ac6 创建。支撑 SW4STM32 的工具链,论坛,博客以及技术会由 [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) 开发社区提供。 + +"Linux 社区以吸引富有创意的自由思想者而闻名,他们善于交流心得、高效地克服挑战。” Laurent Desseignes,意法半导体微控制器产品部,微控制器生态系统市场经理这么说道:“我们正着手做的是让他们能极端简单的借力 STM32 系列的特性和性能施展自己的才能,运用到富有想象力的新产品的创造中去。 + +Linux 是物联网(IoT)网关和枢纽,及高端 IoT 终端的领先平台。但是,大部分 IoT 革命,以及可穿戴设备市场基于小型的低功耗微控制器,对 Cortex-M 芯片的运用越来越多。虽然其中的一小部分可以运行精简的 uCLinux (见下文),却没能支持更全面的 Linux 发行版。取而代之的是实时操作系统(RTOS)们或者干脆不用 OS来控制。固件的开发工作一般会在基于 Windows 的集成开发环境(IDE)上完成。 + +通过 ST 的自由工具,Linux 开发者们可以更容易的开疆拓土。ST 工具中的一些技术在第二季度应该登录 Mac OS/X 平台,与 [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) ,开发套件,以及评估板同时面世。Nucleo 支持 32 针, 64 针, 和 144 针的版本,并且提供类似 Arduino 连接器这样的插件。 + +STM32CubeMX 配置器和 IDE SW4STM32 是 Linux 开发者能够配置微控制器并开发调试代码。SW4STM32 支持在 Linux 下通过社区更改版的 [OpenOCD](http://openocd.org/) 使用调试工具 ST-LINK/V2。 + +据 ST 称,软件兼容 STM32Cube 软件包及标准外设库中的微控制器固件。目标是囊括 ST 的全系列 MCU,从入门级的 Cortex-M0 内核到高性能的 M7 芯片,包括 M0+,M3 和 DSP 扩展的 M4 内核。 + +ST 并非首个为 Linux 准备 Cortex-M 芯片 IDE 的 32 位 MCU 供应商,但似乎是第一大自由的 Linux 平台之一。例如NXP,MCU 的市场份额随着近期收购了 Freescale (Kinetis 系列 MCU,等)而增加,提供了一款 IDE [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO)支持 Linux 、Windows 和 Mac。然而,LPCXpresso 每份售价 $450。 + +在其 [SmartFusion FPGA SoCs](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3)上集成了 Cortex-M3 芯片的拥有一款 IDE [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support)适用于 RHEL 和 Windows。然而,Libero 需求许可证,并且 RHEL 版缺乏插件,比如 FlashPro 和 SoftConsole。 + +## 为什么要学习 MCU? + +即便 Linux 开发者并没有计划在 Cortex-M 上使用 uClinux,但是 MCU 的知识总会派上用场。特别是牵扯到复杂的 IoT 工程,需要扩展 MCU 终端至云端。 + +对于历程和业余爱好者的项目,Arduino 板为其访问 MCU 提供了非常便利的接口。然而历程之外,开发者常常就会用更快的 32 位 Cortex-M 芯片以及所带来的附加功能来替代 Arduino 板和板上的那块 8 位 MCU ATmega32u4。这些附加功能包括改进的存储器寻址,用于芯片和各种总线的独立时钟设置,以及芯片 [Cortex-M7](http://www.electronicsnews.com.au/products/stm32-mcus-with-arm-cortex-m7-processors-and-graph)自带的入门级显示芯片。 + +还有些可能需求 MCU 开发技术的地方有:可穿戴设备、低功耗、低成本和小尺寸给了 MCU 一席之地,还有机器人和无人机这些使用实时处理和电机控制的地方更为受用。在机器人上,你更是有可能看看 Cortex-A 与 Cortex-M 集成在同一个产品中的样子。 + +对于 SoC 芯片还有这样的一种温和的局势,即将 MCU 加入到 Linux 驱动的 Cortex-A 核心中,就如同 [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/)。 +虽然大多数的嵌入式项目并不使用这种混合型 SoC 或者说将应用处理器和 MCU 结合在同一产品中,但开发者会渐渐地发现自己工作的生产线、设计所基于的芯片正渐渐的从低端的 MCU 模块发展到 Linux 或安卓驱动的 Cortex-A。 + +## uClinux 是 Linux 在 MCU 领域的筹码 + +随着物联网的兴起,我们见到越来越多的 SBC 和模块计算机,它们在 32 位的 MCU 上运行着 uClinux。不同于其他的 Linux 发行版,uClinux 并不需要内存管理单元(MMU)。然而,uClinux 对市面上可见 MCU 有更高的内存需求。需求更高端的 Cortex-M4 和 Cortex-M4 微控制器内置内存控制器来支持外部 DRAM 芯片。 + +[Amptek 图标](http://www.semiconductorstore.com/Amptek/) SBC 在 NXP LPC Cortex-M3 和 -M4 芯片上运行 uClinux,以提供常用的功能类似 WiFi、蓝牙、USB 等众多接口。Arrow 的 [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) 物联网开发套件将 uClinux 运行于 SmartFusion2 模块计算机的 Emcraft 系统上,该模块计算机是 Microsemi 的 166MHz Cortex-M3/FPGA SmartFusion2 混合片上系统。 + +[Emcraft](http://www.emcraft.com/) 销售基于 uClinux 的模块计算机,有 ST 和 NXP 的,也有 Microsemi 的 MCU,是 32 位 MCU 上积极推进 uClinux 的重要角色。日益频繁的 uClinux 开始了与 ARM 本身 [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/)的对抗,至少在高端的 MCU 工程中需要无线通信和更为复杂的操作规则。Mbed 和 modern 的支持者,开源的 RTOS 们,类似 FreeRTOS 认为 uClinux 需要对 RAM 的需求太高以至于难以压低 IoT 终端的价格然而 Emcraft 与其他 uCLinux 拥趸表示价格并没有如此夸张,而且扩展 Linux 的无线和接口也是相当值得的,即使只是在像 uClinux 这样的精简版上。 + +当被问及对于这次 ST 发布的看法,Emcraft 的主任工程师 Vladimir Khusainov 表示:”ST决定将这款开发工具 移植至 Linux 对于 Emcraft 是个好消息,它使得 Linux 用户能轻易的在嵌入式 STM MCU 上展开工作。我们希望那些有机会熟悉 STM 设备,使用 ST 配置器和嵌入式库的用户可以对在目标机上使用嵌入式 Linux (以 uClinux的形式)感兴趣。“ + +最近关于 Cortex-M4 上运行 uClinux 的概述,可以查看去年 Jim Huang 与 Jeff Liaws 在嵌入式 Linux 大会上使用的[幻灯片](http://events.linuxfoundation.org/sites/events/files/slides/optimize-uclinux.pdf)。更多关于 Cortex-M 处理器可以查看这里过的 [AnandTech 总结](http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores)。 + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus + +作者:[Arun Pyasi][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/42808 From d1651db94c4b1d12851701b18978ac91e18f4729 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 24 Feb 2016 21:24:27 +0800 Subject: [PATCH 1047/1710] Translated --- ...Releases Free Linux IDE for 32-Bit MCUs.md | 54 ------------------- ...Releases Free Linux IDE for 32-Bit MCUs.md | 19 ++++--- 2 files changed, 9 insertions(+), 64 deletions(-) delete mode 100644 sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md diff --git a/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md deleted file mode 100644 index adc5404a2c..0000000000 --- a/sources/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md +++ /dev/null @@ -1,54 +0,0 @@ -意法半导体为 32 位 微控制器发布了一款自由的 Linux 集成开发环境 -================================================= - -![](http://www.linux.com/images/stories/66866/STM32_Nucleo_expansion_board.jpg) - -32 位微控制器世界向 Linux 敞开大门。本周,领先的 ARM Cortex-M 供应商意法半导体(ST)[发布了](http://www.st.com/web/en/press/p3781) 一款自由的 Linux 桌面版开发程序,该软件面向其旗下的 STM32 微控制单元(MCU)。包含了 ST 的 STM32CubeMX 配置器和初始化工具,以及其 STM32 [系统工作台(SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) ,这个基于 Eclipse 的 IDE 由工具 Ac6 创建。支撑 SW4STM32 的工具链,论坛,博客以及技术会由 [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) 开发社区提供。 - -“Linux 社区以吸引富有创意的自由思想者而闻名,他们善于交流心得、高效地克服挑战。” Laurent Desseignes,意法半导体微控制器产品部,微控制器生态系统市场经理这么说道:“我们正着手做的是让他们能极端简单的借力 STM32 系列的特性和性能施展自己的才能,运用到富有想象力的新产品的创造中去。 - -Linux 是物联网(IoT)网关和枢纽,及高端 IoT 终端的领先平台。但是,大部分 IoT 革命,以及可穿戴设备市场基于小型的低功耗微控制器,对 Cortex-M 芯片的运用越来越多。虽然其中的一小部分可以运行精简的 uCLinux (见下文),却没能支持更全面的 Linux 发行版。取而代之的是实时操作系统(RTOS)们或者有时干脆不用 OS 来控制。固件的开发工作一般会在基于 Windows 的集成开发环境(IDE)上完成。 - -通过 ST 的自由工具,Linux 开发者们可以更容易的开疆拓土。ST 工具中的一些技术在第二季度应该登录 Mac OS/X 平台,与 [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) ,开发套件,以及评估板同时面世。Nucleo 支持 32 针, 64 针, 和 144 针的版本,并且提供类似 Arduino 连接器这样的插件。 - -STM32CubeMX 配置器和 IDE SW4STM32 使 Linux 开发者能够配置微控制器并开发调试代码。SW4STM32 支持在 Linux 下通过社区更改版的 [OpenOCD](http://openocd.org/) 使用调试工具 ST-LINK/V2。 - -据 ST 称,软件兼容 STM32Cube 软件包及标准外设库中的微控制器固件。目标是囊括 ST 的全系列 MCU,从入门级的 Cortex-M0 内核到高性能的 M7 芯片,包括 M0+,M3 和 DSP 扩展的 M4 内核。 - -ST 并非首个为 Linux 准备 Cortex-M 芯片 IDE 的 32 位 MCU 供应商,但似乎是第一大自由的 Linux 平台。例如NXP,MCU 的市场份额随着近期收购了 Freescale (Kinetis 系列 MCU,等)而增加,提供了一款 IDE [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO)支持 Linux 、Windows 和 Mac。然而,LPCXpresso 每份售价 $450。 - -在其 [SmartFusion FPGA 系统级芯片(SoC)](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3)上集成了 Cortex-M3 芯片的Microsemi,拥有一款 IDE [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support)适用于 RHEL 和 Windows。然而,Libero 需求许可证,并且 RHEL 版缺乏如 FlashPro 和 SoftConsole 的插件。 - -## 为什么要学习 MCU? - -即便 Linux 开发者并没有计划在 Cortex-M 上使用 uClinux,但是 MCU 的知识总会派上用场。特别是牵扯到复杂的 IoT 工程,需要扩展 MCU 终端至云端。 - -对于历程和业余爱好者的项目,Arduino 板为其访问 MCU 提供了非常便利的接口。然而历程之外,开发者常常就会用更快的 32 位 Cortex-M 芯片以及所带来的附加功能来替代 Arduino 板和板上的那块 8 位 MCU ATmega32u4。这些附加功能包括改进的存储器寻址,用于芯片和各种总线的独立时钟设置,以及芯片 [Cortex-M7](http://www.electronicsnews.com.au/products/stm32-mcus-with-arm-cortex-m7-processors-and-graph)自带的入门级显示芯片。 - -还有些可能需求 MCU 开发技术的地方有:可穿戴设备、低功耗、低成本和小尺寸给了 MCU 一席之地,还有机器人和无人机这些使用实时处理和电机控制的地方更为受用。在机器人上,你更是有可能看看 Cortex-A 与 Cortex-M 集成在同一个产品中的样子。 - -对于 SoC 芯片还有这样的一种温和的局势,即将 MCU 加入到 Linux 驱动的 Cortex-A 核心中,就如同 [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/)。虽然大多数的嵌入式项目并不使用这种混合型 SoC 或者说将应用处理器和 MCU 结合在同一产品中,但开发者会渐渐地发现自己工作的生产线、设计所基于的芯片正渐渐的从低端的 MCU 模块发展到 Linux 或安卓驱动的 Cortex-A。 - -## uClinux 是 Linux 在 MCU 领域的筹码 - -随着物联网的兴起,我们见到越来越多的 SBC 和模块计算机,它们在 32 位的 MCU 上运行着 uClinux。不同于其他的 Linux 发行版,uClinux 并不需要内存管理单元(MMU)。然而,uClinux 对市面上可见 MCU 有更高的内存需求。需求更高端的 Cortex-M4 和 Cortex-M4 微控制器内置内存控制器来支持外部 DRAM 芯片。 - -[Amptek](http://www.semiconductorstore.com/Amptek/) SBC 在 NXP LPC Cortex-M3 和 -M4 芯片上运行 uClinux,以提供常用的功能类似 WiFi、蓝牙、USB 等众多接口。Arrow 的 [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) 物联网开发套件将 uClinux 运行于 SmartFusion2 模块计算机的 Emcraft 系统上,该模块计算机是 Microsemi 的 166MHz Cortex-M3/FPGA SmartFusion2 混合 SoC。 - -[Emcraft](http://www.emcraft.com/) 销售基于 uClinux 的模块计算机,有 ST 和 NXP 的,也有 Microsemi 的 MCU,是 32 位 MCU 上积极推进 uClinux 的重要角色。日益频繁的 uClinux 开始了与 ARM 本身 [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/)的对抗,至少在高端的 MCU 工程中需要无线通信和更为复杂的操作规则。Mbed 和 modern 的支持者,开源的 RTOS 们,类似 FreeRTOS 认为 uClinux 需要对 RAM 的需求太高以至于难以压低 IoT 终端的价格然而 Emcraft 与其他 uCLinux 拥趸表示价格并没有如此夸张,而且扩展 Linux 的无线和接口也是相当值得的,即使只是在像 uClinux 这样的精简版上。 - -当被问及对于这次 ST 发布的看法,Emcraft 的主任工程师 Vladimir Khusainov 表示:”ST决定将这款开发工具 移植至 Linux 对于 Emcraft 是个好消息,它使得 Linux 用户能轻易的在嵌入式 STM MCU 上展开工作。我们希望那些有机会熟悉 STM 设备,使用 ST 配置器和嵌入式库的用户可以对在目标机上使用嵌入式 Linux (以 uClinux 的形式)感兴趣。“ - -最近关于 Cortex-M4 上运行 uClinux 的概述,可以查看去年 Jim Huang 与 Jeff Liaws 在嵌入式 Linux 大会上使用的[幻灯片](http://events.linuxfoundation.org/sites/events/files/slides/optimize-uclinux.pdf)。更多关于 Cortex-M 处理器可以查看这里过的 [AnandTech 总结](http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores)。 - ------------------------------------------------------------------------------- - -via: http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus - -作者:[Arun Pyasi][a] -译者:[martin2011qi](https://github.com/martin2011qi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linux.com/community/forums/person/42808 diff --git a/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md index e6dc9cca97..adc5404a2c 100644 --- a/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md +++ b/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md @@ -1,23 +1,23 @@ -ST 为 32 位 MCU 发布了一款自由的 Linux IDE +意法半导体为 32 位 微控制器发布了一款自由的 Linux 集成开发环境 ================================================= ![](http://www.linux.com/images/stories/66866/STM32_Nucleo_expansion_board.jpg) 32 位微控制器世界向 Linux 敞开大门。本周,领先的 ARM Cortex-M 供应商意法半导体(ST)[发布了](http://www.st.com/web/en/press/p3781) 一款自由的 Linux 桌面版开发程序,该软件面向其旗下的 STM32 微控制单元(MCU)。包含了 ST 的 STM32CubeMX 配置器和初始化工具,以及其 STM32 [系统工作台(SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) ,这个基于 Eclipse 的 IDE 由工具 Ac6 创建。支撑 SW4STM32 的工具链,论坛,博客以及技术会由 [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) 开发社区提供。 -"Linux 社区以吸引富有创意的自由思想者而闻名,他们善于交流心得、高效地克服挑战。” Laurent Desseignes,意法半导体微控制器产品部,微控制器生态系统市场经理这么说道:“我们正着手做的是让他们能极端简单的借力 STM32 系列的特性和性能施展自己的才能,运用到富有想象力的新产品的创造中去。 +“Linux 社区以吸引富有创意的自由思想者而闻名,他们善于交流心得、高效地克服挑战。” Laurent Desseignes,意法半导体微控制器产品部,微控制器生态系统市场经理这么说道:“我们正着手做的是让他们能极端简单的借力 STM32 系列的特性和性能施展自己的才能,运用到富有想象力的新产品的创造中去。 -Linux 是物联网(IoT)网关和枢纽,及高端 IoT 终端的领先平台。但是,大部分 IoT 革命,以及可穿戴设备市场基于小型的低功耗微控制器,对 Cortex-M 芯片的运用越来越多。虽然其中的一小部分可以运行精简的 uCLinux (见下文),却没能支持更全面的 Linux 发行版。取而代之的是实时操作系统(RTOS)们或者干脆不用 OS来控制。固件的开发工作一般会在基于 Windows 的集成开发环境(IDE)上完成。 +Linux 是物联网(IoT)网关和枢纽,及高端 IoT 终端的领先平台。但是,大部分 IoT 革命,以及可穿戴设备市场基于小型的低功耗微控制器,对 Cortex-M 芯片的运用越来越多。虽然其中的一小部分可以运行精简的 uCLinux (见下文),却没能支持更全面的 Linux 发行版。取而代之的是实时操作系统(RTOS)们或者有时干脆不用 OS 来控制。固件的开发工作一般会在基于 Windows 的集成开发环境(IDE)上完成。 通过 ST 的自由工具,Linux 开发者们可以更容易的开疆拓土。ST 工具中的一些技术在第二季度应该登录 Mac OS/X 平台,与 [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) ,开发套件,以及评估板同时面世。Nucleo 支持 32 针, 64 针, 和 144 针的版本,并且提供类似 Arduino 连接器这样的插件。 -STM32CubeMX 配置器和 IDE SW4STM32 是 Linux 开发者能够配置微控制器并开发调试代码。SW4STM32 支持在 Linux 下通过社区更改版的 [OpenOCD](http://openocd.org/) 使用调试工具 ST-LINK/V2。 +STM32CubeMX 配置器和 IDE SW4STM32 使 Linux 开发者能够配置微控制器并开发调试代码。SW4STM32 支持在 Linux 下通过社区更改版的 [OpenOCD](http://openocd.org/) 使用调试工具 ST-LINK/V2。 据 ST 称,软件兼容 STM32Cube 软件包及标准外设库中的微控制器固件。目标是囊括 ST 的全系列 MCU,从入门级的 Cortex-M0 内核到高性能的 M7 芯片,包括 M0+,M3 和 DSP 扩展的 M4 内核。 -ST 并非首个为 Linux 准备 Cortex-M 芯片 IDE 的 32 位 MCU 供应商,但似乎是第一大自由的 Linux 平台之一。例如NXP,MCU 的市场份额随着近期收购了 Freescale (Kinetis 系列 MCU,等)而增加,提供了一款 IDE [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO)支持 Linux 、Windows 和 Mac。然而,LPCXpresso 每份售价 $450。 +ST 并非首个为 Linux 准备 Cortex-M 芯片 IDE 的 32 位 MCU 供应商,但似乎是第一大自由的 Linux 平台。例如NXP,MCU 的市场份额随着近期收购了 Freescale (Kinetis 系列 MCU,等)而增加,提供了一款 IDE [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO)支持 Linux 、Windows 和 Mac。然而,LPCXpresso 每份售价 $450。 -在其 [SmartFusion FPGA SoCs](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3)上集成了 Cortex-M3 芯片的拥有一款 IDE [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support)适用于 RHEL 和 Windows。然而,Libero 需求许可证,并且 RHEL 版缺乏插件,比如 FlashPro 和 SoftConsole。 +在其 [SmartFusion FPGA 系统级芯片(SoC)](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3)上集成了 Cortex-M3 芯片的Microsemi,拥有一款 IDE [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support)适用于 RHEL 和 Windows。然而,Libero 需求许可证,并且 RHEL 版缺乏如 FlashPro 和 SoftConsole 的插件。 ## 为什么要学习 MCU? @@ -27,18 +27,17 @@ ST 并非首个为 Linux 准备 Cortex-M 芯片 IDE 的 32 位 MCU 供应商, 还有些可能需求 MCU 开发技术的地方有:可穿戴设备、低功耗、低成本和小尺寸给了 MCU 一席之地,还有机器人和无人机这些使用实时处理和电机控制的地方更为受用。在机器人上,你更是有可能看看 Cortex-A 与 Cortex-M 集成在同一个产品中的样子。 -对于 SoC 芯片还有这样的一种温和的局势,即将 MCU 加入到 Linux 驱动的 Cortex-A 核心中,就如同 [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/)。 -虽然大多数的嵌入式项目并不使用这种混合型 SoC 或者说将应用处理器和 MCU 结合在同一产品中,但开发者会渐渐地发现自己工作的生产线、设计所基于的芯片正渐渐的从低端的 MCU 模块发展到 Linux 或安卓驱动的 Cortex-A。 +对于 SoC 芯片还有这样的一种温和的局势,即将 MCU 加入到 Linux 驱动的 Cortex-A 核心中,就如同 [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/)。虽然大多数的嵌入式项目并不使用这种混合型 SoC 或者说将应用处理器和 MCU 结合在同一产品中,但开发者会渐渐地发现自己工作的生产线、设计所基于的芯片正渐渐的从低端的 MCU 模块发展到 Linux 或安卓驱动的 Cortex-A。 ## uClinux 是 Linux 在 MCU 领域的筹码 随着物联网的兴起,我们见到越来越多的 SBC 和模块计算机,它们在 32 位的 MCU 上运行着 uClinux。不同于其他的 Linux 发行版,uClinux 并不需要内存管理单元(MMU)。然而,uClinux 对市面上可见 MCU 有更高的内存需求。需求更高端的 Cortex-M4 和 Cortex-M4 微控制器内置内存控制器来支持外部 DRAM 芯片。 -[Amptek 图标](http://www.semiconductorstore.com/Amptek/) SBC 在 NXP LPC Cortex-M3 和 -M4 芯片上运行 uClinux,以提供常用的功能类似 WiFi、蓝牙、USB 等众多接口。Arrow 的 [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) 物联网开发套件将 uClinux 运行于 SmartFusion2 模块计算机的 Emcraft 系统上,该模块计算机是 Microsemi 的 166MHz Cortex-M3/FPGA SmartFusion2 混合片上系统。 +[Amptek](http://www.semiconductorstore.com/Amptek/) SBC 在 NXP LPC Cortex-M3 和 -M4 芯片上运行 uClinux,以提供常用的功能类似 WiFi、蓝牙、USB 等众多接口。Arrow 的 [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) 物联网开发套件将 uClinux 运行于 SmartFusion2 模块计算机的 Emcraft 系统上,该模块计算机是 Microsemi 的 166MHz Cortex-M3/FPGA SmartFusion2 混合 SoC。 [Emcraft](http://www.emcraft.com/) 销售基于 uClinux 的模块计算机,有 ST 和 NXP 的,也有 Microsemi 的 MCU,是 32 位 MCU 上积极推进 uClinux 的重要角色。日益频繁的 uClinux 开始了与 ARM 本身 [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/)的对抗,至少在高端的 MCU 工程中需要无线通信和更为复杂的操作规则。Mbed 和 modern 的支持者,开源的 RTOS 们,类似 FreeRTOS 认为 uClinux 需要对 RAM 的需求太高以至于难以压低 IoT 终端的价格然而 Emcraft 与其他 uCLinux 拥趸表示价格并没有如此夸张,而且扩展 Linux 的无线和接口也是相当值得的,即使只是在像 uClinux 这样的精简版上。 -当被问及对于这次 ST 发布的看法,Emcraft 的主任工程师 Vladimir Khusainov 表示:”ST决定将这款开发工具 移植至 Linux 对于 Emcraft 是个好消息,它使得 Linux 用户能轻易的在嵌入式 STM MCU 上展开工作。我们希望那些有机会熟悉 STM 设备,使用 ST 配置器和嵌入式库的用户可以对在目标机上使用嵌入式 Linux (以 uClinux的形式)感兴趣。“ +当被问及对于这次 ST 发布的看法,Emcraft 的主任工程师 Vladimir Khusainov 表示:”ST决定将这款开发工具 移植至 Linux 对于 Emcraft 是个好消息,它使得 Linux 用户能轻易的在嵌入式 STM MCU 上展开工作。我们希望那些有机会熟悉 STM 设备,使用 ST 配置器和嵌入式库的用户可以对在目标机上使用嵌入式 Linux (以 uClinux 的形式)感兴趣。“ 最近关于 Cortex-M4 上运行 uClinux 的概述,可以查看去年 Jim Huang 与 Jeff Liaws 在嵌入式 Linux 大会上使用的[幻灯片](http://events.linuxfoundation.org/sites/events/files/slides/optimize-uclinux.pdf)。更多关于 Cortex-M 处理器可以查看这里过的 [AnandTech 总结](http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores)。 From a0a37c0fbaa909b1cfa2ad7d7c4f26488f362312 Mon Sep 17 00:00:00 2001 From: runningwater Date: Thu, 25 Feb 2016 00:15:02 +0800 Subject: [PATCH 1048/1710] =?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 --- ...isk in Linux CentOS 7 Without Rebooting.md | 174 ------------------ ...isk in Linux CentOS 7 Without Rebooting.md | 173 +++++++++++++++++ 2 files changed, 173 insertions(+), 174 deletions(-) delete mode 100644 sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md create mode 100644 translated/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md diff --git a/sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md b/sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md deleted file mode 100644 index 006d4f9905..0000000000 --- a/sources/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md +++ /dev/null @@ -1,174 +0,0 @@ -(翻译中 by runningwater) -How to Add New Disk in Linux CentOS 7 Without Rebooting -================================================================================ - -Increasing disk spaces on the Linux servers is a daily routine work for very system administrator. So, in this article we are going to show you some simple simple steps that you can use to increase your disk spaces on Linux CentOS 7 without rebooting to your production server using Linux commands. We will cover multiple methods and possibilities to increase and add new disks to the Linux systems, so that you can follow the one that you feel comfortable while using according to your requirements. - -### 1. Increasing Disk of VM Guest: ### - -Before increasing the disk volume inside your Linux system, you need to add a new disk or increase the one its has already attached with the system by editing its settings from your VMware vShere, Workstation or any other infrastructure environment that you are using. - -![Increase disk](http://blog.linoxide.com/wp-content/uploads/2016/02/1.png) - -### 2. Check Disk Space: ### - -Run the following command to check the current size of your disk space. - - # df -h - # fdisk -l - -![Fdisk check](http://blog.linoxide.com/wp-content/uploads/2016/02/2.png) - -Here we can see that the total disk size is still the same that is 10 GB while we have already increased it to 50 GB from the back end. - -### 3. Expanding Space without Rebooting VM ### - -Now run the following commands to expand the disk space in the physical volume of the Operating System without rebooting the virtual machine by Re-scanning the SCSI Bus and then adding SCSI Device. - - # ls /sys/class/scsi_host/ - # echo "- - -" > /sys/class/scsi_host/host0/scan - # echo "- - -" > /sys/class/scsi_host/host1/scan - # echo "- - -" > /sys/class/scsi_host/host2/scan - -Check the names of your SCSI devices and then rescan the SCSI buses using below commands. - - # ls /sys/class/scsi_device/ - # echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan - # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan - -That will rescan the current scsi bus and the disk size that we increased from the VM guest settings will be show up as you can see in the below image. - -![Rescan disk device](http://blog.linoxide.com/wp-content/uploads/2016/02/3.png) - -### 4. New Disk Partition: ### - -Once you are able to see the increased disk space inside your system then the run the following command to format your disk for creating a new partition by following the steps to increase your physical disk volume. - - # fdisk /dev/sda - Welcome to fdisk (util-linux 2.23.2) press the 'm' key for help - Command (m for help): m - Command action - a toggle a bootable flag - b edit bsd disklabel - c toggle the dos compatibility flag - d delete a partition - g create a new empty GPT partition table - G create an IRIX (SGI) partition table - l list known partition types - m print this menu - n add a new partition - o create a new empty DOS partition table - p print the partition table - q quit without saving changes - s create a new empty Sun disklabel - t change a partition's system id - u change display/entry units - v verify the partition table - w write table to disk and exit - x extra functionality (experts only) - - Command (m for help): - -Type the 'p' to print the current partition table then create a new primary partition by typing the 'n' key and selecting the available sectors. Change the disk type to 'Linux LVM' by using 't' command and selecting the code to '8e' or leave as it to its default type that is '83'. - -Now write the table to disk and exit by Entring 'w' key as shown. - - Command (m for help): w - The partition table has been altered! - - Calling ioctl() to re-read partition table. - - WARNING: Re-reading the partition table failed with error 16: Device or resource busy. - The kernel still uses the old table. The new table will be used at - the next reboot or after you run partprobe(8) or kpartx(8) - -![New disk Volume](http://blog.linoxide.com/wp-content/uploads/2016/02/3A.png) - -### 5. Creating Physical Volume: ### - -As indicated above run the 'partprobe' or kpartx command so that the tables are ready to use and then create the new Physical Volume using the below commands. - - # partprobe - # pvresize /dev/sda3 - -To check the newly created volume run the following command to see if the new physical volume has been created and visible. After that we will extend the Volume Group 'centos' with the newly create Physical Volume as shown. - - # pvdisplay - # vgextend centos /dev/sda3 - -![Extend volume Group](http://blog.linoxide.com/wp-content/uploads/2016/02/3B.png) - -### 6. Extending Logical Volume: ### - -Now we will extend the Logical Volume to increase the disk space on it using the the below command. - - # lvextend -L +40G /dev/mapper/centos-root - -Once you get the successfully increased message, run the command as shown below to extend the size of your logical volume . - - # xfs_growfs /dev/mapper/centos-root - -The size of the '/' partition has been increased successfully, you can check the size of your disk drives by using the 'df' command as shown. - -![Increase disk space](http://blog.linoxide.com/wp-content/uploads/2016/02/3C.png) - -### 7. Extending Root Partition by Adding New Disk Without Reboot: ### - -This is the second method with but with quite similar commands to increase the size of the Logical volume in CentOS 7. - -So, the first step is to Open the setting of your VM guest settings and click on the 'Add' new button and proceed to the next option. - -![Add new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3D.png) - -Choose the required configuration for the new disk by selecting the size of the new disk and its type as shown in the below image. - -![New disk setup](http://blog.linoxide.com/wp-content/uploads/2016/02/3E.png) - -Then come to the server side and repeat the following commands to scan your disk devices to the new disk is visible on the system. - - # echo "- - -" > /sys/class/scsi_host/host0/scan - # echo "- - -" > /sys/class/scsi_host/host1/scan - # echo "- - -" > /sys/class/scsi_host/host2/scan - -List the names of your SCSi devices - - # ls /sys/class/scsi_device/ - # echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/rescan - # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan - # echo 1 > /sys/class/scsi_device/3\:0\:0\:0/device/rescan - # fdisk -l - -![Scanning new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3F.png) - -Once the new disk is visible run the below commands to create the new physical volume and add it to the volume group as shown. - - # pvcreate /dev/sdb - # vgextend centos /dev/sdb - # vgdisplay - -![Extending Volume Group](http://blog.linoxide.com/wp-content/uploads/2016/02/3G.png) - -Now extend the Logical Volume by adding the disk space on it and then add it to the root partition. - - # lvextend -L +20G /dev/mapper/centos-root - # xfs_growfs /dev/mapper/centos-root - # df -h - -![Increase / Partition](http://blog.linoxide.com/wp-content/uploads/2016/02/3H.png) - -### Conclusion: ### - -Managing disk partitions in Linux CentOS 7 is a simple process to increase the disk space of any of your logical volumes by using the steps as described in this article. You don't need to give your production server's reboot for this purpose but simply rescan your SCSi devices and expand your desired LVM. We hope you find this article much helpful. Feel free to leave your valuable comments or suggestions. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/add-new-disk-centos-7-without-rebooting/ - -作者:[Kashif S][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/ \ No newline at end of file diff --git a/translated/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md b/translated/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md new file mode 100644 index 0000000000..adfb7f556f --- /dev/null +++ b/translated/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md @@ -0,0 +1,173 @@ +如何在CentOS 7 中添加新磁盘而不用重启系统 +================================================================================ + +对大多数系统管理员来说扩充 Linux 服务器的磁盘空间是日常的工作之一。因此这篇文章会在通过使用 Linux 命令,在 CentOS 7 系统上演示一些简单的操作步骤来扩充您的磁盘空间而不需要重启您的生产服务器。关于扩充和增加新的磁盘到 Linux 系统,我们会提及多种方法和多种可行性,所以可按您所需选择最适用的一种。 + +### 1. 为虚拟机客户端扩充磁盘空间: ### + +在为 Linux 系统增加磁盘卷之前,您需要添加一块新的物理磁盘或是从正使用的 VMware vShere、工作站或着其它的基础虚拟环境软件中进行设置,从而扩充一块系统正使用的虚拟磁盘空间。 + +![Increase disk](http://blog.linoxide.com/wp-content/uploads/2016/02/1.png) + +### 2. 检查磁盘空间: ### + +运行如下命令来检查当前磁盘空间大小。 + + # df -h + # fdisk -l + +![Fdisk check](http://blog.linoxide.com/wp-content/uploads/2016/02/2.png) + +可以看到,虽然我们已经在后端给其增加到 50 GB 的空间,但此时的总磁盘大小仍然为 10 GB。 + +### 3. 扩展空间而无需重启虚拟机 ### + +现在运行如下命令就可以来扩展操作系统的物理卷磁盘空间,而且不需要重启虚拟机,系统会重新扫描 SCSI (注:Small Computer System Interface 小型计算机系统接口)总线并添加 SCSI 设备。 + + # ls /sys/class/scsi_host/ + # echo "- - -" > /sys/class/scsi_host/host0/scan + # echo "- - -" > /sys/class/scsi_host/host1/scan + # echo "- - -" > /sys/class/scsi_host/host2/scan + +使用下面的命令来检查 SCSI 设备的名称,然后重新扫描 SCSI 总线。 + + # ls /sys/class/scsi_device/ + # echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan + +如下图所示,会重新扫描 SCSI 总线,随后我们从虚拟机客户端设置的磁盘大小会正常显示。 + +![Rescan disk device](http://blog.linoxide.com/wp-content/uploads/2016/02/3.png) + +### 4. 创建新磁盘分区: ### + +一旦在系统中可以看到扩展的磁盘空间,就可以运行如下命令来格式化您的磁盘以创建一个新的分区。请按如下操作步骤来扩充您的物理磁盘卷。 + + # fdisk /dev/sda + Welcome to fdisk (util-linux 2.23.2) press the 'm' key for help + Command (m for help): m + Command action + a toggle a bootable flag + b edit bsd disklabel + c toggle the dos compatibility flag + d delete a partition + g create a new empty GPT partition table + G create an IRIX (SGI) partition table + l list known partition types + m print this menu + n add a new partition + o create a new empty DOS partition table + p print the partition table + q quit without saving changes + s create a new empty Sun disklabel + t change a partition's system id + u change display/entry units + v verify the partition table + w write table to disk and exit + x extra functionality (experts only) + + Command (m for help): + +键入 'p' 来查看当前的分区表信息,然后键入 'n' 键来创建一个新的主分区,选择所有可用的扇区。 使用 't' 命令改变磁盘类型为 'Linux LVM',然后选择编码 '8e' 或者默认不选,它默认的类型编码为 '83'。 + +现在输入 'w' 来保存分区表信息并且退出命令环境,如下示: + + Command (m for help): w + The partition table has been altered! + + Calling ioctl() to re-read partition table. + + WARNING: Re-reading the partition table failed with error 16: Device or resource busy. + The kernel still uses the old table. The new table will be used at + the next reboot or after you run partprobe(8) or kpartx(8) + +![New disk Volume](http://blog.linoxide.com/wp-content/uploads/2016/02/3A.png) + +### 5. 创建物理卷: ### + +根据提示运行 'partprob' 或 'kpartx' 命令以使分区表被真正使用,然后使用如下的命令来创建新的物理卷。 + + # partprobe + # pvresize /dev/sda3 + +要检查新创建的卷,运行如下的命令可以看出新的物理卷是否已经被创建,是否可用。接下来,我们就可以使用这个新的物理卷来扩展 'centos' 卷组了,如下示: + + # pvdisplay + # vgextend centos /dev/sda3 + +![Extend volume Group](http://blog.linoxide.com/wp-content/uploads/2016/02/3B.png) + +### 6. 扩展逻辑卷: ### + +现在我们使用如下的命令扩展逻辑卷,以增加我们系统正使用的磁盘空间。 + + # lvextend -L +40G /dev/mapper/centos-root + +一旦返回增加成功的消息,就可以运行如下命令来扩展您的逻辑卷大小。 + + # xfs_growfs /dev/mapper/centos-root + +'/' 分区的大小已经成功的增加了,可以使用 'df' 命令来检查您磁盘驱动的大小。如图示。 + +![Increase disk space](http://blog.linoxide.com/wp-content/uploads/2016/02/3C.png) + +### 7. 通过增加新的磁盘来扩充根分区而不用重启系统: ### + +这是第二种方法,它使用的命令非常简单, 用来增加 CentOS 7 系统上逻辑卷空间大小。 + +所以第一步是打开您的虚拟机客户端的设置页面,点击 ‘增加’ 按纽,然后继续下一步操作。 + +![Add new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3D.png) + +选择新磁盘所需要的配置信息,如下图所示的,选择新磁盘的大小和它的类型。 + +![New disk setup](http://blog.linoxide.com/wp-content/uploads/2016/02/3E.png) + +然后进入服务端重复如下的命令来扫描您的磁盘设备,以使新磁盘在系统中可见。 + + # echo "- - -" > /sys/class/scsi_host/host0/scan + # echo "- - -" > /sys/class/scsi_host/host1/scan + # echo "- - -" > /sys/class/scsi_host/host2/scan + +列出您的 SCSI 设备的名称 + + # ls /sys/class/scsi_device/ + # echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan + # echo 1 > /sys/class/scsi_device/3\:0\:0\:0/device/rescan + # fdisk -l + +![Scanning new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3F.png) + +一旦新增的磁盘可见就可以运行下面的命令来创建新的物理卷,然后增加到卷组,如下示。 + + # pvcreate /dev/sdb + # vgextend centos /dev/sdb + # vgdisplay + +![Extending Volume Group](http://blog.linoxide.com/wp-content/uploads/2016/02/3G.png) + +现在根据此磁盘的空间大小来扩展逻辑卷,然后添加到根分区。 + + # lvextend -L +20G /dev/mapper/centos-root + # xfs_growfs /dev/mapper/centos-root + # df -h + +![Increase / Partition](http://blog.linoxide.com/wp-content/uploads/2016/02/3H.png) + +### 结论: ### + +在 Linux CentOS 7 系统上,使用这篇文章所述的操作步骤来扩充您的任意逻辑卷的磁盘空间,此管理磁盘分区的操作过程是非常简单的。您不需要重启生产线上的服务器,只是简单的重扫描下 SCSI 设备,和扩展您想要的 LVM(逻辑卷管理)。我们希望这文章对您有用。可自由的发表有用的评论和建议。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/add-new-disk-centos-7-without-rebooting/ + +作者:[Kashif S][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/ \ No newline at end of file From bbb269101a9672cf1ca04064ec2f7fa0c6f20359 Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Thu, 25 Feb 2016 09:58:56 +0800 Subject: [PATCH 1049/1710] name1e5s translating... --- .../20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md b/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md index 0d503b3010..14ef0ed776 100644 --- a/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md +++ b/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md @@ -1,3 +1,5 @@ +name1e5s translating + Manjaro Linux Is Coming To ARM With Manjaro-ARM =================================================== From 7d010d7154513d78166dc19c4cf5f4d02e0f5aee Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Thu, 25 Feb 2016 10:48:13 +0800 Subject: [PATCH 1050/1710] [translated] 20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md --- ...Linux Is Coming To ARM With Manjaro-ARM.md | 33 ------------------- ...Linux Is Coming To ARM With Manjaro-ARM.md | 31 +++++++++++++++++ 2 files changed, 31 insertions(+), 33 deletions(-) delete mode 100644 sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md create mode 100644 translated/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md diff --git a/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md b/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md deleted file mode 100644 index 14ef0ed776..0000000000 --- a/sources/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md +++ /dev/null @@ -1,33 +0,0 @@ -name1e5s translating - -Manjaro Linux Is Coming To ARM With Manjaro-ARM -=================================================== - -![](http://itsfoss.com/wp-content/uploads/2016/02/manjaro-arm.jpg) - -Recently, the developers of Manjaro have announced the release of an [alpha build for ARM devices](https://manjaro.github.io/Manjaro-ARM-launched/). This is a big step for the Arch-based distro, which up until this point only ran on 32 and 64-bit PCs. - -According to the announcement, “[Manjaro Arm](http://manjaro-arm.org/) is a project aimed to bring you the simplicity and customability that is Manjaro to [ARM devices](https://www.arm.com/). These devices are growing in numbers and can be used for any number of applications. Most famous is the Raspberry Pi series and BeagleBoard series.” The alpha build only supports the Raspberry Pi 2, but that will undoubtedly grow with time. - -The developers currently include dodgejcr, Torei, Strit, and Ringo32. They are looking for more people to help the project grow and develop. Besides developers, [they are looking for maintainers, moderators and admins, and artists](http://manjaro-arm.org/forums/website/looking-for-contributors/?PHPSESSID=876d5c11400e9c25eb727e9965300a9a). - -Manjaro-ARM will be available in four different versions. The Media Edition will allow you to create a media center with very little configuration and will run Kodi. The Server Edition will come with SSH, FTP, and a LAMP server preconfigured so you can use your ARM device as a file or web server. The Base Edition acts as the desktop edition, with an XFCE desktop. If you want to build you own system from scratch, the Minimal Edition is your choice. It will come with no preloaded packages or desktop, only have a root user. - -## Final Thoughts - -As a fan of Manjaro (I have it installed on 4 computers), I’m glad to hear that they are branching out into the ARM world. ARM is being used in more and more devices. According to technology commentator Robert Cringely, [device makers are starting to look at cheap ARM chips over more expensive Intel or AMD chips](http://www.cringely.com/2016/01/21/prediction-8-intel-starts-to-become-irrelevent/). Even Microsoft (please don’t strike me down) is thinking of porting some of its software to ARM. As the use of ARM powered devices increase, Manjaro will be ready to give those users a great Linux experience. - -What do you think? Do you wish that more Linux distros would create ARM ports? Or do you think that ARM is a passing fad? Tell us below. - ------------------------------------------------------------------------------- - -via: http://itsfoss.com/manjaro-linux-arm/ - -作者:[JOHN PAUL][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/john/ - diff --git a/translated/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md b/translated/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md new file mode 100644 index 0000000000..80670c5c7b --- /dev/null +++ b/translated/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md @@ -0,0 +1,31 @@ +Manjaro Linux 即将推出支持 ARM 处理器的 Manjaro-ARM +=================================================== + +![](http://itsfoss.com/wp-content/uploads/2016/02/manjaro-arm.jpg) + +最近,Manjaro 的开发者为 ARM 处理器发布了一个[ alpha 版本](https://manjaro.github.io/Manjaro-ARM-launched/)。这是这个基于 Arhclinux 的发行版的一大进步,在此之前,它只能在 32 位或者 64 位的个人电脑上运行。 + +根据公告, “[Manjaro Arm](http://manjaro-arm.org/) 项目致力于将简洁可定制的 Manjaro 移植到使用[ ARM 处理器](https://www.arm.com/)的设备上去。这些设备的数量正在上涨并且应用范围广泛。这些设备中最出名的是树莓派和 BeagleBoard“。目前 Alpha 版本仅支持树莓派2,但是毫无疑问,支持的设备数量会随时间增长。 + +现在这个项目的开发者有 dodgejcr, Torei, Strit, 和 Ringo32。他们正在寻求更多的人来帮助这个项目发展。除了开发者,[他们还在寻找维护者,论坛版主,管理员,以及设计师](http://manjaro-arm.org/forums/website/looking-for-contributors/?PHPSESSID=876d5c11400e9c25eb727e9965300a9a)。 + +Manjaro-ARM 将会有四个版本。媒体版本将可以运行Kodi并且允许你很少配置就能创建一个媒体中心。服务器版将会预先配置好 SSH,FTP,LAMP ,你能把你的 ARM 设备当作服务器使用。基本版是一个桌面版本,自带一个 XFCE 桌面。如果你想自己从头折腾系统的话你可以选择迷你版,它没有任何预先配置的包,仅仅包含一个 root 用户。 + +## 我的想法 + +作为一个 Manjaro 的粉丝(我在 4 个电脑上都安了 Manjaro),听说他们分支出一个 ARM 版我很高兴。 ARM 处理器被用到了越来越多的设备当中。如同评论员 Robert Cringely 所说, [设备制造商开始注意到昂贵的因特尔或者AMD处理器之外的便宜的多的ARM处理器](http://www.cringely.com/2016/01/21/prediction-8-intel-starts-to-become-irrelevent/)。甚至微软(憋打我)都开始考虑将自己的一些软件移植到 ARM 处理器上去。随着 ARM 处理器设备数量的增多,Manjaro 将会带给用户良好的体验。 + +对此,你怎样看待?你希望更多的发行版支持 ARM 吗?或者你认为 ARM 将是昙花一现?在评论区告诉我们。 + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/manjaro-linux-arm/ + +作者:[JOHN PAUL][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/john/ + From 2e7947e057e67346060788df67b08ba71dbb47c8 Mon Sep 17 00:00:00 2001 From: Rubik Date: Thu, 25 Feb 2016 11:36:33 +0800 Subject: [PATCH 1051/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...w to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md index f84e9e1e46..51f8050de7 100644 --- a/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md +++ b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md @@ -1,3 +1,4 @@ +[Translating] Haohong Wang How to Setup Lighttpd Web server on Ubuntu 15.04 / CentOS 7 ================================================================================= From 52bf40b2a72fda6311c562ffec2b6abcb0b119d1 Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Thu, 25 Feb 2016 18:20:01 +0800 Subject: [PATCH 1052/1710] name1e5s translating... --- .../20160223 BeeGFS Parallel File System Goes Open Source.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md b/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md index d65285a222..f563483358 100644 --- a/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md +++ b/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md @@ -1,3 +1,4 @@ +name1e5s translating BeeGFS Parallel File System Goes Open Source ================================================== From 35256e338657d15663937d2b3747fbafe1fce9cb Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Thu, 25 Feb 2016 19:39:57 +0800 Subject: [PATCH 1053/1710] [translated]BeeGFS Parallel File System Goes Open Source --- ...S Parallel File System Goes Open Source.md | 33 ------------------- ...S Parallel File System Goes Open Source.md | 32 ++++++++++++++++++ 2 files changed, 32 insertions(+), 33 deletions(-) delete mode 100644 sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md create mode 100644 translated/tech/20160223 BeeGFS Parallel File System Goes Open Source.md diff --git a/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md b/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md deleted file mode 100644 index f563483358..0000000000 --- a/sources/tech/20160223 BeeGFS Parallel File System Goes Open Source.md +++ /dev/null @@ -1,33 +0,0 @@ -name1e5s translating -BeeGFS Parallel File System Goes Open Source -================================================== - -![](http://insidehpc.com/wp-content/uploads/2015/08/beegfs.jpg) - -Today ThinkParQ announced that the complete [BeeGFS parallel file system][1] is now available as open source. Developed specifically for performance-critical environments, the BeeGFS parallel file system was developed with a strong focus on easy installation and high flexibility, including converged setups where storage servers are also used for compute jobs. By increasing the number of servers and disks in the system, performance and capacity of the file system can simply be scaled out to the desired level, seamlessly from small clusters up to enterprise-class systems with thousands of nodes. - -The first official announcement to make the BeeGFS sources available was made at the International Supercomputing Conference 2013. This was in the context of the European exascale project [DEEP-ER][2], where several new approaches to address extreme I/O requirements are being designed and implemented. For exascale systems, the different software and hardware layers have to work together very efficiently to achieve maximum scalability. Thus, making the sources of BeeGFS available is one logical step to enabling efficient integration of all layers of an exascale stack. - -“While some of our users are just happy with the fact that BeeGFS is so easy to install and doesn’t require much attention, others really want to understand exactly what is happening under the hood to further optimize the runtime of their applications, improve their monitoring or port it to other platforms like BSD,” said Sven Breuner, CEO of ThinkParQ, the company behind BeeGFS “Also, being able to build BeeGFS for non-x86 architectures like ARM and Power is another important aspect that the community has been waiting for.” - -The steady advances in ARM technology indeed make it a more and more interesting technology to look at for future procurements. Thus, the BeeGFS team is also participating in [ExaNeSt][3], a new European exascale project, which is specifically focused on getting the ARM ecosystem ready for performance-critical workloads. “Although BeeGFS can already run out of the box on ARM systems today, this project will give us the opportunity to make sure that we can deliver the maximum performance on this architecture as well.”, adds Bernd Lietzow, BeeGFS head for ExaNeSt. - -With a rather compact code base of about 25K lines of C++ code for the distributed metadata service and about 15K lines of C++ code for the distributed storage service, BeeGFS should be relatively easy to understand and extend, not only for senior programmers, but also for University students interested in file system research. On GitHub, there are already a number of projects listed related to BeeGFS, e.g. for browser-based monitoring or Docker integration. - -In related news, the [BeeGFS User Meeting][4] will take place May 18-19 in Kaiserslautern, Germany. - ------------------------------------------------------------------------------------------ - -via: http://insidehpc.com/2016/02/beegfs-parallel-file-system-now-open-source/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+InsideHPC+%28insideHPC.com%29 - -作者:[staff][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://insidehpc.com/author/staff/ -[1]: http://www.beegfs.com/ -[2]: http://www.deep-project.eu/deep-project/EN/Home/home_node.html -[3]: http://www.exanest.eu/ -[4]: http://www.beegfs.com/content/user-meeting-2016/ diff --git a/translated/tech/20160223 BeeGFS Parallel File System Goes Open Source.md b/translated/tech/20160223 BeeGFS Parallel File System Goes Open Source.md new file mode 100644 index 0000000000..2aeadbc3fb --- /dev/null +++ b/translated/tech/20160223 BeeGFS Parallel File System Goes Open Source.md @@ -0,0 +1,32 @@ +并行文件系统 BeeGFS 现已开源 +================================================== + +![](http://insidehpc.com/wp-content/uploads/2015/08/beegfs.jpg) + +今天(2月23日) ThinkParQ 宣布完整的 [BeeGFS 并行文件系统][1] 的源码现已开源。由于 BeeGFS 是专为要求性能的环境开发的,所以它在开发时十分注重安装的简单以及高度的灵活性,包括融合了在存储服务器同时做计算任务时需要的设置。随着系统中的服务器以及存储设备的增加,文件系统的容量以及性能将是需求的拓展点,无论是小型集群还是多达上千个节点的企业级系统。 + +第一次官方声明开放 BeeGFS 的源码是在 2013 年的国际超级计算大会上发布的。这个声明是在欧洲的百亿亿次级超算项目 [DEEP-ER][2] 的背景下做出的,在这个项目里为了得到更好的 I/O 要求,一些微小的进步被设计并应用。对于运算量高达百亿亿次的系统,不同的软硬件必须有效的协同工作才能得到最佳的拓展性。因此,开源 BeeGFS 是让一个百亿亿次的集群的所有组成部分高效的发挥作用的一步。 + +“当我们的一些用户对于 BeeGFS 十分容易安装并且不用费心管理而感到高兴时,另外一些用户则想要知道它是如何运行的以便于更好的优化他们的应用,使得他们可以监控它或者把它移植到其他的平台上,比如 BSD,” Sven Breuner 说道,他是 ThinkParQ (BeeGFS 背后的公司)的 CEO,“而且,把 BeeGFS 移植到其他的非 X86 架构,比如 ARM 或者 Power,也是社区等着要做的一件事。” + +对于未来的采购来说,ARM 技术的稳步发展确实使得它成为了一个越来越有趣的技术。因此, BeeGFS 的团队也参与了 [ExaNeSt][3],一个来自欧洲的新的百亿亿次级超算计划,这个计划致力于使 ARM 的生态能为高性能的工作负载做好准备。“尽管现在 BeeGFS 在 ARM 处理器上可以算是开箱即用,这个项目也将给我们机会来证明我们在这个架构上也能完全发挥其性能。”, Bernd Lietzow , BeeGFS 中 ExaNeSt 的领导者补充道。 + + 作为一个有着 25 K 行 C++ 代码的元数据服务以及约 15 K 行存储服务的项目,BeeGFS 相对比较容易理解和拓展,不只是对于大神,对于对文件系统有兴趣的大学生也是这样。在 GitHub 上已经有很多的为 BeeGFS 写的项目,比如基于浏览器的监控或者 Docker 一体化。 + + 有关新闻显示, [BeeGFS 用户大会][4]将于 5 月 18-19 日在德国凯泽斯劳滕举行。 + + ----------------------------------------------------------------------------------------- + +via: http://insidehpc.com/2016/02/beegfs-parallel-file-system-now-open-source/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+InsideHPC+%28insideHPC.com%29 + +作者:[staff][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://insidehpc.com/author/staff/ +[1]: http://www.beegfs.com/ +[2]: http://www.deep-project.eu/deep-project/EN/Home/home_node.html +[3]: http://www.exanest.eu/ +[4]: http://www.beegfs.com/content/user-meeting-2016/ From 4b95d3fa5b77ec6ed6112aab628885bd3c75c0ed Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 25 Feb 2016 20:10:02 +0800 Subject: [PATCH 1054/1710] =?UTF-8?q?20160225-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d open source experience to your resume.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sources/tech/20160225 How to add open source experience to your resume.md diff --git a/sources/tech/20160225 How to add open source experience to your resume.md b/sources/tech/20160225 How to add open source experience to your resume.md new file mode 100644 index 0000000000..73e22c2b8b --- /dev/null +++ b/sources/tech/20160225 How to add open source experience to your resume.md @@ -0,0 +1,91 @@ +How to add open source experience to your resume +================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/lightning-test.png?itok=aMceg0Vg) + + +In this article, I'll share my technique for leveraging open source contributions to stand out as a great candidate for a job in the technology field. + +No goal can be accomplished without first being set. Before jumping into a new commitment or spending the evening overhauling your resume, it pays to clearly define the traits of the job you're seeking. Your resume is a piece of persuasive writing, so you have to know your audience for it to reach its full potential. Your resume's audience is anyone with the need for your skills and the budget to hire you. When editing, read your resume while imagining what it's like to be in their position. Do you look like a candidate that you would hire? + +I personally find it helpful to make a list of the key traits that the ideal candidate for my target job displays. I gather this list from a combination of personal experience, reading job postings, and asking colleagues in similar roles. LinkedIn and conferences are great places to find people happy to offer this sort of advice. Many people enjoy talking about themselves, and inviting them to tell part of their own story to help you expand your knowledge makes everyone feel good. As you talk to others about their career paths, you'll gain insights not only into how to land the jobs you want, but also into which traits or behaviors correspond to ending up in situations you'd rather avoid. + +For example, the list of key traits for a junior role might look like this: + +### Technical: + +- Experience with CI, Jenkins preferred + +- Strong scripting background in Python and Ruby + +- Familiarity with Eclipse IDE + +- Basic Git and Bash + +### Personal: + +- Self-directed learner + +- Clear communication and documentation skills + +- Experience working on a multi-person development team ("team player") + +- Familiarity with issue tracker workflow + +### Apply anyway + +Remember, you don't have to meet every single criterion listed in a job description to get an interview. + +The job description describes whoever left the role, and if you start out knowing everything you've likely signed yourself up for a few years that don't challenge or expand your skill set. If you're nervous about missing a particular technology on the list, do some research into it to see whether comparable skills from another experience would apply. For example, someone who's never used [Jenkins][1] might still understand the principles of continuous integration testing from working on a project that uses [Buildbot][2] or [Travis CI][3]. + +If you're applying at a larger company, they probably have an entire department and comprehensive screening process to make sure they don't hire any candidate unable to succeed in a role. That means it's your job to apply and their job to decide whether to reject you. Don't prematurely reject yourself from the job by refusing to apply. + +Now you have an idea of what job you want and what skills you'll need to impress your interviewers. The next steps to take will vary based on how much experience you've already got. + +### Tailoring existing involvement + +Start by making a list of all the projects you've been involved with in the past few years. One way to get a quick list of things you've worked on lately is to navigate to the **Repositories** tab of your GitHub profile and filter the list by clicking on **Forks**. Additionally, look down your [Organizations][4] list for places you might have been engaging in leadership roles. If you already have a resume, make sure you've included everything from these lists under experience. + +Consider any IRC channel where you have special permissions as a potential leadership experience. Check your Meetup and Eventbrite accounts and add any events that you organize or volunteer at to your list. Skim your calendar for the past year and note any volunteering, mentoring, or public speaking engagements. + +Now for the hard part: Map the list of required skills onto the list of experiences. I like to assign a letter or number to each trait needed for the job, then mark the same symbol next to every piece of experience or involvement where you demonstrated the trait. When in doubt, claim it anyway—your problem is more likely a reluctance to brag than actual incompetence. + +This is the point in the process at which resume writers are often fettered by reluctance to risk overselling their own skills. It often helps to re-frame the question as: "Did someone who organized a meetup show leadership and planning skills?" Rather than: "Did I personally show these skills when I organized that meetup?". + +If you've been sufficiently thorough at figuring out where your free time has gone for the past year or two and you code a lot, you might now be facing a surprising problem: Too many items to fit on a single-page resume! If anything on your list of experiences didn't demonstrate any of the skills you're trying to showcase, cross it off. If an item demonstrates few skills and you don't have any stories that you enjoy telling about it, cross it off. If this abridged list of things you've done still won't fit in the format of a resume, prioritize the experiences from which you gained a relevant story or extensive experience with a desired technology. + +At this point, it should be obvious if you need a better piece of experience to hone a particular skill. Consider using an issue aggregator like OpenHatch to find an open source project where you build and practice your skills with the tool or technology that you're missing. + +### Make your resume beautiful + +A resume's beauty comes from conciseness, clarity, and layout. Each piece of experience should be accompanied by enough information for a reader to immediately know why you included it, but no more. Each type of information should be formatted consistently throughout the document—it's distracting to have some dates italicized or right-aligned and others not. + +Typeset your resume using a tool that makes these goals easy to achieve. I enjoy using [LaTeX][5], since its macro system makes visual consistency easy and most interviewers recognize it immediately. Your tool of choice might be [LibreOffice][6] or HTML, depending on your skills and how you want to distribute your resume. + +Remember that a digitally submitted resume might be scanned for keywords, so it can help to use the same acronyms as the job posting when describing your experiences. To make your resume easy for your interviewer to use, place the most important information first. + +Coders often struggle to quantify balance and layout when typesetting a document. My favorite technique for stepping back and assessing whether my document's whitespace is in the right place is to fullscreen the PDF or print it out, then look at it in a mirror. If you're using LibreOffice Writer, save a copy of your resume then change the font to that of a language you can't read. Both of these techniques forcibly pull you out of reading the content, and allow you to see the overall layout of the document in a new light. They take you from a "That sentence is poorly worded!" critique to noticing things like "It looks funny to have only a single word on that line." + +Finally, double check that your resume displays correctly in the media where it will be seen. If you're distributing it as a web page, test it at different screen widths in multiple browsers. If it's a PDF, open it on your phone or a friend's computer to make sure all the fonts it needs are available. + +### Next steps + +Finally, don't let the content that you worked so hard on for your resume go to waste! Mirror it to your LinkedIn account—complete with the buzzwords from the job posting—and don't be surprised if recruiters start reaching out to you. Even if the jobs they're describing aren't a good fit right now, you can leverage their time and interest to get feedback on what's working well about your resume and what isn't. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/16/2/add-open-source-to-your-resume + +作者:[edunham][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/edunham +[1]: https://jenkins-ci.org/ +[2]: http://buildbot.net/ +[3]: https://travis-ci.org/ +[4]: https://github.com/settings/organizations +[5]: https://www.latex-project.org/ +[6]: https://www.libreoffice.org/download/libreoffice-fresh/ From 38754c8fb275cebc3ecd1858b83bf342c8f293bc Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 25 Feb 2016 20:16:09 +0800 Subject: [PATCH 1055/1710] =?UTF-8?q?20160225-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...he Zika virus with rapid, open research.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md diff --git a/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md b/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md new file mode 100644 index 0000000000..e25df9c008 --- /dev/null +++ b/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md @@ -0,0 +1,27 @@ +Can we tackle the Zika virus with rapid, open research? +============================================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_LifeScience_OpenScience_520x292_12268077_0614MM.png?itok=3ZD2Mce9) + +One of the major issues with the Zika virus is that so little is known about it. That means that a lot of research has to be done very quickly. + +The Zika virus is at the heart of a global health emergency. It became a global health emergency after outbreaks began in 2015, and has possible links to birth defects. When the virus was first discovered in the late forties, human infections had been observed as early as 1952 according to Wikipedia. + +On February 10, the open journal [PLoS released a statement][1] on data sharing in public emergencies. Then, an article in the research journal F1000, [Open drug discovery for the Zika virus][2], discussed the status of Zika along with the need to conduct research openly. The statement from PLoS lists more than 30 important organizations who have aligned around the open dissemination of data as the virus is studied. And the World Health Organization has implemented special provisions that submissions to the WHO Bulletin now be made available under a [Creative Commons license][3]. + +Rapid publication, unrestricted reuse, and emphasizing dissemination of research are strategic steps that the open science community has been pushing for in all scientific research. Seeing a start with health emergencies that require our immediate attention is encouraging. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/how-rapid-open-science-could-change-game-zika-virus + +作者:[Marcus D. Hanwell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mhanwell +[1]: http://blogs.plos.org/plos/2016/02/statement-on-data-sharing-in-public-health-emergencies/ +[2]: http://f1000research.com/articles/5-150/v1 +[3]: https://creativecommons.org/licenses/by/3.0/igo/ From 32159443d8119de4978d91e53530801d121e8dde Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 25 Feb 2016 20:28:03 +0800 Subject: [PATCH 1056/1710] =?UTF-8?q?20160225-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160225 The Tao of project management.md | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 sources/tech/20160225 The Tao of project management.md diff --git a/sources/tech/20160225 The Tao of project management.md b/sources/tech/20160225 The Tao of project management.md new file mode 100644 index 0000000000..629bdaef36 --- /dev/null +++ b/sources/tech/20160225 The Tao of project management.md @@ -0,0 +1,176 @@ +The Tao of project management +================================= + + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUSINESS_orgchart1.png?itok=DGsp6jB5) + +The [Tao Te Ching][1], [believed to have been written][2] by the sage [Lao Tzu][3] in the 6th century BCE, is among the most widely translated texts in existence. It has inspired everything from [religions][4] to [funny movies about dating][5], and authors have used it as a metaphor to explain all kinds of things (even [programming][6]). + +This text is what immediately comes to my mind when thinking about project management in open organizations. + +That might sound strange. But to understand where I'm coming from, you should start by reading *The Open Organization: Igniting Passion and Performance*, Red Hat president and CEO Jim Whitehurst's manifesto on corporate culture and the new leadership paradigm. In this book, Jim (with a little help from other Red Hatters) explains the difference between conventional organizations (a "top-down" approach, with decisions coming down from central command to employees motivated by promotion and pay) and open organizations (a bottom-up approach, with leaders focused on inspiring purpose and passion so employees are empowered to be and do their best). + +This concept—that employees in open organizations are motivated by passion, purpose, and engagement—plays directly into where I think project managers should focus. + +And to explain, I'll return to the *Tao Te Ching*. + +### Don't let your job title define you + +>The tao that can be told +>is not the eternal Tao +>The name that can be named +>is not the eternal Name. + +>The unnameable is the eternally real. +>Naming is the origin +>of all particular things. +[[1]][7] + +What exactly is project management? And what does a project manager do? + +As you might expect, part of being a project manager is managing projects: gathering requirements, managing stakeholder communication, setting priority, scheduling tasks, helping the team resolve blockers. Many institutions can teach you how to manage projects very well, and these are good skills to have. + +However, literally managing projects is only part of what project managers in open organizations do. These organizations require something more: Courage. If you're good at managing projects (or if you're good at any job, really), then you can start to feel safe in your routine. That's when you know you need to find the courage to take a risk. + +Do you have the courage to step outside of your comfort zone? The courage to ask important people challenging questions that might raise eyebrows, but that might also uncover a better way forward? The courage to identify the next thing that needs to be done—then the courage to go and do it? The courage to call out communication gaps and take initiative to fix them? The courage to try things? The courage to fail? + +The opening passage of the Tao Te Ching (which I cited above) suggests that words, labels, and names are limiting. That includes job titles. In open organizations, project managers don't just perform the rote tasks required to manage projects. They help teams accomplish the organization's mission, however defined. + +### Connect the right people + +>We join spokes together in a wheel, +>but it is the center hole +>that makes the wagon move. +[[11]][8] + +One of the most difficult lessons I had to learn as I transitioned into project management was that not having all the answers was perfectly acceptable, even expected. That was new for me. I like having all the answers. But as a project manager, my role is more about connecting people—so the ones who do have the answers can collaborate efficiently. + +This does not mean dodging responsibility or ownership. This means being comfortable saying, "I don't know, but I will find out for you," and closing that loop as quickly as possible. + +Picture a wagon wheel. Without the stability and direction provided by the center hole, the spokes would fall and the wheel collapse in on itself. Project managers in an open organization can help a team maintain forward momentum by bringing the right people together and cultivating the right discussions. + +### Trust your team + +>When the Master governs, the people +>are hardly aware that he exists. +>Next best is a leader who is loved. +>Next, one who is feared. +>The worst is one who is despised. +> +>If you don't trust the people, +>you make them untrustworthy. +> +>The Master doesn't talk, he acts. +>When his work is done, +>the people say, "Amazing: +>we did it, all by ourselves!" +[[17]][9] + +[Rebecca Fernandez][10] once told me that what differentiates leaders in open organizations is not the trust people have in them, but the trust they have in other people. + +Open organizations do a great job hiring smart people who are passionate about what their companies are doing. In order for them to do their best work, we have to give them what they need and then get out of their way. + +Here, I think the above passage from the Tao Te Ching speaks for itself. + +### Be effortless + +>The Master does nothing +>yet he leaves nothing undone. +>The ordinary man is always doing things, +>yet many more are left to be done. +[[38]][11] + +Do you know the type of person who is always extremely busy? The one who seems frazzled and stressed with too many things to do? + +Don't be that person. + +I know that's easier said than done. The thing that most helps me keep from being that person is remembering that we are all extremely busy. I don't have a single co-worker who is bored. + +But someone needs to be the calm in the middle of the storm. Someone needs to be the person who reassures the team that everything is going to be okay, that we'll find a way to get things done within the parameters dictated by reality and the number of business hours in a day (because that's the truth, and we have to). + +Be that person. + +What this passage of the Tao Te Ching says to me is that the person who's always talking about what she or he is doing has no time to actually do those things. If you can make your job seem effortless to those around you, then you're doing your job right. + +### Be a culture coach + +>When a superior man hears of the Tao, +>he immediately begins to embody it. +>When an average man hears of the Tao, +>he half believes it, half doubts it. +>When a foolish man hears of the Tao, +>he laughs out loud. +>If he didn't laugh, +>it wouldn't be the Tao. +[[41]][12] + +Last fall, I enrolled an MBA business ethics class with a bunch of federal employees. When I started describing my company's culture, values, and ethics framework, I got the direct impression that both my classmates and my professor thought I was a naive young lady with [a lot of lovely daydreams][13] about how companies should run. They told me things couldn't possibly be as they seemed. They said I should investigate further. + +So I did. + +And here's what I found: Things are exactly as they seem. + +In open organizations, culture matters. Maintaining that culture as an organization grows makes it possible to wake up and look forward to going to work in the morning. I (and other members of open organizations) don't want to "work to live," as my classmates described it. I need to feel a passion and purpose, to understand how the work I do on a daily basis directly contributes to something I believe in. + +As a project manager, you might think that your job has nothing to do with cultivating your company's culture on your team. However, it's your job to embody it. + +### Kaizen + +>In pursuit of knowledge, +>every day something is added. +>In the practice of the Tao, +>every day something is dropped. +>Less and less do you need to force things, +>until finally you arrive at non-action. When nothing is done, +>nothing is left undone. +[[48]][14] + +The general field of project management is too focused on the latest and greatest tools. But the answer to the question of which tool you should use is always the same: "the simplest." + +For example, I keep my running to-do list in a text file on my desktop because it serves its purpose without unnecessary distractions. Whatever tools, processes, and procedures you introduce to a team should increase efficiency and remove obstacles, not introduce additional complexity. So instead of focusing on the tools, focus on the problem(s) you're using those tools to solve. + +My favorite part of being a project manager in an Agile world is having the freedom to throw out what doesn't work. This is related to the concept of kaizen, or "continuous improvement." Don't be afraid to try and fail. Failing is the label we've put on the process of learning what works and what doesn't. But it's the only way to improve. + +The best processes arise organically. As a project manager, you can help your team by supporting them and not trying to force them into anything. + +### Practice + +>Some say that my teaching is nonsense. +>Others call it lofty but impractical. +>But to those who have looked inside themselves, +>this nonsense makes perfect sense. +>And to those who put it into practice, +>this loftiness has roots that go deep. +[[67]][15] + +I believe in what open organizations are doing. What open organizations are doing for the field of management is almost as important as the actual products and services they offer. We have an opportunity to lead by example, to inspire passion and purpose in others, to create working environments that inspire and empower. + +I encourage you to find ways to incorporate some of these ideas into your own projects and teams to see what happens. Learn about your organization's mission and how your projects contribute to it. Have courage, expect to try some things that won't work, and don't forget to share the lessons you learn with our community so we can continue to improve. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/16/2/tao-project-management + +作者:[Allison Matlack][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/amatlack +[1]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html +[2]: https://en.wikipedia.org/wiki/Tao_Te_Ching +[3]: http://plato.stanford.edu/entries/laozi/ +[4]: https://en.wikipedia.org/wiki/Taoism +[5]: http://www.imdb.com/title/tt0234853/ +[6]: http://www.mit.edu/~xela/tao.html +[7]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#1 +[8]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#11 +[10]: https://opensource.com/users/rebecca +[11]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#38 +[12]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#41 +[13]: https://opensource.com/open-organization/15/9/reflections-open-organization-starry-eyed-dreamer +[14]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#48 +[15]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#67 + From 121d67ae26355c6ca30de530823bf33f060a3f6e Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 25 Feb 2016 22:22:41 +0800 Subject: [PATCH 1057/1710] =?UTF-8?q?=E9=80=89=E9=A2=98=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 选题模板.txt | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 选题模板.txt diff --git a/选题模板.txt b/选题模板.txt new file mode 100644 index 0000000000..fabd1f1dba --- /dev/null +++ b/选题模板.txt @@ -0,0 +1,41 @@ +选题标题格式: + + 原文日期 标题.md + +正文内容: + + 标题 + ======= + + ### 子一级标题 + + 正文 + + #### 子二级标题 + + 正文内容 + + ![](图片地址) + + ### 子一级标题 + + 正文内容 : I have a [dream][1]。 + + + -------------------------------------------------------------------------------- + + via: 原文地址 + + 作者:[作者名][a] + 译者:[译者ID](https://github.com/译者ID) + 校对:[校对者ID](https://github.com/校对者ID) + + 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + + [a]: 作者介绍地址 + [1]: 引文链接地址 + +说明: +1. 标题层级很多时从 “##” 开始 +2. 引文链接地址在下方集中写 + From 6f67b9d37e15e93874a9438b3930e87df86c102f Mon Sep 17 00:00:00 2001 From: GHLandy Date: Thu, 25 Feb 2016 22:47:02 +0800 Subject: [PATCH 1058/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]=2020160218=20Best=20Linux=20Desktop=20Environments=20for=2020?= =?UTF-8?q?16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...est Linux Desktop Environments for 2016.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 translated/tech/20160218 Best Linux Desktop Environments for 2016.md diff --git a/translated/tech/20160218 Best Linux Desktop Environments for 2016.md b/translated/tech/20160218 Best Linux Desktop Environments for 2016.md new file mode 100644 index 0000000000..b9306b79be --- /dev/null +++ b/translated/tech/20160218 Best Linux Desktop Environments for 2016.md @@ -0,0 +1,90 @@ +2016:如何选择 Linux 桌面环境 +============================================= + +![](http://www.linux.com/images/stories/66866/DE-2.png) + +Linux 创建了一个相对友好的环境,为我们提供了选择的可能。比方说,现代大多数的 Linux 发行版都提供不同桌面环境给我们来选择。在本文中,我将挑选一些你可能会在 Linux 中见到的相对较好的桌面环境来介绍。 + +## Plasma + +我认为,[KDE’s Plasma desktop](https://www.kde.org/workspaces/plasmadesktop/) 是最高级的桌面环境 (LCTT 译注:译者认为,没有什么是最好的,只有最合适的,毕竟每个人的喜好都不可能完全相同)。它是我见过功能最完善和定制性最高的桌面环境;在用户完全自主控制方面,即使是 Mac OS X 和 Windows 也无法与之比拟。 + +我爱 Plasma,因为它自带了一个非常好的文件管理器——Dolphin。而相对应 Gnome 环境,我更喜欢 Plasma 的原因就在于文件管理器。使用 Gnome 最大的痛苦就是,它的文件管理器——Files——使我无法完成一些基本任务,比如说,批量文件重命名操作。而这个操作对我来说相当重要,因为我喜欢拍摄,但 Gnome 却让我无法批量重命名这些图像文件。而使用 Dolphin 的话,这个操作就像在公园散步一样简单。 + +而且,你可以通过插件来增强 Plasma 的功能。Plasma 有大量的基础软件,如 Krita、Kdenlive、Calligra 办公套件、digiKam、Kwrite 以及由 KDE 社区开发维护的大量应用。 + +Plasma 桌面环境唯一的缺陷就是它默认的邮件客户端——Kmail。它的设置比较困难,我希望 Kmail 设置可以配置地址簿和日历。 + +包括 openSUSE 在内的多数主流发行版多使用 Plasma 作为默认桌面。 + +## GNOME + +[GNOME](https://www.gnome.org/) (GNU Network Object Model Environment,GNU 网络对象模型环境) 由 [Miguel de Icaza](https://en.wikipedia.org/wiki/Miguel_de_Icaza) 和 Federico Mena 在 1997 年的时候创立,这是因为 KDE 使用来 Qt 工具包,而这个工具包是使用专业许可证 (proprietary license) 发布的。和 KDE 不一样的是,GNOME 提供了大量的定制,它专注于让事情变得简单。因为 自身的简单性和易用性,GNOME 变得相当流行。而我认为 GNOME 之所以流行的原因在于,Ubuntu——使用 GNOME 作为默认桌面的主流 Linux 发行版之一——对其有着巨大的推动作用。 + +随着时代变化,GNOME 也需要作出相应的改变了。因此,开发者通过 GNOME 3 推出了 GNOME 3 Shell,从而引出它全新的设计规范。但这同时与 Canonical 的 Ubuntu 计划存在者一些冲突,所以 Canonical 为 GNOME 开发来叫做 Unity 的特有 Shell。最初,GNOME 3 Shell 因很多争议 (issues) 而困扰不已——最明显的是,升级之后会导致很多扩展无法正常工作。由于设计上的重大改版以及各种问题的出现,GNOME 便产生来很多分支,比如 Cinnamon 和 Mate 桌面。 + +也就是说,使得 GNOME 有趣的是,它针对触摸设备做了优化,所以,如果你有一台触屏笔记本电脑的话,GNOME 则是最合适你这台电脑的桌面环境。 + +在 3.18 版本中,GNOME 已经作出了一些令人印象深刻的改动。其中他们所做的最有趣的是集成了 Google Drive,用户可以把他们的 Google Drive 挂载为远程存储设备,这样就不必在使用浏览器来查看里边的文件来。我也很喜欢 GNOME 里边自带的那个优秀的邮件客户端,它带有日历和地址簿功能。尽管有这么多些优秀的特性,但它的文件管理器使我不再使用 GNOME ,因为我无法处理批量文件重命名。我会坚持使用 Plasma,一直到 GNOME 的开发者修复了这个小缺陷。 + +![](http://www.linux.com/images/stories/66866/DE-fig1.png) + +## Unity + +从技术上来说,[Unity](https://unity.ubuntu.com/) 并不是一个桌面环境,它只是 Canonical 为 Ubuntu 开发的一个图形化 Shell。Unity 运行于 GNOME 桌面之上,并使用很多 GNOME 的应用和工具。Ubuntu 团队分支了一些 GNOME 组件,以便更好的满足 Unity 用户的需求。 + +Unity 在 Ubuntu 故事集和 Unity 8 中扮演者重要角色,Canonical 公司正在努力将电脑桌面和移动世界结合到一起。Canonical 同时还为 Unity 开发了许多的有趣技术,比如 HUD (Head-up Display,平视显示)。他们还有一种独特的技术来然用户在镜片上的某范围找到特定内容。 + +即将发行的 Ubuntu 16.04,将会搭载 Unity 8,那时候用户就可以完全体验开发者为该开源软件添加的所有特性了。其中最大的争议就是,Unity 不再集成 Amazon Ads 和其他服务。即将发行的版本,虽然 Canonical 从 Dash 移除了 Amazon ads,但却默认保证了系统的隐私性。 + +## Cinnamon + +最初,[Cinnamon](https://en.wikipedia.org/wiki/Cinnamon_(software)) 由 [Linux Mint](http://www.linuxmint.com/) 开发 —— DistroWatch.com 上统计出来最流行的发行版。就像 Unity,Cinnamon 是 GNOME Shell 的一个分支。但最后进化为一个独立的桌面环境,这是因为 Linux Mint 的开发者分支了 GNOME 桌面中很多的组件到 Cinnamon,包括 Files ——以满足自身用户的需求。 + +由于 Linux Mint 基于普通版本的 Ubuntu,开发者仍需要去完成 Ubuntu 尚未完成的目标。结果,尽管前途光明,但 Cinnamon 却充满了 Bugs 和问题。随着 17.x 本版的发布,Linux Mint 开始移动到 Ubuntu 的 LTS 版本上,从而他们可以专注于开发 Cinnamon 的核心组件,而不必再去担心代码库。移动到 LTS 的好处是,Cinnamon 变得非常稳定并且基本没有 Bugs 出现。现在,开发者已经开始向桌面环境中添加更多的新特性来。 + +对于那些更喜欢在 GNOME 基础上有一个很好的类 Windows 用户界面的用户来说,Cinnamon 是他们最好的桌面环境。 + +## MATE Desktop + +[MATE desktop](http://mate-desktop.com/) 同样是 GNOME 的一个分支,然而,它并不像 Cinnamon 那样由 GNOME 3 分支,而是现在已经没有人维护的 GNOME 2 代码库的一个分支。MATE desktop 中的一些开发者并不喜欢 GNOME 3 并且想要“继续坚持” GNOME 2,所以他们使用这个代码库来创建来 MATE。为避免和 GNOME 3 的冲突,他们重命名了全部的包:Nautilus 改为 Caja、Gedit 改为 Pluma 以及 Evince 改为 Atril 等。 + +尽管 MATE 延续了 GNOME 2,但这并不意味着他们使用过时的技术;相反,他们使用了更新的技术来提供一个现代的 GNOME 2 体验。 + +拥有相当高的资源效率才是 MATE 最令人印象深刻之处。你可将它运行在老旧硬件或者很少更新的强大硬件上,如树梅派 (Raspberry Pi) 或者 Chromebook Flip。使得它更有趣的是,把它运行在一些强大的硬件上,可以节省大多数的资源给其他应用,而桌面环境本身只占用很少的资源。 + +## LXQt + +[LXQt](http://lxqt.org/) 继承了 LXDE ——最轻量级的桌面环境之一。它融合了 LXDE 和 Razor-Qt 两个开源项目。LXQt 的首个可用本版 V 0.9 发布于 2015 年。最初,开发者使用了 Qt4 但向下兼容,之后为了加快开发速度,他们移动到 Qt5 和 KDE 框架上。我也在自己的 Arch 系统上尝试使用了 LXQt,它的确是一个非常好的轻量级桌面环境。但在完全继承 LXDE 之前,LXQt 仍有一段很长的路需要走。 + +## Xfce + +[Xfce](http://www.xfce.org/) 早于 KDE 桌面环境,它是最古老和最轻量级的桌面环境。Xfce 的最新版本是 4.15,发布于 2015 年,使用了诸如 GTK + 3 的大量的现代科技。很多发行版都使用了 Xfce 环境以满足特定需求,比如 Ubuntu Studio ——与 MATE 类似——尽量节省系统资源给其他的应用。并且,许多的著名的 Linux 发行版——包括 Manjaro Linux、PC/OS、Salix 和 Mythbuntu ——都把它作为默认桌面环境。 + +## Budgie + +[Budgie](https://solus-project.com/budgie/) 是一个新型的桌面环境,由 Solus Linux 团队开发和维护。Solus 是一个从零开始构建的新型发行版,而 Budgie 则是它的一个核心组件。Budgie 使用了大量的 GNOME 组件,从而提供一个华丽的用户界面 (UI)。由于没有该桌面环境的更多信息,我特地联系了 Solus 的核心开发者—— Ikey Doherty。他解释说:“我们搭载了自己的桌面环境—— Budgie。与其他桌面环境不同的是,Budgie 并不是其他桌面的一个分支,它的目标是侧底融入到 GNOME 协议栈之中。它完全从零开始编写,并特意的设计来迎合 Solus 提供的体验。我们会尽可能的和 GNOME 的上游团队协同工作,修复 Bugs,并提倡和支持他们的工作”。 + +## Pantheon + +我想,[Pantheon](https://elementary.io/) 不需要特别介绍了吧,那个优美的 elementary OS 就使用它作为桌面。类似于 Budgie,很多人都认为 Pantheon 也不是 GNOME 的一个分支。elementary OS 团队大多拥有良好的设计背景,所以他们会近距离关注每一个细节,这使得 Pantheon 成为一个非常优美的桌面环境。在某个瞬间,它可能缺少像 Plasma 等桌面中的某些特性,但开发者实际上是尽其所能的去坚持设计原则。 + +![](http://www.linux.com/images/stories/66866/DE-3.png) + +## 结论 + +当我写完本文后,我突然意识到来开源和 Linux 的重大好处。总有一个发行版本适合你。就像 Jon “maddog” Hall 在最近的 SCaLE 14 上说的那样:“是的,现在有 300 多个 Linux 发行版。我可以一个一个去尝试,然后坚持使用我最喜欢的那一个”。 + +所以,尽情享受 Linux 的多样性吧,最后使用最合你意的那一个。 + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/881107-best-linux-desktop-environments-for-2016 + +作者:[Swapnil Bhartiya][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/61003 From 316d10fc5f83baca12be63af1374be9a1948c4a4 Mon Sep 17 00:00:00 2001 From: GHLandy Date: Thu, 25 Feb 2016 22:48:52 +0800 Subject: [PATCH 1059/1710] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B7=B2=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E5=AE=8C=E6=88=90=E7=9A=84=E5=8E=9F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...est Linux Desktop Environments for 2016.md | 92 ------------------- 1 file changed, 92 deletions(-) delete mode 100644 sources/tech/20160218 Best Linux Desktop Environments for 2016.md diff --git a/sources/tech/20160218 Best Linux Desktop Environments for 2016.md b/sources/tech/20160218 Best Linux Desktop Environments for 2016.md deleted file mode 100644 index 7aef79366b..0000000000 --- a/sources/tech/20160218 Best Linux Desktop Environments for 2016.md +++ /dev/null @@ -1,92 +0,0 @@ -GHLandy Translating - -Best Linux Desktop Environments for 2016 -============================================= - -![](http://www.linux.com/images/stories/66866/DE-2.png) - -Linux creates a friendly environment for choices and options. For example, there are many Linux-based distributions out there that use different desktop environments for you to choose from. I have picked some of the best desktop environments that you will see in the Linux world. - -## Plasma - -I consider [KDE’s Plasma desktop](https://www.kde.org/workspaces/plasmadesktop/) to be the most advanced desktop environment (DE). It’s the most feature-rich and customizable desktop environment that I have ever seen; even Mac OS X and Windows don’t come near Plasma when it comes to complete control by the user. - -I also love Plasma because of its awesome file manager, Dolphin. One reason I prefer Plasma over Gnome-based systems is the file manager. One of my biggest gripes with Gnome is that its file manager, Files, can’t handle basic tasks, such as batch-files renaming. That’s important for me because I take a lot of pictures, and Gnome makes it impossible for me to rename image files. On Dolphin, it’s a walk in the park. - -Then, you can add more functionality to Plasma with plugins. Plasma comes with some incredible software including Krita, Kdenlive, Calligra Office Suite, digiKam, Kwrite, and many other applications being developed by the KDE community. - -The only weakness of the Plasma desktop is its default email client, Kmail. It’s way too complicated to set up, and I also wish that setting up Kmail also configured the Address Book and Calendar. - -Plasma is the default desktop environment of many major distributions including openSUSE. - -## GNOME - -[GNOME](https://www.gnome.org/) (GNU Network Object Model Environment) was founded by [Miguel de Icaza](https://en.wikipedia.org/wiki/Miguel_de_Icaza) and Federico Mena in 1997 because KDE used Qt toolkit, which was released under a proprietary license. Unlike KDE, where there were numerous customizations, GNOME focused on keeping things simple. GNOME became extremely popular due to its simplicity and ease of use. A factor that I think contributed heavily to Gnome’s popularity was the fact that Ubuntu, one of the most popular Linux distributions, picked it as their default desktop environment. - -With changing times, GNOME needed a change. Therefore, with GNOME 3 the developers introduced the GNOME 3 Shell, which brought with it an entirely new design paradigm. That in turn led to some conflict with Canonical’s plans with Ubuntu, and they created their own shell for GNOME called Unity. Initially, GNOME 3 Shell was plagued by many issues -- most notably, the fact that extensions would stop working after updates. This major shift in design and the various problems then led to many forks of GNOME, such as the Cinnamon and Mate desktops. - -That said, what makes GNOME desktop interesting is that they are targeting touch-based devices, so if you have new laptops that come with a touchscreen, Gnome is the best suited DE for them. - -With version 3.18, GNOME has made some impressive improvements. The most interesting thing that they have done is Google Drive integration where users can mount their Google Drive as a remote file storage and work with files without having to use a web browser. I also love GNOME’s awesome integration of email client with calendar and address book. Despite all this awesomeness, however, the one thing that keeps me from using GNOME is its file manager, which can’t handle batch file renames. I will stick to Plasma until GNOME developers fix this problem. - -![](http://www.linux.com/images/stories/66866/DE-fig1.png) - -## Unity - -[Unity](https://unity.ubuntu.com/) is technically not a desktop environment, it’s a graphical shell developed by Canonical for Ubuntu. Unity runs on top of GNOME desktop environment and uses most stock GNOME apps and tools. The Ubuntu team has forked a few GNOME components to better suit the needs of Unity users. - -Unity plays a very important role in Ubuntu’s convergence story and with Unity 8, the company is bringing the desktop and mobile world together. Canonical has developed many intriguing technologies for Unity including HUD (Head-up Display). They also took a unique approach with lenses and scopes making it easy for users to find appropriate content. - -The upcoming release of Ubuntu, 16.04, is expected to ship with Unity 8 so users will get to experience all the work that developers have put into this open source software. One of the biggest criticisms with Unity was opt-out integration of Amazon ads and other services. With the upcoming release, though, Canonical is removing Amazon ads from Dash, making it a privacy-respecting OS by default. - -## Cinnamon - -[Cinnamon](https://en.wikipedia.org/wiki/Cinnamon_(software)) was initially developed by [Linux Mint](http://www.linuxmint.com/) -- the most popular distro on DistroWatch. Cinnamon is a fork of GNOME Shell, just like Unity. Later, however, it evolved into a desktop environment as Linux Mint developers forked many components of the GNOME desktop, including Files, to address the needs of their users. - -Because Linux Mint was based on regular releases of Ubuntu, the developers continued to chase the moving target that was Ubuntu. As a result, despite great promises Cinnamon was full of bugs and problems. With the 17.x release, however, Linux Mint developers moved to LTS edition of Ubuntu that allowed them to focus on core components of Cinnamon without having to worry about the base. As a result of this move, Cinnamon has become incredibly stable and bug free. The developers have started adding more features to the desktop. - -For those who prefer the good old Windows-like UI on top of the simplicity of GNOME, Cinnamon is the best desktop environment. - -## MATE Desktop - -The [MATE desktop](http://mate-desktop.com/) environment is also a fork of GNOME. However, unlike Cinnamon, it’s not a fork of GNOME 3; instead it’s a fork of GNOME 2 codebase, which is not unmaintained. A few developers didn’t like Gnome 3 and wanted to “continue” GNOME 2, so they took the codebase and created MATE. The MATE project forked many components of the GNOME project and created a few from scratch. To avoid any conflict with GNOME 3, they renamed all their packages: Nautilus become Caja, Gedit became Pluma, Evince became Atril, and so on. - -Although MATE is a continuation of GNOME 2, that doesn’t mean they are using old and obsolete technologies; they are using newer technologies to offer a modern GNOME 2 experience. - -What makes MATE an impressive desktop environment is that it’s extremely resource efficient. You can run it on older hardware or newer less powerful hardware, such as Raspberry Pi or Chromebook Flip. What’s makes it even more interesting is that using it on powerful systems frees most system resources for applications instead of the resources being consumed by the desktop environment itself. - -## LXQt - -[LXQt](http://lxqt.org/) is the successor of LXDE, one of the most lightweight desktop environments. It’s a merger of two open source projects LXDE and Razor-Qt. The first usable version of LXQt (v 0.9) was released in 2015. Initially, the developers used Qt4 but then all compatibility with it was dropped, and they moved to Qt5 and KDE Frameworks 5 for speedy development. I have tried LXQt on my Arch systems, and its a great lightweight desktop environment, but it has a long way to go before it becomes the rightful successor of LXDE. - -## Xfce - -[Xfce](http://www.xfce.org/) predates the KDE desktop environment. It is one of the oldest and lightest desktop environments around. The latest release of Xfce is 4.15, which was released in 2015 and uses modern technologies like GTK+ 3. Xfce is used by many special purpose distributions, such as Ubuntu Studio, because -- much like MATE -- it frees most system resources for applications. It’s also the default desktop environment of many notable Linux distributions including Manjaro Linux, PC/OS, Salix, and Mythbuntu. - -## Budgie - -[Budgie](https://solus-project.com/budgie/) is a new desktop environment being developed by the Solus Linux team. Solus is new Linux distribution that’s being developed from scratch, and Budgie is a core component of it. Budgie uses many GNOME components and offers a minimalistic UI. Because there’s not much information about the new desktop, I talked to the core developer of Solus, Ikey Doherty, and he explained, “We ship our own desktop, the Budgie Desktop. Unlike some other desktops, this is not a fork, rather it aims for full integration into the GNOME stack. It's written from scratch, and is specifically designed to cater for the experience Solus is offering. We work with upstream GNOME here as much as we can, contributing fixes, and advocate and support their work.” - -## Pantheon - -[Pantheon](https://elementary.io/) needs no introduction, it’s the desktop environment powering the lovely Linux distribution elementary OS. Similar to Budgie, Pantheon is not a fork of GNOME as many may assume. elementary OS team comes from design background so they pay very close attention to minute details, as a result Pantheon is extremely polished desktop environment. At the moment, it may lack many feature found in DEs like Plasma, but the developers are taking their time in order to stick to the design principle. - -![](http://www.linux.com/images/stories/66866/DE-3.png) - -## Conclusion - -As I went through this story, I realized the awesomeness of open source and Linux. There is something for everyone. As Jon “maddog” Hall said during the latest SCaLE 14, “Yes, there are 300 Linux distributions. I can try them and stick to the one that I like!” - -So, enjoy this diversity and use the one that floats your boat! - ------------------------------------------------------------------------------- - -via: http://www.linux.com/news/software/applications/881107-best-linux-desktop-environments-for-2016 - -作者:[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 From 455c2fae1ad9c0cf5c597da90e8a47e4d944b485 Mon Sep 17 00:00:00 2001 From: cposture Date: Fri, 26 Feb 2016 14:51:27 +0800 Subject: [PATCH 1060/1710] Data Structures in the Linux Kernel --- sources/tech/20151123 Data Structures in the Linux Kernel.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151123 Data Structures in the Linux Kernel.md b/sources/tech/20151123 Data Structures in the Linux Kernel.md index 187b3ce9cd..edc4c1a5a7 100644 --- a/sources/tech/20151123 Data Structures in the Linux Kernel.md +++ b/sources/tech/20151123 Data Structures in the Linux Kernel.md @@ -1,3 +1,4 @@ +【Translating By cposture 2016-02-26】 Data Structures in the Linux Kernel ================================================================================ From 86223bf367d29aa12b2281aa857f1b0c8dd019f9 Mon Sep 17 00:00:00 2001 From: cposture Date: Fri, 26 Feb 2016 15:08:36 +0800 Subject: [PATCH 1061/1710] Translaing by cposture-How to add open source experience to your resume --- .../20160225 How to add open source experience to your resume.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160225 How to add open source experience to your resume.md b/sources/tech/20160225 How to add open source experience to your resume.md index 73e22c2b8b..eee0d6aa23 100644 --- a/sources/tech/20160225 How to add open source experience to your resume.md +++ b/sources/tech/20160225 How to add open source experience to your resume.md @@ -1,3 +1,4 @@ +【Translating by cposture 2016-02-25】 How to add open source experience to your resume ================================================== From 1fc20642e29479ec1a947ce6b6d4663d13207399 Mon Sep 17 00:00:00 2001 From: runningwater Date: Fri, 26 Feb 2016 15:57:18 +0800 Subject: [PATCH 1062/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20ru?= =?UTF-8?q?nningwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20160225 The Tao of project management.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160225 The Tao of project management.md b/sources/tech/20160225 The Tao of project management.md index 629bdaef36..a8de86ae0b 100644 --- a/sources/tech/20160225 The Tao of project management.md +++ b/sources/tech/20160225 The Tao of project management.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) The Tao of project management ================================= @@ -153,7 +154,7 @@ I encourage you to find ways to incorporate some of these ideas into your own pr via: https://opensource.com/open-organization/16/2/tao-project-management 作者:[Allison Matlack][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 d97cd027939b2425f9db4c2b0ce9dad0a8e0594a Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Fri, 26 Feb 2016 19:14:25 +0800 Subject: [PATCH 1063/1710] name1e5s translating... --- ...224 Can we tackle the Zika virus with rapid, open research.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md b/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md index e25df9c008..d243496585 100644 --- a/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md +++ b/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md @@ -1,3 +1,4 @@ +name1e5s translating Can we tackle the Zika virus with rapid, open research? ============================================================ From 7fad6c6a8c6b147a846bb273ddcfc61c17c1f22f Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Fri, 26 Feb 2016 20:04:33 +0800 Subject: [PATCH 1064/1710] [Translated]20160224 Can we tackle the Zika virus with rapid, open research --- ...he Zika virus with rapid, open research.md | 28 ------------------- ...he Zika virus with rapid, open research.md | 27 ++++++++++++++++++ 2 files changed, 27 insertions(+), 28 deletions(-) delete mode 100644 sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md create mode 100644 translated/tech/20160224 Can we tackle the Zika virus with rapid, open research.md diff --git a/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md b/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md deleted file mode 100644 index d243496585..0000000000 --- a/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md +++ /dev/null @@ -1,28 +0,0 @@ -name1e5s translating -Can we tackle the Zika virus with rapid, open research? -============================================================ - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_LifeScience_OpenScience_520x292_12268077_0614MM.png?itok=3ZD2Mce9) - -One of the major issues with the Zika virus is that so little is known about it. That means that a lot of research has to be done very quickly. - -The Zika virus is at the heart of a global health emergency. It became a global health emergency after outbreaks began in 2015, and has possible links to birth defects. When the virus was first discovered in the late forties, human infections had been observed as early as 1952 according to Wikipedia. - -On February 10, the open journal [PLoS released a statement][1] on data sharing in public emergencies. Then, an article in the research journal F1000, [Open drug discovery for the Zika virus][2], discussed the status of Zika along with the need to conduct research openly. The statement from PLoS lists more than 30 important organizations who have aligned around the open dissemination of data as the virus is studied. And the World Health Organization has implemented special provisions that submissions to the WHO Bulletin now be made available under a [Creative Commons license][3]. - -Rapid publication, unrestricted reuse, and emphasizing dissemination of research are strategic steps that the open science community has been pushing for in all scientific research. Seeing a start with health emergencies that require our immediate attention is encouraging. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/2/how-rapid-open-science-could-change-game-zika-virus - -作者:[Marcus D. Hanwell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mhanwell -[1]: http://blogs.plos.org/plos/2016/02/statement-on-data-sharing-in-public-health-emergencies/ -[2]: http://f1000research.com/articles/5-150/v1 -[3]: https://creativecommons.org/licenses/by/3.0/igo/ diff --git a/translated/tech/20160224 Can we tackle the Zika virus with rapid, open research.md b/translated/tech/20160224 Can we tackle the Zika virus with rapid, open research.md new file mode 100644 index 0000000000..8ed74fc15f --- /dev/null +++ b/translated/tech/20160224 Can we tackle the Zika virus with rapid, open research.md @@ -0,0 +1,27 @@ +我们能通过快速的,开放的研究战胜寨卡病毒吗? +============================================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_LifeScience_OpenScience_520x292_12268077_0614MM.png?itok=3ZD2Mce9) + +关于寨卡病毒,最主要的问题就是我们对于它了解的太少了。这意味着我们需要尽快对它作出很多研究。 + +寨卡病毒现已严重威胁到世界人民的健康。在 2015 年爆发之后,它就成为了全球卫生的紧急状况,并且这个病毒也可能与儿童的出生缺陷有关。根据维基百科,在这个病毒在 40 年代末期被发现以后,它对于人类的影响早在 1952 年就被观测到了。 + +在 2 月 10 日,开放杂志 PLoS [发布了一个声明][1],这个是声明是关于有关公共公众紧急状况的信息的共享。在此之后,刊登在开放期刊 F1000 的一篇文章 [开始了对于能治疗寨卡病毒的药物的研究][2],它开放的讨论寨卡病毒的状况以及对它进行研究的需要。那个来自 PLoS 的声明列出了超过 30 个开放了对于寨卡病毒的研究进度的数据的重要组织。并且世界卫生组织实施了对于提交到他们那里的资料的特别规定使得在一个[创作共用许可证下][3]公布。 + +快速公布,无限制的重复利用,以及强调研究结果的传播是开放科研组织把他们的研究推出的战略性一步。看到一个需要我们给予关注的紧急状况的研究的开端是很令人受鼓舞的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/how-rapid-open-science-could-change-game-zika-virus + +作者:[Marcus D. Hanwell][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mhanwell +[1]: http://blogs.plos.org/plos/2016/02/statement-on-data-sharing-in-public-health-emergencies/ +[2]: http://f1000research.com/articles/5-150/v1 +[3]: https://creativecommons.org/licenses/by/3.0/igo/ From 3a249757c99e6c40adcc2bc39acacbd964d5c66f Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Fri, 26 Feb 2016 20:22:12 +0800 Subject: [PATCH 1065/1710] name1e5s translating... --- sources/talk/20151019 Gaming On Linux--All You Need To Know.md | 1 + 1 file changed, 1 insertion(+) 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 332136112a..6618b8302d 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,4 @@ +name1e5s translating Gaming On Linux: All You Need To Know ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Gaming-on-Linux.jpeg) From fd5421db9660dec797b7723f468be56263181e84 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 27 Feb 2016 09:12:13 +0800 Subject: [PATCH 1066/1710] Delete 20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md --- ...ll MariaDB 10 on CentOS 7 CPanel Server.md | 327 ------------------ 1 file changed, 327 deletions(-) delete mode 100644 sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md diff --git a/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md b/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md deleted file mode 100644 index ccd14d1410..0000000000 --- a/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md +++ /dev/null @@ -1,327 +0,0 @@ -translation by strugglingyouth -How to Install MariaDB 10 on CentOS 7 CPanel Server -================================================================================ - -MariaDB is a enhanced open source and drop-in replacement for MySQL. It is developed by MariaDB community and available under the terms of the GPL v2 license. Software Security is the main focus for the MariaDB developers. They maintain its own set of security patches for each MariaDB releases. When any critical security issues are discovered, the developers introduces a new release of MariaDB to get the fix out as soon as possible. - -MariaDB is always up-to-date with the latest MySQL releases. It is highly compatible and works exactly like the MySQL. Almost all commands, data, table definition files, Client APIs, protocols, interfaces, structures, filenames, binaries, ports, database storage locations etc are same as the MySQL. It isn't even needed to convert databases to switch to MariaDB. - -### Advantages of MariaDB ### - -- Truly Open source -- More quicker and transparent security releases -- Highly Compatible with MySQL -- Improved Performance -- More storage engines compared to MySQL - -In this article, I provides guidelines on how to upgrade MySQL 5.5 to the latest MariaDB on a CentOS 7 CPanel server. Let's walk through the Pre-installation steps. - -### Pre-requisites: ### - -#### 1. Stop current MySQL Service #### - - root@server1 [/var/# mysql - Welcome to the MySQL monitor. Commands end with ; or \g. - Your MySQL connection id is 5859 - Server version: 5.5.47-cll MySQL Community Server (GPL) - - Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. - - Oracle is a registered trademark of Oracle Corporation and/or its - affiliates. Other names may be trademarks of their respective - owners. - - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. - - root@server1 [~]# systemctl stop mysql - root@server1 [~]# systemctl status mysql - ● mysql.service - LSB: start and stop MySQL - Loaded: loaded (/etc/rc.d/init.d/mysql) - Active: failed (Result: exit-code) since Sun 2016-01-31 10:00:02 UTC; 1min 31s ago - Docs: man:systemd-sysv-generator(8) - Main PID: 23430 (code=exited, status=203/EXEC) - - Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Started MySQL Server. - Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Starting MySQL Server... - Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service: main process exited, code=exited, status=203/EXEC - Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Unit mysql.service entered failed state. - Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service failed. - -#### 2. Move all configuration files and databases prior to the upgrade #### - -Move the DB storage path and MySQL configuration files - - root@server1 [~]# cp -Rf /var/lib/mysql /var/lib/mysql-old - - root@server1 [/var/lib/mysql]# cat /etc/my.cnf - [mysqld] - default-storage-engine=MyISAM - innodb_file_per_table=1 - max_allowed_packet=268435456 - open_files_limit=10000 - - root@server1 [~]#mv /etc/my.cnf /etc/my.cnf-old - -#### 3. Remove and uninstall all MySQL rpms from the server #### - -Run the following commands to disable the MySQL RPM targets. By running this commands, cPanel will no longer handle MySQL updates, and mark these rpm.versions as uninstalled on the system. - - /scripts/update_local_rpm_versions --edit target_settings.MySQL50 uninstalled - /scripts/update_local_rpm_versions --edit target_settings.MySQL51 uninstalled - /scripts/update_local_rpm_versions --edit target_settings.MySQL55 uninstalled - /scripts/update_local_rpm_versions --edit target_settings.MySQL56 uninstalled - -Now run the this command: - -/scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 to remove all existing MySQL rpms on the server and leave a clean environment for MariaDB installation. Please see its output below: - - root@server1 [/var/lib/mysql]# /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 - [2016-01-31 09:53:59 +0000] - [2016-01-31 09:53:59 +0000] Problems were detected with cPanel-provided files which are RPM controlled. - [2016-01-31 09:53:59 +0000] If you did not make these changes intentionally, you can correct them by running: - [2016-01-31 09:53:59 +0000] - [2016-01-31 09:53:59 +0000] > /usr/local/cpanel/scripts/check_cpanel_rpms --fix - [2016-01-31 09:53:59 +0000] - [2016-01-31 09:53:59 +0000] The following RPMs are unneeded on your system and should be uninstalled: - [2016-01-31 09:53:59 +0000] MySQL55-client-5.5.47-1.cp1148 - [2016-01-31 09:53:59 +0000] MySQL55-devel-5.5.47-1.cp1148 - [2016-01-31 09:53:59 +0000] MySQL55-server-5.5.47-1.cp1148 - [2016-01-31 09:53:59 +0000] MySQL55-shared-5.5.47-1.cp1148 - [2016-01-31 09:53:59 +0000] MySQL55-test-5.5.47-1.cp1148 - [2016-01-31 09:53:59 +0000] compat-MySQL50-shared-5.0.96-4.cp1136 - [2016-01-31 09:53:59 +0000] compat-MySQL51-shared-5.1.73-1.cp1150 - [2016-01-31 09:53:59 +0000] Removing 0 broken rpms: - [2016-01-31 09:53:59 +0000] rpm: no packages given for erase - [2016-01-31 09:53:59 +0000] No new RPMS needed for install - [2016-01-31 09:53:59 +0000] Disabling service monitoring. - [2016-01-31 09:54:01 +0000] Uninstalling unneeded rpms: MySQL55-test MySQL55-server MySQL55-client compat-MySQL51-shared compat-MySQL50-shared MySQL55-shared MySQL55-devel - [2016-01-31 09:54:04 +0000] Removed symlink /etc/systemd/system/multi-user.target.wants/mysql.service. - [2016-01-31 09:54:04 +0000] Restoring service monitoring. - -With these steps, we've uninstalled existing MySQL RPMs, marked targets to prevent further MySQL updates and made the server ready and clean for the MariaDB installation. - -To startup with the installation, we need to create a yum repository for MariaDB depending on the MariaDB & CentOS versions. This is how I did it! - -### Installation procedures: ### - -#### Step 1: Creating a YUM repository. #### - - root@server1 [~]# vim /etc/yum.repos.d/MariaDB.repo - [mariadb] - name = MariaDB - baseurl = http://yum.mariadb.org/10.0/centos7-amd64/ - gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB - gpgcheck=1 - root@server1 [/etc/yum.repos.d]# cat /etc/yum.repos.d/MariaDB.repo - [mariadb] - name = MariaDB - baseurl = http://yum.mariadb.org/10.0/centos7-amd64/ - gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB - gpgcheck=1 - -#### Step 2: Open the /etc/yum.conf and modify the exclude line as below: #### - -**Remove this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* - -**And replace with this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* nsd* proftpd* pure-ftpd* spamassassin* squirrelmail* - -**\*\*\* IMPORTANT \*\*\*** - -We need to make sure, we've removed the MySQL and PHP from the exclude list. - -#### Step 3: Run the following command to install MariaDB and related packages. #### - -**yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql** - - root@server1 [~]#yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql - - Dependencies Resolved - - =============================================================================================================================================== - Package Arch Version Repository Size - =============================================================================================================================================== - Installing: - MariaDB-client x86_64 10.0.23-1.el7.centos mariadb 10 M - MariaDB-devel x86_64 10.0.23-1.el7.centos mariadb 6.3 M - MariaDB-server x86_64 10.0.23-1.el7.centos mariadb 55 M - php-mysql x86_64 5.4.16-36.el7_1 base 99 k - Installing for dependencies: - MariaDB-common x86_64 10.0.23-1.el7.centos mariadb 43 k - MariaDB-shared x86_64 10.0.23-1.el7.centos mariadb 1.2 M - libzip x86_64 0.10.1-8.el7 base 48 k - php-common x86_64 5.4.16-36.el7_1 base 563 k - php-pdo x86_64 5.4.16-36.el7_1 base 97 k - - Transaction Summary - =============================================================================================================================================== - Install 4 Packages (+5 Dependent package) - -#### Step 4: Restart and make sure the MySQL service is up. #### - - root@server1 [~]# systemctl start mysql - root@server1 [~]# - root@server1 [~]# - root@server1 [~]# systemctl status mysql - ● mysql.service - LSB: start and stop MySQL - Loaded: loaded (/etc/rc.d/init.d/mysql) - Active: active (exited) since Sun 2016-01-31 10:01:46 UTC; 3s ago - Docs: man:systemd-sysv-generator(8) - Process: 23717 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS) - Main PID: 23430 (code=exited, status=203/EXEC) - - Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Starting LSB: start and stop MySQL... - Jan 31 10:01:46 server1.centos7-test.com mysql[23717]: Starting MySQL SUCCESS! - Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. - -#### Step 5: Run mysql_upgrade command #### - -It will examine all tables in all databases for incompatibilities with the current installed version and upgrades the system tables if necessary to take advantage of new privileges or capabilities that might have added with the current version. - - root@server1 [~]# mysql_upgrade - MySQL upgrade detected - Phase 1/6: Checking and upgrading mysql database - Processing databases - mysql - mysql.columns_priv OK - mysql.db OK - mysql.event OK - mysql.func OK - mysql.help_category OK - mysql.help_keyword OK - mysql.help_relation OK - mysql.help_topic OK - mysql.host OK - mysql.ndb_binlog_index OK - mysql.plugin OK - mysql.proc OK - mysql.procs_priv OK - mysql.proxies_priv OK - mysql.servers OK - mysql.tables_priv OK - mysql.time_zone OK - mysql.time_zone_leap_second OK - mysql.time_zone_name OK - mysql.time_zone_transition OK - mysql.time_zone_transition_type OK - mysql.user OK - Phase 2/6: Fixing views from mysql - Phase 3/6: Running 'mysql_fix_privilege_tables' - Phase 4/6: Fixing table and database names - Phase 5/6: Checking and upgrading tables - Processing databases - cphulkd - cphulkd.auths OK - cphulkd.blacklist OK - cphulkd.brutes OK - cphulkd.good_logins OK - cphulkd.ip_lists OK - cphulkd.known_netblocks OK - cphulkd.login_track OK - cphulkd.logins OK - cphulkd.report OK - cphulkd.whitelist OK - eximstats - eximstats.defers OK - eximstats.failures OK - eximstats.sends OK - eximstats.smtp OK - information_schema - leechprotect - leechprotect.hits OK - modsec - modsec.hits OK - performance_schema - roundcube - roundcube.cache OK - roundcube.cache_index OK - roundcube.cache_messages OK - roundcube.cache_shared OK - roundcube.cache_thread OK - roundcube.contactgroupmembers OK - roundcube.contactgroups OK - roundcube.contacts OK - roundcube.cp_schema_version OK - roundcube.dictionary OK - roundcube.identities OK - roundcube.searches OK - roundcube.session OK - roundcube.system OK - roundcube.users OK - saheetha_test - saheetha_test.authors OK - whmxfer - whmxfer.sessions OK - Phase 6/6: Running 'FLUSH PRIVILEGES' - OK - -#### Step 6 : Restart the MySQL service once again to ensure everything works perfect. #### - - root@server1 [~]# systemctl restart mysql - root@server1 [~]# - root@server1 [~]# systemctl status mysql - ● mysql.service - LSB: start and stop MySQL - Loaded: loaded (/etc/rc.d/init.d/mysql) - Active: active (running) since Sun 2016-01-31 10:04:11 UTC; 9s ago - Docs: man:systemd-sysv-generator(8) - Process: 23831 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS) - Process: 23854 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS) - Main PID: 23430 (code=exited, status=203/EXEC) - CGroup: /system.slice/mysql.service - ├─23861 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server1.centos7-test.com.pid - └─23933 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/v... - - Jan 31 10:04:10 server1.centos7-test.com systemd[1]: Starting LSB: start and stop MySQL... - Jan 31 10:04:11 server1.centos7-test.com mysql[23854]: Starting MySQL. SUCCESS! - Jan 31 10:04:11 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. - -#### Step 7: Run EasyApache to rebuild Apache/PHP with MariaDB and ensure all PHP modules remains intact. #### - - root@server1 [~]#/scripts/easyapache --build - - ****IMPORTANT ***** - If you forget to rebuild Apache/PHP after the MariaDB installation, it will report the library error as below: - - root@server1 [/etc/my.cnf.d]# php -v - php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory - -#### Step 8: Now verify the installation and databases. #### - - root@server1 [/var/lib/mysql]# mysql - Welcome to the MariaDB monitor. Commands end with ; or \g. - Your MariaDB connection id is 15 - Server version: 10.0.23-MariaDB MariaDB Server - - Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. - - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. - - MariaDB [(none)]> show storage engines; - +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ - | Engine | Support | Comment | Transactions | XA | Savepoints | - +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ - | CSV | YES | CSV storage engine | NO | NO | NO | - | MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | - | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | - | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | - | MyISAM | YES | MyISAM storage engine | NO | NO | NO | - | InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES | - | ARCHIVE | YES | Archive storage engine | NO | NO | NO | - | FEDERATED | YES | FederatedX pluggable storage engine | YES | NO | YES | - | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | - | Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO | - +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ - 10 rows in set (0.00 sec) - -That's all :). Now we're all set to go with MariaDB with its improved and efficient features. Hope you enjoyed reading this documentation. I would recommend your valuable suggestions and feedback on this! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/how-tos/install-mariadb-10-centos-7-cpanel/ - -作者:[Saheetha Shameer][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/saheethas/ From 0ff9c6c29c593d35b231937a4e70040a14ee9cc4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 27 Feb 2016 09:12:48 +0800 Subject: [PATCH 1067/1710] Create 20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md --- ...ll MariaDB 10 on CentOS 7 CPanel Server.md | 326 ++++++++++++++++++ 1 file changed, 326 insertions(+) create mode 100644 translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md diff --git a/translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md b/translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md new file mode 100644 index 0000000000..8d452af0ad --- /dev/null +++ b/translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md @@ -0,0 +1,326 @@ + +在 CentOS 7 CPanel 服务器上安装 MariaDB 10 +================================================================================ + +MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主要由 MariaDB 社区在维护,采用 GPL v2 授权许可。软件的安全性是 MariaDB 开发者的主要焦点。他们保持为 MariaDB 的每个版本发布安全补丁。当有任何安全问题被发现时,开发者会尽快修复并推出 MariaDB 的新版本。 + +### MariaDB 的优势 ### + +- 完全开源 +- 快速且透明的安全版本 +- 与 MySQL 高度兼容 +- 性能更好 +- 比 MySQL 的存储引擎多 + +在这篇文章中,我将谈论关于如何升级 MySQL5.5 到最新的 MariaDB 在CentOS7 CPanel 服务器上。在安装前先完成以下步骤。 + +### 先决条件: ### + +#### 1. 停止当前 MySQL 服务 #### + + root@server1 [/var/# mysql + Welcome to the MySQL monitor. Commands end with ; or \g. + Your MySQL connection id is 5859 + Server version: 5.5.47-cll MySQL Community Server (GPL) + + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + + Oracle is a registered trademark of Oracle Corporation and/or its + affiliates. Other names may be trademarks of their respective + owners. + + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + + root@server1 [~]# systemctl stop mysql + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: failed (Result: exit-code) since Sun 2016-01-31 10:00:02 UTC; 1min 31s ago + Docs: man:systemd-sysv-generator(8) + Main PID: 23430 (code=exited, status=203/EXEC) + + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Started MySQL Server. + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Starting MySQL Server... + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service: main process exited, code=exited, status=203/EXEC + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Unit mysql.service entered failed state. + Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service failed. + +#### 2. 在升级之前将所有配置文件和数据库转移 #### + +转移数据库的存储路径和 MySQL 的配置文件 + + root@server1 [~]# cp -Rf /var/lib/mysql /var/lib/mysql-old + + root@server1 [/var/lib/mysql]# cat /etc/my.cnf + [mysqld] + default-storage-engine=MyISAM + innodb_file_per_table=1 + max_allowed_packet=268435456 + open_files_limit=10000 + + root@server1 [~]#mv /etc/my.cnf /etc/my.cnf-old + +#### 3. 从服务器上删除和卸载 MySQL 所有的 RPM 包 #### + +运行以下命令来禁用 MySQL 的 RPM 的目标。通过运行此命令,cPanel 将不再处理 MySQL 的更新,并在系统上将卸载的标记为 rpm.versions。 + + /scripts/update_local_rpm_versions --edit target_settings.MySQL50 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL51 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL55 uninstalled + /scripts/update_local_rpm_versions --edit target_settings.MySQL56 uninstalled + +现在运行以下命令: + +/scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 +移除服务器上所有已存在的 MySQL rpms 来为 MariaDB 的安装清理环境。请看下面的输出: + + root@server1 [/var/lib/mysql]# /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] Problems were detected with cPanel-provided files which are RPM controlled. + [2016-01-31 09:53:59 +0000] If you did not make these changes intentionally, you can correct them by running: + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] > /usr/local/cpanel/scripts/check_cpanel_rpms --fix + [2016-01-31 09:53:59 +0000] + [2016-01-31 09:53:59 +0000] The following RPMs are unneeded on your system and should be uninstalled: + [2016-01-31 09:53:59 +0000] MySQL55-client-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-devel-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-server-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-shared-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] MySQL55-test-5.5.47-1.cp1148 + [2016-01-31 09:53:59 +0000] compat-MySQL50-shared-5.0.96-4.cp1136 + [2016-01-31 09:53:59 +0000] compat-MySQL51-shared-5.1.73-1.cp1150 + [2016-01-31 09:53:59 +0000] Removing 0 broken rpms: + [2016-01-31 09:53:59 +0000] rpm: no packages given for erase + [2016-01-31 09:53:59 +0000] No new RPMS needed for install + [2016-01-31 09:53:59 +0000] Disabling service monitoring. + [2016-01-31 09:54:01 +0000] Uninstalling unneeded rpms: MySQL55-test MySQL55-server MySQL55-client compat-MySQL51-shared compat-MySQL50-shared MySQL55-shared MySQL55-devel + [2016-01-31 09:54:04 +0000] Removed symlink /etc/systemd/system/multi-user.target.wants/mysql.service. + [2016-01-31 09:54:04 +0000] Restoring service monitoring. + +通过这些步骤,我们已经卸载了现有的 MySQL RPMs,并做了标记来防止 MySQL的更新,服务器的环境已经清理然后准备安装 MariaDB。 + +开始安装吧,我们需要在 CentOS 为 MariaDB 创建一个 yum 软件库。下面是我的做法! + +### 安装步骤: ### + +#### 第1步:创建 YUM 软件库。#### + + root@server1 [~]# vim /etc/yum.repos.d/MariaDB.repo + [mariadb] + name = MariaDB + baseurl = http://yum.mariadb.org/10.0/centos7-amd64/ + gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + gpgcheck=1 + root@server1 [/etc/yum.repos.d]# cat /etc/yum.repos.d/MariaDB.repo + [mariadb] + name = MariaDB + baseurl = http://yum.mariadb.org/10.0/centos7-amd64/ + gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + gpgcheck=1 + +#### 第2步:打开 /etc/yum.conf 并修改如下行: #### + +**Remove this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* + +**And replace with this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* nsd* proftpd* pure-ftpd* spamassassin* squirrelmail* + +**\*\*\* IMPORTANT \*\*\*** + +需要确保我们已经从 exclude 列表中移除了 MySQL 和 PHP。 + +#### 第3步:运行以下命令来安装 MariaDB 和相关的包。 #### + +**yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql** + + root@server1 [~]#yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql + + Dependencies Resolved + + =============================================================================================================================================== + Package Arch Version Repository Size + =============================================================================================================================================== + Installing: + MariaDB-client x86_64 10.0.23-1.el7.centos mariadb 10 M + MariaDB-devel x86_64 10.0.23-1.el7.centos mariadb 6.3 M + MariaDB-server x86_64 10.0.23-1.el7.centos mariadb 55 M + php-mysql x86_64 5.4.16-36.el7_1 base 99 k + Installing for dependencies: + MariaDB-common x86_64 10.0.23-1.el7.centos mariadb 43 k + MariaDB-shared x86_64 10.0.23-1.el7.centos mariadb 1.2 M + libzip x86_64 0.10.1-8.el7 base 48 k + php-common x86_64 5.4.16-36.el7_1 base 563 k + php-pdo x86_64 5.4.16-36.el7_1 base 97 k + + Transaction Summary + =============================================================================================================================================== + Install 4 Packages (+5 Dependent package) + +#### 第4步:重新启动,并确保 MySQL 服务已启动。#### + + root@server1 [~]# systemctl start mysql + root@server1 [~]# + root@server1 [~]# + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: active (exited) since Sun 2016-01-31 10:01:46 UTC; 3s ago + Docs: man:systemd-sysv-generator(8) + Process: 23717 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS) + Main PID: 23430 (code=exited, status=203/EXEC) + + Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Starting LSB: start and stop MySQL... + Jan 31 10:01:46 server1.centos7-test.com mysql[23717]: Starting MySQL SUCCESS! + Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. + +#### 第5步:运行 mysql_upgrade 命令。 #### + +它将检查所有数据库中的所有表与当前安装的版本是否兼容并在必要时会更新系统表采取新的特权或功能,可能会增加当前版本的性能。 + + + root@server1 [~]# mysql_upgrade + MySQL upgrade detected + Phase 1/6: Checking and upgrading mysql database + Processing databases + mysql + mysql.columns_priv OK + mysql.db OK + mysql.event OK + mysql.func OK + mysql.help_category OK + mysql.help_keyword OK + mysql.help_relation OK + mysql.help_topic OK + mysql.host OK + mysql.ndb_binlog_index OK + mysql.plugin OK + mysql.proc OK + mysql.procs_priv OK + mysql.proxies_priv OK + mysql.servers OK + mysql.tables_priv OK + mysql.time_zone OK + mysql.time_zone_leap_second OK + mysql.time_zone_name OK + mysql.time_zone_transition OK + mysql.time_zone_transition_type OK + mysql.user OK + Phase 2/6: Fixing views from mysql + Phase 3/6: Running 'mysql_fix_privilege_tables' + Phase 4/6: Fixing table and database names + Phase 5/6: Checking and upgrading tables + Processing databases + cphulkd + cphulkd.auths OK + cphulkd.blacklist OK + cphulkd.brutes OK + cphulkd.good_logins OK + cphulkd.ip_lists OK + cphulkd.known_netblocks OK + cphulkd.login_track OK + cphulkd.logins OK + cphulkd.report OK + cphulkd.whitelist OK + eximstats + eximstats.defers OK + eximstats.failures OK + eximstats.sends OK + eximstats.smtp OK + information_schema + leechprotect + leechprotect.hits OK + modsec + modsec.hits OK + performance_schema + roundcube + roundcube.cache OK + roundcube.cache_index OK + roundcube.cache_messages OK + roundcube.cache_shared OK + roundcube.cache_thread OK + roundcube.contactgroupmembers OK + roundcube.contactgroups OK + roundcube.contacts OK + roundcube.cp_schema_version OK + roundcube.dictionary OK + roundcube.identities OK + roundcube.searches OK + roundcube.session OK + roundcube.system OK + roundcube.users OK + saheetha_test + saheetha_test.authors OK + whmxfer + whmxfer.sessions OK + Phase 6/6: Running 'FLUSH PRIVILEGES' + OK + +#### 第6步:再次重新启动MySQL的服务,以确保一切都运行完好。 #### + + root@server1 [~]# systemctl restart mysql + root@server1 [~]# + root@server1 [~]# systemctl status mysql + ● mysql.service - LSB: start and stop MySQL + Loaded: loaded (/etc/rc.d/init.d/mysql) + Active: active (running) since Sun 2016-01-31 10:04:11 UTC; 9s ago + Docs: man:systemd-sysv-generator(8) + Process: 23831 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS) + Process: 23854 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS) + Main PID: 23430 (code=exited, status=203/EXEC) + CGroup: /system.slice/mysql.service + ├─23861 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server1.centos7-test.com.pid + └─23933 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/v... + + Jan 31 10:04:10 server1.centos7-test.com systemd[1]: Starting LSB: start and stop MySQL... + Jan 31 10:04:11 server1.centos7-test.com mysql[23854]: Starting MySQL. SUCCESS! + Jan 31 10:04:11 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. + +#### 第7步:运行 EasyApache 用 MariaDB 重建 Apache/PHP,并确保所有 PHP 的模块保持不变。#### + + root@server1 [~]#/scripts/easyapache --build + + ****IMPORTANT ***** + If you forget to rebuild Apache/PHP after the MariaDB installation, it will report the library error as below: + + root@server1 [/etc/my.cnf.d]# php -v + php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory + +#### 第8步:现在验证安装的数据库。 #### + + root@server1 [/var/lib/mysql]# mysql + Welcome to the MariaDB monitor. Commands end with ; or \g. + Your MariaDB connection id is 15 + Server version: 10.0.23-MariaDB MariaDB Server + + Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. + + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + + MariaDB [(none)]> show storage engines; + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + | Engine | Support | Comment | Transactions | XA | Savepoints | + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + | CSV | YES | CSV storage engine | NO | NO | NO | + | MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | + | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | + | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | + | MyISAM | YES | MyISAM storage engine | NO | NO | NO | + | InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES | + | ARCHIVE | YES | Archive storage engine | NO | NO | NO | + | FEDERATED | YES | FederatedX pluggable storage engine | YES | NO | YES | + | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | + | Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO | + +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ + 10 rows in set (0.00 sec) + +就这样 :)。现在,我们该去欣赏 MariaDB 完善和高效的特点了。希望你喜欢阅读本文。希望留下您宝贵的建议和反馈! +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-mariadb-10-centos-7-cpanel/ + +作者:[Saheetha Shameer][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/saheethas/ From 84afc48e27e7e0b72cb2e017fb2a74d3ff28d5c2 Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Sat, 27 Feb 2016 14:55:00 +0800 Subject: [PATCH 1068/1710] [Translated]20151019 Gaming On Linux--All You Need To Know --- ...9 Gaming On Linux--All You Need To Know.md | 204 ------------------ ...9 Gaming On Linux--All You Need To Know.md | 200 +++++++++++++++++ 2 files changed, 200 insertions(+), 204 deletions(-) delete mode 100644 sources/talk/20151019 Gaming On Linux--All You Need To Know.md create mode 100644 translated/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 deleted file mode 100644 index 6618b8302d..0000000000 --- a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md +++ /dev/null @@ -1,204 +0,0 @@ -name1e5s translating -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/ diff --git a/translated/talk/20151019 Gaming On Linux--All You Need To Know.md b/translated/talk/20151019 Gaming On Linux--All You Need To Know.md new file mode 100644 index 0000000000..ae46ccb117 --- /dev/null +++ b/translated/talk/20151019 Gaming On Linux--All You Need To Know.md @@ -0,0 +1,200 @@ +Linux上的游戏:所有你需要知道的 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Gaming-on-Linux.jpeg) + +** 我能在 Linux 上玩游戏吗 ?** + +这是打算[投奔 Linux 阵营][1]的人最经常问的问题之一。毕竟,在 Linux 上面玩游戏经常被认为有点难以实现。事实上,一些人甚至考虑他们能不能在 Linux 上看电影或者听音乐。考虑到这些,关于 Linux 的平台的游戏的问题是很现实的。「 + +在本文中,我将解答大多数 Linux 新手关于在 Linux 打游戏的问题。例如 Linux 下能不能玩游戏,如果能的话,在**哪里下载游戏**或者如何获取有关游戏的信息。 + +但是在此之前,我需要说明一下。我不是一个 PC 上的玩家或者说我不认为我是一个在 Linux 桌面上完游玩戏的家伙。我更喜欢在 PS4 上玩游戏并且我不关心 PC 上的游戏甚至也不关心手机上的游戏(我没有给我的任何一个朋友安利糖果传奇)。这也就是你很少在 It's FOSS 上很少看见关于 [Linux 上的游戏][2]的部分。 + +所以我为什么要写这个主题? + +因为别人问过我几次有关 Linux 上的游戏的问题并且我想要写出来一个能解答这些问题的 Linux 上的游戏指南。注意,在这里我不只是讨论 Ubuntu 上的游戏。我讨论的是在所有的 Linux 上的游戏。 + +### 我能在 Linux 上玩游戏吗 ? ### + +是,但不是完全是。 + +“是”,是指你能在Linux上玩游戏;“不完全是”,是指你不能在 Linux 上玩 ’所有的游戏‘。 + +什么?你是拒绝的?不必这样。我的意思是你能在 Linux 上玩很多流行的游戏,比如[反恐精英以及地铁:最后的曙光][3]等。但是你可能不能玩到所有在 Windows 上流行的最新游戏,比如[实况足球2015][4]。 + +在我看来,造成这种情况的原因是 Linux 在桌面系统中仅占不到 2%,这占比使得大多数开发者没有在 Linux 上发布他们的游戏的打算。 + +这就意味指大多数近年来被提及的比较多的游戏很有可能不能在 Linux 上玩。不要灰心。我们能以某种方式在 Linux 上玩这些游戏,我们将在下面的章节中讨论这些方法。但是,在此之前,让我们看看在 Linux 上能玩的游戏的种类。 + +要我说的话,我会把那些游戏分为四类: + +1. Linux 原生游戏 +2. Linux 上的 Windows 游戏 +3. 浏览器里的游戏 +4. 终端里的游戏 + +让我们以最重要的 Linux 的原生游戏开始。 + +--------- + +### 1. 在哪里去找 Llinux 原生游戏 ?### + +原生游戏指的是官方支持 Linux 的游戏。这些游戏有原生的 Linux 客户端并且能像在 Linux 上的其他软件一样不需要附加的步骤就能安装在 Linux 上面(我们将在下一节讨论)。 + +所以,如你所见,这里有一些为 Linux 开发的游戏,下一个问题就是在哪能找到这些游戏以及如何安装。我将列出来一些让你玩到游戏的渠道了。 + +#### Steam #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Install-Steam-Ubuntu-11.jpeg) + +“[Steam][5] 是一个游戏的分发平台。就如同 Kindle 是电子书的分发平台,iTunes 是音乐的分发平台一样,Steam 也具有那样的功能。它给了你购买和安装游戏,玩多人游戏以及在它的平台上关注其他游戏的选项。这些游戏被[ DRM ][6]所保护。” + +两年以前,游戏平台 Steam 宣布支持 Linux,这在当时是一个大新闻。这是 Linux 上玩游戏被严肃的对待的一个迹象。尽管这个决定更多地影响了他们自己的基于 Linux 游戏平台[ Steam OS][7]。这仍然是令人欣慰的事情,因为它给 Linux 带来了一大堆游戏。 + +我已经写了一篇详细的关于安装以及使用 Steam 的文章。如果你想开始使用 Steam 的话,读读那篇文章。 + +- [在 Linux 上安装以及使用 Steam ][8] + +#### GOG.com #### + +[GOG.com][9] 失灵一个与 Steam 类似的平台。与 Steam 一样,你能在这上面找到数以百计的 Linux 游戏,你可以购买和安装它们。如果游戏支持好几个平台,尼卡一在多个操作系统上安装他们。你买到你账户的游戏你可以随时玩。捏可以在你想要下载的任何时间下载。 + +GOG.com 与 Steam 不同的是前者仅提供没有 DRM 保护的游戏以及电影。而且,GOG.com 完全是基于网页的,所以你不需要安装类似 Steam 的客户端。你只需要用浏览器下载游戏然后安装到你的系统上。 + +#### Portable Linux Games #### + +[Portable Linux Games][10] 是一个集聚了不少 Linux 游戏的网站。这家网站最特别以及最好的就是你能离线安装这些游戏。 + +你下载到的文件包含所有的依赖(仅需 Wine 以及 Perl)并且他们也是与平台无关的。你所需要的仅仅是下载文件并且双击来启动安装程序。你也可以把文件储存起来以用于将来的安装,如果你网速不够快的话我很推荐您这样做。 + +#### Game Drift 游戏商店 #### + +[Game Drift][11] 是一个只专注于游戏的基于 Ubuntu 的 Linux 发行版。但是如果你不想只为游戏就去安装这个发行版的话,你也可以经常上线看哪个游戏可以在 Linux 上运行并且安装他们。 + +#### Linux Game Database #### + +如其名字所示,[Linux Game Database][12]是一个收集了很多 Linux 游戏的网站。你能在这里浏览诸多类型的游戏并从游戏开发者的网站下载/安装这些游戏。作为这家网站的会员,你甚至可以为游戏打分。LGDB,有点像 Linux 游戏界的 IMDB 或者 IGN. + +#### Penguspy #### + +此网站由一个不想用 Windows 玩游戏的玩家创立。[Penguspy][13] 聚集了一些 Linux 下最好的游戏。在这里你也能分类浏览游戏,如果你喜欢这个游戏的话,你可以跳转到游戏开发者的网站去下载安装。 + +#### 软件源 #### + +看看你自己的发行版的软件源。那里可能有一些游戏。如果你用 Ubuntu 的话,它的软件中心里有一个游戏的分类。在一些其他的发行版里也有,比如 Liux Mint 等。 + +---------- + +### 2. 如何在 Linux 上玩 Windows 的游戏 ?### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Wine-Linux.png) + +到现在为止,我们一直在讨论 Linux 的原生游戏。但是并没有很多 Linux 上的原生游戏,或者说,火的不要不要的游戏大多不支持 Linux,但是都支持 Windows PC。所以,如何在 Linux 上玩 Wendows 的游戏? + +幸好,由于我们有 Wine, PlayOnLinux 和 CrossOver 等工具,我们能在 Linux 上玩不少的 Wendows 游戏。 + +#### Wine #### + +Wine 是一个能使 Wendows 应用在类似 Linux, BSD 和 OS X 上运行的兼容层。在 Wine 的帮助下,你可以在 Linux 下安装以及使用很多 Windows 下的应用。 + +[在 Ubuntu 上安装 Wine][14]或者在其他 Linux 上安装 Wine 是很简单的,因为大多数发行版的软件源里都有它。这里也有一个很大的[ Wine 支持的应用的数据库][15]供您浏览。 + +#### CrossOver #### + +[CrossOver][16] 是 Wine 的增强版,它给 Wine 提供了专业的技术上的支持。但是与 Wine 不同, CrossOver 不是免费的。你需要购买许可。好消息是它会把更新也贡献到 Wine 的开发者那里并且事实上加速了 Wine 的开发使得 Wine 能支持更多的 Windows 上的游戏和应用。如果你可以一年支付 48 美元,你可以购买 CrossOver 并得到他们提供的技术支持。 + +### PlayOnLinux ### + +PlayOnLinux 也基于 Wine 但是执行程序的方式略有不同。它有着更好用的,不同的界面。与 Wine 一样,PlayOnLinux 也是免费使用。你可以在[开发者自己的数据库里查看它支持的应用以及游戏][17]。 + +---------- + +### 3. 网页游戏 ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Chrome-Web-Store.jpeg) + +不必说你也应该知道有非常多的基于网页的游戏,这些游戏都可以在任何操作系统里运行,无论是 Windows,Linux,还是 OS X。大多数让人上瘾的手机游戏,比如[帝国之战][18]就有官方的网页版。 + +除了这些,还有 [Google Chrome在线商店][19],你可以在 Linux 上玩更多的这些游戏。这些 Chrome 上的游戏可以像一个单独的应用一样安装并从应用菜单中打开,一些游戏就算是离线也能运行。 + +---------- + +### 4. 终端游戏 ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/03/nSnake_Linux_terminal_game.jpeg) + +使用 Linux 的一个附加优势就是可以使用命令行终端玩游戏。我知道这不是最好的玩游戏的 方法,但是在终端里玩[贪吃蛇][20]或者 [2048][21] 很有趣。在[这个博客][21]中有一些好玩的的终端游戏。你可以浏览并安装你喜欢的游戏。 + +---------- + +### 如何保证游戏的版本是最新的 ?### + +当你了解了不少的在 Linux 上你可以玩到的游戏以及你如何使用他们,下一个问题就是如何保持游戏的版本是最新的。对于这件事,我建议你看看下面的博客,这些博客能告诉你 Linux 游戏世界的最新消息: + +- [Gaming on Linux][23]:我认为我把它叫做 Linux 游戏的门户并没有错误。在这你可以得到关于 Linux 的游戏的最新的传言以及新闻。最近, Gaming on Linux 有了一个由 Linux 游戏爱好者组成的漂亮的社区。 +- [Free Gamer][24]:一个专注于免费开源的游戏的博客。 +- [Linux Game News][25]:一个提供很多的 Linux 游戏的升级的 Tumbler 博客。 + +#### 还有别的要说呃吗? #### + +我认为让你知道如何开始在 Linux 上的游戏人生是一个好事。如果你仍然不能被说服。我推荐你做个[双系统][26],把 Linux 作为你的主要桌面系统,当你想玩游戏时,重启到 Windows。这是一个对游戏妥协的解决办法。 + +现在,这里是你说出你自己的状况的时候了。你在 Linux 上玩游戏吗?你最喜欢什么游戏?你关注了哪些游戏博客? + + +投票项目: +你怎样在 Linux 上玩游戏? + +- 我玩原生 Linux 游戏,我也用 Wine 以及 PlayOnLinux 运行 Windows 游戏 +- 我喜欢网页游戏 +- 我喜欢终端游戏 +- 我只玩原生 Linux 游戏 +- 我用 Steam +- 我用双系统,要玩游戏时就换到 Windows +- 我不玩游戏 + +注:投票代码 +
+
+ + + +注,发布时根据情况看怎么处理 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/linux-gaming-guide/ + +作者:[Abhishek][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者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/ \ No newline at end of file From 8b39d31702ec2d5ffeed0a4f8ab76252d2ed6bd8 Mon Sep 17 00:00:00 2001 From: name1e5s <836401406@qq.com> Date: Sat, 27 Feb 2016 15:00:12 +0800 Subject: [PATCH 1069/1710] =?UTF-8?q?remove=20=E5=91=83=20in=20line=20138?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talk/20151019 Gaming On Linux--All You Need To Know.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/talk/20151019 Gaming On Linux--All You Need To Know.md b/translated/talk/20151019 Gaming On Linux--All You Need To Know.md index ae46ccb117..d43b548f7c 100644 --- a/translated/talk/20151019 Gaming On Linux--All You Need To Know.md +++ b/translated/talk/20151019 Gaming On Linux--All You Need To Know.md @@ -135,7 +135,7 @@ PlayOnLinux 也基于 Wine 但是执行程序的方式略有不同。它有着 - [Free Gamer][24]:一个专注于免费开源的游戏的博客。 - [Linux Game News][25]:一个提供很多的 Linux 游戏的升级的 Tumbler 博客。 -#### 还有别的要说呃吗? #### +#### 还有别的要说的吗? #### 我认为让你知道如何开始在 Linux 上的游戏人生是一个好事。如果你仍然不能被说服。我推荐你做个[双系统][26],把 Linux 作为你的主要桌面系统,当你想玩游戏时,重启到 Windows。这是一个对游戏妥协的解决办法。 @@ -197,4 +197,4 @@ via: http://itsfoss.com/linux-gaming-guide/ [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/ \ No newline at end of file +[26]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ From e7827fd92651f3ae5c63b2b50169579961579dd6 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 27 Feb 2016 17:54:43 +0800 Subject: [PATCH 1070/1710] =?UTF-8?q?20160227-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rom Facebook, IBM, Yahoo, and more news.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md diff --git a/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md b/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md new file mode 100644 index 0000000000..518256d0e9 --- /dev/null +++ b/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md @@ -0,0 +1,72 @@ +Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news +=========================================================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/weekly_news_roundup_tv.png?itok=eqUoW1gU) + +In this week's edition of our open source news roundup, we take a look at the new IoT project from the Linux Foundation, three big corporations releasing open source, and more. + +**News roundup for February 21 - 26, 2016** + +### Linux Foundation unveils the Zephyr Project + +The Internet of Things (IoT) is shaping up to be the next big thing in consumer technology. At the moment, most IoT solutions are proprietary and closed source. Open source is making numerous in-roads into the IoT world, and that's undoubtedly going to accelerate now that the Linux Foundation has [announced the Zephyr Project][1]. + +The Zephyr Project, according to ZDNet, "hopes to bring vendors and developers together under a single operating system which could make the development of connected devices an easier, less expensive and more stable process." The Project "aims to incorporate input from the open source and embedded developer communities and to encourage collaboration on the RTOS (real-time operating system)," according to the [Linux Foundation's press release][2]. + +Currently, Intel Corporation, NXP Semiconductors N.V., Synopsys, Inc., and UbiquiOS Technology Limited are the main supporters of the project. The Linux Foundation intends to attract other IoT vendors to this effort as well. + +### Releases from Facebook, IBM, Yahoo + +As we all know, open source isn't just about individuals or small groups hacking on code and hardware. Quite a few large corporations have significant investments in open source. This past week, three of them affirmed their commitment to open source. + +Yahoo again waded into open source waters this week with the [release of CaffeOnSpark][3] artificial intelligence software under an Apache 2.0 license. CaffeOnSpark performs "a popular type of AI called 'deep learning' on the vast swaths of data kept in its Hadoop open-source file system for storing big data," according to VentureBeat. If you're curious, you can [find the source code on GitHub][4]. + +Earlier this week, Facebook "[unveiled a new project that seeks not only to accelerate the evolution of technologies that drive our mobile networks, but to freely share this work with the world’s telecoms][5]," according to Wired. The company plans to build "everything from new wireless radios to nee optical fiber equipment." The designs, according to Facebook, will be open source so any telecom firm can use them. + +As part of the [Open Mainframe Project][6], IBM has open sourced the code for its Anomaly Detection Engine (ADE) for Linux logs. [According to IBM][7], "ADE detects anomalous time slices and messages in Linux logs using statistical learning" to detect suspicious behaviour. You can grab the [source code for ADE][8] from GitHub. + +### European Union to fund research + +The European Research Council, the European Union's science and technology funding body, is [funding four open source research projects][9] to the tune of about €2 million. According to joinup.ec.europa.eu, the projects being funded are: + +- A code audit of Mozilla's open source Rust programming language + +- An initiative at INRIA (France's national computer science research center) studying secure programming + +- A project at Austria's Technische Universitat Graz testing "ways to secure code against attacks that exploit certain properties of the computer hardware" + +- The "development of techniques to prove popular cryptographic protocols and schemes" at IST Austria + +### In other news + +- [Infosys' newest weapon: open source][10] + +- [Intel demonstrates Android smartphone running a Linux desktop][11] + +- [BeeGFS file system goes open source][12] + +A big thanks, as always, to the Opensource.com moderators and staff for their help this week. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/weekly-news-feb-26 + +作者:[Scott Nesbitt][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/scottnesbitt +[1]: http://www.zdnet.com/article/the-linux-foundations-zephyr-project-building-an-operating-system-for-iot-devices/ +[2]: http://www.linuxfoundation.org/news-media/announcements/2016/02/linux-foundation-announces-project-build-real-time-operating-system +[3]: http://venturebeat.com/2016/02/24/yahoo-open-sources-caffeonspark-deep-learning-framework-for-hadoop/ +[4]: https://github.com/yahoo/CaffeOnSpark +[5]: http://www.wired.com/2016/02/facebook-open-source-wireless-gear-forge-5g-world/ +[6]: https://www.openmainframeproject.org/ +[7]: http://openmainframeproject.github.io/ade/ +[8]: https://github.com/openmainframeproject/ade +[9]: https://joinup.ec.europa.eu/node/149541 +[10]: http://www.businessinsider.in/Exclusive-Infosys-is-using-Open-Source-as-its-mostlethal-weapon-yet/articleshow/51109129.cms +[11]: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ +[12]: http://insidehpc.com/2016/02/beegfs-parallel-file-system-now-open-source/ From 9b8154162c9ac491b4116709a3c16da2b44bcb60 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 27 Feb 2016 18:35:13 +0800 Subject: [PATCH 1071/1710] =?UTF-8?q?20160227-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... to use Python to hack your Eclipse IDE.md | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 sources/tech/20160226 How to use Python to hack your Eclipse IDE.md diff --git a/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md b/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md new file mode 100644 index 0000000000..770c6db479 --- /dev/null +++ b/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md @@ -0,0 +1,215 @@ +How to use Python to hack your Eclipse IDE +============================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/lightbulb_computer_person_general_.png?itok=ZY3UuQQa) + +The Eclipse Advanced Scripting Environment ([EASE][1]) project is a new but powerful set of plugins that enables you to quickly hack your Eclipse IDE. + +Eclipse is a powerful framework that can be extended in many different ways by using its built-in plugin mechanism. However, writing and deploying a new plugin can be cumbersome if all you want is a bit of additional functionality. Now, using EASE, there's a better way to do that, without having to write a single line of Java code. EASE provides a way to easily automate workbench functionality using scripting languages such as Python or Javascript. + +In this article, based on my [talk][2] at EclipseCon North America this year, I'll cover the basics of how to set up your Eclipse environment with Python and EASE and look at a few ideas to supercharge your IDE with the power of Python. + +### Setup and run "Hello World" + +The examples in this article are based on the Java-implementation of Python, Jython. You can install EASE directly into your existing Eclipse IDE. In this example we use Eclipse [Mars][3] and install EASE itself, its modules and the Jython engine. + +From within the Eclipse Install Dialog (`Help>Install New Software`...), install EASE: [http://download.eclipse.org/ease/update/nightly][4] + +And, select the following components: + +- EASE Core feature + +- EASE core UI feature + +- EASE Python Developer Resources + +- EASE modules (Incubation) + +This will give you EASE and its modules. The main one we are interested in is the Resource module that gives you access to the Eclipse workspace, projects, and files API. + +![](https://opensource.com/sites/default/files/1_installease_nightly.png) + + +After those have been successfully installed, next install the EASE Jython engine: [https://dl.bintray.com/pontesegger/ease-jython/][5]. Once the plugins are installed, test EASE out. Create a new project and add in a new file called hello.py with this content: + +``` +print "hello world" +``` + +Select the file, right click, and select 'Run as -> EASE script'. You should see "Hello World" appear in the console. + +Now you can start writing Python scripts that can access the workspace and projects. This power can be used for all sorts of hacks, below are just a few ideas. + +### Improve your code quality + +Maintaining good code quality can be a tiresome job especially when dealing with a large codebase or when lots of developers are involved. Some of this pain can be made easier with a script, such as for batch formatting for a set of files, or even fixing certain files to [remove unix line endings][6] for easy comparison in source control like git. Another nice thing to do is use a script to generate Eclipse markers to highlight code that could do with improving. Here's an example script that you could use to add task markers for all "printStackTrace" methods it detects in Java files. See the source code: [markers.py][7] + +To run, copy the file to your workspace, then right click and select 'Run as -> EASE script'. + +``` +loadModule('/System/Resources') +``` + +from org.eclipse.core.resources import IMarker + +``` +for ifile in findFiles("*.java"): + file_name = str(ifile.getLocation()) + print "Processing " + file_name + with open(file_name) as f: + for line_no, line in enumerate(f, start=1): + if "printStackTrace" in line: + marker = ifile.createMarker(IMarker.TASK) + marker.setAttribute(IMarker.TRANSIENT, True) + marker.setAttribute(IMarker.LINE_NUMBER, line_no) + marker.setAttribute(IMarker.MESSAGE, "Fix in Sprint 2: " + line.strip()) + +``` + +If you have any java files with printStackTraces you will be able to see the newly created markers in the Tasks view and in the editor margin. + +![](https://opensource.com/sites/default/files/2_codequality.png) + +### Automate tedious tasks + +When you are working with several projects you may want to automate some tedious, repetitive tasks. Perhaps you need to add in a copyright header to the beginning of each source file, or update source files when adopting a new framework. For instance, when we first switched to using Tycho and Maven, we had to add a pom.xml to each project. This is easily done using a few lines of Python. Then when Tycho provided support for pom-less builds, we wanted to remove unnecessary pom files. Again, a few lines of Python script enabled this. As an example, here is a script which adds a README.md file to every open project in your workspace, noting if they are Java or Python projects. See the source code: [add_readme.py][8]. + +To run, copy the file to your workspace, then right click and select 'Run as -> EASE script'. + +loadModule('/System/Resources') + +``` +for iproject in getWorkspace().getProjects(): + if not iproject.isOpen(): + continue + + ifile = iproject.getFile("README.md") + + if not ifile.exists(): + contents = "# " + iproject.getName() + "\n\n" + if iproject.hasNature("org.eclipse.jdt.core.javanature"): + contents += "A Java Project\n" + elif iproject.hasNature("org.python.pydev.pythonNature"): + contents += "A Python Project\n" + writeFile(ifile, contents) +``` + +The result should be that every open project will have a README.md file, with Java and Python projects having an additional descriptive line. + +![](https://opensource.com/sites/default/files/3_tedioustask.png) + +### Prototype new features + +You can also use a Python script to hack a quick-fix for some much wanted functionality, or as a prototype to help demonstrate to your team or users how you envision a feature. For instance, one feature Eclipse IDE doesn't currently support is auto-save on the current file you are working on. Although this feature is in the works for future releases, you can have a quick and dirty version that autosaves every 30 seconds or when the editor is deactivated. Below is a snippet of the main method. See the full source: [autosave.py][9] + +``` +def save_dirty_editors(): + workbench = getService(org.eclipse.ui.IWorkbench) + for window in workbench.getWorkbenchWindows(): + for page in window.getPages(): + for editor_ref in page.getEditorReferences(): + part = editor_ref.getPart(False) + if part and part.isDirty(): + print "Auto-Saving", part.getTitle() + part.doSave(None) +``` + +Before running this script you will need to turn on the 'Allow Scripts to run code in UI thread' setting by checking the box under Window > Preferences > Scripting. Then you can add the file to your workspace, right click on it and select 'Run As>EASE Script'. A save message is printed out in the Console view every time an editor is saved. To turn off the autosave just stop the script by pressing the 'Terminate' red square button in the Console view. + +![](https://opensource.com/sites/default/files/4_prototype.png) + +### Quickly extend the user interface with custom buttons, menus, etc + +One of the best things about EASE is that it allows you to take your scripts and quickly hook them into UI elements of the IDE, for example, as a new button or new menu item. No need to write Java or have a new plugin, just add a couple of lines to your script header—it's that simple. + +Here's an example for a simplistic script that creates us three new projects. + +``` +# name : Create fruit projects +# toolbar : Project Explorer +# description : Create fruit projects + +loadModule("/System/Resources") + +for name in ["banana", "pineapple", "mango"]: + createProject(name) +``` + +The comment lines specify to EASE to add a button to the Project Explorer toolbar. Here's another script that adds a button to the same toolbar to delete those three projects. See the source files: [createProjects.py][10] and [deleteProjects.py][11] + +``` +# name :Delete fruit projects +# toolbar : Project Explorer +# description : Get rid of the fruit projects + +loadModule("/System/Resources") + +for name in ["banana", "pineapple", "mango"]: + project = getProject(name) + project.delete(0, None) +``` + +To get the buttons to appear, add the two script files to a new project—let's call it 'ScriptsProject'. Then go to Windows > Preference > Scripting > Script Locations. Click on the 'Add Workspace' button and select the ScriptsProject. This project now becomes a default location for locating script files. You should see the buttons show up in the Project Explorer without needing to restart your IDE. You should be able to quickly create and delete the projects using your newly added buttons. + +![](https://opensource.com/sites/default/files/5_buttons.png) + +### Integrate with third-party tools + +Every now and then you may need to use a tool outside the Eclipse ecosystem (sad but true, it has a lot but it does not do everything). For those occasions it might be quite handy to wrap calling that call to the tool in a script. Here's an example that allows you to integrate with explorer.exe, and add it to the content menu so you could instantly open a file browser using the current selection. See the source code: [explorer.py][12] + +``` +# name : Explore from here +# popup : enableFor(org.eclipse.core.resources.IResource) +# description : Start a file browser using current selection +loadModule("/System/Platform") +loadModule('/System/UI') + +selection = getSelection() +if isinstance(selection, org.eclipse.jface.viewers.IStructuredSelection): + selection = selection.getFirstElement() + +if not isinstance(selection, org.eclipse.core.resources.IResource): + selection = adapt(selection, org.eclipse.core.resources.IResource) + +if isinstance(selection, org.eclipse.core.resources.IFile): + selection = selection.getParent() + +if isinstance(selection, org.eclipse.core.resources.IContainer): + runProcess("explorer.exe", [selection.getLocation().toFile().toString()]) +``` + +To get the menu to appear, add the script to a new project—let's call it 'ScriptsProject'. Then go to Windows > Preference > Scripting > Script Locations. Click on the 'Add Workspace' button and select the ScriptsProject. You should see the new menu item show up in the context menu when you right-click on a file. Select this action to bring up a file browser. (Note this functionality already exists in Eclipse but this example is one you could adapt to other third-party tools). + +![](https://opensource.com/sites/default/files/6_explorer.png) + +The Eclipse Advanced Scripting Environment provides a great way to get more out of your Eclipse IDE by leveraging the power of Python. It is a project in its infancy so there is so much more to come. Learn more [about the project][13] and get involved by signing up for the [forum][14]. + +I'll be talking more about EASE at [Eclipsecon North America][15] 2016. My talk [Scripting Eclipse with Python][16] will go into how you can use not just Jython, but C-Python and how this functionality can be extended specifically for scientific use-cases. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/how-use-python-hack-your-ide + +作者:[Tracy Miranda][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/tracymiranda +[1]: https://eclipse.org/ease/ +[2]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python +[3]: https://www.eclipse.org/downloads/packages/eclipse-ide-eclipse-committers-451/mars1 +[4]: http://download.eclipse.org/ease/update/nightly +[5]: https://dl.bintray.com/pontesegger/ease-jython/ +[6]: http://code.activestate.com/recipes/66434-change-line-endings/ +[7]: https://gist.github.com/tracymiranda/6556482e278c9afc421d +[8]: https://gist.github.com/tracymiranda/f20f233b40f1f79b1df2 +[9]: https://gist.github.com/tracymiranda/e9588d0976c46a987463 +[10]: https://gist.github.com/tracymiranda/55995daaea9a4db584dc +[11]: https://gist.github.com/tracymiranda/baa218fc2c1a8e898194 +[12]: https://gist.github.com/tracymiranda/8aa3f0fc4bf44f4a5cd3 +[13]: https://eclipse.org/ease/ +[14]: https://dev.eclipse.org/mailman/listinfo/ease-dev +[15]: https://www.eclipsecon.org/na2016 +[16]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python From 6886aaf9320f1d315b9c773e1556665fcd8b3487 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 27 Feb 2016 19:49:12 +0800 Subject: [PATCH 1072/1710] =?UTF-8?q?=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...om the command line on Debian or Ubuntu.md | 187 ++++++++++++------ 1 file changed, 130 insertions(+), 57 deletions(-) diff --git a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md index 6f9f3690cb..aa157a4969 100644 --- a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md +++ b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -1,67 +1,90 @@ 怎样在ubuntu和debian中用命令行使用KVM ================================================================================ -有很多不同的方式去管理运行在KVM管理程序上的虚拟机。例如,virt-manager就是一个流行的基于图形用户界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用KVM,那么基于图形用户界面的解决方案显然是行不通的。事实上,你可以纯粹的使用包装了kvm命令行脚本的命令行来管理KVM虚拟机。作为替代方案,你可以使用virsh这个容易使用的命令行用户接口来管理客户虚拟机。在virsh中,它通过和libvirtd服务通信来达到控制虚拟机的目的,而libvirtd可以控制几个不同的虚拟机管理器,包括KVM,Xen,QEMU,LXC和OpenVZ。 - 当你想要对虚拟机的前期准备和后期管理实现自动化操作时,像virsh这样的命令行管理工具是非常有用的。同样,virsh支持多个管理器的事实也意味着你可以通过相同的virsh接口去管理不同的虚拟机管理器。 - 在这篇文章中,我会示范**怎样在ubuntu和debian上通过使用virsh命令行去运行KVM**。 + +有很多不同的方式去管理运行在 KVM 管理程序上的虚拟机。例如,virt-manager 就是一个流行的基于图形界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用 KVM ,那么基于图形界面的解决方案显然是行不通的。事实上,你可以纯粹的使用包装了 kvm 命令行脚本的命令行来管理 KVM 虚拟机。作为替代方案,你可以使用 virsh 这个容易使用的命令行程序来管理客户虚拟机。在 virsh 中,它通过和 libvirtd 服务通信来达到控制虚拟机的目的,而 libvirtd 可以控制多个不同的虚拟机管理器,包括 KVM,Xen,QEMU,LXC 和 OpenVZ。 + +当你想要对虚拟机的前期准备和后期管理实现自动化操作时,像 virsh 这样的命令行管理工具是非常有用的。同样,virsh 支持多个管理器也就意味着你可以通过相同的 virsh 接口去管理不同的虚拟机管理器。 + +在这篇文章中,我会示范**怎样在ubuntu和debian上通过使用virsh命令行去运行KVM**。 ### 第一步:确认你的硬件平台支持虚拟化 ### -作为第一步,首先要确认你的主机CPU配备了硬件虚拟化拓展(e.g.,Intel VT或者AMD-V),这是KVM对硬件的要求。下面的命令可以检查硬件是否支持虚拟化。 +第一步,首先要确认你的 CPU 支持硬件虚拟化扩展(e.g.,Intel VT 或者 AMD-V),这是 KVM 对硬件的要求。下面的命令可以检查硬件是否支持虚拟化。 +``` $ egrep '(vmx|svm)' --color /proc/cpuinfo +``` ![](https://c2.staticflickr.com/2/1505/24050288606_758a44c4c6_c.jpg) - 如果在输出中不包含vmx或者svm标识,那么就意味着你的主机cpu不支持硬件虚拟化。因此你不能在你的机器上使用KVM。确认了主机cpu存在vmx或者svm之后,接下来开始安装KVM。 -对于KVM来说,它不要求运行在拥有64位内核系统的主机上,但是通常我们会推荐在64位系统的主机上面运行KVM。 +如果在输出中不包含 vmx 或者 svm 标识,那么就意味着你的 cpu 不支持硬件虚拟化。因此你不能在你的机器上使用 KVM 。确认了 cpu 支持 vmx 或者 svm 之后,接下来开始安装 KVM。 + +对于 KVM 来说,它不要求运行在拥有 64 位内核系统的主机上,但是通常我们会推荐在 64 位系统的主机上面运行 KVM。 ### 第二步:安装KVM ### -使用apt-get安装KVM和相关的用户空间工具。 +使用 `apt-ge` 安装 KVM 和相关的用户空间工具。 +``` $ sudo apt-get install qemu-kvm libvirt-bin +``` -安装期间,libvirtd组(在debian上是libvirtd-qemu组)将会被创建,并且你的用户id将会被自动添加到该组中。这样做的目的是让你可以以一个普通用户而不是root用户的身份去管理虚拟机。你可以使用id命令来确认这一点,下面将会告诉你怎么去显示你的组id: +安装期间,libvirtd 用户组(在 debian 上是 libvirtd-qemu 用户组)将会被创建,并且你的用户 id 将会被自动添加到该组中。这样做的目的是让你可以以一个普通用户而不是 root 用户的身份去管理虚拟机。你可以使用 `id` 命令来确认这一点,下面将会告诉你怎么去显示你的组 id: +``` $ id +``` ![](https://c2.staticflickr.com/6/5597/15432586092_64dfb867d3_c.jpg) -如果因为某些原因,libvirt(在debian中是libvirt-qemu)没有在你的组id中被找到,你也可以手动将你自己添加到对应的组中,如下所示: -在ubuntu上: +如果因为某些原因,libvirt(在 debian 中是 libvirt-qemu)没有在你的组 id 中被找到,你也可以手动将你自己添加到对应的组中,如下所示: +在 ubuntu 上: + +``` $ sudo adduser [youruserID] libvirtd +``` -在debian上: +在 debian 上: +``` $ sudo adduser [youruserID] libvirt-qemu +``` -按照如下形式重修载入更新后的组成员关系。如果要求输入密码,那么输入你的登陆密码即可。 +按照如下命令重新载入更新后的组成员关系。如果要求输入密码,那么输入你的登陆密码即可。 +``` $ exec su -l $USER +``` -这时,你应该可以以普通用户的身份去执行virsh了。做一个如下所示的测试,这个命令将会以列表的形式列出可用的虚拟机(当前的列表是空的)。如果你没有遇到权限问题,那意味着迄今为止一切都是正常的。 +这时,你应该可以以普通用户的身份去执行 virsh 了。做一个如下所示的测试,这个命令将会以列表的形式列出可用的虚拟机(当前的列表是空的)。如果你没有遇到权限问题,那意味着到目前为止一切都是正常的。 $ virsh list ---------- Id Name State - ---------------------------------------------------- +---------------------------------------------------- ### 第三步:配置桥接网络 ### -为了使KVM虚拟机能够访问外部网络,一种方法是通过在KVM宿主机上创建Linux桥来实现。创建之后的桥能够将虚拟机的虚拟网卡和宿主机的物理网卡连接起来,因此,虚拟机能够发送和接受由物理网卡发送过来的流量数据包。这种方式叫做网桥连接。 -下面将告诉你如何创建并且配置网桥,我们称它为br0. +为了使 KVM 虚拟机能够访问外部网络,一种方法是通过在 KVM 宿主机上创建 Linux 桥来实现。创建之后的桥能够将虚拟机的虚拟网卡和宿主机的物理网卡连接起来,因此,虚拟机能够发送和接收由物理网卡传输的数据包。这种方式叫做网络桥接。 + +下面将告诉你如何创建并且配置网桥,我们创建一个网桥称它为 br0. + 首先,安装一个必需的包,然后用命令行创建一个网桥。 +``` $ sudo apt-get install bridge-utils $ sudo brctl addbr br0 +``` -下一步就是配置已经创建好的网桥,即修改位于/etc/network/interfaces的配置文件。我们需要将该桥接网卡设置成开机启动。为了修改该配置文件,你需要关闭你的操作系统上的网络管理器(如果你在使用它的话)。跟随[操作指南][1]的说明去关闭网络管理器。 - 关闭网络管理器之后,接下来就是通过修改配置文件来配置网桥了。 +下一步就是配置已经创建好的网桥,即修改位于 `/etc/network/interfaces` 的配置文件。我们需要将该桥接网卡设置成开机启动。为了修改该配置文件,你需要关闭你的操作系统上的网络管理器(如果你在使用它的话)。跟随[操作指南][1]的说明去关闭网络管理器。 +关闭网络管理器之后,接下来就是通过修改配置文件来配置网桥了。 + +``` #auto eth0 #iface eth0 inet dhcp @@ -71,23 +94,28 @@ bridge_stp off bridge_fd 0 bridge_maxwait 0 +``` +在上面的配置中,我假设 eth0 是主要网卡,它也是连接到外网的网卡,同样,我假设 eth0 将会通过 DHCP 协议自动获取 ip 地址。注意,之前在 `/etc/network/interfaces` 中还没有对 eth0 进行任何配置。桥接网卡 br0 引用了 eth0 的配置,而 eth0 也会受到 br0 的制约。 -在上面的配置中,我假设eth0是主要网卡,它也是连接到外网的网卡,同样,我假设eth0将会通过DHCP得到它的ip地址。注意,之前在/etc/network/interfaces中还没有对eth0进行任何配置。桥接网卡br0引用了eth0的配置,而eth0也会受到br0的制约。 -重启网络服务,并确认网桥已经被成功的配置好。如果成功的话,br0的ip地址将会是eth0的被自动分配的ip地址,而且eth0不会被分配任何ip地址。 +重启网络服务,并确认网桥已经被成功的配置好。如果成功的话,br0 的 ip 地址将会是 eth0 自动分配的 ip 地址,而且 eth0 不会被分配任何 ip 地址。 +``` $ sudo /etc/init.d/networking restart $ ifconfig +``` -如果因为某些原因,eth0仍然保留了之前分配给了br0的ip地址,那么你可能必须明确的删除eth0的ip地址。 +如果因为某些原因,eth0 仍然保留了之前分配给了 br0 的 ip 地址,那么你可能必须手动删除 eth0 的 ip 地址。 ![](https://c2.staticflickr.com/2/1698/23780708850_66cd7ba6ea_c.jpg) -###第四步:用命令行创建一个虚拟机 ### +### 第四步:用命令行创建一个虚拟机 ### -对于虚拟机来说,它的配置信息被存储在它对应的xml文件中。因此,创建一个虚拟机的第一步就是准备一个与主机名对应的xml文件。 -下面是一个示例xml文件,你可以根据需要手动修改它。 - +对于虚拟机来说,它的配置信息被存储在它对应的xml文件中。因此,创建一个虚拟机的第一步就是准备一个与虚拟机对应的 xml 文件。 + +下面是一个示例 xml 文件,你可以根据需要手动修改它。 + +``` alice f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa @@ -134,55 +162,69 @@ +``` 上面的主机xml配置文件定义了如下的虚拟机内容。 -- 1GB内存,一个虚拟cpu和一个硬件驱动。 -- Disk image:/home/dev/images/alice.img。 -- Boot from CD-ROM(/home/dev/iso/CentOS-6.5-x86_64-minomal.iso)。 -- Networking:一个桥接到br0的虚拟网卡。 -- 通过VNC远程访问。 -中的UUID字符串可以随机生成。为了得到一个随机的uuid字符串,你可能需要使用uuid命令行工具。 +- 1GB内存,一个虚拟cpu和一个硬件驱动 +- Disk image:`/home/dev/images/alice.img` + +- Boot from CD-ROM(`/home/dev/iso/CentOS-6.5-x86_64-minomal.iso`) + +- Networking:一个桥接到 br0 的虚拟网卡 + +- 通过 VNC 远程访问 + +`` 中的 UUID 字符串可以随机生成。为了得到一个随机的 uuid 字符串,你可能需要使用 uuid 命令行工具。 + +``` $ sudo apt-get install uuid $ uuid +``` 生成一个主机xml配置文件的方式就是通过一个已经存在的虚拟机来导出它的xml配置文件。如下所示。 +``` $ virsh dumpxml alice > bob.xml +``` ![](https://c2.staticflickr.com/6/5808/23968234602_25e8019ec8_c.jpg) -###第五步:使用命令行启动虚拟机### +### 第五步:使用命令行启动虚拟机 ### -在启动虚拟机之前,我们需要创建它的初始磁盘镜像。为此,你需要使用qemu-img命令来生成一个你已经安装的qemu-kvm镜像。下面的命令将会创建10GB大小的空磁盘,并且它是qcow2格式的。 +在启动虚拟机之前,我们需要创建它的初始磁盘镜像。为此,你需要使用 qemu-img 命令来生成一个 qemu-kvm 镜像。下面的命令将会创建 10 GB 大小的空磁盘,并且它是 qcow2 格式的。 +``` $ qemu-img create -f qcow2 /home/dev/images/alice.img 10G +``` -使用qcow2格式的磁盘镜像的好处就是它在创建之初并不会给它分配全部大小磁盘容量(这里是10GB),而是随着虚拟机中文件的增加而逐渐增大。因此,它对空间的使用更加有效。 -现在,你可以准备通过使用之前创建的xml配置文件启动你的虚拟机了。下面的命令将会创建一个虚拟机,然后自动启动它。 +使用 qcow2 格式的磁盘镜像的好处就是它在创建之初并不会给它分配全部大小磁盘容量(这里是 10 GB),而是随着虚拟机中文件的增加而逐渐增大。因此,它对空间的使用更加有效。 +现在,你可以通过使用之前创建的 xml 配置文件启动你的虚拟机了。下面的命令将会创建一个虚拟机,然后自动启动它。 + +``` $ virsh create alice.xml - ----------- - Domain alice created from alice.xml +``` -**注意**:如果你对一个已经存在的虚拟机运行了上面的命令,那么这个操作将会在没有警告信息的情况下抹去那个已经存在的虚拟机的全部信息。如果你已经创建了一个虚拟机,你可能会使用下面的命令来启动虚拟机。 +**注意**: 如果你对一个已经存在的虚拟机执行了了上面的命令,那么这个操作将会在没有任何警告的情况下抹去那个已经存在的虚拟机的全部信息。如果你已经创建了一个虚拟机,你可能会使用下面的命令来启动虚拟机。 +``` $ virsh start alice.xml +``` 使用如下命令确认一个新的虚拟机已经被创建并成功的被启动。 +``` $ virsh list - ----------- +``` Id Name State ---------------------------------------------------- 3 alice running -同样,使用如下命令确认你的虚拟机的虚拟网卡已经被成功的添加到了你先前创建的br0网桥中。 +同样,使用如下命令确认你的虚拟机的虚拟网卡已经被成功的添加到了你先前创建的 br0 网桥中。 $ sudo brctl show @@ -193,59 +235,82 @@ 为了远程访问一个正在运行的虚拟机的控制台,你可以使用VNC客户端。 首先,你需要使用如下命令找出用于虚拟机的VNC端口号。 +``` $ sudo netstat -nap | egrep '(kvm|qemu)' +``` ![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg) -在这个例子中,用于alice虚拟机的VNC端口号是5900 -然后启动一个VNC客户端,连接到一个端口号为5900的VNC服务器。在我们的例子中,虚拟机支持由CentOS光盘文件启动。 +在这个例子中,用于 alice 虚拟机的 VNC 端口号是 5900 + 然后启动一个VNC客户端,连接到一个端口号为5900的VNC服务器。在我们的例子中,虚拟机支持由CentOS光盘文件启动。 ![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg) -### 使用virsh管理虚拟机 ### +### 使用 virsh 管理虚拟机 ### -下面列出了virsh命令的常规用法 +下面列出了 virsh 命令的常规用法 创建客户机并且启动虚拟机: +``` $ virsh create alice.xml +``` 停止虚拟机并且删除客户机 +``` $ virsh destroy alice +``` 关闭虚拟机(不用删除它) +``` $ virsh shutdown alice +``` 暂停虚拟机 +``` $ virsh suspend alice +``` 恢复虚拟机 +``` $ virsh resume alice +``` -访问正在运行的虚拟机的登陆控制台 +访问正在运行的虚拟机的控制台 +``` $ virsh console alice +``` 设置虚拟机开机启动: +``` $ virsh autostart alice +``` 查看虚拟机的详细信息 +``` $ virsh dominfo alice +``` 编辑虚拟机的配置文件: +``` $ virsh edit alice +``` 上面的这个命令将会使用一个默认的编辑器来调用主机配置文件。该配置文件中的任何改变都将自动被libvirt验证其正确性。 你也可以在一个virsh会话中管理虚拟机。下面的命令会创建并进入到一个virsh会话中: +``` $ virsh -在virsh提示中,你可以使用任何virsh命令。 +``` + +在 virsh 提示中,你可以使用任何 virsh 命令。 ![](https://c2.staticflickr.com/6/5645/23708565129_b1ef968b30_c.jpg) @@ -255,33 +320,41 @@ error: internal error: no supported architecture for os type 'hvm' - 如果你的硬件不支持虚拟化的话你可能就会遇到这个错误。(例如,Intel VT或者AMD-V),这是运行KVM所必需的。如果你遇到了这个错误,而你的cpu支持虚拟化,那么这里可以给你一些可用的解决方案: + 如果你的硬件不支持虚拟化的话你可能就会遇到这个错误。(例如,Intel VT或者AMD-V),这是运行KVM所必需的。如果你遇到了这个错误,而你的cpu支持虚拟化,那么这里可以给你一些可用的解决方案: -首先,检查你的内核模块是否丢失。 + 首先,检查你的内核模块是否丢失。 + ``` $ lsmod | grep kvm + ``` -如果内核模块没有加载,你必须按照如下方式加载它。 + 如果内核模块没有加载,你必须按照如下方式加载它。 + ``` $ sudo modprobe kvm_intel (for Intel processor) $ sudo modprobe kvm_amd (for AMD processor) + ``` -第二个解决方案就是添加“--connect qemu:///system”参数到virsh命令中,如下所示。当你正在你的硬件平台上使用超过一个虚拟机管理器的时候就需要添加这个参数(例如,VirtualBox,VMware)。 + 第二个解决方案就是添加 `--connect qemu:///system` 参数到 `virsh` 命令中,如下所示。当你正在你的硬件平台上使用超过一个虚拟机管理器的时候就需要添加这个参数(例如,VirtualBox,VMware)。 + + ``` $ virsh --connect qemu:///system create alice.xml + ``` 2. 当我试着访问我的虚拟机的登陆控制台的时候遇到了错误: +``` $ virsh console alice + error: internal error: cannot find character device +``` ----------- + 这个错误发生的原因是你没有在你的虚拟机配置文件中定义控制台设备。在 xml 文件中加上下面的内部设备部分即可。 - error: internal error: cannot find character device - -这个错误发生的原因是你没有在你的虚拟机配置文件中定义控制台设备。在xml文件中加上下面的内部设备部分即可。 - +``` +``` -------------------------------------------------------------------------------- From ee145429e26dbea845c3a577d702fa19d0486ad7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 27 Feb 2016 19:51:51 +0800 Subject: [PATCH 1073/1710] =?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 --- ... KVM from the command line on Debian or Ubuntu.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md index aa157a4969..6063bb7810 100644 --- a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md +++ b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -343,26 +343,26 @@ 2. 当我试着访问我的虚拟机的登陆控制台的时候遇到了错误: -``` + ``` $ virsh console alice error: internal error: cannot find character device -``` + ``` 这个错误发生的原因是你没有在你的虚拟机配置文件中定义控制台设备。在 xml 文件中加上下面的内部设备部分即可。 -``` + ``` -``` + ``` -------------------------------------------------------------------------------- via: http://xmodulo.com/use-kvm-command-line-debian-ubuntu.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[kylepeng93 ](https://github.com/kylepeng93 ) +校对:[Ezio](https://github.com/oska874) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c6de07aab673c036d1b18bc9da638596038f2049 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 27 Feb 2016 19:53:19 +0800 Subject: [PATCH 1074/1710] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=EF=BC=8C?= =?UTF-8?q?=E5=87=86=E5=A4=87=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...04 How to use KVM from the command line on Debian or Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20160104 How to use KVM from the command line on Debian or Ubuntu.md (100%) diff --git a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md similarity index 100% rename from translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md rename to published/20160104 How to use KVM from the command line on Debian or Ubuntu.md From be2ed7eb8b54ea88849f7b4f56596980e545cb3c Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 27 Feb 2016 19:54:27 +0800 Subject: [PATCH 1075/1710] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=EF=BC=8C?= =?UTF-8?q?=E5=87=86=E5=A4=87=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How to use KVM from the command line on Debian or Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md index 6063bb7810..1f7a121b3a 100644 --- a/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md +++ b/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -1,5 +1,5 @@ -怎样在ubuntu和debian中用命令行使用KVM +怎样在 ubuntu 和 debian 中用命令行使用 KVM ================================================================================ 有很多不同的方式去管理运行在 KVM 管理程序上的虚拟机。例如,virt-manager 就是一个流行的基于图形界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用 KVM ,那么基于图形界面的解决方案显然是行不通的。事实上,你可以纯粹的使用包装了 kvm 命令行脚本的命令行来管理 KVM 虚拟机。作为替代方案,你可以使用 virsh 这个容易使用的命令行程序来管理客户虚拟机。在 virsh 中,它通过和 libvirtd 服务通信来达到控制虚拟机的目的,而 libvirtd 可以控制多个不同的虚拟机管理器,包括 KVM,Xen,QEMU,LXC 和 OpenVZ。 From e6bcad3740501e940e567416602e8d678106b718 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 27 Feb 2016 21:51:18 +0800 Subject: [PATCH 1076/1710] =?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 --- .../20151204 Review EXT4 vs. Btrfs vs. XFS.md | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md diff --git a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md deleted file mode 100644 index f6a568a55f..0000000000 --- a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md +++ /dev/null @@ -1,66 +0,0 @@ -ictlyh Translating -Review EXT4 vs. Btrfs vs. XFS -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) - -To be honest, one of the things that comes last in people’s thinking is to look at which file system on their PC is being used. Windows users as well as Mac OS X users even have less reason for looking as they have really only 1 choice for their operating system which are NTFS and HFS+. Linux operating system, on the other side, has plenty of various file system options, with the current default is being widely used ext4. However, there is another push for changing the file system to something other which is called btrfs. But what makes btrfs better, what are other file systems, and when can we see the distributions making the change? - -Let’s first have a general look at file systems and what they really do, then we will make a small comparison between famous file systems. - -### So, What Do File Systems Do? ### - -Just in case if you are unfamiliar about what file systems really do, it is actually simple when it is summarized. The file systems are mainly used in order for controlling how the data is stored after any program is no longer using it, how access to the data is controlled, what other information (metadata) is attached to the data itself, etc. I know that it does not sound like an easy thing to be programmed, and it is definitely not. The file systems are continually still being revised for including more functionality while becoming more efficient in what it simply needs to do. Therefore, however, it is a basic need for all computers, it is not quite as basic as it sounds like. - -### Why Partitioning? ### - -Many people have a vague knowledge of what the partitions are since each operating system has an ability for creating or removing them. It can seem strange that Linux operating system uses more than 1 partition on the same disk, even while using the standard installation procedure, so few explanations are called for them. One of the main goals of having different partitions is achieving higher data security in the disaster case. - -By dividing your hard disk into partitions, the data may be grouped and also separated. When the accidents occur, only the data stored in the partition which got the hit will only be damaged, while data on the other partitions will survive most likely. These principles date from the days when the Linux operating system didn’t have a journaled file system and any power failure might have led to a disaster. - -The using of partitions will remain for security and the robustness reasons, then the breach on 1 part of the operating system does not automatically mean that whole computer is under risk or danger. This is currently most important factor for the partitioning process. For example, the users create scripts, the programs or web applications which start filling up the disk. If that disk contains only 1 big partition, then entire system may stop functioning if that disk is full. If the users store data on separate partitions, then only that data partition can be affected, while system partitions and the possible other data partitions will keep functioning. - -Mind that to have a journaled file system will only provide data security in case if there is a power failure as well as sudden disconnection of the storage devices. Such will not protect the data against the bad blocks and the logical errors in the file system. In such cases, the user should use a Redundant Array of Inexpensive Disks (RAID) solution. - -### Why Switch File Systems? ### - -The ext4 file system has been an improvement for the ext3 file system that was also an improvement over the ext2 file system. While the ext4 is a very solid file system which has been the default choice for almost all distributions for the past few years, it is made from an aging code base. Additionally, Linux operating system users are seeking many new different features in file systems which ext4 does not handle on its own. There is software which takes care of some of such needs, but in the performance aspect, being able to do such things on the file system level could be faster. - -### Ext4 File System ### - -The ext4 has some limits which are still a bit impressive. The maximum file size is 16 tebibytes (which is roughly 17.6 terabytes) and is much bigger than any hard drive a regular consumer can currently buy. While, the largest volume/partition you can make with ext4 is 1 exbibyte (which is roughly 1,152,921.5 terabytes). The ext4 is known to bring the speed improvements over ext3 by using multiple various techniques. Like in the most modern file systems, it is a journaling file system that means that it will keep a journal of where the files are mainly located on the disk and of any other changes that happen to the disk. Regardless all of its features, it doesn’t support the transparent compression, the data deduplication, or the transparent encryption. The snapshots are supported technically, but such feature is experimental at best. - -### Btrfs File System ### - -The btrfs, many of us pronounce it different ways, as an example, Better FS, Butter FS, or B-Tree FS. It is a file system which is completely made from scratch. The btrfs exists because its developers firstly wanted to expand the file system functionality in order to include snapshots, pooling, as well as checksums among the other things. While it is independent from the ext4, it also wants to build off the ideas present in the ext4 that are great for the consumers and the businesses alike as well as incorporate those additional features that will benefit everybody, but specifically the enterprises. For the enterprises who are using very large programs with very large databases, they are having a seemingly continuous file system across the multiple hard drives could be very beneficial as it will make a consolidation of the data much easier. The data deduplication could reduce the amount of the actual space data could occupy, and the data mirroring could become easier with the btrfs as well when there is a single and broad file system which needs to be mirrored. - -The user certainly can still choose to create multiple partitions so that he does not need to mirror everything. Considering that the btrfs will be able for spanning over the multiple hard drives, it is a very good thing that it can support 16 times more drive space than the ext4. A maximum partition size of the btrfs file system is 16 exbibytes, as well as maximum file size is 16 exbibytes too. - -### XFS File System ### - -The XFS file system is an extension of the extent file system. The XFS is a high-performance 64-bit journaling file system. The support of the XFS was merged into Linux kernel in around 2002 and In 2009 Red Hat Enterprise Linux version 5.4 usage of the XFS file system. XFS supports maximum file system size of 8 exbibytes for the 64-bit file system. There is some comparison of XFS file system is XFS file system can’t be shrunk and poor performance with deletions of the large numbers of files. Now, the RHEL 7.0 uses XFS as the default filesystem. - -### Final Thoughts ### - -Unfortunately, the arrival date for the btrfs is not quite known. But officially, the next-generation file system is still classified as “unstable”, but if the user downloads the latest version of Ubuntu, he will be able to choose to install on a btrfs partition. When the btrfs will be classified actually as “stable” is still a mystery, but users shouldn’t expect the Ubuntu to use the btrfs by default until it’s indeed considered “stable”. It has been reported that Fedora 18 will use the btrfs as its default file system as by the time of its release a file system checker for the btrfs should exist. There is a good amount of work still left for the btrfs, as not all the features are yet implemented and the performance is a little sluggish if we compare it to the ext4. - -So, which is better to use? Till now, the ext4 will be the winner despite the identical performance. But why? The answer will be the convenience as well as the ubiquity. The ext4 is still excellent file system for the desktop or workstation use. It is provided by default, so the user can install the operating system on it. Also, the ext4 supports volumes up to 1 Exabyte and files up to 16 Terabyte in size, so there’s still a plenty of room for the growth where space is concerned. - -The btrfs might offer greater volumes up to 16 Exabyte and improved fault tolerance, but, till now, it feels more as an add-on file system rather than one integrated into the Linux operating system. For example, the btrfs-tools have to be present before a drive will be formatted with the btrfs, which means that the btrfs is not an option during the Linux operating system installation though that could vary with the distribution. - -Even though the transfer rates are so important, there’s more to a just file system than speed of the file transfers. The btrfs has many useful features such as Copy-on-Write (CoW), extensive checksums, snapshots, scrubbing, self-healing data, deduplication, as well as many more good improvements that ensure the data integrity. The btrfs lacks the RAID-Z features of ZFS, so the RAID is still in an experimental state with the btrfs. For pure data storage, however, the btrfs is the winner over the ext4, but time still will tell. - -Till the moment, the ext4 seems to be a better choice on the desktop system since it is presented as a default file system, as well as it is faster than the btrfs when transferring files. The btrfs is definitely worth to look into, but to completely switch to replace the ext4 on desktop Linux might be few years later. The data farms and the large storage pools could reveal different stories and show the right differences between ext4, XCF, and btrfs. - -If you have a different or additional opinion, kindly let us know by commenting on this article. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/review-ext4-vs-btrfs-vs-xfs/ - -作者:[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/ From efb620868dd4ed32461fe143f3ddc2cb87e442ef Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 27 Feb 2016 21:52:17 +0800 Subject: [PATCH 1077/1710] PUB:20160224 Can we tackle the Zika virus with rapid, open research @name1e5s --- ...tackle the Zika virus with rapid, open research.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {translated/tech => published}/20160224 Can we tackle the Zika virus with rapid, open research.md (52%) diff --git a/translated/tech/20160224 Can we tackle the Zika virus with rapid, open research.md b/published/20160224 Can we tackle the Zika virus with rapid, open research.md similarity index 52% rename from translated/tech/20160224 Can we tackle the Zika virus with rapid, open research.md rename to published/20160224 Can we tackle the Zika virus with rapid, open research.md index 8ed74fc15f..54cd0fe697 100644 --- a/translated/tech/20160224 Can we tackle the Zika virus with rapid, open research.md +++ b/published/20160224 Can we tackle the Zika virus with rapid, open research.md @@ -1,15 +1,15 @@ -我们能通过快速的,开放的研究战胜寨卡病毒吗? +我们能通过快速、开放的研究来战胜寨卡病毒吗? ============================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_LifeScience_OpenScience_520x292_12268077_0614MM.png?itok=3ZD2Mce9) 关于寨卡病毒,最主要的问题就是我们对于它了解的太少了。这意味着我们需要尽快对它作出很多研究。 -寨卡病毒现已严重威胁到世界人民的健康。在 2015 年爆发之后,它就成为了全球卫生的紧急状况,并且这个病毒也可能与儿童的出生缺陷有关。根据维基百科,在这个病毒在 40 年代末期被发现以后,它对于人类的影响早在 1952 年就被观测到了。 +寨卡病毒现已严重威胁到世界人民的健康。在 2015 年爆发之后,它就成为了全球性的突发公共卫生事件,并且这个病毒也可能与儿童的出生缺陷有关。根据[维基百科][4],在这个病毒在 40 年代末期被发现以后,早在 1952 年就被观测到了对于人类的影响。 -在 2 月 10 日,开放杂志 PLoS [发布了一个声明][1],这个是声明是关于有关公共公众紧急状况的信息的共享。在此之后,刊登在开放期刊 F1000 的一篇文章 [开始了对于能治疗寨卡病毒的药物的研究][2],它开放的讨论寨卡病毒的状况以及对它进行研究的需要。那个来自 PLoS 的声明列出了超过 30 个开放了对于寨卡病毒的研究进度的数据的重要组织。并且世界卫生组织实施了对于提交到他们那里的资料的特别规定使得在一个[创作共用许可证下][3]公布。 +在 2 月 10 日,开放杂志 PLoS [发布了一个声明][1],这个是声明是关于有关公众紧急状况的信息共享。在此之后,刊登在研究期刊 F1000 的一篇文章 [对于能治疗寨卡病毒的开源药物(Open drug)的研究][2],它讨论了寨卡病毒及其开放研究的状况。那篇来自 PLoS 的声明列出了超过 30 个开放了对于寨卡病毒的研究进度的数据的重要组织。并且世界卫生组织实施了一个特别规定,以[创作共用许可证][3]公布提交到他们那里的资料。 -快速公布,无限制的重复利用,以及强调研究结果的传播是开放科研组织把他们的研究推出的战略性一步。看到一个需要我们给予关注的紧急状况的研究的开端是很令人受鼓舞的。 +快速公布,无限制的重复利用,以及强调研究结果的传播是推动开放科研社区的战略性一步。看到我们所关注的突发公共卫生事件能够以这样的方式开始是很令人受鼓舞的。 -------------------------------------------------------------------------------- @@ -17,7 +17,7 @@ via: https://opensource.com/life/16/2/how-rapid-open-science-could-change-game-z 作者:[Marcus D. Hanwell][a] 译者:[name1e5s](https://github.com/name1e5s) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -25,3 +25,4 @@ via: https://opensource.com/life/16/2/how-rapid-open-science-could-change-game-z [1]: http://blogs.plos.org/plos/2016/02/statement-on-data-sharing-in-public-health-emergencies/ [2]: http://f1000research.com/articles/5-150/v1 [3]: https://creativecommons.org/licenses/by/3.0/igo/ +[4]: https://en.wikipedia.org/wiki/Zika_virus \ No newline at end of file From 1cb307ea85c53b1329c3d43edc375c4a08a437f7 Mon Sep 17 00:00:00 2001 From: cposture Date: Sun, 28 Feb 2016 11:30:55 +0800 Subject: [PATCH 1078/1710] Translated Data Structures in the Linux Kernel --- ...123 Data Structures in the Linux Kernel.md | 202 ------------------ 1 file changed, 202 deletions(-) delete mode 100644 sources/tech/20151123 Data Structures in the Linux Kernel.md diff --git a/sources/tech/20151123 Data Structures in the Linux Kernel.md b/sources/tech/20151123 Data Structures in the Linux Kernel.md deleted file mode 100644 index edc4c1a5a7..0000000000 --- a/sources/tech/20151123 Data Structures in the Linux Kernel.md +++ /dev/null @@ -1,202 +0,0 @@ -【Translating By cposture 2016-02-26】 -Data Structures in the Linux Kernel -================================================================================ - -Radix tree --------------------------------------------------------------------------------- - -As you already know linux kernel provides many different libraries and functions which implement different data structures and algorithms. In this part we will consider one of these data structures - [Radix tree](http://en.wikipedia.org/wiki/Radix_tree). There are two files which are related to `radix tree` implementation and API in the linux kernel: - -* [include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h) -* [lib/radix-tree.c](https://github.com/torvalds/linux/blob/master/lib/radix-tree.c) - -Lets talk about what a `radix tree` is. Radix tree is a `compressed trie` where a [trie](http://en.wikipedia.org/wiki/Trie) is a data structure which implements an interface of an associative array and allows to store values as `key-value`. The keys are usually strings, but any data type can be used. A trie is different from an `n-tree` because of its nodes. Nodes of a trie do not store keys; instead, a node of a trie stores single character labels. The key which is related to a given node is derived by traversing from the root of the tree to this node. For example: - - -``` -               +-----------+ -               |           | -               |    " "    | - | | -        +------+-----------+------+ -        |                         | -        |                         | -   +----v------+            +-----v-----+ -   |           |            |           | -   |    g      |            |     c     | - | | | | -   +-----------+            +-----------+ -        |                         | -        |                         | -   +----v------+            +-----v-----+ -   |           |            |           | -   |    o      |            |     a     | - | | | | -   +-----------+            +-----------+ -                                  | -                                  | -                            +-----v-----+ -                            |           | -                            |     t     | - | | -                            +-----------+ -``` - -So in this example, we can see the `trie` with keys, `go` and `cat`. The compressed trie or `radix tree` differs from `trie` in that all intermediates nodes which have only one child are removed. - -Radix tree in linux kernel is the datastructure which maps values to integer keys. It is represented by the following structures from the file [include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h): - -```C -struct radix_tree_root { - unsigned int height; - gfp_t gfp_mask; - struct radix_tree_node __rcu *rnode; -}; -``` - -This structure presents the root of a radix tree and contains three fields: - -* `height` - height of the tree; -* `gfp_mask` - tells how memory allocations will be performed; -* `rnode` - pointer to the child node. - -The first field we will discuss is `gfp_mask`: - -Low-level kernel memory allocation functions take a set of flags as - `gfp_mask`, which describes how that allocation is to be performed. These `GFP_` flags which control the allocation process can have following values: (`GF_NOIO` flag) means sleep and wait for memory, (`__GFP_HIGHMEM` flag) means high memory can be used, (`GFP_ATOMIC` flag) means the allocation process has high-priority and can't sleep etc. - -* `GFP_NOIO` - can sleep and wait for memory; -* `__GFP_HIGHMEM` - high memory can be used; -* `GFP_ATOMIC` - allocation process is high-priority and can't sleep; - -etc. - -The next field is `rnode`: - -```C -struct radix_tree_node { - unsigned int path; - unsigned int count; - union { - struct { - struct radix_tree_node *parent; - void *private_data; - }; - struct rcu_head rcu_head; - }; - /* For tree user */ - struct list_head private_list; - void __rcu *slots[RADIX_TREE_MAP_SIZE]; - unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; -}; -``` - -This structure contains information about the offset in a parent and height from the bottom, count of the child nodes and fields for accessing and freeing a node. This fields are described below: - -* `path` - offset in parent & height from the bottom; -* `count` - count of the child nodes; -* `parent` - pointer to the parent node; -* `private_data` - used by the user of a tree; -* `rcu_head` - used for freeing a node; -* `private_list` - used by the user of a tree; - -The two last fields of the `radix_tree_node` - `tags` and `slots` are important and interesting. Every node can contains a set of slots which are store pointers to the data. Empty slots in the linux kernel radix tree implementation store `NULL`. Radix trees in the linux kernel also supports tags which are associated with the `tags` fields in the `radix_tree_node` structure. Tags allow individual bits to be set on records which are stored in the radix tree. - -Now that we know about radix tree structure, it is time to look on its API. - -Linux kernel radix tree API ---------------------------------------------------------------------------------- - -We start from the datastructure initialization. There are two ways to initialize a new radix tree. The first is to use `RADIX_TREE` macro: - -```C -RADIX_TREE(name, gfp_mask); -```` - -As you can see we pass the `name` parameter, so with the `RADIX_TREE` macro we can define and initialize radix tree with the given name. Implementation of the `RADIX_TREE` is easy: - -```C -#define RADIX_TREE(name, mask) \ - struct radix_tree_root name = RADIX_TREE_INIT(mask) - -#define RADIX_TREE_INIT(mask) { \ - .height = 0, \ - .gfp_mask = (mask), \ - .rnode = NULL, \ -} -``` - -At the beginning of the `RADIX_TREE` macro we define instance of the `radix_tree_root` structure with the given name and call `RADIX_TREE_INIT` macro with the given mask. The `RADIX_TREE_INIT` macro just initializes `radix_tree_root` structure with the default values and the given mask. - -The second way is to define `radix_tree_root` structure by hand and pass it with mask to the `INIT_RADIX_TREE` macro: - -```C -struct radix_tree_root my_radix_tree; -INIT_RADIX_TREE(my_tree, gfp_mask_for_my_radix_tree); -``` - -where: - -```C -#define INIT_RADIX_TREE(root, mask) \ -do { \ - (root)->height = 0; \ - (root)->gfp_mask = (mask); \ - (root)->rnode = NULL; \ -} while (0) -``` - -makes the same initialziation with default values as it does `RADIX_TREE_INIT` macro. - -The next are two functions for inserting and deleting records to/from a radix tree: - -* `radix_tree_insert`; -* `radix_tree_delete`; - -The first `radix_tree_insert` function takes three parameters: - -* root of a radix tree; -* index key; -* data to insert; - -The `radix_tree_delete` function takes the same set of parameters as the `radix_tree_insert`, but without data. - -The search in a radix tree implemented in two ways: - -* `radix_tree_lookup`; -* `radix_tree_gang_lookup`; -* `radix_tree_lookup_slot`. - -The first `radix_tree_lookup` function takes two parameters: - -* root of a radix tree; -* index key; - -This function tries to find the given key in the tree and return the record associated with this key. The second `radix_tree_gang_lookup` function have the following signature - -```C -unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, - void **results, - unsigned long first_index, - unsigned int max_items); -``` - -and returns number of records, sorted by the keys, starting from the first index. Number of the returned records will not be greater than `max_items` value. - -And the last `radix_tree_lookup_slot` function will return the slot which will contain the data. - -Links ---------------------------------------------------------------------------------- - -* [Radix tree](http://en.wikipedia.org/wiki/Radix_tree) -* [Trie](http://en.wikipedia.org/wiki/Trie) - --------------------------------------------------------------------------------- - -via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/radix-tree.md - -作者:[0xAX] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - From 938cbe4b34646dbf4d5c984afd65a28a92df8ce1 Mon Sep 17 00:00:00 2001 From: cposture Date: Sun, 28 Feb 2016 11:35:27 +0800 Subject: [PATCH 1079/1710] Translated Data Structures in the Linux Kernel --- ...123 Data Structures in the Linux Kernel.md | 198 ++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 translated/tech/20151123 Data Structures in the Linux Kernel.md diff --git a/translated/tech/20151123 Data Structures in the Linux Kernel.md b/translated/tech/20151123 Data Structures in the Linux Kernel.md new file mode 100644 index 0000000000..78526e6d94 --- /dev/null +++ b/translated/tech/20151123 Data Structures in the Linux Kernel.md @@ -0,0 +1,198 @@ +Linux内核数据结构 +================================================================================ + +基数树 Radix tree +-------------------------------------------------------------------------------- +正如你所知道的,Linux内核提供了许多不同的库和函数,它们实现了不同的数据结构和算法。在这部分,我们将研究其中一种数据结构——[基数树 Radix tree](http://en.wikipedia.org/wiki/Radix_tree)。在Linux内核中,有两个与基数树实现和API相关的文件: + +* [include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h) +* [lib/radix-tree.c](https://github.com/torvalds/linux/blob/master/lib/radix-tree.c) + +让我们讨论什么是`基数树`吧。基数树是一种`压缩的字典树`,而[字典树](http://en.wikipedia.org/wiki/Trie)是实现了关联数组接口并允许以`键值对`方式存储值的一种数据结构。该键通常是字符串,但能够使用任何数据类型。字典树因为它的节点而与`n叉树`不同。字典树的节点不存储键;相反,字典树的一个节点存储单个字符的标签。与一个给定节点关联的键可以通过从根遍历到该节点获得。举个例子: + +``` +               +-----------+ +               |           | +               |    " "    | + | | +        +------+-----------+------+ +        |                         | +        |                         | +   +----v------+            +-----v-----+ +   |           |            |           | +   |    g      |            |     c     | + | | | | +   +-----------+            +-----------+ +        |                         | +        |                         | +   +----v------+            +-----v-----+ +   |           |            |           | +   |    o      |            |     a     | + | | | | +   +-----------+            +-----------+ +                                  | +                                  | +                            +-----v-----+ +                            |           | +                            |     t     | + | | +                            +-----------+ +``` + +因此在这个例子中,我们可以看到一个有着两个键`go`和`cat`的`字典树`。压缩的字典树或者`基数树`和`字典树`不同于所有只有一个孩子的中间节点都被删除。 + +Linu内核中的基数树是映射值到整形键的一种数据结构。[include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h)文件中的以下结构体表示了基数树: + +```C +struct radix_tree_root { + unsigned int height; + gfp_t gfp_mask; + struct radix_tree_node __rcu *rnode; +}; +``` + +这个结构体表示了一个基数树的根,并包含了3个域成员: + +* `height` - 树的高度; +* `gfp_mask` - 告诉如何执行动态内存分配; +* `rnode` - 孩子节点指针. + +我们第一个要讨论的域是`gfp_mask`: + +底层内核内存动态分配函数以一组标志作为` gfp_mask `,用于描述如何执行动态内存分配。这些控制分配进程的`GFP_`标志拥有以下值:(`GF_NOIO`标志)意味着睡眠等待内存,(`__GFP_HIGHMEM`标志)意味着高端内存能够被使用,(`GFP_ATOMIC`标志)意味着分配进程拥有高优先级并不能睡眠等等。 + +* `GFP_NOIO` - 睡眠等待内存 +* `__GFP_HIGHMEM` - 高端内存能够被使用; +* `GFP_ATOMIC` - 分配进程拥有高优先级并且不能睡眠; + +等等。 + +下一个域是`rnode`: + +```C +struct radix_tree_node { + unsigned int path; + unsigned int count; + union { + struct { + struct radix_tree_node *parent; + void *private_data; + }; + struct rcu_head rcu_head; + }; + /* For tree user */ + struct list_head private_list; + void __rcu *slots[RADIX_TREE_MAP_SIZE]; + unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; +}; +``` +这个结构体包含的信息有父节点中的偏移以及到底端(叶节点)的高度、孩子节点的个数以及用于访问和释放节点的域成员。这些域成员描述如下: + +* `path` - 父节点中的偏移和到底端(叶节点)的高度 +* `count` - 孩子节点的个数; +* `parent` - 父节点指针; +* `private_data` - 由树的用户使用; +* `rcu_head` - 用于释放节点; +* `private_list` - 由树的用户使用; + +`radix_tree_node`的最后两个成员——`tags`和`slots`非常重要且令人关注。Linux内核基数树的每个节点都包含一组存储指向数据指针的slots。Linux内核基数树实现的空slots存储`NULL`值。Linux内核中的基数树也支持与`radix_tree_node`结构体的`tags`域相关联的标签。标签允许在基数树存储的记录中设置各个位。 + +既然我们了解了基数树的结构,那么该是时候看一下它的API了。 + +Linux内核基数树API +--------------------------------------------------------------------------------- + +我们从结构体的初始化开始。有两种方法初始化一个新的基数树。第一种是使用`RADIX_TREE`宏: + +```C +RADIX_TREE(name, gfp_mask); +```` + +正如你所看到的,我们传递`name`参数,所以使用`RADIX_TREE`宏,我们能够定义和初始化基数树为给定的名字。`RADIX_TREE`的实现是简单的: + +```C +#define RADIX_TREE(name, mask) \ + struct radix_tree_root name = RADIX_TREE_INIT(mask) + +#define RADIX_TREE_INIT(mask) { \ + .height = 0, \ + .gfp_mask = (mask), \ + .rnode = NULL, \ +} +``` + +在`RADIX_TREE`宏的开始,我们使用给定的名字定义`radix_tree_root`结构体实例,并使用给定的mask调用`RADIX_TREE_INIT`宏。`RADIX_TREE_INIT`宏只是初始化`radix_tree_root`结构体为默认值和给定的mask而已。 + +第二种方法是亲手定义`radix_tree_root`结构体,并且将它和mask传给`INIT_RADIX_TREE`宏: + +```C +struct radix_tree_root my_radix_tree; +INIT_RADIX_TREE(my_tree, gfp_mask_for_my_radix_tree); +``` + +where: + +```C +#define INIT_RADIX_TREE(root, mask) \ +do { \ + (root)->height = 0; \ + (root)->gfp_mask = (mask); \ + (root)->rnode = NULL; \ +} while (0) +``` + +和`RADIX_TREE_INIT`宏所做的初始化一样,初始化为默认值。 + +接下来是用于从基数树插入和删除数据的两个函数: + +* `radix_tree_insert`; +* `radix_tree_delete`; + +第一个函数`radix_tree_insert`需要3个参数: + +* 基数树的根; +* 索引键; +* 插入的数据; + +`radix_tree_delete`函数需要和`radix_tree_insert`一样的一组参数,但是没有data。 + +基数树的搜索以两种方法实现: + +* `radix_tree_lookup`; +* `radix_tree_gang_lookup`; +* `radix_tree_lookup_slot`. + +第一个函数`radix_tree_lookup`需要两个参数: + +* 基数树的根; +* 索引键; + +这个函数尝试在树中查找给定的键,并返回和该键相关联的记录。第二个函数`radix_tree_gang_lookup`有以下的函数签名: + +```C +unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, + void **results, + unsigned long first_index, + unsigned int max_items); +``` + +和返回记录的个数,(results指向的数据)按键排序并从第一个索引开始。返回的记录个数将不会超过`max_items`。 + +最后一个函数`radix_tree_lookup_slot`将会返回包含数据的slot。 + +链接 +--------------------------------------------------------------------------------- + +* [Radix tree](http://en.wikipedia.org/wiki/Radix_tree) +* [Trie](http://en.wikipedia.org/wiki/Trie) + +-------------------------------------------------------------------------------- + +via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/radix-tree.md + +作者:[0xAX] +译者:[cposture](https://github.com/cposture) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + From 2eadbb2d8deba1b7555258d3075d775f3850e551 Mon Sep 17 00:00:00 2001 From: cposture Date: Sun, 28 Feb 2016 11:51:02 +0800 Subject: [PATCH 1080/1710] Update 20151109 How to send email notifications using Gmail SMTP server on Linux.md --- ...end email notifications using Gmail SMTP server on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 5ffcb5aea8..1ec6ddff27 100644 --- 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 @@ -1,3 +1,4 @@ +【Translating by cposture 2016-02-28】 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. @@ -153,4 +154,4 @@ via: http://xmodulo.com/send-email-notifications-gmail-smtp-server-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 +[7]:http://xmodulo.com/go/digitalocean From fdba14f751711368c0c6f231734dca520c6cc25b Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 28 Feb 2016 17:24:32 +0800 Subject: [PATCH 1081/1710] Update 20151208 5 great Raspberry Pi projects for the classroom.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- .../20151208 5 great Raspberry Pi projects for the classroom.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md index cefad8cc6b..09423a6b8d 100644 --- a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md +++ b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md @@ -1,3 +1,5 @@ +FSSlc translating + 5 great Raspberry Pi projects for the classroom ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png) From 456fd7fa45321e6af3a601293cc374e11d14f2be Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 28 Feb 2016 20:04:43 +0800 Subject: [PATCH 1082/1710] PUB:20160104 How to use KVM from the command line on Debian or Ubuntu @kylepeng93 --- ...om the command line on Debian or Ubuntu.md | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md index 1f7a121b3a..f631477721 100644 --- a/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md +++ b/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -1,12 +1,11 @@ - -怎样在 ubuntu 和 debian 中用命令行使用 KVM +怎样在 ubuntu 和 debian 中通过命令行管理 KVM ================================================================================ -有很多不同的方式去管理运行在 KVM 管理程序上的虚拟机。例如,virt-manager 就是一个流行的基于图形界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用 KVM ,那么基于图形界面的解决方案显然是行不通的。事实上,你可以纯粹的使用包装了 kvm 命令行脚本的命令行来管理 KVM 虚拟机。作为替代方案,你可以使用 virsh 这个容易使用的命令行程序来管理客户虚拟机。在 virsh 中,它通过和 libvirtd 服务通信来达到控制虚拟机的目的,而 libvirtd 可以控制多个不同的虚拟机管理器,包括 KVM,Xen,QEMU,LXC 和 OpenVZ。 +有很多不同的方式去管理运行在 KVM 管理程序上的虚拟机。例如,virt-manager 就是一个流行的基于图形界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用 KVM ,那么基于图形界面的解决方案显然是行不通的。事实上,你可以单纯使用包装了 kvm 命令行脚本的命令行来管理 KVM 虚拟机。作为替代方案,你可以使用 virsh 这个容易使用的命令行程序来管理客户虚拟机。在 virsh 中,它通过和 libvirtd 服务通信来达到控制虚拟机的目的,而 libvirtd 可以控制多个不同的虚拟机管理器,包括 KVM,Xen,QEMU,LXC 和 OpenVZ。 当你想要对虚拟机的前期准备和后期管理实现自动化操作时,像 virsh 这样的命令行管理工具是非常有用的。同样,virsh 支持多个管理器也就意味着你可以通过相同的 virsh 接口去管理不同的虚拟机管理器。 -在这篇文章中,我会示范**怎样在ubuntu和debian上通过使用virsh命令行去运行KVM**。 +在这篇文章中,我会示范**怎样在 ubuntu 和 debian 上通过使用 virsh 命令行去运行 KVM**。 ### 第一步:确认你的硬件平台支持虚拟化 ### @@ -24,7 +23,7 @@ ### 第二步:安装KVM ### -使用 `apt-ge` 安装 KVM 和相关的用户空间工具。 +使用 `apt-get` 安装 KVM 和相关的用户空间工具。 ``` $ sudo apt-get install qemu-kvm libvirt-bin @@ -71,7 +70,7 @@ 为了使 KVM 虚拟机能够访问外部网络,一种方法是通过在 KVM 宿主机上创建 Linux 桥来实现。创建之后的桥能够将虚拟机的虚拟网卡和宿主机的物理网卡连接起来,因此,虚拟机能够发送和接收由物理网卡传输的数据包。这种方式叫做网络桥接。 -下面将告诉你如何创建并且配置网桥,我们创建一个网桥称它为 br0. +下面将告诉你如何创建并且配置网桥,我们创建一个网桥称它为 br0。 首先,安装一个必需的包,然后用命令行创建一个网桥。 @@ -168,11 +167,11 @@ - 1GB内存,一个虚拟cpu和一个硬件驱动 -- Disk image:`/home/dev/images/alice.img` +- 磁盘镜像:`/home/dev/images/alice.img` -- Boot from CD-ROM(`/home/dev/iso/CentOS-6.5-x86_64-minomal.iso`) +- 从 CD-ROM 引导(`/home/dev/iso/CentOS-6.5-x86_64-minomal.iso`) -- Networking:一个桥接到 br0 的虚拟网卡 +- 网络:一个桥接到 br0 的虚拟网卡 - 通过 VNC 远程访问 @@ -183,7 +182,7 @@ $ uuid ``` -生成一个主机xml配置文件的方式就是通过一个已经存在的虚拟机来导出它的xml配置文件。如下所示。 +生成一个主机 xml 配置文件的方式就是通过一个已经存在的虚拟机来导出它的 xml 配置文件。如下所示。 ``` $ virsh dumpxml alice > bob.xml @@ -233,6 +232,7 @@ ### 远程连接虚拟机 ### 为了远程访问一个正在运行的虚拟机的控制台,你可以使用VNC客户端。 + 首先,你需要使用如下命令找出用于虚拟机的VNC端口号。 ``` @@ -241,57 +241,57 @@ ![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg) -在这个例子中,用于 alice 虚拟机的 VNC 端口号是 5900 - 然后启动一个VNC客户端,连接到一个端口号为5900的VNC服务器。在我们的例子中,虚拟机支持由CentOS光盘文件启动。 +在这个例子中,用于 alice 虚拟机的 VNC 端口号是 5900。 然后启动一个VNC客户端,连接到一个端口号为5900的VNC服务器。在我们的例子中,虚拟机支持由CentOS光盘文件启动。 ![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg) ### 使用 virsh 管理虚拟机 ### -下面列出了 virsh 命令的常规用法 +下面列出了 virsh 命令的常规用法: + 创建客户机并且启动虚拟机: ``` $ virsh create alice.xml ``` -停止虚拟机并且删除客户机 +停止虚拟机并且删除客户机: ``` $ virsh destroy alice ``` -关闭虚拟机(不用删除它) +关闭虚拟机(不用删除它): ``` $ virsh shutdown alice ``` -暂停虚拟机 +暂停虚拟机: ``` $ virsh suspend alice ``` -恢复虚拟机 +恢复虚拟机: ``` $ virsh resume alice ``` -访问正在运行的虚拟机的控制台 +访问正在运行的虚拟机的控制台: ``` $ virsh console alice ``` -设置虚拟机开机启动: +设置虚拟机开机启动: ``` $ virsh autostart alice ``` -查看虚拟机的详细信息 +查看虚拟机的详细信息: ``` $ virsh dominfo alice @@ -304,6 +304,7 @@ ``` 上面的这个命令将会使用一个默认的编辑器来调用主机配置文件。该配置文件中的任何改变都将自动被libvirt验证其正确性。 + 你也可以在一个virsh会话中管理虚拟机。下面的命令会创建并进入到一个virsh会话中: ``` @@ -361,7 +362,7 @@ via: http://xmodulo.com/use-kvm-command-line-debian-ubuntu.html 作者:[Dan Nanni][a] -译者:[kylepeng93 ](https://github.com/kylepeng93 ) +译者:[kylepeng93](https://github.com/kylepeng93 ) 校对:[Ezio](https://github.com/oska874) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d083c7a9baf670e0285c3b6bbfb891c099daec93 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 28 Feb 2016 21:06:24 +0800 Subject: [PATCH 1083/1710] =?UTF-8?q?20160228-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...velopment Release: Xubuntu 16.04 Beta 1.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md diff --git a/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md new file mode 100644 index 0000000000..20111a905d --- /dev/null +++ b/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md @@ -0,0 +1,25 @@ +Development Release: Xubuntu 16.04 Beta 1 +============================================ + +he Ubuntu Release Team has announced the availability of new beta test images for select community editions. The new development release, which carries the designation 16.04 Beta 1, is recommended for testers only and is not considered suitable for daily use. + +"This beta features images for [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] and [Xubuntu][6]. Pre-releases of Xenial Xerus are not encouraged for anyone needing a stable system or anyone who is not comfortable running into occasional, even frequent breakage. They are, however, recommended for Ubuntu flavour developers and those who want to help in testing, reporting and fixing bugs as we work towards getting this release ready." Additional information can be found in the [release announcement][7]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/software/applications/888731-development-release-xubuntu-1604-beta-1 + +作者:[DistroWatch][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/community/forums/person/284 +[1]: http://distrowatch.com/lubuntu +[2]: http://distrowatch.com/ubuntugnome +[3]: http://distrowatch.com/ubuntumate +[4]: http://distrowatch.com/ubuntukylin +[5]: http://distrowatch.com/ubuntustudio +[6]: http://distrowatch.com/xubuntu +[7]: https://lists.ubuntu.com/archives/ubuntu-devel-announce/2016-February/001173.html From e28e4c57daafe88c261ecf6d7bb8b7aa6149892b Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 28 Feb 2016 21:06:56 +0800 Subject: [PATCH 1084/1710] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../news/20160226 Development Release: Xubuntu 16.04 Beta 1.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md index 20111a905d..85cbe1f351 100644 --- a/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md +++ b/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md @@ -1,3 +1,5 @@ +ezio translting + Development Release: Xubuntu 16.04 Beta 1 ============================================ From 34fff873e6d09c0c56e27e403d0e71b4d6897a90 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 28 Feb 2016 21:23:53 +0800 Subject: [PATCH 1085/1710] =?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 --- ...60226 Development Release: Xubuntu 16.04 Beta 1.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md index 85cbe1f351..7d1fee4d3c 100644 --- a/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md +++ b/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md @@ -1,18 +1,23 @@ -ezio translting +ezio translted Development Release: Xubuntu 16.04 Beta 1 +Xubuntu 16.04 Beta 1 开发发布 ============================================ -he Ubuntu Release Team has announced the availability of new beta test images for select community editions. The new development release, which carries the designation 16.04 Beta 1, is recommended for testers only and is not considered suitable for daily use. +The Ubuntu Release Team has announced the availability of new beta test images for select community editions. The new development release, which carries the designation 16.04 Beta 1, is recommended for testers only and is not considered suitable for daily use. + +Ubuntu 发布组已经宣布为了选定的社区版本准备的最新的 beta 测试镜像已经可以使用了。新的开发发布版名称是 16.04 beta 1,这个版本只推荐给测试人员,并不适合日常使用。 "This beta features images for [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] and [Xubuntu][6]. Pre-releases of Xenial Xerus are not encouraged for anyone needing a stable system or anyone who is not comfortable running into occasional, even frequent breakage. They are, however, recommended for Ubuntu flavour developers and those who want to help in testing, reporting and fixing bugs as we work towards getting this release ready." Additional information can be found in the [release announcement][7]. +“这个 beta 特性的镜像是为 [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] 和 [Xubuntu][6] 这几个发布版准备的。Xenial Xerus 的预发布版本并不推荐那些需要稳定版本的,或者那些不希望在系统运行中偶尔或频繁的出现 bug 的人。这个版本还是推荐给喜欢 ubuntu 的开发人员,以及那些想帮助着测试、报告和修改 bug,和我们一起工作让这个发布版本早日准备好。” 更多的信息可以从 [发布日志][7] 获取。 + -------------------------------------------------------------------------------- via: https://www.linux.com/news/software/applications/888731-development-release-xubuntu-1604-beta-1 作者:[DistroWatch][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 8743d7ca06f035c9f35b09a9a878b83332106e5b Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 28 Feb 2016 21:24:54 +0800 Subject: [PATCH 1086/1710] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../news/20160226 Development Release: Xubuntu 16.04 Beta 1.md | 2 -- 1 file changed, 2 deletions(-) rename {sources => translated}/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md (99%) diff --git a/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md similarity index 99% rename from sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md rename to translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md index 7d1fee4d3c..95be0bfa46 100644 --- a/sources/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md +++ b/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md @@ -1,5 +1,3 @@ -ezio translted - Development Release: Xubuntu 16.04 Beta 1 Xubuntu 16.04 Beta 1 开发发布 ============================================ From 9c6cf2cf1dada2930577cbd26becf8078bcf6c04 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 28 Feb 2016 21:25:50 +0800 Subject: [PATCH 1087/1710] =?UTF-8?q?=E8=B5=B6=E7=B4=A7=E6=A0=A1=E5=AF=B9?= =?UTF-8?q?=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160226 Development Release: Xubuntu 16.04 Beta 1.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md index 95be0bfa46..62e903018f 100644 --- a/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md +++ b/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md @@ -1,13 +1,8 @@ -Development Release: Xubuntu 16.04 Beta 1 Xubuntu 16.04 Beta 1 开发发布 ============================================ -The Ubuntu Release Team has announced the availability of new beta test images for select community editions. The new development release, which carries the designation 16.04 Beta 1, is recommended for testers only and is not considered suitable for daily use. - Ubuntu 发布组已经宣布为了选定的社区版本准备的最新的 beta 测试镜像已经可以使用了。新的开发发布版名称是 16.04 beta 1,这个版本只推荐给测试人员,并不适合日常使用。 -"This beta features images for [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] and [Xubuntu][6]. Pre-releases of Xenial Xerus are not encouraged for anyone needing a stable system or anyone who is not comfortable running into occasional, even frequent breakage. They are, however, recommended for Ubuntu flavour developers and those who want to help in testing, reporting and fixing bugs as we work towards getting this release ready." Additional information can be found in the [release announcement][7]. - “这个 beta 特性的镜像是为 [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] 和 [Xubuntu][6] 这几个发布版准备的。Xenial Xerus 的预发布版本并不推荐那些需要稳定版本的,或者那些不希望在系统运行中偶尔或频繁的出现 bug 的人。这个版本还是推荐给喜欢 ubuntu 的开发人员,以及那些想帮助着测试、报告和修改 bug,和我们一起工作让这个发布版本早日准备好。” 更多的信息可以从 [发布日志][7] 获取。 -------------------------------------------------------------------------------- From a520da8795954430434bf059d36fd93824e31d48 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Feb 2016 14:52:25 +0800 Subject: [PATCH 1088/1710] translating --- ...ntel shows budget Android phone powering big-screen Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md b/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md index 29a5c77cd9..315de0689e 100644 --- a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md +++ b/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md @@ -1,3 +1,5 @@ +translating---geekpi + Intel shows budget Android phone powering big-screen Linux ============================================================== From e494a35410c411e9a5d080e15b089354b6ab456d Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Feb 2016 15:22:54 +0800 Subject: [PATCH 1089/1710] translated --- ...Android phone powering big-screen Linux.md | 24 ++++++------- ...Android phone powering big-screen Linux.md | 34 +++++++++++++++++++ 2 files changed, 46 insertions(+), 12 deletions(-) create mode 100644 translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md diff --git a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md b/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md index 315de0689e..aedd61f966 100644 --- a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md +++ b/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md @@ -1,34 +1,34 @@ -translating---geekpi - -Intel shows budget Android phone powering big-screen Linux +Intel展示了带动大屏幕Linux的便宜Android手机 ============================================================== ![](https://regmedia.co.uk/2016/02/23/intel-bigscreen.jpg?x=648&y=348&crop=1) -**MWC16** Intel is showing what it calls "Big Screen Experience" at Mobile World Congress, an Android smartphone which runs a full Linux desktop when plugged into an external display. +在世界移动会议**MWC16**上Intel展示了称之为“大屏体验”的一款的Android智能手机,它在插入一个外部显示后运行了一个完整的Linux桌面。 -The concept is broadly similar to Microsoft's Continuum for Windows 10 Mobile, but whereas Continuum devices are towards the high end, Intel's project is aimed, it says, at budget smartphones and emerging markets. +这个概念大体上与微软在Windows 10手机中的Continuum相似,但是Continuum面向的是高端设备,Intel的项目面向的是低端智能机何新兴市场。 -On display in Barcelona is a prototype SoFIA (Smart or Feature Phone with Intel Architecture) smartphone with an Atom x3 processor, 2GB RAM and 16GB storage, and modified to support an external display. Attach keyboard, mouse and display, and it becomes desktop Linux, with an option to display the Android screen in a window on the large display. +显示上Barcelona是拥有Atom x3、2GB RAM和16GB存储以及支持外部显示的的SoFIA(Intel架构的只能或功能手机)智能机原型。插上键盘、鼠标何显示,它就变成了一台桌面Linux,可以选择在大屏幕中显示Android桌面。 -"Android is based on a Linux kernel, so we're running one kernel, we have an Android stack and a Linux stack, and we're sharing the same context, so the file system is identical. The phone stays fully functional," Intel's Nir Metzer, Path Finding Group Manager, told the Reg. +Intel的拓荒小组经理Nir Metzer告诉Reg:“Android基于Linux内核,因此我们运行的是一个内核,我们有一个Android栈和一个Linux栈,并且我们共享一个上下文,因此文件系统是相同的。电话是全功能的。” -"I have a multi-window environment. As soon as I plug in I can do spreadsheets, I can drag and drop, play video. Achieving all this on a low-end platform is a challenge," said Metzer. +Metzer说:“我有一个多窗口环境。只要我插入后就可以做电子表格,我可以拖拽、播放音频。在一个低端平台实现这一切是一个挑战。” -Currently the display on the device goes blank when the external display is attached, but Metzer said that the next version of the Atom X3 will support dual displays. +现在当连上外部显示器时设备的屏幕显示的空白,但是Metzer说下个版本的Atom X3会支持双显示。 -The version of Linux used is maintained by Intel. "We need to align between the Linux versions and the Android," said Metzer. "The framework is pre-installed, not an app you can download." +使用的Linux版本是由Intel维护的。Metzer说:“我们需要将Linux和Android保持一致。框架是预安装的,你不能下载任何app” -Intel is pitching the idea at phone manufacturers here at Mobile World Congress, but had nothing to report concerning actual customers for its device. "The chip is ready, this is production-ready. This can go into production tomorrow. It is a business decision," said Metzer.® +英特尔在移动世界大会上向手机制造商们推销这一想法,但却没有实际报告购买该设备的消费者。Metzer说:“芯片已经准备好了,已经为量产准备好了。这可以明天进入生产。这是一个商业决定。” -------------------------------------------------------------------------------- via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ 作者:[Tim Anderson][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://www.theregister.co.uk/Author/2878 + + diff --git a/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md b/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md new file mode 100644 index 0000000000..aedd61f966 --- /dev/null +++ b/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md @@ -0,0 +1,34 @@ +Intel展示了带动大屏幕Linux的便宜Android手机 +============================================================== + +![](https://regmedia.co.uk/2016/02/23/intel-bigscreen.jpg?x=648&y=348&crop=1) + +在世界移动会议**MWC16**上Intel展示了称之为“大屏体验”的一款的Android智能手机,它在插入一个外部显示后运行了一个完整的Linux桌面。 + +这个概念大体上与微软在Windows 10手机中的Continuum相似,但是Continuum面向的是高端设备,Intel的项目面向的是低端智能机何新兴市场。 + +显示上Barcelona是拥有Atom x3、2GB RAM和16GB存储以及支持外部显示的的SoFIA(Intel架构的只能或功能手机)智能机原型。插上键盘、鼠标何显示,它就变成了一台桌面Linux,可以选择在大屏幕中显示Android桌面。 + +Intel的拓荒小组经理Nir Metzer告诉Reg:“Android基于Linux内核,因此我们运行的是一个内核,我们有一个Android栈和一个Linux栈,并且我们共享一个上下文,因此文件系统是相同的。电话是全功能的。” + +Metzer说:“我有一个多窗口环境。只要我插入后就可以做电子表格,我可以拖拽、播放音频。在一个低端平台实现这一切是一个挑战。” + +现在当连上外部显示器时设备的屏幕显示的空白,但是Metzer说下个版本的Atom X3会支持双显示。 + +使用的Linux版本是由Intel维护的。Metzer说:“我们需要将Linux和Android保持一致。框架是预安装的,你不能下载任何app” + +英特尔在移动世界大会上向手机制造商们推销这一想法,但却没有实际报告购买该设备的消费者。Metzer说:“芯片已经准备好了,已经为量产准备好了。这可以明天进入生产。这是一个商业决定。” + +-------------------------------------------------------------------------------- + +via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ + +作者:[Tim Anderson][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.theregister.co.uk/Author/2878 + + From d7e2a05e8f6ffe8b023abaf692c90042bed9aa91 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Feb 2016 15:24:31 +0800 Subject: [PATCH 1090/1710] delete source --- ...Android phone powering big-screen Linux.md | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md diff --git a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md b/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md deleted file mode 100644 index aedd61f966..0000000000 --- a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md +++ /dev/null @@ -1,34 +0,0 @@ -Intel展示了带动大屏幕Linux的便宜Android手机 -============================================================== - -![](https://regmedia.co.uk/2016/02/23/intel-bigscreen.jpg?x=648&y=348&crop=1) - -在世界移动会议**MWC16**上Intel展示了称之为“大屏体验”的一款的Android智能手机,它在插入一个外部显示后运行了一个完整的Linux桌面。 - -这个概念大体上与微软在Windows 10手机中的Continuum相似,但是Continuum面向的是高端设备,Intel的项目面向的是低端智能机何新兴市场。 - -显示上Barcelona是拥有Atom x3、2GB RAM和16GB存储以及支持外部显示的的SoFIA(Intel架构的只能或功能手机)智能机原型。插上键盘、鼠标何显示,它就变成了一台桌面Linux,可以选择在大屏幕中显示Android桌面。 - -Intel的拓荒小组经理Nir Metzer告诉Reg:“Android基于Linux内核,因此我们运行的是一个内核,我们有一个Android栈和一个Linux栈,并且我们共享一个上下文,因此文件系统是相同的。电话是全功能的。” - -Metzer说:“我有一个多窗口环境。只要我插入后就可以做电子表格,我可以拖拽、播放音频。在一个低端平台实现这一切是一个挑战。” - -现在当连上外部显示器时设备的屏幕显示的空白,但是Metzer说下个版本的Atom X3会支持双显示。 - -使用的Linux版本是由Intel维护的。Metzer说:“我们需要将Linux和Android保持一致。框架是预安装的,你不能下载任何app” - -英特尔在移动世界大会上向手机制造商们推销这一想法,但却没有实际报告购买该设备的消费者。Metzer说:“芯片已经准备好了,已经为量产准备好了。这可以明天进入生产。这是一个商业决定。” - --------------------------------------------------------------------------------- - -via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ - -作者:[Tim Anderson][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.theregister.co.uk/Author/2878 - - From c266d8db2eda6dd9725640c0133895dc740ef0b2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Feb 2016 15:27:29 +0800 Subject: [PATCH 1091/1710] tranalating --- ...--Summon Swarms Of Penguins To Waddle About The Desktop.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md index 73d16fe1bd..898790b197 100644 --- a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md +++ b/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md @@ -1,3 +1,5 @@ +translating---geekpi + Linux Desktop Fun: Summon Swarms Of Penguins To Waddle About The Desktop ================================================================================ XPenguins is a program for animating cute cartoons animals in your root window. By default it will be penguins they drop in from the top of the screen, walk along the tops of your windows, up the side of your windows, levitate, skateboard, and do other similarly exciting things. Now you can send an army of cute little penguins to invade the screen of someone else on your network. @@ -98,3 +100,5 @@ via: http://www.cyberciti.biz/tips/linux-cute-little-xpenguins-walk-along-tops-o [1]:http://xpenguins.seul.org/ [2]:http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html [3]:http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium.html + + From 1cebb81e0fcd6d6d7d171ef3dfaeee051df5149d Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Feb 2016 15:46:07 +0800 Subject: [PATCH 1092/1710] translated --- ...Of Penguins To Waddle About The Desktop.md | 48 +++++++++---------- 1 file changed, 23 insertions(+), 25 deletions(-) rename {sources => translated}/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md (51%) diff --git a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md similarity index 51% rename from sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md rename to translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md index 898790b197..6c797816f5 100644 --- a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md +++ b/translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md @@ -1,45 +1,43 @@ -translating---geekpi - -Linux Desktop Fun: Summon Swarms Of Penguins To Waddle About The Desktop +Linux桌面趣闻:召唤一群企鹅在桌面上行走 ================================================================================ -XPenguins is a program for animating cute cartoons animals in your root window. By default it will be penguins they drop in from the top of the screen, walk along the tops of your windows, up the side of your windows, levitate, skateboard, and do other similarly exciting things. Now you can send an army of cute little penguins to invade the screen of someone else on your network. +XPenguins是一个在窗口播放可爱动物动画的程序。默认情况下,将会从屏幕上方掉落企鹅,沿着你的窗口顶部行走,在窗口变漂浮,滑板,和做其他类似的令人兴奋的事情。现在,你可以把这些可爱的小企鹅大军入侵别人的桌面了。 -### Install XPenguins ### +### 安装XPenguins ### -Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following commands to install XPenguins program. First, type the command apt-get update to tell apt to refresh its package information by querying the configured repositories and then install the required program: +打开终端(选择程序->附件->终端),接着输入下面的命令来安装XPenguins。首先,输入apt-get update通过请求配置的仓库刷新包的信息,接着安装需要的程序: $ sudo apt-get update $ sudo apt-get install xpenguins -### How do I Start XPenguins Locally? ### +### 我本地如何启动XPenguins? ### -Type the following command: +输入下面的命令: $ xpenguins -Sample outputs: +示例输出: ![An army of cute little penguins invading the screen](http://files.cyberciti.biz/uploads/tips/2011/07/Workspace-1_002_12_07_2011.png) -An army of cute little penguins invading the screen +一支可爱企鹅军队正在入侵屏幕。 ![Linux: Cute little penguins walking along the tops of your windows](http://files.cyberciti.biz/uploads/tips/2011/07/Workspace-1_001_12_07_2011.png) -Linux: Cute little penguins walking along the tops of your windows +Linux:可爱的小企鹅沿着窗口的顶部行走。 ![Xpenguins Screenshot](http://files.cyberciti.biz/uploads/tips/2011/07/xpenguins-screenshot.jpg) -Xpenguins Screenshot +Xpenguins截图 -Be careful when you move windows as the little guys squash easily. If you send the program an interupt signal (Ctrl-C) they will burst. +移动窗口时小心点,小家伙们很容易被压坏。如果你发送中断程序(Ctrl-C),它们会爆炸。 -### Themes ### +### 主题 ### -To list themes, enter: +要列出主题,输入: $ xpenguins -l -Sample outputs: +示例输出: Big Penguins Bill @@ -47,11 +45,11 @@ Sample outputs: Penguins Turtles -You can use alternative themes as follows: +你可以用下面的命令使用其他的主题: $ xpenguins --theme "Big Penguins" --theme "Turtles" -You can install additional themes as follows: +你可以用下面的命令安装额外的主题: $ cd /tmp $ wget http://xpenguins.seul.org/xpenguins_themes-1.0.tar.gz @@ -60,7 +58,7 @@ You can install additional themes as follows: $ mv -v themes ~/.xpenguins/ $ xpenguins -l -Sample outputs: +示例输出: Lemmings Sonic the Hedgehog @@ -73,26 +71,26 @@ Sample outputs: Penguins Turtles -To start with a random theme, enter: +已一个随机主题开始,输入: $ xpenguins --random-theme -To load all available themes and run them simultaneously, enter: +要加载所有的主题并且同时运行,输入: $ xpenguins --all -More links and information: +更多链接何信息: -- [XPenguins][1] home page. +- [XPenguins][1] 主页。 - man penguins -- More Linux / UNIX desktop fun with [Steam Locomotive][2] and [Terminal ASCII Aquarium][3]. +- 更多Linux/Unix桌面乐趣在[蒸汽火车][2]和[终端ASCII水族馆][3]。 -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/tips/linux-cute-little-xpenguins-walk-along-tops-ofyour-windows.html 作者:Vivek Gite -译者:[译者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 7fbc74dc9e80c685979ee7b1d82ef2bc1f84c472 Mon Sep 17 00:00:00 2001 From: Bestony Date: Mon, 29 Feb 2016 17:35:12 +0800 Subject: [PATCH 1093/1710] Update 20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md --- ...Install OsTicket Ticketing System in Fedora 22 or Centos 7.md | 1 + 1 file changed, 1 insertion(+) 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 index 6624a3c590..49244c96d2 100644 --- 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 @@ -1,3 +1,4 @@ +translated by bestony 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. From a07d9fbe5afc29ccb83f7af2ab48af4cc97276fa Mon Sep 17 00:00:00 2001 From: cposture Date: Mon, 29 Feb 2016 19:20:47 +0800 Subject: [PATCH 1094/1710] Translated by cposture --- ...ations using Gmail SMTP server on Linux.md | 156 ------------------ ...ations using Gmail SMTP server on Linux.md | 156 ++++++++++++++++++ 2 files changed, 156 insertions(+), 156 deletions(-) delete mode 100644 sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md create mode 100644 translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md 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 deleted file mode 100644 index 5ffcb5aea8..0000000000 --- a/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md +++ /dev/null @@ -1,156 +0,0 @@ -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/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md new file mode 100644 index 0000000000..56830068ab --- /dev/null +++ b/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md @@ -0,0 +1,156 @@ +如何在Linux上使用Gmail SMTP服务器发送邮件通知 +================================================================================ +假定你想配置一个Linux app从你的服务器或桌面客户端发送邮件信息。邮件信息可以是邮件简报、状态更新(比如[Cachet][1])、监控警报(比如[Monit][2])、磁盘时间(比如[RAID mdadm][3])等等的一部分。当你要建立自己的[邮件发送服务器][4],作为一个免维护的选择,你可以依赖一个免费可用的公共SMTP服务器。 + +最可靠的**免费SMTP服务器**之一来自谷歌的Gmail服务。为了在你的app里发送邮件通知,你仅需在app中添加Gmail的SMTP服务器地址和你的凭证即可。 + +Gmail的SMTP服务器吸引人的地方之一是有各种各样恰当的限制,这些限制主要用于阻止那些经常滥用服务器的滥发垃圾邮件者和邮件营销者。举个例子,你一次只能给至多100个地址发送信息,并且一天不能超过500个接收者。当你达到任何一个限制,你的Gmail账户将暂时锁一天。简而言之,Gmail的SMTP服务器对于你个人的使用是非常棒的,但不适合商业的批量邮件。 + +话虽如此,让我们展示**如何在Linux环境下使用Gmail的SMTP服务器**。 + +### Google Gmail SMTP服务器设置 ### + +如果你想要使用Gmail的SMTP服务器从你的app发送邮件,请牢记接下来的详细说明。 + +- **邮件发送服务器 (SMTP服务器)**: smtp.gmail.com +- **使用认证**: 是 +- **使用安全连接**: 是 +- **用户名**: 你的Gmail账户ID (比如 "alice" 如果你的邮箱为alice@gmail.com) +- **密码**: 你的Gmail密码 +- **端口**: 587 + +确切的配置语法可能要依据app而不同。在本教程的剩下部分,我将会向你展示各种在Linux上使用Gmail SMTP服务器的有用示例。 + +### 从命令行发送邮件 ### + +作为第一个例子,让我们尝试最基本的邮件功能:使用Gmail SMTP服务器从命令行发送一封邮件。为此,我将使用一个称为mutt的命令行邮件客户端。 + +先安装mutt: + +对于 Debian-based 系统: + + $ sudo apt-get install mutt + +对于 Red Hat based 系统: + + $ sudo yum install mutt + +创建一个mutt配置文件(~/.muttrc),并和下面一样,在文件中指定Gmail SMTP服务器信息。将gmail-id替换成自己的Gmail ID。注意这配置只是为了发送邮件而已(而非接收邮件)。 + + $ vi ~/.muttrc + +---------- + + set from = "@gmail.com" + set realname = "Dan Nanni" + set smtp_url = "smtp://@smtp.gmail.com:587/" + set smtp_pass = "" + +现在准备使用mutt发送一封邮件: + + $ echo "This is an email body." | mutt -s "This is an email subject" alice@yahoo.com + +为了在一封邮件中添加一个附件,使用"-a"选项 + + $ 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) + +使用Gmail SMTP服务器意味着邮件显示为从你的Gmail账户发出。换句话说,一个接收者将你的Gmail地址视为发送者地址。如果你想要使用自己的域名作为邮件发送者,你需要使用Gmail SMTP转发服务。 + +### 当服务器重启时发送邮件通知 ### + +如果你为了一些重要的网站正在运行一台[虚拟专用服务器(VPS)][5],一个建议是监视VPS的重启活动。作为一个更实用的例子,让我们研究如何在你的VPS上为每一次重启事件建立邮件通知。这里我假设你正在你的VPS上使用systemd,并向你展示如何为自动邮件通知创建一个自定义的systemd启动服务。 + +首先创建下面的脚本reboot_notify.sh,用于负责邮件通知。 + + $ 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 + +在这个脚本中,我使用"-F"选项,用于直到系统级的mutt配置文件位置。因此不要忘了创建/etc/muttrc文件并如前面描述填入Gmail SMTP信息。 + +现在让我们创建如下一个自定义的systemd服务。 + + $ 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 + +一旦创建服务,便使能和启动该服务。 + + $ sudo systemctl enable reboot-task + $ sudo systemctl start reboot-task + +从现在起,在每次VPS重启时你将会收到一封通知邮件。 + +![](https://c1.staticflickr.com/1/608/22241452923_2ace9cde2e_c.jpg) + +### 从服务器使用监控发送邮件通知 ### + +作为最后一个例子,让我展示一个称为[Monit][6]的现实生活的应用程序,这是一个极其有用的服务器监控应用程序。它附有广泛的[VPS][7]监控能力(比如CPU、内存、进程、文件系统),包括邮件通知能力。 + +如果你想要接收VPS上任何事件导致的且由Monit产生的邮件通知,你可以在Monit配置文件中添加以下SMTP信息。 + + 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 + +这是一个因为CPU负载超载而由Monit发送的邮件通知例子。 + +![](https://c1.staticflickr.com/1/566/22873764251_8fe66bfd16_c.jpg) + +### 总结 ### + +正如你能想象的,像Gmail一样,有许多中不同的方式使用免费的SMTP服务器。但再次说明,请牢记免费的SMTP服务器不适用于商业用途,仅仅适用于个人项目。如果你正在任一app中使用Gmail SMTP服务器,请自由分享你的用例。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/send-email-notifications-gmail-smtp-server-linux.html + +作者:[Dan Nanni][a] +译者:[cposture](https://github.com/cposture) +校对:[校对者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 From f69d2d164193fc1b5753a55ffccb0c8ea27cb4a6 Mon Sep 17 00:00:00 2001 From: cposture Date: Mon, 29 Feb 2016 19:54:16 +0800 Subject: [PATCH 1095/1710] =?UTF-8?q?=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160225 How to add open source experience to your resume.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20160225 How to add open source experience to your resume.md b/sources/tech/20160225 How to add open source experience to your resume.md index eee0d6aa23..73e22c2b8b 100644 --- a/sources/tech/20160225 How to add open source experience to your resume.md +++ b/sources/tech/20160225 How to add open source experience to your resume.md @@ -1,4 +1,3 @@ -【Translating by cposture 2016-02-25】 How to add open source experience to your resume ================================================== From 01b1c41bc687b2bcd26654d5a43ee8821e48f9e3 Mon Sep 17 00:00:00 2001 From: cposture Date: Mon, 29 Feb 2016 20:40:59 +0800 Subject: [PATCH 1096/1710] Translated by cposture --- ...ations using Gmail SMTP server on Linux.md | 157 ------------------ 1 file changed, 157 deletions(-) delete mode 100644 sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md 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 deleted file mode 100644 index 1ec6ddff27..0000000000 --- a/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md +++ /dev/null @@ -1,157 +0,0 @@ -【Translating by cposture 2016-02-28】 -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 From cece931e431327d5dc919267037a06b2ed379547 Mon Sep 17 00:00:00 2001 From: cposture Date: Tue, 1 Mar 2016 00:26:25 +0800 Subject: [PATCH 1097/1710] Translating by cposture --- sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index 99f1ceed04..f2e09b5c7a 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -1,3 +1,4 @@ +【Translating by cposture 2016-03-01】 * * * # GCC-Inline-Assembly-HOWTO From ccb535342afd9645c4af9ebcd5c4a8d141e63fed Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 1 Mar 2016 19:47:34 +0800 Subject: [PATCH 1098/1710] [translated]22 - The history of Android --- .../22 - The history of Android.md | 86 ------------------- .../22 - The history of Android.md | 84 ++++++++++++++++++ 2 files changed, 84 insertions(+), 86 deletions(-) delete mode 100644 sources/talk/The history of Android/22 - The history of Android.md create mode 100644 translated/talk/The history of Android/22 - The history of Android.md diff --git a/sources/talk/The history of Android/22 - The history of Android.md b/sources/talk/The history of Android/22 - The history of Android.md deleted file mode 100644 index fab3d8c087..0000000000 --- a/sources/talk/The history of Android/22 - The history of Android.md +++ /dev/null @@ -1,86 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -### Android 4.2, Jelly Bean—new Nexus devices, new tablet interface ### - -The Android Platform was rapidly maturing, and with Google hosting more and more apps in the Play Store, there was less and less that needed to go out in the OS update. Still, the relentless march of updates must continue, and in November 2012 Android 4.2 was released. 4.2 was still called "Jelly Bean," a nod to the relatively small amount of changes that were present in this release. - -![The LG-made Nexus 4 and Samsung-made Nexus 10.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/unnamed.jpg) -The LG-made Nexus 4 and Samsung-made Nexus 10. -Photo by Google/Ron Amadeo - -Along with Android 4.2 came two flagship devices, the Nexus 4 and the Nexus 10, both of which were sold direct by Google on the Play Store. The Nexus 4 applied the Nexus 7 strategy of a quality device at a shockingly low price and sold for $300 unlocked. The Nexus 4 had a quad-core 1.5 GHz Snapdragon S4 Pro, 2GB of RAM and a 4.7-inch 1280×768 LCD. Google's new flagship phone was manufactured by LG, and with the manufacturer switch came a focus on materials and build quality. The Nexus 4 had a glass front and back, and while you couldn't drop it, it was one of the nicest-feeling Android phones to date. The biggest downside to the Nexus 4 was the lack of LTE at a time when most phones, including the Verizon Galaxy Nexus, came with the faster modem. Still, demand for the Nexus 4 greatly exceeded Google's expectations—the launch rush crashed the Play Store Web site on launch day. The device sold out in under an hour. - -The Nexus 10 was Google's first 10-inch Nexus tablet. The highlight of the device was the 2560×1600 display, which was the highest resolution in its class. All those pixels were powered by a dual core, 1.7GHz Cortex A15 processor and 2GB of RAM. With each passing month, it's looking more and more like the Nexus 10 is the first and last 10-inch Nexus tablet. Usually these devices are upgraded every year, but the Nexus 10 is now 16 months old, and there's no sign of the new model on the horizon. Google is doing well with smaller-sized 7-inch tablets, and it seems content to let partners [like Samsung][1] explore the larger end of the tablet spectrum. - -![The new lock screen, wallpaper, and clock widget design.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/JBvsjb.jpg) -The new lock screen, wallpaper, and clock widget design. -Photo by Ron Amadeo - -4.2 brought lots of changes to the lock screen. The font was centered and used an extremely thick weight for the hour and a thin font for the minutes. The lock screen was now paginated and could be customized with widgets. Rather than a simple clock on the lock screen, users could replace it with another widget or add extra pages to the lock screen for more widgets. - -![The lock screen's add widget page, the list of widgets, the Gmail widget on the lock screen, and swiping over to the camera.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/locksc2reen.jpg) -The lock screen's add widget page, the list of widgets, the Gmail widget on the lock screen, and swiping over to the camera. -Photo by Ron Amadeo - -The lock screen now worked like a stripped-down version of the home screen. Page outlines would pop up on the left and right sides of the lock screen to hint to users that they could swipe to other pages with other widgets. Swiping to the left would show a simple blank page with a plus sign in the center, and tapping on it would bring up a list of widgets that were compatible with the lock screen. Lock screens were limited to one widget per page and could be expanded or collapsed by dragging up or down on the widget. The right-most page was reserved for the camera—a simple over would open the camera interface, but you weren't able to swipe back. - -![The new Quick Settings panel and a composite image of the app lineup.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/42fix.png) -The new Quick Settings panel and a composite image of the app lineup. -Photo by Ron Amadeo - -One of the biggest additions to 4.2 was the new "Quick Settings" panel. Android 3.0 brought a way to quickly change power settings to tablets, and 4.2 finally brought that ability to phones. A new icon was added to the top right corner of the notification panel that would switch between the normal list of notifications and the new quick settings screen. Quick Settings offered faster access to screen brightness, network connections, and battery and data usage without having to dig through the full settings screen. The top level settings button in Android 4.1 was removed, and a square was added to the Quick Settings screen for it. - -There were lots of changes to the app drawer and 4.2's lineup of apps and icons. Thanks to the wider aspect ratio of the Nexus 4 (5:3 vs 16:9 on the Galaxy Nexus), the app drawer on that device could now show a five-wide grid of icons. 4.2 replaced the stock browser with Google Chrome and the stock calendar with Google Calendar, both of which brought new icon designs. The Clock and Camera apps were revamped in 4.2, and new icons were part of the deal. "Google Settings" was a new app that offered shortcuts to all the existing Google Account settings around the OS, and it had a unified look with Google Search and the new Google+ icon. Google Maps got a new icon, and Google Latitude, which was part of Google Maps, was retired in favor of Google+ location. - -![The browser was replaced with Chrome, and the new camera interface with a full screen viewfinder.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/chroemcam.jpg) -The browser was replaced with Chrome, and the new camera interface with a full screen viewfinder. -Photo by Ron Amadeo - -The stock browser did its best Chrome imitation for a while—it took many cues from Chrome’s interface, many Chrome features, and was even using Chrome’s javascript engine—but by the time Android 4.2 rolled around, Google deemed the Android version of Chrome ready to replace the imitator. On the surface, it didn't seem like much of a difference; the interface looked different, and early versions of Chrome for Android didn't scroll as smoothly as the stock browser. Under the hood, though, everything was different. Development of Android's main browser was now handled by the Google Chrome team instead of being a side project of the Android team. Android's default browser moved from being a stagnant app tied to Android releases to a Play Store app that was continually updated. Today there is even a beta channel that receives several updates per month. - -The camera interface was redesigned. It was now a completely full-screen app, showing a live view of the camera and places controls on top of it. The layout aesthetic had a lot in common with the [camera design][2] of Android 1.5: minimal controls with a focus on the viewfinder output. The circle of controls in the center appeared when you either held your finger on the screen or pressed the circle icon in the bottom right corner. When holding your finger down, you could slide around to pick the options around the circle, often expanding out into a sub-menu. Releasing over a highlighted item would select it. This was clearly inspired by the Quick Controls in the Android 4.0 browser, but arranging the options in a circle meant your finger was almost always blocking part of the interface. - -![The clock app, which went from a two-screen app to a feature-packed, useful application.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/clock-1.jpg) -The clock app, which went from a two-screen app to a feature-packed, useful application. -Photo by Ron Amadeo - -The clock application was completely revamped, going from a simple two-screen alarm clock to a world clock, alarm, timer, and stopwatch. The clock app design was like nothing Google introduced before, with an ultra-minimal aesthetic and red highlights. It seemed to be an experiment for Google. Even several versions later, this design language seemed to be confined only to this app. - -The clock's time picker was particularly well-designed. It showed a simple number pad, and it would intelligently disable numbers that would result in an invalid time. It was also impossible to set an alarm time without implicitly selecting AM or PM, forever solving the problem of accidentally setting an alarm for 9pm instead of 9am. - -![The new system UI for tablets used a stretched-out phone interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/tablet2.jpg) -The new system UI for tablets used a stretched-out phone interface. -Photo by Ron Amadeo - -The most controversial change in Android 4.2 was made to the tablet UI, which switched from a unified single bottom system bar to a two-bar interface with a top status bar and bottom system bar. The new design unified the phone and tablet interfaces, but critics said it was a waste of space to stretch the phone interface to a 10-inch landscape tablet. Since the navigation buttons had the whole bottom bar to themselves now, they were centered, just like the phone interface. - -![Multiple users on a tablet, and the new gesture-driven keyboard.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-06-14.55.png) -Multiple users on a tablet, and the new gesture-driven keyboard. -Photo by Ron Amadeo - -On tablets, Android 4.2 brought support for multiple users. In the settings, a "Users" section was added, where you could manage users on a device. Setup was done from within each user account, where Android would keep separate settings, home screens, apps, and app data for each user. - -4.2 also added a new keyboard with swiping abilities. Rather than just tapping each individual letter, users could now keep a finger on the screen the whole time and just slide from letter to letter to type. - ----------- - -![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/22/ - -译者:[译者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/2014/01/hands-on-with-samsungs-notepro-and-tabpro-new-screen-sizes-and-magazine-ui/ -[2]:http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/22 - The history of Android.md b/translated/talk/The history of Android/22 - The history of Android.md new file mode 100644 index 0000000000..aabe79cfa1 --- /dev/null +++ b/translated/talk/The history of Android/22 - The history of Android.md @@ -0,0 +1,84 @@ +安卓编年史 +================================================================================ +### Android 4.2,果冻豆——全新 Nexus 设备,全新平板界面 ### + +安卓平台成熟的脚步越来越快,谷歌也将越来越多的应用托管到 Play 商店,需要通过系统更新来更新的应用越来越少。但是不间断的更新还是要继续的,2012 年 11 月,安卓 4.2 发布。4.2 还是叫做“果冻豆”,这个版本主要是一些少量变动。 + +![LG 生产的 Nexus 4 和三星生产的 Nexus 10。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/unnamed.jpg) +LG 生产的 Nexus 4 和三星生产的 Nexus 10。 +Google/Ron Amadeo 供图 + +和安卓 4.2 一同发布的还有两部旗舰设备,Nexus 4 和 Nexus 10,都由谷歌直接在 Play 商店出售。Nexus 4 使用了 Nexus 7 的策略,令人惊讶的低价和高质量,并且无锁设备售价 300 美元。Nexus 4 有一个 4 核 1.5GHz 骁龙 S4 Pro 处理器,2GB 内存以及 1280×768 分辨率 4.7 英寸 LCD 显示屏。谷歌的新旗舰手机由 LG 生产,并和制造商一起将关注点转向了材料和质量。Nexus 4 有着正反两面双面玻璃,这会让你爱不释手,他是有史以来触感最佳的安卓手机之一。Nexus 4 最大的缺点是没有 LTE 支持,那时候大部分手机,包括 Version Galaxy Nexus 都有更快的基带。但 Nexus 4 的需求仍大大超出了谷歌的预料——发布当日大量的流量拖垮了 Play 商店网站。手机在一小时之内销售一空。 + +Nexus 10 是谷歌的第一部 10 英寸 Nexus 平板。该设备的亮点是 2560×1600 分辨率的显示屏,在其等级上是分辨率最高的。这背后是双核 1.7GHz Cortex A15 处理器和 2GB 内存的强力支持。随着时间一个月一个月地流逝,Nexus 10 似乎逐渐成为了第一部也是最后一部 10 英寸 Nexus 平板。通常这些设备每年都升级,但 Nexus 10 至今面世 16 个月了,可预见的未来还没有新设备的迹象。谷歌在小尺寸的 7 英寸平板上做得很出色,它似乎更倾向于让[像三星][1]这样的合作伙伴探索更大的平板家族。 + +![新的锁屏,壁纸,以及时钟小部件设计。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/JBvsjb.jpg) +新的锁屏,壁纸,以及时钟小部件设计。 +Ron Amadeo 供图 + +4.2 为锁屏带来了很多变化。文字居中,并且对小时使用了较大的字重,对分钟使用了较细的字体。锁屏现在是分页的,可以自定义小部件。锁屏不仅仅是一个简单的时钟,用户还可以将其替换成其它小部件或者添加额外的页面和更多的小部件。 + +![锁屏的添加小部件页面,小部件列表,锁屏上的 Gmail 部件,以及滑动到相机。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/locksc2reen.jpg) +锁屏的添加小部件页面,小部件列表,锁屏上的 Gmail 部件,以及滑动到相机。 +Ron Amadeo 供图 + +锁屏现在就像是一个精简版的主屏幕。页面轮廓会显示在锁屏的左右两侧来提示用户可以滑动到有其他小部件的页面。向左滑动页面会显示一个中间带有加号的简单空白页面,点击加号会打开兼容锁屏的小部件列表。锁屏每个页面限制一个小部件,将小部件向上或向下拖动可以展开或收起。最右侧的页面保留给了相机——一个简单的滑动就能打开相机界面,但是你没办法滑动回来。 + +![新的快速设置面板以及内置应用集合。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/42fix.png) +新的快速设置面板以及内置应用集合。 +Ron Amadeo 供图 + +4.2 最大的新增特性之一就是“快速设置”面板。安卓 3.0 为平板引入了快速改变电源设置的途径,4.2 终于将这种能力带给了手机。通知中心右上角加入了一枚新图标,可以在正常的通知列表和新的快速设置之间切换。快速设置提供了对屏幕亮度,网络连接,电池以及数据用量更加快捷的访问,而不用打开完整的设置界面。安卓 4.1 中顶部的设置按钮移除掉了,快速设置中添加了一个按钮来替代它。 + +应用抽屉和 4.2 中的应用阵容有很多改变。得益于 Nexus 4 更宽的屏幕横纵比(5:3,Galaxy Nexus 是 16:9),应用抽屉可以显示一行五个应用图标的方阵。4.2 将自带的浏览器替换为了 Google Chrome,自带的日历换成了 Google Calendar,他们都带来了新的图标设计。时钟和相机应用在 4.2 中经过了重制,新的图标也是其中的一部分。“Google Settings”是个新应用,用于提供对系统范围内所有存在的谷歌账户设置的快捷方式,它有着和 Google Search 和 Google+ 图标一致的风格。谷歌地图拥有了新图标,谷歌纵横,以往是谷歌地图的一部分,作为对 Google+ location 的支持在这个版本退役。 + +![浏览器替换为 Chrome,带有全屏取景器的新相机界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/chroemcam.jpg) +浏览器替换为 Chrome,带有全屏取景器的新相机界面。 +Ron Amadeo 供图 + +原自带浏览器在一段时间内对 Chrome 的模仿上下了不少功夫——它引入了许多 Chrome 的界面元素,许多 Chrome 的特性,甚至还使用了 Chrome 的 javascript 引擎——但安卓 4.2 来临的时候,谷歌认为安卓版的 Chrome 已经准备好替代这个模仿者了。表面上看起来没有多大不同;界面看起来不一样,而且早期版本的 Chrome 安卓版滚动起来没有原浏览器顺畅。不过深层次来说,一切都不一样。安卓的主浏览器开发现在由 Google Chrome 团队负责,而不是作为安卓团队的子项目存在。安卓的默认浏览器从绑定安卓版本发布停滞不前的应用变成了不断更新的 Play 商店应用。现在甚至还有一个每个月接收一些更新的 beta 通道。 + +相机界面经过了重新设计。它现在完全是个全屏应用,显示摄像头的实时图像并且在上面显示控制选项。布局审美和安卓 1.5 的[相机设计][2]有很多共同之处:带对焦的最小化的控制放置在取景器显示之上。中间的控制环在你长按屏幕或点击右下角圆形按钮的时候显示。你的手指保持在屏幕上时,你可以滑动来选择环上的选项,通常是展开进入一个子菜单。在高亮的选项上释放手指选中它。这灵感很明显来自于安卓 4.0 浏览器中的快速控制,但是将选项安排在一个环上意味着你的手指几乎总会挡住一部分界面。 + +![时钟应用,从一个只有两个界面的应用变成功能强大,实用的应用。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/clock-1.jpg) +时钟应用,从一个只有两个界面的应用变成功能强大,实用的应用。 +Ron Amadeo 供图 + +时钟应用经过了完整的改造,从一个简单的两个界面的闹钟,到一个世界时钟,闹钟,定时器,以及秒表俱全。时钟应用的设计和谷歌之前引入的完全不同,有着极简审美和红色高亮。它看起来像是谷歌的一个试验。甚至是几个版本之后,这个设计语言似乎也仅限于这个应用。 + +时钟的时间选择器是经过特别精心设计的。它显示一个简单的数字盘,会智能地禁用会导致无效时间的数字。设置闹钟时间也不可能没有隐式选择选择的 AM 和 PM,永远地解决了不小心将 9am 的闹钟设置成 9pm 的问题。 + +![平板的新系统界面使用了延展版的手机界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/tablet2.jpg) +平板的新系统界面使用了延展版的手机界面。 +Ron Amadeo 供图 + +安卓 4.2 中最有争议的改变是平板界面,从单独一个统一的底部系统栏变成带有顶部状态栏和底部系统栏的双栏设计。新设计统一了手机和平板的界面,但批评人士说将手机界面延展到 10 英寸的横向平板上是浪费空间。因为导航按键现在拥有了整个底栏,所以他们像手机界面那样被居中。 + +![平板上的多用户,以及新的手势键盘。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-06-14.55.png) +平板上的多用户,以及新的手势键盘。 +Ron Amadeo 供图 + +在平板上,安卓 4.2 带来了多用户支持。在设置里,新增了“用户”部分,你可以在这里管理一台设备上的用户。设置在每个用户账户内完成,安卓会给每个用户保存单独的设置,主屏幕,应用以及应用数据。 + +4.2 还添加了有滑动输入能力的键盘。用户可以将手指一直保持在屏幕上,按顺序在字母按键上滑动来输入,而不用像以前那样一个一个字母单独地输入。 + +---------- + +![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/22/ + +译者:[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/2014/01/hands-on-with-samsungs-notepro-and-tabpro-new-screen-sizes-and-magazine-ui/ +[2]:http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 7114caea17111b6315cc7a83141b3f443f896f86 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 09:14:21 +0800 Subject: [PATCH 1099/1710] =?UTF-8?q?20160302-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ommercial Software Built On Open Source.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md diff --git a/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md b/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md new file mode 100644 index 0000000000..85ba752bfa --- /dev/null +++ b/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md @@ -0,0 +1,40 @@ +The Evolving Market for Commercial Software Built On Open Source +===================================================================== + +![](https://www.linux.com/images/stories/41373/Structure-event-photo.jpg) +>Attendees listen to a presentation during Structure at the UCSF Mission Bay Conference Center, where Structure Data 2016 will take place. Image credit: Structure Events. + +It's really hard to understate the impact of open source projects on the enterprise software market these days; open source integration became the norm so quickly we could be forgiven for missing the turning point. + +Hadoop, for example, changed more than just the world of data analysis. It gave rise to a new generation of data companies that created their own software around open source projects, tweaking and supporting that code as needed, much like how Red Hat embraced Linux in the 1990s and early 2000s. And this software is increasingly delivered over public clouds, rather than run on the buyer's own servers, enabling an amazing degree of operational flexibility but raising all sorts of new questions about licensing, support, and pricing. + +We've been following this closely over the years when putting together the lineup for our Structure Data conference, and Structure Data 2016 is no exception. The CEOs of three of the most important companies in big data operating around Hadoop -- Hortonworks, Cloudera and MapR -- will share the stage to discuss how they sell enterprise software and services around open source projects, generating cash while giving back to that community project at the same time. + +There was a time when making money on enterprise software was easier. Once purchased by a customer, a mega-package of software from an enterprise vendor turned into its own cash register, generating something close to lifetime income from maintenance contracts and periodic upgrades to software that became harder and harder to displace as it became the heart of a customer’s business. Customers grumbled about lock-in, but they didn't really have much of a choice if they wanted to make their workforce more productive. + +That is no longer the case. While an awful lot of companies are still stuck running immense software packages critical to their infrastructure, new projects are being deployed on cloud servers using open source technologies. This makes it much easier to upgrade one's capabilities without having to rip out a huge software package and reinstall something else, and it also allows companies to pay as they go, rather than paying for a bunch of features they'll never use. + +And there are a lot of customers who want to take advantage of open source projects without building and supporting a team of engineers to tweak one of those projects for their own unique needs. Those customers are willing to pay for software packages whose value is based on the delta between the open source projects and the proprietary features laid on top of that project. + +This is especially true for infrastructure-related software. Sure, your customers could install their own tweaks to a project like Hadoop or Spark or Node.js, but there's money to be made helping those customers out with a customizable package that lets them implement some of today's vital open source technologies without having to do all of the heavy lifting themselves. Just look at Structure Data 2016 presenters such as Confluent (Kafka), Databricks (Spark), and the Cloudera-Hortonworks-MapR (Hadoop) trio. + +There's certainly something to be said for having a vendor to yell at when things go wrong. If your engineers botch the implementation of an open source project, you've only yourself to blame. But If you contract with a company that is willing to guarantee certain performance and uptime metrics inside of a service-level agreement, you're willing to pay for support, guidance, and a chance to yell at somebody outside of your organization when inevitable problems crop up. + +The evolving market for commercial software on top of open source projects is something we've been tracking at Structure Data for years, and we urge you to join us in San Francisco March 9 and 10 if this is a topic near and dear to your heart. + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/enterprise/cloud-computing/889564-the-evolving-market-for-commercial-software-built-on-open-source- + +作者:[Tom Krazit ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/community/forums/person/70513 + + + + From 6eaeac207dccfd4d3dce37fa5e13b0b3d0555f65 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 09:20:47 +0800 Subject: [PATCH 1100/1710] =?UTF-8?q?20160302-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ites Imperiled by New Decryption Attack.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sources/tech/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md diff --git a/sources/tech/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md b/sources/tech/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md new file mode 100644 index 0000000000..3c73120fa4 --- /dev/null +++ b/sources/tech/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md @@ -0,0 +1,26 @@ +More than 11 Million HTTPS Websites Imperiled by New Decryption Attack +=========================================================================== + +![](https://www.linux.com/images/stories/66866/drown-explainer.jpg) + +Low-cost DROWN attack decrypts data in hours, works against TLS e-mail servers, too. + +More than 11 million websites and e-mail services protected by the [transport layer security protocol[[1] are vulnerable to a newly discovered, low-cost attack that decrypts sensitive communications in a matter of hours and in some cases almost immediately, an international team of researchers warned Tuesday. More than 81,000 of the top 1 million most popular Web properties are among the vulnerable HTTPS-protected sites. + +The attack works against TLS-protected communications that rely on the [RSA cryptosystem][2] when the key is exposed even indirectly through SSLv2, a TLS precursor that was retired almost two decades ago because of crippling weaknesses. The vulnerability allows an attacker to decrypt an intercepted TLS connection by repeatedly using SSLv2 to make connections to a server. + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/software/applications/889455--more-than-11-million-https-websites-imperiled-by-new-decryption-attack + +作者:[ArsTechnica][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/community/forums/person/112 +[1]: https://en.wikipedia.org/wiki/Transport_Layer_Security +[2]: https://en.wikipedia.org/wiki/RSA_(cryptosystem) + From 8dbeefa384f670487801e13a56e8132c5bee2e42 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 09:26:10 +0800 Subject: [PATCH 1101/1710] =?UTF-8?q?20160302-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n IoT Development Suite, is now Zerynth.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md diff --git a/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md b/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md new file mode 100644 index 0000000000..40a601a71e --- /dev/null +++ b/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md @@ -0,0 +1,34 @@ +Viper, the Python IoT Development Suite, is now Zerynth +============================================================ + + +![](http://www.open-electronics.org/wp-content/uploads/2016/02/Logo_Zerynth-636x144.png) + + +The startup that launched the tools to develop embedded solutions in Python language announced the brand change along with the first official release. + +>Exactly one year after the Kickstarter launch of the suite for developing Internet of Things solutions in Python language, **Viper becomes Zerynth**. It is definitely a big day for the startup that created a radically new way to approach the world of microcontrollers and connected devices, making professionals and makers able to design interactive solutions with reduced efforts and shorter time. + +>“We really believe in the uniqueness of our tools, this is why they deserve an adequate recognition. Viper was a great name for a product, but other notable companies had the same feeling many decades ago, with the result that this term was shared with too many other actors out there. We are grown now, and ready to take off fast and light, like the design processes that our tools are enabling”, says the Viper (now Zerynth), co-founders. + +>**Thousands of users** developed amazing connected solutions in just 9 months of life in Beta version. Built to be cross-platform, Zerynth’s tools are meant for high-level design of Internet/cloud-connected devices, interactive objects, artistic installations. They are: **Zerynth Studio**, a browser-based IDE for programming embedded devices in Python with cloud sync and board management features; **Zerynth Virtual Machine**: a multithreaded real-time OS that provides real hardware independence allowing code reuse on the entire ARM architecture; **Zerynth App**, a general purpose interface that turns any mobile into the controller and display for smart objects and IoT systems. + +>This modular set of tools, adaptable to different hardware and cloud infrastructures, can dramatically reduce the time to market and the overall development costs for makers, professionals and companies. + +>Now Zerynth celebrates its new name launching the **first official release** of the toolkit. Check it here [www.zerynth.com][1] + +![](http://www.open-electronics.org/wp-content/uploads/2016/02/Zerynth-Press-Release_Studio-Img-768x432.png) + +-------------------------------------------------------------------------------- + +via: http://www.open-electronics.org/viper-the-python-iot-development-suite-is-now-zerynth/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+OpenElectronics+%28Open+Electronics%29 + +作者:[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.open-electronics.org/author/staff/ +[1]: http://www.zerynth.com/ + From 5ffe9ac893bc91d5996bbdc8be64701693d7ab8a Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 09:32:22 +0800 Subject: [PATCH 1102/1710] =?UTF-8?q?20160302-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-Signatures-Using-SHA-256512 Algorithms.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md diff --git a/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md new file mode 100644 index 0000000000..d40a1c9e6f --- /dev/null +++ b/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md @@ -0,0 +1,32 @@ +OpenSSH 7.2 Out Now with Support for RSA Signatures Using SHA-256/512 Algorithms +======================================================== + +**Today, February 29, 2016, the OpenBSD project had the great pleasure of announcing the release and immediate availability for download of OpenSSH 7.2 for all supported platforms.** + +According to the internal [release notes][1], also attached at the end of the article for reference, OpenSSH 7.2 is primarily a bugfix release, fixing most of the issues reported by users or discovered by the development team since the release of OpenSSH 7.1p2, but we can see several new features as well. + +Among these, we can mention support for RSA signatures using SHA-256 or SHA-256 512 hash algorithms, the addition of an AddKeysToAgent client option to add private keys used for authentication to the ssh-agent, and the implementation of the "restrict" authorized_keys option for storing key restrictions. + +Furthermore, there's now an ssh_config CertificateFile option for explicitly listing certificates, the ssh-keygen is now capable of changing the key comment for all supported formats, fingerprinting is now allowed from standard input and for multiple public keys in a file. + +### ssh-keygen now supports multiple certificates + +In addition to the changes mentioned above, OpenSSH 7.2 adds support for multiple certificates to ssh-keygen, one per line, implements the "none" argument for sshd_config ChrootDirectory and Foreground, and the "-c" flag allows ssh-keyscan to fetch certificates instead of plain keys. + +Last but not least, OpenSSH 7.2 no longer enables by default all flavors of the rijndael-cbc aliases for AES, blowfish-cbc, and cast128-cbc legacy ciphers, as well as MD5-based and truncated HMAC algorithms. The getrandom() syscall is now supported under Linux. [Download OpenSSH 7.2][2] and check the changelog below for some additional details about exactly what has been fixed in this major release. + + + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.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.openssh.com/txt/release-7.2 +[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml From d6bb51f8a4eda54c02b5af26662311215bdb9741 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 09:37:07 +0800 Subject: [PATCH 1103/1710] =?UTF-8?q?2060302-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ased ahead of impending OpenSSL updates.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sources/news/20160229 Node.js 5.7 released ahead of impending OpenSSL updates.md diff --git a/sources/news/20160229 Node.js 5.7 released ahead of impending OpenSSL updates.md b/sources/news/20160229 Node.js 5.7 released ahead of impending OpenSSL updates.md new file mode 100644 index 0000000000..659df2e1f3 --- /dev/null +++ b/sources/news/20160229 Node.js 5.7 released ahead of impending OpenSSL updates.md @@ -0,0 +1,42 @@ +Node.js 5.7 released ahead of impending OpenSSL updates +============================================================= + +![](http://images.techhive.com/images/article/2014/09/nodejs-100449932-primary.idge.jpg) + +>Once again, OpenSSL fixes must be evaluated by keepers of the popular server-side JavaScript platform + +The Node.js Foundation is gearing up this week for fixes to OpenSSL that could mean updates to Node.js itself. + +Releases to OpenSSL due on Tuesday will fix defects deemed to be of "high" severity, Rod Vagg, foundation technical steering committee director, said [in a blog post][1] on Monday. Within a day of the OpenSSL releases, the Node.js crypto team will assess their impacts, saying, "Please be prepared for the possibility of important updates to Node.js v0.10, v0.12, v4 and v5 soon after Tuesday, the 1st of March." + +[ Deep Dive: [How to rethink security for the new world of IT][2]. | Discover how to secure your systems with InfoWorld's [Security newsletter][3]. ] + +The high severity status actually means the issues are of lower risks than critical, perhaps affecting less-common configurations or less likely to be exploitable. Due to an embargo, the exact nature of these fixes and their impact on Node.js remain uncertain, said Vagg. "Node.js v0.10 and v0.12 both use OpenSSL v1.0.1, and Node.js v4 and v5 both use OpenSSL v1.0.2, and releases from nodejs.org and some other popular distribution sources are statically compiled. Therefore, all active release lines are impacted by this update." OpenSSL also impacted Node.js in December, [when two critical vulnerabilities were fixed][4]. + +The latest OpenSSL developments follow [the release of Node.js 5.7.0][5], which is clearing a path for the upcoming Node.js 6. Version 5 is the main focus for active development, said foundation representative Mikeal Rogers, "However, v5 won't be supported long-term, and most users will want to wait for v6, which will be released by the end of April, for the new features that are landing in v5." + +Release 5.7 has more predictability for C++ add-ons' interactions with JavaScript. Node.js can invoke JavaScript code from C++ code, and in version 5.7, the C++ node::MakeCallback() API is now re-entrant; calling it from inside another MakeCallback() call no longer causes the nextTick queue or Promises microtask queue to be processed out of order, [according to release notes][6]. + +Also fixed is an HTTP bug where handling headers mistakenly trigger an "upgrade" event where the server just advertises protocols. The bug can prevent HTTP clients from communicating with HTTP2-enabled servers. Version 5.7 performance improvements are featured in the path, querystring, streams, and process.nextTick modules. + +This story, "Node.js 5.7 released ahead of impending OpenSSL updates" was originally published by [InfoWorld][7]. + + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/3039005/security/nodejs-57-released-ahead-of-impending-openssl-updates.html + +作者:[Paul Krill][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/Paul-Krill/ +[1]: https://nodejs.org/en/blog/vulnerability/openssl-march-2016/ +[2]: http://www.infoworld.com/resources/17273/security-management/how-to-rethink-security-for-the-new-world-of-it#tk.ifw-infsb +[3]: http://www.infoworld.com/newsletters/signup.html#tk.ifw-infsb +[4]: http://www.infoworld.com/article/3012157/security/why-nodejs-waited-for-openssl-security-update-before-patching.html +[5]: https://nodejs.org/en/blog/release/v5.7.0/ +[6]: https://nodejs.org/en/blog/release/v5.7.0/ +[7]: http://www.infoworld.com/ From 243529de979ed767d7de22befc6c2bc3786528b7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 10:31:06 +0800 Subject: [PATCH 1104/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=EF=BC=8C?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E6=94=BE=E5=88=B0news=20=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... HTTPS Websites Imperiled by New Decryption Attack.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) rename sources/{tech => news}/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md (59%) diff --git a/sources/tech/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md b/sources/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md similarity index 59% rename from sources/tech/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md rename to sources/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md index 3c73120fa4..6d9ae7f4e9 100644 --- a/sources/tech/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md +++ b/sources/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md @@ -1,21 +1,28 @@ More than 11 Million HTTPS Websites Imperiled by New Decryption Attack + +超过一千万个使用 https 的站点有可能收到新型的加密攻击的影响 =========================================================================== ![](https://www.linux.com/images/stories/66866/drown-explainer.jpg) Low-cost DROWN attack decrypts data in hours, works against TLS e-mail servers, too. +低成本的淹没攻击会在几个小时内完成解密操作,同时这也不利于采用了 TLS 的邮件服务器。 + More than 11 million websites and e-mail services protected by the [transport layer security protocol[[1] are vulnerable to a newly discovered, low-cost attack that decrypts sensitive communications in a matter of hours and in some cases almost immediately, an international team of researchers warned Tuesday. More than 81,000 of the top 1 million most popular Web properties are among the vulnerable HTTPS-protected sites. +一个国际研究小组在周二发出的警告说,超过 1100 万的网站和邮件服务采用了[传输层安全协议][1],以此来保护自己的服务,而这些都是处于一个新发现的、低成本的攻击的威胁之下,这种攻击会在几个小时内解密敏感的通信,在某些情况下甚至是立即解密。 1 百万个最流行的网站中有超过 81,000 个就处于这些受到威胁的 HTTPS 协议保护之下。 + The attack works against TLS-protected communications that rely on the [RSA cryptosystem][2] when the key is exposed even indirectly through SSLv2, a TLS precursor that was retired almost two decades ago because of crippling weaknesses. The vulnerability allows an attacker to decrypt an intercepted TLS connection by repeatedly using SSLv2 to make connections to a server. +处于 TLS 保护的通信协议,依赖于 [RSA 加密系统][2],如果密钥被泄露了,即使是间接的通过 SSLv2 ——一种在 20 年前就因为自身缺陷而退休了的安全协议,也就是 TLS 的前辈协议——泄露也会处于这种新型攻击的威胁之下。这种危险性在于允许一个入侵者通过反复的使用 SSLv2 来连接到服务器,可以解密一个被中途拦截下来的 TLS 连接。 -------------------------------------------------------------------------------- via: https://www.linux.com/news/software/applications/889455--more-than-11-million-https-websites-imperiled-by-new-decryption-attack 作者:[ArsTechnica][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 c0a8fa7b54d4eca685570cda7ca39beea7863a36 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 10:32:30 +0800 Subject: [PATCH 1105/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E6=94=BE=E5=88=B0=20translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lion HTTPS Websites Imperiled by New Decryption Attack.md | 5 ----- 1 file changed, 5 deletions(-) rename {sources => translated}/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md (66%) diff --git a/sources/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md b/translated/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md similarity index 66% rename from sources/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md rename to translated/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md index 6d9ae7f4e9..cdc7d1b7ae 100644 --- a/sources/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md +++ b/translated/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md @@ -1,19 +1,14 @@ -More than 11 Million HTTPS Websites Imperiled by New Decryption Attack - 超过一千万个使用 https 的站点有可能收到新型的加密攻击的影响 =========================================================================== ![](https://www.linux.com/images/stories/66866/drown-explainer.jpg) -Low-cost DROWN attack decrypts data in hours, works against TLS e-mail servers, too. 低成本的淹没攻击会在几个小时内完成解密操作,同时这也不利于采用了 TLS 的邮件服务器。 -More than 11 million websites and e-mail services protected by the [transport layer security protocol[[1] are vulnerable to a newly discovered, low-cost attack that decrypts sensitive communications in a matter of hours and in some cases almost immediately, an international team of researchers warned Tuesday. More than 81,000 of the top 1 million most popular Web properties are among the vulnerable HTTPS-protected sites. 一个国际研究小组在周二发出的警告说,超过 1100 万的网站和邮件服务采用了[传输层安全协议][1],以此来保护自己的服务,而这些都是处于一个新发现的、低成本的攻击的威胁之下,这种攻击会在几个小时内解密敏感的通信,在某些情况下甚至是立即解密。 1 百万个最流行的网站中有超过 81,000 个就处于这些受到威胁的 HTTPS 协议保护之下。 -The attack works against TLS-protected communications that rely on the [RSA cryptosystem][2] when the key is exposed even indirectly through SSLv2, a TLS precursor that was retired almost two decades ago because of crippling weaknesses. The vulnerability allows an attacker to decrypt an intercepted TLS connection by repeatedly using SSLv2 to make connections to a server. 处于 TLS 保护的通信协议,依赖于 [RSA 加密系统][2],如果密钥被泄露了,即使是间接的通过 SSLv2 ——一种在 20 年前就因为自身缺陷而退休了的安全协议,也就是 TLS 的前辈协议——泄露也会处于这种新型攻击的威胁之下。这种危险性在于允许一个入侵者通过反复的使用 SSLv2 来连接到服务器,可以解密一个被中途拦截下来的 TLS 连接。 From a9d0940aed3bc389317173edf15fdee5a76201e3 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 10:39:38 +0800 Subject: [PATCH 1106/1710] =?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 --- .../20160226 Development Release: Xubuntu 16.04 Beta 1.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md index 62e903018f..bae1ecccf8 100644 --- a/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md +++ b/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md @@ -1,9 +1,9 @@ Xubuntu 16.04 Beta 1 开发发布 ============================================ -Ubuntu 发布组已经宣布为了选定的社区版本准备的最新的 beta 测试镜像已经可以使用了。新的开发发布版名称是 16.04 beta 1,这个版本只推荐给测试人员,并不适合日常使用。 +Ubuntu 发布组宣布为选定的社区版本而准备的最新的 beta 测试镜像已经可以使用了。新的发布版名称是 16.04 beta 1 ,这个版本只推荐给测试人员测试用,并不适合普通人进行日常使用。 -“这个 beta 特性的镜像是为 [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] 和 [Xubuntu][6] 这几个发布版准备的。Xenial Xerus 的预发布版本并不推荐那些需要稳定版本的,或者那些不希望在系统运行中偶尔或频繁的出现 bug 的人。这个版本还是推荐给喜欢 ubuntu 的开发人员,以及那些想帮助着测试、报告和修改 bug,和我们一起工作让这个发布版本早日准备好。” 更多的信息可以从 [发布日志][7] 获取。 +“这个 beta 特性的镜像主要是为 [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] 和 [Xubuntu][6] 这几个发布版准备的。Xenial Xerus (LCTT 注: ubuntu 16.04 的开发代号) 的这个预发布版本并不推荐那些需要稳定版本的人员使用,同时那些不希望在系统运行中偶尔或频繁的出现 bug 的人也不建议使用这个版本。这个版本主要还是推荐给那些喜欢 ubuntu 的开发人员,以及那些想协助我们测试、报告 bug 和修改 bug 的人使用,和我们一起努力让这个发布版本早日准备就绪。” 更多的信息可以从 [发布日志][7] 获取。 -------------------------------------------------------------------------------- @@ -11,7 +11,7 @@ via: https://www.linux.com/news/software/applications/888731-development-release 作者:[DistroWatch][a] 译者:[Ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Ezio](https://github.com/oska874) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 84a9cd948715593113a28b135fd0e6c1bb65784a Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 2 Mar 2016 10:40:23 +0800 Subject: [PATCH 1107/1710] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=87=86=E5=A4=87?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160226 Development Release: Xubuntu 16.04 Beta 1.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/news => published}/20160226 Development Release: Xubuntu 16.04 Beta 1.md (100%) diff --git a/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/published/20160226 Development Release: Xubuntu 16.04 Beta 1.md similarity index 100% rename from translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md rename to published/20160226 Development Release: Xubuntu 16.04 Beta 1.md From b342f53e0868c9db39bd70dc7898906e60e70999 Mon Sep 17 00:00:00 2001 From: runningwater Date: Wed, 2 Mar 2016 11:23:05 +0800 Subject: [PATCH 1108/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20ru?= =?UTF-8?q?nningwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- published/20160226 Development Release | 0 ... Viper, the Python IoT Development Suite, is now Zerynth.md | 3 ++- translated/news/20160226 Development Release | 0 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 published/20160226 Development Release create mode 100644 translated/news/20160226 Development Release diff --git a/published/20160226 Development Release b/published/20160226 Development Release new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md b/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md index 40a601a71e..f732382bc6 100644 --- a/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md +++ b/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) Viper, the Python IoT Development Suite, is now Zerynth ============================================================ @@ -24,7 +25,7 @@ The startup that launched the tools to develop embedded solutions in Python lang via: http://www.open-electronics.org/viper-the-python-iot-development-suite-is-now-zerynth/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+OpenElectronics+%28Open+Electronics%29 作者:[Staff ][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/) 荣誉推出 diff --git a/translated/news/20160226 Development Release b/translated/news/20160226 Development Release new file mode 100644 index 0000000000..e69de29bb2 From bef55ccf97cb52b732672e3a88a51188d01ddae8 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 2 Mar 2016 23:57:24 +0800 Subject: [PATCH 1109/1710] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第一次校对,发布前再看看是否有错漏。 --- ...ites Imperiled by New Decryption Attack.md | 25 +++++++++++++++++ ...ites Imperiled by New Decryption Attack.md | 28 ------------------- 2 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 published/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md delete mode 100644 translated/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md diff --git a/published/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md b/published/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md new file mode 100644 index 0000000000..d3270ac88e --- /dev/null +++ b/published/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md @@ -0,0 +1,25 @@ +逾千万使用 https 的站点受到新型解密攻击的威胁 +=========================================================================== + +![](https://www.linux.com/images/stories/66866/drown-explainer.jpg) + + +低成本的 DROWN 攻击能在数小时内完成数据解密,对采用了 TLS 的邮件服务器也同样奏效。 + +一国际研究小组于周二发出警告,据称逾 1100 万家网站和邮件服务采用的用以保证服务安全的[传输层安全协议][1],对于一种新发现的、成本低廉的攻击而言异常脆弱,这种攻击会在几个小时内解密敏感的通信,在某些情况下解密甚至能瞬间完成。 1 百万家最为流行的网站中有超过 81,000 家正处于这些脆弱的 HTTPS 协议的保护之下。 + +这种攻击主要针对受 TLS 保护、依赖于 [RSA 加密系统][2]的通信。如果密钥泄露了,即使是间接的由 SSLv2,一种在 20 年前就因为自身缺陷而退休了的 LTS 前辈。该漏洞允许攻击者,可以通过反复使用 SSLv2 创建与服务器连接的方式,解密截获的 TLS 连接。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/software/applications/889455--more-than-11-million-https-websites-imperiled-by-new-decryption-attack + +作者:[ArsTechnica][a] +译者:[Ezio](https://github.com/oska874) +校对:[martin2011qi](https://github.com/martin2011qi) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/community/forums/person/112 +[1]: https://en.wikipedia.org/wiki/Transport_Layer_Security +[2]: https://en.wikipedia.org/wiki/RSA_(cryptosystem) diff --git a/translated/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md b/translated/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md deleted file mode 100644 index cdc7d1b7ae..0000000000 --- a/translated/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md +++ /dev/null @@ -1,28 +0,0 @@ -超过一千万个使用 https 的站点有可能收到新型的加密攻击的影响 -=========================================================================== - -![](https://www.linux.com/images/stories/66866/drown-explainer.jpg) - - -低成本的淹没攻击会在几个小时内完成解密操作,同时这也不利于采用了 TLS 的邮件服务器。 - - -一个国际研究小组在周二发出的警告说,超过 1100 万的网站和邮件服务采用了[传输层安全协议][1],以此来保护自己的服务,而这些都是处于一个新发现的、低成本的攻击的威胁之下,这种攻击会在几个小时内解密敏感的通信,在某些情况下甚至是立即解密。 1 百万个最流行的网站中有超过 81,000 个就处于这些受到威胁的 HTTPS 协议保护之下。 - - -处于 TLS 保护的通信协议,依赖于 [RSA 加密系统][2],如果密钥被泄露了,即使是间接的通过 SSLv2 ——一种在 20 年前就因为自身缺陷而退休了的安全协议,也就是 TLS 的前辈协议——泄露也会处于这种新型攻击的威胁之下。这种危险性在于允许一个入侵者通过反复的使用 SSLv2 来连接到服务器,可以解密一个被中途拦截下来的 TLS 连接。 - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/software/applications/889455--more-than-11-million-https-websites-imperiled-by-new-decryption-attack - -作者:[ArsTechnica][a] -译者:[Ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/community/forums/person/112 -[1]: https://en.wikipedia.org/wiki/Transport_Layer_Security -[2]: https://en.wikipedia.org/wiki/RSA_(cryptosystem) - From 54c5c2f669f2b9d4a2b1c843467855996289da85 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 3 Mar 2016 00:11:04 +0800 Subject: [PATCH 1110/1710] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E8=AF=B7=E5=8F=91=E5=B8=83=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1 Million HTTPS Websites Imperiled by New Decryption Attack.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename published/{news => }/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md (100%) diff --git a/published/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md b/published/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md similarity index 100% rename from published/news/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md rename to published/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md From 91f16a64344aee942079e824c481bcbe57cd1902 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Thu, 3 Mar 2016 00:36:53 +0800 Subject: [PATCH 1111/1710] [Translated]20151208 5 great Raspberry Pi projects for the classroom.md --- ...Raspberry Pi projects for the classroom.md | 98 ------------------- ...Raspberry Pi projects for the classroom.md | 98 +++++++++++++++++++ 2 files changed, 98 insertions(+), 98 deletions(-) delete mode 100644 sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md create mode 100644 translated/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md diff --git a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md deleted file mode 100644 index 09423a6b8d..0000000000 --- a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md +++ /dev/null @@ -1,98 +0,0 @@ -FSSlc translating - -5 great Raspberry Pi projects for the classroom -================================================================================ -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png) - -Image by : opensource.com - -### 1. Minecraft Pi ### - -Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0.][1] - -Minecraft is the favorite game of pretty much every teenager in the world—and it's one of the most creative games ever to capture the attention of young people. The version that comes with every Raspberry Pi is not only a creative thinking building game, but comes with a programming interface allowing for additional interaction with the Minecraft world through Python code. - -Minecraft: Pi Edition is a great way for teachers to engage students with problem solving and writing code to perform tasks. You can use the Python API to build a house and have it follow you wherever you go, build a bridge wherever you walk, make it rain lava, show the temperature in the sky, and anything else your imagination can create. - -Read more in "[Getting Started with Minecraft Pi][2]." - -### 2. Reaction game and traffic lights ### - -![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg) - -Courtesy of [Low Voltage Labs][3]. [CC BY-SA 4.0][1]. - -It's really easy to get started with physical computing on Raspberry Pi—just connect up LEDs and buttons to the GPIO pins, and with a few lines of code you can turn lights on and control things with button presses. Once you know the code to do the basics, it's down to your imagination as to what you do next! - -If you know how to flash one light, you can flash three. Pick out three LEDs in traffic light colors and you can code the traffic light sequence. If you know how to use a button to a trigger an event, then you have a pedestrian crossing! Also look out for great pre-built traffic light add-ons like [PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6], and more. - -It's not always about the code—this can be used as an exercise in understanding how real world systems are devised. Computational thinking is a useful skill in any walk of life. - -![](https://opensource.com/sites/default/files/reaction-game.png) - -Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1]. - -Next, try wiring up two buttons and an LED and making a two-player reaction game—let the light come on after a random amount of time and see who can press the button first! - -To learn more, check out "[GPIO Zero recipes][7]. Everything you need is in [CamJam EduKit 1][8]. - -### 3. Sense HAT Pixel Pet ### - -The Astro Pi—an augmented Raspberry Pi—is going to space this December, but you haven't missed your chance to get your hands on the hardware. The Sense HAT is the sensor board add-on used in the Astro Pi mission and it's available for anyone to buy. You can use it for data collection, science experiments, games and more. Watch this Gurl Geek Diaries video from Raspberry Pi's Carrie Anne for a great way to get started—by bringing to life an animated pixel pet of your own design on the Sense HAT display: - -注:youtube 视频 - - -Learn more in "[Exploring the Sense HAT][9]." - -### 4. Infrared bird box ### - -![](https://opensource.com/sites/default/files/ir-bird-box.png) -Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0.][1] - -A great exercise for the whole class to get involved with—place a Raspberry Pi and the NoIR camera module inside a bird box along with some infra-red lights so you can see in the dark, then stream video from the Pi over the network or on the internet. Wait for birds to nest and you can observe them without disturbing them in their habitat. - -Learn all about infrared and the light spectrum, and how to adjust the camera focus and control the camera in software. - -Learn more in "[Make an infrared bird box.][10]" - -### 5. Robotics ### - -![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg) - -Courtesy of Low Voltage Labs. [CC BY-SA 4.0][1]. - -With a Raspberry Pi and as little as a couple of motors and a motor controller board, you can build your own robot. There is a vast range of robots you can make, from basic buggies held together by sellotape and a homemade chassis, all the way to self-aware, sensor-laden metallic stallions with camera attachments driven by games controllers. - -Learn how to control individual motors with something straightforward like the RTK Motor Controller Board (£8/$12), or dive into the new CamJam robotics kit (£17/$25) which comes with motors, wheels and a couple of sensors—great value and plenty of learning potential. - -Alternatively, if you'd like something more hardcore, try PiBorg's [4Borg][11] (£99/$150) or [DiddyBorg][12] (£180/$273) or go the whole hog and treat yourself to their DoodleBorg Metal edition (£250/$380)—and build a mini version of their infamous [DoodleBorg tank][13] (unfortunately not for sale). - -Check out the [CamJam robotics kit worksheets][14]. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom - -作者:[Ben Nuttall][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/bennuttall -[1]:https://creativecommons.org/licenses/by-sa/4.0/ -[2]:https://opensource.com/life/15/5/getting-started-minecraft-pi -[3]:http://lowvoltagelabs.com/ -[4]:http://lowvoltagelabs.com/products/pi-traffic/ -[5]:http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390 -[6]:https://ryanteck.uk/hats/1-traffichat-0635648607122.html -[7]:http://pythonhosted.org/gpiozero/recipes/ -[8]:http://camjam.me/?page_id=236 -[9]:https://opensource.com/life/15/10/exploring-raspberry-pi-sense-hat -[10]:https://www.raspberrypi.org/learning/infrared-bird-box/ -[11]:https://www.piborg.org/4borg -[12]:https://www.piborg.org/diddyborg -[13]:https://www.piborg.org/doodleborg -[14]:http://camjam.me/?page_id=1035#worksheets diff --git a/translated/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/translated/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md new file mode 100644 index 0000000000..06191d551c --- /dev/null +++ b/translated/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md @@ -0,0 +1,98 @@ +5 个适合课堂教学的树莓派项目 +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png) + +图片来源 : opensource.com + +### 1. Minecraft Pi ### + +![](https://opensource.com/sites/default/files/lava.png) + +上图由树莓派基金会提供。遵循 [CC BY-SA 4.0.][1] 协议。 + +Minecraft(我的世界)几乎是世界上每个青少年都极其喜爱的游戏 —— 在吸引年轻人注意力方面,它也是最具创意的游戏之一。伴随着每一个树莓派的游戏版本不仅仅是一个关于创造性思维的建筑游戏,它还带有一个编程接口,允许使用者通过 Python 代码来与 Minecraft 世界进行互动。 + +对于教师来说,Minecraft: Pi 版本是一个鼓励学生们解决遇到的问题以及通过书写代码来执行特定任务的极好方式。你可以使用 Python API + 来建造一所房子,让它跟随你到任何地方;或在你所到之处修建一座桥梁;又或者是下一场岩溶雨;或在天空中显示温度;以及其他任何你能想像到的事物。 + +可在 "[Minecraft Pi 入门][2]" 中了解更多相关内容。 + +### 2. 反应游戏和交通指示灯 ### + +![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg) + +上图由 [Low Voltage Labs][3] 提供。遵循 [CC BY-SA 4.0][1] 协议。 + +在树莓派上进行物理计算是非常容易的 —— 只需将 LED 灯 和按钮连接到 GPIO 针脚上,再加上少量的代码,你就可以点亮 LED 灯并通过按按钮来控制物体。一旦你知道来执行基本操作的代码,下一步就可以随你的想像那样去做了! + +假如你知道如何让一盏灯闪烁,你就可以让三盏灯闪烁。选出三盏交通灯颜色的 LED 灯,你就可以编程出交通灯闪烁序列。假如你知道如何使用一个按钮来触发一个事件,然后你就有一个人行横道了!同时,你还可以找到诸如 [PI-TRAFFIC][4]、[PI-STOP][5]、[Traffic HAT][6] 等预先构建好的交通灯插件。 + +这不总是关于代码的 —— 它还可以被用来作为一个的练习,用以理解真实世界中的系统是如何被设计出来的。计算思维在生活中的各种情景中都是一个有用的技能。 + +![](https://opensource.com/sites/default/files/reaction-game.png) + +上图由树莓派基金会提供。遵循 [CC BY-SA 4.0][1] 协议。 + +下面尝试将两个按钮和一个 LED 灯连接起来,来制作一个二人制反应游戏 —— 让灯在一段随机的时间中点亮,然后看谁能够先按到按钮! + +想了解更多的话,请查看 [GPIO 新手指南][7]。你所需要的尽在 [CamJam EduKit 1][8]。 + +### 3. Sense HAT 像素宠物 ### + +Astro Pi— 一个增强版的树莓派 —将于今年 12 月(注:应该是去年的事了。)问世,但你并没有错过让你的手玩弄硬件的机会。Sense HAT 是一个用在 Astro Pi 任务中的感应器主板插件,且任何人都可以买到。你可以用它来做数据收集、科学实验、游戏或者更多。 观看下面这个由树莓派的 Carrie Anne 带来的 Gurl Geek Diaries 录像来开始一段美妙的旅程吧 —— 通过在 Sense HAT 的显示器上展现出你自己设计的一个动物像素宠物: + +注:youtube 视频 + + +在 "[探索 Sense HAT][9]" 中可以学到更多。 + +### 4. 红外鸟箱 ### + +![](https://opensource.com/sites/default/files/ir-bird-box.png) +上图由 [Low Voltage Labs][3] 提供。遵循 [CC BY-SA 4.0][1] 协议。 + +让全班所有同学都能够参与进来的一个好的练习是 —— 在一个鸟箱中沿着某些红外线放置一个树莓派和 NoIR 照相模块,这样你就可以在黑暗中观看,然后通过网络或在网络中你可以从树莓派那里获取到视频流。等鸟进入笼子,然后你就可以在不打扰到它们的情况下观察它们。 + +在这期间,你可以学习到所有关于红外和光谱的知识,以及如何用软件来调整摄像头的焦距和控制它。 + +在 "[制作一个红外鸟箱][10]" 中你可以学到更多。 + +### 5. 机器人 ### + +![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg) + +上图由 Low Voltage Labs 提供。遵循 [CC BY-SA 4.0][1] 协议。 + +拥有一个树莓派,一些感应器和一个感应器控制电路板,你就可以构建你自己的机器人。你可以制作各种类型的机器人,从用透明胶带和自制底盘组合在一起的简易四驱车,一直到由游戏控制器驱动的具有自我意识,带有传感器和摄像头的金属马儿。 + +学习如何直接去控制单个的发动机,例如通过 RTK Motor Controller Board (£8/$12),或者尝试新的 CamJam robotics kit (£17/$25) ,它带有发动机、轮胎和一系列的感应器 — 这些都很有价值并很有学习的潜力。 + +另外,如何你喜欢更为骨灰级别的东西,可以尝试 PiBorg 的 [4Borg][11] (£99/$150) 或 [DiddyBorg][12] (£180/$273) 或者一干到底,享受他们的 DoodleBorg 金属版 (£250/$380) — 并构建一个他们声名远扬的 [DoodleBorg tank][13](很不幸的时,这个没有卖的) 的迷你版。 + +另外请参考 [CamJam robotics kit worksheets][14]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom + +作者:[Ben Nuttall][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/bennuttall +[1]:https://creativecommons.org/licenses/by-sa/4.0/ +[2]:https://opensource.com/life/15/5/getting-started-minecraft-pi +[3]:http://lowvoltagelabs.com/ +[4]:http://lowvoltagelabs.com/products/pi-traffic/ +[5]:http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390 +[6]:https://ryanteck.uk/hats/1-traffichat-0635648607122.html +[7]:http://pythonhosted.org/gpiozero/recipes/ +[8]:http://camjam.me/?page_id=236 +[9]:https://opensource.com/life/15/10/exploring-raspberry-pi-sense-hat +[10]:https://www.raspberrypi.org/learning/infrared-bird-box/ +[11]:https://www.piborg.org/4borg +[12]:https://www.piborg.org/diddyborg +[13]:https://www.piborg.org/doodleborg +[14]:http://camjam.me/?page_id=1035#worksheets From 2fd4968b580d73a74038c177a8a8873d0daddf78 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 3 Mar 2016 21:34:54 +0800 Subject: [PATCH 1112/1710] Verify --- ...send email notifications using Gmail SMTP server on Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md index 56830068ab..ce6174cefc 100644 --- a/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md +++ b/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md @@ -1,3 +1,5 @@ +Martin + 如何在Linux上使用Gmail SMTP服务器发送邮件通知 ================================================================================ 假定你想配置一个Linux app从你的服务器或桌面客户端发送邮件信息。邮件信息可以是邮件简报、状态更新(比如[Cachet][1])、监控警报(比如[Monit][2])、磁盘时间(比如[RAID mdadm][3])等等的一部分。当你要建立自己的[邮件发送服务器][4],作为一个免维护的选择,你可以依赖一个免费可用的公共SMTP服务器。 From 331a67dbaa08d9bb2f8714586271a43346d8e907 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 4 Mar 2016 01:02:10 +0800 Subject: [PATCH 1113/1710] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ations using Gmail SMTP server on Linux.md | 156 +++++++++++++++++ ...ations using Gmail SMTP server on Linux.md | 158 ------------------ 2 files changed, 156 insertions(+), 158 deletions(-) create mode 100644 published/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md delete mode 100644 translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md diff --git a/published/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/published/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md new file mode 100644 index 0000000000..20850869b1 --- /dev/null +++ b/published/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md @@ -0,0 +1,156 @@ +如何在 Linux 上使用 Gmail SMTP 服务器发送邮件通知 +================================================================================ +假定你想配置一个 Linux app,用于从你的服务器或桌面客户端发送邮件信息。邮件信息可能是部分的邮件简报、状态更新(如 [Cachet][1])、监控警报(如 [Monit][2])、磁盘时间(如 [RAID mdadm][3])等等。当你要建立自己的 [邮件发送服务器][4] 传递信息时 ,你可以依赖一个免费使用的公共 SMTP 服务器作为一个变通选项避免遭受维护之苦。 + +谷歌的 Gmail 服务就是最可靠的 **免费 SMTP 服务器** 之一。想要从 app 发送邮件通知,你仅需在 app 中添加 Gmail 的 SMTP 服务器地址和你的凭证即可。 + +选择 Gmail 的 SMTP 服务器的原因之一是各种各样恰当的限制,这些限制主要用于阻止那些经常滥用服务器来发送垃圾邮件和使用邮件营销的家伙。举个例子,你一次只能给至多 100 个地址发送信息,并且一天不能超过 500 个收件人。同样,如果你不想被标为垃圾邮件发送者,你就不能发送过多的不可投递的消息。当你达到任何一个限制,你的 Gmail 账户将被暂时的锁定一天。简而言之,Gmail 的 SMTP 服务器对于你个人的使用是非常棒的,但不适合商业的批量邮件。 + +说了这么多,是时候向你们展示 **如何在 Linux 环境下使用 Gmail 的 SMTP 服务器** 了。 + +### Google Gmail SMTP 服务器设置 ### + +如果你想要通过你的 app 使用 Gmail 的 SMTP 服务器发送邮件,请牢记接下来的详细说明。 + +- **邮件发送服务器 (SMTP 服务器)**: smtp.gmail.com +- **使用认证**: 是 +- **使用安全连接**: 是 +- **用户名**: 你的 Gmail 账户 ID (比如 "alice" 如果你的邮箱为 alice@gmail.com) +- **密码**: 你的 Gmail 密码 +- **端口**: 587 + +确切的配置根据 app 会有所不同。在本教程的剩余部分,我将向你展示一些在 Linux 上使用 Gmail SMTP 服务器的应用示例。 + +### 从命令行发送邮件 ### + +作为第一个例子,让我们尝试最基本的邮件功能:使用 Gmail SMTP 服务器从命令行发送一封邮件。为此,我将使用一个称为 mutt 的命令行邮件客户端。 + +先安装 mutt: + +对于 Debian-based 系统: + + $ sudo apt-get install mutt + +对于 Red Hat based 系统: + + $ sudo yum install mutt + +创建一个 mutt 配置文件(~/.muttrc),并和下面一样,在文件中指定 Gmail SMTP 服务器信息。将 替换成自己的 Gmail ID。注意该配置只是为了发送邮件而已(而非接收邮件)。 + + $ vi ~/.muttrc + +---------- + + set from = "@gmail.com" + set realname = "Dan Nanni" + set smtp_url = "smtp://@smtp.gmail.com:587/" + set smtp_pass = "" + +一切就绪使用 mutt 发送一封邮件: + + $ echo "This is an email body." | mutt -s "This is an email subject" alice@yahoo.com + +想在一封邮件中添加附件,使用 "-a" 选项 + + $ 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) + +使用 Gmail SMTP 服务器意味着邮件将显示是从你 Gmail 账户发出的。换句话说,收件人将视你的 Gmail 地址为发件人地址。如果你想要使用自己的域名作为邮件发送方,你需要使用 Gmail SMTP 转发服务。 + +### 当服务器重启时发送邮件通知 ### + +如果你在 [虚拟专用服务器(VPS)][5] 上跑了些重要的网站,建议要监控 VPS 的重启行为。作为一个更为实用的例子,让我们研究如何在你的 VPS 上为每一次重启事件建立邮件通知。这里假设你的 VPS 上使用的是 systemd,并向你展示如何为自动邮件通知创建一个自定义的 systemd 启动服务。 + +首先创建下面的脚本 reboot_notify.sh,用于负责邮件通知。 + + $ 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 + +在这个脚本中,我使用 "-F" 选项,用于指定系统级的 mutt 配置文件位置。因此不要忘了创建 /etc/muttrc 文件,并如前面描述的那样填入 Gmail SMTP 信息。 + +现在让我们创建如下一个自定义的 systemd 服务。 + + $ 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 + +在创建服务后,添加并启动该服务。 + + $ sudo systemctl enable reboot-task + $ sudo systemctl start reboot-task + +从现在起,在每次 VPS 重启时,你将会收到一封通知邮件。 + +![](https://c1.staticflickr.com/1/608/22241452923_2ace9cde2e_c.jpg) + +### 通过服务器使用监控发送邮件通知 ### + +作为最后一个例子,让我展示一个现实生活中的应用程序,[Monit][6],这是一款极其有用的服务器监控应用程序。它附有全面的 [VPS][7] 监控能力(比如 CPU、内存、进程、文件系统),和邮件通知功能。 + +如果你想要接收 VPS 上任何事件导致的且由 Monit 产生的邮件通知,你可以在 Monit 配置文件中添加以下 SMTP 信息。 + + 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 + +这是一个因为 CPU 负载超载而由 Monit 发送的邮件通知的例子。 + +![](https://c1.staticflickr.com/1/566/22873764251_8fe66bfd16_c.jpg) + +### 总结 ### + +如你所见,类似 Gmail 这样免费的 SMTP 服务器有着这么多不同的运用方式 。但再次重申,牢记免费的 SMTP 服务器不适用于商业用途,仅仅适用于个人项目。无论你正在任一款 app 中使用 Gmail SMTP 服务器,欢迎自由分享你的用例。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/send-email-notifications-gmail-smtp-server-linux.html + +作者:[Dan Nanni][a] +译者:[cposture](https://github.com/cposture) +校对:[martin2011qi](https://github.com/martin2011qi) + +本文由 [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 diff --git a/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md deleted file mode 100644 index ce6174cefc..0000000000 --- a/translated/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md +++ /dev/null @@ -1,158 +0,0 @@ -Martin - -如何在Linux上使用Gmail SMTP服务器发送邮件通知 -================================================================================ -假定你想配置一个Linux app从你的服务器或桌面客户端发送邮件信息。邮件信息可以是邮件简报、状态更新(比如[Cachet][1])、监控警报(比如[Monit][2])、磁盘时间(比如[RAID mdadm][3])等等的一部分。当你要建立自己的[邮件发送服务器][4],作为一个免维护的选择,你可以依赖一个免费可用的公共SMTP服务器。 - -最可靠的**免费SMTP服务器**之一来自谷歌的Gmail服务。为了在你的app里发送邮件通知,你仅需在app中添加Gmail的SMTP服务器地址和你的凭证即可。 - -Gmail的SMTP服务器吸引人的地方之一是有各种各样恰当的限制,这些限制主要用于阻止那些经常滥用服务器的滥发垃圾邮件者和邮件营销者。举个例子,你一次只能给至多100个地址发送信息,并且一天不能超过500个接收者。当你达到任何一个限制,你的Gmail账户将暂时锁一天。简而言之,Gmail的SMTP服务器对于你个人的使用是非常棒的,但不适合商业的批量邮件。 - -话虽如此,让我们展示**如何在Linux环境下使用Gmail的SMTP服务器**。 - -### Google Gmail SMTP服务器设置 ### - -如果你想要使用Gmail的SMTP服务器从你的app发送邮件,请牢记接下来的详细说明。 - -- **邮件发送服务器 (SMTP服务器)**: smtp.gmail.com -- **使用认证**: 是 -- **使用安全连接**: 是 -- **用户名**: 你的Gmail账户ID (比如 "alice" 如果你的邮箱为alice@gmail.com) -- **密码**: 你的Gmail密码 -- **端口**: 587 - -确切的配置语法可能要依据app而不同。在本教程的剩下部分,我将会向你展示各种在Linux上使用Gmail SMTP服务器的有用示例。 - -### 从命令行发送邮件 ### - -作为第一个例子,让我们尝试最基本的邮件功能:使用Gmail SMTP服务器从命令行发送一封邮件。为此,我将使用一个称为mutt的命令行邮件客户端。 - -先安装mutt: - -对于 Debian-based 系统: - - $ sudo apt-get install mutt - -对于 Red Hat based 系统: - - $ sudo yum install mutt - -创建一个mutt配置文件(~/.muttrc),并和下面一样,在文件中指定Gmail SMTP服务器信息。将gmail-id替换成自己的Gmail ID。注意这配置只是为了发送邮件而已(而非接收邮件)。 - - $ vi ~/.muttrc - ----------- - - set from = "@gmail.com" - set realname = "Dan Nanni" - set smtp_url = "smtp://@smtp.gmail.com:587/" - set smtp_pass = "" - -现在准备使用mutt发送一封邮件: - - $ echo "This is an email body." | mutt -s "This is an email subject" alice@yahoo.com - -为了在一封邮件中添加一个附件,使用"-a"选项 - - $ 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) - -使用Gmail SMTP服务器意味着邮件显示为从你的Gmail账户发出。换句话说,一个接收者将你的Gmail地址视为发送者地址。如果你想要使用自己的域名作为邮件发送者,你需要使用Gmail SMTP转发服务。 - -### 当服务器重启时发送邮件通知 ### - -如果你为了一些重要的网站正在运行一台[虚拟专用服务器(VPS)][5],一个建议是监视VPS的重启活动。作为一个更实用的例子,让我们研究如何在你的VPS上为每一次重启事件建立邮件通知。这里我假设你正在你的VPS上使用systemd,并向你展示如何为自动邮件通知创建一个自定义的systemd启动服务。 - -首先创建下面的脚本reboot_notify.sh,用于负责邮件通知。 - - $ 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 - -在这个脚本中,我使用"-F"选项,用于直到系统级的mutt配置文件位置。因此不要忘了创建/etc/muttrc文件并如前面描述填入Gmail SMTP信息。 - -现在让我们创建如下一个自定义的systemd服务。 - - $ 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 - -一旦创建服务,便使能和启动该服务。 - - $ sudo systemctl enable reboot-task - $ sudo systemctl start reboot-task - -从现在起,在每次VPS重启时你将会收到一封通知邮件。 - -![](https://c1.staticflickr.com/1/608/22241452923_2ace9cde2e_c.jpg) - -### 从服务器使用监控发送邮件通知 ### - -作为最后一个例子,让我展示一个称为[Monit][6]的现实生活的应用程序,这是一个极其有用的服务器监控应用程序。它附有广泛的[VPS][7]监控能力(比如CPU、内存、进程、文件系统),包括邮件通知能力。 - -如果你想要接收VPS上任何事件导致的且由Monit产生的邮件通知,你可以在Monit配置文件中添加以下SMTP信息。 - - 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 - -这是一个因为CPU负载超载而由Monit发送的邮件通知例子。 - -![](https://c1.staticflickr.com/1/566/22873764251_8fe66bfd16_c.jpg) - -### 总结 ### - -正如你能想象的,像Gmail一样,有许多中不同的方式使用免费的SMTP服务器。但再次说明,请牢记免费的SMTP服务器不适用于商业用途,仅仅适用于个人项目。如果你正在任一app中使用Gmail SMTP服务器,请自由分享你的用例。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/send-email-notifications-gmail-smtp-server-linux.html - -作者:[Dan Nanni][a] -译者:[cposture](https://github.com/cposture) -校对:[校对者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 From f6195564271811c8bb9361a4762b7296369f8ca3 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 4 Mar 2016 11:00:52 +0800 Subject: [PATCH 1114/1710] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=AD=A3=E7=9B=AE=E5=BD=95=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o send email notifications using Gmail SMTP server on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename published/{tech => }/20151109 How to send email notifications using Gmail SMTP server on Linux.md (100%) diff --git a/published/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/published/20151109 How to send email notifications using Gmail SMTP server on Linux.md similarity index 100% rename from published/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md rename to published/20151109 How to send email notifications using Gmail SMTP server on Linux.md From 9b7d854df6eda7cbf5827231fa5e8b752a5dd3aa Mon Sep 17 00:00:00 2001 From: robot527 Date: Fri, 4 Mar 2016 20:19:36 +0800 Subject: [PATCH 1115/1710] Translated 20151028 Bossie Awards 2015--The best open source networking and security software.md --- ...source networking and security software.md | 165 ------------------ ...source networking and security software.md | 162 +++++++++++++++++ 2 files changed, 162 insertions(+), 165 deletions(-) delete mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md create mode 100644 translated/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 networking and security software.md b/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md deleted file mode 100644 index 78c558b1e6..0000000000 --- a/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md +++ /dev/null @@ -1,165 +0,0 @@ -robot527 translating - - -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 diff --git a/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md b/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md new file mode 100644 index 0000000000..42b2a4ac99 --- /dev/null +++ b/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md @@ -0,0 +1,162 @@ +2015 Bossie 评选:最佳开源网络和安全软件 +================================================================================ +InfoWorld 在建设网络,运营网络和保障网络安全领域精选出了年度开源工具获奖者。 + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-net-sec-100614459-orig.jpg) + +### 最佳开源网络和安全软件 ### + +[BIND](https://en.wikipedia.org/wiki/BIND), [Sendmail](https://en.wikipedia.org/wiki/Sendmail), [OpenSSH](https://en.wikipedia.org/wiki/OpenSSH), [Cacti](https://en.wikipedia.org/wiki/Cactus), [Nagios](https://en.wikipedia.org/wiki/Nagios), [Snort](https://en.wikipedia.org/wiki/Snort_%28software%29) -- 这些为了网络而发明的开源软件,许多老家伙和好东西依然强劲。今年在我们这个范畴的最佳选择中,你会发现中坚支柱,新人,和新贵正在完善网络管理,安全监控,漏洞评估,[rootkit](https://en.wikipedia.org/wiki/Rootkit) 检测,以及更多。 + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-icinga-100614482-orig.jpg) + +### Icinga 2 ### + +Icinga 起先只是系统监控应用 Nagios 的一个分叉。为了给用户一个时尚的界面,对多个数据库的支持,以及一个集成众多扩展的 API,[Icinga 2][1] 被完全重写。凭借开箱即用的负载均衡、通知和配置,Icinga 2 缩短了在复杂环境下的安装时间。Icinga 2 原生支持 [Graphite](https://github.com/graphite-project/graphite-web)(系统监控应用),轻松为管理员呈现实时性能图表。但是 Icinga 今年很火是因为它发布了一个支持可拖放可定制 dashboard 和一些流式监控工具的前端图形界面系统 Icinga Web 2。 + +管理员可以查看,过滤,并把问题按优先顺序排好,同时保持跟踪已经进行的动作。一个新的矩阵视图使管理员能够在一个页面上查看主机和服务。您可以查看一个特定时间段的事件或筛选了的事件来了解哪些需要立即关注。Icinga Web 2 能够拥有一个全新界面和更为强劲的性能,然而传统版 Icinga 和 Web 版 Icinga 的所有常用命令仍然可用。这意味着学习新版工具不耗费额外的时间。 + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-zenoss-100614465-orig.jpg) + +### Zenoss Core ### + +另一个强大的开源软件,[Zenoss Core][2] 为网络管理员提供了一个完整的,一站式解决方案来跟踪和管理所有的应用程序、服务器、存储,网络组件、虚拟化工具、以及企业基础架构的其他元素。管理员可以确保硬件的运行效率并利用模块化设计的插件来扩展 ZenPacks 的功能。 + +Zenoss Core 5,在今年二月发布,作为已经很强大的工具,并进一步改进以增强用户界面和扩展 dashboard。基于 Web 的控制台和 dashboard 已经是高度可定制的和动态调整的,现在新版本可让管理员混搭多个组件图表到一个图表。可把它作为一种更好的根源分析和因果分析的工具。 + +Portlets 为网络映射、设备问题、守护进程、产品状态、监视列表和事件视图等等提供深入的分析。而且新的 HTML5 图表可以从工具导出。Zenoss 的控制中心支持带外管理并且可监控所有 Zenoss 组件。Zenoss Core 拥有在线备份和恢复、快照和回滚和多主机部署的新工具。更重要的是,凭借对 Docker 的全面支持,部署起来更快了。 + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-opennms-100614461-orig.jpg) + +### OpenNMS ### + +一个非常灵活的网络管理解决方案,[OpenNMS][3] 可以处理任何网络管理任务,无论是设备管理,应用性能监控,库存控制,或事件管理。凭借对 IPv6 的支持,强大的警报系统,和记录用户脚本来测试 Web 应用程序的能力,OpenNMS 拥有网络管理员和测试人员需要的一切。OpenNMS 现在变得像一款移动 dashboard,堪称 OpenNMS 指南针,可让网络专家随时,甚至当他们外出时都可以监视他们的网络。 + +该应用程序的 IOS 版本,可从 [iTunes App Store][4] 上获取,显示故障、节点和告警。下一个版本将提供更多的事件细节、资源图表、以及关于 IP 和 SNMP 接口的信息。安卓版可从 [Google Play][5] 上获取,可在仪表板上显示网络可用性,故障和告警,以及确认、提升或清除告警的能力。移动客户端与 OpenNMS Horizon 1.12 或更高版本以及 OpenNMS Meridian 2015.1.0 或更高版本兼容。 + +-- Fahmida Rashid + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-onion-100614460-orig.jpg) + +### Security Onion ### + +如同一个洋葱,网络安全监控是由许多层组成。没有单一的工具会使你洞察在你公司网络中的每次攻击,或者显示每一次侦查或文本会话给你。[Security Onion][6] 打包了许多经过验证的工具成为一个便于使用的 Ubuntu 发行版,这会让你看到谁留在你的网络里,并帮助你隔离坏家伙。 + +无论你是采取主动式的网络安全监测还是追查可能的攻击,Security Onion 都可以帮助你。由传感器、服务器和显示层组成,Onion 结合了基于网络和基于主机的入侵检测,全面的网络数据包捕获,并提供了所有的各种日志进行检查和分析。 + +众星云集的的网络安全工具链,包括用于网络抓包的 [Netsniff-NG](http://www.netsniff-ng.org/)、基于规则的网络入侵检测系统 Snort 和 [Suricata](https://en.wikipedia.org/wiki/Suricata_%28software%29),基于分析的网络监控系统 Bro,基于主机的入侵检测系统 OSSEC 和用于显示、分析和日志管理的 Sguil、Squert、Snorby 和 ELSA (企业日志搜索和归档)。它是一个经过精挑细选的工具集,全被打包进一个向导驱动式的安装程序并有完整的文档支持,可以帮助你尽可能快地进行监控。 + +-- Victor R. Garza + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-kali-100614458-orig.jpg) + +Kali Linux + +[Kali Linux][7] 背后的团队修改了今年流行的安全 Linux 发行版,使其更快,更全能。Kali 采用全新 4.0 版的内核 ,改进了对硬件和无线驱动程序的支持,以及一个更流畅的界面。最流行的工具都可从屏幕的侧边栏上轻松访问。最大的改变?Kali Linux 现在是一个滚动发行版,具有连续的软件更新。Kali 的核心系统是基于 Debian Jessie 发行版,而且该团队会不断地从 Debian 测试版 pull 程序包,同时持续在上面添加新的 Kali 风格的特性。 + +该发行版仍然配备满了渗透测试,漏洞分析,安全审查,网络应用分析,无线网络评估,逆向工程,和漏洞利用工具。现在该发行版具有新版本检测系统,当有个别工具可更新时系统会自动通知用户。该发行版还具有一系列设备的 ARM 映像,包括树莓派、[Chromebook](https://en.wikipedia.org/wiki/Chromebook) 和 [Odroid](https://en.wikipedia.org/wiki/ODROID),也可更新在 Android 设备上运行的 [NetHunter](https://www.kali.org/kali-linux-nethunter/) 渗透测试平台。还有其他的变化:Metasploit 的社区版/专业版不再包括在内,因为 Kali 2.0 还没有 [Rapid7 的官方支持][8]。 + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-openvas-100614462-orig.jpg) + +### OpenVAS ### + +[OpenVAS][9],开源漏洞评估系统,是一种整合多种服务和工具来提供漏洞扫描和漏洞管理的软件框架。该扫描器与每周一次的网络漏洞测试数据配合,或者您可以使用商业数据。该软件框架包括一个命令行界面(所以它可以用脚本运行)和一个带 SSL 安全机制的基于 [Greenbone 安全助手][10] 的浏览器界面。OpenVAS 提供了用于附加功能的各种插件。扫描可以预定运行或按需运行。 + +可通过单一的主控来控制多个 OpenVAS 的安装,使得它成为一个可扩展的企业漏洞评估工具。该项目与兼容这样的标准:扫描结果和配置存储在 SQL 数据库中,在那里他们可以容易地被外部报告工具访问。客户端工具通过基于 XML 的无状态 OpenVAS 管理协议访问 OpenVAS 管理器,所以安全管理员可以扩展该框架的功能。该软件能以包或源代码的方式安装在 Windows 或 Linux 上运行,或者作为一个虚拟设备被下载。 + +-- Matt Sarrel + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-owasp-100614463-orig.jpg) + +### OWASP ### + +[OWASP][11],开放的 Web 应用安全项目,是专注于提高软件安全性的全球协会的非营利组织。社区性组织提供测试工具、文档、培训和几乎任何你可以想象的评估软件安全和开发安全软件相关的最佳实践。有几个 OWASP 项目已成为很多安全从业者的工具箱中有价值的组件: + +[ZAP][12],ZED 攻击代理项目,是一个在 Web 应用程序中寻找漏洞的渗透测试工具。ZAP 的设计目标之一是使之易于使用,以便于开发人员和非安全专家的测试人员可以受益于使用它。ZAP 提供了自动扫描器和一套手动测试工具。 + +[Xenotix XSS Exploit Framework][13] 是一款运行浏览器引擎内的扫描来获得实际结果的先进的跨站脚本漏洞检测和漏洞利用框架。Xenotix 扫描器模块采用三个智能的 fuzzer,它可以运行近 5000 个不同的XSS有效载荷。一个 API 可以让安全管理员扩展和定制开发工具包。 + +[O-Saft][14],OWASP SSL 高级审查工具,一个查看 SSL 证书详细信息和测试 SSL 连接的 SSL 审计工具。这个命令行工具可以在线或离线运行来评估 SSL 安全性,比如密码和配置。O-Saft 提供了常见漏洞的内置检查,你可以容易地通过编写脚本来扩展这些功能。在 2015 年 5 月加入了一个简单的图形用户界面作为可选的下载项。 + +[OWTF][15],攻击性的 Web 测试框架,一个遵循 OWASP 测试指南和 NIST 和 PTES 标准的自动化测试工具。该框架使用一个 Web 用户界面和一个命令行,它探测 Web 和应用服务器常见漏洞,如配置不当和未打补丁的软件。 + +-- Matt Sarrel + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-beef-100614456-orig.jpg) + +### BeEF ### + +Web 浏览器已经成为用于针对客户端的攻击中最常见的载体。[BeEF][15] 浏览器漏洞利用框架项目,是一种广泛使用的用以评估 Web 浏览器安全性的渗透工具。BeEF 帮助你揭露客户端系统的安全弱点,通过启动浏览器来进行客户端攻击。BeEF 建立了一个恶意网站,安全管理员用想要测试的浏览器访问该网站。然后 BeEF 发送命令来攻击 Web 浏览器并使用命令在客户端机器上植入软件。如果他们是僵尸机 ,管理员可以对客户端机器发动攻击。 + +BeEF 自带像键盘记录器,一个端口扫描器,和 Web 代理这样的常用模块,此外你可以编写你自己的模块或直接将命令发送到僵尸测试机。BeEF 带有少量的演示网页来帮你快速入门使得编写额外的网页和攻击模块很简单,因此你可以自定义测试你的环境。BeEF 是一个评估浏览器和终端安全、学习如何发起基于浏览器的攻击的宝贵的测试工具。可使用它来展示恶意软件通常如何感染客户端设备的演示给你的用户。 + +-- Matt Sarrel + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-unhide-100614464-orig.jpg) + +### Unhide ### + +[Unhide][16] 是一个定位开放的 TCP/UDP 端口和隐藏在 UNIX、Linux 和 Windows 上的进程的审查工具。隐藏的端口和进程可以是 rootkit 或 LKM(可加载的内核模块)activity 的结果。rootkit 可能很难找到并移除,因为它们被设计成隐蔽的,对操作系统和用户隐藏自己。一个 rootkit 可以使用内核模块隐藏其进程或冒充其他进程,让它在机器上运行很长一段时间而不被发现。Unhide 可以保证管理员需要的干净系统。 + +Unhide 实际上是两个单独的脚本:一个用于进程,一个用于端口。该工具查询正在运行的进程、线程和开放的端口并将这些信息与系统中注册的活动比较,报告之间的差异。Unhide 和 WinUnhide 是在运行命令行产生文本输出的非常轻量级的脚本。它们不算优美,但是极为有用。Unhide 还列入了 [Rootkit Hunter][17] 项目中。 + +-- Matt Sarrel + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-main-100614457-orig.jpg) + +查看更多的开源软件优胜者 + +InfoWorld 网站的 2014 年最佳开源奖从堆栈底部到顶部庆祝了 100 多个开源项目。以下链接指向更多开源软件优胜者: + +[2015 Bossie 评选:最佳开源应用程序][18] + +[2015 Bossie 评选:最佳开源应用程序开发工具][19] + +[2015 Bossie 评选:最佳开源大数据工具][20] + +[2015 Bossie 评选:最佳开源数据中心和云计算软件][21] + +[2015 Bossie 评选:最佳开源桌面和移动端软件][22] + +[2015 Bossie 评选:最佳开源网络和安全软件][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] +译者:[robot527](https://github.com/robot527) +校对:[校对者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 From 4ab470b03712d1af26481403e6c4612fcdef616b Mon Sep 17 00:00:00 2001 From: GHLandy Date: Fri, 4 Mar 2016 20:49:15 +0800 Subject: [PATCH 1116/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20Part=2010=20-=20LFCS:=20Understanding=20&=20Learning=20Basi?= =?UTF-8?q?c=20Shell=20Scripting=20and=20Linux=20Filesystem=20Troubleshoot?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...asic Shell Scripting and Linux Filesystem Troubleshooting.md | 2 ++ 1 file changed, 2 insertions(+) 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 4d0a5a229a..65a853bc84 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 @@ +GHLandy Translating + 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. From 5d09fbdbe696ef87889372987d2d3191a20406ab Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 4 Mar 2016 21:18:18 +0800 Subject: [PATCH 1117/1710] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...15--The best open source networking and security software.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md b/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md index 42b2a4ac99..a073ce5349 100644 --- a/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md +++ b/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md @@ -1,3 +1,5 @@ +Martin + 2015 Bossie 评选:最佳开源网络和安全软件 ================================================================================ InfoWorld 在建设网络,运营网络和保障网络安全领域精选出了年度开源工具获奖者。 From 9fbcb0f9568620f6ada517c2342be87bb2be2931 Mon Sep 17 00:00:00 2001 From: Rubik Date: Sat, 5 Mar 2016 11:14:12 +0800 Subject: [PATCH 1118/1710] =?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 --- ... Web server on Ubuntu 15.04 or CentOS 7.md | 214 ------------------ ... Web server on Ubuntu 15.04 or CentOS 7.md | 210 +++++++++++++++++ 2 files changed, 210 insertions(+), 214 deletions(-) delete mode 100644 sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md create mode 100644 translated/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md diff --git a/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md b/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md deleted file mode 100644 index 51f8050de7..0000000000 --- a/sources/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md +++ /dev/null @@ -1,214 +0,0 @@ -[Translating] Haohong Wang -How to Setup Lighttpd Web server on Ubuntu 15.04 / CentOS 7 -================================================================================= - -Lighttpd is an open source web server which is secure, fast, compliant, and very flexible and is optimized for high-performance environments. It uses very low memory compared to other web servers , small CPU load and speed optimization making it popular among the server for its efficiency and speed. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) makes lighttpd the perfect webserver-software for every server that suffers load problems. - -Here are some simple easy setups on how we can setup Lighttpd web server on our machine running Ubuntu 15.04 or CentOS 7 linux distributions. - -### Installing Lighttpd - -#### Installing using Package Manager - -Here, we'll install Lighttpd using package manager as its the easiest method to install it. So, we can simply run the following command under `sudo` mode in a terminal or console to install Lighttpd. - -**CentOS 7** - -As lighttpd is not available in the official repository of CentOS 7, we'll need to install epel additional repository to our system. To do so, we'll need to run the following `yum` command. - - # yum install epel-release - -Then, we'll gonna update our system and proceed towards the installation of lighttpd. - - # yum update - # yum install lighttpd - -![Install Lighttpd Centos](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-centos.png) - -**Ubuntu 15.04** - -Lighttpd is available on the official repository of Ubuntu 15.04 so, we'll simply update our local repository index and then go for the installation of lighttpd using `apt-get` command. - - # apt-get update - # apt-get install lighttpd - -![Install lighttpd ubuntu](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-ubuntu.png) - -#### Installing from Source - -If we wanna install lighttpd from the latest version of source code ie 1.4.39, we'll need to compile the source code and install it into our system. First of all, we'll need to install the dependencies required to compile it. - - # cd /tmp/ - # wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.39.tar.gz - -After its downloaded, we'll need to extract it the tarball by running the following. - - # tar -zxvf lighttpd-1.4.39.tar.gz - -Then, we'll compile it by running the following commands. - - # cd lighttpd-1.4.39 - # ./configure - # make - -**Note:** In this tutorial, we are installing lighttpd with its standard configuration. If you wanna configure beyond the standard configuration and want to install more features like support for SSL, `mod_rewrite`, `mod_redirect` then you can configure. - -Once, its compiled, we'll install it in our system. - - # make install - -### Configuring Lighttpd - -If we need to configure our lighttpd web server further as our requirements, we can make changes to the default configuration file ie `/etc/lighttpd/lighttpd.conf` . As wee'll go with the default configuration here in this tutorial, we'll not gonna make changes to it. If we had made any changes and we wanna check for errors in the config file, we'll need to run the following command. - - # lighttpd -t -f /etc/lighttpd/lighttpd.conf - -#### On CentOS 7 - -If we are running CentOS 7, we'll need to create a new directory for our webroot defined in our lighttpd's default configuration ie `/src/www/htdocs/` . - - # mkdir -p /srv/www/htdocs/ - -Then, we'll copy the default welcome page from `/var/www/lighttpd/` directory to the above created directory. - - # cp -r /var/www/lighttpd/* /srv/www/htdocs/ - -### Starting and Enabling Services - -Now, we'll gonna restart our database server by executing the following `systemctl` command. - - # systemctl start lighttpd - -Then, we'll enable it to start automatically in every system boot. - - # systemctl enable lighttpd - -### Allowing Firewall - -To allow our webpages or websites running lighttpd web server on the internet or inside the same network, we'll need to allow port 80 from the firewall program. As both CentOS 7 and Ubuntu 15.04 are shipped with systemd as the default init system, we will have firewalld installed as a firewall solution. To allow port 80 or http service, we'll need to run the following commands. - - # firewall-cmd --permanent --add-service=http - success - # firewall-cmd --reload - success - -### Accessing Web Server - -As we have allowed port 80 which is the default port of lighttpd, we should be able to access lighttpd's welcome page by default. To do so, we'll need to point our browser to the ip address or domain of our machine running lighttpd according to our configuration. In this tutorial, we'll point our browser to [http://lighttpd.linoxide.com/](http://lighttpd.linoxide.com/) as we have pointed our sub-domain to its ip address. On doing so, we'll see the following welcome page in our browser. - -![Lighttpd Welcome Page](http://blog.linoxide.com/wp-content/uploads/2016/02/lighttpd-welcome-page.png) - -Further, we can add our website's files to the webroot directory and remove the default lighttpd's index file to make our static website live to the internet. - -If we want to run our PHP application in our lighttpd webserver, we'll need to follow the following steps. - -### Installing PHP5 Modules - -Once our lighttpd is installed successfully, we'll need to install PHP and some PHP modules to run PHP5 scripts in our lighttpd web server. - -#### On Ubuntu 15.04 - - # apt-get install php5 php5-cgi php5-fpm php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-mcrypt php5-memcache php-pear - -#### On CentOS 7 - - # yum install php php-cgi php-fpm php-mysql php-curl php-gd php-intl php-pecl-imagick php-mcrypt php-memcache php-pear lighttpd-fastcgi - -### Configuring Lighttpd with PHP - -To make PHP work with lighttpd web server, we'll need to follow the following methods respect to the distribution we are running. - -#### On CentOS 7 - -First of all, we'll need to edit our php configuration ie `/etc/php.ini` and uncomment a line **cgi.fix_pathinfo=1** using a text editor. - - # nano /etc/php.ini - -After its done, we'll need to change the ownership of PHP-FPM process from apache to lighttpd. To do so, we'll need to open the configuration file `/etc/php-fpm.d/www.conf` using a text editor. - - # nano /etc/php-fpm.d/www.conf - -Then, we'll append the file with the following configurations. - - user = lighttpd - group = lighttpd - -Once done, we'll need to save the file and exit the text editor. Then, we'll need to include fastcgi module from `/etc/lighttpd/modules.conf` configuration file. - - # nano /etc/lighttpd/modules.conf - -Then, we'll need to uncomment the following line by removing `#` from it. - - include "conf.d/fastcgi.conf" - -At last, we'll need to configure our fastcgi configuration file using our favorite text editor. - - # nano /etc/lighttpd/conf.d/fastcgi.conf - -Then, we'll need to add the following lines at the end of the file. - - fastcgi.server += ( ".php" => - (( - "host" => "127.0.0.1", - "port" => "9000", - "broken-scriptfilename" => "enable" - )) - ) - -After its done, we'll save the file and exit the text editor. - -#### On Ubuntu 15.04 - -To enable fastcgi with lighttpd web server, we'll simply need to execute the following commands. - - # lighttpd-enable-mod fastcgi - - Enabling fastcgi: ok - Run /etc/init.d/lighttpd force-reload to enable changes - - # lighttpd-enable-mod fastcgi-php - - Enabling fastcgi-php: ok - Run `/etc/init.d/lighttpd` force-reload to enable changes - -Then, we'll reload our lighttpd by running the following command. - - # systemctl force-reload lighttpd - -### Testing if PHP is working - -In order to see if PHP is working as expected or not, we'll need to create a new php file under the webroot of our lighttpd web server. Here, in this tutorial we have `/var/www/html` in Ubuntu and `/srv/www/htdocs` in CentOS as the default webroot so, we'll create a info.php file under it using a text editor. - -**On CentOS 7** - - # nano /var/www/info.php - -**On Ubuntu 15.04** - - # nano /srv/www/htdocs/info.php - -Then, we'll simply add the following line into the file. - - - -Once done, we'll simply save the file and exit from the text editor. - -Now, we'll point our web browser to our machine running lighttpd using its ip address or domain name with the info.php file path as [http://lighttpd.linoxide.com/info.php](http://lighttpd.linoxide.com/info.php) If everything was done as described above, we will see our PHP information page as shown below. - -![phpinfo lighttpd](http://blog.linoxide.com/wp-content/uploads/2016/02/phpinfo-lighttpd.png) - -### Conclusion - -Finally we have successfully installed the world's lightweight, fast and secure web server Lighttpd in our machine running CentOS 7 and Ubuntu 15.04 linux distributions. Once its ready, we can upload our website files into our web root, configure virtual host, enable ssl, connect database, run web apps and much more with our lighttpd 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/setup-lighttpd-web-server-ubuntu-15-04-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/ diff --git a/translated/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md b/translated/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..8840e8b973 --- /dev/null +++ b/translated/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,210 @@ +[Translated] Haohong Wang +如何在Ubuntu 15.04/CentOS 7中安装Lighttpd Web server +================================================================================= +Lighttpd 是一款开源Web服务器软件。Lighttpd 安全快速,符合行业标准,适配性强并且针对高配置环境进行了优化。Lighttpd因其CPU、内存占用小,针对小型CPU加载的快速适配以及出色的效率和速度而从众多Web服务器中脱颖而出。 而Lighttpd诸如FastCGI,CGI,Auth,Out-Compression,URL-Rewriting等高级功能更是那些低配置的服务器的福音。 + +以下便是在我们运行Ubuntu 15.04 或CentOS 7 Linux发行版的机器上安装Lighttpd Web服务器的简要流程。 + +### 安装Lighttpd + +#### 使用包管理器安装 + +这里我们通过使用包管理器这种最简单的方法来安装Lighttpd。只需以sudo模式在终端或控制台中输入下面的指令即可。 + +**CentOS 7** + +由于CentOS 7.0官方repo中并没有提供Lighttpd,所以我们需要在系统中安装额外的软件源epel repo。使用下面的yum指令来安装epel。 + + # yum install epel-release + +然后,我们需要更新系统及进程为Lighttpd的安装做准备。 + + # yum update + # yum install lighttpd + +![Install Lighttpd Centos](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-centos.png) + +**Ubuntu 15.04** + +Ubuntu 15.04官方repo中包含了Lighttpd,所以只需更新本地repo并使用apt-get指令即可安装Lighttpd。 + + # apt-get update + # apt-get install lighttpd + +![Install lighttpd ubuntu](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-ubuntu.png) + +#### 从源代码安装Lighttpd + +如果想从Lighttpd源码安装最新版本(例如1.4.39),我们需要在本地编译源码并进行安装。首先我们要安装编译源码所需的依赖包。 + + # cd /tmp/ + # wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.39.tar.gz + +下载完成后,执行下面的指令解压缩。 + + # tar -zxvf lighttpd-1.4.39.tar.gz + +然后使用下面的指令进行编译。 + + # cd lighttpd-1.4.39 + # ./configure + # make + +**注:**在这份教程中,我们安装的是默认配置的Lighttpd。其他诸如高级功能或拓展功能,如对SSL的支持,mod_rewrite,mod_redirect等,需自行配置。 + +当编译完成后,我们就可以把它安装到系统中了。 + + # make install + +### 设置Lighttpd + +如果有更高的需求,我们可以通过修改默认设置文件,如`/etc/lighttpd/lighttpd.conf`,来对Lighttpd进行进一步设置。 而在这份教程中我们将使用默认设置,不对设置文件进行修改。如果你曾做过修改并想检查设置文件是否出错,可以执行下面的指令。 + + # lighttpd -t -f /etc/lighttpd/lighttpd.conf + +#### 使用 CentOS 7 + +在CentOS 7中,我们需在Lighttpd默认设置中创设一个例如`/src/www/htdocs`的webroot文件夹。 + + # mkdir -p /srv/www/htdocs/ + +而后将默认欢迎页面从`/var/www/lighttpd`复制至刚刚新建的目录中: + + # cp -r /var/www/lighttpd/* /srv/www/htdocs/ + +### 开启服务 + +现在,通过执行systemctl指令来重启数据库服务。 + + # systemctl start lighttpd + +然后我们将它设置为伴随系统启动自动运行。 + + # systemctl enable lighttpd + +### 设置防火墙 + +如要让我们运行在Lighttpd上的网页和网站能在Internet或相似的网络上被访问,我们需要在防火墙程序中设置打开80端口。由于CentOS 7和Ubuntu15.04都附带Systemd作为默认初始化系统,所以我们安装firewalld作为解决方案。如果要打开80端口或http服务,我们只需执行下面的命令: + + # firewall-cmd --permanent --add-service=http + success + # firewall-cmd --reload + success + +### 连接至Web Server +在将80端口设置为默认端口后,我们就可以默认直接访问Lighttpd的欢迎页了。我们需要根据运行Lighttpd的设备来设置浏览器的IP地址和域名。在本教程中,我们令浏览器指向 [http://lighttpd.linoxide.com/](http://lighttpd.linoxide.com/) 同时将子域名指向它的IP地址。如此一来,我们就可以在浏览器中看到如下的欢迎页面了。 + +![Lighttpd Welcome Page](http://blog.linoxide.com/wp-content/uploads/2016/02/lighttpd-welcome-page.png) + +此外,我们可以将网站的文件添加到webroot目录下,并删除lighttpd的默认索引文件,使我们的静态网站链接至互联网上。 + +如果想在Lighttpd Web Server中运行PHP应用,请参考下面的步骤: + +### 安装PHP5模块 +在Lighttpd成功安装后,我们需要安装PHP及相关模块以在Lighttpd中运行PHP5脚本。 + +#### 使用 Ubuntu 15.04 + + # apt-get install php5 php5-cgi php5-fpm php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-mcrypt php5-memcache php-pear + +#### 使用 CentOS 7 + + # yum install php php-cgi php-fpm php-mysql php-curl php-gd php-intl php-pecl-imagick php-mcrypt php-memcache php-pear lighttpd-fastcgi + +### 设置Lighttpd的PHP服务 + +如要让PHP与Lighttpd协同工作,我们只要根据所使用的发行版执行如下对应的指令即可。 + +#### 使用 CentOS 7 + +首先要做的便是使用文件编辑器编辑php设置文件(例如`/etc/php.ini`)并取消掉对**cgi.fix_pathinfo=1**的注释。 + + # nano /etc/php.ini + +完成上面的步骤之后,我们需要把PHP-FPM进程的所有权从Apache转移至Lighttpd。要完成这些,首先用文件编辑器打开`/etc/php-fpm.d/www.conf`文件。 + + # nano /etc/php-fpm.d/www.conf + +然后在文件中增加下面的语句: + + user = lighttpd + group = lighttpd + +做完这些,我们保存并退出文本编辑器。然后从`/etc/lighttpd/modules.conf`设置文件中添加FastCGI模块。 + + # nano /etc/lighttpd/modules.conf + +然后,去掉下面语句前面的`#`来取消对它的注释。 + + include "conf.d/fastcgi.conf" + +最后我们还需在文本编辑器设置FastCGI的设置文件。 + + # nano /etc/lighttpd/conf.d/fastcgi.conf + +在文件尾部添加以下代码: + + fastcgi.server += ( ".php" => + (( + "host" => "127.0.0.1", + "port" => "9000", + "broken-scriptfilename" => "enable" + )) + ) + +在编辑完成后保存并退出文本编辑器即可。 + +#### 使用 Ubuntu 15.04 + +如需启用Lighttpd的FastCGI,只需执行下列代码: + + # lighttpd-enable-mod fastcgi + + Enabling fastcgi: ok + Run /etc/init.d/lighttpd force-reload to enable changes + + # lighttpd-enable-mod fastcgi-php + + Enabling fastcgi-php: ok + Run `/etc/init.d/lighttpd` force-reload to enable changes + +然后,执行下列命令来重启Lighttpd。 + + # systemctl force-reload lighttpd + +### 检测PHP工作状态 + +如需检测PHP是否按预期工作,我们需在Lighttpd的webroot目录下新建一个php文件。本教程中,在Ubuntu下/var/www/html 目录,CentOS下/src/www/htdocs目录下使用文本编辑器创建并打开info.php。 + +**使用 CentOS 7** + + # nano /var/www/info.php + +**使用 Ubuntu 15.04** + + # nano /srv/www/htdocs/info.php + +然后只需将下面的语句添加到文件里即可。 + + + +在编辑完成后保存并推出文本编辑器即可。 + +现在,我们需根据路径 [http://lighttpd.linoxide.com/info.php](http://lighttpd.linoxide.com/info.php) 下的info.php文件的IP地址或域名,来让我们的网页浏览器指向系统上运行的Lighttpd。如果一切都按照以上说明进行,我们将看到如下图所示的PHP页面信息。 + +![phpinfo lighttpd](http://blog.linoxide.com/wp-content/uploads/2016/02/phpinfo-lighttpd.png) + +### 总结 + +至此,我们已经在CentOS 7和Ubuntu 15.04 Linux 发行版上成功安装了轻巧快捷并且安全的Lighttpd Web服务器。现在,我们已经可以利用Lighttpd Web服务器来实现上传网站文件到网站根目录,配置虚拟主机,启用SSL,连接数据库,运行Web应用等功能了。 如果你有任何疑问,建议或反馈请在下面的评论区中写下来以让我们更好的改良Lighttpd。谢谢!(译注:评论网址 http://linoxide.com/linux-how-to/setup-lighttpd-web-server-ubuntu-15-04-centos-7/ ) +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-lighttpd-web-server-ubuntu-15-04-centos-7/ + +作者:[Arun Pyasi][a] +译者:[HaohongWANG](https://github.com/HaohongWANG) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ From 54df9889e0dca5ff774ec1598d627636eefb6b70 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 6 Mar 2016 14:27:31 +0800 Subject: [PATCH 1119/1710] =?UTF-8?q?20160306-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit keyword: NASA , Image Process , Node.js , OpenCV --- ...ocessing at NASA with open source tools.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/tech/20160304 Image processing at NASA with open source tools.md diff --git a/sources/tech/20160304 Image processing at NASA with open source tools.md b/sources/tech/20160304 Image processing at NASA with open source tools.md new file mode 100644 index 0000000000..7bf6d8297d --- /dev/null +++ b/sources/tech/20160304 Image processing at NASA with open source tools.md @@ -0,0 +1,81 @@ +Image processing at NASA with open source tools +======================================================= + +keyword: NASA , Image Process , Node.js , OpenCV + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/nasa_spitzer_space_pink_spiral.jpg?itok=3XEUstkl) + +This past summer, I was an intern at the [GVIS][1] Lab at [NASA][2] Glenn, where I brought my passion for open source into the lab. My task was to improve our lab's contributions to an open source fluid flow dynamics [simulation][3] developed by Dan Schroeder. The original simulation presents obstacles that users can draw in with their mouse to model computational fluid dynamics. My team contributed by adding image processing code that analyzes each frame of a live video feed to show how a physical object interacts with a fluid. But, there was more for us to do. + +We wanted to make the image processing more robust, so I worked on improving the image processing library. + +With the new library, the simulation would be able to detect contours, perform coordinate transformations in place, and find the center of mass of an object. The image processing doesn't directly relate to the physics of the fluid flow dynamics simulation. It detects the object with a camera and creates a barrier for the fluid flow simulation by getting the outline of the object. Then, the fluid flow simulation runs, and the output is projected down onto the actual object. + +My goal was to improve the simulation in three ways: + +1. to find accurate contours of an object +2. to find the center of mass of an object +3. to be able to perform accurate transformations about the center of an object + +My mentor recommended that I install [Node.js][4], [OpenCV][5], and the [Node.js bindings for OpenCV][6]. While I was waiting for those to install, I looked at the example code on the OpenCV bindings on their [GitHub page][7]. I discovered that the example code was in JavaScript, so because I didn’t know JavaScript, I started a short course from Codecademy. Two days later, I was sick of JavaScript but ready to start my project... which involved yet more JavaScript. + +The example contour-finding code worked well. In fact, it allowed me to accomplish my first goal in a matter of hours! To get the contours of an image, here's what it looked like: + +![](https://opensource.com/sites/default/files/resize/image_processing_nasa_1-520x293.jpg) +>The original image with all of the contours. + +The example contour-finding code worked a bit too well. Instead of the contour of the object being detected, all of the contours in the image were detected. This would have resulted in the simulation interacting with all of the unwanted contours. This is a problem because it would return incorrect data. To keep the simulation from interacting with the unwanted contours, I added an area constraint. If the contour was in a certain area range, then it would be drawn. The area constraint resulted in a much cleaner contour. + +![](https://opensource.com/sites/default/files/resize/image_processing_nasa_2-520x293.jpg) +>The filtered contour with the shadow contour. + +Though the extraneous contours weren't detected, there was still a problem with the image. There was only one contour in the image, but it doubled back on itself and wasn't complete. Area couldn't be a deciding factor here, so it was time to try something else. + +This time around, instead of immediately finding the contours, I first converted the image into a binary image. A binary image is an image where each pixel is either black or white. To get a binary image I first converted the color image to grayscale. Once the image was in grayscale, I called the threshold method on the image. The threshold method went through the image pixel by pixel and if the color value of the pixel was less than 30, the pixel color would be changed to black. Otherwise, the pixel value would be turned to white. After the original image was converted to a binary image, the resulting image looked like this: + +![](https://opensource.com/sites/default/files/resize/image_processing_nasa_3-520x293.jpg) +>The binary image. + +Then I got the contours from the binary image, which resulted in a much cleaner contour, without the shadow contour. + +![](https://opensource.com/sites/default/files/image_processing_nasa_4.jpg) +>The final clean contour. + +At this point, I was able to get clean contours and detect the center of mass. Unfortunately, I didn't have enough time to be able to complete transformations about the center of mass. Since I only had a few days left in my internship, I started to think about other things I could do within a limited time span. One of those things was the bounding rectangle. The bounding rectangle is a quadrilateral with the smallest area that contains the entire contour of an image. The bounding rectangle is important because it is key in scaling the contour on the page. Unfortunately I didn't have time to do much with the bounding rectangle, but I still wanted to learn about it because it's a useful tool. + +Finally, after all of that, I was able to finish processing the image! + +![](https://opensource.com/sites/default/files/resize/image_processing_nasa_5-521x293.jpg) +>The final image with bounding rectangle and center of mass in red. + +Once the image processing code was complete, I replaced the old image processing code in the simulation with my code. To my surprise, it worked! + +Well, mostly. + +The program had a memory leak in it, which leaked 100MB every 1/10 of a second. I was glad that it wasn’t because of my code. The bad thing was that fixing it was out of my control. The good thing was that there was a workaround that I could use. It was less than ideal, but it checked the amount of memory the simulation was using and when it used more than 1 GiB, the simulation restarted. + +At the NASA lab, we use a lot of open source software, and my work there isn't possible without it. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/3/image-processing-nasa + +作者:[Lauren Egts][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/laurenegts +[1]: https://ocio.grc.nasa.gov/gvis/ +[2]: http://www.nasa.gov/centers/glenn/home/index.html +[3]: http://physics.weber.edu/schroeder/fluids/ +[4]: http://nodejs.org/ +[5]: http://opencv.org/ +[6]: https://github.com/peterbraden/node-opencv +[7]: https://github.com/peterbraden/node-opencv + + + + + From 31e0cc9057849be5238a02346451ce917315178d Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 6 Mar 2016 14:41:20 +0800 Subject: [PATCH 1120/1710] =?UTF-8?q?20160306-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit keyword: shell , Linux , bash , zsh , fish , ksh , tcsh , license --- ... 5 open source command shells for Linux.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sources/tech/20160303 Top 5 open source command shells for Linux.md diff --git a/sources/tech/20160303 Top 5 open source command shells for Linux.md b/sources/tech/20160303 Top 5 open source command shells for Linux.md new file mode 100644 index 0000000000..74c135e594 --- /dev/null +++ b/sources/tech/20160303 Top 5 open source command shells for Linux.md @@ -0,0 +1,89 @@ +Top 5 open source command shells for Linux +=============================================== + +keyword: shell , Linux , bash , zsh , fish , ksh , tcsh , license + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/terminal_blue_smoke_command_line_0.jpg?itok=u2mRRqOa) + +There are two kinds of Linux users: the cautious and the adventurous. + +On one side is the user who almost reflexively tries out ever new option which hits the scene. They’ve tried handfuls of window managers, dozens of distributions, and every new desktop widget they can find. + +On the other side is the user who finds something they like and sticks with it. They tend to like their distribution’s defaults. If they’re passionate about a text editor, it’s whichever one they mastered first. + +As a Linux user, both on the server and the desktop, for going on fifteen years now, I am definitely more in the second category than the first. I have a tendency to use what’s presented to me, and I like the fact that this means more often than not I can find thorough documentation and examples of most any use case I can dream up. If I used something non-standard, the switch was carefully researched and often predicated by a strong pitch from someone I trust. + +But that doesn’t mean I don’t like to sometimes try and see what I’m missing. So recently, after years of using the bash shell without even giving it a thought, I decided to try out four alternative shells: ksh, tcsh, zsh, and fish. All four were easy installs from my default repositories in Fedora, and they’re likely already packaged for your distribution of choice as well. + +Here’s a little bit on each option and why you might choose it to be your next Linux command-line interpreter. + +### bash + +First, let’s take a look back at the familiar. [GNU Bash][1], the Bourne Again Shell, has been the default in pretty much every Linux distribution I’ve used through the years. Originally released in 1989, bash has grown to easily become the most used shell across the Linux world, and it is commonly found in other unix-like operating systems as well. + +Bash is a perfectly respectable shell, and as you look for documentation of how to do various things across the Internet, almost invariably you’ll find instructions which assume you are using a bash shell. But bash has some shortcomings, as anyone who has ever written a bash script that’s more than a few lines can attest to. It’s not that you can’t do something, it’s that it’s not always particularly intuitive (or at least elegant) to read and write. For some examples, see this list of [common bash pitfalls][2]. + +That said, bash is probably here to stay for at least the near future, with its enormous install base and legions of both casual and professional system administrators who are already attuned to its usage, and quirks. The bash project is available under a [GPLv3][3] license. + +### ksh + +[KornShell][4], also known by its command invocation, ksh, is an alternative shell that grew out of Bell Labs in the 1980s, written by David Korn. While originally proprietary software, later versions were released under the [Eclipse Public License][5]. + +Proponents of ksh list a number of ways in which they feel it is superior, including having a better loop syntax, cleaner exit codes from pipes, an easier way to repeat commands, and associative arrays. It's also capable of emulating many of the behaviors of vi or emacs, so if you are very partial to a text editor, it may be worth giving a try. Overall, I found it to be very similar to bash for basic input, although for advanced scripting it would surely be a different experience. + +### tcsh + +[Tcsh][6] is a derivative of csh, the Berkely Unix C shell, and sports a very long lineage back to the early days of Unix and computing itself. + +The big selling point for tcsh is its scripting language, which should look very familiar to anyone who has programmed in C. Tcsh's scripting is loved by some and hated by others. But it has other features as well, including adding arguments to aliases, and various defaults that might appeal to your preferences, including the way autocompletion with tab and history tab completion work. + +You can find tcsh under a [BSD license][7]. + +### zsh + +[Zsh][8] is another shell which has similarities to bash and ksh. Originating in the early 90s, zsh sports a number of useful features, including spelling correction, theming, namable directory shortcuts, sharing your command history across multiple terminals, and various other slight tweaks from the original Bourne shell. + +The code and binaries for zsh can be distributed under an MIT-like license, though portions are under the GPL; check the [actual license][9] for details. + +### fish + +I knew I was going to like the Friendly Interactive Shell, [fish][10], when I visited the website and found it described tongue-in-cheek with "Finally, a command line shell for the 90s"—fish was written in 2005. + +The authors of fish offer a number of reasons to make the switch, all invoking a bit of humor and poking a bit of fun at shells that don't quite live up. Features include autosuggestions ("Watch out, Netscape Navigator 4.0"), support of the "astonishing" 256 color palette of VGA, but some actually quite helpful features as well including command completion based on the man pages on your machine, clean scripting, and a web-based configuration. + +Fish is licensed primarily unde the GPL version 2 but with portions under other licenses; check the repository for [complete information][11]. + +*** + +Looking for a more detailed rundown on the precise differences between each option? [This site][12] ought to help you out. + +So where did I land? Well, ultimately, I’m probably going back to bash, because the differences were subtle enough that someone who mostly used the command line interactively as opposed to writing advanced scripts really wouldn't benefit much from the switch, and I'm already pretty comfortable in bash. + +But I’m glad I decided to come out of my shell (ha!) and try some new options. And I know there are many, many others out there. Which shells have you tried, and which one do you prefer? Let us know in the comments! + + + + +via: https://opensource.com/business/16/3/top-linux-shells + +作者:[Jason Baker][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jason-baker + +[1]: https://www.gnu.org/software/bash/ +[2]: http://mywiki.wooledge.org/BashPitfalls +[3]: http://www.gnu.org/licenses/gpl.html +[4]: http://www.kornshell.org/ +[5]: https://www.eclipse.org/legal/epl-v10.html +[6]: http://www.tcsh.org/Welcome +[7]: https://en.wikipedia.org/wiki/BSD_licenses +[8]: http://www.zsh.org/ +[9]: https://sourceforge.net/p/zsh/code/ci/master/tree/LICENCE +[10]: https://fishshell.com/ +[11]: https://github.com/fish-shell/fish-shell/blob/master/COPYING +[12]: http://hyperpolyglot.org/unix-shells + From 110043eefa1bd5b4e3820f58aa5308e165cc2b64 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 6 Mar 2016 16:39:11 +0800 Subject: [PATCH 1121/1710] translating --- ...th-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md index d40a1c9e6f..63c82074d3 100644 --- a/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md +++ b/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md @@ -1,3 +1,5 @@ +Translating---geekpi + OpenSSH 7.2 Out Now with Support for RSA Signatures Using SHA-256/512 Algorithms ======================================================== From fbe4c229c106303b8fc5a57f4b9bc98b51d48d8d Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 6 Mar 2016 17:02:18 +0800 Subject: [PATCH 1122/1710] translated --- ...-Signatures-Using-SHA-256512 Algorithms.md | 34 ------------------- ...-Signatures-Using-SHA-256512 Algorithms.md | 33 ++++++++++++++++++ 2 files changed, 33 insertions(+), 34 deletions(-) delete mode 100644 sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md create mode 100644 translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md diff --git a/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md deleted file mode 100644 index 63c82074d3..0000000000 --- a/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md +++ /dev/null @@ -1,34 +0,0 @@ -Translating---geekpi - -OpenSSH 7.2 Out Now with Support for RSA Signatures Using SHA-256/512 Algorithms -======================================================== - -**Today, February 29, 2016, the OpenBSD project had the great pleasure of announcing the release and immediate availability for download of OpenSSH 7.2 for all supported platforms.** - -According to the internal [release notes][1], also attached at the end of the article for reference, OpenSSH 7.2 is primarily a bugfix release, fixing most of the issues reported by users or discovered by the development team since the release of OpenSSH 7.1p2, but we can see several new features as well. - -Among these, we can mention support for RSA signatures using SHA-256 or SHA-256 512 hash algorithms, the addition of an AddKeysToAgent client option to add private keys used for authentication to the ssh-agent, and the implementation of the "restrict" authorized_keys option for storing key restrictions. - -Furthermore, there's now an ssh_config CertificateFile option for explicitly listing certificates, the ssh-keygen is now capable of changing the key comment for all supported formats, fingerprinting is now allowed from standard input and for multiple public keys in a file. - -### ssh-keygen now supports multiple certificates - -In addition to the changes mentioned above, OpenSSH 7.2 adds support for multiple certificates to ssh-keygen, one per line, implements the "none" argument for sshd_config ChrootDirectory and Foreground, and the "-c" flag allows ssh-keyscan to fetch certificates instead of plain keys. - -Last but not least, OpenSSH 7.2 no longer enables by default all flavors of the rijndael-cbc aliases for AES, blowfish-cbc, and cast128-cbc legacy ciphers, as well as MD5-based and truncated HMAC algorithms. The getrandom() syscall is now supported under Linux. [Download OpenSSH 7.2][2] and check the changelog below for some additional details about exactly what has been fixed in this major release. - - - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.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.openssh.com/txt/release-7.2 -[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml diff --git a/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md new file mode 100644 index 0000000000..d3cf0e8e8b --- /dev/null +++ b/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md @@ -0,0 +1,33 @@ +使用SHA-256/512算法作为RSA签名的OpenSSH 7.2发布了 +======================================================== + +**今天,2016.2.29,OpenBSD项目很高兴地宣布OpenSSH 7.2发布了,并且很块可在所有支持的平台下载。** + +根据内部[发布公告][1],该公告附在了文章的最后,OpenSSH 7.2主要是bug修复,修改了自OpenSSH 7.1p2以来由用户报告和开发团队发现的问题,但是我们可以看到几个新功能。 + +这其中,我们可以提到使用了SHA-256 或者 SHA-256 512哈希算法的RSA签名,增加了一个AddKeysToAgent客户端选项添加用于身份验证的ssh-agent的私钥,和实现了一个“restrict”级别的authorized_keys选项用于存储键限制。 + +此外,现在ssh_config中CertificateFile选项可以明确列出证书,ssh-keygen现在能够改所有支持的格式的密钥注释、指纹可以来自标准输入,文件可含多个公钥。 + +### ssh-keygen现在支持多证书 + +除了上面提到的,OpenSSH 7.2正加了ssh-keygen多证书的支持,一个一行,实现了sshd_config ChrootDirectory及前台的0参数,“-c”标志允许ssh-keyscan取回证书而不是文本密钥。 + +最后但并非最不重要的,OpenSSH 7.3不再默认启用rijndael-cbc也叫AES,blowfish-cbc、古老的cast128-cbc密码,同样还有基于MD5和截断的HMAC算法。getrandom()系统调用在Linux中支持。[下载OpenSSH 7.2][2]并在更新日志中查看更细节的在本主要更新中修复的问题。 + + + + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.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://www.openssh.com/txt/release-7.2 +[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml From 5e16d7165d8f840540df33aa67cf2118cff4c553 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 6 Mar 2016 17:03:29 +0800 Subject: [PATCH 1123/1710] Revert "translated" This reverts commit fbe4c229c106303b8fc5a57f4b9bc98b51d48d8d. --- ...-Signatures-Using-SHA-256512 Algorithms.md | 34 +++++++++++++++++++ ...-Signatures-Using-SHA-256512 Algorithms.md | 33 ------------------ 2 files changed, 34 insertions(+), 33 deletions(-) create mode 100644 sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md delete mode 100644 translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md diff --git a/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md new file mode 100644 index 0000000000..63c82074d3 --- /dev/null +++ b/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md @@ -0,0 +1,34 @@ +Translating---geekpi + +OpenSSH 7.2 Out Now with Support for RSA Signatures Using SHA-256/512 Algorithms +======================================================== + +**Today, February 29, 2016, the OpenBSD project had the great pleasure of announcing the release and immediate availability for download of OpenSSH 7.2 for all supported platforms.** + +According to the internal [release notes][1], also attached at the end of the article for reference, OpenSSH 7.2 is primarily a bugfix release, fixing most of the issues reported by users or discovered by the development team since the release of OpenSSH 7.1p2, but we can see several new features as well. + +Among these, we can mention support for RSA signatures using SHA-256 or SHA-256 512 hash algorithms, the addition of an AddKeysToAgent client option to add private keys used for authentication to the ssh-agent, and the implementation of the "restrict" authorized_keys option for storing key restrictions. + +Furthermore, there's now an ssh_config CertificateFile option for explicitly listing certificates, the ssh-keygen is now capable of changing the key comment for all supported formats, fingerprinting is now allowed from standard input and for multiple public keys in a file. + +### ssh-keygen now supports multiple certificates + +In addition to the changes mentioned above, OpenSSH 7.2 adds support for multiple certificates to ssh-keygen, one per line, implements the "none" argument for sshd_config ChrootDirectory and Foreground, and the "-c" flag allows ssh-keyscan to fetch certificates instead of plain keys. + +Last but not least, OpenSSH 7.2 no longer enables by default all flavors of the rijndael-cbc aliases for AES, blowfish-cbc, and cast128-cbc legacy ciphers, as well as MD5-based and truncated HMAC algorithms. The getrandom() syscall is now supported under Linux. [Download OpenSSH 7.2][2] and check the changelog below for some additional details about exactly what has been fixed in this major release. + + + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.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.openssh.com/txt/release-7.2 +[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml diff --git a/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md deleted file mode 100644 index d3cf0e8e8b..0000000000 --- a/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md +++ /dev/null @@ -1,33 +0,0 @@ -使用SHA-256/512算法作为RSA签名的OpenSSH 7.2发布了 -======================================================== - -**今天,2016.2.29,OpenBSD项目很高兴地宣布OpenSSH 7.2发布了,并且很块可在所有支持的平台下载。** - -根据内部[发布公告][1],该公告附在了文章的最后,OpenSSH 7.2主要是bug修复,修改了自OpenSSH 7.1p2以来由用户报告和开发团队发现的问题,但是我们可以看到几个新功能。 - -这其中,我们可以提到使用了SHA-256 或者 SHA-256 512哈希算法的RSA签名,增加了一个AddKeysToAgent客户端选项添加用于身份验证的ssh-agent的私钥,和实现了一个“restrict”级别的authorized_keys选项用于存储键限制。 - -此外,现在ssh_config中CertificateFile选项可以明确列出证书,ssh-keygen现在能够改所有支持的格式的密钥注释、指纹可以来自标准输入,文件可含多个公钥。 - -### ssh-keygen现在支持多证书 - -除了上面提到的,OpenSSH 7.2正加了ssh-keygen多证书的支持,一个一行,实现了sshd_config ChrootDirectory及前台的0参数,“-c”标志允许ssh-keyscan取回证书而不是文本密钥。 - -最后但并非最不重要的,OpenSSH 7.3不再默认启用rijndael-cbc也叫AES,blowfish-cbc、古老的cast128-cbc密码,同样还有基于MD5和截断的HMAC算法。getrandom()系统调用在Linux中支持。[下载OpenSSH 7.2][2]并在更新日志中查看更细节的在本主要更新中修复的问题。 - - - - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.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://www.openssh.com/txt/release-7.2 -[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml From cf3c03be58f508073adac520564761cfbda1ae48 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 6 Mar 2016 17:06:20 +0800 Subject: [PATCH 1124/1710] revert --- ...-Signatures-Using-SHA-256512 Algorithms.md | 34 ------------------- ...-Signatures-Using-SHA-256512 Algorithms.md | 33 ++++++++++++++++++ 2 files changed, 33 insertions(+), 34 deletions(-) delete mode 100644 sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md create mode 100644 translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md diff --git a/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md deleted file mode 100644 index 63c82074d3..0000000000 --- a/sources/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md +++ /dev/null @@ -1,34 +0,0 @@ -Translating---geekpi - -OpenSSH 7.2 Out Now with Support for RSA Signatures Using SHA-256/512 Algorithms -======================================================== - -**Today, February 29, 2016, the OpenBSD project had the great pleasure of announcing the release and immediate availability for download of OpenSSH 7.2 for all supported platforms.** - -According to the internal [release notes][1], also attached at the end of the article for reference, OpenSSH 7.2 is primarily a bugfix release, fixing most of the issues reported by users or discovered by the development team since the release of OpenSSH 7.1p2, but we can see several new features as well. - -Among these, we can mention support for RSA signatures using SHA-256 or SHA-256 512 hash algorithms, the addition of an AddKeysToAgent client option to add private keys used for authentication to the ssh-agent, and the implementation of the "restrict" authorized_keys option for storing key restrictions. - -Furthermore, there's now an ssh_config CertificateFile option for explicitly listing certificates, the ssh-keygen is now capable of changing the key comment for all supported formats, fingerprinting is now allowed from standard input and for multiple public keys in a file. - -### ssh-keygen now supports multiple certificates - -In addition to the changes mentioned above, OpenSSH 7.2 adds support for multiple certificates to ssh-keygen, one per line, implements the "none" argument for sshd_config ChrootDirectory and Foreground, and the "-c" flag allows ssh-keyscan to fetch certificates instead of plain keys. - -Last but not least, OpenSSH 7.2 no longer enables by default all flavors of the rijndael-cbc aliases for AES, blowfish-cbc, and cast128-cbc legacy ciphers, as well as MD5-based and truncated HMAC algorithms. The getrandom() syscall is now supported under Linux. [Download OpenSSH 7.2][2] and check the changelog below for some additional details about exactly what has been fixed in this major release. - - - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.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.openssh.com/txt/release-7.2 -[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml diff --git a/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md new file mode 100644 index 0000000000..d3cf0e8e8b --- /dev/null +++ b/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md @@ -0,0 +1,33 @@ +使用SHA-256/512算法作为RSA签名的OpenSSH 7.2发布了 +======================================================== + +**今天,2016.2.29,OpenBSD项目很高兴地宣布OpenSSH 7.2发布了,并且很块可在所有支持的平台下载。** + +根据内部[发布公告][1],该公告附在了文章的最后,OpenSSH 7.2主要是bug修复,修改了自OpenSSH 7.1p2以来由用户报告和开发团队发现的问题,但是我们可以看到几个新功能。 + +这其中,我们可以提到使用了SHA-256 或者 SHA-256 512哈希算法的RSA签名,增加了一个AddKeysToAgent客户端选项添加用于身份验证的ssh-agent的私钥,和实现了一个“restrict”级别的authorized_keys选项用于存储键限制。 + +此外,现在ssh_config中CertificateFile选项可以明确列出证书,ssh-keygen现在能够改所有支持的格式的密钥注释、指纹可以来自标准输入,文件可含多个公钥。 + +### ssh-keygen现在支持多证书 + +除了上面提到的,OpenSSH 7.2正加了ssh-keygen多证书的支持,一个一行,实现了sshd_config ChrootDirectory及前台的0参数,“-c”标志允许ssh-keyscan取回证书而不是文本密钥。 + +最后但并非最不重要的,OpenSSH 7.3不再默认启用rijndael-cbc也叫AES,blowfish-cbc、古老的cast128-cbc密码,同样还有基于MD5和截断的HMAC算法。getrandom()系统调用在Linux中支持。[下载OpenSSH 7.2][2]并在更新日志中查看更细节的在本主要更新中修复的问题。 + + + + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.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://www.openssh.com/txt/release-7.2 +[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml From e88c20e9de6a2eb539f06f209a3952b24206e915 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Mar 2016 22:20:33 +0800 Subject: [PATCH 1125/1710] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201602?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...er Using Windows 10 After More than 8 Years--See Comparison.md | 0 .../20150824 Great Open Source Collaborative Editing Tools.md | 0 ...How to install Suricata intrusion detection system on Linux.md | 0 ...f Free Software Foundation--Best Quotes of Richard Stallman.md | 0 .../20151030 80 Linux Monitoring Tools for SysAdmins.md | 0 ...w to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md | 0 ... How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md | 0 ...Foundation Explains a 'World without Linux' and Open Source.md | 0 published/{ => 201602}/20151201 Cinnamon 2.8 Review.md | 0 ...51201 How to use Mutt email client with encrypted passwords.md | 0 published/{ => 201602}/20151206 Supporting secure DNS in glibc.md | 0 .../{ => 201602}/20151208 6 useful LibreOffice extensions.md | 0 ...How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md | 0 ...Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md | 0 ...04 How to use KVM from the command line on Debian or Ubuntu.md | 0 ... from default to alternative Python version on Debian Linux.md | 0 ...60218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md | 0 .../{ => 201602}/20160218 Russia Announces Switch to Linux.md | 0 published/{ => 201602}/20160218 The Best Linux Distros of 2016.md | 0 .../20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md | 0 ...0224 Can we tackle the Zika virus with rapid, open research.md | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201602}/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md (100%) rename published/{ => 201602}/20150824 Great Open Source Collaborative Editing Tools.md (100%) rename published/{ => 201602}/20150906 How to install Suricata intrusion detection system on Linux.md (100%) rename published/{ => 201602}/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md (100%) rename published/{ => 201602}/20151030 80 Linux Monitoring Tools for SysAdmins.md (100%) rename published/{ => 201602}/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md (100%) rename published/{ => 201602}/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md (100%) rename published/{ => 201602}/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md (100%) rename published/{ => 201602}/20151201 Cinnamon 2.8 Review.md (100%) rename published/{ => 201602}/20151201 How to use Mutt email client with encrypted passwords.md (100%) rename published/{ => 201602}/20151206 Supporting secure DNS in glibc.md (100%) rename published/{ => 201602}/20151208 6 useful LibreOffice extensions.md (100%) rename published/{ => 201602}/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md (100%) rename published/{ => 201602}/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md (100%) rename published/{ => 201602}/20160104 How to use KVM from the command line on Debian or Ubuntu.md (100%) rename published/{ => 201602}/20160126 How to change from default to alternative Python version on Debian Linux.md (100%) rename published/{ => 201602}/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md (100%) rename published/{ => 201602}/20160218 Russia Announces Switch to Linux.md (100%) rename published/{ => 201602}/20160218 The Best Linux Distros of 2016.md (100%) rename published/{ => 201602}/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md (100%) rename published/{ => 201602}/20160224 Can we tackle the Zika virus with rapid, open research.md (100%) diff --git a/published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md b/published/201602/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md similarity index 100% rename from published/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md rename to published/201602/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md diff --git a/published/20150824 Great Open Source Collaborative Editing Tools.md b/published/201602/20150824 Great Open Source Collaborative Editing Tools.md similarity index 100% rename from published/20150824 Great Open Source Collaborative Editing Tools.md rename to published/201602/20150824 Great Open Source Collaborative Editing Tools.md diff --git a/published/20150906 How to install Suricata intrusion detection system on Linux.md b/published/201602/20150906 How to install Suricata intrusion detection system on Linux.md similarity index 100% rename from published/20150906 How to install Suricata intrusion detection system on Linux.md rename to published/201602/20150906 How to install Suricata intrusion detection system on Linux.md diff --git a/published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/published/201602/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md similarity index 100% rename from published/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md rename to published/201602/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md diff --git a/published/20151030 80 Linux Monitoring Tools for SysAdmins.md b/published/201602/20151030 80 Linux Monitoring Tools for SysAdmins.md similarity index 100% rename from published/20151030 80 Linux Monitoring Tools for SysAdmins.md rename to published/201602/20151030 80 Linux Monitoring Tools for SysAdmins.md diff --git a/published/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md b/published/201602/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md similarity index 100% rename from published/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md rename to published/201602/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md diff --git a/published/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md b/published/201602/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md similarity index 100% rename from published/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md rename to published/201602/20151119 How to Install Revive Adserver on Ubuntu 15.04 or CentOS 7.md diff --git a/published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md b/published/201602/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md similarity index 100% rename from published/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md rename to published/201602/20151126 Linux Foundation Explains a 'World without Linux' and Open Source.md diff --git a/published/20151201 Cinnamon 2.8 Review.md b/published/201602/20151201 Cinnamon 2.8 Review.md similarity index 100% rename from published/20151201 Cinnamon 2.8 Review.md rename to published/201602/20151201 Cinnamon 2.8 Review.md diff --git a/published/20151201 How to use Mutt email client with encrypted passwords.md b/published/201602/20151201 How to use Mutt email client with encrypted passwords.md similarity index 100% rename from published/20151201 How to use Mutt email client with encrypted passwords.md rename to published/201602/20151201 How to use Mutt email client with encrypted passwords.md diff --git a/published/20151206 Supporting secure DNS in glibc.md b/published/201602/20151206 Supporting secure DNS in glibc.md similarity index 100% rename from published/20151206 Supporting secure DNS in glibc.md rename to published/201602/20151206 Supporting secure DNS in glibc.md diff --git a/published/20151208 6 useful LibreOffice extensions.md b/published/201602/20151208 6 useful LibreOffice extensions.md similarity index 100% rename from published/20151208 6 useful LibreOffice extensions.md rename to published/201602/20151208 6 useful LibreOffice extensions.md diff --git a/published/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md b/published/201602/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md similarity index 100% rename from published/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md rename to published/201602/20151208 How to Install Bugzilla with Apache and SSL on FreeBSD 10.2.md diff --git a/published/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md b/published/201602/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md similarity index 100% rename from published/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md rename to published/201602/20151214 Linux or Unix Desktop Fun--Christmas Tree For Your Terminal.md diff --git a/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/published/201602/20160104 How to use KVM from the command line on Debian or Ubuntu.md similarity index 100% rename from published/20160104 How to use KVM from the command line on Debian or Ubuntu.md rename to published/201602/20160104 How to use KVM from the command line on Debian or Ubuntu.md diff --git a/published/20160126 How to change from default to alternative Python version on Debian Linux.md b/published/201602/20160126 How to change from default to alternative Python version on Debian Linux.md similarity index 100% rename from published/20160126 How to change from default to alternative Python version on Debian Linux.md rename to published/201602/20160126 How to change from default to alternative Python version on Debian Linux.md diff --git a/published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md b/published/201602/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md similarity index 100% rename from published/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md rename to published/201602/20160218 Meizu PRO 5 Ubuntu Edition Announced and It's a Beast.md diff --git a/published/20160218 Russia Announces Switch to Linux.md b/published/201602/20160218 Russia Announces Switch to Linux.md similarity index 100% rename from published/20160218 Russia Announces Switch to Linux.md rename to published/201602/20160218 Russia Announces Switch to Linux.md diff --git a/published/20160218 The Best Linux Distros of 2016.md b/published/201602/20160218 The Best Linux Distros of 2016.md similarity index 100% rename from published/20160218 The Best Linux Distros of 2016.md rename to published/201602/20160218 The Best Linux Distros of 2016.md diff --git a/published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md b/published/201602/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md similarity index 100% rename from published/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md rename to published/201602/20160220 Linux Mint 18 Will Get Its Own Set Of Apps.md diff --git a/published/20160224 Can we tackle the Zika virus with rapid, open research.md b/published/201602/20160224 Can we tackle the Zika virus with rapid, open research.md similarity index 100% rename from published/20160224 Can we tackle the Zika virus with rapid, open research.md rename to published/201602/20160224 Can we tackle the Zika virus with rapid, open research.md From 1f7add65730d940fa46fbfd891c6f3e81c88c011 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Mar 2016 22:21:27 +0800 Subject: [PATCH 1126/1710] =?UTF-8?q?=E6=B6=88=E9=99=A4=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @oska874 --- published/20160226 Development Release | 0 ...1.md => 20160226 Development Release- Xubuntu 16.04 Beta 1.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 published/20160226 Development Release rename published/{20160226 Development Release: Xubuntu 16.04 Beta 1.md => 20160226 Development Release- Xubuntu 16.04 Beta 1.md} (100%) diff --git a/published/20160226 Development Release b/published/20160226 Development Release deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/published/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/published/20160226 Development Release- Xubuntu 16.04 Beta 1.md similarity index 100% rename from published/20160226 Development Release: Xubuntu 16.04 Beta 1.md rename to published/20160226 Development Release- Xubuntu 16.04 Beta 1.md From b4c0dea400bea351d7bf70b8ecfe95af6613fcf5 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Mar 2016 22:29:32 +0800 Subject: [PATCH 1127/1710] PUB:20160226 Development Release- Xubuntu 16.04 Beta 1 @oska874 --- .../20160226 Development Release- Xubuntu 16.04 Beta 1.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/published/20160226 Development Release- Xubuntu 16.04 Beta 1.md b/published/20160226 Development Release- Xubuntu 16.04 Beta 1.md index bae1ecccf8..0e7c3d0673 100644 --- a/published/20160226 Development Release- Xubuntu 16.04 Beta 1.md +++ b/published/20160226 Development Release- Xubuntu 16.04 Beta 1.md @@ -1,9 +1,11 @@ -Xubuntu 16.04 Beta 1 开发发布 +Xubuntu 16.04 Beta 1 开发者版本发布 ============================================ -Ubuntu 发布组宣布为选定的社区版本而准备的最新的 beta 测试镜像已经可以使用了。新的发布版名称是 16.04 beta 1 ,这个版本只推荐给测试人员测试用,并不适合普通人进行日常使用。 +Ubuntu 发布团队宣布为选定的社区版本而准备的最新的 beta 测试镜像已经可以使用了。新的发布版本名称是 16.04 beta 1 ,这个版本只推荐给测试人员测试用,并不适合普通人进行日常使用。 -“这个 beta 特性的镜像主要是为 [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] 和 [Xubuntu][6] 这几个发布版准备的。Xenial Xerus (LCTT 注: ubuntu 16.04 的开发代号) 的这个预发布版本并不推荐那些需要稳定版本的人员使用,同时那些不希望在系统运行中偶尔或频繁的出现 bug 的人也不建议使用这个版本。这个版本主要还是推荐给那些喜欢 ubuntu 的开发人员,以及那些想协助我们测试、报告 bug 和修改 bug 的人使用,和我们一起努力让这个发布版本早日准备就绪。” 更多的信息可以从 [发布日志][7] 获取。 +![](https://www.linux.com/images/stories/66866/xubuntu-small.png) + +“这个 beta 特性的镜像主要是为 [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] 和 [Xubuntu][6] 这几个发布版准备的。Xenial Xerus (LCTT 译注: ubuntu 16.04 的开发代号)的这个预发布版本并不推荐那些需要稳定版本的人员使用,同时那些不希望在系统运行中偶尔或频繁的出现 bug 的人也不建议使用这个版本。这个版本主要还是推荐给那些喜欢 ubuntu 的开发人员,以及那些想协助我们测试、报告 bug 和修改 bug 的人使用,和我们一起努力让这个发布版本早日准备就绪。” 更多的信息可以从 [发布日志][7] 获取。 -------------------------------------------------------------------------------- From 95892c50c547cbf5a37c3a4dec9b89dcf31645e0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Mar 2016 22:45:14 +0800 Subject: [PATCH 1128/1710] PUB:20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack @oska874 @martin2011qi --- ...n HTTPS Websites Imperiled by New Decryption Attack.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/published/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md b/published/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md index d3270ac88e..d1878c81f9 100644 --- a/published/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md +++ b/published/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md @@ -4,11 +4,11 @@ ![](https://www.linux.com/images/stories/66866/drown-explainer.jpg) -低成本的 DROWN 攻击能在数小时内完成数据解密,对采用了 TLS 的邮件服务器也同样奏效。 +低成本的 DROWN 攻击能在数小时内完成数据解密,该攻击对采用了 TLS 的邮件服务器也同样奏效。 -一国际研究小组于周二发出警告,据称逾 1100 万家网站和邮件服务采用的用以保证服务安全的[传输层安全协议][1],对于一种新发现的、成本低廉的攻击而言异常脆弱,这种攻击会在几个小时内解密敏感的通信,在某些情况下解密甚至能瞬间完成。 1 百万家最为流行的网站中有超过 81,000 家正处于这些脆弱的 HTTPS 协议的保护之下。 +一个国际研究小组于周二发出警告,据称逾 1100 万家网站和邮件服务采用的用以保证服务安全的 [传输层安全协议 TLS][1],对于一种新发现的、成本低廉的攻击而言异常脆弱,这种攻击会在几个小时内解密敏感的通信,在某些情况下解密甚至能瞬间完成。 前一百万家最大的网站中有超过 81,000 个站点正处于这种脆弱的 HTTPS 协议保护之下。 -这种攻击主要针对受 TLS 保护、依赖于 [RSA 加密系统][2]的通信。如果密钥泄露了,即使是间接的由 SSLv2,一种在 20 年前就因为自身缺陷而退休了的 LTS 前辈。该漏洞允许攻击者,可以通过反复使用 SSLv2 创建与服务器连接的方式,解密截获的 TLS 连接。 +这种攻击主要针对依赖于 [RSA 加密系统][2]的 TLS 所保护的通信,密钥会间接的通过 SSLv2 暴露,这是一种在 20 年前就因为自身缺陷而退休了的 TLS 前代协议。该漏洞允许攻击者可以通过反复使用 SSLv2 创建与服务器连接的方式,解密截获的 TLS 连接。 -------------------------------------------------------------------------------- @@ -16,7 +16,7 @@ via: https://www.linux.com/news/software/applications/889455--more-than-11-milli 作者:[ArsTechnica][a] 译者:[Ezio](https://github.com/oska874) -校对:[martin2011qi](https://github.com/martin2011qi) +校对:[martin2011qi](https://github.com/martin2011qi), [wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6a429bfe56cde11c545f626804ae5854862f6fef Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 7 Mar 2016 15:39:44 +0800 Subject: [PATCH 1129/1710] PUB:20151109 How to send email notifications using Gmail SMTP server on Linux @cposture @martin2011qi --- ...ations using Gmail SMTP server on Linux.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/published/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/published/20151109 How to send email notifications using Gmail SMTP server on Linux.md index 20850869b1..2661a64085 100644 --- a/published/20151109 How to send email notifications using Gmail SMTP server on Linux.md +++ b/published/20151109 How to send email notifications using Gmail SMTP server on Linux.md @@ -1,25 +1,25 @@ 如何在 Linux 上使用 Gmail SMTP 服务器发送邮件通知 ================================================================================ -假定你想配置一个 Linux app,用于从你的服务器或桌面客户端发送邮件信息。邮件信息可能是部分的邮件简报、状态更新(如 [Cachet][1])、监控警报(如 [Monit][2])、磁盘时间(如 [RAID mdadm][3])等等。当你要建立自己的 [邮件发送服务器][4] 传递信息时 ,你可以依赖一个免费使用的公共 SMTP 服务器作为一个变通选项避免遭受维护之苦。 +假定你想配置一个 Linux 应用,用于从你的服务器或桌面客户端发送邮件信息。邮件信息可能是邮件简报、状态更新(如 [Cachet][1])、监控警报(如 [Monit][2])、磁盘时间(如 [RAID mdadm][3])等等。当你要建立自己的 [邮件发送服务器][4] 传递信息时 ,你可以替代使用一个免费的公共 SMTP 服务器,从而避免遭受维护之苦。 -谷歌的 Gmail 服务就是最可靠的 **免费 SMTP 服务器** 之一。想要从 app 发送邮件通知,你仅需在 app 中添加 Gmail 的 SMTP 服务器地址和你的凭证即可。 +谷歌的 Gmail 服务就是最可靠的 **免费 SMTP 服务器** 之一。想要从应用中发送邮件通知,你仅需在应用中添加 Gmail 的 SMTP 服务器地址和你的身份凭证即可。 -选择 Gmail 的 SMTP 服务器的原因之一是各种各样恰当的限制,这些限制主要用于阻止那些经常滥用服务器来发送垃圾邮件和使用邮件营销的家伙。举个例子,你一次只能给至多 100 个地址发送信息,并且一天不能超过 500 个收件人。同样,如果你不想被标为垃圾邮件发送者,你就不能发送过多的不可投递的消息。当你达到任何一个限制,你的 Gmail 账户将被暂时的锁定一天。简而言之,Gmail 的 SMTP 服务器对于你个人的使用是非常棒的,但不适合商业的批量邮件。 +使用 Gmail 的 SMTP 服务器会遇到一些限制,这些限制主要用于阻止那些经常滥用服务器来发送垃圾邮件和使用邮件营销的家伙。举个例子,你一次只能给至多 100 个地址发送信息,并且一天不能超过 500 个收件人。同样,如果你不想被标为垃圾邮件发送者,你就不能发送过多的不可投递的邮件。当你达到任何一个限制,你的 Gmail 账户将被暂时的锁定一天。简而言之,Gmail 的 SMTP 服务器对于你个人的使用是非常棒的,但不适合商业的批量邮件。 说了这么多,是时候向你们展示 **如何在 Linux 环境下使用 Gmail 的 SMTP 服务器** 了。 ### Google Gmail SMTP 服务器设置 ### -如果你想要通过你的 app 使用 Gmail 的 SMTP 服务器发送邮件,请牢记接下来的详细说明。 +如果你想要通过你的应用使用 Gmail 的 SMTP 服务器发送邮件,请牢记接下来的详细说明。 - **邮件发送服务器 (SMTP 服务器)**: smtp.gmail.com - **使用认证**: 是 - **使用安全连接**: 是 -- **用户名**: 你的 Gmail 账户 ID (比如 "alice" 如果你的邮箱为 alice@gmail.com) +- **用户名**: 你的 Gmail 账户 ID (比如 "alice" ,如果你的邮箱为 alice@gmail.com) - **密码**: 你的 Gmail 密码 - **端口**: 587 -确切的配置根据 app 会有所不同。在本教程的剩余部分,我将向你展示一些在 Linux 上使用 Gmail SMTP 服务器的应用示例。 +确切的配置根据应用会有所不同。在本教程的剩余部分,我将向你展示一些在 Linux 上使用 Gmail SMTP 服务器的应用示例。 ### 从命令行发送邮件 ### @@ -35,7 +35,7 @@ $ sudo yum install mutt -创建一个 mutt 配置文件(~/.muttrc),并和下面一样,在文件中指定 Gmail SMTP 服务器信息。将 替换成自己的 Gmail ID。注意该配置只是为了发送邮件而已(而非接收邮件)。 +创建一个 mutt 配置文件(~/.muttrc),并和下面一样,在文件中指定 Gmail SMTP 服务器信息。将 \ 替换成自己的 Gmail ID。注意该配置只是为了发送邮件而已(而非接收邮件)。 $ vi ~/.muttrc @@ -46,7 +46,7 @@ set smtp_url = "smtp://@smtp.gmail.com:587/" set smtp_pass = "" -一切就绪使用 mutt 发送一封邮件: +一切就绪,使用 mutt 发送一封邮件: $ echo "This is an email body." | mutt -s "This is an email subject" alice@yahoo.com @@ -60,7 +60,7 @@ ### 当服务器重启时发送邮件通知 ### -如果你在 [虚拟专用服务器(VPS)][5] 上跑了些重要的网站,建议要监控 VPS 的重启行为。作为一个更为实用的例子,让我们研究如何在你的 VPS 上为每一次重启事件建立邮件通知。这里假设你的 VPS 上使用的是 systemd,并向你展示如何为自动邮件通知创建一个自定义的 systemd 启动服务。 +如果你在 [虚拟专用服务器(VPS)][5] 上跑了些重要的网站,建议监控 VPS 的重启行为。作为一个更为实用的例子,让我们研究如何在你的 VPS 上为每一次重启事件建立邮件通知。这里假设你的 VPS 上使用的是 systemd,并向你展示如何为自动邮件通知创建一个自定义的 systemd 启动服务。 首先创建下面的脚本 reboot_notify.sh,用于负责邮件通知。 @@ -108,9 +108,9 @@ ### 通过服务器使用监控发送邮件通知 ### -作为最后一个例子,让我展示一个现实生活中的应用程序,[Monit][6],这是一款极其有用的服务器监控应用程序。它附有全面的 [VPS][7] 监控能力(比如 CPU、内存、进程、文件系统),和邮件通知功能。 +作为最后一个例子,让我展示一个现实生活中的应用程序,[Monit][6],这是一款极其有用的服务器监控应用程序。它带有全面的 [VPS][7] 监控能力(比如 CPU、内存、进程、文件系统)和邮件通知功能。 -如果你想要接收 VPS 上任何事件导致的且由 Monit 产生的邮件通知,你可以在 Monit 配置文件中添加以下 SMTP 信息。 +如果你想要接收 VPS 上由 Monit 产生的任何事件的邮件通知,你可以在 Monit 配置文件中添加以下 SMTP 信息。 set mailserver smtp.gmail.com port 587 username "" password "" @@ -134,7 +134,7 @@ ### 总结 ### -如你所见,类似 Gmail 这样免费的 SMTP 服务器有着这么多不同的运用方式 。但再次重申,牢记免费的 SMTP 服务器不适用于商业用途,仅仅适用于个人项目。无论你正在任一款 app 中使用 Gmail SMTP 服务器,欢迎自由分享你的用例。 +如你所见,类似 Gmail 这样免费的 SMTP 服务器有着这么多不同的运用方式 。但再次重申,请牢记免费的 SMTP 服务器不适用于商业用途,仅仅适用于个人项目。无论你正在哪款应用中使用 Gmail SMTP 服务器,欢迎自由分享你的用例。 -------------------------------------------------------------------------------- @@ -142,7 +142,7 @@ via: http://xmodulo.com/send-email-notifications-gmail-smtp-server-linux.html 作者:[Dan Nanni][a] 译者:[cposture](https://github.com/cposture) -校对:[martin2011qi](https://github.com/martin2011qi) +校对:[martin2011qi](https://github.com/martin2011qi), [wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a5b4a7fc6efcf3c9113592eb3646cc2d652181b2 Mon Sep 17 00:00:00 2001 From: ZhangXiangping Date: Mon, 7 Mar 2016 16:12:44 +0800 Subject: [PATCH 1130/1710] Update 20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 个人原因,取消认领。 --- ...20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md | 1 - 1 file changed, 1 deletion(-) 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 index 10a40233e8..19ddcf0e97 100644 --- 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 @@ -1,4 +1,3 @@ -chisper 翻译中 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. From b88c3dce5bc904b5a35ce5d81a608ca3050e4812 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 8 Mar 2016 00:14:56 +0800 Subject: [PATCH 1131/1710] =?UTF-8?q?20160307-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit keywords: Linux Server , SMB , clearos , Zentyal --- ...wo Outstanding All-in-One Linux Servers.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md diff --git a/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md b/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md new file mode 100644 index 0000000000..a291fd2006 --- /dev/null +++ b/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md @@ -0,0 +1,104 @@ +Two Outstanding All-in-One Linux Servers +================================================ + +keywords: Linux Server , SMB , clearos , Zentyal + +![](http://www.linux.com/images/stories/66866/jack-clear_a.png) + +>Figure 1: The ClearOS setup wizard. + +Back in 2000, Microsoft released their Small Business Server. This product changed the way many people viewed how technology could function within the realm of business. Instead of having multiple machines handle different tasks, you could deploy a single server which would handle email, calendaring, file sharing, directory services, VPN, and a whole lot more. For many of small businesses, this was a serious boon, but for some the cost of the Windows SMB was prohibitive. For yet others, the idea of relying on such a server, designed by Microsoft, simply wasn’t an option. + +For that last group, there are alternatives. In fact, within the realm of Linux and open source, you can choose from several solid platforms that can serve your small business as a one-stop server shop. If your small business has between 10 and 50 employees, the all-in-one server might be the ideal solution to meet your needs. + +Here, I’ll look at two Linux all-in-one servers, so you can see if one of them is the perfect match for your company. + +Remember, these servers are not, in any way, suited for big business or enterprise. Larger companies cannot rely on the all-in-one server simply because a single server cannot take the load expected within the realm of enterprise needs. With that said, here’s what SMBs can expect from a Linux all in one. + +### ClearOS + +[ClearOS][1] was originally released in 2009, under the name ClarkConnect, as a router and gateway distribution. Since then, ClearOS has added all the features necessary to define it as an all-in-one server. ClearOS offers more than just a piece of software. You can also purchase a [ClearBox 100][2] or [ClearBox 300][3]. These servers ship complete with ClearOS and are marketed as IT in a box. Check out the feature comparison/price matrix [here][4]. + +For those with hardware already in-house, you can download one of the following: + +- [ClearOS Community][5] — The community (free) edition of ClearOS + +- [ClearOS Home][6] — Ideal for home offices (details on features and subscription costs, see here) + +- [ClearOS Business][7] — Ideal for small businesses (details on features and subscription costs, see here) + +What do you get with ClearOS? You get a business-class server with a single, elegantly designed web interface. What is unique about ClearOS is that you will get plenty of features in the base server; beyond that, you must add on features from the [Clear Marketplace][8]. From within the Marketplace, you can install free or paid apps that extend the feature set of the ClearOS server. Here you’ll find add-ons for Windows Server Active Directory, OpenLDAP, Flexshares, Antimalware, Cloud, Web access control, Content filtering, and much more. You’ll even find some third-party add-ons such as Google Apps Synchronization, Zarafa Collaboration Platform, and Kaspersky Anti-virus. + +ClearOS is installed like any other Linux distribution (based on Red Hat’s Anaconda installer). Once the install is complete, you will be prompted to set up the networking interface as well as presented with the address to point your browser (on the same network as the ClearOS server). The address will be in the form: + +[https://IP_OF_CLEAROS_SERVER:81][9] + +Where IP_OF_CLEAROS_SERVER is the actual IP address of the server. NOTE: When you first point your browser to the server, you will receive a “Connection is not private” warning. Proceed on to the address so you can continue the setup. + +When the browser finally connects, you will be prompted for the root user credentials (you set the root user password up during initial installation). Once authenticated, you will be presented with the ClearOS setup wizard (Figure 1 above). + +Click the Next button to begin the process of setting up your ClearOS server. The wizard is self-explanatory and, in the end, you will be asked which version of ClearOS you want to use. Click either Community, Home, or Business. Once selected, you will be required to register for an account. Once you’ve created an account and registered the server, you can then move on to updating the server, configuring the server, and adding modules from the marketplace (Figure 2). + +![](http://www.linux.com/images/stories/66866/jack-clear_b.png) + +>Figure 2: Installing modules from the marketplace. + +At this point, you are ready to start digging deep into the configuration of your ClearOS small business server. + +### Zentyal + +[Zentyal][10] is a Ubuntu-based small business server that was, at one point, distributed under the name eBox. Zentyal offers plenty of servers/services to fit your SMB needs: + +- Email — Webmail; Native MS Exchange protocols and Active Directory support; Calendars and contacts; Mobile device email sync; Antivirus/antispam; IMAP, POP, SMTP, CalDAV, and CardDAV support + +- Domain & Directory — Central domain directory management; Multiple organization units; Single sign-on authentication; File sharing; ACLs, Advanced domain management, Printer management + +- Networking & Firewall — Static and DHCP interfaces; Objects & services; Packet filter; Port forwarding + +- Infrastructure — DNS; DHCP; NTP; Certification authority; VPN + +- Firewall + +The installation of Zentyal is very much like that of Ubuntu Server—it’s text based and quite simple: Boot up the install media, make a few quick selections, and wait for the installation to complete. Once the initial, text-based, installation is finished, you are presented with the GUI desktop where a wizard will appear for package selection. Select all the packages you want to install and allow the installer to finish the job. + +Finally, you can log into your Zentyal server via the web interface (point your browser to [https://IP_OF_SERVER:8443][11] — where IP_OF_SERVER is the LAN address of the Zentyal server) or use the standalone, desktop GUI to administer the server (Zentyal includes quick access to an Administrator and User console as well as a Zentyal Administration console). When all systems have been saved and started, you will be presented with the Zentyal Dashboard (Figure 3). + +![](http://www.linux.com/images/stories/66866/jack-zentyal_a.png) + +>Figure 3: The Zentyal Dashboard in action. + +The Dashboard allows you to control all aspects of the server, such as updating, managing servers/services, and getting a quick status update of the server. You can also go into the Components area and install components that you opted out of during installation or update the current package list. Click on Software Management > System Updates and select what you want to update (Figure 4), then click the UPDATE button at the bottom of the screen. + +![](http://www.linux.com/images/stories/66866/jack-zentyal_b.png) + +>Figure 4: Updating your Zentyal server is simple. + +### Which Server Is Right for You? + +The answer to this question depends on what you need. Zentyal is an amazing server that does a great job running your SMB network. If you need a bit more, such as groupware, your best bet is to go with ClearOS. If you don’t need groupware, either server will do an outstanding job. + +I highly recommend installing both of these all-in-one servers to see which will best serve your small company needs. + + +------------------------------------------------------------------------------ + +via: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers + +作者:[Jack Wallen][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/93 +[1]: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers#clearfoundation-overview +[2]: https://www.clearos.com/products/hardware/clearbox-100-series +[3]: https://www.clearos.com/products/hardware/clearbox-300-series +[4]: https://www.clearos.com/products/hardware/clearbox-overview +[5]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso +[6]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso +[7]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso +[8]: https://www.clearos.com/products/purchase/clearos-marketplace-overview +[9]: https://ip_of_clearos_server:81/ +[10]: http://www.zentyal.org/server/ +[11]: https://ip_of_server:8443/ From 9f3c6bba6031decfb2afa598a4f6e770d7e867a7 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 8 Mar 2016 06:21:24 +0800 Subject: [PATCH 1132/1710] PUB:20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04 @geekpi --- ...FS Plans Are Lining Up For Ubuntu 16.04.md | 24 +++++++++++++++++++ ...FS Plans Are Lining Up For Ubuntu 16.04.md | 24 ------------------- 2 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 published/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md delete mode 100644 translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md diff --git a/published/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/published/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md new file mode 100644 index 0000000000..5c5f44c803 --- /dev/null +++ b/published/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md @@ -0,0 +1,24 @@ +Ubuntu 16.04 为更好支持容器化而采用 ZFS +======================================================= + +![](https://www.phoronix.com/assets/categories/ubuntu.jpg) + +Ubuntu 开发者正在为 [Ubuntu 16.04 加上 ZFS 支持](http://www.phoronix.com/scan.php?page=news_item&px=ZFS-For-Ubuntu-16.04) ,并且对该文件系统的所有支持都已经准备就绪。 + +Ubuntu 16.04 的默认安装将会继续是 ext4,但是 ZFS 支持将会自动构建进 Ubuntu 发布中,模块将在需要时自动加载,zfsutils-linux 将放到 Ubuntu 主分支内,并且通过 Canonical 对商业客户提供支持。 + +对于那些对 Ubuntu 中的 ZFS 感兴趣的人,Canonical 的 Dustin Kirkland 已经写了[一篇新的博客](http://blog.dustinkirkland.com/2016/02/zfs-is-fs-for-containers-in-ubuntu-1604.html),介绍了一些细节及为何“ZFS 是 Ubuntu 16.04 中面向容器使用的文件系统!” + +------------------------------------------------------------------------------ + +via: https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-ZFS-Continues-16.04&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Phoronix+%28Phoronix%29 + +作者:[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/ + + diff --git a/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md deleted file mode 100644 index efe2ff27bc..0000000000 --- a/translated/tech/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md +++ /dev/null @@ -1,24 +0,0 @@ -Canonical的ZFS计划将会进入Ubuntu 16.04 -======================================================= - -![](https://www.phoronix.com/assets/categories/ubuntu.jpg) - -Ubuntu开发者正在为[Ubuntu 16.04 加上支持ZFS](http://www.phoronix.com/scan.php?page=news_item&px=ZFS-For-Ubuntu-16.04) ,并且所遇的文件系统支持都已经准备就绪。 - -Ubuntu 16.04的默认安装将会继续是ext4,但是ZFS支持将会自动构建进Ubuntu发布中,模块将在需要时自动加载,zfsutils-linux是Ubuntu的一部分,并且通过Canonical对商业客户提供支持 - -对于那些对Ubuntu中的ZFS感兴趣的人,Canonical的Dustin Kirkland已经写了[一篇新的博客](http://blog.dustinkirkland.com/2016/02/zfs-is-fs-for-containers-in-ubuntu-1604.html)覆盖了一些细节及为何“ZFS是Ubuntu 16.04中为容器使用的文件系统!” - ------------------------------------------------------------------------------- - -via: https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-ZFS-Continues-16.04&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Phoronix+%28Phoronix%29 - -作者:[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/ - - From ae61b5a3cf377610f19d5df6395a4a98720c21e1 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 8 Mar 2016 06:34:37 +0800 Subject: [PATCH 1133/1710] PUB:20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms @geekpi --- ...-Signatures-Using-SHA-256512 Algorithms.md | 30 +++++++++++++++++ translated/news/20160226 Development Release | 0 ...-Signatures-Using-SHA-256512 Algorithms.md | 33 ------------------- 3 files changed, 30 insertions(+), 33 deletions(-) create mode 100644 published/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md delete mode 100644 translated/news/20160226 Development Release delete mode 100644 translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md diff --git a/published/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/published/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md new file mode 100644 index 0000000000..4000153d0e --- /dev/null +++ b/published/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md @@ -0,0 +1,30 @@ +OpenSSH 7.2发布,支持 SHA-256/512 的 RSA 签名 +======================================================== + +**2016.2.29,OpenBSD 项目很高兴地宣布 OpenSSH 7.2发布了,并且很块可在所有支持的平台下载。** + +根据内部[发布公告][1],OpenSSH 7.2 主要是 bug 修复,修改了自 OpenSSH 7.1p2 以来由用户报告和开发团队发现的问题,但是我们可以看到几个新功能。 + +这其中,我们可以提到使用了 SHA-256 或者 SHA-256 512 哈希算法的 RSA 签名;增加了一个 AddKeysToAgent 客户端选项,以添加用于身份验证的 ssh-agent 的私钥;和实现了一个“restrict”级别的 authorized_keys 选项,用于存储密钥限制。 + +此外,现在 ssh_config 中 CertificateFile 选项可以明确列出证书,ssh-keygen 现在能够改变所有支持的格式的密钥注释、密钥指纹现在可以来自标准输入,多个公钥可以放到一个文件。 + +### ssh-keygen 现在支持多证书 + +除了上面提到的,OpenSSH 7.2 增加了 ssh-keygen 多证书的支持,一个一行,实现了 sshd_config ChrootDirectory 及Foreground 的“none”参数,“-c”标志允许 ssh-keyscan 获取证书而不是文本密钥。 + +最后但并非最不重要的,OpenSSH 7.3 不再默认启用 rijndael-cbc(即 AES),blowfish-cbc、cast128-cbc 等古老的算法,同样的还有基于 MD5 和截断的 HMAC 算法。在 Linux 中支持 getrandom() 系统调用。[下载 OpenSSH 7.2][2] 并查看更新日志中的更多细节。 + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.shtml + +作者:[Marius Nestor][a] +译者:[geekpi](https://github.com/geekpi) +校对:[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]: http://www.openssh.com/txt/release-7.2 +[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml diff --git a/translated/news/20160226 Development Release b/translated/news/20160226 Development Release deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md deleted file mode 100644 index d3cf0e8e8b..0000000000 --- a/translated/news/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md +++ /dev/null @@ -1,33 +0,0 @@ -使用SHA-256/512算法作为RSA签名的OpenSSH 7.2发布了 -======================================================== - -**今天,2016.2.29,OpenBSD项目很高兴地宣布OpenSSH 7.2发布了,并且很块可在所有支持的平台下载。** - -根据内部[发布公告][1],该公告附在了文章的最后,OpenSSH 7.2主要是bug修复,修改了自OpenSSH 7.1p2以来由用户报告和开发团队发现的问题,但是我们可以看到几个新功能。 - -这其中,我们可以提到使用了SHA-256 或者 SHA-256 512哈希算法的RSA签名,增加了一个AddKeysToAgent客户端选项添加用于身份验证的ssh-agent的私钥,和实现了一个“restrict”级别的authorized_keys选项用于存储键限制。 - -此外,现在ssh_config中CertificateFile选项可以明确列出证书,ssh-keygen现在能够改所有支持的格式的密钥注释、指纹可以来自标准输入,文件可含多个公钥。 - -### ssh-keygen现在支持多证书 - -除了上面提到的,OpenSSH 7.2正加了ssh-keygen多证书的支持,一个一行,实现了sshd_config ChrootDirectory及前台的0参数,“-c”标志允许ssh-keyscan取回证书而不是文本密钥。 - -最后但并非最不重要的,OpenSSH 7.3不再默认启用rijndael-cbc也叫AES,blowfish-cbc、古老的cast128-cbc密码,同样还有基于MD5和截断的HMAC算法。getrandom()系统调用在Linux中支持。[下载OpenSSH 7.2][2]并在更新日志中查看更细节的在本主要更新中修复的问题。 - - - - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/openssh-7-2-out-now-with-support-for-rsa-signatures-using-sha-256-512-algorithms-501111.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://www.openssh.com/txt/release-7.2 -[2]: http://linux.softpedia.com/get/Security/OpenSSH-4474.shtml From 713b5517acfaa51371157df316f6959ff22cec25 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 8 Mar 2016 07:28:41 +0800 Subject: [PATCH 1134/1710] PUB:20160218 Best Linux Desktop Environments for 2016 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @GHLandy  翻译的不错,很流畅 --- ...est Linux Desktop Environments for 2016.md | 90 +++++++++++++++++++ ...est Linux Desktop Environments for 2016.md | 90 ------------------- 2 files changed, 90 insertions(+), 90 deletions(-) create mode 100644 published/20160218 Best Linux Desktop Environments for 2016.md delete mode 100644 translated/tech/20160218 Best Linux Desktop Environments for 2016.md diff --git a/published/20160218 Best Linux Desktop Environments for 2016.md b/published/20160218 Best Linux Desktop Environments for 2016.md new file mode 100644 index 0000000000..6ac25a27c5 --- /dev/null +++ b/published/20160218 Best Linux Desktop Environments for 2016.md @@ -0,0 +1,90 @@ +2016:如何选择 Linux 桌面环境 +============================================= + +![](http://www.linux.com/images/stories/66866/DE-2.png) + +Linux 创建了一个友好的环境,为我们提供了选择的可能。比方说,现代大多数的 Linux 发行版都提供不同桌面环境给我们来选择。在本文中,我将挑选一些你可能会在 Linux 中见到的最棒的桌面环境来介绍。 + +## Plasma + +我认为,[KDE 的 Plasma 桌面](https://www.kde.org/workspaces/plasmadesktop/) 是最先进的桌面环境 (LCTT 译注:译者认为,没有什么是最好的,只有最合适的,毕竟每个人的喜好都不可能完全相同)。它是我见过功能最完善和定制性最高的桌面环境;在用户完全自主控制方面,即使是 Mac OS X 和 Windows 也无法与之比拟。 + +我爱 Plasma,因为它自带了一个非常好的文件管理器 —— Dolphin。而相对应 Gnome 环境,我更喜欢 Plasma 的原因就在于这个文件管理器。使用 Gnome 最大的痛苦就是,它的文件管理器——Files——使我无法完成一些基本任务,比如说,批量文件重命名操作。而这个操作对我来说相当重要,因为我喜欢拍摄,但 Gnome 却让我无法批量重命名这些图像文件。而使用 Dolphin 的话,这个操作就像在公园散步一样简单。 + +而且,你可以通过插件来增强 Plasma 的功能。Plasma 有大量的基础软件,如 Krita、Kdenlive、Calligra 办公套件、digiKam、Kwrite 以及由 KDE 社区开发维护的大量应用。 + +Plasma 桌面环境唯一的缺陷就是它默认的邮件客户端——Kmail。它的设置比较困难,我希望 Kmail 设置可以配置地址簿和日历。 + +包括 openSUSE 在内的多数主流发行版多使用 Plasma 作为默认桌面。 + +## GNOME + +[GNOME](https://www.gnome.org/) (GNU Network Object Model Environment,GNU 网络对象模型环境) 由 [Miguel de Icaza](https://en.wikipedia.org/wiki/Miguel_de_Icaza) 和 Federico Mena 在 1997 年的时候创立,这是因为 KDE 使用了 Qt 工具包,而这个工具包是使用专属许可证 (proprietary license) 发布的。不像提供了大量定制的 KDE,GNOME 专注于让事情变得简单。因为其自身的简单性和易用性,GNOME 变得相当流行。而我认为 GNOME 之所以流行的原因在于,Ubuntu——使用 GNOME 作为默认桌面的主流 Linux 发行版之一——对其有着巨大的推动作用。 + +随着时代变化,GNOME 也需要作出相应的改变了。因此,开发者在 GNOME 3 中推出了 GNOME 3 Shell,从而引出了它的全新设计规范。但这同时与 Canonical 的 Ubuntu 计划存在者一些冲突,所以 Canonical 为 GNOME 开发了叫做 Unity 的自己的 Shell。最初,GNOME 3 Shell 因很多争议 (issues) 而困扰不已——最明显的是,升级之后会导致很多扩展无法正常工作。由于设计上的重大改版以及各种问题的出现,GNOME 便产生了很多分支(fork),比如 Cinnamon 和 Mate 桌面。 + +另外,使得 GNOME 让人感兴趣的是,它针对触摸设备做了优化,所以,如果你有一台触屏笔记本电脑的话,GNOME 则是最合适你这台电脑的桌面环境。 + +在 3.18 版本中,GNOME 已经作出了一些令人印象深刻的改动。其中他们所做的最让人感兴趣的是集成了 Google Drive,用户可以把他们的 Google Drive 挂载为远程存储设备,这样就不必再使用浏览器来查看里边的文件了。我也很喜欢 GNOME 里边自带的那个优秀的邮件客户端,它带有日历和地址簿功能。尽管有这么多些优秀的特性,但它的文件管理器使我不再使用 GNOME ,因为我无法处理批量文件重命名。我会坚持使用 Plasma,一直到 GNOME 的开发者修复了这个小缺陷。 + +![](http://www.linux.com/images/stories/66866/DE-fig1.png) + +## Unity + +从技术上来说,[Unity](https://unity.ubuntu.com/) 并不是一个桌面环境,它只是 Canonical 为 Ubuntu 开发的一个图形化 Shell。Unity 运行于 GNOME 桌面之上,并使用很多 GNOME 的应用和工具。Ubuntu 团队分支了一些 GNOME 组件,以便更好的满足 Unity 用户的需求。 + +Unity 在 Ubuntu 的融合(convergence)计划中扮演着重要角色, 在 Unity 8 中,Canonical 公司正在努力将电脑桌面和移动世界结合到一起。Canonical 同时还为 Unity 开发了许多的有趣技术,比如 HUD (Head-up Display,平视显示)。他们还在 lenses 和 scopes 中通过一种独特的技术来让用户方便地找到特定内容。 + +即将发行的 Ubuntu 16.04,将会搭载 Unity 8,那时候用户就可以完全体验开发者为该开源软件添加的所有特性了。其中最大的争议之一,Unity 可选取消集成了 Amazon Ads 和其他服务。而在即将发行的版本,Canonical 从 Dash 移除了 Amazon ads,但却默认保证了系统的隐私性。 + +## Cinnamon + +最初,[Cinnamon](https://en.wikipedia.org/wiki/Cinnamon_(software\)) 由 [Linux Mint](http://www.linuxmint.com/) 开发 —— 这是 DistroWatch.com 上统计出来最流行的发行版。就像 Unity,Cinnamon 是 GNOME Shell 的一个分支。但最后进化为一个独立的桌面环境,这是因为 Linux Mint 的开发者分支了 GNOME 桌面中很多的组件到 Cinnamon,包括 Files ——以满足自身用户的需求。 + +由于 Linux Mint 基于普通版本的 Ubuntu,开发者仍需要去完成 Ubuntu 尚未完成的目标。结果,尽管前途光明,但 Cinnamon 却充满了 Bugs 和问题。随着 17.x 本版的发布,Linux Mint 开始转移到 Ubuntu 的 LTS 版本上,从而他们可以专注于开发 Cinnamon 的核心组件,而不必再去担心代码库。转移到 LTS 的好处是,Cinnamon 变得非常稳定并且基本没有 Bugs 出现。现在,开发者已经开始向桌面环境中添加更多的新特性了。 + +对于那些更喜欢在 GNOME 基础上有一个很好的类 Windows 用户界面的用户来说,Cinnamon 是他们最好的桌面环境。 + +## MATE 桌面 + +[MATE 桌面](http://mate-desktop.com/) 同样是 GNOME 的一个分支,然而,它并不像 Cinnamon 那样由 GNOME 3 分支而来,而是现在已经没有人维护的 GNOME 2 代码库的一个分支。MATE 桌面中的一些开发者并不喜欢 GNOME 3 并且想要“继续坚持” GNOME 2,所以他们使用这个代码库来创建来 MATE。为避免和 GNOME 3 的冲突,他们重命名了全部的包:Nautilus 改为 Caja、Gedit 改为 Pluma 以及 Evince 改为 Atril 等。 + +尽管 MATE 延续了 GNOME 2,但这并不意味着他们使用过时的技术;相反,他们使用了更新的技术来提供一个现代的 GNOME 2 体验。 + +拥有相当高的资源使用率才是 MATE 最令人印象深刻之处。你可将它运行在老旧硬件或者更新一些的但不太强大的硬件上,如树梅派 (Raspberry Pi) 或者 Chromebook Flip。使得它更有让人感兴趣的是,把它运行在一些强大的硬件上,可以节省大多数的资源给其他应用,而桌面环境本身只占用很少的资源。 + +## LXQt + +[LXQt](http://lxqt.org/) 继承了 LXDE ——最轻量级的桌面环境之一。它融合了 LXDE 和 Razor-Qt 两个开源项目。LXQt 的首个可用本版(v 0.9)发布于 2015 年。最初,开发者使用了 Qt4 ,之后为了加快开发速度,而放弃了兼容性,他们移动到 Qt5 和 KDE 框架上。我也在自己的 Arch 系统上尝试使用了 LXQt,它的确是一个非常好的轻量级桌面环境。但在完全接过 LXDE 的传承之前,LXQt 仍有一段很长的路需要走。 + +## Xfce + +[Xfce](http://www.xfce.org/) 早于 KDE 桌面环境,它是最古老和最轻量级的桌面环境。Xfce 的最新版本是 4.15,发布于 2015 年,使用了诸如 GTK+ 3 的大量的现代科技。很多发行版都使用了 Xfce 环境以满足特定需求,比如 Ubuntu Studio ——与 MATE 类似——尽量节省系统资源给其他的应用。并且,许多的著名的 Linux 发行版——包括 Manjaro Linux、PC/OS、Salix 和 Mythbuntu ——都把它作为默认桌面环境。 + +## Budgie + +[Budgie](https://solus-project.com/budgie/) 是一个新型的桌面环境,由 Solus Linux 团队开发和维护。Solus 是一个从零开始构建的新型发行版,而 Budgie 则是它的一个核心组件。Budgie 使用了大量的 GNOME 组件,从而提供一个华丽的用户界面。由于没有该桌面环境的更多信息,我特地联系了 Solus 的核心开发者—— Ikey Doherty。他解释说:“我们搭载了自己的桌面环境—— Budgie 桌面。与其他桌面环境不同的是,Budgie 并不是其他桌面的一个分支,它的目标是彻底融入到 GNOME 协议栈之中。它完全从零开始编写,并特意设计来迎合 Solus 提供的体验。我们会尽可能的和 GNOME 的上游团队协同工作,修复 Bugs,并提倡和支持他们的工作”。 + +## Pantheon + +我想,[Pantheon](https://elementary.io/) 不需要特别介绍了吧,那个优美的 elementary OS 就使用它作为桌面。类似于 Budgie,很多人都认为 Pantheon 也不是 GNOME 的一个分支。elementary OS 团队大多拥有良好的设计从业背景,所以他们会近距离关注每一个细节,这使得 Pantheon 成为一个非常优美的桌面环境。偶尔,它可能缺少像 Plasma 等桌面中的某些特性,但开发者实际上是尽其所能的去坚持设计原则。 + +![](http://www.linux.com/images/stories/66866/DE-3.png) + +## 结论 + +当我写完本文后,我突然意识到来开源和 Linux 的重大好处。总有一些东西适合你。就像 Jon “maddog” Hall 在最近的 SCaLE 14 上说的那样:“是的,现在有 300 多个 Linux 发行版。我可以一个一个去尝试,然后坚持使用我最喜欢的那一个”。 + +所以,尽情享受 Linux 的多样性吧,最后使用最合你意的那一个。 + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/software/applications/881107-best-linux-desktop-environments-for-2016 + +作者:[Swapnil Bhartiya][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/61003 diff --git a/translated/tech/20160218 Best Linux Desktop Environments for 2016.md b/translated/tech/20160218 Best Linux Desktop Environments for 2016.md deleted file mode 100644 index b9306b79be..0000000000 --- a/translated/tech/20160218 Best Linux Desktop Environments for 2016.md +++ /dev/null @@ -1,90 +0,0 @@ -2016:如何选择 Linux 桌面环境 -============================================= - -![](http://www.linux.com/images/stories/66866/DE-2.png) - -Linux 创建了一个相对友好的环境,为我们提供了选择的可能。比方说,现代大多数的 Linux 发行版都提供不同桌面环境给我们来选择。在本文中,我将挑选一些你可能会在 Linux 中见到的相对较好的桌面环境来介绍。 - -## Plasma - -我认为,[KDE’s Plasma desktop](https://www.kde.org/workspaces/plasmadesktop/) 是最高级的桌面环境 (LCTT 译注:译者认为,没有什么是最好的,只有最合适的,毕竟每个人的喜好都不可能完全相同)。它是我见过功能最完善和定制性最高的桌面环境;在用户完全自主控制方面,即使是 Mac OS X 和 Windows 也无法与之比拟。 - -我爱 Plasma,因为它自带了一个非常好的文件管理器——Dolphin。而相对应 Gnome 环境,我更喜欢 Plasma 的原因就在于文件管理器。使用 Gnome 最大的痛苦就是,它的文件管理器——Files——使我无法完成一些基本任务,比如说,批量文件重命名操作。而这个操作对我来说相当重要,因为我喜欢拍摄,但 Gnome 却让我无法批量重命名这些图像文件。而使用 Dolphin 的话,这个操作就像在公园散步一样简单。 - -而且,你可以通过插件来增强 Plasma 的功能。Plasma 有大量的基础软件,如 Krita、Kdenlive、Calligra 办公套件、digiKam、Kwrite 以及由 KDE 社区开发维护的大量应用。 - -Plasma 桌面环境唯一的缺陷就是它默认的邮件客户端——Kmail。它的设置比较困难,我希望 Kmail 设置可以配置地址簿和日历。 - -包括 openSUSE 在内的多数主流发行版多使用 Plasma 作为默认桌面。 - -## GNOME - -[GNOME](https://www.gnome.org/) (GNU Network Object Model Environment,GNU 网络对象模型环境) 由 [Miguel de Icaza](https://en.wikipedia.org/wiki/Miguel_de_Icaza) 和 Federico Mena 在 1997 年的时候创立,这是因为 KDE 使用来 Qt 工具包,而这个工具包是使用专业许可证 (proprietary license) 发布的。和 KDE 不一样的是,GNOME 提供了大量的定制,它专注于让事情变得简单。因为 自身的简单性和易用性,GNOME 变得相当流行。而我认为 GNOME 之所以流行的原因在于,Ubuntu——使用 GNOME 作为默认桌面的主流 Linux 发行版之一——对其有着巨大的推动作用。 - -随着时代变化,GNOME 也需要作出相应的改变了。因此,开发者通过 GNOME 3 推出了 GNOME 3 Shell,从而引出它全新的设计规范。但这同时与 Canonical 的 Ubuntu 计划存在者一些冲突,所以 Canonical 为 GNOME 开发来叫做 Unity 的特有 Shell。最初,GNOME 3 Shell 因很多争议 (issues) 而困扰不已——最明显的是,升级之后会导致很多扩展无法正常工作。由于设计上的重大改版以及各种问题的出现,GNOME 便产生来很多分支,比如 Cinnamon 和 Mate 桌面。 - -也就是说,使得 GNOME 有趣的是,它针对触摸设备做了优化,所以,如果你有一台触屏笔记本电脑的话,GNOME 则是最合适你这台电脑的桌面环境。 - -在 3.18 版本中,GNOME 已经作出了一些令人印象深刻的改动。其中他们所做的最有趣的是集成了 Google Drive,用户可以把他们的 Google Drive 挂载为远程存储设备,这样就不必在使用浏览器来查看里边的文件来。我也很喜欢 GNOME 里边自带的那个优秀的邮件客户端,它带有日历和地址簿功能。尽管有这么多些优秀的特性,但它的文件管理器使我不再使用 GNOME ,因为我无法处理批量文件重命名。我会坚持使用 Plasma,一直到 GNOME 的开发者修复了这个小缺陷。 - -![](http://www.linux.com/images/stories/66866/DE-fig1.png) - -## Unity - -从技术上来说,[Unity](https://unity.ubuntu.com/) 并不是一个桌面环境,它只是 Canonical 为 Ubuntu 开发的一个图形化 Shell。Unity 运行于 GNOME 桌面之上,并使用很多 GNOME 的应用和工具。Ubuntu 团队分支了一些 GNOME 组件,以便更好的满足 Unity 用户的需求。 - -Unity 在 Ubuntu 故事集和 Unity 8 中扮演者重要角色,Canonical 公司正在努力将电脑桌面和移动世界结合到一起。Canonical 同时还为 Unity 开发了许多的有趣技术,比如 HUD (Head-up Display,平视显示)。他们还有一种独特的技术来然用户在镜片上的某范围找到特定内容。 - -即将发行的 Ubuntu 16.04,将会搭载 Unity 8,那时候用户就可以完全体验开发者为该开源软件添加的所有特性了。其中最大的争议就是,Unity 不再集成 Amazon Ads 和其他服务。即将发行的版本,虽然 Canonical 从 Dash 移除了 Amazon ads,但却默认保证了系统的隐私性。 - -## Cinnamon - -最初,[Cinnamon](https://en.wikipedia.org/wiki/Cinnamon_(software)) 由 [Linux Mint](http://www.linuxmint.com/) 开发 —— DistroWatch.com 上统计出来最流行的发行版。就像 Unity,Cinnamon 是 GNOME Shell 的一个分支。但最后进化为一个独立的桌面环境,这是因为 Linux Mint 的开发者分支了 GNOME 桌面中很多的组件到 Cinnamon,包括 Files ——以满足自身用户的需求。 - -由于 Linux Mint 基于普通版本的 Ubuntu,开发者仍需要去完成 Ubuntu 尚未完成的目标。结果,尽管前途光明,但 Cinnamon 却充满了 Bugs 和问题。随着 17.x 本版的发布,Linux Mint 开始移动到 Ubuntu 的 LTS 版本上,从而他们可以专注于开发 Cinnamon 的核心组件,而不必再去担心代码库。移动到 LTS 的好处是,Cinnamon 变得非常稳定并且基本没有 Bugs 出现。现在,开发者已经开始向桌面环境中添加更多的新特性来。 - -对于那些更喜欢在 GNOME 基础上有一个很好的类 Windows 用户界面的用户来说,Cinnamon 是他们最好的桌面环境。 - -## MATE Desktop - -[MATE desktop](http://mate-desktop.com/) 同样是 GNOME 的一个分支,然而,它并不像 Cinnamon 那样由 GNOME 3 分支,而是现在已经没有人维护的 GNOME 2 代码库的一个分支。MATE desktop 中的一些开发者并不喜欢 GNOME 3 并且想要“继续坚持” GNOME 2,所以他们使用这个代码库来创建来 MATE。为避免和 GNOME 3 的冲突,他们重命名了全部的包:Nautilus 改为 Caja、Gedit 改为 Pluma 以及 Evince 改为 Atril 等。 - -尽管 MATE 延续了 GNOME 2,但这并不意味着他们使用过时的技术;相反,他们使用了更新的技术来提供一个现代的 GNOME 2 体验。 - -拥有相当高的资源效率才是 MATE 最令人印象深刻之处。你可将它运行在老旧硬件或者很少更新的强大硬件上,如树梅派 (Raspberry Pi) 或者 Chromebook Flip。使得它更有趣的是,把它运行在一些强大的硬件上,可以节省大多数的资源给其他应用,而桌面环境本身只占用很少的资源。 - -## LXQt - -[LXQt](http://lxqt.org/) 继承了 LXDE ——最轻量级的桌面环境之一。它融合了 LXDE 和 Razor-Qt 两个开源项目。LXQt 的首个可用本版 V 0.9 发布于 2015 年。最初,开发者使用了 Qt4 但向下兼容,之后为了加快开发速度,他们移动到 Qt5 和 KDE 框架上。我也在自己的 Arch 系统上尝试使用了 LXQt,它的确是一个非常好的轻量级桌面环境。但在完全继承 LXDE 之前,LXQt 仍有一段很长的路需要走。 - -## Xfce - -[Xfce](http://www.xfce.org/) 早于 KDE 桌面环境,它是最古老和最轻量级的桌面环境。Xfce 的最新版本是 4.15,发布于 2015 年,使用了诸如 GTK + 3 的大量的现代科技。很多发行版都使用了 Xfce 环境以满足特定需求,比如 Ubuntu Studio ——与 MATE 类似——尽量节省系统资源给其他的应用。并且,许多的著名的 Linux 发行版——包括 Manjaro Linux、PC/OS、Salix 和 Mythbuntu ——都把它作为默认桌面环境。 - -## Budgie - -[Budgie](https://solus-project.com/budgie/) 是一个新型的桌面环境,由 Solus Linux 团队开发和维护。Solus 是一个从零开始构建的新型发行版,而 Budgie 则是它的一个核心组件。Budgie 使用了大量的 GNOME 组件,从而提供一个华丽的用户界面 (UI)。由于没有该桌面环境的更多信息,我特地联系了 Solus 的核心开发者—— Ikey Doherty。他解释说:“我们搭载了自己的桌面环境—— Budgie。与其他桌面环境不同的是,Budgie 并不是其他桌面的一个分支,它的目标是侧底融入到 GNOME 协议栈之中。它完全从零开始编写,并特意的设计来迎合 Solus 提供的体验。我们会尽可能的和 GNOME 的上游团队协同工作,修复 Bugs,并提倡和支持他们的工作”。 - -## Pantheon - -我想,[Pantheon](https://elementary.io/) 不需要特别介绍了吧,那个优美的 elementary OS 就使用它作为桌面。类似于 Budgie,很多人都认为 Pantheon 也不是 GNOME 的一个分支。elementary OS 团队大多拥有良好的设计背景,所以他们会近距离关注每一个细节,这使得 Pantheon 成为一个非常优美的桌面环境。在某个瞬间,它可能缺少像 Plasma 等桌面中的某些特性,但开发者实际上是尽其所能的去坚持设计原则。 - -![](http://www.linux.com/images/stories/66866/DE-3.png) - -## 结论 - -当我写完本文后,我突然意识到来开源和 Linux 的重大好处。总有一个发行版本适合你。就像 Jon “maddog” Hall 在最近的 SCaLE 14 上说的那样:“是的,现在有 300 多个 Linux 发行版。我可以一个一个去尝试,然后坚持使用我最喜欢的那一个”。 - -所以,尽情享受 Linux 的多样性吧,最后使用最合你意的那一个。 - ------------------------------------------------------------------------------- - -via: http://www.linux.com/news/software/applications/881107-best-linux-desktop-environments-for-2016 - -作者:[Swapnil Bhartiya][a] -译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linux.com/community/forums/person/61003 From 30b627dd8dd9e129ed819acb0001e960cc514f28 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 8 Mar 2016 10:09:48 +0800 Subject: [PATCH 1135/1710] [translating] 20151202 A new Mindcraft moment.md --- sources/tech/20151202 A new Mindcraft moment.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151202 A new Mindcraft moment.md b/sources/tech/20151202 A new Mindcraft moment.md index 79930e8202..92c645ea4b 100644 --- a/sources/tech/20151202 A new Mindcraft moment.md +++ b/sources/tech/20151202 A new Mindcraft moment.md @@ -1,3 +1,4 @@ +zpl1025 A new Mindcraft moment? ======================= From ce7f446503587fece9c0c2f48e3a74e9ec530eac Mon Sep 17 00:00:00 2001 From: Markgolzh Date: Tue, 8 Mar 2016 11:45:33 +0800 Subject: [PATCH 1136/1710] Update 20160303 Top 5 open source command shells for Linux.md --- .../tech/20160303 Top 5 open source command shells for Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160303 Top 5 open source command shells for Linux.md b/sources/tech/20160303 Top 5 open source command shells for Linux.md index 74c135e594..d097928ace 100644 --- a/sources/tech/20160303 Top 5 open source command shells for Linux.md +++ b/sources/tech/20160303 Top 5 open source command shells for Linux.md @@ -1,3 +1,4 @@ +翻译中;by ![zky001](https://github.com/LCTT/TranslateProject/edit/master/sources/tech/20160303%20Top%205%20open%20source%20command%20shells%20for%20Linux.md) Top 5 open source command shells for Linux =============================================== From 6f5538280d2b42e80d335bc86a48333fd1e0e571 Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 8 Mar 2016 23:06:44 +0800 Subject: [PATCH 1137/1710] Update and rename translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md to published/20151028 Bossie Awards 2015--The best open source networking and security software.md --- ...source networking and security software.md | 162 +++++++++++++++++ ...source networking and security software.md | 164 ------------------ 2 files changed, 162 insertions(+), 164 deletions(-) create mode 100644 published/20151028 Bossie Awards 2015--The best open source networking and security software.md delete mode 100644 translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md diff --git a/published/20151028 Bossie Awards 2015--The best open source networking and security software.md b/published/20151028 Bossie Awards 2015--The best open source networking and security software.md new file mode 100644 index 0000000000..d245fe2a4c --- /dev/null +++ b/published/20151028 Bossie Awards 2015--The best open source networking and security software.md @@ -0,0 +1,162 @@ +2015 Bossie 评选:最佳开源网络和安全软件 +================================================================================ +InfoWorld 在建设网络,运营网络和保障网络安全领域精选出了年度开源工具获奖者。 + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-net-sec-100614459-orig.jpg) + +### 最佳开源网络和安全软件 ### + +[BIND](https://en.wikipedia.org/wiki/BIND), [Sendmail](https://en.wikipedia.org/wiki/Sendmail), [OpenSSH](https://en.wikipedia.org/wiki/OpenSSH), [Cacti](https://en.wikipedia.org/wiki/Cactus), [Nagios](https://en.wikipedia.org/wiki/Nagios), [Snort](https://en.wikipedia.org/wiki/Snort_%28software%29) -- 这些为了网络而生的开源软件,好些家伙们老而弥坚。今年在这个范畴的最佳选择中,你会发现中坚、支柱、新人和新贵云集,他们正在完善网络管理,安全监控,漏洞评估,[rootkit](https://en.wikipedia.org/wiki/Rootkit) 检测,以及很多方面。 + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-icinga-100614482-orig.jpg) + +### Icinga 2 ### + +Icinga 起先只是系统监控应用 Nagios 的一个分支。[Icinga 2][1] 经历了完全的重写,为用户带来了时尚的界面,对多数据库的支持,以及一个集成众多扩展的 API。凭借着配置好的负载均衡、通知和配置文件,Icinga 2 缩短了在复杂环境下安装的时间。Icinga 2 原生支持 [Graphite](https://github.com/graphite-project/graphite-web)(系统监控应用),轻松为管理员呈现实时性能图表。不过真的让 Icinga 今年重新火起来的原因是 Icinga Web 2 的发布,那是一个支持可拖放定制的 dashboard 和一些流式监控工具的前端图形界面系统 。 + +管理员可以查看,过滤,并把问题按优先顺序排好,同时保持跟踪已经进行的动作。一个新的矩阵视图使管理员能够在一个页面上查看主机和服务。你可以通过查看特定时间段的事件或筛选事件类型来了解哪些事件需要立即关注。虽然 Icinga Web 2 有着全新界面和更为强劲的性能,不过对于传统版 Icinga 和 Web 版 Icinga 的所有常用命令还是照旧支持的。这意味着学习新版工具不耗费额外的时间。 + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-zenoss-100614465-orig.jpg) + +### Zenoss Core ### + +另一个强大的开源软件,[Zenoss Core][2] 为网络管理员提供了一个完整的,一站式解决方案来跟踪和管理所有的应用程序、服务器、存储,网络组件、虚拟化工具、以及企业基础架构的其他元素。管理员可以确保硬件的运行效率并利用 ZenPacks 中模块化设计的插件来扩展功能。 + +Zenoss Core 5,在今年二月发布,保留了已经很强大的工具,并进一步改进以增强用户界面和扩展 dashboard。基于 Web 的控制台和 dashboard 已经是高度可定制并动态调整的存在了,现在新版本还能让管理员混搭多个组件图表到一个图表。想来这定是一个更好的根源分析和因果分析的工具。 + +Portlets 为网络映射、设备问题、守护进程、产品状态、监视列表和事件视图等等提供深入的分析。而且新的 HTML5 图表可以从工具导出。Zenoss 的控制中心支持带外管理并且可监控所有 Zenoss 组件。Zenoss Core 拥有在线备份和恢复、快照和回滚以及多主机部署的新工具。更重要的是,凭借对 Docker 的全面支持,部署起来更快了。 + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-opennms-100614461-orig.jpg) + +### OpenNMS ### + +作为一个非常灵活的网络管理解决方案,[OpenNMS][3] 可以处理任何网络管理任务,无论是设备管理,应用性能监控,库存控制,或事件管理。凭借对 IPv6 的支持,强大的警报系统和记录用户脚本来测试 Web 应用程序的能力,OpenNMS 拥有网络管理员和测试人员需要的一切。OpenNMS 现在变得像一款移动 dashboard,堪称 OpenNMS 指南针,可让网络专家随时,甚至在外出时都可以监视他们的网络。 + +该应用程序的 IOS 版本,可从 [iTunes App Store][4] 上获取,显示故障、节点和告警。下一个版本将提供更多的事件细节、资源图表、以及关于 IP 和 SNMP 接口的信息。安卓版可从 [Google Play][5] 上获取,可在 dashboard 上显示网络可用性,故障和告警,以及确认、提升或清除告警的能力。移动客户端与 OpenNMS Horizon 1.12 或更高版本以及 OpenNMS Meridian 2015.1.0 或更高版本兼容。 + +-- Fahmida Rashid + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-onion-100614460-orig.jpg) + +### Security Onion ### + +如同一个洋葱,网络安全监控是由许多层组成。没有任何一个单一的工具可以让你洞察每一次攻击,为你显示你公司网络中的每一次侦查或是会话的足迹。[Security Onion][6] 在一个简单易用的 Ubuntu 发行版中打包了许多经过验证的工具,这会让你看到谁留在你的网络里,并帮助你隔离这些坏家伙。 + +无论你是采取主动式的网络安全监测还是追查可能的攻击,Security Onion 都可以帮助你。Onion 由传感器、服务器和显示层组成,结合了基于网络和基于主机的入侵检测,全面的网络数据包捕获,并提供了所有类型的日志以供检查和分析。 + +这是一个众星云集的的网络安全工具链,包括用于网络抓包的 [Netsniff-NG](http://www.netsniff-ng.org/)、基于规则的网络入侵检测系统 Snort 和 [Suricata](https://en.wikipedia.org/wiki/Suricata_%28software%29),基于分析的网络监控系统 Bro,基于主机的入侵检测系统 OSSEC 和用于显示、分析和日志管理的 Sguil、Squert、Snorby 和 ELSA (企业日志搜索和归档)。是一个经过精挑细选的工具集,所有的这些全被打包进一个向导式的安装程序并有完整的文档支持,可以帮助你尽可能快地上手监控。 + +-- Victor R. Garza + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-kali-100614458-orig.jpg) + +Kali Linux + +[Kali Linux][7] 背后的团队今年改版了流行的安全 Linux 发行版,使其更快,更全能。Kali 采用全新 4.0 版的内核 ,改进了对硬件和无线驱动程序的支持,并且界面更为流畅。最常用的工具都可从屏幕的侧边栏上轻松找到。而最大的最大的改变是 Kali Linux 现在是一个滚动发行版,具有持续的软件更新。Kali 的核心系统是基于 Debian Jessie,而且该团队会不断地从 Debian 测试版 pull 软件包,并持续的在上面添加 Kali 风格的新特性。 + +该发行版仍然配备满了渗透测试,漏洞分析,安全审查,网络应用分析,无线网络评估,逆向工程,和漏洞利用工具。现在该发行版具有新版本检测系统,当有个别工具可更新时系统会自动通知用户。该发行版还具有一系列设备的 ARM 镜像,包括树莓派、[Chromebook](https://en.wikipedia.org/wiki/Chromebook) 和 [Odroid](https://en.wikipedia.org/wiki/ODROID),也更新了 Android 设备上运行的 [NetHunter](https://www.kali.org/kali-linux-nethunter/) 渗透测试平台。还有其他的变化:Metasploit 的社区版/专业版不再包括在内,因为 Kali 2.0 还没有 [Rapid7 的官方支持][8]。 + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-openvas-100614462-orig.jpg) + +### OpenVAS ### + +开放式漏洞评估系统 [OpenVAS][9],是一个整合多种服务和工具来提供漏洞扫描和漏洞管理的软件框架。该扫描器与每周一次的网络漏洞测试数据配合,或者你可以使用商业数据。该软件框架包括一个命令行界面(以使其可以用脚本运行)和一个带 SSL 安全机制的基于 [Greenbone 安全助手][10] 的浏览器界面。OpenVAS 提供了用于附加功能的各种插件。扫描可以预定运行或按需运行。 + +可通过单一的主控来控制多个 OpenVAS 的安装,这使其成为了一个可扩展的企业漏洞评估工具。该项目兼容的标准使其可以:将扫描结果和配置存储在 SQL 数据库中,在那里他们可以容易地被外部报告工具访问。客户端工具通过基于 XML 的无状态 OpenVAS 管理协议访问 OpenVAS 管理器,所以安全管理员可以扩展该框架的功能。该软件能以软件包或源代码的方式安装在 Windows 或 Linux 上运行,或者作为一个虚拟应用下载。 + +-- Matt Sarrel + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-owasp-100614463-orig.jpg) + +### OWASP ### + +[OWASP][11](开放式 Web 应用程序安全项目 )是专注于提高软件安全性的在全球各地拥有分会的非营利组织。由这个社区性的组织提供测试工具、文档、培训和几乎任何你可以想象的开发安全软件相关的软件安全评估和最佳做法。有一些 OWASP 项目已成为很多安全从业者工具箱中的重要组件: + +[ZAP][12](ZED 攻击代理项目)是一个在 Web 应用程序中寻找漏洞的渗透测试工具。ZAP 的设计目标之一是使之易于使用,以便于那些并非安全领域专家的开发人员和的测试人员在使用中能得到帮助。ZAP 提供自动扫描和一套手动测试工具集。 + +[Xenotix XSS Exploit Framework][13] 是一个先进的跨站点脚本漏洞检测和漏洞利用框架,该框架通过在浏览器引擎内执行扫描以获取真实结果。Xenotix 扫描模块使用了三个智能的模糊器,使其可以运行近 5000 种不同的 XSS 有效载荷。API 可以让安全管理员扩展和定制漏洞测试工具包。 + +[O-Saft][14](OWASP SSL 高级审查工具)是一个查看 SSL 证书详细信息和测试 SSL 连接的 SSL 审计工具。这个命令行工具可以在线或离线运行来评估 SSL ,比如密码和配置是否安全。O-Saft 提供了常见漏洞的内置检查,你可以容易地通过编写脚本来扩展这些功能。在 2015 年 5 月加入了一个简单的图形用户界面作为可选的下载项。 + +[OWTF][15](攻击性的 Web 测试框架)是一个遵循 OWASP 测试指南和 NIST 和 PTES 标准的自动化测试工具。该框架同时使用 Web 用户界面和命令行,用于探测 Web 和应用服务器的常见漏洞,如配置失当和软件未打补丁。 + +-- Matt Sarrel + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-beef-100614456-orig.jpg) + +### BeEF ### + +Web 浏览器已经成为用于针对客户端的攻击中最常见的载体。[BeEF][15] 浏览器漏洞利用框架项目,是一种广泛使用的用以评估 Web 浏览器安全性的渗透工具。BeEF 通过浏览器来启动客户端攻击,帮助你暴露出客户端系统的安全弱点。BeEF 建立了一个恶意网站,安全管理员用想要测试的浏览器访问该网站。然后 BeEF 发送命令来攻击 Web 浏览器并使用命令在客户端机器上植入软件。随后管理员就可以把客户端机器看作尸体般发动攻击了。 + +BeEF 自带像键盘记录,端口扫描和 Web 代理这样的常用模块,此外你可以编写你自己的模块或直接将命令发送到被控制的测试机上。BeEF 带有少量的演示网页来帮你快速入门,使得编写额外的网页和攻击模块变得非常简单,这使得你可以因地适宜的自定义你的测试。BeEF 是一个非常有价值的评估浏览器和终端安全、学习如何发起基于浏览器攻击的测试工具。可以使用它来向你的用户综合演示,那些恶意软件通常是如何感染客户端设备的。 + +-- Matt Sarrel + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-unhide-100614464-orig.jpg) + +### Unhide ### + +[Unhide][16] 是一个定位开放的 TCP/UDP 端口和隐藏在 UNIX、Linux 和 Windows 上的进程的审查工具。隐藏的端口和进程可能是由于运行 Rootkit 或 LKM(可加载的内核模块) 导致的。Rootkit 可能很难找到并移除,因为它们就是针对隐蔽性设计的,在操作系统和用户前隐藏自己。一个 Rootkit 可以使用 LKM 隐藏其进程或冒充其他进程,让它在机器上运行很长一段时间而不被发现。而 Unhide 可以使管理员们确信他们的系统是干净的。 + +Unhide 实际上是两个单独的脚本:一个用于进程,一个用于端口。该工具查询正在运行的进程、线程和开放的端口并将这些信息与系统中注册的活动比较,报告之间的差异。Unhide 和 WinUnhide 是在运行命令行产生文本输出的非常轻量级的脚本。它们不算优美,但是极为有用。Unhide 还列入了 [Rootkit Hunter][17] 项目中。 + +-- Matt Sarrel + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-main-100614457-orig.jpg) + +查看更多的开源软件优胜者 + +InfoWorld 网站的 2014 年最佳开源奖由下至上表扬了 100 多个开源项目。通过以下链接可以查看更多开源软件中的翘楚: + +[2015 Bossie 评选:最佳开源应用程序][18] + +[2015 Bossie 评选:最佳开源应用程序开发工具][19] + +[2015 Bossie 评选:最佳开源大数据工具][20] + +[2015 Bossie 评选:最佳开源数据中心和云计算软件][21] + +[2015 Bossie 评选:最佳开源桌面和移动端软件][22] + +[2015 Bossie 评选:最佳开源网络和安全软件][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] +译者:[robot527](https://github.com/robot527) +校对:[校对者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 diff --git a/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md b/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md deleted file mode 100644 index a073ce5349..0000000000 --- a/translated/share/20151028 Bossie Awards 2015--The best open source networking and security software.md +++ /dev/null @@ -1,164 +0,0 @@ -Martin - -2015 Bossie 评选:最佳开源网络和安全软件 -================================================================================ -InfoWorld 在建设网络,运营网络和保障网络安全领域精选出了年度开源工具获奖者。 - -![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-net-sec-100614459-orig.jpg) - -### 最佳开源网络和安全软件 ### - -[BIND](https://en.wikipedia.org/wiki/BIND), [Sendmail](https://en.wikipedia.org/wiki/Sendmail), [OpenSSH](https://en.wikipedia.org/wiki/OpenSSH), [Cacti](https://en.wikipedia.org/wiki/Cactus), [Nagios](https://en.wikipedia.org/wiki/Nagios), [Snort](https://en.wikipedia.org/wiki/Snort_%28software%29) -- 这些为了网络而发明的开源软件,许多老家伙和好东西依然强劲。今年在我们这个范畴的最佳选择中,你会发现中坚支柱,新人,和新贵正在完善网络管理,安全监控,漏洞评估,[rootkit](https://en.wikipedia.org/wiki/Rootkit) 检测,以及更多。 - -![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-icinga-100614482-orig.jpg) - -### Icinga 2 ### - -Icinga 起先只是系统监控应用 Nagios 的一个分叉。为了给用户一个时尚的界面,对多个数据库的支持,以及一个集成众多扩展的 API,[Icinga 2][1] 被完全重写。凭借开箱即用的负载均衡、通知和配置,Icinga 2 缩短了在复杂环境下的安装时间。Icinga 2 原生支持 [Graphite](https://github.com/graphite-project/graphite-web)(系统监控应用),轻松为管理员呈现实时性能图表。但是 Icinga 今年很火是因为它发布了一个支持可拖放可定制 dashboard 和一些流式监控工具的前端图形界面系统 Icinga Web 2。 - -管理员可以查看,过滤,并把问题按优先顺序排好,同时保持跟踪已经进行的动作。一个新的矩阵视图使管理员能够在一个页面上查看主机和服务。您可以查看一个特定时间段的事件或筛选了的事件来了解哪些需要立即关注。Icinga Web 2 能够拥有一个全新界面和更为强劲的性能,然而传统版 Icinga 和 Web 版 Icinga 的所有常用命令仍然可用。这意味着学习新版工具不耗费额外的时间。 - --- Fahmida Rashid - -![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-zenoss-100614465-orig.jpg) - -### Zenoss Core ### - -另一个强大的开源软件,[Zenoss Core][2] 为网络管理员提供了一个完整的,一站式解决方案来跟踪和管理所有的应用程序、服务器、存储,网络组件、虚拟化工具、以及企业基础架构的其他元素。管理员可以确保硬件的运行效率并利用模块化设计的插件来扩展 ZenPacks 的功能。 - -Zenoss Core 5,在今年二月发布,作为已经很强大的工具,并进一步改进以增强用户界面和扩展 dashboard。基于 Web 的控制台和 dashboard 已经是高度可定制的和动态调整的,现在新版本可让管理员混搭多个组件图表到一个图表。可把它作为一种更好的根源分析和因果分析的工具。 - -Portlets 为网络映射、设备问题、守护进程、产品状态、监视列表和事件视图等等提供深入的分析。而且新的 HTML5 图表可以从工具导出。Zenoss 的控制中心支持带外管理并且可监控所有 Zenoss 组件。Zenoss Core 拥有在线备份和恢复、快照和回滚和多主机部署的新工具。更重要的是,凭借对 Docker 的全面支持,部署起来更快了。 - --- Fahmida Rashid - -![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-opennms-100614461-orig.jpg) - -### OpenNMS ### - -一个非常灵活的网络管理解决方案,[OpenNMS][3] 可以处理任何网络管理任务,无论是设备管理,应用性能监控,库存控制,或事件管理。凭借对 IPv6 的支持,强大的警报系统,和记录用户脚本来测试 Web 应用程序的能力,OpenNMS 拥有网络管理员和测试人员需要的一切。OpenNMS 现在变得像一款移动 dashboard,堪称 OpenNMS 指南针,可让网络专家随时,甚至当他们外出时都可以监视他们的网络。 - -该应用程序的 IOS 版本,可从 [iTunes App Store][4] 上获取,显示故障、节点和告警。下一个版本将提供更多的事件细节、资源图表、以及关于 IP 和 SNMP 接口的信息。安卓版可从 [Google Play][5] 上获取,可在仪表板上显示网络可用性,故障和告警,以及确认、提升或清除告警的能力。移动客户端与 OpenNMS Horizon 1.12 或更高版本以及 OpenNMS Meridian 2015.1.0 或更高版本兼容。 - --- Fahmida Rashid - -![](http://images.techhive.com/images/article/2015/09/bossies-2015-onion-100614460-orig.jpg) - -### Security Onion ### - -如同一个洋葱,网络安全监控是由许多层组成。没有单一的工具会使你洞察在你公司网络中的每次攻击,或者显示每一次侦查或文本会话给你。[Security Onion][6] 打包了许多经过验证的工具成为一个便于使用的 Ubuntu 发行版,这会让你看到谁留在你的网络里,并帮助你隔离坏家伙。 - -无论你是采取主动式的网络安全监测还是追查可能的攻击,Security Onion 都可以帮助你。由传感器、服务器和显示层组成,Onion 结合了基于网络和基于主机的入侵检测,全面的网络数据包捕获,并提供了所有的各种日志进行检查和分析。 - -众星云集的的网络安全工具链,包括用于网络抓包的 [Netsniff-NG](http://www.netsniff-ng.org/)、基于规则的网络入侵检测系统 Snort 和 [Suricata](https://en.wikipedia.org/wiki/Suricata_%28software%29),基于分析的网络监控系统 Bro,基于主机的入侵检测系统 OSSEC 和用于显示、分析和日志管理的 Sguil、Squert、Snorby 和 ELSA (企业日志搜索和归档)。它是一个经过精挑细选的工具集,全被打包进一个向导驱动式的安装程序并有完整的文档支持,可以帮助你尽可能快地进行监控。 - --- Victor R. Garza - -![](http://images.techhive.com/images/article/2015/09/bossies-2015-kali-100614458-orig.jpg) - -Kali Linux - -[Kali Linux][7] 背后的团队修改了今年流行的安全 Linux 发行版,使其更快,更全能。Kali 采用全新 4.0 版的内核 ,改进了对硬件和无线驱动程序的支持,以及一个更流畅的界面。最流行的工具都可从屏幕的侧边栏上轻松访问。最大的改变?Kali Linux 现在是一个滚动发行版,具有连续的软件更新。Kali 的核心系统是基于 Debian Jessie 发行版,而且该团队会不断地从 Debian 测试版 pull 程序包,同时持续在上面添加新的 Kali 风格的特性。 - -该发行版仍然配备满了渗透测试,漏洞分析,安全审查,网络应用分析,无线网络评估,逆向工程,和漏洞利用工具。现在该发行版具有新版本检测系统,当有个别工具可更新时系统会自动通知用户。该发行版还具有一系列设备的 ARM 映像,包括树莓派、[Chromebook](https://en.wikipedia.org/wiki/Chromebook) 和 [Odroid](https://en.wikipedia.org/wiki/ODROID),也可更新在 Android 设备上运行的 [NetHunter](https://www.kali.org/kali-linux-nethunter/) 渗透测试平台。还有其他的变化:Metasploit 的社区版/专业版不再包括在内,因为 Kali 2.0 还没有 [Rapid7 的官方支持][8]。 - --- Fahmida Rashid - -![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-openvas-100614462-orig.jpg) - -### OpenVAS ### - -[OpenVAS][9],开源漏洞评估系统,是一种整合多种服务和工具来提供漏洞扫描和漏洞管理的软件框架。该扫描器与每周一次的网络漏洞测试数据配合,或者您可以使用商业数据。该软件框架包括一个命令行界面(所以它可以用脚本运行)和一个带 SSL 安全机制的基于 [Greenbone 安全助手][10] 的浏览器界面。OpenVAS 提供了用于附加功能的各种插件。扫描可以预定运行或按需运行。 - -可通过单一的主控来控制多个 OpenVAS 的安装,使得它成为一个可扩展的企业漏洞评估工具。该项目与兼容这样的标准:扫描结果和配置存储在 SQL 数据库中,在那里他们可以容易地被外部报告工具访问。客户端工具通过基于 XML 的无状态 OpenVAS 管理协议访问 OpenVAS 管理器,所以安全管理员可以扩展该框架的功能。该软件能以包或源代码的方式安装在 Windows 或 Linux 上运行,或者作为一个虚拟设备被下载。 - --- Matt Sarrel - -![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-owasp-100614463-orig.jpg) - -### OWASP ### - -[OWASP][11],开放的 Web 应用安全项目,是专注于提高软件安全性的全球协会的非营利组织。社区性组织提供测试工具、文档、培训和几乎任何你可以想象的评估软件安全和开发安全软件相关的最佳实践。有几个 OWASP 项目已成为很多安全从业者的工具箱中有价值的组件: - -[ZAP][12],ZED 攻击代理项目,是一个在 Web 应用程序中寻找漏洞的渗透测试工具。ZAP 的设计目标之一是使之易于使用,以便于开发人员和非安全专家的测试人员可以受益于使用它。ZAP 提供了自动扫描器和一套手动测试工具。 - -[Xenotix XSS Exploit Framework][13] 是一款运行浏览器引擎内的扫描来获得实际结果的先进的跨站脚本漏洞检测和漏洞利用框架。Xenotix 扫描器模块采用三个智能的 fuzzer,它可以运行近 5000 个不同的XSS有效载荷。一个 API 可以让安全管理员扩展和定制开发工具包。 - -[O-Saft][14],OWASP SSL 高级审查工具,一个查看 SSL 证书详细信息和测试 SSL 连接的 SSL 审计工具。这个命令行工具可以在线或离线运行来评估 SSL 安全性,比如密码和配置。O-Saft 提供了常见漏洞的内置检查,你可以容易地通过编写脚本来扩展这些功能。在 2015 年 5 月加入了一个简单的图形用户界面作为可选的下载项。 - -[OWTF][15],攻击性的 Web 测试框架,一个遵循 OWASP 测试指南和 NIST 和 PTES 标准的自动化测试工具。该框架使用一个 Web 用户界面和一个命令行,它探测 Web 和应用服务器常见漏洞,如配置不当和未打补丁的软件。 - --- Matt Sarrel - -![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-beef-100614456-orig.jpg) - -### BeEF ### - -Web 浏览器已经成为用于针对客户端的攻击中最常见的载体。[BeEF][15] 浏览器漏洞利用框架项目,是一种广泛使用的用以评估 Web 浏览器安全性的渗透工具。BeEF 帮助你揭露客户端系统的安全弱点,通过启动浏览器来进行客户端攻击。BeEF 建立了一个恶意网站,安全管理员用想要测试的浏览器访问该网站。然后 BeEF 发送命令来攻击 Web 浏览器并使用命令在客户端机器上植入软件。如果他们是僵尸机 ,管理员可以对客户端机器发动攻击。 - -BeEF 自带像键盘记录器,一个端口扫描器,和 Web 代理这样的常用模块,此外你可以编写你自己的模块或直接将命令发送到僵尸测试机。BeEF 带有少量的演示网页来帮你快速入门使得编写额外的网页和攻击模块很简单,因此你可以自定义测试你的环境。BeEF 是一个评估浏览器和终端安全、学习如何发起基于浏览器的攻击的宝贵的测试工具。可使用它来展示恶意软件通常如何感染客户端设备的演示给你的用户。 - --- Matt Sarrel - -![](http://images.techhive.com/images/article/2015/09/bossies-2015-unhide-100614464-orig.jpg) - -### Unhide ### - -[Unhide][16] 是一个定位开放的 TCP/UDP 端口和隐藏在 UNIX、Linux 和 Windows 上的进程的审查工具。隐藏的端口和进程可以是 rootkit 或 LKM(可加载的内核模块)activity 的结果。rootkit 可能很难找到并移除,因为它们被设计成隐蔽的,对操作系统和用户隐藏自己。一个 rootkit 可以使用内核模块隐藏其进程或冒充其他进程,让它在机器上运行很长一段时间而不被发现。Unhide 可以保证管理员需要的干净系统。 - -Unhide 实际上是两个单独的脚本:一个用于进程,一个用于端口。该工具查询正在运行的进程、线程和开放的端口并将这些信息与系统中注册的活动比较,报告之间的差异。Unhide 和 WinUnhide 是在运行命令行产生文本输出的非常轻量级的脚本。它们不算优美,但是极为有用。Unhide 还列入了 [Rootkit Hunter][17] 项目中。 - --- Matt Sarrel - -![](http://images.techhive.com/images/article/2015/09/bossies-2015-main-100614457-orig.jpg) - -查看更多的开源软件优胜者 - -InfoWorld 网站的 2014 年最佳开源奖从堆栈底部到顶部庆祝了 100 多个开源项目。以下链接指向更多开源软件优胜者: - -[2015 Bossie 评选:最佳开源应用程序][18] - -[2015 Bossie 评选:最佳开源应用程序开发工具][19] - -[2015 Bossie 评选:最佳开源大数据工具][20] - -[2015 Bossie 评选:最佳开源数据中心和云计算软件][21] - -[2015 Bossie 评选:最佳开源桌面和移动端软件][22] - -[2015 Bossie 评选:最佳开源网络和安全软件][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] -译者:[robot527](https://github.com/robot527) -校对:[校对者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 From ff3a7953ec02d5d3626fc060797ee43d6fd8e96a Mon Sep 17 00:00:00 2001 From: runningwater Date: Wed, 9 Mar 2016 00:47:10 +0800 Subject: [PATCH 1138/1710] =?UTF-8?q?=E6=9A=82=E5=AD=98=E4=B8=80=E9=83=A8?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160225 The Tao of project management.md | 121 ++++++++---------- 1 file changed, 54 insertions(+), 67 deletions(-) diff --git a/sources/tech/20160225 The Tao of project management.md b/sources/tech/20160225 The Tao of project management.md index a8de86ae0b..5cea94472d 100644 --- a/sources/tech/20160225 The Tao of project management.md +++ b/sources/tech/20160225 The Tao of project management.md @@ -1,119 +1,105 @@ -(翻译中 by runningwater) -The Tao of project management +项目管理之道 ================================= ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUSINESS_orgchart1.png?itok=DGsp6jB5) -The [Tao Te Ching][1], [believed to have been written][2] by the sage [Lao Tzu][3] in the 6th century BCE, is among the most widely translated texts in existence. It has inspired everything from [religions][4] to [funny movies about dating][5], and authors have used it as a metaphor to explain all kinds of things (even [programming][6]). +[道德经][1],[据确认][2]为公元前六世纪的圣人[老子][3]所编写,是现存被翻译的语言版本最多的经文。从[宗教][4]到[关于约会的有趣电影][5]等一切的一切,它都影响至深,作者们借用它来隐喻,以解释各种各样的事情(甚至是[编程][6])。 -This text is what immediately comes to my mind when thinking about project management in open organizations. +当考虑开放性组织的项目管理时上面这段文字会立马浮现在我脑海。 -That might sound strange. But to understand where I'm coming from, you should start by reading *The Open Organization: Igniting Passion and Performance*, Red Hat president and CEO Jim Whitehurst's manifesto on corporate culture and the new leadership paradigm. In this book, Jim (with a little help from other Red Hatters) explains the difference between conventional organizations (a "top-down" approach, with decisions coming down from central command to employees motivated by promotion and pay) and open organizations (a bottom-up approach, with leaders focused on inspiring purpose and passion so employees are empowered to be and do their best). +这听起来会很奇怪。要理解我为什么会有这种想法,应该是从读了*《开放性组织:点燃激情提升执行力》*这书开始的,它是红帽公司总裁、CEO Jim Whitehurst 所著作的关于企业文化和新领导榜样的宣言。在这本书里,Jim(给予其它红帽子人的一点帮助而) 解释了传统组织机构(“自上而下”的方式,做决定的是高层,命令下达到员工,而员工是通过薪酬和晋升来激励的)和开放组织机构(自下而上,领导专注于激励和鼓励,员工被充分授权使其发挥主观能动性而做得最好)的差异。 -This concept—that employees in open organizations are motivated by passion, purpose, and engagement—plays directly into where I think project managers should focus. +在开放性组织中的员工意味有激情、有目的性和有参与感,这些我认为是项目管理者应该关注的。 -And to explain, I'll return to the *Tao Te Ching*. +要解释这一切,让我们回到*道德经*上来。 -### Don't let your job title define you +### 不要让工作职衔框住自身 ->The tao that can be told ->is not the eternal Tao ->The name that can be named ->is not the eternal Name. +>道,可道, +>非常道; +>名,可名, +>非常名。 ->The unnameable is the eternally real. ->Naming is the origin ->of all particular things. +>无,名天地之始; +>有,名万物之母。 [[1]][7] -What exactly is project management? And what does a project manager do? +项目管理到底是什么?做为一个项目管理者应该做些什么呢? -As you might expect, part of being a project manager is managing projects: gathering requirements, managing stakeholder communication, setting priority, scheduling tasks, helping the team resolve blockers. Many institutions can teach you how to manage projects very well, and these are good skills to have. +如您所想,项目管理者的一部分工作就是管理项目:收集需求、项目相关人员的沟通、设置项目优先级、安排任务、帮助团队解决困扰。许多教育培训机构都可以教授如何做好项目管理,这些技能值得去学习。 -However, literally managing projects is only part of what project managers in open organizations do. These organizations require something more: Courage. If you're good at managing projects (or if you're good at any job, really), then you can start to feel safe in your routine. That's when you know you need to find the courage to take a risk. +然而,在开放性组织中,字面上的项目管理技能仅仅只是项目管理者需要做到一小部分,这些组织需要更多的:勇气。如果您擅长于管理项目(或者是真的擅长于任何工作),那么您就进入了舒适区。这时候就是需要鼓起勇气开始尝试冒险之时。 -Do you have the courage to step outside of your comfort zone? The courage to ask important people challenging questions that might raise eyebrows, but that might also uncover a better way forward? The courage to identify the next thing that needs to be done—then the courage to go and do it? The courage to call out communication gaps and take initiative to fix them? The courage to try things? The courage to fail? +您有勇气跨出舒适区吗?向权威人士提出提出挑战性问题,可能会引发对方的不快,也可能会发现一个好的方法,您有勇气这样做吗?有确定需要做的下一件事,然后真正去完成它的勇气吗?有主动去解决因为沟通空白而留下的问题的勇气吗?有去尝试各种事情的勇气吗?有失败的勇气吗? -The opening passage of the Tao Te Ching (which I cited above) suggests that words, labels, and names are limiting. That includes job titles. In open organizations, project managers don't just perform the rote tasks required to manage projects. They help teams accomplish the organization's mission, however defined. +道德经的开篇(上面引用的)就表明词语、标签、名字这些是有限制的,也包括工作职衔。在开放性组织中,项目经理不仅仅是执行管理项目所需的机械任务,而且要帮助团队完成组织的使命,尽管只是定义。 -### Connect the right people +### 结交正确的人 ->We join spokes together in a wheel, ->but it is the center hole ->that makes the wagon move. +>三十辐共一毂, +>当其无, +>有车之用。 [[11]][8] -One of the most difficult lessons I had to learn as I transitioned into project management was that not having all the answers was perfectly acceptable, even expected. That was new for me. I like having all the answers. But as a project manager, my role is more about connecting people—so the ones who do have the answers can collaborate efficiently. +当我开始学习要过渡到项目管理时,遇到最困难的一课就是并不是所有解决方案都是可接受的,甚至有的连预期都达不到。那对我来说是全新的,我喜欢所有的解决方案。但作为项目管理者,我的角色更多的是与人沟通--因此与那些有解决方案的人合作更有效率。 -This does not mean dodging responsibility or ownership. This means being comfortable saying, "I don't know, but I will find out for you," and closing that loop as quickly as possible. +这决不是逃避责任和不负责的意思。这意味着可以很舒适的说,“我不知道,但我会给您找出答案”,然后就可迅速的关闭此循环。 -Picture a wagon wheel. Without the stability and direction provided by the center hole, the spokes would fall and the wheel collapse in on itself. Project managers in an open organization can help a team maintain forward momentum by bringing the right people together and cultivating the right discussions. +想像马车的车轮。无中心孔的稳定性和方向,辐条车轮会自行崩溃。在一个开放性的组织中,项目管理者可以帮助一个团队,把正确的人凝聚在一起,主持积极讨论,以保持团队一直前进。 -### Trust your team +### 信任您的团队 ->When the Master governs, the people ->are hardly aware that he exists. ->Next best is a leader who is loved. ->Next, one who is feared. ->The worst is one who is despised. +>太上, 不知有之; +>其次,亲而誉之; +>其次,畏之; +>其次,侮之。 > ->If you don't trust the people, ->you make them untrustworthy. +>信不足焉,有不信焉。 > ->The Master doesn't talk, he acts. ->When his work is done, ->the people say, "Amazing: ->we did it, all by ourselves!" +>悠兮,其贵言。功成事遂,百姓皆谓“我自然”。 [[17]][9] -[Rebecca Fernandez][10] once told me that what differentiates leaders in open organizations is not the trust people have in them, but the trust they have in other people. +[Rebecca Fernandez][10]曾经告诉我开放性组织的领导与其它最大的不同点,不是取得别人的信任,而是信任别人。 -Open organizations do a great job hiring smart people who are passionate about what their companies are doing. In order for them to do their best work, we have to give them what they need and then get out of their way. +开放性组织会雇佣那些非常聪明的,且对公司正在做的事情充满激情的人来做工作。为了能使他们能更好的工作,我们会提供其所需,并尊重他们的工作方式。 -Here, I think the above passage from the Tao Te Ching speaks for itself. +至于原因,我认为从道德经中摘出的上面一段就说的很清楚。 -### Be effortless +### 顺其自然 ->The Master does nothing ->yet he leaves nothing undone. ->The ordinary man is always doing things, ->yet many more are left to be done. +>上德无为而无以为;下德为之而有以为。 [[38]][11] -Do you know the type of person who is always extremely busy? The one who seems frazzled and stressed with too many things to do? +你认识总是忙忙碌碌的这种类型的人吗?认识因为有太多事情要做而看起来疲倦和压抑的人吗? -Don't be that person. +不要成为那样的人。 -I know that's easier said than done. The thing that most helps me keep from being that person is remembering that we are all extremely busy. I don't have a single co-worker who is bored. +我知道说比做容易。要远离那种人最有帮助的事就是请记住大家都很忙。我没有那样讨厌的同事。 -But someone needs to be the calm in the middle of the storm. Someone needs to be the person who reassures the team that everything is going to be okay, that we'll find a way to get things done within the parameters dictated by reality and the number of business hours in a day (because that's the truth, and we have to). +但需要有人在狂风暴雨中保持镇定;需要这样的人,能根据实际和一天工作时间的数量找到平衡参数的方式来做工作,并安慰团队让一切都好(因为这是我们正在做的事实)。 -Be that person. +要成为那样的人。 -What this passage of the Tao Te Ching says to me is that the person who's always talking about what she or he is doing has no time to actually do those things. If you can make your job seem effortless to those around you, then you're doing your job right. +道德经所说的,在我理解来就是总是夸夸其谈的人其实并没有干实事。如里您能把工作做的得心应手的话,那就说明您的工作做对了。 -### Be a culture coach +### 作为一个文化传教士 ->When a superior man hears of the Tao, ->he immediately begins to embody it. ->When an average man hears of the Tao, ->he half believes it, half doubts it. ->When a foolish man hears of the Tao, ->he laughs out loud. ->If he didn't laugh, ->it wouldn't be the Tao. +>上士闻道,勤而行之; +>中士闻道,若存若亡; +>下士闻道,大笑之。 +>不笑不足以为道。 [[41]][12] -Last fall, I enrolled an MBA business ethics class with a bunch of federal employees. When I started describing my company's culture, values, and ethics framework, I got the direct impression that both my classmates and my professor thought I was a naive young lady with [a lot of lovely daydreams][13] about how companies should run. They told me things couldn't possibly be as they seemed. They said I should investigate further. +去年秋天,我跟着一群联邦雇员注册了一个工商管理硕士课程。当我开始介绍我公司的文化、价值和伦理框架以及公司如何运行时,我的同学和教授都认为我就像一个天真可爱的小姑娘在做着[许多甜美的白日梦][13],这就是我得到的直接印象。他们告诉我事情并不是如此的。他们告诉我应该进一步考察。 -So I did. +所有我照做了。 -And here's what I found: Things are exactly as they seem. +到现在我发现:正是如此。 -In open organizations, culture matters. Maintaining that culture as an organization grows makes it possible to wake up and look forward to going to work in the morning. I (and other members of open organizations) don't want to "work to live," as my classmates described it. I need to feel a passion and purpose, to understand how the work I do on a daily basis directly contributes to something I believe in. +开放性组织的企业文化。应该跟随着企业的成长而时时维护那些文化,以使它随时精神焕发,充满斗志。我(和其它开源组织的成员)并不想过如我同学所描述的“为生活而工作”。我需要有激情和有目的性;我需要明白自己的日常工作如何对那些有价值的东西服务。 -As a project manager, you might think that your job has nothing to do with cultivating your company's culture on your team. However, it's your job to embody it. +作为一个项目管理者,虽然你的工作与培养你的团队的文化无关,但是工作本身就是文化。 ### Kaizen @@ -168,6 +154,7 @@ via: https://opensource.com/open-organization/16/2/tao-project-management [6]: http://www.mit.edu/~xela/tao.html [7]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#1 [8]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#11 +[9]:http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#17 [10]: https://opensource.com/users/rebecca [11]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#38 [12]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#41 From 8235a9fd5731180e2ae8ba80bc5281d0cea99c26 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Mar 2016 10:51:43 +0800 Subject: [PATCH 1139/1710] PUB:20151204 Review EXT4 vs. Btrfs vs. XFS @ictlyh --- .../20151204 Review EXT4 vs. Btrfs vs. XFS.md | 65 +++++++++++++++++++ .../20151204 Review EXT4 vs. Btrfs vs. XFS.md | 65 ------------------- 2 files changed, 65 insertions(+), 65 deletions(-) create mode 100644 published/20151204 Review EXT4 vs. Btrfs vs. XFS.md delete mode 100644 translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md diff --git a/published/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/published/20151204 Review EXT4 vs. Btrfs vs. XFS.md new file mode 100644 index 0000000000..aebbc485b1 --- /dev/null +++ b/published/20151204 Review EXT4 vs. Btrfs vs. XFS.md @@ -0,0 +1,65 @@ +如何选择文件系统:EXT4、Btrfs 和 XFS +================================================================================ +![](http://1969324071.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers.jpg) + +老实说,人们最不曾思考的问题之一是他们的个人电脑中使用了什么文件系统。Windows 和 Mac OS X 用户更没有理由去考虑,因为对于他们的操作系统,只有一种选择,那就是 NTFS 和 HFS+。相反,对于 Linux 系统而言,有很多种文件系统可以选择,现在默认的是广泛采用的 ext4。然而,现在也有改用一种称为 btrfs 文件系统的趋势。那是什么使得 btrfs 更优秀,其它的文件系统又是什么,什么时候我们又能看到 Linux 发行版作出改变呢? + +首先让我们对文件系统以及它们真正干什么有个总体的认识,然后我们再对一些有名的文件系统做详细的比较。 + +### 文件系统是干什么的? ### + +如果你不清楚文件系统是干什么的,一句话总结起来也非常简单。文件系统主要用于控制所有程序在不使用数据时如何存储数据、如何访问数据以及有什么其它信息(元数据)和数据本身相关,等等。听起来要编程实现并不是轻而易举的事情,实际上也确实如此。文件系统一直在改进,包括了更多的功能、更高效地完成它需要做的事情。总而言之,它是所有计算机的基本需求、但并不像听起来那么简单。 + +### 为什么要分区? ### + +由于每个操作系统都能创建或者删除分区,很多人对分区都有模糊的认识。Linux 操作系统即便使用标准安装过程,在同一块磁盘上仍使用多个分区,这看起来很奇怪,因此需要一些解释。拥有不同分区的一个主要目的就是为了在灾难发生时能获得更好的数据安全性。 + +通过将硬盘划分为分区,数据会被分隔以及重组。当事故发生的时候,只有存储在被损坏分区上的数据会被破坏,很大可能上其它分区的数据能得以保留。这个原因可以追溯到 Linux 操作系统还没有日志文件系统、任何电力故障都有可能导致灾难发生的时候。 + +使用分区也考虑到了安全和健壮性原因,因此操作系统部分损坏并不意味着整个计算机就有风险或者会受到破坏。这也是当前采用分区的一个最重要因素。举个例子,用户创建了一些会填满磁盘的脚本、程序或者 web 应用,如果该磁盘只有一个大的分区,如果磁盘满了那么整个系统就不能工作。如果用户把数据保存在不同的分区,那么就只有那个分区会受到影响,而系统分区或者其它数据分区仍能正常运行。 + +记住,拥有一个日志文件系统只能在掉电或者和存储设备意外断开连接时提供数据安全性,并不能在文件系统出现坏块或者发生逻辑错误时保护数据。对于这种情况,用户可以采用廉价磁盘冗余阵列(RAID:Redundant Array of Inexpensive Disks)的方案。 + +### 为什么要切换文件系统? ### + +ext4 文件系统由 ext3 文件系统改进而来,而后者又是从 ext2 文件系统改进而来。虽然 ext4 文件系统已经非常稳定,是过去几年中绝大部分发行版的默认选择,但它是基于陈旧的代码开发而来。另外, Linux 操作系统用户也需要很多 ext4 文件系统本身不提供的新功能。虽然通过某些软件能满足这种需求,但性能会受到影响,在文件系统层次做到这些能获得更好的性能。 + +### Ext4 文件系统 ### + +ext4 还有一些明显的限制。最大文件大小是 16 tebibytes(大概是 17.6 terabytes),这比普通用户当前能买到的硬盘还要大的多。使用 ext4 能创建的最大卷/分区是 1 exbibyte(大概是 1,152,921.5 terabytes)。通过使用多种技巧, ext4 比 ext3 有很大的速度提升。类似一些最先进的文件系统,它是一个日志文件系统,意味着它会对文件在磁盘中的位置以及任何其它对磁盘的更改做记录。纵观它的所有功能,它还不支持透明压缩、重复数据删除或者透明加密。技术上支持了快照,但该功能还处于实验性阶段。 + +### Btrfs 文件系统 ### + +btrfs 有很多不同的叫法,例如 Better FS、Butter FS 或者 B-Tree FS。它是一个几乎完全从头开发的文件系统。btrfs 出现的原因是它的开发者起初希望扩展文件系统的功能使得它包括快照、池化(pooling)、校验以及其它一些功能。虽然和 ext4 无关,它也希望能保留 ext4 中能使消费者和企业受益的功能,并整合额外的能使每个人,尤其是企业受益的功能。对于使用大型软件以及大规模数据库的企业,让多种不同的硬盘看起来一致的文件系统能使他们受益并且使数据整合变得更加简单。删除重复数据能降低数据实际使用的空间,当需要镜像一个单一而巨大的文件系统时使用 btrfs 也能使数据镜像变得简单。 + +用户当然可以继续选择创建多个分区从而无需镜像任何东西。考虑到这种情况,btrfs 能横跨多种硬盘,和 ext4 相比,它能支持 16 倍以上的磁盘空间。btrfs 文件系统一个分区最大是 16 exbibytes,最大的文件大小也是 16 exbibytes。 + +### XFS 文件系统 ### + +XFS 文件系统是扩展文件系统(extent file system)的一个扩展。XFS 是 64 位高性能日志文件系统。对 XFS 的支持大概在 2002 年合并到了 Linux 内核,到了 2009 年,红帽企业版 Linux 5.4 也支持了 XFS 文件系统。对于 64 位文件系统,XFS 支持最大文件系统大小为 8 exbibytes。XFS 文件系统有一些缺陷,例如它不能压缩,删除大量文件时性能低下。目前RHEL 7.0 文件系统默认使用 XFS。 + +### 总结 ### + +不幸的是,还不知道 btrfs 什么时候能到来。官方说,其下一代文件系统仍然被归类为“不稳定”,但是如果用户下载最新版本的 Ubuntu,就可以选择安装到 btrfs 分区上。什么时候 btrfs 会被归类到 “稳定” 仍然是个谜, 直到真的认为它“稳定”之前,用户也不应该期望 Ubuntu 会默认采用 btrfs。有报道说 Fedora 18 会用 btrfs 作为它的默认文件系统,因为到了发布它的时候,应该有了 btrfs 文件系统校验器。由于还没有实现所有的功能,另外和 ext4 相比性能上也比较缓慢,btrfs 还有很多的工作要做。 + +那么,究竟使用哪个更好呢?尽管性能几乎相同,但 ext4 还是赢家。为什么呢?答案在于易用性以及广泛性。对于桌面或者工作站, ext4 仍然是一个很好的文件系统。由于它是默认提供的文件系统,用户可以在上面安装操作系统。同时, ext4 支持最大 1 exabytes 的卷和 16 terabytes 的文件,因此考虑到大小,它也还有很大的进步空间。 + +btrfs 能提供更大的高达 16 exabytes 的卷以及更好的容错,但是,到现在为止,它感觉更像是一个附加的文件系统,而部署一个集成到 Linux 操作系统的文件系统。比如,尽管 btrfs 支持不同的发行版,使用 btrfs 格式化硬盘之前先要有 btrfs-tools 工具,这意味着安装 Linux 操作系统的时候它并不是一个可选项,即便不同发行版之间会有所不同。 + +尽管传输速率非常重要,评价一个文件系统除了文件传输速度之外还有很多因素。btrfs 有很多好用的功能,例如写复制(Copy-on-Write)、扩展校验、快照、清洗、自修复数据、冗余删除以及其它保证数据完整性的功能。和 ZFS 相比 btrfs 缺少 RAID-Z 功能,因此对于 btrfs, RAID 还处于实验性阶段。对于单纯的数据存储,和 ext4 相比 btrfs 似乎更加优秀,但时间会验证一切。 + +迄今为止,对于桌面系统而言,ext4 似乎是一个更好的选择,因为它是默认的文件系统,传输文件时也比 btrfs 更快。btrfs 当然值得尝试、但要在桌面 Linux 上完全取代 ext4 可能还需要一些时间。数据场和大存储池会揭示关于 ext4、XCF 以及 btrfs 不同的场景和差异。 + +如果你有不同或者其它的观点,在下面的评论框中告诉我们吧。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/review-ext4-vs-btrfs-vs-xfs/ + +作者:[M.el Khamlichi][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/pirat9/ diff --git a/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md deleted file mode 100644 index 7f93b149ba..0000000000 --- a/translated/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md +++ /dev/null @@ -1,65 +0,0 @@ -EXT4,Btrfs和XFS 文件系统之点评 -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) - -老实说,人们最不曾考虑的问题之一是他们的个人电脑中使用了什么文件系统。Windows 和 Mac OS X 用户更没有理由去考虑,因为对于他们的操作系统,只有一种选择,那就是 NTFS 和 HFS+。相反,对于 Linux 系统而言,有很多种文件系统可以选择,现在默认的是广泛采用的 ext4。然而,现在也有改用一种称为 btrfs 文件系统的趋势。那是什么使得 btrfs更优秀,其它的文件系统又是什么,什么时候我们又能看到 Linux 发行版作出改变呢? - -首先让我们对文件系统以及它们真正干什么有个总体的认识,然后我们再对一些有名的文件系统做详细的比较。 - -### 文件系统是干什么的? ### - -如果你不清楚文件系统是干什么的,一句话总结起来也非常简单。文件系统主要用于控制所有程序不再使用数据时如何存储数据、如何访问数据以及有什么其它信息(元数据)和数据本身相关,等等。听起来要编程实现并不是轻而易举的事情,实际上也确实如此。文件系统一直在改进,包括更多的功能、更高效地完成它需要做的事情。总而言之,它是所有计算机的基本需求、但并不像听起来那么简单。 - -### 为什么要分区? ### - -由于每个操作系统都能创建或者删除分区,很多人对分区都有模糊的认识。Linux 操作系统在同一块磁盘上即便使用标准安装过程,仍可以使用多个分区,这看起来很奇怪,因此需要一些解释。拥有不同分区的一个主要目的就是为了在灾难发生时能获得更好的数据安全性。 - -通过将硬盘划分为分区,数据会被分隔以及重组。当事故发生的时候,只有存储在被损坏分区的数据会被破坏,很大可能上其它分区的数据能得以保留。这个原因可以追溯到 Linux 操作系统还没有日志文件系统,任何电力故障都有可能导致灾难发生的时候。 - -使用分区也考虑到了安全和健壮性原因,因此操作系统部分损坏并不意味着整个计算机就有风险或者会受到破坏。这也是当前采用分区的一个最重要因素。举个例子,用户创建了一些会填满磁盘的脚本、程序或者 web 应用,如果该磁盘只有一个大的分区,如果磁盘满了那么整个系统就不能工作。如果用户把数据保存在不同的分区,那么就只有那个分区会受到影响,而系统分区或者其它数据分区仍能正常运行。 - -记住,拥有一个日志文件系统只能在掉电或者和存储设备意外断开连接时提供数据安全性,并不能在文件系统出现坏块或者发生逻辑错误时保护数据。对于这种情况,用户可以采用廉价磁盘冗余阵列(RAID:Redundant Array of Inexpensive Disks)的方案。 - -### 为什么要改变文件系统? ### - -ext4 文件系统由 ext3 文件系统改进而来,而后者又是从 ext2 文件系统改进而来。虽然 ext4 文件系统已经非常稳定,是过去几年中绝大部分发行版的默认选择,但它是基于陈旧的代码开发而来。另外, Linux 操作系统用户也需要很多 ext4 文件系统本身不提供的新功能。虽然通过某些软件能满足这种需求,但性能会受到影响,在文件系统层次做到这些能获得更好的性能。 - -### Ext4 文件系统 ### - -ext4 还有一些明显的限值。最大文件大小是 16tebibytes(大概是 17.6 terabytes),这比普通用户当前能买到的硬盘还要大的多。使用 ext4 能创建的最大卷/分区是 1 exbibyte(大概是 1,152,921.5 terabytes)。通过使用多种技巧, ext4 比 ext3 有很大的速度提升。类似一些最先进的文件系统,它是一个日志文件系统,意味着它会对文件在磁盘中的位置以及任何其它对磁盘的更改做记录。纵观它的所有功能,它还不支持透明压缩、重复数据删除或者透明加密。技术上支持了快照,但该功能还处于实验性阶段。 - -### Btrfs 文件系统 ### - -btrfs 有很多不同的发音,例如 Better FS、Butter FS 或者 B-Tree FS。它是一个几乎完全从头开发的文件系统。btrfs 存在的原因是它的开发者期初希望扩展文件系统的功能使得它包括快照、池化、校验以及其它一些功能。虽然和 ext4 无关,它也希望能保留 ext4 中能使消费者和商家受益的功能,并整合额外的能使每个人,尤其是企业受益的功能。对于使用大型软件以及大规模数据库的企业,对于多种不同的硬盘看起来一致的文件系统能使他们受益并且使数据整合变得更加简单。删除重复数据能降低数据实际使用的空间,当需要镜像一个单一和广泛文件系统时使用 btrfs 也能使数据镜像变得简单。 - -用户当然可以继续选择创建多个分区从而无需镜像任何东西。考虑到这种情况,btrfs 能横跨多种硬盘,和 ext4 相比,它能支持 16 倍以上的驱动空间。btrfs 文件系统一个分区最大是 16 exbibytes,最大的文件大小也是 16 exbibytes。 - -### XFS 文件系统 ### - -XFS 文件系统是扩展文件系统(extent file system)的扩展。XFS 是 64 位高性能日志文件系统。对 XFS 的支持大概在 2002 年合并到了 Linux 内核,到了 2009 年,红帽企业版 Linux 5.4 也支持了 XFS 文件系统。对于 64 位文件系统,XFS 支持最大文件系统大小为 8 exbibytes。XFS 文件系统有一些缺陷,例如它不能压缩,删除大量文件时性能低下。目前RHEL 7.0 文件系统默认使用 XFS。 - -### 总后总结 ### - -不幸的是,还不知道 btrfs 什么时候能到来。官方说,下一代文件系统仍然被归类为“不稳定”,但是如果用户下载最新版本的 Ubuntu,就可以选择安装到 btrfs 分区上。什么时候 btrfs 会被归类到 “稳定” 仍然是个谜, 直到真的认为它“稳定”之前,用户也不应该期望 Ubuntu 会默认采用 btrfs。有报道说 Fedora 18 会用 btrfs 作为它的默认文件系统,因为到了发布它的时候,应该有了 btrfs 文件系统校验器。由于还没有实现所有的功能,另外和 ext4 相比性能上也比较缓慢,btrfs 还有很多的工作要做。 - -那么,究竟使用哪个更好呢?尽管性能几乎相同,但 ext4 还是赢家。为什么呢?答案在于易用性以及广泛性。对于桌面或者工作站, ext4 仍然是一个很好的文件系统。由于默认提供,用户可以在上面安装操作系统。同时, ext4 支持最大 1 exabytes 的卷和 16 terabytes 的文件,因此考虑到大小,它也还有很大的进步空间。 - -btrfs 能提供更大的高达 16 exabytes 的卷以及更好的容错,但是,到现在为止,它感觉更像是一个附加文件系统,而没有集成到 Linux 操作系统。比如,尽管 btrfs 支持不同的发行版,使用 btrfs 格式化硬盘之前先要有 btrfs-tools 工具,这意味着安装 Linux 操作系统的时候它并不是一个可选项,即便不同发行版之间会有差异。 - -尽管传输速率非常重要,评价一个文件系统出了文件传输速度之外还有很多因素。btrfs 有很多好用的功能,例如写复制、扩展校验、快照、清洗、自修复数据、冗余删除以及其它保证数据完整性的功能。和 ZFS 相比 btrfs 缺少 RAID-Z 功能,因此对于 btrfs, RAID 还处于实验性阶段。对于单纯的数据存储,和 ext4 相比 btrfs 似乎更加优秀,但时间会验证一切。 - -迄今为止,对于桌面系统而言,ext4 似乎是一个更好的选择,因为它是默认的文件系统,传输文件时也比 btrfs 更快。btrfs 当然值得尝试、但要在桌面 Linux 上完全取代 ext4 可能还需要一些时间。数据场和大存储池会揭示关于 ext4、XCF 以及 btrfs 不同的故事和差异。 - -如果你有不同或者其它的观点,在下面的评论框中告诉我们吧。 - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/review-ext4-vs-btrfs-vs-xfs/ - -作者:[M.el Khamlichi][a] -译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[Caroline](https://github.com/carolinewuyan) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/pirat9/ From 2f78133e083ee013125fff48c020515db56006ee Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Mar 2016 11:02:12 +0800 Subject: [PATCH 1140/1710] PUB:20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes @GOLinux --- ...est in the Series with Hundreds of Changes.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename {translated/tech => published}/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md (66%) diff --git a/translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md b/published/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md similarity index 66% rename from translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md rename to published/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md index 4a53818b49..595f245e3b 100644 --- a/translated/tech/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md +++ b/published/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md @@ -1,14 +1,16 @@ -Linux最大版本4.1.18 LTS发布,带来大量修改 +Linux 4.1 系列的最大版本 4.1.18 LTS发布,带来大量修改 ================================================================================= +(LCTT 译注:这是一则过期的消息,但是为了披露更新内容,还是发布出来给大家参考) -**著名的内核维护者Greg Kroah-Hartman貌似正在度假中,因为Sasha Levin有幸在今天,2016年2月16日,的早些时候来[宣布](http://lkml.iu.edu/hypermail/linux/kernel/1602.2/00520.html),第十八个Linux内核维护版本Linux Kernel 4.1 LTS通用版本正式发布。** +**著名的内核维护者Greg Kroah-Hartman貌似正在度假中,因为Sasha Levin2016年2月16日的早些时候来[宣布](http://lkml.iu.edu/hypermail/linux/kernel/1602.2/00520.html),第十八个Linux内核维护版本Linux Kernel 4.1 LTS通用版本正式发布。** -作为长期支持的内核分支,Linux 4.1将再多几年接收到更新和补丁,而今天的维护构建版本也证明一点,就是内核开发者们正致力于统保持该系列在所有使用该版本的GNU/Linux操作系统上稳定和可靠。Linux Kernel 4.1.18 LTS是一个大规模发行版,它带来了总计达228个文件修改,这些修改包含了多达5304个插入修改和1128个删除修改。 +作为长期支持的内核分支,Linux 4.1还会在几年内得到更新和补丁,而今天的维护构建版本也证明一点,就是内核开发者们正致力于保持该系列在所有使用该版本的GNU/Linux操作系统上稳定和可靠。Linux Kernel 4.1.18 LTS是一个大的发布版本,它带来了总计达228个文件修改,这些修改包含了多达5304个插入修改和1128个删除修改。 Linux Kernel 4.1.18 LTS更新了什么呢?好吧,首先是对ARM,ARM64(AArch64),MIPS,PA-RISC,m32r,PowerPC(PPC),s390以及x86等硬件架构的改进。此外,还有对Btrfs,CIFS,NFS,XFS,OCFS2,OverlayFS以及UDF文件系统的加强。对网络堆栈的修复,尤其是对mac80211的修复。同时,还有多核心、加密和mm等方面的改进和对声音的更新。 -“我宣布4.1.18内核正式发布,所有4.1内核系列的用户都应当升级。”Sasha Levin说,“更新的4.1.y git树可以在这里找到:git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.1.y,并且可以在常规kernel.org git网站浏览器:http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary 进行浏览。” -## 大量驱动被更新 +“我宣布4.1.18内核正式发布,所有4.1内核系列的用户都应当升级。”Sasha Levin说,“更新的4.1.y git树可以在这里找到:git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.1.y,并且可以在 kernel.org 的 git 网站上浏览:http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary 进行浏览。” + +### 大量驱动被更新 除了架构、文件系统、声音、网络、加密、mm和核心内核方面的改进之外,Linux Kernel 4.1.18 LTS更新了各个驱动,以提供更好的硬件支持,特别是像蓝牙、DMA、EDAC、GPU(主要是Radeon和Intel i915)、无限带宽技术、IOMMU、IRQ芯片、MD、MMC、DVB、网络(主要是无线)、PCI、SCSI、USB、散热、暂存和Virtio等此类东西。 @@ -18,9 +20,9 @@ Linux Kernel 4.1.18 LTS更新了什么呢?好吧,首先是对ARM,ARM64(A via: http://news.softpedia.com/news/linux-kernel-4-1-18-lts-is-the-biggest-in-the-series-with-hundreds-of-changes-500500.shtml -作者:[Marius Nestor ][a] +作者:[Marius Nestor][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 04fbcf94075c7248e27191e435440710d0f30d7d Mon Sep 17 00:00:00 2001 From: Markgolzh Date: Wed, 9 Mar 2016 13:12:32 +0800 Subject: [PATCH 1141/1710] Update 20160303 Top 5 open source command shells for Linux.md --- .../tech/20160303 Top 5 open source command shells for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20160303 Top 5 open source command shells for Linux.md b/sources/tech/20160303 Top 5 open source command shells for Linux.md index d097928ace..b9bf5e2e87 100644 --- a/sources/tech/20160303 Top 5 open source command shells for Linux.md +++ b/sources/tech/20160303 Top 5 open source command shells for Linux.md @@ -1,4 +1,4 @@ -翻译中;by ![zky001](https://github.com/LCTT/TranslateProject/edit/master/sources/tech/20160303%20Top%205%20open%20source%20command%20shells%20for%20Linux.md) +翻译中;by ![zky001] Top 5 open source command shells for Linux =============================================== From 7c3cc7e5bcf9f6915a7a67587ea8d78be191d727 Mon Sep 17 00:00:00 2001 From: cposture Date: Wed, 9 Mar 2016 16:14:24 +0800 Subject: [PATCH 1142/1710] translated character 1 --- .../20151220 GCC-Inline-Assembly-HOWTO.md | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index f2e09b5c7a..c22e03bfd7 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -1,41 +1,43 @@ 【Translating by cposture 2016-03-01】 * * * -# GCC-Inline-Assembly-HOWTO +# GCC内联汇编HOWTO + v0.1, 01 March 2003. * * * -_This HOWTO explains the use and usage of the inline assembly feature provided by GCC. There are only two prerequisites for reading this article, and that’s obviously a basic knowledge of x86 assembly language and C._ +_本HOWTO文档将讲解GCC提供的内联汇编特性的用途和用法。对于阅读这篇文章,这里只有两个前提要求,很明显,就是x86汇编语言和C语言的基本认识。_ * * * -## 1. Introduction. +## 1. 简介 -## 1.1 Copyright and License. +## 1.1 版权许可 Copyright (C)2003 Sandeep S. -This document is free; you can redistribute and/or modify this under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. +本文档自由共享;你可以重新发布它,并且/或者在遵循自由软件基金会发布的GNU通用公共许可证下修改它;或者该许可证的版本2,或者(按照你的需求)更晚的版本。 -This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +发布这篇文档是希望它能够帮助别人,但是没有任何保证;甚至不包括可售性和适用于任何特定目的的保证。关于更详细的信息,可以查看GNU通用许可证。 -## 1.2 Feedback and Corrections. +## 1.2 反馈校正 -Kindly forward feedback and criticism to [Sandeep.S](mailto:busybox@sancharnet.in). I will be indebted to anybody who points out errors and inaccuracies in this document; I shall rectify them as soon as I am informed. +请将反馈和批评一起提交给[Sandeep.S](mailto:busybox@sancharnet.in)。我将感谢任何一个指出本文档中错误和不准确之处的人;一被告知,我会马上改正它们。 -## 1.3 Acknowledgments. +## 1.3 致谢 -I express my sincere appreciation to GNU people for providing such a great feature. Thanks to Mr.Pramode C E for all the helps he did. Thanks to friends at the Govt Engineering College, Trichur for their moral-support and cooperation, especially to Nisha Kurur and Sakeeb S. Thanks to my dear teachers at Govt Engineering College, Trichur for their cooperation. +我对提供如此棒的特性的GNU人们表示真诚的感谢。感谢Mr.Pramode C E所做的所有帮助。感谢在Govt Engineering College和Trichur朋友们的精神支持和合作,尤其是Nisha Kurur和Sakeeb S。 感谢在Gvot Engineering College和Trichur老师们的合作。 -Additionally, thanks to Phillip, Brennan Underwood and colin@nyx.net; Many things here are shamelessly stolen from their works. +另外,感谢Phillip, Brennan Underwood and colin@nyx.net;这里的许多东西都厚颜地直接取自他们的工作成果。 * * * -## 2. Overview of the whole thing. +## 2. 概览 -We are here to learn about GCC inline assembly. What this inline stands for? +在这里,我们将学习GCC内联汇编。这内联表示的是什么呢? + +我们可以要求编译器将一个函数的代码插入到调用者代码中函数被实际调用的地方。这样的函数就是内联函数。这听起来和宏差不多?这两者确实有相似之处。 -We can instruct the compiler to insert the code of a function into the code of its callers, to the point where actually the call is to be made. Such functions are inline functions. Sounds similar to a Macro? Indeed there are similarities. What is the benefit of inline functions? From 4f6d87686af60c3a1c48ff13aad724b0eab17141 Mon Sep 17 00:00:00 2001 From: Stdio A Date: Wed, 9 Mar 2016 17:37:19 +0800 Subject: [PATCH 1143/1710] =?UTF-8?q?20160306=20=E9=80=89=E9=A2=98?= =?UTF-8?q?=E5=B9=B6=E7=BF=BB=E8=AF=915=20Favorite=20Open=20Source=20Djang?= =?UTF-8?q?o=20Packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 5 Favorite Open Source Django Packages.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 sources/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md diff --git a/sources/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md b/sources/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md new file mode 100644 index 0000000000..de57717f56 --- /dev/null +++ b/sources/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md @@ -0,0 +1,166 @@ +StdioA Translated + +5 favorite open source Django packages +================================================================================ +![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/u23316/osdc-open-source-yearbook-lead8.png?itok=0_5-hdFE) + +Image source: Opensource.com + +_Jacob Kaplan-Moss and Frank Wiles also contributed to this article._ + +Django is built around the concept of [reusable apps][1]: self-contained packages that provide re-usable features. You can build your site by composing these reusable apps, together with your own site-specific code. There's a rich and varied ecosystem of reusable apps available for your use — PyPI lists more than [8,000 Django apps][2] — but how do you know which ones are best? + +To help focus your app search, we've put together this list of our five favorites. They are: +* [Cookiecutter][3]: the best way to start a new Django site. +* [Whitenoise][4]: the best static asset server. +* [Django Rest Framework][5]: the best way to write REST APIs with Django. +* [Wagtail][6]: the best Django-based content-management system. +* [django-allauth][7]: the best way to provide "social login" (e.g., Twitter, Facebook, GitHub, etc). + +We also recommend you check out [Django Packages][8], a directory of reusable Django apps. Django Packages organizes Django apps into "grids" that allow you to compare similar packages and chose between them. You can see which features are offered by each package, as well as usage statistics. (For example: here's the [grid for REST tools][9], which might help you understand why we recommend Django REST Framework.) + +## Why you should trust us? + +We've been using Django for longer than almost anyone. Two of us (Frank and Jacob) worked at the [Lawrence Journal-World][10] (birthplace of Django) before Django was released (and in fact helped make the open source release happen). We've all spent the past eight years running a consultancy that advises companies on how best to use Django. + +So, we've seen the entire history of the Django project and community, and we've seen popular packages come and go. Between the three of us, we've probably tried at least half of these 8,000 apps personally, or we know someone who has. We have a strong understanding of what makes an app solid and reliable, and we have a good understanding of what gives these things staying power. + +## Best way to start a new Django site: [Cookiecutter][3] + +Starting off a new project or app is always a bit of a pain. You can use Django's built in `startproject` but if you're like us, you're particular in how you do things. Cookiecutter solves this by giving you a quick and easy way to define project or app templates that can be easily reused. A quick example, just `pip install cookiecutter` and then run this from the command line: + +```bash +$ cookiecutter https://github.com/marcofucci/cookiecutter-simple-django +``` + +You'll immediately start getting prompted for quick answers, such as the name of your project, repo, author name, email, and a few other bits of configuration. These are used to help fill out the project details. We picked the ever so original '_foo_' to be our repo name. So cookiecutter created a simple Django project in the subdirectory '_foo_'. + +If you poke around in the '_foo_' project a bit, you'll see the other bits of configuration you were prompted for have been templated into the files themselves along with sub-directories as necessary. This "template" is all defined at the GitHub repo URL we used as the only argument when we called `cookiecutter`. This example used a remote GitHub repo as the template; however, note that you can use local file system directories as well, which is perfect for non-reusable scenarios. + +We mention cookiecutter as a great Django package, but honestly it's useful for plain Python or even non-Python-related purposes. Being able to lay things out exactly as you like in an easily repeatable way makes cookiecutter a great tool for keeping your workflow DRY. + +## Best static asset server: [Whitenoise][4] + +For many years, serving your site's static assets—images, JavaScript, CSS—was a pain. The built-in [django.views.static.serve][11] view is, as the documentation states, "not hardened for production use and should be used only as a development aid." But serving media from a "real" web server, such as NGINX or out of a CDN, can be difficult to set up. + +Whitenoise cleanly solves this problem. It's as easy to set up as the development-only static server, and is hardened and optimized for production. Setup is simple: + +1. Make sure you're using Django's [contrib.staticfiles][12] app, and that you've correctly set `STATIC_ROOT` in your settings file. +2. Enable Whitenoise in your `wsgi.py` file: + +```python +from django.core.wsgi import get_wsgi_application +from whitenoise.django import DjangoWhiteNoise + +application = get_wsgi_application() +application = DjangoWhiteNoise(application) +``` + +That's really all it takes! For large applications, you'll likely want to use a dedicated media server and/or a CDN, but for most small- or medium-sized Django sites, Whitenoise is more than powerful enough. + +For more information on Whitenoise, [check out the documentation][13]. + +Best Tool for REST APIs: [Django REST Framework][5] + +REST APIs are quickly becoming a standard feature of modern web applications. An API is really simply talking in JSON rather than HTML, and of course you can do this with just Django. You can craft your own views that set the proper content types and return data in JSON rather than templated HTML responses. This is exactly what many people did before API frameworks such as [Django Rest Framework][14] (a.k.a., DRF) were released. + +Building a REST API with DRF is similar to working with Django's Class Based Views if you're familiar with them, except these are specifically designed and targeted around an API use case. Quite a bit of code is involved in your average API setup, so instead of a code sample to get you excited, we'll highlight some of DRF's features that make your life easier: + +* Automatic browseable API which makes development and manual testing a breeze. Click around in the DRF [demo example][15]. You can view API responses and support POST/PUT/DELETE type operations without having to do anything yourself. +* Easy integration of authentication styles, such as OAuth, Basic Auth, or API Tokens. + Simple permission system for fine-grained control of which users can use which API endpoints and/or actions. +* Built in rate limiting. +* Nearly automatic API documentation when combined with [django-rest-swagger][16]. +* Extensive ecosystem of third-party libraries. + +Although you could certainly build an API without DRF, we can't fathom a reason why you would start off down that path. Even if you don't use all of DRF's features, building up your own API views from their solid base view classes is a huge win in terms of safety, consistency of your API, and development velocity. If you aren't using DRF already, you should set aside some time to check it out. + +## Best Django-based CMS: [Wagtail][6] + +Wagtail is the current darling of the Django CMS world and with good reason. Like most CMS systems, it gives you flexibility to define different types of pages and their content via simple Django models. This takes you from zero to a basically working system in hours, not days. To give you a quick example, to define a Staff page type for people at your company can be as simple as: + +```python +from wagtail.wagtailcore.models import Page +from wagtail.wagtailcore.fields import RichTextField +from wagtail.wagtailadmin.edit_handlers import FieldPanel, MultiFieldPanel +from wagtail.wagtailimages.edit_handlers import ImageChooserPanel + +class StaffPage(Page): + name = models.CharField(max_length=100) + hire_date = models.DateField() + bio = models.RichTextField() + email = models.EmailField() + headshot = models.ForeignKey('wagtailimages.Image', null=True, blank=True) + content_panels = Page.content_panels + [ + FieldPanel('name'), + FieldPanel('hire_date'), + FieldPanel('email'), + FieldPanel('bio', classname="full"), + ImageChoosePanel('headshot'), + ] + +``` + +The real appeal of Wagtail, however, is in its easy-to-use modern admin interface and flexibility. You can control which types of pages are allowed in different areas of the site, add additional complex logic to your pages, and get standard moderation/approval workflows right out of the box. With most CMS systems, at some point you run into a wall you can work around. With Wagtail, we have yet to find a wall we couldn't easy find a door through to make it do exactly what we want in an easy and maintainable way. If you're interested, we wrote up a [deeper dive into Wagtail][17]. + +## Best Social Login Tool: [django-allauth][7] + +django-allauth is a reusable Django application that solves your registration and authentication needs. Whether you need a local or social registration system, django-allauth has you covered. + +The project supports multiple authentication schemes, such as user name or email address. Once a user has signed up, multiple strategies are supported for account verification ranging from none to email verification. Multiple social and email accounts are also supported. Pluggable signup forms are also supports which allows asking additional questions during registration. + +django-allauth supports more than 20 authentication providers, including Facebook, GitHub, Google, and Twitter. If you have an account on a social website that's not supported, then it's most supported through a third-party add-on. The project supports writing custom backends, which allows custom authentication systems to work, too. This is nice for anyone with custom authentication needs. + +django-allauth is easy to setup and has [extensive documentation][18]. The project is also well tested so you know that everything actually works. + +Do you have a favorite Django package? Let us know about it in the comments. + +## About the author + +![Photo][] + +Jeff Triplett + +Lawrence, KS + + +I moved to Lawrence, KS in 2007 to work at the Lawrence Journal-World where Django was invented. I now work at [Revolution Systems (Revsys)][19] in Lawrence, KS as a developer and a consultant. + +I am a co-founder of the [Django Events Foundation North America (DEFNA)][20], Conference Chair for [DjangoCon US][21] 2015 and 2016, and I co-organized [Django Birthday][22] to celebrate the 10 year birthday of Django in its birthplace in Lawrence. + +I am a member of a local trail running group, I love basketball, and I love dreaming about traveling in an airstream across America. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/15/12/5-favorite-open-source-django-packages + +作者:[Jeff Triplett][a] +译者:[StdioA](https://github.com/StdioA) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[a]:https://opensource.com/users/jefftriplett +[1]:https://docs.djangoproject.com/en/1.8/intro/reusable-apps/ +[2]:https://pypi.python.org/pypi?:action=browse&c=523 +[3]:https://github.com/audreyr/cookiecutter +[4]:http://whitenoise.evans.io/en/latest/base.html +[5]:http://www.django-rest-framework.org/ +[6]:https://wagtail.io/ +[7]:http://www.intenct.nl/projects/django-allauth/ +[8]:https://www.djangopackages.com/ +[9]:https://www.djangopackages.com/grids/g/rest/ +[10]:http://www2.ljworld.com/news/2015/jul/09/happy-birthday-django/ +[11]:https://docs.djangoproject.com/en/1.8/ref/views/#django.views.static.serve +[12]:https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/ +[13]:http://whitenoise.evans.io/en/latest/index.html +[14]:http://www.django-rest-framework.org/ +[15]:http://restframework.herokuapp.com/ +[16]:http://django-rest-swagger.readthedocs.org/en/latest/index.html +[17]:https://opensource.com/business/15/5/wagtail-cms +[18]:http://django-allauth.readthedocs.org/en/latest/ +[19]:http://www.revsys.com/ +[20]:http://defna.org/ +[21]:https://2015.djangocon.us/ +[22]:https://djangobirthday.com/ From 6f0f13a8826606a397cee5c8af7b6e2273282307 Mon Sep 17 00:00:00 2001 From: Stdio A Date: Wed, 9 Mar 2016 17:38:17 +0800 Subject: [PATCH 1144/1710] =?UTF-8?q?5=20Favorite=20Open=20Source=20Django?= =?UTF-8?q?=20Packages=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 --- ... 5 Favorite Open Source Django Packages.md | 166 ------------------ ... 5 Favorite Open Source Django Packages.md | 164 +++++++++++++++++ 2 files changed, 164 insertions(+), 166 deletions(-) delete mode 100644 sources/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md create mode 100644 translated/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md diff --git a/sources/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md b/sources/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md deleted file mode 100644 index de57717f56..0000000000 --- a/sources/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md +++ /dev/null @@ -1,166 +0,0 @@ -StdioA Translated - -5 favorite open source Django packages -================================================================================ -![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/u23316/osdc-open-source-yearbook-lead8.png?itok=0_5-hdFE) - -Image source: Opensource.com - -_Jacob Kaplan-Moss and Frank Wiles also contributed to this article._ - -Django is built around the concept of [reusable apps][1]: self-contained packages that provide re-usable features. You can build your site by composing these reusable apps, together with your own site-specific code. There's a rich and varied ecosystem of reusable apps available for your use — PyPI lists more than [8,000 Django apps][2] — but how do you know which ones are best? - -To help focus your app search, we've put together this list of our five favorites. They are: -* [Cookiecutter][3]: the best way to start a new Django site. -* [Whitenoise][4]: the best static asset server. -* [Django Rest Framework][5]: the best way to write REST APIs with Django. -* [Wagtail][6]: the best Django-based content-management system. -* [django-allauth][7]: the best way to provide "social login" (e.g., Twitter, Facebook, GitHub, etc). - -We also recommend you check out [Django Packages][8], a directory of reusable Django apps. Django Packages organizes Django apps into "grids" that allow you to compare similar packages and chose between them. You can see which features are offered by each package, as well as usage statistics. (For example: here's the [grid for REST tools][9], which might help you understand why we recommend Django REST Framework.) - -## Why you should trust us? - -We've been using Django for longer than almost anyone. Two of us (Frank and Jacob) worked at the [Lawrence Journal-World][10] (birthplace of Django) before Django was released (and in fact helped make the open source release happen). We've all spent the past eight years running a consultancy that advises companies on how best to use Django. - -So, we've seen the entire history of the Django project and community, and we've seen popular packages come and go. Between the three of us, we've probably tried at least half of these 8,000 apps personally, or we know someone who has. We have a strong understanding of what makes an app solid and reliable, and we have a good understanding of what gives these things staying power. - -## Best way to start a new Django site: [Cookiecutter][3] - -Starting off a new project or app is always a bit of a pain. You can use Django's built in `startproject` but if you're like us, you're particular in how you do things. Cookiecutter solves this by giving you a quick and easy way to define project or app templates that can be easily reused. A quick example, just `pip install cookiecutter` and then run this from the command line: - -```bash -$ cookiecutter https://github.com/marcofucci/cookiecutter-simple-django -``` - -You'll immediately start getting prompted for quick answers, such as the name of your project, repo, author name, email, and a few other bits of configuration. These are used to help fill out the project details. We picked the ever so original '_foo_' to be our repo name. So cookiecutter created a simple Django project in the subdirectory '_foo_'. - -If you poke around in the '_foo_' project a bit, you'll see the other bits of configuration you were prompted for have been templated into the files themselves along with sub-directories as necessary. This "template" is all defined at the GitHub repo URL we used as the only argument when we called `cookiecutter`. This example used a remote GitHub repo as the template; however, note that you can use local file system directories as well, which is perfect for non-reusable scenarios. - -We mention cookiecutter as a great Django package, but honestly it's useful for plain Python or even non-Python-related purposes. Being able to lay things out exactly as you like in an easily repeatable way makes cookiecutter a great tool for keeping your workflow DRY. - -## Best static asset server: [Whitenoise][4] - -For many years, serving your site's static assets—images, JavaScript, CSS—was a pain. The built-in [django.views.static.serve][11] view is, as the documentation states, "not hardened for production use and should be used only as a development aid." But serving media from a "real" web server, such as NGINX or out of a CDN, can be difficult to set up. - -Whitenoise cleanly solves this problem. It's as easy to set up as the development-only static server, and is hardened and optimized for production. Setup is simple: - -1. Make sure you're using Django's [contrib.staticfiles][12] app, and that you've correctly set `STATIC_ROOT` in your settings file. -2. Enable Whitenoise in your `wsgi.py` file: - -```python -from django.core.wsgi import get_wsgi_application -from whitenoise.django import DjangoWhiteNoise - -application = get_wsgi_application() -application = DjangoWhiteNoise(application) -``` - -That's really all it takes! For large applications, you'll likely want to use a dedicated media server and/or a CDN, but for most small- or medium-sized Django sites, Whitenoise is more than powerful enough. - -For more information on Whitenoise, [check out the documentation][13]. - -Best Tool for REST APIs: [Django REST Framework][5] - -REST APIs are quickly becoming a standard feature of modern web applications. An API is really simply talking in JSON rather than HTML, and of course you can do this with just Django. You can craft your own views that set the proper content types and return data in JSON rather than templated HTML responses. This is exactly what many people did before API frameworks such as [Django Rest Framework][14] (a.k.a., DRF) were released. - -Building a REST API with DRF is similar to working with Django's Class Based Views if you're familiar with them, except these are specifically designed and targeted around an API use case. Quite a bit of code is involved in your average API setup, so instead of a code sample to get you excited, we'll highlight some of DRF's features that make your life easier: - -* Automatic browseable API which makes development and manual testing a breeze. Click around in the DRF [demo example][15]. You can view API responses and support POST/PUT/DELETE type operations without having to do anything yourself. -* Easy integration of authentication styles, such as OAuth, Basic Auth, or API Tokens. - Simple permission system for fine-grained control of which users can use which API endpoints and/or actions. -* Built in rate limiting. -* Nearly automatic API documentation when combined with [django-rest-swagger][16]. -* Extensive ecosystem of third-party libraries. - -Although you could certainly build an API without DRF, we can't fathom a reason why you would start off down that path. Even if you don't use all of DRF's features, building up your own API views from their solid base view classes is a huge win in terms of safety, consistency of your API, and development velocity. If you aren't using DRF already, you should set aside some time to check it out. - -## Best Django-based CMS: [Wagtail][6] - -Wagtail is the current darling of the Django CMS world and with good reason. Like most CMS systems, it gives you flexibility to define different types of pages and their content via simple Django models. This takes you from zero to a basically working system in hours, not days. To give you a quick example, to define a Staff page type for people at your company can be as simple as: - -```python -from wagtail.wagtailcore.models import Page -from wagtail.wagtailcore.fields import RichTextField -from wagtail.wagtailadmin.edit_handlers import FieldPanel, MultiFieldPanel -from wagtail.wagtailimages.edit_handlers import ImageChooserPanel - -class StaffPage(Page): - name = models.CharField(max_length=100) - hire_date = models.DateField() - bio = models.RichTextField() - email = models.EmailField() - headshot = models.ForeignKey('wagtailimages.Image', null=True, blank=True) - content_panels = Page.content_panels + [ - FieldPanel('name'), - FieldPanel('hire_date'), - FieldPanel('email'), - FieldPanel('bio', classname="full"), - ImageChoosePanel('headshot'), - ] - -``` - -The real appeal of Wagtail, however, is in its easy-to-use modern admin interface and flexibility. You can control which types of pages are allowed in different areas of the site, add additional complex logic to your pages, and get standard moderation/approval workflows right out of the box. With most CMS systems, at some point you run into a wall you can work around. With Wagtail, we have yet to find a wall we couldn't easy find a door through to make it do exactly what we want in an easy and maintainable way. If you're interested, we wrote up a [deeper dive into Wagtail][17]. - -## Best Social Login Tool: [django-allauth][7] - -django-allauth is a reusable Django application that solves your registration and authentication needs. Whether you need a local or social registration system, django-allauth has you covered. - -The project supports multiple authentication schemes, such as user name or email address. Once a user has signed up, multiple strategies are supported for account verification ranging from none to email verification. Multiple social and email accounts are also supported. Pluggable signup forms are also supports which allows asking additional questions during registration. - -django-allauth supports more than 20 authentication providers, including Facebook, GitHub, Google, and Twitter. If you have an account on a social website that's not supported, then it's most supported through a third-party add-on. The project supports writing custom backends, which allows custom authentication systems to work, too. This is nice for anyone with custom authentication needs. - -django-allauth is easy to setup and has [extensive documentation][18]. The project is also well tested so you know that everything actually works. - -Do you have a favorite Django package? Let us know about it in the comments. - -## About the author - -![Photo][] - -Jeff Triplett - -Lawrence, KS - - -I moved to Lawrence, KS in 2007 to work at the Lawrence Journal-World where Django was invented. I now work at [Revolution Systems (Revsys)][19] in Lawrence, KS as a developer and a consultant. - -I am a co-founder of the [Django Events Foundation North America (DEFNA)][20], Conference Chair for [DjangoCon US][21] 2015 and 2016, and I co-organized [Django Birthday][22] to celebrate the 10 year birthday of Django in its birthplace in Lawrence. - -I am a member of a local trail running group, I love basketball, and I love dreaming about traveling in an airstream across America. - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/15/12/5-favorite-open-source-django-packages - -作者:[Jeff Triplett][a] -译者:[StdioA](https://github.com/StdioA) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - - -[a]:https://opensource.com/users/jefftriplett -[1]:https://docs.djangoproject.com/en/1.8/intro/reusable-apps/ -[2]:https://pypi.python.org/pypi?:action=browse&c=523 -[3]:https://github.com/audreyr/cookiecutter -[4]:http://whitenoise.evans.io/en/latest/base.html -[5]:http://www.django-rest-framework.org/ -[6]:https://wagtail.io/ -[7]:http://www.intenct.nl/projects/django-allauth/ -[8]:https://www.djangopackages.com/ -[9]:https://www.djangopackages.com/grids/g/rest/ -[10]:http://www2.ljworld.com/news/2015/jul/09/happy-birthday-django/ -[11]:https://docs.djangoproject.com/en/1.8/ref/views/#django.views.static.serve -[12]:https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/ -[13]:http://whitenoise.evans.io/en/latest/index.html -[14]:http://www.django-rest-framework.org/ -[15]:http://restframework.herokuapp.com/ -[16]:http://django-rest-swagger.readthedocs.org/en/latest/index.html -[17]:https://opensource.com/business/15/5/wagtail-cms -[18]:http://django-allauth.readthedocs.org/en/latest/ -[19]:http://www.revsys.com/ -[20]:http://defna.org/ -[21]:https://2015.djangocon.us/ -[22]:https://djangobirthday.com/ diff --git a/translated/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md b/translated/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md new file mode 100644 index 0000000000..81e999fd80 --- /dev/null +++ b/translated/talk/yearbook2015/20160306 5 Favorite Open Source Django Packages.md @@ -0,0 +1,164 @@ +5个最受喜爱的开源Django包 +================================================================================ +![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/u23316/osdc-open-source-yearbook-lead8.png?itok=0_5-hdFE) + +图片来源:Opensource.com + +_Jacob Kaplan-Moss和Frank Wiles也参与了本文的写作。_ + +Django围绕“[可重用应用][1]”观点建立:自我包含了提供可重复使用特性的包。你可以将这些可重用应用组装起来,在加上适用于你的网站的特定代码,来搭建你自己的网站。Django具有一个丰富多样的、由可供你使用的可重用应用组建起来的生态系统——PyPI列出了[超过8000个 Django 应用][2]——可你该如何知道哪些是最好的呢? + +为了节省你的时间,我们总结了五个最受喜爱的 Django 应用。它们是: +- [Cookiecutter][3]: 建立 Django 网站的最佳方式。 +- [Whitenoise][4]: 最棒的静态资源服务器。 +- [Django Rest Framework][5]: 使用 Django 开发 REST API 的最佳方式。 +- [Wagtail][6]: 基于 Django 的最佳内容管理系统。 +- [django-allauth][7]: 提供社交账户登录的最佳应用(如 Twitter, Facebook, GitHub 等)。 + +我们同样推荐你查看 [Django Packages][8],一个可重用 Django 应用的目录。Django Packages 将 Django 应用组织成“表格”,你可以在功能相似的不同应用之间进行比较并做出选择。你可以查看每个包中提供的特性,和使用统计情况。(比如:这是[ REST 工具的表格][9],也许可以帮助你理解我们为何推荐 Django REST Framework. + +## 为什么你应该相信我们? + +我们使用 Django 的时间比几乎其他人都长。在 Django 发布之前,我们当中的两个人(Frank 和 Jacob)在 [Lawrence Journal-World][10] (Django 的发源地)工作(事实上他们两人推动了 Django 开源发布的进程)。我们在过去的八年当中运行着一个咨询公司,来建议公司使用 Django 去将事情做到最好。 + +所以,我们见证了Django项目和社群的完整历史,我们见证了流行软件包的兴起和没落。在我们三个中,我们可能私下试用了8000个应用中的一半以上,或者我们知道谁试用过这些。我们对如何使应用变得坚实可靠有着深刻的理解,并且我们对给予这些应用持久力量的来源也有不错的理解。 + +## 建立Django网站的最佳方式:[Cookiecutter][3] + +建立一个新项目或应用总是有些痛苦。你可以用Django内建的 `startproject`。不过,如果你像我们一样,你可能会对你的办事方式很挑剔。Cookiecutter 为你提供了一个快捷简单的方式来构建易于使用的项目或应用模板,从而解决了这个问题。一个简单的例子:键入 `pip install cookiecutter`,然后在命令行中运行以下命令: + +```bash +$ cookiecutter https://github.com/marcofucci/cookiecutter-simple-django +``` + +接下来你需要回答几个简单的问题,比如你的项目名称、目录、作者名字、E-Mail和其他几个关于配置的小问题。这些能够帮你补充项目相关的细节。我们使用最最原始的 "_foo_" 作为我们的目录名称。所以 cokkiecutter 在子目录 "_foo_" 下建立了一个简单的 Django 项目。 + +如果你在"_foo_"项目中闲逛,你会看见你刚刚选择的其它设置已通过模板,连同子目录一同嵌入到文件当中。这个“模板”在我们刚刚在执行 `cookiecutter` 命令时输入的 Github 仓库 URL 中定义。这个样例工程使用了一个 Github 远程仓库作为模板;不过你也可以使用本地的模板,这在建立非重用项目时非常有用。 + +我们认为 cookiecutter 是一个极棒的 Django 包,但是,事实上其实它在面对纯 Python 甚至非 Python 相关需求时也极为有用。你能够将所有文件依你所愿精确摆放在任何位置上,使得 cookiecutter 成为了一个简化工作流程的极佳工具。 + +## 最棒的静态资源服务器:[Whitenoise][4] + +多年来,托管网站的静态资源——图片、Javascript、CSS——都是一件很痛苦的事情。Django 内建的 [django.views.static.serve][11] 视图,就像Django文章所述的那样,“在生产环境中不可靠,所以只应为开发环境的提供辅助功能。”但使用一个“真正的” Web 服务器,如 NGINX 或者借助 CDN 来托管媒体资源,配置起来会相当困难。 + +Whitenoice 很简洁地解决了这个问题。它可以像在开发环境那样轻易地在生产环境中设置静态服务器,并且针对生产环境进行了加固和优化。它的设置方法极为简单: + +1. 确保你在使用 Django 的 [contrib.staticfiles][12] 应用,并确认你在配置文件中正确设置了 `STATIC_ROOT` 变量。 + +2. 在 `wsgi.py` 文件中启用 Whitenoise: + + ```python + from django.core.wsgi import get_wsgi_application + from whitenoise.django import DjangoWhiteNoise + + application = get_wsgi_application() + application = DjangoWhiteNoise(application) + ``` + +配置它真的就这么简单!对于大型应用,你可能想要使用一个专用的媒体服务器和/或一个 CDN,但对于大多数小型或中型 Django 网站,Whitenoise 已经足够强大。 + +如需查看更多关于 Whitenoise 的信息,[请查看文档][13]。 + +## 开发REST API的最佳工具:[Django REST Framework][5] + +REST API 正在迅速成为现代 Web 应用的标准功能。与一个 API 进行简短的会话,你只需使用 JSON 而不是 HTML,当然你可以只用 Django 做到这些。你可以制作自己的视图,设置合适的 `Content-Type`, 然后返回 JSON 而不是渲染后的 HTML 响应。这是在像 [Django Rest Framework][14](下称DRF)这样的API框架发布之前,大多数人所做的。 + +如果你对 Django 的视图类很熟悉,你会觉得使用DRF构建REST API与使用它们很相似,不过 DRF 只针对特定 API 使用场景而设计。在一般 API 设计中,你会用到它的不少代码,所以我们强调了一些 DRF 的特性来使你更快地接受它,而不是去看一份让你兴奋的示例代码: + +* 可自动预览的 API 可以使你的开发和人工测试轻而易举。你可以查看 DRF 的[示例代码][15]。你可以查看 API 响应,并且它支持 POST/PUT/DELETE 类型的操作,不需要你做任何事。 + + +* 认证方式易于迁移,如OAuth, Basic Auth, 或API Tokens. +* 内建请求速度限制。 +* 当与 [django-rest-swagger][16] 结合时,API文档几乎可以自动生成。 +* 第三方库拥有广泛的生态。 + +当然你可以不依赖 DRF 来构建 API,但我们无法推测你不开始使用 DRF 的原因。就算你不使用 DRF 的全部特性,使用一个成熟的视图库来构建你自己的 API 也会使你的 API 更加一致、完全,更能提高你的开发速度。如果你还没有开始使用 DRF, 你应该找点时间去体验一下。 + +## 以 Django 为基础的最佳 CMS:[Wagtail][6] + +Wagtail是当下Django CMS(内容管理系统)世界中最受人青睐的应用,并且它的热门有足够的理由。就想大多数的 CMS 一样,它具有极佳的灵活性,可以通过简单的 Django 模型来定义不同类型的页面及其内容。使用它,你可以从零开始,在几个小时而不是几天之内来和建造一个基本可以运行的内容管理系统。举一个小例子,为你公司的员工定义一个页面类型可以像下面一样简单: + +```python +from wagtail.wagtailcore.models import Page +from wagtail.wagtailcore.fields import RichTextField +from wagtail.wagtailadmin.edit_handlers import FieldPanel, MultiFieldPanel +from wagtail.wagtailimages.edit_handlers import ImageChooserPanel + +class StaffPage(Page): + name = models.CharField(max_length=100) + hire_date = models.DateField() + bio = models.RichTextField() + email = models.EmailField() + headshot = models.ForeignKey('wagtailimages.Image', null=True, blank=True) + content_panels = Page.content_panels + [ + FieldPanel('name'), + FieldPanel('hire_date'), + FieldPanel('email'), + FieldPanel('bio',classname="full"), + ImageChoosePanel('headshot'), + ] +``` + +然而,Wagtail 真正出彩的地方在于它的灵活性及其易于使用的现代化管理页面。你可以控制不同类型的页面在哪网站的哪些区域可以访问,为页面添加复杂的附加逻辑,还可以极为方便地取得标准的适应/审批工作流。在大多数 CMS 系统中,你会在开发时在某些点上遇到困难。而使用 Wagtail 时,我们经过不懈努力找到了一个突破口,使得让我们轻易地开发出一套简洁稳定的系统,使得程序完全依照我们的想法运行。如果你对此感兴趣,我们写了一篇[深入理解 Wagtail][17]. + +## 提供社交账户登录的最佳工具:[django-allauth][7] + +django-allauth 是一个能够解决你的注册和认证需求的、可重用的Django应用。无论你需要构建本地注册系统还是社交账户注册系统,django-allauth 都能够帮你做到。 + +这个应用支持多种认证体系,比如用户名或电子邮件。一旦用户注册成功,它可以提供从零到电子邮件认证的多种账户验证的策略。同时,它也支持多种社交账户和电子邮件账户关联。它还支持可插拔的注册表单,可让用户在注册时回答一些附加问题。 + +django-allauth 支持多于 20 种认证提供者,包括 Facebook, Github, Google 和 Twitter。如果你发现了一个它不支持的社交网站,那很有可能有一款第三方插件提供该网站的接入支持。这个项目还支持自定义后台开发,可以支持自定义的认证方式。 + +django-allauth 易于配置,且有[完善的文档][18]。该项目通过了很多测试,所以你可以相信它的所有部件都会正常运作。 + +你有最喜爱的 Django 包吗?请在评论中告诉我们。 + +## 关于作者 + +![Photo](https://opensource.com/sites/default/files/styles/profile_pictures/public/pictures/main-one-i-use-everywhere.png?itok=66GC-D1q) + +Jeff Triplett + +劳伦斯,堪萨斯州 + + +我在 2007 年搬到了堪萨斯州的劳伦斯,在 Django 的发源地—— Lawrence Journal-World 工作。我现在在劳伦斯市的 [Revolution Systems (Revsys)][19] 工作,做一位开发者兼顾问。 + +我是[北美 Django 运动基金会(DEFNA)][20]的联合创始人,2015 和 2016 年 [DjangoCon US][21] 的会议主席,而且我在 Django 的发源地劳伦斯参与组织了 [Django Birthday][22] 来庆祝 Django 的 10 岁生日。 + +我是当地越野跑小组的成员,我喜欢篮球,我还喜欢梦见自己随着一道气流游遍美国。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/15/12/5-favorite-open-source-django-packages + +作者:[Jeff Triplett][a] +译者:[StdioA](https://github.com/StdioA) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jefftriplett +[1]:https://docs.djangoproject.com/en/1.8/intro/reusable-apps/ +[2]:https://pypi.python.org/pypi?:action=browse&c=523 +[3]:https://github.com/audreyr/cookiecutter +[4]:http://whitenoise.evans.io/en/latest/base.html +[5]:http://www.django-rest-framework.org/ +[6]:https://wagtail.io/ +[7]:http://www.intenct.nl/projects/django-allauth/ +[8]:https://www.djangopackages.com/ +[9]:https://www.djangopackages.com/grids/g/rest/ +[10]:http://www2.ljworld.com/news/2015/jul/09/happy-birthday-django/ +[11]:https://docs.djangoproject.com/en/1.8/ref/views/#django.views.static.serve +[12]:https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/ +[13]:http://whitenoise.evans.io/en/latest/index.html +[14]:http://www.django-rest-framework.org/ +[15]:http://restframework.herokuapp.com/ +[16]:http://django-rest-swagger.readthedocs.org/en/latest/index.html +[17]:https://opensource.com/business/15/5/wagtail-cms +[18]:http://django-allauth.readthedocs.org/en/latest/ +[19]:http://www.revsys.com/ +[20]:http://defna.org/ +[21]:https://2015.djangocon.us/ +[22]:https://djangobirthday.com/ From 6fb68f93ec48052d7f75c43e48a401b2619a6aef Mon Sep 17 00:00:00 2001 From: cposture Date: Wed, 9 Mar 2016 19:13:58 +0800 Subject: [PATCH 1145/1710] translated character 2 --- .../20151220 GCC-Inline-Assembly-HOWTO.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index c22e03bfd7..1324bfdc33 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -1,12 +1,12 @@ 【Translating by cposture 2016-03-01】 * * * -# GCC内联汇编HOWTO +# GCC 内联汇编 HOWTO v0.1, 01 March 2003. * * * -_本HOWTO文档将讲解GCC提供的内联汇编特性的用途和用法。对于阅读这篇文章,这里只有两个前提要求,很明显,就是x86汇编语言和C语言的基本认识。_ +_本 HOWTO 文档将讲解 GCC 提供的内联汇编特性的用途和用法。对于阅读这篇文章,这里只有两个前提要求,很明显,就是 x86 汇编语言和 C 语言的基本认识。_ * * * @@ -16,36 +16,35 @@ _本HOWTO文档将讲解GCC提供的内联汇编特性的用途和用法。对 Copyright (C)2003 Sandeep S. -本文档自由共享;你可以重新发布它,并且/或者在遵循自由软件基金会发布的GNU通用公共许可证下修改它;或者该许可证的版本2,或者(按照你的需求)更晚的版本。 +本文档自由共享;你可以重新发布它,并且/或者在遵循自由软件基金会发布的 GNU 通用公共许可证下修改它;或者该许可证的版本 2 ,或者(按照你的需求)更晚的版本。 -发布这篇文档是希望它能够帮助别人,但是没有任何保证;甚至不包括可售性和适用于任何特定目的的保证。关于更详细的信息,可以查看GNU通用许可证。 +发布这篇文档是希望它能够帮助别人,但是没有任何保证;甚至不包括可售性和适用于任何特定目的的保证。关于更详细的信息,可以查看 GNU 通用许可证。 ## 1.2 反馈校正 -请将反馈和批评一起提交给[Sandeep.S](mailto:busybox@sancharnet.in)。我将感谢任何一个指出本文档中错误和不准确之处的人;一被告知,我会马上改正它们。 +请将反馈和批评一起提交给 [Sandeep.S](mailto:busybox@sancharnet.in) 。我将感谢任何一个指出本文档中错误和不准确之处的人;一被告知,我会马上改正它们。 ## 1.3 致谢 -我对提供如此棒的特性的GNU人们表示真诚的感谢。感谢Mr.Pramode C E所做的所有帮助。感谢在Govt Engineering College和Trichur朋友们的精神支持和合作,尤其是Nisha Kurur和Sakeeb S。 感谢在Gvot Engineering College和Trichur老师们的合作。 +我对提供如此棒的特性的 GNU 人们表示真诚的感谢。感谢 Mr.Pramode C E 所做的所有帮助。感谢在 Govt Engineering College 和 Trichur 的朋友们的精神支持和合作,尤其是 Nisha Kurur 和 Sakeeb S 。 感谢在 Gvot Engineering College 和 Trichur 的老师们的合作。 -另外,感谢Phillip, Brennan Underwood and colin@nyx.net;这里的许多东西都厚颜地直接取自他们的工作成果。 +另外,感谢 Phillip , Brennan Underwood 和 colin@nyx.net ;这里的许多东西都厚颜地直接取自他们的工作成果。 * * * ## 2. 概览 -在这里,我们将学习GCC内联汇编。这内联表示的是什么呢? +在这里,我们将学习 GCC 内联汇编。这内联表示的是什么呢? 我们可以要求编译器将一个函数的代码插入到调用者代码中函数被实际调用的地方。这样的函数就是内联函数。这听起来和宏差不多?这两者确实有相似之处。 +内联函数的优点是什么呢? -What is the benefit of inline functions? +这种内联方法可以减少函数调用开销。同时如果所有实参的值为常量,它们的已知值可以在编译期允许简化,因此并非所有的内联函数代码都需要被包含。代码大小的影响是不可预测的,这取决于特定的情况。为了声明一个内联函数,我们必须在函数声明中使用 `inline` 关键字。 -This method of inlining reduces the function-call overhead. And if any of the actual argument values are constant, their known values may permit simplifications at compile time so that not all of the inline function’s code needs to be included. The effect on code size is less predictable, it depends on the particular case. To declare an inline function, we’ve to use the keyword `inline` in its declaration. +现在我们正处于一个猜测内联汇编到底是什么的点上。它只不过是一些写为内联函数的汇编程序。在系统编程上,它们方便、快速并且极其有用。我们主要集中学习(GCC)内联汇编函数的基本格式和用法。为了声明内联汇编函数,我们使用 `asm` 关键词。 -Now we are in a position to guess what is inline assembly. Its just some assembly routines written as inline functions. They are handy, speedy and very much useful in system programming. Our main focus is to study the basic format and usage of (GCC) inline assembly functions. To declare inline assembly functions, we use the keyword `asm`. - -Inline assembly is important primarily because of its ability to operate and make its output visible on C variables. Because of this capability, "asm" works as an interface between the assembly instructions and the "C" program that contains it. +内联汇编之所以重要,主要是因为它能在 C 变量上操作和使其输出可见的能力。正是因为此能力, "asm" 起到了汇编指令和 包含它的"C"程序之间的接口作用。 * * * From c9dfda04bed704d1506300763541d5c459cfde18 Mon Sep 17 00:00:00 2001 From: cposture Date: Wed, 9 Mar 2016 20:22:34 +0800 Subject: [PATCH 1146/1710] translated character 3 --- .../20151220 GCC-Inline-Assembly-HOWTO.md | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index 1324bfdc33..24e749e829 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -44,47 +44,47 @@ Copyright (C)2003 Sandeep S. 现在我们正处于一个猜测内联汇编到底是什么的点上。它只不过是一些写为内联函数的汇编程序。在系统编程上,它们方便、快速并且极其有用。我们主要集中学习(GCC)内联汇编函数的基本格式和用法。为了声明内联汇编函数,我们使用 `asm` 关键词。 -内联汇编之所以重要,主要是因为它能在 C 变量上操作和使其输出可见的能力。正是因为此能力, "asm" 起到了汇编指令和 包含它的"C"程序之间的接口作用。 +内联汇编之所以重要,主要是因为它可以操作并且使其输出通过 C 变量显示出来。正是因为此能力, "asm" 可以用作汇编指令和包含它的 C 程序之间的接口。 * * * -## 3. GCC Assembler Syntax. +## 3. GCC 汇编语法 -GCC, the GNU C Compiler for Linux, uses **AT&T**/**UNIX** assembly syntax. Here we’ll be using AT&T syntax for assembly coding. Don’t worry if you are not familiar with AT&T syntax, I will teach you. This is quite different from Intel syntax. I shall give the major differences. +GCC , Linux上的 GNU C 编译器,使用 **AT&T** / **UNIX** 汇编语法。在这里,我们将使用 AT&T 语法 进行汇编编码。如果你对 AT&T 语法不熟悉的话,请不要紧张,我会教你的。AT&T 语法和 Intel 语法的差别很大。我会给出主要的区别。 -1. Source-Destination Ordering. +1. 源操作数和目的操作数顺序 - The direction of the operands in AT&T syntax is opposite to that of Intel. In Intel syntax the first operand is the destination, and the second operand is the source whereas in AT&T syntax the first operand is the source and the second operand is the destination. ie, + AT&T 语法的操作数方向和 Intel 语法的刚好相反。在Intel 语法中,第一操作数为目的操作数,第二操作数为源操作数,然而在 AT&T 语法中,第一操作数为源操作数,第二操作数为目的操作数。也就是说, - "Op-code dst src" in Intel syntax changes to + Intel 语法中的 "Op-code dst src" 变为 + + AT&T 语法中的 "Op-code src dst"。 - "Op-code src dst" in AT&T syntax. +2. 寄存器命名 -2. Register Naming. + 寄存器名称有 % 前缀,即如果必须使用 eax,它应该用作 %eax。 - Register names are prefixed by % ie, if eax is to be used, write %eax. +3. 立即数 -3. Immediate Operand. + AT&T 立即数以 ’$’ 为前缀。静态 "C" 变量 也使用 ’$’ 前缀。在 Intel 语法中,十六进制常量以 ’h’ 为后缀,然而AT&T不使用这种语法,这里我们给常量添加前缀 ’0x’。所以,对于十六进制,我们首先看到一个 ’$’,然后是 ’0x’,最后才是常量。 - AT&T immediate operands are preceded by ’$’. For static "C" variables also prefix a ’$’. In Intel syntax, for hexadecimal constants an ’h’ is suffixed, instead of that, here we prefix ’0x’ to the constant. So, for hexadecimals, we first see a ’$’, then ’0x’ and finally the constants. +4. 操作数大小 -4. Operand Size. + 在 AT&T 语法中,存储器操作数的大小取决于操作码名字的最后一个字符。操作码后缀 ’b’ 、’w’、’l’分别指明了字节(byte)(8位)、字(word)(16位)、长型(long)(32位)存储器引用。Intel 语法通过给存储器操作数添加’byte ptr’、 ’word ptr’ 和 ’dword ptr’前缀来实现这一功能。 - In AT&T syntax the size of memory operands is determined from the last character of the op-code name. Op-code suffixes of ’b’, ’w’, and ’l’ specify byte(8-bit), word(16-bit), and long(32-bit) memory references. Intel syntax accomplishes this by prefixing memory operands (not the op-codes) with ’byte ptr’, ’word ptr’, and ’dword ptr’. + 因此,Intel的 "mov al, byte ptr foo" 在 AT&T 语法中为 "movb foo, %al"。 - Thus, Intel "mov al, byte ptr foo" is "movb foo, %al" in AT&T syntax. +5. 存储器操作数 + + 在 Intel 语法中,基址寄存器包含在 ’[’ 和 ’]’ 中,然而在 AT&T 中,它们变为 ’(’ 和 ’)’。另外,在 Intel 语法中, 间接内存引用为 -5. Memory Operands. + section:[base + index*scale + disp], 在 AT&T中变为 - In Intel syntax the base register is enclosed in ’[’ and ’]’ where as in AT&T they change to ’(’ and ’)’. Additionally, in Intel syntax an indirect memory reference is like + section:disp(base, index, scale)。 - section:[base + index*scale + disp], which changes to + 需要牢记的一点是,当一个常量用于 disp 或 scale,不能添加’$’前缀。 - section:disp(base, index, scale) in AT&T. - - One point to bear in mind is that, when a constant is used for disp/scale, ’$’ shouldn’t be prefixed. - -Now we saw some of the major differences between Intel syntax and AT&T syntax. I’ve wrote only a few of them. For a complete information, refer to GNU Assembler documentations. Now we’ll look at some examples for better understanding. +现在我们看到了 Intel 语法和 AT&T 语法之间的一些主要差别。我仅仅写了它们差别的一部分而已。关于更完整的信息,请参考 GNU 汇编文档。现在为了更好地理解,我们可以看一些示例。 > ` > From 3c995d45a886f460070ca6101505567a57781a7d Mon Sep 17 00:00:00 2001 From: alim0x Date: Wed, 9 Mar 2016 20:24:12 +0800 Subject: [PATCH 1147/1710] [translating]23 - The history of Android --- .../The history of Android/23 - The history of Android.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/The history of Android/23 - The history of Android.md b/sources/talk/The history of Android/23 - The history of Android.md index e67dff87e6..f140949d7b 100644 --- a/sources/talk/The history of Android/23 - The history of Android.md +++ b/sources/talk/The history of Android/23 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![Another Play Store redesign! This one is very close to the current design and uses cards that make layout changes a piece of cake.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/get-em-Kirill.jpg) @@ -56,4 +58,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [2]:http://arstechnica.com/information-technology/2013/05/hands-on-with-hangouts-googles-new-text-and-video-chat-architecture/ [3]:https://developer.android.com/design/patterns/navigation-drawer.html [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From 063ba12e7efb22f91f28f16f7ca7fa36f1377c19 Mon Sep 17 00:00:00 2001 From: cposture Date: Thu, 10 Mar 2016 02:53:17 +0800 Subject: [PATCH 1148/1710] translated character 4 --- .../20151220 GCC-Inline-Assembly-HOWTO.md | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md index 24e749e829..39ac8a180f 100644 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -108,29 +108,29 @@ GCC , Linux上的 GNU C 编译器,使用 **AT&T** / **UNIX** 汇编语法。 * * * -## 4. Basic Inline. +## 4. 基本内联 -The format of basic inline assembly is very much straight forward. Its basic form is +基本内联汇编的格式非常直接了当。它的基本格式为 -`asm("assembly code");` +`asm("汇编代码");` -Example. +示例 > ` > > * * * > ->
asm("movl %ecx %eax"); /* moves the contents of ecx to eax */
-> __asm__("movb %bh (%eax)"); /*moves the byte from bh to the memory pointed by eax */
+> 
asm("movl %ecx %eax"); /* 将 ecx 寄存器的内容移至 eax  */
+> __asm__("movb %bh (%eax)"); /* 将 bh 的一个字节数据 移至 eax 寄存器指向的内存 */
 > 
> > * * * > > ` -You might have noticed that here I’ve used `asm` and `__asm__`. Both are valid. We can use `__asm__` if the keyword `asm` conflicts with something in our program. If we have more than one instructions, we write one per line in double quotes, and also suffix a ’\n’ and ’\t’ to the instruction. This is because gcc sends each instruction as a string to **as**(GAS) and by using the newline/tab we send correctly formatted lines to the assembler. +你可能注意到了这里我使用了 `asm ` 和 `__asm__`。这两者都是有效的。如果关键词 `asm` 和我们程序的一些标识符冲突了,我们可以使用 `__asm__`。如果我们的指令多余一条,我们可以写成一行,并用括号括起,也可以为每条指令添加 ’\n’ 和 ’\t’ 后缀。这是因为gcc将每一条当作字符串发送给 **as**(GAS)( GAS 即 GNU 汇编器 ——译者注),并且通过使用换行符/制表符发送正确地格式化行给汇编器。 -Example. +示例 > ` > @@ -146,22 +146,22 @@ Example. > > ` -If in our code we touch (ie, change the contents) some registers and return from asm without fixing those changes, something bad is going to happen. This is because GCC have no idea about the changes in the register contents and this leads us to trouble, especially when compiler makes some optimizations. It will suppose that some register contains the value of some variable that we might have changed without informing GCC, and it continues like nothing happened. What we can do is either use those instructions having no side effects or fix things when we quit or wait for something to crash. This is where we want some extended functionality. Extended asm provides us with that functionality. +如果在代码中,我们涉及到一些寄存器(即改变其内容),但在没有固定这些变化的情况下从汇编中返回,这将会导致一些不好的事情。这是因为 GCC 并不知道寄存器内容的变化,这会导致问题,特别是当编译器做了某些优化。在没有告知 GCC 的情况下,它将会假设一些寄存器存储了我们可能已经改变的变量的值,它会像什么事都没发生一样继续运行(什么事都没发生一样是指GCC不会假设寄存器装入的值是有效的,当退出改变了寄存器值的内联汇编后,寄存器的值不会保存到相应的变量或内存空间 ——译者注)。我们所可以做的是使用这些没有副作用的指令,或者当我们退出时固定这些寄存器,或者等待程序崩溃。这是为什么我们需要一些扩展功能。扩展汇编正好给我们提供了那样的功能。 * * * -## 5. Extended Asm. +## 5. 扩展汇编 -In basic inline assembly, we had only instructions. In extended assembly, we can also specify the operands. It allows us to specify the input registers, output registers and a list of clobbered registers. It is not mandatory to specify the registers to use, we can leave that head ache to GCC and that probably fit into GCC’s optimization scheme better. Anyway the basic format is: +在基本内联汇编中,我们只有指令。然而在扩展汇编中,我们可以同时指定操作数。它允许我们指定输入寄存器、输出寄存器以及修饰寄存器列表。GCC 不强制用户必须指定使用的寄存器。我们可以把头疼的事留给 GCC ,这可能可以更好地适应 GCC 的优化。不管怎樣,基本格式为: > ` > > * * * > ->
       asm ( assembler template 
->            : output operands                  /* optional */
->            : input operands                   /* optional */
->            : list of clobbered registers      /* optional */
+> 
       asm ( 汇编程序模板 
+>            : 输出操作数					/* 可选的 */
+>            : 输入操作数                   /* 可选的 */
+>            : 修饰寄存器列表			    /* 可选的 */
 >            );
 > 
> @@ -169,11 +169,11 @@ In basic inline assembly, we had only instructions. In extended assembly, we can > > ` -The assembler template consists of assembly instructions. Each operand is described by an operand-constraint string followed by the C expression in parentheses. A colon separates the assembler template from the first output operand and another separates the last output operand from the first input, if any. Commas separate the operands within each group. The total number of operands is limited to ten or to the maximum number of operands in any instruction pattern in the machine description, whichever is greater. +汇编程序模板由汇编指令组成.每一个操作数由一个操作数约束字符串所描述,其后紧接一个括弧括起的 C 表达式。冒号用于将汇编程序模板和第一个输出操作数分开,另一个(冒号)用于将最后一个输出操作数和第一个输入操作数分开,如果存在的话。逗号用于分离每一个组内的操作数。总操作数的数目限制在10个,或者机器描述中的任何指令格式中的最大操作数数目,以较大者为准。 -If there are no output operands but there are input operands, you must place two consecutive colons surrounding the place where the output operands would go. +如果没有输出操作数但存在输入操作数,你必须将两个连续的冒号放置于输出操作数原本会放置的地方周围。 -Example: +示例: > ` > @@ -182,7 +182,7 @@ Example: >
        asm ("cld\n\t"
 >              "rep\n\t"
 >              "stosl"
->              : /* no output registers */
+>              : /* 无输出寄存器 */
 >              : "c" (count), "a" (fill_value), "D" (dest)
 >              : "%ecx", "%edi" 
 >              );
@@ -192,7 +192,7 @@ Example:
 > 
 > `
 
-Now, what does this code do? The above inline fills the `fill_value` `count` times to the location pointed to by the register `edi`. It also says to gcc that, the contents of registers `eax` and `edi` are no longer valid. Let us see one more example to make things more clearer.
+现在,这段代码是干什么的?以上的内联汇编是将 `fill_value` 值 连续 `count` 次 拷贝到 寄存器 `edi` 所指位置(每执行stosl一次,寄存器 edi 的值会递增或递减,这取决于是否设置了 direction 标志,因此以上代码实则初始化一个内存块 ——译者注)。 它也告诉 gcc 寄存器 `ecx` 和 `edi` 一直无效(原文为 eax ,但代码修饰寄存器列表中为 ecx,因此这可能为作者的纰漏 ——译者注)。为了使扩展汇编更加清晰,让我们再看一个示例。
 
 > `
 > 
@@ -202,9 +202,9 @@ Now, what does this code do? The above inline fills the `fill_value` `count` 
 >         int a=10, b;
 >         asm ("movl %1, %%eax; 
 >               movl %%eax, %0;"
->              :"=r"(b)        /* output */
->              :"r"(a)         /* input */
->              :"%eax"         /* clobbered register */
+>              :"=r"(b)        /* 输出 */
+>              :"r"(a)         /* 输入 */
+>              :"%eax"         /* 修饰寄存器 */
 >              );       
 > 
> @@ -212,6 +212,7 @@ Now, what does this code do? The above inline fills the `fill_value` `count`  > > ` + Here what we did is we made the value of ’b’ equal to that of ’a’ using assembly instructions. Some points of interest are: * "b" is the output operand, referred to by %0 and "a" is the input operand, referred to by %1. @@ -564,7 +565,6 @@ Now we have covered the basic theory about GCC inline assembly, now we shall con > > * * * > - >
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
     > type name(type1 arg1,type2 arg2,type3 arg3) \
     > { \
     > long __res; \

From e896356f50417aeb520c5b159047301722d7aaa6 Mon Sep 17 00:00:00 2001
From: Name1e5s <836401406@qq.com>
Date: Fri, 11 Mar 2016 14:15:56 +0800
Subject: [PATCH 1149/1710] Name1e5s translating

---
 ... Startup Process and Services SysVinit Systemd and Upstart.md | 1 +
 1 file changed, 1 insertion(+)

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 2a822e8a45..24d431696d 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,4 @@
+Name1e5s translating......
 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.

From 3e2b2bd1bd5f81d27c26b1bfbcc0be4c5063f3a0 Mon Sep 17 00:00:00 2001
From: cposture 
Date: Sat, 12 Mar 2016 02:26:46 +0800
Subject: [PATCH 1150/1710] translated 6th character

---
 .../20151220 GCC-Inline-Assembly-HOWTO.md     | 141 +++++++++---------
 1 file changed, 71 insertions(+), 70 deletions(-)

diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md
index 39ac8a180f..b60ccad1f3 100644
--- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md	
+++ b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md	
@@ -212,37 +212,36 @@ GCC , Linux上的 GNU C 编译器,使用 **AT&T** / **UNIX** 汇编语法。
 > 
 > `
 
+这里我们所做的是使用汇编指令使 ’b’ 变量的值等于 ’a’ 变量的值。一些有意思的地方是:
 
-Here what we did is we made the value of ’b’ equal to that of ’a’ using assembly instructions. Some points of interest are:
+*	"b" 为输出操作数,用 %0 引用,并且 "a" 为输入操作数,用 %1 引用。
+*	"r" 为操作数约束。之后我们会更详细地了解约束(字符串)。目前,"r" 告诉 GCC 可以使用任一寄存器存储操作数。输出操作数约束应该有一个约束修饰符 "=" 。这修饰符表明它是一个只读的输出操作数。
+*	寄存器名字以两个%为前缀。这有利于 GCC 区分操作数和寄存器。操作数以一个 % 为前缀。
+*	第三个冒号之后的修饰寄存器 %eax 告诉 GCC %eax的值将会在 "asm" 内部被修改,所以 GCC 将不会使用此寄存器存储任何其他值。
 
-*   "b" is the output operand, referred to by %0 and "a" is the input operand, referred to by %1.
-*   "r" is a constraint on the operands. We’ll see constraints in detail later. For the time being, "r" says to GCC to use any register for storing the operands. output operand constraint should have a constraint modifier "=". And this modifier says that it is the output operand and is write-only.
-*   There are two %’s prefixed to the register name. This helps GCC to distinguish between the operands and registers. operands have a single % as prefix.
-*   The clobbered register %eax after the third colon tells GCC that the value of %eax is to be modified inside "asm", so GCC won’t use this register to store any other value.
+当 "asm" 执行完毕, "b" 变量会映射到更新的值,因为它被指定为输出操作数。换句话说, "asm" 内 "b" 变量的修改 应该会被映射到 "asm" 外部。
 
-When the execution of "asm" is complete, "b" will reflect the updated value, as it is specified as an output operand. In other words, the change made to "b" inside "asm" is supposed to be reflected outside the "asm".
+现在,我们可以更详细地看看每一个域。
 
-Now we may look each field in detail.
+## 5.1 汇编程序模板
 
-## 5.1 Assembler Template.
+汇编程序模板包含了被插入到 C 程序的汇编指令集。其格式为:每条指令用双引号圈起,或者整个指令组用双引号圈起。同时每条指令应以分界符结尾。有效的分界符有换行符(\n)和逗号(;)。’\n’ 可以紧随一个制表符(\t)。我们应该都明白使用换行符或制表符的原因了吧?和 C 表达式对应的操作数使用 %0、%1 ... 等等表示。
 
-The assembler template contains the set of assembly instructions that gets inserted inside the C program. The format is like: either each instruction should be enclosed within double quotes, or the entire group of instructions should be within double quotes. Each instruction should also end with a delimiter. The valid delimiters are newline(\n) and semicolon(;). ’\n’ may be followed by a tab(\t). We know the reason of newline/tab, right?. Operands corresponding to the C expressions are represented by %0, %1 ... etc.
+## 5.2 操作数
 
-## 5.2 Operands.
+C 表达式用作 "asm" 内的汇编指令操作数。作为第一双引号内的操作数约束,写下每一操作数。对于输出操作数,在引号内还有一个约束修饰符,其后紧随一个用于表示操作数的 C 表达式。即,
 
-C expressions serve as operands for the assembly instructions inside "asm". Each operand is written as first an operand constraint in double quotes. For output operands, there’ll be a constraint modifier also within the quotes and then follows the C expression which stands for the operand. ie,
+"约束字符串"(C 表达式),它是一个通用格式。对于输出操作数,还有一个额外的修饰符。约束字符串主要用于决定操作数的寻找方式,同时也用于指定使用的寄存器。
 
-"constraint" (C expression) is the general form. For output operands an additional modifier will be there. Constraints are primarily used to decide the addressing modes for operands. They are also used in specifying the registers to be used.
+如果我们使用的操作数多于一个,那么每一个操作数用逗号隔开。
 
-If we use more than one operand, they are separated by comma.
+在汇编程序模板,每个操作数用数字引用。编号方式如下。如果总共有 n 个操作数(包括输入和输出操作数),那么第一个输出操作数编号为 0 ,逐项递增,并且最后一个输入操作数编号为 n - 1 。操作数的最大数目为前一节我们所看到的那样。
 
-In the assembler template, each operand is referenced by numbers. Numbering is done as follows. If there are a total of n operands (both input and output inclusive), then the first output operand is numbered 0, continuing in increasing order, and the last input operand is numbered n-1\. The maximum number of operands is as we saw in the previous section.
+输出操作数表达式必须为左值。输入操作数的要求不像这样严格。它们可以为表达式。扩展汇编特性常常用于编译器自己不知道其存在的机器指令 ;-)。如果输出表达式无法直接寻址(例如,它是一个位域),我们的约束字符串必须给定一个寄存器。在这种情况下,GCC 将会使用该寄存器作为汇编的输出,然后存储该寄存器的内容到输出。
 
-Output operand expressions must be lvalues. The input operands are not restricted like this. They may be expressions. The extended asm feature is most often used for machine instructions the compiler itself does not know as existing ;-). If the output expression cannot be directly addressed (for example, it is a bit-field), our constraint must allow a register. In that case, GCC will use the register as the output of the asm, and then store that register contents into the output.
+正如前面所陈述的一样,普通的输出操作数必须为只写的; GCC 将会假设指令前的操作数值是死的,并且不需要被(提前)生成。扩展汇编也支持输入-输出或者读-写操作数。
 
-As stated above, ordinary output operands must be write-only; GCC will assume that the values in these operands before the instruction are dead and need not be generated. Extended asm also supports input-output or read-write operands.
-
-So now we concentrate on some examples. We want to multiply a number by 5\. For that we use the instruction `lea`.
+所以现在我们来关注一些示例。我们想要求一个数的5次方结果。为了计算该值,我们使用 `lea` 指令。
 
 > `
 > 
@@ -258,7 +257,7 @@ So now we concentrate on some examples. We want to multiply a number by 5\. For
 > 
 > `
 
-Here our input is in ’x’. We didn’t specify the register to be used. GCC will choose some register for input, one for output and does what we desired. If we want the input and output to reside in the same register, we can instruct GCC to do so. Here we use those types of read-write operands. By specifying proper constraints, here we do it.
+这里我们的输入为x。我们不指定使用的寄存器。 GCC 将会选择一些输入寄存器,一个输出寄存器,并且做我们期望的事。如果我们想要输入和输出存在于同一个寄存器里,我们可以要求 GCC 这样做。这里我们使用那些读-写操作数类型。这里我们通过指定合适的约束来实现它。
 
 > `
 > 
@@ -274,7 +273,7 @@ Here our input is in ’x’. We didn’t specify the register to be used. GCC w
 > 
 > `
 
-Now the input and output operands are in the same register. But we don’t know which register. Now if we want to specify that also, there is a way.
+现在输出和输出操作数位于同一个寄存器。但是我们无法得知是哪一个寄存器。现在假如我们也想要指定操作数所在的寄存器,这里有一种方法。
 
 > `
 > 
@@ -290,17 +289,17 @@ Now the input and output operands are in the same register. But we don’t know
 > 
 > `
 
-In all the three examples above, we didn’t put any register to the clobber list. why? In the first two examples, GCC decides the registers and it knows what changes happen. In the last one, we don’t have to put `ecx` on the c lobberlist, gcc knows it goes into x. Therefore, since it can know the value of `ecx`, it isn’t considered clobbered.
+在以上三个示例中,我们并没有添加任何寄存器到修饰寄存器里,为什么?在头两个示例, GCC 决定了寄存器并且它知道发生了什么改变。在最后一个示例,我们不必将 'ecx' 添加到修饰寄存器列表(原文修饰寄存器列表拼写有错,这里已修正 ——译者注), gcc 知道它表示x。因此,因为它可以知道 `ecx` 的值,它就不被当作修饰的(寄存器)了。
 
-## 5.3 Clobber List.
+## 5.3 修饰寄存器列表
 
-Some instructions clobber some hardware registers. We have to list those registers in the clobber-list, ie the field after the third ’**:**’ in the asm function. This is to inform gcc that we will use and modify them ourselves. So gcc will not assume that the values it loads into these registers will be valid. We shoudn’t list the input and output registers in this list. Because, gcc knows that "asm" uses them (because they are specified explicitly as constraints). If the instructions use any other registers, implicitly or explicitly (and the registers are not present either in input or in the output constraint list), then those registers have to be specified in the clobbered list.
+一些指令会破坏一些硬件寄存器。我们不得不在修饰寄存器中列出这些寄存器,即汇编函数内第三个 ’**:**’ 之后的域。这可以通知 gcc 我们将会自己使用和修改这些寄存器。所以 gcc 将不会假设存入这些寄存器的值是有效的。我们不用在这个列表里列出输入输出寄存器。因为 gcc 知道 "asm" 使用了它们(因为它们被显式地指定为约束了)。如果指令隐式或显式地使用了任何其他寄存器,(并且寄存器不能出现在输出或者输出约束列表里),那么不得不在修饰寄存器列表中指定这些寄存器。
 
-If our instruction can alter the condition code register, we have to add "cc" to the list of clobbered registers.
+如果我们的指令可以修改状态寄存器,我们必须将 "cc" 添加进修饰寄存器列表。
 
-If our instruction modifies memory in an unpredictable fashion, add "memory" to the list of clobbered registers. This will cause GCC to not keep memory values cached in registers across the assembler instruction. We also have to add the **volatile** keyword if the memory affected is not listed in the inputs or outputs of the asm.
+如果我们的指令以不可预测的方式修改了内存,那么需要将 "memory" 添加进修饰寄存器列表。这可以使 GCC 不会在汇编指令间保持缓存于寄存器的内存值。如果被影响的内存不在汇编的输入或输出列表中,我们也必须添加 **volatile** 关键词。
 
-We can read and write the clobbered registers as many times as we like. Consider the example of multiple instructions in a template; it assumes the subroutine _foo accepts arguments in registers `eax` and `ecx`.
+我们可以按我们的需求多次读写修饰寄存器。考虑一个模板内的多指令示例;它假设子例程 _foo 接受寄存器 `eax` 和 `ecx` 里的参数。
 
 > `
 > 
@@ -321,35 +320,36 @@ We can read and write the clobbered registers as many times as we like. Consider
 
 ## 5.4 Volatile ...?
 
-If you are familiar with kernel sources or some beautiful code like that, you must have seen many functions declared as `volatile` or `__volatile__` which follows an `asm` or `__asm__`. I mentioned earlier about the keywords `asm` and `__asm__`. So what is this `volatile`?
+如果你熟悉内核源码或者其他像内核源码一样漂亮的代码,你一定见过许多声明为 `volatile` 或者 `__volatile__`的函数,其跟着一个 `asm` 或者 `__asm__`。我之前提过关键词 `asm` 和 `__asm__`。那么什么是 `volatile`呢?
 
-If our assembly statement must execute where we put it, (i.e. must not be moved out of a loop as an optimization), put the keyword `volatile` after asm and before the ()’s. So to keep it from moving, deleting and all, we declare it as
+如果我们的汇编语句必须在我们放置它的地方执行(即,不能作为一种优化被移出循环语句),将关键词 `volatile` 放置在 asm 后面,()的前面。因为为了防止它被移动、删除或者其他操作,我们将其声明为
 
 `asm volatile ( ... : ... : ... : ...);`
 
-Use `__volatile__` when we have to be verymuch careful.
+当我们必须非常谨慎时,请使用 `__volatile__`。
 
-If our assembly is just for doing some calculations and doesn’t have any side effects, it’s better not to use the keyword `volatile`. Avoiding it helps gcc in optimizing the code and making it more beautiful.
+如果我们的汇编只是用于一些计算并且没有任何副作用,不使用 `volatile` 关键词会更好。不使用 `volatile` 可以帮助 gcc 优化代码并使代码更漂亮。
 
-In the section `Some Useful Recipes`, I have provided many examples for inline asm functions. There we can see the clobber-list in detail.
+
+在 `Some Useful Recipes` 一节中,我提供了多个内联汇编函数的例子。这儿我们详细查看修饰寄存器列表。
 
 * * *
 
-## 6. More about constraints.
+## 6. 更多关于约束
 
-By this time, you might have understood that constraints have got a lot to do with inline assembly. But we’ve said little about constraints. Constraints can say whether an operand may be in a register, and which kinds of register; whether the operand can be a memory reference, and which kinds of address; whether the operand may be an immediate constant, and which possible values (ie range of values) it may have.... etc.
+到这个时候,你可能已经了解到约束和内联汇编有很大的关联。但我们很少说到约束。约束用于表明一个操作数是否可以位于寄存器和位于哪个寄存器;是否操作数可以为一个内存引用和哪种地址;是否操作数可以为一个立即数和为哪一个可能的值(即值的范围)。它可以有...等等。
 
-## 6.1 Commonly used constraints.
+## 6.1 常用约束
 
-There are a number of constraints of which only a few are used frequently. We’ll have a look at those constraints.
+在许多约束中,只有小部分是常用的。我们将看看这些约束。
 
-1.  **Register operand constraint(r)**
+1.  **寄存器操作数约束(r)**
 
-    When operands are specified using this constraint, they get stored in General Purpose Registers(GPR). Take the following example:
+	当使用这种约束指定操作数时,它们存储在通用寄存器(GPR)中。请看下面示例:
 
     `asm ("movl %%eax, %0\n" :"=r"(myval));`
 
-    Here the variable myval is kept in a register, the value in register `eax` is copied onto that register, and the value of `myval` is updated into the memory from this register. When the "r" constraint is specified, gcc may keep the variable in any of the available GPRs. To specify the register, you must directly specify the register names by using specific register constraints. They are:
+	这里,变量 myval 保存在寄存器中,寄存器 eax 的值被复制到该寄存器中,并且myval的值从寄存器更新到了内存。当指定 "r" 约束时, gcc 可以将变量保存在任何可用的 GPR 中。为了指定寄存器,你必须使用特定寄存器约束直接地指定寄存器的名字。它们为:
 
     > `
     > 
@@ -367,57 +367,58 @@ There are a number of constraints of which only a few are used frequently. We’
     > 
     > `
 
-2.  **Memory operand constraint(m)**
+2.	**内存操作数约束(m)**
 
-    When the operands are in the memory, any operations performed on them will occur directly in the memory location, as opposed to register constraints, which first store the value in a register to be modified and then write it back to the memory location. But register constraints are usually used only when they are absolutely necessary for an instruction or they significantly speed up the process. Memory constraints can be used most efficiently in cases where a C variable needs to be updated inside "asm" and you really don’t want to use a register to hold its value. For example, the value of idtr is stored in the memory location loc:
+	当操作数位于内存时,任何对它们的操作将直接发生在内存位置,这与寄存器约束相反,后者首先将值存储在要修改的寄存器中,然后将它写回到内存位置。但寄存器约束通常用于一个指令必须使用它们或者它们可以大大提高进程速度的地方。当需要在 "asm" 内更新一个 C 变量,而又不想使用寄存器去保存它的只,使用内存最为有效。例如, idtr 的值存储于内存位置:
 
     `asm("sidt %0\n" : :"m"(loc));`
 
-3.  **Matching(Digit) constraints**
+3.	**匹配(数字)约束**
 
-    In some cases, a single variable may serve as both the input and the output operand. Such cases may be specified in "asm" by using matching constraints.
+	在某些情况下,一个变量可能既充当输入操作数,也充当输出操作数。可以通过使用匹配约束在 "asm" 中指定这种情况。
 
     `asm ("incl %0" :"=a"(var):"0"(var));`
 
-    We saw similar examples in operands subsection also. In this example for matching constraints, the register %eax is used as both the input and the output variable. var input is read to %eax and updated %eax is stored in var again after increment. "0" here specifies the same constraint as the 0th output variable. That is, it specifies that the output instance of var should be stored in %eax only. This constraint can be used:
+	在操作数子节中,我们也看到了一些类似的示例。在这个匹配约束的示例中,寄存器 "%eax" 既用作输入变量,也用作输出变量。 var 输入被读进 %eax ,并且更新的 %eax 再次被存储进 var。这里的 "0" 用于指定与第0个输出变量相同的约束。也就是,它指定 var 输出实例应只被存储在 "%eax" 中。该约束可用于:
 
-    *   In cases where input is read from a variable or the variable is modified and modification is written back to the same variable.
-    *   In cases where separate instances of input and output operands are not necessary.
+	*	在输入从变量读取或变量修改后,修改被写回同一变量的情况
+	*	在不需要将输入操作数实例和输出操作数实例分开的情况
 
-    The most important effect of using matching restraints is that they lead to the efficient use of available registers.
+	使用匹配约束最重要的意义在于它们可以导致有效地使用可用寄存器。
 
-Some other constraints used are:
+其他一些约束:
 
-1.  "m" : A memory operand is allowed, with any kind of address that the machine supports in general.
-2.  "o" : A memory operand is allowed, but only if the address is offsettable. ie, adding a small offset to the address gives a valid address.
+1.	"m" : 允许一个内存操作数使用机器普遍支持的任一种地址。
+2.	"o" : 允许一个内存操作数,但只有当地址是可偏移的。即,该地址加上一个小的偏移量可以得到一个地址。
 3.  "V" : A memory operand that is not offsettable. In other words, anything that would fit the `m’ constraint but not the `o’constraint.
-4.  "i" : An immediate integer operand (one with constant value) is allowed. This includes symbolic constants whose values will be known only at assembly time.
-5.  "n" : An immediate integer operand with a known numeric value is allowed. Many systems cannot support assembly-time constants for operands less than a word wide. Constraints for these operands should use ’n’ rather than ’i’.
-6.  "g" : Any register, memory or immediate integer operand is allowed, except for registers that are not general registers.
+4.	"i" : 允许一个(带有常量)的立即整形操作数。这包括其值仅在汇编时期知道的符号常量。
+5.	"n" : 允许一个带有已知数字的立即整形操作数。许多系统不支持汇编时期的常量,因为操作数少于一个字宽。对于此种操作数,约束应该使用 'n' 而不是'i'。 
+6.	"g" : 允许任一寄存器、内存或者立即整形操作数,不包括通用寄存器之外的寄存器。
 
-Following constraints are x86 specific.
 
-1.  "r" : Register operand constraint, look table given above.
-2.  "q" : Registers a, b, c or d.
-3.  "I" : Constant in range 0 to 31 (for 32-bit shifts).
-4.  "J" : Constant in range 0 to 63 (for 64-bit shifts).
-5.  "K" : 0xff.
-6.  "L" : 0xffff.
-7.  "M" : 0, 1, 2, or 3 (shifts for lea instruction).
-8.  "N" : Constant in range 0 to 255 (for out instruction).
-9.  "f" : Floating point register
-10.  "t" : First (top of stack) floating point register
-11.  "u" : Second floating point register
-12.  "A" : Specifies the `a’ or `d’ registers. This is primarily useful for 64-bit integer values intended to be returned with the `d’ register holding the most significant bits and the `a’ register holding the least significant bits.
+以下约束为x86特有。
 
-## 6.2 Constraint Modifiers.
+1.	"r" : 寄存器操作数约束,查看上面给定的表格。
+2.	"q" : 寄存器 a、b、c 或者 d。
+3.	"I" : 范围从 0 到 31 的常量(对于 32 位移位)。
+4.  "J" : 范围从 0 到 63 的常量(对于 64 位移位)。
+5.	"K" : 0xff。
+6.  "L" : 0xffff。
+7.  "M" : 0, 1, 2, or 3 (lea 指令的移位)。
+8.  "N" : 范围从 0 到 255 的常量(对于 out 指令)。
+9.  "f" : 浮点寄存器
+10.  "t" : 第一个(栈顶)浮点寄存器
+11.  "u" : 第二个浮点寄存器
+12.  "A" : 指定 `a` 或 `d` 寄存器。这主要用于想要返回 64 位整形数,使用 `d` 寄存器保存最高有效位和 `a` 寄存器保存最低有效位。
 
-While using constraints, for more precise control over the effects of constraints, GCC provides us with constraint modifiers. Mostly used constraint modifiers are
+## 6.2 约束修饰符
 
-1.  "=" : Means that this operand is write-only for this instruction; the previous value is discarded and replaced by output data.
-2.  "&" : Means that this operand is an earlyclobber operand, which is modified before the instruction is finished using the input operands. Therefore, this operand may not lie in a register that is used as an input operand or as part of any memory address. An input operand can be tied to an earlyclobber operand if its only use as an input occurs before the early result is written.
+当使用约束时,对于更精确的控制超越了约束作用的需求,GCC 给我们提供了约束修饰符。最常用的约束修饰符为:
 
-    The list and explanation of constraints is by no means complete. Examples can give a better understanding of the use and usage of inline asm. In the next section we’ll see some examples, there we’ll find more about clobber-lists and constraints.
+1.  "=" : 意味着对于这条指令,操作数为只写的;旧值会被忽略并被输出数据所替换。
+2.  "&" : 意味着这个操作数为一个早期的改动操作数,其在该指令完成前通过使用输入操作数被修改了。因此,这个操作数不可以位于一个被用作输出操作数或任何内存地址部分的寄存器。如果在旧值被写入之前它仅用作输入而已,一个输入操作数可以为一个早期改动操作数。
+
+	约束的列表和解释是决不完整的。示例可以给我们一个关于内联汇编的用途和用法的更好的理解。在下一节,我们会看到一些示例,在那里我们会发现更多关于修饰寄存器列表的东西。
 
 * * *
 

From ee4a1ed9806c00effc356ed4bcb030df944bd30b Mon Sep 17 00:00:00 2001
From: Name1e5s <836401406@qq.com>
Date: Sat, 12 Mar 2016 09:34:49 +0800
Subject: [PATCH 1151/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=9A=84=E4=B8=8D?=
 =?UTF-8?q?=E5=A5=BD=EF=BC=8C=E9=80=80=E5=9B=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ... Startup Process and Services SysVinit Systemd and Upstart.md | 1 -
 1 file changed, 1 deletion(-)

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 24d431696d..2a822e8a45 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,4 +1,3 @@
-Name1e5s translating......
 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.

From 386d6a10c68cab1760a8bb35dc42b55040eee957 Mon Sep 17 00:00:00 2001
From: cposture 
Date: Sat, 12 Mar 2016 15:24:02 +0800
Subject: [PATCH 1152/1710] Translating by cposture 2016-03-12

---
 .../20160220 Best Cloud Services For Linux To Replace Copy.md    | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md b/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md
index cd2ffee237..8e178b856e 100644
--- a/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md	
+++ b/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md	
@@ -1,3 +1,4 @@
+[Translating by cposture 2016-03-12]
 Best Cloud Services For Linux To Replace Copy
 ===============================================
 

From 937fe5e12d114083536c432ab84981490f2336b2 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Sat, 12 Mar 2016 19:07:58 +0800
Subject: [PATCH 1153/1710] PUB:20151028 Bossie Awards 2015--The best open
 source networking and security software
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

@robot527 翻译的不错!用心了!
---
 ...source networking and security software.md | 56 +++++++++----------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/published/20151028 Bossie Awards 2015--The best open source networking and security software.md b/published/20151028 Bossie Awards 2015--The best open source networking and security software.md
index d245fe2a4c..14eb07dee2 100644
--- a/published/20151028 Bossie Awards 2015--The best open source networking and security software.md	
+++ b/published/20151028 Bossie Awards 2015--The best open source networking and security software.md	
@@ -1,6 +1,6 @@
-2015 Bossie 评选:最佳开源网络和安全软件
+网络与安全方面的最佳开源软件
 ================================================================================ 
-InfoWorld 在建设网络,运营网络和保障网络安全领域精选出了年度开源工具获奖者。
+InfoWorld 在部署、运营和保障网络安全领域精选出了年度开源工具获奖者。
 
 ![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-net-sec-100614459-orig.jpg)
 
@@ -12,9 +12,9 @@ InfoWorld 在建设网络,运营网络和保障网络安全领域精选出了
 
 ### Icinga 2 ###
 
-Icinga 起先只是系统监控应用 Nagios 的一个分支。[Icinga 2][1] 经历了完全的重写,为用户带来了时尚的界面,对多数据库的支持,以及一个集成众多扩展的 API。凭借着配置好的负载均衡、通知和配置文件,Icinga 2 缩短了在复杂环境下安装的时间。Icinga 2 原生支持 [Graphite](https://github.com/graphite-project/graphite-web)(系统监控应用),轻松为管理员呈现实时性能图表。不过真的让 Icinga 今年重新火起来的原因是 Icinga Web 2 的发布,那是一个支持可拖放定制的 dashboard 和一些流式监控工具的前端图形界面系统 。
+Icinga 起先只是系统监控应用 Nagios 的一个衍生分支。[Icinga 2][1] 经历了完全的重写,为用户带来了时尚的界面、对多数据库的支持,以及一个集成了众多扩展的 API。凭借着开箱即用的负载均衡、通知和配置文件,Icinga 2 缩短了在复杂环境下安装的时间。Icinga 2 原生支持 [Graphite](https://github.com/graphite-project/graphite-web)(系统监控应用),轻松为管理员呈现实时性能图表。不过真的让 Icinga 今年重新火起来的原因是 Icinga Web 2 的发布,那是一个支持可拖放定制的 仪表盘 和一些流式监控工具的前端图形界面系统。
 
-管理员可以查看,过滤,并把问题按优先顺序排好,同时保持跟踪已经进行的动作。一个新的矩阵视图使管理员能够在一个页面上查看主机和服务。你可以通过查看特定时间段的事件或筛选事件类型来了解哪些事件需要立即关注。虽然 Icinga Web 2 有着全新界面和更为强劲的性能,不过对于传统版 Icinga 和 Web 版 Icinga 的所有常用命令还是照旧支持的。这意味着学习新版工具不耗费额外的时间。
+管理员可以查看、过滤、并按优先顺序排列发现的问题,同时可以跟踪已经采取的动作。一个新的矩阵视图使管理员能够在单一页面上查看主机和服务。你可以通过查看特定时间段的事件或筛选事件类型来了解哪些事件需要立即关注。虽然 Icinga Web 2 有着全新界面和更为强劲的性能,不过对于传统版 Icinga 和 Web 版 Icinga 的所有常用命令还是照旧支持的。这意味着学习新版工具不耗费额外的时间。
 
 -- Fahmida Rashid
 
@@ -22,11 +22,11 @@ Icinga 起先只是系统监控应用 Nagios 的一个分支。[Icinga 2][1] 经
 
 ### Zenoss Core ###
 
-另一个强大的开源软件,[Zenoss Core][2] 为网络管理员提供了一个完整的,一站式解决方案来跟踪和管理所有的应用程序、服务器、存储,网络组件、虚拟化工具、以及企业基础架构的其他元素。管理员可以确保硬件的运行效率并利用 ZenPacks 中模块化设计的插件来扩展功能。
+这是另一个强大的开源软件,[Zenoss Core][2] 为网络管理员提供了一个完整的、一站式解决方案来跟踪和管理所有的应用程序、服务器、存储、网络组件、虚拟化工具、以及企业基础架构的其他元素。管理员可以确保硬件的运行效率并利用 ZenPacks 中模块化设计的插件来扩展功能。
 
-Zenoss Core 5,在今年二月发布,保留了已经很强大的工具,并进一步改进以增强用户界面和扩展 dashboard。基于 Web 的控制台和 dashboard 已经是高度可定制并动态调整的存在了,现在新版本还能让管理员混搭多个组件图表到一个图表。想来这定是一个更好的根源分析和因果分析的工具。
+在2015年二月发布的 Zenoss Core 5 保留了已经很强大的工具,并进一步改进以增强用户界面和扩展 仪表盘。基于 Web 的控制台和 仪表盘 可以高度可定制并动态调整,而现在的新版本还能让管理员混搭多个组件图表到一个图表中。想来这应该是一个更好的根源分析和因果分析的工具。
 
-Portlets 为网络映射、设备问题、守护进程、产品状态、监视列表和事件视图等等提供深入的分析。而且新的 HTML5 图表可以从工具导出。Zenoss 的控制中心支持带外管理并且可监控所有 Zenoss 组件。Zenoss Core 拥有在线备份和恢复、快照和回滚以及多主机部署的新工具。更重要的是,凭借对 Docker 的全面支持,部署起来更快了。
+Portlets 为网络映射、设备问题、守护进程、产品状态、监视列表和事件视图等等提供了深入的分析。而且新版 HTML5 图表可以从工具导出。Zenoss 的控制中心支持带外管理并且可监控所有 Zenoss 组件。Zenoss Core 现在拥有一些新工具,用于在线备份和恢复、快照和回滚以及多主机部署等方面。更重要的是,凭借对 Docker 的全面支持,部署起来更快了。
 
 -- Fahmida Rashid
 
@@ -34,9 +34,9 @@ Portlets 为网络映射、设备问题、守护进程、产品状态、监视
 
 ### OpenNMS ###
 
-作为一个非常灵活的网络管理解决方案,[OpenNMS][3] 可以处理任何网络管理任务,无论是设备管理,应用性能监控,库存控制,或事件管理。凭借对 IPv6 的支持,强大的警报系统和记录用户脚本来测试 Web 应用程序的能力,OpenNMS 拥有网络管理员和测试人员需要的一切。OpenNMS 现在变得像一款移动 dashboard,堪称 OpenNMS 指南针,可让网络专家随时,甚至在外出时都可以监视他们的网络。
+作为一个非常灵活的网络管理解决方案,[OpenNMS][3] 可以处理任何网络管理任务,无论是设备管理、应用性能监控、库存控制,或事件管理。凭借对 IPv6 的支持、强大的警报系统和记录用户脚本来测试 Web 应用程序的能力,OpenNMS 拥有网络管理员和测试人员需要的一切。OpenNMS 现在变得像一款移动版 仪表盘,称之为 OpenNMS Compass,可让网络专家随时,甚至在外出时都可以监视他们的网络。
 
-该应用程序的 IOS 版本,可从 [iTunes App Store][4] 上获取,显示故障、节点和告警。下一个版本将提供更多的事件细节、资源图表、以及关于 IP 和 SNMP 接口的信息。安卓版可从 [Google Play][5] 上获取,可在 dashboard 上显示网络可用性,故障和告警,以及确认、提升或清除告警的能力。移动客户端与 OpenNMS Horizon 1.12 或更高版本以及 OpenNMS Meridian 2015.1.0 或更高版本兼容。
+该应用程序的 IOS 版本,可从 [iTunes App Store][4] 上获取,可以显示故障、节点和告警。下一个版本将提供更多的事件细节、资源图表、以及关于 IP 和 SNMP 接口的信息。安卓版可从 [Google Play][5] 上获取,可在 仪表盘 上显示网络可用性,故障和告警,以及可以确认、提升或清除告警。移动客户端与 OpenNMS Horizon 1.12 或更高版本以及 OpenNMS Meridian 2015.1.0 或更高版本兼容。
 
 -- Fahmida Rashid
 
@@ -44,21 +44,21 @@ Portlets 为网络映射、设备问题、守护进程、产品状态、监视
 
 ### Security Onion ###
 
-如同一个洋葱,网络安全监控是由许多层组成。没有任何一个单一的工具可以让你洞察每一次攻击,为你显示你公司网络中的每一次侦查或是会话的足迹。[Security Onion][6] 在一个简单易用的 Ubuntu 发行版中打包了许多经过验证的工具,这会让你看到谁留在你的网络里,并帮助你隔离这些坏家伙。
+如同一个洋葱,网络安全监控是由许多层组成。没有任何一个单一的工具可以让你洞察每一次攻击,为你显示对你的公司网络中的每一次侦查或是会话的足迹。[Security Onion][6] 在一个简单易用的 Ubuntu 发行版中打包了许多久经考验的工具,可以让你看到谁留在你的网络里,并帮助你隔离这些坏家伙。
 
 无论你是采取主动式的网络安全监测还是追查可能的攻击,Security Onion 都可以帮助你。Onion 由传感器、服务器和显示层组成,结合了基于网络和基于主机的入侵检测,全面的网络数据包捕获,并提供了所有类型的日志以供检查和分析。
 
-这是一个众星云集的的网络安全工具链,包括用于网络抓包的 [Netsniff-NG](http://www.netsniff-ng.org/)、基于规则的网络入侵检测系统 Snort 和 [Suricata](https://en.wikipedia.org/wiki/Suricata_%28software%29),基于分析的网络监控系统 Bro,基于主机的入侵检测系统 OSSEC 和用于显示、分析和日志管理的 Sguil、Squert、Snorby 和 ELSA (企业日志搜索和归档)。是一个经过精挑细选的工具集,所有的这些全被打包进一个向导式的安装程序并有完整的文档支持,可以帮助你尽可能快地上手监控。
+这是一个众星云集的的网络安全工具链,包括用于网络抓包的 [Netsniff-NG](http://www.netsniff-ng.org/)、基于规则的网络入侵检测系统 Snort 和 [Suricata](https://en.wikipedia.org/wiki/Suricata_%28software%29),基于分析的网络监控系统 Bro,基于主机的入侵检测系统 OSSEC 和用于显示、分析和日志管理的 Sguil、Squert、Snorby 和 ELSA (企业日志搜索和归档(Enterprise Log Search and Archive))。它是一个经过精挑细选的工具集,所有的这些全被打包进一个向导式的安装程序并有完整的文档支持,可以帮助你尽可能快地上手监控。
 
 -- Victor R. Garza
 
 ![](http://images.techhive.com/images/article/2015/09/bossies-2015-kali-100614458-orig.jpg)
 
-Kali Linux
+### Kali Linux ###
 
-[Kali Linux][7] 背后的团队今年改版了流行的安全 Linux 发行版,使其更快,更全能。Kali 采用全新 4.0 版的内核 ,改进了对硬件和无线驱动程序的支持,并且界面更为流畅。最常用的工具都可从屏幕的侧边栏上轻松找到。而最大的最大的改变是 Kali Linux 现在是一个滚动发行版,具有持续的软件更新。Kali 的核心系统是基于 Debian Jessie,而且该团队会不断地从 Debian 测试版 pull 软件包,并持续的在上面添加 Kali 风格的新特性。
+[Kali Linux][7] 背后的团队今年为这个流行的安全 Linux 发行版发布了新版本,使其更快,更全能。Kali 采用全新 4.0 版的内核,改进了对硬件和无线驱动程序的支持,并且界面更为流畅。最常用的工具都可从屏幕的侧边栏上轻松找到。而最大的改变是 Kali Linux 现在是一个滚动发行版,具有持续不断的软件更新。Kali 的核心系统是基于 Debian Jessie,而且该团队会不断地从 Debian 测试版拉取最新的软件包,并持续的在上面添加 Kali 风格的新特性。
 
-该发行版仍然配备满了渗透测试,漏洞分析,安全审查,网络应用分析,无线网络评估,逆向工程,和漏洞利用工具。现在该发行版具有新版本检测系统,当有个别工具可更新时系统会自动通知用户。该发行版还具有一系列设备的 ARM 镜像,包括树莓派、[Chromebook](https://en.wikipedia.org/wiki/Chromebook) 和 [Odroid](https://en.wikipedia.org/wiki/ODROID),也更新了 Android 设备上运行的 [NetHunter](https://www.kali.org/kali-linux-nethunter/) 渗透测试平台。还有其他的变化:Metasploit 的社区版/专业版不再包括在内,因为 Kali 2.0 还没有 [Rapid7 的官方支持][8]。
+该发行版仍然配备了很多的渗透测试,漏洞分析,安全审查,网络应用分析,无线网络评估,逆向工程,和漏洞利用工具。现在该发行版具有上游版本检测系统,当有个别工具可更新时系统会自动通知用户。该发行版还提过了一系列 ARM 设备的镜像,包括树莓派、[Chromebook](https://en.wikipedia.org/wiki/Chromebook) 和 [Odroid](https://en.wikipedia.org/wiki/ODROID),同时也更新了 Android 设备上运行的 [NetHunter](https://www.kali.org/kali-linux-nethunter/) 渗透测试平台。还有其他的变化:Metasploit 的社区版/专业版不再包括在内,因为 Kali 2.0 还没有 [Rapid7 的官方支持][8]。
 
 -- Fahmida Rashid
 
@@ -66,9 +66,9 @@ Kali Linux
 
 ### OpenVAS ###
 
-开放式漏洞评估系统 [OpenVAS][9],是一个整合多种服务和工具来提供漏洞扫描和漏洞管理的软件框架。该扫描器与每周一次的网络漏洞测试数据配合,或者你可以使用商业数据。该软件框架包括一个命令行界面(以使其可以用脚本运行)和一个带 SSL 安全机制的基于 [Greenbone 安全助手][10] 的浏览器界面。OpenVAS 提供了用于附加功能的各种插件。扫描可以预定运行或按需运行。
+开放式漏洞评估系统(Open Vulnerability Assessment System) [OpenVAS][9],是一个整合多种服务和工具来提供漏洞扫描和漏洞管理的软件框架。该扫描器可以使用每周更新一次的网络漏洞测试数据,或者你也可以使用商业服务的数据。该软件框架包括一个命令行界面(以使其可以用脚本调用)和一个带 SSL 安全机制的基于 [Greenbone 安全助手][10] 的浏览器界面。OpenVAS 提供了用于附加功能的各种插件。扫描可以预定运行或按需运行。
 
-可通过单一的主控来控制多个 OpenVAS 的安装,这使其成为了一个可扩展的企业漏洞评估工具。该项目兼容的标准使其可以:将扫描结果和配置存储在 SQL 数据库中,在那里他们可以容易地被外部报告工具访问。客户端工具通过基于 XML 的无状态 OpenVAS 管理协议访问 OpenVAS 管理器,所以安全管理员可以扩展该框架的功能。该软件能以软件包或源代码的方式安装在 Windows 或 Linux 上运行,或者作为一个虚拟应用下载。
+可通过单一的主控来控制多个安装好 OpenVAS 的系统,这使其成为了一个可扩展的企业漏洞评估工具。该项目兼容的标准使其可以将扫描结果和配置存储在 SQL 数据库中,这样它们可以容易地被外部报告工具访问。客户端工具通过基于 XML 的无状态 OpenVAS 管理协议访问 OpenVAS 管理器,所以安全管理员可以扩展该框架的功能。该软件能以软件包或源代码的方式安装在 Windows 或 Linux 上运行,或者作为一个虚拟应用下载。
 
 -- Matt Sarrel
 
@@ -76,15 +76,15 @@ Kali Linux
 
 ### OWASP ###
 
-[OWASP][11](开放式 Web 应用程序安全项目 )是专注于提高软件安全性的在全球各地拥有分会的非营利组织。由这个社区性的组织提供测试工具、文档、培训和几乎任何你可以想象的开发安全软件相关的软件安全评估和最佳做法。有一些 OWASP 项目已成为很多安全从业者工具箱中的重要组件:
+[OWASP][11](开放式 Web 应用程序安全项目(Open Web Application Security Project))是一个专注于提高软件安全性的在全球各地拥有分会的非营利组织。这个社区性的组织提供测试工具、文档、培训和几乎任何你可以想象到的开发安全软件相关的软件安全评估和最佳实践。有一些 OWASP 项目已成为很多安全从业者工具箱中的重要组件:
 
-[ZAP][12](ZED 攻击代理项目)是一个在 Web 应用程序中寻找漏洞的渗透测试工具。ZAP 的设计目标之一是使之易于使用,以便于那些并非安全领域专家的开发人员和的测试人员在使用中能得到帮助。ZAP 提供自动扫描和一套手动测试工具集。
+[ZAP][12](ZED 攻击代理项目(Zed Attack Proxy Project))是一个在 Web 应用程序中寻找漏洞的渗透测试工具。ZAP 的设计目标之一是使之易于使用,以便于那些并非安全领域专家的开发人员和测试人员能便于使用。ZAP 提供了自动扫描和一套手动测试工具集。
 
-[Xenotix XSS Exploit Framework][13] 是一个先进的跨站点脚本漏洞检测和漏洞利用框架,该框架通过在浏览器引擎内执行扫描以获取真实结果。Xenotix 扫描模块使用了三个智能的模糊器,使其可以运行近 5000 种不同的 XSS 有效载荷。API 可以让安全管理员扩展和定制漏洞测试工具包。
+[Xenotix XSS Exploit Framework][13] 是一个先进的跨站点脚本漏洞检测和漏洞利用框架,该框架通过在浏览器引擎内执行扫描以获取真实的结果。Xenotix 扫描模块使用了三个智能模糊器( intelligent fuzzers),使其可以运行近 5000 种不同的 XSS 有效载荷。它有个 API 可以让安全管理员扩展和定制漏洞测试工具包。
 
-[O-Saft][14](OWASP SSL 高级审查工具)是一个查看 SSL 证书详细信息和测试 SSL 连接的 SSL 审计工具。这个命令行工具可以在线或离线运行来评估 SSL ,比如密码和配置是否安全。O-Saft 提供了常见漏洞的内置检查,你可以容易地通过编写脚本来扩展这些功能。在 2015 年 5 月加入了一个简单的图形用户界面作为可选的下载项。
+[O-Saft][14](OWASP SSL 高级审查工具(OWASP SSL advanced forensic tool))是一个查看 SSL 证书详细信息和测试 SSL 连接的 SSL 审计工具。这个命令行工具可以在线或离线运行来评估 SSL ,比如算法和配置是否安全。O-Saft 内置提供了常见漏洞的检查,你可以容易地通过编写脚本来扩展这些功能。在 2015 年 5 月加入了一个简单的图形用户界面作为可选的下载项。
 
-[OWTF][15](攻击性的 Web 测试框架)是一个遵循 OWASP 测试指南和 NIST 和 PTES 标准的自动化测试工具。该框架同时使用 Web 用户界面和命令行,用于探测 Web 和应用服务器的常见漏洞,如配置失当和软件未打补丁。
+[OWTF][15](攻击性 Web 测试框架(Offensive Web Testing Framework))是一个遵循 OWASP 测试指南和 NIST 和 PTES 标准的自动化测试工具。该框架同时支持 Web 用户界面和命令行,用于探测 Web 和应用服务器的常见漏洞,如配置失当和软件未打补丁。
 
 -- Matt Sarrel
 
@@ -92,9 +92,9 @@ Kali Linux
 
 ### BeEF ###
 
-Web 浏览器已经成为用于针对客户端的攻击中最常见的载体。[BeEF][15] 浏览器漏洞利用框架项目,是一种广泛使用的用以评估 Web 浏览器安全性的渗透工具。BeEF 通过浏览器来启动客户端攻击,帮助你暴露出客户端系统的安全弱点。BeEF 建立了一个恶意网站,安全管理员用想要测试的浏览器访问该网站。然后 BeEF 发送命令来攻击 Web 浏览器并使用命令在客户端机器上植入软件。随后管理员就可以把客户端机器看作尸体般发动攻击了。
+Web 浏览器已经成为用于针对客户端的攻击中最常见的载体。[BeEF][15] (浏览器漏洞利用框架项目(Browser Exploitation Framework Project)),是一种广泛使用的用以评估 Web 浏览器安全性的渗透工具。BeEF 通过浏览器来启动客户端攻击,帮助你暴露出客户端系统的安全弱点。BeEF 建立了一个恶意网站,安全管理员用想要测试的浏览器访问该网站。然后 BeEF 发送命令来攻击 Web 浏览器并使用命令在客户端机器上植入软件。随后管理员就可以把客户端机器看作不设防般发动攻击了。
 
-BeEF 自带像键盘记录,端口扫描和 Web 代理这样的常用模块,此外你可以编写你自己的模块或直接将命令发送到被控制的测试机上。BeEF 带有少量的演示网页来帮你快速入门,使得编写额外的网页和攻击模块变得非常简单,这使得你可以因地适宜的自定义你的测试。BeEF 是一个非常有价值的评估浏览器和终端安全、学习如何发起基于浏览器攻击的测试工具。可以使用它来向你的用户综合演示,那些恶意软件通常是如何感染客户端设备的。
+BeEF 自带键盘记录器、端口扫描器和 Web 代理这样的常用模块,此外你可以编写你自己的模块或直接将命令发送到被控制的测试机上。BeEF 带有少量的演示网页来帮你快速入门,使得编写更多的网页和攻击模块变得非常简单,让你可以因地适宜的自定义你的测试。BeEF 是一个非常有价值的评估浏览器和终端安全、学习如何发起基于浏览器攻击的测试工具。可以使用它来向你的用户综合演示,那些恶意软件通常是如何感染客户端设备的。
 
 -- Matt Sarrel
 
@@ -102,17 +102,17 @@ BeEF 自带像键盘记录,端口扫描和 Web 代理这样的常用模块,
 
 ### Unhide ###
 
-[Unhide][16] 是一个定位开放的 TCP/UDP 端口和隐藏在 UNIX、Linux 和 Windows 上的进程的审查工具。隐藏的端口和进程可能是由于运行 Rootkit 或 LKM(可加载的内核模块) 导致的。Rootkit 可能很难找到并移除,因为它们就是针对隐蔽性设计的,在操作系统和用户前隐藏自己。一个 Rootkit 可以使用 LKM 隐藏其进程或冒充其他进程,让它在机器上运行很长一段时间而不被发现。而 Unhide 可以使管理员们确信他们的系统是干净的。
+[Unhide][16] 是一个用于定位开放的 TCP/UDP 端口和隐藏在 UNIX、Linux 和 Windows 上的进程的审查工具。隐藏的端口和进程可能是由于运行 Rootkit 或 LKM(可加载的内核模块(loadable kernel module)) 导致的。Rootkit 可能很难找到并移除,因为它们就是专门针对隐蔽性而设计的,可以在操作系统和用户前隐藏自己。一个 Rootkit 可以使用 LKM 隐藏其进程或冒充其他进程,让它在机器上运行很长一段时间而不被发现。而 Unhide 则可以使管理员们确信他们的系统是干净的。
 
-Unhide 实际上是两个单独的脚本:一个用于进程,一个用于端口。该工具查询正在运行的进程、线程和开放的端口并将这些信息与系统中注册的活动比较,报告之间的差异。Unhide 和 WinUnhide 是在运行命令行产生文本输出的非常轻量级的脚本。它们不算优美,但是极为有用。Unhide 还列入了 [Rootkit Hunter][17] 项目中。
+Unhide 实际上是两个单独的脚本:一个用于进程,一个用于端口。该工具查询正在运行的进程、线程和开放的端口并将这些信息与系统中注册的活动比较,报告之间的差异。Unhide 和 WinUnhide 是非常轻量级的脚本,可以运行命令行而产生文本输出。它们不算优美,但是极为有用。Unhide 也包括在 [Rootkit Hunter][17] 项目中。
 
 -- Matt Sarrel
 
 ![](http://images.techhive.com/images/article/2015/09/bossies-2015-main-100614457-orig.jpg)
 
-查看更多的开源软件优胜者
+### 查看更多的开源软件优胜者 ###
 
-InfoWorld 网站的 2014 年最佳开源奖由下至上表扬了 100 多个开源项目。通过以下链接可以查看更多开源软件中的翘楚:
+InfoWorld 网站的 2015 年最佳开源奖由下至上表扬了 100 多个开源项目。通过以下链接可以查看更多开源软件中的翘楚:
 
 [2015 Bossie 评选:最佳开源应用程序][18]
 
@@ -132,7 +132,7 @@ via: http://www.infoworld.com/article/2982962/open-source-tools/bossie-awards-20
 
 作者:[InfoWorld staff][a]
 译者:[robot527](https://github.com/robot527)
-校对:[校对者ID](https://github.com/校对者ID)
+校对:[wxy](https://github.com/wxy)
 
 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
 

From 313f15c9005283e66195fdbb7acbed7e4083c0eb Mon Sep 17 00:00:00 2001
From: runningwater 
Date: Sun, 13 Mar 2016 11:23:56 +0800
Subject: [PATCH 1154/1710] =?UTF-8?q?=E6=9A=82=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../20160225 The Tao of project management.md | 21 ++++++++-----------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/sources/tech/20160225 The Tao of project management.md b/sources/tech/20160225 The Tao of project management.md
index 5cea94472d..750bc476dc 100644
--- a/sources/tech/20160225 The Tao of project management.md	
+++ b/sources/tech/20160225 The Tao of project management.md	
@@ -101,24 +101,21 @@
 
 作为一个项目管理者,虽然你的工作与培养你的团队的文化无关,但是工作本身就是文化。
 
-### Kaizen
+### 持续改善
 
->In pursuit of knowledge,
->every day something is added.
->In the practice of the Tao,
->every day something is dropped.
->Less and less do you need to force things,
->until finally you arrive at non-action. When nothing is done,
->nothing is left undone. 
+>为学日益,
+>为道日损,
+>损之又损,以至于无为。无为而无不为,取天下常以无事
 [[48]][14]
 
-The general field of project management is too focused on the latest and greatest tools. But the answer to the question of which tool you should use is always the same: "the simplest."
+虽然项目管理的一般领域都太过于专注最新最强大的的工具,但是您应该使用哪种工具这问题的答案总是一致的:“最简单的”。
 
-For example, I keep my running to-do list in a text file on my desktop because it serves its purpose without unnecessary distractions. Whatever tools, processes, and procedures you introduce to a team should increase efficiency and remove obstacles, not introduce additional complexity. So instead of focusing on the tools, focus on the problem(s) you're using those tools to solve.
+例如,我将任务列表放在桌面的一个文本文件中,因为它很单纯,没有不必要的干扰。您想介绍给团队的,无论是何种工具、流程和程序都应该是能提高效率,排除障碍的,而不是引入额外的复杂性。所以不应该专注于工具本身,而应该专注于使用这些工具来解决的问题。
 
-My favorite part of being a project manager in an Agile world is having the freedom to throw out what doesn't work. This is related to the concept of kaizen, or "continuous improvement." Don't be afraid to try and fail. Failing is the label we've put on the process of learning what works and what doesn't. But it's the only way to improve.
+我最喜欢的一个项目经理在一个灵活的世界是有自由扔什么不工作。在  Agile world 中我喜欢项目管理者能自由的做决定,抛出不能做的工作。这就是改善的概念,或叫“持续改进”。不要害怕尝试和失败。失败是我们在学习的过程中所用的标签,不能代表什么,但这是提高的唯一方式。
 
-The best processes arise organically. As a project manager, you can help your team by supporting them and not trying to force them into anything.
+
+最好的过程都不是一蹴而就的。作为项目管理者,您应该帮助您的团队,支持团队让其自己提升,而不是强迫团队。
 
 ### Practice
 

From 40d7856fa145334e4f1a4ce569858e8c29d117dd Mon Sep 17 00:00:00 2001
From: runningwater 
Date: Mon, 14 Mar 2016 00:22:58 +0800
Subject: [PATCH 1155/1710] =?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

---
 .../tech/20160225 The Tao of project management.md  | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
 rename {sources => translated}/tech/20160225 The Tao of project management.md (90%)

diff --git a/sources/tech/20160225 The Tao of project management.md b/translated/tech/20160225 The Tao of project management.md
similarity index 90%
rename from sources/tech/20160225 The Tao of project management.md
rename to translated/tech/20160225 The Tao of project management.md
index 750bc476dc..e0238e2cee 100644
--- a/sources/tech/20160225 The Tao of project management.md	
+++ b/translated/tech/20160225 The Tao of project management.md	
@@ -117,19 +117,14 @@
 
 最好的过程都不是一蹴而就的。作为项目管理者,您应该帮助您的团队,支持团队让其自己提升,而不是强迫团队。
 
-### Practice
+### 实践
 
->Some say that my teaching is nonsense.
->Others call it lofty but impractical.
->But to those who have looked inside themselves,
->this nonsense makes perfect sense.
->And to those who put it into practice,
->this loftiness has roots that go deep. 
+>天下皆谓我"道"大,似不肖。夫唯大,故似不肖。若肖,久矣其细也夫!
 [[67]][15]
 
-I believe in what open organizations are doing. What open organizations are doing for the field of management is almost as important as the actual products and services they offer. We have an opportunity to lead by example, to inspire passion and purpose in others, to create working environments that inspire and empower.
+我相信开放性组织正在做的。开放性组织在管理领域的工作几乎和他们所提供的产品和服务一样重要。我们有机会以身作则,激发他人的激情和目的,创造激励和充分授权的工作环境。
 
-I encourage you to find ways to incorporate some of these ideas into your own projects and teams to see what happens. Learn about your organization's mission and how your projects contribute to it. Have courage, expect to try some things that won't work, and don't forget to share the lessons you learn with our community so we can continue to improve.
+我鼓励您们找到办法把这些想法融入到自己的项目和团队中,看看会发生什么。了解组织的使命和您的项目怎么样帮助它们。鼓起勇气,尝试一些不好的事情,同时不要忘记和我们的社区分享你所学到的经验,这样我们就可以继续改进。
 
 
 --------------------------------------------------------------------------------

From 18ebd969b6f358ca6b9793b903ab7324046408d4 Mon Sep 17 00:00:00 2001
From: KS 
Date: Mon, 14 Mar 2016 10:36:24 +0800
Subject: [PATCH 1156/1710] wyangsun translating

---
 .../tech/20160228 Two Outstanding All-in-One Linux Servers.md    | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md b/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md
index a291fd2006..4d6f369aa5 100644
--- a/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md	
+++ b/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md	
@@ -1,3 +1,4 @@
+wyangsun translating
 Two Outstanding All-in-One Linux Servers
 ================================================
 

From 7755a0b6652d9f093663dc3c41508cf546ed1eb6 Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Mon, 14 Mar 2016 21:38:46 +0800
Subject: [PATCH 1157/1710] =?UTF-8?q?20160314-1=20=E9=80=89=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

keyword : FOSS , podcast
---
 .../tech/20160314 15 podcasts for FOSS fans   | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 sources/tech/20160314 15 podcasts for FOSS fans

diff --git a/sources/tech/20160314 15 podcasts for FOSS fans b/sources/tech/20160314 15 podcasts for FOSS fans
new file mode 100644
index 0000000000..222861427e
--- /dev/null
+++ b/sources/tech/20160314 15 podcasts for FOSS fans	
@@ -0,0 +1,79 @@
+15 podcasts for FOSS fans
+=============================
+
+keyword : FOSS , podcast 
+
+![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/oss_podcasts.png?itok=3KwxsunX)
+
+I listen to a lot of podcasts. A lot. On my phone's podcatcher, I am subscribed to around 60 podcasts... and I think that only eight of those have podfaded (died). Unsurprisingly, a fairly sizeable proportion of those remaining alive-and-well subscriptions are shows with a specific interest or relevance to open source software. As I seek to resurrect my own comatose podcast from the nebulous realm of podfadery, I thought it would be great for us as a community to share what we're listening to.
+
+>Quick digression: I understand that there are a lot of "pod"-prefixed words in that first paragraph. Furthermore, I also know that the term itself is related to a proprietary device that, by most accounts, isn't even used for listening to these web-based audio broadcasts. However, the term 'webcast' died in the nineties and 'oggcast' never gathered a substantial foothold among the listening public. As such, in order to ensure that the most people actually know what I'm referring to, I'm essentially forced to use the web-anachronistic, but publicly recognized term, podcast.
+
+I should also mention that a number of these shows involve grown-ups using grown-up language (i.e. swearing). I've tried to indicate which shows these are by putting a red E next to their names, but please do your own due diligence if you're concerned about listening to these shows at work or with children around.
+
+The following lists are podcasts that I keep in heavy rotation (each sublist is listed in alphabetical order). In the first list are the ones I think of as my "general coverage" shows. They tend to either discuss general topics related to free and open source software, or they give a survey of multiple open source projects from one episode to the next.
+
+- [Bad Voltage][1] E — Regular contributor and community moderator here on Opensource.com, Jono Bacon, shares hosting dutes on this podcast with Jeremy Garcia, Stuart Langridge, and Bryan Lunduke, four friends with a variety of digressing and intersecting opinions. That's the most interesting part of the show for me. Of course, they also do product reviews and cover timely news relevant to free and open source software, but it's the banter that I stick around for.
+
+- [FLOSS Weekly][2] — The Twit network of podcasts is a long-time standby in technology broadcasts. Hosted by Randal Schwartz, FLOSS Weekly focuses on covering one open source project each week, typically by interviewing someone relevant in the development of that project. It's a really good show for getting exposed to new open source tools... or learning more about the programs you're already familiar with.
+
+- [Free as in Freedom][3] — Hosted by Bradley Kuhn and Karen Sandler, this show has a specific focus on legal and policy matters as it relates to both specific free and open source projects, as well as open culture in general. The show seems to have gone on a bit of a hiatus since its last episode in November of 2015, but I for one am immensely hopeful that Free as in Freedom emerges victoriously from its battle with being podfaded and returns to its regular bi-weekly schedule.
+
+- [GNU World Order][4] — I think that this show can be best descrbed as a free and open source variety show. Solo host, Klaatu, spends the majority of each show going in-depth at nearly tutorial level with a whole range of specific software tools and workflows. It's a really friendly way to get an open source neophyte up to speed with everything from understanding SSH to playing with digital painting and video. And there's a video component to the show, too, which certainly helps make some of these topics easier to follow.
+
+- [Hacker Public Radio][5] — This is just a well-executed version of a fantastic concept. Hacker Public Radio (HPR) is a community-run daily (well, working-week daily) podcast with a focus on "anything of interest to hackers." Sure there are wide swings in audio quality from show to show, but it's an open platform where anyone can share what they know (or what they think) in that topic space. Show topics include 3D printing, hardware hacking, conference interviews, and more. There are even long-running tutorial series and an audio book club. The monthly recap episodes are particularly useful if you're having trouble picking a place to start. And best of all, you can record your own episode and add it to the schedule. In fact, they actively encourage it.
+
+My next list of open source podcasts are a bit more specific to particular topics or software packages in the free and open source ecosystem.
+
+- [Blender Podcast][6] — Although this podcast is very specific to one particular application—Blender, in case you couldn't guess—many of the topics are relevant to issues faced by users and developers of open source other softrware programs. Hosts Thomas Dinges and Campbell Barton—both on the core development team for Blender—discuss the latest happenings in the Blender community, sometimes with a guest. The release schedule is a bit sporadic, but one of the things I really like about this particular show is the fact that they talk about both user issues and developer issues... and the various intersections of the two. It's a great way for each part of the community to gain insight from the other.
+
+- [Sunday Morning Linux Review][7] — As it's name indicates, SMLR offers a weekly review of topics relevant to Linux. Since around the end of last year, the show has seen a bit of a restructuring. However, that has not detracted from its quality. Tony Bemus, Mary Tomich, and Tom Lawrence deliver a lot of good information, and you can catch them recording their shows live through their website (if you happen to have free time on your Sundays).
+
+- [LinuxLUGcast][8] — The LinuxLUGcast is a community podcast that's really a recording of an online Linux Users Group (LUG) that meets on the first and third Friday of each month. The group meets (and records) via Mumble and discussions range from home builds with single-board computers like the Raspberry Pi to getting help with trying out a new distro. The LUG is open to everyone, but there is a rotating cast of regulars who've made themselves (and their IRC handles) recognizable fixtures on the show. (Full disclosure: I'm a regular on this one)
+
+- [The Open EdTech Podcast][9] — Thaj Sara's Open EdTech Podcast is a fairly new show that so far only has three episodes. However, since there's a really sizeable community of open source users in the field of education (both in teaching and in IT), this show serves an important and underserved segment of our community. I've spoken with Thaj via email and he assures me that new episodes are in the pipe. He just needs to set aside the time to edit them.
+
+- [The Linux Action Show][10] — It would be remiss of me to make a list of open source podcasts and not mention one of the stallwart fixtures in the space: The Linux Action Show. Chris Fisher and Noah Chelliah discuss current news as it pertains to Linux and open source topics while at the same time giving feature attention to specific projects or their own experiences using various open source tools.
+
+This next section is what I'm going to term my "honorable mention" section. These shows are either new or have a more tangential focus on open source software and culture. In any case, I still think readers of Opensource.com would enjoy listening to these shows.
+
+- [Blender Institute Podcast][11] — The Blender Institute—the more commercial creative production spin-off from the Blender Foundation—started hosting their own weekly podcast a few months ago. In the show, artists (and now a developer!) working at the Institute discuss the open content projects they're working on, answer questions about using Blender, and give great insight into how things go (or occasionally don't go) in their day-to-day work.
+
+- [Geek News Radio][12] E — There was a tangible sense of loss about a year ago when the hosts of Linux Outlaws hung up their mics. Well good news! A new show has sprung from its ashes. In episodes of Geek News Radio, Fab Scherschel and Dave Nicholas have a wider focus than Linux Outlaws did. Rather than being an actual news podcast, it's more akin to an informal discussion among friends about video games, movies, technology, and open source (of course).
+
+- [Geekrant][13] — Formerly known as the Everyday Linux Podcast, this show was rebranded at the start of the year to reflect kind of content that the hosts Mark Cockrell, Seth Anderson, and Chris Neves were already discussing. They do discuss open source software and culture, but they also give their own spin and opinions on topics of interest in general geek culture. Topics have a range that includes everything from popular media to network security. (P.S. Opensource.com content manager Jen Wike Huger was a guest on Episode 164.)
+
+- [Open Source Creative][14] E — In case you haven't read my little bio blurb, I also have my own podcast. In this show, I talk about news and topics that are [hopefully] of interest to artists and creatives who use free and open source tools. I record it during my work commute so episode length varies with traffic, and I haven't quite figured out a good way to do interviews safely, but if you listen while you're on your way to work, it'll be like we're carpooling. The show has been on a bit of hiatus for almost a year, but I've commited to making sure it comes back... and soon.
+
+- [Still Untitled][15] E — As you may have noticed from most of the selections on this list, I tend to lean toward the indie side of the spectrum, preferring to listen to shows by people with less of a "name." That said, this show really hits a good place for me. Hosts Adam Savage, Norman Chan, and Will Smith talk about all manner of interesting and geeky things. From Adam's adventures with Mythbusters to maker builds and book reviews, there's rarely ever a show that hasn't been fun for me to listen to.
+
+So there you go! I'm always looking for more interesting shows to listen to on my commute (as I'm sure many others are). What suggestions or recommendations do you have?
+
+
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/life/16/3/open-source-podcasts
+
+作者:[Jason van Gumster][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://opensource.com/users/jason-van-gumster
+[1]: http://badvoltage.org/
+[2]: https://twit.tv/shows/floss-weekly
+[3]: http://faif.us/
+[4]: http://gnuworldorder.info/
+[5]: http://hackerpublicradio.org/
+[6]: https://blender-podcast.org/
+[7]: http://smlr.us/
+[8]: http://linuxlugcast.com/
+[9]: http://openedtechpodcast.com/
+[10]: http://www.jupiterbroadcasting.com/tag/linux-action-show/
+[11]: http://podcast.blender.institute/
+[12]: http://sixgun.org/geeknewsradio
+[13]: http://elementopie.com/geekrant-episodes
+[14]: http://monsterjavaguns.com/podcast
+[15]: http://www.tested.com/still-untitled-the-adam-savage-project/

From 54449508830639e7b6258cf20deff02f696c5d26 Mon Sep 17 00:00:00 2001
From: zpl 
Date: Tue, 15 Mar 2016 10:39:06 +0800
Subject: [PATCH 1158/1710] [translated] 20151202 A new Mindcraft moment.md

---
 .../tech/20151202 A new Mindcraft moment.md   | 87 +++++++++----------
 1 file changed, 43 insertions(+), 44 deletions(-)

diff --git a/sources/tech/20151202 A new Mindcraft moment.md b/sources/tech/20151202 A new Mindcraft moment.md
index 92c645ea4b..808124dec2 100644
--- a/sources/tech/20151202 A new Mindcraft moment.md	
+++ b/sources/tech/20151202 A new Mindcraft moment.md	
@@ -1,44 +1,43 @@
-zpl1025
-A new Mindcraft moment?
-=======================
-
-Credit:Jonathan Corbet
-
-It is not often that Linux kernel development attracts the attention of a mainstream newspaper like The Washington Post; lengthy features on the kernel community's approach to security are even more uncommon. So when just such a feature hit the net, it attracted a lot of attention. This article has gotten mixed reactions, with many seeing it as a direct attack on Linux. The motivations behind the article are hard to know, but history suggests that we may look back on it as having given us a much-needed push in a direction we should have been going for some time.
-
-Think back, a moment, to the dim and distant past — April 1999, to be specific. An analyst company named Mindcraft issued a report showing that Windows NT greatly outperformed Red Hat Linux 5.2 and Apache for web-server workloads. The outcry from the Linux community, including from a very young LWN, was swift and strong. The report was a piece of Microsoft-funded FUD trying to cut off an emerging threat to its world-domination plans. The Linux system had been deliberately configured for poor performance. The hardware chosen was not well supported by Linux at the time. And so on.
-
-Once people calmed down a bit, though, one other fact came clear: the Mindcraft folks, whatever their motivations, had a point. Linux did, indeed, have performance problems that were reasonably well understood even at the time. The community then did what it does best: we sat down and fixed the problems. The scheduler got exclusive wakeups, for example, to put an end to thethundering-herd problem in the acceptance of connection requests. Numerous other little problems were fixed. Within a year or so, the kernel's performance on this kind of workload had improved considerably.
-
-The Mindcraft report, in other words, was a much-needed kick in the rear that got the community to deal with issues that had been neglected until then.
-
-The Washington Post article seems clearly slanted toward a negative view of the Linux kernel and its contributors. It freely mixes kernel problems with other issues (the AshleyMadison.com breakin, for example) that were not kernel vulnerabilities at all. The fact that vendors seem to have little interest in getting security fixes to their customers is danced around like a huge elephant in the room. There are rumors of dark forces that drove the article in the hopes of taking Linux down a notch. All of this could well be true, but it should not be allowed to overshadow the simple fact that the article has a valid point.
-
-We do a reasonable job of finding and fixing bugs. Problems, whether they are security-related or not, are patched quickly, and the stable-update mechanism makes those patches available to kernel users. Compared to a lot of programs out there (free and proprietary alike), the kernel is quite well supported. But pointing at our ability to fix bugs is missing a crucial point: fixing security bugs is, in the end, a game of whack-a-mole. There will always be more moles, some of which we will not know about (and will thus be unable to whack) for a long time after they are discovered and exploited by attackers. These bugs leave our users vulnerable, even if the commercial side of Linux did a perfect job of getting fixes to users — which it decidedly does not.
-
-The point that developers concerned about security have been trying to make for a while is that fixing bugs is not enough. We must instead realize that we will never fix them all and focus on making bugs harder to exploit. That means restricting access to information about the kernel, making it impossible for the kernel to execute code in user-space memory, instrumenting the kernel to detect integer overflows, and all the other things laid out in Kees Cook's Kernel Summit talk at the end of October. Many of these techniques are well understood and have been adopted by other operating systems; others will require innovation on our part. But, if we want to adequately defend our users from attackers, these changes need to be made.
-
-Why hasn't the kernel adopted these technologies already? The Washington Post article puts the blame firmly on the development community, and on Linus Torvalds in particular. The culture of the kernel community prioritizes performance and functionality over security and is unwilling to make compromises if they are needed to improve the security of the kernel. There is some truth to this claim; the good news is that attitudes appear to be shifting as the scope of the problem becomes clear. Kees's talk was well received, and it clearly got developers thinking and talking about the issues.
-
-The point that has been missed is that we do not just have a case of Linus fending off useful security patches. There simply are not many such patches circulating in the kernel community. In particular, the few developers who are working in this area have never made a serious attempt to get that work integrated upstream. Getting any large, intrusive patch set merged requires working with the kernel community, making the case for the changes, splitting the changes into reviewable pieces, dealing with review comments, and so on. It can be tiresome and frustrating, but it's how the kernel works, and it clearly results in a more generally useful, more maintainable kernel in the long run.
-
-Almost nobody is doing that work to get new security technologies into the kernel. One might cite a "chilling effect" from the hostile reaction such patches can receive, but that is an inadequate answer: developers have managed to merge many changes over the years despite a difficult initial reaction. Few security developers are even trying.
-
-Why aren't they trying? One fairly obvious answer is that almost nobody is being paid to try. Almost all of the work going into the kernel is done by paid developers and has been for many years. The areas that companies see fit to support get a lot of work and are well advanced in the kernel. The areas that companies think are not their problem are rather less so. The difficulties in getting support for realtime development are a clear case in point. Other areas, such as documentation, tend to languish as well. Security is clearly one of those areas. There are a lot of reasons why Linux lags behind in defensive security technologies, but one of the key ones is that the companies making money on Linux have not prioritized the development and integration of those technologies.
-
-There are signs that things might be changing a bit. More developers are showing interest in security-related issues, though commercial support for their work is still less than it should be. The reaction against security-related changes might be less knee-jerk negative than it used to be. Efforts like the Kernel Self Protection Project are starting to work on integrating existing security technologies into the kernel.
-
-We have a long way to go, but, with some support and the right mindset, a lot of progress can be made in a short time. The kernel community can do amazing things when it sets its mind to it. With luck, the Washington Post article will help to provide the needed impetus for that sort of setting of mind. History suggests that we will eventually see this moment as a turning point, when we were finally embarrassed into doing work that has clearly needed doing for a while. Linux should not have a substandard security story for much longer.
-
----------------------------
-
-via: https://lwn.net/Articles/663474/
-
-作者:Jonathan Corbet
-
-译者:[译者ID](https://github.com/译者ID)
-
-校对:[校对者ID](https://github.com/校对者ID)
-
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+又一次 Mindcraft 事件?
+=======================
+
+感谢:Jonathan Corbet
+
+Linux 内核开发很少吸引像华盛顿邮报这样主流媒体的关注,内核社区在安全方面进展的冗长功能列表就更少人看了。所以当这样一个功能发布到网上,就吸引了很多人的注意。关于这篇文章有不同的反应,很多人认为这是对 Linux 直接的攻击。文章背后的动机很难知道,但是从历史经验来看,它也可以看作对我们早就该前进的方向的一次非常必要的推动。
+
+回顾一次在昏暗遥远过去的事件 - 确切地说是 1999 年 4 月。一家叫 Mindcraft 的分析公司发布了一份报告显示 Windows NT 在服务器开销方面完胜 Red Hat Linux 5.2 加 Apache。Linux 社区,包括当时还很年轻的 LWN,的反应很迅速而且强烈。这份报告是微软资助的 FUD 的一部分,用来消除那些全球垄断计划的新兴威胁。报告指出,Linux 系统有意配置成低性能,Linux 不支持当时的很多硬件,等等。
+
+在大家稍微冷静一点后,尽管如此,事实很明显:Mindcraft 的人,不管什么动机,说的也有道理。当时 Linux 确实在性能方面存在一些已经被充分认识到的问题。然后社区做了最正确的事情:我们坐下来解决问题。比如,单独唤醒的调度器可以终结接受连接请求时的惊群问题。其他很多小问题也都解决了。在差不多一年里,内核在这类开销方面的性能已经有了非常大的改善。
+
+这份 Mindcraft 的报告,某种意义上来说,往 Linux 背后踢了很有必要的一脚,推动整个社区去处理一些当时被忽略的事情。
+
+华盛顿邮报的文章明显在鄙视 Linux 内核以及它的贡献者。它随意地混淆了内核问题和其他根本不是内核脆弱性引起的问题(比如,AshleyMadison.com 被黑)。不过供应商没什么兴趣为他们的客户提供安全补丁的事实,就像一头巨象在房间里跳舞一样明显。还有谣言说这篇文章后面的黑暗势力希望打击一下 Linux 的势头。这些也许都是真的,但是也不能掩盖一个简单的事实,就是文章说的确实是真的。
+
+我们会合理地测试并解决问题。而问题,不管是不是安全相关,能很快得到修复,然后再通过稳定更新的机制将这些补丁发布给内核用户。比起外面很多应用程序(免费的和付费的),内核的支持非常好。但是指责我们解决问题的能力时却遗漏了关键的一点:解决安全问题最终是一个打鼹鼠游戏。总是会出来更多的鼹鼠,其中有一些在攻击者发现并利用后很长时间我们都还不知道(所以没法使劲打下去)。尽管商业 Linux 已经非常努力地在将补丁传递给用户,这种问题还是会让我们的用户很受伤 - 只是这并不是故意的。
+
+关键是只是解决问题并不够,一些关心安全性的开发者也已经开始尝试。我们必须认识到,问题永远都解不完,所以要让问题更难被发现和利用。意思就是限制访问内核信息,绝对不允许内核执行用户空间内存的指令,指示内核侦测整数溢出,以及 Kee Cook 在十月底内核峰会的讲话中所提出的其他所有事情。其中许多技术被其他操作系统深刻理解并采用了;它们的创新也有我们的功劳。但是,如果我们想充分保护我们的用户免受攻击,这些改变是必须要做的。
+
+为什么内核还没有引入这些技术?华盛顿邮报的文章坚定地指责开发社区,特别是 Linus Torvalds。内核社区的传统就是相对安全性更侧重于性能和功能,在需要牺牲性能来改善内核安全性时并不愿意折中处理。这些指责一定程度上是对的;好的一面是,因为问题的范围变得清晰,态度看上去有点改善。Kee 的演讲都听进去了,而且很明显让开发者开始思考和讨论这些问题。
+
+而被忽略的一点是,并不仅仅是 Linus 在拒绝有用的安全补丁。而是就没有多少这种补丁在内核社区里流传。特别是,在这个领域工作的开发者就那么些人,而且从没有认真地尝试把自己的工作合并到上游。要合并任何大的侵入性补丁,需要和内核社区一起工作,为改动编写用例,将改动分割成方便审核的碎片,处理审核意见,等等。整个过程可能会有点无聊而且让人沮丧,但这却是内核维护的运作方式,而且很明显只有这样才能在长时间的开发中形成更有用更可维护的内核。 
+
+几乎没有人会走这个流程来将最新的安全技术引入内核。对于这类补丁可能收到的不利反应,有人觉得也许会导致“寒蝉效应”,但是这个说法并不充分:不管最初的反应有多麻烦,多年以来开发者已经合并了大量的改动。而少数安全开发者连试都没试过。
+
+他们为什么不愿意尝试?一个比较明显的答案是,几乎没有人会因此拿到报酬。几乎所有引入内核的工作都由付费开发者完成,而且已经持续多年。公司能看到利润的领域在内核里都有大量的工作以及很好的进展。而公司觉得和它们没关系的领域就不会这样了。为实时开发找到赞助支持的困难就是很明显的例子。其他领域,比如文档,也在慢慢萧条。安全性很明显也属于这类领域。可能有很多原因导致 Linux 落后于防御式安全技术,但是其中最关键的一条是,靠 Linux 赚钱的公司没有重视这些技术的开发和应用。
+
+有迹象显示局面已有所转变。越来越多的开发人员开始关注安全相关问题,尽管对他们工作的商业支持还仍然不够。对于安全相关的改变已经没有之前那样的下意识反应了。像内核自我保护项目这样,已经开始把现存的安全技术集成进入内核了。
+
+我们还有很长的路要走,但是,如果能有一些支持以及正确的思想,短期内能有很大的进展。内核社区在确定了自己的想法后可以做到很让人惊叹的事情。幸运的是,华盛顿邮报的文章将有助于提供形成这种想法的必要动力。在历史的角度上,我们很可能会把这次事件看作一个转折点,我们最终被倒逼着去完成之前很明确需要做的事情。Linux 不应该再继续讲述这个安全不合格的故事了。
+
+---------------------------
+
+via: https://lwn.net/Articles/663474/
+
+作者:Jonathan Corbet
+
+译者:[zpl1025](https://github.com/zpl1025)
+
+校对:[校对者ID](https://github.com/校对者ID)
+
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

From 93fa61462f5be9c3f86de81b7bcd5a33d5cfd5ad Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Tue, 15 Mar 2016 16:23:00 +0800
Subject: [PATCH 1159/1710] =?UTF-8?q?20160314-2=20=E9=80=89=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

keyword: Node.js , opensource , project management  , software
---
 sources/tech/20160314 Healthy Open Source.md | 212 +++++++++++++++++++
 1 file changed, 212 insertions(+)
 create mode 100644 sources/tech/20160314 Healthy Open Source.md

diff --git a/sources/tech/20160314 Healthy Open Source.md b/sources/tech/20160314 Healthy Open Source.md
new file mode 100644
index 0000000000..b36b516758
--- /dev/null
+++ b/sources/tech/20160314 Healthy Open Source.md	
@@ -0,0 +1,212 @@
+Healthy Open Source
+============================
+
+keyword: Node.js , opensource , project management , software
+
+*A walkthrough of the Node.js Foundation’s base contribution policy*.
+
+A lot has changed since io.js and Node.js merged under the Node.js Foundation. The most impressive change, and probably the change that is most relevant to the rest of the community and to open source in general, is the growth in contributors and committers to the project.
+
+A few years ago, Node.js had just a few committers (contributors with write access to the repository in order to merge code and triage bugs). The maintenance overhead for the few committers on Node.js Core was overwhelming and the project began to see a decline in both committers and outside contribution. This resulted in a corresponding decline in releases.
+
+Today, the Node.js project is divided into many components with a full org size of well over 400 members. Node.js Core now has over 50 committers and over 100 contributors per month.
+
+Through this growth we’ve found many tools that help scale the human infrastructure around an Open Source project. We also identified a few core values we believe are fundamental to modern Open Source: transparency, participation, and efficacy. As we continue to scale the way we do Open Source we try to find a balance of these values and adapt the practices we find help to fit the needs of each component of the Node.js project.
+
+Now that Node.js is in a good place, the foundation is looking to promote this kind of sustainability in the ecosystem. Part of this is a new umbrella for additional projects to enter the foundation, of which [Express was recently admitted][1], and the creation of this new contribution policy.
+
+This contribution policy is not universal. It’s meant as a starting point. Additions and alterations to this policy are encouraged so that the process used by each project fits its needs and can continue to change shape as the project grows and faces new challenges.
+
+The [current version][2] is hosted in the Node.js Foundation. We expect to iterate on this over time and encourage people to [log issues][3] with questions and feedback regarding the policy for future iterations.
+
+This document describes a very simple process suitable for most projects in the Node.js ecosystem. Projects are encouraged to adopt this whether they are hosted in the Node.js Foundation or not.
+
+The Node.js project is organized into over a hundred repositories and a few dozen Working Groups. There are large variations in contribution policy between many of these components because each one has different constraints. This document is a minimalist version of the processes and philosophy we’ve found works best everywhere.
+
+We believe that contributors should own their projects, and that includes contribution policies like this. While new foundation projects start with this policy we expect many of them to alter it or possibly diverge from it entirely to suite their own specific needs.
+
+The goal of this document is to create a contribution process that:
+
+* Encourages new contributions.
+
+* Encourages contributors to remain involved.
+
+* Avoids unnecessary processes and bureaucracy whenever possible.
+
+* Creates a transparent decision making process which makes it clear how contributors can be involved in decision making.
+
+Most contribution processes are created by maintainers who feel overwhelmed by outside contributions. These documents have traditionally been about processes that make life easier for a small group of maintainers, often at the cost of attracting new contributors.
+
+We’ve gone the opposite direction. The purpose of this policy is to gain contributors, to retain them as much as possible, and to use a much larger and growing contributor base to manage the corresponding influx of contributions.
+
+As projects mature, there’s a tendency to become top heavy and overly hierarchical as a means of quality control and this is enforced through process. We use process to add transparency that encourages participation which grows the code review pool which leads to better quality control.
+
+This document is based on much prior art in the Node.js community, io.js, and the Node.js project.
+
+This document is based on what we’ve learned growing the Node.js project. Not just the core project, which has been a massive undertaking, but also much smaller sub-projects like the website which have very different needs and, as a result, very different processes.
+
+When we began these reforms in the Node.js project, we were taking a lot of inspiration from the broader Node.js ecosystem. In particular, Rod Vagg’s [OPEN Open Source policy][4]. Rod’s work in levelup and nan is the basis for what we now call “liberal contribution policies.”
+
+### Vocabulary
+
+* A **Contributor** is any individual creating or commenting on an issue or pull request.
+
+* A **Committer** is a subset of contributors who have been given write access to the repository.
+
+* A **TC (Technical Committee)** is a group of committers representing the required technical expertise to resolve rare disputes.
+
+Every person who shows up to comment on an issue or submit code is a member of a project’s community. Just being able to see them means that they have crossed the line from being a user to being a contributor.
+
+Typically open source projects have had a single distinction for those that have write access to the repository and those empowered with decision making. We’ve found this to be inadequate and have separated this into two distinctions which we’ll dive into more a bit later.
+
+![](https://www.linux.com/images/stories/66866/healthy_1.png)
+
+healthy 1Looking at the community in and around a project as a bunch of concentric circles helps to visualize this.
+
+In the outermost circle are users, a subset of those users are contributors, a subset of contributors become committers who can merge code and triage issues. Finally, a smaller group of trusted experts who only get pulled in to the hard problems and can act as a tie-breaker in disputes.
+
+This is what a healthy project should look like. As the demands on the project from increased users rise, so do the contributors, and as contributors increase more are converted into committers. As the committer base grows, more of them rise to the level of expertise where they should be involved in higher level decision making.
+
+![](https://www.linux.com/images/stories/66866/healthy-2.png)
+
+If these groups don’t grow in proportion to each other they can’t carry the load imposed on them by outward growth. A project’s ability to convert people from each of these groups is the only way it can stay healthy if its user base is growing.
+
+This is what unhealthy projects look like in their earliest stages of dysfunction, but imagine that the committers bubble is so small you can’t actually read the word “committers” in it, and imagine this is a logarithmic scale.
+
+healthy-2A massive user base is pushing a lot of contributions onto a very small number of maintainers.
+
+This is when maintainers build processes and barriers to new contributions as a means to manage the workload. Often the problems the project is facing will be attributed to the tools the project is using, especially GitHub.
+
+In Node.js we had all the same problems, resolved them without a change in tooling, and today manage a growing workload much larger than most projects, and GitHub has not been a bottleneck.
+
+We know what happens to unhealthy projects over a long enough time period, more maintainers leave, contributions eventually fall, and **if we’re lucky** users leave it. When we aren’t so lucky adoption continues and years later we’re plagued with security and stability issues in widely adopt software that can’t be effectively maintained.
+
+The number of users a project has is a poor indicator of the health of the project, often it is the most used software that suffers the biggest contribution crisis.
+
+### Logging
+
+Log an issue for any question or problem you might have. When in doubt, log an issue, any additional policies about what to include will be provided in the responses. The only exception is security disclosures which should be sent privately.
+
+The first sentence is surprisingly controversial. A lot of maintainers complain that there isn’t a more heavy handed way of forcing people to read a document before they log an issue on GitHub. We have documents all over projects in the Node.js Foundation about writing good bug reports but, first and foremost, we encourage people to log something and try to avoid putting barriers in the way of that.
+
+Sure, we get bad bugs, but we have a ton of contributors who can immediately work with people who log them to educate them on better practices and treat it as an opportunity to educate. This is why we have documentation on writing good bugs, in order to educate contributors, not as a barrier to entry.
+
+Creating barriers to entry just reduces the number of people there’s a chance to identify, educate and potentially grow into greater contributors.
+
+Of course, never log a public issue about a security disclosure, ever. This is a bit vague about the best private venue because we can’t determine that for every project that adopts this policy, but we’re working on a responsible disclosure mechanism for the broader community (stay tuned).
+
+Committers may direct you to another repository, ask for additional clarifications, and add appropriate metadata before the issue is addressed.
+
+For smaller projects this isn’t a big deal but in Node.js we’ve had to continually break off work into other, more specific, repositories just to keep the volume on a single repo manageable. But all anyone has to do when someone puts something in the wrong place is direct them to the right one.
+
+Another benefit of growing the committer base is that there’s more people to deal with little things, like redirecting issues to other repos, or adding metadata to issues and PRs. This allows developers who are more specialized to focus on just a narrow subset of work rather than triaging issues.
+
+Please be courteous, respectful, and every participant is expected to follow the project’s Code of Conduct.
+
+One thing that can burn out a project is when people show up with a lot of hostility and entitlement. Most of the time this sentiment comes from a feeling that their input isn’t valued. No matter what, a few people will show up who are used to more hostile environments and it’s good to have these kinds of expectations explicit and written down.
+
+And each project should have a Code of Conduct, which is an extension of these expectations that makes people feel safe and respected.
+
+### Contributions
+
+Any change to resources in this repository must be through pull requests. This applies to all changes to documentation, code, binary files, etc. Even long term committers and TC members must use pull requests.
+
+No pull request can be merged without being reviewed.
+
+Every change needs to be a pull request.
+
+A Pull Request captures the entire discussion and review of a change. Allowing some subset of committers to slip things in without a Pull Request gives the impression to potential contributors that they they can’t be involved in the project because they don’t have access to a behind the scenes process or culture.
+
+This isn’t just a good practice, it’s a necessity in order to be transparent enough to attract new contributors.
+
+For non-trivial contributions, pull requests should sit for at least 36 hours to ensure that contributors in other timezones have time to review. Consideration should also be given to weekends and other holiday periods to ensure active committers all have reasonable time to become involved in the discussion and review process if they wish.
+
+Part of being open and inviting to more contributors is making the process accessible to people in timezones all over the world. We don’t want to add an artificial delay in small doc changes but for any change that needs a bit of consideration needs to give people in different parts of the world time to consider it.
+
+In Node.js we actually have an even longer timeline than this, 48 hours on weekdays and 72 on weekends. That might be too much for smaller projects so it is shorter in this base policy but as a project grows it may want to increase this as well.
+
+The default for each contribution is that it is accepted once no committer has an objection. During review committers may also request that a specific contributor who is most versed in a particular area gives a “LGTM” before the PR can be merged. There is no additional “sign off” process for contributions to land. Once all issues brought by committers are addressed it can be landed by any committer.
+
+A key part of the liberal contribution policies we’ve been building is an inversion of the typical code review process. Rather than the default mode for a change to be rejected until enough people sign off, we make the default for every change to land. This puts the onus on reviewers to note exactly what adjustments need to be made in order for it to land.
+
+For new contributors it’s a big leap just to get that initial code up and sent. Viewing the code review process as a series of small adjustments and education, rather than a quality control hierarchy, does a lot to encourage and retain these new contributors.
+
+It’s important not to build processes that encourage a project to be too top heavy, with a few people needing to sign off on every change. Instead, we just mention any committer than we think should weigh in on a specific review. In Node.js we have people who are the experts on OpenSSL, any change to crypto is going to need a LGTM from them. This kind of expertise forms naturally as a project grows and this is a good way to work with it without burning people out.
+
+In the case of an objection being raised in a pull request by another committer, all involved committers should seek to arrive at a consensus by way of addressing concerns being expressed by discussion, compromise on the proposed change, or withdrawal of the proposed change.
+
+This is what we call a lazy consensus seeking process. Most review comments and adjustments are uncontroversial and the process should optimize for getting them in without unnecessary process. When there is disagreement, try to reach an easy consensus among the committers. More than 90% of the time this is simple, easy and obvious.
+
+If a contribution is controversial and committers cannot agree about how to get it to land or if it should land then it should be escalated to the TC. TC members should regularly discuss pending contributions in order to find a resolution. It is expected that only a small minority of issues be brought to the TC for resolution and that discussion and compromise among committers be the default resolution mechanism.
+
+For the minority of changes that are controversial and don’t reach an easy consensus we escalate that to the TC. These are rare but when they do happen it’s good to reach a resolution quickly rather than letting things fester. Contentious issues tend to get a lot of attention, especially by those more casually involved in the project or even entirely outside of it, but they account for a relatively small amount of what the project does every day.
+
+### Becoming a Committer
+
+All contributors who land a non-trivial contribution should be on-boarded in a timely manner, and added as a committer, and be given write access to the repository.
+
+This is where we diverge sharply from open source tradition.
+
+Projects have historically guarded commit rights to their version control system. This made a lot of sense when we were using version control systems like subversion. A single contributor can inadvertently mess up a project pretty badly in older version control systems, but not so much in git. In git, there isn’t a lot that can’t be fixed and so most of the quality controls we put on guarding access are no longer necessary.
+
+Not every committer has the rights to release or make high level decisions, so we can be much more liberal about giving out commit rights. That increases the committer base for code review and bug triage. As a wider range of expertise in the committer pool smaller changes are reviewed and adjusted without the intervention of the more technical contributors, who can spend their time on reviews only they can do.
+
+This is they key to scaling contribution growth: committer growth.
+
+Committers are expected to follow this policy and continue to send pull requests, go through proper review, and have other committers merge their pull requests.
+
+This part is entirely redundant, but on purpose. Just a reminder even once someone is a committer their changes still flow through the same process they followed before.
+
+### TC Process
+
+The TC uses a “consensus seeking” process for issues that are escalated to the TC. The group tries to find a resolution that has no open objections among TC members. If a consensus cannot be reached that has no objections then a majority wins vote is called. It is also expected that the majority of decisions made by the TC are via a consensus seeking process and that voting is only used as a last-resort.
+
+The best solution tends to be the one everyone can agree to so you would think that consensus systems would be the norm. However, **pure consensus** systems incentivize obstructionism which we need to avoid.
+
+In pure consensus everyone essentially has a veto. So, if I don’t want something to happen I’m in a strong position of power over everyone that wants something to happen. They have to convince me, and I don’t have to convince anyone else of anything.
+
+To avoid this we use a system called “consensus seeking” which has a long history outside of open source. It’s quite simple, just attempt to reach a consensus, if a consensus can’t be reached then call for a majority wins vote.
+
+Just the fact that a vote **is a possibility** means that people can’t be obstructionists, whether someone favor a change or not, they have to convince their peers and if they aren’t willing to put in the work to convince their peers then they probably don’t involve themselves in that decision at all.
+
+The way these incentives play out is pretty impressive. We started using this process in io.js and adopted it in Node.js when we merged into the foundation. In that entire time we’ve never actually had to call for a vote, just the fact that we could is enough to keep everyone working together to find a solution and move forward.
+
+Resolution may involve returning the issue to committers with suggestions on how to move forward towards a consensus. It is not expected that a meeting of the TC will resolve all issues on its agenda during that meeting and may prefer to continue the discussion happening among the committers.
+
+A TC tries to resolve things in a timely manner so that people can make progress but often it’s better to provide some additional guidance that pushes the greater contributorship towards resolution without being heavy handed.
+
+Avoid creating big decision hierarchies. Instead, invest in a broad, growing and empowered contributorship that can make progress without intervention. We need to view a constant need for intervention by a few people to make any and every tough decision as the biggest obstacle to healthy Open Source.
+
+Members can be added to the TC at any time. Any committer can nominate another committer to the TC and the TC uses its standard consensus seeking process to evaluate whether or not to add this new member. Members who do not participate consistently at the level of a majority of the other members are expected to resign.
+
+The TC just uses the same consensus seeking process for adding new members as it uses for everything else.
+
+It’s a good idea to encourage committers to nominate people to the TC and not just wait around for TC members to notice the impact some people are having. Listening to the broader committers about who they see as having a big impact keeps the TC’s perspective inline with the rest of the project.
+
+As a project grows it’s important to add people from a variety of skill sets. If people are doing a lot of docs work, or test work, treat the investment they are making as equally valuable as the hard technical stuff.
+
+Projects should have the same ladder, user -> contributor -> commiters -> TC member, for every skill set they want to build into the project to keep it healthy.
+
+I often see long time maintainers worry about adding people who don’t understand every part of the project, as if they have to be involved in every decision. The reality is that people do know their limitations and want to defer hard decisions to people they know have more experience.
+
+Thanks to Greg [Wallace][5] and ashley [williams][6].
+
+--------------------------------------------------------------------------------
+
+via: https://www.linux.com/news/biz-os/governance/892141-healthy-open-source
+
+作者:[Mikeal Rogers][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.linux.com/community/forums/person/66928
+
+
+[1]: https://medium.com/@nodejs/node-js-foundation-to-add-express-as-an-incubator-project-225fa3008f70#.mc30mvj4m
+[2]: https://github.com/nodejs/TSC/blob/master/BasePolicies/CONTRIBUTING.md
+[3]: https://github.com/nodejs/TSC/issues
+[4]: https://github.com/Level/community/blob/master/CONTRIBUTING.md
+[5]: https://medium.com/@gtewallaceLF
+[6]: https://medium.com/@ag_dubs

From 5f72154fcf34e3b3d25a30da8873ff004f6cffad Mon Sep 17 00:00:00 2001
From: wxy 
Date: Wed, 16 Mar 2016 07:07:29 +0800
Subject: [PATCH 1160/1710] PUB:20151020 18 Years of GNOME Design and Software
 Evolution--Step by Step
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

@HaohongWANG 用心了~
---
 ...gn and Software Evolution--Step by Step.md | 200 ++++++++++++++++++
 ...gn and Software Evolution--Step by Step.md | 200 ------------------
 2 files changed, 200 insertions(+), 200 deletions(-)
 create mode 100644 published/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md
 delete mode 100644 translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md

diff --git a/published/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md b/published/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md
new file mode 100644
index 0000000000..6c579e0d5f
--- /dev/null
+++ b/published/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md	
@@ -0,0 +1,200 @@
+
+一步一脚印:GNOME十八年进化史
+================================================================================
+注:youtube 视频
+
+
+[GNOME][1] (GNU Object Model Environment)由两位墨西哥的程序员 Miguel de Icaza 和 Federico Mena 始创于1997年8月15日。GNOME 自由软件计划由志愿者和全职开发者来开发一个桌面环境及其应用程序。GNOME 桌面环境的所有部分都由开源软件组成,并且支持Linux, FreeBSD, OpenBSD 等操作系统。
+
+现在就让我穿越到1997年来看看 GNOME 的第一个版本:
+
+### GNOME 1 ###
+
+![GNOME 1.0 - GNOME 发布的第一个重大版本](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/1.0/gnome.png)
+
+*GNOME 1.0 (1997) – GNOME 发布的第一个重大版本*
+
+![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*
+
+重大更新,基于 GTK+ 2。引入了人机界面指南(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*
+
+改进了多媒体和文件管理器。
+
+![GNOME 2.4 Temujin](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.4/gnome-desktop.png)
+
+*GNOME 2.4 “Temujin”, 2003*
+
+首次发布 Epiphany 浏览器,增添了辅助功能(accessibility)。
+
+![GNOME 2.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.6/Adam_Hooper.png)
+
+*GNOME 2.6, 2004*
+
+Nautilus 成为主要的文件管理工具,同时引入了新的 GTK+ 对话框。作为对这个版本中变化的结果,创建了一个存在时间不久的分叉版本:GoneME。
+
+![GNOME 2.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.8/3.png)
+
+*GNOME 2.8, 2004*
+
+改良了对可移动设备的支持,并新增了 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*
+
+减小了内存需求和提升了性能。增加了新的面板小应用(调制解调器控制、磁盘挂载器和回收站组件)以及 Totem 影片播放器和 Sound Juicer CD抓取工具。
+
+![GNOME 2.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.12/gnome-livecd.jpg)
+
+*GNOME 2.12, 2005*
+
+改进了 Nautilus,改进了应用程序间的剪切/粘贴功能和 freedesktop.org 的整合。 新增 Evince PDF 阅读器;新默认主题 Clearlooks;菜单编辑器、钥匙环管理器和管理员工具。基于 GTK+2.8,支持 Cairo。
+
+![GNOME 2.14](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.14/debian4-stable.jpg)
+
+*GNOME 2.14, 2006*
+
+性能提升(某些情况下超过 100%);增强用户界面的易用性;GStreamer 0.10 多媒体框架。增加了 Ekiga 视频会议应用、Deskbar 搜索工具、Pessulus 权限管理器、快速切换用户功能和 Sabayon 系统管理员工具。
+
+![GNOME 2.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.16/Gnome-2.16-screenshot.png)
+
+*GNOME 2.16, 2006*
+
+性能提升。增加了 Tomboy 笔记应用、Baobab 磁盘用量分析应用、Orca 屏幕阅读器以及 GNOME 电源管理程序(延长了笔记本电池寿命)。改进了 Totem、Nautilus。Metacity 窗口管理器的合成(compositing)支持。新的图标主题。基于 GTK+ 2.0 的全新打印对话框。
+
+![GNOME 2.18](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.18/Gnome-2.18.1.png)
+
+*GNOME 2.18, 2007*
+
+性能提升。增加了 Seahorse GPG 安全应用,可以对邮件和本地文件进行加密。Baobab 改进了环状图表显示方式的支持。Orca 屏幕阅读器。改进了 Evince、Epiphany、GNOME 电源管理、音量控制。增加了两款新游戏:GNOME 数独和 glChess 国际象棋。支持 MP3 和 AAC 音频解码。
+
+![GNOME 2.20](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.20/rnintroduction-screenshot.png)
+
+*GNOME 2.20, 2007*
+
+发布十周年版本。Evolution 增加了备份功能。改进了 Epiphany、EOG、GNOME 电源管理。Seahorse 中的钥匙环密码管理功能。增加:在 Evince 中可以编辑PDF文档、文件管理界面中整合了搜索模块、自动安装多媒体解码器。
+
+![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*
+
+新增 Cheese 应用,它是一个可以截取网络摄像头和远程桌面图像的工具。Metacity 支持基本的窗口合成(compositing)。引入 GVFS(LCTT译注:GNOME Virtual file system,GNOME 虚拟文件系统)。改善了Totem 播放 DVD 和 YouTube 的效果,支持播放 MythTV。时钟小应用支持国际化。在 Evolution 中新增了谷歌日历以及为信息添加标签的功能。改进了 Evince、Tomboy、 Sound Juicer 和计算器。
+
+![GNOME 2.24](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.24/gnome-224.jpg)
+
+*GNOME 2.24, 2008*
+
+新增了 Empathy 即时通讯软件。Ekiga 升级至3.0版本。Nautilus 支持标签式浏览,更好的支持了多屏幕显示方式和数字电视功能。
+
+![GNOME 2.26](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.26/gnome226-large_001.jpg)
+
+*GNOME 2.26, 2009*
+
+新增光盘刻录应用 Brasero。简化了文件分享的流程。改进了媒体播放器的性能。支持多显示器和指纹识别器。
+
+![GNOME 2.28](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.28/1.png)
+
+*GNOME 2.28, 2009*
+
+增加了 GNOME 蓝牙模块。改进了 Epiphany 网页浏览器、Empathy 即时通讯软件、时间追踪器和辅助功能。GTK+ 升级至2.18版本。
+
+![GNOME 2.30](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.30/GNOME2.30.png)
+
+*GNOME 2.30, 2010*
+
+改进了 Nautilus 文件管理器、Empathy 即时通讯软件、Tomboy、Evince、时间追踪器、Epiphany 和 Vinagre。借助 GVFS 通过 libimobiledevice(LCTT 译注:支持iOS®设备跨平台使用的工具协议库)部分地支持了 iPod 和 iPod Touch 设备。
+
+![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*
+
+新增 Rygel 媒体分享工具和 GNOME 色彩管理器。改进了 Empathy 即时通讯软件、Evince、Nautilus 文件管理器等。由于计划于2010年9月发布3.0版本,因此大部分开发者的精力都由2.3x转移至了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*
+
+引入 GNOME Shell,这是一个重新设计的、具有更简练更集中的选项的框架。基于 Mallard 标记语言的话题导向型帮助系统。支持窗口并列堆叠。启用新的视觉主题和默认字体。采用 GTK+ 3.0,具有更好的语言绑定、主题、触控以及多平台支持。去除了那些长期弃用的 API。
+
+![GNOME 3.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.2/gdm.png)
+
+*GNOME 3.2、 2011*
+
+支持在线帐户、“浏览器”应用。新增通讯录应用和文档文件管理器。“文件管理器”支持快速预览。较大的整合,文档更完善,以及对外观的改善和各种性能提升。
+
+![GNOME 3.4](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.4/application-view.png)
+
+*GNOME 3.4, 2012*
+
+全新外观的 GNOME 3 应用程序:“文件”、Epiphany(更名为“浏览器”)、“GNOME 通讯录”。可以在活动概览中搜索本地文件。支持应用菜单。焕然一新的界面元素:新的颜色拾取器、重新设计的滚动条、更易使用的旋钮以及可隐藏的标题栏。支持平滑滚动。全新的动态壁纸。在系统设置中改进了对 Wacom 数位板的支持。更简便的扩展应用管理。更好的硬件支持。面向主题的帮助文档。在 Empathy 中提供了对视频电话和动态信息的支持。更好的辅助功能:提升 Orca 整合度,增强高对比度模式,以及全新的缩放设置。大量的应用增强和对细节的改进。
+
+![GNOME 3.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.6/gnome-3-6.png)
+
+*GNOME 3.6, 2012*
+
+全新设计的核心元素:新的应用按钮和改进的活动概览布局。新的登录和锁定界面。重新设计的通知栏。通知现在更智能,可见性更高,同时更容易关闭。改进了系统设置的界面和设定逻辑。用户菜单默认显示关闭电源操作。整合的输入方式。辅助功能一直开启。新的应用:Boxes 桌面虚拟化,曾在 GNOME 3.4中发布过预览版。Clocks 时钟,可以显示世界时间。更新了磁盘用量分析、Empathy 和字体查看器的外观。改进了 Orca 对布莱叶盲文的支持。 在“浏览器”中,用最常访问页面取代了之前的空白起始页,增添了更好的全屏模式并使用了 WebKit2 测试版引擎。 Evolution 开始使用 WebKit 显示邮件内容。 改进了“磁盘”功能。 改进了“文件”应用(即之前的 Nautilus),新增诸如最近访问的文件和搜索等功能。
+
+![GNOME 3.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.8/applications-view.png)
+
+*GNOME 3.8, 2013*
+
+令人耳目一新的核心组件:新应用界面可以分别显示常用应用及全部应用。窗口布局得到全面改造。新的屏幕即现式(OSD)输入法开关。通知和信息现在会对屏幕边缘的点击作出回应。为那些喜欢传统桌面的用户提供了经典模式。重新设计了设置界面的工具栏。新的初始化引导流程。“GNOME 在线帐户”添加了对更多供应商的支持。“浏览器”正式启用 WebKit2 引擎,有了一个新的私密浏览模式。“文档”支持双页模式并且整合了 “Google 文档”。“通讯录”的 UI 升级。“GNOME 文件”、“GNOME Boxes”和“GNOME 磁盘”都得到了大幅改进。集成了 ownCloud。两款全新的 GNOME 核心应用:“GNOME 时钟”和“GNOME 天气”。
+
+![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*
+
+全新打造的系统状态区,能够更直观的纵览全局。一系列新应用,包括 “GNOME 地图”、“GNOME 备忘录”、 “GNOME 音乐”和“GNOME 照片”。新的基于位置的功能,如自动时区和世界时钟。支持高分辨率及智能卡。 基于 GLib 2.38 提供了对 D-Bus 的支持。
+
+![GNOME 3.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.12/app-folders.png)
+
+*GNOME 3.12, 2014*
+
+改进了概览中的键盘导航和窗口选择,基于易用性测试对初始设置进行了修改。有线网络图标重新回到了状态栏上,在“应用”视图中可以自定义应用文件夹。在大量应用的对话框中引入了新的 GTK+ 小工具,同时使用了新的 GTK+ 标签风格。“GNOME 视频”,“GNOME 终端”以及 Gedit 都改用了全新外观,更贴合 HIG(LCTT 译注:Human Interface Guidelines,人机界面指南)。在 GNOME Shell 的终端仿真器中提供了搜索预测功能。增强了对 “GNOME 软件”和高分辨率显示屏的支持。提供了新的录音工具。增加了新的桌面通知接口。在向 Wayland 移植的进度中达到了可用的程度,可用选择性地预览体验。
+
+![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*
+
+更炫酷的桌面环境效果,改善了对触摸屏的支持。“GNOME 软件”可以管理安装的插件。在“GNOME 照片”中可以访问 “Google 相册”。重绘了 Evince、数独、扫雷和天气应用的用户界面,同时增加了一款叫做 Hitori 的 GNOME 游戏。
+
+![GNOME 3.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.16/preview-apps.png)
+
+*GNOME 3.16, 2015*
+
+33000 处改变。主要的修改包括 UI 的配色方案从黑色变成了炭黑色。 增加了即现式滚动条。通知窗口中整合了日历应用。对“文件”,图像查看器和“地图”等大量应用进行了微调。可以预览应用程序。进一步从 X11 向 Wayland 移植。
+
+感谢 GNOME Project 及 [Wikipedia][2] 提供的变更日志!感谢阅读!
+
+
+--------------------------------------------------------------------------------
+
+via: https://tlhp.cf/18-years-of-gnome-evolution/
+
+作者:[Pavlo Rudyi][a]
+译者:[Haohong WANG](https://github.com/HaohongWANG)
+校对:[wxy](https://github.com/wxy)
+
+本文由 [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
diff --git a/translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md b/translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md
deleted file mode 100644
index 614f10bb85..0000000000
--- a/translated/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md	
+++ /dev/null
@@ -1,200 +0,0 @@
-
-一步一脚印:GNOME十八年进化史
-================================================================================
-注:youtube 视频
-
-
-[GNOME][1] (GNU Object Model Environment)由两位墨西哥的程序员Miguel de Icaza和Federico Mena 始创于1997年8月15日。GNOME自由软件的桌面环境和应用程序计划由志愿者和全职开发者来开发。所有的GNOME桌面环境都由开源软件组成,并且支持Linux, FreeBSD, OpenBSD 等操作系统。
-
-现在就让我穿越到1997年来看看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) – GNOME 发布的第一个版本
-
-![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
-
-基于GTK+2的重大更新。引入了人机界面指南。
-
-![GNOME 2.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.2/GNOME_2.2_catala.png)
-
-**GNOME 2.2**, 2003
-
-改进了多媒体和文件管理器。
-
-![GNOME 2.4 Temujin](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.4/gnome-desktop.png)
-
-**GNOME 2.4** “Temujin”, 2003
-
-首次发布Epiphany浏览器,增添了辅助功能。
-
-![GNOME 2.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.6/Adam_Hooper.png)
-
-**GNOME 2.6**, 2004
-
-启用Nautilus空间文件管理工具同时引入了新的GTK+ (译注:跨平台图形用户界面工具包)对话框。这个转瞬即逝的版本变更被称做是GNOME的一个分支:GoneME。
-
-![GNOME 2.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.8/3.png)
-
-**GNOME 2.8**, 2004
-
-改良了对可移动设备的支持并新增了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
-
-减小内存需求,改进显示界面。增加网络控制、磁盘挂载和回收站组件以及Totem影片播放器和Sound Juicer CD抓取工具。
-
-![GNOME 2.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.12/gnome-livecd.jpg)
-
-**GNOME 2.12**, 2005
-
-改进了Nautilus以及跨平台剪切/粘贴功能的整合。 新增Evince PDF阅读器;新预设主题Clearlooks;新增菜单编辑器、管理员工具与环状管理器。基于支持Cairo的GTK+2.8。
-
-![GNOME 2.14](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.14/debian4-stable.jpg)
-
-**GNOME 2.14**, 2006
-
-改善显示效果;增强易用性;基于GStreamer 0.10多媒体框架。增加了Ekiga视频会议应用,Deskbar搜索工具,Pessulus权限管理器,和Sabayon系统管理员工具和快速切换用户功能。
-
-![GNOME 2.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.16/Gnome-2.16-screenshot.png)
-
-**GNOME 2.16**, 2006
-
-界面改良。增加了Tomboy笔记应用,Baobab磁盘用量分析应用,Orca屏幕朗读器以及GNOME 电源管理程序(以延长笔记本电池寿命);改进了Totem, Nautilus, 使用了新的图标主题。基于GTK+ 2.0 的全新显示对话框。
-
-![GNOME 2.18](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.18/Gnome-2.18.1.png)
-
-**GNOME 2.18**, 2007
-
-界面改良。增加了Seahorse GPG安全应用,可以对邮件和本地文件进行加密;Baobab增加了环状图表显示方式;改进了Orca,Evince, Epiphany, GNOME电源管理,音量控制;增加了两款新游戏:GNOME数独和国际象棋。支持MP3和AAC音频解码。
-
-![GNOME 2.20](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.20/rnintroduction-screenshot.png)
-
-**GNOME 2.20**, 2007
-
-发布十周年版本。Evolution增加了备份功能;改进了Epiphany,EOG,GNOME电源管理以及Seahorse中的Keyring密码管理方式;在Evince中可以编辑PDF文档;文件管理界面中整合了搜索模块;自动安装多媒体解码器。
-
-![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
-
-新增Cheese应用,它是一个可以截取网络摄像头和远程桌面图像的工具;Metacity支持基本的窗口叠加复合;引入GVFS(译注:GNOME Virtual file system,GNOME虚拟文件系统);改善了Totem播放DVD 和YouTube的效果,支持播放MythTV;在Evolution中新增了谷歌日历以及为信息添加标签的功能;改进了Evince, Tomboy, Sound Juicer和计算器。
-
-![GNOME 2.24](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.24/gnome-224.jpg)
-
-**GNOME 2.24**, 2008
-
-新增了Empathy即时通讯软件,Ekiga升级至3.0版本;Nautilus支持标签式浏览,更好的支持了多屏幕显示方式和数字电视功能。
-
-![GNOME 2.26](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.26/gnome226-large_001.jpg)
-
-**GNOME 2.26**, 2009
-
-新增光盘刻录应用Brasero;简化了文件分享的流程,改进了媒体播放器的性能;支持多显示器和指纹识别器。
-
-![GNOME 2.28](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.28/1.png)
-
-**GNOME 2.28**, 2009
-
-增加了GNOME 蓝牙模块;改进了Epiphany ,Empathy,时间追踪器和辅助功能。GTK+升级至2.18版本。
-
-![GNOME 2.30](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.30/GNOME2.30.png)
-
-**GNOME 2.30**, 2010
-
-改进了Nautilus,Empathy,Tomboy,Evince,Time Tracker,Epiphany和 Vinagre。借助基于libimobiledevice(译注:支持iOS®设备跨平台使用的工具协议库)的GVFS可以访问部分iPod 和iPod Touch。
-
-![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
-
-新增Rygel 媒体分享工具和GNOME色彩管理器;改进了Empathy即时通讯客户端,Evince,Nautilus文件管理器等。计划于2010年9月发布3.0版本,因此大部分开发者的精力都由2.3x转移至了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
-
-引入GNOME Shell,一个重新设计的、具有更简练更集中的选项的框架。基于Mallard标记语言的话题导向型帮助。支持窗口并列堆叠。启用新的视觉主题和字体。采用GTK+3.0,具有更好的语言绑定,主题,触控以及多平台支持。去除了长期弃用的API。
-
-![GNOME 3.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.2/gdm.png)
-
-**GNOME 3.2**, 2011
-
-支持在线帐户,Web应用;新增通讯录应用和文档文件管理器;文件管理器支持快速预览;整合性能,更新文档以及对外观的一些小改进。
-
-![GNOME 3.4](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.4/application-view.png)
-
-**GNOME 3.4**, 2012
-
-全新的GNOME 3 应用程序外观:文件,Epiphany(更名为Web),GNOME 通讯录。可以在Activities Overview中搜索本地文件。支持应用菜单。焕然一新的界面元素:崭新的颜色拾取器,重新设计的滚动条,更易使用的旋转按钮以及可隐藏的标题栏。支持视角平滑。全新的动态壁纸。在系统设置中增添了对Wacom数位板的支持。更简便的扩展应用管理。更好的硬件支持。面向主题的文档。在Empathy中提供了对视频电话和动态信息的支持。更好的辅助功能:提升Orca整合度,增强高对比度模式适配性,以及全新的缩放设置。大量应用和细节的改进。
-
-![GNOME 3.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.6/gnome-3-6.png)
-
-**GNOME 3.6**, 2012
-
-全新设计的核心元素:新的应用按钮和改进的Activities Overview布局。新的登陆锁定界面。重新设计的通知栏。通知现在更智能,可见性更高,同时更容易操作。改进了系统设置的界面和设定逻辑。用户菜单默认显示关机操作。整合了输入法。辅助功能一直开启。新的应用:Boxes虚拟机,在GNOME 3.4中发布了预览版。Clocks时钟, 可以显示世界时间。升级了磁盘用量分析,Empathy和 Font Viewer的外观。改进了Orca对布莱叶盲文的支持。 在Web浏览器中, 用最常访问页面取代了之前的空白起始页,增添了更好的全屏模式并使用了WebKit2测试版引擎. Evolution 开始使用WebKit提交邮件。 改进了磁盘功能。 改进了文件管理应用即之前的Nautilus, 新增诸如最近访问的文件和搜索等功能。
-
-![GNOME 3.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.8/applications-view.png)
-
-**GNOME 3.8**, 2013
-
-令人耳目一新的核心组件:新应用界面可以分别显示常用应用及全部应用,窗口布局得到全面改造。新的屏幕即现式输入法开关。通知和信息现在会对屏幕边缘的点击作出回应。为那些喜欢传统桌面的用户提供了经典模式。重新设计了设置界面的工具栏。新的初始化引导流程。GNOME 在线帐户添加了对更多供应商的支持。浏览器正式启用WebKit2引擎。文档支持双页模式并且整合了Google 文档。通讯录的UI升级。GNOME Files,GNOME Boxes和GNOME Disks都得到了大幅改进。两款全新的GNOME核心应用:GNOME时钟和GNOME天气。
-
-![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
-
-全新设计的系统状态界面,能够更直观的纵览全局。一系列新应用,包括GNOME Maps, GNOME Notes, GNOME Music 和GNOME Photos。新的基于位置的功能,如自动时区和世界时间。支持高分辨率及智能卡。 基于GLib 2.38提供了对D-Bus的支持。
-
-![GNOME 3.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.12/app-folders.png)
-
-**GNOME 3.12**, 2014
-
-改进了Overview中的键盘导航和窗口选择,基于易用性测试对初始设置进行了修改。有线网络重新回到了状态栏上,在应用预览中可以自定义应用文件夹。在大量应用的对话框中引入了新的GTK+小工具同时使用了新的GTK+标签风格。GNOME Videos,GNOME 终端以及Gedit都改用了全新外观,更贴合HIG(译注:Human Interface Guidelines,人机界面指南)。在GNOME Shell的终端仿真器中提供了搜索预测功能。增强了对GNOME软件和高密度显示屏的支持。提供了新的录音工具。增加了新的桌面通知接口。在Wayland中的进程被置于更易使用的位置并可以进行选择性预览。
-
-![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
-
-更炫酷的桌面环境效果,改善了对触摸屏的支持。GNOME Software supports managing installed add-ons. 在GNOME Photos中可以访问Google相册。重绘了Evince,数独,扫雷和天气应用的用户界面,同时增加了一款叫做Hitori 的GNOME游戏。
-
-![GNOME 3.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.16/preview-apps.png)
-
-**GNOME 3.16**, 2015
-
-33,000处改变。主要修改了UI的配色方案。 增加了即现式滚动条。通知窗口中整合了日历应用。对文件管理器,图像查看器和地图等大量应用进行了微调。可以预览应用程序。进一步使用Wayland取代X11。
-
-感谢GNOME Project及[Wikipedia][2]提供的变更日志!感谢阅读!(译注:原文此处为“敬请期待”。)
-
-
---------------------------------------------------------------------------------
-
-via: https://tlhp.cf/18-years-of-gnome-evolution/
-
-作者:[Pavlo Rudyi][a]
-译者:[Haohong WANG](https://github.com/HaohongWANG)
-校对:[校对者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

From 7cf2860811bdd99833386fbb9d025d9a9b3ede05 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Wed, 16 Mar 2016 10:19:39 +0800
Subject: [PATCH 1161/1710] PUB:20160220 [Free Download] Vi Cheat Sheet For
 Beginners

@JonathanKang
---
 ... Download] Vi Cheat Sheet For Beginners.md | 78 ++++++++++++++++++
 ... Download] Vi Cheat Sheet For Beginners.md | 79 -------------------
 2 files changed, 78 insertions(+), 79 deletions(-)
 create mode 100644 published/20160220 [Free Download] Vi Cheat Sheet For Beginners.md
 delete mode 100644 translated/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md

diff --git a/published/20160220 [Free Download] Vi Cheat Sheet For Beginners.md b/published/20160220 [Free Download] Vi Cheat Sheet For Beginners.md
new file mode 100644
index 0000000000..6993d7ade1
--- /dev/null
+++ b/published/20160220 [Free Download] Vi Cheat Sheet For Beginners.md	
@@ -0,0 +1,78 @@
+初学者 Vi 备忘单
+================================================
+
+![](http://itsfoss.com/wp-content/uploads/2016/01/VI.jpg)
+
+一直以来,我都在给你们分享我使用 Linux 的经验。今天我想分享我的 **Vi 备忘单**。这份备忘单节省了我很多时间,因为我再也不用使用 Google 去搜索这些命令了。
+
+## 基本 Vi 命令
+
+这并不是一个教你使用 [Vi 编辑器](https://en.wikipedia.org/wiki/Vi)的各个方面的详尽教程。事实上,这根本就不是一个教程。这仅仅是一些基本 Vi 命令以及这些命令简单介绍的集合。
+
+命令|解释
+:--|:--
+`:x`|保存文件并退出
+`:q!`|退出但不保存文件
+`i`|在光标左侧插入
+`a`|在光标右侧插入
+`ESC`按键|退出插入模式
+光标键|移动光标
+`/text`|搜索字符串text(大小写敏感)
+`n`|跳到下一个搜索结果
+`x`|删除当前光标处的字符
+`dd`|删除当前光标所在的行
+`u`|撤销上次改变
+`:0`(数字0)|将光标移动到文件开头
+`:n`|将光标移动到第n行
+`G`|将光标移动到文件结尾
+`^`|将光标移动到该行开头
+`$`|将光标移动到该行结尾
+`:set list`|查看文件中特殊字符
+`yy`|复制光标所在行
+`5yy`|复制从光标所在行开始的5行
+`p`|在光标所在行下面粘贴
+
+你可以通过下面的链接下载 PDF 格式的 Vi 备忘录:
+
+[下载 Vi 备忘录](https://drive.google.com/file/d/0By49_3Av9sT1X3dlWkNQa3g2b2c/view?usp=sharing)
+
+你可以把它打印出来放到你的办公桌上,或者把它保存到你的电脑上来使用。
+
+## 我为什么要建立这个 Vi 备忘录?
+
+几年前,当我刚刚接触 Linux 终端时,使用命令行编辑器这个主意使我一惊。我之前在我自己的电脑上使用过桌面版本的 Linux,所以我很乐意使用像 Gedit 这样的有图形界面的编辑器。但是在工作环境中,我不得不使用命令行,并且无法使用图形界面版的编辑器。
+
+我就这么被强迫地使用 Vi 来对远程 Linux 终端上的文件做一些基本的编辑。从这时候我开始了解并钦佩 Vi 的强大之处。
+
+因为在那时候我还是一个 Vi 新手,所以我经常对 Vi 一些操作很困惑。仍然记得第一次使用 Vi 的时候,由于我不知道如何退出 Vi,所以我都无法关闭某个文件。我也只能通过 Google 搜索来找到解决办法。我不得不接受这个尴尬的事实。
+
+从那以后,我就决定制作一个列表来列出我经常会用到的基本 Vi 操作。这个列表,或者你可能称它为备忘录。在我早期使用 Vi 的时候,它对我非常有用。慢慢地,我对 Vi 更加熟悉,我已经可以熟记那些基本编辑命令。到现在,我甚至不需要再去查看我的 Vi 备忘录了。
+
+## 你为什么需要 Vi 备忘录?
+
+我能理解一个刚刚接触 Vi 的人的感受。你最喜欢的 `Ctrl`+`S` 快捷键不能像在其他编辑器那样方便地保存文件。`Ctrl`+`C`和`Ctrl`+`V`理应是通用的用来复制和粘贴的快捷键,但是在 Vi 中却不是这样。
+
+很多人都在使用类似的备忘录帮助他们熟悉各种编程语言或工具,以便让他们可以快速找到常用的下一步或命令。相信我,使用备忘录会给程序员日常工作带来很大便利。
+
+如果你刚刚开始接触 Vi 或者你经常使用但是总是记不住 Vi 操作,那么这份 Vi 备忘录对于你来说是非常有用的。你可以把它保存下来留作以后查询使用。
+
+## 你怎么看待这份备忘录?
+
+至今为止,我一直在克制我自己不要过于依赖终端。我想知道你是怎么发现这篇文章的?你是否想让我分享更多类似的备忘录出来以供你们下载?我很期待你的意见和建议。
+
+------------------------------------------------------------------------------
+
+via: http://itsfoss.com/download-vi-cheat-sheet/
+
+作者:[ABHISHEK][a]
+译者:[JonathanKang](https://github.com/JonathanKang)
+校对:[wxy](https://github.com/wxy)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://itsfoss.com/author/abhishek/
+
+
+
+
+
diff --git a/translated/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md b/translated/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md
deleted file mode 100644
index dbf4ef5011..0000000000
--- a/translated/tech/20160220 [Free Download] Vi Cheat Sheet For Beginners.md	
+++ /dev/null
@@ -1,79 +0,0 @@
-【免费下载】初学者Vi备忘单
-================================================
-
-![](http://itsfoss.com/wp-content/uploads/2016/01/VI.jpg)
-
-一直以来,我都在给你们分享我使用Linux的经验。今天我想分享我的**Vi备忘单**。这份备忘单节省了我很多时间,因为我再也不用使用Google去搜索这些命令了。
-
-## Basic Vi commands
-## 基本Vi命令
-
-这并不是一个详尽的教程来教你[Vi编辑器](https://en.wikipedia.org/wiki/Vi)的每一个方面。事实上,这根本就不是一个教程。这仅仅是一些基本Vi命令以及这些命令简单介绍的集合。
-
-命令|解释
-:--|:--
-:x |保存文件并退出
-:q!|退出但不保存文件
-i|在光标左侧插入
-a|在光标右侧插入
-ESC|退出插入模式
-arrows|移动光标
-/text|搜索字符串text(大小写敏感)
-n|跳到下一个搜索结果
-x|删除当前光标处的字符
-dd|删除当前光标所在的行
-u|撤销上次改变
-:0|将光标移动到文件开头
-:n|将光标移动到第n行
-G|将光标移动到文件结尾
-^|将光标移动到该行开头
-$|将光标移动到该行结尾
-:set list|查看文件中特殊字符
-yy|复制光标所在行
-5yy|复制从光标所在行开始的5行
-p|在光标所在行下面粘贴
-
-你可以通过下面的链接下载PDF格式的Vi备忘录:
-
-[下载Vi备忘录](https://drive.google.com/file/d/0By49_3Av9sT1X3dlWkNQa3g2b2c/view?usp=sharing)
-
-你可以把它打印出来放到你的办公桌上,或者把它保存到你的电脑上来使用。
-
-## 我为什么要建立这个Vi备忘录?
-
-几年前,当我刚刚接触Linux终端时,使用命令行编辑器这个主意使我一惊。我之前在我自己的电脑上使用过桌面版本的Linux,所以我很乐意使用像Gedit这样的有图形界面的编辑器。但是在工作环境中,我不得不使用命令行,并且无法使用图形界面版的编辑器。
-
-我就这么被强迫地使用Vi来对远程Linux终端上的文件做一些基本的编辑。从这时候我开始了解并钦佩Vi的强大之处。
-
-因为在那时候我还是一个Vi新手,所以我经常对Vi一些操作很困惑。仍然记得第一次使用Vi的时候,由于我不知道如何退出Vi,所以我都无法关闭某个文件。我也只能通过Google搜索来找到解决办法。我不得不接受这个尴尬的事实。
-
-从那以后,我就决定制作一个列表来列出我经常会用到的基本Vi操作。这个列表,或者你可能称它为备忘录。在我早期使用Vi的时候,它对我非常有用。慢慢地,我对Vi更加熟悉,我已经可以熟记那些基本编辑命令。到现在,我甚至不需要再去查看我的Vi备忘录了。
-
-## 你为什么需要Vi备忘录?
-
-我能理解一个刚刚接触Vi的人的感受。你最喜欢的Ctrl+S快捷键不能像在其他编辑器那样方便地保存文件。Ctrl+C和Ctrl+V理应是通用的用来复制和粘贴的快捷键,但是在Vi中却不是这样。
-
-很多人都在使用类似的备忘录帮助他们熟悉各种编程语言以及用来进行快速检索的“/”工具。相信我,使用备忘录会给程序员日常工作带来很大便利。
-
-如果你刚刚开始接触Vi或者你经常使用但是总是记不住Vi操作,那么这份Vi备忘录对于你来说是非常有用的。你可以把它保存下来留作以后查询使用。
-
-## 你怎么看待这份备忘录?
-
-至今为止,我一直在克制我自己不要过于以来终端。我想知道你是怎么发现这篇文章的?你是否想让我分享更多类似的备忘录出来以供你们下载?我很期待你的意见和建议。
-
-------------------------------------------------------------------------------
-
-via: http://itsfoss.com/download-vi-cheat-sheet/
-
-作者:[ABHISHEK][a]
-译者:[JonathanKang](https://github.com/JonathanKang)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://itsfoss.com/author/abhishek/
-
-
-
-
-

From 2686a1ca36ec7e7c688cbb7a62645bf0e4555aef Mon Sep 17 00:00:00 2001
From: wxy 
Date: Wed, 16 Mar 2016 10:46:56 +0800
Subject: [PATCH 1162/1710] PUB:20160218 ST Releases Free Linux IDE for 32-Bit
 MCUs

@martin2011qi
---
 ...Releases Free Linux IDE for 32-Bit MCUs.md | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
 rename {translated/tech => published}/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md (68%)

diff --git a/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/published/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md
similarity index 68%
rename from translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md
rename to published/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md
index adc5404a2c..846fa1b035 100644
--- a/translated/tech/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md	
+++ b/published/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md	
@@ -1,43 +1,43 @@
-意法半导体为 32 位 微控制器发布了一款自由的 Linux 集成开发环境
+意法半导体为 32 位微控制器发布了一款自由的 Linux 集成开发环境
 =================================================
 
 ![](http://www.linux.com/images/stories/66866/STM32_Nucleo_expansion_board.jpg)
 
-32 位微控制器世界向 Linux 敞开大门。本周,领先的 ARM Cortex-M 供应商意法半导体(ST)[发布了](http://www.st.com/web/en/press/p3781) 一款自由的 Linux 桌面版开发程序,该软件面向其旗下的 STM32 微控制单元(MCU)。包含了 ST 的 STM32CubeMX 配置器和初始化工具,以及其 STM32 [系统工作台(SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) ,这个基于 Eclipse 的 IDE 由工具 Ac6 创建。支撑 SW4STM32 的工具链,论坛,博客以及技术会由 [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) 开发社区提供。
+32 位微控制器世界向 Linux 敞开大门。前一段时间,领先的 ARM Cortex-M 供应商意法半导体(ST)[发布了](http://www.st.com/web/en/press/p3781) 一款自由的 Linux 桌面版开发程序,该软件面向其旗下的 STM32 微控制单元(MCU)。包含了 ST 的 STM32CubeMX 配置器和初始化工具,以及其 STM32 [系统工作台(SW4STM32)](http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF261797) ,这个基于 Eclipse 的 IDE 由工具 Ac6 创建。支撑 SW4STM32 的工具链,论坛,博客以及技术会由 [openSTM32.org](http://www.openstm32.org/tiki-index.php?page=HomePage) 开发社区提供。
 
 “Linux 社区以吸引富有创意的自由思想者而闻名,他们善于交流心得、高效地克服挑战。” Laurent Desseignes,意法半导体微控制器产品部,微控制器生态系统市场经理这么说道:“我们正着手做的是让他们能极端简单的借力 STM32 系列的特性和性能施展自己的才能,运用到富有想象力的新产品的创造中去。
 
 Linux 是物联网(IoT)网关和枢纽,及高端 IoT 终端的领先平台。但是,大部分 IoT 革命,以及可穿戴设备市场基于小型的低功耗微控制器,对 Cortex-M 芯片的运用越来越多。虽然其中的一小部分可以运行精简的 uCLinux (见下文),却没能支持更全面的 Linux 发行版。取而代之的是实时操作系统(RTOS)们或者有时干脆不用 OS 来控制。固件的开发工作一般会在基于 Windows 的集成开发环境(IDE)上完成。
 
-通过 ST 的自由工具,Linux 开发者们可以更容易的开疆拓土。ST 工具中的一些技术在第二季度应该登录 Mac OS/X 平台,与 [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) ,开发套件,以及评估板同时面世。Nucleo 支持 32 针, 64 针, 和 144 针的版本,并且提供类似 Arduino 连接器这样的插件。
+通过 ST 的自由工具,Linux 开发者们可以更容易的开疆拓土。ST 工具中的一些技术在第二季度应该会登录 Mac OS/X 平台,与 [STM32 Nucleo](http://www.st.com/web/en/catalog/tools/FM146/CL2167/SC2003?icmp=sc2003_pron_pr-stm32f446_dec2014&sc=stm32nucleo-pr5) 、开发套件、以及评估板同时面世。Nucleo 支持 32 针、64 针、和 144 针的版本,并且提供类似 Arduino 连接器这样的插件。
 
 STM32CubeMX 配置器和 IDE SW4STM32 使 Linux 开发者能够配置微控制器并开发调试代码。SW4STM32 支持在 Linux 下通过社区更改版的 [OpenOCD](http://openocd.org/) 使用调试工具 ST-LINK/V2。
 
 据 ST 称,软件兼容 STM32Cube 软件包及标准外设库中的微控制器固件。目标是囊括 ST 的全系列 MCU,从入门级的 Cortex-M0 内核到高性能的 M7 芯片,包括 M0+,M3 和 DSP 扩展的 M4 内核。
 
-ST 并非首个为 Linux 准备 Cortex-M 芯片 IDE 的 32 位 MCU 供应商,但似乎是第一大自由的 Linux 平台。例如NXP,MCU 的市场份额随着近期收购了 Freescale (Kinetis 系列 MCU,等)而增加,提供了一款 IDE [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO)支持 Linux 、Windows 和 Mac。然而,LPCXpresso 每份售价 $450。
+ST 并非首个为 Linux 准备 Cortex-M 芯片 IDE 的 32 位 MCU 供应商,但似乎是第一大自由的 Linux 平台。例如 NXP,MCU 的市场份额随着近期收购了 Freescale (Kinetis 系列 MCU,等)而增加,提供了一款 IDE [LPCXpresso IDE](http://www.nxp.com/pages/lpcxpresso-ide:LPCXPRESSO),支持 Linux 、Windows 和 Mac。然而,LPCXpresso 每份售价 $450。
 
-在其 [SmartFusion FPGA 系统级芯片(SoC)](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3)上集成了 Cortex-M3 芯片的Microsemi,拥有一款 IDE [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support)适用于 RHEL 和 Windows。然而,Libero 需求许可证,并且 RHEL 版缺乏如 FlashPro 和 SoftConsole 的插件。
+在其 [SmartFusion FPGA 系统级芯片(SoC)](http://www.microsemi.com/products/fpga-soc/soc-processors/arm-cortex-m3)上集成了 Cortex-M3 芯片的 Microsemi,拥有一款 IDE [Libero IDE](http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-free-linux-ide-for-32-bit-mcus#device-support),适用于 RHEL 和 Windows。然而,Libero 需要许可证才行,并且 RHEL 版缺乏如 FlashPro 和 SoftConsole 的插件。
 
-## 为什么要学习 MCU?
+### 为什么要学习 MCU?
 
 即便 Linux 开发者并没有计划在 Cortex-M 上使用 uClinux,但是 MCU 的知识总会派上用场。特别是牵扯到复杂的 IoT 工程,需要扩展 MCU 终端至云端。
 
-对于历程和业余爱好者的项目,Arduino 板为其访问 MCU 提供了非常便利的接口。然而历程之外,开发者常常就会用更快的 32 位 Cortex-M 芯片以及所带来的附加功能来替代 Arduino 板和板上的那块 8 位 MCU ATmega32u4。这些附加功能包括改进的存储器寻址,用于芯片和各种总线的独立时钟设置,以及芯片 [Cortex-M7](http://www.electronicsnews.com.au/products/stm32-mcus-with-arm-cortex-m7-processors-and-graph)自带的入门级显示芯片。
+对于原型和业余爱好者的项目,Arduino 板为其访问 MCU 提供了非常便利的接口。然而原型之外,开发者常常就会用更快的 32 位 Cortex-M 芯片以及所带来的附加功能来替代 Arduino 板和板上的那块 8 位 MCU ATmega32u4。这些附加功能包括改进的存储器寻址,用于芯片和各种总线的独立时钟设置,以及芯片 [Cortex-M7](http://www.electronicsnews.com.au/products/stm32-mcus-with-arm-cortex-m7-processors-and-graph) 自带的入门级显示芯片。
 
-还有些可能需求 MCU 开发技术的地方有:可穿戴设备、低功耗、低成本和小尺寸给了 MCU 一席之地,还有机器人和无人机这些使用实时处理和电机控制的地方更为受用。在机器人上,你更是有可能看看 Cortex-A 与 Cortex-M 集成在同一个产品中的样子。
+还有些可能需求 MCU 开发技术的地方包括可穿戴设备,低功耗、低成本和小尺寸给了 MCU 一席之地,还有机器人和无人机这些使用实时处理和电机控制的地方更为受用。在机器人上,你更是有可能看看 Cortex-A 与 Cortex-M 集成在同一个产品中的样子。
 
 对于 SoC 芯片还有这样的一种温和的局势,即将 MCU 加入到 Linux 驱动的 Cortex-A 核心中,就如同 [NXP i.MX6 SoloX](http://linuxgizmos.com/freescales-popular-i-mx6-soc-sprouts-a-cortex-m4-mcu/)。虽然大多数的嵌入式项目并不使用这种混合型 SoC 或者说将应用处理器和 MCU 结合在同一产品中,但开发者会渐渐地发现自己工作的生产线、设计所基于的芯片正渐渐的从低端的 MCU 模块发展到 Linux 或安卓驱动的 Cortex-A。
 
-## uClinux 是 Linux 在 MCU 领域的筹码
+### uClinux 是 Linux 在 MCU 领域的筹码
 
 随着物联网的兴起,我们见到越来越多的 SBC 和模块计算机,它们在 32 位的 MCU 上运行着 uClinux。不同于其他的 Linux 发行版,uClinux 并不需要内存管理单元(MMU)。然而,uClinux 对市面上可见 MCU 有更高的内存需求。需求更高端的 Cortex-M4 和 Cortex-M4 微控制器内置内存控制器来支持外部 DRAM 芯片。
 
 [Amptek](http://www.semiconductorstore.com/Amptek/) SBC 在 NXP LPC Cortex-M3 和 -M4 芯片上运行 uClinux,以提供常用的功能类似 WiFi、蓝牙、USB 等众多接口。Arrow 的 [SF2+](http://linuxgizmos.com/iot-dev-kit-runs-uclinux-on-a-microsemi-cortex-m3-fpga-soc/) 物联网开发套件将 uClinux 运行于 SmartFusion2 模块计算机的 Emcraft 系统上,该模块计算机是 Microsemi 的 166MHz Cortex-M3/FPGA SmartFusion2 混合 SoC。
 
-[Emcraft](http://www.emcraft.com/) 销售基于 uClinux 的模块计算机,有 ST 和 NXP 的,也有 Microsemi 的 MCU,是 32 位 MCU 上积极推进 uClinux 的重要角色。日益频繁的 uClinux 开始了与 ARM 本身 [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/)的对抗,至少在高端的 MCU 工程中需要无线通信和更为复杂的操作规则。Mbed 和 modern 的支持者,开源的 RTOS 们,类似 FreeRTOS 认为 uClinux 需要对 RAM 的需求太高以至于难以压低 IoT 终端的价格然而 Emcraft 与其他 uCLinux 拥趸表示价格并没有如此夸张,而且扩展 Linux 的无线和接口也是相当值得的,即使只是在像 uClinux 这样的精简版上。
+[Emcraft](http://www.emcraft.com/) 销售基于 uClinux 的模块计算机,有 ST 和 NXP 的,也有 Microsemi 的 MCU,是 32 位 MCU 上积极推进 uClinux 的重要角色。日益频繁的 uClinux 开始了与 ARM 本身 [Mbed OS](http://linuxgizmos.com/arm-announces-mbed-os-for-iot-devices/)的对抗,至少在高端的 MCU 工程中需要无线通信和更为复杂的操作规则。Mbed 和 modern 的支持者,开源的 RTOS 们,类似 FreeRTOS 认为 uClinux 需要对 RAM 的需求太高以至于难以压低 IoT 终端的价格,然而 Emcraft 与其他 uCLinux 拥趸表示价格并没有如此夸张,而且扩展 Linux 的无线和接口也是相当值得的,即使只是在像 uClinux 这样的精简版上。
 
-当被问及对于这次 ST 发布的看法,Emcraft 的主任工程师 Vladimir Khusainov 表示:”ST决定将这款开发工具 移植至 Linux 对于 Emcraft 是个好消息,它使得 Linux 用户能轻易的在嵌入式 STM MCU 上展开工作。我们希望那些有机会熟悉 STM 设备,使用 ST 配置器和嵌入式库的用户可以对在目标机上使用嵌入式 Linux (以 uClinux 的形式)感兴趣。“
+当被问及对于这次 ST 发布的看法,Emcraft 的主任工程师 Vladimir Khusainov 表示:“ST决定将这款开发工具 移植至 Linux 对于 Emcraft 是个好消息,它使得 Linux 用户能轻易的在嵌入式 STM MCU 上展开工作。我们希望那些有机会熟悉 STM 设备,使用 ST 配置器和嵌入式库的用户可能对在目标机上使用嵌入式 Linux (以 uClinux 的形式)感兴趣。”
 
 最近关于 Cortex-M4 上运行 uClinux 的概述,可以查看去年 Jim Huang 与 Jeff Liaws 在嵌入式 Linux 大会上使用的[幻灯片](http://events.linuxfoundation.org/sites/events/files/slides/optimize-uclinux.pdf)。更多关于 Cortex-M 处理器可以查看这里过的 [AnandTech 总结](http://www.anandtech.com/show/8400/arms-cortex-m-even-smaller-and-lower-power-cpu-cores)。
 
@@ -47,7 +47,7 @@ via: http://www.linux.com/news/embedded-mobile/mobile-linux/884961-st-releases-f
 
 作者:[Arun Pyasi][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 26fe48fb1cac6d275d44abdc5a9a6e91dc663a97 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Wed, 16 Mar 2016 10:54:02 +0800
Subject: [PATCH 1163/1710] PUB:20151215 Linux Desktop Fun--Summon Swarms Of
 Penguins To Waddle About The Desktop

@geekpi
---
 ... Of Penguins To Waddle About The Desktop.md | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
 rename {translated/tech => published}/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md (74%)

diff --git a/translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/published/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md
similarity index 74%
rename from translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md
rename to published/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md
index 6c797816f5..4577cb10cb 100644
--- a/translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md	
+++ b/published/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md	
@@ -1,15 +1,15 @@
-Linux桌面趣闻:召唤一群企鹅在桌面上行走
+Linux/Unix 桌面趣事:召唤一群企鹅在桌面上行走
 ================================================================================
-XPenguins是一个在窗口播放可爱动物动画的程序。默认情况下,将会从屏幕上方掉落企鹅,沿着你的窗口顶部行走,在窗口变漂浮,滑板,和做其他类似的令人兴奋的事情。现在,你可以把这些可爱的小企鹅大军入侵别人的桌面了。
+XPenguins 是一个在窗口播放可爱动物动画的程序。默认情况下,将会从屏幕上方掉落企鹅,沿着你的窗口顶部行走,在窗口漂浮起来,踩上滑板,和做其他类似的有趣的事情。现在,你可以把这些可爱的小企鹅大军入侵别人的桌面了。
 
 ### 安装XPenguins ###
 
-打开终端(选择程序->附件->终端),接着输入下面的命令来安装XPenguins。首先,输入apt-get update通过请求配置的仓库刷新包的信息,接着安装需要的程序:
+打开终端(选择程序->附件->终端),接着输入下面的命令来安装 XPenguins。首先,输入 `apt-get update` 通过请求配置的仓库刷新包的信息,接着安装需要的程序:
 
     $ sudo apt-get update
     $ sudo apt-get install xpenguins
 
-### 我本地如何启动XPenguins? ###
+### 我本地如何启动 XPenguins? ###
 
 输入下面的命令:
 
@@ -19,15 +19,15 @@ XPenguins是一个在窗口播放可爱动物动画的程序。默认情况下
 
 ![An army of cute little penguins invading the screen](http://files.cyberciti.biz/uploads/tips/2011/07/Workspace-1_002_12_07_2011.png)
 
-一支可爱企鹅军队正在入侵屏幕。
+*一支可爱企鹅军队正在入侵屏幕。*
 
 ![Linux: Cute little penguins walking along the tops of your windows](http://files.cyberciti.biz/uploads/tips/2011/07/Workspace-1_001_12_07_2011.png)
 
-Linux:可爱的小企鹅沿着窗口的顶部行走。
+*可爱的小企鹅沿着窗口的顶部行走。*
 
 ![Xpenguins Screenshot](http://files.cyberciti.biz/uploads/tips/2011/07/xpenguins-screenshot.jpg)
 
-Xpenguins截图
+*Xpenguins 截图*
 
 移动窗口时小心点,小家伙们很容易被压坏。如果你发送中断程序(Ctrl-C),它们会爆炸。
 
@@ -83,7 +83,7 @@ Xpenguins截图
 
 - [XPenguins][1] 主页。
 - man penguins
-- 更多Linux/Unix桌面乐趣在[蒸汽火车][2]和[终端ASCII水族馆][3]。
+- 更多 Linux/Unix 桌面乐趣在[蒸汽火车][2]和[终端ASCII水族馆][3]。
 
 --------------------------------------------------------------------------------
 
@@ -91,7 +91,7 @@ via: http://www.cyberciti.biz/tips/linux-cute-little-xpenguins-walk-along-tops-o
 
 作者:Vivek Gite
 译者:[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 c79100483f50d15a24ff8c60d4779d4c9fea0600 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Wed, 16 Mar 2016 11:16:02 +0800
Subject: [PATCH 1164/1710] PUB:20151215 How to Install Light Table 0.8 in
 Ubuntu 14.04, 15.10

@zky001
---
 ... Light Table 0.8 in Ubuntu 14.04, 15.10.md | 53 +++++++++----------
 1 file changed, 25 insertions(+), 28 deletions(-)
 rename {translated/tech => published}/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md (56%)

diff --git a/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md b/published/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md
similarity index 56%
rename from translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md
rename to published/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md
index 3b3f72ac4c..915466448b 100644
--- a/translated/tech/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md	
+++ b/published/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md	
@@ -1,45 +1,42 @@
- 如何在 Ubuntu 14.04, 15.10 中安装Light Table 0.8
+ 如何在 Ubuntu 中安装 Light Table 0.8
 ================================================================================
 ![](http://ubuntuhandbook.org/wp-content/uploads/2014/11/LightTable-IDE-logo-icon.png)
 
-Light Table 在经过一年以上的开发,已经推出了新的稳定发行版本。现在它只为Linux提供64位的二进制包。
+Light Table 在经过一年以上的开发,已经推出了新的稳定发行版本。现在它只为 Linux 提供64位的二进制包。
+
 LightTable 0.8.0的改动:
 
-- 更改: 我们从 NW.js 中选择了 Electron 
-- 更改: LT’s 发行版本与自更新进程在github上面完全的公开
-- 增加: LT 可以由提供的脚本从源码在支持的不同平台上安装
-- 增加: LT’s 大部分的代码库将用npm依赖来安装以取代以forked库安装
-- 增加: 有效文档. 更多详情内容见下面
-- 修复: 版本号>= OSX 10.10的系统下工作的主要的可用性问题
-- 更改: 32位Linux不再提供官方包文件下载,从源码安装仍旧将被支持
-- 修复: ClojureScript eval 在ClojureScript的现代版本可以正常工作
+- 更改: 我们从 NW.js 切换到了 Electron 
+- 更改: Light Table 的发行与自更新进程完全地公开在github上
+- 增加: Light Table 可以用提供的脚本在各个支持的平台上从源码构建
+- 增加: Light Table 大部分的 node 代码库将通过 npm 依赖来安装,以取代以前采用分叉库的方式
+- 增加: 有效文档。更多详情内容见下面
+- 修复: 版本号 >= OSX 10.10的系统下的主要的可用性问题
+- 更改: 官方不再提供 32位 Linux 软件包下载,不过仍然支持从源码构建
+- 修复: ClojureScript eval 支持 ClojureScript 的现代版本
 - 参阅更多 [github.com/LightTable/LightTable/releases][1]
 
 ![LightTable 0.8.0](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-08.jpg)
 
-### 如何在Ubuntu中安Light Table 0.8.0: ###
+### 如何在 Ubuntu 中安装 Light Table 0.8.0 ###
 
-下面的步骤回指导你怎么样在Ubuntu下安装官方的二进制包,在目前Ubuntu发行版本都适用(**仅仅针对64位**)。
+下面的步骤会指导你怎么样在 Ubuntu 下安装官方的二进制包,在目前的 Ubuntu 发行版本中都适用(**仅仅针对64位**)。
 
 在开始之前,如果你安装了之前的版本请做好备份。
 
-**1.** 
-从以下链接下载LightTable Linux下的二进制文件:
+**1.** 从以下链接下载 LightTable Linux 下的二进制文件:
 
 - [lighttable-0.8.0-linux.tar.gz][2]
 
-**2.** 
-从dash或是应用启动器,或者是Ctrl+Alt+T快捷键打开终端,并且在输入以下命令后敲击回车键:
+**2.** 从 dash 或是应用启动器,或者是 Ctrl+Alt+T 快捷键打开终端,并且在输入以下命令后敲击回车键:
 
     gksudo file-roller ~/Downloads/lighttable-0.8.0-linux.tar.gz
 
 ![open-via-fileroller](http://ubuntuhandbook.org/wp-content/uploads/2015/12/open-via-fileroller.jpg)
 
-如果命令不工作的话从Ubuntu软件中心安装`gksu`。
-
-**3.** 
-之前的命令使用了root用户权限通过档案管理器打开了下载好的存档。
+如果命令不工作的话从 Ubuntu 软件中心安装`gksu`。
 
+**3.** 之前的命令使用了 root 用户权限通过档案管理器打开了下载好的存档。
 
 打开它后,请做以下步骤:
 
@@ -48,17 +45,17 @@ LightTable 0.8.0的改动:
 
 ![extract-lighttable](http://ubuntuhandbook.org/wp-content/uploads/2015/12/extract-lighttable.jpg)
 
-最终你应该安装好了LightTable,可以在/opt/ 目录下查看:
+最终你应该安装好了 LightTable,可以在 /opt/ 目录下查看:
 
 ![lighttable-in-opt](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-in-opt.jpg)
 
-**4.** 创建一个启动器使你可以从dash工具或是应用启动器打开LightTable。
+**4.** 创建一个启动器使你可以从 dash 工具或是应用启动器打开 LightTable。
 
-打开终端,运行以下命令来创建与编辑一个LightTable的启动文件:
+打开终端,运行以下命令来创建与编辑一个 LightTable 的启动文件:
 
     gksudo gedit /usr/share/applications/lighttable.desktop
 
-通过Gedit文本编辑器打开文件后, 粘贴下面的内容并保存:
+通过 Gedit 文本编辑器打开文件后,粘贴下面的内容并保存:
 
     [Desktop Entry]
     Version=1.0
@@ -81,7 +78,7 @@ LightTable 0.8.0的改动:
     Exec=/opt/LightTable/LightTable -n
     OnlyShowIn=Unity;
     
-        [Desktop Action Document]
+    [Desktop Action Document]
     Name=New File
     Exec=/opt/LightTable/LightTable --command new_file
     OnlyShowIn=Unity;
@@ -90,15 +87,15 @@ LightTable 0.8.0的改动:
 
 ![lighttable-launcher](http://ubuntuhandbook.org/wp-content/uploads/2015/12/lighttable-launcher.jpg)
 
-最后,从dash工具或者是应用启动器打开IDE,好好享受它吧!
+最后,从 dash 工具或者是应用启动器打开 IDE,好好享受它吧!
 
 --------------------------------------------------------------------------------
 
 via: http://ubuntuhandbook.org/index.php/2015/12/install-light-table-0-8-ubuntu-14-04/
 
 作者:[Ji m][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
+译者:[zky001](https://github.com/zky001)
+校对:[wxy](https://github.com/wxy)
 
 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
 

From f66e44d3ec3a016235e5e674ecd252c476dfdf9f Mon Sep 17 00:00:00 2001
From: wxy 
Date: Wed, 16 Mar 2016 11:42:10 +0800
Subject: [PATCH 1165/1710] PUB:20160218 Mozilla contributor creates diabetes
 project for the masses

@ynmlml
---
 ...creates diabetes project for the masses.md | 38 ++++++++++++++
 ...creates diabetes project for the masses.md | 51 -------------------
 2 files changed, 38 insertions(+), 51 deletions(-)
 create mode 100644 published/20160218 Mozilla contributor creates diabetes project for the masses.md
 delete mode 100644 translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md

diff --git a/published/20160218 Mozilla contributor creates diabetes project for the masses.md b/published/20160218 Mozilla contributor creates diabetes project for the masses.md
new file mode 100644
index 0000000000..abaf2fe9d6
--- /dev/null
+++ b/published/20160218 Mozilla contributor creates diabetes project for the masses.md	
@@ -0,0 +1,38 @@
+Mozilla 贡献者为大众创建糖尿病项目
+================================================================
+
+![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi)
+
+
+我的开源生涯从我还是一名高中生开始,我总想着自己能成为一名黑客,没有什么恶意的,只是喜欢钻研代码和硬件那种。我第一次接触开源是2001年,我安装了我的第一个Linux发行版[Lindows](https://en.wikipedia.org/wiki/Linspire)。当然,我也是[Mozilla Firefox](https://www.mozilla.org/en-US/firefox/new/?utm_source=firefox-com&utm_medium=referral)的早期用户。
+
+由于我很早使用Linux,我用的第一个版本是 Lindows 1.0.4(如果我没记错的话),我就立即爱上了它。我没在Lindows上呆太久,而是活跃于多个发行版([Debian](https://www.debian.org/), 
+[Puppy Linux](http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm), [SUSE](https://www.suse.com/), 
+[Slackware](http://www.slackware.com/), [Ubuntu](http://ubuntu.com/)),多年来我一直每天使用着开源软件,从青少年时候直到我成年。
+
+最后,我坚持使用Ubuntu。大概是在Hardy Heron(LCTT 译注:Ubuntu8.04 LTS)发布时候,我开始第一次为Ubuntu做些贡献,在IRC频道和当地社区帮助那些需要帮助的用户。我是通过Ubuntu认识开源的,它在我心里总有着特殊的意义。Ubuntu背后的社区的是非常多样化的、热情的、友好的,每个人都做些共享,是他们共同的目标也是个人目标,这成为他们为开源贡献的动力。
+
+在为Ubuntu贡献一段时间后,我开始了为一些上游项目作贡献,比如Debian、[GNOME](https://www.gnome.org/)、 [Ganeti](https://code.google.com/p/ganeti/),还有许多其他的开源项目。在过去的几年里,我为超过40个开源项目贡献过,有些小的,也有很大的。
+
+在Ubuntu项目方向上有些变化之后,我最终觉得,这不仅对于我是一个尝试新东西的机遇,而且也是我给一些新东西贡献的时候。所以我在2009年参与了Mozilla项目,在IRC帮忙,最终通过参与[Mozilla WebFWD program](https://webfwd.org/),成为一名团队成员,然后是[Mozilla Reps Program](https://reps.mozilla.org/),[Mozilla DevRel Program](https://wiki.mozilla.org/Devrel),刚过两年时间,我成为了火狐社区的发布经理,负责监督Firefox Nightly和Firefox ESR的发布。相比其他开源项目,在为Mozilla贡献中会获得更多有益的经验。在所有我参与过的开源社区中,Mozilla是最不同的,最大的也是最友好的。
+
+这些年来,关于开源我觉得,我越来越遵循自由软件价值观、捍卫隐私和许可协议合规,以及在开放的氛围下工作。我相信这三个主题对于开源来说是非常重要的,虽然许多人并没在意到提倡它们是很重要的。
+
+今天在这,我已不再是别人的开源项目的全职贡献者。最近我被诊断出患有糖尿病,我看到了开源软件中健康软件不是很丰富这一缺口。确实,它不像其它开源软件应用如Linux发行版或浏览器那样活跃。
+
+我最近创立了自己的开源项目[Glucosio](http://www.glucosio.org/),带给人们糖尿病管理和研究的开源软件。经过几年来对开源项目的贡献,和见识过的多种组织结构,使得我作为项目领导能够得心应手。我对于Glucosio的未来很兴奋,但最重要的是未来的开源将在医疗健康领域发展的如何。
+
+医疗保健软件的创新具有很大潜力,我想我们很快就会看到用于改善医疗卫生保健的开源新方案。
+
+
+------------------------------------------------------------------------------
+
+via: https://opensource.com/life/15/11/my-open-source-story-ben-kerensa
+
+作者:[Benjamin Kerensa][a]
+译者:[ynmlml](https://github.com/ynmll)
+校对:[wxy](https://github.com/wxy)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://opensource.com/users/bkerensa
diff --git a/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md b/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md
deleted file mode 100644
index de61ff1d7b..0000000000
--- a/translated/tech/20160218 Mozilla contributor creates diabetes project for the masses.md	
+++ /dev/null
@@ -1,51 +0,0 @@
-Mozilla贡献者为群众创建糖尿病项目
-================================================================
-
-![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi)
-
-
-我的开源生涯从我还是一名高中生开始,我总想着自己能成为一名黑客,没有什么恶意的,只是喜欢钻研代码和硬件那种。我第一次接触开源是2001年,
-我安装了我的第一个Linux发行版[Lindows](https://en.wikipedia.org/wiki/Linspire)。当然,我也是[Mozilla Firefox](https://www.mozilla.org/en-US/firefox/new/?utm_source=firefox-com&utm_medium=referral)的早期用户。
-
-由于我很早使用Linux,我用的第一个版本是1.0.4(如果我没记错的话),我就立即爱上了它。我没在Lindows上呆太久,
-而是活跃于多个发行版([Debian](https://www.debian.org/), 
-[Puppy Linux](http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm), [SUSE](https://www.suse.com/), 
-[Slackware](http://www.slackware.com/), [Ubuntu](http://ubuntu.com/)),多年来我一直每天使用着开源软件,从青少年时候直到我成年。
-
-最后,我坚持使用Ubuntu。大概是在Hardy Heron(译者注:Ubuntu8.04 LTS)发布时候,我开始第一次为Ubuntu做些贡献,在IRC频道和当地社区
-帮助那些需要帮助的用户。我是通过Ubuntu认识开源的,它在我心里总有着特殊的意义。Ubuntu背后的社区的是非常多样化的,热情的,友好的,
-每个人都做些共享,是他们共同的目标也是个人目标,这成为他们为开源贡献的动力。
-
-在为Ubuntu贡献一段时间后,我开始了为一些上游项目作贡献,比如Debian, [GNOME](https://www.gnome.org/), 
-[Ganeti](https://code.google.com/p/ganeti/),还有许多其他的开源项目。
-在过去的几年里,我为超过40个开源项目贡献过,有些小的,也有很大的。
-
-在Ubuntu项目方向上有些变化之后,我最终决定不仅对于我是时候该尝试新东西,而且我也想贡献一些新的东西。所以我在2009年参与Mozilla,
-在IRC帮忙,最终通过参与[Mozilla WebFWD program](https://webfwd.org/),成为一名团队成员,接着[Mozilla Reps Program](https://reps.mozilla.org/),
-[Mozilla DevRel Program](https://wiki.mozilla.org/Devrel),刚过两年时间,我成为了火狐社区的发布经理,负责监督Firefox Nightly
-和Firefox ESR的发布。比为其他开源项目,在为Mozilla贡献中会获得更多有益的经验。在所有我参与过的开源社区中,Mozilla是最不同的
-,最大的也是最友好的。
-
-这些年来,关于开源我觉得,免费软件,更具安全的隐私和尊重许可,以及公开的工作,我越来越与这样的价值观相一致。我相信这三个主题
-对于开源来说是非常重要的,虽然许多人并没在意到提倡它们是很重要的。
-
-今天在这,我已不再是全职的他人开源项目的贡献者。最近我被诊断出患有糖尿病,我看到了开源软件中健康软件不是很丰富这一缺口。确实,
-它不像其它开源软件应用如Linux发行版或浏览器那样活跃。
-
-我最近创立了自己的开源项目[Glucosio](http://www.glucosio.org/),带给人们糖尿病管理和研究的开源软件。经过几年来对开源项目的贡献,
-和见过的多种架构,使得我作为项目领导能够得心应手。我对于Glucosio的未来很兴奋,但最重要的是未来的开源将在医疗健康领域发展的如何。
-
-医疗保健软件的创新具有很大潜力,我想我们很快就会看到用于改善医疗卫生保健的开源新方案。
-
-
-------------------------------------------------------------------------------
-
-via: https://opensource.com/life/15/11/my-open-source-story-ben-kerensa
-
-作者:[opensource.com][a]
-译者:[ynmlml](https://github.com/ynmll)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:opensource.com

From 4b8508de7adefa690bd498264f865508d7c8b649 Mon Sep 17 00:00:00 2001
From: VicYu 
Date: Wed, 16 Mar 2016 16:39:41 +0800
Subject: [PATCH 1166/1710] Translating

---
 .../tech/20160226 How to use Python to hack your Eclipse IDE.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md b/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md
index 770c6db479..9f1b1ed359 100644
--- a/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md	
+++ b/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md	
@@ -1,3 +1,5 @@
+	Vic020
+
 How to use Python to hack your Eclipse IDE
 ==============================================
 

From b54dcc381cb10e42347e2e1a93c24297b889a3bd Mon Sep 17 00:00:00 2001
From: wxy 
Date: Wed, 16 Mar 2016 20:39:09 +0800
Subject: [PATCH 1167/1710] PUB:20151027 How to Install Ghost with Nginx on
 FreeBSD 10.2

@ictlyh
---
 ...027 How to Install Ghost with Nginx on FreeBSD 10.2.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename {translated/tech => published}/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md (94%)

diff --git a/translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md b/published/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md
similarity index 94%
rename from translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md
rename to published/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md
index f8d78c88f9..c961d47c8a 100644
--- a/translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md	
+++ b/published/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md	
@@ -1,6 +1,6 @@
 如何在 FreeBSD 10.2 上安装使用 Nginx 的 Ghost
 ================================================================================
-Node.js 是用于开发服务器端应用程序的开源运行时环境。Node.js 应用使用 JavaScript 编写,能在任何有 Node.js 运行时的服务器上运行。它跨平台支持 Linux、Windows、OSX、IBM AIX,也包括 FreeBSD。Node.js 是 Ryan Dahl 以及在 Joyent 工作的其他开发者于 2009 年创建的。它的设计目标就是构建可扩展的网络应用程序。
+Node.js 是用于开发服务器端应用程序的开源的运行时环境。Node.js 应用使用 JavaScript 编写,能在任何有 Node.js 运行时的服务器上运行。它跨平台支持 Linux、Windows、OSX、IBM AIX,也包括 FreeBSD。Node.js 是 Ryan Dahl 以及在 Joyent 工作的其他开发者于 2009 年创建的。它的设计目标就是构建可扩展的网络应用程序。
 
 Ghost 是使用 Node.js 编写的博客平台。它不仅开源,而且有很漂亮的界面设计、对用户友好并且免费。它允许你快速地在网络上发布内容,或者创建你的混合网站。
 
@@ -97,7 +97,7 @@ Ghost 是使用 Node.js 编写的博客平台。它不仅开源,而且有很
 
     npm start --production
 
-通过访问服务器 ip 和 2368 号端口验证。
+通过访问服务器 ip 和 2368 号端口验证一下。
 
 ![Ghost 安装完成](http://blog.linoxide.com/wp-content/uploads/2015/10/Ghost-Installed.png)
 
@@ -189,7 +189,7 @@ Ghost 是使用 Node.js 编写的博客平台。它不仅开源,而且有很
 
 ### 第五步 - 为 Ghost 安装和配置 Nginx ###
 
-默认情况下,ghost 会以单机模式运行,你可以不用 Nginx、apache 或 IIS web 服务器直接运行它。但在这篇指南中我们会安装和配置 nginx 和 ghost 一起使用。
+默认情况下,ghost 会以独立模式运行,你可以不用 Nginx、apache 或 IIS web 服务器直接运行它。但在这篇指南中我们会安装和配置 nginx 和 ghost 一起使用。
 
 用 pkg 命令从 freebsd 库中安装 nginx:
 
@@ -289,7 +289,7 @@ 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)
+校对:[wxy](https://github.com/wxy)
 
 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
 

From b81f27ce1f9d56bf8605ac7b1e384efcd434e889 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Wed, 16 Mar 2016 21:19:02 +0800
Subject: [PATCH 1168/1710] PUB:20151105 Linux FAQs with Answers--How to
 install Ubuntu desktop behind a proxy

@strugglingyouth
---
 ... Answers--How to install Ubuntu desktop behind a proxy.md | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
 rename {translated/tech => published}/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md (97%)

diff --git a/translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md
similarity index 97%
rename from translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md
rename to published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md
index b7c86609bd..0a215a066e 100644
--- a/translated/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md	
+++ b/published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md	
@@ -1,5 +1,4 @@
-
-Linux 有问必答 - 如何通过代理服务器安装 Ubuntu 桌面
+Linux 有问必答 - 如何通过代理服务器安装 Ubuntu 桌面版
 ================================================================================
 > **问题**: 我的电脑通过 HTTP 代理连接到公司网络。当我尝试从 CD-ROM 在计算机上安装 Ubuntu 桌面时,在检索文件时安装程序会被挂起,检索则不会完成,这可能是由于代理造成的。然而问题是,Ubuntu 的安装程序从不要求我在安装过程中配置代理。那我该怎么使用代理来安装 Ubuntu 桌面?
 
@@ -56,7 +55,7 @@ via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.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/) 荣誉推出
 

From c7fe3d5b930cebde86d79b5afe603ad451b0a988 Mon Sep 17 00:00:00 2001
From: XIAOYU <1136299502@qq.com>
Date: Thu, 17 Mar 2016 12:10:50 +0800
Subject: [PATCH 1169/1710] translating by xiaoyu33

translating by xiaoyu33
---
 ...1208 10 tools for visual effects in Linux with Kdenlive.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md b/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md
index bf2ba1ff25..690b2c8186 100644
--- a/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md	
+++ b/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md	
@@ -1,3 +1,5 @@
+translating by xiaoyu33
+
 10 tools for visual effects in Linux with Kdenlive
 ================================================================================
 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life-uploads/kdenlivetoolssummary.png)
@@ -152,4 +154,4 @@ via: https://opensource.com/life/15/12/10-kdenlive-tools
 [3]:http://frei0r.dyne.org/
 [4]:http://www.kodak.com/global/en/professional/products/films/bw/triX2.jhtml
 [5]:https://en.wikipedia.org/wiki/Fear_and_Loathing_in_Las_Vegas_(film)
-[6]:https://en.wikipedia.org/wiki/Dead_Island
\ No newline at end of file
+[6]:https://en.wikipedia.org/wiki/Dead_Island

From cd2f210f4ea0de2027957bd75020c760b0813dd5 Mon Sep 17 00:00:00 2001
From: martin qi 
Date: Thu, 17 Mar 2016 21:53:14 +0800
Subject: [PATCH 1170/1710] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...0317 What we learned in Seoul with AlphaGo | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 sources/news/20160317 What we learned in Seoul with AlphaGo

diff --git a/sources/news/20160317 What we learned in Seoul with AlphaGo b/sources/news/20160317 What we learned in Seoul with AlphaGo
new file mode 100644
index 0000000000..8eb12005d3
--- /dev/null
+++ b/sources/news/20160317 What we learned in Seoul with AlphaGo	
@@ -0,0 +1,51 @@
+martin
+
+What we learned in Seoul with AlphaGo
+================================================================================
+Go isn't just a game—it's a living, breathing culture of players, analysts, fans, and legends. Over the last 10 days in Seoul, South Korea, we've been lucky enough to witness some of that incredible excitement firsthand. We've also had the chance to see something that's never happened before: [DeepMind's][1] AlphaGo took on and defeated legendary Go player, Lee Sedol (9-dan professional with 18 world titles), marking a major milestone for artificial intelligence.
+
+![Pedestrians checking in on the AlphaGo vs. Lee Sedol Go match on the streets of Seoul (March 13)](https://1.bp.blogspot.com/-vfgUcjyMOmM/Vumk5gXD98I/AAAAAAAASDI/frbYidb1u6gTKGcvFOf8iQVsr9PLoRlBQ/s1600/Press%2BCenter%2BOutdoor%2BScreen%2B2.jpg)
+
+Go may be one of the oldest games in existence, but the attention to our five-game tournament exceeded even our wildest imaginations. Searches for Go rules and Go boards spiked in the U.S. In China, tens of millions watched live streams of the matches, and the “Man vs. Machine Go Showdown” hashtag saw 200 million pageviews on Sina Weibo. Sales of Go boards even [surged][2] in Korea.
+
+Our public test of AlphaGo, however, was about more than winning at Go. We founded DeepMind in 2010 to create general-purpose artificial intelligence (AI) that can learn on its own—and, eventually, be used as a tool to help society solve some of its biggest and most pressing problems, from climate change to disease diagnosis.
+
+Like many researchers before us, we've been developing and testing our algorithms through games. We first revealed [AlphaGo][3] in January—the first AI program that could beat a professional player at the most complex board game mankind has devised, using [deep learning][4] and [reinforcement learning][5]. The [ultimate challenge][6] was for AlphaGo to take on the best Go player of the past decade—Lee Sedol.
+
+To everyone's surprise, including ours, AlphaGo won four of the five games. Commentators noted that AlphaGo played many unprecedented, creative, and even [“beautiful”][7] moves. Based on our data, AlphaGo's bold [move 37][8] in Game 2 had a 1 in 10,000 chance of being played by a human. Lee countered with innovative moves of his own, such as his [move 78][9] against AlphaGo in Game 4—again, a 1 in 10,000 chance of being played—which ultimately resulted in a win.
+
+The final score was 4-1. We're contributing the $1 million in prize money to organizations that support science, technology, engineering and math (STEM) education and Go, as well as UNICEF.
+
+We've learned two important things from this experience. First, this test bodes well for AI's potential in solving other problems. AlphaGo has the ability to look “globally” across a board—and find solutions that humans either have been trained not to play or would not consider. This has huge potential for using AlphaGo-like technology to find solutions that humans don't necessarily see in other areas. Second, while the match has been widely billed as "man vs. machine," AlphaGo is really a human achievement. Lee Sedol and the AlphaGo team both pushed each other toward new ideas, opportunities and solutions—and in the long run that's something we all stand to benefit from.
+
+But as they say about Go in Korean: “Don't be arrogant when you win or you'll lose your luck.” This is just one small, albeit significant, step along the way to making machines smart. We've demonstrated that our cutting edge deep reinforcement learning techniques can be used to make strong Go and [Atari][10] players. Deep neural networks are already used at Google for specific tasks—like [image recognition][11], [speech recognition][12], and [Search ranking][13]. However, we're still a long way from a machine that can learn to flexibly perform the full range of intellectual tasks a human can—the hallmark of true [artificial general intelligence][14].
+
+![Demis and Lee Sedol hold up the signed Go board from the Google DeepMind Challenge Match](https://4.bp.blogspot.com/-LkxNvsR-e1I/Vumk5gmProI/AAAAAAAASDM/J55Y2psqzOwWZ3kau2Pgz6xmazo7XDj_Q/s1600/A26U6150.jpg)
+
+With this tournament, we wanted to test the limits of AlphaGo. The genius of Lee Sedol did that brilliantly—and we'll spend the next few weeks studying the games he and AlphaGo played in detail. And because the machine learning methods we've used in AlphaGo are general purpose, we hope to apply some of these techniques to other challenges in the future. Game on!
+
+--------------------------------------------------------------------------------
+
+via: https://googleblog.blogspot.com/2016/03/what-we-learned-in-seoul-with-alphago.html
+
+作者:[Demis Hassabis][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://demishassabis.com/
+[1]:https://deepmind.com/
+[2]:http://www.hankookilbo.com/m/v/3e7deaa26a834f76929a1689ecd388ea
+[3]:https://googleblog.blogspot.com/2016/01/alphago-machine-learning-game-go.html
+[4]:https://en.wikipedia.org/wiki/Deep_learning
+[5]:https://en.wikipedia.org/wiki/Reinforcement_learning
+[6]:https://deepmind.com/alpha-go.html
+[7]:http://www.wired.com/2016/03/sadness-beauty-watching-googles-ai-play-go/
+[8]:https://youtu.be/l-GsfyVCBu0?t=1h17m50s
+[9]:https://youtu.be/yCALyQRN3hw?t=3h10m25s
+[10]:http://googleresearch.blogspot.sg/2015/02/from-pixels-to-actions-human-level.html
+[11]:http://googleresearch.blogspot.sg/2013/06/improving-photo-search-step-across.html
+[12]:http://googleresearch.blogspot.sg/2015/08/the-neural-networks-behind-google-voice.html
+[13]:http://www.bloomberg.com/news/articles/2015-10-26/google-turning-its-lucrative-web-search-over-to-ai-machines
+[14]:https://en.wikipedia.org/wiki/Artificial_general_intelligence

From f2a488cce957410c1b7d8dc0a06a1e1b58cef61f Mon Sep 17 00:00:00 2001
From: martin qi 
Date: Thu, 17 Mar 2016 21:55:25 +0800
Subject: [PATCH 1171/1710] Rename 20160317 What we learned in Seoul with
 AlphaGo to 20160317 What we learned in Seoul with AlphaGo.md

---
 ... AlphaGo => 20160317 What we learned in Seoul with AlphaGo.md} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename sources/news/{20160317 What we learned in Seoul with AlphaGo => 20160317 What we learned in Seoul with AlphaGo.md} (100%)

diff --git a/sources/news/20160317 What we learned in Seoul with AlphaGo b/sources/news/20160317 What we learned in Seoul with AlphaGo.md
similarity index 100%
rename from sources/news/20160317 What we learned in Seoul with AlphaGo
rename to sources/news/20160317 What we learned in Seoul with AlphaGo.md

From 5af1e26b348989cfe91d46be5fb42c49440a64b5 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Thu, 17 Mar 2016 22:50:03 +0800
Subject: [PATCH 1172/1710] PUB:20151104 Optimize Web Delivery with these Open
 Source Tools
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

@fw8899 用心了~
---
 ...b Delivery with these Open Source Tools.md | 204 ++++++++++++++++++
 ...b Delivery with these Open Source Tools.md | 195 -----------------
 2 files changed, 204 insertions(+), 195 deletions(-)
 create mode 100644 published/20151104 Optimize Web Delivery with these Open Source Tools.md
 delete mode 100644 translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md

diff --git a/published/20151104 Optimize Web Delivery with these Open Source Tools.md b/published/20151104 Optimize Web Delivery with these Open Source Tools.md
new file mode 100644
index 0000000000..e2aed5c634
--- /dev/null
+++ b/published/20151104 Optimize Web Delivery with these Open Source Tools.md	
@@ -0,0 +1,204 @@
+五大开源 Web 代理软件横向比较:Squid、Privoxy、Varnish、Polipo、Tinyproxy
+================================================================================
+Web 代理软件转发 HTTP 请求时并不会改变数据流量。它们可以配置成透明代理,而无需客户端配置。它们还可以作为反向代理放在网站的前端;这样缓存服务器可以为一台或多台 web 服务器提供无限量的用户服务。
+
+网站代理功能多样,有着宽泛的用途:从缓存页面、DNS 和其他查询,到加速 web 服务器响应、降低带宽消耗。代理软件广泛用于大型高访问量的网站,比如纽约时报、卫报, 以及社交媒体网站如 Twitter、Facebook 和 Wikipedia。
+
+页面缓存已经成为优化单位时间内所能吞吐的数据量的至关重要的机制。好的 Web 缓存还能降低延迟,尽可能快地响应页面,让终端用户不至于因等待内容的时间过久而失去耐心。它们还能将频繁访问的内容缓存起来以节省带宽。如果你需要降低服务器负载并改善网站内容响应速度,那缓存软件能带来的好处就绝对值得探索一番。
+
+为深入探查 Linux 下可用的相关软件的质量,我列出了下边5个优秀的开源 web 代理工具。它们中有些功能完备强大,也有几个只需很低的资源就能运行。
+
+### Squid ###
+
+Squid 是一个高性能、开源的代理缓存服务器和 Web 缓存进程,支持 FTP、Internet Gopher、HTTPS 和 SSL 等多种协议。它通过一个非阻塞的、I/O 事件驱动的单一进程处理所有的 IPV4 或 IPV6 协议请求。
+
+Squid 由一个主服务程序 squid,和 DNS 查询程序 dnsserver,另外还有一些可选的请求重写、执行认证程序组件,及一些管理和客户端工具构成。
+
+Squid 提供了丰富的访问控制、认证和日志环境, 用于开发 web 代理和内容服务网站应用。
+
+其特性包括:
+
+- Web 代理:
+    - 通过缓存来降低访问时间和带宽使用
+    - 将元数据和访问特别频繁的对象缓存到内存中
+    - 缓存 DNS 查询
+    - 支持非阻塞的 DNS 查询
+    - 实现了失败请求的未果缓存
+- Squid 缓存可架设为层次结构,或网状结构以节省额外的带宽
+- 通过广泛的访问控制来执行网站访问策略
+- 隐匿请求,如禁用或修改客户端 HTTP 请求头特定属性
+- 反向代理
+- 媒体范围(media-range)限制
+- 支持 SSL
+- 支持 IPv6
+- 错误页面的本地化 - Squid 可以根据访问者的语言选项对每个请求展示本地化的错误页面
+- 连接固定(Connection Pinning )(用于 NTLM Auth Passthrough) - 一种允许 Web 服务器通过 Web 代理使用Microsoft NTLM 安全认证替代 HTTP 标准认证的方案
+- 支持服务质量 (QoS, Quality of Service) 流
+    - 选择一个 TOS/Diffserv 值来标记本地命中
+    - 选择一个 TOS/Diffserv 值来标记对端命中
+    - 选择性地仅标记同级或上级请求
+    - 允许任意发往客户端的 HTTP 响应保持由远程服务器处响应的 TOS 值
+    - 对收到的远程服务器的 TOS 值,在复制之前对指定位进行掩码操作,再发送到客户端
+- SSL Bump (用于 HTTPS 过滤和适配) - Squid-in-the-middle,在 CONNECT 方式的 SSL 隧道中,用配置化的客户端和服务器端证书,对流量进行解密和加密
+- 支持适配模块
+- ICAP 旁路和重试增强 - 通过完全的旁路和动态链式路由扩展 ICAP,来处理多多个适应性服务。
+- 支持 ICY 流式协议 - 俗称 SHOUTcast 多媒体流
+- 动态 SSL 证书生成
+- 支持 ICAP 协议 (Internet Content Adaptation Protocol)
+- 完整的请求日志记录
+- 匿名连接
+
+--
+- 网站: [www.squid-cache.org][1]
+- 开发: 美国国家应用网络研究实验室(NLANR)和网络志愿者
+- 授权: GNU GPL v2
+- 版本号: 4.0.1
+
+### Privoxy ###
+
+Privoxy (Privacy Enhancing Proxy) 是一个非缓存类 Web 代理软件,它自带的高级过滤功能可以用来增强隐私保护、修改页面内容和 HTTP 头部信息、访问控制,以及去除广告和其它招人反感的互联网垃圾。Privoxy 的配置非常灵活,能充分定制已满足各种各样的需求和偏好。它支持单机和多用户网络两种模式。
+
+Privoxy 使用 action 规则来处理浏览器和远程站点间的数据流。
+
+其特性包括: 
+
+- 高度配置化——可以完全定制你的配置
+- 广告拦截
+- Cookie 管理
+- 支持“Connection: keep-alive”。可以无视客户端配置而保持外发的持久连接
+- 支持 IPv6
+- 标签化(Tagging),允许按照客户端和服务器的请求头进行处理
+- 作为拦截(intercepting)代理器运行
+- 巧妙的动作(action)和过滤机制用来处理服务器和客户端的 HTTP 头部
+- 可以与其他代理软件链式使用
+- 整合了基于浏览器的配置和控制工具,能在线跟踪规则和过滤效果,可远程开关
+- 页面过滤(文本替换、根据尺寸大小删除广告栏, 隐藏的“web-bugs”元素和 HTML 容错等)
+- 模块化的配置使得标准配置和用户配置可以存放于不同文件中,这样安装更新就不会覆盖用户的个性化设置
+- 配置文件支持 Perl 兼容的正则表达式,以及更为精妙和灵活的配置语法
+- GIF 去动画
+- 旁路处理大量点击跟踪(click-tracking)脚本(避免脚本重定向)
+- 大多数代理生成的页面(例如 "访问受限" 页面)可由用户自定义HTML模板
+- 自动监测配置文件的修改并重新读取
+- 大多数功能可以基于每个站点或每个 URL 位置来进行控制
+
+--
+
+- 网站: [www.privoxy.org][2]
+- 开发: Fabian Keil(开发领导者), David Schmidt, 和众多其他贡献者
+- 授权: GNU GPL v2
+- 版本号: 3.4.2
+
+### Varnish Cache ###
+
+Varnish Cache 是一个为性能和灵活性而生的 web 加速器。它新颖的架构设计能带来显著的性能提升。根据你的架构,通常情况下它能加速响应速度300-1000倍。Varnish 将页面存储到内存,这样 web 服务器就无需重复地创建相同的页面,只需要在页面发生变化后重新生成。页面内容直接从内存中访问,当然比其他方式更快。
+
+此外 Varnish 能大大提升响应 web 页面的速度,用在任何应用服务器上都能使网站访问速度大幅度地提升。
+
+按经验,Varnish Cache 比较经济的配置是1-16GB内存+ SSD 固态硬盘。
+
+其特性包括: 
+
+- 新颖的设计
+- VCL - 非常灵活的配置语言。VCL 配置会转换成 C,然后编译、加载、运行,灵活且高效
+- 能使用 round-robin 轮询和随机分发两种方式来负载均衡,两种方式下后端服务器都可以设置权重
+- 基于 DNS、随机、散列和客户端 IP 的分发器(Director)
+- 多台后端主机间的负载均衡
+- 支持 Edge Side Includes,包括拼装压缩后的 ESI 片段
+- 重度多线程并发
+- URL 重写
+- 单 Varnish 能够缓存多个虚拟主机
+- 日志数据存储在共享内存中
+- 基本的后端服务器健康检查
+- 优雅地处理后端服务器“挂掉”
+- 命令行界面的管理控制台
+- 使用内联 C 语言来扩展 Varnish
+- 可以与 Apache 用在相同的系统上
+- 单个系统可运行多个 Varnish
+- 支持 HAProxy 代理协议。该协议在每个收到的 TCP 请求——例如 SSL 终止过程中——附加一小段 http 头信息,以记录客户端的真实地址
+- 冷热 VCL 状态
+- 可以用名为 VMOD 的 Varnish 模块来提供插件扩展
+- 通过 VMOD 定义后端主机
+- Gzip 压缩及解压
+- HTTP 流的通过和获取
+- 神圣模式和优雅模式。用 Varnish 作为负载均衡器,神圣模式下可以将不稳定的后端服务器在一段时间内打入黑名单,阻止它们继续提供流量服务。优雅模式允许 Varnish 在获取不到后端服务器状态良好的响应时,提供已过期版本的页面或其它内容。
+- 实验性支持持久化存储,无需 LRU 缓存淘汰
+
+--
+
+- 网站: [www.varnish-cache.org][3]
+- 开发: Varnish Software
+- 授权: FreeBSD
+- 版本号: 4.1.0
+
+### Polipo ###
+
+Polipo 是一个开源的 HTTP 缓存代理,只需要非常低的资源开销。
+
+它监听来自浏览器的 web 页面请求,转发到 web 服务器,然后将服务器的响应转发到浏览器。在此过程中,它能优化和整形网络流量。从本质来讲 Polipo 与 WWWOFFLE 很相似,但其实现技术更接近于 Squid。
+
+Polipo 最开始的目标是作为一个兼容 HTTP/1.1 的代理,理论它能在任何兼容 HTTP/1.1 或更早的 HTTP/1.0 的站点上运行。
+
+其特性包括:
+
+- HTTP 1.1、IPv4 & IPv6、流量过滤和隐私保护增强
+- 如确认远程服务器支持的话,则无论收到的请求是管道处理过的还是在多个连接上同时收到的,都使用 HTTP/1.1 管道(pipelining)
+- 下载被中断时缓存起始部分,当需要续传时用区间(Range)请求来完成下载
+- 将 HTTP/1.0 的客户端请求升级为 HTTP/1.1,然后按照客户端支持的级别进行升级或降级后回复
+- 全面支持 IPv6 (作用域(链路本地)地址除外)
+- 作为 IPv4 和 IPv6 网络的网桥
+- 内容过滤
+- 能使用 Poor Man 多路复用技术(Poor Man's Multiplexing)降低延迟
+- 支持 SOCKS 4 和 SOCKS 5 协议
+- HTTPS 代理
+- 扮演透明代理的角色
+- 可以与 Privoxy 或 tor 一起运行
+
+--
+
+- 网站: [www.pps.univ-paris-diderot.fr/~jch/software/polipo/][4]
+- 开发: Juliusz Chroboczek, Christopher Davis
+- 授权: MIT License
+- 版本号: 1.1.1
+
+### Tinyproxy ###
+
+Tinyproxy 是一个轻量级的开源 web 代理守护进程,其设计目标是快而小。它适用于需要完整 HTTP 代理特性,但系统资源又不足以运行大型代理的场景,比如嵌入式部署。
+
+Tinyproxy 对小规模网络非常有用,这样的场合下大型代理会使系统资源紧张,或有安全风险。Tinyproxy 的一个关键特性是其缓冲连接的理念。从效果上看, Tinyproxy 对服务器的响应进行了高速缓冲,然后按照客户端能够处理的最高速度进行响应。该特性极大的降低了网络延滞带来的问题。 
+
+特性:
+
+- 易于修改
+- 隐匿模式 - 定义哪些 HTTP 头允许通过,哪些又会被拦截
+- 支持 HTTPS - Tinyproxy 允许通过 CONNECT 方法转发 HTTPS 连接,任何情况下都不会修改数据流量
+- 远程监控 - 远程访问代理统计数据,让你能清楚了解代理服务当前的忙碌状态
+- 平均负载监控 - 通过配置,当服务器的负载接近一定值后拒绝新连接
+- 访问控制 - 通过配置,仅允许指定子网或 IP 地址的访问
+- 安全 - 运行无需额外权限,减小了系统受到威胁的概率
+- 基于 URL 的过滤 - 允许基于域和URL的黑白名单
+- 透明代理 - 配置为透明代理,这样客户端就无需任何配置
+- 代理链 - 在流量出口处采用上游代理服务器,而不是直接转发到目标服务器,创建我们所说的代理链
+- 隐私特性 - 限制允许从浏览器收到的来自 HTTP 服务器的数据(例如 cookies),同时限制允许通过的从浏览器到 HTTP 服务器的数据(例如版本信息)
+- 低开销 - 使用 glibc 内存开销只有2MB,CPU 负载按并发连接数线性增长(取决于网络连接速度)。 Tinyproxy 可以运行在老旧的机器上而无需担心性能问题。 
+
+--
+
+- 网站: [banu.com/tinyproxy][5]
+- 开发: Robert James Kaes和其他贡献者
+- 授权: GNU GPL v2
+- 版本号: 1.8.3
+
+--------------------------------------------------------------------------------
+
+via: http://www.linuxlinks.com/article/20151101020309690/WebDelivery.html
+
+译者:[fw8899](https://github.com/fw8899)
+校对:[wxy](https://github.com/wxy)
+
+本文由 [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/
diff --git a/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md b/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md
deleted file mode 100644
index 21fd8ad8e2..0000000000
--- a/translated/share/20151104 Optimize Web Delivery with these Open Source Tools.md	
+++ /dev/null
@@ -1,195 +0,0 @@
-使用开源工具优化Web响应
-================================================================================
-Web代理软件转发HTTP请求时并不会改变数据流量。它们经过配置后,可以免客户端配置,作为透明代理。它们还可以作为网站反向代理的前端;缓存服务器在此能支撑一台或多台web服务器为海量用户提供服务。
-
-网站代理功能多样,有着宽泛的用途:从页面缓存、DNS和其他查询,到加速web服务器响应、降低带宽消耗。代理软件广泛用于大型高访问量的网站,比如纽约时报、卫报, 以及社交媒体网站如Twitter、Facebook和Wikipedia。
-
-页面缓存已经成为优化单位时间内所能吞吐的数据量的至关重要的机制。好的Web缓存还能降低延迟,尽可能快地响应页面,让终端用户不至于因等待内容的时间过久而失去耐心。它们还能将频繁访问的内容缓存起来以节省带宽。如果你需要降低服务器负载并改善网站内容响应速度,那缓存软件能带来的好处就绝对值得探索一番。
-
-为深入探查Linux下可用的相关软件的质量,我列出了下边5个优秀的开源web代理工具。它们中有些功能完备强大,也有几个只需很低的资源就能运行。
-
-### Squid ###
-
-Squid是一个高性能、开源的代理缓存和Web缓存服务器,支持FTP、Internet Gopher、HTTPS和SSL等多种协议。它通过一个非阻塞,I/O事件驱动的单一进程处理所有IPV4或IPV6上的请求。
-
-Squid由一个主服务程序squid,和DNS查询程序dnsserver,另外还有可选的请求重写、执行认证程序组件,及一些管理和客户端工具构成。
-
-Squid提供了丰富的访问控制、认证和日志环境, 用于开发web代理和内容服务网站应用。
-
-其特性包括:
-
-- Web代理:
-    - 通过缓存来降低访问时间和带宽使用
-    - 将元数据和特别热的对象缓存到内存中
-    - 缓存DNS查询
-    - 支持非阻塞的DNS查询
-    - 实现了失败请求的未果缓存
-- Squid缓存可架设为层次结构,或网状结构以节省额外的带宽
-- 通过可扩展的访问控制来执行网站使用条款
-- 隐匿请求,如禁用或修改客户端HTTP请求头特定属性
-- 反向代理
-- 媒体范围限制
-- 支持SSL
-- 支持IPv6
-- 错误页面的本地化 - Squid可以根据访问者的语言选项对每个请求展示本地化的错误页面
-- 连接Pinning(用于NTLM Auth Passthrough) - 一种通过Web代理,允许Web服务器使用Microsoft NTLM安全认证替代HTTP标准认证的方案
-- 支持服务质量 (QoS, Quality of Service) 流
-    - 选择一个TOS/Diffserv值来标记本地命中
-    - 选择一个TOS/Diffserv值来标记邻居命中
-    - 选择性地仅标记同级或上级请求
-    - 允许任意发往客户端的HTTP响应保持由远程服务器处响应的TOS值
-    - 对收到的远程服务器的TOS值,在复制之前对指定位进行掩码操作,再发送到客户端
-- SSL Bump (用于HTTPS过滤和适配) - Squid-in-the-middle,在CONNECT方式的SSL隧道中,用配置化的客户端和服务器端证书,对流量进行解密和加密
-- 支持适配模块
-- ICAP旁路和重试增强 - 通过完全的旁路和动态链式路由扩展ICAP,来处理多多个适应性服务。
-- 支持ICY流式协议 - 俗称SHOUTcast多媒体流
-- 动态SSL证书生产
-- 支持ICAP协议(Internet Content Adaptation Protocol)
-- 完整的请求日志记录
-- 匿名连接
-
-- 网站: [www.squid-cache.org][1]
-- 开发: 美国国家应用网络研究实验室和网络志愿者
-- 授权: GNU GPL v2
-- 版本号: 4.0.1
-
-### Privoxy ###
-
-Privoxy(Privacy Enhancing Proxy)是一个非缓存类Web代理软件,它自带的高级过滤功能用来增强隐私保护,修改页面内容和HTTP头部信息,访问控制,以及去除广告和其它招人反感的互联网垃圾。Privoxy的配置非常灵活,能充分定制已满足各种各样的需求和偏好。它支持单机和多用户网络两种模式。
-
-Privoxy使用Actions规则来处理浏览器和远程站点间的数据流。
-
-其特性包括: 
-
-- 高度配置化
-- 广告拦截
-- Cookie管理
-- 支持"Connection: keep-alive"。可以无视客户端配置而保持持久连接
-- 支持IPv6
-- 标签化,允许按照客户端和服务器的请求头进行处理
-- 作为拦截代理器运行
-- 巧妙的手段和过滤机制用来处理服务器和客户端的HTTP头部
-- 可以与其他代理软件链式使用
-- 整合了基于浏览器的配置和控制工具,能在线跟踪规则和过滤效果,可远程开关
-- 页面过滤(文本替换、根据尺寸大小删除广告栏, 隐藏的"web-bugs"元素和HTML容错等)
-- 模块化的配置使得标准配合和用户配置可以存放于不同文件中,这样安装更新就不会覆盖用户的个性化设置
-- 配置文件支持Perl兼容的正则表达式,以及更为精妙和灵活的配置语法
-- GIF去动画
-- 旁路处理大量click-tracking脚本(避免脚本重定向)
-- 大多数代理生成的页面(例如 "访问受限" 页面)可由用户自定义HTML模板
-- 自动监测配置文件的修改并重新读取
-- 最大特点是可以基于每个站点或每个位置来进行控制
-
-- 网站: [www.privoxy.org][2]
-- 开发: Fabian Keil(开发领导者), David Schmidt, 和众多其他贡献者
-- 授权: GNU GPL v2
-- 版本号: 3.4.2
-
-### Varnish Cache ###
-
-Varnish Cache是一个为性能和灵活性而生的web加速器。它新颖的架构设计能带来显著的性能提升。根据你的架构,通常情况下它能加速响应速度300-1000倍。Varnish将页面存储到内存,这样web服务器就无需重复地创建相同的页面,只需要在页面发生变化后重新生成。页面内容直接从内存中访问,当然比其他方式更快。
-
-此外Varnish能大大提升响应web页面的速度,用任何应用服务器都能使网站访问速度大幅度地提升。
-
-按按经验,Varnish Cache比较经济的配置是1-16GB内存+SSD固态硬盘。
-
-其特性包括: 
-
-- 新颖的设计
-- VCL - 非常灵活的配置语言。VCL配置转换成C,然后编译、加载、运行,灵活且高效
-- 能使用round-robin轮询和随机分发两种方式来负载均衡,两种方式下后端服务器都可以设置权重
-- 基于DNS、随机、散列和客户端IP的分发器
-- 多台后端主机间的负载均衡
-- 支持Edge Side Includes,包括拼装压缩后的ESI片段
-- 多线程并发
-- URL重写
-- 单Varnish缓存多个虚拟主机
-- 日志数据存储在共享内存中
-- 基本的后端服务器健康检查
-- 优雅地处理后端服务器“挂掉”
-- 命令行界面的管理控制台
-- 使用内联C来扩展Varnish
-- 可以与Apache用在相同的系统上
-- 单系统可运行多个Varnish
-- 支持HAProxy代理协议。该协议在每个收到的TCP请求,例如SSL终止过程中,附加小段头信息,以记录客户端的真实地址
-- 冷热VCL状态
-- 用名为VMODs的Varnish模块来提供插件扩展
-- 通过VMODs定义后端主机
-- Gzip压缩及解压
-- HTTP流通过和获取
-- 神圣模式和优雅模式。用Varnish作为负载均衡器,神圣模式下可以将不稳定的后端服务器在一段时间内打入黑名单,阻止它们继续提供流量服务。优雅模式允许Varnish在获取不到后端服务器状态良好的响应时,提供已过期版本的页面或其它内容。
-- 实验性支持持久化存储,无需LRU缓存淘汰
-
-- 网站: [www.varnish-cache.org][3]
-- 开发: Varnish Software
-- 授权: FreeBSD
-- 版本号: 4.1.0
-
-### Polipo ###
-
-Polipo是一个开源的HTTP缓存代理,只需要非常低的资源开销。
-
-它监听来自浏览器的web页面请求,转发到web服务器,然后将服务器的响应转发到浏览器。在此过程中,它能优化和整形网络流量。从本质来讲Polipo与WWWOFFLE很相似,但其实现技术更接近于Squid。
-
-Polipo最开始的目标是作为一个兼容HTTP/1.1的代理,理论它能在任何兼容HTTP/1.1或更早的HTTP/1.0的站点上运行。
-
-其特性包括:
-
-- HTTP 1.1、IPv4 & IPv6、流量过滤和隐私保护增强
-- 如确认远程服务器支持,则无论收到的请求是管道处理过的还是在多个连接上同时收到的,都使用HTTP/1.1管道
-- 下载被中断时缓存起始部分,当需要续传时用区间请求来完成下载
-- 将HTTP/1.0的客户端请求升级为HTTP/1.1,然后按照客户端支持的级别进行升级或降级后回复
-- 全面支持IPv6 (作用域(链路本地)地址除外)
-- 作为IPv4和IPv6网络的网桥
-- 内容过滤
-- 能使用Poor Man多路复用技术降低延迟
-- 支持SOCKS 4和SOCKS 5协议
-- HTTPS代理
-- 扮演透明代理的角色
-- 可以与Privoxy或tor一起运行
-
-- 网站: [www.pps.univ-paris-diderot.fr/~jch/software/polipo/][4]
-- 开发: Juliusz Chroboczek, Christopher Davis
-- 授权: MIT License
-- 版本号: 1.1.1
-
-### Tinyproxy ###
-
-Tinyproxy是一个轻量级的开源web代理守护进程,其设计目标是快而小。它适用于需要完整HTTP代理特性,但系统资源又不足以运行大型代理的场景,比如嵌入式部署。
-
-Tinyproxy对小规模网络非常有用,这样的场合下大型代理会使系统资源紧张,或有安全风险。Tinyproxy的一个关键特性是其缓冲连接的理念。实质上Tinyproxy服务器的响应进行了高速缓冲,然后按照客户端能够处理的最高速度进行响应。该特性极大的降低了网络延滞带来的问题。 
-
-特性:
-
-- 易于修改
-- 隐匿模式 - 定义哪些HTTP头允许通过,哪些又会被拦截
-- 支持HTTPS - Tinyproxy允许通过CONNECT方法转发HTTPS连接,任何情况下都不会修改数据流量
-- 远程监控 - 远程访问代理统计数据,让你能清楚了解代理服务当前的忙碌状态
-- 平均负载监控 - 通过配置,当服务器的负载接近一定值后拒绝新连接
-- 访问控制 - 通过配置,仅允许指定子网或IP地址的访问
-- 安全 - 运行无需额外权限,减小了系统受到威胁的概率
-- 基于URL的过滤 - 允许基于域和URL的黑白名单
-- 透明代理 - 配位为透明代理,这样客户端就无需任何配置
-- 代理链 - 来流量出口处采用上游代理服务器,而不是直接转发到目标服务器,创建我们所说的代理链
-- 隐私特性 - 限制允许从浏览器收到的来自HTTP服务器的数据(例如cookies),同时限制允许通过的从浏览器到HTTP服务器的数据(例如版本信息)
-- 低开销 - 使用glibc内存开销只有2MB,CPU负载按并发连接数线性增长(取决于网络连接速度)。 Tinyproxy可以运行在老旧的机器上而无需担心性能问题。 
-
-- 网站: [banu.com/tinyproxy][5]
-- 开发: Robert James Kaes和其他贡献者
-- 授权: GNU GPL v2
-- 版本号: 1.8.3
-
---------------------------------------------------------------------------------
-
-via: http://www.linuxlinks.com/article/20151101020309690/WebDelivery.html
-
-译者:[fw8899](https://github.com/fw8899)
-校对:[校对者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/

From 33d4f96e783cb8ca2b77abda1b6779bb3ec06149 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Thu, 17 Mar 2016 22:50:23 +0800
Subject: [PATCH 1173/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...ith Answers--How to install Ubuntu desktop behind a proxy.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md
index 0a215a066e..31ca37ab0b 100644
--- a/published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md	
+++ b/published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md	
@@ -1,4 +1,4 @@
-Linux 有问必答 - 如何通过代理服务器安装 Ubuntu 桌面版
+Linux 有问必答:如何通过代理服务器安装 Ubuntu 桌面版
 ================================================================================
 > **问题**: 我的电脑通过 HTTP 代理连接到公司网络。当我尝试从 CD-ROM 在计算机上安装 Ubuntu 桌面时,在检索文件时安装程序会被挂起,检索则不会完成,这可能是由于代理造成的。然而问题是,Ubuntu 的安装程序从不要求我在安装过程中配置代理。那我该怎么使用代理来安装 Ubuntu 桌面?
 

From 6315c293936bcb009dbc207f9bca61230132b999 Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Fri, 18 Mar 2016 14:52:27 +0800
Subject: [PATCH 1174/1710] =?UTF-8?q?20160318-1=20=E9=80=89=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...Raspberry Pi projects for the classroom.md | 92 +++++++++++++++++++
 1 file changed, 92 insertions(+)
 create mode 100644 sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md

diff --git a/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md b/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md
new file mode 100644
index 0000000000..d074c2e840
--- /dev/null
+++ b/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md	
@@ -0,0 +1,92 @@
+5 great Raspberry Pi projects for the classroom
+=====================================================
+
+![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png?itok=fSUS0fIt)
+
+### 1. Minecraft Pi
+
+![](https://opensource.com/sites/default/files/lava.png)
+>Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1].
+
+Minecraft is the favorite game of pretty much every teenager in the world—and it's one of the most creative games ever to capture the attention of young people. The version that comes with every Raspberry Pi is not only a creative thinking building game, but comes with a programming interface allowing for additional interaction with the Minecraft world through Python code.
+
+Minecraft: Pi Edition is a great way for teachers to engage students with problem solving and writing code to perform tasks. You can use the Python API to build a house and have it follow you wherever you go, build a bridge wherever you walk, make it rain lava, show the temperature in the sky, and anything else your imagination can create.
+
+Read more in "[Getting Started with Minecraft Pi][2]."
+
+### 2. Reaction game and traffic lights
+
+![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg)
+>Courtesy of [Low Voltage Labs][3]. [CC BY-SA 4.0][1].
+
+It's really easy to get started with physical computing on Raspberry Pi—just connect up LEDs and buttons to the GPIO pins, and with a few lines of code you can turn lights on and control things with button presses. Once you know the code to do the basics, it's down to your imagination as to what you do next!
+
+If you know how to flash one light, you can flash three. Pick out three LEDs in traffic light colors and you can code the traffic light sequence. If you know how to use a button to a trigger an event, then you have a pedestrian crossing! Also look out for great pre-built traffic light add-ons like [PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6], and more.
+
+It's not always about the code—this can be used as an exercise in understanding how real world systems are devised. Computational thinking is a useful skill in any walk of life.
+
+![](https://opensource.com/sites/default/files/reaction-game.png)
+>Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1].
+
+Next, try wiring up two buttons and an LED and making a two-player reaction game—let the light come on after a random amount of time and see who can press the button first!
+
+To learn more, check out [GPIO Zero recipes][7]. Everything you need is in [CamJam EduKit 1][8].
+
+### 3. Sense HAT Pixel Pet
+
+The Astro Pi—an augmented Raspberry Pi—is going to space this December, but you haven't missed your chance to get your hands on the hardware. The Sense HAT is the sensor board add-on used in the Astro Pi mission and it's available for anyone to buy. You can use it for data collection, science experiments, games and more. Watch this Gurl Geek Diaries video from Raspberry Pi's Carrie Anne for a great way to get started—by bringing to life an animated pixel pet of your own design on the Sense HAT display:
+
+[video](https://youtu.be/gfRDFvEVz-w)
+
+>Learn more in "[Exploring the Sense HAT][9]."
+
+### 4. Infrared bird box
+
+![](https://opensource.com/sites/default/files/ir-bird-box.png)
+>Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1].
+
+A great exercise for the whole class to get involved with—place a Raspberry Pi and the NoIR camera module inside a bird box along with some infra-red lights so you can see in the dark, then stream video from the Pi over the network or on the internet. Wait for birds to nest and you can observe them without disturbing them in their habitat.
+
+Learn all about infrared and the light spectrum, and how to adjust the camera focus and control the camera in software.
+
+Learn more in "[Make an infrared bird box][10]."
+
+### 5. Robotics
+
+![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg)
+>Courtesy of Low Voltage Labs. [CC BY-SA 4.0][1].
+
+With a Raspberry Pi and as little as a couple of motors and a motor controller board, you can build your own robot. There is a vast range of robots you can make, from basic buggies held together by sellotape and a homemade chassis, all the way to self-aware, sensor-laden metallic stallions with camera attachments driven by games controllers.
+
+Learn how to control individual motors with something straightforward like the RTK Motor Controller Board (£8/$12), or dive into the new CamJam robotics kit (£17/$25) which comes with motors, wheels and a couple of sensors—great value and plenty of learning potential.
+
+Alternatively, if you'd like something more hardcore, try PiBorg's [4Borg][11] (£99/$150) or [DiddyBorg][12] (£180/$273) or go the whole hog and treat yourself to their DoodleBorg Metal edition (£250/$380)—and build a mini version of their infamous [DoodleBorg tank][13] (unfortunately not for sale).
+
+Check out the [CamJam robotics kit worksheets][14].
+
+
+------------------------------------------------------------------------------
+
+via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom
+
+作者:[Ben Nuttall][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://opensource.com/users/bennuttall
+[1]: https://creativecommons.org/licenses/by-sa/4.0/
+[2]: https://opensource.com/life/15/5/getting-started-minecraft-pi
+[3]: http://lowvoltagelabs.com/
+[4]: http://lowvoltagelabs.com/products/pi-traffic/
+[5]: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390
+[6]: https://ryanteck.uk/hats/1-traffichat-0635648607122.html
+[7]: http://pythonhosted.org/gpiozero/recipes/
+[8]: http://camjam.me/?page_id=236
+[9]: https://opensource.com/life/15/10/exploring-raspberry-pi-sense-hat
+[10]: https://www.raspberrypi.org/learning/infrared-bird-box/
+[11]: https://www.piborg.org/4borg
+[12]: https://www.piborg.org/diddyborg
+[13]: https://www.piborg.org/doodleborg
+[14]: http://camjam.me/?page_id=1035#worksheets

From 6eaa9fd46df494a0718b7d466c9e14b69aae0d2c Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Fri, 18 Mar 2016 14:52:59 +0800
Subject: [PATCH 1175/1710] translating

---
 .../20151207 5 great Raspberry Pi projects for the classroom.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md b/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md
index d074c2e840..b1bc89b2a0 100644
--- a/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md	
+++ b/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md	
@@ -1,3 +1,5 @@
+ezio
+
 5 great Raspberry Pi projects for the classroom
 =====================================================
 

From c0c483068eddbdc7fad6f4b93b3ecb1565171194 Mon Sep 17 00:00:00 2001
From: martin qi 
Date: Sat, 19 Mar 2016 01:07:27 +0800
Subject: [PATCH 1176/1710] =?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

对 [General purpose] 一词没有把握。
---
 ...7 What we learned in Seoul with AlphaGo.md | 51 -------------------
 ...6 What we learned in Seoul with AlphaGo.md | 49 ++++++++++++++++++
 2 files changed, 49 insertions(+), 51 deletions(-)
 delete mode 100644 sources/news/20160317 What we learned in Seoul with AlphaGo.md
 create mode 100644 translated/news/20160316 What we learned in Seoul with AlphaGo.md

diff --git a/sources/news/20160317 What we learned in Seoul with AlphaGo.md b/sources/news/20160317 What we learned in Seoul with AlphaGo.md
deleted file mode 100644
index 8eb12005d3..0000000000
--- a/sources/news/20160317 What we learned in Seoul with AlphaGo.md	
+++ /dev/null
@@ -1,51 +0,0 @@
-martin
-
-What we learned in Seoul with AlphaGo
-================================================================================
-Go isn't just a game—it's a living, breathing culture of players, analysts, fans, and legends. Over the last 10 days in Seoul, South Korea, we've been lucky enough to witness some of that incredible excitement firsthand. We've also had the chance to see something that's never happened before: [DeepMind's][1] AlphaGo took on and defeated legendary Go player, Lee Sedol (9-dan professional with 18 world titles), marking a major milestone for artificial intelligence.
-
-![Pedestrians checking in on the AlphaGo vs. Lee Sedol Go match on the streets of Seoul (March 13)](https://1.bp.blogspot.com/-vfgUcjyMOmM/Vumk5gXD98I/AAAAAAAASDI/frbYidb1u6gTKGcvFOf8iQVsr9PLoRlBQ/s1600/Press%2BCenter%2BOutdoor%2BScreen%2B2.jpg)
-
-Go may be one of the oldest games in existence, but the attention to our five-game tournament exceeded even our wildest imaginations. Searches for Go rules and Go boards spiked in the U.S. In China, tens of millions watched live streams of the matches, and the “Man vs. Machine Go Showdown” hashtag saw 200 million pageviews on Sina Weibo. Sales of Go boards even [surged][2] in Korea.
-
-Our public test of AlphaGo, however, was about more than winning at Go. We founded DeepMind in 2010 to create general-purpose artificial intelligence (AI) that can learn on its own—and, eventually, be used as a tool to help society solve some of its biggest and most pressing problems, from climate change to disease diagnosis.
-
-Like many researchers before us, we've been developing and testing our algorithms through games. We first revealed [AlphaGo][3] in January—the first AI program that could beat a professional player at the most complex board game mankind has devised, using [deep learning][4] and [reinforcement learning][5]. The [ultimate challenge][6] was for AlphaGo to take on the best Go player of the past decade—Lee Sedol.
-
-To everyone's surprise, including ours, AlphaGo won four of the five games. Commentators noted that AlphaGo played many unprecedented, creative, and even [“beautiful”][7] moves. Based on our data, AlphaGo's bold [move 37][8] in Game 2 had a 1 in 10,000 chance of being played by a human. Lee countered with innovative moves of his own, such as his [move 78][9] against AlphaGo in Game 4—again, a 1 in 10,000 chance of being played—which ultimately resulted in a win.
-
-The final score was 4-1. We're contributing the $1 million in prize money to organizations that support science, technology, engineering and math (STEM) education and Go, as well as UNICEF.
-
-We've learned two important things from this experience. First, this test bodes well for AI's potential in solving other problems. AlphaGo has the ability to look “globally” across a board—and find solutions that humans either have been trained not to play or would not consider. This has huge potential for using AlphaGo-like technology to find solutions that humans don't necessarily see in other areas. Second, while the match has been widely billed as "man vs. machine," AlphaGo is really a human achievement. Lee Sedol and the AlphaGo team both pushed each other toward new ideas, opportunities and solutions—and in the long run that's something we all stand to benefit from.
-
-But as they say about Go in Korean: “Don't be arrogant when you win or you'll lose your luck.” This is just one small, albeit significant, step along the way to making machines smart. We've demonstrated that our cutting edge deep reinforcement learning techniques can be used to make strong Go and [Atari][10] players. Deep neural networks are already used at Google for specific tasks—like [image recognition][11], [speech recognition][12], and [Search ranking][13]. However, we're still a long way from a machine that can learn to flexibly perform the full range of intellectual tasks a human can—the hallmark of true [artificial general intelligence][14].
-
-![Demis and Lee Sedol hold up the signed Go board from the Google DeepMind Challenge Match](https://4.bp.blogspot.com/-LkxNvsR-e1I/Vumk5gmProI/AAAAAAAASDM/J55Y2psqzOwWZ3kau2Pgz6xmazo7XDj_Q/s1600/A26U6150.jpg)
-
-With this tournament, we wanted to test the limits of AlphaGo. The genius of Lee Sedol did that brilliantly—and we'll spend the next few weeks studying the games he and AlphaGo played in detail. And because the machine learning methods we've used in AlphaGo are general purpose, we hope to apply some of these techniques to other challenges in the future. Game on!
-
---------------------------------------------------------------------------------
-
-via: https://googleblog.blogspot.com/2016/03/what-we-learned-in-seoul-with-alphago.html
-
-作者:[Demis Hassabis][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://demishassabis.com/
-[1]:https://deepmind.com/
-[2]:http://www.hankookilbo.com/m/v/3e7deaa26a834f76929a1689ecd388ea
-[3]:https://googleblog.blogspot.com/2016/01/alphago-machine-learning-game-go.html
-[4]:https://en.wikipedia.org/wiki/Deep_learning
-[5]:https://en.wikipedia.org/wiki/Reinforcement_learning
-[6]:https://deepmind.com/alpha-go.html
-[7]:http://www.wired.com/2016/03/sadness-beauty-watching-googles-ai-play-go/
-[8]:https://youtu.be/l-GsfyVCBu0?t=1h17m50s
-[9]:https://youtu.be/yCALyQRN3hw?t=3h10m25s
-[10]:http://googleresearch.blogspot.sg/2015/02/from-pixels-to-actions-human-level.html
-[11]:http://googleresearch.blogspot.sg/2013/06/improving-photo-search-step-across.html
-[12]:http://googleresearch.blogspot.sg/2015/08/the-neural-networks-behind-google-voice.html
-[13]:http://www.bloomberg.com/news/articles/2015-10-26/google-turning-its-lucrative-web-search-over-to-ai-machines
-[14]:https://en.wikipedia.org/wiki/Artificial_general_intelligence
diff --git a/translated/news/20160316 What we learned in Seoul with AlphaGo.md b/translated/news/20160316 What we learned in Seoul with AlphaGo.md
new file mode 100644
index 0000000000..ab3c92b4c9
--- /dev/null
+++ b/translated/news/20160316 What we learned in Seoul with AlphaGo.md	
@@ -0,0 +1,49 @@
+我们和 AlphaGo 在首尔学到了什么
+================================================================================
+围棋并不仅仅是一个游戏——她是一伙活生生的玩家们,分析家们,爱好者们以及传奇大师们。在过去的十天里,在韩国首尔,我们有幸亲眼目睹那份难以置信的激动。我们也有幸也目睹了那前所未有的场景:[DeepMind][1] 的 AlphaGo 迎战并战胜了传奇围棋大师,李世石(职业9段,身负 18 个世界头衔),这是人工智能的里程碑。
+
+![Pedestrians checking in on the AlphaGo vs. Lee Sedol Go match on the streets of Seoul (March 13)](https://1.bp.blogspot.com/-vfgUcjyMOmM/Vumk5gXD98I/AAAAAAAASDI/frbYidb1u6gTKGcvFOf8iQVsr9PLoRlBQ/s1600/Press%2BCenter%2BOutdoor%2BScreen%2B2.jpg)
+
+虽说围棋可能是存世的最为悠久的游戏之一了,但对于这五盘比赛的关注度还是大大的超出了我们的想象。搜索围棋规则和围棋盘的用户在美国迅速飙升。在中国,数以千万计的用户通过直播观看了这场比赛,并且新浪微博“人机围棋大战”话题的浏览量破 2 亿。韩国的围棋盘也销量[激增][2]。
+
+然而我们如此公然的测试 AlphaGo,并不仅仅是为了赢棋而已。我们自 2010 年成立 DeepMind,为的是创造出具有独立学习能力的通用型人工智能(AI),并致力于将其作为工具协助解决,从气候变化到诊断疾病,这类最为棘手且急迫的问题为最终目标。 
+
+亦如许多前辈学者们一样,我们也是通过游戏来开发并测试我们的算法的。在一月份,我们第一次披露了 [AlphaGo][3]——作为第一个通过使用 [深度学习][4] 和 [强化学习][5],可以在人类发明的最为复杂的棋盘类游戏中击败职业选手的 AI 程序。而 AlphaGo 迎战过去十年间最厉害的围棋选手——李世石,绝对称得上是 [终极挑战][6]。
+
+结果震惊了包括我们在内的每个人,AlphaGo 五战四胜。评论家指出了 AlphaGo 下出的许多前所未见、极富创意或者要用 [“漂亮”][7] 来形容的妙手。基于我们的数据分析,AlphaGo 在第 2 局中的 [37 手][8],在人类选手中出现的几率仅有万分之一。而李一反常态的创新下法,如第 4 局中的 [78 手][9]——也是既存下法中的万中之一的——这一手也最终造就了一场胜利。
+
+最后比分定格在 4-1。我们为支持科学、技术、工程、数学(STEM)教育和围棋的组织,以及 UNICEF (联合国儿童基金会)赢得了 $1 百万的捐助。
+
+经此一役,我们将收获总结成以下两点:第一,此次测试很好的预示了 AI 有解决其他问题的潜力。AlphaGo 在棋盘上能够做到兼顾“全局”——并找出人类已经被训化而不会走或想到的妙手。运用 AlphaGo 这类的技术,在人类目所不能及的领域中探索,会有很大的潜力。第二,虽说这场比赛已经被广泛的标榜成“人机大战”,但 AlphaGo 却是人类实实在在的成果。无论是李世石还是 AlphaGo 团队相互之间互相促进,产生了新的想法、观点和答案——并且长远来看,我们都将从中受益。
+
+但正如韩国对于围棋的观点:“胜而不骄,是以常胜。”这只是使机器聪明的漫长道路中的一个小小而显著的一步而已。我们已经证明了尖端深度强化学习技术可以被用作制作强大的围棋选手和 [Atari][10] 玩家。深度神经网络在 Google 已经与 [图像识别][11],[语音识别][12] 以及 [搜索排名][13] 一样被应用到具体的任务中了。然而,从会学习的机器到可以像人一样全方位灵活实施智能任务——真正达到 [强人工智能][14] 的特性,此中的道路还很漫长。
+
+![Demis and Lee Sedol hold up the signed Go board from the Google DeepMind Challenge Match](https://4.bp.blogspot.com/-LkxNvsR-e1I/Vumk5gmProI/AAAAAAAASDM/J55Y2psqzOwWZ3kau2Pgz6xmazo7XDj_Q/s1600/A26U6150.jpg)
+
+我们想通过这场比赛来测试 AlphaGo 的极限。李世石大师做的十分出色—我们在接下来的数周内会研究他与 AlphaGo 的对战细节。同时因为我们在 AlphaGo 中使用的机器学习方法是通用型的,我们十分希望在不久的将来,将这种技术应用于其他的挑战中。游戏开始!
+
+--------------------------------------------------------------------------------
+
+via: https://googleblog.blogspot.com/2016/03/what-we-learned-in-seoul-with-alphago.html
+
+作者:[Demis Hassabis][a]
+译者:[martin2011qi](https://github.com/martin2011qi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://demishassabis.com/
+[1]:https://deepmind.com/
+[2]:http://www.hankookilbo.com/m/v/3e7deaa26a834f76929a1689ecd388ea
+[3]:https://googleblog.blogspot.com/2016/01/alphago-machine-learning-game-go.html
+[4]:https://en.wikipedia.org/wiki/Deep_learning
+[5]:https://en.wikipedia.org/wiki/Reinforcement_learning
+[6]:https://deepmind.com/alpha-go.html
+[7]:http://www.wired.com/2016/03/sadness-beauty-watching-googles-ai-play-go/
+[8]:https://youtu.be/l-GsfyVCBu0?t=1h17m50s
+[9]:https://youtu.be/yCALyQRN3hw?t=3h10m25s
+[10]:http://googleresearch.blogspot.sg/2015/02/from-pixels-to-actions-human-level.html
+[11]:http://googleresearch.blogspot.sg/2013/06/improving-photo-search-step-across.html
+[12]:http://googleresearch.blogspot.sg/2015/08/the-neural-networks-behind-google-voice.html
+[13]:http://www.bloomberg.com/news/articles/2015-10-26/google-turning-its-lucrative-web-search-over-to-ai-machines
+[14]:https://en.wikipedia.org/wiki/Artificial_general_intelligence

From 0d972d4ae38777a6095cbfbb6a45109fb2609095 Mon Sep 17 00:00:00 2001
From: zpl 
Date: Sat, 19 Mar 2016 12:26:25 +0800
Subject: [PATCH 1177/1710] move the translated files into right place

---
 {sources => translated}/tech/20151202 A new Mindcraft moment.md | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {sources => translated}/tech/20151202 A new Mindcraft moment.md (100%)

diff --git a/sources/tech/20151202 A new Mindcraft moment.md b/translated/tech/20151202 A new Mindcraft moment.md
similarity index 100%
rename from sources/tech/20151202 A new Mindcraft moment.md
rename to translated/tech/20151202 A new Mindcraft moment.md

From 077e2a079dcca139cd1cffe849e3fb8cee60d5d2 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Sat, 19 Mar 2016 12:36:22 +0800
Subject: [PATCH 1178/1710] PUB:20150820 Why did you start using Linux

@bazz2
---
 .../20150820 Why did you start using Linux.md | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
 rename {translated/talk => published}/20150820 Why did you start using Linux.md (87%)

diff --git a/translated/talk/20150820 Why did you start using Linux.md b/published/20150820 Why did you start using Linux.md
similarity index 87%
rename from translated/talk/20150820 Why did you start using Linux.md
rename to published/20150820 Why did you start using Linux.md
index aa48db697c..c0a01c17a2 100644
--- a/translated/talk/20150820 Why did you start using Linux.md	
+++ b/published/20150820 Why did you start using Linux.md	
@@ -1,12 +1,11 @@
 年轻人,你为啥使用 linux
 ================================================================================
-> 今天的开源综述:是什么带你进入 linux 的世界?号外:IBM 基于 Linux 的大型机。以及,你应该抛弃 win10 选择 Linux 的原因。
 
 ### 当初你为何使用 Linux? ###
 
 Linux 越来越流行,很多 OS X 或 Windows 用户都转移到 Linux 阵营了。但是你知道是什么让他们开始使用 Linux 的吗?一个 Reddit 用户在网站上问了这个问题,并且得到了很多有趣的回答。
 
-一个名为 SilverKnight 的用户在 Reddit 的 Linux 板块上问了如下问题:
+一个名为 SilverKnight 的用户在 Reddit 的 Linux 版块上问了如下问题:
 
 > 我知道这个问题肯定被问过了,但我还是想听听年轻一代使用 Linux 的原因,以及是什么让他们坚定地成为 Linux 用户。
 > 
@@ -18,7 +17,7 @@ Linux 越来越流行,很多 OS X 或 Windows 用户都转移到 Linux 阵营
 
 以下是网站上的回复:
 
-> **DoublePlusGood**:我12岁开始使用 Backtrack(现在改名为 Kali),因为我想成为一名黑客(LCTT 译注:原文1337 haxor,1337 是 leet 的火星文写法,意为'火星文',haxor 为 hackor 的火星文写法,意为'黑客',另一种写法是 1377 h4x0r,满满的火星文文化)。我现在一直使用 ArchLinux,因为它给我无限自由,让我对我的电脑可以为所欲为。
+> **DoublePlusGood**:我12岁开始使用 Backtrack(现在改名为 Kali),因为我想成为一名黑客(LCTT 译注:原文“1337 haxor”,1337 是 leet 的火星文写法,意为'火星文',haxor 为 hackor 的火星文写法,意为'黑客',另一种写法是 1377 h4x0r,满满的火星文文化)。我现在一直使用 ArchLinux,因为它给我无限自由,让我对我的电脑可以为所欲为。
 > 
 > **Zack**:我记得是12、3岁的时候使用 Linux,现在15岁了。
 > 
@@ -44,9 +43,9 @@ Linux 越来越流行,很多 OS X 或 Windows 用户都转移到 Linux 阵营
 > 
 > 我很喜欢这个系统。然后在圣诞节的时候我得到树莓派,上面只能跑 Debian,还不能支持其它发行版。
 > 
-> **Cqz**:我9岁的时候有一次玩 Windows 98,结果这货当机了,原因未知。我没有 Windows 安装盘,但我爸的一本介绍编程的杂志上有一张随书附赠的光盘,这张光盘上刚好有 Mandrake Linux 的安装软件,于是我瞬间就成为了 Linux 用户。我当时还不知道自己在玩什么,但是玩得很嗨皮。这些年我虽然在电脑上装了多种 Windows 版本,但是 FLOSS 世界才是我的家。现在我只把 Windows 装在虚拟机上,用来玩游戏。
+> **Cqz**:我9岁的时候有一次玩 Windows 98,结果这货当机了,原因未知。我没有 Windows 安装盘,但我爸的一本介绍编程的杂志上有一张随书附赠的光盘,这张光盘上刚好有 Mandrake Linux 的安装软件,于是我瞬间就成为了 Linux 用户。我当时还不知道自己在玩什么,但是玩得很嗨皮。这些年我虽然在电脑上装了多种 Windows 版本,但是 FLOSS 世界才是我的家(LCTT 译注:FLOSS —— Free/Libre and Open Source Software,自由/开源软件)。现在我只把 Windows 装在虚拟机上,用来玩游戏。
 > 
-> **Tosmarcel**:15岁那年对'编程'这个概念很好奇,然后我开始了哈佛课程'CS50',这个课程要我们安装 Linux 虚拟机用来执行一些命令。当时我问自己为什么 Windows 没有这些命令?于是我 Google 了 Linux,搜索结果出现了 Ubuntu,在安装 Ubuntu。的时候不小心把 Windows 分区给删了。。。当时对 Linux 毫无所知,适应这个系统非常困难。我现在16岁,用 ArchLinux,不想用回 Windows,我爱 ArchLinux。
+> **Tosmarcel**:15岁那年对'编程'这个概念很好奇,然后我开始了哈佛课程'CS50',这个课程要我们安装 Linux 虚拟机用来执行一些命令。当时我问自己为什么 Windows 没有这些命令?于是我 Google 了 Linux,搜索结果出现了 Ubuntu,在安装 Ubuntu 的时候不小心把 Windows 分区给删了。。。当时对 Linux 毫无所知,适应这个系统非常困难。我现在16岁,用 ArchLinux,不想用回 Windows,我爱 ArchLinux。
 > 
 > **Micioonthet**:第一次听说 Linux 是在我5年级的时候,当时去我一朋友家,他的笔记本装的就是 MEPIS(Debian的一个比较老的衍生版),而不是 XP。
 > 
@@ -54,7 +53,7 @@ Linux 越来越流行,很多 OS X 或 Windows 用户都转移到 Linux 阵营
 > 
 > 我13岁那年还没有自己的笔记本电脑,而我另一位朋友总是抱怨他的电脑有多慢,所以我打算把它买下来并修好它。我花了20美元买下了这台装着 Windows Vista 系统、跑满病毒、完全无法使用的惠普笔记本。我不想重装讨厌的 Windows 系统,记得 Linux 是免费的,所以我刻了一张 Ubuntu 14.04 光盘,马上把它装起来,然后我被它的高性能给震精了。
 > 
-> 我的世界(由于它允运行在 JAVA 上,所以当时它是 Linux 下为数不多的几个游戏之一)在 Vista 上只能跑5帧每秒,而在 Ubuntu 上能跑到25帧。
+> “我的世界(Minecraft)”(由于它允许运行在 JAVA 上,所以当时它是 Linux 下为数不多的几个游戏之一)在 Vista 上只能跑5帧每秒,而在 Ubuntu 上能跑到25帧。
 > 
 > 我到现在还会偶尔使用一下那台笔记本,Linux 可不会在乎你的硬件设备有多老。
 > 
@@ -62,9 +61,9 @@ Linux 越来越流行,很多 OS X 或 Windows 用户都转移到 Linux 阵营
 > 
 > **Webtm**:我爹每台电脑都会装多个发行版,有几台是 opensuse 和 Debian,他的个人电脑装的是 Slackware。所以我记得很小的时候一直在玩 debian,但没有投入很多精力,我用了几年的 Windows,然后我爹问我有没有兴趣试试 debian。这是个有趣的经历,在那之后我一直使用 debian。而现在我不用 Linux,转投 freeBSD,5个月了,用得很开心。
 > 
-> 完全控制自己的系统是个很奇妙的体验。开源届有好多酷酷的软件,我认为在自己解决一些问题并且利用这些工具解决其他事情的过程是最有趣的。当然稳定和高效也是吸引我的地方。更不用说它的保密级别了。
+> 完全控制自己的系统是个很奇妙的体验。开源界有好多酷酷的软件,我认为在自己解决一些问题并且利用这些工具解决其他事情的过程是最有趣的。当然稳定和高效也是吸引我的地方。更不用说它的保密级别了。
 > 
-> **Wyronaut**:我今年18,第一次玩 Linux 是13岁,当时玩的 Ubuntu,为啥要碰 Linux?因为我想搭一个'我的世界'的服务器来和小伙伴玩游戏,当时'我的世界'可是个新鲜玩意儿。而搭个私服需要用 Linux 系统。
+> **Wyronaut**:我今年18,第一次玩 Linux 是13岁,当时玩的 Ubuntu,为啥要碰 Linux?因为我想搭一个“我的世界”的服务器来和小伙伴玩游戏,当时“我的世界”可是个新鲜玩意儿。而搭个私服需要用 Linux 系统。
 > 
 > 当时我还是个新手,对着 Linux 的命令行有些傻眼,因为很多东西都要我自己处理。还是多亏了 Google 和维基,我成功地在多台老 PC 上部署了一些简单的服务器,那些早已无人问津的老古董机器又能发挥余热了。
 > 
@@ -90,7 +89,7 @@ Linux 越来越流行,很多 OS X 或 Windows 用户都转移到 Linux 阵营
 > 
 > 老实说我对电脑挺感兴趣的,当我还没接触'自由软件哲学'的时候,我认为 free 是免费的意思。我也不认为命令行界面很让人难以接受,因为我小时候就接触过 DOS 系统。
 > 
-> 我第一个发行版是 Mandrake,在我11岁还是12岁那年我把家里的电脑弄得乱七八糟,然后我一直折腾那台电脑,试着让我技的技能提升一个台阶。现在我在一家公司全职使用 Linux。(请允许我耸个肩)。
+> 我第一个发行版是 Mandrake,在我11岁还是12岁那年我把家里的电脑弄得乱七八糟,然后我一直折腾那台电脑,试着让我自己的技能提升一个台阶。现在我在一家公司全职使用 Linux。(请允许我耸个肩)。
 > 
 > **Matto**:我的电脑是旧货市场淘回来的,装 XP,跑得慢,于是我想换个系统。Google 了一下,发现 Ubuntu。当年我15、6岁,现在23了,就职的公司内部使用 Linux。
 > 
@@ -133,7 +132,7 @@ via: http://www.itworld.com/article/2972587/linux/why-did-you-start-using-linux.
 
 作者:[Jim Lynch][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 86e9efdc55bf9af872ee7ecccb5b5b3f2bcd516a Mon Sep 17 00:00:00 2001
From: zpl 
Date: Sat, 19 Mar 2016 12:38:26 +0800
Subject: [PATCH 1179/1710] [translating] 20160314 15 podcasts for FOSS fans

---
 sources/tech/20160314 15 podcasts for FOSS fans | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sources/tech/20160314 15 podcasts for FOSS fans b/sources/tech/20160314 15 podcasts for FOSS fans
index 222861427e..eae53102ad 100644
--- a/sources/tech/20160314 15 podcasts for FOSS fans	
+++ b/sources/tech/20160314 15 podcasts for FOSS fans	
@@ -1,3 +1,4 @@
+zpl1025
 15 podcasts for FOSS fans
 =============================
 

From 18ef3edd4cd033b0b27b199e272976a30a87c33b Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Sat, 19 Mar 2016 21:59:34 +0800
Subject: [PATCH 1180/1710] =?UTF-8?q?20160319-1=20=E9=80=89=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...buntu Core 16.04 LTS and Raspberry Pi 3.md | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md

diff --git a/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md b/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md
new file mode 100644
index 0000000000..a03f9dd355
--- /dev/null
+++ b/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md	
@@ -0,0 +1,35 @@
+ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3
+===============================================================================
+
+keyword : ownCloud Pi , Snappy Ubuntu Core 16.04 LTS , Raspberry Pi 3 , Western Digital , PiDrive
+
+### We [reported][1] last year that ownCloud was in talks with WD (Western Digital) Labs to help them develop a community project that would bring a self-hosted cloud storage device in users' homes.
+
+The idea behind the self-hosted device, which will be powered by the ownCloud Server software, was to combine a Raspberry Pi single-board computer with a Western Digital disk drive into an easy-to-install and out-of-the-box container.
+
+Well, it looks like the community's response was more than positive, and many great proposals and ideas were received for the ownCloud Pi project. And today, they have even greater news for us, as the first images are available for [download][2].
+
+The ownCloud Pi images are based on the latest Snappy Ubuntu Core 16.04 LTS operating system, which was designed by Canonical for embedded and IoT (Internet of Things) devices, as well as the new Raspberry Pi 3 Model B SBC.
+
+"We’re looking for help in the ownCloud, Ubuntu, Raspberry Pi and WD Labs communities for help to test and improve them and will be able to make available a first batch of about 30 devices at the end of next week," say the ownCloud developers in today's [announcement][3].
+
+### Current obstacles, challenges, and the road ahead
+
+At the moment, the team is working hard on finishing their ownCloud Pi device solution based on the Xenial Xerus edition of Snappy Ubuntu Core. Thus, the new 64-bit Raspberry Pi 3 computer helps them with the obstacles encountered during previous tests running on the Raspberry Pi 2 board, such as support for files larger than 2GB.
+
+Therefore, it looks like the decision was taken, and the final ownCloud Pi device, which should be available as a preview later this spring, will be powered by the Raspberry Pi 3 single-board computer. In the coming days, we should be able to purchase the first production-ready version of the ownCloud Pi device.
+
+--------------------------------------------------------------------------------
+
+via: http://news.softpedia.com/news/owncloud-pi-device-to-run-on-snappy-ubuntu-core-16-04-lts-and-raspberry-pi-3-501904.shtml
+
+作者:[Marius Nestor][a]
+译者:[译者ID](https://github.com/译者ID)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: http://news.softpedia.com/editors/browse/marius-nestor
+[1]: http://news.softpedia.com/news/owncloud-partnerships-with-wd-to-bring-self-hosted-cloud-storage-in-users-homes-497512.shtml
+[2]: http://people.canonical.com/~kyrofa/owncloud-pi/
+[3]: https://owncloud.org/blog/wd-labs-raspberry-pi-owncloud-and-ubuntu/

From 981785b0124e390c18d1cf6183bda0da4906a26b Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Sat, 19 Mar 2016 22:06:32 +0800
Subject: [PATCH 1181/1710] =?UTF-8?q?20160319-2=20=E9=80=89=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...nced-Based-on-Debian-GNU-Linux 8 Jessie.md | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 sources/news/20160318-Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md

diff --git a/sources/news/20160318-Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md b/sources/news/20160318-Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md
new file mode 100644
index 0000000000..059ea0cfe1
--- /dev/null
+++ b/sources/news/20160318-Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md	
@@ -0,0 +1,40 @@
+Robolinux 8.4 LTS "Raptor" Series Announced, Based on Debian GNU/Linux 8 Jessie
+====================================================================================
+
+keyword : Robolinux 8.4 LTS , Robolinux 8.4 Cinnamon , Robolinux 8.4 MATE , Robolinux 8.4 Xfce , Debian 8
+
+> It runs Windows 7 and 10 virus-free in stealth VMs
+
+### The developer of the Robolinux project has announced the release of his latest Robolinux 8.4 LTS "Raptor" series of Debian-based operating systems, which includes numerous software updates and performance improvements.
+
+Usually, the Robolinux developer [announces][1] only one edition at a time for a new major release of the GNU/Linux distribution, but today's announcement includes details about the availability for download of the Robolinux 8.4 LTS Cinnamon, MATE, Xfce, and LXDE editions, as both 64-bit and 32-bit variants.
+
+The long-term supported Robolinux 8.4 series of distributions has been in development for the last three and a half months, during which it has been synchronized with the upstream Debian GNU/Linux 8 (Jessie) repositories, thus adding all the latest security patches and software updates.
+
+"Three and a half months of hard work went into finding every way possible to optimize and speed up our series 8 Robolinux 'Raptor' operating systems," say the devs. "The result is we have significantly decreased the time it takes to load applications, bootup and shutdown all four of our upgraded Robolinux Raptor series versions.
+
+### The Raptor series is supported until 2020
+
+Powered by Debian GNU/Linux 8's Linux 3.16 kernel, all the Robolinux 8.4 LTS "Raptor" editions have been rebased on the current stable Debian 8.3 source code, including over 180 upstream security and application updates. As Google ended support for the 32-bit version of its Google Chrome web browser, Robolinux now switches to Chromium.
+
+Other important software updates include the Mozilla Firefox 45.0 web browser, Mozilla Thunderbird 38.7.0 email and news client, Tor Browser 5.5, and VirtualBox 5.0. As usual, all Robolinux flavors come with numerous popular apps, including but not limited to Google Earth, Skype, Tor, I2P, Kazam, and a collection of useful security and privacy apps.
+
+Robolinux is a distribution targeted at new Linux users, so as expected, it includes the stealth virtual machine technology that lets them run the Microsoft Windows XP, Windows 7, and Windows 10 operating systems virus-free. Best of all, the Robolinux 8 "Raptor" LTS series is supported with software updates and security patches until the year 2020.
+
+While newcomers can [download the Robolinux 8.4 LTS Cinnamon, MATE][2], [Xfce][3], and [LXDE][4] editions right now from our website, current Robolinux 8 users can upgrade to the 8.4 release using the built-in "Robolinux Auto Upgrade" button in the Applications Menu.
+
+--------------------------------------------------------------------------------
+
+via: http://news.softpedia.com/news/robolinux-8-4-lts-raptor-series-announced-based-on-debian-gnu-linux-8-jessie-501899.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://robolinux.org/downloads/v8.4-details.html
+[2]: http://linux.softpedia.com/get/System/Operating-Systems/Linux-Distributions/Robolinux-102332.shtml
+[3]: http://linux.softpedia.com/get/Linux-Distributions/Robolinux-Xfce-103540.shtml
+[4]: http://linux.softpedia.com/get/Linux-Distributions/Robolinux-LXDE-103691.shtml

From c8cd642ba9462897037c74de0c6c14f7b6f6259d Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Sat, 19 Mar 2016 22:16:56 +0800
Subject: [PATCH 1182/1710] Rename
 20160318-Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux
 8 Jessie.md to 20160318
 Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8
 Jessie.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

修改文件名
---
 ...Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename sources/news/{20160318-Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md => 20160318 Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md} (100%)

diff --git a/sources/news/20160318-Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md b/sources/news/20160318 Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md
similarity index 100%
rename from sources/news/20160318-Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md
rename to sources/news/20160318 Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md

From c771d5d10be54c611b0e95945ecdd6c7cf6d698f Mon Sep 17 00:00:00 2001
From: wxy 
Date: Sun, 20 Mar 2016 20:38:23 +0800
Subject: [PATCH 1183/1710] PUB:20160220 Manjaro Linux Is Coming To ARM With
 Manjaro-ARM

@name1e5s
---
 ...Linux Is Coming To ARM With Manjaro-ARM.md | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
 rename {translated/tech => published}/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md (60%)

diff --git a/translated/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md b/published/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md
similarity index 60%
rename from translated/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md
rename to published/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md
index 80670c5c7b..5b8ea027c9 100644
--- a/translated/tech/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md	
+++ b/published/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md	
@@ -3,19 +3,24 @@ Manjaro Linux 即将推出支持 ARM 处理器的 Manjaro-ARM
 
 ![](http://itsfoss.com/wp-content/uploads/2016/02/manjaro-arm.jpg)
 
-最近,Manjaro 的开发者为 ARM 处理器发布了一个[ alpha 版本](https://manjaro.github.io/Manjaro-ARM-launched/)。这是这个基于 Arhclinux 的发行版的一大进步,在此之前,它只能在 32 位或者 64 位的个人电脑上运行。
+最近,Manjaro 的开发者为 ARM 处理器发布了一个 [alpha 版本](https://manjaro.github.io/Manjaro-ARM-launched/)。这是这个基于 Archlinux 的发行版的一大进步,在此之前,它只能在 32 位或者 64 位的个人电脑上运行。
 
-根据公告, “[Manjaro Arm](http://manjaro-arm.org/) 项目致力于将简洁可定制的 Manjaro 移植到使用[ ARM 处理器](https://www.arm.com/)的设备上去。这些设备的数量正在上涨并且应用范围广泛。这些设备中最出名的是树莓派和 BeagleBoard“。目前 Alpha 版本仅支持树莓派2,但是毫无疑问,支持的设备数量会随时间增长。
+根据公告, “[Manjaro Arm](http://manjaro-arm.org/) 项目致力于将简洁可定制的 Manjaro 移植到使用 [ARM 处理器](https://www.arm.com/)的设备上去。这些设备的数量越来越多并且应用范围广泛。这些设备中最出名的是树莓派和 BeagleBoard“。目前 Alpha 版本仅支持树莓派2,但是毫无疑问,支持的设备数量会随时间增长。
 
 现在这个项目的开发者有 dodgejcr, Torei, Strit, 和 Ringo32。他们正在寻求更多的人来帮助这个项目发展。除了开发者,[他们还在寻找维护者,论坛版主,管理员,以及设计师](http://manjaro-arm.org/forums/website/looking-for-contributors/?PHPSESSID=876d5c11400e9c25eb727e9965300a9a)。
 
-Manjaro-ARM 将会有四个版本。媒体版本将可以运行Kodi并且允许你很少配置就能创建一个媒体中心。服务器版将会预先配置好 SSH,FTP,LAMP ,你能把你的 ARM 设备当作服务器使用。基本版是一个桌面版本,自带一个 XFCE 桌面。如果你想自己从头折腾系统的话你可以选择迷你版,它没有任何预先配置的包,仅仅包含一个 root 用户。
+Manjaro-ARM 将会有四个版本:
 
-## 我的想法
+- 媒体版本将可以运行 Kodi 并且允许你用很少的配置就能创建一个媒体中心。
+- 服务器版将会预先配置好 SSH,FTP,LAMP ,你能把你的 ARM 设备当作服务器使用。
+- 基本版是一个桌面版本,自带一个 XFCE 桌面。
+- 如果你想自己从头折腾系统的话你可以选择迷你版,它没有任何预先配置的软件包,仅仅包含一个 root 用户。
 
-作为一个 Manjaro 的粉丝(我在 4 个电脑上都安了 Manjaro),听说他们分支出一个 ARM 版我很高兴。 ARM 处理器被用到了越来越多的设备当中。如同评论员 Robert Cringely 所说, [设备制造商开始注意到昂贵的因特尔或者AMD处理器之外的便宜的多的ARM处理器](http://www.cringely.com/2016/01/21/prediction-8-intel-starts-to-become-irrelevent/)。甚至微软(憋打我)都开始考虑将自己的一些软件移植到 ARM 处理器上去。随着 ARM 处理器设备数量的增多,Manjaro 将会带给用户良好的体验。
+### 我的想法
 
-对此,你怎样看待?你希望更多的发行版支持 ARM 吗?或者你认为 ARM 将是昙花一现?在评论区告诉我们。
+作为一个 Manjaro 的粉丝(我在 4 个电脑上都安了 Manjaro),听说他们分支出一个 ARM 版我很高兴。 ARM 处理器被用到了越来越多的设备当中。如同评论员 Robert Cringely 所说, [设备制造商开始注意到昂贵的因特尔、AMD 处理器之外的便宜的多的 ARM 处理器](http://www.cringely.com/2016/01/21/prediction-8-intel-starts-to-become-irrelevent/)。甚至微软(别打我)都开始考虑将自己的一些软件移植到 ARM 处理器上去。随着 ARM 处理器设备数量的增多,Manjaro 将会带给用户良好的体验。
+
+对此,你怎样看?你希望更多的发行版支持 ARM 吗?或者你认为 ARM 将是昙花一现?在评论区告诉我们。
 
 ------------------------------------------------------------------------------
 
@@ -23,7 +28,7 @@ via: http://itsfoss.com/manjaro-linux-arm/
 
 作者:[JOHN PAUL][a]
 译者:[name1e5s](https://github.com/name1e5s)
-校对:[校对者ID](https://github.com/校对者ID)
+校对:[wxy](https://github.com/wxy)
 
 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
 

From 35c084e15ec66e477ae98138143539a9e5bcf7c6 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Sun, 20 Mar 2016 21:15:32 +0800
Subject: [PATCH 1184/1710] PUB:20151125 20 Years of GIMP Evolution--Step by
 Step

@GHLandy
---
 ...0 Years of GIMP Evolution--Step by Step.md | 96 +++++++++----------
 1 file changed, 45 insertions(+), 51 deletions(-)
 rename {translated/talk => published}/20151125 20 Years of GIMP Evolution--Step by Step.md (64%)

diff --git a/translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md b/published/20151125 20 Years of GIMP Evolution--Step by Step.md
similarity index 64%
rename from translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md
rename to published/20151125 20 Years of GIMP Evolution--Step by Step.md
index 20acfc1ee8..6da552aa39 100644
--- a/translated/talk/20151125 20 Years of GIMP Evolution--Step by Step.md	
+++ b/published/20151125 20 Years of GIMP Evolution--Step by Step.md	
@@ -1,57 +1,51 @@
-GHLandy Translated
-
 GIMP 过去的 20 年:一点一滴的进步
 ================================================================================
 注:youtube 视频
 
 
-[GIMP][1](GNU 图像处理程序)—— 一流的开源免费图像处理程序。加州大学伯克利分校的 Peter Mattis 和 Spencer Kimball 最早在 1995 年的时候就进行了该程序的开发。到了 1997 年,该程序成为了 [GNU Project][2] 官方的一部分,并正式更名为 GIMP。时至今日,GIMP 已经成为了最好的图像编辑器之一,并有最受欢迎的 “GIMP vs Photoshop” 之争。
+[GIMP][1](GNU 图像处理程序(GNU Image Manipulation Program))—— 一流的开源自由的图像处理程序。加州大学伯克利分校的 Peter Mattis 和 Spencer Kimball 早在 1995 年的时候开始了该程序的开发。到了 1997 年,该程序成为了 [GNU Project][2] 官方的一部分,并正式更名为 GIMP。时至今日,GIMP 已经成为了最好的图像编辑器之一,并有经常有 “GIMP vs Photoshop” 之争。
 
-1995 年 11 月 21 日,首版发布:
+### 1995 年 11 月 21 日,首版发布###
 
-> 发布者: Peter Mattis
-> 
-> 发布主题: ANNOUNCE: The GIMP
-> 
-> 日期: 1995-11-21
-> 
-> 消息ID: <48s543$r7b@agate.berkeley.edu>
-> 
-> 新闻组: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps
-> 
-> GIMP:通用图像处理程序
-> ------------------------------------------------
-> 
-> GIMP 是为各种图像编辑操作提供一个直观的图形界面而设计的。
-> 
-> 以下是 GIMP 的主要功能介绍:
-> 
->  图像查看
->  -------------
-> 
->    *  支持 8 位,15 位,16 位和 24 位颜色
->    *  8 位色显示的图像序列的稳定算法
->    *  以 RGB 色、灰度和索引色模式查看图像
->    *  同时编辑多个图像
->    *  实时缩放和全图查看
->    *  支持 GIF、JPEG、PNG、TIFF 和 XPM 格式
-> 
->  图像编辑
->  -------------
-> 
->    *  选区工具:包括矩形、椭圆、自由、模糊、贝尔赛曲线以及智能
->    *  变换工具:包括旋转、缩放、剪切和翻转
->    *  绘画工具:包括油漆桶、笔刷、喷枪、克隆、卷积、混合和文本
->    *  效果滤镜:如模糊和边缘检测
->    *  通道和颜色操作:叠加、反相和分解
->    *  组件功能:允许你方便的添加新的文件格式和效果滤镜
->    *  多步撤销/重做功能
+```
+From: Peter Mattis
+Subject: ANNOUNCE: The GIMP
+Date: 1995-11-21
+Message-ID: <48s543$r7b@agate.berkeley.edu>
+Newsgroups: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps
 
-1996 年,GIMP 0.54 版
+GIMP:通用图像处理程序
+------------------------------------------------
+
+GIMP 是为各种图像编辑操作提供一个直观的图形界面而设计的。
+以下是 GIMP 的主要功能介绍:
+ 图像查看
+ -------------
+
+   *  支持 8 位,15 位,16 位和 24 位颜色
+   *  8 位色显示图像的排序和 Floyd-Steinberg 抖动算法
+   *  以 RGB 色、灰度和索引色模式查看图像
+   *  同时编辑多个图像
+   *  实时缩放和全图查看
+   *  支持 GIF、JPEG、PNG、TIFF 和 XPM 格式
+
+ 图像编辑
+ -------------
+
+   *  选区工具:包括矩形、椭圆、自由、模糊、贝尔赛曲线以及智能
+   *  变换工具:包括旋转、缩放、剪切和翻转
+   *  绘画工具:包括油漆桶、笔刷、喷枪、克隆、卷积、混合和文本
+   *  效果滤镜:如模糊和边缘检测
+   *  通道和颜色操作:叠加、反相和分解
+   *  组件功能:允许你方便的添加新的文件格式和效果滤镜
+   *  多步撤销/重做功能
+```
+
+### 1996 年,GIMP 0.54 版 ###
 
 ![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/054.png)
 
-GIMP 0.54 版需要具备 X11 显示、X-server 以及 Motif 1.2 微件,支持 8 位、15 位、16 位和 24 位的颜色深度和灰度,支持 GIF、JPEG、PNG、TIFF 和 XPM 图像格式。
+GIMP 0.54 版需要具备 X11 显示、X-server 以及 Motif 1.2 组件,支持 8 位、15 位、16 位和 24 位的颜色深度和灰度,支持 GIF、JPEG、PNG、TIFF 和 XPM 图像格式。
 
 基本功能:具备矩形、椭圆、自由、模糊、贝塞尔曲线和智能等选择工具,旋转、缩放、剪切、克隆、混合和翻转等变换工具。
 
@@ -66,7 +60,7 @@ GIMP 0.54 版可以在  Linux、HP-UX、Solaris 和 SGI IRIX 中运行。
 这只是一个开发版本,并非面向用户发布的。GIMP 有了新的工具包——GDK(GIMP Drawing Kit,GIMP 绘图工具)和 GTK(GIMP Toolkit,GIMP 工具包),并弃用 Motif。GIMP 工具包随后也发展成为了 GTK+ 跨平台的微件工具包。新特性:
 
 - 基本的图层功能
-- 子像素采集
+- 子像素取样
 - 笔刷间距
 - 改进剂喷枪功能
 - 绘制模式
@@ -75,7 +69,7 @@ GIMP 0.54 版可以在  Linux、HP-UX、Solaris 和 SGI IRIX 中运行。
 
 ![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/099.png)
 
-从 0.99 版本开始,GIMP 有了宏脚本的支持。GTK 及 GTK 功能增强版正式更名为 GTK+。其他更新:
+从 0.99 版本开始,GIMP 有了宏脚本的支持。GTK 及 GDK 功能增强版正式更名为 GTK+。其他更新:
 
 - 支持大体积图像(大于 100M)
 - 新增原生格式 – XCF
@@ -87,8 +81,8 @@ GIMP 0.54 版可以在  Linux、HP-UX、Solaris 和 SGI IRIX 中运行。
 
 GIMP 和 GTK+ 开始分为两个不同的项目。GIMP 官网进行重构,包含新教程、组件和文档。新特性:
 
-- 基于瓦片式的内存管理
-- 组件 API 做了较大改变
+- 基于瓦片式(tile)的内存管理
+- 组件 API 做了大量改变
 - XFC 格式现在支持图层、导航和选择
 - web 界面
 - 在线图像生成
@@ -98,7 +92,7 @@ GIMP 和 GTK+ 开始分为两个不同的项目。GIMP 官网进行重构,包
 新特性:
 
 - 进行了非英文语言翻译
-- 修复 GTK+ 和 GIMP 中的大量bug
+- 修复 GTK+ 和 GIMP 中的大量 bug
 - 增加大量组件
 - 图像映射
 - 新工具:调整大小、测量、加亮、燃烧效果、颜色吸管和翻转等。
@@ -106,7 +100,7 @@ GIMP 和 GTK+ 开始分为两个不同的项目。GIMP 官网进行重构,包
 - 保存前可以进行图像预览
 - 按比例缩放的笔刷进行预览
 - 通过路径进行递归选择
-- 新的窗口导航
+- 新的导航窗口
 - 支持图像拖拽
 - 支持水印
 
@@ -138,7 +132,7 @@ GIMP 和 GTK+ 开始分为两个不同的项目。GIMP 官网进行重构,包
 
 - 更新了图形界面
 - 新的选择工具
-- 继承了 GEGL (GEneric Graphics Library,通用图形库)
+- 集成了 GEGL (GEneric Graphics Library,通用图形库)
 - 为 MDI 行为实现了实用程序窗口提示
 
 ### 2012 年,GIMP 2.8 版 ###
@@ -160,7 +154,7 @@ via: https://tlhp.cf/20-years-of-gimp-evolution/
 
 作者:[Pavlo Rudyi][a]
 译者:[GHLandy](https://github.com/GHLandy)
-校对:[校对者ID](https://github.com/校对者ID)
+校对:[wxy](https://github.com/wxy)
 
 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
 

From c6f5b0ce5a5044d335198cd515a3b32597cdadb3 Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Sun, 20 Mar 2016 23:13:22 +0800
Subject: [PATCH 1185/1710] translating

---
 ...Raspberry Pi projects for the classroom.md | 35 ++++++++++++++++---
 1 file changed, 30 insertions(+), 5 deletions(-)

diff --git a/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md b/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md
index b1bc89b2a0..b7455d11f7 100644
--- a/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md	
+++ b/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md	
@@ -3,57 +3,82 @@ ezio
 5 great Raspberry Pi projects for the classroom
 =====================================================
 
+
+5 个很适合在课堂上演示的树莓派项目
+=====================================================
+
 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png?itok=fSUS0fIt)
 
-### 1. Minecraft Pi
+### 1. 我的世界 Pi
 
 ![](https://opensource.com/sites/default/files/lava.png)
 >Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1].
 
 Minecraft is the favorite game of pretty much every teenager in the world—and it's one of the most creative games ever to capture the attention of young people. The version that comes with every Raspberry Pi is not only a creative thinking building game, but comes with a programming interface allowing for additional interaction with the Minecraft world through Python code.
 
+我的世界是世界上很多青少年最喜欢的一个游戏,而且他也是目前最能激发年轻人创造力的一款游戏。这个树莓派版上自带的我的世界不仅仅是一个具有创造性的建筑游戏,他还是一个具有编程接口、可以通过 Python 与之交互的版本。
+
 Minecraft: Pi Edition is a great way for teachers to engage students with problem solving and writing code to perform tasks. You can use the Python API to build a house and have it follow you wherever you go, build a bridge wherever you walk, make it rain lava, show the temperature in the sky, and anything else your imagination can create.
 
+我的世界:Pi 版对于老师来说是一个非常好的教授学生解决问题和编写代码完成任务的途径。你可以使用 Python API 创建一个房子,并且一直跟随这你的脚步移动,当你需要桥梁的时候给你建造一座桥,让老天呀下雨,显示天空的温度,以及其它你可以想象到的一切东西。
+
 Read more in "[Getting Started with Minecraft Pi][2]."
 
-### 2. Reaction game and traffic lights
+详情请见 "[Getting Started with Minecraft Pi][2]."
+
+### 2. 反应游戏和交通灯 Reaction game and traffic lights
 
 ![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg)
 >Courtesy of [Low Voltage Labs][3]. [CC BY-SA 4.0][1].
 
 It's really easy to get started with physical computing on Raspberry Pi—just connect up LEDs and buttons to the GPIO pins, and with a few lines of code you can turn lights on and control things with button presses. Once you know the code to do the basics, it's down to your imagination as to what you do next!
 
+使用树莓派可以很轻松的进行物理计算——只需要连接几个 LED 和按钮到 开发板上的 GPIO 接口,再用几行代码你就可以按下按钮来开灯。一旦你指导了如何使用代码来做这些基本的东西,接下来就可以根据你的想象来做其它事情了。
+
 If you know how to flash one light, you can flash three. Pick out three LEDs in traffic light colors and you can code the traffic light sequence. If you know how to use a button to a trigger an event, then you have a pedestrian crossing! Also look out for great pre-built traffic light add-ons like [PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6], and more.
 
+如果你知道如何让一个灯闪烁,你就可以让三个灯开始闪烁。挑选三个和交通灯一样颜色的 LED 灯,然后编写控制交通灯的代码。如果你知道如何使用按钮触发实践,那么你就可以模拟行人过马路。同时你可以参考其它已经完成的交通灯附件,比如[PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6],等等。
+
 It's not always about the code—this can be used as an exercise in understanding how real world systems are devised. Computational thinking is a useful skill in any walk of life.
 
+代码并不是全部——这些联系只是让你理解真是世界里使如何完成这些事的。计算思维是一个在你一生中都会很有用的技能。
+
 ![](https://opensource.com/sites/default/files/reaction-game.png)
 >Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1].
 
 Next, try wiring up two buttons and an LED and making a two-player reaction game—let the light come on after a random amount of time and see who can press the button first!
 
+接下来试着接通两个按钮和 LED 灯的电源,实现一个反应游戏 —— 让 LED 灯随机的点亮,然后看是最先按下按钮。
+
 To learn more, check out [GPIO Zero recipes][7]. Everything you need is in [CamJam EduKit 1][8].
 
-### 3. Sense HAT Pixel Pet
+要想了解更多可以看看 [GPIO Zero recipes][7]。你所需要的资料都可以在 [CamJam EduKit 1][8] 找到。
+
+### 3. 电子宠物 Sense HAT Pixel Pet
 
 The Astro Pi—an augmented Raspberry Pi—is going to space this December, but you haven't missed your chance to get your hands on the hardware. The Sense HAT is the sensor board add-on used in the Astro Pi mission and it's available for anyone to buy. You can use it for data collection, science experiments, games and more. Watch this Gurl Geek Diaries video from Raspberry Pi's Carrie Anne for a great way to get started—by bringing to life an animated pixel pet of your own design on the Sense HAT display:
 
+Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是你并没有错过亲手把玩这个硬件的机会。Sense HAT 是 Astro Pi 的一个传感器扩展板,现在已经开放购买了。你可以使用它来进行数据搜集,科学实验,游戏和其它很多事。可以看看下面树莓派的 Carrie Anne 拍摄的 Gurl Geek Diaries 的视频,里面演示了一种很棒的入门途径——给生活添加一个你自己创造的生动的像素宠物:
+
 [video](https://youtu.be/gfRDFvEVz-w)
 
 >Learn more in "[Exploring the Sense HAT][9]."
+>详见 "[探索 Sense HAT][9]."
 
-### 4. Infrared bird box
+### 4. 红外鸟笼 Infrared bird box
 
 ![](https://opensource.com/sites/default/files/ir-bird-box.png)
 >Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1].
 
 A great exercise for the whole class to get involved with—place a Raspberry Pi and the NoIR camera module inside a bird box along with some infra-red lights so you can see in the dark, then stream video from the Pi over the network or on the internet. Wait for birds to nest and you can observe them without disturbing them in their habitat.
 
+
+
 Learn all about infrared and the light spectrum, and how to adjust the camera focus and control the camera in software.
 
 Learn more in "[Make an infrared bird box][10]."
 
-### 5. Robotics
+### 5. 机器人 Robotics
 
 ![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg)
 >Courtesy of Low Voltage Labs. [CC BY-SA 4.0][1].

From 9bc3cd8d9330742394c36f909567de323277e742 Mon Sep 17 00:00:00 2001
From: geekpi 
Date: Mon, 21 Mar 2016 10:01:12 +0800
Subject: [PATCH 1186/1710] translating

---
 ...to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md b/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md
index a03f9dd355..b9c93cc1cd 100644
--- a/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md	
+++ b/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md	
@@ -1,3 +1,5 @@
+----translating----
+
 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3
 ===============================================================================
 

From b34b5e74da9f6e2de2b7778e8d9eb4dba88b9060 Mon Sep 17 00:00:00 2001
From: geekpi 
Date: Mon, 21 Mar 2016 10:31:28 +0800
Subject: [PATCH 1187/1710] translated

---
 ...buntu Core 16.04 LTS and Raspberry Pi 3.md | 37 -------------------
 ...buntu Core 16.04 LTS and Raspberry Pi 3.md | 37 +++++++++++++++++++
 2 files changed, 37 insertions(+), 37 deletions(-)
 delete mode 100644 sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md
 create mode 100644 translated/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md

diff --git a/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md b/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md
deleted file mode 100644
index b9c93cc1cd..0000000000
--- a/sources/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md	
+++ /dev/null
@@ -1,37 +0,0 @@
-----translating----
-
-ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3
-===============================================================================
-
-keyword : ownCloud Pi , Snappy Ubuntu Core 16.04 LTS , Raspberry Pi 3 , Western Digital , PiDrive
-
-### We [reported][1] last year that ownCloud was in talks with WD (Western Digital) Labs to help them develop a community project that would bring a self-hosted cloud storage device in users' homes.
-
-The idea behind the self-hosted device, which will be powered by the ownCloud Server software, was to combine a Raspberry Pi single-board computer with a Western Digital disk drive into an easy-to-install and out-of-the-box container.
-
-Well, it looks like the community's response was more than positive, and many great proposals and ideas were received for the ownCloud Pi project. And today, they have even greater news for us, as the first images are available for [download][2].
-
-The ownCloud Pi images are based on the latest Snappy Ubuntu Core 16.04 LTS operating system, which was designed by Canonical for embedded and IoT (Internet of Things) devices, as well as the new Raspberry Pi 3 Model B SBC.
-
-"We’re looking for help in the ownCloud, Ubuntu, Raspberry Pi and WD Labs communities for help to test and improve them and will be able to make available a first batch of about 30 devices at the end of next week," say the ownCloud developers in today's [announcement][3].
-
-### Current obstacles, challenges, and the road ahead
-
-At the moment, the team is working hard on finishing their ownCloud Pi device solution based on the Xenial Xerus edition of Snappy Ubuntu Core. Thus, the new 64-bit Raspberry Pi 3 computer helps them with the obstacles encountered during previous tests running on the Raspberry Pi 2 board, such as support for files larger than 2GB.
-
-Therefore, it looks like the decision was taken, and the final ownCloud Pi device, which should be available as a preview later this spring, will be powered by the Raspberry Pi 3 single-board computer. In the coming days, we should be able to purchase the first production-ready version of the ownCloud Pi device.
-
---------------------------------------------------------------------------------
-
-via: http://news.softpedia.com/news/owncloud-pi-device-to-run-on-snappy-ubuntu-core-16-04-lts-and-raspberry-pi-3-501904.shtml
-
-作者:[Marius Nestor][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]: http://news.softpedia.com/editors/browse/marius-nestor
-[1]: http://news.softpedia.com/news/owncloud-partnerships-with-wd-to-bring-self-hosted-cloud-storage-in-users-homes-497512.shtml
-[2]: http://people.canonical.com/~kyrofa/owncloud-pi/
-[3]: https://owncloud.org/blog/wd-labs-raspberry-pi-owncloud-and-ubuntu/
diff --git a/translated/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md b/translated/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md
new file mode 100644
index 0000000000..7b65226250
--- /dev/null
+++ b/translated/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md	
@@ -0,0 +1,37 @@
+ownCloud Pi设备将在Snappy Ubuntu Core 16.04 LTS及树莓派3中运行
+===============================================================================
+
+关键词 : ownCloud Pi , Snappy Ubuntu Core 16.04 LTS , Raspberry Pi 3 , Western Digital , PiDrive
+
+### 我们去年[报道了][1] ownCloud正与西部数据(ownCloud)实验室交谈帮助他们开发一个社区项目,可以在家自托管的云存储设备。
+
+自托管设备背后的理念,是由ownCloud服务端软件承载的,它结合了树莓派和西数硬盘到一个易安装和开箱即用的容器中。
+
+社区的反应看上去很积极,ownCloud Pi收到了许多好的提议和点子。今天,我们收到了一个更好的消息,首个镜像可以[下载][2]了。
+
+ownCloud Pi基于最新的Snappy Ubuntu Core 16.04 LTS系统,它由Canonical为嵌入式和IoT(Internet of Things)及新的树莓派3 Model B设计。
+
+ownCloud的开发者在今天的[声明][3]中称:“我们正在寻求ownCloud、Ubuntu、树莓派和西数实验室的帮助来帮助测试和提高它们,并且可以在下周发布首批30台设备”。
+
+### 目前的阻碍、挑战及前进的路
+
+目前团队正致力于在基于Xenial Xerus版本的Snappy Ubuntu内核上完成他们的ownCloud Pi设备方案。那么,新的64位树莓派3可以帮助它们克服之前在树莓派2上遇到的阻碍,比如支持大于2GB的文件。
+
+由此看来决定已经有了,最终的ownCloud Pi将在今年春天发布预览版,它将会在树莓派3上运行。之后,我们应该就可以购买首批生产就绪版本的ownCloud Pi设备了。
+
+--------------------------------------------------------------------------------
+
+via: http://news.softpedia.com/news/owncloud-pi-device-to-run-on-snappy-ubuntu-core-16-04-lts-and-raspberry-pi-3-501904.shtml
+
+作者:[Marius Nestor][a]
+译者:[geekpi](https://github.com/geekpi)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: http://news.softpedia.com/editors/browse/marius-nestor
+[1]: http://news.softpedia.com/news/owncloud-partnerships-with-wd-to-bring-self-hosted-cloud-storage-in-users-homes-497512.shtml
+[2]: http://people.canonical.com/~kyrofa/owncloud-pi/
+[3]: https://owncloud.org/blog/wd-labs-raspberry-pi-owncloud-and-ubuntu/
+
+

From 576947f4094384253a7ce4dbd9291f10710a7e03 Mon Sep 17 00:00:00 2001
From: miaolin 
Date: Mon, 21 Mar 2016 20:56:36 +0800
Subject: [PATCH 1188/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=BA=86=E4=B8=80?=
 =?UTF-8?q?=E9=83=A8=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

别回收,这两天完成
---
 ... Getting to Know Linux File Permissions.md | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/sources/tech/20160218 Getting to Know Linux File Permissions.md b/sources/tech/20160218 Getting to Know Linux File Permissions.md
index 816f499e36..be48dbbe5a 100644
--- a/sources/tech/20160218 Getting to Know Linux File Permissions.md	
+++ b/sources/tech/20160218 Getting to Know Linux File Permissions.md	
@@ -1,28 +1,39 @@
 ynmlml translating 
 Getting to Know Linux File Permissions
 ==========================================
-
+初识Linux文件系统
+==========================================
 ![](http://www.linux.com/images/stories/66866/files_a.png)
 
 One of the most basic tasks in Linux is setting file permissions. Understanding how this is done should be considered a must-know, first step in your travels through the Linux ecosystem. As you might expect, such a fundamental issue within the operating environment hasn’t changed much over the years. In fact, the Linux file permission system is taken directly from the UNIX file permission (and even uses many of the same tools).
+在Linux中最基本的任务就是设置文件权限。理解如何实现是你进入LInux世界的第一步。如您所料,这一基本操作在类UNIX操作系统中大同小异。实际上,Linux文件权限系统就直接来取自UNIX文件权限(甚至使用许多相同的工具)。
 
 But, don’t think for a second that understanding file permissions is something you’ll wind up having to spend days and days studying...it’s actually quite simple. Let’s walk through what you need to know and how to put it all together.
+但不要以为在学习第二种文件权限的时候你需要再次一点一点的学起。事实上会很简单,让我们一起来看看你需要了解哪些内容以及如何使用它们。
 
 ## The Bits and Pieces
+##预备小知识
 
 The first thing you need to understand is what file permissions apply to. Effectively what you do is apply a permission to a group. When you break it down, the concept really is that simple. But what are the permissions and what are the groups?
+首先你要知道文件权限有什么用,有效的设置一个组的权限。当你将其分解,那这个概念就真的很简单了。那到底什么是权限什么是组呢。
 
 There are three types of permissions you can apply:
+你可以设置的3种权限:
 
 - read — gives the group permission to read the file (indicated with `r`)
+- 读 — 允许该组读文件(用`r`表示)
 
 - write — gives the group permission to edit the file (indicated with `w`)
+- 写 — 允许该组写文件(用`w`表示)
 
 - execute — gives the group permission to execute (run) the file (indicated with `x`)
+- 执行 — 允许该组执行(运行)文件(用`x`表示)
 
 To better explain how this is applied to a group, you could, for example, give a group permission to read and write to a file, but not execute the file. Or, you could give a group permission to read and execute a file, but not write to a file. You can even give a group full permission to read, write, and execute a file or strip a group of any access to a file by removing all permissions.
+为了更好的解释为何是应用于一个组,你可是尝试允许一个组读和写一个文件,但不能执行。或者你可以允许一个组读和执行一个文件,但不能写。甚至你可以允许一组有读、写、执行全部的权限,也可以删除全部权限。
 
 Now, what are the groups? There are four:
+那什么是分组呢,有以下4个:
 
 - user — the actual owner of the file
 
@@ -31,8 +42,12 @@ Now, what are the groups? There are four:
 - others — other users not in the file’s group
 
 - all — all users
-
+- user — 文件实际的拥有者
+- group — 用户所在的组
+- others — 用户组内的其他用户
+- all — 所有用户
 For the most part, you will only really ever bother with the first three groups. The all group is really only used as a shortcut (I’ll explain later).
+大多数情况,你只会对前3组进行操作,all这一组只是作为快捷方式(稍后我会解释)。
 
 So far so simple, right? Let’s layer on a bit of complexity.
 

From 3e0aeea596e159b2a2a44540d5ac4cd7acd83d41 Mon Sep 17 00:00:00 2001
From: miaolin 
Date: Tue, 22 Mar 2016 20:51:17 +0800
Subject: [PATCH 1189/1710] Create Getting to Know Linux File Permissions

---
 .../Getting to Know Linux File Permissions    | 160 ++++++++++++++++++
 1 file changed, 160 insertions(+)
 create mode 100644 translated/tech/Getting to Know Linux File Permissions

diff --git a/translated/tech/Getting to Know Linux File Permissions b/translated/tech/Getting to Know Linux File Permissions
new file mode 100644
index 0000000000..fb75030b0a
--- /dev/null
+++ b/translated/tech/Getting to Know Linux File Permissions	
@@ -0,0 +1,160 @@
+初识Linux文件系统
+==========================================
+
+![](http://www.linux.com/images/stories/66866/files_a.png)
+
+在Linux中最基本的任务就是设置文件权限。理解如何实现是你进入LInux世界的第一步。如您所料,这一基本操作在类UNIX操作系统中大同小异。
+实际上,Linux文件权限系统就直接取自UNIX文件权限(甚至使用许多相同的工具)。
+
+但不要以为在学习第二种文件权限系统的时候你需要再次一点一点的学起。事实上会很简单,让我们一起来看看你需要了解哪些内容以及如何使用它们。
+
+##基础概念
+
+首先你要知道文件权限适用于什么,如何有效的设置一个分组的权限。当你将其分解,那这个概念就真的简单多了。那到底什么是权限什么是分组呢。
+
+你可以设置的3种权限:
+
+- 读 — 允许该组读文件(用`r`表示)
+
+- 写 — 允许该组写文件(用`w`表示)
+
+- 执行 — 允许该组执行(运行)文件(用`x`表示)
+
+为了更好的解释为何是应用于一个分组,你可是尝试允许一个分组读和写一个文件,但不能执行。或者你可以允许一个组读和执行一个文件,但不能写。
+甚至你可以允许一组有读、写、执行全部的权限,也可以删除全部权限。
+
+什么是分组呢,有以下4个:
+
+- user — 文件实际的拥有者
+
+- group — 用户所在的组
+
+- others — 用户组内的其他用户
+
+- all — 所有用户
+
+大多数情况,你只会对前3组进行操作,all这一组只是作为快捷方式(稍后我会解释)。
+
+到目前为止很简单,对吧?接下来我们将深入一层。
+
+如果你打开一个终端并运行命令 ls -l ,你将会看到逐行列出当前工作目录下所有的文件和文件夹的列表(如图1).
+
+你会留意到最左边那列是像·-rw-rw-r--·这样的。
+
+实际上这列表该这样看的:
+
+>rw- rw- r--
+
+将其分为如下3部分:
+
+- rw-
+
+- rw-
+
+- r--
+
+权限和组的顺序都很重要,顺序总是:
+
+- 用户 组 其他 — 分组
+
+- 读 写 操作 — 权限
+
+在我们上面示例的权限列表中,用户拥有读/写权限,用户组拥有读/写权限,其他用户仅拥有读权限。这些分组中赋予执行权限的话,就用一个x表示。
+
+## 等效数值
+
+接下来我们让它更复杂一些,每个权限都可以用一个数字表示。这些数字是:
+
+- 读 — 4
+
+- 写 — 2
+
+- 执行— 1
+
+数值代替不是一个一个的替换,你不能像这样:
+
+>-42-42-4--
+
+你该把每个分组的数值相加,给用户读和写权限,你该用4 + 2 得到6。给用户组相同的权限,也是使用相同的数值。假如你只想给其他用户读的权限,
+那就设置它为4。现在用数只表示为:
+
+>664
+
+如果你想给一个文件664权限,你可以使用chmod命令,如:
+
+>chmod 664 FILENAME
+
+FILENAME处为文件名。
+
+## 更改权限
+
+既然你已经理解了文件权限,那是时候学习如何更改这些权限了。就是使用chmod命令来实现。第一步你要知道你能否更改文件权限,
+你必须是文件的所有者或者有权限编辑文件(或者使用su或sudo进行操作)。正因为这样,你不能随意切换目录和更改文件权限。
+
+
+继续用我们的例子(`-rw-rw-r--`),假设这个文件(命名为script.sh)实际是个shell脚本,需要执行。但是你你只想让自己有权限执行这个脚本。
+这个时候,你可能会想:“我需要是文件的权限如`-rwx-rw-r--`这样来设置`x`”。实际你可以这样使用chmod命令:
+
+>chmod u+x script.sh
+
+这时候,列表中显示的应该是 -rwx-rw-r-- 。
+
+如果你想同时让用户及其所在组同时拥有执行权限,命令应该这样:
+
+>chmod ug+x script.sh
+
+
+明白这是怎么工作的了,下面我们让它更有趣些。不管什么原因,你不小心给了所有分组对文件的执行权限(列表中是这样的 `-rwx-rwx-r-x` )。
+如果你想去除其他用户的执行权限,只需运行命令:
+
+>chmod o-x script.sh
+
+如果你想完全删除文件的可执行权限,你可以用两种方法:
+
+>chmod ugo-x script.sh
+
+或者
+
+>chmod a-x script.sh
+
+以上就是所有内容,能使操作更有效率。我希望能避免哪些可能会导致一些问题的操作(例如你不小心对script.sh使用`a-rwx`这样的chmod命令)。
+
+## 目录权限
+
+You can also execute the chmod command on a directory. When you create a new directory as a user, it is typically created with the following permissions:
+你也可以对一个目录执行chmod命令,当你创建一个新的目录,通常新建目录具有这样的权限:
+
+>drwxrwxr-x
+
+注:开头的d表示这是一个目录。
+
+正如你所见,用户及其所在组都对文件夹具有操作权限,但这并不意味着在这文件夹中出创建的问价也具有与其相同的权限
+(创建的文件使用默认系统的权限`-rw-rw-r--`)。但如果你想在新文件夹中创建文件,并且移除用户组的写权限,
+你不用切换到该目录下并对所有文件使用chmod命令。你可以用加上参数R(意味着递归)的chmod命令,同时更改该文件夹及其目录下所有的文件的权限。
+
+现在,假设有一文件夹TEST,里面有一些脚本,所有这些(包括TEST文件夹)拥有权限`-rwxrwxr-x`。如果你想移除用户组的写权限,
+你可以运行命令:
+
+>chmod -R g-w TEST
+
+运行命令`ls -l`,你讲看到列出的TEST文件夹的权限信息是`drwxr-xr-x`。用户组被去除了写权限(其目录下的所有文件也如此)。
+
+## 总结
+
+现在,你应该对基本的Linux文件权限有了深入的理解。对于更高级的东西学起来会很轻松,像setid,setuid和ACLs这些。没有良好的基础,
+你很快就会混淆不清概念的。
+
+Linux文件权限从早期到现在没有太大变化,而且很可能以后也不会。
+
+
+------------------------------------------------------------------------------
+
+via: http://www.linux.com/learn/tutorials/885268-getting-to-know-linux-file-permissions
+
+作者:[Jack Wallen][a]
+译者:[译者ID](https://github.com/ynmlml)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.linux.com/community/forums/person/93

From 00c8835729298ad51a74c258c5c5a9b22e2e5a5e Mon Sep 17 00:00:00 2001
From: miaolin 
Date: Tue, 22 Mar 2016 20:53:13 +0800
Subject: [PATCH 1190/1710] Delete 20160218 Getting to Know Linux File
 Permissions.md

---
 ... Getting to Know Linux File Permissions.md | 163 ------------------
 1 file changed, 163 deletions(-)
 delete mode 100644 sources/tech/20160218 Getting to Know Linux File Permissions.md

diff --git a/sources/tech/20160218 Getting to Know Linux File Permissions.md b/sources/tech/20160218 Getting to Know Linux File Permissions.md
deleted file mode 100644
index be48dbbe5a..0000000000
--- a/sources/tech/20160218 Getting to Know Linux File Permissions.md	
+++ /dev/null
@@ -1,163 +0,0 @@
-ynmlml translating 
-Getting to Know Linux File Permissions
-==========================================
-初识Linux文件系统
-==========================================
-![](http://www.linux.com/images/stories/66866/files_a.png)
-
-One of the most basic tasks in Linux is setting file permissions. Understanding how this is done should be considered a must-know, first step in your travels through the Linux ecosystem. As you might expect, such a fundamental issue within the operating environment hasn’t changed much over the years. In fact, the Linux file permission system is taken directly from the UNIX file permission (and even uses many of the same tools).
-在Linux中最基本的任务就是设置文件权限。理解如何实现是你进入LInux世界的第一步。如您所料,这一基本操作在类UNIX操作系统中大同小异。实际上,Linux文件权限系统就直接来取自UNIX文件权限(甚至使用许多相同的工具)。
-
-But, don’t think for a second that understanding file permissions is something you’ll wind up having to spend days and days studying...it’s actually quite simple. Let’s walk through what you need to know and how to put it all together.
-但不要以为在学习第二种文件权限的时候你需要再次一点一点的学起。事实上会很简单,让我们一起来看看你需要了解哪些内容以及如何使用它们。
-
-## The Bits and Pieces
-##预备小知识
-
-The first thing you need to understand is what file permissions apply to. Effectively what you do is apply a permission to a group. When you break it down, the concept really is that simple. But what are the permissions and what are the groups?
-首先你要知道文件权限有什么用,有效的设置一个组的权限。当你将其分解,那这个概念就真的很简单了。那到底什么是权限什么是组呢。
-
-There are three types of permissions you can apply:
-你可以设置的3种权限:
-
-- read — gives the group permission to read the file (indicated with `r`)
-- 读 — 允许该组读文件(用`r`表示)
-
-- write — gives the group permission to edit the file (indicated with `w`)
-- 写 — 允许该组写文件(用`w`表示)
-
-- execute — gives the group permission to execute (run) the file (indicated with `x`)
-- 执行 — 允许该组执行(运行)文件(用`x`表示)
-
-To better explain how this is applied to a group, you could, for example, give a group permission to read and write to a file, but not execute the file. Or, you could give a group permission to read and execute a file, but not write to a file. You can even give a group full permission to read, write, and execute a file or strip a group of any access to a file by removing all permissions.
-为了更好的解释为何是应用于一个组,你可是尝试允许一个组读和写一个文件,但不能执行。或者你可以允许一个组读和执行一个文件,但不能写。甚至你可以允许一组有读、写、执行全部的权限,也可以删除全部权限。
-
-Now, what are the groups? There are four:
-那什么是分组呢,有以下4个:
-
-- user — the actual owner of the file
-
-- group — users in the file’s group
-
-- others — other users not in the file’s group
-
-- all — all users
-- user — 文件实际的拥有者
-- group — 用户所在的组
-- others — 用户组内的其他用户
-- all — 所有用户
-For the most part, you will only really ever bother with the first three groups. The all group is really only used as a shortcut (I’ll explain later).
-大多数情况,你只会对前3组进行操作,all这一组只是作为快捷方式(稍后我会解释)。
-
-So far so simple, right? Let’s layer on a bit of complexity.
-
-If you open up a terminal window and issue the command ls -l, you will see a line-by-line listing of all files and folders within the current working directory (Figure 1 above).
-
-If you look in the far left column, you’ll notice listings like `-rw-rw-r--`.
-
-That listing should actually be looked at like so:
-
->rw- rw- r--
-
-As you can see, the listing is broken into three sections:
-
-- rw-
-
-- rw-
-
-- r--
-
-The order is quite important...for both permissions and for groups. The order is always:
-
-- User Group Others — for groups
-
-- Read Write Execute — for permissions
-
-In our permissions listing example above, the User has read/write permission, the Group has read/write permission, and Others has only read permission. Had any of those groups been given executable permissions, it would have been represented with an x.
-
-## Numerical Equivalent
-
-Let’s make this even more complex. Each permission can also be represented by a number. The numbers are:
-
-- Read — 4
-
-- Write — 2
-
-- Execute — 1
-
-The numerical substitution isn’t an apples to apples change. You can’t drop in:
-
->-42-42-4--
-
-Instead, what you do is add up the numbers you want for each group. Let’s stick with our example above (`-rw-rw-r—`). To give the User group read and write permission, you would add up 4+2 to get 6. For the Group, you need the same permissions, so they get the same number. You only want Others to have read permissions, so they get 4. The numerical equivalent is now:
-
->664
-
-So, if you want to give a file 664 permissions, you’d issue the chmod command like this:
-
->chmod 664 FILENAME
-
-where FILENAME is the name of the file.
-
-## Changing Permissions
-
-Now that you understand the actual permissions of files, it’s time to learn how to change those permissions. This is done with the chmod command. One of the first things you must understand is that, to be able to change the permissions of a file, either you must be the owner of the file or you must have permission to edit the file (or have admin access by way of su or sudo). Because of that, you cannot just jump around in the directory structure and change permissions of files at will.
-
-Let’s stick with our example (`-rw-rw-r--`). Suppose this file (we’ll name it script.sh) is actually a shell script and needs to be executed...but you only want to give yourself permission to execute that script. At this point, you should be thinking, “Ah, then I need the permission listing to read `-rwx-rw-r--`!”. To get that `x` bit in there, you’d run the chmod command like so:
-
->chmod u+x script.sh
-
-At this point, the listing will be -rwx-rw-r--.
-
-If you wanted to give both User and Group executable permission, the command would look like:
-
->chmod ug+x script.sh
-
-See how this works? Let’s make it interesting. Say, for whatever reason, you accidentally give all groups executable permissions for that file (so the listing looks like `-rwx-rwx-r-x`). If you want to strip Others of executable permissions, issue the command:
-
->chmod o-x script.sh
-
-What if you want to completely remove executable permission from the file? You can do that two ways:
-
->chmod ugo-x script.sh
-
-or
-
->chmod a-x script.sh
-
-That’s where all comes into play. This is used to make the process a bit more efficient. I prefer to avoid using a as it could lead to issues (such as, when you accidentally issue the command chmod `a-rwx` script.sh).
-
-## Directory Permissions
-
-You can also execute the chmod command on a directory. When you create a new directory as a user, it is typically created with the following permissions:
-
->drwxrwxr-x
-
-NOTE: The leading d indicates it is a directory.
-
-As you can see, both User and Group have executable permission for the folder. This does not mean that any files created in the folder will have the same permissions (files will be created with the default system permissions of `-rw-rw-r--`). But, suppose you do create files in this new directory, and you want to strip Group of write permissions. You don’t have to change into the directory and then issue the chmod command on all the files. You can add the R option (which means recursive) to the chmod command and change the permission on both the folder and all the containing files.
-
-Now, suppose our example is a folder named TEST and within it is a number of scripts — all of which (including the TEST folder) have permissions `-rwxrwxr-x`. If you want to strip Group of write permissions, you could issue the command:
-
->chmod -R g-w TEST
-
-If you now issue the command ls `-l`, you will see the TEST folder now has a permission listing of `drwxr-xr-x`. Group has been stripped of its write permissions (as will all the files within).
-
-## Permission to Conclude
-
-At this point, you should now have a solid understand of the basic Linux file permissions. There are more advanced issues that you can now easily study, such as setuid and setgid and ACLs. Without a good foundation of the basics, however, you’d quickly get lost with those next-level topics.
-
-Linux file permissions haven’t changed much, since the early days. And, they most likely won’t change much going into the future.
-
-
-------------------------------------------------------------------------------
-
-via: http://www.linux.com/learn/tutorials/885268-getting-to-know-linux-file-permissions
-
-作者:[Jack Wallen][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/93

From 25ecd2c82042f12630621ef85a8b72e41eecf021 Mon Sep 17 00:00:00 2001
From: miaolin 
Date: Tue, 22 Mar 2016 21:06:52 +0800
Subject: [PATCH 1191/1710] =?UTF-8?q?=E9=A2=9D=EF=BC=8C=E6=80=8E=E4=B9=88?=
 =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=9C=89=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 translated/tech/Getting to Know Linux File Permissions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/translated/tech/Getting to Know Linux File Permissions b/translated/tech/Getting to Know Linux File Permissions
index fb75030b0a..72edbed84e 100644
--- a/translated/tech/Getting to Know Linux File Permissions	
+++ b/translated/tech/Getting to Know Linux File Permissions	
@@ -1,5 +1,5 @@
 初识Linux文件系统
-==========================================
+================================================================================
 
 ![](http://www.linux.com/images/stories/66866/files_a.png)
 

From b60314b6ab5ee18e82bcac4bbd21e23f165eee8a Mon Sep 17 00:00:00 2001
From: geekpi 
Date: Wed, 23 Mar 2016 09:43:34 +0800
Subject: [PATCH 1192/1710] translating

---
 .../20160220 Former Kubuntu Head Unveils New KDE Project.md     | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md b/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md
index dc3b2a1a76..5601497176 100644
--- a/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md	
+++ b/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md	
@@ -1,3 +1,5 @@
+translating----geekpi
+
 Former Kubuntu Head Unveils New KDE Project
 ==============================================
 

From aa19f69948807cb19b13e77e8777585f5fde11a5 Mon Sep 17 00:00:00 2001
From: 4357 
Date: Wed, 23 Mar 2016 11:20:53 +0800
Subject: [PATCH 1193/1710] =?UTF-8?q?4357=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

https://github.com/4357
---
 ...20160218 What do Linux developers think of Git and GitHub.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md
index 9002025820..b444b0958c 100644
--- a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md	
+++ b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md	
@@ -1,3 +1,5 @@
+@4357 翻译中
+
 What do Linux developers think of Git and GitHub?
 =====================================================
 

From dcb49b8915cac334f8b59be85b85163813c8b162 Mon Sep 17 00:00:00 2001
From: geekpi 
Date: Wed, 23 Mar 2016 11:27:03 +0800
Subject: [PATCH 1194/1710] translated

---
 ...er Kubuntu Head Unveils New KDE Project.md | 37 -------------------
 ...er Kubuntu Head Unveils New KDE Project.md | 35 ++++++++++++++++++
 2 files changed, 35 insertions(+), 37 deletions(-)
 delete mode 100644 sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md
 create mode 100644 translated/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md

diff --git a/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md b/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md
deleted file mode 100644
index 5601497176..0000000000
--- a/sources/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md	
+++ /dev/null
@@ -1,37 +0,0 @@
-translating----geekpi
-
-Former Kubuntu Head Unveils New KDE Project
-==============================================
-
-The name Jonathan Riddell should ring a bell if you read Linux and [open source news](http://itsfoss.com/category/news/). He was the creator and longtime lead developer of the [Kubuntu](http://www.kubuntu.org/) distribution. He was [forced out of his position by Ubuntu boss Mark Shuttleworth](http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html) last year because he dared to ask what happened to the funds Canonical had raised for Kubuntu. (To the best of my knowledge, Canonical never really answered to his questions about finances.)
-
-![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448724263.png)
-
-## KDE neon logo
-
-On Saturday, Riddell [announced](https://dot.kde.org/2016/01/30/fosdem-announcing-kde-neon) a new project: [KDE neon](http://neon.kde.org.uk/). According to Riddell’s announcement “Neon will provide a way to get the latest KDE software on the day it’s released.”
-
-After reading both the announcement and looking at the brief site, **it appears that neon is a mainly a “rapidly updated software repository” that allows KDE fans to be on the bleeding edge**. Instead of waiting for months for distro developers to release the updated KDE on their repos, you’ll be able to get it hot off the presses.
-
-KDE did state in the [noen FAQ](http://neon.kde.org.uk/faq) that this is not a KDE created distro. In fact, they say “KDE believes it is important to work with many distributions, as each brings unique value and expertise for their respective users. This is one project out of hundreds from KDE.”
-
-![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448830870.jpg)
-
-However, the way the site and the announcement refer to the fact that neon runs on Ubuntu 15.10 (until the next LTS version is available) and that there will soon be images makes me wonder. KDE could be saying this to keep Canonical from seeing this project as a competitor to Kubuntu. If they that there is a demand for KDE neon, they could spin it off as a full distro. Both the announcement and site state that this is a KDE Incubator project, so the future could hold anything for this project.
-
-[KDE neon](http://neon.kde.org.uk/)
-
-Does neon sound like it would be useful for you or are you happy with your current distro’s KDE release rate? Do you think there is room for another KDE distro (if KDE decides to head in that direction)? Let me know in the comment section below.
-
-------------------------------------------------------------------------------
-
-via: http://itsfoss.com/kde-neon-unveiled/
-
-作者:[JOHN PAUL][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/john/
-
diff --git a/translated/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md b/translated/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md
new file mode 100644
index 0000000000..44dc94b9f0
--- /dev/null
+++ b/translated/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md	
@@ -0,0 +1,35 @@
+前Kubuntu领袖发起了新的KDE项目
+==============================================
+
+如果你阅读Linux和[开源新闻](http://itsfoss.com/category/news/)的话应该会对Jonathan Riddell这人很熟悉。它是[Kubuntu](http://www.kubuntu.org/)发行版的创建者及长期的开发领导。他由于敢于询问Canonical基金会对Kubuntu的资金筹集情况[而被Ubuntu的老板Mark Shuttleworth驱逐](http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html) (据我所知,Canonical从来没有真正回答过他的这个关于财务的问题。)
+
+![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448724263.png)
+
+## KDE neon 标志
+
+在周日,Riddell[宣布](https://dot.kde.org/2016/01/30/fosdem-announcing-kde-neon)了一个新项目:KDE neon](http://neon.kde.org.uk/)。根据Riddell的声明,“Neon将会在发布时提供最新的KDE软件。”
+
+在看了声明何网站后,**neon似乎主要是一个“快速的软件更新仓库”,它让KDE粉丝可以用上最新的软件**。除了等上数月来等到开发者在他们的仓库中发布新的KDE,你还可以从新闻中了解最新消息。
+
+KDE的确在[noen FAQ](http://neon.kde.org.uk/faq)中声明过这不是一个KDE创建的发行版。事实上,他们说“KDE相信与许多发行版协作是很重要的,因为它们每个都能给用户提供独特的价值和专长。这是KDE成千上万项目中的一个。”
+
+![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448830870.jpg)
+
+然而,网站和公告显示neon会运行在Ubuntu 15.10中(直到有下个长期支持版本)并很快会有让我惊奇的镜像。KDE可能要让Canonical看到此项目是Kubuntu的竞争对手。如果他们有KDE neon的需求,他们将把它拆开作为一个完整的发行版。网站和通告声称这是一个KDE孵化项目,因此未来可能会包含任何东西。
+
+[KDE neon](http://neon.kde.org.uk/)
+
+neon听上去对你有用么,或者你是否对现在的KDE发行版的发布速度满意?你认为是否还有其他KDE发行版的空间(如果KDE决定超这个方向进发)?让我在评论栏知道你们的想法。
+
+------------------------------------------------------------------------------
+
+via: http://itsfoss.com/kde-neon-unveiled/
+
+作者:[JOHN PAUL][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/john/
+

From 84be4eb1384dbad2d4dda3c1a8b48d0d47da0e02 Mon Sep 17 00:00:00 2001
From: miaolin 
Date: Thu, 24 Mar 2016 16:57:51 +0800
Subject: [PATCH 1195/1710] Update and rename Getting to Know Linux File
 Permissions to 20160218 Getting to Know Linux File Permissions

---
 ...missions => 20160218 Getting to Know Linux File Permissions} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename translated/tech/{Getting to Know Linux File Permissions => 20160218 Getting to Know Linux File Permissions} (99%)

diff --git a/translated/tech/Getting to Know Linux File Permissions b/translated/tech/20160218 Getting to Know Linux File Permissions
similarity index 99%
rename from translated/tech/Getting to Know Linux File Permissions
rename to translated/tech/20160218 Getting to Know Linux File Permissions
index 72edbed84e..77b3ed099f 100644
--- a/translated/tech/Getting to Know Linux File Permissions	
+++ b/translated/tech/20160218 Getting to Know Linux File Permissions	
@@ -1,4 +1,4 @@
-初识Linux文件系统
+初识Linux文件权限
 ================================================================================
 
 ![](http://www.linux.com/images/stories/66866/files_a.png)

From 619b6c5fabe4bbdcc56c5b4ec54bbe1eb9a145ad Mon Sep 17 00:00:00 2001
From: Ezio 
Date: Thu, 24 Mar 2016 23:27:07 +0800
Subject: [PATCH 1196/1710] =?UTF-8?q?20160324-1=20=E9=80=89=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...uBSD Brings Ubuntu And FreeBSD Together.md | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md

diff --git a/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md b/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md
new file mode 100644
index 0000000000..cca9a74a90
--- /dev/null
+++ b/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md	
@@ -0,0 +1,66 @@
+UbuntuBSD Brings Ubuntu And FreeBSD Together
+=================================================
+
+![](http://itsfoss.com/wp-content/uploads/2016/03/UbuntuBSD.jpg)
+
+Move over [Linux][1], people. UbuntuBSD is bringing the experience of Ubuntu on the top of a FreeBSD kernel.
+
+Quite unsurprisingly, UbuntuBSD has taglined itself as ‘Unix for human beings’. If you remember, Ubuntu uses the tagline ‘Linux for human beings’ and have actually made it possible for a ‘normal human’ to use Linux in last 11 years.
+
+UbuntuBSD aims to do the same. Which is to make Unix accessible and usable by beginners, if I may put it that way. At least, this is what it aims.
+
+### What’s BSD? How is Linux different from it?
+
+If you are a beginner, then you should know the [difference between Unix and Linux][2].
+
+Way before Linux, Unix operating systems was desgined at [AT&T][3] by [Ken Thompson][4], [Denis Ricthie][5] and team. This was back in 1970. You might be surprised to know that Unix is a closed source, properitry operating system. AT&T licensed Unix to various thrid parties, both academic and commercial vendors.
+
+One of the academic vendors is University of California, Berkeley. The Unix operating system developed here is known as [BSD (Berkeley Software Distribution)][6]. One of the most popular open source derivative of BSD is [FreeBSD][7]. Another most popular closed source BSD derviative is Apple’s Mac OS X.
+
+In 1991, Finnish computer science student Linus Torvalds developed his own Unix clone from scratch. This is what we know today as Linux Kernel. Linux distributions add GUI system, GNU utilities (such as cp, mv, ls,date, bash etc), installation & management tools, GNU c/c++ Compilers and various applications on top of the Linux kernel.
+
+### UbuntuBSD is not the first of its kind
+
+When you have get the difference between Unix, Linux and FreeBSD, let me tell you that UbuntuBSD is not the first Linux-ish experience on the top of FreeBSD kernel.
+
+When Debian opted out for [systemd][8], this resulted in the birth of [Debian GNU/kFreeBSD][9] operating system. It is a port of Debian that run on the top of FreeBSD rather than the usual Linux kernel.
+
+UbuntuBSD is a similar implementation of Ubuntu on FreeBSD kernel.
+
+### UbuntuBSD Beta codenamed Escape From SystemD
+
+The first beta release of UbuntuBSD is out and it has been codenamed “Escape from SystemD”. It is based on Ubuntu 15.10 and FreeBSD kernel 10.1.
+
+It ships with [Xfce][10] desktop and is designed for both desktop and server. [ZFS][11] support is included as well. It has text based installer.
+
+### Wanna try?
+
+I won’t suggest that everyone start trying it in excitement. It is still under development and the installer is text based. If you are confident enough, go ahead and download it from the link below but beginners, please stay out, at least for now:
+
+[UbuntuBSD][12]
+
+What do you think of UbuntuBSD?
+
+--------------------------------------------------------------------------------
+
+via: http://itsfoss.com/ubuntubsd-ubuntu-freebsd/
+
+作者:[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/tag/linux/
+[2]: http://www.cyberciti.biz/faq/what-is-the-difference-between-linux-and-unix/
+[3]: https://en.wikipedia.org/wiki/AT%26T
+[4]: https://en.wikipedia.org/wiki/Ken_Thompson
+[5]: https://en.wikipedia.org/wiki/Dennis_Ritchie
+[6]: http://www.bsd.org/
+[7]: https://www.freebsd.org/
+[8]: https://www.freedesktop.org/wiki/Software/systemd/
+[9]: https://www.debian.org/ports/kfreebsd-gnu/
+[10]: http://www.xfce.org/
+[11]: https://en.wikipedia.org/wiki/ZFS
+[12]: https://sourceforge.net/projects/ubuntubsd/

From b944a1c397674fc212d481dfd36d8110da4baa02 Mon Sep 17 00:00:00 2001
From: KS 
Date: Fri, 25 Mar 2016 16:00:44 +0800
Subject: [PATCH 1197/1710] Translated

Translated Two Outstanding All-in-One Linux Servers
---
 ...wo Outstanding All-in-One Linux Servers.md | 105 ------------------
 ...wo Outstanding All-in-One Linux Servers.md | 103 +++++++++++++++++
 2 files changed, 103 insertions(+), 105 deletions(-)
 delete mode 100644 sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md
 create mode 100644 translated/tech/20160228 Two Outstanding All-in-One Linux Servers.md

diff --git a/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md b/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md
deleted file mode 100644
index 4d6f369aa5..0000000000
--- a/sources/tech/20160228 Two Outstanding All-in-One Linux Servers.md	
+++ /dev/null
@@ -1,105 +0,0 @@
-wyangsun translating
-Two Outstanding All-in-One Linux Servers
-================================================
-
-keywords: Linux Server , SMB , clearos , Zentyal
-
-![](http://www.linux.com/images/stories/66866/jack-clear_a.png)
-
->Figure 1: The ClearOS setup wizard.
-
-Back in 2000, Microsoft released their Small Business Server. This product changed the way many people viewed how technology could function within the realm of business. Instead of having multiple machines handle different tasks, you could deploy a single server which would handle email, calendaring, file sharing, directory services, VPN, and a whole lot more. For many of small businesses, this was a serious boon, but for some the cost of the Windows SMB was prohibitive. For yet others, the idea of relying on such a server, designed by Microsoft, simply wasn’t an option.
-
-For that last group, there are alternatives. In fact, within the realm of Linux and open source, you can choose from several solid platforms that can serve your small business as a one-stop server shop. If your small business has between 10 and 50 employees, the all-in-one server might be the ideal solution to meet your needs.
-
-Here, I’ll look at two Linux all-in-one servers, so you can see if one of them is the perfect match for your company.
-
-Remember, these servers are not, in any way, suited for big business or enterprise. Larger companies cannot rely on the all-in-one server simply because a single server cannot take the load expected within the realm of enterprise needs. With that said, here’s what SMBs can expect from a Linux all in one.
-
-### ClearOS
-
-[ClearOS][1] was originally released in 2009, under the name ClarkConnect, as a router and gateway distribution. Since then, ClearOS has added all the features necessary to define it as an all-in-one server. ClearOS offers more than just a piece of software. You can also purchase a [ClearBox 100][2] or [ClearBox 300][3]. These servers ship complete with ClearOS and are marketed as IT in a box. Check out the feature comparison/price matrix [here][4].
-
-For those with hardware already in-house, you can download one of the following:
-
-- [ClearOS Community][5] — The community (free) edition of ClearOS
-
-- [ClearOS Home][6] — Ideal for home offices (details on features and subscription costs, see here)
-
-- [ClearOS Business][7] — Ideal for small businesses (details on features and subscription costs, see here)
-
-What do you get with ClearOS? You get a business-class server with a single, elegantly designed web interface. What is unique about ClearOS is that you will get plenty of features in the base server; beyond that, you must add on features from the [Clear Marketplace][8]. From within the Marketplace, you can install free or paid apps that extend the feature set of the ClearOS server. Here you’ll find add-ons for Windows Server Active Directory, OpenLDAP, Flexshares, Antimalware, Cloud, Web access control, Content filtering, and much more. You’ll even find some third-party add-ons such as Google Apps Synchronization, Zarafa Collaboration Platform, and Kaspersky Anti-virus.
-
-ClearOS is installed like any other Linux distribution (based on Red Hat’s Anaconda installer). Once the install is complete, you will be prompted to set up the networking interface as well as presented with the address to point your browser (on the same network as the ClearOS server). The address will be in the form:
-
-[https://IP_OF_CLEAROS_SERVER:81][9]
-
-Where IP_OF_CLEAROS_SERVER is the actual IP address of the server. NOTE: When you first point your browser to the server, you will receive a “Connection is not private” warning. Proceed on to the address so you can continue the setup.
-
-When the browser finally connects, you will be prompted for the root user credentials (you set the root user password up during initial installation). Once authenticated, you will be presented with the ClearOS setup wizard (Figure 1 above).
-
-Click the Next button to begin the process of setting up your ClearOS server. The wizard is self-explanatory and, in the end, you will be asked which version of ClearOS you want to use. Click either Community, Home, or Business. Once selected, you will be required to register for an account. Once you’ve created an account and registered the server, you can then move on to updating the server, configuring the server, and adding modules from the marketplace (Figure 2).
-
-![](http://www.linux.com/images/stories/66866/jack-clear_b.png)
-
->Figure 2: Installing modules from the marketplace.
-
-At this point, you are ready to start digging deep into the configuration of your ClearOS small business server.
-
-### Zentyal
-
-[Zentyal][10] is a Ubuntu-based small business server that was, at one point, distributed under the name eBox. Zentyal offers plenty of servers/services to fit your SMB needs:
-
-- Email — Webmail; Native MS Exchange protocols and Active Directory support; Calendars and contacts; Mobile device email sync; Antivirus/antispam; IMAP, POP, SMTP, CalDAV, and CardDAV support
-
-- Domain & Directory — Central domain directory management; Multiple organization units; Single sign-on authentication; File sharing; ACLs, Advanced domain management, Printer management
-
-- Networking & Firewall — Static and DHCP interfaces; Objects & services; Packet filter; Port forwarding
-
-- Infrastructure — DNS; DHCP; NTP; Certification authority; VPN
-
-- Firewall
-
-The installation of Zentyal is very much like that of Ubuntu Server—it’s text based and quite simple: Boot up the install media, make a few quick selections, and wait for the installation to complete. Once the initial, text-based, installation is finished, you are presented with the GUI desktop where a wizard will appear for package selection. Select all the packages you want to install and allow the installer to finish the job.
-
-Finally, you can log into your Zentyal server via the web interface (point your browser to [https://IP_OF_SERVER:8443][11] — where IP_OF_SERVER is the LAN address of the Zentyal server) or use the standalone, desktop GUI to administer the server (Zentyal includes quick access to an Administrator and User console as well as a Zentyal Administration console). When all systems have been saved and started, you will be presented with the Zentyal Dashboard (Figure 3).
-
-![](http://www.linux.com/images/stories/66866/jack-zentyal_a.png)
-
->Figure 3: The Zentyal Dashboard in action.
-
-The Dashboard allows you to control all aspects of the server, such as updating, managing servers/services, and getting a quick status update of the server. You can also go into the Components area and install components that you opted out of during installation or update the current package list. Click on Software Management > System Updates and select what you want to update (Figure 4), then click the UPDATE button at the bottom of the screen.
-
-![](http://www.linux.com/images/stories/66866/jack-zentyal_b.png)
-
->Figure 4: Updating your Zentyal server is simple.
-
-### Which Server Is Right for You?
-
-The answer to this question depends on what you need. Zentyal is an amazing server that does a great job running your SMB network. If you need a bit more, such as groupware, your best bet is to go with ClearOS. If you don’t need groupware, either server will do an outstanding job.
-
-I highly recommend installing both of these all-in-one servers to see which will best serve your small company needs.
-
-
-------------------------------------------------------------------------------
-
-via: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers
-
-作者:[Jack Wallen][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/93
-[1]: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers#clearfoundation-overview
-[2]: https://www.clearos.com/products/hardware/clearbox-100-series
-[3]: https://www.clearos.com/products/hardware/clearbox-300-series
-[4]: https://www.clearos.com/products/hardware/clearbox-overview
-[5]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso
-[6]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso
-[7]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso
-[8]: https://www.clearos.com/products/purchase/clearos-marketplace-overview
-[9]: https://ip_of_clearos_server:81/
-[10]: http://www.zentyal.org/server/
-[11]: https://ip_of_server:8443/
diff --git a/translated/tech/20160228 Two Outstanding All-in-One Linux Servers.md b/translated/tech/20160228 Two Outstanding All-in-One Linux Servers.md
new file mode 100644
index 0000000000..a60b23aea1
--- /dev/null
+++ b/translated/tech/20160228 Two Outstanding All-in-One Linux Servers.md	
@@ -0,0 +1,103 @@
+两个杰出的一体化Linux服务器
+================================================
+
+关键词:Linux服务器,SMB,clearos,Zentyal
+
+![](http://www.linux.com/images/stories/66866/jack-clear_a.png)
+
+>图1: ClearOS安装向导。
+
+回到2000年,微软发布小型商务服务器。这个产品改变了很多人们对科技在商务领域的看法。你可以部署一个单独的服务器,它能处理邮件,日历,文件共享,目录服务,VPN,以及更多,而不是很多机器处理不同的任务。对很多小型商务来说,这是非常好的恩惠,但是Windows SMB的一些花费是昂贵的。对于其他人,微软设计的依赖于一个服务器的想法,根本不是一个选项。
+
+对于最近的用户群,有些替代品。事实上,在Linux和开源领域里,你可以选择许多稳定的平台,它可以作为一站式服务商店服务于你的小型企业。如果你的小型企业有10到50员工,一体化服务器也许是你所需的理想方案。
+
+这里,我将要看看两个Linux一体化服务器,所以你可以查看他们哪个能完美适用于你的公司。
+
+记住,这些服务器不能,以任何方式,适用于大型商务或企业。大公司无法依靠一体化服务器,仅仅是因为一台服务器不能负荷在企业内所需的企望。除此之外,这就是小型企业可以从Linux一体化服务器期待什么。
+
+### ClearOS
+
+[ClearOS][1]是在2009年在ClarkConnect下发行的,作为一个路由和网关的分支。从那以后,ClearOS已经增加了所有一体化服务器必要的特性。CearOS提供的不仅仅是一个软件。你可以购买一个[ClearBox 100][2] 或[ClearBox 300][3]。这些服务器搭载完整的ClearOS作为一个IT设备被销售。在[这里][4]查看特性比对/价格矩阵。
+
+家里已经有这些硬件,你可以下载这些之一:
+
+- [ClearOS社区][5] — 社区(免费)版的ClearOS
+
+- [ClearOS家庭][6] — 理想的家庭办公室(详细的功能和订阅费用,见这里)
+
+- [ClearOS商务][7] — 理想的小型商务(详细的功能和订阅费用,见这里)
+
+使用ClearOS你得到了什么?你得到了一个单机的业务合作服务器,设计精美的网页。ClearOS独特的是什么?你可以在基础服务中得到很多特性。除了这个,你必须从 [Clear Marketplace][8]增加特性。在市场上,你可以安装免费或付费的应用程序,扩展集的ClearOS服务器的特性。这里你可以找到附加的Windows服务器活动目录,OpenLDAP,Flexshares,Antimalware,云,Web访问控制,内容过滤,还有更多。你甚至可以找到一些第三方组件像谷歌应用同步,Zarafa合作平台,卡巴斯基杀毒。
+
+ClearOS的安装像其他Linux发行版(基于红帽的Anaconda安装程序)。安装完成后,系统将提示您设置网络接口就是提供你浏览器访问的地址(与ClearOS服务器在同一个网络里)。地址格式如下:
+
+[https://IP_OF_CLEAROS_SERVER:81][9]
+
+IP_OF_CLEAROS_SERVER就是服务器的真实IP地址。注:当你第一次在浏览器访问这个服务器时,你将收到一个“Connection is not private”的警告。继续访问这个地址你才能继续设置。
+
+当浏览器连接上,就会提示你root用户认证(在初始化安装中你设置的root用户密码)。一通过认证,你将看到ClearOS的安装向导(上图1)
+
+点击下一步按钮,开始设置你的ClearOS服务器。这个向导无需加以说明,在最后还会问你想用那个版本的ClearOS。点击社区,家庭,或者商业。一旦选择,你就需要注册一个账户。创建了一个账户注册了服务器后,你可以开始更新服务器,配置服务器,从市场添加模块(图2)。
+
+![](http://www.linux.com/images/stories/66866/jack-clear_b.png)
+
+>图2: 从市场安装模块。
+
+此时,你已经准备开始深入挖掘配置你的ClearOS小型商务服务器了。
+
+### Zentyal
+
+[Zentyal][10]是一个基于Ubuntu的小型商务服务器,现在,发布在eBox域名下。Zentyal提供了大量的服务器/服务来适应你的小型商务需求:
+
+- 电子邮件 — 网页邮件;原生微软邮件协议和活动目录支持;日历和通讯录;手机设备电子邮件同步;反病毒/反垃圾;IMAP,POP,SMTP,CalDAV,和CardDAV支持。
+
+- 域和目录 — 核心域目录管理;多个组织单元;单点登录身份验证;文件共享;ACLs,高级域名管理,打印机管理。
+
+- 网络和防火墙 — 静态和DHCP接口;对象和服务;包过滤;端口转发。
+
+- 基础设施 — DNS;DHCP;NTP;认证中心;VPN。
+
+- 防火墙
+
+安装Zentyal很像Ubuntu服务器的文本安装而且很简单:启动安装镜像,做一些选择,等待安装完成。一旦初始化,完成基于文本安装,就提供给你桌面GUI,向导程序提供选择包。选择所有你想安装的包,让安装程序完成这些工作。
+
+最终,你可以通过网页接口来访问Zentyal服务器(浏览器访问[https://IP_OF_SERVER:8443][11] - IP_OF_SERVER是Zentyal服务器的内网地址)或使用独立的桌面GUI来管理服务器(Zentyal包括快速访问管理员和用户控制台就像Zentyal管理控制台)。当全部系统已经保存开启,你将看到Zentyal面板(图3)。
+
+![](http://www.linux.com/images/stories/66866/jack-zentyal_a.png)
+
+>图3: Zentyal活动面板.
+
+这个面板允许你控制服务器所有方面,比如更新,管理服务器/服务,获取服务器的敏捷状态更新。您也可以进入组件领域,然后安装部署过程中选择出来的组件或更新当前的软件包列表。点击 软件管理 > 系统更新 并选择你想更新的(图4),然后在屏幕最底端点击更新按钮。
+
+![](http://www.linux.com/images/stories/66866/jack-zentyal_b.png)
+
+>图4: 更新你的Zentyal服务器很简单。
+
+### 那个服务器适合你?
+
+回答这个问题要看你有什么需求。Zentyal是一个不可思议的服务器,它很好的胜任于你的小型商务网络中。如果你需要更多,如组合软件,你最好赌在ClearOS上。如果你不需要组合软件,任意的服务器将表现杰出的工作。
+
+我强烈建议安装这两个一体化的服务器,看看哪个是你的小公司所需的最好服务。
+
+------------------------------------------------------------------------------
+
+via: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers
+
+作者:[Jack Wallen][a]
+译者:[wyangsun](https://github.com/wyangsun)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: http://www.linux.com/community/forums/person/93
+[1]: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers#clearfoundation-overview
+[2]: https://www.clearos.com/products/hardware/clearbox-100-series
+[3]: https://www.clearos.com/products/hardware/clearbox-300-series
+[4]: https://www.clearos.com/products/hardware/clearbox-overview
+[5]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso
+[6]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso
+[7]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso
+[8]: https://www.clearos.com/products/purchase/clearos-marketplace-overview
+[9]: https://ip_of_clearos_server:81/
+[10]: http://www.zentyal.org/server/
+[11]: https://ip_of_server:8443/

From e27b7b8402b0038b60b1ba51b5621f75d31beec2 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Sat, 26 Mar 2016 04:49:40 +0800
Subject: [PATCH 1198/1710] PUB:20160316 What we learned in Seoul with AlphaGo

@martin2011qi
---
 .../20160316 What we learned in Seoul with AlphaGo.md       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename {translated/news => published}/20160316 What we learned in Seoul with AlphaGo.md (97%)

diff --git a/translated/news/20160316 What we learned in Seoul with AlphaGo.md b/published/20160316 What we learned in Seoul with AlphaGo.md
similarity index 97%
rename from translated/news/20160316 What we learned in Seoul with AlphaGo.md
rename to published/20160316 What we learned in Seoul with AlphaGo.md
index ab3c92b4c9..d4e40ab488 100644
--- a/translated/news/20160316 What we learned in Seoul with AlphaGo.md	
+++ b/published/20160316 What we learned in Seoul with AlphaGo.md	
@@ -1,4 +1,4 @@
-我们和 AlphaGo 在首尔学到了什么
+AlphaGo 的首尔之战带来的启示
 ================================================================================
 围棋并不仅仅是一个游戏——她是一伙活生生的玩家们,分析家们,爱好者们以及传奇大师们。在过去的十天里,在韩国首尔,我们有幸亲眼目睹那份难以置信的激动。我们也有幸也目睹了那前所未有的场景:[DeepMind][1] 的 AlphaGo 迎战并战胜了传奇围棋大师,李世石(职业9段,身负 18 个世界头衔),这是人工智能的里程碑。
 
@@ -6,7 +6,7 @@
 
 虽说围棋可能是存世的最为悠久的游戏之一了,但对于这五盘比赛的关注度还是大大的超出了我们的想象。搜索围棋规则和围棋盘的用户在美国迅速飙升。在中国,数以千万计的用户通过直播观看了这场比赛,并且新浪微博“人机围棋大战”话题的浏览量破 2 亿。韩国的围棋盘也销量[激增][2]。
 
-然而我们如此公然的测试 AlphaGo,并不仅仅是为了赢棋而已。我们自 2010 年成立 DeepMind,为的是创造出具有独立学习能力的通用型人工智能(AI),并致力于将其作为工具协助解决,从气候变化到诊断疾病,这类最为棘手且急迫的问题为最终目标。 
+然而我们如此公开的测试 AlphaGo,并不仅仅是为了赢棋而已。我们自 2010 年成立 DeepMind,为的是创造出具有独立学习能力的通用型人工智能(AI),并致力于将其作为工具协助解决,从气候变化到诊断疾病,这类最为棘手且急迫的问题为最终目标。 
 
 亦如许多前辈学者们一样,我们也是通过游戏来开发并测试我们的算法的。在一月份,我们第一次披露了 [AlphaGo][3]——作为第一个通过使用 [深度学习][4] 和 [强化学习][5],可以在人类发明的最为复杂的棋盘类游戏中击败职业选手的 AI 程序。而 AlphaGo 迎战过去十年间最厉害的围棋选手——李世石,绝对称得上是 [终极挑战][6]。
 
@@ -28,7 +28,7 @@ via: https://googleblog.blogspot.com/2016/03/what-we-learned-in-seoul-with-alpha
 
 作者:[Demis Hassabis][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 78d74229ce512eb12b191f5eded8911ea8d64e50 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Sat, 26 Mar 2016 04:50:51 +0800
Subject: [PATCH 1199/1710] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=A9=E5=B1=95?=
 =?UTF-8?q?=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

@ynmlml
---
 ...sions => 20160218 Getting to Know Linux File Permissions.md} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename translated/tech/{20160218 Getting to Know Linux File Permissions => 20160218 Getting to Know Linux File Permissions.md} (99%)

diff --git a/translated/tech/20160218 Getting to Know Linux File Permissions b/translated/tech/20160218 Getting to Know Linux File Permissions.md
similarity index 99%
rename from translated/tech/20160218 Getting to Know Linux File Permissions
rename to translated/tech/20160218 Getting to Know Linux File Permissions.md
index 77b3ed099f..b38cef6f32 100644
--- a/translated/tech/20160218 Getting to Know Linux File Permissions	
+++ b/translated/tech/20160218 Getting to Know Linux File Permissions.md	
@@ -152,7 +152,7 @@ Linux文件权限从早期到现在没有太大变化,而且很可能以后也
 via: http://www.linux.com/learn/tutorials/885268-getting-to-know-linux-file-permissions
 
 作者:[Jack Wallen][a]
-译者:[译者ID](https://github.com/ynmlml)
+译者:[ynmlml](https://github.com/ynmlml)
 校对:[校对者ID](https://github.com/校对者ID)
 
 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出

From 95157c34d73b0fef9ddfb0ecc493c069a7556808 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Sat, 26 Mar 2016 05:10:33 +0800
Subject: [PATCH 1200/1710] PUB:20160220 Former Kubuntu Head Unveils New KDE
 Project

@geekpi
---
 ...er Kubuntu Head Unveils New KDE Project.md | 33 +++++++++++++++++
 ...er Kubuntu Head Unveils New KDE Project.md | 35 -------------------
 2 files changed, 33 insertions(+), 35 deletions(-)
 create mode 100644 published/20160220 Former Kubuntu Head Unveils New KDE Project.md
 delete mode 100644 translated/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md

diff --git a/published/20160220 Former Kubuntu Head Unveils New KDE Project.md b/published/20160220 Former Kubuntu Head Unveils New KDE Project.md
new file mode 100644
index 0000000000..2d57885d46
--- /dev/null
+++ b/published/20160220 Former Kubuntu Head Unveils New KDE Project.md	
@@ -0,0 +1,33 @@
+前 Kubuntu 领袖发起了新的 KDE 项目
+==============================================
+
+如果你经常阅读 Linux 和[开源新闻](http://itsfoss.com/category/news/)的话应该会对 Jonathan Riddell 这人很熟悉。它是 [Kubuntu](http://www.kubuntu.org/) 发行版的创建者及长期的开发领导。他由于敢于质询 Canonical 基金会对 Kubuntu 的资金筹集情况[而被 Ubuntu 的老板 Mark Shuttleworth 所驱逐](http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html) (据我所知,Canonical 从来没有真正回答过他的这个关于财务的问题。)
+
+![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448724263.png)
+
+*KDE neon 标志*
+
+在周日,Riddell [宣布](https://dot.kde.org/2016/01/30/fosdem-announcing-kde-neon)了一个新项目:[KDE neon](http://neon.kde.org.uk/)。根据 Riddell 的声明,“Neon 将会提供一个在最新的 KDE 软件一发布就可以获得的途径。”
+
+在看了声明和网站后,**neon 似乎主要是一个“快速的软件更新仓库”,它让 KDE 粉丝可以用上最新的软件**。除了等上数月来等到开发者在他们的仓库中发布新的 KDE 软件外,你将可以在软件一出来就得到它。
+
+KDE 的确在 [noen FAQ](http://neon.kde.org.uk/faq) 中声明过这不是一个 KDE 创建的发行版。事实上,他们说“KDE 相信与许多发行版协作是很重要的,因为它们每个都能给用户提供独特的价值和专长。这是 KDE 成千上万项目中的一个。”
+
+![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448830870.jpg)
+
+然而,网站和公告显示 neon 会运行在 Ubuntu 15.10 中(直到有下个长期支持版本)并很快会有让我惊奇的情景。KDE 可能要让 Canonical 把此项目视作 Kubuntu 的竞争对手。如果他们发现 KDE neon 有前景,他们就能把它变成一个完整的发行版。网站和通告声称这是一个 KDE 孵化项目,因此未来可能会包含任何东西。
+
+neon 听上去对你有用么,或者你是否对你当前的发行版的 KDE 发布速度满意?你认为是否还有其他 KDE 发行版的空间(如果 KDE 决定朝这个方向进发)?让我在评论栏知道你们的想法。
+
+------------------------------------------------------------------------------
+
+via: http://itsfoss.com/kde-neon-unveiled/
+
+作者:[JOHN PAUL][a]
+译者:[geekpi](https://github.com/geekpi)
+校对:[wxy](https://github.com/wxy)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://itsfoss.com/author/john/
+
diff --git a/translated/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md b/translated/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md
deleted file mode 100644
index 44dc94b9f0..0000000000
--- a/translated/tech/20160220 Former Kubuntu Head Unveils New KDE Project.md	
+++ /dev/null
@@ -1,35 +0,0 @@
-前Kubuntu领袖发起了新的KDE项目
-==============================================
-
-如果你阅读Linux和[开源新闻](http://itsfoss.com/category/news/)的话应该会对Jonathan Riddell这人很熟悉。它是[Kubuntu](http://www.kubuntu.org/)发行版的创建者及长期的开发领导。他由于敢于询问Canonical基金会对Kubuntu的资金筹集情况[而被Ubuntu的老板Mark Shuttleworth驱逐](http://www.cio.com/article/2926838/linux/mark-shuttleworth-ubuntu-community-council-ask-kubuntu-developer-to-step-down-as-leader.html) (据我所知,Canonical从来没有真正回答过他的这个关于财务的问题。)
-
-![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448724263.png)
-
-## KDE neon 标志
-
-在周日,Riddell[宣布](https://dot.kde.org/2016/01/30/fosdem-announcing-kde-neon)了一个新项目:KDE neon](http://neon.kde.org.uk/)。根据Riddell的声明,“Neon将会在发布时提供最新的KDE软件。”
-
-在看了声明何网站后,**neon似乎主要是一个“快速的软件更新仓库”,它让KDE粉丝可以用上最新的软件**。除了等上数月来等到开发者在他们的仓库中发布新的KDE,你还可以从新闻中了解最新消息。
-
-KDE的确在[noen FAQ](http://neon.kde.org.uk/faq)中声明过这不是一个KDE创建的发行版。事实上,他们说“KDE相信与许多发行版协作是很重要的,因为它们每个都能给用户提供独特的价值和专长。这是KDE成千上万项目中的一个。”
-
-![](http://itsfoss.com/wp-content/uploads/2016/02/kde-neon-e1454448830870.jpg)
-
-然而,网站和公告显示neon会运行在Ubuntu 15.10中(直到有下个长期支持版本)并很快会有让我惊奇的镜像。KDE可能要让Canonical看到此项目是Kubuntu的竞争对手。如果他们有KDE neon的需求,他们将把它拆开作为一个完整的发行版。网站和通告声称这是一个KDE孵化项目,因此未来可能会包含任何东西。
-
-[KDE neon](http://neon.kde.org.uk/)
-
-neon听上去对你有用么,或者你是否对现在的KDE发行版的发布速度满意?你认为是否还有其他KDE发行版的空间(如果KDE决定超这个方向进发)?让我在评论栏知道你们的想法。
-
-------------------------------------------------------------------------------
-
-via: http://itsfoss.com/kde-neon-unveiled/
-
-作者:[JOHN PAUL][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/john/
-

From 87a63e99503f80c205ea13c578284f808559f5a4 Mon Sep 17 00:00:00 2001
From: Name1e5s <836401406@qq.com>
Date: Sat, 26 Mar 2016 09:37:54 +0800
Subject: [PATCH 1201/1710] name1e5s translating ...

---
 .../20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md b/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md
index cca9a74a90..0c07d3982e 100644
--- a/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md	
+++ b/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md	
@@ -1,3 +1,4 @@
+name1e5s translating...
 UbuntuBSD Brings Ubuntu And FreeBSD Together
 =================================================
 

From 4612965c57c32bd7bc1147606a0754f3c1e44029 Mon Sep 17 00:00:00 2001
From: Name1e5s <836401406@qq.com>
Date: Sat, 26 Mar 2016 10:44:13 +0800
Subject: [PATCH 1202/1710] [translated]UbuntuBSD Brings Ubuntu And FreeBSD
 Together

---
 ...uBSD Brings Ubuntu And FreeBSD Together.md | 67 -------------------
 ...uBSD Brings Ubuntu And FreeBSD Together.md | 66 ++++++++++++++++++
 2 files changed, 66 insertions(+), 67 deletions(-)
 delete mode 100644 sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md
 create mode 100644 translated/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md

diff --git a/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md b/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md
deleted file mode 100644
index 0c07d3982e..0000000000
--- a/sources/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md	
+++ /dev/null
@@ -1,67 +0,0 @@
-name1e5s translating...
-UbuntuBSD Brings Ubuntu And FreeBSD Together
-=================================================
-
-![](http://itsfoss.com/wp-content/uploads/2016/03/UbuntuBSD.jpg)
-
-Move over [Linux][1], people. UbuntuBSD is bringing the experience of Ubuntu on the top of a FreeBSD kernel.
-
-Quite unsurprisingly, UbuntuBSD has taglined itself as ‘Unix for human beings’. If you remember, Ubuntu uses the tagline ‘Linux for human beings’ and have actually made it possible for a ‘normal human’ to use Linux in last 11 years.
-
-UbuntuBSD aims to do the same. Which is to make Unix accessible and usable by beginners, if I may put it that way. At least, this is what it aims.
-
-### What’s BSD? How is Linux different from it?
-
-If you are a beginner, then you should know the [difference between Unix and Linux][2].
-
-Way before Linux, Unix operating systems was desgined at [AT&T][3] by [Ken Thompson][4], [Denis Ricthie][5] and team. This was back in 1970. You might be surprised to know that Unix is a closed source, properitry operating system. AT&T licensed Unix to various thrid parties, both academic and commercial vendors.
-
-One of the academic vendors is University of California, Berkeley. The Unix operating system developed here is known as [BSD (Berkeley Software Distribution)][6]. One of the most popular open source derivative of BSD is [FreeBSD][7]. Another most popular closed source BSD derviative is Apple’s Mac OS X.
-
-In 1991, Finnish computer science student Linus Torvalds developed his own Unix clone from scratch. This is what we know today as Linux Kernel. Linux distributions add GUI system, GNU utilities (such as cp, mv, ls,date, bash etc), installation & management tools, GNU c/c++ Compilers and various applications on top of the Linux kernel.
-
-### UbuntuBSD is not the first of its kind
-
-When you have get the difference between Unix, Linux and FreeBSD, let me tell you that UbuntuBSD is not the first Linux-ish experience on the top of FreeBSD kernel.
-
-When Debian opted out for [systemd][8], this resulted in the birth of [Debian GNU/kFreeBSD][9] operating system. It is a port of Debian that run on the top of FreeBSD rather than the usual Linux kernel.
-
-UbuntuBSD is a similar implementation of Ubuntu on FreeBSD kernel.
-
-### UbuntuBSD Beta codenamed Escape From SystemD
-
-The first beta release of UbuntuBSD is out and it has been codenamed “Escape from SystemD”. It is based on Ubuntu 15.10 and FreeBSD kernel 10.1.
-
-It ships with [Xfce][10] desktop and is designed for both desktop and server. [ZFS][11] support is included as well. It has text based installer.
-
-### Wanna try?
-
-I won’t suggest that everyone start trying it in excitement. It is still under development and the installer is text based. If you are confident enough, go ahead and download it from the link below but beginners, please stay out, at least for now:
-
-[UbuntuBSD][12]
-
-What do you think of UbuntuBSD?
-
---------------------------------------------------------------------------------
-
-via: http://itsfoss.com/ubuntubsd-ubuntu-freebsd/
-
-作者:[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/tag/linux/
-[2]: http://www.cyberciti.biz/faq/what-is-the-difference-between-linux-and-unix/
-[3]: https://en.wikipedia.org/wiki/AT%26T
-[4]: https://en.wikipedia.org/wiki/Ken_Thompson
-[5]: https://en.wikipedia.org/wiki/Dennis_Ritchie
-[6]: http://www.bsd.org/
-[7]: https://www.freebsd.org/
-[8]: https://www.freedesktop.org/wiki/Software/systemd/
-[9]: https://www.debian.org/ports/kfreebsd-gnu/
-[10]: http://www.xfce.org/
-[11]: https://en.wikipedia.org/wiki/ZFS
-[12]: https://sourceforge.net/projects/ubuntubsd/
diff --git a/translated/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md b/translated/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md
new file mode 100644
index 0000000000..19b1118194
--- /dev/null
+++ b/translated/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md	
@@ -0,0 +1,66 @@
+将 Ubuntu 和 FreeBSD 融合在一起的发行版 :UbuntuBSD
+========================================================
+
+![](http://itsfoss.com/wp-content/uploads/2016/03/UbuntuBSD.jpg)
+
+不止是在 [Linux][1] 的内核上面你才能体验到 Ubuntu 的快捷方便,伙计们。UbuntuBSD 可以让你在 FreeBSD 的内核上面也能体验到那种方便快捷。
+
+UbuntuBSD 称自己是‘Unix for human beings’,这一点也不人惊讶。如过你能想起来的话,Ubuntu 使用的标语是‘Linux for human beings’并且在过去的 11 年里它确实让一个‘正常人’有可能用上 Linux。
+
+UbuntuBSD 有着同样的想法。它想让新手能够接触到 Unix ,以及能使用它,如果我能这样说的话。至少,这就是它的目标。
+
+### 什么是BSD ? 它和 Linux 有哪些不同? ###
+
+如果你是新手,那么你需要知道 [Unix和Linux的区别][2].
+
+在 Linux 出现之前,Unix 由 [AT&T][3] 的  [Ken Thompson][4], [Denis Ricthie][5] 以及他们的团队设计。这是在可以算作上古时期的 1970 发生的事。当你知道 Unix 是一个闭源的,有产权的操作系统时你可能会感到惊讶。AT&T  给了很多第三方许可,无论是学术机构还是企业。
+
+美国加州大学伯克利分校是其中一个拿到许可的学术机构。在那里开发的 Unix 系统叫做  [BSD (Berkeley Software Distribution)][6]。BSD 的最出名的开源分支是  [FreeBSD][7],另一个最流行的闭源分支是苹果的 Mac OS X。
+
+在 1991 年。芬兰的计算机系大学生 Linus Torvalds 从头写了自己的 Unix 系统的复制品。这就是我们今天熟知的 Linux 内核。Linux 的发行版在内核的基础上添加了图形界面,GNU 的那一套(cp, mv, ls,date, bash 什么的),安装/管理工具,GNU C/C++ 编译器以及很多应用。
+
+### UbuntuBSD 不是这种发行版的开端
+
+在你知道了 Linux,Unix,FreeBSD 之间的区别之后。我要告诉你的是 UbuntuBSD 不是第一个要在 FreeBSD 内核上作出类似 Linux 的感觉的发行版。
+
+当 Debian 选择使用 [systemd][8] 之后,[Debian GNU/kFreeBSD][9]诞生了。它使用的不是通常的Linux内核,而是 Debian 在 FreeBSD 内核上的移植。
+
+与Debian GNU/kFreeBSD 类似,UbuntuBSD 是 Ubuntu 在 FreeBSD 内核上的移植。
+
+### UbuntuBSD Beta 版代号: Escape From SystemD 
+
+UbuntuBSD 的第一个版本已经发布,代号为“Escape From SystemD ”。它基于 Ubuntu 15.10 和 FreeBSD 10.1.
+
+它的默认桌面环境为 [Xfce][10] ,桌面以及服务器均可使用。 对于 [ZFS][11] 的支持也包含在这个版本中。开发者还提供了一个文本界面的安装器。
+
+### 想试试?
+
+我不建议任何人马上就去高兴的尝试这个系统。它仍在开发并且安装器还是文本界面的。如果你足够自信的话,直接去下载体验吧。但是如果你是新手的话,请等一段时间,至少不要现在就去尝试:
+
+[UbuntuBSD][12]
+
+你认为 UbuntuBSD 怎么样? 兹瓷不兹瓷它?
+
+--------------------------------------------------------------------------------
+
+via: http://itsfoss.com/ubuntubsd-ubuntu-freebsd/
+
+作者:[ABHISHEK][a]
+译者:[name1e5s](https://github.com/name1e5s)
+校对:[校对者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/tag/linux/
+[2]: http://www.cyberciti.biz/faq/what-is-the-difference-between-linux-and-unix/
+[3]: https://en.wikipedia.org/wiki/AT%26T
+[4]: https://en.wikipedia.org/wiki/Ken_Thompson
+[5]: https://en.wikipedia.org/wiki/Dennis_Ritchie
+[6]: http://www.bsd.org/
+[7]: https://www.freebsd.org/
+[8]: https://www.freedesktop.org/wiki/Software/systemd/
+[9]: https://www.debian.org/ports/kfreebsd-gnu/
+[10]: http://www.xfce.org/
+[11]: https://en.wikipedia.org/wiki/ZFS
+[12]: https://sourceforge.net/projects/ubuntubsd/

From 0ea8507d5d43b9aa9599fabea594fd5cbc13677d Mon Sep 17 00:00:00 2001
From: Ray 
Date: Sun, 27 Mar 2016 16:12:06 +0800
Subject: [PATCH 1203/1710] =?UTF-8?q?WingCuengRay=E7=BF=BB=E8=AF=91?=
 =?UTF-8?q?=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ... Startup Process and Services SysVinit Systemd and Upstart.md | 1 +
 1 file changed, 1 insertion(+)

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 2a822e8a45..ecd47794b0 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,4 @@
+WingCuengRay翻译中
 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.

From 49a468e9ce12458be05d2138e84fb835fbe24631 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Mon, 28 Mar 2016 05:54:24 +0800
Subject: [PATCH 1204/1710] PUB:Part 1 - LFCS--How to use GNU 'sed' Command to
 Create Edit and Manipulate files in Linux.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

@Xuanwo 翻译的很细致
---
 ...eate Edit and Manipulate files in Linux.md | 226 ++++++++++++++++++
 ...eate Edit and Manipulate files in Linux.md | 220 -----------------
 2 files changed, 226 insertions(+), 220 deletions(-)
 create mode 100644 published/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md
 delete mode 100644 translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md

diff --git a/published/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/published/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..dd19d6dc69
--- /dev/null
+++ b/published/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md	
@@ -0,0 +1,226 @@
+LFCS 系列第一讲:如何在 Linux 上使用 GNU sed 等命令来创建、编辑和操作文件
+================================================================================
+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 基金会认证系统管理员——第一讲*
+
+请观看下面关于 Linux 基金会认证计划的演示:
+
+
+
+该系列将命名为《LFCS 系列第一讲》至《LFCS 系列第十讲》并覆盖关于 Ubuntu、CentOS 以及 openSUSE 的下列话题。
+
+- 第一讲:如何在 Linux 上使用 GNU sed 等命令来创建、编辑和操作文件
+- 第二讲:如何安装和使用 vi/m 全功能文字编辑器
+- 第三讲:归档文件/目录并在文件系统中寻找文件
+- 第四讲:为存储设备分区,格式化文件系统和配置交换分区
+- 第五讲:在 Linux 中挂载/卸载本地和网络(Samba & NFS)文件系统
+- 第六讲:组合分区作为 RAID 设备——创建&管理系统备份
+- 第七讲:管理系统启动进程和服务(使用 SysVinit, Systemd 和 Upstart)
+- 第八讲:管理用户和组,文件权限和属性以及启用账户的 sudo 权限
+- 第九讲:用 Yum,RPM,Apt,Dpkg,Aptitude,Zypper 进行 Linux 软件包管理
+- 第十讲:学习简单的 Shell 脚本编程和文件系统故障排除
+
+	重要提示:由于自 2016/2 开始 LFCS 认证要求有所变化,我们增加发布了下列必需的内容。要准备这个考试,推荐你也看看我们的 LFCE 系列。
+
+- 第十一讲:怎样使用 vgcreate、lvcreate 和 lvextend  命令创建和管理 LVM
+- 第十二讲:怎样安装帮助文档和工具来探索 Linux
+- 第十三讲:怎样配置和排错 GRUB
+
+本文是覆盖这个参加 LFCS 认证考试的所必需的范围和技能的十三个教程的第一讲。话说了那么多,快打开你的终端,让我们开始吧!
+
+### 处理 Linux 中的文本流 ###
+
+Linux 将程序中的输入和输出当成字符流或者字符序列。在开始理解重定向和管道之前,我们必须先了解三种最重要的I/O(Input and Output,输入和输出)流,事实上,它们都是特殊的文件(根据 UNIX 和 Linux 中的约定,数据流和外围设备(设备文件)也被视为普通文件)。
+
+在 \> (重定向操作符) 和 | (管道操作符)之间的区别是:前者将命令与文件相连接,而后者将命令的输出和另一个命令相连接。
+
+    # command > file
+    # command1 | command2
+
+由于重定向操作符会静默地创建或覆盖文件,我们必须特别小心谨慎地使用它,并且永远不要把它和管道混淆起来。在 Linux 和 UNIX 系统上管道的优势是:第一个命令的输出不会写入一个文件而是直接被第二个命令读取。
+
+在下面的操作练习中,我们将会使用这首诗——《A happy child》(作者未知)
+
+![cat command](http://www.tecmint.com/wp-content/uploads/2014/10/cat-command.png)
+
+*cat 命令样例*
+
+#### 使用 sed ####
+
+sed 是流编辑器(stream editor)的缩写。为那些不懂术语的人额外解释一下,流编辑器是用来在一个输入流(文件或者管道中的输入)执行基本的文本转换的工具。
+
+sed 最基本的用法是字符替换。我们将通过把每个出现的小写 y 改写为大写 Y 并且将输出重定向到 ahappychild2.txt 开始。g 标志表示 sed 应该替换文件每一行中所有应当替换的实例。如果这个标志省略了,sed 将会只替换每一行中第一次出现的实例。
+
+**基本语法:**
+
+    # sed 's/term/replacement/flag' file
+
+**我们的样例:**
+
+    # sed 's/y/Y/g' ahappychild.txt > ahappychild2.txt
+
+![sed command](http://www.tecmint.com/wp-content/uploads/2014/10/sed-command.png)
+
+*sed 命令样例*
+
+如果你要在替换文本中搜索或者替换特殊字符(如 /,\,&),你需要使用反斜杠对它进行转义。
+
+例如,我们要用一个符号来替换一个文字,与此同时我们将把一行最开始出现的第一个 I 替换为 You。
+
+    # 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 替换字符串*
+
+在上面的命令中,众所周知 \^(插入符号)是正则表达式中用来表示一行开头的符号。
+
+正如你所看到的,我们可以通过使用分号分隔以及用括号包裹来把两个或者更多的替换命令(并在它们中使用正则表达式)连接起来。
+
+另一种 sed 的用法是显示或者删除文件中选中的一部分。在下面的样例中,将会显示 /var/log/messages 中从6月8日开始的头五行。
+
+    # sed -n '/^Jun  8/ p' /var/log/messages | sed -n 1,5p
+
+请注意,在默认的情况下,sed 会打印每一行。我们可以使用 -n 选项来覆盖这一行为并且告诉 sed 只需要打印(用 p来表示)文件(或管道)中匹配的部分(第一个命令中指定以“Jun  8” 开头的行,第二个命令中指定一到五行)。
+
+最后,可能有用的技巧是当检查脚本或者配置文件的时候可以保留文件本身并且删除注释。下面的单行 sed 命令删除(d)空行或者是开头为`#`的行(| 字符对两个正则表达式进行布尔 OR 操作)。
+
+    # sed '/^#\|^$/d' apache2.conf
+
+![sed match string](http://www.tecmint.com/wp-content/uploads/2014/10/sed-match-string.png)
+
+*sed 匹配字符串*
+
+#### uniq 命令 ####
+
+uniq 命令允许我们返回或者删除文件中重复的行,默认写到标准输出。我们必须注意到,除非两个重复的行相邻,否则uniq 命令不会删除他们。因此,uniq 经常和一个前置的 sort 命令(一种用来对文本行进行排序的算法)搭配使用。默认情况下,sort 使用第一个字段(用空格分隔)作为关键字段。要指定一个不同的关键字段,我们需要使用 -k 选项。
+
+**样例**
+
+du –sch /path/to/directory/* 命令将会以人类可读的格式返回在指定目录下每一个子文件夹和文件的磁盘空间使用情况(也会显示每个目录总体的情况),而且不是按照大小输出,而是按照子文件夹和文件的名称。我们可以使用下面的命令来让它通过大小排序。
+
+    # du -sch /var/* | sort -h
+
+![sort command](http://www.tecmint.com/wp-content/uploads/2014/10/sort-command.jpg)
+
+*sort 命令样例*
+
+你可以通过使用下面的命令告诉 uniq 比较每一行的前6个字符(-w 6)(这里是指定的日期)来统计日志事件的个数,而且在每一行的开头输出出现的次数(-c)。
+
+
+    # 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)
+
+*文件中的统计数字*
+
+最后,你可以组合使用 sort 和 uniq 命令(通常如此)。看看下面文件中捐助者、捐助日期和金额的列表。假设我们想知道有多少个捐助者。我们可以使用下面的命令来分隔第一字段(字段由冒号分隔),按名称排序并且删除重复的行。
+
+    # 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)
+
+*寻找文件中不重复的记录*
+
+- 也可阅读: [13个“cat”命令样例][1]
+
+#### grep 命令 ####
+
+grep 在文件(或命令输出)中搜索指定正则表达式,并且在标准输出中输出匹配的行。
+
+**样例**
+
+显示文件 /etc/passwd 中用户 gacanepa 的信息,忽略大小写。
+
+    # grep -i gacanepa /etc/passwd
+
+![grep Command](http://www.tecmint.com/wp-content/uploads/2014/10/grep-command.jpg)
+
+*grep 命令样例*
+
+显示 /etc 文件夹下所有 rc 开头并跟随任意数字的内容。
+
+    # 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)
+
+*使用 grep 列出内容*
+
+- 也可阅读: [12个“grep”命令样例][2]
+
+#### tr 命令使用技巧 ####
+
+tr 命令可以用来从标准输入中转换(改变)或者删除字符,并将结果写入到标准输出中。
+
+**样例**
+
+把 sortuniq.txt 文件中所有的小写改为大写。
+
+    # cat sortuniq.txt | tr [:lower:] [:upper:]
+
+![Sort Strings in File](http://www.tecmint.com/wp-content/uploads/2014/10/sort-strings.jpg)
+
+*排序文件中的字符串*
+
+压缩`ls –l`输出中的分隔符为一个空格。
+
+    # ls -l | tr -s ' '
+
+![Squeeze Delimiter](http://www.tecmint.com/wp-content/uploads/2014/10/squeeze-delimeter.jpg)
+
+*压缩分隔符*
+
+#### cut 命令使用方法 ####
+
+cut 命令可以基于字节(-b选项)、字符(-c)或者字段(-f)提取部分输入(从标准输入或者文件中)并且将结果输出到标准输出。在最后一种情况下(基于字段),默认的字段分隔符是一个制表符,但可以由 -d 选项来指定不同的分隔符。
+
+**样例**
+
+从 /etc/passwd 中提取用户账户和他们被分配的默认 shell(-d 选项允许我们指定分界符,-f 选项指定那些字段将被提取)。
+
+    # cat /etc/passwd | cut -d: -f1,7
+
+![Extract User Accounts](http://www.tecmint.com/wp-content/uploads/2014/10/extract-user-accounts.jpg)
+
+*提取用户账户*
+
+将以上命令结合起来,我们将使用 last 命令的输出中第一和第三个非空文件创建一个文本流。我们将使用 grep 作为第一过滤器来检查用户 gacanepa 的会话,然后将分隔符压缩至一个空格(tr -s ' ')。下一步,我们将使用 cut 来提取第一和第三个字段,最后使用第二个字段(本样例中,指的是IP地址)来排序之后,再用 uniq 去重。
+
+    # 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 命令样例*
+
+上面的命令显示了如何将多个命令和管道结合起来,以便根据我们的要求得到过滤后的数据。你也可以逐步地使用它以帮助你理解输出是如何从一个命令传输到下一个命令的(顺便说一句,这是一个非常好的学习经验!)
+
+### 总结 ###
+
+尽管这个例子(以及在当前教程中的其他实例)第一眼看上去可能不是非常有用,但是他们是体验在 Linux 命令行中创建、编辑和操作文件的一个非常好的开始。请随时留下你的问题和意见——不胜感激!
+
+#### 参考链接 ####
+
+- [关于 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]
+译者:[Xuanwo](https://github.com/Xuanwo)
+校对:[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-2336-1.html
+[2]:https://linux.cn/article-2250-1.html
+[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
+[6]:http://www.tecmint.com/installing-network-services-and-configuring-services-at-system-boot/
\ No newline at end of file
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
deleted file mode 100644
index 79e263d7e0..0000000000
--- a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md	
+++ /dev/null
@@ -1,220 +0,0 @@
-Translating by Xuanwo
-
-LFCS系列第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件
-================================================================================
-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基金会认证系统管理员——第一讲
-
-请观看下面关于Linux基金会认证计划的演示:
-
-
-
-该系列将命名为《LFCS系列第一讲》至《LFCS系列第十讲》并覆盖关于Ubuntu,CentOS以及openSUSE的下列话题。
-
-- 第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件
-- 第二讲:如何安装和使用vi/m全功能文字编辑器
-- 第三讲:归档文件/目录和在文件系统中寻找文件
-- 第四讲:为存储设备分区,格式化文件系统和配置交换分区
-- 第五讲:在Linux中挂载/卸载本地和网络(Samba & NFS)文件系统
-- 第六讲:组合分区作为RAID设备——创建&管理系统备份
-- 第七讲:管理系统启动进程和服务(使用SysVinit, Systemd 和 Upstart)
-- 第八讲:管理用户和组,文件权限和属性以及启用账户的sudo权限
-- 第九讲:Linux包管理与Yum,RPM,Apt,Dpkg,Aptitude,Zypper
-- 第十讲:学习简单的Shell脚本和文件系统故障排除
-
-本文是覆盖这个参加LFCS认证考试的所必需的范围和能力的十个教程的第一讲。话说了那么多,快打开你的终端,让我们开始吧!
-
-### 处理Linux中的文本流 ###
-
-Linux将程序中的输入和输出当成字符流或者字符序列。在开始理解重定向和管道之前,我们必须先了解三种最重要的I/O(Input and Output,输入和输出)流,事实上,它们都是特殊的文件(根据UNIX和Linux中的约定,数据流和外围设备或者设备文件也被视为普通文件)。
-
-> (重定向操作符) 和 | (管道操作符)之间的区别是:前者将命令与文件相连接,而后者将命令的输出和另一个命令相连接。
-
-    # command > file
-    # command1 | command2
-
-由于重定向操作符静默创建或覆盖文件,我们必须特别小心谨慎地使用它,并且永远不要把它和管道混淆起来。在Linux和UNIX系统上管道的优势是:第一个命令的输出不会写入一个文件而是直接被第二个命令读取。
-
-在下面的操作练习中,我们将会使用这首诗——《A happy child》(匿名作者)
-
-![cat command](http://www.tecmint.com/wp-content/uploads/2014/10/cat-command.png)
-
-cat 命令样例
-
-#### 使用 sed ####
-
-sed是流编辑器(stream editor)的缩写。为那些不懂术语的人额外解释一下,流编辑器是用来在一个输入流(文件或者管道中的输入)执行基本的文本转换的工具。
-
-sed最基本的用法是字符替换。我们将通过把每个出现的小写y改写为大写Y并且将输出重定向到ahappychild2.txt开始。g标志表示sed应该替换文件每一行中所有应当替换的实例。如果这个标志省略了,sed将会只替换每一行中第一次出现的实例。
-
-**基本语法:**
-
-    # sed ‘s/term/replacement/flag’ file
-
-**我们的样例:**
-
-    # sed ‘s/y/Y/g’ ahappychild.txt > ahappychild2.txt
-
-![sed command](http://www.tecmint.com/wp-content/uploads/2014/10/sed-command.png)
-
-sed 命令样例
-
-如果你要在替换文本中搜索或者替换特殊字符(如/,\,&),你需要使用反斜杠对它进行转义。
-
-例如,我们将会用一个符号来替换一个文字。与此同时,我们将把一行最开始出现的第一个I替换为You。
-
-    # 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 替换字符串
-
-在上面的命令中,^(插入符号)是众所周知用来表示一行开头的正则表达式。
-
-正如你所看到的,我们可以通过使用分号分隔以及用括号包裹来把两个或者更多的替换命令(并在他们中使用正则表达式)链接起来。
-
-另一种sed的用法是显示或者删除文件中选中的一部分。在下面的样例中,将会显示/var/log/messages中从6月8日开始的头五行。
-
-    # sed -n '/^Jun  8/ p' /var/log/messages | sed -n 1,5p
-
-请注意,在默认的情况下,sed会打印每一行。我们可以使用-n选项来覆盖这一行为并且告诉sed只需要打印(用p来表示)文件(或管道)中匹配的部分(第一种情况下行开头的第一个6月8日以及第二种情况下的一到五行*此处翻译欠妥,需要修正*)。
-
-最后,可能有用的技巧是当检查脚本或者配置文件的时候可以保留文件本身并且删除注释。下面的单行sed命令删除(d)空行或者是开头为`#`的行(|字符返回两个正则表达式之间的布尔值)。
-
-    # sed '/^#\|^$/d' apache2.conf
-
-![sed match string](http://www.tecmint.com/wp-content/uploads/2014/10/sed-match-string.png)
-
-sed 匹配字符串
-
-#### uniq C命令 ####
-
-uniq命令允许我们返回或者删除文件中重复的行,默认写入标准输出。我们必须注意到,除非两个重复的行相邻,否则uniq命令不会删除他们。因此,uniq经常和前序排序(此处翻译欠妥)(一种用来对文本行进行排序的算法)搭配使用。默认情况下,排序使用第一个字段(用空格分隔)作为关键字段。要指定一个不同的关键字段,我们需要使用-k选项。
-
-**样例**
-
-du –sch /path/to/directory/* 命令将会以人类可读的格式返回在指定目录下每一个子文件夹和文件的磁盘空间使用情况(也会显示每个目录总体的情况),而且不是按照大小输出,而是按照子文件夹和文件的名称。我们可以使用下面的命令来让它通过大小排序。
-
-    # du -sch /var/* | sort –h
-
-![sort command](http://www.tecmint.com/wp-content/uploads/2014/10/sort-command.jpg)
-
-sort 命令样例
-
-你可以通过使用下面的命令告诉uniq比较每一行的前6个字符(-w 6)(指定了不同的日期)来统计日志事件的个数,而且在每一行的开头输出出现的次数(-c)。
-
-
-    # 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)
-
-统计文件中数字
-
-最后,你可以组合使用sort和uniq命令(通常如此)。考虑下面文件中捐助者,捐助日期和金额的列表。假设我们想知道有多少个捐助者。我们可以使用下面的命令来分隔第一字段(字段由冒号分隔),按名称排序并且删除重复的行。
-
-    # 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)
-
-寻找文件中不重复的记录
-
-- 也可阅读: [13个“cat”命令样例][1]
-
-#### grep 命令 ####
-
-grep在文件(或命令输出)中搜索指定正则表达式并且在标准输出中输出匹配的行。
-
-**样例**
-
-显示文件/etc/passwd中用户gacanepa的信息,忽略大小写。
-
-    # grep -i gacanepa /etc/passwd
-
-![grep Command](http://www.tecmint.com/wp-content/uploads/2014/10/grep-command.jpg)
-
-grep 命令样例
-
-显示/etc文件夹下所有rc开头并跟随任意数字的内容。
-
-    # 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)
-
-使用grep列出内容
-
-- 也可阅读: [12个“grep”命令样例][2]
-
-#### tr 命令使用技巧 ####
-
-tr命令可以用来从标准输入中翻译(改变)或者删除字符并将结果写入到标准输出中。
-
-**样例**
-
-把sortuniq.txt文件中所有的小写改为大写。
-
-    # cat sortuniq.txt | tr [:lower:] [:upper:]
-
-![Sort Strings in File](http://www.tecmint.com/wp-content/uploads/2014/10/sort-strings.jpg)
-
-排序文件中的字符串
-
-压缩`ls –l`输出中的定界符至一个空格。
-    # ls -l | tr -s ' '
-
-![Squeeze Delimiter](http://www.tecmint.com/wp-content/uploads/2014/10/squeeze-delimeter.jpg)
-
-压缩分隔符
-
-#### cut 命令使用方法 ####
-
-cut命令可以基于字节数(-b选项),字符(-c)或者字段(-f)提取部分输入(从标准输入或者文件中)并且将结果输出到标准输出。在最后一种情况下(基于字段),默认的字段分隔符是一个tab,但不同的分隔符可以由-d选项来指定。
-
-**样例**
-
-从/etc/passwd中提取用户账户和他们被分配的默认shell(-d选项允许我们指定分界符,-f选项指定那些字段将被提取)。
-
-    # cat /etc/passwd | cut -d: -f1,7
-
-![Extract User Accounts](http://www.tecmint.com/wp-content/uploads/2014/10/extract-user-accounts.jpg)
-
-提取用户账户
-
-总结一下,我们将使用最后一个命令的输出中第一和第三个非空文件创建一个文本流。我们将使用grep作为第一过滤器来检查用户gacanepa的会话,然后将分隔符压缩至一个空格(tr -s ' ')。下一步,我们将使用cut来提取第一和第三个字段,最后使用第二个字段(本样例中,指的是IP地址)来排序之后再用uniq去重。
-
-    # 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 命令样例
-
-上面的命令显示了如何将多个命令和管道结合起来以便根据我们的愿望得到过滤后的数据。你也可以逐步地使用它以帮助你理解输出是如何从一个命令传输到下一个命令的(顺便说一句,这是一个非常好的学习经验!)
-
-### 总结 ###
-
-尽管这个例子(以及在当前教程中的其他实例)第一眼看上去可能不是非常有用,但是他们是体验在Linux命令行中创建,编辑和操作文件的一个非常好的开始。请随时留下你的问题和意见——不胜感激!
-
-#### 参考链接 ####
-
-- [关于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]
-译者:[Xuanwo](https://github.com/Xuanwo)
-校对:[校对者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

From d23e599510f4a3bcf4f7edc8ced1f65f942410ff Mon Sep 17 00:00:00 2001
From: wxy 
Date: Mon, 28 Mar 2016 09:49:42 +0800
Subject: [PATCH 1205/1710] PUB:20151109 Install Android On BQ Aquaris Ubuntu
 Phone In Linux

@zpl1025
---
 ...oid On BQ Aquaris Ubuntu Phone In Linux.md | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
 rename {translated/tech => published}/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md (83%)

diff --git a/translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/published/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md
similarity index 83%
rename from translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md
rename to published/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md
index 73397819cd..59946de678 100644
--- a/translated/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md	
+++ b/published/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md	
@@ -4,7 +4,7 @@
 
 如果你正好拥有全球第一支运行 Ubuntu 的手机并且希望将 **BQ Aquaris E4.5 自带的 Ubuntu 系统换成 Android **,那这篇文章能帮你点小忙。
 
-有一万种理由来解释为什么要将 Ubuntu 换成主流 Android OS。其中最主要的一个,就是这个系统本身仍然处于非常早期的阶段,针对的目标用户仍然是开发者和爱好者。不管你的理由是什么,要谢谢 bq 提供的工具,让我们能非常轻松地在 BQ Aquaris 上安装 Android OS。
+有一万种理由来解释为什么要将 Ubuntu 换成主流 Android OS。其中最主要的一个,就是这个系统本身仍然处于非常早期的阶段,针对的目标用户仍然是开发者和爱好者。不管你的理由是什么,要谢谢 BQ 提供的工具,让我们能非常轻松地在 BQ Aquaris 上安装 Android OS。
 
 下面让我们一起看下在 BQ Aquaris 上安装 Android 需要做哪些事情。
 
@@ -20,7 +20,7 @@
 
 #### 第一步:下载 Android 固件 ####
 
-首先是下载可以在 BQ Aquaris E4.5 上运行的 Android 固件。幸运的是我们可以在 bq 的技术支持网站找到。可以从下面的链接直接下载,差不多 650 MB:
+首先是下载可以在 BQ Aquaris E4.5 上运行的 Android 固件。幸运的是我们可以在 BQ 的技术支持网站找到。可以从下面的链接直接下载,差不多 650 MB:
 
 - [下载为 BQ Aquaris E4.5 制作的 Android][1]
 
@@ -28,21 +28,21 @@
 
 我建议去[ bq 的技术支持网站][2]下载最新的固件。
 
-下载完成后解压。在解压后的目录里,找到一个名字是 **MT6582_Android_scatter.txt** 的文件。后面将要用到它。
+下载完成后解压。在解压后的目录里,找到一个名字是 **MT6582\_Android\_scatter.txt** 的文件。后面将要用到它。
 
 #### 第二步:下载刷机工具 ####
 
-bq 已经提供了自己的刷机工具,Herramienta MTK Flash Tool,可以轻松地给设备安装 Andriod 或者 Ubuntu 系统。你可以从下面的链接下载工具:
+BQ 已经提供了自己的刷机工具,Herramienta MTK Flash Tool,可以轻松地给设备安装 Andriod 或者 Ubuntu 系统。你可以从下面的链接下载工具:
 
 - [下载 MTK Flash Tool][3]
 
-考虑到刷机工具在以后可能会升级,你总是可以从[bq 技术支持网站][4]上找到最新的版本。
+考虑到刷机工具在以后可能会升级,你总是可以从 [BQ 技术支持网站][4]上找到最新的版本。
 
 下载完后解压。之后应该可以在目录里找到一个叫 **flash_tool** 的可执行文件。我们稍后会用到。
 
 #### 第三步:移除冲突的软件包(可选) ####
 
-如果你正在用最新版本的 Ubuntu 或 基于 Ubuntu 的 Linux 发行版,稍后可能会碰到 “BROM ERROR : S_UNDEFINED_ERROR (1001)” 错误。
+如果你正在用最新版本的 Ubuntu 或 基于 Ubuntu 的 Linux 发行版,稍后可能会碰到 “BROM ERROR : S\_UNDEFINED\_ERROR (1001)” 错误。
 
 要避免这个错误,你需要卸载有冲突的软件包。可以使用下面的命令:
 
@@ -52,7 +52,7 @@ bq 已经提供了自己的刷机工具,Herramienta MTK Flash Tool,可以轻
 
     sudo service udev restart
 
-检查一下内核模块 cdc_acm 可能存在的边际效应,运行下面的命令:
+检查一下内核模块 cdc_acm 可能存在的副作用,运行下面的命令:
 
     lsmod | grep cdc_acm
 
@@ -76,7 +76,7 @@ bq 已经提供了自己的刷机工具,Herramienta MTK Flash Tool,可以轻
 
 ![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-1.jpeg)
 
-还记得之前第一步里提到的 **MT6582_Android_scatter.txt** 文件吗?这个文本文件就在你第一步中下载的 Android 固件解压后的目录里。点击 Scatter-loading(上图中)然后选中 MT6582_Android_scatter.txt 文件。
+还记得之前第一步里提到的 **MT6582\_Android\_scatter.txt** 文件吗?这个文本文件就在你第一步中下载的 Android 固件解压后的目录里。点击 Scatter-loading(上图中)然后选中 MT6582\_Android\_scatter.txt 文件。
 
 之后,你将看到类似下面图片里的一些绿色线条:
 
@@ -104,7 +104,7 @@ bq 已经提供了自己的刷机工具,Herramienta MTK Flash Tool,可以轻
 
 ### 总结 ###
 
-要感谢厂商提供的工具,让我们可以轻松地 **在 bq Ubuntu 手机上刷 Android**。当然,你可以使用相同的步骤将 Android 替换回 Ubuntu。只是下载的时候选 Ubuntu 固件而不是 Android。
+要感谢厂商提供的工具,让我们可以轻松地 **在  BQ Ubuntu 手机上刷 Android**。当然,你可以使用相同的步骤将 Android 替换回 Ubuntu。只是下载的时候选 Ubuntu 固件而不是 Android。
 
 希望这篇文章可以帮你将你的 bq 手机上的 Ubuntu 刷成 Android。如果有什么问题或建议,可以在下面留言区里讨论。
 
@@ -114,7 +114,7 @@ via: http://itsfoss.com/install-android-ubuntu-phone/
 
 作者:[Abhishek][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 15f4d736e0c18c1a7b92edb4c35263b996e4b243 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Mon, 28 Mar 2016 09:58:39 +0800
Subject: [PATCH 1206/1710] PUB:20151123 How to Install Cockpit in Fedora or
 CentOS or RHEL or Arch Linux

@ictlyh
---
 ... Fedora or CentOS or RHEL or Arch Linux.md | 148 ------------------
 1 file changed, 148 deletions(-)
 delete mode 100644 translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md

diff --git a/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md b/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md
deleted file mode 100644
index 38a89dcbc2..0000000000
--- a/translated/tech/20151123 How to Install Cockpit in Fedora or CentOS or RHEL or Arch Linux.md	
+++ /dev/null
@@ -1,148 +0,0 @@
-如何在 Fedora/CentOS/RHEL 或 Arch Linux 上安装 Cockpit
-================================================================================
-Cockpit 是一个免费开源的服务器管理软件,它使得我们可以通过它好看的 web 前端界面轻松地管理我们的 GNU/Linux 服务器。Cockpit 使得 linux 系统管理员、系统维护员和开发者能轻松地管理他们的服务器并执行一些简单的任务,例如管理存储、检测日志、启动或停止服务以及一些其它任务。它的报告界面添加了一些很好的功能使得可以轻松地在终端和 web 界面之间切换。另外,它不仅使得管理一台服务器变得简单,更重要的是只需要一个单击就可以在一个地方同时管理多个通过网络连接的服务器。它非常轻量级,web 界面也非常简单易用。在这篇博文中,我们会学习如何安装 Cockpit 并用它管理我们的运行着 Fedora、CentOS、Arch Linux 以及 RHEL 发行版操作系统的服务器。下面是 Cockpit 在我们的 GNU/Linux 服务器中一些非常棒的功能:
-
-1. 它包含 systemd 服务管理器。
-2. 有一个用于故障排除和日志分析的 Journal 日志查看器。
-3. 包括 LVM 在内的存储配置比以前任何时候都要简单。
-4. 用 Cockpit 可以进行基本的网络配置。
-5. 可以轻松地添加和删除用户以及管理多台服务器。
-
-### 1. 安装 Cockpit ###
-
-首先,我们需要在我们基于 linux 的服务器上安装 Cockpit。大部分发行版的官方软件仓库中都有可用的 cockpit 安装包。这篇博文中,我们会在 Fedora 22、CentOS 7、Arch Linux 和 RHEL 7 中通过它们的官方软件仓库安装 Cockpit。
-
-#### CentOS / RHEL ####
-
-CentOS 和 RHEL 官方软件库中有可用的 Cockpit。我们只需要用 yum 管理器就可以安装。只需要以 sudo/root 权限运行下面的命令就可以安装它。
-
-    # yum install cockpit
-
-![Centos 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-centos.png)
-
-#### Fedora 22/21 ####
-
-和 CentOS 一样, Fedora 的官方软件库默认也有可用的 Cockpit。我们只需要用 dnf 软件包管理器就可以安装 Cockpit。
-
-    # dnf install cockpit
-
-![Fedora 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-fedora.png)
-
-#### Arch Linux ####
-
-现在 Arch Linux 官方软件库中还没有可用的 Cockpit,但 Arch 用户库(Arch User Repository,AUR)有。只需要运行下面的 yaourt 命令就可以安装。
-
-    # yaourt cockpit
-
-![Arch linux 上安装 Cockpit](http://blog.linoxide.com/wp-content/uploads/2015/10/install-cockpit-archlinux.png)
-
-### 2. 启动并启用 Cockpit ###
-
-成功安装完 Cockpit,我们就要用服务/守护进程管理器启动 Cockpit 服务。到了 2015 年,尽管一些 linux 发行版仍然运行 SysVinit 管理守护进程,但大部分 linux 发行版都采用了 Systemd,Cockpit 使用 systemd 完成从运行守护进程到服务几乎所有的功能。因此,我们只能在运行着 Systemd 的最新的 linux 发行版中安装 Cockpit。要启动 Cockpit 并让它在每次系统重启时自动启动,我们需要在终端或控制台中运行下面的命令。
-    # systemctl start cockpit
-
-    # systemctl enable cockpit.socket
-
-	创建从 /etc/systemd/system/sockets.target.wants/cockpit.socket 到 /usr/lib/systemd/system/cockpit.socket 的符号链接。
-
-### 3. 允许通过防火墙 ###
-
-启动 Cockpit 并使得它能在每次系统重启时自动启动后,我们现在要给它配置防火墙。由于我们的服务器上运行着防火墙程序,我们需要允许它通过某些端口使得从服务器外面可以访问 Cockpit。
-
-#### Firewalld ####
-
-    # firewall-cmd --add-service=cockpit --permanent
-
-    success
-
-    # firewall-cmd --reload
-
-    success
-
-![允许 Cockpit 通过 Firewalld](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-allowing-firewalld.png)
-
-#### Iptables ####
-
-    # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-
-    # service iptables save
-
-### 4. 访问 Cockpit Web 界面 ###
-
-下面,我们终于要通过 web 浏览器访问 Cockpit web 界面了。根据配置,我们只需要用浏览器打开 https://ip-address:9090 或 https://server.domain.com:9090。在我们这篇博文中,我们用浏览器打开 https://128.199.114.17:9090,正如下图所示。
-
-![通过 SSL 访问 Cockpit Web 服务](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-webserver-ssl-proceed.png)
-
-此时会出现一个 SSL 认证警告,因为我们正在使用一个自签名认证。我们只需要忽略这个警告并进入到登录页面,在 chrome/chromium 中,我们需要点击 Show Advanced 然后点击 **Proceed to 128.199.114.17 (unsafe)**。
-
-![Cockpit 登录界面](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-login-screen.png)
-
-现在,要进入仪表盘,我们需要输入详细的登录信息。这里,用户名和密码和用于登录我们的 linux 服务器的用户名和密码相同。当我们输入登录信息并点击 Log In 按钮后,我们就会进入到 Cockpit 仪表盘。
-
-![Cockpit 仪表盘](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-dashboard.png)
-
-这里我们可以看到所有的菜单以及 CPU、磁盘、网络、存储使用情况的可视化结果。仪表盘正如上图所示。
-
-#### 服务 ####
-
-要管理服务,我们需要点击 web 页面右边菜单中的 Services 按钮。然后,我们会看到服务被分成了 5 个类别,目标、系统服务、套接字、计时器和路径。
-
-![Cockpit 服务](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-services.png)
- 
-#### Docker 容器 ####
-
-我们甚至可以用 Cockpit 管理 docker 容器。用 Cockpit 监控和管理 Docker 容器非常简单。由于我们的服务器中没有安装运行 docker,我们需要点击 Start Docker。
-
-
-![Cockpit 容器](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-container.png)
-
-Cockpit 会自动在我们的服务器上安装和运行 docker。启动之后,我们就会看到下面的截图。然后我们就可以按照需求管理 docker 镜像、容器。
-
-![Cockpit 容器管理](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-containers-mangement.png)
-
-#### Journal 日志查看器 ####
-
-Cockpit 有个日志查看器,它把错误、警告、注意分到不同的标签页。我们也有一个 All 标签页,在这里可以看到所有的日志信息。
-
-![Cockpit Journal 日志](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-journal-logs.png)
-
-#### 网络 ####
-
-在网络部分,我们可以看到两个可视化发送和接收速度的图。我们可以看到这里有一个可用网卡的列表,还有 Add Bond、Bridge、VLAN 的选项。如果我们需要配置一个网卡,我们只需要点击网卡名称。在下面,我们可以看到网络的 Journal 日志信息。
-
-![Cockpit Network](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-network.png)
-
-#### 存储 ####
-
-现在,用 Cockpit 可以方便地查看硬盘的读写速度。我们可以查看存储的 Journal 日志以便进行故障排除和修复。在页面中还有一个已用空间的可视化图。我们甚至可以卸载、格式化、删除一块硬盘的某个分区。它还有类似创建 RAID 设备、卷组等攻能。
-
-![Cockpit Storage](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-storage.png)
-
-#### 用户管理 ####
-
-通过 Cockpit Web 界面我们可以方便地创建新用户。在这里创建的账户会应用到系统用户账户。我们可以用它更改密码、指定角色、以及删除用户账户。
-
-![Cockpit Accounts](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-accounts.png)
-
-#### 实时终端 ####
-
-Cockpit 还有一个很棒的特性。是的,我们可以执行命令,用 Cockpit 界面提供的实时终端执行任务。这使得我们可以根据我们的需求在 web 界面和终端之间自由切换。
-
-![Cockpit 终端](http://blog.linoxide.com/wp-content/uploads/2015/10/cockpit-terminal.png)
-
-### 总结 ###
-
-Cockpit 是由 [Red Hat][1] 开发的使得管理服务器变得轻松简单的免费开源软件。它非常适合于进行简单的系统管理任务和新手系统管理员。它仍然处于开发阶段,还没有稳定版发行。因此不适合于生产环境。它是针对最新的默认安装了 systemd 的 Fedora、CentOS、Arch Linux、RHEL 系统开发的。如果你想在 Ubuntu 上安装 Cockpit,你可以通过 PPA 访问,但现在已经过期了。如果你有任何疑问、建议,请在下面的评论框中反馈给我们,这样我们可以改进和更新我们的内容。非常感谢 ! 
-
---------------------------------------------------------------------------------
-
-via: http://linoxide.com/linux-how-to/install-cockpit-fedora-centos-rhel-arch-linux/
-
-作者:[Arun Pyasi][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/arunp/
-[1]:http://www.redhat.com/
\ No newline at end of file

From da1e4e1140dad46bd2546efcb16d80ee1afa28e0 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Tue, 29 Mar 2016 05:36:33 +0800
Subject: [PATCH 1207/1710] PUB:Part 2 - LFCS--How to Install and Use vi or vim
 as a Full Text Editor.md

@GHLandy
---
 ...and Use vi or vim as a Full Text Editor.md | 251 +++++++++++
 ...and Use vi or vim as a Full Text Editor.md | 392 ------------------
 2 files changed, 251 insertions(+), 392 deletions(-)
 create mode 100644 published/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md
 delete mode 100644 translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md

diff --git a/published/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md b/published/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md
new file mode 100644
index 0000000000..d7d962de0f
--- /dev/null
+++ b/published/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md	
@@ -0,0 +1,251 @@
+LFCS 系列第二讲:如何安装和使用纯文本编辑器 vi/vim
+================================================================================
+
+几个月前, Linux 基金会发起了 LFCS (Linux Foundation Certified System administrator,Linux 基金会认证系统管理员)认证,以帮助世界各地的人来验证他们能够在 Linux 系统上做从基础的到中级的系统管理任务:如系统支持、第一手的故障诊断和处理、以及何时向上游支持团队提出问题的智能决策。
+
+![Learning VI Editor in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/LFCS-Part-2.png)
+
+*在 Linux 中学习 vi 编辑器*
+
+请简要看看一下视频,里边介绍了 Linux 基金会认证的程序。
+
+注:youtube 视频
+
+
+
+这篇文章是系列教程的第二讲,在这个部分中,我们会介绍 vi/vim 基本的文件编辑操作,帮助读者理解编辑器中的三个模式,这是 LFCS 认证考试中必须掌握的。
+
+### 使用 vi/vim 执行基本的文件编辑操作 ###
+
+vi 是为 Unix 而生的第一个全屏文本编辑器。它的设计小巧简单,对于仅仅使用过诸如 NotePad++ 或 gedit 等图形界面的文本编辑器的用户来说,使用起来可能存在一些困难。
+
+为了使用 vi,我们必须首先理解这个强大的程序操作中的三种模式,方便我们后边学习这个强大的文本处理软件的相关操作。
+
+请注意,大多数的现代 Linux 发行版都集成了 vi 的变种——— vim(Vi IMproved,改进版 VI),相比于 vi,它有更多新功能。所以,我们会在本教程中交替使用 vi 和 vim。
+
+如果你的发行版还没有安装 vim,你可以通过以下方法来安装:
+
+- Ubuntu 及其衍生版:apt-get update && apt-get install vim
+- 以 Red-Hat 为基础的发行版:yum update && yum install vim
+- openSUSE :zypper update && zypper install vim
+
+### 我为什么要学习 vi ###
+
+至少有以下两个理由:
+
+1. 因为它是 POSIX 标准的一部分,所以不管你使用什么发行版 vi 总是可用的。
+
+2. vi 基本不消耗多少系统资源,并且允许我们仅仅通过键盘来完成任何可能的任务。
+
+此外,vi 有着非常丰富的内置帮助手册,程序打开后就可以通过 `:help` 命令来查看。这个内置帮助手册比 vi/vim 的 man 页面包含了更多信息。
+
+![vi Man Pages](http://www.tecmint.com/wp-content/uploads/2014/10/vi-man-pages.png)
+
+*vi Man 页面*
+
+#### 启动 vi ####
+
+可以通过在命令提示符下输入 vi 来启动。
+
+![Start vi Editor](http://www.tecmint.com/wp-content/uploads/2014/10/start-vi-editor.png)
+
+*使用 vi 编辑器*
+
+然后按下字母 i,你就可以开始输入了。或者通过下面的方法来启动 vi:
+
+    # vi filename
+
+这样会打开一个名为 filename 的缓存区(buffer)(稍后会详细介绍缓存区),在你编辑完成之后就可以存储在磁盘中了。
+
+#### 理解 vi 的三个模式 ####
+
+1. 在命令(command)模式中,vi 允许用户浏览该文件并输入由一个或多个字母组成的、简短的、大小写敏感的 vi 命令。这些命令的大部分都可以增加一个前缀数字表示执行次数。
+
+	比如:`yy`(或`Y`) 复制当前的整行,`3yy`(或`3Y`) 复制当前整行和下边紧接着的两行(总共3行)。通过 `Esc` 键可以随时进入命令模式(而不管当前工作在什么模式下)。事实上,在命令模式下,键盘上所有的输入都被解释为命令而非文本,这往往使得初学者困惑不已。
+
+2. 在末行(ex)模式中,我们可以处理文件(包括保存当前文件和运行外部程序)。我们必须在命令模式下输入一个冒号(`:`),才能进入这个模式,紧接着是要在末行模式下使用的命令。执行之后 vi 自动回到命令模式。
+
+3. 在文本输入(insert)模式(通常在命令模式下使用字母 `i` 进入这个模式)中,我们可以随意输入文本。大多数的键入将以文本形式输出到屏幕(一个重要的例外是`Esc`键,它将退出文本编辑模式并回到命令模式)。
+
+![vi Insert Mode](http://www.tecmint.com/wp-content/uploads/2014/10/vi-insert-mode.png)
+
+*vi 文本插入模式*
+
+#### vi 命令 ####
+
+下面的表格列出常用的 vi 命令。文件编辑的命令可以通过添加叹号的命令强制执行(如,`:q!` 命令强制退出编辑器而不保存文件)。
+
+|关键命令|描述|
+|------|:--:|
+|`h` 或 ←|光标左移一个字符|
+|`j` 或 ↓|光标下移一行|
+|`k` 或 ↑|光标上移一行|
+|`l` (小写字母 L) 或 →|光标右移一个字符|
+|`H`|光标移至屏幕顶行|
+|`L`|光标移至屏幕末行|
+|`G`|光标移至文件末行|
+|`w`|光标右移一个词|
+|`b`|光标左移一个词|
+|`0` (数字零)|光标移至行首|
+|`^`|光标移至当前行第一个非空格字符|
+|`$`|光标移至当前行行尾|
+|`Ctrl-B`|向后翻页|
+|`Ctrl-F`|向前翻页|
+|`i`|在光标所在位置插入文本|
+|`I` (大写字母 i)|在当前行首插入文本|
+|`J` (大写字母 j)|将下一行与当前行合并(下一行上移到当前行)|
+|`a`|在光标所在位置后追加文本|
+|`o` (小写字母 O)|在当前行下边插入空白行|
+|`O` (大写字母 O)|在当前行上边插入空白行|
+|`r`|替换光标所在位置的一个字符|
+|`R`|从光标所在位置开始覆盖插入文本|
+|`x`|删除光标所在位置的字符|
+|`X`|立即删除光标所在位置之前(左边)的一个字符|
+|`dd`|剪切当前整行文本(为了之后进行粘贴)|
+|`D`|剪切光标所在位置到行末的文本(该命令等效于 `d$`)|
+|`yX`|给出一个移动命令 X (如 `h`、`j`、`H`、`L` 等),复制适当数量的字符、单词或者从光标开始到一定数量的行|
+|`yy` 或 `Y`|复制当前整行|
+|`p`|粘贴在光标所在位置之后(下一行)|
+|`P`|粘贴在光标所在位置之前(上一行)
+|`.` (句点)|重复最后一个命令|
+|`u`|撤销最后一个命令|
+|`U`|撤销最后一行的最后一个命令,只有光标仍在最后一行才能执行。|
+|`n`|在查找中跳到下一个匹配项|
+|`N`|在查找中跳到前一个匹配项|
+|`:n`|下一个文件,编辑多个指定文件时,该命令加载下一个文件。|
+|`:e file`|加载新文件来替代当前文件|
+|`:r file`|将新文件的内容插入到光标所在位置的下一行|
+|`:q`|退出并放弃更改|
+|`:w file`|将当期打开的缓存区保存为file。如果是追加到已存在的文件中,则使用 :`w >> file` 命令|
+|`:wq`|保存当前文件的内容并退出。等效于 `x!` 和 `ZZ`|
+|`:r! command`|执行 command 命令,并将命令的输出插入到光标所在位置的下一行|
+
+#### vi 选项 ####
+
+下列选项可以让你在运行 Vim 的时候很方便(需要写入到 `~/.vimrc` 文件):
+
+    # 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编辑器选项*
+
+- set number 当 vi 打开或新建文件时,显示行号。
+- syntax on 打开语法高亮(对应多个文件扩展名),以便源码文件和配置文件更具可读性。
+- set tabstop=4 设置制表符间距为 4 个空格(默认为 8)。
+- set autoindent 将前一行的缩进应用于下一行。 
+
+#### 查找和替换 ####
+
+vi 具有通过查找将光标移动到(在单独一行或者整个文件中的)指定位置。它还可自动或者通过用户确认来执行文本替换。
+
+a) 在行内查找。`f` 命令在当前行查找指定字符,并将光标移动到指定字符出现的位置。
+
+例如,命令 `fh` 会在本行中将光标移动到字母`h`下一次出现的位置。注意,字母 `f` 和你要查找的字符都不会出现在屏幕上,但是当你按下回车的时候,要查找的字符会被高亮显示。
+
+比如,以下是在命令模式按下 `f4` 之后的结果。
+
+![Search String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-string.png)
+
+*在 vi 中查找字符*
+
+b) 在整个文件内查找。使用 `/` 命令,紧接着需要查找的单词或短语。这个查找可以通过使用 `n` 命令或者 `N` 重复查找上一个查找的字符串。以下是在命令模式键入 `/Jane` 的查找结果。
+
+![Vi Search String in File](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-line.png)
+
+*在 vi 中查找字符*
+
+c) vi 通过使用命令来完成多行或者整个文件的替换操作(类似于 sed)。我们可以使用以下命令,使得整个文件中的单词 “old” 替换为 “young”。
+
+    :%s/old/young/g
+
+**注意**:冒号位于命令的最前面。
+
+![Vi Search and Replace](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-and-replace.png)
+
+*vi 的查找和替换*
+
+冒号 (`:`) 进入末行模式,在本例中 `s` 表示替换,`%` 是从第一行到最后一行的表示方式(也可以使用 nm 表示范围,即第 n 行到第 m 行),old 是查找模式,young 是用来替换的文本,`g` 表示在每个查找出来的字符串都进行替换。
+
+另外,在命令最后增加一个 `c`,可以在每一个匹配项替换前进行确认。
+
+    :%s/old/young/gc
+
+将旧文本替换为新文本前,vi/vim 会向我们显示以下信息:
+
+![Replace String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-replace-old-with-young.png)
+
+*vi 中替换字符串*
+
+- `y`: 执行替换(yes)
+- `n`: 跳过这个匹配字符的替换并转到下一个(no)
+- `a`: 在当前匹配字符及后边的相同项全部执行替换
+- `q` 或 `Esc`: 取消替换
+- `l` (小写 L): 执行本次替换并退出
+- `Ctrl-e`, `Ctrl-y`: 下翻页,上翻页,查看相应的文本来进行替换
+
+#### 同时编辑多个文件 ####
+
+我们在命令提示符输入 vim file1 file2 file3 如下:
+
+    # vim file1 file2 file3
+
+vim 会首先打开 file1,要跳到 file2 需用 :n 命令。当需要打开前一个文件时,:N 就可以了。
+
+为了从 file1 跳到 file3
+
+a) `:buffers` 命令会显示当前正在编辑的文件列表
+
+    :buffers
+
+![Edit Multiple Files](http://www.tecmint.com/wp-content/uploads/2014/10/vi-edit-multiple-files.png)
+
+*编辑多个文件*
+
+b) `:buffer 3` 命令(后边没有 s)会打开第三个文件 file3 进行编辑。
+
+在上边的图片中,标记符号 `#` 表示该文件当前已被打开,但是是在后台,而 `%a` 标记的文件是正在被编辑的。另外,文件号(如上边例子的 3)后边的空格表示该文件还没有被打开。
+
+#### vi 的临时缓存区 ####
+
+为了复制连续的多行(比如,假设为 4 行)到一个名为 a 的临时缓存区(与文件无关),并且还要将这些行粘贴到在当前 vi 会话文件中的其它位置,我们需要:
+
+1. 按下 `Esc` 键以确认 vi 处在命令模式
+
+2. 将光标放在我们希望复制的第一行文本
+
+3. 输入 `a4yy` 复制当前行和接下来的 3 行,进入一个名为 a 的缓存区。我们可以继续编辑我们的文件————我们不需要立即插入刚刚复制的行。
+
+4. 当到了需要使用刚刚复制的那些行的位置,在 `p`(小写)或 `P`(大写)命令前使用`a`来将复制行插入到名为 a 的 缓存区:
+	- 输入 `ap`,复制行将插入到光标位置所在行的下一行。
+	- 输入 `aP`,复制行将插入到光标位置所在行的上一行。
+
+如果愿意,我们可以重复上述步骤,将缓存区 a 中的内容插入到我们文件的多个位置。像本节中这样的一个临时缓存区,会在当前窗口关闭时释放掉。
+
+### 总结 ###
+
+像我们看到的一样,vi/vim 在命令接口下是一个强大而灵活的文本编辑器。通过以下链接,随时分享你自己的技巧和评论。
+
+#### 参考链接 ####
+
+- [关于 LFCS][1]
+- [为什么需要 Linux 基金会认证?][2]
+- [注册 LFCS 考试][3]
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/vi-editor-usage/
+
+作者:[Gabriel Cánepa][a]
+译者:[GHLandy](https://github.com/GHLandy)
+校对:[东风唯笑](https://github.com/dongfengweixiao), [wxy](https://github.com/wxy)
+
+本文由 [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
diff --git a/translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md b/translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md
deleted file mode 100644
index c7f3d5140c..0000000000
--- a/translated/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md	
+++ /dev/null
@@ -1,392 +0,0 @@
-GHLandy Translated
-
-LFCS系列第二讲:如何安装和使用纯文本编辑器vi/vim
-
-================================================================================
-
-几个月前, Linux 基金会发起了 LFCS (Linux Foundation Certified System administrator,Linux 基金会认证系统管理员)认证,以帮助世界各地的人来验证他们能够在 Linux 系统上做基本的中间系统管理任务:如系统支持,第一手的故障诊断和处理,以及何时向上游支持团队提出问题的智能决策。
-
-![Learning VI Editor in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/LFCS-Part-2.png)
-
-在 Linux 中学习 vi 编辑器
-
-请简要看看一下视频,里边介绍了 Linux 基金会认证的程序。
-
-注:youtube 视频
-
-
-
-这篇文章是《十个教程》系列的第二部分,在这个部分,我们会介绍 vi/vim 基本的文件编辑操作,帮助读者理解编辑器中的三个模式,这是LFCS认证考试中必须掌握的。
-
-### 使用 vi/vim 执行基本的文件编辑操作 ###
-
-vi 是为 Unix 而生的第一个全屏文本编辑器。它的设计小巧简单,对于仅仅使用过诸如 NotePad++ 或 gedit 等图形界面的文本编辑器的用户来说,使用起来可能存在一些困难。
-
-为了使用 vi,我们必须首先理解这个强大的程序操作中的三种模式,方便我们后边学习这个强大的文本处理软件的相关操作。
-
-请注意,大多数的现代 Linux 发行版都集成了 vi 的变种——— vim(Vi IMproved,VI 的改进),相比于 vi,它有更多新功能。所以,我们会在本教程中交替使用 vi 和 vim。
-
-如果你的发行版还没有安装 vim,你可以通过以下方法来安装:
-
-- Ubuntu 及其衍生版:apt-get update && apt-get install vim
-- 以 Red-Hat 为基础的发行版:yum update && yum install vim
-- openSUSE :zypper update && zypper install vim
-
-### 我为什么要学习 vi ###
-
-至少有以下两个理由:
-
-1.因为它是 POSIX 标准的一部分,所以不管你使用什么发行版 vi 总是可用的。
-
-2.vi 基本不消耗多少系统资源,并且允许我们仅仅通过键盘来完成任何可能的任务。
-
-此外,vi 有的非常丰富的内置帮助手册,程序打开后就可以通过 :help 命令来查看。这个内置帮助手册比 vi/vim 的 man 页面包含了更多信息。
-
-![vi Man Pages](http://www.tecmint.com/wp-content/uploads/2014/10/vi-man-pages.png)
-
-vi Man 页面
-
-#### 启动 vi ####
-
-可以通过在命令提示符下输入 vi 来启动。
-
-![Start vi Editor](http://www.tecmint.com/wp-content/uploads/2014/10/start-vi-editor.png)
-
-使用 vi 编辑器
-
-然后按下字母 i,你就可以开始输入了。或者通过下面的方法来启动 vi:
-
-    # vi filename
-
-这样会打开一个名为 filename 的 buffer(稍后详细介绍 buffer),在你编辑完成之后就可以存储在磁盘中了。
-
-#### 理解 vi 的三个模式 ####
-
-1.在命令模式中,vi 允许用户浏览该文件并输入由一个或多个字母组成简短的、大小写敏感的 vi 命令。这些命令的大部分都可以增加一个前缀数字表示执行次数。
-
-比如:yy(或Y) 复制当前的整行,3yy(或3Y) 复制当前整行和下边紧接着的两行(总共3行)。通过 Esc 键可以随时进入命令模式(而不管当前工作在什么模式下)。事实上,在命令模式下,键盘上所有的输入都被解释为命令而非文本,这往往使得初学者困惑不已。
-
-2.在末行模式中,我们可以处理文件(包括保存当前文件和运行外部程序)。我们必须在命令模式下输入一个冒号(:),才能进入这个模式,紧接着是需要使用的末行模式下的命令。执行之后 vi 自动回到命令模式。
-
-3.在文本输入模式(通常使用字母  i 进入这个模式)中,我们可以随意输入文本。大多数的键入将以文本形式输出到屏幕(一个重要的例外是Esc键,它将退出文本编辑模式并回到命令模式)。
-
-![vi Insert Mode](http://www.tecmint.com/wp-content/uploads/2014/10/vi-insert-mode.png)
-
-vi 文本插入模式
-
-#### vi 命令 ####
-
-下面的表格列出常用的 vi 命令。文件版本的命令可以通过添加叹号的命令强制执行(如,:q! 命令强制退出编辑器而不保存文件)。
-
-注:表格
-
-  -  
-  -  
-  
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-    
-      
-      
-    
-  
-
 关键命令 描述
 h 或 ← 光标左移一个字符
 j 或 ↓ 光标下移一行
 k 或 ↑ 光标上移一行
 l (小写 L) 或 → 光标右移一个字符
 H 光标移至屏幕顶行
 L 光标移至屏幕末行
 G 光标移至文件末行
 w 光标右移一个词
 b 光标左移一个词
 0 (零) 光标移至行首
 ^ 光标移至当前行第一个非空格字符
 $ 光标移至当前行行尾
 Ctrl-B 向后翻页
 Ctrl-F 向前翻页
 i 在光标所在位置插入文本
 I (大写 i) 在当前行首插入文本
 J (大写 j) 将下一行与当前行合并(下一行上移到当前行)
 a 在光标所在位置后追加文本
 o (小写 O) 在当前行下边插入空白行
 O (大写 o) 在当前行上边插入空白行
 r 替换光标所在位置的字符
 R 光标所在位置覆盖插入文本
 x 删除光标所在位置的字符
 X 立即删除光标所在位置之前(左边)的一个字符
 dd 剪切当前整行文本(为了之后进行粘贴)
 D 剪切光标所在位置到行末的文本(该命令等效于 d$)
 yX 给 X 命令一个移动长度,复制适当数量的字符、单词或者从光标开始到一定数量的行
 yy 或 Y 复制当前整行
 p 粘贴在光标所在位置之后(下一行)
 P 粘贴在光标所在位置之前(上一行)
 . (句点) 重复最后一个命令
 u 撤销最后一个命令
 U 撤销最后一行的最后一个命令,只有光标仍在最后一行才能执行。
 n 在查找中跳到下一个匹配项
 N 在查找中跳到前一个匹配项
 :n 下一个文件,编辑多个指定文件时,该命令加载下一个文件。
 :e file 加载新文件来替代当前文件
 :r file 将新文件的内容插入到光标所在位置的下一行
 :q 退出并放弃更改
 :w file 将当期打开的buffer保存为file。如果是追加到已存在的文件中,则使用 :w >> file 命令
 :wq 保存当前文件的内容并退出。等效于 x! 和 ZZ
 :r! command 执行 command 命令,并将命令的输出插入到光标所在位置的下一行
- -#### vi 选项 #### - -下列选项将会在启动 Vim 的时候进行加载(需要写入到~/.vimrc文件): - - # 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编辑器选项 - -- set number 当 vi 打开或新建文件时,显示行号。 -- syntax on 打开语法高亮(对应多个文件扩展名),以便源码文件和配置文件更具可读性。 -- set tabstop=4 设置制表符间距为 4 个空格(默认为 8)。 -- set autoindent 将前一行的缩进应用于下一行。 - -#### 查找和替换 #### - -vi 具有通过查找将光标移动到(在单独一行或者整个文件中的)指定位置。它还可自动或者通过用户确认来执行文本替换。 - -a) 在行内查找。f 命令在当前行查找指定字符,并将光标移动到指定字符出现的位置。 - -例如,命令 fh 会在本行中将光标实例字母h出现的位置。注意,字母 f 和你要查找的字符都不会出现在屏幕上,但是当你按下回车的时候,要查找的字符会被高亮显示。 - -比如,以下是在命令模式按下 f4 之后的结果。 - -![Search String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-string.png) - -在 vi 中查找字符。 - -b) 在整个文件内查找。使用 / 命令,紧接着需要查找的单词或短语。这个查找可以通过使用 n 命令或者 N 重复查找上一个查找的字符串。以下是在命令模式键入 /Jane 的查找结果。 - -![Vi Search String in File](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-line.png) - -在vi中查找字符 - -c) vi 通过使用命令来完成多行或者整个文件的替换操作(类似于 sed)。我们可以使用以下命令,使得整个文件中的单词 “old” 替换为 “young”。 - - :%s/old/young/g - -**注意**:冒号位于命令的最前面。 - -![Vi Search and Replace](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-and-replace.png) - -vi 的查找和替换 - -冒号 (:) 进入末行模式,在本例中 s 表示替换,% 是从第一行到最后一行的表示方式(也可以使用 nm 表示范围,即第 n 行到第 m 行),old 是查找模式,young 是用来替换的文本,g 表示在每个查找出来的字符串都进行替换。 - -另外,在命令最后增加一个 c,可以在每一个匹配项替换前进行确认。 - - :%s/old/young/gc - -将就文本替换为新文本前,vi/vim 会想我们显示一下信息: - -![Replace String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-replace-old-with-young.png) - -vi 中替换字符串 - -- y: 执行替换(yes) -- n: 跳过这个匹配字符的替换并转到下一个(no) -- a: 在当前匹配字符及后边的相同项全部执行替换 -- q 或 Esc: 取消替换 -- l (小写 L): 执行本次替换并退出 -- Ctrl-e, Ctrl-y: 下翻页,上翻页,查看相应的文本来进行替换 - -#### 同时编辑多个文件 #### - -我们在命令提示符输入 vim file1 file2 file3 如下: - - # vim file1 file2 file3 - -vim 会首先打开 file1,要跳到 file2 需用 :n 命令。当需要打开前一个文件时,:N 就可以了。 - -为了从 file1 跳到 file3 - -a) :buffers 命令会显示当前正在编辑的文件列表 - - :buffers - -![Edit Multiple Files](http://www.tecmint.com/wp-content/uploads/2014/10/vi-edit-multiple-files.png) - -编辑多个文件 - -b) :buffer 3 命令(后边没有 s)会打开 file 进行编辑。 - -在上边的图片中,标记符号 # 表示该文件当前已被打开在后台,而 %a 标记的文件是正在被编辑的。另外,文件号(如上边例子的 3)后边的空格表示该文件还没有被打开。 - -#### vi 的临时 buffers #### - -为了复制连续的多行(比如,假设为 4 行)到一个名为 a 的临时 buffer(与文件无关),并且还要将这些行粘贴到在当前 vi 会话文件中的其它位置,我们需要: - -1. 按下 Esc 键以确认 vi 处在命令模式 - -2. 将光标放在我们希望复制的第一行文本 - -3. 输入 a4yy 复制当前行和接下来的 3 行,进入一个名为 a 的 buffer。我们一继续编辑我们的文件————我们不需要立即插入刚刚复制的行。 - -4. 当到了需要使用刚刚复制行的位置,在 p(小写)或 P(大写)命令来讲复制行插入到名为 a 的 buffer: - -- 输入 ap,复制行将插入到光标位置所在行的下一行。 -- 输入 aP,复制行将插入到光标位置所在行的上一行。 - -如果愿意,我们可以重复上述步骤,将 buffer a 中的内容插入到我们文件的多个位置。一个临时 buffer,像本次会话中的一样,会在当前窗口关闭时释放掉。 - -### 总结 ### - -像我们看到的一样,vi/vim 在命令接口下是一个强大而灵活的文本编辑器。通过以下链接,随时分享你自己的技巧和评论。 - -#### 参考链接 #### - -- [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] -译者:[GHLandy](https://github.com/GHLandy) -校对:[东风唯笑](https://github.com/dongfengweixiao) - -本文由 [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 From 0f4e053413e6ba48b212bdb3a66a575a2e236c2b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 30 Mar 2016 06:02:14 +0800 Subject: [PATCH 1208/1710] PUB:Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md @GHLandy --- ...e Attributes and Finding Files in Linux.md | 216 +++++------------- 1 file changed, 62 insertions(+), 154 deletions(-) rename {translated/tech => published}/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md (52%) diff --git a/translated/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md b/published/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md similarity index 52% rename from translated/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md rename to published/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md index 876fa4d3af..d99008cc29 100644 --- a/translated/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md +++ b/published/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md @@ -1,165 +1,72 @@ -GHLandy Translated - -LFCS 系列第三讲:如何在 Linux 中归档/压缩文件及目录、设置文件属性和搜索文件 - +LFCS 系列第三讲:归档/压缩文件及目录、设置文件属性和搜索文件 ================================================================================ -最近,Linux 基金会发起了 一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让遍布全世界的人都有机会参加该认证的考试,并且通过考试的人将会得到关于他们有能力在 Linux 上执行基本的中间系统管理任务的认证证书。这项认证包括了对已运行的系统和服务的支持、一流水平的问题解决和分析以及决定何时将问题反映给工程师团队的能力。 + +最近,Linux 基金会发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让遍布全世界的人都有机会参加该认证的考试,通过考试的人将表明他们有能力在 Linux 上执行基本的中级系统管理任务。这项认证包括了对已运行的系统和服务的支持、一流水平的问题解决和分析以及决定何时将问题反映给工程师团队的能力。 ![Linux Foundation Certified Sysadmin – Part 3](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-3.png) -LFCS 系列第三讲 +*LFCS 系列第三讲* 请看以下视频,这里边讲给出 Linux 基金会认证程序的一些想法。 注:youtube 视频 -本讲是《十套教程》系列中的第三讲,在这一讲中,我们会涵盖如何在文件系统中归档/压缩文件及目录、设置文件属性和搜索文件等内容,这些都是 LFCS 认证中必须掌握的知识。 +本讲是系列教程中的第三讲,在这一讲中,我们会涵盖如何在文件系统中归档/压缩文件及目录、设置文件属性和搜索文件等内容,这些都是 LFCS 认证中必须掌握的知识。 ### 归档和压缩的相关工具 ### -文件归档工具将一堆文件整合到一个单独的归档文件之后,我们可以将归档文件备份到不同类型的媒介或者通过网络传输和发送 Email 来备份。在 Linux 中使用频率最高的归档实用工具是 tar。当归档工具和压缩工具一起使用的时候,可以减少同一文件和信息在硬盘中的存储空间。 +文件归档工具将一堆文件整合到一个单独的归档文件之后,我们可以将归档文件备份到不同类型的介质或者通过网络传输和发送 Email 来备份。在 Linux 中使用频率最高的归档实用工具是 tar。当归档工具和压缩工具一起使用的时候,可以减少同一文件和信息在硬盘中的存储空间。 #### tar 使用工具 #### -tar 将一组文件打包到一个单独的归档文件(通常叫做 tar 文件或者 tarball)。tar 这个名称最初代表磁带存档程序(tape archiver),但现在我们可以用它来归档任意类型的可读写媒介上边的数据,而不是只能归档磁带数据。tar 通常与 gzip、bzip2 或者 xz 等压缩工具一起使用,生成一个压缩的 tarball。 +tar 将一组文件打包到一个单独的归档文件(通常叫做 tar 文件或者 tarball)。tar 这个名称最初代表磁带存档程序(tape archiver),但现在我们可以用它来归档任意类型的可读写介质上边的数据,而不是只能归档磁带数据。tar 通常与 gzip、bzip2 或者 xz 等压缩工具一起使用,生成一个压缩的 tarball。 **基本语法:** # tar [选项] [路径名 ...] -其中 ... 代表指定那些文件进行归档操作的表达式 +其中 ... 代表指定哪些文件进行归档操作的表达式 #### tar 的常用命令 #### -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
长选项简写描述
 –create c 创建 tar 归档文件
 –concatenate A 将一存档与已有的存档合并
 –append r 把要存档的文件追加到归档文件的末尾
 –update u 更新新文件到归档文件中去
 –diff 或 –compare d 比较存档与当前文件的不同之处
 –file archive f 使用档案文件或设备
 –list t 列出 tarball 中的内容
 –extract 或 –get x 从归档文件中释放文件
+ +|长选项|简写|描述| +|-----|:---:|:---| +| -create| c| 创建 tar 归档文件| +| -concatenate| A| 将一存档与已有的存档合并| +| -append| r| 把要存档的文件追加到归档文件的末尾| +| -update| u| 更新新文件到归档文件中去| +| -diff 或 -compare| d| 比较存档与当前文件的不同之处| +| -file archive| f| 使用档案文件或归档设备| +| -list| t| 列出 tarball 中的内容| +| -extract 或 -get| x| 从归档文件中释放文件| + #### 常用的操作修饰符 #### 注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
长选项缩写描述
 –directory dir C 执行归档操作前,先转到指定目录
 –same-permissions p 保持原始的文件权限
 –verbose v 列出所有的读取或提取文件。但这个标识符与 –list 一起使用的时候,还会显示出文件大小、属主和时间戳的信息
 –verify W 写入存档后进行校验
 –exclude file — 不把指定文件包含在内
 –exclude=pattern X 以PATTERN模式排除文件
 –gzip 或 –gunzip z 通过gzip压缩归档
 –bzip2 j 通过bzip2压缩归档
 –xz J 通过xz压缩归档
-Gzip 是最古老的压缩工具,压缩率最小,bzip2 的压缩率稍微高一点。另外,xz是最新的压缩工具,压缩率最好。xz 具有最佳压缩率的代价是:完成压缩操作花费最多时间,压缩过程中占有较多系统资源。 +|长选项|缩写|描述| +|-----|:--:|:--| +| -directory dir| C| 执行归档操作前,先转到指定目录| +| -same-permissions| p| 保持原始的文件权限| +| -verbose| v| 列出所有的读取或提取的文件。但这个标识符与 -list 一起使用的时候,还会显示出文件大小、属主和时间戳的信息| +| -verify| W| 写入存档后进行校验| +| -exclude file| | 不把指定文件包含在内| +| -exclude=pattern| X| 以PATTERN模式排除文件| +| -gzip 或 -gunzip| z| 通过gzip压缩归档| +| -bzip2| j| 通过bzip2压缩归档| +| -xz| J| 通过xz压缩归档| + + +Gzip 是最古老的压缩工具,压缩率最小,bzip2 的压缩率稍微高一点。另外,xz 是最新的压缩工具,压缩率最好。xz 具有最佳压缩率的代价是:完成压缩操作花费最多时间,压缩过程中占有较多系统资源。 通常,通过这些工具压缩的 tar 文件相应的具有 .gz、.bz2 或 .xz的扩展名。在下列的例子中,我们使用 file1、file2、file3、file4 和 file5 进行演示。 **通过 gzip、bzip2 和 xz 压缩归档** -归档当前工作目录的所有文件,并以 gzip、bzip2 和 xz 压缩刚刚的归档文件(请注意,用正则表达式来指定那些文件应该归档——这是为了防止归档工具包前一步生成的文件打包进来)。 +归档当前工作目录的所有文件,并以 gzip、bzip2 和 xz 压缩刚刚的归档文件(请注意,用正则表达式来指定哪些文件应该归档——这是为了防止将归档工具包前一步生成的文件打包进来)。 # tar czf myfiles.tar.gz file[0-9] # tar cjf myfiles.tar.bz2 file[0-9] @@ -167,7 +74,7 @@ Gzip 是最古老的压缩工具,压缩率最小,bzip2 的压缩率稍微高 ![Compress Multiple Files Using tar](http://www.tecmint.com/wp-content/uploads/2014/10/Compress-Multiple-Files.png) -压缩多个文件 +*压缩多个文件* **列举 tarball 中的内容和更新/追加文件到归档文件中** @@ -177,7 +84,7 @@ Gzip 是最古老的压缩工具,压缩率最小,bzip2 的压缩率稍微高 ![Check Files in tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/List-Archive-Content.png) -列举归档文件中的内容 +*列举归档文件中的内容* 运行一下任意一条命令: @@ -206,19 +113,19 @@ Gzip 是最古老的压缩工具,压缩率最小,bzip2 的压缩率稍微高 假设你现在需要备份用户的家目录。一个有经验的系统管理员会选择忽略所有视频和音频文件再备份(也可能是公司规定)。 -可能你最先想到的方法是在备份是时候,忽略扩展名为 .mp3 和 .mp4(或者其他格式)的文件。但如果你有些自作聪明的用户将扩展名改为 .txt 或者 .bkp,那你的方法就不灵了。为了发现并排除音频或者视频文件,你需要先检查文件类型。以下 shell 脚本可以代你完成类型检查: +可能你最先想到的方法是在备份的时候,忽略扩展名为 .mp3 和 .mp4(或者其他格式)的文件。但如果你有些自作聪明的用户将扩展名改为 .txt 或者 .bkp,那你的方法就不灵了。为了发现并排除音频或者视频文件,你需要先检查文件类型。以下 shell 脚本可以代你完成类型检查: #!/bin/bash # 把需要进行备份的目录传递给 $1 参数. DIR=$1 - #排除文件类型中包含了 mpeg 字符串的文件,然后创建 tarball 并进行压缩。 + # 排除文件类型中包含了 mpeg 字符串的文件,然后创建 tarball 并进行压缩。 # -若文件类型中包含 mpeg 字符串, $?(最后执行的命令的退出状态)返回 0,然后文件名被定向到排除选项。否则返回 1。 # -若 $? 等于 0,该文件从需要备份文件的列表排除。 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) -排除文件进行备份 +*排除文件进行备份* **使用 tar 保持文件的原有权限进行恢复** @@ -228,7 +135,7 @@ Gzip 是最古老的压缩工具,压缩率最小,bzip2 的压缩率稍微高 ![Restore Files from tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/Restore-tar-Backup-Files.png) -从归档文件中恢复 +*从归档文件中恢复* **扩展阅读:** @@ -243,31 +150,31 @@ find 命令用于递归搜索目录树中包含指定字符的文件和目录, #### 基本语法:#### -# find [需搜索的目录] [表达式] + # find [需搜索的目录] [表达式] **通过文件大小递归搜索文件** -以下命令会搜索当前目录(.)及其下两层子目录(-maxdepth 3,包含当前目录及往下两层的子目录)大于 2 MB(-size +2M)的所有文件(-f)。 +以下命令会搜索当前目录(.)及其下两层子目录(-maxdepth 3,包含当前目录及往下两层的子目录)中大于 2 MB(-size +2M)的所有文件(-f)。 # 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) - -通过文件大小搜索文件 +* +通过文件大小搜索文件* **搜索符合一定规则的文件并将其删除** -有时候,777 权限的文件通常为外部攻击者打开便利之门。不管是以何种方式,让所有人都可以对文件进行任意操作都是不安全的。对此,我们采取一个相对激进的方法——删除这些文件(‘{ }’用来“聚集”搜索的结果)。 +有时候,777 权限的文件通常为外部攻击者打开便利之门。不管是以何种方式,让所有人都可以对文件进行任意操作都是不安全的。对此,我们采取一个相对激进的方法——删除这些文件('{}' + 用来“聚集”搜索的结果)。 # 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) -搜索 777 权限的文件 +*搜索 777 权限的文件* **按访问时间和修改时间搜索文件** -搜索 /etc 目录下访问时间(-atime)或修改时间(-mtime)大于或小于 6 个月或者刚好 6 个月的配置文件。 +搜索 /etc 目录下访问时间(-atime)或修改时间(-mtime)大于(+180)或小于(-180) 6 个月或者刚好(180) 6 个月的配置文件。 按照下面例子对命令进行修改: @@ -275,7 +182,7 @@ find 命令用于递归搜索目录树中包含指定字符的文件和目录, ![Find Files by Modification Time](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Modified-Files.png) -按修改时间搜索文件 +*按修改时间搜索文件* - 扩展阅读: [35 Practical Examples of Linux ‘find’ Command][3] @@ -301,11 +208,11 @@ new_mode 可以是 3 位八进制数值或者对应权限的表达式。 八进制数值可以从二进制数值进行等值转换,通过下列方法来计算文件属主、同组用户和其他用户权限对应的二进制数值: -一个确定权限的二进制数值表现为 2 的幂(r=2^2,w=2^1,x=2^0),当权限省缺时,二进制数值为 0。如下: +一个确定权限的二进制数值表现为 2 的幂(r=2\^2,w=2\^1,x=2\^0),当权限省缺时,二进制数值为 0。如下: ![Linux File Permissions](http://www.tecmint.com/wp-content/uploads/2014/10/File-Permissions.png) -文件权限 +*文件权限* 使用八进制数值设置上图的文件权限,请输入: @@ -313,7 +220,6 @@ new_mode 可以是 3 位八进制数值或者对应权限的表达式。 通过 u、g 和 o 分别代表用户、同组用户和其他用户,然后你也可以使用权限表达式来单独对用户设置文件的权限模式。也可以通过 a 代表所有用户,然后设置文件权限。通过 + 号或者 - 号相应的赋予或移除文件权限。 - **为所有用户撤销一个 shell 脚本的执行权限** 正如之前解释的那样,我们可以通过 - 号为需要移除权限的属主、同组用户、其他用户或者所有用户去掉指定的文件权限。下面命令中的短横线(-)可以理解为:移除(-)所有用户(a)的 backup.sh 文件执行权限(x)。 @@ -324,11 +230,13 @@ new_mode 可以是 3 位八进制数值或者对应权限的表达式。 当我们使用 3 位八进制数值为文件设置权限的时候,第一位数字代表属主权限,第二位数字代表同组用户权限,第三位数字代表其他用户的权限: -- 属主:(r=2^2 + w=2^1 + x=2^0 = 7) -- 同组用户:(r=2^2 + w=2^1 + x=2^0 = 7) -- 其他用户:(r=2^2 + w=0 + x=0 = 4), +- 属主:(r=2\^2 + w=2\^1 + x=2\^0 = 7) +- 同组用户:(r=2\^2 + w=2\^1 + x=2\^0 = 7) +- 其他用户:(r=2\^2 + w=0 + x=0 = 4) - # chmod 774 myfile +命令如下: + + # chmod 774 myfile 随着练习时间的推移,你会知道何种情况下使用哪种方式来更改文件的权限模式的效果最好。 @@ -336,7 +244,7 @@ new_mode 可以是 3 位八进制数值或者对应权限的表达式。 ![Linux File Listing](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-File-Listing.png) -列举 Linux 文件 +*列举 Linux 文件* 通过 chown 命令可以对文件的归属权进行更改,可以同时或者分开更改属主和属组。其基本语法为: @@ -367,9 +275,9 @@ new_mode 可以是 3 位八进制数值或者对应权限的表达式。 先行感谢! 参考链接 -- [About the LFCS][4] -- [Why get a Linux Foundation Certification?][5] -- [Register for the LFCS exam][6] +- [关于 LFCS][4] +- [为什么需要 Linux 基金会认证?][5] +- [注册 LFCS 考试][6] -------------------------------------------------------------------------------- @@ -377,7 +285,7 @@ via: http://www.tecmint.com/compress-files-and-finding-files-in-linux/ 作者:[Gabriel Cánepa][a] 译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 85227effb82d67a9591f2805c36f037bc5e5f0be Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 30 Mar 2016 08:25:36 +0800 Subject: [PATCH 1209/1710] PUB:20151116 Linux FAQs with Answers--How to install Node.js on Linux @strugglingyouth --- ...s with Answers--How to install Node.js on Linux.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) rename {translated/tech => published}/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md (76%) diff --git a/translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md b/published/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md similarity index 76% rename from translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md rename to published/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md index 8ccca22632..6482a87d2c 100644 --- a/translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md +++ b/published/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md @@ -1,12 +1,12 @@ -Linux 有问必答 - 如何在 Linux 上安装 Node.js +Linux 有问必答:如何在 Linux 上安装 Node.js ================================================================================ > **问题**: 如何在你的 Linux 发行版上安装 Node.js? -[Node.js][1] 是建立在谷歌的 V8 JavaScript 引擎服务器端的软件平台上。在构建高性能的服务器端应用程序上,Node.js 在 JavaScript 中已是首选方案。是什么让使用 Node.js 库和应用程序的 [庞大生态系统][2] 来开发服务器后台变得如此流行。Node.js 自带一个被称为 npm 的命令行工具可以让你轻松地安装它,进行版本控制并使用 npm 的在线仓库来管理 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** 。 +在本教程中,我将介绍 **如何在主流 Linux 发行版上安装 Node.js,包括 Debian,Ubuntu,Fedora 和 CentOS** 。 -Node.js 在一些发行版上作为预构建的程序包(如,Fedora 或 Ubuntu),而在其他发行版上你需要源码安装。由于 Node.js 发展比较快,建议从源码安装最新版而不是安装一个过时的预构建的程序包。最新的 Node.js 自带 npm(Node.js 的包管理器),让你可以轻松的安装 Node.js 的外部模块。 +Node.js 在一些发行版上有预构建的程序包(如,Fedora 或 Ubuntu),而在其他发行版上你需要通过源码安装。由于 Node.js 发展比较快,建议从源码安装最新版而不是安装一个过时的预构建的程序包。最新的 Node.js 自带 npm(Node.js 的包管理器),让你可以轻松的安装 Node.js 的外部模块。 ### 在 Debian 上安装 Node.js on ### @@ -64,7 +64,6 @@ Node.js 被包含在 Fedora 的 base 仓库中。因此,你可以在 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 的社区库中可以找到。所以安装很简单,只要运行: @@ -82,7 +81,7 @@ via: http://ask.xmodulo.com/install-node-js-linux.html 作者:[Dan Nanni][a] 译者:[strugglingyou](https://github.com/strugglingyou) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From fdaa767a4ccf3ae2b0e7bc701c299ba57165fb91 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 30 Mar 2016 08:36:10 +0800 Subject: [PATCH 1210/1710] PUB:20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3 @geekpi --- ...buntu Core 16.04 LTS and Raspberry Pi 3.md | 36 ++++++++++++++++++ ...buntu Core 16.04 LTS and Raspberry Pi 3.md | 37 ------------------- 2 files changed, 36 insertions(+), 37 deletions(-) create mode 100644 published/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md delete mode 100644 translated/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md diff --git a/published/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md b/published/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md new file mode 100644 index 0000000000..d49e0ef0f7 --- /dev/null +++ b/published/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md @@ -0,0 +1,36 @@ +ownCloud Pi 设备将运行在 Snappy Ubuntu Core 16.04 LTS 及树莓派3上 +=============================================================================== + + +我们去年[报道了][1] ownCloud 正与西部数据(Western Digital)实验室沟通,帮助他们开发一个社区项目,将给用户带来可以在家中自托管的云存储设备。 + +自托管设备背后的理念,是由 ownCloud 服务端软件承载的,它结合了树莓派和西数硬盘到一个易安装和开箱即用的容器中。 + +社区的反应看上去很积极,ownCloud Pi 项目收到了许多好的提议和点子。今天,我们收到了一个更好的消息,首个镜像可以[下载][2]了。 + +ownCloud Pi 基于最新的 Snappy Ubuntu Core 16.04 LTS 系统,它由 Canonical 为嵌入式和 物联网(Internet of Things)设备所设计,包括新的树莓派3 Model B。 + +ownCloud 的开发者在今天的[声明][3]中称:“我们正在寻求来自 ownCloud、Ubuntu、树莓派和西数实验室等社区的帮助来测试和提高它们,并且可以在下周发布首批30台设备”。 + +### 目前的阻碍、挑战及前进的路 + +目前团队正致力于在基于 Xenial Xerus 版本的 Snappy Ubuntu 内核上完成他们的 ownCloud Pi 设备方案。这样,新的64位树莓派3可以帮助它们克服之前在树莓派2上遇到的阻碍,比如支持大于2GB的文件。 + +由此看来,最终的 ownCloud Pi 将在今年春天发布预览版,它将会在树莓派3上运行。之后,我们应该就可以购买首批可用于产品环境版本的 ownCloud Pi 设备了。 + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/owncloud-pi-device-to-run-on-snappy-ubuntu-core-16-04-lts-and-raspberry-pi-3-501904.shtml + +作者:[Marius Nestor][a] +译者:[geekpi](https://github.com/geekpi) +校对:[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]: http://news.softpedia.com/news/owncloud-partnerships-with-wd-to-bring-self-hosted-cloud-storage-in-users-homes-497512.shtml +[2]: http://people.canonical.com/~kyrofa/owncloud-pi/ +[3]: https://owncloud.org/blog/wd-labs-raspberry-pi-owncloud-and-ubuntu/ + + diff --git a/translated/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md b/translated/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md deleted file mode 100644 index 7b65226250..0000000000 --- a/translated/tech/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md +++ /dev/null @@ -1,37 +0,0 @@ -ownCloud Pi设备将在Snappy Ubuntu Core 16.04 LTS及树莓派3中运行 -=============================================================================== - -关键词 : ownCloud Pi , Snappy Ubuntu Core 16.04 LTS , Raspberry Pi 3 , Western Digital , PiDrive - -### 我们去年[报道了][1] ownCloud正与西部数据(ownCloud)实验室交谈帮助他们开发一个社区项目,可以在家自托管的云存储设备。 - -自托管设备背后的理念,是由ownCloud服务端软件承载的,它结合了树莓派和西数硬盘到一个易安装和开箱即用的容器中。 - -社区的反应看上去很积极,ownCloud Pi收到了许多好的提议和点子。今天,我们收到了一个更好的消息,首个镜像可以[下载][2]了。 - -ownCloud Pi基于最新的Snappy Ubuntu Core 16.04 LTS系统,它由Canonical为嵌入式和IoT(Internet of Things)及新的树莓派3 Model B设计。 - -ownCloud的开发者在今天的[声明][3]中称:“我们正在寻求ownCloud、Ubuntu、树莓派和西数实验室的帮助来帮助测试和提高它们,并且可以在下周发布首批30台设备”。 - -### 目前的阻碍、挑战及前进的路 - -目前团队正致力于在基于Xenial Xerus版本的Snappy Ubuntu内核上完成他们的ownCloud Pi设备方案。那么,新的64位树莓派3可以帮助它们克服之前在树莓派2上遇到的阻碍,比如支持大于2GB的文件。 - -由此看来决定已经有了,最终的ownCloud Pi将在今年春天发布预览版,它将会在树莓派3上运行。之后,我们应该就可以购买首批生产就绪版本的ownCloud Pi设备了。 - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/owncloud-pi-device-to-run-on-snappy-ubuntu-core-16-04-lts-and-raspberry-pi-3-501904.shtml - -作者:[Marius Nestor][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://news.softpedia.com/editors/browse/marius-nestor -[1]: http://news.softpedia.com/news/owncloud-partnerships-with-wd-to-bring-self-hosted-cloud-storage-in-users-homes-497512.shtml -[2]: http://people.canonical.com/~kyrofa/owncloud-pi/ -[3]: https://owncloud.org/blog/wd-labs-raspberry-pi-owncloud-and-ubuntu/ - - From 0275663dda81c2ffded4966a4617bbe27bce7051 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 30 Mar 2016 08:47:34 +0800 Subject: [PATCH 1211/1710] PUB:20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together @name1e5s --- ...uBSD Brings Ubuntu And FreeBSD Together.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md (59%) diff --git a/translated/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md b/published/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md similarity index 59% rename from translated/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md rename to published/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md index 19b1118194..259fc347d1 100644 --- a/translated/tech/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md +++ b/published/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md @@ -3,29 +3,29 @@ ![](http://itsfoss.com/wp-content/uploads/2016/03/UbuntuBSD.jpg) -不止是在 [Linux][1] 的内核上面你才能体验到 Ubuntu 的快捷方便,伙计们。UbuntuBSD 可以让你在 FreeBSD 的内核上面也能体验到那种方便快捷。 +不止是在 Linux 的内核上面你才能体验到 Ubuntu 的快捷方便,伙计们。UbuntuBSD 可以让你在 FreeBSD 的内核上面也能体验到那种方便快捷。 -UbuntuBSD 称自己是‘Unix for human beings’,这一点也不人惊讶。如过你能想起来的话,Ubuntu 使用的标语是‘Linux for human beings’并且在过去的 11 年里它确实让一个‘正常人’有可能用上 Linux。 +UbuntuBSD 称自己是 ‘Unix for human beings’,这一点也不人惊讶。如过你能想起来的话,Ubuntu 使用的标语是 ‘Linux for human beings’ 并且在过去的 11 年里它确实让一个‘正常人’有可能用上 Linux。 -UbuntuBSD 有着同样的想法。它想让新手能够接触到 Unix ,以及能使用它,如果我能这样说的话。至少,这就是它的目标。 +UbuntuBSD 有着同样的想法。它想让新手能够接触到 Unix ,以及能使用它——如果我能这样说的话。至少,这就是它的目标。 -### 什么是BSD ? 它和 Linux 有哪些不同? ### +### 什么是 BSD ? 它和 Linux 有哪些不同? ### -如果你是新手,那么你需要知道 [Unix和Linux的区别][2]. +如果你是新手,那么你需要知道 [Unix 和 Linux 的区别][2]. -在 Linux 出现之前,Unix 由 [AT&T][3] 的 [Ken Thompson][4], [Denis Ricthie][5] 以及他们的团队设计。这是在可以算作上古时期的 1970 发生的事。当你知道 Unix 是一个闭源的,有产权的操作系统时你可能会感到惊讶。AT&T 给了很多第三方许可,无论是学术机构还是企业。 +在 Linux 出现之前,Unix 由 [AT&T][3] 的 [Ken Thompson][4]、 [Denis Ricthie][5] 以及他们的团队设计。这是在可以算作计算机上古时期的 1970 发生的事。当你知道 Unix 是一个闭源的,有产权的操作系统时你可能会感到惊讶。AT&T 给了很多第三方许可,包括学术机构和企业。 美国加州大学伯克利分校是其中一个拿到许可的学术机构。在那里开发的 Unix 系统叫做 [BSD (Berkeley Software Distribution)][6]。BSD 的最出名的开源分支是 [FreeBSD][7],另一个最流行的闭源分支是苹果的 Mac OS X。 -在 1991 年。芬兰的计算机系大学生 Linus Torvalds 从头写了自己的 Unix 系统的复制品。这就是我们今天熟知的 Linux 内核。Linux 的发行版在内核的基础上添加了图形界面,GNU 的那一套(cp, mv, ls,date, bash 什么的),安装/管理工具,GNU C/C++ 编译器以及很多应用。 +在 1991 年。芬兰的计算机系大学生 Linus Torvalds 从头写了自己的 Unix 系统的复制品。这就是我们今天熟知的 Linux 内核。Linux 的发行版在内核的基础上添加了图形界面、GNU 的那一套(cp, mv, ls,date, bash 什么的)、安装/管理工具,GNU C/C++ 编译器以及很多应用。 ### UbuntuBSD 不是这种发行版的开端 在你知道了 Linux,Unix,FreeBSD 之间的区别之后。我要告诉你的是 UbuntuBSD 不是第一个要在 FreeBSD 内核上作出类似 Linux 的感觉的发行版。 -当 Debian 选择使用 [systemd][8] 之后,[Debian GNU/kFreeBSD][9]诞生了。它使用的不是通常的Linux内核,而是 Debian 在 FreeBSD 内核上的移植。 +当 Debian 选择使用 [systemd][8] 之后,[Debian GNU/kFreeBSD][9]诞生了。它使用的不是通常的 Linux 内核,而是 将 Debian 移植到了 FreeBSD 内核上。 -与Debian GNU/kFreeBSD 类似,UbuntuBSD 是 Ubuntu 在 FreeBSD 内核上的移植。 +与 Debian GNU/kFreeBSD 类似,UbuntuBSD 是将 Ubuntu 移植到了 FreeBSD 内核上。 ### UbuntuBSD Beta 版代号: Escape From SystemD @@ -35,7 +35,7 @@ UbuntuBSD 的第一个版本已经发布,代号为“Escape From SystemD ” ### 想试试? -我不建议任何人马上就去高兴的尝试这个系统。它仍在开发并且安装器还是文本界面的。如果你足够自信的话,直接去下载体验吧。但是如果你是新手的话,请等一段时间,至少不要现在就去尝试: +我不建议任何人马上就去开心地去尝试这个系统。它仍在开发并且安装器还是文本界面的。不过如果你足够自信的话,直接去下载体验吧。但是如果你是新手的话,请等一段时间,至少不要现在就去尝试: [UbuntuBSD][12] @@ -47,13 +47,13 @@ via: http://itsfoss.com/ubuntubsd-ubuntu-freebsd/ 作者:[ABHISHEK][a] 译者:[name1e5s](https://github.com/name1e5s) -校对:[校对者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/tag/linux/ -[2]: http://www.cyberciti.biz/faq/what-is-the-difference-between-linux-and-unix/ +[2]: https://linux.cn/article-3159-1.html [3]: https://en.wikipedia.org/wiki/AT%26T [4]: https://en.wikipedia.org/wiki/Ken_Thompson [5]: https://en.wikipedia.org/wiki/Dennis_Ritchie From a3ade2a9582d2364c045af11a1c607c822a8778a Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 1 Apr 2016 09:46:55 +0800 Subject: [PATCH 1212/1710] translating --- ... a tiny 64-bit ARM processor for the Internet of Things.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md b/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md index 2acebc8473..1740b261e2 100644 --- a/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md +++ b/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md @@ -1,3 +1,5 @@ +Translating---geekpi + NXP unveils a tiny 64-bit ARM processor for the Internet of Things ========================================================================= @@ -35,3 +37,5 @@ via: http://venturebeat.com/2016/02/21/nxp-unveils-a-small-and-tiny-64-bit-arm-p [3]:http://venturebeat.com/tag/nxp/ [4]:http://venturebeat.com/tag/nxp-semiconductors/ [5]:http://www.nxp.com/ + + From b4c41e07069d2a30d687bdc0bc4735d58225849d Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 1 Apr 2016 10:25:52 +0800 Subject: [PATCH 1213/1710] translated --- ...RM processor for the Internet of Things.md | 41 ------------------- ...RM processor for the Internet of Things.md | 39 ++++++++++++++++++ 2 files changed, 39 insertions(+), 41 deletions(-) delete mode 100644 sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md create mode 100644 translated/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md diff --git a/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md b/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md deleted file mode 100644 index 1740b261e2..0000000000 --- a/sources/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md +++ /dev/null @@ -1,41 +0,0 @@ -Translating---geekpi - -NXP unveils a tiny 64-bit ARM processor for the Internet of Things -========================================================================= - -**TAGS**:[ARM][1], [INTERNET OF THINGS][2], [NXP][3], [NXP SEMICONDUCTORS][4] - -![](http://1u88jj3r4db2x4txp44yqfj1.wpengine.netdna-cdn.com/wp-content/uploads/2016/02/nxp-930x556.jpg) - -[NXP Semiconductors][5] has unveiled what it calls the world’s smallest and lowest-power 64-bit ARM processor for the Internet of Things (IoT). - -The tiny QorIQ LS1012A delivers networking-grade security and performance acceleration to battery-powered, space-constrained applications. This includes powering applications for Internet of Things, or everyday objects that are smart and connected. If IoT is to reach its potential of $1.7 trillion by 2020 (as estimated by market researcher IDC), it’s going to need processors like the new one from NXP, which was unveiled at the Embedded World 2016 event in Nuremberg, Germany. - -The chip has a 64-bit ARMv8 processor with network packet acceleration and built-in security. It fits in a 9.6 mm-square space and draws about 1 watt of power. Potential applications include next-generation IoT gateways, portable entertainment platforms, high-performance portable storage applications, mobile hard disk drives, and mobile storage for cameras, tablets, and other rechargeable devices. - -Additionally, the LS1012A is the first processor designed specifically for an emerging new storage solution, dubbed object-based storage. Object-based storage relies on a smart hard disk drive that is directly connected to the data center’s Ethernet network. The processor must be small enough to be integrated directly on the circuit board for a hard disk drive. - -“The groundbreaking combination of low power, tiny footprint and networking-grade performance of NXP’s LS1012 processor is ideal for consumer, networking and Internet of Things applications alike,” said Tareq Bustami, senior vice president and general manager of NXP’s Digital Networking division, in a statement. “This unique blend of capabilities unleashes embedded systems designers and developers to imagine and create radically innovative end-products across a broad spectrum of high-growth markets.” - -NXP said it is the only 1-watt, 64-bit processor in the market to combine such a comprehensive set of high-speed peripherals in a single chip, thus enabling lower system-level costs. And due to innovative packaging, the processor can be routed on low-cost circuit boards. - -NXP’s LS1012A will be available in April 2016 and can be ordered now. NXP has more than 45,000 employees in 35 countries. - --------------------------------------------------------------------------------- - -via: http://venturebeat.com/2016/02/21/nxp-unveils-a-small-and-tiny-64-bit-arm-processor-for-the-internet-of-things/ - -作者:[DEAN TAKAHASHI][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://venturebeat.com/author/dean-takahashi/ -[1]:http://venturebeat.com/tag/arm/ -[2]:http://venturebeat.com/tag/internet-of-things/ -[3]:http://venturebeat.com/tag/nxp/ -[4]:http://venturebeat.com/tag/nxp-semiconductors/ -[5]:http://www.nxp.com/ - - diff --git a/translated/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md b/translated/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md new file mode 100644 index 0000000000..6711f5d4a6 --- /dev/null +++ b/translated/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md @@ -0,0 +1,39 @@ +NXP 揭幕了一块超小型物联网64位ARM处理器 +========================================================================= + +**标签**:[ARM][1], [物联网][2], [NXP][3], [NXP 半导体][4] + +![](http://1u88jj3r4db2x4txp44yqfj1.wpengine.netdna-cdn.com/wp-content/uploads/2016/02/nxp-930x556.jpg) + +[NXP 半导体][5]揭幕了一块声称世界上最小的用于物联网(IoT)的低功耗64位ARM处理器。 + +这片小型的QorIQ LS1012A为电池供电,大小受限的应用提供了网络级的安全和性能加速。这包括了运行物联网应用,或者任何智能及可连接的设备。如果物联网能在2020达到1.7万亿美金的潜力(由IDC研究员估算市场得出),那么它将需要像NXP这样的处理器,该处理器在德国纽伦堡的Embedded World 2016 上揭开了什么的面纱。 + +该芯片带有64位ARMv8芯片,拥有网络包加速及内置的安全。它占用9.6平方毫米的空间,并且大约消耗1瓦特的电力。潜在的应用包括下一代的物联网网关、可携带娱乐平台、高性能可携带存储应用、移动硬盘、相机的移动存储、平板及其他可充电的设备。 + +除此之外,LS1012A是第一款为新起的基于对象的存储方案设计的处理器,基于对象存储基于智能硬盘,它直接连接到以太网数据中心。处理器必须足够小才能直接集成在硬盘的集成电路上。 + +NXP的高级副总裁及数字网络部的经理Tareq Bustami说:“低功耗、占用空间小及网络级性能这些突破性组合的NXP LS1012处理器是消费者、物联网相关应用的理想选择。独有的混合能力解放了物联网设计者及开发者使得他们可以在这个高增长的市场中想象并创造更多创新产品。” + +NXP说这是唯一一个能够结合全面的高速外围在一个芯片中的1瓦特、64位处理器,这意味着低系统功耗。归功于创新的封装,该处理器可以在低成本的电路板中布线。 + +NXP的LS1012A可以在2016年4月开始发货,并且现在可以订货。NXP在全球35个国家拥有超过4,5000名员工。 + +-------------------------------------------------------------------------------- + +via: http://venturebeat.com/2016/02/21/nxp-unveils-a-small-and-tiny-64-bit-arm-processor-for-the-internet-of-things/ + +作者:[DEAN TAKAHASHI][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://venturebeat.com/author/dean-takahashi/ +[1]:http://venturebeat.com/tag/arm/ +[2]:http://venturebeat.com/tag/internet-of-things/ +[3]:http://venturebeat.com/tag/nxp/ +[4]:http://venturebeat.com/tag/nxp-semiconductors/ +[5]:http://www.nxp.com/ + + From 4f36bd62ed0417cc5a63a287020b131f0c6129cc Mon Sep 17 00:00:00 2001 From: alim0x Date: Fri, 1 Apr 2016 23:53:36 +0800 Subject: [PATCH 1214/1710] [translated]23 - The history of Android --- .../23 - The history of Android.md | 61 ------------------- .../23 - The history of Android.md | 57 +++++++++++++++++ 2 files changed, 57 insertions(+), 61 deletions(-) delete mode 100644 sources/talk/The history of Android/23 - The history of Android.md create mode 100644 translated/talk/The history of Android/23 - The history of Android.md diff --git a/sources/talk/The history of Android/23 - The history of Android.md b/sources/talk/The history of Android/23 - The history of Android.md deleted file mode 100644 index f140949d7b..0000000000 --- a/sources/talk/The history of Android/23 - The history of Android.md +++ /dev/null @@ -1,61 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -![Another Play Store redesign! This one is very close to the current design and uses cards that make layout changes a piece of cake.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/get-em-Kirill.jpg) -Another Play Store redesign! This one is very close to the current design and uses cards that make layout changes a piece of cake. -Photo by Ron Amadeo - -### Out-of-cycle updates—who needs a new OS? ### - -In between Android 4.2 and 4.3, Google went on an out-of-cycle update tear and showed just how much Android could be improved without having to fire up the arduous OTA update process. Thanks to the [Google Play Store and Play Services][1], all of these updates were able to be delivered without updating any core system components. - -In April 2013, Google released a major redesign to the Google Play Store. Like most redesigns from here on out, the new Play Store fully adopted the Google Now aesthetic, with white cards on a gray background. The action bar changed color based on the current content section, and since the first screen featured content from all sections of the store, the action bar was a neutral gray. Buttons to navigate to the content sections were now given top billing, and below that was usually a promotional block or rows of recommended apps. - -In April 2013, Google released a major redesign to the Google Play Store. Like most redesigns from here on out, the new Play Store fully adopted the Google Now aesthetic, with white cards on a gray background. The action bar changed color based on the current content section, and since the first screen featured content from all sections of the store, the action bar was a neutral gray. Buttons to navigate to the content sections were now given top billing, and below that was usually a promotional block or rows of recommended apps. - -![The individual content sections are beautifully color-coded.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/content-rainbow.jpg) -The individual content sections are beautifully color-coded. -Photo by Ron Amadeo - -The new Play Store showed off the real power of Google’s card design language, which enabled a fully responsive layout across all screen sizes. One large card could be stuck next to several little cards, larger-screened devices could show more cards, and rather than stretch things in horizontal mode, more cards could just be added to a row. The Play Store content editors were free to play with the layout of the cards, too; a big release that needed to be highlighted could get a larger card. This design would eventually trickle down to the other Google Play content apps, finally resulting in a unified design. - -![Hangouts replaced Google Talk and is now continually developed by the Google+ team.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/talkvhangouts2.jpg) -Hangouts replaced Google Talk and is now continually developed by the Google+ team. -Photo by Ron Amadeo - -Google I/O, the company's annual developer conference, was usually where a new Android version was announced. But at the 2013 edition, Google made just as many improvements without having to update the OS. - -One of the biggest things announced at the show was an update to Google Talk, Google's instant messaging platform. For a long time, Google shipped four text communication apps for Android: Google Talk, Google+ Messenger, Messaging (the SMS app), and Google Voice. Having four apps that accomplished the same task—sending a text message to someone—was very confusing for users. At I/O, Google killed Google Talk and started their messaging product over from scratch, creating [Google Hangouts][2]. While initially it only replaced Google Talk, the plan for Hangouts was to unify all of Google's various messaging apps into a single interface. - -The layout of the Hangouts UI really wasn't drastically different from Google Talk. The main page contained your open conversations, and tapping on one opened a chat page. The design was updated, the chat page now used a card-style display for each paragraph, and the chat list was now a "drawer"-style interface, meaning you could open it with a horizontal swipe. Hangouts had read receipts and a typing status indicator, and group chat was now a primary feature. - -Google+ was the center of Hangouts now, so much so that the full name of the product was actually "Google+ Hangouts." Hangouts was completely integrated with the Google+ desktop site so that video and chats could be made from one to the other. Identity and avatars were pulled from Google+, and tapping on an avatar would open that person's Google+ profile. And much like the change from Browser to Google Chrome, core Android functionality was passed off to a separate team—the Google+ team—as opposed to being a side product of the very busy Android engineers. With the Google+ takeover, Android's main IM client now became a continually developed application. It was placed into the Play Store and received fairly regular updates. - -![The new navigation drawer interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/navigation_drawer_overview1.png) -The new navigation drawer interface. -Photo by [developer.android.com][3] - -Google also introduced a new design element for the action bar: the navigation drawer. This drawer was shown as a set of three lines next to the app icon in the top-right corner. By tapping on it or dragging from the edge of the screen to the right, a side-mounted menu would appear. As the name implies, this was used to navigate around the app, and it would show several top-level locations within the app. This allowed the first screen to show content, and it gave users a consistent, easy-to-access place for navigation elements. The nav drawer was basically a super-sized version of the normal menu, scrollable and docked to the right side. - ----------- - -![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/23/ - -译者:[译者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/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/ -[2]:http://arstechnica.com/information-technology/2013/05/hands-on-with-hangouts-googles-new-text-and-video-chat-architecture/ -[3]:https://developer.android.com/design/patterns/navigation-drawer.html -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/23 - The history of Android.md b/translated/talk/The history of Android/23 - The history of Android.md new file mode 100644 index 0000000000..a6693ee6ec --- /dev/null +++ b/translated/talk/The history of Android/23 - The history of Android.md @@ -0,0 +1,57 @@ +安卓编年史 +================================================================================ +![Play 商店又一次重新设计!这一版非常接近现在的设计,卡片结构让改变布局变得易如反掌。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/get-em-Kirill.jpg) +Play 商店又一次重新设计!这一版非常接近现在的设计,卡片结构让改变布局变得易如反掌。 +Ron Amadeo 供图 + +### 周期外更新——谁需要一个新系统? ### + +在安卓 4.2 和安卓 4.3 之间,谷歌进行了一次周期外更新,显示了有多少安卓可以不经过费力的 OTA 更新而得到改进。得益于[谷歌 Play 商店和 Play 服务][1],这些更新可以在不更新任何系统核心组件的前提下送达。 + +2013 年 4 月,谷歌发布了谷歌 Play 商店的一个主要设计改动。就如同在这之后的大多数重新设计,新的 Play 商店完全接受了 Google Now 审美,即在灰色背景上的白色卡片。操作栏基于当前页面内容部分更改颜色,由于首屏内容以商店的各部分为主,操作栏颜色是中性的灰色。导航至内容部分的按钮指向热门付费,在那下面通常是一块促销内容或一组推荐应用。 + +![独立的内容部分有漂亮的颜色。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/content-rainbow.jpg) +独立的内容部分有漂亮的颜色。 +Ron Amadeo 供图 + +新的 Play 商店展现了谷歌卡片设计语言的真正力量,在所有的屏幕尺寸上能够拥有响应式布局。一张大的卡片能够和若干小卡片组合,大屏幕设备能够显示更多的卡片,而且相对于拉伸来适应横屏模式,可以通过在一行显示更多卡片来适应。Play 商店的内容编辑们也可以自由地使用卡片布局;需要关注的大更新可以获得更大的卡片。这个设计最终会慢慢渗透向其它谷歌 Play 内容应用,最后拥有一个统一的设计。 + +![Hangouts 取代了 Google Talk,现在仍由 Google+ 团队继续开发。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/talkvhangouts2.jpg) +Hangouts 取代了 Google Talk,现在仍由 Google+ 团队继续开发。 +Ron Amadeo 供图 + +Google I/O,谷歌的年度开发者会议,通常会宣布一个新的安卓版本。但是 2013 年的会议,谷歌只是发布了一些改进而没有系统更新。 + +谷歌宣布的大事件之一是 Google Talk 的更新,谷歌的即时消息平台。在很长一段时间里,谷歌随安卓附四个文本交流应用:Google Talk,Google+ Messenger,信息(短信应用),Google Voice。拥有四个应用来完成相同的任务——给某人发送文本消息——对用户来说很混乱。在 I/O 上,谷歌结束了 Google Talk 并且从头开始创建全新的消息产品 [Google Hangouts][2]。虽然最初只是想替代 Google Talk,Hangouts 的计划是统一所有谷歌的不同的消息应用到统一的界面下。 + +Hangouts 的用户界面布局真的和 Google Talk 没什么大的差别。主页面包含你的聊天会话,点击某一项就能进入聊天页面。界面设计上有所更新,聊天页面现在使用了卡片风格来显示每个段落,并且聊天列表是个“抽屉”风格的界面,这意味着你可以通过水平滑动打开它。Hangouts 有已读回执和输入状态指示,并且群聊现在是个主要特性。 + +Google+ 是 Hangouts 的中心,所以产品的全名实际上是“Google+ Hangouts”。Hangouts 完全整合到了 Google+ 桌面站点。身份和头像直接从 Google+ 拉取,点击头像会打开用户的 Google+ 资料。和将浏览器换为 Google Chrome 类似,核心安卓功能交给了一个单独的团队——Google+ 团队——作为对应用成为繁忙的安卓工程师的副产品的反对。随着 Google+ 团队的接手,安卓的主要即时通讯客户端现在成为一个持续开发的应用。它被放进了 Play 商店并且有稳定的更新频率。 + +![新导航抽屉界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/navigation_drawer_overview1.png) +新导航抽屉界面。 +图片来自 [developer.android.com][3] + +谷歌还给操作栏引入了新的设计元素:导航抽屉。这个抽屉显示为在左上角应用图标旁的三道横线。点击或从屏幕左边缘向右滑动,会出现一个侧边菜单目录。就像名字所指明的,这个是用来应用内导航的,它会显示若干应用内的顶层位置。这使得应用首屏可以用来显示内容,也给了用户一致的,易于访问的导航元素。导航抽屉基本上就是个大号的菜单,可以滚动并且固定在左侧。 + +---------- + +![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/23/ + +译者:[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/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/ +[2]:http://arstechnica.com/information-technology/2013/05/hands-on-with-hangouts-googles-new-text-and-video-chat-architecture/ +[3]:https://developer.android.com/design/patterns/navigation-drawer.html +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 2a8397bcbce8d617486ce0fdce55025c8a69789b Mon Sep 17 00:00:00 2001 From: alim0x Date: Fri, 1 Apr 2016 23:55:33 +0800 Subject: [PATCH 1215/1710] [translating]24 - The history of Android --- .../The history of Android/24 - The history of Android.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/The history of Android/24 - The history of Android.md b/sources/talk/The history of Android/24 - The history of Android.md index b95ceb29c7..3ed860adca 100644 --- a/sources/talk/The history of Android/24 - The history of Android.md +++ b/sources/talk/The history of Android/24 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x traslating + The history of Android ================================================================================ ![The slick new Google Play Music app, which changed from Tron to a perfect match for the Play Store.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/Goooogleplaymusic.jpg) @@ -79,4 +81,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [1]:http://live.arstechnica.com/liveblog-google-io-2013-keynote/ [2]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From 0a73e6b607dd6a28d93421df08da9860f94d61aa Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Sat, 2 Apr 2016 13:31:57 +0800 Subject: [PATCH 1216/1710] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AE=A4=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 最近没空翻译了,取消认领。 --- ...151208 10 tools for visual effects in Linux with Kdenlive.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md b/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md index 690b2c8186..c017d22de2 100644 --- a/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md +++ b/sources/talk/yearbook2015/20151208 10 tools for visual effects in Linux with Kdenlive.md @@ -1,5 +1,3 @@ -translating by xiaoyu33 - 10 tools for visual effects in Linux with Kdenlive ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life-uploads/kdenlivetoolssummary.png) From 8f57057b4957b609ae223973b0adc034198b3426 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 2 Apr 2016 23:55:41 +0800 Subject: [PATCH 1217/1710] [translating]24 - The history of Android - Part I --- .../24 - The history of Android.md | 48 +++++++++---------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/sources/talk/The history of Android/24 - The history of Android.md b/sources/talk/The history of Android/24 - The history of Android.md index 3ed860adca..fa6750d427 100644 --- a/sources/talk/The history of Android/24 - The history of Android.md +++ b/sources/talk/The history of Android/24 - The history of Android.md @@ -1,36 +1,34 @@ -alim0x traslating - -The history of Android +安卓编年史 ================================================================================ -![The slick new Google Play Music app, which changed from Tron to a perfect match for the Play Store.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/Goooogleplaymusic.jpg) -The slick new Google Play Music app, which changed from Tron to a perfect match for the Play Store. -Photo by Ron Amadeo +![漂亮的新 Google Play Music 应用,从电子风格转向完美契合 Play 商店的风格。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/Goooogleplaymusic.jpg) +漂亮的新 Google Play Music 应用,从电子风格转向完美契合 Play 商店的风格。 +Ron Amadeo 供图 -Another app update pushed out at I/O was a new Google Music app. The app was completely redesigned, finally doing away with the blue-on-blue design introduced in Honeycomb. Play Music's design was unified with the new Play Store released a few months earlier, with a responsive white card layout. Music was also one of the first major apps to take advantage of the new navigation drawer style. Along with the new app, Google launched Google Play Music All Access, an all-you-can-eat subscription service for $10 a month. Google Music now had a subscription plan, à la carte purchasing, and a cloud music locker. This version also introduced "Instant Mix," a mode where Google would cloud-compute a playlist of similar songs. +在 I/O 大会推出的另一个应用更新是 Google Music 应用。音乐应用经过了完全的重新设计,最终摆脱了蜂巢中引入的蓝底蓝色调的设计。Play Music 的设计和几个月前发布的 Play 商店一致,有着响应式的白色卡片布局。Music 同时还是最早采用新抽屉导航样式的主要应用之一。谷歌还随新应用发布了 Google Play Music All Access,每月 10 美元的包月音乐订阅服务。Google Music 现在拥有订阅计划,音乐购买,以及云端音乐存储空间。这个版本还引入了“Instant Mix”,谷歌会在云端给相似的歌曲计算出一份歌单。 -![A game showing support for Google Play Games. This lineup shows the Play Store game feature descriptions, the permissions box triggered by signing into the game, a Play Games notification, and the achievements screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/gooooogleplaygames.jpg) -A game showing support for Google Play Games. This lineup shows the Play Store game feature descriptions, the permissions box triggered by signing into the game, a Play Games notification, and the achievements screen. -Photo by Ron Amadeo +![一个展示对 Google Play Games 支持的游戏。上面是 Play 商店游戏特性描述,登陆游戏触发的权限对话框,Play Games 通知,以及成就界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/gooooogleplaygames.jpg) +一个展示对 Google Play Games 支持的游戏。上面是 Play 商店游戏特性描述,登陆游戏触发的权限对话框,Play Games 通知,以及成就界面。 +Ron Amadeo 供图 -Google also introduced "Google Play Games," a back-end service that developers could plug into their games. The service was basically an Android version of Xbox Live or Apple's Game Center. Developers could build Play Games support into their game, which would easily let them integrate achievements, leaderboards, multiplayer, matchmaking, user accounts, and cloud saves by using Google's back-end services. +谷歌还引入了“Google Play Games”,一个后端服务,开发者可以将其附加到游戏中。这项服务简单说就是安卓版的 Xbox Live 或苹果的 Game Center。开发者可以给游戏添加 Play Games 支持,这样就能通过使用谷歌的后端服务,更简单地集成成就,多人游戏,游戏匹配,用户账户以及云端存档到游戏中。 -Play Games was the start of Google's big push into gaming. Just like standalone GPS units, flip phones, and MP3 players, smartphone makers were hoping standalone gaming devices would be turned into nothing more than a smartphone feature bullet point. Why buy a Nintendo DS or PS Vita when you had a smartphone with you? An easy-to-use multiplayer service would be a big part of this, and we've still yet to see the final consequence of this move. Today, Google and Apple are both rumored to be planning living room gaming devices. +Play Games 是谷歌在游戏方面推进的开始。就像单独的 GPS 设备,翻盖手机,以及 MP3 播放器,智能手机的生产者希望游戏设备能够变成智能手机的一个功能点。当你有部智能手机的时候你为什么还有买个任天堂 DS 或 PS Vita 呢?一个易于使用的多人游戏服务是这项计划的重要部分,我们仍能看到这个决定最后的成果。在今天,坊间都在传言谷歌和苹果有关于客厅游戏设备的计划。 -![Google Keep, Google's first note taking service since Google Notebook.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/goooglekeep.jpg) -Google Keep, Google's first note taking service since Google Notebook. -Photo by Ron Amadeo +![Google Keep,谷歌自 Google Notebook 以来第一个笔记服务。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/goooglekeep.jpg) +Google Keep,谷歌自 Google Notebook 以来第一个笔记服务。 +Ron Amadeo 供图 -It was clear some products were developed in time for presentation at Google I/O, [but the three-and-a-half hour keynote][1] was already so massive, some things were cut from being announced. Once the smoke cleared three days after Google I/O, Google introduced Google Keep, a note taking app for Android and the Web. Keep was a fairly straightforward affair, applying the responsive Google Now-style design to a note taking app. Users could change the size of the cards from a multi-column layout to a single column view. Notes could consist of plain text, checklists, voice note with automatic transcription, or pictures. Note cards could be dragged around and rearranged on the main screen, and you could even assign a color to a note. +毫无疑问一些产品为了赶上 Google I/O 大会的发布准时开发完成了,[但是三个半小时内的主题][1]已经够多了,一些产品在大会的发布上忽略了。Google I/O 大会的三天后一切都清楚了,谷歌带来了 Google Keep,一个用于安卓和在线的笔记应用。Keep 看起来很简单,就是一个用上了响应式 Google-Now 风格设计的笔记应用。用户可以改变卡片的尺寸,从多栏布局改为单列视图。笔记可以由文本,清单,自动转文本的语音或者图片组成。笔记卡片可以拖动并在主界面重新组织,你甚至可以给笔记换个颜色。 -![Gmail 4.5, which switched to the new navigation drawer design and merged the action bars, thanks to some clever button elimination.](http://cdn.arstechnica.net/wp-content/uploads/2014/05/gmail.png) -Gmail 4.5, which switched to the new navigation drawer design and merged the action bars, thanks to some clever button elimination. -Photo by Ron Amadeo +![Gmail 4.5,换上了新的导航抽屉设计,去掉了几个按钮并将操作栏合并到了抽屉里。](http://cdn.arstechnica.net/wp-content/uploads/2014/05/gmail.png) +Gmail 4.5,换上了新的导航抽屉设计,去掉了几个按钮并将操作栏合并到了抽屉里。 +Ron Amadeo 供图 -After I/O, not much was safe from Google's out-of-cycle updating. In June 2013, Google released a redesigned version of Gmail. The headline feature of the new design was the new navigation drawer interface that was introduced a month earlier at Google I/O. The most eye catching change was the addition of Google+ profile pictures instead of checkboxes. While the checkboxes were visibly removed, they were still there, just tap on a picture. +在 I/O 大会之后,没有哪些应用不在谷歌的周期外更新里。2013 年 6 月,谷歌发布了新版设计的 Gmail。最显眼的变化就是一个月前 Google I/O 大会引入的新导航抽屉界面。最吸引眼球的变化是用上了 Google+ 资料图片来取代复选框。虽然复选框看起来被去掉了,它们其实还在那,点击邮件左边的图片就是了。 -![The new Google Maps, which switched to an all-white Google Now-style theme.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps11.png.) -The new Google Maps, which switched to an all-white Google Now-style theme. -Photo by Ron Amadeo +![新谷歌地图,换上了全白的 Google-Now 风格主题。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps11.png) +新谷歌地图,换上了全白的 Google-Now 风格主题。 +Ron Amadeo 供图 One month later, Google released a completely overhauled version of Google Maps to the Play Store. It was the first ground-up redesign of Google Maps since Ice Cream Sandwich. The new version fully adopted the Google Now white card aesthetic, and it greatly reduced the amount of stuff on the screen. The new Google Maps seemed to have a design mandate to always show a map on the screen somewhere, as you’ll be hard pressed to find something other than the settings that fully covers the map. @@ -38,7 +36,7 @@ This version of Google Maps seemed to live in its own little design world. The w ![The new Google Maps cut a lot of fat and displayed more information on a single screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps21.png) The new Google Maps cut a lot of fat and displayed more information on a single screen. -Photo by Ron Amadeo +Ron Amadeo 供图 The left picture shows what popped up when you tapped on the search bar (along with the keyboard, which had been closed). In the past, Google would show an empty page below a blank search bar, but in Maps, Google used that space to link to the new “Local" page. The “blank" search results displayed links to common, browsable results like restaurant listings, gas stations, and attractions. At the bottom of the results page was a list of nearby results from your search history and an option to manually cache parts of the map. @@ -52,7 +50,7 @@ Android 4.3 would have been an incredible update if Google had done the traditio ![Android Wear plugging into Android 4.3's Notification access screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-28-12.231.jpg) Android Wear plugging into Android 4.3's Notification access screen. -Photo by Ron Amadeo +Ron Amadeo 供图 Google made no qualms about the low importance of 4.3, calling the newest release "Jelly Bean" (the third one in a row). Android 4.3's feature list read like a laundry list of things Google couldn't update from the Play Store or through Google Play Services, mostly consisting of low-level framework changes for developers. From ffc516007ccc80ba70825bf172b34f80d485c162 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 3 Apr 2016 00:25:40 +0800 Subject: [PATCH 1218/1710] =?UTF-8?q?=E9=83=A8=E5=88=86=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E5=AE=8C=E6=88=90=E4=BD=9C=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d Services SysVinit Systemd and Upstart.md | 230 ++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md diff --git a/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md new file mode 100644 index 0000000000..34e08ec0f7 --- /dev/null +++ b/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md @@ -0,0 +1,230 @@ +WingCuengRay翻译中 +翻译部分,未经自校验 +Part 7 - LFCS: Managing System Startup Process and Services (SysVinit, Systemd and Upstart) +============================================================== +几个月前,Linux 基金会发布了 LFCS (Linux Foundation Certified Sysadmin) 认证,这是一则振奋人心的消息,它的目标是让全世界各地的人们的的中级 Linux 系统管理能力得到认证。这能力包括了对处于运行状态的系统和服务的支持,发现并分析实际问题,并且知道何时向开发团队提交问题。 + +![Linux Foundation Certified Sysadmin – Part 7](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-7.png) + +Linux Foundation Certified Sysadmin - Part7 + +下面的视频简单地介绍了 Linux 基金认证的流程。 + +注:youtube 视频 + +本章是10个系列教程中的第7章,在这个部分,我们会解释如何去管理 Linux 系统启动进程和服务,这是 LFCS 认证考试中必须的。 + +### Linux 启动进程的管理 ### +Linux 系统的启动进程包括了几个阶段,每一个阶段都代表了一个不同的**component**。下图简单概括了启动的流程并且展示了所有阶段的主要组成部分。 + +![Linux Boot Process](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-Boot-Process.png) + + +Linux 启动流程 + +当你按下电脑上的开机按钮,装载在主板电可擦写只读存储器 (EEPROM) 中的固件 (BIOS) 会执行开机自检 (Power-On Self Test) 检查系统的硬件状态。当开机自检完成后,固件会寻找并载入位于第一块硬盘中的主引导记录 (MBR) 或者 EFI 分区中的 boot loader stage1,然后将控制权转交给它。第一阶段的 boot loader 在第一块硬盘中的主引导记录 (MBR 或者 EFI 分区中。 + +#### MBR 引导启动 #### +MBR 在 BIOS 设置的可启动硬盘的第一扇区,其大小是 512 字节。 + +- 起始 446 字节: bootloader 包括了可执行代码与错误消息文本。 +- 随后 64 字节: 分区表包括了四条硬盘分区(主分区或扩展分区)的记录。此外,每条分区记录指出了分区的状态(有效/无效),大小和每个分区的开始/结束扇区。 +- 最后 2 字节: 用于MBR校验检查的幻数 (magic number)。 + +**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) + +**恢复 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) + +在 Linux 的 MBR 恢复 + +### EFI/UFEFI 引导启动 ### +在 EFI/UEFI 引导的系统中,UEFI固件会读取其配置,根据配置决定启动哪一个 UEFI appliction,并且从哪里启动(例如,在 EFI 分区所在的磁盘)。 + +然后,第二阶段的引导程序被加载运行。GRUB[GRand Unified Boot] 是 Linux 上最流行的启动管理器。**如今有两个不同的版本供大多数的系统使用**。 + +- GRUB Legacy 配置文件: /boot/grub/menu.lst (旧版本,EFI/UEFI 不支持) +- GRUB2 配置文件: 大多数为 /etc/default/grub + +虽然 LFCS 资格认证没有明确要求了解关于 GRUB 内部知识,但如果你能勇敢地承受系统崩溃的风险(为了保险,你可能希望先在虚拟机上尝试),你可以尝试自己去修改这些文件。 + + # update-grub + +在修改完 GRUB 的配置文件后,需要以 root 权限运行以上指令让修改生效。 + +GRUB 主要加载了默认的内核和 initrd 或 initramfs 镜像。简单来说,initrd 和 initramfs 帮助进行了硬件的检测,内核模块的加载和设备的探查,**这对于挂载真正的根文件系统来说是必须的**。 + +为了得到一个用户交互界面,一旦根文件系统被挂载,内核便执行系统服务管进程 (init 或者 systemd,其进程标识或者 PID 通常是 1 )来启动正常的用户空间进程。 + +init 和 systemd 都是守护进程,因为它们是系统那个第一个启动的服务(在启动期间)和最后一个终止的服务(在关机时)。 + +![Systemd and Init](http://www.tecmint.com/wp-content/uploads/2014/10/systemd-and-init.png) + +Systemd and Init + +### 服务的启动 (SysVinit) ### +Linux 中的运行级别机制通过控制不同服务的运行来指定系统的不同使用方式。换言之,运行级别决定在当前的运行模式下哪些任务能够运行(哪些不能)。 + +基于 System V Unix 继承下来的传统,当计算机进入一个指定的运行级别时(或者说,进入一个与当前系统不同的运行级别时),系统通过传递用于控制启动和停止服务的执行脚本来执行启动进程。 + +在每一个运行级别,每一个服务能被设置为运行状态或者关闭状态(如果正在运行)。大多数发行版在最新版本中抛弃了System V的标准,支持一种新的被称为systemd的系统服务管理进程(也就是系统守护进程),不过出于兼容性考虑,systemd通常支持 sysv 命令。这意味着你能够在基本systemd发行版上运行大多数sysv int工具。 + +- 参考: [Why ‘systemd’ replaces ‘init’ in Linux][1] + +除了启动系统进程,init 还根据 /etc/inittab 文件决定必须进入哪一个运行级别。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Runlevel Description
0 挂起系统。运行级别 0 是一个用于快速关闭系统的特殊过渡态。
1 该模式也被称为 s 或 S。这个运行模式有时被叫作维护模式。根据发行版的不同,在这个运行级别启动的服务也不同。这通常用于可能被正常系统操作损坏的**low-level system maintenance(低级别系统维护)**
2 多用户模式。在 Debian 及其衍生版中,这是默认的运行级别,包括了可用的图形登陆。在基于红帽 (Red-Hat 的系统中,这是没有网络功能的多用户模式。
3  在基于 Red-Hat 的系统中,这是默认的多用户模式,此模式会运行除图形环境之外的所有东西。基于 Debian 的系统通常不使用此运行级别 4,5 和此级别。
4 默认不使用,因此可用于用户定制。
5 在基于红帽的系统,这是完整的带图形界面的多用户模式。此运行级别类似于运行级别 3,不过多了 GUI 的登陆界面。
6 重启系统
+ +我们能够使用`init` 命令在不同运行级别之间切换: `init N` (N是上面列出的运行级别之一)。注意并不推荐使用这种方法改变一个运行中系统的运行级别,因为它没有发出警告信息给已登陆用户(这会令他们工作丢失,任务异常终止)。 + +相反,应该使用`shutdown`命令重启系统(发送一条警告信息给所有的登陆用户,并阻止另外的用户登陆);然而,必须先在 /etc/inittab 文件中编辑系统启动的默认运行级别。 + +因此,以 root 权限寻找 /etc/inittab 中的下行,然后按照下列步骤正确地在运行级别之间切换: + + id:2:initdefault: + +然后使用 vim 之类文本编辑器(在本系列的第二章介绍了如何在 Linux 中使用 vi/vim 编辑器)将数字 2 改变成你想要的运行级别。 + +接下来以 root 权限运行: + + # shutdown -r now + +最后一条命令会重启系统并让其在下一次启动期间以指定的运行级别启动,然后系统会运行在 /etc/rc[runlevel].d 目录下的脚本以决定哪些服务会被启动哪些不会。例如,下图处于运行级别2的系统. + +![Change Runlevels in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Runlevels-in-Linux.jpeg) + +Linux 运行级别的变更 + +## 使用 chkconfig 管理服务 + +为了在引导时启动/禁止系统服务,我们需要使用`chkconfig`(在 CentOS/openSUSE)和`sys-rc-conf`(在 Debian 及其衍生版中)命令。这工具能够告诉我们在一个特定运行级别的服务预配置状态。 + +- 参考: [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)** + +在上图中我们能够看到 `postfix` 被设置为当系统进入级别 2~5 时启动,而 `mysqld` 默认是在级别 2~4 时运行。假设这些不是我们期望的行为。 + +例如,我们也需要在运行级别 5 启动`mysqld`,并且在级别 4 和 5 中关闭 `postfix`。这是我们要做的(以 root 权限执行以下命令) + +**为一个特定的运行级别启动服务** + + # chkconfig --level [level(s)] service on + # chkconfig --level 5 mysqld on + +**为一个特定的运行级别禁止服务** + + # chkconfig --level [level(s)] service off + # chkconfig --level 45 posifix off + +![Enable Disable Services in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Disable-Services.png) + +启动禁止服务 + +我们可以使用 `sysv-rc-conf` 在基于 Debian 的系统执行类似的操作。 + +#### 使用 `sysv-rc-conf` 管理服务 + +设置一个服务使其能在一个特定的运行级别启动,禁止在其他运行级别启动。 + + +1. 我们用以下命令查看 `mdadm` 服务在哪些运行级别上启动。 +```c +# 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) + + 查看服务的运行级别 + +2. 我们使用 `sysv-rc-conf` 命令禁止 `mdadm` 在除了 2 以外的运行级别中启动。根据需要(使用空格键)选择或取消(可以使用上下左右方向键移动)。 +``` +# sys-rc-conf +``` + ![SysV Runlevel Config](http://www.tecmint.com/wp-content/uploads/2014/10/SysV-Runlevel-Config.png) + + Sys Runlevel Config + + 然后按 q 退出 + +3. 重启系统并运行第一步中的命令 + + ``` + # 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) + + 验证服务运行级别 + + 在上图中我们可以看到 `mdadm` 被修改为只在运行级别 2 上启动。 + +### 什么是 systemd ?### + +systemd 是较多 Linux 发行版采用的另一种系统服务管理软件。它允许系统启动期间进程并行启动(不像 sysinit 那么慢。因为 sysint 只能逐个启动进程,检查进程间依赖关系然后等待守护工作以启动更多服务),并且为系统动态管理资源。 + +因此,服务仅当需要时才被启动(以免浪费系统资源)而不是在引导时启动。 + +运行以下命令,查看系统中所有运行中服务进程的状态,**包括systemd native和SysV services**。 + +``` +# systemctl +``` + +![Check All Running Processes in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-All-Running-Processes.png) + +查看所有运行中的服务进程 From 4bf0057cc851cf87468966976916dc197233e013 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 Apr 2016 10:42:51 +0800 Subject: [PATCH 1219/1710] =?UTF-8?q?=E5=BD=92=E6=A1=A3201603?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- published/{ => 201603}/20150820 Why did you start using Linux.md | 0 ... Years of GNOME Design and Software Evolution--Step by Step.md | 0 .../20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md | 0 ...2015--The best open source networking and security software.md | 0 ...20151104 Optimize Web Delivery with these Open Source Tools.md | 0 ... with Answers--How to install Ubuntu desktop behind a proxy.md | 0 ...o send email notifications using Gmail SMTP server on Linux.md | 0 ...0151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md | 0 ...16 Linux FAQs with Answers--How to install Node.js on Linux.md | 0 .../20151125 20 Years of GIMP Evolution--Step by Step.md | 0 published/{ => 201603}/20151204 Review EXT4 vs. Btrfs vs. XFS.md | 0 ...51215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md | 0 ... Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md | 0 .../20160218 Best Linux Desktop Environments for 2016.md | 0 ...160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md | 0 ...8 LTS Is the Biggest in the Series with Hundreds of Changes.md | 0 ...Mozilla contributor creates diabetes project for the masses.md | 0 .../20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md | 0 .../20160220 Former Kubuntu Head Unveils New KDE Project.md | 0 .../20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md | 0 .../20160220 [Free Download] Vi Cheat Sheet For Beginners.md | 0 .../20160226 Development Release- Xubuntu 16.04 Beta 1.md | 0 ...with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md | 0 ...1 Million HTTPS Websites Imperiled by New Decryption Attack.md | 0 .../20160316 What we learned in Seoul with AlphaGo.md | 0 ...e to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md | 0 .../20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md | 0 27 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201603}/20150820 Why did you start using Linux.md (100%) rename published/{ => 201603}/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md (100%) rename published/{ => 201603}/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md (100%) rename published/{ => 201603}/20151028 Bossie Awards 2015--The best open source networking and security software.md (100%) rename published/{ => 201603}/20151104 Optimize Web Delivery with these Open Source Tools.md (100%) rename published/{ => 201603}/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md (100%) rename published/{ => 201603}/20151109 How to send email notifications using Gmail SMTP server on Linux.md (100%) rename published/{ => 201603}/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md (100%) rename published/{ => 201603}/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md (100%) rename published/{ => 201603}/20151125 20 Years of GIMP Evolution--Step by Step.md (100%) rename published/{ => 201603}/20151204 Review EXT4 vs. Btrfs vs. XFS.md (100%) rename published/{ => 201603}/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md (100%) rename published/{ => 201603}/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md (100%) rename published/{ => 201603}/20160218 Best Linux Desktop Environments for 2016.md (100%) rename published/{ => 201603}/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md (100%) rename published/{ => 201603}/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md (100%) rename published/{ => 201603}/20160218 Mozilla contributor creates diabetes project for the masses.md (100%) rename published/{ => 201603}/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md (100%) rename published/{ => 201603}/20160220 Former Kubuntu Head Unveils New KDE Project.md (100%) rename published/{ => 201603}/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md (100%) rename published/{ => 201603}/20160220 [Free Download] Vi Cheat Sheet For Beginners.md (100%) rename published/{ => 201603}/20160226 Development Release- Xubuntu 16.04 Beta 1.md (100%) rename published/{ => 201603}/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md (100%) rename published/{ => 201603}/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md (100%) rename published/{ => 201603}/20160316 What we learned in Seoul with AlphaGo.md (100%) rename published/{ => 201603}/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md (100%) rename published/{ => 201603}/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md (100%) diff --git a/published/20150820 Why did you start using Linux.md b/published/201603/20150820 Why did you start using Linux.md similarity index 100% rename from published/20150820 Why did you start using Linux.md rename to published/201603/20150820 Why did you start using Linux.md diff --git a/published/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md b/published/201603/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md similarity index 100% rename from published/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md rename to published/201603/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md diff --git a/published/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md b/published/201603/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md similarity index 100% rename from published/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md rename to published/201603/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md diff --git a/published/20151028 Bossie Awards 2015--The best open source networking and security software.md b/published/201603/20151028 Bossie Awards 2015--The best open source networking and security software.md similarity index 100% rename from published/20151028 Bossie Awards 2015--The best open source networking and security software.md rename to published/201603/20151028 Bossie Awards 2015--The best open source networking and security software.md diff --git a/published/20151104 Optimize Web Delivery with these Open Source Tools.md b/published/201603/20151104 Optimize Web Delivery with these Open Source Tools.md similarity index 100% rename from published/20151104 Optimize Web Delivery with these Open Source Tools.md rename to published/201603/20151104 Optimize Web Delivery with these Open Source Tools.md diff --git a/published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/published/201603/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md similarity index 100% rename from published/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md rename to published/201603/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md diff --git a/published/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/published/201603/20151109 How to send email notifications using Gmail SMTP server on Linux.md similarity index 100% rename from published/20151109 How to send email notifications using Gmail SMTP server on Linux.md rename to published/201603/20151109 How to send email notifications using Gmail SMTP server on Linux.md diff --git a/published/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/published/201603/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md similarity index 100% rename from published/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md rename to published/201603/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md diff --git a/published/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md b/published/201603/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md similarity index 100% rename from published/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md rename to published/201603/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md diff --git a/published/20151125 20 Years of GIMP Evolution--Step by Step.md b/published/201603/20151125 20 Years of GIMP Evolution--Step by Step.md similarity index 100% rename from published/20151125 20 Years of GIMP Evolution--Step by Step.md rename to published/201603/20151125 20 Years of GIMP Evolution--Step by Step.md diff --git a/published/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/published/201603/20151204 Review EXT4 vs. Btrfs vs. XFS.md similarity index 100% rename from published/20151204 Review EXT4 vs. Btrfs vs. XFS.md rename to published/201603/20151204 Review EXT4 vs. Btrfs vs. XFS.md diff --git a/published/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md b/published/201603/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md similarity index 100% rename from published/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md rename to published/201603/20151215 How to Install Light Table 0.8 in Ubuntu 14.04, 15.10.md diff --git a/published/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/published/201603/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md similarity index 100% rename from published/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md rename to published/201603/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md diff --git a/published/20160218 Best Linux Desktop Environments for 2016.md b/published/201603/20160218 Best Linux Desktop Environments for 2016.md similarity index 100% rename from published/20160218 Best Linux Desktop Environments for 2016.md rename to published/201603/20160218 Best Linux Desktop Environments for 2016.md diff --git a/published/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md b/published/201603/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md similarity index 100% rename from published/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md rename to published/201603/20160218 Canonical's ZFS Plans Are Lining Up For Ubuntu 16.04.md diff --git a/published/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md b/published/201603/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md similarity index 100% rename from published/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md rename to published/201603/20160218 Linux Kernel 4.1.18 LTS Is the Biggest in the Series with Hundreds of Changes.md diff --git a/published/20160218 Mozilla contributor creates diabetes project for the masses.md b/published/201603/20160218 Mozilla contributor creates diabetes project for the masses.md similarity index 100% rename from published/20160218 Mozilla contributor creates diabetes project for the masses.md rename to published/201603/20160218 Mozilla contributor creates diabetes project for the masses.md diff --git a/published/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md b/published/201603/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md similarity index 100% rename from published/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md rename to published/201603/20160218 ST Releases Free Linux IDE for 32-Bit MCUs.md diff --git a/published/20160220 Former Kubuntu Head Unveils New KDE Project.md b/published/201603/20160220 Former Kubuntu Head Unveils New KDE Project.md similarity index 100% rename from published/20160220 Former Kubuntu Head Unveils New KDE Project.md rename to published/201603/20160220 Former Kubuntu Head Unveils New KDE Project.md diff --git a/published/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md b/published/201603/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md similarity index 100% rename from published/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md rename to published/201603/20160220 Manjaro Linux Is Coming To ARM With Manjaro-ARM.md diff --git a/published/20160220 [Free Download] Vi Cheat Sheet For Beginners.md b/published/201603/20160220 [Free Download] Vi Cheat Sheet For Beginners.md similarity index 100% rename from published/20160220 [Free Download] Vi Cheat Sheet For Beginners.md rename to published/201603/20160220 [Free Download] Vi Cheat Sheet For Beginners.md diff --git a/published/20160226 Development Release- Xubuntu 16.04 Beta 1.md b/published/201603/20160226 Development Release- Xubuntu 16.04 Beta 1.md similarity index 100% rename from published/20160226 Development Release- Xubuntu 16.04 Beta 1.md rename to published/201603/20160226 Development Release- Xubuntu 16.04 Beta 1.md diff --git a/published/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md b/published/201603/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md similarity index 100% rename from published/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md rename to published/201603/20160229-OpenSSH-7.2-Out-Now-with-Support-for-RSA-Signatures-Using-SHA-256512 Algorithms.md diff --git a/published/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md b/published/201603/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md similarity index 100% rename from published/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md rename to published/201603/20160301 More than 11 Million HTTPS Websites Imperiled by New Decryption Attack.md diff --git a/published/20160316 What we learned in Seoul with AlphaGo.md b/published/201603/20160316 What we learned in Seoul with AlphaGo.md similarity index 100% rename from published/20160316 What we learned in Seoul with AlphaGo.md rename to published/201603/20160316 What we learned in Seoul with AlphaGo.md diff --git a/published/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md b/published/201603/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md similarity index 100% rename from published/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md rename to published/201603/20160318 ownCloud Pi Device to Run on Snappy Ubuntu Core 16.04 LTS and Raspberry Pi 3.md diff --git a/published/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md b/published/201603/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md similarity index 100% rename from published/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md rename to published/201603/20160320 UbuntuBSD Brings Ubuntu And FreeBSD Together.md From cd089a6ed71ab30a3c501cd1babc58716aca88e3 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 Apr 2016 10:43:10 +0800 Subject: [PATCH 1220/1710] PUB:20151109 How to Configure Tripwire IDS on Debian @geekpi --- ...How to Configure Tripwire IDS on Debian.md | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) rename {translated/tech => published}/20151109 How to Configure Tripwire IDS on Debian.md (79%) diff --git a/translated/tech/20151109 How to Configure Tripwire IDS on Debian.md b/published/20151109 How to Configure Tripwire IDS on Debian.md similarity index 79% rename from translated/tech/20151109 How to Configure Tripwire IDS on Debian.md rename to published/20151109 How to Configure Tripwire IDS on Debian.md index 23bf8eef65..b9f134c361 100644 --- a/translated/tech/20151109 How to Configure Tripwire IDS on Debian.md +++ b/published/20151109 How to Configure Tripwire IDS on Debian.md @@ -1,39 +1,38 @@ -如何在Debian中配置Tripewire IDS +如何在 Debian 中配置 Tripewire IDS ================================================================================ -本文是一篇关于Debian中安装和配置Tripewire的文章。它是Linux环境下基于主机的入侵检测系统(IDS)。tripwire的高级功能有检测并报告任何Linux中未授权的更改(文件和目录)。tripewire安装之后,会先创建一个基本的数据库,tripewire监控并检测新文件的创建修改和谁修改了它等等。如果修改过是合法的,你可以接受修改并更新tripwire的数据库。 +本文是一篇关于 Debian 中安装和配置 Tripewire 的文章。它是 Linux 环境下基于主机的入侵检测系统(IDS)。tripwire 的高级功能有检测并报告任何 Linux 中未授权的(文件和目录)的更改。tripewire 安装之后,会先创建一个基本的数据库,tripewire 监控并检测新文件的创建修改和谁修改了它等等。如果修改是合法的,你可以接受修改并更新 tripwire 的数据库。 ### 安装和配置 ### -tripwire在Debian VM中的安装如下。 +tripwire 在 Debian VM 中的安装如下。 # apt-get install tripwire ![installation](http://blog.linoxide.com/wp-content/uploads/2015/11/installation.png) -安装中,tripwire会有下面的配置提示。 +安装中,tripwire 会有下面的配置提示。 #### 站点密钥创建 #### -tripwire需要一个站点口令来加密tripwire的配置文件tw.cfg和策略文件tw.pol。tripewire使用指定的密码加密两个文件。一个tripewire实例必须指定站点口令。 - +tripwire 需要一个站点口令(site passphrase)来加密 tripwire 的配置文件 tw.cfg 和策略文件 tw.pol。tripewire 使用指定的密码加密两个文件。一个 tripewire 实例必须指定站点口令。 ![site key1](http://blog.linoxide.com/wp-content/uploads/2015/11/site-key1.png) #### 本地密钥口令 #### -本地口令用来保护tripwire数据库和报告文件。本地密钥用于阻止非授权的tripewire数据库修改。 +本地口令用来保护 tripwire 数据库和报告文件。本地密钥用于阻止非授权的 tripewire 数据库修改。 ![local key1](http://blog.linoxide.com/wp-content/uploads/2015/11/local-key1.png) -#### Tripwire配置路径 #### +#### tripwire 配置路径 #### -tripewire配置存储在/etc/tripwire/twcfg.txt。它用于生成加密的配置文件tw.cfg。 +tripewire 配置存储在 /etc/tripwire/twcfg.txt。它用于生成加密的配置文件 tw.cfg。 ![configuration file](http://blog.linoxide.com/wp-content/uploads/2015/11/configuration-file.png) -**Tripwire策略路径** +**tripwire 策略路径** -tripwire在/etc/tripwire/twpol.txt中保存策略文件。它用于生成加密的策略文件tw.pol。 +tripwire 在 /etc/tripwire/twpol.txt 中保存策略文件。它用于生成加密的策略文件 tw.pol。 ![tripwire policy](http://blog.linoxide.com/wp-content/uploads/2015/11/tripwire-policy.png) @@ -41,9 +40,9 @@ tripwire在/etc/tripwire/twpol.txt中保存策略文件。它用于生成加密 ![installed tripewire1](http://blog.linoxide.com/wp-content/uploads/2015/11/installed-tripewire1.png) -#### Tripwire配置文件 (twcfg.txt) #### +#### tripwire 配置文件 (twcfg.txt) #### -tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件(tw.pol),站点密钥(site.key)和本地密钥(hostname-local.key)如下所示。 +tripewire 配置文件(twcfg.txt)细节如下图所示。加密策略文件(tw.pol)、站点密钥(site.key)和本地密钥(hostname-local.key)在后面展示。 ROOT =/usr/sbin @@ -79,9 +78,9 @@ tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件 TEMPDIRECTORY =/tmp -#### Tripwire策略配置 #### +#### tripwire 策略配置 #### -在生成基础数据库之前先配置tripwire配置。有必要经用一些策略如/dev、 /proc 、/root/mail等。详细的twpol.txt策略文件如下所示。 +在生成基础数据库之前先配置 tripwire 配置。有必要经用一些策略如 /dev、 /proc 、/root/mail 等。详细的 twpol.txt 策略文件如下所示。 @@section GLOBAL TWBIN = /usr/sbin; @@ -121,10 +120,10 @@ tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件 # vulnerability # - # Tripwire Binaries + # tripwire Binaries # ( - rulename = "Tripwire Binaries", + rulename = "tripwire Binaries", severity = $(SIG_HI) ) { @@ -237,9 +236,9 @@ tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件 #/proc -> $(Device) ; } -#### Tripwire 报告 #### +#### tripwire 报告 #### -**tripwire –check** 命令检查twpol.txt文件并基于此文件生成tripwire报告如下。如果twpol.txt中有任何错误,tripwire不会生成报告。 +**tripwire-check** 命令检查 twpol.txt 文件并基于此文件生成 tripwire 报告如下。如果 twpol.txt 中有任何错误,tripwire 不会生成报告。 ![tripwire report](http://blog.linoxide.com/wp-content/uploads/2015/11/tripwire-report.png) @@ -255,7 +254,7 @@ tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件 Wrote report file: /var/lib/tripwire/report/VMdebian-20151024-122322.twr - Open Source Tripwire(R) 2.4.2.2 Integrity Check Report + Open Source tripwire(R) 2.4.2.2 Integrity Check Report Report generated by: root @@ -299,13 +298,13 @@ tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件 Other binaries 66 0 0 0 - Tripwire Binaries 100 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 + tripwire Data Files 100 0 0 0 System boot changes 100 0 0 0 @@ -351,9 +350,9 @@ tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件 *** End of report *** - Open Source Tripwire 2.4 Portions copyright 2000 Tripwire, Inc. Tripwire is a registered + 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; + trademark of tripwire, Inc. This software comes with ABSOLUTELY NO WARRANTY; for details use --version. This is free software which may be redistributed @@ -365,7 +364,7 @@ tripewire配置文件(twcfg.txt)细节如下图所示。加密策略文件 ### 总结 ### -本篇中,我们学习安装配置开源入侵检测软件tripwire。首先生成基础数据库并通过比较检测出任何改动(文件/文件夹)。然而,tripwire并不是实时监测的IDS。 +本篇中,我们学习安装配置开源入侵检测软件 tripwire。首先生成基础数据库并通过比较检测出任何改动(文件/文件夹)。然而,tripwire 并不是实时监测的 IDS。 -------------------------------------------------------------------------------- @@ -373,7 +372,7 @@ via: http://linoxide.com/security/configure-tripwire-ids-debian/ 作者:[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 689a64448665ef81e649a1346ea8686ba7d3137b Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 4 Apr 2016 00:03:58 +0800 Subject: [PATCH 1221/1710] [translated]24 - The history of Android --- .../24 - The history of Android.md | 82 ------------------ .../24 - The history of Android.md | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 82 deletions(-) delete mode 100644 sources/talk/The history of Android/24 - The history of Android.md create mode 100644 translated/talk/The history of Android/24 - The history of Android.md diff --git a/sources/talk/The history of Android/24 - The history of Android.md b/sources/talk/The history of Android/24 - The history of Android.md deleted file mode 100644 index fa6750d427..0000000000 --- a/sources/talk/The history of Android/24 - The history of Android.md +++ /dev/null @@ -1,82 +0,0 @@ -安卓编年史 -================================================================================ -![漂亮的新 Google Play Music 应用,从电子风格转向完美契合 Play 商店的风格。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/Goooogleplaymusic.jpg) -漂亮的新 Google Play Music 应用,从电子风格转向完美契合 Play 商店的风格。 -Ron Amadeo 供图 - -在 I/O 大会推出的另一个应用更新是 Google Music 应用。音乐应用经过了完全的重新设计,最终摆脱了蜂巢中引入的蓝底蓝色调的设计。Play Music 的设计和几个月前发布的 Play 商店一致,有着响应式的白色卡片布局。Music 同时还是最早采用新抽屉导航样式的主要应用之一。谷歌还随新应用发布了 Google Play Music All Access,每月 10 美元的包月音乐订阅服务。Google Music 现在拥有订阅计划,音乐购买,以及云端音乐存储空间。这个版本还引入了“Instant Mix”,谷歌会在云端给相似的歌曲计算出一份歌单。 - -![一个展示对 Google Play Games 支持的游戏。上面是 Play 商店游戏特性描述,登陆游戏触发的权限对话框,Play Games 通知,以及成就界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/gooooogleplaygames.jpg) -一个展示对 Google Play Games 支持的游戏。上面是 Play 商店游戏特性描述,登陆游戏触发的权限对话框,Play Games 通知,以及成就界面。 -Ron Amadeo 供图 - -谷歌还引入了“Google Play Games”,一个后端服务,开发者可以将其附加到游戏中。这项服务简单说就是安卓版的 Xbox Live 或苹果的 Game Center。开发者可以给游戏添加 Play Games 支持,这样就能通过使用谷歌的后端服务,更简单地集成成就,多人游戏,游戏匹配,用户账户以及云端存档到游戏中。 - -Play Games 是谷歌在游戏方面推进的开始。就像单独的 GPS 设备,翻盖手机,以及 MP3 播放器,智能手机的生产者希望游戏设备能够变成智能手机的一个功能点。当你有部智能手机的时候你为什么还有买个任天堂 DS 或 PS Vita 呢?一个易于使用的多人游戏服务是这项计划的重要部分,我们仍能看到这个决定最后的成果。在今天,坊间都在传言谷歌和苹果有关于客厅游戏设备的计划。 - -![Google Keep,谷歌自 Google Notebook 以来第一个笔记服务。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/goooglekeep.jpg) -Google Keep,谷歌自 Google Notebook 以来第一个笔记服务。 -Ron Amadeo 供图 - -毫无疑问一些产品为了赶上 Google I/O 大会的发布准时开发完成了,[但是三个半小时内的主题][1]已经够多了,一些产品在大会的发布上忽略了。Google I/O 大会的三天后一切都清楚了,谷歌带来了 Google Keep,一个用于安卓和在线的笔记应用。Keep 看起来很简单,就是一个用上了响应式 Google-Now 风格设计的笔记应用。用户可以改变卡片的尺寸,从多栏布局改为单列视图。笔记可以由文本,清单,自动转文本的语音或者图片组成。笔记卡片可以拖动并在主界面重新组织,你甚至可以给笔记换个颜色。 - -![Gmail 4.5,换上了新的导航抽屉设计,去掉了几个按钮并将操作栏合并到了抽屉里。](http://cdn.arstechnica.net/wp-content/uploads/2014/05/gmail.png) -Gmail 4.5,换上了新的导航抽屉设计,去掉了几个按钮并将操作栏合并到了抽屉里。 -Ron Amadeo 供图 - -在 I/O 大会之后,没有哪些应用不在谷歌的周期外更新里。2013 年 6 月,谷歌发布了新版设计的 Gmail。最显眼的变化就是一个月前 Google I/O 大会引入的新导航抽屉界面。最吸引眼球的变化是用上了 Google+ 资料图片来取代复选框。虽然复选框看起来被去掉了,它们其实还在那,点击邮件左边的图片就是了。 - -![新谷歌地图,换上了全白的 Google-Now 风格主题。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps11.png) -新谷歌地图,换上了全白的 Google-Now 风格主题。 -Ron Amadeo 供图 - -One month later, Google released a completely overhauled version of Google Maps to the Play Store. It was the first ground-up redesign of Google Maps since Ice Cream Sandwich. The new version fully adopted the Google Now white card aesthetic, and it greatly reduced the amount of stuff on the screen. The new Google Maps seemed to have a design mandate to always show a map on the screen somewhere, as you’ll be hard pressed to find something other than the settings that fully covers the map. - -This version of Google Maps seemed to live in its own little design world. The white search bar “floated" above the map, with maps showing on the sides and top of the bar. That didn't really make it seem like the traditional Action Bar design. The navigation drawer, in the top left on every other app, was in the bottom left. There was no up button, app icon, or overflow button on the main screen. - -![The new Google Maps cut a lot of fat and displayed more information on a single screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps21.png) -The new Google Maps cut a lot of fat and displayed more information on a single screen. -Ron Amadeo 供图 - -The left picture shows what popped up when you tapped on the search bar (along with the keyboard, which had been closed). In the past, Google would show an empty page below a blank search bar, but in Maps, Google used that space to link to the new “Local" page. The “blank" search results displayed links to common, browsable results like restaurant listings, gas stations, and attractions. At the bottom of the results page was a list of nearby results from your search history and an option to manually cache parts of the map. - -The right set of images shows location page. The map shown in the top of the Maps 7 screenshot isn’t a thumbnail; that’s the full map view. In the new version of Google Maps, a location was displayed as a card that “floats" overtop of the main map, and the map was repositioned to center on the location. Scrolling up would move the card up and cover the map, and scrolling down would show the whole map with the result reduced to a small strip at the bottom. If the location was part of a list of search results, swiping left and right would move through the results. - -The location pages were redesigned to be much more useful at a glance. On the first page, the new version added critical information, like the location on a map, the review score, and the number of reviews. Since this is a phone, and the software will be dialing for you, the phone number was deemed pointless and was removed. The old version showed the distance to the location in miles, while the new version of Google Maps showed the distance in terms of time, based on traffic and preferred mode of transportation—a much more useful metric. The new version also put a share button front and center, which made coordination over IM or text messaging a lot easier. - -### Android 4.3, Jelly Bean—getting wearable support out early ### - -Android 4.3 would have been an incredible update if Google had done the traditional thing and not released updates between 4.3 and 4.2 through the Play Store. If the new Play Store, Gmail, Maps, Books, Music, Hangouts, Keep, and Play Games were bundled into a big brick as a new version of Android, it would have been hailed as the biggest release ever. Google didn't need to do hold back features anymore though. With very little left that required an OS update, at the end of July 2013, Google released the seemingly insignificant update called "Android 4.3." - -![Android Wear plugging into Android 4.3's Notification access screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-28-12.231.jpg) -Android Wear plugging into Android 4.3's Notification access screen. -Ron Amadeo 供图 - -Google made no qualms about the low importance of 4.3, calling the newest release "Jelly Bean" (the third one in a row). Android 4.3's feature list read like a laundry list of things Google couldn't update from the Play Store or through Google Play Services, mostly consisting of low-level framework changes for developers. - -Many of the additions seemed to fit a singular purpose, though—Android 4.3 was Google's trojan horse for wearable computing support. 4.3 added support for Bluetooth Low Energy, a way to wirelessly connect Android to another device and pass data back and forth while using a very small amount of power—an integral feature to a wearable device. Android 4.3 also added a "Notification Access" API, which allowed apps to completely replicate and control the notification panel. Apps could display notification text and pictures and interact with the notification the same way users do—namely pressing action buttons and dismissing notifications. Doing this from an on-board app when you have the notification panel is useless, but on a device that is separate from your phone, replicating the information in the notification panel becomes much more useful. One of the few apps that plugged into this was "Android Wear Preview," which used the notification API to power most of the interface for Android Wear. - -The "4.3 is for wearables" theory explained the relatively low number of features in 4.3: it was pushed out the door to give OEMs time to update devices in time for the launch of [Android Wear][2]. The plan seems to have worked. Android Wear requires Android 4.3 and up, which has been out for so long now that most major flagships have updated. - -Android 4.3 was not all that exciting, but Android releases from here on out didn't need to be all that exciting. Everything became so modularized that Google could push updates out as soon as they were done through Google Play, rather than drop everything in one huge brick as an OS update. - ----------- - -![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/24/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://live.arstechnica.com/liveblog-google-io-2013-keynote/ -[2]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/24 - The history of Android.md b/translated/talk/The history of Android/24 - The history of Android.md new file mode 100644 index 0000000000..71d1736a12 --- /dev/null +++ b/translated/talk/The history of Android/24 - The history of Android.md @@ -0,0 +1,83 @@ +安卓编年史 +================================================================================ +![漂亮的新 Google Play Music 应用,从电子风格转向完美契合 Play 商店的风格。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/Goooogleplaymusic.jpg) +漂亮的新 Google Play Music 应用,从电子风格转向完美契合 Play 商店的风格。 +Ron Amadeo 供图 + +在 I/O 大会推出的另一个应用更新是 Google Music 应用。音乐应用经过了完全的重新设计,最终摆脱了蜂巢中引入的蓝底蓝色调的设计。Play Music 的设计和几个月前发布的 Play 商店一致,有着响应式的白色卡片布局。Music 同时还是最早采用新抽屉导航样式的主要应用之一。谷歌还随新应用发布了 Google Play Music All Access,每月 10 美元的包月音乐订阅服务。Google Music 现在拥有订阅计划,音乐购买,以及云端音乐存储空间。这个版本还引入了“Instant Mix”,谷歌会在云端给相似的歌曲计算出一份歌单。 + +![一个展示对 Google Play Games 支持的游戏。上面是 Play 商店游戏特性描述,登陆游戏触发的权限对话框,Play Games 通知,以及成就界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/gooooogleplaygames.jpg) +一个展示对 Google Play Games 支持的游戏。上面是 Play 商店游戏特性描述,登陆游戏触发的权限对话框,Play Games 通知,以及成就界面。 +Ron Amadeo 供图 + +谷歌还引入了“Google Play Games”,一个后端服务,开发者可以将其附加到游戏中。这项服务简单说就是安卓版的 Xbox Live 或苹果的 Game Center。开发者可以给游戏添加 Play Games 支持,这样就能通过使用谷歌的后端服务,更简单地集成成就,多人游戏,游戏匹配,用户账户以及云端存档到游戏中。 + +Play Games 是谷歌在游戏方面推进的开始。就像单独的 GPS 设备,翻盖手机,以及 MP3 播放器,智能手机的生产者希望游戏设备能够变成智能手机的一个功能点。当你有部智能手机的时候你为什么还有买个任天堂 DS 或 PS Vita 呢?一个易于使用的多人游戏服务是这项计划的重要部分,我们仍能看到这个决定最后的成果。在今天,坊间都在传言谷歌和苹果有关于客厅游戏设备的计划。 + +![Google Keep,谷歌自 Google Notebook 以来第一个笔记服务。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/goooglekeep.jpg) +Google Keep,谷歌自 Google Notebook 以来第一个笔记服务。 +Ron Amadeo 供图 + +毫无疑问一些产品为了赶上 Google I/O 大会的发布准时开发完成了,[但是三个半小时内的主题][1]已经够多了,一些产品在大会的发布上忽略了。Google I/O 大会的三天后一切都清楚了,谷歌带来了 Google Keep,一个用于安卓和在线的笔记应用。Keep 看起来很简单,就是一个用上了响应式 Google-Now 风格设计的笔记应用。用户可以改变卡片的尺寸,从多栏布局改为单列视图。笔记可以由文本,清单,自动转文本的语音或者图片组成。笔记卡片可以拖动并在主界面重新组织,你甚至可以给笔记换个颜色。 + +![Gmail 4.5,换上了新的导航抽屉设计,去掉了几个按钮并将操作栏合并到了抽屉里。](http://cdn.arstechnica.net/wp-content/uploads/2014/05/gmail.png) +Gmail 4.5,换上了新的导航抽屉设计,去掉了几个按钮并将操作栏合并到了抽屉里。 +Ron Amadeo 供图 + +在 I/O 大会之后,没有哪些应用不在谷歌的周期外更新里。2013 年 6 月,谷歌发布了新版设计的 Gmail。最显眼的变化就是一个月前 Google I/O 大会引入的新导航抽屉界面。最吸引眼球的变化是用上了 Google+ 资料图片来取代复选框。虽然复选框看起来被去掉了,它们其实还在那,点击邮件左边的图片就是了。 + +![新谷歌地图,换上了全白的 Google-Now 风格主题。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps11.png) +新谷歌地图,换上了全白的 Google-Now 风格主题。 +Ron Amadeo 供图 + +一个月后,谷歌在 Play 商店发布了全新的谷歌地图。这是谷歌地图自冰淇淋三明治以来第一个经过细致地重新设计的版本。新版本完全适配了 Google Now 白色卡片审美,还大大减少了屏幕上显示的元素。新版谷歌地图似乎设计时有意使地图总是显示在屏幕上,你很难找到除了设置页面之外还能完全覆盖地图显示的选项。 + +这个版本的谷歌地图看起来活在它自己的小小设计世界中。白色的搜索栏“浮动”在地图之上,地图显示部分在它旁边和上面都有。这和传统的操作栏设计有所不同。一般在应用左上角的导航抽屉,在这里是在左下角。这里的主界面没有向上按钮,应用图标,也没有浮动按钮。 + +![新谷歌地图轻量化了许多,在一屏内能够显示更多的信息。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps21.png) +新谷歌地图轻量化了许多,在一屏内能够显示更多的信息。 +Ron Amadeo 供图 + +左边的图片显示的是点击了搜索栏后的效果(带键盘,这里关闭了)。过去谷歌在空搜索栏下面显示一个空页面,但在地图中,谷歌利用这些空间链接到新的“本地”页面。搜索结果页显示一般信息的结果,比如餐馆,加油站,以及景点。在结果页的底部是个列表,显示你的搜索历史和手动缓存部分地图的选项。 + +右侧图片显示的是地点页面。上面地图 7.0 的截图里显示的地图不是略缩图,它是完整的地图视图。在新版的谷歌地图中,地点作为卡片浮动显示在主地图之上,地图重新居中显示该地点。向上滑动可以让卡片覆盖地图,向下滑动可以显示带有底部一小条结果的完整地图。如果该地点是搜索结果列表中的一个,左右滑动可以在结果之间切换。 + +地点页面重新设计以显示更有用的信息概览。在第一页,新版添加了重要信息,比如地图上的位置,点评得分,以及点评数目。因为这是个手机,所以软件内可以直接拨打电话,电话号码的显示被认为是毫无意义的,被去掉了。旧版地点显示到那里的距离,新版谷歌地图显示到那里的时间,基于交通状况和偏好的交通方式——一个更加实用的衡量方式。新版还在中间放了个分享按钮,这使得通过即时通讯或短信协调的时候更加方便。 + +### Android 4.3,果冻豆——早早支持可穿戴设备 ### + +如果谷歌没有在安卓 4.3 和安卓 4.2 之间通过 Play 商店发布更新的话,安卓 4.3 会是个不可思议的更新。如果新版 Play 商店,Gmail,地图,书籍,音乐,Hangouts 环聊,以及 Play Games 打包作为新版安卓的一部分,它将会作为有史以来最大的发布受到欢呼。虽然谷歌没必要延后新功能的发布。有了 Play 服务框架,只剩很少的部分需要系统更新,2013 年 7 月底谷歌发布了看似无关紧要的“安卓 4.3”。 + +![安卓 4.3 通知访问权限界面的可穿戴设备选项。 +](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-28-12.231.jpg) +安卓 4.3 通知访问权限界面的可穿戴设备选项。 +Ron Amadeo 供图 + +谷歌也毫无疑问地认为 4.3 的重要性不高,将新版也叫做“果冻豆”(第三个叫果冻豆的版本了)。安卓 4.3 的新功能列表像是谷歌无法通过 Play 商店或谷歌 Play 服务更新的部分的细目清单,大部分包含了为开发者作出的底层架构改动。 + +但许多新增功能似乎只为了一个目的——安卓 4.3 是谷歌对可穿戴计算支持的特洛伊木马。4.3 加入了低功耗蓝牙支持,使用很少的能耗将安卓和其它设备连接到一起并传输数据——可穿戴设备的必要特性。安卓 4.3 还添加了“通知访问权限”API,允许应用完全复制和控制通知面板。应用可以显示通知文本以及和用户操作一样地和通知交互——也就是点击操作按钮和消除通知。当你有个通知面板时从本机应用做这个操作没什么意义,但是在一个独立于你手机的设备上,复制通知面板的消息就显得很有用了。为数不多的接入的应用是 “Android Wear Preview(安卓可穿戴预览)”,使用了通知 API 驱动大部分的 Android Wear 界面。 + +“4.3 是给可穿戴设备准备的”这个理论解释了 4.3 相对较少的新特性:它的推出是为了给 OEM 厂商时间去升级设备,为 [Android Wear][2] 的发布做准备。这个计划看起来起作用了。Android Wear 要求 安卓 4.3 及以上版本,安卓 4.3 已经发布很长时间了,大部分主要的旗舰设备都已经升级了。 + +安卓并没有那么激动人心,但安卓从现在起的新版也不需要那么激动人心了。一切都变得那么模块化了,谷歌可以通过 Google Play 在它们完成时随时推送更新,不用再作为一个大系统更新来更新这么多组件。 + +---------- + +![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/24/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://live.arstechnica.com/liveblog-google-io-2013-keynote/ +[2]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From b8b94f4ca73048a7a2a2c53e119bd4df3e7f5bee Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 4 Apr 2016 05:24:12 +0800 Subject: [PATCH 1222/1710] PUB:Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition @GHLandy --- ...esystems and Configuring Swap Partition.md | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) rename {translated/tech => published}/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md (82%) diff --git a/translated/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md b/published/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md similarity index 82% rename from translated/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md rename to published/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md index 987ea4a7f8..77bd84087c 100644 --- a/translated/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md +++ b/published/LFCS/Part 4 - LFCS--Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition.md @@ -1,13 +1,11 @@ -GHLandy Translated - -LFCS 系列第四讲:分区存储设备、格式化文件系统和配置交换分区 - +LFCS 系列第四讲:对存储设备分区、格式化文件系统和配置交换分区 ================================================================================ + 去年八月份,Linux 基金会发起了 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,给所有系统管理员一个展现自己的机会。通过基础考试后,他们可以胜任在 Linux 上的整体运维工作:包括系统支持、一流水平的诊断和监控以及在必要之时向其他支持团队提交帮助请求等。 ![Linux Foundation Certified Sysadmin – Part 4](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-4.png) -LFCS 系列第四讲 +*LFCS 系列第四讲* 需要注意的是,Linux 基金会认证是非常严格的,通过与否完全要看个人能力。通过在线链接,你可以随时随地参加 Linux 基金会认证考试。所以,你再也不用到考试中心了,只需要不断提高自己的专业技能和经验就可去参加考试了。 @@ -16,13 +14,13 @@ LFCS 系列第四讲 注:youtube 视频 -本讲是《十套教程》系列中的第四讲。在本讲中,我们将涵盖分区存储设备、格式化文件系统和配置交换分区等内容,这些都是 LFCS 认证中的必备知识。 +本讲是系列教程中的第四讲。在本讲中,我们将涵盖对存储设备进行分区、格式化文件系统和配置交换分区等内容,这些都是 LFCS 认证中的必备知识。 -### 分区存储设备 ### +### 对存储设备分区 ### 分区是一种将单独的硬盘分成一个或多个区的手段。一个分区只是硬盘的一部分,我们可以认为这部分是独立的磁盘,里边包含一个单一类型的文件系统。分区表则是将硬盘上这些分区与分区标识符联系起来的索引。 -在 Linux 中,IBM PC 兼容系统里边用于管理传统 MBR(最新到2009年)分区的工具是 fdisk。对于 GPT(2010年至今)分区,我们使用 gdisk。这两个工具都可以通过程序名后面加上设备名称(如 /dev/sdb)进行调用。 +在 Linux 上,IBM PC 兼容系统里边用于管理传统 MBR(用到2009年)分区的工具是 fdisk。对于 GPT(2010年至今)分区,我们使用 gdisk。这两个工具都可以通过程序名后面加上设备名称(如 /dev/sdb)进行调用。 #### 使用 fdisk 管理 MBR 分区 #### @@ -34,17 +32,17 @@ LFCS 系列第四讲 ![fdisk Help Menu](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-help.png) -fdisk 帮助菜单 +*fdisk 帮助菜单* 上图中,使用频率最高的选项已高亮显示。你可以随时按下 “p” 显示分区表。 ![Check Partition Table in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Show-Partition-Table.png) -显示分区表 +*显示分区表* Id 列显示由 fdisk 分配给每个分区的分区类型(分区 id)。一个分区类型代表一种文件系统的标识符,简单来说,包括该分区上数据的访问方法。 -请注意,每个分区类型的全面都全面讲解将超出了本教程的范围——本系列教材主要专注于 LFCS 测试,因能力为主。 +请注意,每个分区类型的全面讲解将超出了本教程的范围——本系列教材主要专注于 LFCS 测试,以考试为主。 **下面列出一些 fdisk 常用选项:** @@ -58,25 +56,25 @@ Id 列显示由 fdisk 分配给每个分区的分区类型(分区 id)。一 ![fdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-options.png) -fdisk 命令选项 +*fdisk 命令选项* 按下 “n” 后接着按下 “p” 会创建新一个主分区。最后,你可以使用所有的默认值(这将占用所有的可用空间),或者像下面一样自定义分区大小。 ![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-New-Partition.png) -创建新分区 +*创建新分区* 若 fdisk 分配的分区 Id 并不是我们想用的,可以按下 “t” 来更改。 ![Change Partition Name in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Partition-Name.png) -更改分区类型 +*更改分区类型* 全部设置好分区后,按下 “w” 将更改保存到硬盘分区表上。 ![Save Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Partition-Changes.png) -保存分区更改 +*保存分区更改* #### 使用 gdisk 管理 GPT 分区 #### @@ -88,7 +86,7 @@ fdisk 命令选项 ![Create GPT Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-GPT-Partitions.png) -创建 GPT 分区 +*创建 GPT 分区* 使用 GPT 分区方案,我们可以在同一个硬盘上创建最多 128 个分区,单个分区最大以 PB 为单位,而 MBR 分区方案最大的只能 2TB。 @@ -96,7 +94,7 @@ fdisk 命令选项 ![gdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/gdisk-options.png) -gdisk 命令选项 +*gdisk 命令选项* ### 格式化文件系统 ### @@ -106,14 +104,14 @@ gdisk 命令选项 ![Check Filesystems Type in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Filesystems.png) -检查文件系统类型 +*检查文件系统类型* 选择文件系统取决于你的需求。你应该考虑到每个文件系统的优缺点以及其特点。选择文件系统需要看的两个重要属性: - 日志支持,允许从系统崩溃事件中快速恢复数据。 -- 安全增强式 Linux(SELinux)支持,按照项目 wiki 所说,“安全增强式 Linux 允许用户和管理员更好的把握访问控制权限”。 +- 安全增强式 Linux(SELinux)支持,按照项目 wiki 所说,“安全增强式 Linux 允许用户和管理员更好的控制访问控制权限”。 -在接下来的例子中,我们通过 mkfs 在 /dev/sdb1上创建 ext4 文件系统(支持日志和 SELinux),标卷为 Tecmint。mkfs 基本语法如下: +在接下来的例子中,我们通过 mkfs 在 /dev/sdb1 上创建 ext4 文件系统(支持日志和 SELinux),标卷为 Tecmint。mkfs 基本语法如下: # mkfs -t [filesystem] -L [label] device 或者 @@ -121,7 +119,7 @@ gdisk 命令选项 ![Create ext4 Filesystems in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystems.png) -创建 ext4 文件系统 +*创建 ext4 文件系统* ### 创建并启用交换分区 ### @@ -129,7 +127,7 @@ gdisk 命令选项 下面列出选择交换分区大小的经验法则: -物理内存不高于 2GB 时,取两倍物理内存大小即可;物理内存在 2GB 以上时,取一倍物理内存大小即可;并且所取大小应该大于 32MB。 +> 物理内存不高于 2GB 时,取两倍物理内存大小即可;物理内存在 2GB 以上时,取一倍物理内存大小即可;并且所取大小应该大于 32MB。 所以,如果: @@ -142,7 +140,7 @@ M为物理内存大小,S 为交换分区大小,单位 GB,那么: 记住,这只是基本的经验。对于作为系统管理员的你,才是决定是否使用交换分区及其大小的关键。 -要配置交换分区,首先要划分一个常规分区,大小像我们之前演示的那样来选取。然后添加以下条目到 /etc/fstab 文件中(其中的X要更改为对应的 b 或 c)。 +要配置交换分区,首先要划分一个常规分区,大小像我们之前演示的那样来选取。然后添加以下条目到 /etc/fstab 文件中(其中的 X 要更改为对应的 b 或 c)。 /dev/sdX1 swap swap sw 0 0 @@ -163,15 +161,15 @@ M为物理内存大小,S 为交换分区大小,单位 GB,那么: ![Create-Swap-Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Swap-Partition.png) -创建交换分区 +*创建交换分区* ![Add Swap Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Swap-Partition.png) -启用交换分区 +*启用交换分区* ### 结论 ### -在你的系统管理员之路上,创建分区(包括交换分区)和格式化文件系统是非常重要的一部。我希望本文中所给出的技巧指导你到达你的管理员目标。随时在本讲评论区中发表你的技巧和想法,一起为社区做贡献。 +在你的系统管理员之路上,创建分区(包括交换分区)和格式化文件系统是非常重要的一步。我希望本文中所给出的技巧指导你到达你的管理员目标。随时在本讲评论区中发表你的技巧和想法,一起为社区做贡献。 参考链接 @@ -185,7 +183,7 @@ via: http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ 作者:[Gabriel Cánepa][a] 译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3a8eb74434953ed2da4745089da5253d0a32383c Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 4 Apr 2016 14:57:28 +0800 Subject: [PATCH 1223/1710] [translating]25 - The history of Android --- .../The history of Android/25 - The history of Android.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/The history of Android/25 - The history of Android.md b/sources/talk/The history of Android/25 - The history of Android.md index 39eeb55768..779aa31ce2 100644 --- a/sources/talk/The history of Android/25 - The history of Android.md +++ b/sources/talk/The history of Android/25 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![The LG-made Nexus 5, the launch device for KitKat.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/nexus56.jpg) @@ -67,4 +69,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [4]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ [5]:http://arstechnica.com/gadgets/2013/11/google-just-pulled-a-facebook-home-kitkats-primary-interface-is-google-search/ [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From 96cce3d9a7b9e051498db2cbcc0f6004049099ea Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 4 Apr 2016 17:52:03 +0800 Subject: [PATCH 1224/1710] [translated]25 - The history of Android --- .../25 - The history of Android.md | 72 ------------------- .../25 - The history of Android.md | 71 ++++++++++++++++++ 2 files changed, 71 insertions(+), 72 deletions(-) delete mode 100644 sources/talk/The history of Android/25 - The history of Android.md create mode 100644 translated/talk/The history of Android/25 - The history of Android.md diff --git a/sources/talk/The history of Android/25 - The history of Android.md b/sources/talk/The history of Android/25 - The history of Android.md deleted file mode 100644 index 779aa31ce2..0000000000 --- a/sources/talk/The history of Android/25 - The history of Android.md +++ /dev/null @@ -1,72 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -![The LG-made Nexus 5, the launch device for KitKat.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/nexus56.jpg) -The LG-made Nexus 5, the launch device for KitKat. - -Android 4.4, KitKat—more polish; less memory usage - -Google got really cute with the launch of Android 4.4. The company [teamed up with Nestlé][1] to name the OS "KitKat," and it launched on Halloween, October 31, 2013. Nestlé produced limited-edition Android-shaped KitKat bars, and KitKat packaging in stores promoted the new OS while offering a chance to win a Nexus 7. - -KitKat launched with a new Nexus device, the Nexus 5. The new flagship had the biggest display yet: a five-inch, 1920x1080 LCD. Despite the bigger screen size, LG—again the manufacturer for the device—was able to fit the Nexus 5 into the same dimensions as a Galaxy Nexus or Nexus 4. - -The Nexus 5 was specced comparatively to the highest-end phones at the time, with a 2.3Ghz Snapdragon 800 processor and 2GB of RAM. The phone was again sold unlocked on the Play Store, but while most phones with specs like this would go for $600-$700, Google sold the Nexus 5 for only $350. - -One of the most important improvements in KitKat was one you couldn't see: significantly lower memory usage. For KitKat, Google started a concerted effort to lower memory usage across the OS and bundled apps called "Project Svelte." After tons of optimization work and a "low memory" mode that disabled expensive graphical effects, Android could now run on as little as 340MB of RAM. Lower memory requirements were a big deal, because devices in the developing world—the biggest growth markets for smartphones—often ran on only 512MB of RAM. Ice Cream Sandwich's more advanced UI significantly raised the system requirements of Android devices, which left many low-end devices—even newly released low-end devices—stuck on Gingerbread. The lower system requirements of KitKat meant to bring these cheap devices back into the fold. With KitKat, Google hoped to finally kill Gingerbread (which, at the time of writing, is around 20 percent of the market). Just in case the lower system requirements weren't enough, there have even been reports that Google will [no longer license][2] the Google apps to Gingerbread devices. - -Besides bringing low-end phones to a modern version of the OS, Project Svelte's lower memory requirements were to be a boon to wearable computers, too. Google Glass [announced][3] it was also switching to the slimmer OS, and [Android Wear][4] ran on KitKat, too. The lower memory requirements in Android 4.4 and the notification API and Bluetooth LE support in 4.3 came together nicely to support wearable computing. - -KitKat also featured a lot of polish to the core OS interfaces that couldn't be updated via the Play Store. The System UI, Dialer, Clock, and Settings all saw updates. - -![KitKat's transparent bars on the Google Now Launcher.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/1homescreenz.png) -KitKat's transparent bars on the Google Now Launcher. -Photo by Ron Amadeo - -KitKat not only got rid of the unpopular lines to the left and right sides of the lock screen—it completely disabled lock screen widgets by default! Google obviously felt multiple lock screens and multiple home screens were a little to complicated for new users, so lock screen widgets now needed to be enabled in the settings. The lopsided time here and in the clock app was switched to a symmetrical weight, which looked a lot nicer. - -In KitKat, apps had the ability to make the system and status bars transparent, which significantly changed the look of the OS. The bars now blended into the wallpaper and any other app that chose to enable transparent bars. The bars could also be completely hidden by any app via a new feature called “immersive" mode. - -KitKat was the final nail in the “Tron" coffin, removing almost all traces of blue from the operating system. The status bar icons were changed from a blue to a neutral white. The status and system bars on the home screen weren’t completely transparent; a dark gradient was added to the top and bottom of the screen so that the white icons would still be visible on a light background. - -![Tweaks to Google Now and the folders.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/nowfolders.png) -Tweaks to Google Now and the folders. -Photo by Ron Amadeo - -The home screen that shipped with KitKat on the Nexus 5 was actually exclusive to the Nexus 5 for a few months, but it could now be on any Nexus device. The new home screen was called the "Google Now Launcher," and it was actually [the Google Search app][5]. Yes, Google Search grew from a simple search box to an entire home screen, and in KitKat, it drew the wallpaper, icons, app drawer, widgets, home screen settings, Google Now, and, of course, the search box. Thanks to Search now running the entire home screen, any time the home screen was open and the screen was on, voice commands could be activated by saying “OK Google." This was pointed out to the user with introductory “Say 'OK Google' text in the search bar, which would fade away after a few uses. - -Google Now was more integrated, too. Besides the usual swipe up from the system bar, Google Now was also the leftmost home screen. The new version brought some design tweaks as well. The Google logo was moved into the search bar, and the whole top area was compacted. A few card designs were cleaned up, and a new set of buttons at the bottom led to reminders, customization options, and an overflow button with settings, feedback, and help. Since Google Now was part of the home screen, it got transparent system and status bars, too. - -Transparency and “brightening up" certain parts of the OS were design themes in KitKat. Black was removed in the status and system bars by switching to transparent, and the black background of the folders was switched to white. - -![A screenshot showing the new, cleaner app screen layout, and a composite image of the app lineup.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/apps.png) -A screenshot showing the new, cleaner app screen layout, and a composite image of the app lineup. -Photo by Ron Amadeo - -The KitKat icon lineup changed significantly from 4.3. To be more dramatic, it was a bloodbath, with Google removing seven icons over the 4.3 loadout. Google Hangouts could handle SMS now, so the Messaging app was removed. Hangouts also took over Google+ Messenger duties, so that app shortcut was cut. Google Currents was removed as a default app, as it would soon be killed—along with Google Play Magazines—in favor of Google Play Newsstand. Google Maps was beaten back into a single icon, which meant Local and Navigation shortcuts were removed. The impossible-to-understand Movie Studio was cut, too—Google must have realized no one wants to edit movies on a phone. Thanks to the home screen “OK Google" hotword detection, the Voice Search icon was rendered redundant and removed. Depressingly, the long abandoned News & Weather app remained. - -There was a new app called “Photos"—really the Google+ app—which took over picture management duties. On the Nexus 5, the Gallery and Google+ Photos were pretty similar, but in newer builds of KitKat present on Google Play Edition devices, the Gallery was completely replaced by Google+ photos. Play Games was an interface for Google’s back-end multiplayer service—a Googly version of Xbox Live or Apple’s Game Center. Google Drive, which existed for years as a Play Store app, was finally made a default app. Google bought Quickoffice back in June 2012, now finally deeming the app acceptable for inclusion by default. While Drive opened Google Documents, Quickoffice opened Microsoft Office Documents. If keeping track, that was two document editing apps and two photo editing apps included on most KitKat loadouts. - ----------- - -![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/25/ - -译者:[译者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/2013/09/official-the-next-edition-of-android-is-kitkat-version-4-4/ -[2]:http://www.androidpolice.com/2014/02/10/rumor-google-to-begin-forcing-oems-to-certify-android-devices-with-a-recent-os-version-if-they-want-google-apps/ -[3]:http://www.androidpolice.com/2014/03/01/glass-xe14-delayed-until-its-ready-promises-big-changes-and-a-move-to-kitkat/ -[4]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ -[5]:http://arstechnica.com/gadgets/2013/11/google-just-pulled-a-facebook-home-kitkats-primary-interface-is-google-search/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/25 - The history of Android.md b/translated/talk/The history of Android/25 - The history of Android.md new file mode 100644 index 0000000000..01b93c71a9 --- /dev/null +++ b/translated/talk/The history of Android/25 - The history of Android.md @@ -0,0 +1,71 @@ +安卓编年史 +================================================================================ +![LG 制造的 Nexus 5,奇巧(KitKat)的首发设备。 +](http://cdn.arstechnica.net/wp-content/uploads/2014/03/nexus56.jpg) +LG 制造的 Nexus 5,奇巧(KitKat)的首发设备。 + +Android 4.4,奇巧——更完美;更少的内存占用 + +谷歌安卓 4.4 的发布确实很讨巧。谷歌和[雀巢公司合作][1],新版系统的代号是“奇巧(KitKat)”,并且它是在 2013 年 10 月 31 日发布的,也就是万圣节。雀巢公司推出了限量版带安卓机器人的奇巧巧克力,它的包装也帮助新版系统推广,消费者有机会赢取一台 Nexus 7。 + +一部新的 Nexus 设备也随奇巧一同发布,就是 Nexus 5。新旗舰拥有迄今最大的显示屏:一块五英寸,1920x1080 分辨率的 LCD 显示屏。除了更大尺寸的屏幕,LG——Nexus 5 的制造商——还将 Nexus 5 的机器大小控制得和 Galaxy Nexus 或 Nexus 4 差不多。 + +Nexus 5 相对同时期的高端手机配置算是标准了,拥有 2.3Ghz 骁龙 800 处理器和 2GB 内存。手机再次在 Play 商店销售无锁版,相同配置的大多数手机价格都在 600 到 700 美元之间,但 Nexus 5 的售价仅为 350 美元。 + +奇巧最重要的改进之一你并不能看到:显著减少的内存占用。对奇巧而言,谷歌齐心协力开始了降低系统和预装应用内存占用的努力,称作“Project Svelte”。经过了无数的优化工作和通过一个“低内存模式”(禁用图形开销大的特效),安卓现在可以在 340MB 内存下运行。低内存需求是件了不起的事,因为在发展中国家的设备——智能手机增长最快的市场——许多设备的内存仅有 512MB。冰淇淋三明治更高级的 UI 显著提高了对安卓设备的系统配置要求,这使得很多低端设备——甚至是新发布的低端设备——的安卓版本停留在姜饼。奇巧更低的配置需求意味着这些廉价设备能够跟上脚步。有了奇巧,谷歌希望完全消灭姜饼(写下本文时姜饼的市场占有率还在 20% 左右)。为了防止更低的系统需求还不够有效,甚至有报道称谷歌将[不再授权][2]谷歌应用给姜饼设备。 + +除了给低端设备带来更现代版本的系统,Project Svelte 更低的内存需求同样对可穿戴设备也是个好消息。Google Glass [宣布][3]它会切换到这个更精简的系统,[Android Wear][4] 同样也运行在奇巧之上。安卓 4.4 带来的更低的内存需求以及 4.3 中的通知消息 API 和低功耗蓝牙支持给了可穿戴计算漂亮的支持。 + +奇巧的亮点还有无数精心打磨过的核心系统界面,它们无法通过 Play 商店升级。系统界面,拨号盘,时钟还有设置都能看到升级。 + +![奇巧在 Google Now 启动器下的透明系统栏。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/1homescreenz.png) +奇巧在 Google Now 启动器下的透明系统栏。 +Ron Amadeo 供图 + +奇巧不仅去掉了讨人厌的锁屏左右屏的线框——它还默认完全禁用了锁屏小部件!谷歌明显感觉到了多屏锁屏和锁屏主屏对新用户来说有点复杂,所以锁屏小部件现在需要从设置里启用。锁屏和时钟里不平衡的时间字体换成了一个对称的字重,看起来好看多了。 + +在奇巧中,应用拥有将系统栏和状态栏透明的能力,显著地改变了系统的外观。系统栏和状态栏现在混合到壁纸和启用透明栏的应用中去了。这些栏还能通过新功能“沉浸”模式完全被应用隐藏。 + +奇巧是“电子”科幻风格棺材上的最后一颗钉子,几乎完全移除了系统的蓝色痕迹。状态栏图标由蓝色变成中性的白色。主屏的状态栏和系统栏并不是完全透明的;它们有深色的渐变,这样在使用浅色壁纸的时候白色的图标还能轻易地识别出来。 + +![Google Now 和文件夹的调整。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/nowfolders.png) +Google Now 和文件夹的调整。 +Ron Amadeo 供图 + +在 Nexus 5 上随奇巧到来的主屏实际上由 Nexus 5 独占了几个月,但现在任何 Nexus 设备都能拥有它了。新的主屏叫做“Google Now Launcher”,它实际上是[谷歌搜索应用][5]。是的,谷歌搜索从一个简单的搜索框成长到了整个主屏幕,并且在奇巧中,它涉及了壁纸,图标,应用抽屉,小部件,主屏设置,Google Now,当然,还有搜索框。由于搜索现在运行在整个主屏幕,任何时候只要打开了主屏并且屏幕是点亮的,就可以通过说“OK Google”激活语音命令。在搜索栏有引导用户说出“OK Google”的文本,在几次使用后这个介绍会隐去。 + +Google Now 的集成度现在更高了。除了通常的系统栏上滑激活,Google Now 还占据了最左侧的主屏。新版还引入了一些设计上的调整。谷歌的 logo 移到了搜索栏内,整个顶部区域更紧凑了。显示更多卡片的设计被去除了,新添加的一组底部按钮指向备忘录,自定义选项,以及一个更多操作按钮,里面由设置,反馈,以及帮助。因为 Google Now 是主屏幕的一部分,所以它也拥有透明 的系统栏和状态栏。 + +透明以及让系统的特定部分“更明亮”是奇巧的设计主题。黑色调通过透明化从状态栏和系统栏移除了,文件夹的黑色背景也换为了白色。 + +![新的,更加干净的应用列表,以及完整的应用阵容。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/apps.png) +新的,更加清爽的应用列表,以及完整的应用阵容。 +Ron Amadeo 供图 + +奇巧的图标阵容相对 4.3 有显著的变化。更戏剧化地说,这是一场大屠杀,谷歌从 4.3 的配置中移除了七个图标。谷歌 Hangouts 现在能够处理短信,所以信息应用被去除了。Hangouts 同时还接手了 Google Messenger 的职责,所以它的图标也不见了。Google Currents 不再作为默认应用预装,因为它不久后就会被终结——和它一起的还有 Google Play Magazines(Play 杂志),取代它们的是 Google Play Newsstand(Play 报刊亭)。谷歌地图被打回一个图标,这意味着本地和导航的快捷方式被去掉了。难以理解的 Movie Studio 也被去除了——谷歌肯定已经意识到了没人想在手机上剪辑电影。有了主屏的“OK Google”关键词检测,语音搜索图标的呈现就显得多余了,因而将其移除。令人沮丧的是,没人用的新闻和天气应用还在。 + +有个新应用“Photos(相片)”——实际上是 Google+ 的一部分——接手了图片管理的工作。在 Nexus 5 上,相册和 Google+ 相片十分相似,但在 Google Play 版设备上更新版的奇巧中,相册已经完全被 Google+ 相片所取代。Play Games 是谷歌的后端多用户游戏服务——谷歌版的 Xbox Live 或苹果的 Game Center。Google Drive,已经在 Play 商店存在数年的应用,终于成为了内置应用。谷歌 2012 年 6 月收购的 Quickoffice 也进入了内置应用阵容。Drive 可以打开 Google 文档,Quickoffice 可以打开微软 Office 文档。如果细细追究起来,在大多数奇巧中包含了两个文档编辑应用和两个相片编辑应用。 + +---------- + +![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/25/ + +译者:[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/2013/09/official-the-next-edition-of-android-is-kitkat-version-4-4/ +[2]:http://www.androidpolice.com/2014/02/10/rumor-google-to-begin-forcing-oems-to-certify-android-devices-with-a-recent-os-version-if-they-want-google-apps/ +[3]:http://www.androidpolice.com/2014/03/01/glass-xe14-delayed-until-its-ready-promises-big-changes-and-a-move-to-kitkat/ +[4]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[5]:http://arstechnica.com/gadgets/2013/11/google-just-pulled-a-facebook-home-kitkats-primary-interface-is-google-search/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From f1d4a3b9d524317ffae005560455c7eaa5597d4c Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 4 Apr 2016 17:53:35 +0800 Subject: [PATCH 1225/1710] [translating]26 - The history of Android --- .../The history of Android/26 - The history of Android.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/The history of Android/26 - The history of Android.md b/sources/talk/The history of Android/26 - The history of Android.md index 3f9e1427ba..ed0ff30fb3 100644 --- a/sources/talk/The history of Android/26 - The history of Android.md +++ b/sources/talk/The history of Android/26 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![The new "add to home screen" interface was definitely inspired by Honeycomb.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/homesetupthrowback.png) @@ -84,4 +86,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [5]:http://userexperienceawards.com/uxa2012/ [6]:http://arstechnica.com/gadgets/2014/04/googles-next-design-challenge-unify-app-design-across-platforms/ [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From cc421b59aa76db532e215be9a4c20c79fe03a37f Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 4 Apr 2016 21:13:14 +0800 Subject: [PATCH 1226/1710] [translated]26 - The history of Android --- .../26 - The history of Android.md | 89 ------------------- .../26 - The history of Android.md | 87 ++++++++++++++++++ 2 files changed, 87 insertions(+), 89 deletions(-) delete mode 100644 sources/talk/The history of Android/26 - The history of Android.md create mode 100644 translated/talk/The history of Android/26 - The history of Android.md diff --git a/sources/talk/The history of Android/26 - The history of Android.md b/sources/talk/The history of Android/26 - The history of Android.md deleted file mode 100644 index ed0ff30fb3..0000000000 --- a/sources/talk/The history of Android/26 - The history of Android.md +++ /dev/null @@ -1,89 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -![The new "add to home screen" interface was definitely inspired by Honeycomb.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/homesetupthrowback.png) -The new "add to home screen" interface was definitely inspired by Honeycomb. -Photo by Ron Amadeo - -KitKat added a nice throwback to Honeycomb with the home screen configuration screen. On the massive 10-inch screen of a Honeycomb tablet (right picture, above), long pressing on the home screen background would present you with a zoomed-out view of all your home screens. Widgets could be dragged from the bottom widget drawer into any home screen—it was very handy. When it came time to bring the Honeycomb interface to phones, from Android 4.0 all the way to 4.3, Google skipped this design and left it to the larger screened devices, presenting only a list of options after a long press (center picture). - -For KitKat though, Google finally came up with a solution. After a long press, 4.4 presented a slightly zoomed out view—you could see the current home screen and the screens to the left and right of it. Tapping on the “widgets" button would open a full screen list of widget thumbnails, but after long-pressing on a widget, you were thrown back into the zoomed-out view and could scroll through home screen pages and place the icon where you wanted. By dragging an icon or widget all the way past the rightmost home page, you could create a new home page. - -![Contacts and the Keyboard both removed any trace of blue.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/RIP33B5E5.png) -Contacts and the Keyboard both removed any trace of blue. -Photo by Ron Amadeo - -KitKat was the end of the line for the Tron design. In most parts of the OS, any remaining blue highlights were removed in favor of gray. In the People app, blue was sucked out of the header and the letter separators in the contact list. The pictures swapped sides and the bottom bar was changed to a light gray to match the top. The Keyboard, which injected the color blue into nearly every app, was changed to gray-on-gray-on-gray. That wasn't a bad thing. Apps should be allowed to have their own color scheme—forcing a potentially clashing color on them via the keyboard wasn’t good design. - -![The first three screenshots show KitKat's dialer, and the last one is 4.3.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/phone.png) -The first three screenshots show KitKat's dialer, and the last one is 4.3. -Photo by Ron Amadeo - -Google completely revamped the dialer in KitKat, creating a wild new design that changed the way users thought about a phone. Actual numbers in the new dialer were hidden as much as possible—there wasn’t even a dial pad on the main screen. The primary interface for making a phone call was now a search bar! If you wanted to call someone in your contacts, just type their name in; if you wanted to call a business, just type the business name in and the dialer would search through Google Maps’ extensive database of phone numbers. It worked incredibly well and was something only Google could pull off. - -If searching for numbers wasn’t your thing, the app also intelligently displayed a listing for the previous phone call, your most-contacted people, and a link to all contacts. At the bottom were links to your call history, the now old school number pad, and the usual overflow button containing a settings page. - -![Office stuff: Google Drive, which was now packed in, and the printing support.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/googledrive-and-printing.png) -Office stuff: Google Drive, which was now packed in, and the printing support. -Photo by Ron Amadeo - -It was amazing it took this long, but in KitKat, Google Drive was finally included as a default app. Drive allowed users to create and edit Google Docs spreadsheets and documents, scan documents with the camera and upload them as PDFs, or view (but not edit) presentations. Drive, by this point, had a great, modern design with a slide-out navigation drawer and a Google Now-style card design. - -For even more mobile office fun, KitKat included an OS-level printing framework. At the bottom of the settings was a "Printing" screen, and any printer OEM could make a plugin for it. Google Cloud Print was, of course, one of the first supporters. Once your printer was hooked up to Cloud Print, either natively or through a computer with Chrome installed, you could print to it over the Internet. Apps needed to support the printing framework, too. Pressing the little "i" button on Google Drive would show information about the document and give you the option to print it. Just like a desktop OS, a print dialog would pop up with settings like copies, paper size, and page selection. - -![The "Photos" section of the Google+ app, which replaced the Gallery.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/that-is-one-dead-gallery.png) -The "Photos" section of the Google+ app, which replaced the Gallery. -Photo by Ron Amadeo - -Google+ Photos and the Gallery initially shipped together on the Nexus 5, but in a later build of KitKat on Google Play devices, the Gallery was axed and Google+ completely took over photo duties. The new app changed the photo app from a light theme to a dark theme, and Google+ Photos brought a modern navigation drawer design. - -Android had long included an instant upload feature, which would automatically backup all pictures on Google’s cloud storage, first on Picasa and later on Google+. The big benefit of G+ Photos over the Gallery was that it could finally manage those cloud-stored photos. Little cloud icons in the lower right of a photo indicated backup status, and it would fill from right to left to indicate an upload-in-progress. G+ photos brought its own photo editor along with support for a million of other Google+ photo features, like highlights, auto awesome, and, of course, sharing to Google+. - -![Tweaks to the Clock app, which added an alarms tab and changed the time input dialog.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/clocks.png) -Tweaks to the Clock app, which added an alarms tab and changed the time input dialog. -Photo by Ron Amadeo - -Google changed the excellent time picker that was introduced in 4.2 to this strange clock interface, which was both slower and less precise than the old interface. First you were presented with a one-handed clock which you used to choose the hour, then that clock went away and another one-handed clock allowed you to choose the minute. Having to spin the minute hand or tap a spot on the clock face made it very difficult to pick times in non-five-minute increments. Unlike the old time picker, which required you to pick a time period, this just defaulted to AM (again making it possible to accidentally be off by 12 hours). - -### Today—Android everywhere ### - -![](http://cdn.arstechnica.net/wp-content/uploads/2014/05/android-everywhere2.png) -Photo by Google/Sony/Motorola/Ron Amadeo - -What started out as a curious BlackBerry clone from a search engine company became the most popular OS in the world from one of the biggest titans in the tech industry. Android has become Google's de-facto consumer operating system, and it powers phones, tablets, Google Glass, Google TV, and more. [Parts of it][1] are even used in the Chromecast. In the future, Google will be bringing Android to watches and wearables with [Android Wear][2], and the [Open Automotive Alliance][3] will be bringing Android to cars. Google will be making a renewed commitment to the living room soon, too, with [Android TV][4]. The OS is such a core pillar of Google, that events that are supposed to cover company-wide products, like Google I/O, end up becoming Android launch parties. - -![Top row: the Google Play content stores. Bottom row: the Google Play Apps.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-30-03.08.jpg) -Top row: the Google Play content stores. Bottom row: the Google Play Apps. -Photo by Ron Amadeo - -What was once the ugly duckling of the mobile industry has transformed so much it now [wins design awards][5] for its user interface. The design of things like Google Now have affected everything the company produces, with even the desktop sites like Search, Google+, YouTube, and Maps getting in on the card design unity. The design keeps evolving as well. Google's next plan is to [unify design][6] across not just Android, but all of its products. The goal is to take something like Gmail and make it feel the same, whether you're using it on Android, a desktop browser, or a watch. - -Google outsourced so many pieces of Android to the Play Store, that version releases are becoming less and less necessary. Google decided the best way to beat carrier and OEM update issues was to sidestep those roadblocks completely. From here on out, there isn't much left to include in an Android update other than core under-the-hood changes—but even many APIs have been pushed to Google Play Services. If you just look at version releases, it seems like Android development has slowed down from the peak 2.5-month release cycle. But the reality is Google can now continually push out improvements to the Play Store in a never-ending, somewhat subtler stream of updates. - -With 1.5 million activations per day, Android has no where to go but up. In the future, Android will be headed from phones and tablets to cars and watches, and the lower system requirements of KitKat will drive phones to even lower prices in the developing world. The bottom line? More and more people will get online. And for many of those people, Android will be not just their phone but their primary computing device. With Android leading the charge for Google in so many areas, the OS that started off as a tiny acquisition has become one of Google's most important products. - ----------- - -![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/26/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://blog.gtvhacker.com/2013/chromecast-exploiting-the-newest-device-by-google/ -[2]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ -[3]:http://arstechnica.com/information-technology/2014/01/open-automotive-alliance-aims-to-bring-android-inside-the-car/ -[4]:http://arstechnica.com/gadgets/2014/04/documents-point-to-android-tv-googles-latest-bid-for-the-living-room/ -[5]:http://userexperienceawards.com/uxa2012/ -[6]:http://arstechnica.com/gadgets/2014/04/googles-next-design-challenge-unify-app-design-across-platforms/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/26 - The history of Android.md b/translated/talk/The history of Android/26 - The history of Android.md new file mode 100644 index 0000000000..2abd7a9a70 --- /dev/null +++ b/translated/talk/The history of Android/26 - The history of Android.md @@ -0,0 +1,87 @@ +安卓编年史 +================================================================================ +![新的“添加到主屏幕”界面无疑受到了蜂巢的启发。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/homesetupthrowback.png) +新的“添加到主屏幕”界面无疑受到了蜂巢的启发。 +Ron Amadeo 供图 + +奇巧的主屏幕配置界面漂亮地对蜂巢进行了复古。在有巨大的 10 英寸屏幕的蜂巢平板上(上方右侧图片),长按主屏背景会向你展现一个所有主屏幕的缩放视图。可以从下面的小部件抽屉里将它们拖放到任意主屏上——这很方便。在将蜂巢的界面带到手机上时,从安卓 4.0 直到 4.3,谷歌都跳过了这个设计,把它留给了大屏幕设备,在手机上长按后只显示一个选项列表(中间的图片)。 + +但在奇巧上,谷歌最终给出了解决方案。在长按后,4.4 呈现一个略微缩放的视图——你可以看到当前主屏以及它左右侧的屏幕。点击“小部件”按钮会打开一个小部件略缩图的完整列表,但是长按一个小部件后,你会回到缩放视图,并且你可以在主屏页面之间滚动,将图标放在你想要的位置。将图标或者小部件拖动过最右侧的主屏页面,你可以创建一个新的主屏页面。 + +![联系人和去掉所有蓝色痕迹的键盘。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/RIP33B5E5.png) +联系人和去掉所有蓝色痕迹的键盘。 +Ron Amadeo 供图 + +奇巧是电子风格设计的完结。在系统的大多数部分,剩下的蓝色高亮都被换成了灰色。在联系人应用中,头部和联系人列表字母分割线的蓝色都移除掉了。图片的位置换了一侧,底栏变成了浅灰色以和顶部相称。几乎将蓝色渗透进每个应用的键盘,现在是灰底灰色灰高亮。这可不是件坏事。应用应该允许有它们自己的配色方案——在键盘上强迫存在潜在的颜色冲突可不是个好设计。 + +![前三张是奇巧的拨号盘,最后一张是 4.3 的。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/phone.png) +前三张是奇巧的拨号盘,最后一张是 4.3 的。 +Ron Amadeo 供图 + +谷歌完全重制了奇巧中的拨号,创造了一个疯狂的设计,改变了用户对手机的思考方式。实际上新版拨号中的数字都被尽可能地隐藏了——在首屏上甚至没有拨号盘。打电话的主要界面现在是个搜索栏!如果你想给你的联系人打电话,只要在搜索栏输入他的名字;如果你想给一个公司打电话,只要输入公司的名字,拨号会通过谷歌地图庞大的数据库找到号码。它工作得令人难以置信的好,这是只有谷歌才能完成的事情。 + +如果搜索不是你的菜的话,应用还会智能地显示通话记录列表,最常联系人,还有指向所有联系人的链接。底部的链接指向你的通话记录,传统的拨号盘,以及常规的更多操作按钮,包含一个设置页面。 + +![Office 相关:新的内置应用 Google Drive,以及打印支持。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/googledrive-and-printing.png) +Office 相关:新的内置应用 Google Drive,以及打印支持。 +Ron Amadeo 供图 + +在奇巧中 Google Drive 终于作为内置应用包含了进来,令人惊奇的是这居然用了这么长时间。Drive 允许用户创建和编辑 Google Docs 表格和文档,用相机扫描文档并作为 PDF 上传,或者查看(不能编辑)演示文稿。Drive 的设计十分现代,侧面拥有滑出式导航抽屉,并且是 Google Now 风格卡片式设计。 + +为了有更多的移动办公乐趣,奇巧包含了系统级打印框架。在设置的底部有“打印”设置界面,任何打印机 OEM 厂商都可以为它写个插件。谷歌云打印自然是首批支持者之一。只要你的打印机和云打印相连接,无论是本地或通过一台装有 Chrome 浏览器的电脑,你都可以借助网络进行打印。应用同样也需要支持打印框架。点击 Google Drive 里的“i”按钮会显示文档信息,并且给你打印的选项。就像桌面系统那样,会弹出一个设置对话框,有打印份数,纸张尺寸,以及页面选择等选项。 + +![Google+ 应用的“相片”部分,它取代了相册。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/that-is-one-dead-gallery.png) +Google+ 应用的“相片”部分,它取代了相册。 +Ron Amadeo 供图 + +Google+ 相片和相册最初都在 Nexus 5 上随附,但在 Google Play 设备稍晚版本的奇巧上,相册被砍掉了,Google+ 完全接手了相片管理。新应用的主题从深色变成了浅色,Google+ 相片还带来了现代的导航抽屉设计。 + +安卓一直以来都有即时上传功能,它会自动备份所有图片到谷歌的云存储,开始是 Picasa 后来是 Google+。G+ 相片相比相册最大的好处是它可以管理那些云端存储的图片。图片右下角的云图标指示备份状态,它会从右到左地填满来指示正在上传。G+ 相片带来了它自己的照片编辑器,还有许多其它的 Google+ 图片功能,比如高亮,自动美化,当然,还有分享到 Google+。 + +![时钟应用的调整,添加了一个闹钟页面并修改了时间输入框。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/clocks.png) +时钟应用的调整,添加了一个闹钟页面并修改了时间输入框。 +Ron Amadeo 供图 + +谷歌将 4.2 引入的优秀时间选择器换成了一个奇怪的时钟界面,操作起来比旧界面更慢了也更不精确了。首先是个可以选择小时的单指针时钟,然后显示的是另一个选择分钟的单指针时钟。选择的时候要转动分针或点击数字,这让用用户很难选择不是整五分钟的时间增量。不像之前的时间选择器需要选择一个时间段,这里默认时间段是 AM(重复一下,这样设置的时候容易不小心偏差 12 小时)。 + +### 今日安卓无处不在 ### + +![](http://cdn.arstechnica.net/wp-content/uploads/2014/05/android-everywhere2.png) +图片来自 Google/Sony/Motorola/Ron Amadeo + +一开始从一家搜索引擎公司的古怪的黑莓复制品,一步一步到如今科技界巨头之一在世界上最流行的系统。安卓已经成为谷歌的实际消费者操作系统,它驱动着手机,平板,Google Glass,Google TV,甚至更多。[它的一部分][1]甚至还用到了 Chromecast 中。在未来,谷歌还会将 [Android Wear][2] 带到手表和可穿戴设备上,[开放汽车联盟][3] 要将安卓带到汽车上。不久后会谷歌再次承诺对客厅的计划,带上 [Android TV][4]。这个系统对谷歌是如此重要的支柱,原本应该覆盖全公司产品的大会活动,比如 Google I/O,俨然成为了安卓发布派对。 + +![上排:谷歌 Play 内容商店。下排:谷歌 Play 应用。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-30-03.08.jpg) +上排:谷歌 Play 内容商店。下排:谷歌 Play 应用。 +Ron Amadeo 供图 + +移动产业曾经的的丑小鸭脱胎换骨,它的用户界面还[赢得了设计奖项][5]。像 Google Now 一样的设计风格影响了整个公司的产品,甚至连像搜索,Google+,Youtube,以及地图这样的桌面站点都加入了卡片式设计中。设计也在不断地演进。谷歌下一步[统一设计][6]的计划不仅是面对安卓,也包括了所有的产品。谷歌的目标是让你不管在安卓,还是桌面浏览器,或是一个手表上,使用像 Gmail 这样的服务时都能有一样的体验。 + +谷歌将很多安卓的组件转移到 Play 商店,这样版本发布就越来越不重要了。谷歌决定了解决运营商和 OEM 厂商更新问题的最佳途径,就是完全绕开这些绊脚石。从这里开始,在一个安卓更新里除了核心底层变动外就没什么内容了——但是更多的 API 被加入了谷歌 Play 服务。如果你只看版本更新的话,相对安卓高峰期 2.5 个月的发布周期来说开发已经放缓了。但实际情况是谷歌现在可以持续将改进推送到 Play 商店,从周期发布变成了永无止境,有些微妙的更新流。 + +每天 150 万台设备激活,安卓除了增长就是增长。在未来,安卓会是手机和平板到汽车和手表的领军者,奇巧更低的系统配置要求也会让发展中国家的手机价格更低。结果呢?越来越多的人会来到线上。对那里的大多数人来说,安卓不止是他们的手机,也是他们首要的计算设备。随着安卓为谷歌领导掌管众多领域,从一个小收购而来的系统逐渐成长为了谷歌最重要的产品。 + +---------- + +![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/26/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://blog.gtvhacker.com/2013/chromecast-exploiting-the-newest-device-by-google/ +[2]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[3]:http://arstechnica.com/information-technology/2014/01/open-automotive-alliance-aims-to-bring-android-inside-the-car/ +[4]:http://arstechnica.com/gadgets/2014/04/documents-point-to-android-tv-googles-latest-bid-for-the-living-room/ +[5]:http://userexperienceawards.com/uxa2012/ +[6]:http://arstechnica.com/gadgets/2014/04/googles-next-design-challenge-unify-app-design-across-platforms/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 1373c5195086d0c99e9f7e6d898a16675e13f041 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 5 Apr 2016 09:37:13 +0800 Subject: [PATCH 1227/1710] PUB:20151126 Microsoft and Linux--True Romance or Toxic Love @sonofelice --- ...t and Linux--True Romance or Toxic Love.md | 77 +++++++++++++++++++ ...t and Linux--True Romance or Toxic Love.md | 77 ------------------- 2 files changed, 77 insertions(+), 77 deletions(-) create mode 100644 published/20151126 Microsoft and Linux--True Romance or Toxic Love.md delete mode 100644 translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md diff --git a/published/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/published/20151126 Microsoft and Linux--True Romance or Toxic Love.md new file mode 100644 index 0000000000..4499e7273f --- /dev/null +++ b/published/20151126 Microsoft and Linux--True Romance or Toxic Love.md @@ -0,0 +1,77 @@ +微软和 Linux :真正的浪漫还是有毒的爱情? +================================================================================ +时不时的我们会读到一个能让你喝咖啡呛到或者把热拿铁喷到你显示器上的新闻故事。微软最近宣布的对 Linux 的钟爱就是这样一个鲜明的例子。 + +从常识来讲,微软和自由开源软件(FOSS)运动就是恒久的敌人。在很多人眼里,微软体现了过分的贪婪,而这正为自由开源软件运动(FOSS)所拒绝。另外,之前微软就已经给自由开源软件社区贴上了"一伙强盗"的标签。 + +我们能够理解为什么微软一直以来都害怕免费的操作系统。免费操作系统结合挑战微软核心产品线的开源应用时,就威胁到了微软在台式机和笔记本电脑市场的控制地位。 + +尽管微软有对在台式机主导地位的担忧,在网络服务器市场 Linux 却有着最高的影响力。今天,大多数的服务器都是 Linux 系统。包括世界上最繁忙的站点服务器。对微软来说,看到这么多无法装到兜里的许可证的营收一定是非常痛苦的。 + +掌上设备是微软输给自由软件的另一个领域。曾几何时,微软的 Windows CE 和 Pocket PC 操作系统走在移动计算的前沿。Windows PDA 设备是最闪亮的和豪华的产品。但是这一切在苹果公司发布了iphone之后都结束了。从那时起,安卓就开始进入公众视野,Windows 的移动产品开始被忽略被遗忘。而安卓平台是建立在自由开源的组件的基础上的。 + +由于安卓平台的开放性,安卓的市场份额在迅速扩大。不像 IOS,任何一个手机制造商都可以发布安卓手机。也不像Windows 手机,安卓没有许可费用。这对消费者来说是件好事。这也导致了许多强大却又价格低廉的手机制造商在世界各地涌现。这非常明确的证明了自由开源软件(FOSS)的价值。 + +在服务器和移动计算的角逐中失利对微软来说是非常惨重的损失。考虑一下服务器和移动计算这两个加起来所占有的市场大小,台式机市场似乎是死水一潭。没有人喜欢失败,尤其是涉及到金钱。并且,微软确实有许多东西正在慢慢失去。你可能期望着微软自尝苦果。在过去,确实如此。 + +微软使用了各种可以支配的手段来对 Linux 和自由开源软件(FOSS)进行反击,从宣传到专利威胁。尽管这种攻击确实减慢了适配 Linux 的步伐,但却从来没有让 Linux 的脚步停下。 + +所以,当微软在开源大会和重大事件上拿出印有“Microsoft Loves Linux”的T恤和徽章时,请原谅我们表现出来的震惊。这是真的吗?微软真的爱 Linux ? + +当然,公关的口号和免费的T恤并不代表真理。行动胜于雄辩。当你思考一下微软的行动时,微软的立场就变得有点模棱两可了。 + +一方面,微软招募了几百名 Linux 开发者和系统管理员。将 .NET 核心框架作为一个开源的项目进行了发布,并提供了跨平台的支持(这样 .NET 就可以跑在 OS X 和 Linux 上了)。并且,微软与 Linux 公司合作把最流行的发行版本放到了 Azure 平台上。事实上,微软已经走的如此之远以至于要为 Azure 数据中心开发自己的 Linux 发行版了。 + +另一方面,微软继续直接通过法律或者傀儡公司来对开源项目进行攻击。很明显,微软在与自由软件的所有权较量上并没有发自内心的进行大的道德转变。那为什么要公开申明对 Linux 的钟爱之情呢? + +一个显而易见的事实:微软是一个经营性实体。对股东来说是一个投资工具,对雇员来说是收入来源。微软所做的只有一个终极目标:盈利。微软并没有表现出来爱或者恨(尽管这是一个最常见的指控)。 + +所以问题不应该是"微软真的爱 Linux 吗?"相反,我们应该问,微软是怎么从这一切中获利的。 + +让我们以 .NET 核心框架的开源发行为例。这一举动使得 .NET 的运行时环境移植到任何平台都很轻松。这使得微软的 .NET 框架所涉及到的范围远远大于 Windows 平台。 + +开放 .NET 的核心包,最终使得 .NET 开发者开发跨平台的 app 成为可能,比如 OS X、Linux 甚至安卓——都基于同一个核心代码库。 + +从开发者角度来讲,这使得 .NET 框架比之前更有吸引力了。能够从单一的代码库触及到多个平台,使得使用 .NET 框架开发的任何 app 戏剧性的扩大了潜在的目标市场。 + +另外,一个强大的开源社区能够提供给开发者一些代码来在他们自己的项目中进行复用。所以,开源项目的可利用性也将会成就 .NET 框架。 + +更进一步讲,开放 .NET 的核心代码能够减少跨越不同平台所产生的碎片,意味着对消费者来说有对 app 更广的选择。无论是开源软件还是专用的 app,都有更多的选择。 + +从微软的角度来讲,会得到一队开发者大军。微软可以通过销售培训、证书、技术支持、开发者工具(包括 Visual Studio)和应用扩展来获利。 + +我们应该自问的是,这对自由软件社区有利还是有弊? + +.NET 框架的大范围适用意味着许多参与竞争的开源项目的消亡,迫使我们会跟着微软的节奏走下去。 + +先抛开 .NET 不谈,微软正在花费大量的精力在 Azure 云计算平台对 Linux 的支持上。要记得,Azure 最初是 Windows 的 Azure。Windows 服务器是唯一能够支持 Azure 的操作系统。今天,Azure 也提供了对多个 Linux 发行版的支持。 + +关于此,有一个原因:付费给需要或者想要 Linux 服务的顾客。如果微软不提供 Linux 虚拟机,那些顾客就会跟别人合作了。 + +看上去好像是微软意识到“Linux 就在这里”的这样一个现实。微软不能真正的消灭它,所以必须接收它。 + +这又把我们带回到那个问题:关于微软和 Linux 为什么有这么多的流言?我们在谈论这个问题,因为微软希望我们思考这个问题。毕竟,所有这些谈资都会追溯到微软,不管是在新闻稿、博客还是会议上的公开声明。微软在努力吸引大家对其在 Linux 专业知识方面的注意力。 + +首席架构师 Kamala Subramaniam 的博文声明 Azure Cloud Switch 背后的其他企图会是什么?ACS 是一个定制的 Linux 发行版。微软用它来对 Azure 数据中心的交换机硬件进行自动配置。 + +ACS 不是公开的。它是用于 Azure 内部使用的。别人也不太可能找到这个发行版其他的用途。事实上,Subramaniam 在她的博文中也表述了同样的观点。 + +所以,微软不会通过卖 ACS 来获利,也不会通过赠送它而增加用户基数。相反,微软在 Linux 和 Azure 上花费精力,以加强其在 Linux 云计算平台方面的地位。 + +微软最近迷上 Linux 对社区来说是好消息吗? + +我们不应该慢慢忘记微软的“拥抱、扩展、消灭(Embrace, Extend and Exterminate)”的诅咒。现在,微软处在拥抱 Linux 的初期阶段。微软会通过定制扩展和专有“标准”来分裂社区吗? + +发表评论吧,让我们知道你是怎么想的。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/microsoft-and-linux-true-romance-or-toxic-love-0 + +作者:[James Darvell][a] +译者:[sonofelice](https://github.com/sonofelice) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/james-darvell \ No newline at end of file diff --git a/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md deleted file mode 100644 index d16ed99114..0000000000 --- a/translated/talk/20151126 Microsoft and Linux--True Romance or Toxic Love.md +++ /dev/null @@ -1,77 +0,0 @@ -微软和 Linux :真正的浪漫还是有毒的爱情? -================================================================================ -时不时的我们会读到一个能让你喝咖啡呛到或者把热拿铁喷到你显示器上的新闻故事。微软最近宣布的对 Linux 的钟爱就是这样一个鲜明的例子。 - -从常识来讲,微软和自由开源软件(FOSS)运动就是恒久的敌人。在很多人眼里,微软体现了过分的贪婪,而这正为自由开源软件运动(FOSS)所拒绝。另外,之前微软就已经给自由开源软件社区贴上了"一伙强盗"的标签。 - -我们能够理解为什么微软一直以来都害怕免费的操作系统。免费操作系统结合挑战微软核心产品线的开源应用时,就威胁到了微软在台式机和笔记本电脑市场的控制地位。 - -尽管微软有对在台式机主导地位的担忧,在网络服务器市场 Linux 却有着最高的影响力。今天,大多数的服务器都是 Linux 系统。包括世界上最繁忙的站点服务器。对微软来说,看到这么多没有被声明的许可证收入一定是非常痛苦的。 - -掌上设备是微软输给免费软件的另一个领域。曾几何时,微软的 Windows CE 和 Pocket PC 操作系统走在移动计算的前沿。Windows PDA 设备是最闪亮的和豪华的产品。但是这一切在苹果公司发布了iphone之后都结束了。从那时起,安卓已经开始进入公众视野,Windows的移动产品开始被忽略被遗忘。而安卓平台是建立在免费开源的组件的基础上的。 - -由于安卓平台的开放性,安卓的市场份额在迅速扩大。不像 IOS,任何一个手机制造商都可以发布安卓手机。也不像Windows手机,安卓没有许可费用。这对消费者来说是件好事。这也导致了许多强大却又价格低廉的手机制造商在世界各地涌现。这非常明确的证明了自由开源软件(FOSS)的价值。 - -在服务器和移动计算的角逐中失利对微软来说是非常惨重的损失。考虑一下服务器和移动计算这两个加起来所占有的市场大小,台式机市场似乎是死水一潭。没有人喜欢失败,尤其是涉及到金钱。并且,微软确实有许多正在慢慢失去。你可能期望着微软自尝苦果。在过去,确实如此。 - -微软使用了各种可以支配的手段来对 Linux 和自由开源软件(FOSS)进行反击,从宣传到专利威胁。尽管这种攻击确实减慢了适配 Linux 的步伐,但却从来没有让 Linux 的脚步停下。 - -所以,当微软在开源大会和重大事件上拿出印有"Microsoft Loves Linux"的T-恤和徽章时,请原谅我们表现出来的震惊。这是真的吗?微软真的爱 Linux ? - -当然,公关的口号和免费的T-恤并不代表真理。行动胜于雄辩。当你思考一下微软的行动时,微软的立场就变得有点模棱两可了。 - -一方面,微软招募了几百名 Linux 开发者和系统管理员。将 .NET 核心框架作为一个开源的项目进行了发布,并提供了跨平台的支持(这样 .NET 就可以跑在 OS X 和 Linux 上了)。并且,微软与 Linux 公司合作把最流行的发型版本放到了Azure平台上。事实上,微软已经走的如此之远以至于要为Azure数据中心开发自己的Linux发行版了。 - -另一方面,微软继续直接通过法律或者傀儡公司来对开源项目进行攻击。很明显,微软在与自由软件的所有权较量上并没有发自内心的进行大的道德转变。那为什么要公开生命对Linux的钟爱之情呢? - -一个显而易见的事实:微软是一个经营性实体。对股东来说是一个投资工具,对雇员来说是收入来源。微软所做的只有一个终极目标:盈利。微软并没有表现出来爱或者恨(尽管这是一个最常见的指控)。 - -所以问题不应该是"微软真的爱 Linux 吗?"相反,我们应该问,微软是怎么从这一切中获利的。 - -让我们以 .NET 核心框架的开源发行为例。这一举动使得任何平台都很容易进入 .NET 的运行时环境。这使得微软的.NET框架所涉及到的范围远远大于Windows平台。 - -开放 .NET 的核心包,最终使得 .NET 开发者开发跨平台的app成为可能,比如OS X,Linux甚至安卓——都基于同一个核心代码库。 - -从开发者角度来讲,这使得.NET框架比之前更有吸引力了。能够从单一的代码库就可以触及到多个平台,使得使用.NET框架开发的任何app戏剧性的扩大了潜在的目标市场。 - -另外,一个强大的开源社区能够提供给开发者一些代码来在他们自己的项目中进行服用。所以,开源项目的可利用性也将会成就.NET框架。 - -更进一步讲,开放 .NET 的核心代码能够减少跨越不同平台锁产生的碎片,意味着对消费者来说有对app更广的选择。无论是开源软件还是专用的app,都有更多的选择。 - -从微软的角度来讲,会得到一队开发者大军。微软可以通过销售培训、证书、技术支持、开发者工具(包括Visual Studio)和应用扩展来获利。 - -我们应该自问的是,这对自由软件社区有利还是有弊? - -.NET 框架的大范围适用意味着许多参与竞争的开源项目的消亡,迫使我们会跟着微软的节奏走下去。 - -先抛开.NET不谈,微软正在花费大量的精力在Linux对Azure云计算平台的支持上。要记得,Azure最初是Windows的Azure。Windows服务器是唯一能够支持Azure的操作系统。今天,Azure也提供了对多个Linux发行版的支持。 - -关于此,有一个原因:付费给需要或者想要Linux服务的顾客。如果微软不提供Linux虚拟机,那些顾客就会跟别人合作了。 - -看上去好像是微软意识到"Linux就在这里"的这样一个现实。微软不能真正的消灭它,所以必须接收它。 - -这又把我们带回到那个问题:关于微软和Linux为什么有这么多的流言?我们在谈论这个问题,因为微软希望我们思考这个问题。毕竟,所有这些谈资都会追溯到微软,不管是在新闻稿、博客还是会议上的公开声明。微软在努力吸引大家对其在Linux专业知识方面的注意力。 - -首席架构师 Kamala Subramaniam 的博文声明Azure Cloud Switch背后的其他企图会是什么?ACS是一个定制的Linux发行版。微软用它来对Azure数据中心的开关硬件进行自动配置。 - -ACS不是公开的。它是用于Azure内部使用的。别人也不太可能找到这个发行版其他的用途。事实上,Subramaniam 在她的博文中也表述了同样的观点。 - -所以,微软不会通过卖ACS来获利,也不会因为放弃使用而获得一个用户基础。相反,微软在Linux和Azure上花费经历,加强其在Linux云计算平台方面的地位。 - -微软最近迷上Linux对社区来说是好消息吗? - -我们不应该慢慢忘记微软的"拥抱、扩展、消灭"的诅咒。现在,微软处在拥抱Linux的初期阶段。微软会通过定制扩展和专有标准来分裂社区吗? - -赶紧评论吧,让我们知道你是怎么想的。 - --------------------------------------------------------------------------------- - -via: http://www.linuxjournal.com/content/microsoft-and-linux-true-romance-or-toxic-love-0 - -作者:[James Darvell][a] -译者:[sonofelice](https://github.com/sonofelice) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/users/james-darvell \ No newline at end of file From ba4100d39716ccde39113ca3ac7d8f693f6837a9 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 5 Apr 2016 09:44:30 +0800 Subject: [PATCH 1228/1710] [translating]8 things to do after installing openSUSE Leap --- ...151202 8 things to do after installing openSUSE Leap 42.1.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md index b941c3d611..8456c9c46a 100644 --- a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md +++ b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md @@ -1,3 +1,5 @@ +alim0x translating + 8 things to do after installing openSUSE Leap 42.1 ================================================================================ ![Credit: Metropolitan Transportation/Flicrk](http://images.techhive.com/images/article/2015/11/things-to-do-100626947-primary.idge.jpg) From 15bb9c838be97deee426b5d3fac707e34e785772 Mon Sep 17 00:00:00 2001 From: pengkai Date: Tue, 5 Apr 2016 12:38:43 +0800 Subject: [PATCH 1229/1710] kylepeng93 is translating --- .../20160225 How to add open source experience to your resume.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160225 How to add open source experience to your resume.md b/sources/tech/20160225 How to add open source experience to your resume.md index 73e22c2b8b..8a3a3e09cf 100644 --- a/sources/tech/20160225 How to add open source experience to your resume.md +++ b/sources/tech/20160225 How to add open source experience to your resume.md @@ -1,3 +1,4 @@ +kylepeng93 is translating!!! How to add open source experience to your resume ================================================== From 2469f5580888e36b1934243e0da51a7d8bb038ea Mon Sep 17 00:00:00 2001 From: Zhengyu_Li Date: Tue, 5 Apr 2016 21:33:55 +0800 Subject: [PATCH 1230/1710] Update 20160218 A Linux-powered microwave oven.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [翻译中]20160218 A Linux-powered microwave oven.md --- sources/tech/20160218 A Linux-powered microwave oven.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 A Linux-powered microwave oven.md b/sources/tech/20160218 A Linux-powered microwave oven.md index 109212ad14..47db1ae9d6 100644 --- a/sources/tech/20160218 A Linux-powered microwave oven.md +++ b/sources/tech/20160218 A Linux-powered microwave oven.md @@ -1,3 +1,4 @@ +translating by yuba0604 A Linux-powered microwave oven ================================================================================ From 0bdd4580470df8a137f28f55bd04699a87213b80 Mon Sep 17 00:00:00 2001 From: alim0x Date: Wed, 6 Apr 2016 21:38:24 +0800 Subject: [PATCH 1231/1710] [translated]8 things to do after installing openSUSE Leap --- ... do after installing openSUSE Leap 42.1.md | 110 ------------------ ... do after installing openSUSE Leap 42.1.md | 108 +++++++++++++++++ 2 files changed, 108 insertions(+), 110 deletions(-) delete mode 100644 sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md create mode 100644 translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md diff --git a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md deleted file mode 100644 index 8456c9c46a..0000000000 --- a/sources/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md +++ /dev/null @@ -1,110 +0,0 @@ -alim0x translating - -8 things to do after installing openSUSE Leap 42.1 -================================================================================ -![Credit: Metropolitan Transportation/Flicrk](http://images.techhive.com/images/article/2015/11/things-to-do-100626947-primary.idge.jpg) -Credit: [Metropolitan Transportation/Flicrk][1] - -> You've installed openSUSE on your PC. Here's what to do next. - -[openSUSE Leap is indeed a huge leap][2], allowing users to run a distro that has the same DNA of SUSE Linux Enterprise. Like any other operating system, some work is needed to get it set up for optimal use. - -Following are some of the things that I did after installing openSUSE Leap on my PC (these are not applicable for server installations). None of them are mandatory, and you may be fine with the basic install. But if you need more out of your openSUSE Leap, follow me. - -### 1. Adding Packman repository ### - -Due to software patents and licences, openSUSE, like many Linux distributions, doesn't offer many applications, codecs, and drivers through official repositories (repos). Instead, these are made available through 3rd party or community repos. The first and most important repository is 'Packman'. Since these repos are not enabled by default, we have to add them. You can do so either using YaST (one of the gems of openSUSE) or by command line (instructions below). - -![o42 yast repo](http://images.techhive.com/images/article/2015/11/o42-yast-repo-100626952-large970.idge.png) -Adding Packman repositories. - -Using YaST, go to the Software Repositories section. Click on the 'Add’ button and select 'Community Repositories.' Click 'next.' And once the repos are loaded, select the Packman Repository. Click 'OK,' then import the trusted GnuPG key by clicking on the 'Trust' button. - -Or, using the terminal you can add and enable the Packman repo using the following command: - - zypper ar -f -n packmanhttp://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_42.1/ packman - -Once the repo is added, you have access to many more packages. To install any application or package, open YaST Software Manager, search for the package and install it. - -### 2. Install VLC ### - -VLC is the Swiss Army knife of media players and can play virtually any media file. You can install VLC from YaST Software Manager or from software.opensuse.org. You will need to install two packages: vlc and vlc-codecs. - -If using terminal, run the following command: - - sudo zypper install vlc vlc-codecs - -### 3. Install Handbrake ### - -If you need to transcode or convert your video files from one format to another, [Handbrake is the tools for you][3]. Handbrake is available through repositories we enabled, so just search for it in YaST and install. - -If you are using the terminal, run the following command: - - sudo zypper install handbrake-cli handbrake-gtk - -(Pro tip: VLC can also transcode audio and video files.) - -### 4. Install Chrome ### - -OpenSUSE comes with Firefox as the default browser. But since Firefox isn't capable of playing restricted media such as Netflix, I recommend installing Chrome. This takes some extra work. First you need to import the trusted key from Google. Open the terminal app and run the 'wget' command to download the key: - - wget https://dl.google.com/linux/linux_signing_key.pub - -Then import the key: - - sudo rpm --import linux_signing_key.pub - -Now head over to the [Google Chrome website][4] and download the 64 bit .rpm file. Once downloaded run the following command to install the browser: - - sudo zypper install /PATH_OF_GOOGLE_CHROME.rpm - -### 5. Install Nvidia drivers ### - -OpenSUSE Leap will work out of the box even if you have Nvidia or ATI graphics cards. However, if you do need the proprietary drivers for gaming or any other purpose, you can install such drivers, but some extra work is needed. - -First you need to add the Nvidia repositories; it's the same procedure we used to add Packman repositories using YaST. The only difference is that you will choose Nvidia from the Community Repositories section. Once it's added, go to **Software Management > Extras** and select 'Extras/Install All Matching Recommended Packages'. - -![o42 nvidia](http://images.techhive.com/images/article/2015/11/o42-nvidia-100626950-large.idge.png) - -It will open a dialogue box showing all the packages it's going to install, click OK and follow the instructions. You can also run the following command after adding the Nvidia repository to install the needed Nvidia drivers: - - sudo zypper inr - -(Note: I have never used AMD/ATI cards so I have no experience with them.) - -### 6. Install media codecs ### - -Once you have VLC installed you won't need to install media codecs, but if you are using other apps for media playback you will need to install such codecs. Some developers have written scripts/tools which makes it a much easier process. Just go to [this page][5] and install the entire pack by clicking on the appropriate button. It will open YaST and install the packages automatically (of source you will have to give the root password and trust the GnuPG key, as usual). - -### 7. Install your preferred email client ### - -OpenSUSE comes with Kmail or Evolution, depending on the Desktop Environment you installed on the system. I run Plasma, which comes with Kmail, and this email client leaves a lot to be desired. I suggest trying Thunderbird or Evolution mail. All major email clients are available through official repositories. You can also check my [handpicked list of the best email clients for Linux][7]. - -### 8. Enable Samba services from Firewall ### - -OpenSUSE offers a much more secure system out of the box, compared to other distributions. But it also requires a little bit more work for a new user. If you are using Samba protocol to share files within your local network then you will have to allow that service from the Firewall. - -![o42 firewall](http://images.techhive.com/images/article/2015/11/o42-firewall-100626948-large970.idge.png) -Allow Samba Client and Server from Firewall settings. - -Open YaST and search for Firewall. Once in Firewall settings, go to 'Allowed Services' where you will see a drop down list under 'Service to allow.' Select 'Samba Client,' then click 'Add.' Do the same with the 'Samba Server' option. Once both are added, click 'Next,' then click 'Finish,' and now you will be able to share folders from your openSUSE system and also access other machines over the local network. - -That's pretty much all that I did on my new openSUSE system to set it up just the way I like it. If you have any questions, please feel free to ask in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.itworld.com/article/3003865/open-source-tools/8-things-to-do-after-installing-opensuse-leap-421.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://www.flickr.com/photos/mtaphotos/11200079265/ -[2]:https://www.linux.com/news/software/applications/865760-opensuse-leap-421-review-the-most-mature-linux-distribution -[3]:https://www.linux.com/learn/tutorials/857788-how-to-convert-videos-in-linux-using-the-command-line -[4]:https://www.google.com/intl/en/chrome/browser/desktop/index.html#brand=CHMB&utm_campaign=en&utm_source=en-ha-na-us-sk&utm_medium=ha -[5]:http://opensuse-community.org/ -[6]:http://www.itworld.com/article/2875981/the-5-best-open-source-email-clients-for-linux.html diff --git a/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md new file mode 100644 index 0000000000..109bf6c11d --- /dev/null +++ b/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md @@ -0,0 +1,108 @@ +装好 openSUSE Leap 42.1 之后要做的 8 件事 +================================================================================ +![Credit: Metropolitan Transportation/Flicrk](http://images.techhive.com/images/article/2015/11/things-to-do-100626947-primary.idge.jpg) +致谢:[Metropolitan Transportation/Flicrk][1] + +> 你已经在你的电脑上安装了 openSUSE。这是你接下来要做的。 + +[openSUSE Leap 确实是个巨大的飞跃][2],它允许用户运行一个和 SUSE Linux 企业版拥有一样基因的发行版。和其它系统一样,在使用它之前需要做些优化设置。 + +下面是一些我在安装 openSUSE 到我的电脑上之后做的一些事情(不适用于服务器)。这里面没有强制性要求的设置,基本安装对来说你也可能足够了。但如果你想获得更好的 openSUSE Leap 体验,那就跟着我往下看吧。 + +### 1. 添加 Packman 仓库 ### + +由于专利和授权等原因,openSUSE 和许多 Linux 发行版一样,不通过官方仓库(repos)提供一些软件,解码器,以及驱动等。取而代之的是通过第三方或社区仓库来提供。第一个也是最重要的仓库是“Packman”。因为这些仓库不是默认启用的,我们需要添加它们。你可以通过 YaST (openSUSE 的特色之一)或者命令行完成(如下方介绍)。 + +![o42 yast repo](http://images.techhive.com/images/article/2015/11/o42-yast-repo-100626952-large970.idge.png) +添加 Packman 仓库。 + +使用 YsST,打开软件源部分。点击“添加”按钮并选择“社区仓库(Community Repositories)”。点击“下一步”。一旦仓库列表加载出来了,选择 Packman 仓库。点击“确认”,然后点击“信任”导入信任的 GnuPG 密钥。 + +或者在终端里使用以下命令添加并启用 Packman 仓库: + + zypper ar -f -n packmanhttp://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_42.1/ packman + +仓库添加之后,你就能接触到更多的包了。想安装任意软件或包,打开 YaST 软件管理器,搜索并安装即可。 + +### 2. 安装 VLC ### + +VLC 是媒体播放器里的瑞士军刀,几乎可以播放任何媒体文件。你可以从 YaST 软件管理器 或 software.opensuse.org 安装 VLC。你需要安装两个包:vlc 和 vlc-codecs。 + +如果你用终端,运行以下命令: + + sudo zypper install vlc vlc-codecs + +### 3. 安装 Handbrake ### + +如果你需要转码或转换视频文件格式,[Handbrake 是你的不二之选][3]。Handbrake 就在我们启用的仓库中,所以只要在 YaST 中搜索并安装它。 + +如果你用终端,运行以下命令: + + sudo zypper install handbrake-cli handbrake-gtk + +(提示:VLC 也能转码音频和视频文件。) + +### 4. 安装 Chrome ### + +openSUSE 的默认浏览器是 Firefox。但是因为 Firefox 不能胜任播放专有媒体,比如 Netflix,我推荐安装 Chrome。这需要额外的工作。首先你需要从谷歌导入信任密钥。打开终端执行“wget”命令下载密钥: + + wget https://dl.google.com/linux/linux_signing_key.pub + +然后导入密钥: + + sudo rpm --import linux_signing_key.pub + +现在到 [Google Chrome 网站][4] 去,下载 64 位 .rpm 文件。下载完成后执行以下命令安装浏览器: + + sudo zypper install /PATH_OF_GOOGLE_CHROME.rpm + +### 5. 安装 Nvidia 驱动 ### + +即便你有 Nvidia 或 ATI 显卡,openSUSE Leap 也能够开箱即用。但是,如果你需要专有驱动来游戏或其它目的,你可以安装这些驱动,但需要一点额外的工作。 + +首先你需要添加 Nvidia 源;它的步骤和使用 YaST 添加 Packman 仓库是一样的。唯一的不同是你需要在社区仓库部分选择 Nvidia。添加好了之后,到 **软件管理 > 附加** 去并选择“附加/安装所有匹配的推荐包”。 + +![o42 nvidia](http://images.techhive.com/images/article/2015/11/o42-nvidia-100626950-large.idge.png) + +它会打开一个对话框,显示所有将要安装的包,点击确认后按介绍操作。添加了 Nvidia 源之后你也可以通过命令安装需要的 Nvidia 驱动: + + sudo zypper inr + +(注:我没使用过 AMD/ATI 显卡,所以这方面我没有经验。) + +### 6. 安装媒体解码器 ### + +你安装 VLC 之后就不需要安装媒体解码器了,但如果你要使用其它软件来播放媒体的话就需要安装了。一些开发者写了脚本/工具来简化这个过程。打开[这个页面][5]并点击合适的按钮安装完整的包。他会打开 YaST 并自动安装包(当然通常你还需要提供 root 权限密码并信任 GnuPG 密钥)。 + +### 7. 安装你偏好的电子邮件客户端 ### + +openSUSE 自带 Kmail 或 Evolution,这取决于你安装的桌面环境。我用的是 Plasma,自带 Kmail,这个邮件客户端还有许多地方有待改进。我建议可以试试 Thunderbird 或 Evolution。所有主要的邮件客户端都能在官方仓库找到。你还可以看看我的[精心挑选的 Linux 最佳邮件客户端][7]。 + +### 8. 在防火墙允许 Samba 服务 ### + +相比于其它发行版,openSUSE 默认提供了更加安全的系统。但对新用户来说它也需要一点设置。如果你正在使用 Samba 协议分享文件到本地网络的话,你需要在防火墙允许该服务。 + +![o42 firewall](http://images.techhive.com/images/article/2015/11/o42-firewall-100626948-large970.idge.png) +在防火墙设置里允许 Samba 客户端和服务端 + +打开 YaST 并搜索 Firewall。在防火墙设置里,到“允许的服务”那里你会在“要允许的服务”下面看到一个下拉列表。选择“Samba 客户端”,然后点击“添加”。对“Samba 服务端”也一样地添加。都添加了之后,点击“下一步”,然后点击“完成”,现在你就可以通过本地网络从你的 openSUSE 分享文件以及访问其它机器了。 + +这差不多就是我以我喜欢的方式对我的新 openSUSE 系统做的所有设置了。如果你有任何问题,欢迎在评论区提问。 + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/3003865/open-source-tools/8-things-to-do-after-installing-opensuse-leap-421.html + +作者:[Swapnil Bhartiya][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者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://www.flickr.com/photos/mtaphotos/11200079265/ +[2]:https://www.linux.com/news/software/applications/865760-opensuse-leap-421-review-the-most-mature-linux-distribution +[3]:https://www.linux.com/learn/tutorials/857788-how-to-convert-videos-in-linux-using-the-command-line +[4]:https://www.google.com/intl/en/chrome/browser/desktop/index.html#brand=CHMB&utm_campaign=en&utm_source=en-ha-na-us-sk&utm_medium=ha +[5]:http://opensuse-community.org/ +[6]:http://www.itworld.com/article/2875981/the-5-best-open-source-email-clients-for-linux.html From 7ee00c44b04f30c5b7c3f08fbd82e9310aaa4b54 Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 7 Apr 2016 22:38:15 +0800 Subject: [PATCH 1232/1710] =?UTF-8?q?[=E9=80=89=E9=A2=98=E5=B9=B6=E7=BF=BB?= =?UTF-8?q?=E8=AF=91]20160405=20Ubuntu=20Budgie=20Could=20Be=20the=20New?= =?UTF-8?q?=20Flavor=20of=20Ubuntu=20Linux,=20as=20Part=20of=20Ubuntu=2016?= =?UTF-8?q?.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...f Ubuntu Linux, as Part of Ubuntu 16.10.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sources/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md diff --git a/sources/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md b/sources/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md new file mode 100644 index 0000000000..de815c9f67 --- /dev/null +++ b/sources/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md @@ -0,0 +1,44 @@ +alim0x translating + +Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10 +=== + +> The Beta 2 of Budgie-Remix is now ready for testing. + +Last month we told you about a new GNU/Linux distribution called [Budgie-Remix][1], whose ultimate goal is to become an official Ubuntu Linux flavor, possibly under the name of Ubuntu Budgie. + +Today, Budgie-Remix developer David Mohammed informs Softpedia about the progress made with the project, which Canonical founder [Mark Shuttleworth said][2] that it would definitely support if there were a community around the packaging, as well as the availability of the second Beta build for the upcoming 16.04 release. + +Since our [initial report][3], it looks like David Mohammed managed to get in contact with the Ubuntu MATE project leader Martin Wimpress, who urged him to target Ubuntu 16.10 for an official status of his soon-to-be-named Ubuntu flavor built on top of the Budgie desktop environment created by the amazing team of developers from [Solus][4]. + +"We've hit Beta 2 this week with lots of goodies and also we have the support of Martin Wimpress (Ubuntu MATE project leader)," said David Mohammed exclusively for Softpedia. "He has urged us to target 16.10 for official status - that is certainly a major challenge - and we need the community to help out/join us to make this happen!" + +### Ubuntu Budgie 16.10 might see the light of day in October 2016 ### + +On April 21, Canonical will release the next LTS (Long Term Support) release of Ubuntu Linux, the Xenial Xerus a.k.a. Ubuntu 16.04, and we might be able to get an early taste of what could become the official Ubuntu Budgie flavor, as Budgie-Remix 16.04. But until then, you can help the developer [test drive the Beta 2 release][5]. + +Immediately after the release of Ubuntu 16.04 LTS (Xenial Xerus), the Ubuntu developers will concentrate all of their efforts on the next version, Ubuntu 16.10, which should arrive later this year, sometimes at the end of October, and Ubuntu Budgie 16.10 might also be announced as an official Ubuntu flavor. + +![Budgie-Remix 16.04 Beta 2](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-2.jpg) + +![Budgie Applications Menu](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-3.jpg) + +![Budgie Raven notification and customization center](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-4.jpg) + +![Nautilus file manager](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-5.jpg) + +---------------------------------- + +via: http://news.softpedia.com/news/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573.shtml + +作者:Marius Nestor +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://launchpad.net/budgie-remix +[2]: https://plus.google.com/+programmerslab/posts/CSvbSvgcdcv +[3]: http://news.softpedia.com/news/budgie-remix-could-become-ubuntu-budgie-download-and-test-it-501231.shtml +[4]: https://solus-project.com/ +[5]: https://sourceforge.net/projects/budgie-remix/files/beta2/ From dcf3d4c941a30731a1f164a36968c8b4a883216e Mon Sep 17 00:00:00 2001 From: alim0x Date: Fri, 8 Apr 2016 21:50:21 +0800 Subject: [PATCH 1233/1710] [translated]buntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10 --- ...f Ubuntu Linux, as Part of Ubuntu 16.10.md | 44 ------------------- ...f Ubuntu Linux, as Part of Ubuntu 16.10.md | 43 ++++++++++++++++++ 2 files changed, 43 insertions(+), 44 deletions(-) delete mode 100644 sources/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md create mode 100644 translated/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md diff --git a/sources/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md b/sources/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md deleted file mode 100644 index de815c9f67..0000000000 --- a/sources/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md +++ /dev/null @@ -1,44 +0,0 @@ -alim0x translating - -Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10 -=== - -> The Beta 2 of Budgie-Remix is now ready for testing. - -Last month we told you about a new GNU/Linux distribution called [Budgie-Remix][1], whose ultimate goal is to become an official Ubuntu Linux flavor, possibly under the name of Ubuntu Budgie. - -Today, Budgie-Remix developer David Mohammed informs Softpedia about the progress made with the project, which Canonical founder [Mark Shuttleworth said][2] that it would definitely support if there were a community around the packaging, as well as the availability of the second Beta build for the upcoming 16.04 release. - -Since our [initial report][3], it looks like David Mohammed managed to get in contact with the Ubuntu MATE project leader Martin Wimpress, who urged him to target Ubuntu 16.10 for an official status of his soon-to-be-named Ubuntu flavor built on top of the Budgie desktop environment created by the amazing team of developers from [Solus][4]. - -"We've hit Beta 2 this week with lots of goodies and also we have the support of Martin Wimpress (Ubuntu MATE project leader)," said David Mohammed exclusively for Softpedia. "He has urged us to target 16.10 for official status - that is certainly a major challenge - and we need the community to help out/join us to make this happen!" - -### Ubuntu Budgie 16.10 might see the light of day in October 2016 ### - -On April 21, Canonical will release the next LTS (Long Term Support) release of Ubuntu Linux, the Xenial Xerus a.k.a. Ubuntu 16.04, and we might be able to get an early taste of what could become the official Ubuntu Budgie flavor, as Budgie-Remix 16.04. But until then, you can help the developer [test drive the Beta 2 release][5]. - -Immediately after the release of Ubuntu 16.04 LTS (Xenial Xerus), the Ubuntu developers will concentrate all of their efforts on the next version, Ubuntu 16.10, which should arrive later this year, sometimes at the end of October, and Ubuntu Budgie 16.10 might also be announced as an official Ubuntu flavor. - -![Budgie-Remix 16.04 Beta 2](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-2.jpg) - -![Budgie Applications Menu](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-3.jpg) - -![Budgie Raven notification and customization center](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-4.jpg) - -![Nautilus file manager](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-5.jpg) - ----------------------------------- - -via: http://news.softpedia.com/news/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573.shtml - -作者:Marius Nestor -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]: https://launchpad.net/budgie-remix -[2]: https://plus.google.com/+programmerslab/posts/CSvbSvgcdcv -[3]: http://news.softpedia.com/news/budgie-remix-could-become-ubuntu-budgie-download-and-test-it-501231.shtml -[4]: https://solus-project.com/ -[5]: https://sourceforge.net/projects/budgie-remix/files/beta2/ diff --git a/translated/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md b/translated/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md new file mode 100644 index 0000000000..899d8b5920 --- /dev/null +++ b/translated/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md @@ -0,0 +1,43 @@ +Ubuntu Budgie 将在 Ubuntu 16.10 中成为新官方分支发行版 +=== + +> Budgie-Remix Beta 2 已经就绪以供测试。 + +上个月我们介绍了一个新 GNU/Linux 发行版 [Budgie-Remix][1],它的终极目标是成为一个 Ubuntu 官方分支发行版,可能会使用 Ubuntu Budgie 这个名字。 + +![Budgie-Remix 16.04 Beta 2](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-2.jpg) + +今天,Budgie-Remix 的开发者 David Mohammed 向 Softpedia 通报了项目进度,以及为即将到来的 16.04 发布的第二个 Beta 版本。Cononical 的创始人 [Mark Shuttleworth 说过][2]如果能够有围绕这个包的社区,它肯定会得到支持。 + +自我们[最初的报道][3]以来,David Mohammed 似乎与 Ubuntu MATE 项目的领导者 Martin Wimpress 取得了联系,后者敦促他以 Ubuntu 16.10 作为他还未正式命名的 Ubuntu 分支的官方版本目标。这个分支发行版构建于 Budgie 桌面环境之上,它是超赞的 [Solus][4] 开发者团队创建的。 + +“我们本周完成了 Beta 2 版本的开发以及很多其它东西,而且我们还有 Martin Wimpress (Ubuntu MATE 项目领导者)的支持,”David Mohammed 对 Softpedia 独家爆料。”他还敦促我们以 16.10 作为成为官方版本的目标——那当然是个主要的挑战——并且我们还需要社区的帮助/加入我们来让这一切成为现实!” + +### Ubuntu Budgie 16.10 可能在 2016 年 10 月到来 ### + +4 月 21 日,Canonical 将会发布 Ubuntu Linux 的下一个 LTS(Long Term Support,长期支持)版本,Xenial Xerus 好客的非洲地松鼠,也就是 Ubuntu 16.04,并且我们有可能能够以 Budgie-Remix 16.04 的名义提前尝试将成为官方分支的 Ubuntu Budgie。但在那之前,你可以帮助开发者[测试 Beta 2 版本][5]。 + +在 Ubuntu 16.04 LTS(Xenial Xerus)发布之后,Ubuntu 的开发者们就会立即将注意力转移到下一个版本的开发上。下一个版本 Ubuntu 16.10 应该会在 10 月底到来,并且 Ubuntu Budgie 也可能宣布成为 Ubuntu 官方分支发行版。 + + +![Budgie Applications Menu](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-3.jpg) + +![Budgie Raven notification and customization center](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-4.jpg) + +![Nautilus file manager](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-5.jpg) + +---------------------------------- + +via: http://news.softpedia.com/news/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573.shtml + +作者:Marius Nestor +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://launchpad.net/budgie-remix +[2]: https://plus.google.com/+programmerslab/posts/CSvbSvgcdcv +[3]: http://news.softpedia.com/news/budgie-remix-could-become-ubuntu-budgie-download-and-test-it-501231.shtml +[4]: https://solus-project.com/ +[5]: https://sourceforge.net/projects/budgie-remix/files/beta2/ From fd96b979145bf084aeaefc9d3bd5724e4a1bc1c0 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 10 Apr 2016 21:28:22 +0800 Subject: [PATCH 1234/1710] =?UTF-8?q?20160410-1=20=E9=80=89=E9=A2=98LFCS?= =?UTF-8?q?=E4=B8=93=E9=A2=9811?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gcreate, lvcreate and lvextend Commands.md | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 sources/tech/LFCS/Part 11 - How to Manage and Create LVM Using vgcreate, lvcreate and lvextend Commands.md diff --git a/sources/tech/LFCS/Part 11 - How to Manage and Create LVM Using vgcreate, lvcreate and lvextend Commands.md b/sources/tech/LFCS/Part 11 - How to Manage and Create LVM Using vgcreate, lvcreate and lvextend Commands.md new file mode 100644 index 0000000000..4d2a9d7a13 --- /dev/null +++ b/sources/tech/LFCS/Part 11 - How to Manage and Create LVM Using vgcreate, lvcreate and lvextend Commands.md @@ -0,0 +1,206 @@ +Part 11 - How to Manage and Create LVM Using vgcreate, lvcreate and lvextend Commands +============================================================================================ + +Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Manage-LVM-and-Create-LVM-Partition-in-Linux.png) +>LFCS: Manage LVM and Create LVM Partition – Part 11 + +One of the most important decisions while installing a Linux system is the amount of storage space to be allocated for system files, home directories, and others. If you make a mistake at that point, growing a partition that has run out of space can be burdensome and somewhat risky. + +**Logical Volumes Management** (also known as **LVM**), which have become a default for the installation of most (if not all) Linux distributions, have numerous advantages over traditional partitioning management. Perhaps the most distinguishing feature of LVM is that it allows logical divisions to be resized (reduced or increased) at will without much hassle. + +The structure of the LVM consists of: + +* One or more entire hard disks or partitions are configured as physical volumes (PVs). +* A volume group (**VG**) is created using one or more physical volumes. You can think of a volume group as a single storage unit. +* Multiple logical volumes can then be created in a volume group. Each logical volume is somewhat equivalent to a traditional partition – with the advantage that it can be resized at will as we mentioned earlier. + +In this article we will use three disks of **8 GB** each (**/dev/sdb**, **/dev/sdc**, and **/dev/sdd**) to create three physical volumes. You can either create the PVs directly on top of the device, or partition it first. + +Although we have chosen to go with the first method, if you decide to go with the second (as explained in [Part 4 – Create Partitions and File Systems in Linux][3] of this series) make sure to configure each partition as type `8e`. + +### Creating Physical Volumes, Volume Groups, and Logical Volumes + +To create physical volumes on top of **/dev/sdb**, **/dev/sdc**, and **/dev/sdd**, do: + +``` +# pvcreate /dev/sdb /dev/sdc /dev/sdd +``` + +You can list the newly created PVs with: + +``` +# pvs +``` + +and get detailed information about each PV with: + +``` +# pvdisplay /dev/sdX +``` + +(where **X** is b, c, or d) + +If you omit `/dev/sdX` as parameter, you will get information about all the PVs. + +To create a volume group named `vg00` using `/dev/sdb` and `/dev/sdc` (we will save `/dev/sdd` for later to illustrate the possibility of adding other devices to expand storage capacity when needed): + +``` +# vgcreate vg00 /dev/sdb /dev/sdc +``` + +As it was the case with physical volumes, you can also view information about this volume group by issuing: + +``` +# vgdisplay vg00 +``` + +Since `vg00` is formed with two **8 GB** disks, it will appear as a single **16 GB** drive: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/List-LVM-Volume-Groups.png) +>List LVM Volume Groups + +When it comes to creating logical volumes, the distribution of space must take into consideration both current and future needs. It is considered good practice to name each logical volume according to its intended use. + +For example, let’s create two LVs named `vol_projects` (**10 GB**) and `vol_backups` (remaining space), which we can use later to store project documentation and system backups, respectively. + +The `-n` option is used to indicate a name for the LV, whereas `-L` sets a fixed size and `-l` (lowercase L) is used to indicate a percentage of the remaining space in the container VG. + +``` +# lvcreate -n vol_projects -L 10G vg00 +# lvcreate -n vol_backups -l 100%FREE vg00 +``` + +As before, you can view the list of LVs and basic information with: + +``` +# lvs +``` + +and detailed information with + +``` +# lvdisplay +``` + +To view information about a single **LV**, use **lvdisplay** with the **VG** and **LV** as parameters, as follows: + +``` +# lvdisplay vg00/vol_projects +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/List-Logical-Volume.png) +>List Logical Volume + +In the image above we can see that the LVs were created as storage devices (refer to the LV Path line). Before each logical volume can be used, we need to create a filesystem on top of it. + +We’ll use ext4 as an example here since it allows us both to increase and reduce the size of each LV (as opposed to xfs that only allows to increase the size): + +``` +# mkfs.ext4 /dev/vg00/vol_projects +# mkfs.ext4 /dev/vg00/vol_backups +``` + +In the next section we will explain how to resize logical volumes and add extra physical storage space when the need arises to do so. + +### Resizing Logical Volumes and Extending Volume Groups + +Now picture the following scenario. You are starting to run out of space in `vol_backups`, while you have plenty of space available in `vol_projects`. Due to the nature of LVM, we can easily reduce the size of the latter (say **2.5 GB**) and allocate it for the former, while resizing each filesystem at the same time. + +Fortunately, this is as easy as doing: + +``` +# lvreduce -L -2.5G -r /dev/vg00/vol_projects +# lvextend -l +100%FREE -r /dev/vg00/vol_backups +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Resize-Reduce-Logical-Volume-and-Volume-Group.png) +>Resize Reduce Logical Volume and Volume Group + +It is important to include the minus `(-)` or plus `(+)` signs while resizing a logical volume. Otherwise, you’re setting a fixed size for the LV instead of resizing it. + +It can happen that you arrive at a point when resizing logical volumes cannot solve your storage needs anymore and you need to buy an extra storage device. Keeping it simple, you will need another disk. We are going to simulate this situation by adding the remaining PV from our initial setup (`/dev/sdd`). + +To add `/dev/sdd` to `vg00`, do + +``` +# vgextend vg00 /dev/sdd +``` + +If you run vgdisplay `vg00` before and after the previous command, you will see the increase in the size of the VG: + +``` +# vgdisplay vg00 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/List-Volume-Group-Size.png) +>Check Volume Group Disk Size + +Now you can use the newly added space to resize the existing LVs according to your needs, or to create additional ones as needed. + +### Mounting Logical Volumes on Boot and on Demand + +Of course there would be no point in creating logical volumes if we are not going to actually use them! To better identify a logical volume we will need to find out what its `UUID` (a non-changing attribute that uniquely identifies a formatted storage device) is. + +To do that, use blkid followed by the path to each device: + +``` +# blkid /dev/vg00/vol_projects +# blkid /dev/vg00/vol_backups +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Logical-Volume-UUID.png) +>Find Logical Volume UUID + +Create mount points for each LV: + +``` +# mkdir /home/projects +# mkdir /home/backups +``` + +and insert the corresponding entries in `/etc/fstab` (make sure to use the UUIDs obtained before): + +``` +UUID=b85df913-580f-461c-844f-546d8cde4646 /home/projects ext4 defaults 0 0 +UUID=e1929239-5087-44b1-9396-53e09db6eb9e /home/backups ext4 defaults 0 0 +``` + +Then save the changes and mount the LVs: + +``` +# mount -a +# mount | grep home +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Logical-Volume-UUID.png) +>Find Logical Volume UUID + +When it comes to actually using the LVs, you will need to assign proper `ugo+rwx` permissions as explained in [Part 8 – Manage Users and Groups in Linux][4] of this series. + +### Summary + +In this article we have introduced [Logical Volume Management][5], a versatile tool to manage storage devices that provides scalability. When combined with RAID (which we explained in [Part 6 – Create and Manage RAID in Linux][6] of this series), you can enjoy not only scalability (provided by LVM) but also redundancy (offered by RAID). + +In this type of setup, you will typically find `LVM` on top of `RAID`, that is, configure RAID first and then configure LVM on top of it. + +If you have questions about this article, or suggestions to improve it, feel free to reach us using the comment 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/installing-network-services-and-configuring-services-at-system-boot/ +[3]: http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ +[4]: http://www.tecmint.com/manage-users-and-groups-in-linux/ +[5]: http://www.tecmint.com/create-lvm-storage-in-linux/ +[6]: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/ From 6fc8994f8a28d1849acc1c29dacfc2f678f14394 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 10 Apr 2016 21:42:46 +0800 Subject: [PATCH 1235/1710] =?UTF-8?q?20160410-2=20=E9=80=89=E9=A2=98LFCS?= =?UTF-8?q?=E4=B8=93=E9=A2=9812?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Installed Help Documentations and Tools.md | 180 ++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 sources/tech/LFCS/Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools.md diff --git a/sources/tech/LFCS/Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools.md b/sources/tech/LFCS/Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools.md new file mode 100644 index 0000000000..45ccb57f95 --- /dev/null +++ b/sources/tech/LFCS/Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools.md @@ -0,0 +1,180 @@ +Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools +================================================================================== + +Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Explore-Linux-with-Documentation-and-Tools.png) +>LFCS: Explore Linux with Installed Documentations and Tools – Part 12 + +Once you get used to working with the command line and feel comfortable doing so, you realize that a regular Linux installation includes all the documentation you need to use and configure the system. + +Another good reason to become familiar with command line help tools is that in the [LFCS][3] and [LFCE][4] exams, those are the only sources of information you can use – no internet browsing and no googling. It’s just you and the command line. + +For that reason, in this article we will give you some tips to effectively use the installed docs and tools in order to prepare to pass the **Linux Foundation Certification** exams. + +### Linux Man Pages + +A man page, short for manual page, is nothing less and nothing more than what the word suggests: a manual for a given tool. It contains the list of options (with explanation) that the command supports, and some man pages even include usage examples as well. + +To open a man page, use the **man command** followed by the name of the tool you want to learn more about. For example: + +``` +# man diff +``` + +will open the manual page for `diff`, a tool used to compare text files line by line (to exit, simply hit the q key.). + +Let’s say we want to compare two text files named `file1` and `file2` in Linux. These files contain the list of packages that are installed in two Linux boxes with the same distribution and version. + +Doing a `diff` between `file1` and `file2` will tell us if there is a difference between those lists: + +``` +# diff file1 file2 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Compare-Two-Text-Files-in-Linux.png) +>Compare Two Text Files in Linux + +where the `<` sign indicates lines missing in `file2`. If there were lines missing in `file1`, they would be indicated by the `>` sign instead. + +On the other hand, **7d6** means line **#7** in file should be deleted in order to match `file2` (same with **24d22** and **41d38**), and 65,67d61 tells us we need to remove lines **65** through **67** in file one. If we make these corrections, both files will then be identical. + +Alternatively, you can display both files side by side using the `-y` option, according to the man page. You may find this helpful to more easily identify missing lines in files: + +``` +# diff -y file1 file2 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Compare-and-List-Difference-of-Two-Files.png) +>Compare and List Difference of Two Files + +Also, you can use `diff` to compare two binary files. If they are identical, `diff` will exit silently without output. Otherwise, it will return the following message: “**Binary files X and Y differ**”. + +### The –help Option + +The `--help` option, available in many (if not all) commands, can be considered a short manual page for that specific command. Although it does not provide a comprehensive description of the tool, it is an easy way to obtain information on the usage of a program and a list of its available options at a quick glance. + +For example, + +``` +# sed --help +``` + +shows the usage of each option available in sed (the stream editor). + +One of the classic examples of using `sed` consists of replacing characters in files. Using the `-i` option (described as “**edit files in place**”), you can edit a file without opening it. If you want to make a backup of the original contents as well, use the `-i` option followed by a SUFFIX to create a separate file with the original contents. + +For example, to replace each occurrence of the word `Lorem` with `Tecmint` (case insensitive) in `lorem.txt` and create a new file with the original contents of the file, do: + +``` +# less lorem.txt | grep -i lorem +# sed -i.orig 's/Lorem/Tecmint/gI' lorem.txt +# less lorem.txt | grep -i lorem +# less lorem.txt.orig | grep -i lorem +``` + +Please note that every occurrence of `Lorem` has been replaced with `Tecmint` in `lorem.txt`, and the original contents of `lorem.txt` has been saved to `lorem.txt.orig`. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Replace-A-String-in-File.png) +>Replace A String in Files + +### Installed Documentation in /usr/share/doc + +This is probably my favorite pick. If you go to `/usr/share/doc` and do a directory listing, you will see lots of directories with the names of the installed tools in your Linux system. + +According to the [Filesystem Hierarchy Standard][5], these directories contain useful information that might not be in the man pages, along with templates and configuration files to make configuration easier. + +For example, let’s consider `squid-3.3.8` (version may vary from distribution to distribution) for the popular HTTP proxy and [squid cache server][6]. + +Let’s `cd` into that directory: + +``` +# cd /usr/share/doc/squid-3.3.8 +``` + +and do a directory listing: + +``` +# ls +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/List-Files-in-Linux.png) +>Linux Directory Listing with ls Command + +You may want to pay special attention to `QUICKSTART` and `squid.conf.documented`. These files contain an extensive documentation about Squid and a heavily commented configuration file, respectively. For other packages, the exact names may differ (as **QuickRef** or **00QUICKSTART**, for example), but the principle is the same. + +Other packages, such as the Apache web server, provide configuration file templates inside `/usr/share/doc`, that will be helpful when you have to configure a standalone server or a virtual host, to name a few cases. + +### GNU info Documentation + +You can think of info documents as man pages on steroids. As such, they not only provide help for a specific tool, but also they do so with hyperlinks (yes, hyperlinks in the command line!) that allow you to navigate from a section to another using the arrow keys and Enter to confirm. + +Perhaps the most illustrative example is: + +``` +# info coreutils +``` + +Since coreutils contains the [basic file, shell and text manipulation utilities][7] which are expected to exist on every operating system, you can reasonably expect a detailed description for each one of those categories in info **coreutils**. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Info-Coreutils.png) +>Info Coreutils + +As it is the case with man pages, you can exit an info document by pressing the `q` key. + +Additionally, GNU info can be used to display regular man pages as well when followed by the tool name. For example: + +``` +# info tune2fs +``` + +will return the man page of **tune2fs**, the ext2/3/4 filesystems management tool. + +And now that we’re at it, let’s review some of the uses of **tune2fs**: + +Display information about the filesystem on top of **/dev/mapper/vg00-vol_backups**: + +``` +# tune2fs -l /dev/mapper/vg00-vol_backups +``` + +Set a filesystem volume name (Backups in this case): + +``` +# tune2fs -L Backups /dev/mapper/vg00-vol_backups +``` + +Change the check intervals and `/` or mount counts (use the `-c` option to set a number of mount counts and `/` or the `-i` option to set a check interval, where **d=days, w=weeks, and m=months**). + +``` +# tune2fs -c 150 /dev/mapper/vg00-vol_backups # Check every 150 mounts +# tune2fs -i 6w /dev/mapper/vg00-vol_backups # Check every 6 weeks +``` + +All of the above options can be listed with the `--help` option, or viewed in the man page. + +### Summary + +Regardless of the method that you choose to invoke help for a given tool, knowing that they exist and how to use them will certainly come in handy in the exam. Do you know of any other tools that can be used to look up documentation? Feel free to share with the Tecmint community using the form below. + +Questions and other comments are more than welcome as well. + +-------------------------------------------------------------------------------- + +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/installing-network-services-and-configuring-services-at-system-boot/ +[3]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[4]: http://www.tecmint.com/installing-network-services-and-configuring-services-at-system-boot/ +[5]: http://www.tecmint.com/linux-directory-structure-and-important-files-paths-explained/ +[6]: http://www.tecmint.com/configure-squid-server-in-linux/ +[7]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[8]: From 7f58906e36bdd46682bfa8712b2a259985a466e8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 10 Apr 2016 21:59:21 +0800 Subject: [PATCH 1236/1710] =?UTF-8?q?20160410-3=20=E9=80=89=E9=A2=98LFCS?= =?UTF-8?q?=E4=B8=93=E9=A2=9813?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...leshoot Grand Unified Bootloader (GRUB).md | 185 ++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 sources/tech/LFCS/Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md diff --git a/sources/tech/LFCS/Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md b/sources/tech/LFCS/Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md new file mode 100644 index 0000000000..cf24c51b58 --- /dev/null +++ b/sources/tech/LFCS/Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md @@ -0,0 +1,185 @@ +Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB) +===================================================================================== + +Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Configure-Troubleshoot-Grub-Boot-Loader.png) +>LFCS: Configure and Troubleshoot Grub Boot Loader – Part 13 + +In this article we will introduce you to GRUB and explain why a boot loader is necessary, and how it adds versatility to the system. + +The [Linux boot process][3] from the time you press the power button of your computer until you get a fully-functional system follows this high-level sequence: + +* 1. A process known as **POST** (**Power-On Self Test**) performs an overall check on the hardware components of your computer. +* 2. When **POST** completes, it passes the control over to the boot loader, which in turn loads the Linux kernel in memory (along with **initramfs**) and executes it. The most used boot loader in Linux is the **GRand Unified Boot loader**, or **GRUB** for short. +* 3. The kernel checks and accesses the hardware, and then runs the initial process (mostly known by its generic name “**init**”) which in turn completes the system boot by starting services. + +In Part 7 of this series (“[SysVinit, Upstart, and Systemd][4]”) we introduced the [service management systems and tools][5] used by modern Linux distributions. You may want to review that article before proceeding further. + +### Introducing GRUB Boot Loader + +Two major **GRUB** versions (**v1** sometimes called **GRUB Legacy** and **v2**) can be found in modern systems, although most distributions use **v2** by default in their latest versions. Only **Red Hat Enterprise Linux 6** and its derivatives still use **v1** today. + +Thus, we will focus primarily on the features of **v2** in this guide. + +Regardless of the **GRUB** version, a boot loader allows the user to: + +* 1). modify the way the system behaves by specifying different kernels to use, +* 2). choose between alternate operating systems to boot, and +* 3). add or edit configuration stanzas to change boot options, among other things. + +Today, **GRUB** is maintained by the **GNU** project and is well documented in their website. You are encouraged to use the [GNU official documentation][6] while going through this guide. + +When the system boots you are presented with the following **GRUB** screen in the main console. Initially, you are prompted to choose between alternate kernels (by default, the system will boot using the latest kernel) and are allowed to enter a **GRUB** command line (with `c`) or edit the boot options (by pressing the `e` key). + +![](http://www.tecmint.com/wp-content/uploads/2016/03/GRUB-Boot-Screen.png) +>GRUB Boot Screen + +One of the reasons why you would consider booting with an older kernel is a hardware device that used to work properly and has started “acting up” after an upgrade (refer to [this link][7] in the AskUbuntu forums for an example). + +The **GRUB v2** configuration is read on boot from `/boot/grub/grub.cfg` or `/boot/grub2/grub.cfg`, whereas `/boot/grub/grub.conf` or `/boot/grub/menu.lst` are used in **v1**. These files are NOT to be edited by hand, but are modified based on the contents of `/etc/default/grub` and the files found inside `/etc/grub.d`. + +In a **CentOS 7**, here’s the configuration file that is created when the system is first installed: + +``` +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" +GRUB_DEFAULT=saved +GRUB_DISABLE_SUBMENU=true +GRUB_TERMINAL_OUTPUT="console" +GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet" +GRUB_DISABLE_RECOVERY="true" +``` + +In addition to the online documentation, you can also find the GNU GRUB manual using info as follows: + +``` +# info grub +``` + +If you’re interested specifically in the options available for /etc/default/grub, you can invoke the configuration section directly: + +``` +# info -f grub -n 'Simple configuration' +``` + +Using the command above you will find out that `GRUB_TIMEOUT` sets the time between the moment when the initial screen appears and the system automatic booting begins unless interrupted by the user. When this variable is set to `-1`, boot will not be started until the user makes a selection. + +When multiple operating systems or kernels are installed in the same machine, `GRUB_DEFAULT` requires an integer value that indicates which OS or kernel entry in the GRUB initial screen should be selected to boot by default. The list of entries can be viewed not only in the splash screen shown above, but also using the following command: + +### In CentOS and openSUSE: + +``` +# awk -F\' '$1=="menuentry " {print $2}' /boot/grub2/grub.cfg +``` + +### In Ubuntu: + +``` +# awk -F\' '$1=="menuentry " {print $2}' /boot/grub/grub.cfg +``` + +In the example shown in the below image, if we wish to boot with the kernel version **3.10.0-123.el7.x86_64** (4th entry), we need to set `GRUB_DEFAULT` to `3` (entries are internally numbered beginning with zero) as follows: + +``` +GRUB_DEFAULT=3 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Boot-System-with-Old-Kernel-Version.png) +>Boot System with Old Kernel Version + +One final GRUB configuration variable that is of special interest is `GRUB_CMDLINE_LINUX`, which is used to pass options to the kernel. The options that can be passed through GRUB to the kernel are well documented in the [Kernel Parameters file][8] and in [man 7 bootparam][9]. + +Current options in my **CentOS 7** server are: + +``` +GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet" +``` + +Why would you want to modify the default kernel parameters or pass extra options? In simple terms, there may be times when you need to tell the kernel certain hardware parameters that it may not be able to determine on its own, or to override the values that it would detect. + +This happened to me not too long ago when I tried **Vector Linux**, a derivative of **Slackware**, on my 10-year old laptop. After installation it did not detect the right settings for my video card so I had to modify the kernel options passed through GRUB in order to make it work. + +Another example is when you need to bring the system to single-user mode to perform maintenance tasks. You can do this by appending the word single to `GRUB_CMDLINE_LINUX` and rebooting: + +``` +GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet single" +``` + +After editing `/etc/defalt/grub`, you will need to run `update-grub` (Ubuntu) or `grub2-mkconfig -o /boot/grub2/grub.cfg` (**CentOS** and **openSUSE**) afterwards to update `grub.cfg` (otherwise, changes will be lost upon boot). + +This command will process the boot configuration files mentioned earlier to update `grub.cfg`. This method ensures changes are permanent, while options passed through GRUB at boot time will only last during the current session. + +### Fixing Linux GRUB Issues + +If you install a second operating system or if your GRUB configuration file gets corrupted due to human error, there are ways you can get your system back on its feet and be able to boot again. + +In the initial screen, press `c` to get a GRUB command line (remember that you can also press `e` to edit the default boot options), and use help to bring the available commands in the GRUB prompt: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Fix-Grub-Issues-in-Linux.png) +>Fix Grub Configuration Issues in Linux + +We will focus on **ls**, which will list the installed devices and filesystems, and we will examine what it finds. In the image below we can see that there are 4 hard drives (`hd0` through `hd3`). + +Only `hd0` seems to have been partitioned (as evidenced by msdos1 and msdos2, where 1 and 2 are the partition numbers and msdos is the partitioning scheme). + +Let’s now examine the first partition on `hd0` (**msdos1**) to see if we can find GRUB there. This approach will allow us to boot Linux and there use other high level tools to repair the configuration file or reinstall GRUB altogether if it is needed: + +``` +# ls (hd0,msdos1)/ +``` + +As we can see in the highlighted area, we found the `grub2` directory in this partition: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Grub-Configuration.png) +>Find Grub Configuration + +Once we are sure that GRUB resides in (**hd0,msdos1**), let’s tell GRUB where to find its configuration file and then instruct it to attempt to launch its menu: + +``` +set prefix=(hd0,msdos1)/grub2 +set root=(hd0,msdos1) +insmod normal +normal +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-and-Launch-Grub-Menu.png) +>Find and Launch Grub Menu + +Then in the GRUB menu, choose an entry and press **Enter** to boot using it. Once the system has booted you can issue the `grub2-install /dev/sdX` command (change `sdX` with the device you want to install GRUB on). The boot information will then be updated and all related files be restored. + +``` +# grub2-install /dev/sdX +``` + +Other more complex scenarios are documented, along with their suggested fixes, in the [Ubuntu GRUB2 Troubleshooting guide][10]. The concepts explained there are valid for other distributions as well. + +### Summary + +In this article we have introduced you to GRUB, indicated where you can find documentation both online and offline, and explained how to approach an scenario where a system has stopped booting properly due to a bootloader-related issue. + +Fortunately, GRUB is one of the tools that is best documented and you can easily find help either in the installed docs or online using the resources we have shared in this article. + +Do you have questions or comments? Don’t hesitate to let us know using the comment form below. We look forward to hearing from you! + +-------------------------------------------------------------------------------- + +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/installing-network-services-and-configuring-services-at-system-boot/ +[3]: http://www.tecmint.com/linux-boot-process/ +[4]: http://www.tecmint.com/linux-boot-process-and-manage-services/ +[5]: http://www.tecmint.com/best-linux-log-monitoring-and-management-tools/ +[6]: http://www.gnu.org/software/grub/manual/ +[7]: http://askubuntu.com/questions/82140/how-can-i-boot-with-an-older-kernel-version +[8]: https://www.kernel.org/doc/Documentation/kernel-parameters.txt +[9]: http://man7.org/linux/man-pages/man7/bootparam.7.html +[10]: https://help.ubuntu.com/community/Grub2/Troubleshooting From a83f054b65978f85da496ee08d18961e8b51ae11 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 10 Apr 2016 22:17:13 +0800 Subject: [PATCH 1237/1710] =?UTF-8?q?20160410-4=20=E9=80=89=E9=A2=98LFCS?= =?UTF-8?q?=E4=B8=93=E9=A2=9814?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Set Process Limits on a Per-User Basis.md | 273 ++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md diff --git a/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md b/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md new file mode 100644 index 0000000000..82bb9b4a74 --- /dev/null +++ b/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md @@ -0,0 +1,273 @@ +Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis +============================================================================================= + +Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Linux-Process-Monitoring-Set-Process-Limits-Per-User.png) +>Monitor Linux Processes and Set Process Limits Per User – Part 14 + +Every Linux system administrator needs to know how to verify the integrity and availability of hardware, resources, and key processes. In addition, setting resource limits on a per-user basis must also be a part of his / her skill set. + +In this article we will explore a few ways to ensure that the system both hardware and the software is behaving correctly to avoid potential issues that may cause unexpected production downtime and money loss. + +### Linux Reporting Processors Statistics + +With **mpstat** you can view the activities for each processor individually or the system as a whole, both as a one-time snapshot or dynamically. + +In order to use this tool, you will need to install **sysstat**: + +``` +# yum update && yum install sysstat [On CentOS based systems] +# aptitutde update && aptitude install sysstat [On Ubuntu based systems] +# zypper update && zypper install sysstat [On openSUSE systems] +``` + +Read more about sysstat and it’s utilities at [Learn Sysstat and Its Utilities mpstat, pidstat, iostat and sar in Linux][3] + +Once you have installed **mpstat**, use it to generate reports of processors statistics. + +To display **3** global reports of CPU utilization (`-u`) for all CPUs (as indicated by `-P` ALL) at a 2-second interval, do: + +``` +# mpstat -P ALL -u 2 3 +``` + +### Sample Output + +``` +Linux 3.19.0-32-generic (tecmint.com) Wednesday 30 March 2016 _x86_64_ (4 CPU) + +11:41:07 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +11:41:09 IST all 5.85 0.00 1.12 0.12 0.00 0.00 0.00 0.00 0.00 92.91 +11:41:09 IST 0 4.48 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 94.53 +11:41:09 IST 1 2.50 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 97.00 +11:41:09 IST 2 6.44 0.00 0.99 0.00 0.00 0.00 0.00 0.00 0.00 92.57 +11:41:09 IST 3 10.45 0.00 1.99 0.00 0.00 0.00 0.00 0.00 0.00 87.56 + +11:41:09 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +11:41:11 IST all 11.60 0.12 1.12 0.50 0.00 0.00 0.00 0.00 0.00 86.66 +11:41:11 IST 0 10.50 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 88.50 +11:41:11 IST 1 14.36 0.00 1.49 2.48 0.00 0.00 0.00 0.00 0.00 81.68 +11:41:11 IST 2 2.00 0.50 1.00 0.00 0.00 0.00 0.00 0.00 0.00 96.50 +11:41:11 IST 3 19.40 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 79.60 + +11:41:11 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +11:41:13 IST all 5.69 0.00 1.24 0.00 0.00 0.00 0.00 0.00 0.00 93.07 +11:41:13 IST 0 2.97 0.00 1.49 0.00 0.00 0.00 0.00 0.00 0.00 95.54 +11:41:13 IST 1 10.78 0.00 1.47 0.00 0.00 0.00 0.00 0.00 0.00 87.75 +11:41:13 IST 2 2.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 97.00 +11:41:13 IST 3 6.93 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 92.57 + +Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +Average: all 7.71 0.04 1.16 0.21 0.00 0.00 0.00 0.00 0.00 90.89 +Average: 0 5.97 0.00 1.16 0.00 0.00 0.00 0.00 0.00 0.00 92.87 +Average: 1 9.24 0.00 1.16 0.83 0.00 0.00 0.00 0.00 0.00 88.78 +Average: 2 3.49 0.17 1.00 0.00 0.00 0.00 0.00 0.00 0.00 95.35 +Average: 3 12.25 0.00 1.16 0.00 0.00 0.00 0.00 0.00 0.00 86.59 +``` + +To view the same statistics for a specific **CPU** (**CPU 0** in the following example), use: + +``` +# mpstat -P 0 -u 2 3 +``` + +### Sample Output + +``` +Linux 3.19.0-32-generic (tecmint.com) Wednesday 30 March 2016 _x86_64_ (4 CPU) + +11:42:08 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +11:42:10 IST 0 3.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 96.50 +11:42:12 IST 0 4.08 0.00 0.00 2.55 0.00 0.00 0.00 0.00 0.00 93.37 +11:42:14 IST 0 9.74 0.00 0.51 0.00 0.00 0.00 0.00 0.00 0.00 89.74 +Average: 0 5.58 0.00 0.34 0.85 0.00 0.00 0.00 0.00 0.00 93.23 +``` + +The output of the above commands shows these columns: + +* `CPU`: Processor number as an integer, or the word all as an average for all processors. +* `%usr`: Percentage of CPU utilization while running user level applications. +* `%nice`: Same as `%usr`, but with nice priority. +* `%sys`: Percentage of CPU utilization that occurred while executing kernel applications. This does not include time spent dealing with interrupts or handling hardware. +* `%iowait`: Percentage of time when the given CPU (or all) was idle, during which there was a resource-intensive I/O operation scheduled on that CPU. A more detailed explanation (with examples) can be found [here][4]. +* `%irq`: Percentage of time spent servicing hardware interrupts. +* `%soft`: Same as `%irq`, but with software interrupts. +* `%steal`: Percentage of time spent in involuntary wait (steal or stolen time) when a virtual machine, as guest, is “winning” the hypervisor’s attention while competing for the CPU(s). This value should be kept as small as possible. A high value in this field means the virtual machine is stalling – or soon will be. +* `%guest`: Percentage of time spent running a virtual processor. +* `%idle`: percentage of time when CPU(s) were not executing any tasks. If you observe a low value in this column, that is an indication of the system being placed under a heavy load. In that case, you will need to take a closer look at the process list, as we will discuss in a minute, to determine what is causing it. + +To put the place the processor under a somewhat high load, run the following commands and then execute mpstat (as indicated) in a separate terminal: + +``` +# dd if=/dev/zero of=test.iso bs=1G count=1 +# mpstat -u -P 0 2 3 +# ping -f localhost # Interrupt with Ctrl + C after mpstat below completes +# mpstat -u -P 0 2 3 +``` + +Finally, compare to the output of **mpstat** under “normal” circumstances: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Report-Processors-Related-Statistics.png) +>Report Linux Processors Related Statistics + +As you can see in the image above, **CPU 0** was under a heavy load during the first two examples, as indicated by the `%idle` column. + +In the next section we will discuss how to identify these resource-hungry processes, how to obtain more information about them, and how to take appropriate action. + +### Reporting Linux Processes + +To list processes sorting them by CPU usage, we will use the well known `ps` command with the `-eo` (to select all processes with user-defined format) and `--sort` (to specify a custom sorting order) options, like so: + +``` +# ps -eo pid,ppid,cmd,%cpu,%mem --sort=-%cpu +``` + +The above command will only show the `PID`, `PPID`, the command associated with the process, and the percentage of CPU and RAM usage sorted by the percentage of CPU usage in descending order. When executed during the creation of the .iso file, here’s the first few lines of the output: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Linux-Processes-By-CPU-Usage.png) +>Find Linux Processes By CPU Usage + +Once we have identified a process of interest (such as the one with `PID=2822`), we can navigate to `/proc/PID` (`/proc/2822` in this case) and do a directory listing. + +This directory is where several files and subdirectories with detailed information about this particular process are kept while it is running. + +#### For example: + +* `/proc/2822/io` contains IO statistics for the process (number of characters and bytes read and written, among others, during IO operations). +* `/proc/2822/attr/current` shows the current SELinux security attributes of the process. +* `/proc/2822/cgroup` describes the control groups (cgroups for short) to which the process belongs if the CONFIG_CGROUPS kernel configuration option is enabled, which you can verify with: + +``` +# cat /boot/config-$(uname -r) | grep -i cgroups +``` + +If the option is enabled, you should see: + +``` +CONFIG_CGROUPS=y +``` + +Using `cgroups` you can manage the amount of allowed resource usage on a per-process basis as explained in Chapters 1 through 4 of the [Red Hat Enterprise Linux 7 Resource Management guide][5], in Chapter 9 of the [openSUSE System Analysis and Tuning guide][6], and in the [Control Groups section of the Ubuntu 14.04 Server documentation][7]. + +The `/proc/2822/fd` is a directory that contains one symbolic link for each file descriptor the process has opened. The following image shows this information for the process that was started in tty1 (the first terminal) to create the **.iso** image: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Linux-Process-Information.png) +>Find Linux Process Information + +The above image shows that **stdin** (file descriptor **0**), **stdout** (file descriptor **1**), and **stderr** (file descriptor **2**) are mapped to **/dev/zero**, **/root/test.iso**, and **/dev/tty1**, respectively. + +More information about `/proc` can be found in “The `/proc` filesystem” document kept and maintained by Kernel.org, and in the Linux Programmer’s Manual. + +### Setting Resource Limits on a Per-User Basis in Linux + +If you are not careful and allow any user to run an unlimited number of processes, you may eventually experience an unexpected system shutdown or get locked out as the system enters an unusable state. To prevent this from happening, you should place a limit on the number of processes users can start. + +To do this, edit **/etc/security/limits.conf** and add the following line at the bottom of the file to set the limit: + +``` +* hard nproc 10 +``` + +The first field can be used to indicate either a user, a group, or all of them `(*)`, whereas the second field enforces a hard limit on the number of process (nproc) to **10**. To apply changes, logging out and back in is enough. + +Thus, let’s see what happens if a certain user other than root (either a legitimate one or not) attempts to start a shell fork bomb. If we had not implemented limits, this would initially launch two instances of a function, and then duplicate each of them in a neverending loop. Thus, it would eventually bringing your system to a crawl. + +However, with the above restriction in place, the fork bomb does not succeed but the user will still get locked out until the system administrator kills the process associated with it: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Shell-Fork-Bomb.png) +>Run Shell Fork Bomb + +**TIP**: Other possible restrictions made possible by **ulimit** are documented in the `limits.conf` file. + +### Linux Other Process Management Tools + +In addition to the tools discussed previously, a system administrator may also need to: + +**a)** Modify the execution priority (use of system resources) of a process using **renice**. This means that the kernel will allocate more or less system resources to the process based on the assigned priority (a number commonly known as “**niceness**” in a range from `-20` to `19`). + +The lower the value, the greater the execution priority. Regular users (other than root) can only modify the niceness of processes they own to a higher value (meaning a lower execution priority), whereas root can modify this value for any process, and may increase or decrease it. + +The basic syntax of renice is as follows: + +``` +# renice [-n] identifier +``` + +If the argument after the new priority value is not present (empty), it is set to PID by default. In that case, the niceness of process with **PID=identifier** is set to ``. + +**b)** Interrupt the normal execution of a process when needed. This is commonly known as [“killing” the process][9]. Under the hood, this means sending the process a signal to finish its execution properly and release any used resources in an orderly manner. + +To [kill a process][10], use the **kill** command as follows: + +``` +# kill PID +``` + +Alternatively, you can use [pkill to terminate all processes][11] of a given owner `(-u)`, or a group owner `(-G)`, or even those processes which have a PPID in common `(-P)`. These options may be followed by the numeric representation or the actual name as identifier: + +``` +# pkill [options] identifier +``` + +For example, + +``` +# pkill -G 1000 +``` + +will kill all processes owned by group with `GID=1000`. + +And, + +``` +# pkill -P 4993 +``` + +will kill all processes whose `PPID is 4993`. + +Before running a `pkill`, it is a good idea to test the results with `pgrep` first, perhaps using the `-l` option as well to list the processes’ names. It takes the same options but only returns the PIDs of processes (without taking any further action) that would be killed if `pkill` is used. + +``` +# pgrep -l -u gacanepa +``` + +This is illustrated in the next image: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/List-User-Running-Processes.png) +>Find User Running Processes in Linux + +### Summary + +In this article we have explored a few ways to monitor resource usage in order to verify the integrity and availability of critical hardware and software components in a Linux system. + +We have also learned how to take appropriate action (either by adjusting the execution priority of a given process or by terminating it) under unusual circumstances. + +We hope the concepts explained in this tutorial have been helpful. If you have any questions or comments, feel free to reach us using the contact 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/installing-network-services-and-configuring-services-at-system-boot/ +[3]: http://www.tecmint.com/sysstat-commands-to-monitor-linux/ +[4]: http://veithen.github.io/2013/11/18/iowait-linux.html +[5]: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Resource_Management_Guide/index.html +[6]: https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.cgroups.html +[7]: https://help.ubuntu.com/lts/serverguide/cgroups.html +[8]: http://man7.org/linux/man-pages/man5/proc.5.html +[9]: http://www.tecmint.com/kill-processes-unresponsive-programs-in-ubuntu/ +[10]: http://www.tecmint.com/find-and-kill-running-processes-pid-in-linux/ +[11]: http://www.tecmint.com/how-to-kill-a-process-in-linux/ From cd50e7545fa5c1a368c103bdecb66bbf45198d1e Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 11 Apr 2016 09:15:12 +0800 Subject: [PATCH 1238/1710] PUB:Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux @GHLandy --- ...work Samba and NFS Filesystems in Linux.md | 66 ++++++++----------- 1 file changed, 28 insertions(+), 38 deletions(-) rename {translated/tech => published}/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md (76%) diff --git a/translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md b/published/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md similarity index 76% rename from translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md rename to published/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md index 1551f4de0c..50344e5da0 100644 --- a/translated/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md +++ b/published/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md @@ -1,22 +1,18 @@ -GHLandy Translated - LFCS 系列第五讲:如何在 Linux 中挂载/卸载本地文件系统和网络文件系统(Samba 和 NFS) - ================================================================================ -Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时上游团队请求支持的决策能力。 +Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时向上游团队请求支持的决策能力。 ![Linux Foundation Certified Sysadmin – Part 5](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-5.png) -LFCS 系列第五讲 +*LFCS 系列第五讲* 请看以下视频,这里边介绍了 Linux 基金会认证程序。 注:youtube 视频 -本讲是《十套教程》系列中的第三讲,在这一讲里边,我们会解释如何在 Linux 中挂载/卸载本地和网络文件系统。这些都是 LFCS 认证中的必备知识。 - +本讲是系列教程中的第五讲,在这一讲里边,我们会解释如何在 Linux 中挂载/卸载本地和网络文件系统。这些都是 LFCS 认证中的必备知识。 ### 挂载文件系统 ### @@ -26,20 +22,19 @@ LFCS 系列第五讲 换句话说,管理存储设备的第一步就是把设备关联到文件系统树。要完成这一步,通常可以这样:用 mount 命令来进行临时挂载(用完的时候,使用 umount 命令来卸载),或者通过编辑 /etc/fstab 文件之后重启系统来永久性挂载,这样每次开机都会进行挂载。 - 不带任何选项的 mount 命令,可以显示当前已挂载的文件系统。 # mount ![Check Mounted Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/check-mounted-filesystems.png) -检查已挂载的文件系统 +*检查已挂载的文件系统* 另外,mount 命令通常用来挂载文件系统。其基本语法如下: # mount -t type device dir -o options -该命令会指引内核在设备上找到的文件系统(如已格式化为指定类型的文件系统)挂载到指定目录。像这样的形式,mount 命令不会再到 /etc/fstab 文件中进行确认。 +该命令会指引内核将在设备上找到的文件系统(如已格式化为指定类型的文件系统)挂载到指定目录。像这样的形式,mount 命令不会再到 /etc/fstab 文件中进行确认。 除非像下面,挂载指定的目录或者设备: @@ -59,20 +54,17 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 读作: -设备 dev/mapper/debian-home 的格式为 ext4,挂载在 /home 下,并且有以下挂载选项: rw,relatime,user_xattr,barrier=1,data=ordered。 +设备 dev/mapper/debian-home 挂载在 /home 下,它被格式化为 ext4,并且有以下挂载选项: rw,relatime,user_xattr,barrier=1,data=ordered。 **mount 命令选项** 下面列出 mount 命令的常用选项 - -- async:运许在将要挂载的文件系统上进行异步 I/O 操作 -- auto:标志文件系统通过 mount -a 命令挂载,与 noauto 相反。 - -- defaults:该选项为 async,auto,dev,exec,nouser,rw,suid 的一个别名。注意,多个选项必须由逗号隔开并且中间没有空格。倘若你不小心在两个选项中间输入了一个空格,mount 命令会把后边的字符解释为另一个参数。 +- async:允许在将要挂载的文件系统上进行异步 I/O 操作 +- auto:标示该文件系统通过 mount -a 命令挂载,与 noauto 相反。 +- defaults:该选项相当于 `async,auto,dev,exec,nouser,rw,suid` 的组合。注意,多个选项必须由逗号隔开并且中间没有空格。倘若你不小心在两个选项中间输入了一个空格,mount 命令会把后边的字符解释为另一个参数。 - loop:将镜像文件(如 .iso 文件)挂载为 loop 设备。该选项可以用来模拟显示光盘中的文件内容。 - noexec:阻止该文件系统中可执行文件的执行。与 exec 选项相反。 - - nouser:阻止任何用户(除 root 用户外) 挂载或卸载文件系统。与 user 选项相反。 - remount:重新挂载文件系统。 - ro:只读模式挂载。 @@ -91,7 +83,7 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 ![Mount Device in Read Write Mode](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device-Read-Write.png) -可读写模式挂载设备 +*可读写模式挂载设备* **以默认模式挂载设备** @@ -102,26 +94,25 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 ![Mount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device.png) -挂载设备 +*挂载设备* 在这个例子中,我们发现写入文件和命令都完美执行了。 ### 卸载设备 ### -使用 umount 命令卸载设备,意味着将所有的“在使用”数据全部写入到文件系统了,然后可以安全移除文件系统。请注意,倘若你移除一个没有事先正确卸载的文件系统,就会有造成设备损坏和数据丢失的风险。 +使用 umount 命令卸载设备,意味着将所有的“在使用”数据全部写入到文件系统,然后可以安全移除文件系统。请注意,倘若你移除一个没有事先正确卸载的设备,就会有造成设备损坏和数据丢失的风险。 -也就是说,你必须设备的盘符或者挂载点中退出,才能卸载设备。换言之,当前工作目录不能是需要卸载设备的挂载点。否则,系统将返回设备繁忙的提示信息。 +也就是说,你必须“离开”设备的块设备描述符或者挂载点,才能卸载设备。换言之,你的当前工作目录不能是需要卸载设备的挂载点。否则,系统将返回设备繁忙的提示信息。 ![Unmount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Unmount-Device.png) -卸载设备 +*卸载设备* 离开需卸载设备的挂载点最简单的方法就是,运行不带任何选项的 cd 命令,这样会回到当前用户的家目录。 - ### 挂载常见的网络文件系统 ### -最常用的两种网络文件系统是 SMB(Server Message Block,服务器消息块)和 NFS(Network File System,网络文件系统)。如果你只向类 Unix 客户端提供共享,用 NFS 就可以了,如果是向 Windows 和其他类 Unix客户端提供共享服务,就需要用到 Samba 了。 +最常用的两种网络文件系统是 SMB(Server Message Block,服务器消息块)和 NFS(Network File System,网络文件系统)。如果你只向类 Unix 客户端提供共享,用 NFS 就可以了,如果是向 Windows 和其他类 Unix 客户端提供共享服务,就需要用到 Samba 了。 扩展阅读 @@ -130,13 +121,13 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 下面的例子中,假设 Samba 和 NFS 已经在地址为 192.168.0.10 的服务器上架设好了(请注意,架设 NFS 服务器也是 LFCS 考试中需要考核的能力,我们会在后边中提到)。 - #### 在 Linux 中挂载 Samba 共享 #### 第一步:在 Red Hat 以 Debian 系发行版中安装 samba-client、samba-common 和 cifs-utils 软件包,如下: # yum update && yum install samba-client samba-common cifs-utils # aptitude update && aptitude install samba-client samba-common cifs-utils + 然后运行下列命令,查看服务器上可用的 Samba 共享。 # smbclient -L 192.168.0.10 @@ -145,7 +136,7 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 ![Mount Samba Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Samba-Share.png) -挂载 Samba 共享 +*挂载 Samba 共享* 上图中,已经对可以挂载到我们本地系统上的共享进行高亮显示。你只需要与一个远程服务器上的合法用户名及密码就可以访问共享了。 @@ -164,7 +155,7 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 ![Mount Password Protect Samba Share](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Password-Protect-Samba-Share.png) -挂载有密码保护的 Samba 共享 +*挂载有密码保护的 Samba 共享* #### 在 Linux 系统中挂载 NFS 共享 #### @@ -185,7 +176,7 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 ![Mount NFS Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-NFS-Share.png) -挂载 NFS 共享 +*挂载 NFS 共享* ### 永久性挂载文件系统 ### @@ -197,13 +188,12 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 其中: -- : 第一个字段指定挂载的设备。大多数发行版本都通过分区的标卷(label)或者 UUID 来指定。这样做可以避免分区号改变是带来的错误。 -- : 第二字段指定挂载点。 -- :文件系统的类型代码与 mount 命令挂载文件系统时使用的类型代码是一样的。通过 auto 类型代码可以让内核自动检测文件系统,这对于可移动设备来说非常方便。注意,该选项可能不是对所有文件系统可用。 -- : 一个(或多个)挂载选项。 -- : 你可能把这个字段设置为 0(否则设置为 1),使得系统启动时禁用 dump 工具(dump 程序曾经是一个常用的备份工具,但现在越来越少用了)对文件系统进行备份。 - -- : 这个字段指定启动系统是是否通过 fsck 来检查文件系统的完整性。0 表示 fsck 不对文件系统进行检查。数字越大,优先级越低。因此,根分区(/)最可能使用数字 1,其他所有需要检查的分区则是以数字 2. +- \: 第一个字段指定挂载的设备。大多数发行版本都通过分区的标卷(label)或者 UUID 来指定。这样做可以避免分区号改变时带来的错误。 +- \: 第二个字段指定挂载点。 +- \ :文件系统的类型代码与 mount 命令挂载文件系统时使用的类型代码是一样的。通过 auto 类型代码可以让内核自动检测文件系统,这对于可移动设备来说非常方便。注意,该选项可能不是对所有文件系统可用。 +- \: 一个(或多个)挂载选项。 +- \: 你可能把这个字段设置为 0(否则设置为 1),使得系统启动时禁用 dump 工具(dump 程序曾经是一个常用的备份工具,但现在越来越少用了)对文件系统进行备份。 +- \: 这个字段指定启动系统是是否通过 fsck 来检查文件系统的完整性。0 表示 fsck 不对文件系统进行检查。数字越大,优先级越低。因此,根分区(/)最可能使用数字 1,其他所有需要检查的分区则是以数字 2. **Mount 命令例示** @@ -211,7 +201,7 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 LABEL=TECMINT /mnt ext4 rw,noexec 0 0 -2. 若你想在系统启动时挂载 DVD 光驱中的内容,添加已下语句。 +2. 若你想在系统启动时挂载 DVD 光驱中的内容,添加以下语句。 /dev/sr0 /media/cdrom0 iso9660 ro,user,noauto 0 0 @@ -219,7 +209,7 @@ mount 命令会尝试寻找挂载点,如果找不到就会查找设备(上 ### 总结 ### -可以放心,在命令行中挂载/卸载本地和网络文件系统将是你作为系统管理员的日常责任的一部分。同时,你需要掌握 /etc/fstab 文件的编写。希望本文对你有帮助。随时在下边发表评论(或者提问),并分享本文到你的朋友圈。 +不用怀疑,在命令行中挂载/卸载本地和网络文件系统将是你作为系统管理员的日常责任的一部分。同时,你需要掌握 /etc/fstab 文件的编写。希望本文对你有帮助。随时在下边发表评论(或者提问),并分享本文到你的朋友圈。 参考链接 @@ -234,7 +224,7 @@ via: http://www.tecmint.com/mount-filesystem-in-linux/ 作者:[Gabriel Cánepa][a] 译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 6fc772fea1e2a0709021e2b5a1f906437d3ee8a8 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 11 Apr 2016 09:15:47 +0800 Subject: [PATCH 1239/1710] PUB:20151028 10 Tips for 10x Application Performance @oska874 --- ...10 Tips for 10x Application Performance.md | 199 +++++++++--------- 1 file changed, 98 insertions(+), 101 deletions(-) diff --git a/translated/tech/20151028 10 Tips for 10x Application Performance.md b/translated/tech/20151028 10 Tips for 10x Application Performance.md index 55cd24bd9a..9641a2e546 100644 --- a/translated/tech/20151028 10 Tips for 10x Application Performance.md +++ b/translated/tech/20151028 10 Tips for 10x Application Performance.md @@ -1,208 +1,207 @@ -10 Tips for 10x Application Performance - 将程序性能提高十倍的10条建议 ================================================================================ -提高web 应用的性能从来没有比现在更关键过。网络经济的比重一直在增长;全球经济超过5% 的价值是在因特网上产生的(数据参见下面的资料)。我们的永远在线、超级连接的世界意味着用户的期望值也处于历史上的最高点。如果你的网站不能及时的响应,或者你的app 不能无延时的工作,用户会很快的投奔到你的竞争对手那里。 +提高 web 应用的性能从来没有比现在更重要过。网络经济的比重一直在增长;全球经济超过 5% 的价值是在因特网上产生的(数据参见下面的资料)。这个时刻在线的超连接世界意味着用户对其的期望值也处于历史上的最高点。如果你的网站不能及时的响应,或者你的 app 不能无延时的工作,用户会很快的投奔到你的竞争对手那里。 -举一个例子,一份亚马逊十年前做过的研究可以证明,甚至在那个时候,网页加载时间每减少100毫秒,收入就会增加1%。另一个最近的研究特别强调一个事实,即超过一半的网站拥有着在调查中说他们会因为应用程序性能的问题流失用户。 +举一个例子,一份亚马逊十年前做过的研究可以证明,甚至在那个时候,网页加载时间每减少100毫秒,收入就会增加1%。另一个最近的研究特别强调一个事实,即超过一半的网站拥有者在调查中承认它们会因为应用程序性能的问题流失用户。 -网站到底需要多块呢?对于页面加载,每增加1秒钟就有4%的用户放弃使用。顶级的电子商务站点的页面在第一次交互时可以做到1秒到3秒加载时间,而这是提供最高舒适度的速度。很明显这种利害关系对于web 应用来说很高,而且在不断的增加。 +网站到底需要多快呢?对于页面加载,每增加1秒钟就有4%的用户放弃使用。顶级的电子商务站点的页面在第一次交互时可以做到1秒到3秒加载时间,而这是提供最高舒适度的速度。很明显这种利害关系对于 web 应用来说很高,而且在不断的增加。 -想要提高效率很简单,但是看到实际结果很难。要在旅途上帮助你,这篇blog 会给你提供10条最高可以10倍的提升网站性能的建议。这是系列介绍提高应用程序性能的第一篇文章,包括测试充分的优化技术和一点NGIX 的帮助。这个系列给出了潜在的提高安全性的帮助。 +想要提高效率很简单,但是看到实际结果很难。为了在你的探索之旅上帮助到你,这篇文章会给你提供10条最高可以提升10倍网站性能的建议。这是系列介绍提高应用程序性能的第一篇文章,包括充分测试的优化技术和一点 NGINX 的帮助。这个系列也给出了潜在的提高安全性的帮助。 ### Tip #1: 通过反向代理来提高性能和增加安全性 ### -如果你的web 应用运行在单个机器上,那么这个办法会明显的提升性能:只需要添加一个更快的机器,更好的处理器,更多的内存,更快的磁盘阵列,等等。然后新机器就可以更快的运行你的WordPress 服务器, Node.js 程序, Java 程序,以及其它程序。(如果你的程序要访问数据库服务器,那么这个办法还是很简单:添加两个更快的机器,以及在两台电脑之间使用一个更快的链路。) +如果你的 web 应用运行在单个机器上,那么这个办法会明显的提升性能:只需要换一个更快的机器,更好的处理器,更多的内存,更快的磁盘阵列,等等。然后新机器就可以更快的运行你的 WordPress 服务器, Node.js 程序, Java 程序,以及其它程序。(如果你的程序要访问数据库服务器,那么解决方法依然很简单:添加两个更快的机器,以及在两台电脑之间使用一个更快的链路。) -问题是,机器速度可能并不是问题。web 程序运行慢经常是因为计算机一直在不同的任务之间切换:和用户的成千上万的连接,从磁盘访问文件,运行代码,等等。应用服务器可能会抖动-内存不足,将内存数据写会磁盘,以及多个请求等待一个任务完成,如磁盘I/O。 +问题是,机器速度可能并不是问题。web 程序运行慢经常是因为计算机一直在不同的任务之间切换:通过成千上万的连接和用户交互,从磁盘访问文件,运行代码,等等。应用服务器可能会抖动(thrashing)-比如说内存不足、将内存数据交换到磁盘,以及有多个请求要等待某个任务完成,如磁盘I/O。 -你可以采取一个完全不同的方案来替代升级硬件:添加一个反向代理服务器来分担部分任务。[反向代理服务器][1] 位于运行应用的机器的前端,是用来处理网络流量的。只有反向代理服务器是直接连接到互联网的;和程序的通讯都是通过一个快速的内部网络完成的。 +你可以采取一个完全不同的方案来替代升级硬件:添加一个反向代理服务器来分担部分任务。[反向代理服务器][1] 位于运行应用的机器的前端,是用来处理网络流量的。只有反向代理服务器是直接连接到互联网的;和应用服务器的通讯都是通过一个快速的内部网络完成的。 -使用反向代理服务器可以将应用服务器从等待用户与web 程序交互解放出来,这样应用服务器就可以专注于为反向代理服务器构建网页,让其能够传输到互联网上。而应用服务器就不需要在能带客户端的响应,可以运行与接近优化过的性能水平。 +使用反向代理服务器可以将应用服务器从等待用户与 web 程序交互解放出来,这样应用服务器就可以专注于为反向代理服务器构建网页,让其能够传输到互联网上。而应用服务器就不需要等待客户端的响应,其运行速度可以接近于优化后的性能水平。 -添加方向代理服务器还可以给你的web 服务器安装带来灵活性。比如,一个已知类型的服务器已经超载了,那么就可以轻松的添加另一个相同的服务器;如果某个机器宕机了,也可以很容易的被替代。 +添加反向代理服务器还可以给你的 web 服务器安装带来灵活性。比如,一个某种类型的服务器已经超载了,那么就可以轻松的添加另一个相同的服务器;如果某个机器宕机了,也可以很容易替代一个新的。 -因为反向代理带来的灵活性,所以方向代理也是一些性能加速功能的必要前提,比如: +因为反向代理带来的灵活性,所以反向代理也是一些性能加速功能的必要前提,比如: -- **负载均衡** (参见 [Tip #2][2]) – 负载均衡运行在方向代理服务器上,用来将流量均衡分配给一批应用。有了合适的负载均衡,你就可以在不改变程序的前提下添加应用服务器。 -- **缓存静态文件** (参见 [Tip #3][3]) – 直接读取的文件,比如图像或者代码,可以保存在方向代理服务器,然后直接发给客户端,这样就可以提高速度、分担应用服务器的负载,可以让应用运行的更快 -- **网站安全** – 反响代理服务器可以提高网站安全性,以及快速的发现和响应攻击,保证应用服务器处于被保护状态。 +- **负载均衡** (参见 [Tip #2][2]) – 负载均衡运行在反向代理服务器上,用来将流量均衡分配给一批应用。有了合适的负载均衡,你就可以添加应用服务器而根本不用修改应用。 +- **缓存静态文件** (参见 [Tip #3][3]) – 直接读取的文件,比如图片或者客户端代码,可以保存在反向代理服务器,然后直接发给客户端,这样就可以提高速度、分担应用服务器的负载,可以让应用运行的更快。 +- **网站安全** – 反向代理服务器可以提高网站安全性,以及快速的发现和响应攻击,保证应用服务器处于被保护状态。 -NGINX 软件是一个专门设计的反响代理服务器,也包含了上述的多种功能。NGINX 使用事件驱动的方式处理问题,着回避传统的服务器更加有效率。NGINX plus 天价了更多高级的反向代理特性,比如程序[健康度检查][4],专门用来处理request 路由,高级缓冲和相关支持。 +NGINX 软件为用作反向代理服务器而专门设计,也包含了上述的多种功能。NGINX 使用事件驱动的方式处理请求,这会比传统的服务器更加有效率。NGINX plus 添加了更多高级的反向代理特性,比如应用的[健康度检查][4],专门用来处理请求路由、高级缓冲和相关支持。 ![NGINX Worker Process helps increase application performance](https://www.nginx.com/wp-content/uploads/2015/10/Graph-11.png) ### Tip #2: 添加负载平衡 ### -添加一个[负载均衡服务器][5] 是一个相当简单的用来提高性能和网站安全性的的方法。使用负载均衡讲流量分配到多个服务器,是用来替代只使用一个巨大且高性能web 服务器的方案。即使程序写的不好,或者在扩容方面有困难,只使用负载均衡服务器就可以很好的提高用户体验。 +添加一个[负载均衡服务器][5] 是一个相当简单的用来提高性能和网站安全性的的方法。与其将核心 Web 服务器变得越来越大和越来越强,不如使用负载均衡将流量分配到多个服务器。即使程序写的不好,或者在扩容方面有困难,仅是使用负载均衡服务器就可以很好的提高用户体验。 -负载均衡服务器首先是一个反响代理服务器(参见[Tip #1][6])——它接收来自互联网的流量,然后转发请求给另一个服务器。小戏法是负载均衡服务器支持两个或多个应用服务器,使用[分配算法][7]将请求转发给不同服务器。最简单的负载均衡方法是轮转法,只需要将新的请求发给列表里的下一个服务器。其它的方法包括将请求发给负载最小的活动连接。NGINX plus 拥有将特定用户的会话分配给同一个服务器的[能力][8]. +负载均衡服务器首先是一个反向代理服务器(参见[Tip #1][6])——它接受来自互联网的流量,然后转发请求给另一个服务器。特别是负载均衡服务器支持两个或多个应用服务器,使用[分配算法][7]将请求转发给不同服务器。最简单的负载均衡方法是轮转法(round robin),每个新的请求都会发给列表里的下一个服务器。其它的复制均衡方法包括将请求发给活动连接最少的服务器。NGINX plus 拥有将特定用户的会话分配给同一个服务器的[能力][8]。 -负载均衡可以很好的提高性能是因为它可以避免某个服务器过载而另一些服务器却没有流量来处理。它也可以简单的扩展服务器规模,因为你可以添加多个价格相对便宜的服务器并且保证它们被充分利用了。 +负载均衡可以很好的提高性能是因为它可以避免某个服务器过载而另一些服务器却没有需要处理的流量。它也可以简单的扩展服务器规模,因为你可以添加多个价格相对便宜的服务器并且保证它们被充分利用了。 -可以进行负载均衡的协议包括HTTP, HTTPS, SPDY, HTTP/2, WebSocket,[FastCGI][9],SCGI,uwsgi, memcached,以及集中其它的应用类型,包括采用TCP 第4层协议的程序。分析你的web 应用来决定那些你要使用以及那些地方的性能不足。 +可以进行负载均衡的协议包括 HTTP、HTTPS、SPDY、HTTP/2、WebSocket、[FastCGI][9]、SCGI、uwsgi、 memcached 等,以及几种其它的应用类型,包括基于 TCP 的应用和其它的第4层协议的程序。分析你的 web 应用来决定你要使用哪些以及哪些地方性能不足。 -相同的服务器或服务器群可以被用来进行负载均衡,也可以用来处理其它的任务,如SSL 终止,提供对客户端使用的HTTP/1/x 和 HTTP/2 ,以及缓存静态文件。 +相同的服务器或服务器群可以被用来进行负载均衡,也可以用来处理其它的任务,如 SSL 末端服务器,支持客户端的 HTTP/1.x 和 HTTP/2 请求,以及缓存静态文件。 -NGINX 经常被用来进行负载均衡;要想了解更多的情况可以访问我们的[overview blog post][10], [configuration blog post][11], [ebook][12] 以及相关网站 [webinar][13], 和 [documentation][14]。我们的商业版本 [NGINX Plus][15] 支持更多优化了的负载均衡特性,如基于服务器响应时间的加载路由和Microsoft’s NTLM 协议上的负载均衡。 +NGINX 经常被用于进行负载均衡;要想了解更多的情况,可以下载我们的电子书 [选择软件负载均衡器的五个理由][10]。你也可以从 [使用 NGINX 和 NGINX Plus 配置负载均衡,第一部分][11] 中了解基本的配置指导,在 NGINX Plus 管理员指南中有完整的 [NGINX 负载均衡][12]的文档。。我们的商业版本 [NGINX Plus][15] 支持更多优化了的负载均衡特性,如基于服务器响应时间的加载路由和Microsoft’s NTLM 协议上的负载均衡。 ### Tip #3: 缓存静态和动态的内容 ### -缓存通过加速内容的传输速度来提高web 应用的性能。它可以采用一下集中策略:当需要的时候预处理要传输的内容,保存数据到速度更快的设备,把数据存储在距离客户端更近的位置,或者结合起来使用。 +缓存可以通过加速内容的传输速度来提高 web 应用的性能。它可以采用以下几种策略:当需要的时候预处理要传输的内容,保存数据到速度更快的设备,把数据存储在距离客户端更近的位置,或者将这几种方法结合起来使用。 -下面要考虑两种不同类型数据的缓冲: +有两种不同类型数据的缓冲: -- **静态内容缓存**。不经常变化的文件,比如图像(JPEG,PNG) 和代码(CSS,JavaScript),可以保存在边缘服务器,这样就可以快速的从内存和磁盘上提取。 -- **动态内容缓存**。很多web 应用回针对每个网页请求生成不同的HTML 页面。在短时间内简单的缓存每个生成HTML 内容,就可以很好的减少要生成的内容的数量,这完全可以达到你的要求。 +- **静态内容缓存**。不经常变化的文件,比如图像(JPEG、PNG) 和代码(CSS,JavaScript),可以保存在外围服务器上,这样就可以快速的从内存和磁盘上提取。 +- **动态内容缓存**。很多 web 应用会针对每次网页请求生成一个新的 HTML 页面。在短时间内简单的缓存生成的 HTML 内容,就可以很好的减少要生成的内容的数量,而且这些页面足够新,可以满足你的需要。 -举个例子,如果一个页面每秒会被浏览10次,你将它缓存1 秒,99%请求的页面都会直接从缓存提取。如果你将将数据分成静态内容,甚至新生成的页面可能都是由这些缓存构成的。 +举个例子,如果一个页面每秒会被浏览10次,你将它缓存 1 秒,90%请求的页面都会直接从缓存提取。如果你分开缓存静态内容,甚至新生成的页面可能都是由这些缓存构成的。 -下面由是web 应用发明的三种主要的缓存技术: +下面由是 web 应用发明的三种主要的缓存技术: -- **缩短数据与用户的距离**。把一份内容的拷贝放的离用户更近点来减少传输时间。 +- **缩短数据与用户的网络距离**。把一份内容的拷贝放的离用户更近的节点来减少传输时间。 - **提高内容服务器的速度**。内容可以保存在一个更快的服务器上来减少提取文件的时间。 -- **从过载服务器拿走数据**。机器经常因为要完成某些其它的任务而造成某个任务的执行速度比测试结果要差。将数据缓存在不同的机器上可以提高缓存资源和非缓存资源的效率,而这知识因为主机没有被过度使用。 +- **从过载服务器上移走数据**。机器经常因为要完成某些其它的任务而造成某个任务的执行速度比测试结果要差。将数据缓存在不同的机器上可以提高缓存资源和非缓存资源的性能,而这是因为主机没有被过度使用。 -对web 应用的缓存机制可以web 应用服务器内部实现。第一,缓存动态内容是用来减少应用服务器加载动态内容的时间。然后,缓存静态内容(包括动态内容的临时拷贝)是为了更进一步的分担应用服务器的负载。而且缓存之后会从应用服务器转移到对用户而言更快、更近的机器,从而减少应用服务器的压力,减少提取数据和传输数据的时间。 +对 web 应用的缓存机制可以在 web 应用服务器内部实现。首先,缓存动态内容是用来减少应用服务器加载动态内容的时间。其次,缓存静态内容(包括动态内容的临时拷贝)是为了更进一步的分担应用服务器的负载。而且缓存之后会从应用服务器转移到对用户而言更快、更近的机器,从而减少应用服务器的压力,减少提取数据和传输数据的时间。 改进过的缓存方案可以极大的提高应用的速度。对于大多数网页来说,静态数据,比如大图像文件,构成了超过一半的内容。如果没有缓存,那么这可能会花费几秒的时间来提取和传输这类数据,但是采用了缓存之后不到1秒就可以完成。 -举一个在实际中缓存是如何使用的例子, NGINX 和NGINX Plus使用了两条指令来[设置缓存机制][16]:proxy_cache_path 和 proxy_cache。你可以指定缓存的位置和大小,文件在缓存中保存的最长时间和其他一些参数。使用第三条(而且是相当受欢迎的一条)指令,proxy_cache_use_stale,如果服务器提供新鲜内容是忙或者挂掉之类的信息,你甚至可以让缓存提供旧的内容,这样客户端就不会一无所得。从用户的角度来看这可以很好的提高你的网站或者应用的上线时间。 +举一个在实际中缓存是如何使用的例子, NGINX 和 NGINX Plus 使用了两条指令来[设置缓存机制][16]:proxy_cache_path 和 proxy_cache。你可以指定缓存的位置和大小、文件在缓存中保存的最长时间和其它一些参数。使用第三条(而且是相当受欢迎的一条)指令 proxy_cache_use_stale,如果提供新鲜内容的服务器忙碌或者挂掉了,你甚至可以让缓存提供较旧的内容,这样客户端就不会一无所得。从用户的角度来看这可以很好的提高你的网站或者应用的可用时间。 -NGINX plus 拥有[高级缓存特性][17],包括对[缓存清除][18]的支持和在[仪表盘][19]上显示缓存状态信息。 +NGINX plus 有个[高级缓存特性][17],包括对[缓存清除][18]的支持和在[仪表盘][19]上显示缓存状态信息。 -要想获得更多关于NGINX 的缓存机制的信息可以浏览NGINX Plus 管理员指南中的 [reference documentation][20] 和 [NGINX Content Caching][21] 。 +要想获得更多关于 NGINX 的缓存机制的信息可以浏览 NGINX Plus 管理员指南中的 [参考文档][20] 和 [NGINX 内容缓存][21] 。 -**注意**:缓存机制分布于应用开发者、投资决策者以及实际的系统运维人员之间。本文提到的一些复杂的缓存机制从[DevOps 的角度][23]来看很具有价值,即对集应用开发者、架构师以及运维操作人员的功能为一体的工程师来说可以满足他们对站点功能性、响应时间、安全性和商业结果,如完成的交易数。 +**注意**:缓存机制分布于应用开发者、投资决策者以及实际的系统运维人员之间。本文提到的一些复杂的缓存机制从[DevOps 的角度][23]来看很具有价值,即对集应用开发者、架构师以及运维操作人员的功能为一体的工程师来说可以满足它们对站点功能性、响应时间、安全性和商业结果(如完成的交易数)等需要。 ### Tip #4: 压缩数据 ### 压缩是一个具有很大潜力的提高性能的加速方法。现在已经有一些针对照片(JPEG 和PNG)、视频(MPEG-4)和音乐(MP3)等各类文件精心设计和高压缩率的标准。每一个标准都或多或少的减少了文件的大小。 -文本数据 —— 包括HTML(包含了纯文本和HTL 标签),CSS和代码,比如Javascript —— 经常是未经压缩就传输的。压缩这类数据会在对应用程序性能的感觉上,特别是处于慢速或受限的移动网络的客户端,产生不成比例的影响。 +文本数据 —— 包括HTML(包含了纯文本和 HTML 标签),CSS 和代码,比如 Javascript —— 经常是未经压缩就传输的。压缩这类数据会在对应用程序性能的感觉上,特别是处于慢速或受限的移动网络的客户端,产生更大的影响。 -这是因为文本数据经常是用户与网页交互的有效数据,而多媒体数据可能更多的是起提供支持或者装饰的作用。聪明的内容压缩可以减少HTML,Javascript,CSS和其他文本内容对贷款的要求,通常可以减少30% 甚至更多的带宽和相应的页面加载时间。 +这是因为文本数据经常是用户与网页交互的有效数据,而多媒体数据可能更多的是起提供支持或者装饰的作用。智能的内容压缩可以减少 HTML,Javascript,CSS和其它文本内容对带宽的要求,通常可以减少 30% 甚至更多的带宽和相应的页面加载时间。 -如果你是用SSL,压缩可以减少需要进行SSL 编码的的数据量,而这些编码操作会占用一些CPU时间而抵消了压缩数据减少的时间。 +如果你使用 SSL,压缩可以减少需要进行 SSL 编码的的数据量,而这些编码操作会占用一些 CPU 时间而抵消了压缩数据减少的时间。 -压缩文本数据的方法很多,举个例子,在定义小说文本压缩模式的[HTTP/2 部分]就专门为适应头数据。另一个例子是可以在NGINX 里打开使用GZIP 压缩文本。你在你的服务里[预压缩文本数据][25]之后,你就可以直接使用gzip_static 指令来处理压缩过的.gz 版本。 +压缩文本数据的方法很多,举个例子,在定义小说文本压缩模式的 [HTTP/2 部分]就对于头数据来特别适合。另一个例子是可以在 NGINX 里打开使用 GZIP 压缩。你在你的服务里[预先压缩文本数据][25]之后,你就可以直接使用 gzip_static 指令来处理压缩过的 .gz 版本。 ### Tip #5: 优化 SSL/TLS ### -安全套接字([SSL][26]) 协议和它的继承者,传输层安全(TLS)协议正在被越来越多的网站采用。SSL/TLS 对从原始服务器发往用户的数据进行加密提高了网站的安全性。影响这个趋势的部分原因是Google 正在使用SSL/TLS,这在搜索引擎排名上是一个正面的影响因素。 +安全套接字([SSL][26]) 协议和它的下一代版本传输层安全(TLS)协议正在被越来越多的网站采用。SSL/TLS 对从原始服务器发往用户的数据进行加密提高了网站的安全性。影响这个趋势的部分原因是 Google 正在使用 SSL/TLS,这在搜索引擎排名上是一个正面的影响因素。 -尽管SSL/TLS 越来越流行,但是使用加密对速度的影响也让很多网站望而却步。SSL/TLS 之所以让网站变的更慢,原因有二: +尽管 SSL/TLS 越来越流行,但是使用加密对速度的影响也让很多网站望而却步。SSL/TLS 之所以让网站变的更慢,原因有二: -1. 任何一个连接第一次连接时的握手过程都需要传递密钥。而采用HTTP/1.x 协议的浏览器在建立多个连接时会对每个连接重复上述操作。 -2. 数据在传输过程中需要不断的在服务器加密、在客户端解密。 +1. 任何一个连接第一次连接时的握手过程都需要传递密钥。而采用 HTTP/1.x 协议的浏览器在建立多个连接时会对每个连接重复上述操作。 +2. 数据在传输过程中需要不断的在服务器端加密、在客户端解密。 -要鼓励使用SSL/TLS,HTTP/2 和SPDY(在[下一章][27]会描述)的作者设计新的协议来让浏览器只需要对一个浏览器会话使用一个连接。这会大大的减少上述两个原因中的一个浪费的时间。然而现在可以用来提高应用程序使用SSL/TLS 传输数据的性能的方法不止这些。 +为了鼓励使用 SSL/TLS,HTTP/2 和 SPDY(在[下一章][27]会描述)的作者设计了新的协议来让浏览器只需要对一个浏览器会话使用一个连接。这会大大的减少上述第一个原因所浪费的时间。然而现在可以用来提高应用程序使用 SSL/TLS 传输数据的性能的方法不止这些。 -web 服务器有对应的机制优化SSL/TLS 传输。举个例子,NGINX 使用[OpenSSL][28]运行在普通的硬件上提供接近专用硬件的传输性能。NGINX [SSL 性能][29] 有详细的文档,而且把对SSL/TLS 数据进行加解密的时间和CPU 占用率降低了很多。 +web 服务器有对应的机制优化 SSL/TLS 传输。举个例子,NGINX 使用 [OpenSSL][28] 运行在普通的硬件上提供了接近专用硬件的传输性能。NGINX 的 [SSL 性能][29] 有详细的文档,而且把对 SSL/TLS 数据进行加解密的时间和 CPU 占用率降低了很多。 -更进一步,在这篇[blog][30]有详细的说明如何提高SSL/TLS 性能,可以总结为一下几点: +更进一步,参考这篇[文章][30]了解如何提高 SSL/TLS 性能的更多细节,可以总结为一下几点: -- **会话缓冲**。使用指令[ssl_session_cache][31]可以缓存每个新的SSL/TLS 连接使用的参数。 -- **会话票据或者ID**。把SSL/TLS 的信息保存在一个票据或者ID 里可以流畅的复用而不需要重新握手。 -- **OCSP 分割**。通过缓存SSL/TLS 证书信息来减少握手时间。 +- **会话缓冲**。使用指令 [ssl_session_cache][31] 可以缓存每个新的 SSL/TLS 连接使用的参数。 +- **会话票据或者 ID**。把 SSL/TLS 的信息保存在一个票据或者 ID 里可以流畅的复用而不需要重新握手。 +- **OCSP 分割**。通过缓存 SSL/TLS 证书信息来减少握手时间。 -NGINX 和NGINX Plus 可以被用作SSL/TLS 终结——处理客户端流量的加密和解密,而同时和其他服务器进行明文通信。使用[这几步][32] 来设置NGINX 和NGINX Plus 处理SSL/TLS 终止。同时,这里还有一些NGINX Plus 和接收TCP 连接的服务器一起使用时的[特有的步骤][33] +NGINX 和 NGINX Plus 可以被用作 SSL/TLS 服务端,用于处理客户端流量的加密和解密,而同时以明文方式和其它服务器进行通信。要设置 NGINX 和 NGINX Plus 作为 SSL/TLS 服务端,参看 [HTTPS 连接][32] 和[加密的 TCP 连接][33] ### Tip #6: 使用 HTTP/2 或 SPDY ### -对于已经使用了SSL/TLS 的站点,HTTP/2 和SPDY 可以很好的提高性能,因为每个连接只需要一次握手。而对于没有使用SSL/TLS 的站点来说,HTTP/2 和SPDY会在响应速度上有些影响(通常会将度效率)。 +对于已经使用了 SSL/TLS 的站点,HTTP/2 和 SPDY 可以很好的提高性能,因为每个连接只需要一次握手。而对于没有使用 SSL/TLS 的站点来说,从响应速度的角度来说 HTTP/2 和 SPDY 将让迁移到 SSL/TLS 没有什么压力(原本会降低效率)。 -Google 在2012年开始把SPDY 作为一个比HTTP/1.x 更快速的协议来推荐。HTTP/2 是目前IETF 标准,他也基于SPDY。SPDY 已经被广泛的支持了,但是很快就会被HTTP/2 替代。 +Google 在2012年开始把 SPDY 作为一个比 HTTP/1.x 更快速的协议来推荐。HTTP/2 是目前 IETF 通过的标准,是基于 SPDY 的。SPDY 已经被广泛的支持了,但是很快就会被 HTTP/2 替代。 -SPDY 和HTTP/2 的关键是用单连接来替代多路连接。单个连接是被复用的,所以它可以同时携带多个请求和响应的分片。 +SPDY 和 HTTP/2 的关键是用单一连接来替代多路连接。单个连接是被复用的,所以它可以同时携带多个请求和响应的分片。 -通过使用一个连接这些协议可以避免过多的设置和管理多个连接,就像浏览器实现了HTTP/1.x 一样。单连接在对SSL 特别有效,这是因为它可以最小化SSL/TLS 建立安全链接时的握手时间。 +通过使用单一连接,这些协议可以避免像在实现了 HTTP/1.x 的浏览器中一样建立和管理多个连接。单一连接在对 SSL 特别有效,这是因为它可以最小化 SSL/TLS 建立安全链接时的握手时间。 -SPDY 协议需要使用SSL/TLS, 而HTTP/2 官方并不需要,但是目前所有支持HTTP/2的浏览器只有在使能了SSL/TLS 的情况下才会使用它。这就意味着支持HTTP/2 的浏览器只有在网站使用了SSL 并且服务器接收HTTP/2 流量的情况下才会启用HTTP/2。否则的话浏览器就会使用HTTP/1.x 协议。 +SPDY 协议需要使用 SSL/TLS,而 HTTP/2 官方标准并不需要,但是目前所有支持 HTTP/2 的浏览器只有在启用了 SSL/TLS 的情况下才能使用它。这就意味着支持 HTTP/2 的浏览器只有在网站使用了 SSL 并且服务器接收 HTTP/2 流量的情况下才会启用 HTTP/2。否则的话浏览器就会使用 HTTP/1.x 协议。 -当你实现SPDY 或者HTTP/2时,你不再需要通常的HTTP 性能优化方案,比如域分隔资源聚合,以及图像登记。这些改变可以让你的代码和部署变得更简单和更易于管理。要了解HTTP/2 带来的这些变化可以浏览我们的[白皮书][34]。 +当你实现 SPDY 或者 HTTP/2 时,你不再需要那些常规的 HTTP 性能优化方案,比如按域分割、资源聚合,以及图像拼合。这些改变可以让你的代码和部署变得更简单和更易于管理。要了解 HTTP/2 带来的这些变化可以浏览我们的[白皮书][34]。 ![NGINX Supports SPDY and HTTP/2 for increased web application performance](https://www.nginx.com/wp-content/uploads/2015/10/http2-27.png) -作为支持这些协议的一个样例,NGINX 已经从一开始就支持了SPDY,而且[大部分使用SPDY 协议的网站][35]都运行的是NGINX。NGINX 同时也[很早][36]对HTTP/2 的提供了支持,从2015 年9月开始开源NGINX 和NGINX Plus 就[支持][37]它了。 +作为支持这些协议的一个样例,NGINX 已经从一开始就支持了 SPDY,而且[大部分使用 SPDY 协议的网站][35]都运行的是 NGINX。NGINX 同时也[很早][36]对 HTTP/2 的提供了支持,从2015 年9月开始,开源版 NGINX 和 NGINX Plus 就[支持][37]它了。 -经过一段时间,我们NGINX 希望更多的站点完全是能SSL 并且向HTTP/2 迁移。这将会提高安全性,同时新的优化手段也会被发现和实现,更简单的代码表现的更加优异。 +经过一段时间,我们 NGINX 希望更多的站点完全启用 SSL 并且向 HTTP/2 迁移。这将会提高安全性,同时也会找到并实现新的优化手段,简化的代码表现的会更加优异。 ### Tip #7: 升级软件版本 ### -一个提高应用性能的简单办法是根据软件的稳定性和性能的评价来选在你的软件栈。进一步说,因为高性能组件的开发者更愿意追求更高的性能和解决bug ,所以值得使用最新版本的软件。新版本往往更受开发者和用户社区的关注。更新的版本往往会利用到新的编译器优化,包括对新硬件的调优。 +一个提高应用性能的简单办法是根据软件的稳定性和性能的评价来选在你的软件栈。进一步说,因为高性能组件的开发者更愿意追求更高的性能和解决 bug ,所以值得使用最新版本的软件。新版本往往更受开发者和用户社区的关注。更新的版本往往会利用到新的编译器优化,包括对新硬件的调优。 -稳定的新版本通常比旧版本具有更好的兼容性和更高的性能。一直进行软件更新,可以非常简单的保持软件保持最佳的优化,解决掉bug,以及安全性的提高。 +稳定的新版本通常比旧版本具有更好的兼容性和更高的性能。一直进行软件更新,可以非常简单的保持软件保持最佳的优化,解决掉 bug,以及提高安全性。 -一直使用旧版软件也会组织你利用新的特性。比如上面说到的HTTP/2,目前要求OpenSSL 1.0.1.在2016 年中期开始将会要求1.0.2 ,而这是在2015年1月才发布的。 +一直使用旧版软件也会阻止你利用新的特性。比如上面说到的 HTTP/2,目前要求 OpenSSL 1.0.1。在2016 年中期开始将会要求1.0.2 ,而它是在2015年1月才发布的。 -NGINX 用户可以开始迁移到[NGINX 最新的开源软件][38] 或者[NGINX Plus][39];他们都包含了罪行的能力,如socket分区和线程池(见下文),这些都已经为性能优化过了。然后好好看看的你软件栈,把他们升级到你能能升级道德最新版本吧。 +NGINX 用户可以开始迁移到 [NGINX 最新的开源软件][38] 或者 [NGINX Plus][39];它们都包含了最新的能力,如 socket 分割和线程池(见下文),这些都已经为性能优化过了。然后好好看看的你软件栈,把它们升级到你能升级到的最新版本吧。 -### Tip #8: linux 系统性能调优 ### +### Tip #8: Linux 系统性能调优 ### -linux 是大多数web 服务器使用操作系统,而且作为你的架构的基础,Linux 表现出明显可以提高性能的机会。默认情况下,很多linux 系统都被设置为使用很少的资源,匹配典型的桌面应用负载。这就意味着web 应用需要最少一些等级的调优才能达到最大效能。 +Linux 是大多数 web 服务器使用的操作系统,而且作为你的架构的基础,Linux 显然有不少提高性能的可能。默认情况下,很多 Linux 系统都被设置为使用很少的资源,以符合典型的桌面应用使用。这就意味着 web 应用需要一些微调才能达到最大效能。 -Linux 优化是转变们针对web 服务器方面的。以NGINX 为例,这里有一些在加速linux 时需要强调的变化: +这里的 Linux 优化是专门针对 web 服务器方面的。以 NGINX 为例,这里有一些在加速 Linux 时需要强调的变化: -- **缓冲队列**。如果你有挂起的连接,那么你应该考虑增加net.core.somaxconn 的值,它代表了可以缓存的连接的最大数量。如果连接线直太小,那么你将会看到错误信息,而你可以逐渐的增加这个参数知道错误信息停止出现。 -- **文件描述符**。NGINX 对一个连接使用最多2个文件描述符。如果你的系统有很多连接,你可能就需要提高sys.fs.file_max ,增加系统对文件描述符数量整体的限制,这样子才能支持不断增加的负载需求。 -- **临时端口**。当使用代理时,NGINX 会为每个上游服务器创建临时端口。你可以设置net.ipv4.ip_local_port_range 来提高这些端口的范围,增加可用的端口。你也可以减少非活动的端口的超时判断来重复使用端口,这可以通过net.ipv4.tcp_fin_timeout 来设置,这可以快速的提高流量。 +- **缓冲队列**。如果你有挂起的连接,那么你应该考虑增加 net.core.somaxconn 的值,它代表了可以缓存的连接的最大数量。如果连接限制太小,那么你将会看到错误信息,而你可以逐渐的增加这个参数直到错误信息停止出现。 +- **文件描述符**。NGINX 对一个连接使用最多2个文件描述符。如果你的系统有很多连接请求,你可能就需要提高sys.fs.file_max ,以增加系统对文件描述符数量整体的限制,这样才能支持不断增加的负载需求。 +- **临时端口**。当使用代理时,NGINX 会为每个上游服务器创建临时端口。你可以设置net.ipv4.ip_local_port_range 来提高这些端口的范围,增加可用的端口号。你也可以减少非活动的端口的超时判断来重复使用端口,这可以通过 net.ipv4.tcp_fin_timeout 来设置,这可以快速的提高流量。 -对于NGINX 来说,可以查阅[NGINX 性能调优指南][40]来学习如果优化你的Linux 系统,这样子它就可以很好的适应大规模网络流量而不会超过工作极限。 +对于 NGINX 来说,可以查阅 [NGINX 性能调优指南][40]来学习如果优化你的 Linux 系统,这样它就可以很好的适应大规模网络流量而不会超过工作极限。 ### Tip #9: web 服务器性能调优 ### -无论你是用哪种web 服务器,你都需要对它进行优化来提高性能。下面的推荐手段可以用于任何web 服务器,但是一些设置是针对NGINX的。关键的优化手段包括: +无论你是用哪种 web 服务器,你都需要对它进行优化来提高性能。下面的推荐手段可以用于任何 web 服务器,但是一些设置是针对 NGINX 的。关键的优化手段包括: -- **f访问日志**。不要把每个请求的日志都直接写回磁盘,你可以在内存将日志缓存起来然后一批写回磁盘。对于NGINX 来说添加给指令*access_log* 添加参数 *buffer=size* 可以让系统在缓存满了的情况下才把日志写到此哦按。如果你添加了参数**flush=time** ,那么缓存内容会每隔一段时间再写回磁盘。 -- **缓存**。缓存掌握了内存中的部分资源知道满了位置,这可以让与客户端的通信更加高效。与内存中缓存不匹配的响应会写回磁盘,而这就会降低效能。当NGINX [启用][42]了缓存机制后,你可以使用指令*proxy_buffer_size* 和 *proxy_buffers* 来管理缓存。 -- **客户端保活**。保活连接可以减少开销,特别是使用SSL/TLS时。对于NGINX 来说,你可以增加*keepalive_requests* 的值,从默认值100 开始修改,这样一个客户端就可以转交一个指定的连接,而且你也可以通过增加*keepalive_timeout* 的值来允许保活连接存活更长时间,结果就是让后来的请求处理的更快速。 -- **上游保活**。上游的连接——即连接到应用服务器、数据库服务器等机器的连接——同样也会收益于连接保活。对于上游连接老说,你可以增加*保活时间*,即每个工人进程的空闲保活连接个数。这就可以提高连接的复用次数,减少需要重新打开全新的连接次数。更多关于保活连接的信息可以参见[blog][41]. -- **限制**。限制客户端使用的资源可以提高性能和安全性。对于NGINX 来说指令*limit_conn* 和 *limit_conn_zone* 限制了每个源的连接数量,而*limit_rate* 限制了带宽。这些限制都可以阻止合法用户*攫取* 资源,同时夜避免了攻击。指令*limit_req* 和 *limit_req_zone* 限制了客户端请求。对于上游服务器来说,可以在上游服务器的配置块里使用max_conns 可以限制连接到上游服务器的连接。 这样可以避免服务器过载。关联的队列指令会创建一个队列来在连接数抵达*max_conn* 限制时在指定的长度的时间内保存特定数量的请求。 -- **工人进程**。工人进程负责处理请求。NGINX 采用事件驱动模型和依赖操作系统的机制来有效的讲请求分发给不同的工人进程。这条建议推荐设置每个CPU 的参数*worker_processes* 。如果需要的话,工人连接的最大数(默认512)可以安全在大部分系统增加,是指找到最适合你的系统的值。 -- **套接字分割**。通常一个套接字监听器会把新连接分配给所有工人进程。套接字分割会未每个工人进程创建一个套接字监听器,这样一来以内核分配连接给套接字就成为可能了。折可以减少锁竞争,并且提高多核系统的性能,要使能[套接字分隔][43]需要在监听指令里面加上复用端口参数。 -- **线程池**。一个计算机进程可以处理一个缓慢的操作。对于web 服务器软件来说磁盘访问会影响很多更快的操作,比如计算或者在内存中拷贝。使用了线程池之后慢操作可以分配到不同的任务集,而主进程可以一直运行快速操作。当磁盘操作完成后结果会返回给主进程的循环。在NGINX理有两个操作——read()系统调用和sendfile() ——被分配到了[线程池][44] +- **访问日志**。不要把每个请求的日志都直接写回磁盘,你可以在内存将日志缓存起来然后批量写回磁盘。对于NGINX 来说,给指令 **access_log** 添加参数 **buffer=size** 可以让系统在缓存满了的情况下才把日志写到磁盘。如果你添加了参数 **flush=time** ,那么缓存内容会每隔一段时间再写回磁盘。 +- **缓存**。缓存会在内存中存放部分响应,直到满了为止,这可以让与客户端的通信更加高效。内存放不下的响应会写回磁盘,而这就会降低效能。当 NGINX [启用][42]了缓存机制后,你可以使用指令 **proxy_buffer_size** 和 **proxy_buffers** 来管理缓存。 +- **客户端保活**。保活连接可以减少开销,特别是使用 SSL/TLS 时。对于 NGINX 来说,你可以从 **keepalive_requests** 的默认值 100 开始增加最大连接数,这样一个客户端就可以在一个指定的连接上请求多次,而且你也可以通过增加 **keepalive_timeout** 的值来允许保活连接存活更长时间,这样就可以让后来的请求处理的更快速。 +- **上游保活**。上游的连接——即连接到应用服务器、数据库服务器等机器的连接——同样也会受益于连接保活。对于上游连接来说,你可以增加 **keepalive**,即每个工人进程的空闲保活连接个数。这就可以提高连接的复用次数,减少需要重新打开全新连接的次数。更多关于保活连接的信息可以参见[这篇“ HTTP 保活连接和性能”][41]。 +- **限制**。限制客户端使用的资源可以提高性能和安全性。对于 NGINX 来说,指令 **limit_conn** 和 **limit_conn_zone** 限制了给定来源的连接数量,而 **limit_rate** 限制了带宽。这些限制都可以阻止合法用户*扒取*资源,同时也避免了攻击。指令 **limit_req** 和 **limit_req_zone** 限制了客户端请求。对于上游服务器来说,可以在 upstream 的配置块里的 server 指令使用 max_conns 参数来限制连接到上游服务器的连接数。 这样可以避免服务器过载。关联的 queue 指令会创建一个队列来在连接数抵达 **max_conn** 限制时在指定长度的时间内保存特定数量的请求。 +- **工人进程**。工人进程负责处理请求。NGINX 采用事件驱动模型和操作系统特定的机制来有效的将请求分发给不同的工人进程。这条建议推荐设置 **worker_processes** 为每个 CPU 一个 。worker_connections 的最大数(默认512)可以在大部分系统上根据需要增加,实验性地找到最适合你的系统的值。 +- **套接字分割**。通常一个套接字监听器会把新连接分配给所有工人进程。套接字分割会为每个工人进程创建一个套接字监听器,这样一来以当套接字监听器可用时,内核就会将连接分配给它。这可以减少锁竞争,并且提高多核系统的性能,要启用[套接字分隔][43]需要在 **listen** 指令里面加上 **reuseport** 参数。 +- **线程池**。计算机进程可能被一个单一的缓慢的操作所占用。对于 web 服务器软件来说,磁盘访问会影响很多更快的操作,比如计算或者在内存中拷贝。使用了线程池之后慢操作可以分配到不同的任务集,而主进程可以一直运行快速操作。当磁盘操作完成后结果会返回给主进程的循环。在 NGINX 里有两个操作——read() 系统调用和 sendfile() ——被分配到了[线程池][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) -**技巧**。当改变任务操作系统或支持服务的设置时,一次只改变一个参数然后测试性能。如果修改引起问题了,或者不能让你的系统更快那么就改回去。 +**技巧**。当改变任何操作系统或支持服务的设置时,一次只改变一个参数然后测试性能。如果修改引起问题了,或者不能让你的系统更快,那么就改回去。 -在[blog][45]可以看到更详细的NGINX 调优方法。 +在[文章“调优 NGINX 性能”][45]里可以看到更详细的 NGINX 调优方法。 ### Tip #10: 监视系统活动来解决问题和瓶颈 ### -在应用开发中要使得系统变得非常高效的关键是监视你的系统在现实世界运行的性能。你必须能通过特定的设备和你的web 基础设施上监控程序活动。 +在应用开发中要使得系统变得非常高效的关键是监视你的系统在现实世界运行的性能。你必须能通过特定的设备和你的 web 基础设施上监控程序活动。 -监视活动是最积极的——他会告诉你发生了什么,把问题留给你发现和最终解决掉。 +监视活动是最积极的——它会告诉你发生了什么,把问题留给你发现和最终解决掉。 -监视可以发现集中不同的问题。它们包括: +监视可以发现几种不同的问题。它们包括: - 服务器宕机。 - 服务器出问题一直在丢失连接。 - 服务器出现大量的缓存未命中。 - 服务器没有发送正确的内容。 -应用的总体性能监控工具,比如New Relic 和Dynatrace,可以帮助你监控到从远处加载网页的时间,二NGINX 可以帮助你监控到应用发送的时 间。当你需要考虑为基础设施添加容量以满足流量需求时,应用性能数据可以告诉你你的优化措施的确起作用了。 +应用的总体性能监控工具,比如 New Relic 和 Dynatrace,可以帮助你监控到从远程加载网页的时间,而 NGINX 可以帮助你监控到应用交付端。当你需要考虑为基础设施添加容量以满足流量需求时,应用性能数据可以告诉你你的优化措施的确起作用了。 -为了帮助开发者快速的发现、解决问题,NGINX Plus 增加了[应用感知健康度检查][46] ——对重复出现的常规事件进行综合分析并在问题出现时向你发出警告。NGINX Plus 同时提供[会话过滤][47] 功能,折可以组织当前任务未完成之前不接受新的连接,另一个功能是慢启动,允许一个从错误恢复过来的服务器追赶上负载均衡服务器群的速度。当有使用得当时,健康度检查可以让你在问题变得严重到影响用户体验前就发现它,而会话过滤和慢启动可以让你替换服务器,并且这个过程不会对性能和正常运行时间产生负面影响。这个表格就展示了NGINX Plus 内建模块在web 基础设施[监视活活动][48]的仪表盘,包括了服务器群,TCP 连接和缓存等信息。 +为了帮助开发者快速的发现、解决问题,NGINX Plus 增加了[应用感知健康度检查][46] ——对重复出现的常规事件进行综合分析并在问题出现时向你发出警告。NGINX Plus 同时提供[会话过滤][47] 功能,这可以阻止当前任务完成之前接受新的连接,另一个功能是慢启动,允许一个从错误恢复过来的服务器追赶上负载均衡服务器群的进度。当使用得当时,健康度检查可以让你在问题变得严重到影响用户体验前就发现它,而会话过滤和慢启动可以让你替换服务器,并且这个过程不会对性能和正常运行时间产生负面影响。下图就展示了内建的 NGINX Plus 模块[实时活动监视][48]的仪表盘,包括了服务器群,TCP 连接和缓存信息等 Web 架构信息。 ![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) ### 总结: 看看10倍性能提升的效果 ### -这些性能提升方案对任何一个web 应用都可用并且效果都很好,而实际效果取决于你的预算,如你能花费的时间,目前实现方案的差距。所以你该如何对你自己的应用实现10倍性能提升? +这些性能提升方案对任何一个 web 应用都可用并且效果都很好,而实际效果取决于你的预算、你能花费的时间、目前实现方案的差距。所以你该如何对你自己的应用实现10倍性能提升? -为了指导你了解每种优化手段的潜在影响,这里是是上面详述的每个优化方法的关键点,虽然你的里程肯定大不相同: +为了指导你了解每种优化手段的潜在影响,这里是上面详述的每个优化方法的关键点,虽然你的情况肯定大不相同: -- **反向代理服务器和负载均衡**。没有负载均衡或者负载均衡很差都会造成间断的极低性能。增加一个反向代理,比如NGINX可以避免web应用程序在内存和磁盘之间抖动。负载均衡可以将过载服务器的任务转移到空闲的服务器,还可以轻松的进行扩容。这些改变都可以产生巨大的性能提升,很容易就可以比你现在的实现方案的最差性能提高10倍,对于总体性能来说可能提高的不多,但是也是有实质性的提升。 -- **缓存动态和静态数据**。如果你又一个web 服务器负担过重,那么毫无疑问肯定是你的应用服务器,只通过缓存动态数据就可以在峰值时间提高10倍的性能。缓存静态文件可以提高个位数倍的性能。 -- **压缩数据**。使用媒体文件压缩格式,比如图像格式JPEG,图形格式PNG,视频格式MPEG-4,音乐文件格式MP3可以极大的提高性能。一旦这些都用上了,然后压缩文件数据可以提高初始页面加载速度提高两倍。 -- **优化SSL/TLS**。安全握手会对性能产生巨大的影响,对他们的优化可能会对初始响应特别是重文本站点产生2倍的提升。优化SSL/TLS 下媒体文件只会产生很小的性能提升。 -- **使用HTTP/2 和SPDY*。当你使用了SSL/TLS,这些协议就可以提高整个站点的性能。 -- **对linux 和web 服务器软件进行调优**。比如优化缓存机制,使用保活连接,分配时间敏感型任务到不同的线程池可以明显的提高性能;举个例子,线程池可以加速对磁盘敏感的任务[近一个数量级][49]. +- **反向代理服务器和负载均衡**。没有负载均衡或者负载均衡很差都会造成间歇的性能低谷。增加一个反向代理,比如 NGINX ,可以避免 web 应用程序在内存和磁盘之间波动。负载均衡可以将过载服务器的任务转移到空闲的服务器,还可以轻松的进行扩容。这些改变都可以产生巨大的性能提升,很容易就可以比你现在的实现方案的最差性能提高10倍,对于总体性能来说可能提高的不多,但是也是有实质性的提升。 +- **缓存动态和静态数据**。如果你有一个负担过重的 web 服务器,那么毫无疑问肯定是你的应用服务器,只通过缓存动态数据就可以在峰值时间提高10倍的性能。缓存静态文件可以提高几倍的性能。 +- **压缩数据**。使用媒体文件压缩格式,比如图像格式 JPEG,图形格式 PNG,视频格式 MPEG-4,音乐文件格式 MP3 可以极大的提高性能。一旦这些都用上了,然后压缩文件数据可以将初始页面加载速度提高两倍。 +- **优化 SSL/TLS**。安全握手会对性能产生巨大的影响,对它们的优化可能会对初始响应产生2倍的提升,特别是对于大量文本的站点。优化 SSL/TLS 下媒体文件只会产生很小的性能提升。 +- **使用 HTTP/2 和 SPDY*。当你使用了 SSL/TLS,这些协议就可以提高整个站点的性能。 +- **对 Linux 和 web 服务器软件进行调优**。比如优化缓存机制,使用保活连接,分配时间敏感型任务到不同的线程池可以明显的提高性能;举个例子,线程池可以加速对磁盘敏感的任务[近一个数量级][49]。 + +我们希望你亲自尝试这些技术。我们希望知道你说取得的各种性能提升案例。请在下面评论栏分享你的结果或者在标签 #NGINX 和 #webperf 下 tweet 你的故事。 -我们希望你亲自尝试这些技术。我们希望这些提高应用性能的手段可以被你实现。请在下面评论栏分享你的结果 或者在标签#NGINX 和#webperf 下tweet 你的故事。 ### 网上资源 ### [Statista.com – Share of the internet economy in the gross domestic product in G-20 countries in 2016][50] @@ -215,11 +214,11 @@ Linux 优化是转变们针对web 服务器方面的。以NGINX 为例,这里 -------------------------------------------------------------------------------- -via: https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io +via: https://www.nginx.com/blog/10-tips-for-10x-application-performance/ 作者:[Floyd Smith][a] -译者:[Ezio]](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +译者:[Ezio](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -233,11 +232,9 @@ via: https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=to [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/ +[10]:https://www.nginx.com/resources/library/five-reasons-choose-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/ +[12]: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/ From f865c5da17df1f0c8fc47835e36d49b280b6dedf Mon Sep 17 00:00:00 2001 From: VicYu Date: Tue, 12 Apr 2016 10:23:31 +0800 Subject: [PATCH 1240/1710] Translated 20160226 How to use Python to hack your Eclipse IDE.md --- ... to use Python to hack your Eclipse IDE.md | 217 ------------------ ... to use Python to hack your Eclipse IDE.md | 215 +++++++++++++++++ 2 files changed, 215 insertions(+), 217 deletions(-) delete mode 100644 sources/tech/20160226 How to use Python to hack your Eclipse IDE.md create mode 100644 translated/tech/20160226 How to use Python to hack your Eclipse IDE.md diff --git a/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md b/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md deleted file mode 100644 index 9f1b1ed359..0000000000 --- a/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md +++ /dev/null @@ -1,217 +0,0 @@ - Vic020 - -How to use Python to hack your Eclipse IDE -============================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/lightbulb_computer_person_general_.png?itok=ZY3UuQQa) - -The Eclipse Advanced Scripting Environment ([EASE][1]) project is a new but powerful set of plugins that enables you to quickly hack your Eclipse IDE. - -Eclipse is a powerful framework that can be extended in many different ways by using its built-in plugin mechanism. However, writing and deploying a new plugin can be cumbersome if all you want is a bit of additional functionality. Now, using EASE, there's a better way to do that, without having to write a single line of Java code. EASE provides a way to easily automate workbench functionality using scripting languages such as Python or Javascript. - -In this article, based on my [talk][2] at EclipseCon North America this year, I'll cover the basics of how to set up your Eclipse environment with Python and EASE and look at a few ideas to supercharge your IDE with the power of Python. - -### Setup and run "Hello World" - -The examples in this article are based on the Java-implementation of Python, Jython. You can install EASE directly into your existing Eclipse IDE. In this example we use Eclipse [Mars][3] and install EASE itself, its modules and the Jython engine. - -From within the Eclipse Install Dialog (`Help>Install New Software`...), install EASE: [http://download.eclipse.org/ease/update/nightly][4] - -And, select the following components: - -- EASE Core feature - -- EASE core UI feature - -- EASE Python Developer Resources - -- EASE modules (Incubation) - -This will give you EASE and its modules. The main one we are interested in is the Resource module that gives you access to the Eclipse workspace, projects, and files API. - -![](https://opensource.com/sites/default/files/1_installease_nightly.png) - - -After those have been successfully installed, next install the EASE Jython engine: [https://dl.bintray.com/pontesegger/ease-jython/][5]. Once the plugins are installed, test EASE out. Create a new project and add in a new file called hello.py with this content: - -``` -print "hello world" -``` - -Select the file, right click, and select 'Run as -> EASE script'. You should see "Hello World" appear in the console. - -Now you can start writing Python scripts that can access the workspace and projects. This power can be used for all sorts of hacks, below are just a few ideas. - -### Improve your code quality - -Maintaining good code quality can be a tiresome job especially when dealing with a large codebase or when lots of developers are involved. Some of this pain can be made easier with a script, such as for batch formatting for a set of files, or even fixing certain files to [remove unix line endings][6] for easy comparison in source control like git. Another nice thing to do is use a script to generate Eclipse markers to highlight code that could do with improving. Here's an example script that you could use to add task markers for all "printStackTrace" methods it detects in Java files. See the source code: [markers.py][7] - -To run, copy the file to your workspace, then right click and select 'Run as -> EASE script'. - -``` -loadModule('/System/Resources') -``` - -from org.eclipse.core.resources import IMarker - -``` -for ifile in findFiles("*.java"): - file_name = str(ifile.getLocation()) - print "Processing " + file_name - with open(file_name) as f: - for line_no, line in enumerate(f, start=1): - if "printStackTrace" in line: - marker = ifile.createMarker(IMarker.TASK) - marker.setAttribute(IMarker.TRANSIENT, True) - marker.setAttribute(IMarker.LINE_NUMBER, line_no) - marker.setAttribute(IMarker.MESSAGE, "Fix in Sprint 2: " + line.strip()) - -``` - -If you have any java files with printStackTraces you will be able to see the newly created markers in the Tasks view and in the editor margin. - -![](https://opensource.com/sites/default/files/2_codequality.png) - -### Automate tedious tasks - -When you are working with several projects you may want to automate some tedious, repetitive tasks. Perhaps you need to add in a copyright header to the beginning of each source file, or update source files when adopting a new framework. For instance, when we first switched to using Tycho and Maven, we had to add a pom.xml to each project. This is easily done using a few lines of Python. Then when Tycho provided support for pom-less builds, we wanted to remove unnecessary pom files. Again, a few lines of Python script enabled this. As an example, here is a script which adds a README.md file to every open project in your workspace, noting if they are Java or Python projects. See the source code: [add_readme.py][8]. - -To run, copy the file to your workspace, then right click and select 'Run as -> EASE script'. - -loadModule('/System/Resources') - -``` -for iproject in getWorkspace().getProjects(): - if not iproject.isOpen(): - continue - - ifile = iproject.getFile("README.md") - - if not ifile.exists(): - contents = "# " + iproject.getName() + "\n\n" - if iproject.hasNature("org.eclipse.jdt.core.javanature"): - contents += "A Java Project\n" - elif iproject.hasNature("org.python.pydev.pythonNature"): - contents += "A Python Project\n" - writeFile(ifile, contents) -``` - -The result should be that every open project will have a README.md file, with Java and Python projects having an additional descriptive line. - -![](https://opensource.com/sites/default/files/3_tedioustask.png) - -### Prototype new features - -You can also use a Python script to hack a quick-fix for some much wanted functionality, or as a prototype to help demonstrate to your team or users how you envision a feature. For instance, one feature Eclipse IDE doesn't currently support is auto-save on the current file you are working on. Although this feature is in the works for future releases, you can have a quick and dirty version that autosaves every 30 seconds or when the editor is deactivated. Below is a snippet of the main method. See the full source: [autosave.py][9] - -``` -def save_dirty_editors(): - workbench = getService(org.eclipse.ui.IWorkbench) - for window in workbench.getWorkbenchWindows(): - for page in window.getPages(): - for editor_ref in page.getEditorReferences(): - part = editor_ref.getPart(False) - if part and part.isDirty(): - print "Auto-Saving", part.getTitle() - part.doSave(None) -``` - -Before running this script you will need to turn on the 'Allow Scripts to run code in UI thread' setting by checking the box under Window > Preferences > Scripting. Then you can add the file to your workspace, right click on it and select 'Run As>EASE Script'. A save message is printed out in the Console view every time an editor is saved. To turn off the autosave just stop the script by pressing the 'Terminate' red square button in the Console view. - -![](https://opensource.com/sites/default/files/4_prototype.png) - -### Quickly extend the user interface with custom buttons, menus, etc - -One of the best things about EASE is that it allows you to take your scripts and quickly hook them into UI elements of the IDE, for example, as a new button or new menu item. No need to write Java or have a new plugin, just add a couple of lines to your script header—it's that simple. - -Here's an example for a simplistic script that creates us three new projects. - -``` -# name : Create fruit projects -# toolbar : Project Explorer -# description : Create fruit projects - -loadModule("/System/Resources") - -for name in ["banana", "pineapple", "mango"]: - createProject(name) -``` - -The comment lines specify to EASE to add a button to the Project Explorer toolbar. Here's another script that adds a button to the same toolbar to delete those three projects. See the source files: [createProjects.py][10] and [deleteProjects.py][11] - -``` -# name :Delete fruit projects -# toolbar : Project Explorer -# description : Get rid of the fruit projects - -loadModule("/System/Resources") - -for name in ["banana", "pineapple", "mango"]: - project = getProject(name) - project.delete(0, None) -``` - -To get the buttons to appear, add the two script files to a new project—let's call it 'ScriptsProject'. Then go to Windows > Preference > Scripting > Script Locations. Click on the 'Add Workspace' button and select the ScriptsProject. This project now becomes a default location for locating script files. You should see the buttons show up in the Project Explorer without needing to restart your IDE. You should be able to quickly create and delete the projects using your newly added buttons. - -![](https://opensource.com/sites/default/files/5_buttons.png) - -### Integrate with third-party tools - -Every now and then you may need to use a tool outside the Eclipse ecosystem (sad but true, it has a lot but it does not do everything). For those occasions it might be quite handy to wrap calling that call to the tool in a script. Here's an example that allows you to integrate with explorer.exe, and add it to the content menu so you could instantly open a file browser using the current selection. See the source code: [explorer.py][12] - -``` -# name : Explore from here -# popup : enableFor(org.eclipse.core.resources.IResource) -# description : Start a file browser using current selection -loadModule("/System/Platform") -loadModule('/System/UI') - -selection = getSelection() -if isinstance(selection, org.eclipse.jface.viewers.IStructuredSelection): - selection = selection.getFirstElement() - -if not isinstance(selection, org.eclipse.core.resources.IResource): - selection = adapt(selection, org.eclipse.core.resources.IResource) - -if isinstance(selection, org.eclipse.core.resources.IFile): - selection = selection.getParent() - -if isinstance(selection, org.eclipse.core.resources.IContainer): - runProcess("explorer.exe", [selection.getLocation().toFile().toString()]) -``` - -To get the menu to appear, add the script to a new project—let's call it 'ScriptsProject'. Then go to Windows > Preference > Scripting > Script Locations. Click on the 'Add Workspace' button and select the ScriptsProject. You should see the new menu item show up in the context menu when you right-click on a file. Select this action to bring up a file browser. (Note this functionality already exists in Eclipse but this example is one you could adapt to other third-party tools). - -![](https://opensource.com/sites/default/files/6_explorer.png) - -The Eclipse Advanced Scripting Environment provides a great way to get more out of your Eclipse IDE by leveraging the power of Python. It is a project in its infancy so there is so much more to come. Learn more [about the project][13] and get involved by signing up for the [forum][14]. - -I'll be talking more about EASE at [Eclipsecon North America][15] 2016. My talk [Scripting Eclipse with Python][16] will go into how you can use not just Jython, but C-Python and how this functionality can be extended specifically for scientific use-cases. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/2/how-use-python-hack-your-ide - -作者:[Tracy Miranda][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/tracymiranda -[1]: https://eclipse.org/ease/ -[2]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python -[3]: https://www.eclipse.org/downloads/packages/eclipse-ide-eclipse-committers-451/mars1 -[4]: http://download.eclipse.org/ease/update/nightly -[5]: https://dl.bintray.com/pontesegger/ease-jython/ -[6]: http://code.activestate.com/recipes/66434-change-line-endings/ -[7]: https://gist.github.com/tracymiranda/6556482e278c9afc421d -[8]: https://gist.github.com/tracymiranda/f20f233b40f1f79b1df2 -[9]: https://gist.github.com/tracymiranda/e9588d0976c46a987463 -[10]: https://gist.github.com/tracymiranda/55995daaea9a4db584dc -[11]: https://gist.github.com/tracymiranda/baa218fc2c1a8e898194 -[12]: https://gist.github.com/tracymiranda/8aa3f0fc4bf44f4a5cd3 -[13]: https://eclipse.org/ease/ -[14]: https://dev.eclipse.org/mailman/listinfo/ease-dev -[15]: https://www.eclipsecon.org/na2016 -[16]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python diff --git a/translated/tech/20160226 How to use Python to hack your Eclipse IDE.md b/translated/tech/20160226 How to use Python to hack your Eclipse IDE.md new file mode 100644 index 0000000000..1bf132fe15 --- /dev/null +++ b/translated/tech/20160226 How to use Python to hack your Eclipse IDE.md @@ -0,0 +1,215 @@ +用Python打造你的Eclipse +============================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/lightbulb_computer_person_general_.png?itok=ZY3UuQQa) + +Eclipse高级脚本环境([EASE][1])项目虽然还在开发中,但是不是不得承认它非常强大,让我们可以快速打造自己的Eclipse开发环境. + +依据Eclipse强大的框架,可以通过其内建的插件系统全方面的扩展Eclipse.然而,编写和部署一个新的插件还是十分笨重,即使只是需要一个额外的小功能。但是,现在依托EASE,可以方便实用Python或者Javascript脚本语言来扩展。 + +本文中,根据我在今年北美的EclipseCon大会上的[演讲][2],我介绍包括安装Eclipse的Python和EASE环境,并包括使用强力Python来增压你的IDE。 + +### 安装并运行 "Hello World" + +本文中的例子使用Java实现的Python解释,Jython。Eclipse可以直接安装EASE环境。本例中使用Eclipse[Mars][3],它已经自带了EASE环境,包和Jython引擎。 + +使用Eclipse安装对话框(`Help>Install New Software`...),安装EASE[http://download.eclipse.org/ease/update/nightly][4] + +选择下列组件: + +- EASE Core feature + +- EASE core UI feature + +- EASE Python Developer Resources + +- EASE modules (Incubation) + +包括了EASE和模组。但是我们比较关心Resource包,此包可以访问Eclipse工作空间,项目和文件API。 + +![](https://opensource.com/sites/default/files/1_installease_nightly.png) + + +成功安装后,接下来安装Jython引擎[https://dl.bintray.com/pontesegger/ease-jython/][5].完成后,测试下。新建一个项目并新建一个hello.py文件,输入: + +``` +print "hello world" +``` + +选中这个文件,右击,选中'Run as -> EASE script'.这样就可以在控制台看到"Hello world"的输出. + +配置完成,现在就可以轻松使用Python来控制工作空间和项目了. + +### 提升你的代码质量 + +管理良好的代码质量本身是一件非常烦恼的事情,尤其是当需要处理一个大量代码库和要许多工程师参与的时候.而这些痛苦可以通过脚本来减轻,比如大量文字排版,或者[去掉文件中的unix行结束符][6]来使更容易比较.其他很棒的事情包括使用脚本让Eclipse markers高亮代码.这里有一些例子,你可以加入到task markers ,用"printStackTrace"方法在java文件中探测.请看[源码][7] + +运行,拷贝文件到工作空间,右击运行. + +``` +loadModule('/System/Resources') +``` + +from org.eclipse.core.resources import IMarker + +``` +for ifile in findFiles("*.java"): + file_name = str(ifile.getLocation()) + print "Processing " + file_name + with open(file_name) as f: + for line_no, line in enumerate(f, start=1): + if "printStackTrace" in line: + marker = ifile.createMarker(IMarker.TASK) + marker.setAttribute(IMarker.TRANSIENT, True) + marker.setAttribute(IMarker.LINE_NUMBER, line_no) + marker.setAttribute(IMarker.MESSAGE, "Fix in Sprint 2: " + line.strip()) + +``` + +如果你的任何java文件中包含了printStackTraces,你就可以看见编辑器的侧边栏上自动加上的标记. + +![](https://opensource.com/sites/default/files/2_codequality.png) + +### 自动构建繁琐任务 + +当同时工作在多个项目的时候,肯定需要需要完成许多繁杂,重复的任务.可能你需要在所有源文件头上加入CopyRight, 或者采用新框架时候自动更新文件.例如,当从Tycho迁移到Maven时候,我们给每一个项目必须添加pom.xml文件.使用Python可以很轻松的完成这个任务.只从Tycho提供无pom构建后,我们也需要移除不要的pom文件.同样,只需要几行代码就可以完成这个任务.例如,这里有个脚本可以在每一个打开的工作空间项目上加入README.md.请看源代码[add_readme.py][8]. + +拷贝文件到工作空间,右击并选择"Run as -> EASE script" + +loadModule('/System/Resources') + +``` +for iproject in getWorkspace().getProjects(): + if not iproject.isOpen(): + continue + + ifile = iproject.getFile("README.md") + + if not ifile.exists(): + contents = "# " + iproject.getName() + "\n\n" + if iproject.hasNature("org.eclipse.jdt.core.javanature"): + contents += "A Java Project\n" + elif iproject.hasNature("org.python.pydev.pythonNature"): + contents += "A Python Project\n" + writeFile(ifile, contents) +``` + +脚本结果会在打开的项目中加入README.md,java和Python项目还会自动加上一行描述. + +![](https://opensource.com/sites/default/files/3_tedioustask.png) + +### 构建新功能 + +Python脚本可以快速构建一些需要的附加功能,或者给团队和用户快速构建demo.例如,一个现在Eclipse目前不支持的功能,自动保存工作的文件.即使这个功能将会很快提供,但是你现在就可以马上拥有一个能30秒自动保存的编辑器.以下是主方法的片段.请看下列代码:[autosave.py][9] + +``` +def save_dirty_editors(): + workbench = getService(org.eclipse.ui.IWorkbench) + for window in workbench.getWorkbenchWindows(): + for page in window.getPages(): + for editor_ref in page.getEditorReferences(): + part = editor_ref.getPart(False) + if part and part.isDirty(): + print "Auto-Saving", part.getTitle() + part.doSave(None) +``` + +在运行脚本之前,你需要勾选'Allow Scripts to run code in UI thread'设定,这个设定在Window > Preferences > Scripting中.然后添加脚本到工作空间,右击和选择"Run as > EASE Script".每10秒自动保存的信息就会在控制台输出.关掉自动保存脚本,只需要在点击控制台的红色方框. + +![](https://opensource.com/sites/default/files/4_prototype.png) + +### 快速扩展用户界面 + +EASE最棒的事情是可以通过脚本与UI元素挂钩,可以调整你的IDE,例如,在菜单中新建一个按钮.不需要编写java代码或者新的插件,只需要增加几行代码. + +下面是一个简单的基脚本示例,用来产生三个新项目. + +``` +# name : Create fruit projects +# toolbar : Project Explorer +# description : Create fruit projects + +loadModule("/System/Resources") + +for name in ["banana", "pineapple", "mango"]: + createProject(name) +``` + +上述特别的EASE增加了一个按钮到项目浏览工具条.下面这个脚本是用来删除这三个项目.请看源码[createProjects.py][10]和[deleteProjects.py][11]. + +``` +# name :Delete fruit projects +# toolbar : Project Explorer +# description : Get rid of the fruit projects + +loadModule("/System/Resources") + +for name in ["banana", "pineapple", "mango"]: + project = getProject(name) + project.delete(0, None) +``` + +为了使脚本启动生效按钮,增加脚本到'ScriptsProject'文件夹.然后选择Windows > Preference > Scripting > Script 中定位到文件夹.点击'Add Workspace'按钮和选择ScriptProject项目.这个项目现在将会在启动时默认加载.你可以发现Project Explorer上出现了这两个按钮,这样你就可以通过这两个按钮快速增加删除项目. + +![](https://opensource.com/sites/default/files/5_buttons.png) + +### 整合三方工具 + +无论何时,你可能需要除了Eclipse生态系统以外的工具.这些时候你会发将他们包装在一个脚本来调用会非常方便.这里有一个简单的例子让你整合explorer.exe,并加入它到右键菜单栏,这样点击图标就可以打开浏览器浏览当前文件.请看源码[explorer.py][12] + +``` +# name : Explore from here +# popup : enableFor(org.eclipse.core.resources.IResource) +# description : Start a file browser using current selection +loadModule("/System/Platform") +loadModule('/System/UI') + +selection = getSelection() +if isinstance(selection, org.eclipse.jface.viewers.IStructuredSelection): + selection = selection.getFirstElement() + +if not isinstance(selection, org.eclipse.core.resources.IResource): + selection = adapt(selection, org.eclipse.core.resources.IResource) + +if isinstance(selection, org.eclipse.core.resources.IFile): + selection = selection.getParent() + +if isinstance(selection, org.eclipse.core.resources.IContainer): + runProcess("explorer.exe", [selection.getLocation().toFile().toString()]) +``` + +为了让菜单显示增加,像之前一样加入'ScriptProject'.在文件上右击,你看弹出菜单是不是出现了图标.选择Explore from here. + +![](https://opensource.com/sites/default/files/6_explorer.png) + +Eclipse高级基本环境提供一套很棒的扩展功能,使得Eclipse IDE能使用Python来轻易扩展.虽然这个项目还在婴儿期,但是[关于这个项目][13]更多更棒的功能也正在加紧开发中,如果你想为这个贡献,请到[论坛][14]讨论. + +2016年[Eclipsecon North America][15]会议将会发布更多EASE细节.我的演讲[Scripting Eclipse with Python][16]也会不单介绍Jython,也包括C-Python和其他功能性扩展的实战例子. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/how-use-python-hack-your-ide + +作者:[Tracy Miranda][a] +译者:[VicYu/Vic020](http://vicyu.net) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/tracymiranda +[1]: https://eclipse.org/ease/ +[2]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python +[3]: https://www.eclipse.org/downloads/packages/eclipse-ide-eclipse-committers-451/mars1 +[4]: http://download.eclipse.org/ease/update/nightly +[5]: https://dl.bintray.com/pontesegger/ease-jython/ +[6]: http://code.activestate.com/recipes/66434-change-line-endings/ +[7]: https://gist.github.com/tracymiranda/6556482e278c9afc421d +[8]: https://gist.github.com/tracymiranda/f20f233b40f1f79b1df2 +[9]: https://gist.github.com/tracymiranda/e9588d0976c46a987463 +[10]: https://gist.github.com/tracymiranda/55995daaea9a4db584dc +[11]: https://gist.github.com/tracymiranda/baa218fc2c1a8e898194 +[12]: https://gist.github.com/tracymiranda/8aa3f0fc4bf44f4a5cd3 +[13]: https://eclipse.org/ease/ +[14]: https://dev.eclipse.org/mailman/listinfo/ease-dev +[15]: https://www.eclipsecon.org/na2016 +[16]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python From ce273b97cd834b8e9ef48cc9f9300c541f85a226 Mon Sep 17 00:00:00 2001 From: willowyoung <1079902707@qq.com> Date: Tue, 12 Apr 2016 13:34:53 +0800 Subject: [PATCH 1241/1710] Translating by willowyoung --- ...ocessing at NASA with open source tools.md | 1 + ...Installed Help Documentations and Tools.md | 180 ----------------- ...leshoot Grand Unified Bootloader (GRUB).md | 185 ------------------ 3 files changed, 1 insertion(+), 365 deletions(-) delete mode 100644 sources/tech/LFCS/Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools.md delete mode 100644 sources/tech/LFCS/Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md diff --git a/sources/tech/20160304 Image processing at NASA with open source tools.md b/sources/tech/20160304 Image processing at NASA with open source tools.md index 7bf6d8297d..4833b7bf93 100644 --- a/sources/tech/20160304 Image processing at NASA with open source tools.md +++ b/sources/tech/20160304 Image processing at NASA with open source tools.md @@ -1,3 +1,4 @@ +Translating By willowyoung Image processing at NASA with open source tools ======================================================= diff --git a/sources/tech/LFCS/Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools.md b/sources/tech/LFCS/Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools.md deleted file mode 100644 index 45ccb57f95..0000000000 --- a/sources/tech/LFCS/Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools.md +++ /dev/null @@ -1,180 +0,0 @@ -Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools -================================================================================== - -Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Explore-Linux-with-Documentation-and-Tools.png) ->LFCS: Explore Linux with Installed Documentations and Tools – Part 12 - -Once you get used to working with the command line and feel comfortable doing so, you realize that a regular Linux installation includes all the documentation you need to use and configure the system. - -Another good reason to become familiar with command line help tools is that in the [LFCS][3] and [LFCE][4] exams, those are the only sources of information you can use – no internet browsing and no googling. It’s just you and the command line. - -For that reason, in this article we will give you some tips to effectively use the installed docs and tools in order to prepare to pass the **Linux Foundation Certification** exams. - -### Linux Man Pages - -A man page, short for manual page, is nothing less and nothing more than what the word suggests: a manual for a given tool. It contains the list of options (with explanation) that the command supports, and some man pages even include usage examples as well. - -To open a man page, use the **man command** followed by the name of the tool you want to learn more about. For example: - -``` -# man diff -``` - -will open the manual page for `diff`, a tool used to compare text files line by line (to exit, simply hit the q key.). - -Let’s say we want to compare two text files named `file1` and `file2` in Linux. These files contain the list of packages that are installed in two Linux boxes with the same distribution and version. - -Doing a `diff` between `file1` and `file2` will tell us if there is a difference between those lists: - -``` -# diff file1 file2 -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Compare-Two-Text-Files-in-Linux.png) ->Compare Two Text Files in Linux - -where the `<` sign indicates lines missing in `file2`. If there were lines missing in `file1`, they would be indicated by the `>` sign instead. - -On the other hand, **7d6** means line **#7** in file should be deleted in order to match `file2` (same with **24d22** and **41d38**), and 65,67d61 tells us we need to remove lines **65** through **67** in file one. If we make these corrections, both files will then be identical. - -Alternatively, you can display both files side by side using the `-y` option, according to the man page. You may find this helpful to more easily identify missing lines in files: - -``` -# diff -y file1 file2 -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Compare-and-List-Difference-of-Two-Files.png) ->Compare and List Difference of Two Files - -Also, you can use `diff` to compare two binary files. If they are identical, `diff` will exit silently without output. Otherwise, it will return the following message: “**Binary files X and Y differ**”. - -### The –help Option - -The `--help` option, available in many (if not all) commands, can be considered a short manual page for that specific command. Although it does not provide a comprehensive description of the tool, it is an easy way to obtain information on the usage of a program and a list of its available options at a quick glance. - -For example, - -``` -# sed --help -``` - -shows the usage of each option available in sed (the stream editor). - -One of the classic examples of using `sed` consists of replacing characters in files. Using the `-i` option (described as “**edit files in place**”), you can edit a file without opening it. If you want to make a backup of the original contents as well, use the `-i` option followed by a SUFFIX to create a separate file with the original contents. - -For example, to replace each occurrence of the word `Lorem` with `Tecmint` (case insensitive) in `lorem.txt` and create a new file with the original contents of the file, do: - -``` -# less lorem.txt | grep -i lorem -# sed -i.orig 's/Lorem/Tecmint/gI' lorem.txt -# less lorem.txt | grep -i lorem -# less lorem.txt.orig | grep -i lorem -``` - -Please note that every occurrence of `Lorem` has been replaced with `Tecmint` in `lorem.txt`, and the original contents of `lorem.txt` has been saved to `lorem.txt.orig`. - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Replace-A-String-in-File.png) ->Replace A String in Files - -### Installed Documentation in /usr/share/doc - -This is probably my favorite pick. If you go to `/usr/share/doc` and do a directory listing, you will see lots of directories with the names of the installed tools in your Linux system. - -According to the [Filesystem Hierarchy Standard][5], these directories contain useful information that might not be in the man pages, along with templates and configuration files to make configuration easier. - -For example, let’s consider `squid-3.3.8` (version may vary from distribution to distribution) for the popular HTTP proxy and [squid cache server][6]. - -Let’s `cd` into that directory: - -``` -# cd /usr/share/doc/squid-3.3.8 -``` - -and do a directory listing: - -``` -# ls -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/03/List-Files-in-Linux.png) ->Linux Directory Listing with ls Command - -You may want to pay special attention to `QUICKSTART` and `squid.conf.documented`. These files contain an extensive documentation about Squid and a heavily commented configuration file, respectively. For other packages, the exact names may differ (as **QuickRef** or **00QUICKSTART**, for example), but the principle is the same. - -Other packages, such as the Apache web server, provide configuration file templates inside `/usr/share/doc`, that will be helpful when you have to configure a standalone server or a virtual host, to name a few cases. - -### GNU info Documentation - -You can think of info documents as man pages on steroids. As such, they not only provide help for a specific tool, but also they do so with hyperlinks (yes, hyperlinks in the command line!) that allow you to navigate from a section to another using the arrow keys and Enter to confirm. - -Perhaps the most illustrative example is: - -``` -# info coreutils -``` - -Since coreutils contains the [basic file, shell and text manipulation utilities][7] which are expected to exist on every operating system, you can reasonably expect a detailed description for each one of those categories in info **coreutils**. - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Info-Coreutils.png) ->Info Coreutils - -As it is the case with man pages, you can exit an info document by pressing the `q` key. - -Additionally, GNU info can be used to display regular man pages as well when followed by the tool name. For example: - -``` -# info tune2fs -``` - -will return the man page of **tune2fs**, the ext2/3/4 filesystems management tool. - -And now that we’re at it, let’s review some of the uses of **tune2fs**: - -Display information about the filesystem on top of **/dev/mapper/vg00-vol_backups**: - -``` -# tune2fs -l /dev/mapper/vg00-vol_backups -``` - -Set a filesystem volume name (Backups in this case): - -``` -# tune2fs -L Backups /dev/mapper/vg00-vol_backups -``` - -Change the check intervals and `/` or mount counts (use the `-c` option to set a number of mount counts and `/` or the `-i` option to set a check interval, where **d=days, w=weeks, and m=months**). - -``` -# tune2fs -c 150 /dev/mapper/vg00-vol_backups # Check every 150 mounts -# tune2fs -i 6w /dev/mapper/vg00-vol_backups # Check every 6 weeks -``` - -All of the above options can be listed with the `--help` option, or viewed in the man page. - -### Summary - -Regardless of the method that you choose to invoke help for a given tool, knowing that they exist and how to use them will certainly come in handy in the exam. Do you know of any other tools that can be used to look up documentation? Feel free to share with the Tecmint community using the form below. - -Questions and other comments are more than welcome as well. - --------------------------------------------------------------------------------- - -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/installing-network-services-and-configuring-services-at-system-boot/ -[3]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ -[4]: http://www.tecmint.com/installing-network-services-and-configuring-services-at-system-boot/ -[5]: http://www.tecmint.com/linux-directory-structure-and-important-files-paths-explained/ -[6]: http://www.tecmint.com/configure-squid-server-in-linux/ -[7]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ -[8]: diff --git a/sources/tech/LFCS/Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md b/sources/tech/LFCS/Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md deleted file mode 100644 index cf24c51b58..0000000000 --- a/sources/tech/LFCS/Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md +++ /dev/null @@ -1,185 +0,0 @@ -Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB) -===================================================================================== - -Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Configure-Troubleshoot-Grub-Boot-Loader.png) ->LFCS: Configure and Troubleshoot Grub Boot Loader – Part 13 - -In this article we will introduce you to GRUB and explain why a boot loader is necessary, and how it adds versatility to the system. - -The [Linux boot process][3] from the time you press the power button of your computer until you get a fully-functional system follows this high-level sequence: - -* 1. A process known as **POST** (**Power-On Self Test**) performs an overall check on the hardware components of your computer. -* 2. When **POST** completes, it passes the control over to the boot loader, which in turn loads the Linux kernel in memory (along with **initramfs**) and executes it. The most used boot loader in Linux is the **GRand Unified Boot loader**, or **GRUB** for short. -* 3. The kernel checks and accesses the hardware, and then runs the initial process (mostly known by its generic name “**init**”) which in turn completes the system boot by starting services. - -In Part 7 of this series (“[SysVinit, Upstart, and Systemd][4]”) we introduced the [service management systems and tools][5] used by modern Linux distributions. You may want to review that article before proceeding further. - -### Introducing GRUB Boot Loader - -Two major **GRUB** versions (**v1** sometimes called **GRUB Legacy** and **v2**) can be found in modern systems, although most distributions use **v2** by default in their latest versions. Only **Red Hat Enterprise Linux 6** and its derivatives still use **v1** today. - -Thus, we will focus primarily on the features of **v2** in this guide. - -Regardless of the **GRUB** version, a boot loader allows the user to: - -* 1). modify the way the system behaves by specifying different kernels to use, -* 2). choose between alternate operating systems to boot, and -* 3). add or edit configuration stanzas to change boot options, among other things. - -Today, **GRUB** is maintained by the **GNU** project and is well documented in their website. You are encouraged to use the [GNU official documentation][6] while going through this guide. - -When the system boots you are presented with the following **GRUB** screen in the main console. Initially, you are prompted to choose between alternate kernels (by default, the system will boot using the latest kernel) and are allowed to enter a **GRUB** command line (with `c`) or edit the boot options (by pressing the `e` key). - -![](http://www.tecmint.com/wp-content/uploads/2016/03/GRUB-Boot-Screen.png) ->GRUB Boot Screen - -One of the reasons why you would consider booting with an older kernel is a hardware device that used to work properly and has started “acting up” after an upgrade (refer to [this link][7] in the AskUbuntu forums for an example). - -The **GRUB v2** configuration is read on boot from `/boot/grub/grub.cfg` or `/boot/grub2/grub.cfg`, whereas `/boot/grub/grub.conf` or `/boot/grub/menu.lst` are used in **v1**. These files are NOT to be edited by hand, but are modified based on the contents of `/etc/default/grub` and the files found inside `/etc/grub.d`. - -In a **CentOS 7**, here’s the configuration file that is created when the system is first installed: - -``` -GRUB_TIMEOUT=5 -GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" -GRUB_DEFAULT=saved -GRUB_DISABLE_SUBMENU=true -GRUB_TERMINAL_OUTPUT="console" -GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet" -GRUB_DISABLE_RECOVERY="true" -``` - -In addition to the online documentation, you can also find the GNU GRUB manual using info as follows: - -``` -# info grub -``` - -If you’re interested specifically in the options available for /etc/default/grub, you can invoke the configuration section directly: - -``` -# info -f grub -n 'Simple configuration' -``` - -Using the command above you will find out that `GRUB_TIMEOUT` sets the time between the moment when the initial screen appears and the system automatic booting begins unless interrupted by the user. When this variable is set to `-1`, boot will not be started until the user makes a selection. - -When multiple operating systems or kernels are installed in the same machine, `GRUB_DEFAULT` requires an integer value that indicates which OS or kernel entry in the GRUB initial screen should be selected to boot by default. The list of entries can be viewed not only in the splash screen shown above, but also using the following command: - -### In CentOS and openSUSE: - -``` -# awk -F\' '$1=="menuentry " {print $2}' /boot/grub2/grub.cfg -``` - -### In Ubuntu: - -``` -# awk -F\' '$1=="menuentry " {print $2}' /boot/grub/grub.cfg -``` - -In the example shown in the below image, if we wish to boot with the kernel version **3.10.0-123.el7.x86_64** (4th entry), we need to set `GRUB_DEFAULT` to `3` (entries are internally numbered beginning with zero) as follows: - -``` -GRUB_DEFAULT=3 -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Boot-System-with-Old-Kernel-Version.png) ->Boot System with Old Kernel Version - -One final GRUB configuration variable that is of special interest is `GRUB_CMDLINE_LINUX`, which is used to pass options to the kernel. The options that can be passed through GRUB to the kernel are well documented in the [Kernel Parameters file][8] and in [man 7 bootparam][9]. - -Current options in my **CentOS 7** server are: - -``` -GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet" -``` - -Why would you want to modify the default kernel parameters or pass extra options? In simple terms, there may be times when you need to tell the kernel certain hardware parameters that it may not be able to determine on its own, or to override the values that it would detect. - -This happened to me not too long ago when I tried **Vector Linux**, a derivative of **Slackware**, on my 10-year old laptop. After installation it did not detect the right settings for my video card so I had to modify the kernel options passed through GRUB in order to make it work. - -Another example is when you need to bring the system to single-user mode to perform maintenance tasks. You can do this by appending the word single to `GRUB_CMDLINE_LINUX` and rebooting: - -``` -GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet single" -``` - -After editing `/etc/defalt/grub`, you will need to run `update-grub` (Ubuntu) or `grub2-mkconfig -o /boot/grub2/grub.cfg` (**CentOS** and **openSUSE**) afterwards to update `grub.cfg` (otherwise, changes will be lost upon boot). - -This command will process the boot configuration files mentioned earlier to update `grub.cfg`. This method ensures changes are permanent, while options passed through GRUB at boot time will only last during the current session. - -### Fixing Linux GRUB Issues - -If you install a second operating system or if your GRUB configuration file gets corrupted due to human error, there are ways you can get your system back on its feet and be able to boot again. - -In the initial screen, press `c` to get a GRUB command line (remember that you can also press `e` to edit the default boot options), and use help to bring the available commands in the GRUB prompt: - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Fix-Grub-Issues-in-Linux.png) ->Fix Grub Configuration Issues in Linux - -We will focus on **ls**, which will list the installed devices and filesystems, and we will examine what it finds. In the image below we can see that there are 4 hard drives (`hd0` through `hd3`). - -Only `hd0` seems to have been partitioned (as evidenced by msdos1 and msdos2, where 1 and 2 are the partition numbers and msdos is the partitioning scheme). - -Let’s now examine the first partition on `hd0` (**msdos1**) to see if we can find GRUB there. This approach will allow us to boot Linux and there use other high level tools to repair the configuration file or reinstall GRUB altogether if it is needed: - -``` -# ls (hd0,msdos1)/ -``` - -As we can see in the highlighted area, we found the `grub2` directory in this partition: - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Grub-Configuration.png) ->Find Grub Configuration - -Once we are sure that GRUB resides in (**hd0,msdos1**), let’s tell GRUB where to find its configuration file and then instruct it to attempt to launch its menu: - -``` -set prefix=(hd0,msdos1)/grub2 -set root=(hd0,msdos1) -insmod normal -normal -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-and-Launch-Grub-Menu.png) ->Find and Launch Grub Menu - -Then in the GRUB menu, choose an entry and press **Enter** to boot using it. Once the system has booted you can issue the `grub2-install /dev/sdX` command (change `sdX` with the device you want to install GRUB on). The boot information will then be updated and all related files be restored. - -``` -# grub2-install /dev/sdX -``` - -Other more complex scenarios are documented, along with their suggested fixes, in the [Ubuntu GRUB2 Troubleshooting guide][10]. The concepts explained there are valid for other distributions as well. - -### Summary - -In this article we have introduced you to GRUB, indicated where you can find documentation both online and offline, and explained how to approach an scenario where a system has stopped booting properly due to a bootloader-related issue. - -Fortunately, GRUB is one of the tools that is best documented and you can easily find help either in the installed docs or online using the resources we have shared in this article. - -Do you have questions or comments? Don’t hesitate to let us know using the comment form below. We look forward to hearing from you! - --------------------------------------------------------------------------------- - -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/installing-network-services-and-configuring-services-at-system-boot/ -[3]: http://www.tecmint.com/linux-boot-process/ -[4]: http://www.tecmint.com/linux-boot-process-and-manage-services/ -[5]: http://www.tecmint.com/best-linux-log-monitoring-and-management-tools/ -[6]: http://www.gnu.org/software/grub/manual/ -[7]: http://askubuntu.com/questions/82140/how-can-i-boot-with-an-older-kernel-version -[8]: https://www.kernel.org/doc/Documentation/kernel-parameters.txt -[9]: http://man7.org/linux/man-pages/man7/bootparam.7.html -[10]: https://help.ubuntu.com/community/Grub2/Troubleshooting From 0e78d951d0d2d27d03dc4fdd6f9dee397aeae69c Mon Sep 17 00:00:00 2001 From: Zhengyu_Li Date: Tue, 12 Apr 2016 17:56:11 +0800 Subject: [PATCH 1242/1710] Delete 20160218 A Linux-powered microwave oven.md --- ...20160218 A Linux-powered microwave oven.md | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 sources/tech/20160218 A Linux-powered microwave oven.md diff --git a/sources/tech/20160218 A Linux-powered microwave oven.md b/sources/tech/20160218 A Linux-powered microwave oven.md deleted file mode 100644 index 47db1ae9d6..0000000000 --- a/sources/tech/20160218 A Linux-powered microwave oven.md +++ /dev/null @@ -1,51 +0,0 @@ -translating by yuba0604 -A Linux-powered microwave oven -================================================================================ - -Scratching an itch is a recurring theme in presentations at [linux.conf.au](http://linux.conf.au/). As the open-hardware movement gains strength, more and more of these itches relate to the physical world, not just the digital. David Tulloh used his [presentation [WebM]](http://mirror.linux.org.au/linux.conf.au/2016/04_Thursday/D4.303_Costa_Theatre/Linux_driven_microwave.webm) on the “Linux Driven Microwave” to discuss how annoying microwave ovens can be and to describe his project to build something less irritating. - -Tulloh's story began when he obtained a microwave oven, admittedly an inexpensive one, with a user interface even worse than the norm. Setting the time required pressing buttons so hard that the microwave tended to get pushed away — a fact that was elegantly balanced by the door handle requiring a sufficiently hard tug to return the oven to its original position. While this is clearly an extreme case, Tulloh lamented that microwave ovens really hadn't improved noticeably in recent decades. They may have gotten a little cheaper and gained a few features that few people could use without poring over the instruction manual — the implied contrast to smartphones, which are widely used with little instruction, was clear. - -This microwave oven was not a lost cause — it gave its life to the greater good and became the prototype for an idea that Tulloh hopes to turn into a crowd-funded project if he can find the right match between features and demand: a Linux-driven microwave oven. - -![](https://static.lwn.net/images/2016/lca-oven-sm.jpg) - -## Adding novelty - -Adding a smartphone-like touchscreen and a network connection and encouraging a community to build innovative apps such as recipe sharing are fairly obvious ideas once you think to put “Linux” and “microwave oven” together, but Tulloh's vision and prototype lead well beyond there. Two novel features that have been fitted are a thermal camera and a scale for measuring weight. - -The thermal camera provides an eight-by-eight-pixel image of the contents of the oven with a precision of about two degrees. This is enough to detect if a glass of milk is about to boil over, or if the steak being thawed is in danger of getting cooked. In either case, the power can be reduced or removed. If appropriate, an alert can be sounded. This would not be the first microwave to be temperature sensitive — GE sold microwave ovens with temperature probes decades ago — but an always-present sensor is much more useful than a manually inserted probe, especially when there is an accessible API behind it. - -The second innovation is a built-in scale to weigh the food (and container) being cooked. Many recipes give cooking-time guidance based on weight and some microwave ovens allow you to enter the weight manually so it can do a calculation for you. With built-in scales, that can become automatic. Placing a scale reliably under the rotating plate typical of many microwave ovens would be a mechanical challenge that Tulloh did not think worth confronting. Instead his design is based on the “flat-plate” or “flat-bed” style of oven — placing a sensor at each of the four corners is mechanically straightforward and gives good results. - - [User interface] -Once you have these extra sensors — weight and temperature — connected to a suitable logic engine, more interesting possibilities can be explored. A cup of cold milk from the fridge will have a particular weight and temperature profile with a modest degree of error. Tulloh suggested that situation could be detected and some relevant options such as “Boil” or “Warm” could be offered for easy selection (a mock up of the interface is at right, a clickable version is [here](http://mwgui.tulloh.id.au/)). Simple machine learning could extend this to create a personalized experience. It would be easy to collect a history of starting profiles and cooking choices; when those patterns are detected, the most likely cooking choices could be made the easiest to select. - -![](https://static.lwn.net/images/2016/lca-ovengui-sm.png) - -## Overcoming staleness - -Beyond just new functionality, Tulloh wants to improve the functionality that already exists. Door handles as stiff as on Tulloh's cheap microwave may not be common, but few microwave oven doors seem designed to make life easy for people with physical handicaps. There are regulatory restrictions, particularly in the US, that require the oven to function only if there is positive confirmation that the door is actually shut. This confirmation must be resilient against simple fraud, so poking a stick in the hole must not trick the oven into working with the door open. In fact, there must be two independent confirmations and, if they disagree, a fuse must be blown so that a service call is required. Tulloh believes that a magnetic latch would provide much greater flexibility (including easy software control) and that magnetic keying similar to that used in a [magnetic keyed lock](https://en.wikipedia.org/wiki/Magnetic_keyed_lock) would allow the magnetic latch to pass certification. - -Another pain point with microwave ovens is the annoying sounds they make. Tulloh has discarded the beeper and hooked up a speaker to the Banana Pi that is controlling his prototype. This allows for more pleasant and configurable alerts as well as for advice and guidance through a text-to-speech system. Adding a microphone for voice control is an obvious next step. - -Many microwave ovens can do more than just set a time and a power level — they provide a range of power profiles for cooking, warming, defrosting, and so on. Adding precise temperature sensing will allow the community to extend this range substantially. A question from Andrew Tridgell in the audience wondered if tempering chocolate — a process that requires very precise temperature control — would be possible. Tulloh had no experience with the process, and couldn't make promises, but thought it was certainly worth looking in to. Even if that doesn't work out, it shows clear potential for value to be gained from community input. - -## Availability - -Tulloh would very much like to get these Linux-enabled microwave ovens out into the world to create a community and see where it goes. Buying existing ovens and replacing the electronics is not seen as a viable option. The result would be ugly and, given that a small-run smart microwave will inevitably cost more, potential buyers are going to want something that doesn't look completely out of place in their kitchen. - -Many components are available off-the-shelf (magnetron, processor board, thermal sensor) and others, such as a USB interface for the thermal sensor, are easily built. Prototype software is, of course, already available on [GitHub](https://github.com/lod?tab=repositories). The case and door are more of a challenge and would need to be made to order. Tulloh wants to turn this adversity into an opportunity by providing the option for left-handed microwave ovens and a variety of colors. - -A quick survey of the audience suggested that few people would hastily commit to his target price of $AU1000 for a new, improved, open oven. Whether a bit more time for reflection and a wider audience might tip the balance is hard to know. The idea is intriguing, so it seems worth watching Tulloh's [blog](http://david.tulloh.id.au/category/microwave/) for updates. - - ------------------------------------------------------------------------------- - -via: https://lwn.net/Articles/674877/ - -作者:Neil Brown -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 5b52719582d612112e7bade6297325b61b3a1a83 Mon Sep 17 00:00:00 2001 From: Zhengyu_Li Date: Tue, 12 Apr 2016 17:58:18 +0800 Subject: [PATCH 1243/1710] =?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 --- .../tech/A Linux-powered microwave oven | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 translated/tech/A Linux-powered microwave oven diff --git a/translated/tech/A Linux-powered microwave oven b/translated/tech/A Linux-powered microwave oven new file mode 100644 index 0000000000..57aaace3a7 --- /dev/null +++ b/translated/tech/A Linux-powered microwave oven @@ -0,0 +1,55 @@ +一个Linux驱动的微波炉 +================================================================================ + +[linux.conf.au](http://linux.conf.au/)里的人们都有一种想到什么就动手去实现的想法。随着硬件开源运动不断地发展壮大,这种想法越来越多,与现实世界联系的越来越紧密,而不仅仅存在于数字世界中。David Tulloh用他制作的[Linux驱动的微波炉 [WebM]](http://mirror.linux.org.au/linux.conf.au/2016/04_Thursday/D4.303_Costa_Theatre/Linux_driven_microwave.webm)来展示一个差劲的微波炉会多么难用以及说明他的项目可以改造这些微波炉使得它们不那么讨人厌。 + +Tulloh的故事要从他买到了一个公认很便宜的微波炉开始说起,它的用户界面比其它微波炉默认的还要糟糕。设定时间时必须使劲按按钮以至于把微波炉都向后推了一段距离——而事实上必须要用力拉仓门把手才能把微波炉拖回原来的位置,这形成了一个“优雅”的平衡。当然这只是极端情况。Tulloh很郁闷因为这个微波炉近十年来都没有一丁点明显的改善。他可能买到了一个又小又便宜的微波炉,而且特点是大部分人不研究使用手册就不会使用它——和智能手机的对比更加明显:智能手机只需知道一点点的操作指南并且被广泛使用。 + +改造这个微波炉不一定没有前途,“让微波炉重获新生”——这个想法成为了一个原型,如果Tulloh可以再平衡一下想做的功能和需求之间的关系的话他希望这变成一个众筹项目:一个Linux驱动的微波炉。 + +![](https://static.lwn.net/images/2016/lca-oven-sm.jpg) + +## 加一点新奇的小玩意 + + + +如果你把“Linux”和“微波炉”联系在一起的话就可能想到给微波炉加上一个智能手机式的触摸屏和网络链接,然后再通过社区做一款微波炉的“革命性”的手机应用,想到这些就像做菜想到分享食谱一样显而易见。但Tulloh的目标和他的原型远远超过这些,他做了两个新奇的功能——热感相机和称量物体质量的称重装置。 + +这个热感相机提供一个精确度两自由度的八乘八像素的图片,这足够发现一杯牛奶是否加热到沸腾或者牛排是否解冻到快不能用来烹饪。不论发生哪种情况,功率都可以减小或者关掉。而且在必要的时候会发出警报。这可能不是第一个可以检测温度的微波炉——GE在十年前就开始卖带温度探针的微波炉了——但是一个一直工作的内置传感器比一个手工探针有用多了尤其是有一个可用的API支持的时候。 + +第二个新发明是一个嵌入的称重装置,它可以在加热之前称量食物(和容器)。很多食谱根据质量给出指导的烹饪时间,很多微波炉支持你手动输入质量以便它帮你计算。利用内置的称重装置,这一过程可以变成自动化的。在许多微波炉的转盘下面稳固地放置一个称重装置是一个机械方面的挑战不过Tulloh觉得这个问题不难处理。反而他对微波炉的设计是基于“平板”或者“平板挂车”的风格——在四角各放置一个传感器,这不仅在机械实现上很简单而且很好的达到了要求。 + + +[用户界面] +一旦你有了这些额外添加的并与逻辑引擎相连的质量温度传感器,你可以去尝试更多好玩的可能。一杯刚从冰箱里拿出来的冰牛奶的质量温度分布可能会有适度误差。Tulloh发现这种情况可以被检测到而且提供一些有关的像“煮沸”或者“加热”的选项也是容易做到的(下面有一个模拟的界面,可点击操作的版本请点击右边链接 [here](http://mwgui.tulloh.id.au/)) + +![](https://static.lwn.net/images/2016/lca-ovengui-sm.png) + +## 改造陈旧的东西 + +除了才开发出来的新功能,Tulloh还想要提升那些原本就提供的功能。可能不是所有微波炉的门把手都像Tulloh那个廉价的一样僵硬,但是很少有微波炉将把手设计的让残疾人也能轻松使用。这些缺陷都是可调整的,尤其是在美国,微波炉应该在仓门关闭的时候给出一个确定关闭的提示。这种确认必须是可靠的以预防那些伪劣产品,所以在仓门闭合时固定的槽位里添加一个短杆以确认仓门开闭状态,不误使微波炉在仓门开着的时候工作。事实上,必须要两个相互联系的机关,如果他们提供的结果不一致, +保险丝必须断开以便启动一个呼叫服务。Tulloh认为提供一个磁力门闩有更大的灵活性(包含简单的软件控制)并且像磁控也同样用于[磁性钥匙锁](https://en.wikipedia.org/wiki/Magnetic_keyed_lock),它可以让磁力门闩确认微波炉门是否关闭。 + +微波炉的另一个痛点是它会发出令人厌烦的声音。Tulloh去掉了蜂鸣器并且使用香蕉派(类似于树莓派的单片机开发板)控制他的微波炉。这可以通过一个把文本转换成语音的系统来用令人愉悦而且可配置的警报来提示和引导使用者。显然,下一步就是装上一个用来控制声音的扩音器。 + + +许多微波炉除了定时和设置功率档位之外还可以做更多的事情——它们为烹饪,加热,化冻等提供一系列的功率谱。加上一个精确的温度测量装置感觉会为这个图表大大扩展它们的序列。Andrew Tridgell对一个问题很好奇,加热巧克力——一个需要非常精确的温度控制的过程——是否是可能的。Tulloh没有过这方面的经验,他不敢保证这个一定可以,但是这个实验结果的确值得期待。即使没做成这件事,它也显出了潜在价值——社区接下来可以更进一步去做这件事。 + +## 实用性怎么样? + +Tulloh十分乐意向全世界分享这个linux驱动的微波炉,他希望看到(因为这件事)形成一个社区并且想看到它接下来的走势。买一个现成的微波炉并且替换掉里面的电子元件看起来不是一个可行的点子。最后的结果可能会很糟,而买一个小巧智能的微波炉必然要花掉(比自己改造)更多的钱,但是潜在的顾客不想在他们的厨房里看到乱七八糟又不协调的东西。 + +许多零件都是现成的可以买到的(磁电管,处理器板,热传感器等等),像USB接口的热传感器,而且都很容易安装。软件原型当然也开源在[GitHub](https://github.com/lod?tab=repositories)。这个样例和微波炉门有不小的挑战性并且很可能要定制。Tulloh想要通过提供左侧开仓门的微波炉和颜色多样化的选项来转逆境为机遇。 + +一个对读者的快速调查:很少有人会贸然承诺他会为了一个全新的升级过的烤箱付出1000澳大利亚元。当然,很难知道是否会有充足的时间和足够多的读者来完成这个调查。这整个项目看起来很有趣。所以Tulloh的[博客](http://david.tulloh.id.au/category/microwave/) (点击这里)也很值得一看。 + +------------------------------------------------------------------------------ + +via: https://lwn.net/Articles/674877/ + +作者:Neil Brown +译者:yuba0604(https://github.com/yuba0604) + +译者水平有限,敬请指正。(lizhengyu@gmail.com) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 02d1c429269ad702c1dffc8f82ad7b79242f6849 Mon Sep 17 00:00:00 2001 From: Zhengyu_Li Date: Tue, 12 Apr 2016 18:00:02 +0800 Subject: [PATCH 1244/1710] Rename A Linux-powered microwave oven to 20160218 A Linux-powered microwave oven.md --- ... microwave oven => 20160218 A Linux-powered microwave oven.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{A Linux-powered microwave oven => 20160218 A Linux-powered microwave oven.md} (100%) diff --git a/translated/tech/A Linux-powered microwave oven b/translated/tech/20160218 A Linux-powered microwave oven.md similarity index 100% rename from translated/tech/A Linux-powered microwave oven rename to translated/tech/20160218 A Linux-powered microwave oven.md From f910ab4e4be940e36017954a5a87ff58b8e3f24c Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 12 Apr 2016 19:37:50 +0800 Subject: [PATCH 1245/1710] translating --- ...nter Admin Suite Should Bring Order to Containerization.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md b/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md index 48ea41d7b3..8e33955b14 100644 --- a/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md +++ b/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md @@ -1,3 +1,5 @@ +translating---geekpi + New Docker Data Center Admin Suite Should Bring Order to Containerization =============================================================================== @@ -47,3 +49,5 @@ via: http://linoxide.com/linux-how-to/calico-virtual-private-networking-docker/ [a]:http://techcrunch.com/author/ron-miller/ [1]: https://www.docker.com/ [2]: http://techcrunch.com/2014/08/04/docker-sells-dotcloud-to-cloudcontrol-to-focus-on-core-container-business/ + + From ab521a4767c396498d9fb272341657c2df9ebcae Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 12 Apr 2016 21:07:23 +0800 Subject: [PATCH 1246/1710] translated --- ... Should Bring Order to Containerization.md | 53 ------------------- ... Should Bring Order to Containerization.md | 50 +++++++++++++++++ 2 files changed, 50 insertions(+), 53 deletions(-) delete mode 100644 sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md create mode 100644 translated/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md diff --git a/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md b/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md deleted file mode 100644 index 8e33955b14..0000000000 --- a/sources/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md +++ /dev/null @@ -1,53 +0,0 @@ -translating---geekpi - -New Docker Data Center Admin Suite Should Bring Order to Containerization -=============================================================================== - -![](https://tctechcrunch2011.files.wordpress.com/2016/02/shutterstock_119411227.jpg?w=738) - -[Docker][1] announced a new container control center today it’s calling the Docker Datacenter (DDC), an integrated administrative console that has been designed to give large and small businesses control over creating, managing and shipping containers. - -The DDC is a new tool made up of various commercial pieces including Docker Universal Control Plane (which also happens to be generally available today) and Docker Trusted Registry. It also includes open source pieces such as Docker Engine. The idea is to give companies the ability to manage the entire lifecycle of Dockerized applications from one central administrative interface. - -Customers actually were the driving force behind this new tool. While companies liked the agility that Docker containers give them, they also wanted management control over administration, security and governance around the containers they were creating and shipping, Scott Johnston, SVP of product management told TechCrunch. - -The company has called this Containers as a Service (CaaS), mostly because when customers came to them asking for this type of administrative control, that’s how they described it, Johnston said. - - -![](https://tctechcrunch2011.files.wordpress.com/2016/02/screen-shot-2016-02-23-at-7-56-54-am.png?w=680&h=401) - ->Image courtesy of Docker - -Like many open source projects, Docker gained a strong following among developers first, but as it grew in popularity, the companies these developers were working for wanted a straight-forward way to track and manage them. - -That’s exactly what DDC is designed to do. It gives developers the agility they need to create containerized applications, while providing operations with the tools they need to bring order to the process. - -In practice this means that developers can create a set of containerized components, have them approved for deployment by operations and then have access to a library of fully certified images. This lets developers pull the pieces they need across a range of applications without having to reinvent the wheel every time. That should speed up application development and deployment (and add to the agility that containers should in theory be providing in the first place). - -This aspect appealed to Beta customer ADP. The payroll services giant particularly liked having this central repository of images available to developers. - -“As part of our initiative to modernize our business-critical applications to microservices, ADP has been investigating solutions that would enable our developers to leverage a central library of IT-vetted and secured core services that they could rapidly iterate on,” said Keith Fulton, Chief Technology Officer at ADP said in a statement. - -Docker was launched in 2010 by founder Solomon Hykes as dotCloud. He pivoted the company to Docker in 2013, [selling dotCloud in August][2], 2014 to focus completely on Docker. - -The company came out of the gate like gangbusters a couple of years ago raising $180 million ($168 million since becoming Docker) over five rounds, according to CrunchBase. What caught the attention of investors was that Docker offered a way to deliver applications for the modern age called containers, a way of building, managing and shipping distributed applications. - -Containerization enables developers to create these distributed applications made up of small discrete pieces that run across multiple servers, as opposed to the large monolithic applications companies used to create running on a single server. - -Pricing for Docker Datacenter starts at $150 per node per month. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/calico-virtual-private-networking-docker/ - -作者:[ Ron Miller][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://techcrunch.com/author/ron-miller/ -[1]: https://www.docker.com/ -[2]: http://techcrunch.com/2014/08/04/docker-sells-dotcloud-to-cloudcontrol-to-focus-on-core-container-business/ - - diff --git a/translated/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md b/translated/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md new file mode 100644 index 0000000000..147294c547 --- /dev/null +++ b/translated/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md @@ -0,0 +1,50 @@ +新的Docker数据中心管理套件使容器化变得更加井然有序 +=============================================================================== + +![](https://tctechcrunch2011.files.wordpress.com/2016/02/shutterstock_119411227.jpg?w=738) + +[Docker][1]今天宣布了一个新的容器控制中心,称为Docker数据中心(DDC),被设计用于大型和小型企业能够创建、管理和分发容器的一个集成管理控制台。 + +DDC是由包括Docker Universal Control Plane(也是今天发布)和Docker Trusted Registry等不同的商业组件组成。它也包括了开源组件比如Docker Engine。这个主意能让公司能够在一个中心管理界面中就能够管理整个Docker化程序的生命周期。 + +产品SVP Scott Johnston告诉TechCrunch:“客户催使了这个新工具的产生。公司不仅喜欢Docker给他们带来的敏捷性,它们也希望在创建和分发容器的过程中可以进行行政、安全和管理。” + +Johnston说:“公司称这个为容器即服务(Caas),大多是是因为当客户来询问这个管理的类型时,它们是这样描述的。” + +![](https://tctechcrunch2011.files.wordpress.com/2016/02/screen-shot-2016-02-23-at-7-56-54-am.png?w=680&h=401) + +>Docker免费镜像 + +像许多开源项目那样,Docker首先获得了许多开发者的追随,但是它也很快在那些想直接追踪管理它们的开发者的公司中流行。 + +这就是DDC设计的目的。它给开发者创建容器化应用的敏捷性,也让运维变得井井有条。 + +实际中这意味着开发者可以创建一系列容器化的组件,批准部署后就可以获得一个完全认证的镜像。这可以让开发这一系列的程序中拉取他们所需而不必每次重新发明轮子。这可以加速应用的开发和部署(理论上提升了容器提供的灵活性)。 + +这方面吸引了Beta客户ADP。工资服务业巨头特别喜欢让这个中心镜像仓库提供给开发人员。 + +ADP的CTO Keith Fulton在声明中称:“作为我们将关键业务微服务化倡议的一部分,ADP正在研究能够然开发人员可以利用IT审核过的中央库和安全的核心服务进行快速迭代的方案。” + +Docker在2010年由dotcloud的Solomon Hykes发布。他在2013年将公司的重心移到Docker上,并在[8月dotCloud][2],2014年完全聚焦在Docker上。 + +根据CrunchBase的消息,公司几年来在5轮融资后势如破竹般获得了1亿8000万美元融资(自从成为Docker后获得了1亿6千8百万美元)。吸引投资者关注的是Docker提供了一种称为容器的现在分发应用的方式,可以构建、管理何分发分布式应用。 + +容器化可以让开发者创建由多个小的分布在不同服务器上的分布式应用,而不是一个运行在一个单独服务器上的独立应用。 + +DDC每月每节点150美金起。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/calico-virtual-private-networking-docker/ + +作者:[ Ron Miller][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://techcrunch.com/author/ron-miller/ +[1]: https://www.docker.com/ +[2]: http://techcrunch.com/2014/08/04/docker-sells-dotcloud-to-cloudcontrol-to-focus-on-core-container-business/ + + From f7f4b9bf2805629699c786860cd07e4c2cd0a677 Mon Sep 17 00:00:00 2001 From: Zhengyu_Li Date: Wed, 13 Apr 2016 20:02:26 +0800 Subject: [PATCH 1247/1710] Update 20160314 Healthy Open Source.md Translating by yuba0604 --- sources/tech/20160314 Healthy Open Source.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160314 Healthy Open Source.md b/sources/tech/20160314 Healthy Open Source.md index b36b516758..57dd559284 100644 --- a/sources/tech/20160314 Healthy Open Source.md +++ b/sources/tech/20160314 Healthy Open Source.md @@ -1,3 +1,4 @@ +Translating by yuba0604 Healthy Open Source ============================ From 05ccef7a899c85f83a311abc220539e3b7c5849c Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Apr 2016 15:18:37 +0800 Subject: [PATCH 1248/1710] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E8=B6=85=E6=9C=9F?= =?UTF-8?q?=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bestony @bioIkke @GHLandy @RickyGong @CoderBOBO @zpl1025 注意,文件丢了一个扩展名。 --- .../news/20160129 Recognizing correct code.md | 53 --- ...rom Facebook, IBM, Yahoo, and more news.md | 72 ---- ...ased ahead of impending OpenSSL updates.md | 42 --- ...nced-Based-on-Debian-GNU-Linux 8 Jessie.md | 40 --- ... open source board games to play online.md | 194 ---------- ...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 ------------ ...s--Linus Torvalds Answers Your Question.md | 186 ---------- ...cketing System in Fedora 22 or Centos 7.md | 1 - ...tall Pure-FTPd with TLS on FreeBSD 10.2.md | 154 -------- ...0151227 Ubuntu Touch, three years later.md | 68 ---- ...eps to Start Your Linux SysAdmin Career.md | 1 - ...to Best Manage Encryption Keys on Linux.md | 2 - ...Systems Patched for Critical glibc Flaw.md | 2 - ...er Tools With Wercker’s Open Source CLI.md | 1 - ... => 20160314 15 podcasts for FOSS fans.md} | 0 19 files changed, 2161 deletions(-) delete mode 100644 sources/news/20160129 Recognizing correct code.md delete mode 100644 sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md delete mode 100644 sources/news/20160229 Node.js 5.7 released ahead of impending OpenSSL updates.md delete mode 100644 sources/news/20160318 Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md delete mode 100644 sources/share/20150901 5 best open source board games to play online.md delete mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md delete mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source applications.md delete mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source big data tools.md delete mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source data center and cloud software.md delete mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source desktop and mobile software.md delete mode 100644 sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md delete mode 100644 sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md delete mode 100644 sources/tech/20151227 Ubuntu Touch, three years later.md rename sources/tech/{20160314 15 podcasts for FOSS fans => 20160314 15 podcasts for FOSS fans.md} (100%) diff --git a/sources/news/20160129 Recognizing correct code.md b/sources/news/20160129 Recognizing correct code.md deleted file mode 100644 index 60b94b895d..0000000000 --- a/sources/news/20160129 Recognizing correct code.md +++ /dev/null @@ -1,53 +0,0 @@ -# Recognizing correct code - -Automatic bug-repair system fixes 10 times as many errors as its predecessors. ------- -DongShuaike is translating. - -MIT researchers have developed a machine-learning system that can comb through repairs to open-source computer programs and learn their general properties, in order to produce new repairs for a different set of programs. - -The researchers tested their system on a set of programming errors, culled from real open-source applications, that had been compiled to evaluate automatic bug-repair systems. Where those earlier systems were able to repair one or two of the bugs, the MIT system repaired between 15 and 18, depending on whether it settled on the first solution it found or was allowed to run longer. - -While an automatic bug-repair tool would be useful in its own right, professor of electrical engineering and computer science Martin Rinard, whose group developed the new system, believes that the work could have broader ramifications. - -“One of the most intriguing aspects of this research is that we’ve found that there are indeed universal properties of correct code that you can learn from one set of applications and apply to another set of applications,” Rinard says. “If you can recognize correct code, that has enormous implications across all software engineering. This is just the first application of what we hope will be a brand-new, fabulous technique.” - -Fan Long, a graduate student in electrical engineering and computer science at MIT, presented a paper describing the new system at the Symposium on Principles of Programming Languages last week. He and Rinard, his advisor, are co-authors. - -Users of open-source programs catalogue bugs they encounter on project websites, and contributors to the projects post code corrections, or “patches,” to the same sites. So Long was able to write a computer script that automatically extracted both the uncorrected code and patches for 777 errors in eight common open-source applications stored in the online repository GitHub. - -**Feature performance** - -As with [all][1] machine-learning systems, the crucial aspect of Long and Rinard’s design was the selection of a “[feature set][2]” that the system would analyze. The researchers concentrated on values stored in memory — either variables, which can be modified during a program’s execution, or constants, which can’t. They identified 30 prime characteristics of a given value: It might be involved in an operation, such as addition or multiplication, or a comparison, such as greater than or equal to; it might be local, meaning it occurs only within a single block of code, or global, meaning that it’s accessible to the program as a whole; it might be the variable that represents the final result of a calculation; and so on. - -Long and Rinard wrote a computer program that evaluated all the possible relationships between these characteristics in successive lines of code. More than 3,500 such relationships constitute their feature set. Their machine-learning algorithm then tried to determine what combination of features most consistently predicted the success of a patch. - -“All the features we’re trying to look at are relationships between the patch you insert and the code you are trying to patch,” Long says. “Typically, there will be good connections in the correct patches, corresponding to useful or productive program logic. And there will be bad patterns that mean disconnections in program logic or redundant program logic that are less likely to be successful.” - -**Ranking candidates** - -In earlier work, Long had developed an algorithm that attempts to repair program bugs by systematically modifying program code. The modified code is then subjected to a suite of tests designed to elicit the buggy behavior. This approach may find a modification that passes the tests, but it could take a prohibitively long time. Moreover, the modified code may still contain errors that the tests don’t trigger. - -Long and Rinard’s machine-learning system works in conjunction with this earlier algorithm, ranking proposed modifications according to the probability that they are correct before subjecting them to time-consuming tests. - -The researchers tested their system, which they call Prophet, on a set of 69 program errors that had cropped up in eight popular open-source programs. Of those, 19 are amenable to the type of modifications that Long’s algorithm uses; the other 50 have more complicated problems that involve logical inconsistencies across larger swaths of code. - -When Long and Rinard configured their system to settle for the first solution that passed the bug-eliciting tests, it was able to correctly repair 15 of the 19 errors; when they allowed it to run for 12 hours per problem, it repaired 18. - -Of course, that still leaves the other 50 errors in the test set untouched. In ongoing work, Long is working on a machine-learning system that will look at more coarse-grained manipulation of program values across larger stretches of code, in the hope of producing a bug-repair system that can handle more complex errors. - -“A revolutionary aspect of Prophet is how it leverages past successful patches to learn new ones,” says Eran Yahav, an associate professor of computer science at the Technion in Israel. “It relies on the insight that despite differences between software projects, fixes — patches — applied to projects often have commonalities that can be learned from. Using machine learning to learn from ‘big code’ holds the promise to revolutionize many programming tasks — code completion, reverse-engineering, et cetera.” - --------------------------------------------------------------------------------- - -via: http://news.mit.edu/2016/faster-automatic-bug-repair-code-errors-0129 - -作者:Larry Hardesty -译者:[译者ID](https://github.com/翻译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://news.mit.edu/2013/teaching-computers-to-see-by-learning-to-see-like-computers-0919 -[2]:http://news.mit.edu/2015/automating-big-data-analysis-1016 - diff --git a/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md b/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md deleted file mode 100644 index 518256d0e9..0000000000 --- a/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md +++ /dev/null @@ -1,72 +0,0 @@ -Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news -=========================================================================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/weekly_news_roundup_tv.png?itok=eqUoW1gU) - -In this week's edition of our open source news roundup, we take a look at the new IoT project from the Linux Foundation, three big corporations releasing open source, and more. - -**News roundup for February 21 - 26, 2016** - -### Linux Foundation unveils the Zephyr Project - -The Internet of Things (IoT) is shaping up to be the next big thing in consumer technology. At the moment, most IoT solutions are proprietary and closed source. Open source is making numerous in-roads into the IoT world, and that's undoubtedly going to accelerate now that the Linux Foundation has [announced the Zephyr Project][1]. - -The Zephyr Project, according to ZDNet, "hopes to bring vendors and developers together under a single operating system which could make the development of connected devices an easier, less expensive and more stable process." The Project "aims to incorporate input from the open source and embedded developer communities and to encourage collaboration on the RTOS (real-time operating system)," according to the [Linux Foundation's press release][2]. - -Currently, Intel Corporation, NXP Semiconductors N.V., Synopsys, Inc., and UbiquiOS Technology Limited are the main supporters of the project. The Linux Foundation intends to attract other IoT vendors to this effort as well. - -### Releases from Facebook, IBM, Yahoo - -As we all know, open source isn't just about individuals or small groups hacking on code and hardware. Quite a few large corporations have significant investments in open source. This past week, three of them affirmed their commitment to open source. - -Yahoo again waded into open source waters this week with the [release of CaffeOnSpark][3] artificial intelligence software under an Apache 2.0 license. CaffeOnSpark performs "a popular type of AI called 'deep learning' on the vast swaths of data kept in its Hadoop open-source file system for storing big data," according to VentureBeat. If you're curious, you can [find the source code on GitHub][4]. - -Earlier this week, Facebook "[unveiled a new project that seeks not only to accelerate the evolution of technologies that drive our mobile networks, but to freely share this work with the world’s telecoms][5]," according to Wired. The company plans to build "everything from new wireless radios to nee optical fiber equipment." The designs, according to Facebook, will be open source so any telecom firm can use them. - -As part of the [Open Mainframe Project][6], IBM has open sourced the code for its Anomaly Detection Engine (ADE) for Linux logs. [According to IBM][7], "ADE detects anomalous time slices and messages in Linux logs using statistical learning" to detect suspicious behaviour. You can grab the [source code for ADE][8] from GitHub. - -### European Union to fund research - -The European Research Council, the European Union's science and technology funding body, is [funding four open source research projects][9] to the tune of about €2 million. According to joinup.ec.europa.eu, the projects being funded are: - -- A code audit of Mozilla's open source Rust programming language - -- An initiative at INRIA (France's national computer science research center) studying secure programming - -- A project at Austria's Technische Universitat Graz testing "ways to secure code against attacks that exploit certain properties of the computer hardware" - -- The "development of techniques to prove popular cryptographic protocols and schemes" at IST Austria - -### In other news - -- [Infosys' newest weapon: open source][10] - -- [Intel demonstrates Android smartphone running a Linux desktop][11] - -- [BeeGFS file system goes open source][12] - -A big thanks, as always, to the Opensource.com moderators and staff for their help this week. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/2/weekly-news-feb-26 - -作者:[Scott Nesbitt][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[1]: http://www.zdnet.com/article/the-linux-foundations-zephyr-project-building-an-operating-system-for-iot-devices/ -[2]: http://www.linuxfoundation.org/news-media/announcements/2016/02/linux-foundation-announces-project-build-real-time-operating-system -[3]: http://venturebeat.com/2016/02/24/yahoo-open-sources-caffeonspark-deep-learning-framework-for-hadoop/ -[4]: https://github.com/yahoo/CaffeOnSpark -[5]: http://www.wired.com/2016/02/facebook-open-source-wireless-gear-forge-5g-world/ -[6]: https://www.openmainframeproject.org/ -[7]: http://openmainframeproject.github.io/ade/ -[8]: https://github.com/openmainframeproject/ade -[9]: https://joinup.ec.europa.eu/node/149541 -[10]: http://www.businessinsider.in/Exclusive-Infosys-is-using-Open-Source-as-its-mostlethal-weapon-yet/articleshow/51109129.cms -[11]: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ -[12]: http://insidehpc.com/2016/02/beegfs-parallel-file-system-now-open-source/ diff --git a/sources/news/20160229 Node.js 5.7 released ahead of impending OpenSSL updates.md b/sources/news/20160229 Node.js 5.7 released ahead of impending OpenSSL updates.md deleted file mode 100644 index 659df2e1f3..0000000000 --- a/sources/news/20160229 Node.js 5.7 released ahead of impending OpenSSL updates.md +++ /dev/null @@ -1,42 +0,0 @@ -Node.js 5.7 released ahead of impending OpenSSL updates -============================================================= - -![](http://images.techhive.com/images/article/2014/09/nodejs-100449932-primary.idge.jpg) - ->Once again, OpenSSL fixes must be evaluated by keepers of the popular server-side JavaScript platform - -The Node.js Foundation is gearing up this week for fixes to OpenSSL that could mean updates to Node.js itself. - -Releases to OpenSSL due on Tuesday will fix defects deemed to be of "high" severity, Rod Vagg, foundation technical steering committee director, said [in a blog post][1] on Monday. Within a day of the OpenSSL releases, the Node.js crypto team will assess their impacts, saying, "Please be prepared for the possibility of important updates to Node.js v0.10, v0.12, v4 and v5 soon after Tuesday, the 1st of March." - -[ Deep Dive: [How to rethink security for the new world of IT][2]. | Discover how to secure your systems with InfoWorld's [Security newsletter][3]. ] - -The high severity status actually means the issues are of lower risks than critical, perhaps affecting less-common configurations or less likely to be exploitable. Due to an embargo, the exact nature of these fixes and their impact on Node.js remain uncertain, said Vagg. "Node.js v0.10 and v0.12 both use OpenSSL v1.0.1, and Node.js v4 and v5 both use OpenSSL v1.0.2, and releases from nodejs.org and some other popular distribution sources are statically compiled. Therefore, all active release lines are impacted by this update." OpenSSL also impacted Node.js in December, [when two critical vulnerabilities were fixed][4]. - -The latest OpenSSL developments follow [the release of Node.js 5.7.0][5], which is clearing a path for the upcoming Node.js 6. Version 5 is the main focus for active development, said foundation representative Mikeal Rogers, "However, v5 won't be supported long-term, and most users will want to wait for v6, which will be released by the end of April, for the new features that are landing in v5." - -Release 5.7 has more predictability for C++ add-ons' interactions with JavaScript. Node.js can invoke JavaScript code from C++ code, and in version 5.7, the C++ node::MakeCallback() API is now re-entrant; calling it from inside another MakeCallback() call no longer causes the nextTick queue or Promises microtask queue to be processed out of order, [according to release notes][6]. - -Also fixed is an HTTP bug where handling headers mistakenly trigger an "upgrade" event where the server just advertises protocols. The bug can prevent HTTP clients from communicating with HTTP2-enabled servers. Version 5.7 performance improvements are featured in the path, querystring, streams, and process.nextTick modules. - -This story, "Node.js 5.7 released ahead of impending OpenSSL updates" was originally published by [InfoWorld][7]. - - --------------------------------------------------------------------------------- - -via: http://www.itworld.com/article/3039005/security/nodejs-57-released-ahead-of-impending-openssl-updates.html - -作者:[Paul Krill][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/Paul-Krill/ -[1]: https://nodejs.org/en/blog/vulnerability/openssl-march-2016/ -[2]: http://www.infoworld.com/resources/17273/security-management/how-to-rethink-security-for-the-new-world-of-it#tk.ifw-infsb -[3]: http://www.infoworld.com/newsletters/signup.html#tk.ifw-infsb -[4]: http://www.infoworld.com/article/3012157/security/why-nodejs-waited-for-openssl-security-update-before-patching.html -[5]: https://nodejs.org/en/blog/release/v5.7.0/ -[6]: https://nodejs.org/en/blog/release/v5.7.0/ -[7]: http://www.infoworld.com/ diff --git a/sources/news/20160318 Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md b/sources/news/20160318 Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md deleted file mode 100644 index 059ea0cfe1..0000000000 --- a/sources/news/20160318 Robolinux-8.4-LTS-Raptor-Series-Announced-Based-on-Debian-GNU-Linux 8 Jessie.md +++ /dev/null @@ -1,40 +0,0 @@ -Robolinux 8.4 LTS "Raptor" Series Announced, Based on Debian GNU/Linux 8 Jessie -==================================================================================== - -keyword : Robolinux 8.4 LTS , Robolinux 8.4 Cinnamon , Robolinux 8.4 MATE , Robolinux 8.4 Xfce , Debian 8 - -> It runs Windows 7 and 10 virus-free in stealth VMs - -### The developer of the Robolinux project has announced the release of his latest Robolinux 8.4 LTS "Raptor" series of Debian-based operating systems, which includes numerous software updates and performance improvements. - -Usually, the Robolinux developer [announces][1] only one edition at a time for a new major release of the GNU/Linux distribution, but today's announcement includes details about the availability for download of the Robolinux 8.4 LTS Cinnamon, MATE, Xfce, and LXDE editions, as both 64-bit and 32-bit variants. - -The long-term supported Robolinux 8.4 series of distributions has been in development for the last three and a half months, during which it has been synchronized with the upstream Debian GNU/Linux 8 (Jessie) repositories, thus adding all the latest security patches and software updates. - -"Three and a half months of hard work went into finding every way possible to optimize and speed up our series 8 Robolinux 'Raptor' operating systems," say the devs. "The result is we have significantly decreased the time it takes to load applications, bootup and shutdown all four of our upgraded Robolinux Raptor series versions. - -### The Raptor series is supported until 2020 - -Powered by Debian GNU/Linux 8's Linux 3.16 kernel, all the Robolinux 8.4 LTS "Raptor" editions have been rebased on the current stable Debian 8.3 source code, including over 180 upstream security and application updates. As Google ended support for the 32-bit version of its Google Chrome web browser, Robolinux now switches to Chromium. - -Other important software updates include the Mozilla Firefox 45.0 web browser, Mozilla Thunderbird 38.7.0 email and news client, Tor Browser 5.5, and VirtualBox 5.0. As usual, all Robolinux flavors come with numerous popular apps, including but not limited to Google Earth, Skype, Tor, I2P, Kazam, and a collection of useful security and privacy apps. - -Robolinux is a distribution targeted at new Linux users, so as expected, it includes the stealth virtual machine technology that lets them run the Microsoft Windows XP, Windows 7, and Windows 10 operating systems virus-free. Best of all, the Robolinux 8 "Raptor" LTS series is supported with software updates and security patches until the year 2020. - -While newcomers can [download the Robolinux 8.4 LTS Cinnamon, MATE][2], [Xfce][3], and [LXDE][4] editions right now from our website, current Robolinux 8 users can upgrade to the 8.4 release using the built-in "Robolinux Auto Upgrade" button in the Applications Menu. - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/robolinux-8-4-lts-raptor-series-announced-based-on-debian-gnu-linux-8-jessie-501899.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://robolinux.org/downloads/v8.4-details.html -[2]: http://linux.softpedia.com/get/System/Operating-Systems/Linux-Distributions/Robolinux-102332.shtml -[3]: http://linux.softpedia.com/get/Linux-Distributions/Robolinux-Xfce-103540.shtml -[4]: http://linux.softpedia.com/get/Linux-Distributions/Robolinux-LXDE-103691.shtml 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 deleted file mode 100644 index c14fecc697..0000000000 --- a/sources/share/20150901 5 best open source board games to play online.md +++ /dev/null @@ -1,194 +0,0 @@ -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/ 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 deleted file mode 100644 index b99752ea7b..0000000000 --- a/sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md +++ /dev/null @@ -1,336 +0,0 @@ -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 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 deleted file mode 100644 index 29fced5cc9..0000000000 --- a/sources/share/20151028 Bossie Awards 2015--The best open source applications.md +++ /dev/null @@ -1,238 +0,0 @@ -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 deleted file mode 100644 index 0cf65ea3a8..0000000000 --- a/sources/share/20151028 Bossie Awards 2015--The best open source big data tools.md +++ /dev/null @@ -1,287 +0,0 @@ -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 deleted file mode 100644 index 5640c75137..0000000000 --- a/sources/share/20151028 Bossie Awards 2015--The best open source data center and cloud software.md +++ /dev/null @@ -1,261 +0,0 @@ -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 deleted file mode 100644 index 83b2b24a2e..0000000000 --- a/sources/share/20151028 Bossie Awards 2015--The best open source desktop and mobile software.md +++ /dev/null @@ -1,223 +0,0 @@ -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/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md deleted file mode 100644 index c27e90fd7d..0000000000 --- a/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md +++ /dev/null @@ -1,186 +0,0 @@ -[translating by ray] - -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/ 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 index 49244c96d2..6624a3c590 100644 --- 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 @@ -1,4 +1,3 @@ -translated by bestony 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. 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 deleted file mode 100644 index 19ddcf0e97..0000000000 --- a/sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md +++ /dev/null @@ -1,154 +0,0 @@ -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/ diff --git a/sources/tech/20151227 Ubuntu Touch, three years later.md b/sources/tech/20151227 Ubuntu Touch, three years later.md deleted file mode 100644 index 3d467163cf..0000000000 --- a/sources/tech/20151227 Ubuntu Touch, three years later.md +++ /dev/null @@ -1,68 +0,0 @@ -Back in early 2013, your editor [dedicated a sacrificial handset][2] to the testing of the then-new Ubuntu Touch distribution. At that time, things were so unbaked that the distribution came with mocked-up data for unready apps; it even came with a set of fake tweets. Nearly three years later, it seemed time to give Ubuntu Touch another try on another sacrificial device. This distribution has certainly made some progress in those years, but, sadly, it still seems far from being a competitive offering in this space. -In particular, your editor tested version 16.04r3 from the testing channel on a Nexus 4 handset. The Nexus 4 is certainly past its prime at the end of 2015, but it still functions as a credible Android device. It is, in any case, the only phone handset on [the list of supported devices][1] other than the three that were sold (in locations far from your editor's home) with Ubuntu Touch pre-installed. It is a bit discouraging that Ubuntu Touch is not supported on a more recent device; the Nexus 4 was discontinued over two years ago. - -People who are accustomed to putting strange systems on Nexus devices know the drill fairly well: unlock the bootloader, install a new recovery image if necessary, then use the **fastboot** tool to flash a new image. Ubuntu Touch does not work that way; instead, one must use a set of tools available only on the Ubuntu desktop distribution. Your editor's current menagerie of systems does not include any of those, but, fortunately, running the Ubuntu 15.10 distribution off a USB drive works just fine. It must be said, though, that Ubuntu appears not to have gotten the memo regarding high-DPI laptop displays; 15.10 is an exercise in eyestrain on such a device. - -Once the requisite packages have been installed, the **ubuntu-device-flash** command can be used to install Ubuntu Touch on the phone. It finds the installation image wherever Canonical hides them (it's not obvious where that is) and puts it onto the phone; the process, on the Nexus 4, took about three hours — a surprisingly long time. Among other things, it installs a Ubuntu-specific recovery image, regardless of whether that should be necessary or not. The installation takes up about 4.5GB of space on the device. At the end, the phone reboots and comes up with the Ubuntu Touch lock screen, which has changed little in the last three years. The first boot takes a discouragingly long time, but subsequent reboots are faster, perhaps faster than Android on the same device. - -Alas, that's about the only thing that is faster than Android. The phone starts sluggish and gets worse as time goes on. At one point it took a solid minute to get the dialer screen up on the running device. Scrolling can be jerky and unpleasant to work with. At least once, the phone bogged down to the point that there was little alternative to shutting it down and starting over. - -Logging into the device over the USB connection offers some clues as to why that might be. There were no less than 258 processes running on the system. A number of them have "evolution" in their name, which is never a good sign even on a heftier system. Daemons like NetworkManager and pulseaudio are running. In general, Ubuntu Touch seems to have a large number of relatively large moving parts, leading, seemingly, to memory pressure and a certain amount of thrashing. - -Three years ago, Ubuntu Touch was built on an Android chassis. There are still bits of Android that show up here and there (it uses binder, for example), but a number of those components have been replaced. This release runs an Android-derived kernel that identifies itself as "3.4.0-7 #39-Ubuntu". 3.4.0 was released in May 2012, so it is getting a bit long in the tooth; the 3.4.0 number suggests this kernel hasn't even gotten the stable updates that followed that release. Finding the source for the kernel in this distribution is not easy; it must almost certainly be hidden somewhere in this Gerrit repository, but your editor ran out of time while trying to find it. The SurfaceFlinger display manager has been replaced by Ubuntu's own Mir, with Unity providing the interface. Upstart is the init system, despite the fact that Ubuntu has moved to systemd on desktop systems. - -When one moves beyond the command-line interface and starts playing with the touchscreen, one finds that the basics of the interface resemble what was demonstrated three years ago. Swiping from the left edge brings the [Overview screen] Unity icon bar (but no longer switches to a home screen; the "home screen" concept doesn't really seem to exist anymore). Swiping from the right will either switch to another application or produce an overview of running applications; it's not clear how it decides which. The overview provides a cute oblique view of the running applications; it's sufficient to choose one, but seems somewhat wasteful of screen space. Swiping up from the bottom produces an application-specific menu — usually. - -![][3] - - -The swipe gestures work well enough once one gets used to them, but there is scope for confusion. The camera app, for example, will instruct the user to "swipe left for photo roll," but, unless one is careful to avoid [Swipe left] the right edge of the screen, that gesture will yield the overview screen instead. One can learn subtleties like "swipes involving the edge" and "swipes avoiding the edge," but one could argue that such an interface is more difficult than it needs to be and less discoverable than it could be. - -![][4] - -Speaking of the camera app, it takes pictures as one might expect, and it has gained a high-dynamic-range mode in recent years. It still has no support for stitching together photos in a panorama or "photo sphere" mode, though. - -![][5] - -The base distribution comes with a fairly basic set of apps. Many of them appear to be interfaces to an associated web page; the Amazon, GMail, and Facebook apps, for example. Something called "Shorts" appears to be an RSS reader, though it seems impervious to the addition of arbitrary feeds. There is a terminal app, but it prompts for a password — a bit surprising [Terminal emulator] given that no password had ever been supplied for the device (it turns out that one should use the screen-lock PIN here). It's not clear that this extra level of "security" is helpful, given that the user involved is already able to install, launch, and run applications on the device, but so it goes. - -Despite the presence of all those evolution processes, there is no IMAP-capable email app; there are also no mapping apps. There is a rudimentary web browser with Ubuntu branding; it appears that this browser is based on Chromium. The weather app is limited to a few dozen hardwired locations worldwide; the closest supported location to LWN headquarters was Houston, which, one assumes, is unlikely to be dealing with the foot of snow your editor had to shovel while partway through this article. One suspects we would have heard about that. - -![][6] - -Inevitably, there is a store from which one can obtain other apps. There are, for example, a couple of seemingly capable, OpenStreetMap-based mapping apps there, including one that claims turn-by-turn navigation, but nothing requiring GPS access worked in your editor's tests. Games abound, of course, but [Maps] there is little in the way of apps that are well known in the Android or iOS worlds. The store will refuse to allow the installation of apps until one creates a "Ubuntu One" account; that is unfortunate, but most Android users never get anywhere near that far before having to create or supply a Google account. - -![][7] - -Canonical puts a fair amount of energy into promoting its "scopes," which are said to be better than apps for the aggregation of content. In truth, they seem to just be another type of app with a focus on gathering information from more than one source. Although, with "branded scopes," the "more than one source" part is often deliberately put by the wayside. Your editor played around with scopes for a while, but, in truth, could not find what was supposed to make them special. - -Permissions management in Ubuntu Touch resembles that found in recent Android releases: the user will be prompted the first time an application tries to exercise a specific privilege. As with Android, the number of [Permissions request] actions requiring privilege is relatively small, and "connect to any arbitrary site on the Internet" is not among them. Access to location information or the camera, though, will generate a prompt. There is also, again as with Android, a way to control which applications are allowed to place notifications on the screen. - -Ubuntu Touch still seems to drain the battery far more quickly than Android does on the same device. Indeed, it is barely able to get through the night while sitting idle. There is a cute battery app that offers a couple of "ways to reduce battery use," but it lacks Android's ability to say which apps are actually draining the battery (though, it must be said, that information from Android is often less helpful than one might hope). - -![][8] - -The keyboard now has proper multi-lingual support (though there is no visual indication of which language is currently in effect) and, as with Android, one can switch between languages on the fly. It offers word suggestions, does [Keyboard] spelling correction, and all the usual things. One missing feature, though, is "swipe" typing which, your editor has found, can speed the process of inputting text on a small keyboard considerably. There is also no voice input; no major loss from your editor's point of view, but others will probably see that differently. - -There is a lot to like in Ubuntu Touch. There is some appeal to running something that looks like a proper Linux system, even if it still has a number of Ubuntu-specific components. One does not get the sense that the device is watching quite as closely as Android devices do, though it's not entirely clear, for example, what happens with location data or where it might be stored. In any case, a Ubuntu device clearly has more free software on it than most alternatives do; there is no proprietary "play services" layer maintaining control over the system. - -Sadly, though, this distribution still is not up to the capabilities and the performance of the big alternatives. Switching to Ubuntu Touch means settling for a much slower system, running on a severely limited set of devices, with a relative scarcity of apps to choose from. Your editor would very much like to see a handset distribution that is more free and more open than the alternatives, but that distribution must also be competitive with those alternatives, and that does not seem to be the case here. Unless Canonical can find a way to close the performance and feature gaps with Android, it seems unlikely to have much hope of achieving uptake that is within a few orders of magnitude of Android's. - --------------------------------------- - -via: https://lwn.net/Articles/667983/ - -作者:Jonathan Corbet -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]: https://developer.ubuntu.com/en/start/ubuntu-for-devices/devices/ -[2]: https://lwn.net/Articles/540138/ -[3]: https://static.lwn.net/images/2015/utouch/overview-sm.png -[4]: https://static.lwn.net/images/2015/utouch/camera-swipe-sm.png -[5]: https://static.lwn.net/images/2015/utouch/terminal.png -[6]: https://static.lwn.net/images/2015/utouch/gps-sm.png -[7]: https://static.lwn.net/images/2015/utouch/camera-perm.png -[8]: https://static.lwn.net/images/2015/utouch/schifo.png diff --git a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md index 6df151f9f6..60b8f7fc75 100644 --- a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md +++ b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md @@ -1,4 +1,3 @@ -bioIkke 翻译中 7 Steps to Start Your Linux SysAdmin Career =============================================== diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md index 468414fdfa..19aab96541 100644 --- a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md +++ b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md @@ -1,5 +1,3 @@ -GHLandy Translating - How to Best Manage Encryption Keys on Linux ============================================= diff --git a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md index 14e950a611..19c654e27e 100644 --- a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md +++ b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md @@ -1,5 +1,3 @@ -Ricky Gong 翻译中 - Linux Systems Patched for Critical glibc Flaw ================================================= diff --git a/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md b/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md index 2f7d6f7f8d..81f7467719 100644 --- a/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md +++ b/sources/tech/20160222 Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI.md @@ -1,6 +1,5 @@ Achieving Enterprise-Ready Container Tools With Wercker’s Open Source CLI =========================================== -#CoderBOBO translating For enterprises, containers offer more efficient build environments, cloud-native applications and migration from legacy systems to the cloud. But enterprise adoption of the technology -- Docker specifically -- has been hampered by, among other issues, [a lack of mature developer tools][1]. diff --git a/sources/tech/20160314 15 podcasts for FOSS fans b/sources/tech/20160314 15 podcasts for FOSS fans.md similarity index 100% rename from sources/tech/20160314 15 podcasts for FOSS fans rename to sources/tech/20160314 15 podcasts for FOSS fans.md From 5fdbcb365c2efdc99463254201319d4745853958 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Apr 2016 15:42:56 +0800 Subject: [PATCH 1249/1710] PUB:20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10 @alim0x --- ...New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/news => published}/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md (82%) diff --git a/translated/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md b/published/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md similarity index 82% rename from translated/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md rename to published/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md index 899d8b5920..0470818ba6 100644 --- a/translated/news/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md +++ b/published/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md @@ -7,15 +7,15 @@ Ubuntu Budgie 将在 Ubuntu 16.10 中成为新官方分支发行版 ![Budgie-Remix 16.04 Beta 2](http://i1-news.softpedia-static.com/images/news2/ubuntu-budgie-could-be-the-new-flavor-of-ubuntu-linux-as-part-of-ubuntu-16-10-502573-2.jpg) -今天,Budgie-Remix 的开发者 David Mohammed 向 Softpedia 通报了项目进度,以及为即将到来的 16.04 发布的第二个 Beta 版本。Cononical 的创始人 [Mark Shuttleworth 说过][2]如果能够有围绕这个包的社区,它肯定会得到支持。 +今天,Budgie-Remix 的开发者 David Mohammed 向 Softpedia 通报了项目进度,以及为即将到来的 16.04 发布了第二个 Beta 版本。Cononical 的创始人 [Mark Shuttleworth 说过][2]如果能够有围绕这个发行版的社区,它肯定会得到支持。 -自我们[最初的报道][3]以来,David Mohammed 似乎与 Ubuntu MATE 项目的领导者 Martin Wimpress 取得了联系,后者敦促他以 Ubuntu 16.10 作为他还未正式命名的 Ubuntu 分支的官方版本目标。这个分支发行版构建于 Budgie 桌面环境之上,它是超赞的 [Solus][4] 开发者团队创建的。 +自我们[最初的报道][3]以来,David Mohammed 似乎与 Ubuntu MATE 项目的领导者 Martin Wimpress 取得了联系,后者敦促他以 Ubuntu 16.10 作为他还未正式命名的 Ubuntu 分支的官方版本目标。这个分支发行版构建于 Budgie 桌面环境之上,该桌面环境是由超赞的 [Solus][4] 开发者团队创建的。 “我们本周完成了 Beta 2 版本的开发以及很多其它东西,而且我们还有 Martin Wimpress (Ubuntu MATE 项目领导者)的支持,”David Mohammed 对 Softpedia 独家爆料。”他还敦促我们以 16.10 作为成为官方版本的目标——那当然是个主要的挑战——并且我们还需要社区的帮助/加入我们来让这一切成为现实!” ### Ubuntu Budgie 16.10 可能在 2016 年 10 月到来 ### -4 月 21 日,Canonical 将会发布 Ubuntu Linux 的下一个 LTS(Long Term Support,长期支持)版本,Xenial Xerus 好客的非洲地松鼠,也就是 Ubuntu 16.04,并且我们有可能能够以 Budgie-Remix 16.04 的名义提前尝试将成为官方分支的 Ubuntu Budgie。但在那之前,你可以帮助开发者[测试 Beta 2 版本][5]。 +4 月 21 日,Canonical 将会发布 Ubuntu Linux 的下一个 LTS(Long Term Support,长期支持)版本:Xenial Xerus——好客的非洲地松鼠——也就是 Ubuntu 16.04。我们有可能能够提前体验到 Budgie-Remix 16.04,以后它也许成为了官方分支的 Ubuntu Budgie 。但在那之前,你可以帮助开发者[测试 Beta 2 版本][5]。 在 Ubuntu 16.04 LTS(Xenial Xerus)发布之后,Ubuntu 的开发者们就会立即将注意力转移到下一个版本的开发上。下一个版本 Ubuntu 16.10 应该会在 10 月底到来,并且 Ubuntu Budgie 也可能宣布成为 Ubuntu 官方分支发行版。 @@ -32,7 +32,7 @@ via: http://news.softpedia.com/news/ubuntu-budgie-could-be-the-new-flavor-of-ubu 作者:Marius Nestor 译者:[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 6cd34d0ae02fee6d46bfeb8f1e32cfbb8684fc12 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Apr 2016 21:17:57 +0800 Subject: [PATCH 1250/1710] PUB:20151028 10 Tips for 10x Application Performance --- .../20151028 10 Tips for 10x Application Performance.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20151028 10 Tips for 10x Application Performance.md (100%) diff --git a/translated/tech/20151028 10 Tips for 10x Application Performance.md b/published/20151028 10 Tips for 10x Application Performance.md similarity index 100% rename from translated/tech/20151028 10 Tips for 10x Application Performance.md rename to published/20151028 10 Tips for 10x Application Performance.md From a0d545db329a175f9bbf40d3dee76dad5cc4640d Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Apr 2016 21:36:16 +0800 Subject: [PATCH 1251/1710] PUB:20160220 Make Sudo Insult User For Each Incorrect Password Attempt @geekpi --- ...ser For Each Incorrect Password Attempt.md | 58 +++++++++++++++++++ ...ser For Each Incorrect Password Attempt.md | 58 ------------------- 2 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 published/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md delete mode 100644 translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md diff --git a/published/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md b/published/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md new file mode 100644 index 0000000000..973c95b666 --- /dev/null +++ b/published/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md @@ -0,0 +1,58 @@ +输错密码?这个 sudo 会“嘲讽”你 +=========================================================== + +你在 Linux 终端中会有很多的乐趣。我今天要讲的不是在[终端中跑火车](http://itsfoss.com/ubuntu-terminal-train/)。 + +我今天要讲的技巧可以放松你的心情。前面一篇文章中,你学习了[如何在命令行中增加 sudo 命令的超时](http://itsfoss.com/change-sudo-password-timeout-ubuntu/)。今天的文章中,我会向你展示如何让 sudo 在输错密码的时候“嘲讽”你(或者其他人)。 + +对我讲的感到疑惑?这里,让我们看下这张 gif 来了解下 sudo 是如何在你输错密码之后“嘲讽”你的。 + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux.gif) + +那么,为什么要这么做?毕竟,“嘲讽”不会让你的一天开心,不是么? + +对我来说,一点小技巧都是有趣的,并且要比以前的“密码错误”的错误提示更有趣。另外,我可以向我的朋友展示来逗弄他们(这个例子中是通过自由开源软件)。我很肯定你有你自己的理由来使用这个技巧的。 + +## 在 sudo 中启用“嘲讽” + +你可以在`sudo`配置中增加下面的行来启用“嘲讽”功能: + +``` +Defaults insults +``` + +让我们看看该如何做。打开终端并使用下面的命令: + +``` +sudo visudo +``` + +这会在 [nano](http://www.nano-editor.org/)中打开配置文件。 + +> 是的,我知道传统的 ‘visudo’ 应该在 vi 中打开 `/etc/sudoers` 文件,但是 Ubuntu 及基于它的发行版会使用 nano 打开。由于我们在讨论vi,这里有一份 [vi 速查表](http://itsfoss.com/download-vi-cheat-sheet)可以在你决定使用 vi 的时候使用。 + +回到编辑 sudeors 文件界面,你需要找出 Defaults 所在的行。简单的很,只需要在文件的开头加上`Defaults insults`,就像这样: + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint.png) + +如果你正在使用 nano,使用`Ctrl+X`来退出编辑器。在退出的时候,它会询问你是否保存更改。要保存更改,按下“Y”。 + +一旦你保存了 sudoers 文件之后,打开终端并使用 sudo 运行各种命令。故意输错密码并享受嘲讽吧:) + +sudo 可能会生气的。看见没,他甚至在我再次输错之后威胁我。哈哈。 + +![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint-1.jpeg) + +如果你喜欢这个终端技巧,你也可以查看[其他终端技巧的文章](http://itsfoss.com/category/terminal-tricks/)。如果你有其他有趣的技巧,在评论中分享。 + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/sudo-insult-linux/ + +作者:[ABHISHEK][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ diff --git a/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md b/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md deleted file mode 100644 index 0a0008ab8d..0000000000 --- a/translated/tech/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md +++ /dev/null @@ -1,58 +0,0 @@ -让sudo在用户输错密码时侮辱用户 -=========================================================== - -你在Linux终端中会有很多的乐趣。我今天要讲的不是在[终端中跑火车](http://itsfoss.com/ubuntu-terminal-train/)。 - -我今天要讲的技巧可以放松你的心情。前面一篇文章中,你学习了[如何在命令行中增加sudo命令的超时](http://itsfoss.com/change-sudo-password-timeout-ubuntu/)。今天的文章中,我会向你展示如让sudo在输错密码的时候侮辱你(或者其他人)。 - - -对我讲的感到疑惑?这里,让我们看下这张gif来了解sudo如何在你输错密码之后侮辱你的。 - -![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux.gif) - -现在,你为什要这么做?毕竟,侮辱不会让你的一天开心,不是么? - -对我来说,一点小技巧都是有趣的,并且要比以前的“密码错误”的错误提示更有趣。另外,我可以向我的朋友展示娱乐(这个例子中是通过自由开源软件)。我很肯定你有你自己的里有来使用这个技巧的。 - -## 在sudo中启用侮辱 - -你可以在`sudo`配置中增加下面的行来启用侮辱功能: - -``` -Defaults insults -``` - -让我们看看该如何做。打开终端并使用下面的命令: - -``` -sudo visudo -``` - -这会在[nano](http://www.nano-editor.org/)中打开配置文件。使得,我知道传统的‘visudo’应该在vi中打开`/etc/sudoers` 文件,但是Ubuntu及基于它的发行版会使用nano打开。由于我们再讨论vi,这里有一份[vi速查表](http://itsfoss.com/download-vi-cheat-sheet)可以在你决定使用vi的时候使用。 - -回到编辑sudeors文件界面,你需要找出Defaults所在的行。幸运的是,只需要在文件的开头加上“Defaults insults”,就像这样: - -![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint.png) - -如果你正在使用nano,使用`Ctrl+X`来退出编辑器。在退出的时候,它会询问你是否保存更改。要保存更改,按下“Y”。 - -一旦你保存了sudoers文件之后,打开终端并在任何命令中使用sudo。故意输错密码病享受辱骂:) - -sudo可能会讨厌的。看见没,他甚至在我再次输错之后威胁我。哈哈 - -![](http://itsfoss.com/wp-content/uploads/2016/02/sudo-insults-Linux-Mint-1.jpeg) - -如果你喜欢这个终端技巧,你也可以查看[其他终端技巧的文章](http://itsfoss.com/category/terminal-tricks/)。如果你有其他有趣的技巧,在评论中分享。 - - ------------------------------------------------------------------------------- - -via: http://itsfoss.com/sudo-insult-linux/ - -作者:[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 5948bf19ffbe7410a9b53bd82b1ec3b59c063973 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Apr 2016 21:47:12 +0800 Subject: [PATCH 1252/1710] PUB:20160223 BeeGFS Parallel File System Goes Open Source @name1e5s --- ...3 BeeGFS Parallel File System Goes Open Source.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20160223 BeeGFS Parallel File System Goes Open Source.md (57%) diff --git a/translated/tech/20160223 BeeGFS Parallel File System Goes Open Source.md b/published/20160223 BeeGFS Parallel File System Goes Open Source.md similarity index 57% rename from translated/tech/20160223 BeeGFS Parallel File System Goes Open Source.md rename to published/20160223 BeeGFS Parallel File System Goes Open Source.md index 2aeadbc3fb..6c9691b5c6 100644 --- a/translated/tech/20160223 BeeGFS Parallel File System Goes Open Source.md +++ b/published/20160223 BeeGFS Parallel File System Goes Open Source.md @@ -3,25 +3,25 @@ ![](http://insidehpc.com/wp-content/uploads/2015/08/beegfs.jpg) -今天(2月23日) ThinkParQ 宣布完整的 [BeeGFS 并行文件系统][1] 的源码现已开源。由于 BeeGFS 是专为要求性能的环境开发的,所以它在开发时十分注重安装的简单以及高度的灵活性,包括融合了在存储服务器同时做计算任务时需要的设置。随着系统中的服务器以及存储设备的增加,文件系统的容量以及性能将是需求的拓展点,无论是小型集群还是多达上千个节点的企业级系统。 +2月23日 ThinkParQ 宣布完整的 [BeeGFS 并行文件系统][1] 的源码现已开源。由于 BeeGFS 是专为要求性能的环境开发的,所以它在开发时十分注重安装的简易性以及高度灵活性,包括融合了在存储服务器同时做计算任务时需要的设置。随着系统中的服务器以及存储设备的增加,文件系统的容量以及性能将是需求的拓展点,无论是小型集群还是多达上千个节点的企业级系统。 -第一次官方声明开放 BeeGFS 的源码是在 2013 年的国际超级计算大会上发布的。这个声明是在欧洲的百亿亿次级超算项目 [DEEP-ER][2] 的背景下做出的,在这个项目里为了得到更好的 I/O 要求,一些微小的进步被设计并应用。对于运算量高达百亿亿次的系统,不同的软硬件必须有效的协同工作才能得到最佳的拓展性。因此,开源 BeeGFS 是让一个百亿亿次的集群的所有组成部分高效的发挥作用的一步。 +官方第一次声明开放 BeeGFS 的源码是在 2013 年的国际超级计算大会上发布的。这个声明是在欧洲的百亿亿次级超算项目 [DEEP-ER][2] 的背景下做出的,在这个项目里为了得到更好的 I/O 要求,做出了一些新的改进。对于运算量高达百亿亿次的系统,不同的软硬件必须有效的协同工作才能得到最佳的拓展性。因此,开源 BeeGFS 是让一个百亿亿次的集群的所有组成部分高效的发挥作用的一步。 -“当我们的一些用户对于 BeeGFS 十分容易安装并且不用费心管理而感到高兴时,另外一些用户则想要知道它是如何运行的以便于更好的优化他们的应用,使得他们可以监控它或者把它移植到其他的平台上,比如 BSD,” Sven Breuner 说道,他是 ThinkParQ (BeeGFS 背后的公司)的 CEO,“而且,把 BeeGFS 移植到其他的非 X86 架构,比如 ARM 或者 Power,也是社区等着要做的一件事。” +“当我们的一些用户对于 BeeGFS 十分容易安装并且不用费心管理而感到高兴时,另外一些用户则想要知道它是如何运行的以便于更好的优化他们的应用,使得他们可以监控它或者把它移植到其他的平台上,比如 BSD,” Sven Breuner 说道,他是 ThinkParQ (BeeGFS 背后的公司)的 CEO,“而且,把 BeeGFS 移植到其他的非 X86 架构,比如 ARM 或者 Power,也是社区即将要做的一件事。” 对于未来的采购来说,ARM 技术的稳步发展确实使得它成为了一个越来越有趣的技术。因此, BeeGFS 的团队也参与了 [ExaNeSt][3],一个来自欧洲的新的百亿亿次级超算计划,这个计划致力于使 ARM 的生态能为高性能的工作负载做好准备。“尽管现在 BeeGFS 在 ARM 处理器上可以算是开箱即用,这个项目也将给我们机会来证明我们在这个架构上也能完全发挥其性能。”, Bernd Lietzow , BeeGFS 中 ExaNeSt 的领导者补充道。 - 作为一个有着 25 K 行 C++ 代码的元数据服务以及约 15 K 行存储服务的项目,BeeGFS 相对比较容易理解和拓展,不只是对于大神,对于对文件系统有兴趣的大学生也是这样。在 GitHub 上已经有很多的为 BeeGFS 写的项目,比如基于浏览器的监控或者 Docker 一体化。 +作为一个有着 25 K 行 C++ 代码的元数据服务以及约 15 K 行存储服务的项目,BeeGFS 相对比较容易理解和拓展,不只是对于大神,对于对文件系统有兴趣的大学生也是这样。在 GitHub 上已经有很多的为 BeeGFS 写的项目,比如基于浏览器的监控或者 Docker 一体化。 有关新闻显示, [BeeGFS 用户大会][4]将于 5 月 18-19 日在德国凯泽斯劳滕举行。 ----------------------------------------------------------------------------------------- -via: http://insidehpc.com/2016/02/beegfs-parallel-file-system-now-open-source/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+InsideHPC+%28insideHPC.com%29 +via: http://insidehpc.com/2016/02/beegfs-parallel-file-system-now-open-source/ 作者:[staff][a] 译者:[name1e5s](https://github.com/name1e5s) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From fe3b69eda7cf3ef2580f899de3cfd588694f9e21 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Apr 2016 21:51:06 +0800 Subject: [PATCH 1253/1710] =?UTF-8?q?=E5=9B=9E=E6=94=B6Part=207=20-=20LFCS?= =?UTF-8?q?--Managing=20System=20Startup=20Process=20and=20Services=20SysV?= =?UTF-8?q?init=20Systemd=20and=20Upstart.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d Services SysVinit Systemd and Upstart.md | 1 - ...d Services SysVinit Systemd and Upstart.md | 230 ------------------ 2 files changed, 231 deletions(-) delete mode 100644 translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md 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 ecd47794b0..2a822e8a45 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,4 +1,3 @@ -WingCuengRay翻译中 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/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md deleted file mode 100644 index 34e08ec0f7..0000000000 --- a/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md +++ /dev/null @@ -1,230 +0,0 @@ -WingCuengRay翻译中 -翻译部分,未经自校验 -Part 7 - LFCS: Managing System Startup Process and Services (SysVinit, Systemd and Upstart) -============================================================== -几个月前,Linux 基金会发布了 LFCS (Linux Foundation Certified Sysadmin) 认证,这是一则振奋人心的消息,它的目标是让全世界各地的人们的的中级 Linux 系统管理能力得到认证。这能力包括了对处于运行状态的系统和服务的支持,发现并分析实际问题,并且知道何时向开发团队提交问题。 - -![Linux Foundation Certified Sysadmin – Part 7](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-7.png) - -Linux Foundation Certified Sysadmin - Part7 - -下面的视频简单地介绍了 Linux 基金认证的流程。 - -注:youtube 视频 - -本章是10个系列教程中的第7章,在这个部分,我们会解释如何去管理 Linux 系统启动进程和服务,这是 LFCS 认证考试中必须的。 - -### Linux 启动进程的管理 ### -Linux 系统的启动进程包括了几个阶段,每一个阶段都代表了一个不同的**component**。下图简单概括了启动的流程并且展示了所有阶段的主要组成部分。 - -![Linux Boot Process](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-Boot-Process.png) - - -Linux 启动流程 - -当你按下电脑上的开机按钮,装载在主板电可擦写只读存储器 (EEPROM) 中的固件 (BIOS) 会执行开机自检 (Power-On Self Test) 检查系统的硬件状态。当开机自检完成后,固件会寻找并载入位于第一块硬盘中的主引导记录 (MBR) 或者 EFI 分区中的 boot loader stage1,然后将控制权转交给它。第一阶段的 boot loader 在第一块硬盘中的主引导记录 (MBR 或者 EFI 分区中。 - -#### MBR 引导启动 #### -MBR 在 BIOS 设置的可启动硬盘的第一扇区,其大小是 512 字节。 - -- 起始 446 字节: bootloader 包括了可执行代码与错误消息文本。 -- 随后 64 字节: 分区表包括了四条硬盘分区(主分区或扩展分区)的记录。此外,每条分区记录指出了分区的状态(有效/无效),大小和每个分区的开始/结束扇区。 -- 最后 2 字节: 用于MBR校验检查的幻数 (magic number)。 - -**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) - -**恢复 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) - -在 Linux 的 MBR 恢复 - -### EFI/UFEFI 引导启动 ### -在 EFI/UEFI 引导的系统中,UEFI固件会读取其配置,根据配置决定启动哪一个 UEFI appliction,并且从哪里启动(例如,在 EFI 分区所在的磁盘)。 - -然后,第二阶段的引导程序被加载运行。GRUB[GRand Unified Boot] 是 Linux 上最流行的启动管理器。**如今有两个不同的版本供大多数的系统使用**。 - -- GRUB Legacy 配置文件: /boot/grub/menu.lst (旧版本,EFI/UEFI 不支持) -- GRUB2 配置文件: 大多数为 /etc/default/grub - -虽然 LFCS 资格认证没有明确要求了解关于 GRUB 内部知识,但如果你能勇敢地承受系统崩溃的风险(为了保险,你可能希望先在虚拟机上尝试),你可以尝试自己去修改这些文件。 - - # update-grub - -在修改完 GRUB 的配置文件后,需要以 root 权限运行以上指令让修改生效。 - -GRUB 主要加载了默认的内核和 initrd 或 initramfs 镜像。简单来说,initrd 和 initramfs 帮助进行了硬件的检测,内核模块的加载和设备的探查,**这对于挂载真正的根文件系统来说是必须的**。 - -为了得到一个用户交互界面,一旦根文件系统被挂载,内核便执行系统服务管进程 (init 或者 systemd,其进程标识或者 PID 通常是 1 )来启动正常的用户空间进程。 - -init 和 systemd 都是守护进程,因为它们是系统那个第一个启动的服务(在启动期间)和最后一个终止的服务(在关机时)。 - -![Systemd and Init](http://www.tecmint.com/wp-content/uploads/2014/10/systemd-and-init.png) - -Systemd and Init - -### 服务的启动 (SysVinit) ### -Linux 中的运行级别机制通过控制不同服务的运行来指定系统的不同使用方式。换言之,运行级别决定在当前的运行模式下哪些任务能够运行(哪些不能)。 - -基于 System V Unix 继承下来的传统,当计算机进入一个指定的运行级别时(或者说,进入一个与当前系统不同的运行级别时),系统通过传递用于控制启动和停止服务的执行脚本来执行启动进程。 - -在每一个运行级别,每一个服务能被设置为运行状态或者关闭状态(如果正在运行)。大多数发行版在最新版本中抛弃了System V的标准,支持一种新的被称为systemd的系统服务管理进程(也就是系统守护进程),不过出于兼容性考虑,systemd通常支持 sysv 命令。这意味着你能够在基本systemd发行版上运行大多数sysv int工具。 - -- 参考: [Why ‘systemd’ replaces ‘init’ in Linux][1] - -除了启动系统进程,init 还根据 /etc/inittab 文件决定必须进入哪一个运行级别。 - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Runlevel Description
0 挂起系统。运行级别 0 是一个用于快速关闭系统的特殊过渡态。
1 该模式也被称为 s 或 S。这个运行模式有时被叫作维护模式。根据发行版的不同,在这个运行级别启动的服务也不同。这通常用于可能被正常系统操作损坏的**low-level system maintenance(低级别系统维护)**
2 多用户模式。在 Debian 及其衍生版中,这是默认的运行级别,包括了可用的图形登陆。在基于红帽 (Red-Hat 的系统中,这是没有网络功能的多用户模式。
3  在基于 Red-Hat 的系统中,这是默认的多用户模式,此模式会运行除图形环境之外的所有东西。基于 Debian 的系统通常不使用此运行级别 4,5 和此级别。
4 默认不使用,因此可用于用户定制。
5 在基于红帽的系统,这是完整的带图形界面的多用户模式。此运行级别类似于运行级别 3,不过多了 GUI 的登陆界面。
6 重启系统
- -我们能够使用`init` 命令在不同运行级别之间切换: `init N` (N是上面列出的运行级别之一)。注意并不推荐使用这种方法改变一个运行中系统的运行级别,因为它没有发出警告信息给已登陆用户(这会令他们工作丢失,任务异常终止)。 - -相反,应该使用`shutdown`命令重启系统(发送一条警告信息给所有的登陆用户,并阻止另外的用户登陆);然而,必须先在 /etc/inittab 文件中编辑系统启动的默认运行级别。 - -因此,以 root 权限寻找 /etc/inittab 中的下行,然后按照下列步骤正确地在运行级别之间切换: - - id:2:initdefault: - -然后使用 vim 之类文本编辑器(在本系列的第二章介绍了如何在 Linux 中使用 vi/vim 编辑器)将数字 2 改变成你想要的运行级别。 - -接下来以 root 权限运行: - - # shutdown -r now - -最后一条命令会重启系统并让其在下一次启动期间以指定的运行级别启动,然后系统会运行在 /etc/rc[runlevel].d 目录下的脚本以决定哪些服务会被启动哪些不会。例如,下图处于运行级别2的系统. - -![Change Runlevels in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Runlevels-in-Linux.jpeg) - -Linux 运行级别的变更 - -## 使用 chkconfig 管理服务 - -为了在引导时启动/禁止系统服务,我们需要使用`chkconfig`(在 CentOS/openSUSE)和`sys-rc-conf`(在 Debian 及其衍生版中)命令。这工具能够告诉我们在一个特定运行级别的服务预配置状态。 - -- 参考: [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)** - -在上图中我们能够看到 `postfix` 被设置为当系统进入级别 2~5 时启动,而 `mysqld` 默认是在级别 2~4 时运行。假设这些不是我们期望的行为。 - -例如,我们也需要在运行级别 5 启动`mysqld`,并且在级别 4 和 5 中关闭 `postfix`。这是我们要做的(以 root 权限执行以下命令) - -**为一个特定的运行级别启动服务** - - # chkconfig --level [level(s)] service on - # chkconfig --level 5 mysqld on - -**为一个特定的运行级别禁止服务** - - # chkconfig --level [level(s)] service off - # chkconfig --level 45 posifix off - -![Enable Disable Services in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Disable-Services.png) - -启动禁止服务 - -我们可以使用 `sysv-rc-conf` 在基于 Debian 的系统执行类似的操作。 - -#### 使用 `sysv-rc-conf` 管理服务 - -设置一个服务使其能在一个特定的运行级别启动,禁止在其他运行级别启动。 - - -1. 我们用以下命令查看 `mdadm` 服务在哪些运行级别上启动。 -```c -# 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) - - 查看服务的运行级别 - -2. 我们使用 `sysv-rc-conf` 命令禁止 `mdadm` 在除了 2 以外的运行级别中启动。根据需要(使用空格键)选择或取消(可以使用上下左右方向键移动)。 -``` -# sys-rc-conf -``` - ![SysV Runlevel Config](http://www.tecmint.com/wp-content/uploads/2014/10/SysV-Runlevel-Config.png) - - Sys Runlevel Config - - 然后按 q 退出 - -3. 重启系统并运行第一步中的命令 - - ``` - # 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) - - 验证服务运行级别 - - 在上图中我们可以看到 `mdadm` 被修改为只在运行级别 2 上启动。 - -### 什么是 systemd ?### - -systemd 是较多 Linux 发行版采用的另一种系统服务管理软件。它允许系统启动期间进程并行启动(不像 sysinit 那么慢。因为 sysint 只能逐个启动进程,检查进程间依赖关系然后等待守护工作以启动更多服务),并且为系统动态管理资源。 - -因此,服务仅当需要时才被启动(以免浪费系统资源)而不是在引导时启动。 - -运行以下命令,查看系统中所有运行中服务进程的状态,**包括systemd native和SysV services**。 - -``` -# systemctl -``` - -![Check All Running Processes in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-All-Running-Processes.png) - -查看所有运行中的服务进程 From a3f5ca650e47004417a15af60bacb33f0a723a1d Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 15 Apr 2016 22:24:06 +0800 Subject: [PATCH 1254/1710] =?UTF-8?q?PUB:Part=206=20-=20LFCS--Assembling?= =?UTF-8?q?=20Partitions=20as=20RAID=20Devices=20=E2=80=93=20Creating=20&?= =?UTF-8?q?=20Managing=20System=20Backups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @cpsoture --- ...es – Creating & Managing System Backups.md | 283 +++++++++++++++++ ...es – Creating & Managing System Backups.md | 284 ------------------ 2 files changed, 283 insertions(+), 284 deletions(-) create mode 100644 published/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md delete mode 100644 translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md diff --git a/published/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/published/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md new file mode 100644 index 0000000000..ff480868ac --- /dev/null +++ b/published/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md @@ -0,0 +1,283 @@ +LFCS 系列第六讲:组装分区为RAID设备——创建和管理系统备份 +========================================================= +Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中级系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时向上游团队请求支持的决策能力。 + +![Linux Foundation Certified Sysadmin – Part 6](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-6.png) + +*LFCS 系列第六讲* + +以下视频介绍了 Linux 基金会认证程序。 + +注:youtube 视频 + + +本讲是系列教程中的第六讲,在这一讲里,我们将会解释如何将分区组装为 RAID 设备——创建和管理系统备份。这些都是 LFCS 认证中的必备知识。 + +### 了解RAID ### + +这种被称为独立磁盘冗余阵列(Redundant Array of Independent Disks)(RAID)的技术是将多个硬盘组合成一个单独逻辑单元的存储解决方案,它提供了数据冗余功能并且改善硬盘的读写操作性能。 + +然而,实际的容错和磁盘 I/O 性能硬盘取决于如何将多个硬盘组装成磁盘阵列。根据可用的设备和容错/性能的需求,RAID 被分为不同的级别,你可以参考 RAID 系列文章以获得每个 RAID 级别更详细的解释。 + +- [在 Linux 下使用 RAID(一):介绍 RAID 的级别和概念][1] + +我们选择用于创建、组装、管理、监视软件 RAID 的工具,叫做 mdadm (multiple disk admin 的简写)。 + +``` +---------------- Debian 及衍生版 ---------------- +# aptitude update && aptitude install mdadm +``` + +``` +---------------- Red Hat 和基于 CentOS 的系统 ---------------- +# yum update && yum install mdadm +``` + +``` +---------------- openSUSE 上 ---------------- +# zypper refresh && zypper install mdadm # +``` + +#### 将分区组装成 RAID 设备 #### + +组装已有分区作为 RAID 设备的过程由以下步骤组成。 + +**1. 使用 mdadm 创建阵列** + +如果先前其中一个分区已经格式化,或者作为了另一个 RAID 阵列的一部分,你会被提示以确认创建一个新的阵列。假设你已经采取了必要的预防措施以避免丢失重要数据,那么可以安全地输入 Y 并且按下回车。 + +``` +# 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) + +*创建 RAID 阵列* + +**2. 检查阵列的创建状态** + +在创建了 RAID 阵列之后,你可以检查使用以下命令检查阵列的状态。 + + + # 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) + +*检查 RAID 阵列的状态* + +**3. 格式化 RAID 设备** + +如本系列[第四讲][2]所介绍的,按照你的需求/要求采用某种文件系统格式化你的设备。 + +**4. 监控 RAID 阵列服务** + +让监控服务时刻监视你的 RAID 阵列。把`# mdadm --detail --scan`命令输出结果添加到 `/etc/mdadm/mdadm.conf`(Debian及其衍生版)或者`/etc/mdadm.conf`(Cent0S/openSUSE),如下。 + + # mdadm --detail --scan + + +![Monitor RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Monitor-RAID-Array.png) + +*监控 RAID 阵列* + + # mdadm --assemble --scan [Assemble the array] + +为了确保服务能够开机启动,需要以 root 权限运行以下命令。 + +**Debian 及其衍生版** + +Debian 及其衍生版能够通过下面步骤使服务默认开机启动: + + # update-rc.d mdadm defaults + +在 `/etc/default/mdadm` 文件中添加下面这一行 + + AUTOSTART=true + + +**CentOS 和 openSUSE(systemd-based)** + + # systemctl start mdmonitor + # systemctl enable mdmonitor + +**CentOS 和 openSUSE(SysVinit-based)** + + # service mdmonitor start + # chkconfig mdmonitor on + +**5. 检查RAID磁盘故障** + +在支持冗余的的 RAID 级别中,在需要时会替换故障的驱动器。当磁盘阵列中的设备出现故障时,仅当存在我们第一次创建阵列时预留的备用设备时,磁盘阵列会将自动启动重建。 + +![Check RAID Faulty Disk](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Faulty-Disk.png) + +*检查 RAID 故障磁盘* + +否则,我们需要手动将一个额外的物理驱动器插入到我们的系统,并且运行。 + + # mdadm /dev/md0 --add /dev/sdX1 + +/dev/md0 是出现了问题的阵列,而 /dev/sdx1 是新添加的设备。 + +**6. 拆解一个工作阵列** + +如果你需要使用工作阵列的设备创建一个新的阵列,你可能不得不去拆解已有工作阵列——(可选步骤) + + # 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. 设置邮件通知** + +你可以配置一个用于发送通知的有效邮件地址或者系统账号(确保在 mdadm.conf 文件中有下面这一行)。——(可选步骤) + + MAILADDR root + +在这种情况下,来自 RAID 后台监控程序所有的通知将会发送到你的本地 root 账号的邮件箱中。其中一个类似的通知如下。 + +说明:此次通知事件和第5步中的例子相关。此处一个设备被标志为错误,并且一个空闲的设备自动地被 mdadm 加入到阵列。我们用完了所有“健康的”空闲设备,因此我们得到了通知。 + +![RAID Monitoring Alerts](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Monitoring-Alerts.png) + +*RAID 监控通知* + +#### 了解 RAID 级别 #### + +**RAID 0** + +阵列总大小是最小分区大小的 n 倍,n 是阵列中独立磁盘的个数(你至少需要两个驱动器/磁盘)。运行下面命令,使用 /dev/sdb1 和 /dev/sdc1 分区组装一个 RAID 0 阵列。 + + # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 + +常见用途:用于支持性能比容错更重要的实时应用程序的设置 + +**RAID 1 (又名镜像)** + +阵列总大小等于最小分区大小(你至少需要两个驱动器/磁盘)。运行下面命令,使用 /dev/sdb1 和 /dev/sdc1 分区组装一个 RAID 1 阵列。 + + # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 + +常见用途:操作系统的安装或者重要的子文件夹,例如 /home + +**RAID 5 (又名奇偶校验码盘)** + +阵列总大小将是最小分区大小的 (n-1) 倍。所减少的大小用于奇偶校验(冗余)计算(你至少需要3个驱动器/磁盘)。 + +说明:你可以指定一个空闲设备 (/dev/sde1) 替换问题出现时的故障部分(分区)。运行下面命令,使用 /dev/sdb1, /dev/sdc1, /dev/sdd1,/dev/sde1 组装一个 RAID 5 阵列,其中 /dev/sde1 作为空闲分区。 + + # mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --spare-devices=1 /dev/sde1 + +常见用途:Web 和文件服务 + +**RAID 6 (又名双重奇偶校验码盘)** + +阵列总大小为(n*s)-2*s,其中n为阵列中独立磁盘的个数,s为最小磁盘大小。 + +说明:你可以指定一个空闲分区(在这个例子为 /dev/sdf1)替换问题出现时的故障部分(分区)。 + +运行下面命令,使用 /dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1 和 /dev/sdf1 组装 RAID 6 阵列,其中 /dev/sdf1 作为空闲分区。 + + # mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde --spare-devices=1 /dev/sdf1 + +常见用途:大容量、高可用性要求的文件服务器和备份服务器。 + +**RAID 1+0 (又名镜像条带)** + +因为 RAID 1+0 是 RAID 0 和 RAID 1 的组合,所以阵列总大小是基于两者的公式计算的。首先,计算每一个镜像的大小,然后再计算条带的大小。 + + # mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 --spare-devices=1 /dev/sdf1 + +常见用途:需要快速 IO 操作的数据库和应用服务器 + +#### 创建和管理系统备份 #### + +记住, RAID 其所有的价值不是在于备份的替换者!在黑板上写上1000次,如果你需要的话,但无论何时一定要记住它。在我们开始前,我们必须注意的是,没有一个放之四海皆准的针对所有系统备份的解决方案,但这里有一些东西,是你在规划一个备份策略时需要考虑的。 + +- 你的系统将用于什么?(桌面或者服务器?如果系统是应用于后者,那么最重要的服务是什么?哪个配置是痛点?) +- 你每隔多久备份你的系统? +- 你需要备份的数据是什么(比如文件/文件夹/数据库转储)?你还可以考虑是否需要备份大型文件(比如音频和视频文件)。 +- 这些备份将会存储在哪里(物理位置和媒体)? + +**备份你的数据** + +方法1:使用 dd 命令备份整个磁盘。你可以在任意时间点通过创建一个准确的镜像来备份一整个硬盘或者是分区。注意当设备是离线时,这种方法效果最好,也就是说它没有被挂载并且没有任何进程的 I/O 操作访问它。 + +这种备份方法的缺点是镜像将具有和磁盘或分区一样的大小,即使实际数据占用的是一个很小的比例。比如,如果你想要为只使用了10%的20GB的分区创建镜像,那么镜像文件将仍旧是20GB。换句话来讲,它不仅包含了备份的实际数据,而且也包含了整个分区。如果你想完整备份你的设备,那么你可以考虑使用这个方法。 + +**从现有的设备创建一个镜像文件** + + # dd if=/dev/sda of=/system_images/sda.img + 或者 + --------------------- 可选地,你可以压缩镜像文件 ------------------- + # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz + +**从镜像文件恢复备份** + + # dd if=/system_images/sda.img of=/dev/sda + 或者 + --------------------- 根据你创建镜像文件时的选择(译者注:比如压缩) ---------------- + # gzip -dc /system_images/sda.img.gz | dd of=/dev/sda + +方法2:使用 tar 命令备份确定的文件/文件夹——已经在本系列[第三讲][3]中讲了。如果你想要备份指定的文件/文件夹(配置文件,用户主目录等等),你可以使用这种方法。 + +方法3:使用 rsync 命令同步文件。rsync 是一种多功能远程(和本地)文件复制工具。如果你想要从网络设备备份或同步文件,rsync 是一种选择。 + + +无论是你是正在同步两个本地文件夹还是本地 < — > 挂载在本地文件系统的远程文件夹,其基本语法是一样的。 + + # rsync -av source_directory destination_directory + +在这里,-a 递归遍历子目录(如果它们存在的话),维持符号链接、时间戳、权限以及原本的属主/属组,-v 显示详细过程。 + +![rsync Synchronizing Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronizing-Files.png) + +*rsync 同步文件* + +除此之外,如果你想增加在网络上传输数据的安全性,你可以通过 ssh 协议使用 rsync。 + +**通过 ssh 同步本地到远程文件夹** + + # rsync -avzhe ssh backups root@remote_host:/remote_directory/ + +这个示例,本地主机上的 backups 文件夹将与远程主机上的 /root/remote_directory 的内容同步。 + +在这里,-h 选项以易读的格式显示文件的大小,-e 标志用于表示一个 ssh 连接。 + +![rsync Synchronize Remote Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronize-Remote-Files.png) + +*rsync 同步远程文件* + +**通过ssh同步远程到本地文件夹** + +在这种情况下,交换前面示例中的 source 和 destination 文件夹。 + + # rsync -avzhe ssh root@remote_host:/remote_directory/ backups + +请注意这些只是 rsync 用法的三个示例而已(你可能遇到的最常见的情形)。对于更多有关 rsync 命令的示例和用法 ,你可以查看下面的文章。 + +- [在 Linux 下同步文件的10个 rsync命令][4] + +### 总结 ### + +作为一个系统管理员,你需要确保你的系统表现得尽可能好。如果你做好了充分准备,并且如果你的数据完整性能被诸如 RAID 和系统日常备份的存储技术支持,那你将是安全的。 + +如果你有有关完善这篇文章的问题、评论或者进一步的想法,可以在下面畅所欲言。除此之外,请考虑通过你的社交网络简介分享这系列文章。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[cpsoture](https://github.com/cposture) +校对:[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-6085-1.html +[2]:https://linux.cn/article-7187-1.html +[3]:https://linux.cn/article-7171-1.html +[4]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ + diff --git a/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md deleted file mode 100644 index 5de5004424..0000000000 --- a/translated/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md +++ /dev/null @@ -1,284 +0,0 @@ -LFCS 系列第六讲:组装分区为RAID设备——创建和管理系统备份 -========================================================= -Linux 基金会已经发起了一个全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让来自世界各地的人有机会参加到 LFCS 测试,获得关于有能力在 Linux 系统中执行中间系统管理任务的认证。该认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时上游团队请求支持的决策能力。 - -![Linux Foundation Certified Sysadmin – Part 6](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-6.png) - -LFCS 系列第六讲 - -以下视频介绍了 Linux 基金会认证程序。 - -注:youtube 视频 - - -本讲是《十套教程》系列中的第六讲,在这一讲里,我们将会解释如何组装分区为RAID设备——创建和管理系统备份。这些都是 LFCS 认证中的必备知识。 - -### 了解RAID ### - -一种被称为独立磁盘冗余阵列(RAID)的技术是将多个硬盘组合成一个单独逻辑单元的存储解决方案,它提供了数据冗余功能并且改善硬盘的读写操作性能。 - -然而,实际的容错和磁盘I/O性能硬盘取决于如何将多个硬盘组装成磁盘阵列。根据可用的设备和容错/性能的需求,RAID被分为不同的级别,你可以在Tecmint.com上参考RAID系列文章以获得每个RAID级别更详细的解释。 - -- RAID Guide: [What is RAID, Concepts of RAID and RAID Levels Explained][1] - -我们选择用于创建、组装、管理、监视软件RAID的工具,叫做mdadm(multiple disk 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 # -``` - -#### 组装分区作为RAID设备 #### - -组装已有分区作为RAID设备的过程由以下步骤组成。 - -**1. 使用mdadm创建阵列** - -如果先前其中一个分区被格式化,或者作为了另一个RAID阵列的一部分,你会被提示以确认创建一个新的阵列。假设你已经采取了必要的预防措施以避免丢失重要数据,那么可以安全地输入Y并且按下回车。 - -``` -# 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) - -创建RAID阵列 - -**2. 检查阵列的创建状态** - -在创建了RAID阵列之后,你可以检查使用以下命令检查阵列的状态。 - - - # 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) - -检查RAID阵列的状态 - -**3. 格式化RAID设备** - -如本系列[Part 4][2]所介绍的,按照你的需求/要求采用某种文件系统格式化你的设备。 - -4. 监控RAID阵列服务 - -指示监控服务时刻监视你的RAID阵列。把```# mdadm --detail --scan```命令输出结果添加到/etc/mdadm/mdadm.conf(Debian和derivatives)或者/etc/mdadm.conf(Cent0S/openSUSE),如下。 - - # mdadm --detail --scan - - -![Monitor RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Monitor-RAID-Array.png) - -监控RAID阵列 - - # mdadm --assemble --scan [Assemble the array] - -为了确保服务能够开机启动,需要以root权限运行以下命令。 - -**Debian 和 Derivatives** - -Debian 和 Derivatives能够通过下面步骤使服务默认开机启动 - - # update-rc.d mdadm defaults - -在/etc/default/mdadm文件中添加下面这一行 - - AUTOSTART=true - - -**CentOS 和 openSUSE(systemd-based)** - - # systemctl start mdmonitor - # systemctl enable mdmonitor - -**CentOS 和 openSUSEi(SysVinit-based)** - - # service mdmonitor start - # chkconfig mdmonitor on - -**5. 检查RAID磁盘故障** - -在支持冗余的的RAID级别中,在需要时会替换故障的驱动器。当磁盘阵列中的设备出现故障时,仅当存在我们第一次创建阵列时预留的备用设备时,磁盘阵列会将自动启动重建。 - -![Check RAID Faulty Disk](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Faulty-Disk.png) - -检查RAID故障磁盘 - -否则,我们需要手动连接一个额外的物理驱动器到我们的系统,并且运行。 - - # mdadm /dev/md0 --add /dev/sdX1 - -/dev/md0是出现了问题的阵列,而/dev/sdx1是新添加的设备。 - -**6. 分解一个工作阵列** - -如果你需要使用工作阵列的设备创建一个新的阵列,你可能不得不去分解已有工作阵列——(可选步骤) - - # 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. 设置邮件通知** - -你可以配置一个用于发送通知的有效邮件地址或者系统账号(确保在mdadm.conf文件中有下面这一行)。——(可选步骤) - - MAILADDR root - -在这种情况下,来自RAID后台监控程序所有的通知将会发送到你的本地root账号的邮件箱中。其中一个类似的通知如下。 - -说明:此次通知事件和第5步中的例子相关。一个设备被标志为错误并且一个空闲的设备自动地被mdadm加入到阵列。我们用完了所有"健康的"空闲设备,因此我们得到了通知。 - -![RAID Monitoring Alerts](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Monitoring-Alerts.png) - -RAID监控通知 - -#### 了解RAID级别 #### - -** RAID 0 ** - -阵列总大小是最小分区大小的n倍,n是阵列中独立磁盘的个数(你至少需要两个驱动器/磁盘)。运行下面命令,使用/dev/sdb1和/dev/sdc1分区组装一个RAID 0 阵列。 - - # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 - -常见用途:用于支持性能比容错更重要的实时应用程序的设置 - -**RAID 1 (又名镜像/Mirroring)** - -阵列总大小等于最小分区大小(你至少需要两个驱动器/磁盘)。运行下面命令,使用/dev/sdb1和/dev/sdc1分区组装一个RAID 1 阵列。 - - # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 - -常见用途:操作系统的安装或者重要的子文件夹,例如 /home - -**RAID 5 (又名奇偶校验码盘/drives with Parity)** - -阵列总大小将是最小分区大小的(n-1)倍。//用于奇偶校验(冗余)计算(你至少需要3个驱动器/磁盘)。 - -说明:你可以指定一个空闲设备(/dev/sde1)替换问题出现时的故障部分(分区)。运行下面命令,使用/dev/sdb1, /dev/sdc1, /dev/sdd1,/dev/sde1组装一个RAID 5 阵列,其中/dev/sde1作为空闲分区。 - - # mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --spare-devices=1 /dev/sde1 - -常见用途:Web和文件服务 - -**RAID 6 (又名双重奇偶校验码盘/drives with double Parity)** - -阵列总大小为(n*s)-2*s,其中n为阵列中独立磁盘的个数,s为最小磁盘大小。 - -说明:你可以指定一个空闲分区(在这个例子为/dev/sdf1)替换问题出现时的故障部分(分区)。 - -运行下面命令,使用/dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1和/dev/sdf1组装RAID 6阵列,其中/dev/sdf1作为空闲分区。 - - # mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde --spare-devices=1 /dev/sdf1 - -常见用途:大容量、高可用性要求的文件服务器和备份服务器。 - -**RAID 1+0 (又名镜像条带/stripe of mirrors)** - -因为RAID 1+0是RAID 0 和 RAID 1的组合,所以阵列总大小是基于两者的公式计算的。首先,计算每一个镜像的大小,然后再计算条带的大小。 - - - # mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 --spare-devices=1 /dev/sdf1 - -常见用途:需要快速IO操作的数据库和应用服务器 - -#### 创建和管理系统备份 #### - -记住RAID其所有的价值不是在于备份的替换者是对你有益的!在黑板上写上1000次,如果你需要的话,但无论何时一定要记住它。在我们开始前,我们必须注意的是,没有一个放之四海皆准的针对所有系统备份的解决方案,但这里有一些东西,是你在规划一个备份策略时需要考虑的。 - -- 你的系统将用于什么?(桌面或者服务器?如果系统是应用于后者,那么最重要的服务是什么——//其配置?) -- 你每隔多久备份你的系统? -- 你需要备份的数据是什么(比如 文件/文件夹/数据库转储)?你还可以考虑是否需要备份大型文件(比如音频和视频文件)。 -- 这些备份将会存储在哪里(物理位置和媒体)? - -**备份你的数据** - -方法1:使用dd命令备份整个磁盘。你可以在任意时间点通过创建一个准确的镜像来备份一整个硬盘或者是分区。注意当设备是离线时,这种方法效果最好,也就是说它没有被挂载并且没有任何进程的I/O操作访问它。 - -这种备份方法的缺点是镜像将具有和磁盘或分区一样的大小,即使实际数据占用的是一个很小的比例。比如,如果你想要为只使用了10%的20GB的分区创建镜像,那么镜像文件将仍旧是20GB。换句话来讲,它不仅包含了备份的实际数据,而且也包含了整个分区。如果你想完整备份你的设备,那么你可以考虑使用这个方法。 - -**从现有的设备创建一个镜像文件** - - # dd if=/dev/sda of=/system_images/sda.img - 或者 - --------------------- 可选地,你可以压缩镜像文件 ------------------- - # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz - -**从镜像文件恢复备份** - - # dd if=/system_images/sda.img of=/dev/sda - 或者 - --------------------- 根据你创建镜像文件时的选择(译者注:比如压缩) ---------------- - # gzip -dc /system_images/sda.img.gz | dd of=/dev/sda - -方法2:使用tar命令备份确定的文件/文件夹——已经在本系列[Part 3][3]中讲了。如果你想要备份指定的文件/文件夹(配置文件,用户主目录等等),你可以使用这种方法。 - -方法3:使用rsync命令同步文件。rsync是一种多功能远程(和本地)文件复制工具。如果你想要从网络设备备份或同步文件,rsync是一种选择。 - - -无论是你是正在同步两个本地文件夹还是本地 < — > 挂载在本地文件系统的远程文件夹,其基本语法是一样的。 - - # rsync -av source_directory destination directory - -在这里,-a 递归遍历子目录(如果它们存在的话),维持符号链接、时间戳、权限以及原本的属主/属组,-v 显示详细过程。 - -![rsync Synchronizing Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronizing-Files.png) - -rsync 同步文件 - -除此之外,如果你想增加在网络上传输数据的安全性,你可以通过rsync使用ssh协议。 - -**通过ssh同步本地 → 远程文件夹** - - # rsync -avzhe ssh backups root@remote_host:/remote_directory/ - -这个示例,本地主机上的backups文件夹将与远程主机上的/root/remote_directory的内容同步。 - -在这里,-h 选项以人可读的格式显示文件的大小,-e 标志用于表示一个ssh连接。 - -![rsync Synchronize Remote Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronize-Remote-Files.png) - -rsync 同步远程文件 - -**通过ssh同步远程 → 本地 文件夹** - -在这种情况下,交换前面示例中的source和destination文件夹。 - - # rsync -avzhe ssh root@remote_host:/remote_directory/ backups - -请注意这些只是rsync用法的三个示例而已(你可能遇到的最常见的情形)。对于更多有关rsync命令的示例和用法 ,你可以查看下面的文章。 - -- Read Also: [10 rsync Commands to Sync Files in Linux][4] - -### Summary ### - -作为一个系统管理员,你需要确保你的系统表现得尽可能好。如果你做好了充分准备,并且如果你的数据完整性能被诸如RAID和系统日常备份的存储技术支持,那你将是安全的。 - -如果你有有关完善这篇文章的问题、评论或者进一步的想法,可以在下面畅所欲言。除此之外,请考虑通过你的社交网络简介分享这系列文章。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/ - -作者:[Gabriel Cánepa][a] -译者:[cpsoture](https://github.com/cposture) -校对:[校对者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/ - From e5f0d14989cbc509908229c7e197b8ecd0224087 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 16 Apr 2016 21:07:28 +0800 Subject: [PATCH 1255/1710] =?UTF-8?q?20160416-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dopts Open Container Project Components.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md diff --git a/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md b/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md new file mode 100644 index 0000000000..b10e13fe95 --- /dev/null +++ b/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md @@ -0,0 +1,48 @@ +Docker 1.11 Adopts Open Container Project Components +======================================================= + +![](http://images.techhive.com/images/article/2015/01/docker-620x465-100559026-primary.idge.jpg) + +>Docker's participation in the Open Container project has come full circle, as the latest version of Docker is now built with components donated by Docker to the OCP + +The biggest news about [Docker 1.11][1] isn't features in the application, but that it uses component versions standardized under the aegis of the Open Container Project. + +Last year, Docker donated the core of its [runC][2] runtime to the OCP as a basis for building container tools. The same went for [containerd][3], a daemon or server used to control instances of runC. Docker 1.11 now uses the donated and publicly worked-on versions of those projects. + +>[ Dig into the the red-hot open source framework in InfoWorld's [beginner's guide to Docker][4]. Pick it up today! | Get a digest of the day's top tech stories in the [InfoWorld Daily newsletter][5]. ] + +>Docker is making this move to challenge the narrative that its container ecosystem is still [dictated chiefly by Docker itself][6]. It isn't donating its container specs and runtime details to the OCP merely for show; it wants the future development of the project to be as open-ended and inclusive as possible. + +![](http://images.techhive.com/images/article/2016/04/docker-runc-100656060-large.idge.png) + +>Docker 1.11 has been reworked to use the runC and containerd components contributed to the Open Container Project. The runC engine can be swapped out and replaced if needed. + +[Two chief committers][7] on runC are Docker employees, but committers from Virtuozzo (of Parallels fame), Red Hat's OpenShift and Project Atomic projects, Huawei, GE Healthcare, and Suse Linux have all been regulars as well. + +The more visible changes in Docker 1.11 reflect this. Previously, the Docker runtime was the only one available within Docker, and critics felt this limited users' choices. The runc runtime is now swappable; while Docker ships with runc as the default engine, any other compatible engine can be swapped in. (Docker also wants it to be possible to do this without having to kill and restart currently running containers, but that's an improvement scheduled for later.) + +Docker is making a case for this OCP-based development process as an inherently better method to create its product. "Splitting Docker up into focused independent tools means more focused maintainers, and ultimately better quality software," stated Docker in its [official blog post][8] announcing 1.11. + +Aside from fixing long-standing bugs and ensuring the runC/containerd version of Docker didn't slow down, Docker has rolled a slew of improvements into Docker 1.11. Docker Engine now supports VLANs and IPv6 service discovery, and it automatically performs DNS round-robin load balancing across multiple containers that have the same alias. + + + +------------------------------------------------------------------------------ + +via: http://www.infoworld.com/article/3055966/open-source-tools/docker-111-adopts-open-container-project-components.html + +作者:[Serdar Yegulalp][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/Serdar-Yegulalp/ +[1]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ +[2]: http://runc.io/ +[3]: https://containerd.tools/ +[4]: http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker#tk.ifw-infsb +[5]: http://www.infoworld.com/newsletters/signup.html#tk.ifw-infsb +[6]: http://www.infoworld.com/article/2876801/application-virtualization/docker-reorganization-grows-up.html +[7]: https://github.com/opencontainers/runc/graphs/contributors +[8]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ From 3cebe0a33a79b0cb0afa119be3feefbddf9a58c2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 16 Apr 2016 21:13:08 +0800 Subject: [PATCH 1256/1710] =?UTF-8?q?20160416-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ith Extensive File Control Capabilities.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sources/news/20160415 ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities.md diff --git a/sources/news/20160415 ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities.md b/sources/news/20160415 ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities.md new file mode 100644 index 0000000000..6249163578 --- /dev/null +++ b/sources/news/20160415 ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities.md @@ -0,0 +1,32 @@ +ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities +================================================================================== + +>ownCloud, Inc. has had the great pleasure of [announcing][1] the availability of the Enterprise Edition (EE) of its powerful ownCloud 9.0 self-hosting cloud server solution. + +Engineered exclusively for small- and medium-sized business, as well as major organizations and enterprises, [ownCloud 9.0 Enterprise Edition][2] is now available with extensive file control capabilities and all the cool new features that made the open-source version of the project famous amongst Linux users. + +Prominent new features in ownCloud 9.0 Enterprise Edition are built-in Auto-Tagging and File Firewall apps, which have been based on some of the new features of ownCloud 9.0, such as file tags, file comments, as well as notifications and activities enhancements. This offers system administrators the ability to set rules and classifications for shared documents based on user- or system-applied tags. + +"To illustrate how this can work, imagine working in a publicly traded company which has to be very careful not to release financial information ahead of official disclosure," reads the [announcement][3]. "While sharing this information internally it could end up in a folder which is shared through a public link. By assigning a special system tag, admins can configure the system to ensure the files are not available for download despite this mistake." + +### Used by over 8 million people around the globe + +ownCloud 9.0 is the best release of the open-source self-hosting cloud server software so far, which is currently used by over 8 million users around the globe. The release has brought a huge number of new features, such as code signing, as well as dozens of under-the-hood improvements and cosmetic changes. ownCloud 9.0 also got its first point release, version 9.0.1, last week, which [introduced even more enhancements][4]. + +And now, enterprises can take advantage of ownCloud 9.0's new features to differentiate between storage type and location, as well as the location of users, groups, and clients. ownCloud 9.0 Enterprise Edition gives them extensive access control, which is perfect if they have strict company guidelines or work with all sorts of regulations and rules. Below, you can see the File Firewall and Auto-Tagging apps in action. + +------------------------------------------------------------------------------ + +via: http://news.softpedia.com/news/owncloud-9-0-enterprise-edition-arrives-with-extensive-file-control-capabilities-502985.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://owncloud.com/blog-introducing-owncloud-9-enterprise-edition/ +[2]: https://owncloud.com/ +[3]: https://owncloud.org/blog/owncloud-9-0-enterprise-edition-is-now-available/ +[4]: http://news.softpedia.com/news/owncloud-9-0-gets-its-first-point-release-over-120-improvements-introduced-502698.shtml From 9f99323e3b9302b931d48401633c5a102099bf2f Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 16 Apr 2016 21:16:38 +0800 Subject: [PATCH 1257/1710] =?UTF-8?q?20160416-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...017 Because of SUSE Linux Enterprise 12.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md diff --git a/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md b/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md new file mode 100644 index 0000000000..5f8bf0a944 --- /dev/null +++ b/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md @@ -0,0 +1,31 @@ +Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12 +================================================================================== + +>Linux kernel developer Jiri Slaby has announced the release of the fifty-eighth maintenance build of the long-term supported Linux 3.12 kernel series, as well as a modification to its EOL status. + +Linux kernel 3.12.58 LTS is now available, and those running it on their Linux kernel-based operating system must update as soon as possible. And the good news is that the Linux 3.12 branch is here to stay for one more year, until 2017, because SUSE Linux Enterprise (SLE) 12 Service Pack 1 is based on it. + +"Since SLE12-SP1 is based upon 3.12 and its EOL is in 2017, move the EOL of 3.12 to 2017 too," said Jiri Slaby in a [patch announcement][1] sent to one of Linux kernel's mailing lists, where he has also revealed the "end of life" statuses for other kernel branches, such as August 2016 for Linux 3.14, January 2017 for Linux 3.18, or September 2017 for Linux 4.1. + +### What's new in Linux kernel 3.12.58 LTS + +If you're wondering what's new in Linux kernel 3.12.58 LTS, we can tell you that, according to the [appended shortlog][2], it is a pretty healthy update that changes a total of 114 files, with 835 insertions and 298 deletions. Among the changes, we can notice the usual sound and networking stack improvements, and many updated drivers. + +There are also multiple improvements to the x86 hardware architecture, along with small fixes for the Xtensa and s390 ones. Filesystems like NFS, OCFS2, Btrfs, JBD2, and XFS have also received various fixes, and among the updated drivers, we can mention USB, Xen, MD, MTD, media, SCSI, TTY, networking, ATA, Bluetooth, hwmon, EDAC, and CPUFreq. + +As usual, you can [download the Linux kernel 3.12.58 LTS sources][3] right now via our website or directly from kernel.org. Please update your GNU/Linux operating system as soon as possible if it is powered by a kernel from the Linux 3.12 series. + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps-to-start-your-linux-sysadmin-career + +作者:[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://lkml.iu.edu/hypermail/linux/kernel/1604.1/00792.html +[2]: http://www.spinics.net/lists/stable/msg128634.html +[3]: http://linux.softpedia.com/get/System/Operating-Systems/Kernels/Linux-Kernel-Stable-1960.shtml From 9b9327a507fda1635d6c70170d17b6e075cef693 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 16 Apr 2016 21:30:27 +0800 Subject: [PATCH 1258/1710] =?UTF-8?q?20160416-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... to navigating OpenStack Infrastructure.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md diff --git a/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md b/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md new file mode 100644 index 0000000000..5a12f7a3d1 --- /dev/null +++ b/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md @@ -0,0 +1,76 @@ +A newcomer's guide to navigating OpenStack Infrastructure +=========================================================== + +New contributors to OpenStack are welcome, but having a road map for navigating within this maturing, fast-paced open source community doesn't hurt. At OpenStack Summit in Austin, [Paul Belanger][1] (Red Hat, Inc.), [Elizabeth K. Joseph][2] (HPE), and [Christopher Aedo][3] (IBM) will lead a session on [OpenStack Infrastructure for Beginners][4]. In this interview, they offer tips and resources to help onboard new OpenStack contributors. + +![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) + +**Your talk description says you'll be "diving into the heart of infrastructure and explain everything you need to know about the systems that keep OpenStack working." That's a tall order for a 40-minute time slot. What are the top things beginners should know about OpenStack infrastructure?** + +**Elizabeth K. Joseph (EKJ)**: We don't use GitHub for OpenStack patches. This is something that trips up a lot of new contributors because we do maintain mirrors of all our repositories on GitHub for historical reasons. Instead we use a fully open source code review and continuous integration (CI) system maintained by the OpenStack Infrastructure team. Relatedly, since we run a CI system, every change proposed to OpenStack is tested before merging. + +**Paul Belanger (PB)**: A lot of passionate people in the project, so don't get discouraged if your patch gets a -1. + +**Christopher Aedo (CA)**: The community wants to help you succeed, don't be afraid to ask questions or ask for pointers to more information to improve your understanding. + +### Which online resources would you recommend for beginners to fill in the holes for what you can't cover in your talk? + +**PB**: Definitely our [OpenStack Project Infrastructure documentation][5]. At lot of effort has been taken to keep it up to date as much as possible. Every system used in running OpenStack as a project has a dedicated page, even the OpenStack cloud the Infrastructure teams is bringing online. + +**EKJ**: I'll echo what Paul said about the Infrastructure documentation, and add that we love seeing patches from folks who are learning. We often don't realize what we're missing in terms of documentation until someone asks. So read, learn, and then help us fill in the gaps. You can ask questions on the [openstack-infra mailing list][6] or in our IRC channel at #openstack-infra on Freenode. + +**CA**: I love [this detailed post][7] about building images, by Ian Wienand. + +### Which "gotchas" should new OpenStack contributors look out for? + +**EKJ**: Contributing is not just about submitting new code and new features; the OpenStack community places a very high value on doing code reviews. If you want people to look at a patch you submitted, consider reviewing some of the work of others and providing clear and constructive feedback. The more your fellow contributors know about your work and see you doing reviews, the more likely you'll get your code reviewed in a timely manner. + +**CA**: I see a lot of newcomers getting tripped up with [Gerrit][8]. Read through the [developer workflow][9] in the Developers Guide, and then maybe read through it one more time. If you're not used to Gerrit, it can seem confusing and overwhelming at first, but walking through a few code reviews usually makes it all come together. Also, I'm a big fan of IRC. It can be a great place to get help, but it's best if you can maintain a persistent presence so people can answer your questions even if you're not "there" at that particular moment. (Read [IRC, the secret to success in open source][10].) You don't need to be "always on," but the ability to easily scroll back in a channel and catch up on a conversation can be invaluable. + +**PB**: I agree with both Elizabeth and Chris—Gerrit is what to look out for. It is going to be the hub of your development effort. Not only will you be submitting code for people to review, but you'll also be reviewing other contributors' code. Watch out for the Gerrit UI; it can be confusing at times. I'd recommend trying out [Gertty][11], which is a console-based interface to the Gerrit Code Review system, which happens to be a project driven by OpenStack Infrastructure. + +### What resources do you recommend for beginners to help them network with other OpenStack contributors? + +**PB**: For me, it was using IRC and joining the #openstack-infra channel on Freenode ([IRC logs][12]). There is a lot of fantastic information and people in that channel. You get to see the day-to-day operations of the OpenStack project, and once you know how the project works, you'll have a better understanding on how to contribute to its future. + +**CA**: I want to second that note for IRC; staying on IRC throughout the day made a huge difference for me in terms of feeling informed and connected. It's also such a great way to get help when you're stuck with someone on one of the projects—the ones with active IRC channels always have someone around willing to get your issues sorted out. + +**EKJ**: The [openstack-dev mailing list][13] is quite important for staying up to date with news about projects you're working on inside of OpenStack, so I recommend subscribing to that. The mailing list uses subject tags to separate projects, so you can instruct your email client to use those and focus on threads that impact projects you care about. Beyond online resources, many OpenStack groups have popped up all over the world that serve the needs of both users and contributors to OpenStack, and many of them routinely have talks and events with key OpenStack contributors. You can search on Meetup.com in your area, or search on [groups.openstack.org][14] to see if there is an OpenStack group in your area. Finally, there are the [OpenStack Summits][15], which happen every six months, and where we'll be giving our Infrastructure talk. In their current format, the summits consist of both a user conference and a developer conference in one space to talk about everything related to OpenStack, past, present, and future. + +### In which areas does OpenStack need to improve to become more beginner-friendly? + +**PB**: I think our [account-setup][16] process could be made easier for new contributors, especially how many steps are needed to submit your first patch. There is a large cost to enroll into OpenStack development model, which maybe be too much for contributors; however, once enrolled, the model works fantastic for developers. + +**CA**: We have a very pro-developer community, but the focus is on developing OpenStack itself, with less consideration given to the users of OpenStack clouds. We need to bring in application developers and encourage more people to develop things that run beautifully on OpenStack clouds, and encourage them to share those apps in the [Community App Catalog][17]. We can do this by continuing to improve our API standards and by ensuring different libraries (like libcloud, phpopencloud, and others) continue to work reliably for developers. Oh, also by sponsoring more OpenStack hackathons! All these things can ease entry for newcomers, which will lead to them sticking around. + +**EKJ**: I've worked on open source software for many years, but for a large number of OpenStack developers, this is the first open source project they've every worked on. I've found that their proprietary software background doesn't prepare them for the open source ideals, methodologies, and collaboration techniques used in an open source project. I'd love to see us do a better job of welcoming people who have this proprietary software background and working with them so they can truly understand the value of what they're working on in the open source software community. + +### I think 2016 is shaping up to be the Year of the Open Source Haiku. Explain OpenStack to beginners via Haiku. + +**PB**: OpenStack runs clouds If you enjoy free software Submit your first patch + +**CA**: In the near future OpenStack will rule the world Help make it happen! + +**EKJ**: OpenStack is free Deploy on your own servers And run your own cloud! + +*Paul, Elizabeth*, and Christopher will be [speaking at OpenStack Summit][18] in Austin on Monday, April 25, starting at 11:15am. + + +[1]: https://twitter.com/pabelanger +[2]: https://twitter.com/pleia2 +[3]: https://twitter.com/docaedo +[4]: https://www.openstack.org/summit/austin-2016/summit-schedule/events/7337 +[5]: http://docs.openstack.org/infra/system-config/ +[6]: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra +[7]: https://www.technovelty.org/openstack/image-building-in-openstack-ci.html +[8]: https://code.google.com/p/gerrit/ +[9]: http://docs.openstack.org/infra/manual/developers.html#development-workflow +[10]: https://developer.ibm.com/opentech/2015/12/20/irc-the-secret-to-success-in-open-source/ +[11]: https://pypi.python.org/pypi/gertty +[12]: http://eavesdrop.openstack.org/irclogs/%23openstack-infra/ +[13]: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev +[14]: https://groups.openstack.org/ +[15]: https://www.openstack.org/summit/ +[16]: http://docs.openstack.org/infra/manual/developers.html#account-setup +[17]: https://apps.openstack.org/ +[18]: https://www.openstack.org/summit/austin-2016/summit-schedule/events/7337 From 44632443306f0c6008903afe9b9bae2ba8ef0cd8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 16 Apr 2016 21:31:43 +0800 Subject: [PATCH 1259/1710] =?UTF-8?q?update=2020160416-4=20=E9=80=89?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...'s guide to navigating OpenStack Infrastructure.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md b/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md index 5a12f7a3d1..4fa50b0a45 100644 --- a/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md +++ b/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md @@ -56,6 +56,17 @@ New contributors to OpenStack are welcome, but having a road map for navigating *Paul, Elizabeth*, and Christopher will be [speaking at OpenStack Summit][18] in Austin on Monday, April 25, starting at 11:15am. +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/4/interview-openstack-infrastructure-beginners + +作者:[linux.com][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://rikkiendsley.com/ [1]: https://twitter.com/pabelanger [2]: https://twitter.com/pleia2 [3]: https://twitter.com/docaedo From 4a2537b44507c57b797dd27f0493c639ba0a8aa6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 Apr 2016 08:34:06 +0800 Subject: [PATCH 1260/1710] PUB:20151114 How to Setup Drone - a Continuous Integration Service in Linux @oska874 --- ...Continuous Integration Service in Linux.md | 317 ++++++++++++++++++ ...Continuous Integration Service in Linux.md | 317 ------------------ 2 files changed, 317 insertions(+), 317 deletions(-) create mode 100644 published/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md delete mode 100644 translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md diff --git a/published/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md b/published/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md new file mode 100644 index 0000000000..a22718badc --- /dev/null +++ b/published/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md @@ -0,0 +1,317 @@ +如何在 linux 上配置持续集成服务 - Drone +============================================================== + +如果你对一次又一次的克隆、构建、测试和部署代码感到厌倦了,可以考虑一下持续集成。持续集成简称 CI,是一种像我们一样的频繁提交的代码库,构建、测试和部署的软件工程实践。CI 可以帮助我们快速的集成新代码到已有的代码库。如果这个过程是自动化进行的,那么就会提高开发的速度,因为这可以减少开发人员手工构建和测试的时间。[Drone][1] 是一个自由开源项目,用来提供一个非常棒的持续集成服务的环境,采用 Apache 2.0 协议发布。它已经集成近很多代码库提供商,比如 Github、Bitbucket 以及 Google Code,它可以从代码库提取代码,使我们可以对包括 PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA 等等在内的各种语言编译构建。它是如此一个强大的平台,它使用了容器和 docker 技术,这让用户每次构建都可以在保证隔离的条件下完全控制他们自己的构建环境。 + +### 1. 安装 Docker ### + +首先,我们要安装 docker,因为这是 Drone 的工作流的最关键的元素。Drone 合理的利用了 docker 来构建和测试应用。容器技术提高了应用部署的效率。要安装 docker ,我们需要在不同的 linux 发行版本运行下面对应的命令,我们这里会说明 Ubuntu 14.04 和 CentOS 7 两个版本。 + +#### Ubuntu #### + +要在 Ubuntu 上安装 Docker ,我们只需要运行下面的命令。 + + # apt-get update + # apt-get install docker.io + +安装之后我们需要使用`service` 命令重启 docker 引擎。 + + # service docker restart + +然后我们让 docker 在系统启动时自动启动。 + + # 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 + +#### CentOS #### + +第一,我们要更新机器上已经安装的软件包。我们可以使用下面的命令。 + + # sudo yum update + +要在 centos 上安装 docker,我们可以简单的运行下面的命令。 + + # curl -sSL https://get.docker.com/ | sh + +安装好 docker 引擎之后我么只需要简单使用下面的`systemd` 命令启动 docker,因为 centos 7 的默认初始化系统是 systemd。 + + # systemctl start docker + +然后我们要让 docker 在系统启动时自动启动。 + + # systemctl enable docker + + ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service' + +### 2. 安装 SQlite 驱动 ### + +Drone 默认使用 SQlite3 数据库服务器来保存数据和信息。它会在 /var/lib/drone/ 自动创建名为 drone.sqlite 的数据库来处理数据库模式的创建和迁移。要安装 SQlite3 我们要完成以下几步。 + +#### Ubuntu 14.04 #### + +因为 SQlite3 存在于 Ubuntu 14.04 的默认软件库,我们只需要简单的使用 apt 命令安装它。 + + # apt-get install libsqlite3-dev + +#### CentOS 7 #### + +要在 Centos 7 上安装需要使用下面的 yum 命令。 + + # yum install sqlite-devel + +### 3. 安装 Drone ### + +最后,我们安装好依赖的软件,我们现在更进一步的接近安装 Drone。在这一步里我们只简单的从官方链接下载对应的二进制软件包,然后使用默认软件包管理器安装 Drone。 + +#### Ubuntu #### + +我们将使用 wget 从官方的 [Debian 文件下载链接][2]下载 drone 的 debian 软件包。下面就是下载命令。 + + # 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] + +下载好之后,我们将使用 dpkg 软件包管理器安装它。 + + # 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 + +#### CentOS #### + +在 CentOS 机器上我们要使用 wget 命令从[下载链接][3]下载 RPM 包。 + + # 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] + +然后我们使用 yum 安装 rpm 包。 + + # yum localinstall drone.rpm + +### 4. 配置端口 ### + +安装完成之后,我们要先进行配置才能工作起来。drone 的配置文件在**/etc/drone/drone.toml** 。默认情况下 drone 的 web 接口使用的是80,而这也是 http 默认的端口,如果我们修改它,请按下面所示的修改配置文件里 server 块对应的值。 + + [server] + port=":80" + +### 5. 集成 Github ### + +为了运行 Drone 我们必须设置最少一个和 GitHub、GitHub 企业版,Gitlab,Gogs,Bitbucket 关联的集成点。在本文里我们只集成了 github,但是如果我们要集成其他的服务,我们可以在配置文件做修改。为了集成 github 我们需要在github 的设置里创建一个新的应用:https://github.com/settings/developers 。 + +![Registering App Github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-app-github.png) + +要创建一个应用,我们需要在 `New Application` 页面点击 `Register`,然后如下所示填表。 + +![Registering OAuth app github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-OAuth-app-github.png) + +我们应该保证在应用的配置项里设置了**授权回调链接**,链接看起来类似 `http://drone.linoxide.com/api/auth/github.com`。然后我们点击注册应用。所有都做好之后我们会看到我们需要在我们的 Drone 配置文件里配置的客户端 ID 和客户端密钥。 + +![Client ID and Secret Token](http://blog.linoxide.com/wp-content/uploads/2015/11/client-id-secret-token.png) + +在这些都完成之后我们需要使用文本编辑器编辑 drone 配置文件,比如使用下面的命令。 + + # nano /etc/drone/drone.toml + +然后我们会在 drone 的配置文件里面找到`[github]` 部分,紧接着的是下面所示的配置内容 + + [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. 配置 SMTP 服务器 ### + +如果我们想让 drone 使用 email 发送通知,那么我们需要在 SMTP 配置里面设置我们的 SMTP 服务器。如果我们已经有了一个 SMTP 服务,那就只需要简单的使用它的配置文件就行了,但是因为我们没有一个 SMTP 服务器,我们需要安装一个 MTA 比如 Postfix,然后在 drone 配置文件里配置好 SMTP。 + +#### Ubuntu #### + +在 ubuntu 里使用下面的 apt 命令安装 postfix。 + + # apt-get install postfix + +#### CentOS #### + +在 CentOS 里使用下面的 yum 命令安装 postfix。 + + # yum install postfix + +安装好之后,我们需要编辑我们的 postfix 配置文件。 + + # nano /etc/postfix/main.cf + +然后我们要把 myhostname 的值替换为我们自己的 FQDN,比如 drone.linoxide.com。 + + myhostname = drone.linoxide.com + +现在开始配置 drone 配置文件里的 SMTP 部分。 + + # nano /etc/drone/drone.toml + +找到`[smtp]` 部分补充上下面的内容。 + + [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) + +注意:这里的 **user** 和 **pass** 参数强烈推荐一定要改成某个具体用户的配置。 + +### 7. 配置 Worker ### + +如我们所知的 drone 利用了 docker 完成构建、测试任务,我们需要把 docker 配置为 drone 的 worker。要完成这些需要修改 drone 配置文件里的`[worker]` 部分。 + + # nano /etc/drone/drone.toml + +然后取消底下几行的注释并且补充上下面的内容。 + + [worker] + nodes=[ + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock" + ] + +这里我们只设置了两个节点,这意味着上面的配置文件只能同时执行2 个构建操作。要提高并发性可以增大节点的值。 + + [worker] + nodes=[ + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock" + ] + +使用上面的配置文件 drone 被配置为使用本地的 docker 守护程序可以同时构建4个任务。 + +### 8. 重启 Drone ### + +最后,当所有的安装和配置都准备好之后,我们现在要在本地的 linux 机器上启动 drone 服务器。 + +#### Ubuntu #### + +因为 ubuntu 14.04 使用了 sysvinit 作为默认的初始化系统,所以只需要简单执行下面的 service 命令就可以启动 drone 了。 + + # service drone restart + +要让 drone 在系统启动时也自动运行,需要运行下面的命令。 + + # update-rc.d drone defaults + +#### CentOS #### + +因为 CentOS 7使用 systemd 作为初始化系统,所以只需要运行下面的 systemd 命令就可以重启 drone。 + + # systemctl restart drone + +要让 drone 自动运行只需要运行下面的命令。 + + # systemctl enable drone + +### 9. 添加防火墙例外规则 ### + +众所周知 drone 默认使用了80 端口而我们又没有修改它,所以我们需要配置防火墙程序允许80 端口(http)开放并允许其他机器可以通过网络连接。 + +#### Ubuntu 14.04 #### + +iptables 是最流行的防火墙程序,并且 ubuntu 默认安装了它。我们需要修改 iptable 以暴露端口80,这样我们才能让 drone 的 web 界面在网络上被大家访问。 + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + # /etc/init.d/iptables save + +#### CentOS 7 #### + +因为 CentOS 7 默认安装了 systemd,它使用 firewalld 作为防火墙程序。为了在 firewalld 上打开80端口(http 服务),我们需要执行下面的命令。 + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 10. 访问 web 界面 ### + +现在我们将在我们最喜欢的浏览器上通过 web 界面打开 drone。要完成这些我们要把浏览器指向运行 drone 的服务器。因为 drone 默认使用80 端口而我们有没有修改过,所以我们只需要在浏览器里根据我们的配置输入`http://ip-address/` 或 `http://drone.linoxide.com` 就行了。在我们正确的完成了上述操作后,我们就可以看到登录界面了。 + +![Login Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/login-github-drone-e1446834688394.png) + +因为在上面的步骤里配置了 Github,我们现在只需要简单的选择 github 然后进入应用授权步骤,这些完成后我们就可以进入工作台了。 + +![Drone Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/11/drone-dashboard.png) + +这里它会同步我们在 github 上的代码库,然后询问我们要在 drone 上构建那个代码库。 + +![Activate Repository](http://blog.linoxide.com/wp-content/uploads/2015/11/activate-repository-e1446835574595.png) + +这一步完成后,它会询问我们在代码库里添加`.drone.yml` 文件的新名称,并且在这个文件里定义构建的过程和配置项,比如使用那个 docker 镜像,执行那些命令和脚本来编译,等等。 + +我们按照下面的内容来配置我们的`.drone.yml`。 + + image: python + script: + - python helloworld.py + - echo "Build has been completed." + +这一步完成后我们就可以使用 drone 应用里的 YAML 格式的配置文件来构建我们的应用了。所有对代码库的提交和改变此时都会同步到这个仓库。一旦提交完成了,drone 就会自动开始构建。 + +![Building Application Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/building-application-drone.png) + +所有操作都完成后,我们就能在终端看到构建的结果了。 + +![Build Success Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/build-success-drone.png) + +### 总结 ### + +在本文中我们学习了如何安装一个可以工作的使用 drone 的持续集成平台。如果我们愿意我们甚至可以从 drone.io 官方提供的服务开始工作。我们可以根据自己的需求从免费的服务或者收费服务开始。它通过漂亮的 web 界面和强大的功能改变了持续集成的世界。它可以集成很多第三方应用和部署平台。如果你有任何问题、建议可以直接反馈给我们,谢谢。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ + +作者:[Arun Pyasi][a] +译者:[ezio](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) + +本文由 [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 diff --git a/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md b/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md deleted file mode 100644 index 077c945b9c..0000000000 --- a/translated/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md +++ /dev/null @@ -1,317 +0,0 @@ -如何在linux 上配置持续集成服务 - Drone -============================================================== - -如果你对一次又一次的克隆、构建、测试和部署代码感到厌倦了,可以考虑一下持续集成。持续集成也就是CI,是软件工程的像我们一样的频繁提交的代码库,构建、测试和部署的实践。CI 帮助我们快速的集成新代码到已有的代码基线。如果这个过程是自动化进行的,那么就会提高开发的速度,因为这可以减少开发人员手工构建和测试的时间。[Drone][1] 是一个免费的开源项目,用来提供一个非常棒的持续集成服务的环境,采用了Apache 2.0 协议。它已经集成近很多代码库提供商,比如Github、Bitbucket 以及Google COde,并且它可以从代码库提取代码,使我们可以编译多种语言,包括PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA 等等。它是如此一个强大的平台是因为它每次构建都使用了容器和docker 技术,这让用户可以在保证隔离的条件下完全控制他们自己的构建环境。 - -### 1. 安装 Docker ### - -首先,我们要安装docker,因为这是Drone 的工作流的最关键的元素。Drone 合理的利用了docker 来构建和测试应用。容器技术提高了应用部署的效率。要安装docker ,我们需要在不同的linux 发行版本运行下面对应的命令,我们这里会说明Ubuntu 14.04 和CentOS 7 两个版本。 - -#### Ubuntu #### - -要在Ubuntu 上安装Docker ,我们只需要运行下面的命令。 - - # apt-get update - # apt-get install docker.io - -安装之后我们需要使用`service` 命令重启docker 引擎。 - - # service docker restart - -然后我们让docker 在系统启动时自动启动。 - - # 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 - -#### CentOS #### - -第一,我们要更新机器上已经安装的软件包。我们可以使用下面的命令。 - - # sudo yum update - -要在centos 上安装docker,我们可以简单的运行下面的命令。 - - # curl -sSL https://get.docker.com/ | sh - -安装好docker 引擎之后我么只需要简单实用下面的`systemd` 命令启动docker,因为centos 7 的默认init 系统是systemd。 - - # systemctl start docker - -然后我们要让docker 在系统启动时自动启动。 - - # systemctl enable docker - - ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service' - -### 2. 安装 SQlite 驱动 ### - -Drone 默认使用SQLite3 数据库服务器来保存数据和信息。它会在/var/lib/drone/ 自动创建名为drone.sqlite 的数据库来处理数据库模式的创建和迁移。要安装SQLite3 我们要完成以下几步。 - -#### Ubuntu 14.04 #### - -因为SQLite3 存在于Ubuntu 14.04 的默认软件库,我们只需要简单的使用apt 命令安装它。 - - # apt-get install libsqlite3-dev - -#### CentOS 7 #### - -要在Centos 7 上安装选哟使用下面的yum 命令。 - - # yum install sqlite-devel - -### 3. 安装 Drone ### - -最后,我们安装好依赖的软件,我们现在更进一步的接近安装Drone。在这一步里我们值简单的从官方链接下载对应的二进制软件包,然后使用默认软件包管理器安装Drone。 - -#### Ubuntu #### - -我们将使用wget 从官方的[Debian 文件下载链接][2]下载drone 的debian 软件包。下面就是下载命令。 - - # 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] - -下载好之后,我们将使用dpkg 软件包管理器安装它。 - - # 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 - -#### CentOS #### - -在CentOS 机器上我们要使用wget 命令从[下载链接][3]下载RPM 包。 - - # 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] - -然后我们使用yum 安装rpm 包。 - - # yum localinstall drone.rpm - -### 4. 配置端口 ### - -安装完成之后,我们要使它工作要先进行配置。drone 的配置文件在**/etc/drone/drone.toml** 。默认情况下drone 的web 接口使用的是80,而这也是http 默认的端口,如果我们要下面所示的修改配置文件里server 块对应的值。 - - [server] - port=":80" - -### 5. 集成 Github ### - -为了运行Drone 我们必须设置最少一个和GitHub、GitHub 企业版,Gitlab,Gogs,Bitbucket 关联的集成点。在本文里我们只集成了github,但是如果哦我们要集成其他的我们可以在配置文件做修改。为了集成github 我们需要在[github setting] 创建一个新的应用。 - -![Registering App Github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-app-github.png) - -要创建一个应用,我们需要在`New Application` 页面点击`Register`,然后如下所示填表。 - -![Registering OAuth app github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-OAuth-app-github.png) - -我们应该保证在应用的配置项里设置了**授权了的回调链接**,链接看起来像`http://drone.linoxide.com/api/auth/github.com`。然后我们点击注册应用。所有都做好之后我们会看到我们需要在我们的Drone 配置文件里配置的客户端ID 和客户端密钥。 - -![Client ID and Secret Token](http://blog.linoxide.com/wp-content/uploads/2015/11/client-id-secret-token.png) - -在这些都完成之后我们需要使用文本编辑器编辑drone 配置文件,比如使用下面的命令。 - - # nano /etc/drone/drone.toml - -然后我们会在drone 的配置文件里面找到`[github]` 部分,紧接着的是下面所示的配置内容 - - [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. 配置 SMTP 服务器 ### - -如果我们想让drone 使用email 发送通知,那么我们需要在SMTP 配置里面设置我们的SMTP 服务器。如果我们已经有了一个SMTP 服务,那就只需要简单的使用它的配置文件就行了,但是因为我们没有一个SMTP 服务器,我们需要安装一个MTA 比如Postfix,然后在drone 配置文件里配置好SMTP。 - -#### Ubuntu #### - -在ubuntu 里使用下面的apt 命令安装postfix。 - - # apt-get install postfix - -#### CentOS #### - -在CentOS 里使用下面的yum 命令安装postfix。 - - # yum install postfix - -安装好之后,我们需要编辑我们的postfix 配置文件。 - - # nano /etc/postfix/main.cf - -然后我们要把myhostname 的值替换为我们自己的FQDN,比如drone.linoxide.com。 - - myhostname = drone.linoxide.com - -现在开始配置drone 配置文件里的SMTP 部分。 - - # nano /etc/drone/drone.toml - -找到`[smtp]` 部分补充上下面的内容。 - - [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) - -注意:这里的**user** 和 **pass** 参数强烈推荐一定要改成一个用户的配置。 - -### 7. 配置 Worker ### - -如我们所知的drone 利用了docker 完成构建、测试任务,我们需要把docker 配置为drone 的worker。要完成这些需要修改drone 配置文件里的`[worker]` 部分。 - - # nano /etc/drone/drone.toml - -然后取消底下几行的注释并且补充上下面的内容。 - - [worker] - nodes=[ - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock" - ] - -这里我们只设置了两个节点,这意味着上面的配置文件只能同时执行2 个构建操作。要提高并发性可以增大节点的值。 - - [worker] - nodes=[ - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock", - "unix:///var/run/docker.sock" - ] - -使用上面的配置文件drone 被配置为使用本地的docker 守护程序可以同时构建4个任务。 - -### 8. 重启 Drone ### - -最后,当所有的安装和配置都准备好之后,我们现在要在本地的linux 机器上启动drone 服务器。 - -#### Ubuntu #### - -因为ubuntu 14.04 使用了sysvinit 作为默认的init 系统,所以只需要简单执行下面的service 命令就可以启动drone 了。 - - # service drone restart - -要让drone 在系统启动时也自动运行,需要运行下面的命令。 - - # update-rc.d drone defaults - -#### CentOS #### - -因为CentOS 7使用systemd 作为init 系统,所以只需要运行下面的systemd 命令就可以重启drone。 - - # systemctl restart drone - -要让drone 自动运行只需要运行下面的命令。 - - # systemctl enable drone - -### 9. 添加防火墙例外 ### - -众所周知drone 默认使用了80 端口而我们又没有修改他,所以我们需要配置防火墙程序允许80 端口(http)开发并允许其他机器可以通过网络连接。 - -#### Ubuntu 14.04 #### - -iptables 是最流行的防火墙程序,并且ubuntu 默认安装了它。我们需要修改iptable 暴露端口80,这样我们才能让drone 的web 界面在网络上被大家访问。 - - # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT - # /etc/init.d/iptables save - -#### CentOS 7 #### - -因为CentOS 7 默认安装了systemd,它使用firewalld 作为防火墙程序。为了在firewalld 上打开80端口(http 服务),我们需要执行下面的命令。 - - # firewall-cmd --permanent --add-service=http - - success - - # firewall-cmd --reload - - success - -### 10. 访问web 界面 ### - -现在我们将在我们最喜欢的浏览器上通过web 界面打开drone。要完成这些我们要把浏览器指向运行drone 的服务器。因为drone 默认使用80 端口而我们有没有修改过,所以我们只需要在浏览器里根据我们的配置输入`http://ip-address/` 或 `http://drone.linoxide.com` 就行了。在我们正确的完成了上述操作后,我们就可以看到登陆界面了。 - -![Login Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/login-github-drone-e1446834688394.png) - -因为在上面的步骤里配置了Github,我们现在只需要简单的选择github然后进入应用授权步骤,这些完成后我们就可以进入工作台了。 - -![Drone Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/11/drone-dashboard.png) - -这里它会同步我们在github 上的代码库,然后询问我们要在drone 上构建那个代码库。 - -![Activate Repository](http://blog.linoxide.com/wp-content/uploads/2015/11/activate-repository-e1446835574595.png) - -这一步完成后,它会询问我们在代码库里添加`.drone.yml` 文件的新名称,并且在这个文件里定义构建的过程和配置项,比如使用那个docker 镜像,执行那些命令和脚本来编译,等等。 - -我们按照下面的内容来配置我们的`.drone.yml`。 - - image: python - script: - - python helloworld.py - - echo "Build has been completed." - -这一步完成后我们就可以使用drone 应用里的YAML 格式的配置文件来构建我们的应用了。所有对代码库的提交和改变此时都会同步到这个仓库。一旦提交完成了,drone 就会自动开始构建。 - -![Building Application Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/building-application-drone.png) - -所有操作都完成后,我们就能在终端看到构建的结果了。 - -![Build Success Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/build-success-drone.png) - -### 总结 ### - -在本文中我们学习了如何安装一个可以工作的使用drone 的持续集成平台。如果我们愿意我们甚至可以从drone.io 官方提供的服务开始工作。我们可以根据自己的需求从免费的服务或者收费服务开始。它通过漂亮的web界面和强大的功能改变了持续集成的世界。它可以集成很多第三方应用和部署平台。如果你有任何问题、建议可以直接反馈给我们,谢谢。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ - -作者:[Arun Pyasi][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/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 58fbdaae45f8565aab62de591ebb9efda3828c70 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 17 Apr 2016 14:05:04 +0800 Subject: [PATCH 1261/1710] [translating]20160414 Linux Kernel 3.12 to Be Supported Until 2017 --- ... Supported Until 2017 Because of SUSE Linux Enterprise 12.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md b/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md index 5f8bf0a944..efe01db4ef 100644 --- a/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md +++ b/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md @@ -1,3 +1,5 @@ +alim0x translating + Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12 ================================================================================== From 6f35d8678f5716e3984f0d736f6b7f31249cdfba Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 17 Apr 2016 14:48:54 +0800 Subject: [PATCH 1262/1710] [translated]20160414 Linux Kernel 3.12 to Be Supported Until 2017 --- ...017 Because of SUSE Linux Enterprise 12.md | 33 ------------------- ...017 Because of SUSE Linux Enterprise 12.md | 31 +++++++++++++++++ 2 files changed, 31 insertions(+), 33 deletions(-) delete mode 100644 sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md create mode 100644 translated/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md diff --git a/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md b/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md deleted file mode 100644 index efe01db4ef..0000000000 --- a/sources/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md +++ /dev/null @@ -1,33 +0,0 @@ -alim0x translating - -Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12 -================================================================================== - ->Linux kernel developer Jiri Slaby has announced the release of the fifty-eighth maintenance build of the long-term supported Linux 3.12 kernel series, as well as a modification to its EOL status. - -Linux kernel 3.12.58 LTS is now available, and those running it on their Linux kernel-based operating system must update as soon as possible. And the good news is that the Linux 3.12 branch is here to stay for one more year, until 2017, because SUSE Linux Enterprise (SLE) 12 Service Pack 1 is based on it. - -"Since SLE12-SP1 is based upon 3.12 and its EOL is in 2017, move the EOL of 3.12 to 2017 too," said Jiri Slaby in a [patch announcement][1] sent to one of Linux kernel's mailing lists, where he has also revealed the "end of life" statuses for other kernel branches, such as August 2016 for Linux 3.14, January 2017 for Linux 3.18, or September 2017 for Linux 4.1. - -### What's new in Linux kernel 3.12.58 LTS - -If you're wondering what's new in Linux kernel 3.12.58 LTS, we can tell you that, according to the [appended shortlog][2], it is a pretty healthy update that changes a total of 114 files, with 835 insertions and 298 deletions. Among the changes, we can notice the usual sound and networking stack improvements, and many updated drivers. - -There are also multiple improvements to the x86 hardware architecture, along with small fixes for the Xtensa and s390 ones. Filesystems like NFS, OCFS2, Btrfs, JBD2, and XFS have also received various fixes, and among the updated drivers, we can mention USB, Xen, MD, MTD, media, SCSI, TTY, networking, ATA, Bluetooth, hwmon, EDAC, and CPUFreq. - -As usual, you can [download the Linux kernel 3.12.58 LTS sources][3] right now via our website or directly from kernel.org. Please update your GNU/Linux operating system as soon as possible if it is powered by a kernel from the Linux 3.12 series. - ------------------------------------------------------------------------------- - -via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps-to-start-your-linux-sysadmin-career - -作者:[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://lkml.iu.edu/hypermail/linux/kernel/1604.1/00792.html -[2]: http://www.spinics.net/lists/stable/msg128634.html -[3]: http://linux.softpedia.com/get/System/Operating-Systems/Kernels/Linux-Kernel-Stable-1960.shtml diff --git a/translated/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md b/translated/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md new file mode 100644 index 0000000000..ea71e0512b --- /dev/null +++ b/translated/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md @@ -0,0 +1,31 @@ +因 SUSE Linux Enterprise 12,Linux Kernel 3.12 的支持延长至 2017 年 +================================================================================== + +>Linux 内核开发者 Jiri Slaby 已经宣布了 Linux 3.12 系列内核的第 58 个长期支持维护版本,以及关于生命周期状态的一些修改。 + +Linux Kernel 3.12.58 LTS(长期支持版)已经可用,那些运行该版本内核的 Linux 操作系统应尽快升级。有个好消息是 Linux 3.12 分支的支持将延长一年至 2017 年,因为 SUSE Linux Enterprise (SLE) 12 Service Pack 1 正是基于该分支。 + +“因为 SLE12-SP1 基于 3.12 之上,并且它的生命周期持续到 2017 年,所以将 3.12 的生命周期结束也修改到 2017 年,”Jiri Slaby 在发到 Linux 内核邮件列表的一个[补丁声明][1]中说道,同时他还公布了其它内核分支的生命周期结束时间(EOL,end of life),比如 Linux 3.14 为 2016 年 8 月,Linux 3.18 为 2017 年 1 月,Linux 4.1 是 2017 年 9 月。 + +### Linux kernel 3.12.58 LTS 改动 + +如果你想知道 Linux kernel 3.12.58 LTS 中有哪些改动,我们能告诉你的是,通过[附加的短日志][2]可知,这是一个健康的更新,改动涉及 114 个文件,有 835 行插入和 298 行删除。在这些改动之中,我们注意到多数是声音和网络栈的改进,以及许多驱动的更新。 + +更新中还有多个对 x86 硬件架构的改进,以及一些对 Xtensa 和 s390 的小修复。文件系统,如 NFS,OCFS2,Btrfs,JBD2 还有 XFS 也都收到了不同的修复,在驱动的更新中可以提到的还有 USB,Xen,MD,MTD,媒体,SCSI,TTY,网络,ATA,蓝牙,hwmon,EDAC 以及 CPUFreq。 + +和往常一样,你现在就可以从我们网站(linux.com)或直接从 kernel.org [下载 Linux kernel 3.12.58 LTS 的源码][3]。如果您的 GNU/Linux 操作系统运行的是 Linux 3.12 系列内核,请尽快升级您的内核。 + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps-to-start-your-linux-sysadmin-career + +作者:[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]: http://lkml.iu.edu/hypermail/linux/kernel/1604.1/00792.html +[2]: http://www.spinics.net/lists/stable/msg128634.html +[3]: http://linux.softpedia.com/get/System/Operating-Systems/Kernels/Linux-Kernel-Stable-1960.shtml From a6ba3c6523327cf2245cb3d8966af21729dec7a1 Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 18 Apr 2016 08:42:34 +0800 Subject: [PATCH 1263/1710] [Translating] 20160303 Top 5 open source command shells for Linux.md --- .../tech/20160303 Top 5 open source command shells for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20160303 Top 5 open source command shells for Linux.md b/sources/tech/20160303 Top 5 open source command shells for Linux.md index b9bf5e2e87..8705ad2981 100644 --- a/sources/tech/20160303 Top 5 open source command shells for Linux.md +++ b/sources/tech/20160303 Top 5 open source command shells for Linux.md @@ -1,4 +1,4 @@ -翻译中;by ![zky001] +翻译中;by ping Top 5 open source command shells for Linux =============================================== From 29d7787654b118631607399d534f6a5022a746e6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 18 Apr 2016 16:00:04 +0800 Subject: [PATCH 1264/1710] translating --- ...15 Docker 1.11 Adopts Open Container Project Components.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md b/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md index b10e13fe95..3c4f860e49 100644 --- a/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md +++ b/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md @@ -1,3 +1,5 @@ +Translating---geekpi + Docker 1.11 Adopts Open Container Project Components ======================================================= @@ -46,3 +48,5 @@ via: http://www.infoworld.com/article/3055966/open-source-tools/docker-111-adopt [6]: http://www.infoworld.com/article/2876801/application-virtualization/docker-reorganization-grows-up.html [7]: https://github.com/opencontainers/runc/graphs/contributors [8]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ + + From 57e6d3d644285c6bb08d6ad9592ba2eb8f978006 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 18 Apr 2016 17:48:06 +0800 Subject: [PATCH 1265/1710] translated --- ...dopts Open Container Project Components.md | 52 ------------------- ...dopts Open Container Project Components.md | 50 ++++++++++++++++++ 2 files changed, 50 insertions(+), 52 deletions(-) delete mode 100644 sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md create mode 100644 translated/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md diff --git a/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md b/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md deleted file mode 100644 index 3c4f860e49..0000000000 --- a/sources/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md +++ /dev/null @@ -1,52 +0,0 @@ -Translating---geekpi - -Docker 1.11 Adopts Open Container Project Components -======================================================= - -![](http://images.techhive.com/images/article/2015/01/docker-620x465-100559026-primary.idge.jpg) - ->Docker's participation in the Open Container project has come full circle, as the latest version of Docker is now built with components donated by Docker to the OCP - -The biggest news about [Docker 1.11][1] isn't features in the application, but that it uses component versions standardized under the aegis of the Open Container Project. - -Last year, Docker donated the core of its [runC][2] runtime to the OCP as a basis for building container tools. The same went for [containerd][3], a daemon or server used to control instances of runC. Docker 1.11 now uses the donated and publicly worked-on versions of those projects. - ->[ Dig into the the red-hot open source framework in InfoWorld's [beginner's guide to Docker][4]. Pick it up today! | Get a digest of the day's top tech stories in the [InfoWorld Daily newsletter][5]. ] - ->Docker is making this move to challenge the narrative that its container ecosystem is still [dictated chiefly by Docker itself][6]. It isn't donating its container specs and runtime details to the OCP merely for show; it wants the future development of the project to be as open-ended and inclusive as possible. - -![](http://images.techhive.com/images/article/2016/04/docker-runc-100656060-large.idge.png) - ->Docker 1.11 has been reworked to use the runC and containerd components contributed to the Open Container Project. The runC engine can be swapped out and replaced if needed. - -[Two chief committers][7] on runC are Docker employees, but committers from Virtuozzo (of Parallels fame), Red Hat's OpenShift and Project Atomic projects, Huawei, GE Healthcare, and Suse Linux have all been regulars as well. - -The more visible changes in Docker 1.11 reflect this. Previously, the Docker runtime was the only one available within Docker, and critics felt this limited users' choices. The runc runtime is now swappable; while Docker ships with runc as the default engine, any other compatible engine can be swapped in. (Docker also wants it to be possible to do this without having to kill and restart currently running containers, but that's an improvement scheduled for later.) - -Docker is making a case for this OCP-based development process as an inherently better method to create its product. "Splitting Docker up into focused independent tools means more focused maintainers, and ultimately better quality software," stated Docker in its [official blog post][8] announcing 1.11. - -Aside from fixing long-standing bugs and ensuring the runC/containerd version of Docker didn't slow down, Docker has rolled a slew of improvements into Docker 1.11. Docker Engine now supports VLANs and IPv6 service discovery, and it automatically performs DNS round-robin load balancing across multiple containers that have the same alias. - - - ------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/3055966/open-source-tools/docker-111-adopts-open-container-project-components.html - -作者:[Serdar Yegulalp][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/Serdar-Yegulalp/ -[1]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ -[2]: http://runc.io/ -[3]: https://containerd.tools/ -[4]: http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker#tk.ifw-infsb -[5]: http://www.infoworld.com/newsletters/signup.html#tk.ifw-infsb -[6]: http://www.infoworld.com/article/2876801/application-virtualization/docker-reorganization-grows-up.html -[7]: https://github.com/opencontainers/runc/graphs/contributors -[8]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ - - diff --git a/translated/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md b/translated/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md new file mode 100644 index 0000000000..98e8d49c06 --- /dev/null +++ b/translated/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md @@ -0,0 +1,50 @@ +Docker 1.11采纳了开源容器项目组件 +======================================================= + +![](http://images.techhive.com/images/article/2015/01/docker-620x465-100559026-primary.idge.jpg) + +>Docker参与的开源项目完成了一个闭环,最新构建的Docker采用了Docker贡献给OCP的组件。 + +[Docker 1.11][1]最大的新闻并不是它的功能,而是它使用了在OCP支持下的标准化的组件版本。 + +去年,Docker贡献了它的[runC][2]核心给OCP作为构建构建容器工具的基础。同样还有[containerd][3],作为守护进程或者服务端用于控制runC的实例。Docker 1.11现在使用的是捐赠和公开的版本。 + +>在InfoWorld的[Docker初学者指南][4]中深入这个热门开源框架。今天就拿来看!|在[InfoWorld每日简讯][5]中获取今日的技术新闻。 + +>Docker此举挑战了它的容器生态仍[主要由Docker自身决定][6]的传说。它并不是为了作秀才将容器规范和运行时细节贡献给OCP。它希望项目将来的开发越开放和广泛越好。 + +![](http://images.techhive.com/images/article/2016/04/docker-runc-100656060-large.idge.png) + +>Docker 1.11已经用贡献给OCP的runC和containerd进行了重构。runC如果需要可以被交换出去并被替换。 + +runC的[两位主要提交者][7]来自Docker,但是来自Virtuozzo(Parallels fame)、OpenShift、Project Atomic、华为、GE Healthcare、Suse Linux也都是提交的常客。 + +Docker 1.11中一个更明显的变化是先前Docker运行时在Docker中是唯一可用的,并且评论家认为这个会限制用户的选择。runC运行时现在是可交换的;虽然Docker在发布时将runC作为默认的引擎,但是任何兼容的引擎都可以被交换进入。(Docker同样希望它可以不用杀死并重启现在运行的容器,但是这个作为今后的改进规划。) + +Docker正在将基于OCP开发流程作为内部更好的方式去创建它的产品。在它的发布1.11的[官方博客中称][8]:“将Docker切分成独立的工具意味着更专注的维护者,最终有更好的软件质量。” + +除了修复长期以来存在的问题何确保Docker的runC/containerd跟上步伐,Docker还在Docker 1.11中加入了一些改进。Docker Engine现在支持VLAN和IPv6服务发现,并且会自动在多个相同别名容器间执行DNS轮询负载均衡。 + + + +------------------------------------------------------------------------------ + +via: http://www.infoworld.com/article/3055966/open-source-tools/docker-111-adopts-open-container-project-components.html + +作者:[Serdar Yegulalp][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.infoworld.com/author/Serdar-Yegulalp/ +[1]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ +[2]: http://runc.io/ +[3]: https://containerd.tools/ +[4]: http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker#tk.ifw-infsb +[5]: http://www.infoworld.com/newsletters/signup.html#tk.ifw-infsb +[6]: http://www.infoworld.com/article/2876801/application-virtualization/docker-reorganization-grows-up.html +[7]: https://github.com/opencontainers/runc/graphs/contributors +[8]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ + + From e7141ee257ce8e48a89a19c261847816ca0bf08b Mon Sep 17 00:00:00 2001 From: willowyoung <1079902707@qq.com> Date: Mon, 18 Apr 2016 23:37:53 +0800 Subject: [PATCH 1266/1710] Translated by willowyoung --- ...ocessing at NASA with open source tools.md | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 translated/tech/20160304 Image processing at NASA with open source tools.md diff --git a/translated/tech/20160304 Image processing at NASA with open source tools.md b/translated/tech/20160304 Image processing at NASA with open source tools.md new file mode 100644 index 0000000000..e3d59b0f51 --- /dev/null +++ b/translated/tech/20160304 Image processing at NASA with open source tools.md @@ -0,0 +1,71 @@ +# 在NASA中使用开源工具进行图像处理 + +关键词:NASA,图像处理,Node.js,OpenCV + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/nasa_spitzer_space_pink_spiral.jpg?itok=3XEUstkl) + +这个已逝的夏天,我是位于格伦的 [NASA](http://www.nasa.gov/centers/glenn/home/index.html) [GVIS](https://ocio.grc.nasa.gov/gvis/) 实验室的研究生,我将我对开源的热情带到了那里。我的任务是提高我们实验室对 Dan Schroeder 开发的一个开源流体动力学模拟器的贡献。原本的模拟器为用户呈现出可以用鼠标绘制的障碍,用来计算流体动力学模型。我们团队的贡献是加入图像处理的代码,这些代码分析实况视频的每一帧以显示一个物体如何与液体相互作用。而且,我们还要做更多事情。 + +我们想要让图像处理部分更加健全,所以我致力于改善图像处理库。 + +基于新的库,模拟器可以检测轮廓、进行空间坐标变换以及找到物体的质心。图像处理并不直接与流体动力学模拟器物理相关。它用摄像头检测物体,并且获取物体轮廓,为流体模拟器创建一个障碍物。然后,流体模拟器启动,输出结果会被投射到真实物体上。 + +我的目标是通过以下三种方式改进模拟器: + +1. 找寻物体的轮廓 +2. 找寻物体的质心 +3. 能对物体中心进行相关的精确转换 + +我的导师建议我安装 [Node.js](http://nodejs.org/), [OpenCV](http://opencv.org/), 和 [Node.js bindings for OpenCV](https://github.com/peterbraden/node-opencv).。在等待软件安装的过程中,我查看了 OpenCV 的 [GitHub 主页](https://github.com/peterbraden/node-opencv) 上的示例源码。我发现示例源码使用 JavaScript 写的,而我还不懂 JavaScript ,所以我在 Codecademy 上学了一些课程。两天后,我对 JavaScript 依旧生疏,不过我还是开始了我的项目。。。它包含了更多的JavaScript。 + +示例的轮廓检测代码工作得很好。事实上,它使得我用几个小时就完成了第一个目标!为了获取一幅图片的轮廓,它看起来像这样: + +![](https://opensource.com/sites/default/files/resize/image_processing_nasa_1-520x293.jpg) + +> 包括所有轮廓的原始图, + +示例的检测轮廓的代码工作得有点好过头了。不仅物体的轮廓被检测到了,整个图片中的轮廓都检测到了。这会导致模拟器要与那些没用的轮廓打交道。这是一个严重的问题,因为它会返回错误的数据。为了避免模拟器接触到不想要的轮廓,我加了一个区域约束。轮廓要位于一定的区域范围内才会被画出来。区域约束使得轮廓变干净了。 + +![](https://opensource.com/sites/default/files/resize/image_processing_nasa_2-520x293.jpg) + +> 过滤后的轮廓,包含了阴影轮廓 + +虽然无关的轮廓没有了,但是图像还有个问题。图像本该只有一个轮廓,但是它来回绕了自己两次,没有完整地圈起来。区域在这里不能作为决定因素,所以必须试试其他方式。 + +这一次,我不是直接去找寻轮廓,而是先将图片转换成二值图。二值图是转换之后只有黑白像素的图片。为了获取到二值图我先把彩色图转成灰度图。转换之后我再用阈值函数对图片进行处理。阈值函数遍历图片每个像素点的值,如果值小于 30 ,像素的颜色就会改成黑色。否则则反。在原始图片转换成二值图之后,结果变成这样: + +![](https://opensource.com/sites/default/files/resize/image_processing_nasa_3-520x293.jpg) + +> 二值图。 + +然后我获取了二值图的轮廓,结果是一个更干净的轮廓,没有了阴影轮廓。 + +![](https://opensource.com/sites/default/files/image_processing_nasa_4.jpg) + +> 最后的干净轮廓。 + +这个时候,我可以获取干净的轮廓、计算质心了。可惜的是,我没有足够的时间去完成质心的相关变换。因为我的实习时间不多了,我开始考虑我在这段有限时间内能做的其它事情。其中一个就是边界矩形。边界矩形是包含了图片轮廓的最小四边形。边界矩形很重要,因为它是在页面上缩放轮廓的关键。虽然很遗憾我没时间利用边界矩形做更多事情,但是我仍然想去了解更多,因为这是个很有用的工具。 + +最后,经过以上的努力,我完成了对图像的处理! + +![](https://opensource.com/sites/default/files/resize/image_processing_nasa_5-521x293.jpg) + +> 最后图像,红色的边界矩形和质心。 + +当这些图像处理代码写完之后,我用我的代码替代了模拟器中的老代码。非常意外的,它可以工作。 + +嗯,基本可以。 + +程序有内存泄露,每 1/10 秒泄露 100MB 。我很高兴原因不是我的代码。坏消息是修复它并不是我能控制的。好消息是有个解决方法我可以使用。它并不是最理想的,方法是不断检查模拟器使用的内存,当使用内存超过 1 GB,重新启动模拟器。 + +在 NASA 实验室,我们使用很多的开源软件,没有这些开源软件的帮助,我不可能完成这些工作。 + +* * * + +via: [https://opensource.com/life/16/3/image-processing-nasa](https://opensource.com/life/16/3/image-processing-nasa) + +作者:[Lauren Egts](https://opensource.com/users/laurenegts) +译者:[willowyoung](https://github.com/willowyoung) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e2fb125a7a0433d498bcb4e636efbb229c967e9b Mon Sep 17 00:00:00 2001 From: cposture Date: Tue, 19 Apr 2016 15:49:19 +0800 Subject: [PATCH 1267/1710] Translated by cposture --- .../20151220 GCC-Inline-Assembly-HOWTO.md | 632 ++++++++++++++++++ ...loud Services For Linux To Replace Copy.md | 135 ++++ 2 files changed, 767 insertions(+) create mode 100644 translated/tech/20151220 GCC-Inline-Assembly-HOWTO.md create mode 100644 translated/tech/20160220 Best Cloud Services For Linux To Replace Copy.md diff --git a/translated/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/translated/tech/20151220 GCC-Inline-Assembly-HOWTO.md new file mode 100644 index 0000000000..e0e1fc6d50 --- /dev/null +++ b/translated/tech/20151220 GCC-Inline-Assembly-HOWTO.md @@ -0,0 +1,632 @@ +* * * + +# GCC 内联汇编 HOWTO + +v0.1, 01 March 2003. +* * * + +_本 HOWTO 文档将讲解 GCC 提供的内联汇编特性的用途和用法。对于阅读这篇文章,这里只有两个前提要求,很明显,就是 x86 汇编语言和 C 语言的基本认识。_ + +* * * + +## 1. 简介 + +## 1.1 版权许可 + +Copyright (C)2003 Sandeep S. + +本文档自由共享;你可以重新发布它,并且/或者在遵循自由软件基金会发布的 GNU 通用公共许可证下修改它;或者该许可证的版本 2 ,或者(按照你的需求)更晚的版本。 + +发布这篇文档是希望它能够帮助别人,但是没有任何保证;甚至不包括可售性和适用于任何特定目的的保证。关于更详细的信息,可以查看 GNU 通用许可证。 + +## 1.2 反馈校正 + +请将反馈和批评一起提交给 [Sandeep.S](mailto:busybox@sancharnet.in) 。我将感谢任何一个指出本文档中错误和不准确之处的人;一被告知,我会马上改正它们。 + +## 1.3 致谢 + +我对提供如此棒的特性的 GNU 人们表示真诚的感谢。感谢 Mr.Pramode C E 所做的所有帮助。感谢在 Govt Engineering College 和 Trichur 的朋友们的精神支持和合作,尤其是 Nisha Kurur 和 Sakeeb S 。 感谢在 Gvot Engineering College 和 Trichur 的老师们的合作。 + +另外,感谢 Phillip , Brennan Underwood 和 colin@nyx.net ;这里的许多东西都厚颜地直接取自他们的工作成果。 + +* * * + +## 2. 概览 + +在这里,我们将学习 GCC 内联汇编。这内联表示的是什么呢? + +我们可以要求编译器将一个函数的代码插入到调用者代码中函数被实际调用的地方。这样的函数就是内联函数。这听起来和宏差不多?这两者确实有相似之处。 + +内联函数的优点是什么呢? + +这种内联方法可以减少函数调用开销。同时如果所有实参的值为常量,它们的已知值可以在编译期允许简化,因此并非所有的内联函数代码都需要被包含。代码大小的影响是不可预测的,这取决于特定的情况。为了声明一个内联函数,我们必须在函数声明中使用 `inline` 关键字。 + +现在我们正处于一个猜测内联汇编到底是什么的点上。它只不过是一些写为内联函数的汇编程序。在系统编程上,它们方便、快速并且极其有用。我们主要集中学习(GCC)内联汇编函数的基本格式和用法。为了声明内联汇编函数,我们使用 `asm` 关键词。 + +内联汇编之所以重要,主要是因为它可以操作并且使其输出通过 C 变量显示出来。正是因为此能力, "asm" 可以用作汇编指令和包含它的 C 程序之间的接口。 + +* * * + +## 3. GCC 汇编语法 + +GCC , Linux上的 GNU C 编译器,使用 **AT&T** / **UNIX** 汇编语法。在这里,我们将使用 AT&T 语法 进行汇编编码。如果你对 AT&T 语法不熟悉的话,请不要紧张,我会教你的。AT&T 语法和 Intel 语法的差别很大。我会给出主要的区别。 + +1. 源操作数和目的操作数顺序 + + AT&T 语法的操作数方向和 Intel 语法的刚好相反。在Intel 语法中,第一操作数为目的操作数,第二操作数为源操作数,然而在 AT&T 语法中,第一操作数为源操作数,第二操作数为目的操作数。也就是说, + + Intel 语法中的 "Op-code dst src" 变为 + + AT&T 语法中的 "Op-code src dst"。 + +2. 寄存器命名 + + 寄存器名称有 % 前缀,即如果必须使用 eax,它应该用作 %eax。 + +3. 立即数 + + AT&T 立即数以 ’$’ 为前缀。静态 "C" 变量 也使用 ’$’ 前缀。在 Intel 语法中,十六进制常量以 ’h’ 为后缀,然而AT&T不使用这种语法,这里我们给常量添加前缀 ’0x’。所以,对于十六进制,我们首先看到一个 ’$’,然后是 ’0x’,最后才是常量。 + +4. 操作数大小 + + 在 AT&T 语法中,存储器操作数的大小取决于操作码名字的最后一个字符。操作码后缀 ’b’ 、’w’、’l’分别指明了字节(byte)(8位)、字(word)(16位)、长型(long)(32位)存储器引用。Intel 语法通过给存储器操作数添加’byte ptr’、 ’word ptr’ 和 ’dword ptr’前缀来实现这一功能。 + + 因此,Intel的 "mov al, byte ptr foo" 在 AT&T 语法中为 "movb foo, %al"。 + +5. 存储器操作数 + + 在 Intel 语法中,基址寄存器包含在 ’[’ 和 ’]’ 中,然而在 AT&T 中,它们变为 ’(’ 和 ’)’。另外,在 Intel 语法中, 间接内存引用为 + + section:[base + index*scale + disp], 在 AT&T中变为 + + section:disp(base, index, scale)。 + + 需要牢记的一点是,当一个常量用于 disp 或 scale,不能添加’$’前缀。 + +现在我们看到了 Intel 语法和 AT&T 语法之间的一些主要差别。我仅仅写了它们差别的一部分而已。关于更完整的信息,请参考 GNU 汇编文档。现在为了更好地理解,我们可以看一些示例。 + +> ` +> +>
+------------------------------+------------------------------------+
+> |       Intel Code             |      AT&T Code                     |
+> +------------------------------+------------------------------------+
+> | mov     eax,1                |  movl    $1,%eax                   |   
+> | mov     ebx,0ffh             |  movl    $0xff,%ebx                |   
+> | int     80h                  |  int     $0x80                     |   
+> | mov     ebx, eax             |  movl    %eax, %ebx                |
+> | mov     eax,[ecx]            |  movl    (%ecx),%eax               |
+> | mov     eax,[ebx+3]          |  movl    3(%ebx),%eax              | 
+> | mov     eax,[ebx+20h]        |  movl    0x20(%ebx),%eax           |
+> | add     eax,[ebx+ecx*2h]     |  addl    (%ebx,%ecx,0x2),%eax      |
+> | lea     eax,[ebx+ecx]        |  leal    (%ebx,%ecx),%eax          |
+> | sub     eax,[ebx+ecx*4h-20h] |  subl    -0x20(%ebx,%ecx,0x4),%eax |
+> +------------------------------+------------------------------------+
+> 
+> +> ` + +* * * + +## 4. 基本内联 + +基本内联汇编的格式非常直接了当。它的基本格式为 + +`asm("汇编代码");` + +示例 + +> ` +> +> * * * +> +>
asm("movl %ecx %eax"); /* 将 ecx 寄存器的内容移至 eax  */
+> __asm__("movb %bh (%eax)"); /* 将 bh 的一个字节数据 移至 eax 寄存器指向的内存 */
+> 
+> +> * * * +> +> ` + +你可能注意到了这里我使用了 `asm ` 和 `__asm__`。这两者都是有效的。如果关键词 `asm` 和我们程序的一些标识符冲突了,我们可以使用 `__asm__`。如果我们的指令多余一条,我们可以写成一行,并用括号括起,也可以为每条指令添加 ’\n’ 和 ’\t’ 后缀。这是因为gcc将每一条当作字符串发送给 **as**(GAS)( GAS 即 GNU 汇编器 ——译者注),并且通过使用换行符/制表符发送正确地格式化行给汇编器。 + +示例 + +> ` +> +> * * * +> +>
 __asm__ ("movl %eax, %ebx\n\t"
+>           "movl $56, %esi\n\t"
+>           "movl %ecx, $label(%edx,%ebx,$4)\n\t"
+>           "movb %ah, (%ebx)");
+> 
+> +> * * * +> +> ` + +如果在代码中,我们涉及到一些寄存器(即改变其内容),但在没有固定这些变化的情况下从汇编中返回,这将会导致一些不好的事情。这是因为 GCC 并不知道寄存器内容的变化,这会导致问题,特别是当编译器做了某些优化。在没有告知 GCC 的情况下,它将会假设一些寄存器存储了我们可能已经改变的变量的值,它会像什么事都没发生一样继续运行(什么事都没发生一样是指GCC不会假设寄存器装入的值是有效的,当退出改变了寄存器值的内联汇编后,寄存器的值不会保存到相应的变量或内存空间 ——译者注)。我们所可以做的是使用这些没有副作用的指令,或者当我们退出时固定这些寄存器,或者等待程序崩溃。这是为什么我们需要一些扩展功能。扩展汇编正好给我们提供了那样的功能。 + +* * * + +## 5. 扩展汇编 + +在基本内联汇编中,我们只有指令。然而在扩展汇编中,我们可以同时指定操作数。它允许我们指定输入寄存器、输出寄存器以及修饰寄存器列表。GCC 不强制用户必须指定使用的寄存器。我们可以把头疼的事留给 GCC ,这可能可以更好地适应 GCC 的优化。不管怎樣,基本格式为: + +> ` +> +> * * * +> +>
       asm ( 汇编程序模板 
+>            : 输出操作数					/* 可选的 */
+>            : 输入操作数                   /* 可选的 */
+>            : 修饰寄存器列表			    /* 可选的 */
+>            );
+> 
+> +> * * * +> +> ` + +汇编程序模板由汇编指令组成.每一个操作数由一个操作数约束字符串所描述,其后紧接一个括弧括起的 C 表达式。冒号用于将汇编程序模板和第一个输出操作数分开,另一个(冒号)用于将最后一个输出操作数和第一个输入操作数分开,如果存在的话。逗号用于分离每一个组内的操作数。总操作数的数目限制在10个,或者机器描述中的任何指令格式中的最大操作数数目,以较大者为准。 + +如果没有输出操作数但存在输入操作数,你必须将两个连续的冒号放置于输出操作数原本会放置的地方周围。 + +示例: + +> ` +> +> * * * +> +>
        asm ("cld\n\t"
+>              "rep\n\t"
+>              "stosl"
+>              : /* 无输出寄存器 */
+>              : "c" (count), "a" (fill_value), "D" (dest)
+>              : "%ecx", "%edi" 
+>              );
+> 
+> +> * * * +> +> ` + +现在,这段代码是干什么的?以上的内联汇编是将 `fill_value` 值 连续 `count` 次 拷贝到 寄存器 `edi` 所指位置(每执行stosl一次,寄存器 edi 的值会递增或递减,这取决于是否设置了 direction 标志,因此以上代码实则初始化一个内存块 ——译者注)。 它也告诉 gcc 寄存器 `ecx` 和 `edi` 一直无效(原文为 eax ,但代码修饰寄存器列表中为 ecx,因此这可能为作者的纰漏 ——译者注)。为了使扩展汇编更加清晰,让我们再看一个示例。 + +> ` +> +> * * * +> +>
        
+>         int a=10, b;
+>         asm ("movl %1, %%eax; 
+>               movl %%eax, %0;"
+>              :"=r"(b)        /* 输出 */
+>              :"r"(a)         /* 输入 */
+>              :"%eax"         /* 修饰寄存器 */
+>              );       
+> 
+> +> * * * +> +> ` + +这里我们所做的是使用汇编指令使 ’b’ 变量的值等于 ’a’ 变量的值。一些有意思的地方是: + +* "b" 为输出操作数,用 %0 引用,并且 "a" 为输入操作数,用 %1 引用。 +* "r" 为操作数约束。之后我们会更详细地了解约束(字符串)。目前,"r" 告诉 GCC 可以使用任一寄存器存储操作数。输出操作数约束应该有一个约束修饰符 "=" 。这修饰符表明它是一个只读的输出操作数。 +* 寄存器名字以两个%为前缀。这有利于 GCC 区分操作数和寄存器。操作数以一个 % 为前缀。 +* 第三个冒号之后的修饰寄存器 %eax 告诉 GCC %eax的值将会在 "asm" 内部被修改,所以 GCC 将不会使用此寄存器存储任何其他值。 + +当 "asm" 执行完毕, "b" 变量会映射到更新的值,因为它被指定为输出操作数。换句话说, "asm" 内 "b" 变量的修改 应该会被映射到 "asm" 外部。 + +现在,我们可以更详细地看看每一个域。 + +## 5.1 汇编程序模板 + +汇编程序模板包含了被插入到 C 程序的汇编指令集。其格式为:每条指令用双引号圈起,或者整个指令组用双引号圈起。同时每条指令应以分界符结尾。有效的分界符有换行符(\n)和逗号(;)。’\n’ 可以紧随一个制表符(\t)。我们应该都明白使用换行符或制表符的原因了吧?和 C 表达式对应的操作数使用 %0、%1 ... 等等表示。 + +## 5.2 操作数 + +C 表达式用作 "asm" 内的汇编指令操作数。作为第一双引号内的操作数约束,写下每一操作数。对于输出操作数,在引号内还有一个约束修饰符,其后紧随一个用于表示操作数的 C 表达式。即, + +"约束字符串"(C 表达式),它是一个通用格式。对于输出操作数,还有一个额外的修饰符。约束字符串主要用于决定操作数的寻找方式,同时也用于指定使用的寄存器。 + +如果我们使用的操作数多于一个,那么每一个操作数用逗号隔开。 + +在汇编程序模板,每个操作数用数字引用。编号方式如下。如果总共有 n 个操作数(包括输入和输出操作数),那么第一个输出操作数编号为 0 ,逐项递增,并且最后一个输入操作数编号为 n - 1 。操作数的最大数目为前一节我们所看到的那样。 + +输出操作数表达式必须为左值。输入操作数的要求不像这样严格。它们可以为表达式。扩展汇编特性常常用于编译器自己不知道其存在的机器指令 ;-)。如果输出表达式无法直接寻址(例如,它是一个位域),我们的约束字符串必须给定一个寄存器。在这种情况下,GCC 将会使用该寄存器作为汇编的输出,然后存储该寄存器的内容到输出。 + +正如前面所陈述的一样,普通的输出操作数必须为只写的; GCC 将会假设指令前的操作数值是死的,并且不需要被(提前)生成。扩展汇编也支持输入-输出或者读-写操作数。 + +所以现在我们来关注一些示例。我们想要求一个数的5次方结果。为了计算该值,我们使用 `lea` 指令。 + +> ` +> +> * * * +> +>
        asm ("leal (%1,%1,4), %0"
+>              : "=r" (five_times_x)
+>              : "r" (x) 
+>              );
+> 
+> +> * * * +> +> ` + +这里我们的输入为x。我们不指定使用的寄存器。 GCC 将会选择一些输入寄存器,一个输出寄存器,并且做我们期望的事。如果我们想要输入和输出存在于同一个寄存器里,我们可以要求 GCC 这样做。这里我们使用那些读-写操作数类型。这里我们通过指定合适的约束来实现它。 + +> ` +> +> * * * +> +>
        asm ("leal (%0,%0,4), %0"
+>              : "=r" (five_times_x)
+>              : "0" (x) 
+>              );
+> 
+> +> * * * +> +> ` + +现在输出和输出操作数位于同一个寄存器。但是我们无法得知是哪一个寄存器。现在假如我们也想要指定操作数所在的寄存器,这里有一种方法。 + +> ` +> +> * * * +> +>
        asm ("leal (%%ecx,%%ecx,4), %%ecx"
+>              : "=c" (x)
+>              : "c" (x) 
+>              );
+> 
+> +> * * * +> +> ` + +在以上三个示例中,我们并没有添加任何寄存器到修饰寄存器里,为什么?在头两个示例, GCC 决定了寄存器并且它知道发生了什么改变。在最后一个示例,我们不必将 'ecx' 添加到修饰寄存器列表(原文修饰寄存器列表拼写有错,这里已修正 ——译者注), gcc 知道它表示x。因此,因为它可以知道 `ecx` 的值,它就不被当作修饰的(寄存器)了。 + +## 5.3 修饰寄存器列表 + +一些指令会破坏一些硬件寄存器。我们不得不在修饰寄存器中列出这些寄存器,即汇编函数内第三个 ’**:**’ 之后的域。这可以通知 gcc 我们将会自己使用和修改这些寄存器。所以 gcc 将不会假设存入这些寄存器的值是有效的。我们不用在这个列表里列出输入输出寄存器。因为 gcc 知道 "asm" 使用了它们(因为它们被显式地指定为约束了)。如果指令隐式或显式地使用了任何其他寄存器,(并且寄存器不能出现在输出或者输出约束列表里),那么不得不在修饰寄存器列表中指定这些寄存器。 + +如果我们的指令可以修改状态寄存器,我们必须将 "cc" 添加进修饰寄存器列表。 + +如果我们的指令以不可预测的方式修改了内存,那么需要将 "memory" 添加进修饰寄存器列表。这可以使 GCC 不会在汇编指令间保持缓存于寄存器的内存值。如果被影响的内存不在汇编的输入或输出列表中,我们也必须添加 **volatile** 关键词。 + +我们可以按我们的需求多次读写修饰寄存器。考虑一个模板内的多指令示例;它假设子例程 _foo 接受寄存器 `eax` 和 `ecx` 里的参数。 + +> ` +> +> * * * +> +>
        asm ("movl %0,%%eax;
+>               movl %1,%%ecx;
+>               call _foo"
+>              : /* no outputs */
+>              : "g" (from), "g" (to)
+>              : "eax", "ecx"
+>              );
+> 
+> +> * * * +> +> ` + +## 5.4 Volatile ...? + +如果你熟悉内核源码或者其他像内核源码一样漂亮的代码,你一定见过许多声明为 `volatile` 或者 `__volatile__`的函数,其跟着一个 `asm` 或者 `__asm__`。我之前提过关键词 `asm` 和 `__asm__`。那么什么是 `volatile`呢? + +如果我们的汇编语句必须在我们放置它的地方执行(即,不能作为一种优化被移出循环语句),将关键词 `volatile` 放置在 asm 后面,()的前面。因为为了防止它被移动、删除或者其他操作,我们将其声明为 + +`asm volatile ( ... : ... : ... : ...);` + +当我们必须非常谨慎时,请使用 `__volatile__`。 + +如果我们的汇编只是用于一些计算并且没有任何副作用,不使用 `volatile` 关键词会更好。不使用 `volatile` 可以帮助 gcc 优化代码并使代码更漂亮。 + + +在 `Some Useful Recipes` 一节中,我提供了多个内联汇编函数的例子。这儿我们详细查看修饰寄存器列表。 + +* * * + +## 6. 更多关于约束 + +到这个时候,你可能已经了解到约束和内联汇编有很大的关联。但我们很少说到约束。约束用于表明一个操作数是否可以位于寄存器和位于哪个寄存器;是否操作数可以为一个内存引用和哪种地址;是否操作数可以为一个立即数和为哪一个可能的值(即值的范围)。它可以有...等等。 + +## 6.1 常用约束 + +在许多约束中,只有小部分是常用的。我们将看看这些约束。 + +1. **寄存器操作数约束(r)** + + 当使用这种约束指定操作数时,它们存储在通用寄存器(GPR)中。请看下面示例: + + `asm ("movl %%eax, %0\n" :"=r"(myval));` + + 这里,变量 myval 保存在寄存器中,寄存器 eax 的值被复制到该寄存器中,并且myval的值从寄存器更新到了内存。当指定 "r" 约束时, gcc 可以将变量保存在任何可用的 GPR 中。为了指定寄存器,你必须使用特定寄存器约束直接地指定寄存器的名字。它们为: + + > ` + > + >
+---+--------------------+
+    > | r |    Register(s)     |
+    > +---+--------------------+
+    > | a |   %eax, %ax, %al   |
+    > | b |   %ebx, %bx, %bl   |
+    > | c |   %ecx, %cx, %cl   |
+    > | d |   %edx, %dx, %dl   |
+    > | S |   %esi, %si        |
+    > | D |   %edi, %di        |
+    > +---+--------------------+
+    > 
+ > + > ` + +2. **内存操作数约束(m)** + + 当操作数位于内存时,任何对它们的操作将直接发生在内存位置,这与寄存器约束相反,后者首先将值存储在要修改的寄存器中,然后将它写回到内存位置。但寄存器约束通常用于一个指令必须使用它们或者它们可以大大提高进程速度的地方。当需要在 "asm" 内更新一个 C 变量,而又不想使用寄存器去保存它的只,使用内存最为有效。例如, idtr 的值存储于内存位置: + + `asm("sidt %0\n" : :"m"(loc));` + +3. **匹配(数字)约束** + + 在某些情况下,一个变量可能既充当输入操作数,也充当输出操作数。可以通过使用匹配约束在 "asm" 中指定这种情况。 + + `asm ("incl %0" :"=a"(var):"0"(var));` + + 在操作数子节中,我们也看到了一些类似的示例。在这个匹配约束的示例中,寄存器 "%eax" 既用作输入变量,也用作输出变量。 var 输入被读进 %eax ,并且更新的 %eax 再次被存储进 var。这里的 "0" 用于指定与第0个输出变量相同的约束。也就是,它指定 var 输出实例应只被存储在 "%eax" 中。该约束可用于: + + * 在输入从变量读取或变量修改后,修改被写回同一变量的情况 + * 在不需要将输入操作数实例和输出操作数实例分开的情况 + + 使用匹配约束最重要的意义在于它们可以导致有效地使用可用寄存器。 + +其他一些约束: + +1. "m" : 允许一个内存操作数使用机器普遍支持的任一种地址。 +2. "o" : 允许一个内存操作数,但只有当地址是可偏移的。即,该地址加上一个小的偏移量可以得到一个地址。 +3. "V" : A memory operand that is not offsettable. In other words, anything that would fit the `m’ constraint but not the `o’constraint. +4. "i" : 允许一个(带有常量)的立即整形操作数。这包括其值仅在汇编时期知道的符号常量。 +5. "n" : 允许一个带有已知数字的立即整形操作数。许多系统不支持汇编时期的常量,因为操作数少于一个字宽。对于此种操作数,约束应该使用 'n' 而不是'i'。 +6. "g" : 允许任一寄存器、内存或者立即整形操作数,不包括通用寄存器之外的寄存器。 + + +以下约束为x86特有。 + +1. "r" : 寄存器操作数约束,查看上面给定的表格。 +2. "q" : 寄存器 a、b、c 或者 d。 +3. "I" : 范围从 0 到 31 的常量(对于 32 位移位)。 +4. "J" : 范围从 0 到 63 的常量(对于 64 位移位)。 +5. "K" : 0xff。 +6. "L" : 0xffff。 +7. "M" : 0, 1, 2, or 3 (lea 指令的移位)。 +8. "N" : 范围从 0 到 255 的常量(对于 out 指令)。 +9. "f" : 浮点寄存器 +10. "t" : 第一个(栈顶)浮点寄存器 +11. "u" : 第二个浮点寄存器 +12. "A" : 指定 `a` 或 `d` 寄存器。这主要用于想要返回 64 位整形数,使用 `d` 寄存器保存最高有效位和 `a` 寄存器保存最低有效位。 + +## 6.2 约束修饰符 + +当使用约束时,对于更精确的控制超越了约束作用的需求,GCC 给我们提供了约束修饰符。最常用的约束修饰符为: + +1. "=" : 意味着对于这条指令,操作数为只写的;旧值会被忽略并被输出数据所替换。 +2. "&" : 意味着这个操作数为一个早期的改动操作数,其在该指令完成前通过使用输入操作数被修改了。因此,这个操作数不可以位于一个被用作输出操作数或任何内存地址部分的寄存器。如果在旧值被写入之前它仅用作输入而已,一个输入操作数可以为一个早期改动操作数。 + + 约束的列表和解释是决不完整的。示例可以给我们一个关于内联汇编的用途和用法的更好的理解。在下一节,我们会看到一些示例,在那里我们会发现更多关于修饰寄存器列表的东西。 + +* * * + +## 7. 一些实用的诀窍 + +现在我们已经介绍了关于 GCC 内联汇编的基础理论,现在我们将专注于一些简单的例子。将内联汇编函数写成宏的形式总是非常方便的。我们可以在内核代码里看到许多汇编函数。(usr/src/linux/include/asm/*.h)。 + +1. 首先我们从一个简单的例子入手。我们将写一个两个数相加的程序。 + + > ` + > + > * * * + > + >
int main(void)
+    > {
+    >         int foo = 10, bar = 15;
+    >         __asm__ __volatile__("addl  %%ebx,%%eax"
+    >                              :"=a"(foo)
+    >                              :"a"(foo), "b"(bar)
+    >                              );
+    >         printf("foo+bar=%d\n", foo);
+    >         return 0;
+    > }
+    > 
+ > + > * * * + > + > ` + + 这里我们要求 GCC 将 foo 存放于 %eax,将 bar 存放于 %ebx,同时我们也想要在 %eax 中存放结果。'=' 符号表示它是一个输出寄存器。现在我们可以以其他方式将一个整数加到一个变量。 + + > ` + > + > * * * + > + >
 __asm__ __volatile__(
+    >                       "   lock       ;\n"
+    >                       "   addl %1,%0 ;\n"
+    >                       : "=m"  (my_var)
+    >                       : "ir"  (my_int), "m" (my_var)
+    >                       :                                 /* 无修饰寄存器列表 */
+    >                       );
+    > 
+ > + > * * * + > + > ` + + 这是一个原子加法。为了移除原子性,我们可以移除指令 'lock'。在输出域中,"=m" 表明 my_var 是一个输出且位于内存。类似地,"ir" 表明 my_int 是一个整型,并应该存在于其他寄存器(回想我们上面看到的表格)。没有寄存器位于修饰寄存器列表中。 + +2. 现在我们将在一些寄存器/变量上展示一些操作,并比较值。 + + > ` + > + > * * * + > + >
 __asm__ __volatile__(  "decl %0; sete %1"
+    >                       : "=m" (my_var), "=q" (cond)
+    >                       : "m" (my_var) 
+    >                       : "memory"
+    >                       );
+    > 
+ > + > * * * + > + > ` + + 这里,my_var 的值减 1 ,并且如果结果的值为 0,则变量 cond 置 1。我们可以通过添加指令 "lock;\n\t" 作为汇编模板的第一条指令来添加原子性。 + + 以类似的方式,为了增加 my_var,我们可以使用 "incl %0" 而不是 "decl %0"。 + + 这里需要注意的点为(i)my_var 是一个存储于内存的变量。(ii)cond 位于任何一个寄存器 eax、ebx、ecx、edx。约束 "=q" 保证这一点。(iii)同时我们可以看到 memory 位于修饰寄存器列表中。也就是说,代码将改变内存中的内容。 + +3. 如何置1或清0寄存器中的一个比特位。作为下一个诀窍,我们将会看到它。 + + > ` + > + > * * * + > + >
__asm__ __volatile__(   "btsl %1,%0"
+    >                       : "=m" (ADDR)
+    >                       : "Ir" (pos)
+    >                       : "cc"
+    >                       );
+    > 
+ > + > * * * + > + > ` + + 这里,ADDR 变量(一个内存变量)的 'pos' 位置上的比特被设置为 1。我们可以使用 'btrl' 来清楚由 'btsl' 设置的比特位。pos 的约束 "Ir" 表明 pos 位于寄存器并且它的值为 0-31(x86 相关约束)。也就是说,我们可以设置/清除 ADDR 变量上第 0 到 31 位的任一比特位。因为条件码会被改变,所以我们将 "cc" 添加进修饰寄存器列表。 + +4. 现在我们看看一些更为复杂而有用的函数。字符串拷贝。 + + > ` + > + > * * * + > + >
static inline char * strcpy(char * dest,const char *src)
+    > {
+    > int d0, d1, d2;
+    > __asm__ __volatile__(  "1:\tlodsb\n\t"
+    >                        "stosb\n\t"
+    >                        "testb %%al,%%al\n\t"
+    >                        "jne 1b"
+    >                      : "=&S" (d0), "=&D" (d1), "=&a" (d2)
+    >                      : "0" (src),"1" (dest) 
+    >                      : "memory");
+    > return dest;
+    > }
+    > 
+ > + > * * * + > + > ` + + 源地址存放于 esi,目标地址存放于 edi,同时开始拷贝,当我们到达 **0** 时,拷贝完成。约束 "&S"、"&D"、"&a" 表明寄存器 esi、edi和 eax 早期的修饰寄存器,也就是说,它们的内容在函数完成前会被改变。这里很明显可以知道为什么 "memory" 会放在修饰寄存器列表。 + + 我们可以看到一个类似的函数,它能移动双字块数据。注意函数被声明为一个宏。 + + > ` + > + > * * * + > + >
#define mov_blk(src, dest, numwords) \
+    > __asm__ __volatile__ (                                          \
+    >                        "cld\n\t"                                \
+    >                        "rep\n\t"                                \
+    >                        "movsl"                                  \
+    >                        :                                        \
+    >                        : "S" (src), "D" (dest), "c" (numwords)  \
+    >                        : "%ecx", "%esi", "%edi"                 \
+    >                        )
+    > 
+ > + > * * * + > + > ` + + 这里我们没有输出,所以寄存器 ecx、esi和 edi 的内容发生改变,这是块移动的副作用。因此我们必须将它们添加进修饰寄存器列表。 + +5. 在 Linux 中,系统调用使用 GCC 内联汇编实现。让我们看看如何实现一个系统调用。所有的系统调用被写成宏(linux/unistd.h)。例如,带有三个参数的系统调用被定义为如下所示的宏。 + + > ` + > + > * * * + > + > type name(type1 arg1,type2 arg2,type3 arg3) \ + > { \ + > long __res; \ + > __asm__ volatile ( "int $0x80" \ + > : "=a" (__res) \ + > : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ + > "d" ((long)(arg3))); \ + > __syscall_return(type,__res); \ + > } + >
+ > + > * * * + > + > ` + + 无论何时调用带有三个参数的系统调用,以上展示的宏用于执行调用。系统调用号位于 eax 中,每个参数位于 ebx、ecx、edx 中。最后 "int 0x80" 是一条用于执行系统调用的指令。返回值被存储于 eax 中。 + + 每个系统调用都以类似的方式实现。Exit 是一个单一参数的系统调用,让我们看看它的代码看起来会是怎样。它如下所示。 + + > ` + > + > * * * + > + >
{
+    >         asm("movl $1,%%eax;         /* SYS_exit is 1 */
+    >              xorl %%ebx,%%ebx;      /* Argument is in ebx, it is 0 */
+    >              int  $0x80"            /* Enter kernel mode */
+    >              );
+    > }
+    > 
+ > + > * * * + > + > ` + + Exit 的系统调用号是 1 同时它的参数是 0。因此我们分配 eax 包含 1,ebx 包含 0,同时通过 `int $0x80` 执行 `exit(0)`。这就是 exit 的工作原理。 + +* * * + +## 8. 结束语 + +这篇文档已经将 GCC 内联汇编过了一遍。一旦你理解了基本概念,你便不难采取自己的行动。我们看了许多例子,它们有助于理解 GCC 内联汇编的常用特性。 + +GCC 内联是一个极大的主题,这篇文章是不完整的。更多关于我们讨论过的语法细节可以在 GNU 汇编器的官方文档上获取。类似地,对于一个完整的约束列表,可以参考 GCC 的官方文档。 + +当然,Linux 内核 大规模地使用 GCC 内联。因此我们可以在内核源码中发现许多各种各样的例子。它们可以帮助我们很多。 + +如果你发现任何的错别字,或者本文中的信息已经过时,请告诉我们。 + +* * * + +## 9. 参考 + +1. [Brennan’s Guide to Inline Assembly](http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html) +2. [Using Assembly Language in Linux](http://linuxassembly.org/articles/linasm.html) +3. [Using as, The GNU Assembler](http://www.gnu.org/manual/gas-2.9.1/html_mono/as.html) +4. [Using and Porting the GNU Compiler Collection (GCC)](http://gcc.gnu.org/onlinedocs/gcc_toc.html) +5. [Linux Kernel Source](http://ftp.kernel.org/) + +* * * +via: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html + + 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[cposture](https://github.com/cposture) 校对:[]() + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20160220 Best Cloud Services For Linux To Replace Copy.md b/translated/tech/20160220 Best Cloud Services For Linux To Replace Copy.md new file mode 100644 index 0000000000..ce9380b600 --- /dev/null +++ b/translated/tech/20160220 Best Cloud Services For Linux To Replace Copy.md @@ -0,0 +1,135 @@ +替代 Copy 的 Linux 最佳云服务 +=============================================== + +![](http://itsfoss.com/wp-content/uploads/2016/02/Linux-cloud-services.jpg) + +云存储服务 Copy 即将关闭,我们 Linux 用户是时候该寻找其他优秀的** Copy 之外的 Linux 云存储服务**。 + +全部文件将会在 2016年5月1号 被删除。如果你是 Copy 的用户,你应该保存你的文件并将它们移至其他地方。 + +在过去的两年里,Copy 已经成为了我最喜爱的云存储。它为我提供了大量的免费空间并且带有桌面平台的原生应用程序,包括 Linux 和移动平台如 iOS 和 Android。 + +对我来说,它是一个非常棒的云存储,在应用中我获得了大量的免费存储空间(380 GB)并且享受着桌面系统和移动系统之间的无缝体验。但是这些'方便免费的存储',15 GB 为注册,5 GB 为每次推荐,使我想到如果 Copy 没有获得商业用户,他们将会马上停业。如此巨大的免费存储空间仅意味着他们没有像 Dropbox 所做的一样针对个别用户。 + +当我从 Copy.com 看到它即将关闭的消息,我的担忧成真了。事实上,Copy 并不孤独。它的母公司 [Barracuda Networks](https://www.barracuda.com/)正经历一段困难时期并且已经[雇佣 Morgan Stanely 寻找 合适的卖家](http://www.bloomberg.com/news/articles/2016-02-01/barracuda-networks-said-to-work-with-morgan-stanley-to-seek-sale)(s) + +无论什么理由,我们所知道的是 Copy 将会成为历史,我们需要寻找相似的**优秀的 Linux 云服务**。我之所以强调 Linux 是因为其他流行的云存储服务,如[微软的OneDrive](https://onedrive.live.com/about/en-us/) 和 [Google Drive](https://www.google.com/drive/) 都没有提供本地 Linux 客户端。这是微软预计的事情,但是谷歌对 Linux 的冷漠令人震惊。 + +## Linux 下 Copy 的最佳替代者 + +现在,作为一个 Linux 存储,在云存储中你需要什么?让我们猜猜: + +- 大量的免费空间。毕竟,个人用户无法每月支付巨额款项。 +- 原生的 Linux 客户端。因此你能够使用提供的服务,方便地同步文件,而不用做一些特殊的调整或者定时执行脚本。 +- 其他桌面系统的客户端,比如 Windows 和 OS X。便携性是必要的,并且同步设备间的文件是一种很好的缓解。 +- Android 和 iOS 的移动应用程序。在今天的现代世界里,你需要连接所有设备。 + +我不将自托管的云服务计算在内,比如 OwnCloud 或 [Seafile](https://www.seafile.com/en/home/) ,因为它们需要自己建立和运行一个服务器。这不适合所有想要类似 Copy 的云服务的家庭用户。 + +让我们看看可以用于替代 Linux 下 Copy.com 的服务有什么。 + +## Mega + +![](http://itsfoss.com/wp-content/uploads/2016/02/Mega-Linux.jpg) + +如果你是一个 It’s FOSS 的普通读者,你可能已经看过我之前的一篇有关[Mega on Linux](http://itsfoss.com/install-mega-cloud-storage-linux/)的文章。这种云服务由[Megaupload scandal](https://en.wikipedia.org/wiki/Megaupload) 公司下臭名昭著的[Kim Dotcom](https://en.wikipedia.org/wiki/Kim_Dotcom)提供。这也使一些用户怀疑它,因为 Kim Dotcom 已经很长一段时间成为美国当局的目标。 + +Mega 拥有方便免费云服务下你所期望的一切。它给每个个人用户提供 50 GB 的免费存储空间。提供Linux 和其他平台下的原生客户端,并带有端到端的加密。原生的 Linux 客户端运行良好,可以无缝地跨平台同步。你也能在浏览器上查看操作你的文件。 + +### 优点: + +- 50 GB 的免费存储空间 +- 端到端的加密 +- Linux 和其他平台下的原生客户端,例如 Windows,Mac OS X,Android,iOS + +### 缺点: + +- Mega 拥有者见不得人的过去 + +[Mega](https://mega.nz/) + +## Hubic + +![](http://itsfoss.com/wp-content/uploads/2016/02/hubic.jpeg) + +Hubic 是一个来自法国公司的云服务。Hubic 在注册时也提供了 25 GB 免费存储空间。你可以通过推荐Hubic给朋友将空间扩大至 50 GB (对免费用户来说)。 + +Hubic 提供 Linux 客户端,其还是 beta 版本(至今已经两年了)。Hubic 拥有官方的 Linux 客户端,但是它局限在命令行。我没有去测试移动版本。 + +Hubic 拥有一些不错的功能。除了简单的用户界面、文件共享等等,它还有备份的功能,你可以定期地归档你的重要文件。 + +### 优点: + +- 25 GB 免费存储空间,可扩大至 50 GB +- 支持多个平台 +- 备份功能 + +### 缺点: + +- beta 版本的 Linux 客户端,只支持命令行 + +[Hubic](https://hubic.com/) + +## pCloud + +![](http://itsfoss.com/wp-content/uploads/2016/02/pCloud-Linux.jpeg) + +pCloud 是另一款欧洲的发行软件,但这一次从瑞士横跨法国边境。专注于加密和安全,pCloud 为每一个注册者提供 10 GB 的免费存储空间。你可以通过邀请好友、在社交媒体上分享链接等方式将空间增加至 20 GB。 + +它拥有云服务的所有标准特性,例如文件共享、同步、选择性同步等等。pCloud 也有跨平台原生客户端,当然包括 Linux。 + +Linux 客户端 容易使用,并在 Linux Mint 17.3 下的有限测试中表现良好。 + +### 优点: + +- 10 GB 免费存储空间,可扩大至 20 GB +- 运行良好的带有 GUI 的 Linux 客户端 + +### 缺点: + +- 加密是一个付费功能 + +[pCloud](https://www.pcloud.com/) + +## Yandex Disk + +![](http://itsfoss.com/wp-content/uploads/2016/02/Yandex.jpg) + +俄罗斯互联网巨人 Yandex 拥有 Google 所拥有的一切东西。搜索引擎、分析学、网站管理工具、邮箱、网页浏览器和云存储服务。 + +Yandex Disk 在注册时提供了 10 GB 的免费云存储空间。它有多平台的原生客户端,包括 Linux。然而,官方的 Linux 客户端只是命令行而已。你可以获取[非官方的 GUI 版本的 Yandex Disk 客户端](https://mintguide.org/tools/265-yd-tools-gui-indicator-for-yandexdisk-free-cloud-storage-in-linux-mint.html)。Yandex Disk 支持文件共享链接,同时带有其他标准的云存储特性。 + +### 优点: + +- 10 GB 的免费存储空间,可通过推荐的方式扩大至 20 GB + +### 缺点: + +- 只有命令行客户端 + +[Yandex Disk](https://disk.yandex.com/) + +## 公正而深思熟虑的删节 + +我从列表中删减了[Dropbox](https://www.dropbox.com/)、[SpiderOak](https://spideroak.com/)。Dropbox 对 Linux 来说非常优秀,但是它的免费存储空间限制在 2 GB。在过去的几年里,我已设法将其扩大超过 21 GB,但那又是另一件事了。 + +SpiderOak 也仅提供了 2 GB 的免费存储空间,你无法在网页浏览器上操作文件。 + +OwnCloud 需要属于自己的服务器包括建立,因此它并非人见人爱。并且它确切不符合一个典型云服务的标准。 + +## 结论 + +如果你问我应该使用什么替代 Copy,我的答案是 Mega。它带有大量的免费云存储空间和优秀的 Linux 客户端。在** Linux 下最佳云存储服务**的列表中,你的选择是什么?你更喜欢哪一个呢? + + +------------------------------------------------------------------------------ + +via: http://itsfoss.com/cloud-services-linux/ + +作者:[ABHISHEK][a] +译者:[cposture](https://github.com/cposture) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ From 4eef1eb5b7f74dfaab41084831c45e5c2ab3d2d0 Mon Sep 17 00:00:00 2001 From: cposture Date: Tue, 19 Apr 2016 16:02:36 +0800 Subject: [PATCH 1268/1710] Translating by cposture --- .../20151220 GCC-Inline-Assembly-HOWTO.md | 633 ------------------ ...to Best Manage Encryption Keys on Linux.md | 1 + ...loud Services For Linux To Replace Copy.md | 136 ---- 3 files changed, 1 insertion(+), 769 deletions(-) delete mode 100644 sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md delete mode 100644 sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md diff --git a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md b/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md deleted file mode 100644 index b60ccad1f3..0000000000 --- a/sources/tech/20151220 GCC-Inline-Assembly-HOWTO.md +++ /dev/null @@ -1,633 +0,0 @@ -【Translating by cposture 2016-03-01】 -* * * - -# GCC 内联汇编 HOWTO - -v0.1, 01 March 2003. -* * * - -_本 HOWTO 文档将讲解 GCC 提供的内联汇编特性的用途和用法。对于阅读这篇文章,这里只有两个前提要求,很明显,就是 x86 汇编语言和 C 语言的基本认识。_ - -* * * - -## 1. 简介 - -## 1.1 版权许可 - -Copyright (C)2003 Sandeep S. - -本文档自由共享;你可以重新发布它,并且/或者在遵循自由软件基金会发布的 GNU 通用公共许可证下修改它;或者该许可证的版本 2 ,或者(按照你的需求)更晚的版本。 - -发布这篇文档是希望它能够帮助别人,但是没有任何保证;甚至不包括可售性和适用于任何特定目的的保证。关于更详细的信息,可以查看 GNU 通用许可证。 - -## 1.2 反馈校正 - -请将反馈和批评一起提交给 [Sandeep.S](mailto:busybox@sancharnet.in) 。我将感谢任何一个指出本文档中错误和不准确之处的人;一被告知,我会马上改正它们。 - -## 1.3 致谢 - -我对提供如此棒的特性的 GNU 人们表示真诚的感谢。感谢 Mr.Pramode C E 所做的所有帮助。感谢在 Govt Engineering College 和 Trichur 的朋友们的精神支持和合作,尤其是 Nisha Kurur 和 Sakeeb S 。 感谢在 Gvot Engineering College 和 Trichur 的老师们的合作。 - -另外,感谢 Phillip , Brennan Underwood 和 colin@nyx.net ;这里的许多东西都厚颜地直接取自他们的工作成果。 - -* * * - -## 2. 概览 - -在这里,我们将学习 GCC 内联汇编。这内联表示的是什么呢? - -我们可以要求编译器将一个函数的代码插入到调用者代码中函数被实际调用的地方。这样的函数就是内联函数。这听起来和宏差不多?这两者确实有相似之处。 - -内联函数的优点是什么呢? - -这种内联方法可以减少函数调用开销。同时如果所有实参的值为常量,它们的已知值可以在编译期允许简化,因此并非所有的内联函数代码都需要被包含。代码大小的影响是不可预测的,这取决于特定的情况。为了声明一个内联函数,我们必须在函数声明中使用 `inline` 关键字。 - -现在我们正处于一个猜测内联汇编到底是什么的点上。它只不过是一些写为内联函数的汇编程序。在系统编程上,它们方便、快速并且极其有用。我们主要集中学习(GCC)内联汇编函数的基本格式和用法。为了声明内联汇编函数,我们使用 `asm` 关键词。 - -内联汇编之所以重要,主要是因为它可以操作并且使其输出通过 C 变量显示出来。正是因为此能力, "asm" 可以用作汇编指令和包含它的 C 程序之间的接口。 - -* * * - -## 3. GCC 汇编语法 - -GCC , Linux上的 GNU C 编译器,使用 **AT&T** / **UNIX** 汇编语法。在这里,我们将使用 AT&T 语法 进行汇编编码。如果你对 AT&T 语法不熟悉的话,请不要紧张,我会教你的。AT&T 语法和 Intel 语法的差别很大。我会给出主要的区别。 - -1. 源操作数和目的操作数顺序 - - AT&T 语法的操作数方向和 Intel 语法的刚好相反。在Intel 语法中,第一操作数为目的操作数,第二操作数为源操作数,然而在 AT&T 语法中,第一操作数为源操作数,第二操作数为目的操作数。也就是说, - - Intel 语法中的 "Op-code dst src" 变为 - - AT&T 语法中的 "Op-code src dst"。 - -2. 寄存器命名 - - 寄存器名称有 % 前缀,即如果必须使用 eax,它应该用作 %eax。 - -3. 立即数 - - AT&T 立即数以 ’$’ 为前缀。静态 "C" 变量 也使用 ’$’ 前缀。在 Intel 语法中,十六进制常量以 ’h’ 为后缀,然而AT&T不使用这种语法,这里我们给常量添加前缀 ’0x’。所以,对于十六进制,我们首先看到一个 ’$’,然后是 ’0x’,最后才是常量。 - -4. 操作数大小 - - 在 AT&T 语法中,存储器操作数的大小取决于操作码名字的最后一个字符。操作码后缀 ’b’ 、’w’、’l’分别指明了字节(byte)(8位)、字(word)(16位)、长型(long)(32位)存储器引用。Intel 语法通过给存储器操作数添加’byte ptr’、 ’word ptr’ 和 ’dword ptr’前缀来实现这一功能。 - - 因此,Intel的 "mov al, byte ptr foo" 在 AT&T 语法中为 "movb foo, %al"。 - -5. 存储器操作数 - - 在 Intel 语法中,基址寄存器包含在 ’[’ 和 ’]’ 中,然而在 AT&T 中,它们变为 ’(’ 和 ’)’。另外,在 Intel 语法中, 间接内存引用为 - - section:[base + index*scale + disp], 在 AT&T中变为 - - section:disp(base, index, scale)。 - - 需要牢记的一点是,当一个常量用于 disp 或 scale,不能添加’$’前缀。 - -现在我们看到了 Intel 语法和 AT&T 语法之间的一些主要差别。我仅仅写了它们差别的一部分而已。关于更完整的信息,请参考 GNU 汇编文档。现在为了更好地理解,我们可以看一些示例。 - -> ` -> ->
+------------------------------+------------------------------------+
-> |       Intel Code             |      AT&T Code                     |
-> +------------------------------+------------------------------------+
-> | mov     eax,1                |  movl    $1,%eax                   |   
-> | mov     ebx,0ffh             |  movl    $0xff,%ebx                |   
-> | int     80h                  |  int     $0x80                     |   
-> | mov     ebx, eax             |  movl    %eax, %ebx                |
-> | mov     eax,[ecx]            |  movl    (%ecx),%eax               |
-> | mov     eax,[ebx+3]          |  movl    3(%ebx),%eax              | 
-> | mov     eax,[ebx+20h]        |  movl    0x20(%ebx),%eax           |
-> | add     eax,[ebx+ecx*2h]     |  addl    (%ebx,%ecx,0x2),%eax      |
-> | lea     eax,[ebx+ecx]        |  leal    (%ebx,%ecx),%eax          |
-> | sub     eax,[ebx+ecx*4h-20h] |  subl    -0x20(%ebx,%ecx,0x4),%eax |
-> +------------------------------+------------------------------------+
-> 
-> -> ` - -* * * - -## 4. 基本内联 - -基本内联汇编的格式非常直接了当。它的基本格式为 - -`asm("汇编代码");` - -示例 - -> ` -> -> * * * -> ->
asm("movl %ecx %eax"); /* 将 ecx 寄存器的内容移至 eax  */
-> __asm__("movb %bh (%eax)"); /* 将 bh 的一个字节数据 移至 eax 寄存器指向的内存 */
-> 
-> -> * * * -> -> ` - -你可能注意到了这里我使用了 `asm ` 和 `__asm__`。这两者都是有效的。如果关键词 `asm` 和我们程序的一些标识符冲突了,我们可以使用 `__asm__`。如果我们的指令多余一条,我们可以写成一行,并用括号括起,也可以为每条指令添加 ’\n’ 和 ’\t’ 后缀。这是因为gcc将每一条当作字符串发送给 **as**(GAS)( GAS 即 GNU 汇编器 ——译者注),并且通过使用换行符/制表符发送正确地格式化行给汇编器。 - -示例 - -> ` -> -> * * * -> ->
 __asm__ ("movl %eax, %ebx\n\t"
->           "movl $56, %esi\n\t"
->           "movl %ecx, $label(%edx,%ebx,$4)\n\t"
->           "movb %ah, (%ebx)");
-> 
-> -> * * * -> -> ` - -如果在代码中,我们涉及到一些寄存器(即改变其内容),但在没有固定这些变化的情况下从汇编中返回,这将会导致一些不好的事情。这是因为 GCC 并不知道寄存器内容的变化,这会导致问题,特别是当编译器做了某些优化。在没有告知 GCC 的情况下,它将会假设一些寄存器存储了我们可能已经改变的变量的值,它会像什么事都没发生一样继续运行(什么事都没发生一样是指GCC不会假设寄存器装入的值是有效的,当退出改变了寄存器值的内联汇编后,寄存器的值不会保存到相应的变量或内存空间 ——译者注)。我们所可以做的是使用这些没有副作用的指令,或者当我们退出时固定这些寄存器,或者等待程序崩溃。这是为什么我们需要一些扩展功能。扩展汇编正好给我们提供了那样的功能。 - -* * * - -## 5. 扩展汇编 - -在基本内联汇编中,我们只有指令。然而在扩展汇编中,我们可以同时指定操作数。它允许我们指定输入寄存器、输出寄存器以及修饰寄存器列表。GCC 不强制用户必须指定使用的寄存器。我们可以把头疼的事留给 GCC ,这可能可以更好地适应 GCC 的优化。不管怎樣,基本格式为: - -> ` -> -> * * * -> ->
       asm ( 汇编程序模板 
->            : 输出操作数					/* 可选的 */
->            : 输入操作数                   /* 可选的 */
->            : 修饰寄存器列表			    /* 可选的 */
->            );
-> 
-> -> * * * -> -> ` - -汇编程序模板由汇编指令组成.每一个操作数由一个操作数约束字符串所描述,其后紧接一个括弧括起的 C 表达式。冒号用于将汇编程序模板和第一个输出操作数分开,另一个(冒号)用于将最后一个输出操作数和第一个输入操作数分开,如果存在的话。逗号用于分离每一个组内的操作数。总操作数的数目限制在10个,或者机器描述中的任何指令格式中的最大操作数数目,以较大者为准。 - -如果没有输出操作数但存在输入操作数,你必须将两个连续的冒号放置于输出操作数原本会放置的地方周围。 - -示例: - -> ` -> -> * * * -> ->
        asm ("cld\n\t"
->              "rep\n\t"
->              "stosl"
->              : /* 无输出寄存器 */
->              : "c" (count), "a" (fill_value), "D" (dest)
->              : "%ecx", "%edi" 
->              );
-> 
-> -> * * * -> -> ` - -现在,这段代码是干什么的?以上的内联汇编是将 `fill_value` 值 连续 `count` 次 拷贝到 寄存器 `edi` 所指位置(每执行stosl一次,寄存器 edi 的值会递增或递减,这取决于是否设置了 direction 标志,因此以上代码实则初始化一个内存块 ——译者注)。 它也告诉 gcc 寄存器 `ecx` 和 `edi` 一直无效(原文为 eax ,但代码修饰寄存器列表中为 ecx,因此这可能为作者的纰漏 ——译者注)。为了使扩展汇编更加清晰,让我们再看一个示例。 - -> ` -> -> * * * -> ->
        
->         int a=10, b;
->         asm ("movl %1, %%eax; 
->               movl %%eax, %0;"
->              :"=r"(b)        /* 输出 */
->              :"r"(a)         /* 输入 */
->              :"%eax"         /* 修饰寄存器 */
->              );       
-> 
-> -> * * * -> -> ` - -这里我们所做的是使用汇编指令使 ’b’ 变量的值等于 ’a’ 变量的值。一些有意思的地方是: - -* "b" 为输出操作数,用 %0 引用,并且 "a" 为输入操作数,用 %1 引用。 -* "r" 为操作数约束。之后我们会更详细地了解约束(字符串)。目前,"r" 告诉 GCC 可以使用任一寄存器存储操作数。输出操作数约束应该有一个约束修饰符 "=" 。这修饰符表明它是一个只读的输出操作数。 -* 寄存器名字以两个%为前缀。这有利于 GCC 区分操作数和寄存器。操作数以一个 % 为前缀。 -* 第三个冒号之后的修饰寄存器 %eax 告诉 GCC %eax的值将会在 "asm" 内部被修改,所以 GCC 将不会使用此寄存器存储任何其他值。 - -当 "asm" 执行完毕, "b" 变量会映射到更新的值,因为它被指定为输出操作数。换句话说, "asm" 内 "b" 变量的修改 应该会被映射到 "asm" 外部。 - -现在,我们可以更详细地看看每一个域。 - -## 5.1 汇编程序模板 - -汇编程序模板包含了被插入到 C 程序的汇编指令集。其格式为:每条指令用双引号圈起,或者整个指令组用双引号圈起。同时每条指令应以分界符结尾。有效的分界符有换行符(\n)和逗号(;)。’\n’ 可以紧随一个制表符(\t)。我们应该都明白使用换行符或制表符的原因了吧?和 C 表达式对应的操作数使用 %0、%1 ... 等等表示。 - -## 5.2 操作数 - -C 表达式用作 "asm" 内的汇编指令操作数。作为第一双引号内的操作数约束,写下每一操作数。对于输出操作数,在引号内还有一个约束修饰符,其后紧随一个用于表示操作数的 C 表达式。即, - -"约束字符串"(C 表达式),它是一个通用格式。对于输出操作数,还有一个额外的修饰符。约束字符串主要用于决定操作数的寻找方式,同时也用于指定使用的寄存器。 - -如果我们使用的操作数多于一个,那么每一个操作数用逗号隔开。 - -在汇编程序模板,每个操作数用数字引用。编号方式如下。如果总共有 n 个操作数(包括输入和输出操作数),那么第一个输出操作数编号为 0 ,逐项递增,并且最后一个输入操作数编号为 n - 1 。操作数的最大数目为前一节我们所看到的那样。 - -输出操作数表达式必须为左值。输入操作数的要求不像这样严格。它们可以为表达式。扩展汇编特性常常用于编译器自己不知道其存在的机器指令 ;-)。如果输出表达式无法直接寻址(例如,它是一个位域),我们的约束字符串必须给定一个寄存器。在这种情况下,GCC 将会使用该寄存器作为汇编的输出,然后存储该寄存器的内容到输出。 - -正如前面所陈述的一样,普通的输出操作数必须为只写的; GCC 将会假设指令前的操作数值是死的,并且不需要被(提前)生成。扩展汇编也支持输入-输出或者读-写操作数。 - -所以现在我们来关注一些示例。我们想要求一个数的5次方结果。为了计算该值,我们使用 `lea` 指令。 - -> ` -> -> * * * -> ->
        asm ("leal (%1,%1,4), %0"
->              : "=r" (five_times_x)
->              : "r" (x) 
->              );
-> 
-> -> * * * -> -> ` - -这里我们的输入为x。我们不指定使用的寄存器。 GCC 将会选择一些输入寄存器,一个输出寄存器,并且做我们期望的事。如果我们想要输入和输出存在于同一个寄存器里,我们可以要求 GCC 这样做。这里我们使用那些读-写操作数类型。这里我们通过指定合适的约束来实现它。 - -> ` -> -> * * * -> ->
        asm ("leal (%0,%0,4), %0"
->              : "=r" (five_times_x)
->              : "0" (x) 
->              );
-> 
-> -> * * * -> -> ` - -现在输出和输出操作数位于同一个寄存器。但是我们无法得知是哪一个寄存器。现在假如我们也想要指定操作数所在的寄存器,这里有一种方法。 - -> ` -> -> * * * -> ->
        asm ("leal (%%ecx,%%ecx,4), %%ecx"
->              : "=c" (x)
->              : "c" (x) 
->              );
-> 
-> -> * * * -> -> ` - -在以上三个示例中,我们并没有添加任何寄存器到修饰寄存器里,为什么?在头两个示例, GCC 决定了寄存器并且它知道发生了什么改变。在最后一个示例,我们不必将 'ecx' 添加到修饰寄存器列表(原文修饰寄存器列表拼写有错,这里已修正 ——译者注), gcc 知道它表示x。因此,因为它可以知道 `ecx` 的值,它就不被当作修饰的(寄存器)了。 - -## 5.3 修饰寄存器列表 - -一些指令会破坏一些硬件寄存器。我们不得不在修饰寄存器中列出这些寄存器,即汇编函数内第三个 ’**:**’ 之后的域。这可以通知 gcc 我们将会自己使用和修改这些寄存器。所以 gcc 将不会假设存入这些寄存器的值是有效的。我们不用在这个列表里列出输入输出寄存器。因为 gcc 知道 "asm" 使用了它们(因为它们被显式地指定为约束了)。如果指令隐式或显式地使用了任何其他寄存器,(并且寄存器不能出现在输出或者输出约束列表里),那么不得不在修饰寄存器列表中指定这些寄存器。 - -如果我们的指令可以修改状态寄存器,我们必须将 "cc" 添加进修饰寄存器列表。 - -如果我们的指令以不可预测的方式修改了内存,那么需要将 "memory" 添加进修饰寄存器列表。这可以使 GCC 不会在汇编指令间保持缓存于寄存器的内存值。如果被影响的内存不在汇编的输入或输出列表中,我们也必须添加 **volatile** 关键词。 - -我们可以按我们的需求多次读写修饰寄存器。考虑一个模板内的多指令示例;它假设子例程 _foo 接受寄存器 `eax` 和 `ecx` 里的参数。 - -> ` -> -> * * * -> ->
        asm ("movl %0,%%eax;
->               movl %1,%%ecx;
->               call _foo"
->              : /* no outputs */
->              : "g" (from), "g" (to)
->              : "eax", "ecx"
->              );
-> 
-> -> * * * -> -> ` - -## 5.4 Volatile ...? - -如果你熟悉内核源码或者其他像内核源码一样漂亮的代码,你一定见过许多声明为 `volatile` 或者 `__volatile__`的函数,其跟着一个 `asm` 或者 `__asm__`。我之前提过关键词 `asm` 和 `__asm__`。那么什么是 `volatile`呢? - -如果我们的汇编语句必须在我们放置它的地方执行(即,不能作为一种优化被移出循环语句),将关键词 `volatile` 放置在 asm 后面,()的前面。因为为了防止它被移动、删除或者其他操作,我们将其声明为 - -`asm volatile ( ... : ... : ... : ...);` - -当我们必须非常谨慎时,请使用 `__volatile__`。 - -如果我们的汇编只是用于一些计算并且没有任何副作用,不使用 `volatile` 关键词会更好。不使用 `volatile` 可以帮助 gcc 优化代码并使代码更漂亮。 - - -在 `Some Useful Recipes` 一节中,我提供了多个内联汇编函数的例子。这儿我们详细查看修饰寄存器列表。 - -* * * - -## 6. 更多关于约束 - -到这个时候,你可能已经了解到约束和内联汇编有很大的关联。但我们很少说到约束。约束用于表明一个操作数是否可以位于寄存器和位于哪个寄存器;是否操作数可以为一个内存引用和哪种地址;是否操作数可以为一个立即数和为哪一个可能的值(即值的范围)。它可以有...等等。 - -## 6.1 常用约束 - -在许多约束中,只有小部分是常用的。我们将看看这些约束。 - -1. **寄存器操作数约束(r)** - - 当使用这种约束指定操作数时,它们存储在通用寄存器(GPR)中。请看下面示例: - - `asm ("movl %%eax, %0\n" :"=r"(myval));` - - 这里,变量 myval 保存在寄存器中,寄存器 eax 的值被复制到该寄存器中,并且myval的值从寄存器更新到了内存。当指定 "r" 约束时, gcc 可以将变量保存在任何可用的 GPR 中。为了指定寄存器,你必须使用特定寄存器约束直接地指定寄存器的名字。它们为: - - > ` - > - >
+---+--------------------+
-    > | r |    Register(s)     |
-    > +---+--------------------+
-    > | a |   %eax, %ax, %al   |
-    > | b |   %ebx, %bx, %bl   |
-    > | c |   %ecx, %cx, %cl   |
-    > | d |   %edx, %dx, %dl   |
-    > | S |   %esi, %si        |
-    > | D |   %edi, %di        |
-    > +---+--------------------+
-    > 
- > - > ` - -2. **内存操作数约束(m)** - - 当操作数位于内存时,任何对它们的操作将直接发生在内存位置,这与寄存器约束相反,后者首先将值存储在要修改的寄存器中,然后将它写回到内存位置。但寄存器约束通常用于一个指令必须使用它们或者它们可以大大提高进程速度的地方。当需要在 "asm" 内更新一个 C 变量,而又不想使用寄存器去保存它的只,使用内存最为有效。例如, idtr 的值存储于内存位置: - - `asm("sidt %0\n" : :"m"(loc));` - -3. **匹配(数字)约束** - - 在某些情况下,一个变量可能既充当输入操作数,也充当输出操作数。可以通过使用匹配约束在 "asm" 中指定这种情况。 - - `asm ("incl %0" :"=a"(var):"0"(var));` - - 在操作数子节中,我们也看到了一些类似的示例。在这个匹配约束的示例中,寄存器 "%eax" 既用作输入变量,也用作输出变量。 var 输入被读进 %eax ,并且更新的 %eax 再次被存储进 var。这里的 "0" 用于指定与第0个输出变量相同的约束。也就是,它指定 var 输出实例应只被存储在 "%eax" 中。该约束可用于: - - * 在输入从变量读取或变量修改后,修改被写回同一变量的情况 - * 在不需要将输入操作数实例和输出操作数实例分开的情况 - - 使用匹配约束最重要的意义在于它们可以导致有效地使用可用寄存器。 - -其他一些约束: - -1. "m" : 允许一个内存操作数使用机器普遍支持的任一种地址。 -2. "o" : 允许一个内存操作数,但只有当地址是可偏移的。即,该地址加上一个小的偏移量可以得到一个地址。 -3. "V" : A memory operand that is not offsettable. In other words, anything that would fit the `m’ constraint but not the `o’constraint. -4. "i" : 允许一个(带有常量)的立即整形操作数。这包括其值仅在汇编时期知道的符号常量。 -5. "n" : 允许一个带有已知数字的立即整形操作数。许多系统不支持汇编时期的常量,因为操作数少于一个字宽。对于此种操作数,约束应该使用 'n' 而不是'i'。 -6. "g" : 允许任一寄存器、内存或者立即整形操作数,不包括通用寄存器之外的寄存器。 - - -以下约束为x86特有。 - -1. "r" : 寄存器操作数约束,查看上面给定的表格。 -2. "q" : 寄存器 a、b、c 或者 d。 -3. "I" : 范围从 0 到 31 的常量(对于 32 位移位)。 -4. "J" : 范围从 0 到 63 的常量(对于 64 位移位)。 -5. "K" : 0xff。 -6. "L" : 0xffff。 -7. "M" : 0, 1, 2, or 3 (lea 指令的移位)。 -8. "N" : 范围从 0 到 255 的常量(对于 out 指令)。 -9. "f" : 浮点寄存器 -10. "t" : 第一个(栈顶)浮点寄存器 -11. "u" : 第二个浮点寄存器 -12. "A" : 指定 `a` 或 `d` 寄存器。这主要用于想要返回 64 位整形数,使用 `d` 寄存器保存最高有效位和 `a` 寄存器保存最低有效位。 - -## 6.2 约束修饰符 - -当使用约束时,对于更精确的控制超越了约束作用的需求,GCC 给我们提供了约束修饰符。最常用的约束修饰符为: - -1. "=" : 意味着对于这条指令,操作数为只写的;旧值会被忽略并被输出数据所替换。 -2. "&" : 意味着这个操作数为一个早期的改动操作数,其在该指令完成前通过使用输入操作数被修改了。因此,这个操作数不可以位于一个被用作输出操作数或任何内存地址部分的寄存器。如果在旧值被写入之前它仅用作输入而已,一个输入操作数可以为一个早期改动操作数。 - - 约束的列表和解释是决不完整的。示例可以给我们一个关于内联汇编的用途和用法的更好的理解。在下一节,我们会看到一些示例,在那里我们会发现更多关于修饰寄存器列表的东西。 - -* * * - -## 7. Some Useful Recipes. - -Now we have covered the basic theory about GCC inline assembly, now we shall concentrate on some simple examples. It is always handy to write inline asm functions as MACRO’s. We can see many asm functions in the kernel code. (/usr/src/linux/include/asm/*.h). - -1. First we start with a simple example. We’ll write a program to add two numbers. - - > ` - > - > * * * - > - >
int main(void)
-    > {
-    >         int foo = 10, bar = 15;
-    >         __asm__ __volatile__("addl  %%ebx,%%eax"
-    >                              :"=a"(foo)
-    >                              :"a"(foo), "b"(bar)
-    >                              );
-    >         printf("foo+bar=%d\n", foo);
-    >         return 0;
-    > }
-    > 
- > - > * * * - > - > ` - - Here we insist GCC to store foo in %eax, bar in %ebx and we also want the result in %eax. The ’=’ sign shows that it is an output register. Now we can add an integer to a variable in some other way. - - > ` - > - > * * * - > - >
 __asm__ __volatile__(
-    >                       "   lock       ;\n"
-    >                       "   addl %1,%0 ;\n"
-    >                       : "=m"  (my_var)
-    >                       : "ir"  (my_int), "m" (my_var)
-    >                       :                                 /* no clobber-list */
-    >                       );
-    > 
- > - > * * * - > - > ` - - This is an atomic addition. We can remove the instruction ’lock’ to remove the atomicity. In the output field, "=m" says that my_var is an output and it is in memory. Similarly, "ir" says that, my_int is an integer and should reside in some register (recall the table we saw above). No registers are in the clobber list. - -2. Now we’ll perform some action on some registers/variables and compare the value. - - > ` - > - > * * * - > - >
 __asm__ __volatile__(  "decl %0; sete %1"
-    >                       : "=m" (my_var), "=q" (cond)
-    >                       : "m" (my_var) 
-    >                       : "memory"
-    >                       );
-    > 
- > - > * * * - > - > ` - - Here, the value of my_var is decremented by one and if the resulting value is `0` then, the variable cond is set. We can add atomicity by adding an instruction "lock;\n\t" as the first instruction in assembler template. - - In a similar way we can use "incl %0" instead of "decl %0", so as to increment my_var. - - Points to note here are that (i) my_var is a variable residing in memory. (ii) cond is in any of the registers eax, ebx, ecx and edx. The constraint "=q" guarantees it. (iii) And we can see that memory is there in the clobber list. ie, the code is changing the contents of memory. - -3. How to set/clear a bit in a register? As next recipe, we are going to see it. - - > ` - > - > * * * - > - >
__asm__ __volatile__(   "btsl %1,%0"
-    >                       : "=m" (ADDR)
-    >                       : "Ir" (pos)
-    >                       : "cc"
-    >                       );
-    > 
- > - > * * * - > - > ` - - Here, the bit at the position ’pos’ of variable at ADDR ( a memory variable ) is set to `1` We can use ’btrl’ for ’btsl’ to clear the bit. The constraint "Ir" of pos says that, pos is in a register, and it’s value ranges from 0-31 (x86 dependant constraint). ie, we can set/clear any bit from 0th to 31st of the variable at ADDR. As the condition codes will be changed, we are adding "cc" to clobberlist. - -4. Now we look at some more complicated but useful function. String copy. - - > ` - > - > * * * - > - >
static inline char * strcpy(char * dest,const char *src)
-    > {
-    > int d0, d1, d2;
-    > __asm__ __volatile__(  "1:\tlodsb\n\t"
-    >                        "stosb\n\t"
-    >                        "testb %%al,%%al\n\t"
-    >                        "jne 1b"
-    >                      : "=&S" (d0), "=&D" (d1), "=&a" (d2)
-    >                      : "0" (src),"1" (dest) 
-    >                      : "memory");
-    > return dest;
-    > }
-    > 
- > - > * * * - > - > ` - - The source address is stored in esi, destination in edi, and then starts the copy, when we reach at **0**, copying is complete. Constraints "&S", "&D", "&a" say that the registers esi, edi and eax are early clobber registers, ie, their contents will change before the completion of the function. Here also it’s clear that why memory is in clobberlist. - - We can see a similar function which moves a block of double words. Notice that the function is declared as a macro. - - > ` - > - > * * * - > - >
#define mov_blk(src, dest, numwords) \
-    > __asm__ __volatile__ (                                          \
-    >                        "cld\n\t"                                \
-    >                        "rep\n\t"                                \
-    >                        "movsl"                                  \
-    >                        :                                        \
-    >                        : "S" (src), "D" (dest), "c" (numwords)  \
-    >                        : "%ecx", "%esi", "%edi"                 \
-    >                        )
-    > 
- > - > * * * - > - > ` - - Here we have no outputs, so the changes that happen to the contents of the registers ecx, esi and edi are side effects of the block movement. So we have to add them to the clobber list. - -5. In Linux, system calls are implemented using GCC inline assembly. Let us look how a system call is implemented. All the system calls are written as macros (linux/unistd.h). For example, a system call with three arguments is defined as a macro as shown below. - - > ` - > - > * * * - > - > type name(type1 arg1,type2 arg2,type3 arg3) \ - > { \ - > long __res; \ - > __asm__ volatile ( "int $0x80" \ - > : "=a" (__res) \ - > : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ - > "d" ((long)(arg3))); \ - > __syscall_return(type,__res); \ - > } - >
- > - > * * * - > - > ` - - Whenever a system call with three arguments is made, the macro shown above is used to make the call. The syscall number is placed in eax, then each parameters in ebx, ecx, edx. And finally "int 0x80" is the instruction which makes the system call work. The return value can be collected from eax. - - Every system calls are implemented in a similar way. Exit is a single parameter syscall and let’s see how it’s code will look like. It is as shown below. - - > ` - > - > * * * - > - >
{
-    >         asm("movl $1,%%eax;         /* SYS_exit is 1 */
-    >              xorl %%ebx,%%ebx;      /* Argument is in ebx, it is 0 */
-    >              int  $0x80"            /* Enter kernel mode */
-    >              );
-    > }
-    > 
- > - > * * * - > - > ` - - The number of exit is "1" and here, it’s parameter is 0\. So we arrange eax to contain 1 and ebx to contain 0 and by `int $0x80`, the `exit(0)` is executed. This is how exit works. - -* * * - -## 8. Concluding Remarks. - -This document has gone through the basics of GCC Inline Assembly. Once you have understood the basic concept it is not difficult to take steps by your own. We saw some examples which are helpful in understanding the frequently used features of GCC Inline Assembly. - -GCC Inlining is a vast subject and this article is by no means complete. More details about the syntax’s we discussed about is available in the official documentation for GNU Assembler. Similarly, for a complete list of the constraints refer to the official documentation of GCC. - -And of-course, the Linux kernel use GCC Inline in a large scale. So we can find many examples of various kinds in the kernel sources. They can help us a lot. - -If you have found any glaring typos, or outdated info in this document, please let us know. - -* * * - -## 9. References. - -1. [Brennan’s Guide to Inline Assembly](http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html) -2. [Using Assembly Language in Linux](http://linuxassembly.org/articles/linasm.html) -3. [Using as, The GNU Assembler](http://www.gnu.org/manual/gas-2.9.1/html_mono/as.html) -4. [Using and Porting the GNU Compiler Collection (GCC)](http://gcc.gnu.org/onlinedocs/gcc_toc.html) -5. [Linux Kernel Source](http://ftp.kernel.org/) - -* * * -via: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html - - 作者:[Sandeep.S](mailto:busybox@sancharnet.in) 译者:[](https://github.com/) 校对:[]() - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md index 19aab96541..1648ac6263 100644 --- a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md +++ b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md @@ -1,3 +1,4 @@ +[Translating by cposture] How to Best Manage Encryption Keys on Linux ============================================= diff --git a/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md b/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md deleted file mode 100644 index 8e178b856e..0000000000 --- a/sources/tech/20160220 Best Cloud Services For Linux To Replace Copy.md +++ /dev/null @@ -1,136 +0,0 @@ -[Translating by cposture 2016-03-12] -Best Cloud Services For Linux To Replace Copy -=============================================== - -![](http://itsfoss.com/wp-content/uploads/2016/02/Linux-cloud-services.jpg) - -Cloud storage service Copy is shutting down and it is time for us Linux users to look for a worthy **cloud storage alternative to Copy for Linux**. - -All files will be deleted on May 1st, 2016. If you are a Copy user, you should save your files and move it to other - -Copy has been my favorite cloud storage for past couple of years. It gave me plenty of free storage and came with native apps for desktop platforms including Linux and mobile platforms as iOS and Android. - -It was a perfect Cloud storage for me where I get plenty of free storage (380 GB) with a seamless experience between desktop and mobile OSes. But this ‘easy free storage’, 15GB for signup and 5Gb for each referral, had me thinking that if Copy doesn’t get business customers, they will be running out of business soon. Such huge free storage only meant that they were not targeting individual customers like Dropbox do. - -My fear came true when I read about the shutting down of Copy.com. In fact, Copy is not alone. Its parent company [Barracuda Networks](https://www.barracuda.com/) is going through a rough patch and has [hired Morgan Stanely to look for suitable buyer](http://www.bloomberg.com/news/articles/2016-02-01/barracuda-networks-said-to-work-with-morgan-stanley-to-seek-sale)(s). - -Whatever be the reason, all we know is that Copy will soon be history and we need to find similarly **good cloud services for Linux**. I am putting emphasis on Linux because other popular cloud storage services like [Microsoft’s OneDrive](https://onedrive.live.com/about/en-us/) and [Google Drive](https://www.google.com/drive/) do not provide native Linux client. This is something expected out of Microsoft but [Google’s apathy towards Linux](http://itsfoss.com/google-hates-desktop-linux/) is shocking. - -## Best Copy alternatives for Linux - -Now, what do you want in a cloud storage services as a Linux storage? Let me guess: - -- Lots of free storage. After all, individuals cannot pay hefty amounts every month. -- Native Linux client. So that you can synchronize files easily with the server without doing special tweaking or running scripts at regular intervals. -- Desktop clients for other desktop OSes i.e. Windows and OS X. Portability is a necessity and syncing files between devices is such a good relief. -- Mobile apps for Android and iOS. In today’s modern world, you need to be connected across all the devices. - -I am not counting the self-hosted cloud services like OwnCloud or [Seafile](https://www.seafile.com/en/home/) because they require set-up and run a server. This is not apt for all home users who want a Copy like cloud service. - -Let’s see what are the services that you could use to replace Copy.com on Linux. - -## Mega - -![](http://itsfoss.com/wp-content/uploads/2016/02/Mega-Linux.jpg) - -If you are a regular It’s FOSS reader, you might have come across my earlier article about [Mega on Linux](http://itsfoss.com/install-mega-cloud-storage-linux/). This cloud service is an offering by the infamous [Kim Dotcom](https://en.wikipedia.org/wiki/Kim_Dotcom) of [Megaupload scandal](https://en.wikipedia.org/wiki/Megaupload). This also makes some users skeptical about it because Kim Dotcom has been a target by US authorities for a long time. - -Mega has everything that you would expect in a hassle free cloud service. It provides 50 GB of free storage to individual users. Provide native clients for Linux and other platforms and also has end to end encryption. The native Linux client works fine and the sync across the device is seamless. You can also view and access your files in a web browser. - -### Pros: - -- 50 GB of free storage -- End to end encryption -- Native clients for Linux and other platforms such as Windows, Mac OS X, Android, iOS - -### Cons: - -- Shady past of the owner - -[Mega](https://mega.nz/) - -## Hubic - -![](http://itsfoss.com/wp-content/uploads/2016/02/hubic.jpeg) - -Hubic is a cloud service from French company [OVH](https://www.ovh.com/fr/). Hubic also offers 25 GB of free cloud storage at sign up. You can further extend it to 50GB (for free users) by referring it to friends. - -Hubic has a Linux client which is in beta (for over two years now). Hubic has an official Linux client but it is limited to command line. I did not go on to test the mobile versions. - -Hubic boasts of some nice features though. Apart from simple to use interface, file sharing etc, it has a Backup feature where you can archive your important files regularly. - -### Pros: - -- 25 GB of free storage, extendable up to 50 GB -- Available on multiple platforms -- Backup feature - -### Cons: - -- Linux client in beta, only available in command line - -[Hubic](https://hubic.com/) - -## pCloud - -![](http://itsfoss.com/wp-content/uploads/2016/02/pCloud-Linux.jpeg) - -pCloud is another European offering but this time across the French border, from Switzerland. Focused on encryption and security, pCloud offers 10 GB of free storage for each signup. You can further increase it up to 20 GB by inviting friends, sharing links on social media etc. - -It has all the standard features of a cloud service such as file sharing and synchronization, selective syncing etc. pCloud also has native clients across platforms, including Linux of course. - -Linux client is easy to use and worked well in my limited testing on Linux Mint 17.3. - -### Pros: - -- 10 GB of free storage, extendable up to 20 GB -- A good working Linux client with GUI - -### Cons: - -- Encryption is a premium feature - -[pCloud](https://www.pcloud.com/) - -## Yandex Disk - -![](http://itsfoss.com/wp-content/uploads/2016/02/Yandex.jpg) - -Russian internet giant Yandex has everything that Google has. A search engine, analytics and webmaster tool, email, web browser and cloud storage service. - -Yandex Disk offers 10 GB of free cloud storage on sign up. It has native clients for multiple platforms, including Linux. However, the official Linux client is only command line. You can get [unofficial GUI client for Yandex disk](https://mintguide.org/tools/265-yd-tools-gui-indicator-for-yandexdisk-free-cloud-storage-in-linux-mint.html) though. File sharing via links is available as along with other standard cloud storage feature. - -### Pros: - -- 10 GB of free storage, extendable up to 20 GB via referrals. - -### Cons: - -- Only command line client available - -[Yandex Disk](https://disk.yandex.com/) - -## Honorable and deliberate omissions - -I have deliberately skipped [Dropbox](https://www.dropbox.com/), [SpiderOak](https://spideroak.com/) from the list. Dropbox is excellent for Linux but the free storage is limited to 2 GB. Over the past several years, I have managed to increase it to over 21 GB, but that’s another story. - -SpiderOak also provides only 2 GB of free storage and you cannot access it in a web browser. - -OwnCloud needs its own server and set-up and thus it is not everyone’s cup of tea. And it certainly doesn’t fit the criteria of a typical cloud service. - -## Verdict - -If you ask me what I am going to use in place of Copy, my answer is Mega. It has plenty of free cloud storage and a great Linux desktop client. What is your choice among this list of **best cloud storage services for Linux**? Which one do you prefer? - - ------------------------------------------------------------------------------- - -via: http://itsfoss.com/cloud-services-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/ From a01e028699f47f8592a2a72753ef44c78de4f529 Mon Sep 17 00:00:00 2001 From: cposture Date: Tue, 19 Apr 2016 16:10:38 +0800 Subject: [PATCH 1269/1710] as --- .../tech/20160218 How to Best Manage Encryption Keys on Linux.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md index 1648ac6263..19aab96541 100644 --- a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md +++ b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md @@ -1,4 +1,3 @@ -[Translating by cposture] How to Best Manage Encryption Keys on Linux ============================================= From e0627f1cc11a5217de54b8a42266286d0c073ca9 Mon Sep 17 00:00:00 2001 From: willowyoung <1079902707@qq.com> Date: Tue, 19 Apr 2016 17:06:29 +0800 Subject: [PATCH 1270/1710] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B7=B2=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E5=8E=9F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ocessing at NASA with open source tools.md | 82 ------------------- 1 file changed, 82 deletions(-) delete mode 100644 sources/tech/20160304 Image processing at NASA with open source tools.md diff --git a/sources/tech/20160304 Image processing at NASA with open source tools.md b/sources/tech/20160304 Image processing at NASA with open source tools.md deleted file mode 100644 index 4833b7bf93..0000000000 --- a/sources/tech/20160304 Image processing at NASA with open source tools.md +++ /dev/null @@ -1,82 +0,0 @@ -Translating By willowyoung -Image processing at NASA with open source tools -======================================================= - -keyword: NASA , Image Process , Node.js , OpenCV - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/nasa_spitzer_space_pink_spiral.jpg?itok=3XEUstkl) - -This past summer, I was an intern at the [GVIS][1] Lab at [NASA][2] Glenn, where I brought my passion for open source into the lab. My task was to improve our lab's contributions to an open source fluid flow dynamics [simulation][3] developed by Dan Schroeder. The original simulation presents obstacles that users can draw in with their mouse to model computational fluid dynamics. My team contributed by adding image processing code that analyzes each frame of a live video feed to show how a physical object interacts with a fluid. But, there was more for us to do. - -We wanted to make the image processing more robust, so I worked on improving the image processing library. - -With the new library, the simulation would be able to detect contours, perform coordinate transformations in place, and find the center of mass of an object. The image processing doesn't directly relate to the physics of the fluid flow dynamics simulation. It detects the object with a camera and creates a barrier for the fluid flow simulation by getting the outline of the object. Then, the fluid flow simulation runs, and the output is projected down onto the actual object. - -My goal was to improve the simulation in three ways: - -1. to find accurate contours of an object -2. to find the center of mass of an object -3. to be able to perform accurate transformations about the center of an object - -My mentor recommended that I install [Node.js][4], [OpenCV][5], and the [Node.js bindings for OpenCV][6]. While I was waiting for those to install, I looked at the example code on the OpenCV bindings on their [GitHub page][7]. I discovered that the example code was in JavaScript, so because I didn’t know JavaScript, I started a short course from Codecademy. Two days later, I was sick of JavaScript but ready to start my project... which involved yet more JavaScript. - -The example contour-finding code worked well. In fact, it allowed me to accomplish my first goal in a matter of hours! To get the contours of an image, here's what it looked like: - -![](https://opensource.com/sites/default/files/resize/image_processing_nasa_1-520x293.jpg) ->The original image with all of the contours. - -The example contour-finding code worked a bit too well. Instead of the contour of the object being detected, all of the contours in the image were detected. This would have resulted in the simulation interacting with all of the unwanted contours. This is a problem because it would return incorrect data. To keep the simulation from interacting with the unwanted contours, I added an area constraint. If the contour was in a certain area range, then it would be drawn. The area constraint resulted in a much cleaner contour. - -![](https://opensource.com/sites/default/files/resize/image_processing_nasa_2-520x293.jpg) ->The filtered contour with the shadow contour. - -Though the extraneous contours weren't detected, there was still a problem with the image. There was only one contour in the image, but it doubled back on itself and wasn't complete. Area couldn't be a deciding factor here, so it was time to try something else. - -This time around, instead of immediately finding the contours, I first converted the image into a binary image. A binary image is an image where each pixel is either black or white. To get a binary image I first converted the color image to grayscale. Once the image was in grayscale, I called the threshold method on the image. The threshold method went through the image pixel by pixel and if the color value of the pixel was less than 30, the pixel color would be changed to black. Otherwise, the pixel value would be turned to white. After the original image was converted to a binary image, the resulting image looked like this: - -![](https://opensource.com/sites/default/files/resize/image_processing_nasa_3-520x293.jpg) ->The binary image. - -Then I got the contours from the binary image, which resulted in a much cleaner contour, without the shadow contour. - -![](https://opensource.com/sites/default/files/image_processing_nasa_4.jpg) ->The final clean contour. - -At this point, I was able to get clean contours and detect the center of mass. Unfortunately, I didn't have enough time to be able to complete transformations about the center of mass. Since I only had a few days left in my internship, I started to think about other things I could do within a limited time span. One of those things was the bounding rectangle. The bounding rectangle is a quadrilateral with the smallest area that contains the entire contour of an image. The bounding rectangle is important because it is key in scaling the contour on the page. Unfortunately I didn't have time to do much with the bounding rectangle, but I still wanted to learn about it because it's a useful tool. - -Finally, after all of that, I was able to finish processing the image! - -![](https://opensource.com/sites/default/files/resize/image_processing_nasa_5-521x293.jpg) ->The final image with bounding rectangle and center of mass in red. - -Once the image processing code was complete, I replaced the old image processing code in the simulation with my code. To my surprise, it worked! - -Well, mostly. - -The program had a memory leak in it, which leaked 100MB every 1/10 of a second. I was glad that it wasn’t because of my code. The bad thing was that fixing it was out of my control. The good thing was that there was a workaround that I could use. It was less than ideal, but it checked the amount of memory the simulation was using and when it used more than 1 GiB, the simulation restarted. - -At the NASA lab, we use a lot of open source software, and my work there isn't possible without it. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/3/image-processing-nasa - -作者:[Lauren Egts][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/laurenegts -[1]: https://ocio.grc.nasa.gov/gvis/ -[2]: http://www.nasa.gov/centers/glenn/home/index.html -[3]: http://physics.weber.edu/schroeder/fluids/ -[4]: http://nodejs.org/ -[5]: http://opencv.org/ -[6]: https://github.com/peterbraden/node-opencv -[7]: https://github.com/peterbraden/node-opencv - - - - - From 5265e6fca4f562a9fdd2740d0bebf672df8d8a6c Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Wed, 20 Apr 2016 00:53:04 +0800 Subject: [PATCH 1271/1710] vim-kakali translating --- sources/talk/20151227 Upheaval in the Debian Live project.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20151227 Upheaval in the Debian Live project.md b/sources/talk/20151227 Upheaval in the Debian Live project.md index d663d09b17..3fa8179aa3 100644 --- a/sources/talk/20151227 Upheaval in the Debian Live project.md +++ b/sources/talk/20151227 Upheaval in the Debian Live project.md @@ -1,3 +1,5 @@ +vim-kakali is translating. + While the event had a certain amount of drama surrounding it, the [announcement][1] of the end for the [Debian Live project][2] seems likely to have less of an impact than it first appeared. The loss of the lead developer will certainly be felt—and the treatment he and the project received seems rather baffling—but the project looks like it will continue in some form. So Debian will still have tools to create live CDs and other media going forward, but what appears to be a long-simmering dispute between project founder and leader Daniel Baumann and the Debian CD and installer teams has been "resolved", albeit in an unfortunate fashion. The November 9 announcement from Baumann was titled "An abrupt End to Debian Live". In that message, he pointed to a number of different events over the nearly ten years since the [project was founded][3] that indicated to him that his efforts on Debian Live were not being valued, at least by some. The final straw, it seems, was an "intent to package" (ITP) bug [filed][4] by Iain R. Learmonth that impinged on the namespace used by Debian Live. From 0ff459f46f10652a78884c74b4a44ee9ed516d5a Mon Sep 17 00:00:00 2001 From: pengkai Date: Wed, 20 Apr 2016 22:30:55 +0800 Subject: [PATCH 1272/1710] translated --- ...d open source experience to your resume.md | 92 ------------------- ...d open source experience to your resume.md | 56 +++++++++++ 2 files changed, 56 insertions(+), 92 deletions(-) delete mode 100644 sources/tech/20160225 How to add open source experience to your resume.md create mode 100644 translated/tech/20160225 How to add open source experience to your resume.md diff --git a/sources/tech/20160225 How to add open source experience to your resume.md b/sources/tech/20160225 How to add open source experience to your resume.md deleted file mode 100644 index 8a3a3e09cf..0000000000 --- a/sources/tech/20160225 How to add open source experience to your resume.md +++ /dev/null @@ -1,92 +0,0 @@ -kylepeng93 is translating!!! -How to add open source experience to your resume -================================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/lightning-test.png?itok=aMceg0Vg) - - -In this article, I'll share my technique for leveraging open source contributions to stand out as a great candidate for a job in the technology field. - -No goal can be accomplished without first being set. Before jumping into a new commitment or spending the evening overhauling your resume, it pays to clearly define the traits of the job you're seeking. Your resume is a piece of persuasive writing, so you have to know your audience for it to reach its full potential. Your resume's audience is anyone with the need for your skills and the budget to hire you. When editing, read your resume while imagining what it's like to be in their position. Do you look like a candidate that you would hire? - -I personally find it helpful to make a list of the key traits that the ideal candidate for my target job displays. I gather this list from a combination of personal experience, reading job postings, and asking colleagues in similar roles. LinkedIn and conferences are great places to find people happy to offer this sort of advice. Many people enjoy talking about themselves, and inviting them to tell part of their own story to help you expand your knowledge makes everyone feel good. As you talk to others about their career paths, you'll gain insights not only into how to land the jobs you want, but also into which traits or behaviors correspond to ending up in situations you'd rather avoid. - -For example, the list of key traits for a junior role might look like this: - -### Technical: - -- Experience with CI, Jenkins preferred - -- Strong scripting background in Python and Ruby - -- Familiarity with Eclipse IDE - -- Basic Git and Bash - -### Personal: - -- Self-directed learner - -- Clear communication and documentation skills - -- Experience working on a multi-person development team ("team player") - -- Familiarity with issue tracker workflow - -### Apply anyway - -Remember, you don't have to meet every single criterion listed in a job description to get an interview. - -The job description describes whoever left the role, and if you start out knowing everything you've likely signed yourself up for a few years that don't challenge or expand your skill set. If you're nervous about missing a particular technology on the list, do some research into it to see whether comparable skills from another experience would apply. For example, someone who's never used [Jenkins][1] might still understand the principles of continuous integration testing from working on a project that uses [Buildbot][2] or [Travis CI][3]. - -If you're applying at a larger company, they probably have an entire department and comprehensive screening process to make sure they don't hire any candidate unable to succeed in a role. That means it's your job to apply and their job to decide whether to reject you. Don't prematurely reject yourself from the job by refusing to apply. - -Now you have an idea of what job you want and what skills you'll need to impress your interviewers. The next steps to take will vary based on how much experience you've already got. - -### Tailoring existing involvement - -Start by making a list of all the projects you've been involved with in the past few years. One way to get a quick list of things you've worked on lately is to navigate to the **Repositories** tab of your GitHub profile and filter the list by clicking on **Forks**. Additionally, look down your [Organizations][4] list for places you might have been engaging in leadership roles. If you already have a resume, make sure you've included everything from these lists under experience. - -Consider any IRC channel where you have special permissions as a potential leadership experience. Check your Meetup and Eventbrite accounts and add any events that you organize or volunteer at to your list. Skim your calendar for the past year and note any volunteering, mentoring, or public speaking engagements. - -Now for the hard part: Map the list of required skills onto the list of experiences. I like to assign a letter or number to each trait needed for the job, then mark the same symbol next to every piece of experience or involvement where you demonstrated the trait. When in doubt, claim it anyway—your problem is more likely a reluctance to brag than actual incompetence. - -This is the point in the process at which resume writers are often fettered by reluctance to risk overselling their own skills. It often helps to re-frame the question as: "Did someone who organized a meetup show leadership and planning skills?" Rather than: "Did I personally show these skills when I organized that meetup?". - -If you've been sufficiently thorough at figuring out where your free time has gone for the past year or two and you code a lot, you might now be facing a surprising problem: Too many items to fit on a single-page resume! If anything on your list of experiences didn't demonstrate any of the skills you're trying to showcase, cross it off. If an item demonstrates few skills and you don't have any stories that you enjoy telling about it, cross it off. If this abridged list of things you've done still won't fit in the format of a resume, prioritize the experiences from which you gained a relevant story or extensive experience with a desired technology. - -At this point, it should be obvious if you need a better piece of experience to hone a particular skill. Consider using an issue aggregator like OpenHatch to find an open source project where you build and practice your skills with the tool or technology that you're missing. - -### Make your resume beautiful - -A resume's beauty comes from conciseness, clarity, and layout. Each piece of experience should be accompanied by enough information for a reader to immediately know why you included it, but no more. Each type of information should be formatted consistently throughout the document—it's distracting to have some dates italicized or right-aligned and others not. - -Typeset your resume using a tool that makes these goals easy to achieve. I enjoy using [LaTeX][5], since its macro system makes visual consistency easy and most interviewers recognize it immediately. Your tool of choice might be [LibreOffice][6] or HTML, depending on your skills and how you want to distribute your resume. - -Remember that a digitally submitted resume might be scanned for keywords, so it can help to use the same acronyms as the job posting when describing your experiences. To make your resume easy for your interviewer to use, place the most important information first. - -Coders often struggle to quantify balance and layout when typesetting a document. My favorite technique for stepping back and assessing whether my document's whitespace is in the right place is to fullscreen the PDF or print it out, then look at it in a mirror. If you're using LibreOffice Writer, save a copy of your resume then change the font to that of a language you can't read. Both of these techniques forcibly pull you out of reading the content, and allow you to see the overall layout of the document in a new light. They take you from a "That sentence is poorly worded!" critique to noticing things like "It looks funny to have only a single word on that line." - -Finally, double check that your resume displays correctly in the media where it will be seen. If you're distributing it as a web page, test it at different screen widths in multiple browsers. If it's a PDF, open it on your phone or a friend's computer to make sure all the fonts it needs are available. - -### Next steps - -Finally, don't let the content that you worked so hard on for your resume go to waste! Mirror it to your LinkedIn account—complete with the buzzwords from the job posting—and don't be surprised if recruiters start reaching out to you. Even if the jobs they're describing aren't a good fit right now, you can leverage their time and interest to get feedback on what's working well about your resume and what isn't. - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/2/add-open-source-to-your-resume - -作者:[edunham][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/edunham -[1]: https://jenkins-ci.org/ -[2]: http://buildbot.net/ -[3]: https://travis-ci.org/ -[4]: https://github.com/settings/organizations -[5]: https://www.latex-project.org/ -[6]: https://www.libreoffice.org/download/libreoffice-fresh/ diff --git a/translated/tech/20160225 How to add open source experience to your resume.md b/translated/tech/20160225 How to add open source experience to your resume.md new file mode 100644 index 0000000000..234038f878 --- /dev/null +++ b/translated/tech/20160225 How to add open source experience to your resume.md @@ -0,0 +1,56 @@ +怎样将开源经历添加到你的简历中去 +================================================== +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/lightning-test.png?itok=aMceg0Vg) +在这篇文章中,我将会分享我的一些方法,目的是让你因为曾经为开源事业作出贡献的经历使得你在技术领域的求职中脱颖而出。 +凡事预则立,不预则废。在你即将进入一个新的领域或者正准备花费整个晚上来彻底完善你的简历之前,先来定义你正在寻找的工作的特征是值得的。你的简历是一张有说服力的作品,因此你必须了解你的观众,从而让它发挥出所有的潜力。看你简历的可能是任何需要你的技能并且恰好能在预算之内聘用你的人。当编辑简历的时候,读一读你的简历上的内容,同时想象一下它们最应该被书写的位置。你看起来像是一个你将会聘用的候选人吗? + +在我看来,我发现对于我所要求的目标职位的所有理想候选人,针对他们每个人的特点列出一张清单有时候是很有帮助的。我将他们每个人的特点清单合并到他们的个人经历中,并阅读工作记录,然后以同样的角色询问同事们。人际关系网和会议是很好的地方去寻求一些乐意提供这种建议的人。一些人喜欢谈论他们自己,并且邀请他们去讲述他们自己的故事的一部分来帮助你去拓展你的知识面,通过这样方式可以使每个人感觉更好。当你和其他人谈论他们的职业路线时,你不仅将会明白怎样去得到你想要从事的工作,而且还能知道你应该避免哪些容易让你失去工作机会的情况和行为。 +例如,对于一个差劲的角色,有关于他的关键特性列表可能看起来像下面这样: +###技术: +- 拥有计算机从业方面的经验,更加容易受到Jenkins的青睐。 +- 深厚的脚本编写背景,如Python和Ruby +- 精通eclipse的使用 +- 基本的git和bash知识 +###个人而言: +- 自我学习者 +- 良好的交流和文档技巧 +- 在团队开发方面富有经验 +- 精通事件捕捉工作流 +###以任意方式应用 +记住,你没有必要为了得到一份工作而去满足上面的工作描述列表中列出的每个标准。工作细节描述了任何人都可以离开这个角色,如果你已经知道你即将签约并为之工作几年的公司的全部信息,并且这份工作并不会让你觉得有什么挑战性,或者要求你去拓展你你的技能。如果你对你无法满足清单上的技能列表而感到紧张,那么检查一下自己是否有来自其他经历并能与之媲美的技能。 +例如,即使有些人从来没有使用过Jenkins,那他也可能从之前使用过Buildbot或者travis CI的项目经验中明白持续集成测试的原则。 +如果你正在申请一家大型公司,而他们可能拥有一个专门的部门和一套完整的筛选过程来确保他们不会聘用任何不能胜任职位的候选人。也就是说,在你求职的过程中,你所能做的只是提交申请,而决定是否拒绝你是公司管理层的工作。不要过早的将工作拒之门外。 +现在你已经知道了你的任务是什么,并且还知道你将需要哪些技能去完成这次面试。下一步要做的取决与你已经获取到的经验。 +### 制造已经存在的事物之间的关联 +列出一张你过去几年曾经参与过的所有项目。下面是一条快速得到这张清单的方式,生成一个跳转到你的github上的库的导航器,但是需要过滤掉你从其他地方复制过来的项目。除此之外,检查下你的清单上是否有曾经处于领导地位的项目。如果你已经有了一份简历,那么请确保你已经将你所有的经历都列在了上面。 +考虑下任何一个你曾经作为一个潜在的领导经历并拥有过特权的IRC项目。检查你的会唔和聚会并将你曾经组织过或者作为志愿者参与过的事情添加到你的清单上面。略过你前几年的日程并且标注所有志愿行动或者有作为导师的经历又或者有接触过的公共演讲. +现在进入了比较艰难的环节了,将清单上列出的必备技能与个人经历列表上的内容一一对照,我喜欢给工作需要的每个特性用一个字母或者数字作为标记,然后在每一段你经历或参与过并表现出了某一特性的地方标记相同的符号。当你产生怀疑的时候,无论如何也要加上它,尽管这样做更像是在吹嘘,但也好过显示出你的无能。 +在我们写简历的时候常常被这样的情况所困扰,就是我们不愿冒着过分吹嘘自己的技能的风险。这通常会帮助我们重新考虑这个问题,比如我们会考虑那些组织了会晤的人会表现出更好的领导才能和计划技巧吗?而不是当我组织这个会晤的时候我是否展示出了这些技巧。 +如果你已经充分了解了你在过去的几年里的业余时间都是怎么度过的或者你写了很多代码,那么你可能现在正面临着一个令人奇怪的问题,你已经拥有了太多的经验以至于一张纸的简历已经无法容纳下这些经验了。那么,如果那些列在你的清单上的经验无法证明你尝试去表现的任何技能的话,那么请扔掉它们吧。如果这份已经被缩短的简历清单上的内容仍然超过一张单页纸的容量的话,那么将你的经验按照一定的优先级排序,例如根据你获得了相关的故事或丰富的经验与所需的技术。 +在这一方面,显而易见,如果你想要磨练一个独特的技能,那么你就需要一个不错的经历。考虑使用一个类似OpenHatch的问题聚合器,并用它来寻找一个通过使用你从没使用过的工具和技术来锻炼你的技能的开源项目。 +让你的简历更加漂亮 +一份简历是否美观取决于它的简洁度,清晰度和布局。每一段经历都应该通过足够的信息来展示给读者并让他们立刻就能明白为什么你要将它包含进去,而且恰到好处。每种类型的信息都应该使用一致的文档格式来表示,一份含有斜体格式或者右对齐格式的或者其他与整体风格不协调的数据绝对会让看的人十分反感。 +使用工具来给你的简历排版会使之前设定的目标更加容易实现。我喜欢使用LaTeX,因为它 +的宏系统能够使可视化一致性变得更加容易,并且大量的面试官都能一眼就认出他。你的工具的选择可能是LibreOffice或者HTML,这取决于你的技能和你希望怎样去发布你的简历。 +记住一点,一份以数字方式提交的简历可以通过关键字被浏览到。因此,当你需要描述你的工作经历的时候使用和工作招聘告示一样的英文缩写对你的求职会有很大的帮助。为了让你的简历更加容易被面试官所使用,首先就要放上最重要的信息。 +程序员通常难以在为文档排版时量化平衡和布局。我最喜欢的技术是回退并评估我的文档的空格是否处于正确的位置,而这样做的目的就是我的PDF可以全屏显示或者打印出来,然后 +在镜像里面查看它。如果你正在使用LibreOffice Writer,保存一份你的简历的副本,然后将你的简历中的字体换成一种你无法阅读的语言。这两种技术都强制将你从阅读的内容中脱离出来,让你以一种新的方式查看文档的整体布局。他们把你从一个”那句话措辞不当!”对注意到的事物的批评,比如“在这条线上只有一个字,看起来很有趣”。 +最后,再次检查你的简历是否在它将要的展示的多媒体上看起来完全正确。如果你以网页的形式发布它,那么在不同屏幕大小的浏览器中测试它的效果。如果它是一份PDF文档,那么在你的手机或者你的朋友的电脑上面打开它,并确保它所需要的字体都是可用的。 +接下来的步骤 +最后,不要让你辛苦做出来的简历被浪费了,利用你的LinkedIn帐号把它做成一个镜像。当招聘人员找到你的时候也不要感到奇怪。尽管他们描述的工作内容并不是恰好适合你,但是你可以利用他们的时间和兴趣来得到关于你的简历中有哪些地方好与不好的反馈信息。 +-------------------------------------------------------------------------------- +via: https://opensource.com/business/16/2/add-open-source-to-your-resume + +作者:[edunham][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/edunham +[1]: https://jenkins-ci.org/ +[2]: http://buildbot.net/ +[3]: https://travis-ci.org/ +[4]: https://github.com/settings/organizations +[5]: https://www.latex-project.org/ +[6]: https://www.libreoffice.org/download/libreoffice-fresh/ From d756dfb5f16c36a9b09c894647e5efae50ebd1f8 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 21 Apr 2016 06:27:08 +0800 Subject: [PATCH 1273/1710] PUB:20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting @runningwater --- ...isk in Linux CentOS 7 Without Rebooting.md | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) rename {translated/tech => published}/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md (77%) diff --git a/translated/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md b/published/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md similarity index 77% rename from translated/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md rename to published/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md index adfb7f556f..cc4d031bc1 100644 --- a/translated/tech/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md +++ b/published/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md @@ -1,11 +1,11 @@ -如何在CentOS 7 中添加新磁盘而不用重启系统 +如何在 CentOS 7 中添加新磁盘而不用重启系统 ================================================================================ -对大多数系统管理员来说扩充 Linux 服务器的磁盘空间是日常的工作之一。因此这篇文章会在通过使用 Linux 命令,在 CentOS 7 系统上演示一些简单的操作步骤来扩充您的磁盘空间而不需要重启您的生产服务器。关于扩充和增加新的磁盘到 Linux 系统,我们会提及多种方法和多种可行性,所以可按您所需选择最适用的一种。 +对大多数系统管理员来说扩充 Linux 服务器的磁盘空间是日常的工作之一。因此这篇文章会通过使用 Linux 命令,在 CentOS 7 系统上演示一些简单的操作步骤来扩充您的磁盘空间而不需要重启您的生产服务器。关于扩充和增加新的磁盘到 Linux 系统,我们会提及多种方法和多种可行性,可按您所需选择最适用的一种。 -### 1. 为虚拟机客户端扩充磁盘空间: ### +### 1. 在虚拟机客户端扩充磁盘空间: ### -在为 Linux 系统增加磁盘卷之前,您需要添加一块新的物理磁盘或是从正使用的 VMware vShere、工作站或着其它的基础虚拟环境软件中进行设置,从而扩充一块系统正使用的虚拟磁盘空间。 +在为 Linux 系统增加磁盘卷之前,您首先需要添加一块新的物理磁盘,或在 VMware vShere、VMware 工作站以及你使用的其它虚拟环境软件中进行设置来增加一块虚拟磁盘的容量。 ![Increase disk](http://blog.linoxide.com/wp-content/uploads/2016/02/1.png) @@ -22,7 +22,7 @@ ### 3. 扩展空间而无需重启虚拟机 ### -现在运行如下命令就可以来扩展操作系统的物理卷磁盘空间,而且不需要重启虚拟机,系统会重新扫描 SCSI (注:Small Computer System Interface 小型计算机系统接口)总线并添加 SCSI 设备。 +现在运行如下命令,通过重新扫描 SCSI (注:Small Computer System Interface 小型计算机系统接口)总线并添加 SCSI 设备,系统就可以扩展操作系统的物理卷磁盘空间,而且不需要重启虚拟机。 # ls /sys/class/scsi_host/ # echo "- - -" > /sys/class/scsi_host/host0/scan @@ -35,7 +35,7 @@ # echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan # echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan -如下图所示,会重新扫描 SCSI 总线,随后我们从虚拟机客户端设置的磁盘大小会正常显示。 +如下图所示,会重新扫描 SCSI 总线,随后我们在虚拟机客户端设置的磁盘大小会正常显示。 ![Rescan disk device](http://blog.linoxide.com/wp-content/uploads/2016/02/3.png) @@ -85,7 +85,7 @@ ### 5. 创建物理卷: ### -根据提示运行 'partprob' 或 'kpartx' 命令以使分区表被真正使用,然后使用如下的命令来创建新的物理卷。 +根据上述提示,运行 'partprob' 或 'kpartx' 命令以使分区表生效,然后使用如下的命令来创建新的物理卷。 # partprobe # pvresize /dev/sda3 @@ -107,7 +107,7 @@ # xfs_growfs /dev/mapper/centos-root -'/' 分区的大小已经成功的增加了,可以使用 'df' 命令来检查您磁盘驱动的大小。如图示。 +'/' 分区的大小已经成功的增加了,可以使用 'df' 命令来检查您磁盘驱动器的大小。如图示。 ![Increase disk space](http://blog.linoxide.com/wp-content/uploads/2016/02/3C.png) @@ -129,7 +129,7 @@ # echo "- - -" > /sys/class/scsi_host/host1/scan # echo "- - -" > /sys/class/scsi_host/host2/scan -列出您的 SCSI 设备的名称 +列出您的 SCSI 设备的名称: # ls /sys/class/scsi_device/ # echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/rescan @@ -139,7 +139,7 @@ ![Scanning new disk](http://blog.linoxide.com/wp-content/uploads/2016/02/3F.png) -一旦新增的磁盘可见就可以运行下面的命令来创建新的物理卷,然后增加到卷组,如下示。 +一旦新增的磁盘可见,就可以运行下面的命令来创建新的物理卷,然后增加到卷组,如下示。 # pvcreate /dev/sdb # vgextend centos /dev/sdb @@ -157,16 +157,15 @@ ### 结论: ### -在 Linux CentOS 7 系统上,使用这篇文章所述的操作步骤来扩充您的任意逻辑卷的磁盘空间,此管理磁盘分区的操作过程是非常简单的。您不需要重启生产线上的服务器,只是简单的重扫描下 SCSI 设备,和扩展您想要的 LVM(逻辑卷管理)。我们希望这文章对您有用。可自由的发表有用的评论和建议。 +在 Linux CentOS 7 系统上管理磁盘分区的操作过程是非常简单的,可以使用这篇文章所述的操作步骤来扩充您的任意逻辑卷的磁盘空间。您不需要重启生产线上的服务器,只是简单的重扫描下 SCSI 设备,和扩展您想要的 LVM(逻辑卷管理)。我们希望这文章对您有用。请随意的发表有用的评论和建议。 -------------------------------------------------------------------------------- via: http://linoxide.com/linux-how-to/add-new-disk-centos-7-without-rebooting/ 作者:[Kashif S][a] -译者:[runningwater](https://github.com/runningwater -) -校对:[校对者ID](https://github.com/校对者ID) +译者:[runningwater](https://github.com/runningwater) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From afd71510e1f3bca5b8a45cf48d2ec2083d44b268 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 Apr 2016 19:21:39 +0800 Subject: [PATCH 1274/1710] PUB:20160226 How to use Python to hack your Eclipse IDE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Vic020 翻译的有点随意。 --- ... to use Python to hack your Eclipse IDE.md | 209 +++++++++++++++++ ... to use Python to hack your Eclipse IDE.md | 215 ------------------ 2 files changed, 209 insertions(+), 215 deletions(-) create mode 100644 published/20160226 How to use Python to hack your Eclipse IDE.md delete mode 100644 translated/tech/20160226 How to use Python to hack your Eclipse IDE.md diff --git a/published/20160226 How to use Python to hack your Eclipse IDE.md b/published/20160226 How to use Python to hack your Eclipse IDE.md new file mode 100644 index 0000000000..ab2e21d5fa --- /dev/null +++ b/published/20160226 How to use Python to hack your Eclipse IDE.md @@ -0,0 +1,209 @@ +用 Python 打造你的 Eclipse +============================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/lightbulb_computer_person_general_.png?itok=ZY3UuQQa) + +Eclipse 高级脚本环境([EASE][1])项目虽然还在开发中,但是必须要承认它非常强大,它让我们可以快速打造自己的Eclipse 开发环境。 + +依据 Eclipse 强大的框架,可以通过其内建的插件系统全方面的扩展 Eclipse。然而,编写和部署一个新的插件还是十分麻烦,即使你只是需要一个额外的小功能。不过,现在依托于 EASE,你可以不用写任何一行 Java 代码就可以方便的做到这点。EASE 是一种使用 Python 或者 Javascript 这样的脚本语言自动实现这些功能的平台。 + +本文中,根据我在今年北美的 EclipseCon 大会上的[演讲][2],我将介绍如何用 Python 和 EASE 设置你的 Eclipse 环境,并告诉如何发挥 Python 的能量让你的 IDE 跑的飞起。 + +### 安装并运行 "Hello World" + +本文中的例子使用 Python 的 Java 实现 Jython。你可以将 EASE 直接安装到你已有的 Eclipse IDE 中。本例中使用[Eclipse Mars][3],并安装 EASE 环境本身以及它的模块和 Jython 引擎。 + +使用 Eclipse 安装对话框(`Help>Install New Software`...),安装 EASE[http://download.eclipse.org/ease/update/nightly][4], + +选择下列组件: + +- EASE Core feature +- EASE core UI feature +- EASE Python Developer Resources +- EASE modules (Incubation) + +这会安装 EASE 及其模块。这里我们要注意一下 Resource 模块,此模块可以访问 Eclipse 工作空间、项目和文件 API。 + +![](https://opensource.com/sites/default/files/1_installease_nightly.png) + +成功安装后,接下来安装 EASE Jython 引擎 [https://dl.bintray.com/pontesegger/ease-jython/][5] 。完成后,测试下。新建一个项目并新建一个 hello.py 文件,输入: + +``` +print "hello world" +``` + +选中这个文件,右击并选择“Run as -> EASE script”。这样就可以在控制台看到“Hello world”的输出。 + +现在就可以编写 Python 脚本来访问工作空间和项目了。这种方法可以用于各种定制,下面只是一些思路。 + +### 提升你的代码质量 + +管理良好的代码质量本身是一件非常烦恼的事情,尤其是当需要处理一个大型代码库或者要许多工程师参与的时候。而这些痛苦可以通过脚本来减轻,比如批量格式化一些文件,或者[去掉文件中的 unix 式的行结束符][6]来使得在 git 之类的源代码控制系统中比较差异更加容易。另外一个更好的用途是使用脚本来生成 Eclipse markers 以高亮你可以改善的代码。这里有一些示例脚本,你可以用来在 java 文件中所有找到的“printStackTrace”方法中加入task markers 。请看[源码][7]。 + +拷贝该文件到工作空间来运行,右击并选择“Run as -> EASE script”。 + +``` +loadModule('/System/Resources') + +from org.eclipse.core.resources import IMarker + +for ifile in findFiles("*.java"): + file_name = str(ifile.getLocation()) + print "Processing " + file_name + with open(file_name) as f: + for line_no, line in enumerate(f, start=1): + if "printStackTrace" in line: + marker = ifile.createMarker(IMarker.TASK) + marker.setAttribute(IMarker.TRANSIENT, True) + marker.setAttribute(IMarker.LINE_NUMBER, line_no) + marker.setAttribute(IMarker.MESSAGE, "Fix in Sprint 2: " + line.strip()) + +``` + +如果你的 java 文件中包含了 printStackTraces,你就可以看见任务视图和编辑器侧边栏上自动新加的标记。 + +![](https://opensource.com/sites/default/files/2_codequality.png) + +### 自动构建繁琐任务 + +当同时工作在多个项目的时候,肯定需要完成许多繁杂、重复的任务。可能你需要在所有源文件头上加入版权信息,或者采用新框架时候自动更新文件。例如,当首次切换到 Tycho 和 Maven 的时候,我们需要 giel每个项目添加 pom.xml 文件。使用几行 Python 代码可以很轻松的完成这个任务。然后当 Tycho 支持无 pom 构建后,我们需要移除不要的 pom 文件。同样,几行代码就可以搞定这个任务,例如,这里有个脚本可以在每一个打开的工作空间项目上加入 README.md。请看源代码 [add_readme.py][8]。 + +拷贝该文件到工作空间来运行,右击并选择“Run as -> EASE script”。 + +``` +loadModule('/System/Resources') + +for iproject in getWorkspace().getProjects(): + if not iproject.isOpen(): + continue + + ifile = iproject.getFile("README.md") + + if not ifile.exists(): + contents = "# " + iproject.getName() + "\n\n" + if iproject.hasNature("org.eclipse.jdt.core.javanature"): + contents += "A Java Project\n" + elif iproject.hasNature("org.python.pydev.pythonNature"): + contents += "A Python Project\n" + writeFile(ifile, contents) +``` + +脚本运行的结果会在每个打开的项目中加入 README.md,java 和 Python 的项目还会自动加上一行描述。 + +![](https://opensource.com/sites/default/files/3_tedioustask.png) + +### 构建新功能 + +你可以使用 Python 脚本来快速构建一些急需的功能,或者做个原型给团队和用户演示你想要的功能。例如,一个 Eclipse 目前不支持的功能是自动保存你正在工作的文件。即使这个功能将会很快提供,但是你现在就可以马上拥有一个能每隔 30 秒或处于后台时自动保存的编辑器。以下是主要方法的片段。请看下列代码:[autosave.py][9]。 + +``` +def save_dirty_editors(): + workbench = getService(org.eclipse.ui.IWorkbench) + for window in workbench.getWorkbenchWindows(): + for page in window.getPages(): + for editor_ref in page.getEditorReferences(): + part = editor_ref.getPart(False) + if part and part.isDirty(): + print "Auto-Saving", part.getTitle() + part.doSave(None) +``` + +在运行脚本之前,你需要勾选 'Allow Scripts to run code in UI thread' 设定,这个设定在 Window > Preferences > Scripting 中。然后添加该脚本到工作空间,右击并选择“Run as > EASE Script”。每次编辑器自动保存时,控制台就会输出一个保存的信息。要关掉自动保存脚本,只需要点击控制台的红色方块的停止按钮即可。 + +![](https://opensource.com/sites/default/files/4_prototype.png) + +### 快速扩展用户界面 + +EASE 最棒的事情是可以将你的脚本与 IDE 界面上元素(比如一个新的按钮或菜单)结合起来。不需要编写 java 代码或者安装新的插件,只需要在你的脚本前面增加几行代码。 + +下面是一个简单的脚本示例,用来创建三个新项目。 + +``` +# name : Create fruit projects +# toolbar : Project Explorer +# description : Create fruit projects + +loadModule("/System/Resources") + +for name in ["banana", "pineapple", "mango"]: + createProject(name) +``` + +上述注释会专门告诉 EASE 增加了一个按钮到 Project Explorer 工具条。下面这个脚本是用来增加一个删除这三个项目的按钮的。请看源码 [createProjects.py][10] 和 [deleteProjects.py][11]。 + +``` +# name :Delete fruit projects +# toolbar : Project Explorer +# description : Get rid of the fruit projects + +loadModule("/System/Resources") + +for name in ["banana", "pineapple", "mango"]: + project = getProject(name) + project.delete(0, None) +``` + +为了使按钮显示出来,增加这两个脚本到一个新的项目,假如叫做 'ScriptsProject'。然后到 Windows > Preference > Scripting > Script Location,点击 'Add Workspace' 按钮并选择 ScriptProject 项目。这个项目现在会成为放置脚本的默认位置。你可以发现 Project Explorer 上出现了这两个按钮,这样你就可以通过这两个新加的按钮快速增加和删除项目。 + +![](https://opensource.com/sites/default/files/5_buttons.png) + +### 整合第三方工具 + +不管怎么说,你可能需要除了 Eclipse 生态系统以外的工具(这是真的,虽然 Eclipse 已经很丰富了,但是不是什么都有)。这些时候你会发现将他们包装在一个脚本来调用会非常方便。这里有一个简单的例子让你整合资源管理器,并将它加入到右键菜单栏,这样点击图标就可以打开资源管理器浏览当前文件。请看源码 [explorer.py][12]。 + +``` +# name : Explore from here +# popup : enableFor(org.eclipse.core.resources.IResource) +# description : Start a file browser using current selection +loadModule("/System/Platform") +loadModule('/System/UI') + +selection = getSelection() +if isinstance(selection, org.eclipse.jface.viewers.IStructuredSelection): + selection = selection.getFirstElement() + +if not isinstance(selection, org.eclipse.core.resources.IResource): + selection = adapt(selection, org.eclipse.core.resources.IResource) + +if isinstance(selection, org.eclipse.core.resources.IFile): + selection = selection.getParent() + +if isinstance(selection, org.eclipse.core.resources.IContainer): + runProcess("explorer.exe", [selection.getLocation().toFile().toString()]) +``` + +为了让这个菜单显示出来,像之前一样将该文件加入一个新项目,比如说 'ScriptProject'。然后到 Windows > Preference > Scripting > Script Locations,点击“Add Workspace”并选择 'ScriptProject' 项目。当你在文件上右击鼠标键,你会看到弹出菜单出现了新的菜单项。点击它就会出现资源管理器。(注意,这个功能已经出现在 Eclipse 中了,但是你可以在这个例子中换成其它第三方工具。) + +![](https://opensource.com/sites/default/files/6_explorer.png) + +Eclipse 高级基本环境 (EASE)提供一套很棒的扩展功能,使得 Eclipse IDE 能使用 Python 来轻松扩展。虽然这个项目还在早期,但是[关于这个项目][13]更多更棒的功能也正在加紧开发中,如果你想为它做出贡献,请到[论坛][14]讨论。 + +我会在 2016 年的 [Eclipsecon North America][15] 会议上发布更多 EASE 细节。我的演讲 [Scripting Eclipse with Python][16] 也会不单会介绍 Jython,也包括 C-Python 和这个功能在科学领域是如何扩展的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/how-use-python-hack-your-ide + +作者:[Tracy Miranda][a] +译者:[VicYu/Vic020](http://vicyu.net) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/tracymiranda +[1]: https://eclipse.org/ease/ +[2]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python +[3]: https://www.eclipse.org/downloads/packages/eclipse-ide-eclipse-committers-451/mars1 +[4]: http://download.eclipse.org/ease/update/nightly +[5]: https://dl.bintray.com/pontesegger/ease-jython/ +[6]: http://code.activestate.com/recipes/66434-change-line-endings/ +[7]: https://gist.github.com/tracymiranda/6556482e278c9afc421d +[8]: https://gist.github.com/tracymiranda/f20f233b40f1f79b1df2 +[9]: https://gist.github.com/tracymiranda/e9588d0976c46a987463 +[10]: https://gist.github.com/tracymiranda/55995daaea9a4db584dc +[11]: https://gist.github.com/tracymiranda/baa218fc2c1a8e898194 +[12]: https://gist.github.com/tracymiranda/8aa3f0fc4bf44f4a5cd3 +[13]: https://eclipse.org/ease/ +[14]: https://dev.eclipse.org/mailman/listinfo/ease-dev +[15]: https://www.eclipsecon.org/na2016 +[16]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python diff --git a/translated/tech/20160226 How to use Python to hack your Eclipse IDE.md b/translated/tech/20160226 How to use Python to hack your Eclipse IDE.md deleted file mode 100644 index 1bf132fe15..0000000000 --- a/translated/tech/20160226 How to use Python to hack your Eclipse IDE.md +++ /dev/null @@ -1,215 +0,0 @@ -用Python打造你的Eclipse -============================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/lightbulb_computer_person_general_.png?itok=ZY3UuQQa) - -Eclipse高级脚本环境([EASE][1])项目虽然还在开发中,但是不是不得承认它非常强大,让我们可以快速打造自己的Eclipse开发环境. - -依据Eclipse强大的框架,可以通过其内建的插件系统全方面的扩展Eclipse.然而,编写和部署一个新的插件还是十分笨重,即使只是需要一个额外的小功能。但是,现在依托EASE,可以方便实用Python或者Javascript脚本语言来扩展。 - -本文中,根据我在今年北美的EclipseCon大会上的[演讲][2],我介绍包括安装Eclipse的Python和EASE环境,并包括使用强力Python来增压你的IDE。 - -### 安装并运行 "Hello World" - -本文中的例子使用Java实现的Python解释,Jython。Eclipse可以直接安装EASE环境。本例中使用Eclipse[Mars][3],它已经自带了EASE环境,包和Jython引擎。 - -使用Eclipse安装对话框(`Help>Install New Software`...),安装EASE[http://download.eclipse.org/ease/update/nightly][4] - -选择下列组件: - -- EASE Core feature - -- EASE core UI feature - -- EASE Python Developer Resources - -- EASE modules (Incubation) - -包括了EASE和模组。但是我们比较关心Resource包,此包可以访问Eclipse工作空间,项目和文件API。 - -![](https://opensource.com/sites/default/files/1_installease_nightly.png) - - -成功安装后,接下来安装Jython引擎[https://dl.bintray.com/pontesegger/ease-jython/][5].完成后,测试下。新建一个项目并新建一个hello.py文件,输入: - -``` -print "hello world" -``` - -选中这个文件,右击,选中'Run as -> EASE script'.这样就可以在控制台看到"Hello world"的输出. - -配置完成,现在就可以轻松使用Python来控制工作空间和项目了. - -### 提升你的代码质量 - -管理良好的代码质量本身是一件非常烦恼的事情,尤其是当需要处理一个大量代码库和要许多工程师参与的时候.而这些痛苦可以通过脚本来减轻,比如大量文字排版,或者[去掉文件中的unix行结束符][6]来使更容易比较.其他很棒的事情包括使用脚本让Eclipse markers高亮代码.这里有一些例子,你可以加入到task markers ,用"printStackTrace"方法在java文件中探测.请看[源码][7] - -运行,拷贝文件到工作空间,右击运行. - -``` -loadModule('/System/Resources') -``` - -from org.eclipse.core.resources import IMarker - -``` -for ifile in findFiles("*.java"): - file_name = str(ifile.getLocation()) - print "Processing " + file_name - with open(file_name) as f: - for line_no, line in enumerate(f, start=1): - if "printStackTrace" in line: - marker = ifile.createMarker(IMarker.TASK) - marker.setAttribute(IMarker.TRANSIENT, True) - marker.setAttribute(IMarker.LINE_NUMBER, line_no) - marker.setAttribute(IMarker.MESSAGE, "Fix in Sprint 2: " + line.strip()) - -``` - -如果你的任何java文件中包含了printStackTraces,你就可以看见编辑器的侧边栏上自动加上的标记. - -![](https://opensource.com/sites/default/files/2_codequality.png) - -### 自动构建繁琐任务 - -当同时工作在多个项目的时候,肯定需要需要完成许多繁杂,重复的任务.可能你需要在所有源文件头上加入CopyRight, 或者采用新框架时候自动更新文件.例如,当从Tycho迁移到Maven时候,我们给每一个项目必须添加pom.xml文件.使用Python可以很轻松的完成这个任务.只从Tycho提供无pom构建后,我们也需要移除不要的pom文件.同样,只需要几行代码就可以完成这个任务.例如,这里有个脚本可以在每一个打开的工作空间项目上加入README.md.请看源代码[add_readme.py][8]. - -拷贝文件到工作空间,右击并选择"Run as -> EASE script" - -loadModule('/System/Resources') - -``` -for iproject in getWorkspace().getProjects(): - if not iproject.isOpen(): - continue - - ifile = iproject.getFile("README.md") - - if not ifile.exists(): - contents = "# " + iproject.getName() + "\n\n" - if iproject.hasNature("org.eclipse.jdt.core.javanature"): - contents += "A Java Project\n" - elif iproject.hasNature("org.python.pydev.pythonNature"): - contents += "A Python Project\n" - writeFile(ifile, contents) -``` - -脚本结果会在打开的项目中加入README.md,java和Python项目还会自动加上一行描述. - -![](https://opensource.com/sites/default/files/3_tedioustask.png) - -### 构建新功能 - -Python脚本可以快速构建一些需要的附加功能,或者给团队和用户快速构建demo.例如,一个现在Eclipse目前不支持的功能,自动保存工作的文件.即使这个功能将会很快提供,但是你现在就可以马上拥有一个能30秒自动保存的编辑器.以下是主方法的片段.请看下列代码:[autosave.py][9] - -``` -def save_dirty_editors(): - workbench = getService(org.eclipse.ui.IWorkbench) - for window in workbench.getWorkbenchWindows(): - for page in window.getPages(): - for editor_ref in page.getEditorReferences(): - part = editor_ref.getPart(False) - if part and part.isDirty(): - print "Auto-Saving", part.getTitle() - part.doSave(None) -``` - -在运行脚本之前,你需要勾选'Allow Scripts to run code in UI thread'设定,这个设定在Window > Preferences > Scripting中.然后添加脚本到工作空间,右击和选择"Run as > EASE Script".每10秒自动保存的信息就会在控制台输出.关掉自动保存脚本,只需要在点击控制台的红色方框. - -![](https://opensource.com/sites/default/files/4_prototype.png) - -### 快速扩展用户界面 - -EASE最棒的事情是可以通过脚本与UI元素挂钩,可以调整你的IDE,例如,在菜单中新建一个按钮.不需要编写java代码或者新的插件,只需要增加几行代码. - -下面是一个简单的基脚本示例,用来产生三个新项目. - -``` -# name : Create fruit projects -# toolbar : Project Explorer -# description : Create fruit projects - -loadModule("/System/Resources") - -for name in ["banana", "pineapple", "mango"]: - createProject(name) -``` - -上述特别的EASE增加了一个按钮到项目浏览工具条.下面这个脚本是用来删除这三个项目.请看源码[createProjects.py][10]和[deleteProjects.py][11]. - -``` -# name :Delete fruit projects -# toolbar : Project Explorer -# description : Get rid of the fruit projects - -loadModule("/System/Resources") - -for name in ["banana", "pineapple", "mango"]: - project = getProject(name) - project.delete(0, None) -``` - -为了使脚本启动生效按钮,增加脚本到'ScriptsProject'文件夹.然后选择Windows > Preference > Scripting > Script 中定位到文件夹.点击'Add Workspace'按钮和选择ScriptProject项目.这个项目现在将会在启动时默认加载.你可以发现Project Explorer上出现了这两个按钮,这样你就可以通过这两个按钮快速增加删除项目. - -![](https://opensource.com/sites/default/files/5_buttons.png) - -### 整合三方工具 - -无论何时,你可能需要除了Eclipse生态系统以外的工具.这些时候你会发将他们包装在一个脚本来调用会非常方便.这里有一个简单的例子让你整合explorer.exe,并加入它到右键菜单栏,这样点击图标就可以打开浏览器浏览当前文件.请看源码[explorer.py][12] - -``` -# name : Explore from here -# popup : enableFor(org.eclipse.core.resources.IResource) -# description : Start a file browser using current selection -loadModule("/System/Platform") -loadModule('/System/UI') - -selection = getSelection() -if isinstance(selection, org.eclipse.jface.viewers.IStructuredSelection): - selection = selection.getFirstElement() - -if not isinstance(selection, org.eclipse.core.resources.IResource): - selection = adapt(selection, org.eclipse.core.resources.IResource) - -if isinstance(selection, org.eclipse.core.resources.IFile): - selection = selection.getParent() - -if isinstance(selection, org.eclipse.core.resources.IContainer): - runProcess("explorer.exe", [selection.getLocation().toFile().toString()]) -``` - -为了让菜单显示增加,像之前一样加入'ScriptProject'.在文件上右击,你看弹出菜单是不是出现了图标.选择Explore from here. - -![](https://opensource.com/sites/default/files/6_explorer.png) - -Eclipse高级基本环境提供一套很棒的扩展功能,使得Eclipse IDE能使用Python来轻易扩展.虽然这个项目还在婴儿期,但是[关于这个项目][13]更多更棒的功能也正在加紧开发中,如果你想为这个贡献,请到[论坛][14]讨论. - -2016年[Eclipsecon North America][15]会议将会发布更多EASE细节.我的演讲[Scripting Eclipse with Python][16]也会不单介绍Jython,也包括C-Python和其他功能性扩展的实战例子. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/2/how-use-python-hack-your-ide - -作者:[Tracy Miranda][a] -译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/tracymiranda -[1]: https://eclipse.org/ease/ -[2]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python -[3]: https://www.eclipse.org/downloads/packages/eclipse-ide-eclipse-committers-451/mars1 -[4]: http://download.eclipse.org/ease/update/nightly -[5]: https://dl.bintray.com/pontesegger/ease-jython/ -[6]: http://code.activestate.com/recipes/66434-change-line-endings/ -[7]: https://gist.github.com/tracymiranda/6556482e278c9afc421d -[8]: https://gist.github.com/tracymiranda/f20f233b40f1f79b1df2 -[9]: https://gist.github.com/tracymiranda/e9588d0976c46a987463 -[10]: https://gist.github.com/tracymiranda/55995daaea9a4db584dc -[11]: https://gist.github.com/tracymiranda/baa218fc2c1a8e898194 -[12]: https://gist.github.com/tracymiranda/8aa3f0fc4bf44f4a5cd3 -[13]: https://eclipse.org/ease/ -[14]: https://dev.eclipse.org/mailman/listinfo/ease-dev -[15]: https://www.eclipsecon.org/na2016 -[16]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python From 4b832efeff0bf90f06a6f625cd7ef4a38769311f Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 25 Apr 2016 23:12:44 +0800 Subject: [PATCH 1275/1710] Create 20151207 5 great Raspberry Pi projects for the classroom.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 请校对 --- ...Raspberry Pi projects for the classroom.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md diff --git a/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md b/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md new file mode 100644 index 0000000000..6c86172f7a --- /dev/null +++ b/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md @@ -0,0 +1,94 @@ +5 个很适合在课堂上演示的树莓派项目 +===================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png?itok=fSUS0fIt) + +### 1. 我的世界: Pi + +![](https://opensource.com/sites/default/files/lava.png) +>Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1]. + +我的世界是世界上很多青少年最喜欢的一个游戏,而且他也是目前最能激发年轻人创造力的一款游戏。这个树莓派版上自带的我的世界不仅仅是一个具有创造性的建筑游戏,他还是一个具有编程接口、可以通过 Python 与之交互的版本。 + +我的世界:Pi 版对于老师来说是一个非常好的教授学生解决问题和编写代码完成任务的途径。你可以使用 Python API 创建一个房子,并且一直跟随这你的脚步移动,当你需要桥梁的时候给你建造一座桥,让老天呀下雨,显示天空的温度,以及其它你可以想象到的一切东西。 + +详情请见 "[Getting Started with Minecraft Pi][2]." + +### 2. 反应游戏和交通灯 + +![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg) +>源于 [Low Voltage Labs][3]. [CC BY-SA 4.0][1]. + +使用树莓派可以很轻松的进行物理计算——只需要连接几个 LED 和按钮到 开发板上的 GPIO 接口,再用几行代码你就可以按下按钮来开灯。一旦你指导了如何使用代码来做这些基本的东西,接下来就可以根据你的想象来做其它事情了。 + +如果你知道如何让一个灯闪烁,你就可以让三个灯开始闪烁。挑选三个和交通灯一样颜色的 LED 灯,然后编写控制交通灯的代码。如果你知道如何使用按钮触发实践,那么你就可以模拟行人过马路。同时你可以参考其它已经完成的交通灯附件,比如[PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6],等等。 + +代码并不是全部——这些联系只是让你理解真是世界里使如何完成这些事的。计算思维是一个在你一生中都会很有用的技能。 + +![](https://opensource.com/sites/default/files/reaction-game.png) +>源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. + + +接下来试着接通两个按钮和 LED 灯的电源,实现一个反应游戏 —— 让 LED 灯随机的点亮,然后看是最先按下按钮。 + + +要想了解更多可以看看 [GPIO Zero recipes][7]。你所需要的资料都可以在 [CamJam EduKit 1][8] 找到。 + +### 3. 电子宠物 + +Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是你并没有错过亲手把玩这个硬件的机会。Sense HAT 是 Astro Pi 的一个传感器扩展板,现在已经开放购买了。你可以使用它来进行数据搜集,科学实验,游戏和其它很多事。可以看看下面树莓派的 Carrie Anne 拍摄的 Gurl Geek Diaries 的视频,里面演示了一种很棒的入门途径——给生活添加一个你自己创造的生动的像素宠物: + +[video](https://youtu.be/gfRDFvEVz-w) + +>详见 "[探索 Sense HAT][9]." + +### 4. 红外鸟笼 + +![](https://opensource.com/sites/default/files/ir-bird-box.png) +>源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. + +让整个班级都可以参与进来的好主意是在鸟笼立方一个树莓派和夜视镜头,以及一些红外线灯,这样子你就可以在黑暗中看见鸟笼里的情况了,然后使用树莓派通过网络串流视频。然后就可以等待小鸟归笼了,你可以在不干扰小鸟习惯的情况下观察他们了。 + +要了解更多有关红外线和光谱的知识,以及如何调校摄像头和使用软件控制摄像头,可以访问 [Make an infrared bird box][10]。 + + + +### 5. 机器人 + +![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg) +>源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. + +只需要一个树莓派和很少几个电机和电机控制器,你就可以制作一个你自己的机器人。你可以制作的机器人有很多种,从简单的由几个轮子和自制底盘拼凑小车,到由游戏控制器驱动的、具有自我意识、配备了传感器、装配了摄像头的金属种马。 + +要学习如何控制不同的电机,可以使用 RTK 电机驱动开发板入门或者使用配置了电机、轮子和传感器的 CamJam 机器人开发套件——具有很大的价值和大量的学习潜力——深入学习。 + +或者,如果你还想了解更多核心内容,可以试试 PiBorg 的 [4Borg][11] 和 [DiddyBorg][12],或者购买 Metal 版 DoodleBorg ,然后构建一个最小版本的 [DoodleBorg tank][13]。 + +详情可见 [机器人装备表][14]。 + + +------------------------------------------------------------------------------ + +via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom + +作者:[Ben Nuttall][a] +译者:[ezio](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/bennuttall +[1]: https://creativecommons.org/licenses/by-sa/4.0/ +[2]: https://opensource.com/life/15/5/getting-started-minecraft-pi +[3]: http://lowvoltagelabs.com/ +[4]: http://lowvoltagelabs.com/products/pi-traffic/ +[5]: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390 +[6]: https://ryanteck.uk/hats/1-traffichat-0635648607122.html +[7]: http://pythonhosted.org/gpiozero/recipes/ +[8]: http://camjam.me/?page_id=236 +[9]: https://opensource.com/life/15/10/exploring-raspberry-pi-sense-hat +[10]: https://www.raspberrypi.org/learning/infrared-bird-box/ +[11]: https://www.piborg.org/4borg +[12]: https://www.piborg.org/diddyborg +[13]: https://www.piborg.org/doodleborg +[14]: http://camjam.me/?page_id=1035#worksheets From 092ee100c8cc2ec3a51c58cc1a90ebd15884ef48 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 26 Apr 2016 23:42:21 +0800 Subject: [PATCH 1276/1710] [translating]7 Steps to Start Your Linux SysAdmin Career --- ...0160218 7 Steps to Start Your Linux SysAdmin Career.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md index 60b8f7fc75..df4989eba9 100644 --- a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md +++ b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md @@ -1,9 +1,11 @@ +alim0x translating + 7 Steps to Start Your Linux SysAdmin Career =============================================== Linux is hot right now. Everybody is looking for Linux talent. Recruiters are knocking down the doors of anybody with Linux experience, and there are tens of thousands of jobs waiting to be filled. But what if you want to take advantage of this trend and you’re new to Linux? How do you get started? -1. Install Linux +1. Install Linux It should almost go without saying, but the first key to learning Linux is to install Linux. Both the LFS101x and the LFS201 courses include detailed sections on installing and configuring Linux for the first time. @@ -43,7 +45,7 @@ Linux is hot right now. Everybody is looking for Linux talent. Recruiters are kn - [https://forums.opensuse.org/forum.php](https://forums.opensuse.org/forum.php) - - [http://wiki.centos.org/Documentation](http://wiki.centos.org/Documentation) + - [http://wiki.centos.org/Documentation](http://wiki.centos.org/Documentation) 7. Learn To Love The Documentation @@ -64,5 +66,3 @@ via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps- 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:linux.com - - From 8bf56f8751173c30d9f3d1a4350513decc93e5fc Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 Apr 2016 05:58:00 +0800 Subject: [PATCH 1277/1710] PUB:20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 通过而不发布(过期) --- ...Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/news => published}/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md (100%) diff --git a/translated/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md b/published/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md similarity index 100% rename from translated/news/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md rename to published/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md From d7d07724a23b265a55219e5f64856d39556a640e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 Apr 2016 05:58:54 +0800 Subject: [PATCH 1278/1710] =?UTF-8?q?=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ith Extensive File Control Capabilities.md | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 sources/news/20160415 ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities.md diff --git a/sources/news/20160415 ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities.md b/sources/news/20160415 ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities.md deleted file mode 100644 index 6249163578..0000000000 --- a/sources/news/20160415 ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities.md +++ /dev/null @@ -1,32 +0,0 @@ -ownCloud 9.0 Enterprise Edition Arrives with Extensive File Control Capabilities -================================================================================== - ->ownCloud, Inc. has had the great pleasure of [announcing][1] the availability of the Enterprise Edition (EE) of its powerful ownCloud 9.0 self-hosting cloud server solution. - -Engineered exclusively for small- and medium-sized business, as well as major organizations and enterprises, [ownCloud 9.0 Enterprise Edition][2] is now available with extensive file control capabilities and all the cool new features that made the open-source version of the project famous amongst Linux users. - -Prominent new features in ownCloud 9.0 Enterprise Edition are built-in Auto-Tagging and File Firewall apps, which have been based on some of the new features of ownCloud 9.0, such as file tags, file comments, as well as notifications and activities enhancements. This offers system administrators the ability to set rules and classifications for shared documents based on user- or system-applied tags. - -"To illustrate how this can work, imagine working in a publicly traded company which has to be very careful not to release financial information ahead of official disclosure," reads the [announcement][3]. "While sharing this information internally it could end up in a folder which is shared through a public link. By assigning a special system tag, admins can configure the system to ensure the files are not available for download despite this mistake." - -### Used by over 8 million people around the globe - -ownCloud 9.0 is the best release of the open-source self-hosting cloud server software so far, which is currently used by over 8 million users around the globe. The release has brought a huge number of new features, such as code signing, as well as dozens of under-the-hood improvements and cosmetic changes. ownCloud 9.0 also got its first point release, version 9.0.1, last week, which [introduced even more enhancements][4]. - -And now, enterprises can take advantage of ownCloud 9.0's new features to differentiate between storage type and location, as well as the location of users, groups, and clients. ownCloud 9.0 Enterprise Edition gives them extensive access control, which is perfect if they have strict company guidelines or work with all sorts of regulations and rules. Below, you can see the File Firewall and Auto-Tagging apps in action. - ------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/owncloud-9-0-enterprise-edition-arrives-with-extensive-file-control-capabilities-502985.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://owncloud.com/blog-introducing-owncloud-9-enterprise-edition/ -[2]: https://owncloud.com/ -[3]: https://owncloud.org/blog/owncloud-9-0-enterprise-edition-is-now-available/ -[4]: http://news.softpedia.com/news/owncloud-9-0-gets-its-first-point-release-over-120-improvements-introduced-502698.shtml From c582d5ddbe0b2f1bb26e2137659d334149def5a5 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 Apr 2016 07:52:54 +0800 Subject: [PATCH 1279/1710] PUB:20151119 Going Beyond Hello World Containers is Hard Stuff @oska874 --- ...nd Hello World Containers is Hard Stuff.md | 101 +++++++++--------- 1 file changed, 48 insertions(+), 53 deletions(-) rename {translated/tech => published}/20151119 Going Beyond Hello World Containers is Hard Stuff.md (59%) diff --git a/translated/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md b/published/20151119 Going Beyond Hello World Containers is Hard Stuff.md similarity index 59% rename from translated/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md rename to published/20151119 Going Beyond Hello World Containers is Hard Stuff.md index c42b278787..f4e7b89720 100644 --- a/translated/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md +++ b/published/20151119 Going Beyond Hello World Containers is Hard Stuff.md @@ -1,42 +1,41 @@ -要超越Hello World 容器是件困难的事情 +从 Hello World 容器进阶是件困难的事情 ================================================================================ -在[我的上一篇文章里][1], 我介绍了Linux 容器背后的技术的概念。我写了我知道的一切。容器对我来说也是比较新的概念。我写这篇文章的目的就是鼓励我真正的来学习这些东西。 +在[我的上一篇文章里][1], 我介绍了 Linux 容器背后的技术的概念。我写了我知道的一切。容器对我来说也是比较新的概念。我写这篇文章的目的就是鼓励我真正的来学习这些东西。 -我打算在使用中学习。首先实践,然后上手并记录下我是怎么走过来的。我假设这里肯定有很多想"Hello World" 这种类型的知识帮助我快速的掌握基础。然后我能够更进一步,构建一个微服务容器或者其它东西。 +我打算在使用中学习。首先实践,然后上手并记录下我是怎么走过来的。我假设这里肯定有很多像 "Hello World" 这种类型的知识帮助我快速的掌握基础。然后我能够更进一步,构建一个微服务容器或者其它东西。 -我的意思是还会比着更难吗,对吧? +我想,它应该不会有多难的。 -错了。 +但是我错了。 -可能对某些人来说这很简单,因为他们会耗费大量的时间专注在操作工作上。但是对我来说实际上是很困难的,可以从我在Facebook 上的状态展示出来的挫折感就可以看出了。 +可能对某些人来说这很简单,因为他们在运维工作方面付出了大量的时间。但是对我来说实际上是很困难的,可以从我在Facebook 上的状态展示出来的挫折感就可以看出了。 -但是还有一个好消息:我最终让它工作了。而且他工作的还不错。所以我准备分享向你分享我如何制作我的第一个微服务容器。我的痛苦可能会节省你不少时间呢。 +但是还有一个好消息:我最终搞定了。而且它工作的还不错。所以我准备分享向你分享我如何制作我的第一个微服务容器。我的痛苦可能会节省你不少时间呢。 -如果你曾经发现或者从来都没有发现自己处在这种境地:像我这样的人在这里解决一些你不需要解决的问题。 +如果你曾经发现你也处于过这种境地,不要害怕:像我这样的人都能搞定,所以你也肯定行。 让我们开始吧。 - ### 一个缩略图微服务 ### -我设计的微服务在理论上很简单。以JPG 或者PNG 格式在HTTP 终端发布一张数字照片,然后获得一个100像素宽的缩略图。 +我设计的微服务在理论上很简单。以 JPG 或者 PNG 格式在 HTTP 终端发布一张数字照片,然后获得一个100像素宽的缩略图。 -下面是它实际的效果: +下面是它的流程: ![container-diagram-0](https://deis.com/images/blog-images/containers-hard-0.png) -我决定使用NodeJS 作为我的开发语言,使用[ImageMagick][2] 来转换缩略图。 +我决定使用 NodeJS 作为我的开发语言,使用 [ImageMagick][2] 来转换缩略图。 我的服务的第一版的逻辑如下所示: ![container-diagram-1](https://deis.com/images/blog-images/containers-hard-1.png) -我下载了[Docker Toolbox][3],用它安装了Docker 的快速启动终端。Docker 快速启动终端使得创建容器更简单了。终端会启动一个装好了Docker 的Linux 虚拟机,它允许你在一个终端里运行Docker 命令。 +我下载了 [Docker Toolbox][3],用它安装了 Docker 的快速启动终端(Docker Quickstart Terminal)。Docker 快速启动终端使得创建容器更简单了。终端会启动一个装好了 Docker 的 Linux 虚拟机,它允许你在一个终端里运行 Docker 命令。 -虽然在我的例子里,我的操作系统是Mac OS X。但是Windows 下也有相同的工具。 +虽然在我的例子里,我的操作系统是 Mac OS X。但是 Windows 下也有相同的工具。 -我准备使用Docker 快速启动终端里为我的微服务创建一个容器镜像,然后从这个镜像运行容器。 +我准备使用 Docker 快速启动终端里为我的微服务创建一个容器镜像,然后从这个镜像运行容器。 Docker 快速启动终端就运行在你使用的普通终端里,就像这样: @@ -44,11 +43,11 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 ### 第一个小问题和第一个大问题### -所以我用NodeJS 和ImageMagick 瞎搞了一通然后让我的服务在本地运行起来了。 +我用 NodeJS 和 ImageMagick 瞎搞了一通,然后让我的服务在本地运行起来了。 -然后我创建了Dockerfile,这是Docker 用来构建容器的配置脚本。(我会在后面深入介绍构建和Dockerfile) +然后我创建了 Dockerfile,这是 Docker 用来构建容器的配置脚本。(我会在后面深入介绍构建过程和 Dockerfile) -这是我运行Docker 快速启动终端的命令: +这是我运行 Docker 快速启动终端的命令: $ docker build -t thumbnailer:0.1 @@ -58,32 +57,31 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 呃。 -我估摸着过了15分钟:我忘记了在末尾参数输入一个点`.`。 +我估摸着过了15分钟我才反应过来:我忘记了在末尾参数输入一个点`.`。 正确的指令应该是这样的: $ docker build -t thumbnailer:0.1 . +但是这不是我遇到的最后一个问题。 -但是这不是我最后一个问题。 - -我让这个镜像构建好了,然后我Docker 快速启动终端输入了[`run` 命令][4]来启动容器,名字叫`thumbnailer:0.1`: +我让这个镜像构建好了,然后我在 Docker 快速启动终端输入了 [`run` 命令][4]来启动容器,名字叫 `thumbnailer:0.1`: $ docker run -d -p 3001:3000 thumbnailer:0.1 -参数`-p 3001:3000` 让NodeJS 微服务在Docker 内运行在端口3000,而在主机上则是3001。 +参数 `-p 3001:3000` 让 NodeJS 微服务在 Docker 内运行在端口3000,而绑定在宿主主机上的3001。 -到目前卡起来都很好,对吧? +到目前看起来都很好,对吧? 错了。事情要马上变糟了。 -我指定了在Docker 快速启动中端里用命令`docker-machine` 运行的Docker 虚拟机的ip地址: +我通过运行 `docker-machine` 命令为这个 Docker 快速启动终端里创建的虚拟机指定了 ip 地址: $ docker-machine ip default -这句话返回了默认虚拟机的IP地址,即运行docker 的虚拟机。对于我来说,这个ip 地址是192.168.99.100。 +这句话返回了默认虚拟机的 IP 地址,它运行在 Docker 快速启动终端里。在我这里,这个 ip 地址是 192.168.99.100。 -我浏览网页http://192.168.99.100:3001/ ,然后找到了我创建的上传图片的网页: +我浏览网页 http://192.168.99.100:3001/ ,然后找到了我创建的上传图片的网页: ![container-diagram-3](https://deis.com/images/blog-images/containers-hard-3.png) @@ -91,13 +89,13 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 但是它并没有工作。 -终端告诉我他无法找到我的微服务需要的`/upload` 目录。 +终端告诉我他无法找到我的微服务需要的 `/upload` 目录。 -现在开始记住,我已经在此耗费了将近一天的时间-从浪费时间到研究问题。我此时感到了一些挫折感。 +现在,你要知道,我已经在此耗费了将近一天的时间-从浪费时间到研究问题。我此时感到了一些挫折感。 然后灵光一闪。某人记起来微服务不应该自己做任何数据持久化的工作!保存数据应该是另一个服务的工作。 -所以容器找不到目录`/upload` 的原因到底是什么?这个问题的根本就是我的微服务在基础设计上就有问题。 +所以容器找不到目录 `/upload` 的原因到底是什么?这个问题的根本就是我的微服务在基础设计上就有问题。 让我们看看另一幅图: @@ -109,7 +107,7 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 ![container-diagram-5](https://deis.com/images/blog-images/containers-hard-5.png) -这是我用NodeJS 写的在内存工作、生成缩略图的代码: +这是我用 NodeJS 写的在内存运行、生成缩略图的代码: // Bind to the packages var express = require('express'); @@ -171,19 +169,19 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 module.exports = router; -好了,回到正轨,已经可以在我的本地机器正常工作了。我该去休息了。 +好了,一切回到了正轨,已经可以在我的本地机器正常工作了。我该去休息了。 -但是,在我测试把这个微服务当作一个普通的Node 应用运行在本地时... +但是,在我测试把这个微服务当作一个普通的 Node 应用运行在本地时... ![Containers Hard](https://deis.com/images/blog-images/containers-hard-6.png) -它工作的很好。现在我要做的就是让他在容器里面工作。 +它工作的很好。现在我要做的就是让它在容器里面工作。 第二天我起床后喝点咖啡,然后创建一个镜像——这次没有忘记那个"."! $ docker build -t thumbnailer:01 . -我从缩略图工程的根目录开始构建。构建命令使用了根目录下的Dockerfile。它是这样工作的:把Dockerfile 放到你想构建镜像的地方,然后系统就默认使用这个Dockerfile。 +我从缩略图项目的根目录开始构建。构建命令使用了根目录下的 Dockerfile。它是这样工作的:把 Dockerfile 放到你想构建镜像的地方,然后系统就默认使用这个 Dockerfile。 下面是我使用的Dockerfile 的内容: @@ -209,7 +207,7 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 ### 第二个大问题 ### -我运行了`build` 命令,然后出了这个错: +我运行了 `build` 命令,然后出了这个错: Do you want to continue? [Y/n] Abort. @@ -217,7 +215,7 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 我猜测微服务出错了。我回到本地机器,从本机启动微服务,然后试着上传文件。 -然后我从NodeJS 获得了这个错误: +然后我从 NodeJS 获得了这个错误: Error: spawn convert ENOENT @@ -225,25 +223,25 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 我搜索了我能想到的所有的错误原因。差不多4个小时后,我想:为什么不重启一下机器呢? -重启了,你猜猜结果?错误消失了!(译注:万能的重启) +重启了,你猜猜结果?错误消失了!(LCTT 译注:万能的“重启试试”) 继续。 -### 将精灵关进瓶子 ### +### 将精灵关进瓶子里 ### 跳回正题:我需要完成构建工作。 -我使用[`rm` 命令][5]删除了虚拟机里所有的容器。 +我使用 [`rm` 命令][5]删除了虚拟机里所有的容器。 $ docker rm -f $(docker ps -a -q) `-f` 在这里的用处是强制删除运行中的镜像。 -然后删除了全部Docker 镜像,用的是[命令`rmi`][6]: +然后删除了全部 Docker 镜像,用的是[命令 `rmi`][6]: $ docker rmi if $(docker images | tail -n +2 | awk '{print $3}') -我重新执行了命令构建镜像,安装容器,运行微服务。然后过了一个充满自我怀疑和沮丧的一个小时,我告诉我自己:这个错误可能不是微服务的原因。 +我重新执行了重新构建镜像、安装容器、运行微服务的整个过程。然后过了一个充满自我怀疑和沮丧的一个小时,我告诉我自己:这个错误可能不是微服务的原因。 所以我重新看到了这个错误: @@ -251,19 +249,17 @@ Docker 快速启动终端就运行在你使用的普通终端里,就像这样 The command '/bin/sh -c apt-get install imagemagick libmagickcore-dev libmagickwand-dev' returned a non-zero code: 1 -这太打击我了:构建脚本好像需要有人从键盘输入Y! 但是,这是一个非交互的Dockerfile 脚本啊。这里并没有键盘。 +这太打击我了:构建脚本好像需要有人从键盘输入 Y! 但是,这是一个非交互的 Dockerfile 脚本啊。这里并没有键盘。 -回到Dockerfile,脚本元来时这样的: +回到 Dockerfile,脚本原来是这样的: 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. -第二个`apt-get` 忘记了`-y` 标志,这才是错误的根本原因。 +第二个`apt-get` 忘记了`-y` 标志,它用于自动应答提示所需要的“yes”。这才是错误的根本原因。 -I added the missing `-y` to the command: 我在这条命令后面添加了`-y` : RUN apt-get update @@ -281,7 +277,6 @@ I added the missing `-y` to the command: $ docker run -d -p 3001:3000 thumbnailer:0.1 -Got the IP address of the Virtual Machine: 获取了虚拟机的IP 地址: $ docker-machine ip default @@ -298,11 +293,11 @@ Got the IP address of the Virtual Machine: 在容器里面工作了,我的第一次啊! -### 这意味着什么? ### +### 这让我学到了什么? ### -很久以前,我接受了这样一个道理:当你刚开始尝试某项技术时,即使是最简单的事情也会变得很困难。因此,我压抑了要成为房间里最聪明的人的欲望。然而最近几天尝试容器的过程就是一个充满自我怀疑的旅程。 +很久以前,我接受了这样一个道理:当你刚开始尝试某项技术时,即使是最简单的事情也会变得很困难。因此,我不会把自己当成最聪明的那个人,然而最近几天尝试容器的过程就是一个充满自我怀疑的旅程。 -但是你想知道一些其它的事情吗?这篇文章是我在凌晨2点完成的,而每一个折磨的小时都值得了。为什么?因为这段时间你将自己全身心投入了喜欢的工作里。这件事很难,对于所有人来说都不是很容易就获得结果的。但是不要忘记:你在学习技术,运行世界的技术。 +但是你想知道一些其它的事情吗?这篇文章是我在凌晨2点完成的,而每一个受折磨的时刻都值得了。为什么?因为这段时间你将自己全身心投入了喜欢的工作里。这件事很难,对于所有人来说都不是很容易就获得结果的。但是不要忘记:你在学习技术,运行世界的技术。 P.S. 了解一下Hello World 容器的两段视频,这里会有 [Raziel Tabib’s][7] 的精彩工作内容。 @@ -320,12 +315,12 @@ via: https://deis.com/blog/2015/beyond-hello-world-containers-hard-stuff 作者:[Bob Reselman][a] 译者:[Ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [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 +[1]:https://linux.cn/article-6594-1.html [2]:https://github.com/rsms/node-imagemagick [3]:https://www.docker.com/toolbox [4]:https://docs.docker.com/reference/commandline/run/ From 3e4188e4790184fede01f36d7b58029e3511304a Mon Sep 17 00:00:00 2001 From: alim0x Date: Wed, 27 Apr 2016 21:16:36 +0800 Subject: [PATCH 1280/1710] [translated]7 Steps to Start Your Linux SysAdmin Career --- ...eps to Start Your Linux SysAdmin Career.md | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md index df4989eba9..e6b4fa62ab 100644 --- a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md +++ b/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md @@ -1,39 +1,38 @@ -alim0x translating - -7 Steps to Start Your Linux SysAdmin Career +七步开始你的 Linux 系统管理员生涯 =============================================== -Linux is hot right now. Everybody is looking for Linux talent. Recruiters are knocking down the doors of anybody with Linux experience, and there are tens of thousands of jobs waiting to be filled. But what if you want to take advantage of this trend and you’re new to Linux? How do you get started? -1. Install Linux +Linux 现在是个大热门。每个人都在寻求 Linux 才能。招聘人员对有 Linux 经验的人求贤若渴,还有无数的职位虚位以待。但是如果你是 Linux 新手,又想要赶上这波热潮,该从何开始下手呢? - It should almost go without saying, but the first key to learning Linux is to install Linux. Both the LFS101x and the LFS201 courses include detailed sections on installing and configuring Linux for the first time. +1. 安装 Linux -2. Take LFS101x + 这应该是不言而喻的,但学习 Linux 的第一关键就是安装 Linux。LFS101x 和 LFS201 课程都包含第一次安装和配置 Linux 的详细内容。 - If you are completely new to Linux, the best place to start is our free [LFS101x Introduction](https://www.edx.org/course/introduction-linux-linuxfoundationx-lfs101x-2) to Linux course. This online course is hosted by edX.org, and explores the various tools and techniques commonly used by Linux system administrators and end users to achieve their day-to-day work in a Linux environment. It is designed for experienced computer users who have limited or no previous exposure to Linux, whether they are working in an individual or enterprise environment. This course will give you a good working knowledge of Linux from both a graphical and command line perspective, allowing you to easily navigate through any of the major Linux distributions. +2. 完成 LFS101x 课程 -3. Look into LFS201 + 如果你是 Linux 完完全全的新手,最佳的起点是免费的 Linux 课程 [LFS101x Introduction](https://www.edx.org/course/introduction-linux-linuxfoundationx-lfs101x-2)。这个在线课程在 edX.org,探索 Linux 系统管理员和终端用户常用的各种工具和技能以及日常 Linux 工作环境。该课程是为有一定经验但较少或没有接触过 Linux 的电脑用户设计的,不论他们是在个人还是企业环境中工作。这个课程会从图形界面和命令行教会你有用的 Linux 知识,让你能够了解主流的 Linux 发行版。 - Once you’ve completed LFS101x, you’re ready to start diving into the more complicated tasks in Linux that will be required of you as a professional sysadmin. To gain those skills, you’ll want to take [LFS201 Essentials of Linux System Administration](http://training.linuxfoundation.org/linux-courses/system-administration-training/essentials-of-system-administration). The course gives you in-depth explanations and instructions for each topic, along with plenty of exercises and labs to help you get real, hands-on experience with the subject matter. +3. 看看 LFS201 课程 - If you would rather have a live instructor teach you or you have an employer who is interested in helping you become a Linux sysadmin, you might also be interested in LFS220 Linux System Administration. This course includes all the same topics as the LFS201 course, but is taught by an expert instructor who can guide you through the labs and answer any questions you have on the topics covered in the course. + 在你完成 LFS101x 之后,你就准备好开始进入 Linux 更加复杂的任务了,这是成为一名专业的系统管理员所必须的。为了掌握这些技能,你应该看看 [LFS201 Essentials of Linux System Administration](http://training.linuxfoundation.org/linux-courses/system-administration-training/essentials-of-system-administration) 这个课程。该课程对每个话题进行了深度的解释和介绍,还有大量的练习和实验,帮助你获得相关主题实际的上手经验。 -4. Practice! + 如果你更愿意有个教练或者你的雇主对将你培养成 Linux 系统管理员有兴趣,你可能会对 LFS220 Linux System Administration 有兴趣。这个课程有 LFS201 中所有的主题,但是它是由专家专人教授的,帮助你进行实验以及解答你在课程主题中的问题。 - Practice makes perfect, and that’s as true for Linux as it is for any musical instrument or sport. Once you’ve installed Linux, use it regularly. Perform key tasks over and over again until you can do them easily without reference material. Learn the ins and outs of the command line as well as the GUI. This practice will ensure that you’ve got the skills and knowledge to be successful as a professional Linux sysadmin. +4. 练习! -5. Get Certified + 熟能生巧,和对任何乐器或运动适用一样,这对 Linux 来说也一样适用。在你安装 Linux 之后,经常使用它。一遍遍地练习关键任务,直到你不需要参考材料也能轻而易举地完成。练习命令行和图形界面的输入输出。这些练习能够保证你掌握成为成功的 Linux 系统管理员所必需的知识和技能。 - After you’ve taken LFS201 or LFS220 and you’ve gotten some practice, you are now ready to get certified as a system administrator. You’ll need this certification because this is how you will prove to employers that you have the necessary skills to be a professional Linux sysadmin. +5. 获得认证 - There are several Linux certifications on the market today, and all of them have their place. However, most of these certifications are either centered on a specific distro (like Red Hat) or are purely knowledge-based and don’t demonstrate actual skill with Linux. The Linux Foundation Certified System Administrator certification is an excellent alternative for someone looking for a flexible, meaningful entry-level certification. + 在你完成 LFS201 或 LFS220 并且充分练习之后,你现在已经准备好获得系统管理员的认证了。你需要这个证书,因为你需要向雇主证明你拥有一名专业 Linux 系统管理员必需的技能。 -6. Get Involved + 现在有一些不同的 Linux 证书,它们有它们的独到之处。但是,它们里大部分不是在特定发行版(如红帽)上认证,就是纯粹的知识测试,没有演示 Linux 的实际技能。Linux 基金会认证系统管理员(Linux Foundation Certified System Administrator)证书对想要一个灵活的,有意义的初级证书的人来说是个优秀的替代。 - At this point you may also want to consider joining up with a local Linux Users Group (or LUG), if there’s one in your area. These groups are usually composed of people of all ages and experience levels, so regardless of where you are at with your Linux experience, you can find people with similar skill levels to bond with, or more advanced Linux users who can help answer questions and point you towards helpful resources. To find out if there’s a LUG near you, try looking on meetup.com, check with a nearby university, or just do a simple Internet search. +6. 参与进来 - There are also many online communities available to you as you learn Linux. These sites and communities provide help and support to both individuals new to Linux or experienced administrators: + 如果你所在的地方有本地 Linux 用户组(Linux Users Group,LUG)的话,这时候你可能还想要考虑加入他们。这些组织通常由各种年龄和经验水平的人组成,所以不管你的 Linux 经验水平如何,你都能找到和你类似技能水平的人互助,或是更高水平的 Linux 用户来解答你的问题以及介绍有用的资源。要想知道你附近有没有 LUG,上 meet.com 看看,或是附近的大学,又或是上网搜索一下。 + + 还有不少在线社区可以在你学习 Linux 的时候帮助你。这些站点和社区向 Linux 新手和有经验的管理员都能够提供帮助和支持: - [Linux Admin subreddit](https://www.reddit.com/r/linuxadmin) @@ -47,20 +46,20 @@ Linux is hot right now. Everybody is looking for Linux talent. Recruiters are kn - [http://wiki.centos.org/Documentation](http://wiki.centos.org/Documentation) -7. Learn To Love The Documentation +7. 学会热爱文档 - Last but not least, if you ever get stuck on something within Linux, don’t forget about Linux’s included documentation. Using the commands man (for manual), info and help, you can find information on virtually every aspect of Linux, right from within the operating system. The usefulness of these built-in resources cannot be overstated, and you’ll find yourself using them throughout your career, so you might as well get familiar with them early on. + 最后但同样重要的是,如果你困在 Linux 的某些地方,别忘了 Linux 包含的文档。使用命令 man(manual,手册),info 和 help,你从系统内就可以找到 Linux 几乎所有方面的信息。这些内置资源的用处再夸大也不为过,你会发现你在生涯中始终会用到,所以你可能最好早点掌握使用它们。 - Interested in learning more about starting your IT career with Linux? Check out our free ebook “[A Brief Guide To Starting Your IT Career In Linux](http://training.linuxfoundation.org/sysadmin-it-career-guide).” + 想要了解更多开始你 Linux IT 生涯的信息?查看我们免费的电子书“[开始你 Linux IT 生涯的简短指南](http://training.linuxfoundation.org/sysadmin-it-career-guide)”。 -[Download Now](http://training.linuxfoundation.org/sysadmin-it-career-guide) +[立刻下载](http://training.linuxfoundation.org/sysadmin-it-career-guide) ------------------------------------------------------------------------------ via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps-to-start-your-linux-sysadmin-career 作者:[linux.com][a] -译者:[译者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 b9fc96145465e2ec995d2a4dfa23438f626f4f3e Mon Sep 17 00:00:00 2001 From: alim0x Date: Wed, 27 Apr 2016 22:40:14 +0800 Subject: [PATCH 1281/1710] move file --- .../tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md (100%) diff --git a/sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/translated/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md similarity index 100% rename from sources/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md rename to translated/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md From 29c3cbd844400c94192658565576ee4a2836328e Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Thu, 28 Apr 2016 12:32:00 +0800 Subject: [PATCH 1282/1710] translated --- ...227 Upheaval in the Debian Live project.md | 68 --------------- ...227 Upheaval in the Debian Live project.md | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 68 deletions(-) delete mode 100644 sources/talk/20151227 Upheaval in the Debian Live project.md create mode 100644 translated/20151227 Upheaval in the Debian Live project.md diff --git a/sources/talk/20151227 Upheaval in the Debian Live project.md b/sources/talk/20151227 Upheaval in the Debian Live project.md deleted file mode 100644 index 3fa8179aa3..0000000000 --- a/sources/talk/20151227 Upheaval in the Debian Live project.md +++ /dev/null @@ -1,68 +0,0 @@ -vim-kakali is translating. - -While the event had a certain amount of drama surrounding it, the [announcement][1] of the end for the [Debian Live project][2] seems likely to have less of an impact than it first appeared. The loss of the lead developer will certainly be felt—and the treatment he and the project received seems rather baffling—but the project looks like it will continue in some form. So Debian will still have tools to create live CDs and other media going forward, but what appears to be a long-simmering dispute between project founder and leader Daniel Baumann and the Debian CD and installer teams has been "resolved", albeit in an unfortunate fashion. - -The November 9 announcement from Baumann was titled "An abrupt End to Debian Live". In that message, he pointed to a number of different events over the nearly ten years since the [project was founded][3] that indicated to him that his efforts on Debian Live were not being valued, at least by some. The final straw, it seems, was an "intent to package" (ITP) bug [filed][4] by Iain R. Learmonth that impinged on the namespace used by Debian Live. - -Given that one of the main Debian Live packages is called "live-build", the new package's name, "live-build-ng", was fairly confrontational in and of itself. Live-build-ng is meant to be a wrapper around the [vmdebootstrap][5] tool for creating live media (CDs and USB sticks), which is precisely the role Debian Live is filling. But when Baumann [asked][6] Learmonth to choose a different name for his package, he got an "interesting" [reply][7]: - -``` -It is worth noting that live-build is not a Debian project, it is an external project that claims to be an official Debian project. This is something that needs to be fixed. -There is no namespace issue, we are building on the existing live-config and live-boot packages that are maintained and bringing these into Debian as native projects. If necessary, these will be forks, but I'm hoping that won't have to happen and that we can integrate these packages into Debian and continue development in a collaborative manner. -live-build has been deprecated by debian-cd, and live-build-ng is replacing it. In a purely Debian context at least, live-build is deprecated. live-build-ng is being developed in collaboration with debian-cd and D-I [Debian Installer]. -``` - -Whether or not Debian Live is an "official" Debian project (or even what "official" means in this context) has been disputed in the thread. Beyond that, though, Neil Williams (who is the maintainer of vmdebootstrap) [provided some][8] explanation for the switch away from Debian Live: - -``` -vmdebootstrap is being extended explicitly to provide support for a replacement for live-build. This work is happening within the debian-cd team to be able to solve the existing problems with live-build. These problems include reliability issues, lack of multiple architecture support and lack of UEFI support. vmdebootstrap has all of these, we do use support from live-boot and live-config as these are out of the scope for vmdebootstrap. -``` - -Those seem like legitimate complaints, but ones that could have been fixed within the existing project. Instead, though, something of a stealth project was evidently undertaken to replace live-build. As Baumann [pointed out][9], nothing was posted to the debian-live mailing list about the plans. The ITP was the first notice that anyone from the Debian Live project got about the plans, so it all looks like a "secret plan"—something that doesn't sit well in a project like Debian. - -As might be guessed, there were multiple postings that supported Baumann's request to rename "live-build-ng", followed by many that expressed dismay at his decision to stop working on Debian Live. But Learmonth and Williams were adamant that replacing live-build is needed. Learmonth did [rename][10] live-build-ng to a perhaps less confrontational name: live-wrapper. He noted that his aim had been to add the new tool to the Debian Live project (and "bring the Debian Live project into Debian"), but things did not play out that way. - -``` -I apologise to everyone that has been upset by the ITP bug. The software is not yet ready for use as a full replacement for live-build, and it was filed to let people know that the work was ongoing and to collect feedback. This sort of worked, but the feedback wasn't the kind I was looking for. -``` - -The backlash could perhaps have been foreseen. Communication is a key aspect of free-software communities, so a plan to replace the guts of a project seems likely to be controversial—more so if it is kept under wraps. For his part, Baumann has certainly not been perfect—he delayed the "wheezy" release by [uploading an unsuitable syslinux package][11] and [dropped down][12] from a Debian Developer to a Debian Maintainer shortly thereafter—but that doesn't mean he deserves this kind of treatment. There are others involved in the project as well, of course, so it is not just Baumann who is affected. - -One of those other people is Ben Armstrong, who has been something of a diplomat during the event and has tried to smooth the waters. He started with a [post][13] that celebrated the project and what Baumann and the team had accomplished over the years. As he noted, the [list of downstream projects][14] for Debian Live is quite impressive. In another post, he also [pointed out][15] that the project is not dead: - -``` -If the Debian CD team succeeds in their efforts and produces a replacement that is viable, reliable, well-tested, and a suitable candidate to replace live-build, this can only be good for Debian. If they are doing their job, they will not "[replace live-build with] an officially improved, unreliable, little-tested alternative". I've seen no evidence so far that they operate that way. And in the meantime, live-build remains in the archive -- there is no hurry to remove it, so long as it remains in good shape, and there is not yet an improved successor to replace it. -``` - -On November 24, Armstrong also [posted][16] an update (and to [his blog][17]) on Debian Live. It shows some good progress made in the two weeks since Baumann's exit; there are even signs of collaboration between the project and the live-wrapper developers. There is also a [to-do list][18], as well as the inevitable call for more help. That gives reason to believe that all of the drama surrounding the project was just a glitch—avoidable, perhaps, but not quite as dire as it might have seemed. - - ---------------------------------- - -via: https://lwn.net/Articles/665839/ - -作者:Jake Edge -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - - -[1]: https://lwn.net/Articles/666127/ -[2]: http://live.debian.net/ -[3]: https://www.debian.org/News/weekly/2006/08/ -[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804315 -[5]: http://liw.fi/vmdebootstrap/ -[6]: https://lwn.net/Articles/666173/ -[7]: https://lwn.net/Articles/666176/ -[8]: https://lwn.net/Articles/666181/ -[9]: https://lwn.net/Articles/666208/ -[10]: https://lwn.net/Articles/666321/ -[11]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699808 -[12]: https://nm.debian.org/public/process/14450 -[13]: https://lwn.net/Articles/666336/ -[14]: http://live.debian.net/project/downstream/ -[15]: https://lwn.net/Articles/666338/ -[16]: https://lwn.net/Articles/666340/ -[17]: http://syn.theti.ca/2015/11/24/debian-live-after-debian-live/ -[18]: https://wiki.debian.org/DebianLive/TODO diff --git a/translated/20151227 Upheaval in the Debian Live project.md b/translated/20151227 Upheaval in the Debian Live project.md new file mode 100644 index 0000000000..7d03ce831a --- /dev/null +++ b/translated/20151227 Upheaval in the Debian Live project.md @@ -0,0 +1,83 @@ +Debian Live项目的剧变 + +围绕Debian Live 项目发生了很多戏剧性事件,但是有一个关于Debian Live项目][1]结束的[公告][2],它比项目第一次出现的时候影响力还小。这个项目的创始人退出必定是有原因的,社区对他的待遇和项目的收效是很令人沮丧的,但是这个项目还是会以其他的形式继续下去。所以Debian仍然会有很多的工具去在创造启动光盘和其他介质的道路上继续向前。项目创始人Dabiel Baumann和Debian CD团队以及安装检测团队之间出现的长期争论已经被"解决"了,尽管是用这样一种有遗憾的方式。                                      + +在11月9日,Baumann发表了题为"Dabian Live项目的突然结束"的一篇公告。在那篇短文中,他一一列举出了自从这个和他有关的[项目被发起][3]以来10间发生的不同的事件,可以表明他在Debian Live项目上的努力一直没有被重视,至少从这些方面。最具决定性的因素是因为在"包的含义"上存在冲突,R.Learmonth[申请][4]了新的包名,而这却侵犯了在Debian Live上使用的命名空间。 + +考虑到最主要的Debian Live包之一被命名为"live-build",而新的包名却叫"live-build-ng",这简直是对"live-build"的挑战。live-build-ng意为一种围绕[vmdebootstrap][5]【译者注:创造真实的和虚拟机Debian的磁盘映像】工具的外部包装,这种包装是为了创造live介质(光盘和USB的插入),也是Debian Live最需要的的部分。但是当 Baumann Learmonth[要求][6]为他的包换一个不同的名字的时候,他得到了一个“有趣”的[回复][7]: + +``` + +live-build不是一个Debian项目,这件事应该受到我们的关注,它是一个外部的项目。但是社区要求它成为一个官方的Debian项目,这件事需要我们敲定。 +这不是命名空间的问题,我们要将以目前维护的live配置和live启动包为基础,把它加入到Debian的本地项目。如果迫不得已的话,这将会有很多分支,但是我希望它不要发生,这样的话我们就可以把这些包整合到Debian中继续以一种协作的方式去开发。 +live-build已经被debian-cd放弃,live-build-ng将会取代它。至少在一个精简的Debian环境中,live-build会被放弃。live-build-ng将要通过debian-cd和Debian安装者合作的方式去开发。 +``` + + + +Debian Live 是一个“官方的”Debian项目(或者可以狭义的"官方"),尽管它因为思路上的不同产生过争论.除此之外,vmdebootstrap的维护者Neil Willians为脱离Debian Live项目[提供了如下的解释][8]: + +``` + +为了更好的支持live-build的代替者,vmdebootstrap肯定会被推广。这项工作会由debian-cd团队来负责,debian-cd能够用live-build解决目前存在的问题。 这些问题包括可靠性问题,以及不能很好的支持多种机器和UEFI等。 vmdebootstrap也存在着这些问题,我们用来自于对live-boot和live-config的支持情况来确定vmdebootstrap的功能。 +``` + + + +这些想要取代"live-build"的说辞看起来有道理,但是目前的项目存在的上述问题已经得到了初步解决。相反的,一些秘密的项目很明显的意图是取代live-build。正如Baumann[指出][9]的,这些计划没有被加入到debian-live的邮件列表中。人们可以从Debian Live项目中得到这些计划的信息也是因为这一次的ITP事件。所以它看起来像是一个"秘密计划"—有些东西在一个像Debian这样的项目中不能很好的安排。 + +人们可能已经猜到了,有很多帖子都支持Baumann[重命名][10]"live-build-ng"的请求,但是紧跟着,人们就因为他要停止在Debian Live 上继续工作的决定而变得沮丧。但是Learmonth 和 Williams却坚定不移,他们两人都是取代live-build所需要的开发者。Learmonth 给“live-build-ng”换了一个新的有很少争议性的名字:Live-wrapper。他说他的目标是为Debian Live项目加入新的工具(并且“把Debian Live 项目引入Debian里面),但是完成这件事还需要很大的努力。 + + +``` + +我向已经被ITP问题所困扰的每个人道歉。作为live-build的取代者,live-wrapper这个软件的稳定性还很差,为了让人们知道工作的进展同时收集反馈,它已经被存档。虽然有了这部分的工作,但是收到的反馈并不是我所需要的。 +``` + +这种对于取代live-build的强烈的反对或许已经被预知到了。自由软件社区的沟通和交流很关键,所以,替换一个项目核心的计划是很有争议的——更何况这个计划一直不被人们所知。从Banumann的角度来说,他当然不是完美的,他通过上传和下载一个不合适的[syslinux包][11]来延迟“wheezy”的发布,并且从那以后他从一个Debian发起人[成为][12]了一个Debian维护者。——但是他也不应该受到这种对待。当然,这个项目还有其他人参与,所以不仅仅是Baumann受到了影响。 + +Ben Armstrong是这些人中的其中之一,在这个事件中,他很圆滑地处理了一些事,并且想从这个事件中全身而退。他从一个邮件[13]开始,这个邮件是为了庆祝这个项目以及他和他的团队在过去几年完成的一些工作。正如他所说,这种基于Debian Live的[下流项目列表][14]是很令人振奋的。在另一个邮件中,他也[指出][15]了这个项目不是没有生命力的: + + +``` + +如果Debian CD开发团队通过他们的努力获得成功,这样产品的替换就会是可行的、可靠的、利于测试的,同时有一个合适的候选者去取代live-build,这对于Debian项目有利无害。如果他们继续做这件事,他们不会“用一个官方改良的,不可靠的,几乎没有测试的待选者取代live-build”。到目前为止,我还没有看到他们那样做。其间,live-build仍在存档,没有很快删除,它仍然处于良好状态,并没有一种改进的继任者来取代它。 +``` + + +11月24号,Armstrong也在[他的博客][16]上[发布][17]了一个有关Debian Live的新消息。它展示了自从 Baumann退出后两周内的让人高兴的进展。可以说是在这个项目和live-wrapper开发者之间产生合作的里程碑。博客上也有了一个[计划表][18],同时不可避免地寻求更多的帮助。他也列举了一些理由,试图让人们相信围绕项目发生的戏剧性事件仅仅是一个可以避免的小问题,而不是像现在这样。 + + + + + + +--------------------------------- + +via: https://lwn.net/Articles/665839/ + +作者:Jake Edge +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[1]: https://lwn.net/Articles/666127/ +[2]: http://live.debian.net/ +[3]: https://www.debian.org/News/weekly/2006/08/ +[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804315 +[5]: http://liw.fi/vmdebootstrap/ +[6]: https://lwn.net/Articles/666173/ +[7]: https://lwn.net/Articles/666176/ +[8]: https://lwn.net/Articles/666181/ +[9]: https://lwn.net/Articles/666208/ +[10]: https://lwn.net/Articles/666321/ +[11]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699808 +[12]: https://nm.debian.org/public/process/14450 +[13]: https://lwn.net/Articles/666336/ +[14]: http://live.debian.net/project/downstream/ +[15]: https://lwn.net/Articles/666338/ +[16]: https://lwn.net/Articles/666340/ +[17]: http://syn.theti.ca/2015/11/24/debian-live-after-debian-live/ +[18]: https://wiki.debian.org/DebianLive/TODO From a73783565ee232e15ebaaf91e4d84c5dd7867032 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 30 Apr 2016 23:28:56 +0800 Subject: [PATCH 1283/1710] =?UTF-8?q?20160430-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...9 Master OpenStack with 5 new tutorials.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sources/tech/20160429 Master OpenStack with 5 new tutorials.md diff --git a/sources/tech/20160429 Master OpenStack with 5 new tutorials.md b/sources/tech/20160429 Master OpenStack with 5 new tutorials.md new file mode 100644 index 0000000000..34ef86c06a --- /dev/null +++ b/sources/tech/20160429 Master OpenStack with 5 new tutorials.md @@ -0,0 +1,37 @@ +Master OpenStack with 5 new tutorials +======================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/EDUCATION_tools.png?itok=ybxr0Qe9) + + +Returning from OpenStack Summit this week, I am reminded of just how vast the open source cloud ecosystem is and just how many different projects and concepts you need to be familiar with in order to succeed. Although, we're actually quite fortunate with the resources available for keeping up. In addition to the [official documentation][1], many great educational tools are out there, from third party training and certification, to in-person events, and many community-contributed tutorials as well. + +To help you stay on top of things, every month we round up a collection of new tutorials, how-tos, guides, and tips created by the OpenStack community. Here are some of the great pieces published this past month. + +- First up, if you're looking for a (reasonably) affordable home OpenStack test lab, the Intel NUC is a great platform to consider. Small in form factor, but reasonably well-powered, you can get a literal stack of them running OpenStack pretty quickly with this guide to using [TripleO to deploy OpenStack][2] on the NUC, and read about some common quirks to watch out for. +- After you've been running OpenStack for a while, the various processes keeping your cloud alive have probably generated quite a pile of log files. While some are probably safe to purge, you still need to have a plan for managing them. Here are some [quick thoughts][3] on managing logs in Ceilometer after nine-months in to a production deployment. +- The OpenStack infrastructure project can be an intimidating place for a newcomer just trying to land a patch. What's a gate job, what's a test, and what are all of these steps my commit is going through? Get a quick overview of the whole process from Arie Bregman in this [handy blog post][4]. +- Compute hosts fail occasionally, and whether the cause is hardware or software, the good news is that OpenStack makes it easy to migrate your running instance to another host. However, some people have found the commands to perform this migration a little confusing. Learn the difference between the migrate and evacuate commands in plain English in [this great writeup][5]. +- Network Functions Virtualization technologies require some functionality from OpenStack that are outside of what other users might be familiar with. For example, SR-IOV and PCI passthrough are ways of exposing physical hardware directly for maximizing performance. Learn the [steps involved][6] to make this happen within an OpenStack deployment. + +That wraps up our collection for this month, but if you're still looking for more, be sure to check out our past archive of [OpenStack tutorials][7] for even more learning resources. And if there's a tutorial or guide you think we ought to include in our next roundup, be sure to let us know in the comments below. + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/4/master-openstack-new-tutorials + +作者:[Jason Baker][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jason-baker + +[1]: http://docs.openstack.org/ +[2]: http://acksyn.org/posts/2016/03/tripleo-on-nucs/ +[3]: http://silverskysoft.com/open-stack-xwrpr/2016/03/long-term-openstack-usage-summary/ +[4]: http://abregman.com/2016/03/05/openstack-infra-jenkins-jobs/ +[5]: http://www.danplanet.com/blog/2016/03/03/evacuate-in-nova-one-command-to-confuse-us-all/ +[6]: https://trickycloud.wordpress.com/2016/03/28/openstack-for-nfv-applications-sr-iov-and-pci-passthrough/ +[7]: https://opensource.com/resources/openstack-tutorials From bd6963ce0ed88f5e6fae09708d719fe0f243d5ab Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 30 Apr 2016 23:37:32 +0800 Subject: [PATCH 1284/1710] =?UTF-8?q?20160430-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...hy and how I became a software engineer.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/tech/20160429 Why and how I became a software engineer.md diff --git a/sources/tech/20160429 Why and how I became a software engineer.md b/sources/tech/20160429 Why and how I became a software engineer.md new file mode 100644 index 0000000000..722464168f --- /dev/null +++ b/sources/tech/20160429 Why and how I became a software engineer.md @@ -0,0 +1,101 @@ +Why and how I became a software engineer +========================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) + +The year was 1989. The city was Kampala, Uganda. + +In their infinite wisdom, my parents decided that instead of all the troublemaking I was getting into at home, they would send me off to my uncle's office to learn how to use a computer. A few days later, I found myself on the 21st floor in a cramped room with six or seven other teens and a brand new computer on a desk perpendicular to the teacher's desk. It was made abundantly clear that we were not skilled enough to touch it. After three frustrating weeks of writing and perfecting DOS commands, the magic moment happened. It was my turn to type **copy doc.txt d:**. + +The alien scratching noises that etched a simple text file onto the five-inch floppy sounded like beautiful music. For a while, that floppy disk was my most prized possession. I copied everything I could onto it. However, in 1989, Ugandans tended to take life pretty seriously, and messing around with computers, copying files, and formatting disks did not count as serious. I had to focus on my education, which led me away from computer science and into architectural engineering. + +Like any young person of my generation, a multitude of job titles and skills acquisition filled the years in between. I taught kindergarten, taught adults how to use software, worked in a clothing store, and served as a paid usher in a church. While I earned my degree at the University of Kansas, I worked as a tech assistant to the technical administrator, which is really just a fancy title for someone who messes around with the student database. + +By the time I graduated in 2007, technology had become inescapable. Every aspect of architectural engineering was deeply intertwined with computer science, so we all inadvertently learned simple programming skills. For me, that part was always more fascinating. But because I had to be a serious engineer, I developed a secret hobby: writing science fiction. + +In my stories, I lived vicariously through the lives of my heroines. They were scientists with amazing programming skills who were always getting embroiled in adventures and fighting tech scallywags with technology they invented, sometimes inventing them on the spot. Sometimes the new tech I came up with was based on real-world inventions. Other times it was the stuff I read about or saw in the science fiction I consumed. This meant that I had to understand how the tech worked and my research led me to some interesting subreddits and e-zines. + +### Open source: The ultimate goldmine + +Throughout my experiences, the fascinating weeks I'd spent writing out DOS commands remained a prominent influence, bleeding into little side projects and occupying valuable study time. As soon as Geocities became available to all Yahoo! Users, I created a website where I published blurry pictures that I'd taken on a tiny digital camera. I created websites for free, helped friends and family fix issues they had with their computers, and created a library database for a church. + +This meant that I was always researching and trying to find more information about how things could be made better. The Internet gods blessed me and open source fell into my lap. Suddenly, 30-day trials and restrictive licenses became a ghost of computing past. I could continue to create using GIMP, Inkscape, and OpenOffice. + +### Time to get serious + +I was fortunate to have a business partner who saw the magic in my stories. She too is a dreamer and visionary who imagines a better connected world that functions efficiently and conveniently. Together, we came up with several solutions to pain points we experienced in the journey to success, but implementation had been a problem. We both lacked the skills to make our products come to life, something that was made evident every time we approached investors with our ideas. + +We needed to learn to program. So, at the end of the summer in 2015, we embarked on a journey that would lead us right to the front steps of Holberton School, a community-driven, project-based school in San Francisco. + +My business partner came to me one morning and started a conversation the way she does when she has a new crazy idea that I'm about to get sucked into. + +**Zee**: Gloria, I'm going to tell you something and I want you to listen first before you say no. + +**Me**: No. + +**Zee**: We're going to be applying to go to a school for full-stack engineers. + +**Me**: What? + +**Zee**: Here, look! We're going to learn how to program by applying to this school. + +**Me**: I don't understand. We're doing online courses in Python and... + +**Zee**: This is different. Trust me. + +**Me**: What about the... + +**Zee**: That's not trusting me. + +**Me**: Fine. Show me. + +### Removing the bias + +What I read sounded similar to something we had seen online. It was too good to be true, but we decided to give it a try, jump in with both feet, and see what would come out of it. + +To become students, we had to go through a four-step selection process based solely on talent and motivation, not on the basis of educational degree or programming experience. The selection process is the beginning of the curriculum, so we started learning and collaborating through it. + +It has been my experience—and that of my business partner—that the process of applying for anything was an utter bore compared to the application process Holberton School created. It was like a game. If you completed a challenge, you got to go to the next level, where another fascinating challenge awaited. We created Twitter accounts, blogged on Medium, learned HTML and CSS in order to create a website, and created a vibrant community online even before we knew who was going to get to go. + +The most striking thing about the online community was how varied our experience with computers was, and how our background and gender did not factor into the choices that were being made by the founders (who we secretly called "The Trinity"). We just enjoyed being together and talking to each other. We were all smart people on a journey to increasing our nerd cred by learning how to code. + +For much of the application process, our identities were not very evident. For example, my business partner's name does not indicate her gender or race. It was during the final step, a video chat, that The Trinity even knew she was a woman of color. Thus far, only her enthusiasm and talent had propelled her through the levels. The color of her skin and her gender did not hinder nor help her. How cool is that? + +The night we got our acceptance letters, we knew our lives were about to change in ways we had only dreamt of. On the 22nd of January 2016, we walked into 98 Battery Street to meet our fellow [Hippokampoiers][2] for the first time. It was evident then, as it had been before, that the Trinity had started something amazing. They had assembled a truly diverse collection of passionate and enthusiastic people who had dedicated themselves to become full-stack engineers. + +The school is an experience like no other. Every day is an intense foray into some facet of programming. We're handed a project and, with a little guidance, we use every resource available to us to find the solution. The premise that [Holberton School][1] is built upon is that information is available to us in more places than we've ever had before. MOOCs, tutorials, the availability of open source software and projects, and online communities are all bursting at the seams with knowledge that shakes up some of the projects we have to complete. And with the support of the invaluable team of mentors to guide us to solutions, the school becomes more than just a school; we've become a community of learners. I would highly recommend this school for anyone who is interested in software engineering and is also interested in the learning style. The next class is in October 2016 and is accepting new applications. It's both terrifying and exhilarating, but so worth it. + +### Open source matters + +My earliest experience with an open source operating system was [Fedora][3], a [Red Hat][4]-sponsored project. During a panicked conversation with an IRC member, she recommended this free OS. I had never installed my own OS before, but it sparked my interest in open source and my dependence on open source software for my computing needs. We are advocates for open source contribution, creation, and use. Our projects are on GitHub where anyone can use or contribute to them. We also have the opportunity to access existing open source projects to use or contribute to in our own way. Many of the tools that we use at school are open source, such as Fedora, [Vagrant][5], [VirtualBox][6], [GCC][7], and [Discourse][8], to name a few. + +As I continue on my journey to becoming a software engineer, I still dream of a time when I will be able to contribute to the open source community and be able to share my knowledge with others. + +### Diversity Matters + +Standing in the room and talking to 29 other bright-eyed learners was intoxicating. 40% of the people there were women and 44% were people of color. These numbers become very important when you are a woman of color in a field that has been famously known for its lack of diversity. It was an oasis in the tech Mecca of the world. I knew I had arrived. + +The notion of becoming a full-stack engineer is daunting, and you may even struggle to know what that means. It is a challenging road to travel with immeasurable rewards to reap. The future is run by technology, and you are an important part of that bright future. While the media continues to trip over handling the issue of diversity in tech companies, know that whoever you are, whatever your background is, whatever your reasons might be for becoming a full-stack engineer, you can find a place to thrive. + +But perhaps most importantly, a strong reminder of the role of women in the history of computing can help more women return to the tech world, and they can be fully engaged without hesitation due to their gender or their capabilities as women. Their talents will help shape the future not just of tech, but of the world. + + +------------------------------------------------------------------------------ + +via: https://opensource.com/life/16/4/my-open-source-story-gloria-bwandungi + +作者:[Gloria Bwandungi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/nappybrain +[1]: https://www.holbertonschool.com/ +[2]: https://twitter.com/hippokampoiers +[3]: https://en.wikipedia.org/wiki/Fedora_(operating_system) +[4]: https://www.redhat.com/ +[5]: https://www.vagrantup.com/ +[6]: https://www.virtualbox.org/ +[7]: https://gcc.gnu.org/ +[8]: https://www.discourse.org/ From 7a63d4d8ae261a266b71bd30f08101e2dc8cafc3 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 1 May 2016 13:52:31 +0800 Subject: [PATCH 1285/1710] Translating sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md --- ... Resource Usage and Set Process Limits on a Per-User Basis.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md b/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md index 82bb9b4a74..877a3ee12f 100644 --- a/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md +++ b/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md @@ -1,3 +1,4 @@ +ictlyh Translating Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis ============================================================================================= From 9c36452fa1f917f1423771db805c7521ab12160f Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 1 May 2016 18:24:25 +0800 Subject: [PATCH 1286/1710] Translated translated/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md --- ... Set Process Limits on a Per-User Basis.md | 274 ----------------- ... Set Process Limits on a Per-User Basis.md | 275 ++++++++++++++++++ 2 files changed, 275 insertions(+), 274 deletions(-) delete mode 100644 sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md create mode 100644 translated/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md diff --git a/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md b/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md deleted file mode 100644 index 877a3ee12f..0000000000 --- a/sources/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md +++ /dev/null @@ -1,274 +0,0 @@ -ictlyh Translating -Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis -============================================================================================= - -Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Linux-Process-Monitoring-Set-Process-Limits-Per-User.png) ->Monitor Linux Processes and Set Process Limits Per User – Part 14 - -Every Linux system administrator needs to know how to verify the integrity and availability of hardware, resources, and key processes. In addition, setting resource limits on a per-user basis must also be a part of his / her skill set. - -In this article we will explore a few ways to ensure that the system both hardware and the software is behaving correctly to avoid potential issues that may cause unexpected production downtime and money loss. - -### Linux Reporting Processors Statistics - -With **mpstat** you can view the activities for each processor individually or the system as a whole, both as a one-time snapshot or dynamically. - -In order to use this tool, you will need to install **sysstat**: - -``` -# yum update && yum install sysstat [On CentOS based systems] -# aptitutde update && aptitude install sysstat [On Ubuntu based systems] -# zypper update && zypper install sysstat [On openSUSE systems] -``` - -Read more about sysstat and it’s utilities at [Learn Sysstat and Its Utilities mpstat, pidstat, iostat and sar in Linux][3] - -Once you have installed **mpstat**, use it to generate reports of processors statistics. - -To display **3** global reports of CPU utilization (`-u`) for all CPUs (as indicated by `-P` ALL) at a 2-second interval, do: - -``` -# mpstat -P ALL -u 2 3 -``` - -### Sample Output - -``` -Linux 3.19.0-32-generic (tecmint.com) Wednesday 30 March 2016 _x86_64_ (4 CPU) - -11:41:07 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle -11:41:09 IST all 5.85 0.00 1.12 0.12 0.00 0.00 0.00 0.00 0.00 92.91 -11:41:09 IST 0 4.48 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 94.53 -11:41:09 IST 1 2.50 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 97.00 -11:41:09 IST 2 6.44 0.00 0.99 0.00 0.00 0.00 0.00 0.00 0.00 92.57 -11:41:09 IST 3 10.45 0.00 1.99 0.00 0.00 0.00 0.00 0.00 0.00 87.56 - -11:41:09 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle -11:41:11 IST all 11.60 0.12 1.12 0.50 0.00 0.00 0.00 0.00 0.00 86.66 -11:41:11 IST 0 10.50 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 88.50 -11:41:11 IST 1 14.36 0.00 1.49 2.48 0.00 0.00 0.00 0.00 0.00 81.68 -11:41:11 IST 2 2.00 0.50 1.00 0.00 0.00 0.00 0.00 0.00 0.00 96.50 -11:41:11 IST 3 19.40 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 79.60 - -11:41:11 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle -11:41:13 IST all 5.69 0.00 1.24 0.00 0.00 0.00 0.00 0.00 0.00 93.07 -11:41:13 IST 0 2.97 0.00 1.49 0.00 0.00 0.00 0.00 0.00 0.00 95.54 -11:41:13 IST 1 10.78 0.00 1.47 0.00 0.00 0.00 0.00 0.00 0.00 87.75 -11:41:13 IST 2 2.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 97.00 -11:41:13 IST 3 6.93 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 92.57 - -Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle -Average: all 7.71 0.04 1.16 0.21 0.00 0.00 0.00 0.00 0.00 90.89 -Average: 0 5.97 0.00 1.16 0.00 0.00 0.00 0.00 0.00 0.00 92.87 -Average: 1 9.24 0.00 1.16 0.83 0.00 0.00 0.00 0.00 0.00 88.78 -Average: 2 3.49 0.17 1.00 0.00 0.00 0.00 0.00 0.00 0.00 95.35 -Average: 3 12.25 0.00 1.16 0.00 0.00 0.00 0.00 0.00 0.00 86.59 -``` - -To view the same statistics for a specific **CPU** (**CPU 0** in the following example), use: - -``` -# mpstat -P 0 -u 2 3 -``` - -### Sample Output - -``` -Linux 3.19.0-32-generic (tecmint.com) Wednesday 30 March 2016 _x86_64_ (4 CPU) - -11:42:08 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle -11:42:10 IST 0 3.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 96.50 -11:42:12 IST 0 4.08 0.00 0.00 2.55 0.00 0.00 0.00 0.00 0.00 93.37 -11:42:14 IST 0 9.74 0.00 0.51 0.00 0.00 0.00 0.00 0.00 0.00 89.74 -Average: 0 5.58 0.00 0.34 0.85 0.00 0.00 0.00 0.00 0.00 93.23 -``` - -The output of the above commands shows these columns: - -* `CPU`: Processor number as an integer, or the word all as an average for all processors. -* `%usr`: Percentage of CPU utilization while running user level applications. -* `%nice`: Same as `%usr`, but with nice priority. -* `%sys`: Percentage of CPU utilization that occurred while executing kernel applications. This does not include time spent dealing with interrupts or handling hardware. -* `%iowait`: Percentage of time when the given CPU (or all) was idle, during which there was a resource-intensive I/O operation scheduled on that CPU. A more detailed explanation (with examples) can be found [here][4]. -* `%irq`: Percentage of time spent servicing hardware interrupts. -* `%soft`: Same as `%irq`, but with software interrupts. -* `%steal`: Percentage of time spent in involuntary wait (steal or stolen time) when a virtual machine, as guest, is “winning” the hypervisor’s attention while competing for the CPU(s). This value should be kept as small as possible. A high value in this field means the virtual machine is stalling – or soon will be. -* `%guest`: Percentage of time spent running a virtual processor. -* `%idle`: percentage of time when CPU(s) were not executing any tasks. If you observe a low value in this column, that is an indication of the system being placed under a heavy load. In that case, you will need to take a closer look at the process list, as we will discuss in a minute, to determine what is causing it. - -To put the place the processor under a somewhat high load, run the following commands and then execute mpstat (as indicated) in a separate terminal: - -``` -# dd if=/dev/zero of=test.iso bs=1G count=1 -# mpstat -u -P 0 2 3 -# ping -f localhost # Interrupt with Ctrl + C after mpstat below completes -# mpstat -u -P 0 2 3 -``` - -Finally, compare to the output of **mpstat** under “normal” circumstances: - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Report-Processors-Related-Statistics.png) ->Report Linux Processors Related Statistics - -As you can see in the image above, **CPU 0** was under a heavy load during the first two examples, as indicated by the `%idle` column. - -In the next section we will discuss how to identify these resource-hungry processes, how to obtain more information about them, and how to take appropriate action. - -### Reporting Linux Processes - -To list processes sorting them by CPU usage, we will use the well known `ps` command with the `-eo` (to select all processes with user-defined format) and `--sort` (to specify a custom sorting order) options, like so: - -``` -# ps -eo pid,ppid,cmd,%cpu,%mem --sort=-%cpu -``` - -The above command will only show the `PID`, `PPID`, the command associated with the process, and the percentage of CPU and RAM usage sorted by the percentage of CPU usage in descending order. When executed during the creation of the .iso file, here’s the first few lines of the output: - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Linux-Processes-By-CPU-Usage.png) ->Find Linux Processes By CPU Usage - -Once we have identified a process of interest (such as the one with `PID=2822`), we can navigate to `/proc/PID` (`/proc/2822` in this case) and do a directory listing. - -This directory is where several files and subdirectories with detailed information about this particular process are kept while it is running. - -#### For example: - -* `/proc/2822/io` contains IO statistics for the process (number of characters and bytes read and written, among others, during IO operations). -* `/proc/2822/attr/current` shows the current SELinux security attributes of the process. -* `/proc/2822/cgroup` describes the control groups (cgroups for short) to which the process belongs if the CONFIG_CGROUPS kernel configuration option is enabled, which you can verify with: - -``` -# cat /boot/config-$(uname -r) | grep -i cgroups -``` - -If the option is enabled, you should see: - -``` -CONFIG_CGROUPS=y -``` - -Using `cgroups` you can manage the amount of allowed resource usage on a per-process basis as explained in Chapters 1 through 4 of the [Red Hat Enterprise Linux 7 Resource Management guide][5], in Chapter 9 of the [openSUSE System Analysis and Tuning guide][6], and in the [Control Groups section of the Ubuntu 14.04 Server documentation][7]. - -The `/proc/2822/fd` is a directory that contains one symbolic link for each file descriptor the process has opened. The following image shows this information for the process that was started in tty1 (the first terminal) to create the **.iso** image: - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Linux-Process-Information.png) ->Find Linux Process Information - -The above image shows that **stdin** (file descriptor **0**), **stdout** (file descriptor **1**), and **stderr** (file descriptor **2**) are mapped to **/dev/zero**, **/root/test.iso**, and **/dev/tty1**, respectively. - -More information about `/proc` can be found in “The `/proc` filesystem” document kept and maintained by Kernel.org, and in the Linux Programmer’s Manual. - -### Setting Resource Limits on a Per-User Basis in Linux - -If you are not careful and allow any user to run an unlimited number of processes, you may eventually experience an unexpected system shutdown or get locked out as the system enters an unusable state. To prevent this from happening, you should place a limit on the number of processes users can start. - -To do this, edit **/etc/security/limits.conf** and add the following line at the bottom of the file to set the limit: - -``` -* hard nproc 10 -``` - -The first field can be used to indicate either a user, a group, or all of them `(*)`, whereas the second field enforces a hard limit on the number of process (nproc) to **10**. To apply changes, logging out and back in is enough. - -Thus, let’s see what happens if a certain user other than root (either a legitimate one or not) attempts to start a shell fork bomb. If we had not implemented limits, this would initially launch two instances of a function, and then duplicate each of them in a neverending loop. Thus, it would eventually bringing your system to a crawl. - -However, with the above restriction in place, the fork bomb does not succeed but the user will still get locked out until the system administrator kills the process associated with it: - -![](http://www.tecmint.com/wp-content/uploads/2016/03/Shell-Fork-Bomb.png) ->Run Shell Fork Bomb - -**TIP**: Other possible restrictions made possible by **ulimit** are documented in the `limits.conf` file. - -### Linux Other Process Management Tools - -In addition to the tools discussed previously, a system administrator may also need to: - -**a)** Modify the execution priority (use of system resources) of a process using **renice**. This means that the kernel will allocate more or less system resources to the process based on the assigned priority (a number commonly known as “**niceness**” in a range from `-20` to `19`). - -The lower the value, the greater the execution priority. Regular users (other than root) can only modify the niceness of processes they own to a higher value (meaning a lower execution priority), whereas root can modify this value for any process, and may increase or decrease it. - -The basic syntax of renice is as follows: - -``` -# renice [-n] identifier -``` - -If the argument after the new priority value is not present (empty), it is set to PID by default. In that case, the niceness of process with **PID=identifier** is set to ``. - -**b)** Interrupt the normal execution of a process when needed. This is commonly known as [“killing” the process][9]. Under the hood, this means sending the process a signal to finish its execution properly and release any used resources in an orderly manner. - -To [kill a process][10], use the **kill** command as follows: - -``` -# kill PID -``` - -Alternatively, you can use [pkill to terminate all processes][11] of a given owner `(-u)`, or a group owner `(-G)`, or even those processes which have a PPID in common `(-P)`. These options may be followed by the numeric representation or the actual name as identifier: - -``` -# pkill [options] identifier -``` - -For example, - -``` -# pkill -G 1000 -``` - -will kill all processes owned by group with `GID=1000`. - -And, - -``` -# pkill -P 4993 -``` - -will kill all processes whose `PPID is 4993`. - -Before running a `pkill`, it is a good idea to test the results with `pgrep` first, perhaps using the `-l` option as well to list the processes’ names. It takes the same options but only returns the PIDs of processes (without taking any further action) that would be killed if `pkill` is used. - -``` -# pgrep -l -u gacanepa -``` - -This is illustrated in the next image: - -![](http://www.tecmint.com/wp-content/uploads/2016/03/List-User-Running-Processes.png) ->Find User Running Processes in Linux - -### Summary - -In this article we have explored a few ways to monitor resource usage in order to verify the integrity and availability of critical hardware and software components in a Linux system. - -We have also learned how to take appropriate action (either by adjusting the execution priority of a given process or by terminating it) under unusual circumstances. - -We hope the concepts explained in this tutorial have been helpful. If you have any questions or comments, feel free to reach us using the contact 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/installing-network-services-and-configuring-services-at-system-boot/ -[3]: http://www.tecmint.com/sysstat-commands-to-monitor-linux/ -[4]: http://veithen.github.io/2013/11/18/iowait-linux.html -[5]: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Resource_Management_Guide/index.html -[6]: https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.cgroups.html -[7]: https://help.ubuntu.com/lts/serverguide/cgroups.html -[8]: http://man7.org/linux/man-pages/man5/proc.5.html -[9]: http://www.tecmint.com/kill-processes-unresponsive-programs-in-ubuntu/ -[10]: http://www.tecmint.com/find-and-kill-running-processes-pid-in-linux/ -[11]: http://www.tecmint.com/how-to-kill-a-process-in-linux/ diff --git a/translated/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md b/translated/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md new file mode 100644 index 0000000000..c6db6be7cc --- /dev/null +++ b/translated/tech/LFCS/Part 14 - Monitor Linux Processes Resource Usage and Set Process Limits on a Per-User Basis.md @@ -0,0 +1,275 @@ +LFCS 系列第十四讲: Linux 进程资源使用监控和基于每个用户的进程限制设置 +============================================================================================= + +由于 2016 年 2 月 2 号开始启用了新的 LFCS 考试要求,我们在已经发表的 [LFCS 系列][1] 基础上增加了一些必要的主题。为了准备考试,同时也建议你看看 [LFCE 系列][2] 文章。 + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Linux-Process-Monitoring-Set-Process-Limits-Per-User.png) +>第十四讲: 监控 Linux 进程并为每个用户设置进程限制 + +每个 Linux 系统管理员都应该知道如何验证硬件、资源和主要进程的完整性和可用性。另外,基于每个用户设置资源限制也是其中一项必备技能。 + +在这篇文章中,我们会介绍一些能够确保系统硬件和软件正常工作的方法,这些方法能够避免潜在的会导致生产环境下线或钱财损失的问题发生。 + +### 报告 Linux 进程统计信息 + +你可以使用 **mpstat** 单独查看每个处理器或者系统整体的活动,可以是每次一个快照或者动态更新。 + +为了使用这个工具,你首先需要安装 **sysstat**: + +``` +# yum update && yum install sysstat [基于 CentOS 的系统] +# aptitutde update && aptitude install sysstat [基于 Ubuntu 的系统] +# zypper update && zypper install sysstat [基于 openSUSE 的系统] +``` + +你可以在 [在 Linux 中学习 Sysstat 和其中的工具 mpstat、pidstat、iostat 和 sar][3] 了解更多和 sysstat 和其中的工具相关的信息。 + +安装完 **mpstat** 之后,就可以使用它生成处理器统计信息的报告。 + +你可以使用下面的命令每隔 2 秒显示所有 CPU(用 `-P` ALL 表示) 的 CPU 利用率(`-u`),共显示 **3** 次。 + +``` +# mpstat -P ALL -u 2 3 +``` + +### 事例输出 + +``` +Linux 3.19.0-32-generic (tecmint.com) Wednesday 30 March 2016 _x86_64_ (4 CPU) + +11:41:07 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +11:41:09 IST all 5.85 0.00 1.12 0.12 0.00 0.00 0.00 0.00 0.00 92.91 +11:41:09 IST 0 4.48 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 94.53 +11:41:09 IST 1 2.50 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 97.00 +11:41:09 IST 2 6.44 0.00 0.99 0.00 0.00 0.00 0.00 0.00 0.00 92.57 +11:41:09 IST 3 10.45 0.00 1.99 0.00 0.00 0.00 0.00 0.00 0.00 87.56 + +11:41:09 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +11:41:11 IST all 11.60 0.12 1.12 0.50 0.00 0.00 0.00 0.00 0.00 86.66 +11:41:11 IST 0 10.50 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 88.50 +11:41:11 IST 1 14.36 0.00 1.49 2.48 0.00 0.00 0.00 0.00 0.00 81.68 +11:41:11 IST 2 2.00 0.50 1.00 0.00 0.00 0.00 0.00 0.00 0.00 96.50 +11:41:11 IST 3 19.40 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 79.60 + +11:41:11 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +11:41:13 IST all 5.69 0.00 1.24 0.00 0.00 0.00 0.00 0.00 0.00 93.07 +11:41:13 IST 0 2.97 0.00 1.49 0.00 0.00 0.00 0.00 0.00 0.00 95.54 +11:41:13 IST 1 10.78 0.00 1.47 0.00 0.00 0.00 0.00 0.00 0.00 87.75 +11:41:13 IST 2 2.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 97.00 +11:41:13 IST 3 6.93 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 92.57 + +Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +Average: all 7.71 0.04 1.16 0.21 0.00 0.00 0.00 0.00 0.00 90.89 +Average: 0 5.97 0.00 1.16 0.00 0.00 0.00 0.00 0.00 0.00 92.87 +Average: 1 9.24 0.00 1.16 0.83 0.00 0.00 0.00 0.00 0.00 88.78 +Average: 2 3.49 0.17 1.00 0.00 0.00 0.00 0.00 0.00 0.00 95.35 +Average: 3 12.25 0.00 1.16 0.00 0.00 0.00 0.00 0.00 0.00 86.59 +``` + +要查看指定的 **CPU**(在下面的例子中是 **CPU 0**),可以使用: + +``` +# mpstat -P 0 -u 2 3 +``` + +### 事例输出 + +``` +Linux 3.19.0-32-generic (tecmint.com) Wednesday 30 March 2016 _x86_64_ (4 CPU) + +11:42:08 IST CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle +11:42:10 IST 0 3.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 96.50 +11:42:12 IST 0 4.08 0.00 0.00 2.55 0.00 0.00 0.00 0.00 0.00 93.37 +11:42:14 IST 0 9.74 0.00 0.51 0.00 0.00 0.00 0.00 0.00 0.00 89.74 +Average: 0 5.58 0.00 0.34 0.85 0.00 0.00 0.00 0.00 0.00 93.23 +``` + +上面命令的输出包括这些列: + +* `CPU`: 整数表示的处理器号或者 all 表示所有处理器的平局值。 +* `%usr`: 运行在用户级别的应用的 CPU 利用率百分数。 +* `%nice`: 和 `%usr` 相同,但有 nice 优先级。 +* `%sys`: 执行内核应用的 CPU 利用率百分比。这不包括用于处理中断或者硬件请求的时间。 +* `%iowait`: 指定(或所有) CPU 的空闲时间百分比,这表示当前 CPU 处于 I/O 操作密集的状态。更详细的解释(附带示例)可以查看[这里][4]。 +* `%irq`: 用于处理硬件中断的时间所占百分比。 +* `%soft`: 和 `%irq` 相同,但是软中断。 +* `%steal`: 当一个客户虚拟机在竞争 CPU 时,非自主等待(时间片窃取)所占时间的百分比。应该保持这个值尽可能小。如果这个值很大,意味着虚拟机正在或者将要停止运转。 +* `%guest`: 运行虚拟处理器所用的时间百分比。 +* `%idle`: CPU(s) 没有运行任何任务所占时间的百分比。如果你观察到这个值很小,意味着系统负载很重。在这种情况下,你需要查看详细的进程列表、以及下面将要讨论的内容来确定这是什么原因导致的。 + +运行下面的命令使处理器处于极高负载,然后在另一个终端执行 mpstat 命令: + +``` +# dd if=/dev/zero of=test.iso bs=1G count=1 +# mpstat -u -P 0 2 3 +# ping -f localhost # Interrupt with Ctrl + C after mpstat below completes +# mpstat -u -P 0 2 3 +``` + +最后,和 “正常” 情况下 **mpstat** 的输出作比较: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Report-Processors-Related-Statistics.png) +> Linux 处理器相关统计信息报告 + +正如你在上面图示中看到的,在前面两个例子中,根据 `%idle` 的值可以判断 **CPU 0** 负载很高。 + +在下一部分,我们会讨论如何识别资源饥饿型进程,如何获取更多和它们相关的信息,以及如何采取恰当的措施。 + +### Linux 进程报告 + +我们可以使用有名的 `ps` 命令,用 `-eo` 选项(根据用户定义格式选中所有进程) 和 `--sort` 选项(指定自定义排序顺序)按照 CPU 使用率排序列出进程,例如: + +``` +# ps -eo pid,ppid,cmd,%cpu,%mem --sort=-%cpu +``` + +上面的命令只会显示 `PID`、`PPID`、和进程相关的命令、 CPU 使用率以及 RAM 使用率,并按照 CPU 使用率降序排序。创建 .iso 文件的时候运行上面的命令,下面是输出的前面几行: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Linux-Processes-By-CPU-Usage.png) +>根据 CPU 使用率查找进程 + +一旦我们找到了感兴趣的进程(例如 `PID=2822` 的进程),我们就可以进入 `/proc/PID`(本例中是 `/proc/2822`) 列出目录内容。 + +这个目录就是进程运行的时候保存多个关于该进程详细信息的文件和子目录的目录。 + +#### 例如: + +* `/proc/2822/io` 包括该进程的 IO 统计信息( IO 操作时的读写字符数)。 +* `/proc/2822/attr/current` 显示了进程当前的 SELinux 安全属性。 +* `/proc/2822/attr/current` shows the current SELinux security attributes of the process. +* `/proc/2822/cgroup` 如果启用了 CONFIG_CGROUPS 内核设置选项,这会显示该进程所属的控制组(简称 cgroups),你可以使用下面命令验证是否启用了 CONFIG_CGROUPS: + +``` +# cat /boot/config-$(uname -r) | grep -i cgroups +``` + +如果启用了该选项,你应该看到: + +``` +CONFIG_CGROUPS=y +``` + +根据 [红帽企业版 Linux 7 资源管理指南][5] 第一到四章的内容、[openSUSE 系统分析和调优指南][6] 第九章、[Ubuntu 14.04 服务器文档 Control Groups 章节][7],你可以使用 `cgroups` 管理每个进程允许使用的资源数目。 + +`/proc/2822/fd` 这个目录包含每个打开的描述进程的文件的符号链接。下面的截图显示了 tty1(第一个终端) 中创建 **.iso** 镜像进程的相关信息: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Linux-Process-Information.png) +>查找 Linux 进程信息 + +上面的截图显示 **stdin**(文件描述符 **0**)、**stdout**(文件描述符 **1**)、**stderr**(文件描述符 **2**) 相应地被映射到 **/dev/zero**、 **/root/test.iso** 和 **/dev/tty1**。 + +更多关于 `/proc` 信息的可以查看 Kernel.org 维护的 “`/proc` 文件系统” 和 Linux 开发者手册。 + +### 在 Linux 中为每个用户设置资源限制 + +如果你不够小心、让任意用户使用不受限制的进程数,最终你可能会遇到意外的系统关机或者由于系统进入不可用的状态而被锁住。为了防止这种情况发生,你应该为用户可以启动的进程数目设置上限。 + +你可以在 **/etc/security/limits.conf** 文件末尾添加下面一行来设置限制: + +``` +* hard nproc 10 +``` + +第一个字段可以用来表示一个用户、组或者所有`(*)`, 第二个字段强制限制可以使用的进程数目(nproc) 为 **10**。退出并重新登录就可以使设置生效。 + +然后,让我们来看看非 root 用户(合法用户或非法用户) 试图引起 shell fork bomb[WiKi][12] 时会发生什么。如果我们没有设置限制, shell fork bomb 会无限制地启动函数的两个实例,然后无限循环地复制任意一个实例。最终导致你的系统卡死。 + +但是,如果使用了上面的限制,fort bomb 就不会成功,但用户仍然会被锁在外面直到系统管理员杀死相关的进程。 + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Shell-Fork-Bomb.png) +>运行 Shell Fork Bomb + +**提示**: `limits.conf` 文件中可以查看其它 **ulimit** 可以更改的限制。 + +### 其它 Linux 进程管理工具 + +除了上面讨论的工具, 一个系统管理员还可能需要: + +**a)** 通过使用 **renice** 调整执行优先级(系统资源使用)。这意味着内核会根据分配的优先级(众所周知的 “**niceness**”,它是一个范围从 `-20` 到 `19` 的整数)给进程分配更多或更少的系统资源。 + +这个值越小,执行优先级越高。普通用户(而非 root)只能调高他们所有的进程的 niceness 值(意味着更低的优先级),而 root 用户可以调高或调低任何进程的 niceness 值。 + +renice 命令的基本语法如下: + +``` +# renice [-n] identifier +``` + +如果没有 new priority 后面的参数(为空),默认就是 PID。在这种情况下, **PID=identifier** 的进程的 niceness 值会被设置为 ``。 + +**b)** 需要的时候中断一个进程的正常执行。这也就是通常所说的 [“杀死”进程][9]。实质上,这意味着给进程发送一个信号使它恰当地结束运行并以有序的方式释放任何占用的资源。 + +按照下面的方式使用 **kill** 命令[杀死进程][10]: + +``` +# kill PID +``` + +另外,你也可以使用 [pkill][11] 结束指定用户`(-u)`、指定组`(-G)` 甚至有共同 PPID`(-P)` 的所有进程。这些选项后面可以使用数字或者名称表示的标识符。 + +``` +# pkill [options] identifier +``` + +例如: + +``` +# pkill -G 1000 +``` + +会杀死组 `GID=1000` 的所有进程。 + +而 + +``` +# pkill -P 4993 +``` + +会杀死 `PPID 是 4993` 的所有进程。 + +在运行 `pkill` 之前,先用 `pgrep` 测试结果、或者使用 `-l` 选项列出进程名称是一个很好的办法。它需要和 `pkill` 相同的参数、但是只会返回进程的 PID(而不会有其它操作),而 `pkill` 会杀死进程。 + +``` +# pgrep -l -u gacanepa +``` + +用下面的图片说明: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/List-User-Running-Processes.png) +>在 Linux 中查找用户运行的进程 + +### 总结 + +在这篇文章中我们探讨了一些监控资源使用的方法,以便验证 Linux 系统中重要硬件和软件组件的完整性和可用性。 + +我们也学习了如何在特殊情况下采取恰当的措施(通过调整给定进程的执行优先级或者结束进程)。 + +我们希望本篇中介绍的概念能对你有所帮助。如果你有任何疑问或者评论,可以使用下面的联系方式联系我们。 + + + + + +-------------------------------------------------------------------------------- + +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/installing-network-services-and-configuring-services-at-system-boot/ +[3]: http://www.tecmint.com/sysstat-commands-to-monitor-linux/ +[4]: http://veithen.github.io/2013/11/18/iowait-linux.html +[5]: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Resource_Management_Guide/index.html +[6]: https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.cgroups.html +[7]: https://help.ubuntu.com/lts/serverguide/cgroups.html +[8]: http://man7.org/linux/man-pages/man5/proc.5.html +[9]: http://www.tecmint.com/kill-processes-unresponsive-programs-in-ubuntu/ +[10]: http://www.tecmint.com/find-and-kill-running-processes-pid-in-linux/ +[11]: http://www.tecmint.com/how-to-kill-a-process-in-linux/ +[12]: https://en.wikipedia.org/wiki/Fork_bomb From 7350ee58828b7c8dc93e6f22ecb0670ccbe63544 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 1 May 2016 22:01:02 +0800 Subject: [PATCH 1287/1710] =?UTF-8?q?20160501-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lxd --- ... 3 - LXD 2.0 - Your first LXD container.md | 559 ++++++++++++++++++ 1 file changed, 559 insertions(+) create mode 100644 sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md diff --git a/sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md b/sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md new file mode 100644 index 0000000000..6dac73d080 --- /dev/null +++ b/sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md @@ -0,0 +1,559 @@ +Part 3 - LXD 2.0: Your first LXD container +========================================== + +This is the third blog post in this series about LXD 2.0. + +As there are a lot of commands involved with managing LXD containers, this post is rather long. If you’d instead prefer a quick step-by-step tour of those same commands, you can [try our online demo instead][1]! + +![](https://linuxcontainers.org/static/img/containers.png) + +### Creating and starting a new container + +As I mentioned in the previous posts, the LXD command line client comes pre-configured with a few image sources. Ubuntu is the best covered with official images for all its releases and architectures but there also are a number of unofficial images for other distributions. Those are community generated and maintained by LXC upstream contributors. + +### Ubuntu + +If all you want is the best supported release of Ubuntu, all you have to do is: + +``` +lxc launch ubuntu: +``` + +Note however that the meaning of this will change as new Ubuntu LTS releases are released. So for scripting use, you should stick to mentioning the actual release you want (see below). + +### Ubuntu 14.04 LTS + +To get the latest, tested, stable image of Ubuntu 14.04 LTS, you can simply run: + +``` +lxc launch ubuntu:14.04 +``` + +In this mode, a random container name will be picked. +If you prefer to specify your own name, you may instead do: + +``` +lxc launch ubuntu:14.04 c1 +``` + +Should you want a specific (non-primary) architecture, say a 32bit Intel image, you can do: + +``` +lxc launch ubuntu:14.04/i386 c2 +``` + +### Current Ubuntu development release + +The “ubuntu:” remote used above only provides official, tested images for Ubuntu. If you instead want untested daily builds, as is appropriate for the development release, you’ll want to use the “ubuntu-daily:” remote instead. + +``` +lxc launch ubuntu-daily:devel c3 +``` + +In this example, whatever the latest Ubuntu development release is will automatically be picked. + +You can also be explicit, for example by using the code name: + +``` +lxc launch ubuntu-daily:xenial c4 +``` + +### Latest Alpine Linux + +Alpine images are available on the “images:” remote and can be launched with: + +``` +lxc launch images:alpine/3.3/amd64 c5 +``` + +### And many more + +A full list of the Ubuntu images can be obtained with: + +``` +lxc image list ubuntu: +lxc image list ubuntu-daily: +``` + +And of all the unofficial images: + +``` +lxc image list images: +``` + +A list of all the aliases (friendly names) available on a given remote can also be obtained with (for the “ubuntu:” remote): + +``` +lxc image alias list ubuntu: +``` + +### Creating a container without starting it + +If you want to just create a container or a batch of container but not also start them immediately, you can just replace “lxc launch” by “lxc init”. All the options are identical, the only different is that it will not start the container for you after creation. + +``` +lxc init ubuntu: +``` + +### Information about your containers + +#### Listing the containers + +To list all your containers, you can do: + +``` +lxc list +``` + +There are a number of options you can pass to change what columns are displayed. On systems with a lot of containers, the default columns can be a bit slow (due to having to retrieve network information from the containers), you may instead want: + +``` +lxc list --fast +``` + +Which shows a different set of columns that require less processing on the server side. + +You can also filter based on name or properties: + +``` +stgraber@dakara:~$ lxc list security.privileged=true ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +| suse | RUNNING | 172.17.0.105 (eth0) | 2607:f2c0:f00f:2700:216:3eff:fef2:aff4 (eth0) | PERSISTENT | 0 | ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +``` + +In this example, only containers that are privileged (user namespace disabled) are listed. + +``` +stgraber@dakara:~$ lxc list --fast alpine ++-------------+---------+--------------+----------------------+----------+------------+ +| NAME | STATE | ARCHITECTURE | CREATED AT | PROFILES | TYPE | ++-------------+---------+--------------+----------------------+----------+------------+ +| alpine | RUNNING | x86_64 | 2016/03/20 02:11 UTC | default | PERSISTENT | ++-------------+---------+--------------+----------------------+----------+------------+ +| alpine-edge | RUNNING | x86_64 | 2016/03/20 02:19 UTC | default | PERSISTENT | ++-------------+---------+--------------+----------------------+----------+------------+ +``` + +And in this example, only the containers which have “alpine” in their names (complex regular expressions are also supported). + +#### Getting detailed information from a container + +As the list command obviously can’t show you everything about a container in a nicely readable way, you can query information about an individual container with: + +``` +lxc info +``` + +For example: + +``` +stgraber@dakara:~$ lxc info zerotier +Name: zerotier +Architecture: x86_64 +Created: 2016/02/20 20:01 UTC +Status: Running +Type: persistent +Profiles: default +Pid: 31715 +Processes: 32 +Ips: + eth0: inet 172.17.0.101 + eth0: inet6 2607:f2c0:f00f:2700:216:3eff:feec:65a8 + eth0: inet6 fe80::216:3eff:feec:65a8 + lo: inet 127.0.0.1 + lo: inet6 ::1 + lxcbr0: inet 10.0.3.1 + lxcbr0: inet6 fe80::c0a4:ceff:fe52:4d51 + zt0: inet 29.17.181.59 + zt0: inet6 fd80:56c2:e21c:0:199:9379:e711:b3e1 + zt0: inet6 fe80::79:e7ff:fe0d:5123 +Snapshots: + zerotier/blah (taken at 2016/03/08 23:55 UTC) (stateless) + ``` + +### Life-cycle management commands + +Those are probably the most obvious commands of any container or virtual machine manager but they still need to be covered. + +Oh and all of them accept multiple container names for batch operation. + +#### start + +Starting a container is as simple as: + +``` +lxc start +``` + +#### stop + +Stopping a container can be done with: + +``` +lxc stop +``` + +If the container isn’t cooperating (not responding to SIGPWR), you can force it with: + +``` +lxc stop --force +``` + +#### restart + +Restarting a container is done through: + +``` +lxc restart +``` + +And if not cooperating (not responding to SIGINT), you can force it with: + +``` +lxc restart --force +``` + +#### pause + +You can also “pause” a container. In this mode, all the container tasks will be sent the equivalent of a SIGSTOP which means that they will still be visible and will still be using memory but they won’t get any CPU time from the scheduler. + +This is useful if you have a CPU hungry container that takes quite a while to start but that you aren’t constantly using. You can let it start, then pause it, then start it again when needed. + +``` +lxc pause +``` + +#### delete + +Lastly, if you want a container to go away, you can delete it for good with: + +``` +lxc delete +``` + +Note that you will have to pass “–force” if the container is currently running. + +### Container configuration + +LXD exposes quite a few container settings, including resource limitation, control of container startup and a variety of device pass-through options. The full list is far too long to cover in this post but it’s available [here][2]. + +As far as devices go, LXD currently supports the following device types: + +- disk +This can be a physical disk or partition being mounted into the container or a bind-mounted path from the host. +- nic +A network interface. It can be a bridged virtual ethernet interrface, a point to point device, an ethernet macvlan device or an actual physical interface being passed through to the container. +- unix-block +A UNIX block device, e.g. /dev/sda +- unix-char +A UNIX character device, e.g. /dev/kvm +- none +This special type is used to hide a device which would otherwise be inherited through profiles. + +#### Configuration profiles + +The list of all available profiles can be obtained with: + +``` +lxc profile list +``` + +To see the content of a given profile, the easiest is to use: + +``` +lxc profile show +``` + +And should you want to change anything inside it, use: + +``` +lxc profile edit +``` + +You can change the list of profiles which apply to a given container with: + +``` +lxc profile apply ,,,... +``` + +#### Local configuration + +For things that are unique to a container and so don’t make sense to put into a profile, you can just set them directly against the container: + +``` +lxc config edit +``` + +This behaves the exact same way as “profile edit” above. + +Instead of opening the whole thing in a text editor, you can also modify individual keys with: + +``` +lxc config set +``` +Or add devices, for example: + +``` +lxc config device add my-container kvm unix-char path=/dev/kvm +``` + +Which will setup a /dev/kvm entry for the container named “my-container”. + +The same can be done for a profile using “lxc profile set” and “lxc profile device add”. + +#### Reading the configuration + +You can read the container local configuration with: + +``` +lxc config show +``` + +Or to get the expanded configuration (including all the profile keys): + +``` +lxc config show --expanded +``` + +For example: + +``` +stgraber@dakara:~$ lxc config show --expanded zerotier +name: zerotier +profiles: +- default +config: + security.nesting: "true" + user.a: b + volatile.base_image: a49d26ce5808075f5175bf31f5cb90561f5023dcd408da8ac5e834096d46b2d8 + volatile.eth0.hwaddr: 00:16:3e:ec:65:a8 + volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]' +devices: + eth0: + name: eth0 + nictype: macvlan + parent: eth0 + type: nic + limits.ingress: 10Mbit + limits.egress: 10Mbit + root: + path: / + size: 30GB + type: disk + tun: + path: /dev/net/tun + type: unix-char +ephemeral: false +``` + +That one is very convenient to check what will actually be applied to a given container. + +#### Live configuration update + +Note that unless indicated in the documentation, all configuration keys and device entries are applied to affected containers live. This means that you can add and remove devices or alter the security profile of running containers without ever having to restart them. + +### Getting a shell + +LXD lets you execute tasks directly into the container. The most common use of this is to get a shell in the container or to run some admin tasks. + +The benefit of this compared to SSH is that you’re not dependent on the container being reachable over the network or on any software or configuration being present inside the container. + +Execution environment + +One thing that’s a bit unusual with the way LXD executes commands inside the container is that it’s not itself running inside the container, which means that it can’t know what shell to use, what environment variables to set or what path to use for your home directory. + +Commands executed through LXD will always run as the container’s root user (uid 0, gid 0) with a minimal PATH environment variable set and a HOME environment variable set to /root. + +Additional environment variables can be passed through the command line or can be set permanently against the container through the “environment.” configuration options. + +#### Executing commands + +Getting a shell inside a container is typically as simple as: + +``` +lxc exec bash +``` + +That’s assuming the container does actually have bash installed. + + +More complex commands require the use of a separator for proper argument parsing: + +``` +lxc exec -- ls -lh / +``` + +To set or override environment variables, you can use the “–env” argument, for example: + +``` +stgraber@dakara:~$ lxc exec zerotier --env mykey=myvalue env | grep mykey +mykey=myvalue +``` + +### Managing files + +Because LXD has direct access to the container’s file system, it can directly read and write any file inside the container. This can be very useful to pull log files or exchange files with the container. + +#### Pulling a file from the container + +To get a file from the container, simply run: + +``` +lxc file pull / +``` + +For example: + +``` +stgraber@dakara:~$ lxc file pull zerotier/etc/hosts hosts +``` + +Or to read it to standard output: + +``` +stgraber@dakara:~$ lxc file pull zerotier/etc/hosts - +127.0.0.1 localhost + +# The following lines are desirable for IPv6 capable hosts +::1 ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +ff02::3 ip6-allhosts +``` + +#### Pushing a file to the container + +Push simply works the other way: + +``` +lxc file push / +``` + +#### Editing a file directly + +Edit is a convenience function which simply pulls a given path, opens it in your default text editor and then pushes it back to the container when you close it: + +``` +lxc file edit / +``` + +### Snapshot management + +LXD lets you snapshot and restore containers. Snapshots include the entirety of the container’s state (including running state if –stateful is used), which means all container configuration, container devices and the container file system. + +#### Creating a snapshot + +You can snapshot a container with: + +``` +lxc snapshot +``` + +It’ll get named snapX where X is an incrementing number. + +Alternatively, you can name your snapshot with: + +``` +lxc snapshot +``` + +#### Listing snapshots + +The number of snapshots a container has is listed in “lxc list”, but the actual snapshot list is only visible in “lxc info”. + +``` +lxc info +``` + +#### Restoring a snapshot + +To restore a snapshot, simply run: + +``` +lxc restore +``` + +#### Renaming a snapshot + +Renaming a snapshot can be done by moving it with: + +``` +lxc move / / +``` + +#### Creating a new container from a snapshot + +You can create a new container which will be identical to another container’s snapshot except for the volatile information being reset (MAC address): + +``` +lxc copy / +``` + +#### Deleting a snapshot + +And finally, to delete a snapshot, just run: + +``` +lxc delete / +``` + +### Cloning and renaming + +Getting clean distribution images is all nice and well, but sometimes you want to install a bunch of things into your container, configure it and then branch it into a bunch of other containers. + +#### Copying a container + +To copy a container and effectively clone it into a new one, just run: + +``` +lxc copy +``` + +The destination container will be identical in every way to the source one, except it won’t have any snapshot and volatile keys (MAC address) will be reset. + +#### Moving a container + +LXD lets you copy and move containers between hosts, but that will get covered in a later post. + +For now, the “move” command can be used to rename a container with: + +``` +lxc move +``` + +The only requirement is that the container be stopped, everything else will be kept exactly as it was, including the volatile information (MAC address and such). + +### Conclusion + +This pretty long post covered most of the commands you’re likely to use in day to day operation. + +Obviously a lot of those commands have extra arguments that let you be more efficient or tweak specific aspects of your LXD containers. The best way to learn about all of those is to go through the help for those you care about (–help). + +### Extra information + +The main LXD website is at: +Development happens on Github at: +Mailing-list support happens on: +IRC support happens in: #lxcontainers on irc.freenode.net + +And if you don’t want or can’t install LXD on your own machine, you can always [try it online instead][1]! + + +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.stgraber.org/author/stgraber/ +[1]: https://linuxcontainers.org/lxd/try-it +[2]: https://github.com/lxc/lxd/blob/master/doc/configuration.md From 2bb5c6a2c30540a40df2fc16c1c9aca18b451b9e Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 2 May 2016 15:25:45 +0800 Subject: [PATCH 1288/1710] [translating]An Introduction to SELinux --- sources/tech/20160204 An Introduction to SELinux.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/tech/20160204 An Introduction to SELinux.md b/sources/tech/20160204 An Introduction to SELinux.md index dc5968ad00..dbf579c461 100644 --- a/sources/tech/20160204 An Introduction to SELinux.md +++ b/sources/tech/20160204 An Introduction to SELinux.md @@ -1,3 +1,5 @@ +alim0x translating + An Introduction to SELinux =============================== @@ -37,7 +39,7 @@ Sounds relatively simple, right? There’s actually more to it than that, but fo ### The Modes -SELinux has three modes (which can be set by the user). These modes will dictate how SELinux acts upon subject request. The modes are: +SELinux has three modes (which can be set by the user). These modes will dictate how SELinux acts upon subject request. The modes are: - Enforcing — SELinux policy is enforced and subjects will be denied or granted access to objects based on the SELinux policy rules @@ -57,7 +59,7 @@ You can change the SELinux mode from the command line or in the /etc/selinux/con 3. Issue the command setenforce 1 -4. Issue the command getenforce to ensure the mode has been set (Figure 2) +4. Issue the command getenforce to ensure the mode has been set (Figure 2) ![](https://www.linux.com/images/stories/66866/jack-selinux_b.png) From 0a465a9535c95e36475929d8585db99f03559961 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 2 May 2016 16:01:03 +0800 Subject: [PATCH 1289/1710] Translating sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md --- ... Startup Process and Services SysVinit Systemd and Upstart.md | 1 + 1 file changed, 1 insertion(+) 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 2a822e8a45..af3ac034be 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,4 @@ +ictlyh Translating 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. From f1259934f8af8b592b957f207416b753b5dcdbed Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 2 May 2016 21:35:38 +0800 Subject: [PATCH 1290/1710] =?UTF-8?q?20160502-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Part 1 - LXD 2.0: Introduction to LXD.md | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md new file mode 100644 index 0000000000..bc25ecc57c --- /dev/null +++ b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -0,0 +1,156 @@ +Part 1 - LXD 2.0: Introduction to LXD +====================================== + +This is the first blog post [in this series about LXD 2.0][1]. + +![](https://linuxcontainers.org/static/img/containers.png) + +### A few common questions about LXD + +#### What’s LXD? + +At its simplest, LXD is a daemon which provides a REST API to drive LXC containers. + +Its main goal is to provide a user experience that’s similar to that of virtual machines but using Linux containers rather than hardware virtualization. + + +#### How does LXD relate to Docker/Rkt? + +This is by far the question we get the most, so lets address it immediately! + +LXD focuses on system containers, also called infrastructure containers. That is, a LXD container runs a full Linux system, exactly as it would be when run on metal or in a VM. + +Those containers will typically be long running and based on a clean distribution image. Traditional configuration management tools and deployment tools can be used with LXD containers exactly as you would use them for a VM, cloud instance or physical machine. + +In contrast, Docker focuses on ephemeral, stateless, minimal containers that won’t typically get upgraded or re-configured but instead just be replaced entirely. That makes Docker and similar projects much closer to a software distribution mechanism than a machine management tool. + +The two models aren’t mutually exclusive either. You can absolutely use LXD to provide full Linux systems to your users who can then install Docker inside their LXD container to run the software they want. + +#### Why LXD? + +We’ve been working on LXC for a number of years now. LXC is great at what it does, that is, it provides a very good set of low-level tools and a library to create and manage containers. + +However that kind of low-level tools aren’t necessarily very user friendly. They require a lot of initial knowledge to understand what they do and how they work. Keeping backward compatibility with older containers and deployment methods has also prevented LXC from using some security features by default, leading to more manual configuration for users. + +We see LXD as the opportunity to address those shortcomings. On top of being a long running daemon which lets us address a lot of the LXC limitations like dynamic resource restrictions, container migration and efficient live migration, it also gave us the opportunity to come up with a new default experience, that’s safe by default and much more user focused. + +### The main LXD components + +There are a number of main components that make LXD, those are typically visible in the LXD directory structure, in its command line client and in the API structure itself. + +#### Containers + +Containers in LXD are made of: + +- A filesystem (rootfs) +- A list of configuration options, including resource limits, environment, security options and more +- A bunch of devices like disks, character/block unix devices and network interfaces +- A set of profiles the container inherits configuration from (see below) +- Some properties (container architecture, ephemeral or persistent and the name) +- Some runtime state (when using CRIU for checkpoint/restore) + +#### Snapshots + +Container snapshots are identical to containers except for the fact that they are immutable, they can be renamed, destroyed or restored but cannot be modified in any way. + +It is worth noting that because we allow storing the container runtime state, this effectively gives us the concept of “stateful” snapshots. That is, the ability to rollback the container including its cpu and memory state at the time of the snapshot. + +#### Images + +LXD is image based, all LXD containers come from an image. Images are typically clean Linux distribution images similar to what you would use for a virtual machine or cloud instance. + +It is possible to “publish” a container, making an image from it which can then be used by the local or remote LXD hosts. + +Images are uniquely identified by their sha256 hash and can be referenced by using their full or partial hash. Because typing long hashes isn’t particularly user friendly, images can also have any number of properties applied to them, allowing for an easy search through the image store. Aliases can also be set as a one to one mapping between a unique user friendly string and an image hash. + +LXD comes pre-configured with three remote image servers (see remotes below): + +- “ubuntu:” provides stable Ubuntu images +- “ubunt-daily:” provides daily builds of Ubuntu +- “images:” is a community run image server providing images for a number of other Linux distributions using the upstream LXC templates +Remote images are automatically cached by the LXD daemon and kept for a number of days (10 by default) since they were last used before getting expired. + +Additionally LXD also automatically updates remote images (unless told otherwise) so that the freshest version of the image is always available locally. + +#### Profiles + +Profiles are a way to define container configuration and container devices in one place and then have it apply to any number of containers. + +A container can have multiple profiles applied to it. When building the final container configuration (known as expanded configuration), the profiles will be applied in the order they were defined in, overriding each other when the same configuration key or device is found. Then the local container configuration is applied on top of that, overriding anything that came from a profile. + +LXD ships with two pre-configured profiles: + +- “default” is automatically applied to all containers unless an alternative list of profiles is provided by the user. This profile currently does just one thing, define a “eth0” network device for the container. +- “docker” is a profile you can apply to a container which you want to allow to run Docker containers. It requests LXD load some required kernel modules, turns on container nesting and sets up a few device entries. + +#### Remotes + +As I mentioned earlier, LXD is a networked daemon. The command line client that comes with it can therefore talk to multiple remote LXD servers as well as image servers. + +By default, our command line client comes with the following remotes defined + +local: (default remote, talks to the local LXD daemon over a unix socket) +ubuntu: (Ubuntu image server providing stable builds) +ubuntu-daily: (Ubuntu image server providing daily builds) +images: (images.linuxcontainers.org image server) +Any combination of those remotes can be used with the command line client. + +You can also add any number of remote LXD hosts that were configured to listen to the network. Either anonymously if they are a public image server or after going through authentication when managing remote containers. + +It’s that remote mechanism that makes it possible to interact with remote image servers as well as copy or move containers between hosts. + +### Security + +One aspect that was core to our design of LXD was to make it as safe as possible while allowing modern Linux distributions to run inside it unmodified. + +The main security features used by LXD through its use of the LXC library are: + +- Kernel namespaces. Especially the user namespace as a way to keep everything the container does separate from the rest of the system. LXD uses the user namespace by default (contrary to LXC) and allows for the user to turn it off on a per-container basis (marking the container “privileged”) when absolutely needed. +- Seccomp. To filter some potentially dangerous system calls. +- AppArmor: To provide additional restrictions on mounts, socket, ptrace and file access. Specifically restricting cross-container communication. +- Capabilities. To prevent the container from loading kernel modules, altering the host system time, … +- CGroups. To restrict resource usage and prevent DoS attacks against the host. +Rather than exposing those features directly to the user as LXC would, we’ve built a new configuration language which abstracts most of those into something that’s more user friendly. For example, one can tell LXD to pass any host device into the container without having to also lookup its major/minor numbers to manually update the cgroup policy. + +Communications with LXD itself are secured using TLS 1.2 with a very limited set of allowed ciphers. When dealing with hosts outside of the system certificate authority, LXD will prompt the user to validate the remote fingerprint (SSH style), then cache the certificate for future use. + +### The REST API + +Everything that LXD does is done over its REST API. There is no other communication channel between the client and the daemon. + +The REST API can be access over a local unix socket, only requiring group membership for authentication or over a HTTPs socket using a client certificate for authentication. + +The structure of the REST API matches the different components described above and is meant to be very simple and intuitive to use. + +When a more complex communication mechanism is required, LXD will negotiate websockets and use those for the rest of the communication. This is used for interactive console session, container migration and for event notification. + +With LXD 2.0, comes the /1.0 stable API. We will not break backward compatibility within the /1.0 API endpoint however we may add extra features to it, which we’ll signal by declaring additional API extensions that the client can look for. + +### Containers at scale + +While LXD provides a good command line client, that client isn’t meant to manage thousands of containers on multiple hosts. For that kind of use cases, we have nova-lxd which is an OpenStack plugin that makes OpenStack treat LXD containers in the exact same way it would treat VMs. + +This allows for very large deployments of LXDs on a large number of hosts, using the OpenStack APIs to manage network, storage and load-balancing. + +### Extra information + +The main LXD website is at: +Development happens on Github at: +Mailing-list support happens on: +IRC support happens in: #lxcontainers on irc.freenode.net + +And if you can’t wait until the next few posts to try LXD, you can [take our guided tour online][2] and try it for free right from your web browser! + +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[1]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[2]: https://linuxcontainers.org/lxd/try-it From cfb84eb18396ae0bd4ed0c45127940d48a10abbe Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 2 May 2016 21:37:42 +0800 Subject: [PATCH 1291/1710] Update Part 3 - LXD 2.0 - Your first LXD container.md --- .../tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md b/sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md index 6dac73d080..7bf9ba5b16 100644 --- a/sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md +++ b/sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md @@ -1,7 +1,7 @@ Part 3 - LXD 2.0: Your first LXD container ========================================== -This is the third blog post in this series about LXD 2.0. +This is the third blog post [in this series about LXD 2.0][0]. As there are a lot of commands involved with managing LXD containers, this post is rather long. If you’d instead prefer a quick step-by-step tour of those same commands, you can [try our online demo instead][1]! @@ -554,6 +554,7 @@ via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:https://www.stgraber.org/author/stgraber/ +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ [1]: https://linuxcontainers.org/lxd/try-it [2]: https://github.com/lxc/lxd/blob/master/doc/configuration.md From 3ade3e75864c23dda26cea71bbe892735e7f62fa Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 2 May 2016 21:45:27 +0800 Subject: [PATCH 1292/1710] Update Part 1 - LXD 2.0: Introduction to LXD.md --- sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index bc25ecc57c..a80ad34453 100644 --- a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -143,7 +143,7 @@ And if you can’t wait until the next few posts to try LXD, you can [take our g -------------------------------------------------------------------------------- -via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ +via: https://www.stgraber.org/2016/03/11/lxd-2-0-introduction-to-lxd-112/ 作者:[Stéphane Graber][a] 译者:[译者ID](https://github.com/译者ID) From af4beaa4758365ad79ff2b2fac710dff0a983714 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 2 May 2016 21:52:39 +0800 Subject: [PATCH 1293/1710] =?UTF-8?q?20160502-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...LXD 2.0: Installing and configuring LXD.md | 230 ++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md diff --git a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md new file mode 100644 index 0000000000..56dc7ba607 --- /dev/null +++ b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md @@ -0,0 +1,230 @@ +Part 2 - LXD 2.0: Installing and configuring LXD +================================================= + +This is the second blog post in this series about LXD 2.0. + +![](https://linuxcontainers.org/static/img/containers.png) + +### Where to get LXD and how to install it + +There are many ways to get the latest and greatest LXD. We recommend you use LXD with the latest LXC and Linux kernel to benefit from all its features but we try to degrade gracefully where possible to support older Linux distributions. + +#### The Ubuntu archive + +All new releases of LXD get uploaded to the Ubuntu development release within a few minutes of the upstream release. That package is then used to seed all the other source of packages for Ubuntu users. + +If you are using the Ubuntu development release (16.04), you can simply do: + +``` +sudo apt install lxd +``` + +If you are running Ubuntu 14.04, we have backport packages available for you with: + +``` +sudo apt -t trusty-backports install lxd +``` + +#### The Ubuntu Core store + +Users of Ubuntu Core on the stable release can install LXD with: + +``` +sudo snappy install lxd.stgraber +``` + +#### The official Ubuntu PPA + +Users of other Ubuntu releases such as Ubuntu 15.10 can find LXD packages in the following PPA (Personal Package Archive): + +``` +sudo apt-add-repository ppa:ubuntu-lxc/stable +sudo apt update +sudo apt dist-upgrade +sudo apt install lxd +``` + +#### The Gentoo archive + +Gentoo has pretty recent LXD packages available too, you can install those with: + +``` +sudo emerge --ask lxd +``` + +#### From source + +Building LXD from source isn’t very difficult if you are used to building Go projects. Note however that you will need the LXC development headers. In order to run LXD, your distribution also needs a recent Linux kernel (3.13 at least), recent LXC (1.1.5 or higher), LXCFS and a version of shadow that supports user sub-uid/gid allocations. + +The latest instructions on building LXD from source can be found in the [upstream README][2]. + +### Networking on Ubuntu + +The Ubuntu packages provide you with a “lxdbr0” bridge as a convenience. This bridge comes unconfigured by default, offering only IPv6 link-local connectivity through an HTTP proxy. + +To reconfigure the bridge and add some IPv4 or IPv6 subnet to it, you can run: + +``` +sudo dpkg-reconfigure -p medium lxd +``` + +Or go through the whole LXD step by step setup (see below) with: + +``` +sudo lxd init +``` + +### Storage backends + +LXD supports a number of storage backends. It’s best to know what backend you want to use prior to starting to use LXD as we do not support moving existing containers or images between backends. + +A feature comparison table of the different backends can be found [here][3]. + +#### ZFS + +Our recommendation is ZFS as it supports all the features LXD needs to offer the fastest and most reliable container experience. This includes per-container disk quotas, immediate snapshot/restore, optimized migration (send/receive) and instant container creation from an image. It is also considered more mature than btrfs. + +To use ZFS with LXD, you first need ZFS on your system. + +If using Ubuntu 16.04, simply install it with: + +``` +sudo apt install zfsutils-linux +``` + +On Ubuntu 15.10, you can install it with: + +``` +sudo apt install zfsutils-linux zfs-dkms +``` + +And on older releases, you can use the zfsonlinux PPA: + +``` +sudo apt-add-repository ppa:zfs-native/stable +sudo apt update +sudo apt install ubuntu-zfs +``` + +To configure LXD to use it, simply run: + +``` +sudo lxd init +``` + +This will ask you a few questions about what kind of zfs configuration you’d like for your LXD and then configure it for you. + +#### btrfs + +If ZFS isn’t available, then btrfs offers the same level of integration with the exception that it doesn’t properly report disk usage inside the container (quotas do apply though). +btrfs also has the nice property that it can nest properly which ZFS doesn’t yet. That is, if you plan on using LXD inside LXD, btrfs is worth considering. + +LXD doesn’t need any configuration to use btrfs, you just need to make sure that /var/lib/lxd is stored on a btrfs filesystem and LXD will automatically make use of it for you. + +#### LVM + +If ZFS and btrfs aren’t an option for you, you can still get some of their benefits by using LVM instead. LXD uses LVM with thin provisioning, creating an LV for each image and container and using LVM snapshots as needed. + +To configure LXD to use LVM, create a LVM VG and run: + +``` +lxc config set storage.lvm_vg_name "THE-NAME-OF-YOUR-VG" +``` + +By default LXD uses ext4 as the filesystem for all the LVs. You can change that to XFS if you’d like: + +``` +lxc config set storage.lvm_fstype xfs +``` + +#### Simple directory + +If none of the above are an option for you, LXD will still work but without any of those advanced features. It will simply create a directory for each container, unpack the image tarballs for each container creation and do a full filesystem copy on container copy or snapshot. + +All features are supported except for disk quotas, but this is very wasteful of disk space and also very slow. If you have no other choice, it will work, but you should really consider one of the alternatives above. + + + +### More daemon configuration + +The complete list of configuration options for the LXD daemon can be found [here][4]. + +#### Network configuration + +By default LXD doesn’t listen to the network. The only way to talk to it is over a local unix socket at /var/lib/lxd/unix.socket. + +To have it listen to the network, there are two useful keys to set: + +``` +lxc config set core.https_address [::] +lxc config set core.trust_password some-secret-string +``` + +The first instructs LXD to bind the “::” IPv6 address, namely, all addresses on the machine. You can obviously replace this by a specific IPv4 or IPv6 address and can append the TCP port you’d like it to bind (defaults to 8443). + +The second sets a password which is used for remote clients to add themselves to the LXD certificate trust store. When adding the LXD host, they will be prompted for the password, if the password matches, the LXD daemon will store their client certificate and they’ll be trusted, never needing the password again (it can be changed or unset entirely at that point). + +You can also choose not to set a password and instead manually trust each new client by having them give you their “client.crt” file (from ~/.config/lxc) and add it to the trust store yourself with: + +``` +lxc config trust add client.crt +``` + +#### Proxy configuration + +In most setups, you’ll want the LXD daemon to fetch images from remote servers. + +If you are in an environment where you must go through a HTTP(s) proxy to reach the outside world, you’ll want to set a few configuration keys or alternatively make sure that the standard PROXY environment variables are set in the daemon’s environment. + +``` +lxc config set core.proxy_http http://squid01.internal:3128 +lxc config set core.proxy_https http://squid01.internal:3128 +lxc config set core.proxy_ignore_hosts image-server.local +``` + +With those, all transfers initiated by LXD will use the squid01.internal HTTP proxy, except for traffic to the server at image-server.local + +#### Image management + +LXD does dynamic image caching. When instructed to create a container from a remote image, it will download that image into its image store, mark it as cached and record its origin. After a number of days without seeing any use (10 by default), the image is automatically removed. Every few hours (6 by default), LXD also goes looking for a newer version of the image and updates its local copy. + +All of that can be configured through the following configuration options: + +``` +lxc config set images.remote_cache_expiry 5 +lxc config set images.auto_update_interval 24 +lxc config set images.auto_update_cached false +``` + +Here we are instructing LXD to override all of those defaults and instead cache images for up to 5 days since they were last used, look for image updates every 24 hours and only update images which were directly marked as such (–auto-update flag in lxc image copy) but not the images which were automatically cached by LXD. + +### Conclusion + +At this point you should have a working version of the latest LXD release, you can now start playing with it on your own or wait for the next blog post where we’ll create our first container and play with the LXD command line tool. + +### Extra information + +The main LXD website is at: +Development happens on Github at: +Mailing-list support happens on: +IRC support happens in: #lxcontainers on irc.freenode.net + +And if you don’t want or can’t install LXD on your own machine, you can always [try it online instead][1]! + + +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[1]: https://linuxcontainers.org/lxd/try-it +[2]: https://github.com/lxc/lxd/blob/master/README.md +[3]: https://github.com/lxc/lxd/blob/master/doc/storage-backends.md +[4]: https://github.com/lxc/lxd/blob/master/doc/configuration.md From 4f1b1dc3c47ebbf402712202095ddf7b3574d610 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 2 May 2016 21:53:48 +0800 Subject: [PATCH 1294/1710] Rename Part 3 - LXD 2.0 - Your first LXD container.md to Part 3 - LXD 2.0: Your first LXD container.md --- ...container.md => Part 3 - LXD 2.0: Your first LXD container.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/LXD/{Part 3 - LXD 2.0 - Your first LXD container.md => Part 3 - LXD 2.0: Your first LXD container.md} (100%) diff --git a/sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md b/sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md similarity index 100% rename from sources/tech/LXD/Part 3 - LXD 2.0 - Your first LXD container.md rename to sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md From 8246b259c4895eb1dd807f6a759c70df6721f3a8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 3 May 2016 09:54:32 +0800 Subject: [PATCH 1295/1710] translating by ezio --- sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index a80ad34453..b228894c75 100644 --- a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -1,3 +1,5 @@ +translating by ezio + Part 1 - LXD 2.0: Introduction to LXD ====================================== From 4a07b2e0b8fbb460c4e063466c1be13064c352cc Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 3 May 2016 10:21:17 +0800 Subject: [PATCH 1296/1710] Update Part 1 - LXD 2.0: Introduction to LXD.md --- .../Part 1 - LXD 2.0: Introduction to LXD.md | 54 ++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index b228894c75..4c33d2fc8f 100644 --- a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -1,46 +1,52 @@ translating by ezio -Part 1 - LXD 2.0: Introduction to LXD +Part 1 - LXD 2.0: LXD 入门 ====================================== -This is the first blog post [in this series about LXD 2.0][1]. +这是 [LXD 2.0 系列介绍文章][1]的第一篇。 ![](https://linuxcontainers.org/static/img/containers.png) -### A few common questions about LXD -#### What’s LXD? +### 关于 LXD 几个常见问题 + +#### 什么是 LXD ? At its simplest, LXD is a daemon which provides a REST API to drive LXC containers. Its main goal is to provide a user experience that’s similar to that of virtual machines but using Linux containers rather than hardware virtualization. +简单来说 LXD 就是一个提供了 REST API 的 LXC 容器管理器。 -#### How does LXD relate to Docker/Rkt? +LXD 最主要的目标就是使用 Linux 容器而不是硬件虚拟化向用户提供一种接近虚拟机的使用体验。 -This is by far the question we get the most, so lets address it immediately! +#### LXD 和 Docker/Rkt 又有什么关系呢 ? -LXD focuses on system containers, also called infrastructure containers. That is, a LXD container runs a full Linux system, exactly as it would be when run on metal or in a VM. +这是一个最常被问起的问题,现在就让我们直接指出其中的不同吧。 -Those containers will typically be long running and based on a clean distribution image. Traditional configuration management tools and deployment tools can be used with LXD containers exactly as you would use them for a VM, cloud instance or physical machine. +LXD 聚焦于系统容器,通常也被称为架构容器。这就是说 LXD 容器实际上运行了一个完整的 Linux 操作系统,就像在裸机或虚拟机上运行的一样。 -In contrast, Docker focuses on ephemeral, stateless, minimal containers that won’t typically get upgraded or re-configured but instead just be replaced entirely. That makes Docker and similar projects much closer to a software distribution mechanism than a machine management tool. +这些容器一般都是基于一个干净的发布镜像,会长时间运行。传统的配置管理工具和发布工具可以和 LXD 一起使用,就像你在虚拟机、云或者物理机器上使用一样。 -The two models aren’t mutually exclusive either. You can absolutely use LXD to provide full Linux systems to your users who can then install Docker inside their LXD container to run the software they want. +相对的, Docker 关注于短视的、无状态的最小容器,这些容器通常并不会升级或者重新配置,它们一般都是作为一个整体被替换掉。这就使得 Docker 和类似的项目更像是一种软件发布机制,而不是一个机器管理工具。 -#### Why LXD? +这两种模型并不是完全互斥的。你完全可以使用 LXD 为你的用户提供一个完整的 Linux 系统,而他们可以在 LXD 上面安装 Docker 来运行他们想要的软件。 -We’ve been working on LXC for a number of years now. LXC is great at what it does, that is, it provides a very good set of low-level tools and a library to create and manage containers. -However that kind of low-level tools aren’t necessarily very user friendly. They require a lot of initial knowledge to understand what they do and how they work. Keeping backward compatibility with older containers and deployment methods has also prevented LXC from using some security features by default, leading to more manual configuration for users. +#### 为什么要用 LXD? -We see LXD as the opportunity to address those shortcomings. On top of being a long running daemon which lets us address a lot of the LXC limitations like dynamic resource restrictions, container migration and efficient live migration, it also gave us the opportunity to come up with a new default experience, that’s safe by default and much more user focused. +我们已经在 LXC 上工作了好几个年头了。 LXC 成功的实现了它的目标,它提供了一系列很棒的底层工具和库来创建、管理容器。 -### The main LXD components +然而这些底层工具的使用界面对用户并不是很友好。他们需要用户有很多的基础知识来理解他们要干什么和怎么去干。同时向后兼容旧的容器和部署策略已经阻止 LXC 默认使用一些安全特性,这导致用户需要进行更多人工操作来实现本可以自动完成的工作。 + +我们把 LXD 作为解决这些缺陷的一个很好的机会。作为一个长时间运行的守护进程可以让我们定位到很多 LXC 的限制,比如动态资源限制,容器迁移和有效的进行在线迁移,它同时也给了我们机会来提供一个新的默认体验:默认开启安全特性,对用户更加友好。 + + +### LXD 的主要组件 There are a number of main components that make LXD, those are typically visible in the LXD directory structure, in its command line client and in the API structure itself. -#### Containers +#### 容器 Containers in LXD are made of: @@ -51,13 +57,13 @@ Containers in LXD are made of: - Some properties (container architecture, ephemeral or persistent and the name) - Some runtime state (when using CRIU for checkpoint/restore) -#### Snapshots +#### 快照 Container snapshots are identical to containers except for the fact that they are immutable, they can be renamed, destroyed or restored but cannot be modified in any way. It is worth noting that because we allow storing the container runtime state, this effectively gives us the concept of “stateful” snapshots. That is, the ability to rollback the container including its cpu and memory state at the time of the snapshot. -#### Images +#### 镜像 LXD is image based, all LXD containers come from an image. Images are typically clean Linux distribution images similar to what you would use for a virtual machine or cloud instance. @@ -74,7 +80,7 @@ Remote images are automatically cached by the LXD daemon and kept for a number o Additionally LXD also automatically updates remote images (unless told otherwise) so that the freshest version of the image is always available locally. -#### Profiles +#### 配置 Profiles are a way to define container configuration and container devices in one place and then have it apply to any number of containers. @@ -85,7 +91,7 @@ LXD ships with two pre-configured profiles: - “default” is automatically applied to all containers unless an alternative list of profiles is provided by the user. This profile currently does just one thing, define a “eth0” network device for the container. - “docker” is a profile you can apply to a container which you want to allow to run Docker containers. It requests LXD load some required kernel modules, turns on container nesting and sets up a few device entries. -#### Remotes +#### 远程 As I mentioned earlier, LXD is a networked daemon. The command line client that comes with it can therefore talk to multiple remote LXD servers as well as image servers. @@ -101,7 +107,7 @@ You can also add any number of remote LXD hosts that were configured to listen t It’s that remote mechanism that makes it possible to interact with remote image servers as well as copy or move containers between hosts. -### Security +### 安全性 One aspect that was core to our design of LXD was to make it as safe as possible while allowing modern Linux distributions to run inside it unmodified. @@ -116,7 +122,7 @@ Rather than exposing those features directly to the user as LXC would, we’ve b Communications with LXD itself are secured using TLS 1.2 with a very limited set of allowed ciphers. When dealing with hosts outside of the system certificate authority, LXD will prompt the user to validate the remote fingerprint (SSH style), then cache the certificate for future use. -### The REST API +### REST 接口 Everything that LXD does is done over its REST API. There is no other communication channel between the client and the daemon. @@ -128,13 +134,13 @@ When a more complex communication mechanism is required, LXD will negotiate webs With LXD 2.0, comes the /1.0 stable API. We will not break backward compatibility within the /1.0 API endpoint however we may add extra features to it, which we’ll signal by declaring additional API extensions that the client can look for. -### Containers at scale +### 容器规模化 While LXD provides a good command line client, that client isn’t meant to manage thousands of containers on multiple hosts. For that kind of use cases, we have nova-lxd which is an OpenStack plugin that makes OpenStack treat LXD containers in the exact same way it would treat VMs. This allows for very large deployments of LXDs on a large number of hosts, using the OpenStack APIs to manage network, storage and load-balancing. -### Extra information +### 额外信息 The main LXD website is at: Development happens on Github at: From cc2a52290c4381863422aacc022e7a3a9a96a427 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 3 May 2016 10:43:24 +0800 Subject: [PATCH 1297/1710] translating by ezio --- .../LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md index 56dc7ba607..5f6f492ce1 100644 --- a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md +++ b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md @@ -1,3 +1,5 @@ +translating by ezio + Part 2 - LXD 2.0: Installing and configuring LXD ================================================= From 860c74a8234c5c14253664161bdca1e377ee7761 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 3 May 2016 11:13:26 +0800 Subject: [PATCH 1298/1710] Update Part 2 - LXD 2.0: Installing and configuring LXD.md --- ...LXD 2.0: Installing and configuring LXD.md | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md index 5f6f492ce1..079b91c429 100644 --- a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md +++ b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md @@ -1,43 +1,43 @@ translating by ezio -Part 2 - LXD 2.0: Installing and configuring LXD +Part 2 - LXD 2.0: 安装与配置 ================================================= -This is the second blog post in this series about LXD 2.0. +这是 LXD 2.0 [系列介绍文章][2]的第二篇。 ![](https://linuxcontainers.org/static/img/containers.png) -### Where to get LXD and how to install it +### 安装篇 There are many ways to get the latest and greatest LXD. We recommend you use LXD with the latest LXC and Linux kernel to benefit from all its features but we try to degrade gracefully where possible to support older Linux distributions. -#### The Ubuntu archive +#### Ubuntu 标准版 All new releases of LXD get uploaded to the Ubuntu development release within a few minutes of the upstream release. That package is then used to seed all the other source of packages for Ubuntu users. -If you are using the Ubuntu development release (16.04), you can simply do: +如果使用 Ubuntu 16.04 则可以直接安装: ``` sudo apt install lxd ``` -If you are running Ubuntu 14.04, we have backport packages available for you with: +如果运行的是 Ubuntu 14.04,可以这样安装: ``` sudo apt -t trusty-backports install lxd ``` -#### The Ubuntu Core store +#### Ubuntu Core -Users of Ubuntu Core on the stable release can install LXD with: +使用Ubuntu Core 稳定版的用户可以使用下面的命令安装 LXD: ``` sudo snappy install lxd.stgraber ``` -#### The official Ubuntu PPA +#### ubuntu 官方 PPA -Users of other Ubuntu releases such as Ubuntu 15.10 can find LXD packages in the following PPA (Personal Package Archive): +是哟个其他 Ubuntu 发布版 —— 比如 Ubuntu 15.10 —— 的用户可以添加下面的 PPA (Personal Package Archive) 来安装: ``` sudo apt-add-repository ppa:ubuntu-lxc/stable @@ -46,21 +46,21 @@ sudo apt dist-upgrade sudo apt install lxd ``` -#### The Gentoo archive +#### Gentoo -Gentoo has pretty recent LXD packages available too, you can install those with: +Gentoo 已经有了最新的 LXD 安装包,你可以直接安装: ``` sudo emerge --ask lxd ``` -#### From source +#### 源代码 Building LXD from source isn’t very difficult if you are used to building Go projects. Note however that you will need the LXC development headers. In order to run LXD, your distribution also needs a recent Linux kernel (3.13 at least), recent LXC (1.1.5 or higher), LXCFS and a version of shadow that supports user sub-uid/gid allocations. The latest instructions on building LXD from source can be found in the [upstream README][2]. -### Networking on Ubuntu +### ubuntu 上的网络配置 The Ubuntu packages provide you with a “lxdbr0” bridge as a convenience. This bridge comes unconfigured by default, offering only IPv6 link-local connectivity through an HTTP proxy. @@ -76,7 +76,7 @@ Or go through the whole LXD step by step setup (see below) with: sudo lxd init ``` -### Storage backends +### 存储系统 LXD supports a number of storage backends. It’s best to know what backend you want to use prior to starting to use LXD as we do not support moving existing containers or images between backends. @@ -86,21 +86,22 @@ A feature comparison table of the different backends can be found [here][3]. Our recommendation is ZFS as it supports all the features LXD needs to offer the fastest and most reliable container experience. This includes per-container disk quotas, immediate snapshot/restore, optimized migration (send/receive) and instant container creation from an image. It is also considered more mature than btrfs. -To use ZFS with LXD, you first need ZFS on your system. -If using Ubuntu 16.04, simply install it with: +要和 LXD 一起使用 ZFS ,你需要首先在你的系统上安装 ZFS。 + +如果你是用的是 Ubuntu 16.04 , 你只需要简单的使用命令安装: ``` sudo apt install zfsutils-linux ``` -On Ubuntu 15.10, you can install it with: +在 Ubuntu 15.10 上你可以这样安装: ``` sudo apt install zfsutils-linux zfs-dkms ``` -And on older releases, you can use the zfsonlinux PPA: +如果是更旧的版本,你需要这样安装: ``` sudo apt-add-repository ppa:zfs-native/stable @@ -108,7 +109,7 @@ sudo apt update sudo apt install ubuntu-zfs ``` -To configure LXD to use it, simply run: +配置 LXD 只需要简单的执行下面的命令: ``` sudo lxd init @@ -139,7 +140,7 @@ By default LXD uses ext4 as the filesystem for all the LVs. You can change that lxc config set storage.lvm_fstype xfs ``` -#### Simple directory +#### 简单目录 If none of the above are an option for you, LXD will still work but without any of those advanced features. It will simply create a directory for each container, unpack the image tarballs for each container creation and do a full filesystem copy on container copy or snapshot. @@ -147,11 +148,11 @@ All features are supported except for disk quotas, but this is very wasteful of -### More daemon configuration +### 配置篇 The complete list of configuration options for the LXD daemon can be found [here][4]. -#### Network configuration +#### 网络配置 By default LXD doesn’t listen to the network. The only way to talk to it is over a local unix socket at /var/lib/lxd/unix.socket. @@ -172,7 +173,7 @@ You can also choose not to set a password and instead manually trust each new cl lxc config trust add client.crt ``` -#### Proxy configuration +#### 代理配置 In most setups, you’ll want the LXD daemon to fetch images from remote servers. @@ -186,7 +187,7 @@ lxc config set core.proxy_ignore_hosts image-server.local With those, all transfers initiated by LXD will use the squid01.internal HTTP proxy, except for traffic to the server at image-server.local -#### Image management +#### 镜像管理 LXD does dynamic image caching. When instructed to create a container from a remote image, it will download that image into its image store, mark it as cached and record its origin. After a number of days without seeing any use (10 by default), the image is automatically removed. Every few hours (6 by default), LXD also goes looking for a newer version of the image and updates its local copy. @@ -200,19 +201,18 @@ lxc config set images.auto_update_cached false Here we are instructing LXD to override all of those defaults and instead cache images for up to 5 days since they were last used, look for image updates every 24 hours and only update images which were directly marked as such (–auto-update flag in lxc image copy) but not the images which were automatically cached by LXD. -### Conclusion +### 总结 At this point you should have a working version of the latest LXD release, you can now start playing with it on your own or wait for the next blog post where we’ll create our first container and play with the LXD command line tool. -### Extra information +### 额外信息 -The main LXD website is at: -Development happens on Github at: -Mailing-list support happens on: -IRC support happens in: #lxcontainers on irc.freenode.net - -And if you don’t want or can’t install LXD on your own machine, you can always [try it online instead][1]! +LXD 的主站在: +LXD 的 GitHub 仓库: +LXD 的邮件列表: +LXD 的 IRC 频道: #lxcontainers on irc.freenode.net +如果你不想或者不能在你的机器上安装 LXD ,你可以[试试在线版的 LXD][1] 。 -------------------------------------------------------------------------------- From 981b20fbd4060aa3aab0382361abba76b45102b0 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 3 May 2016 21:52:36 +0800 Subject: [PATCH 1299/1710] [translated]20160204 An Introduction to SELinux --- .../20160204 An Introduction to SELinux.md | 138 ----------------- .../20160204 An Introduction to SELinux.md | 139 ++++++++++++++++++ 2 files changed, 139 insertions(+), 138 deletions(-) delete mode 100644 sources/tech/20160204 An Introduction to SELinux.md create mode 100644 translated/tech/20160204 An Introduction to SELinux.md diff --git a/sources/tech/20160204 An Introduction to SELinux.md b/sources/tech/20160204 An Introduction to SELinux.md deleted file mode 100644 index dbf579c461..0000000000 --- a/sources/tech/20160204 An Introduction to SELinux.md +++ /dev/null @@ -1,138 +0,0 @@ -alim0x translating - -An Introduction to SELinux -=============================== - -![](https://www.linux.com/images/stories/66866/jack2-selinux_a.png) - ->Figure 1: The getenforce command reporting SELinux is set to Enforcing. - -Way back in kernel 2.6, a new security system was introduced to provide a mechanism for supporting access control security policies. This system was [Security Enhanced Linux (SELinux)][1] and was introduced by the [National Security Administration (NSA)][2] to incorporate a strong Mandatory Access Control architecture into the subsystems of the Linux kernel. - -If you’ve spent your entire Linux career either disabling or ignoring SELinux, this article is dedicated to you — an introduction to the system that lives “under the hood” of your Linux desktop or server to limit privilege or even eliminate the possibility of damage should programs or daemons become compromised. - -Before I begin, you should know that SELinux is primarily a tool for Red Hat Linux and its derivatives. The likes of Ubuntu and SUSE (and their derivatives) make use of AppArmor. SELinux and AppArmor are significantly different. You can install SELinux on SUSE, openSUSE, Ubuntu, etc., but it’s an incredibly challenging task unless you’re very well versed in Linux. - -With that said, let me introduce you to SELinux. - -### DAC vs. MAC - -The old-guard standard form of access control on Linux was Discretionary Access Control (DAC). With this form, an application or daemon runs under either User ID (UID) or Set owner User ID (SUID) and holds object permissions (for files, sockets, and other processes) of that user. This made it easier for malicious code to be run with a permission set that would grant it access to crucial subsystems. - -Mandatory Access Control (MAC), on the other hand, enforces the separation of information based on both confidentiality and integrity to enable the confinement of damage. The confinement unit operates independently of the traditional Linux security mechanisms and has no concept of a superuser. - -### How SELinux Works - -Consider these pieces of the SELinux puzzle: - -- Subjects - -- Objects - -- Policy - -- Mode - -When a subject (such as an application) attempts to access an object (such as a file), the SELinux Security Server (inside the kernel) runs a check against the Policy Database. Depending on the current mode, if the SELinux Security Server grants permission, the subject is given access to the object. If the SELinux Security Server denies permission, a denied message is logged in /var/log/messages. - -Sounds relatively simple, right? There’s actually more to it than that, but for the sake of introduction, those are the important steps. - -### The Modes - -SELinux has three modes (which can be set by the user). These modes will dictate how SELinux acts upon subject request. The modes are: - -- Enforcing — SELinux policy is enforced and subjects will be denied or granted access to objects based on the SELinux policy rules - -- Permissive — SELinux policy is not enforced and does not deny access, although denials are logged - -- Disabled — SELinux is completely disabled - -Out of the box, most systems have SELinux set to Enforcing. How do you know what mode your system is currently running? You can use a simple command to report the mode; that command is getenforce. This command is incredibly simple to use (as it has the singular purpose of reporting the SELinux mode). To use this tool, open up a terminal window and issue the command getenforce. The report will come back with either, Enforcing, Permissive, or Disabled (see Figure 1 above). - -Setting the SELinux mode is actually quite simple — depending upon the mode you want to set. Understand this: It is never recommended to set SELinux to Disable. Why? When you do this, you open up the possibility that files on your disk will be mislabeled and require a re-label to fix. It is also not possible to change the mode of a system when it has been booted in Disabled mode. Your best modes are either Enabled or Permissive. - -You can change the SELinux mode from the command line or in the /etc/selinux/config file. To set the mod via command line, you use the setenforce tool. To set the mode to Enforcing, do the following: - -1. Open up a terminal window - -2. Issue the command su and then enter your administrator password - -3. Issue the command setenforce 1 - -4. Issue the command getenforce to ensure the mode has been set (Figure 2) - -![](https://www.linux.com/images/stories/66866/jack-selinux_b.png) - ->Figure 2: Setting the SELinux mode to Enforcing. - -To set the mode to Permissive, do this: - -1. Open up a terminal window - -2. Issue the command su and then enter your administrator password - -3. Issue the command setenforce 0 - -4. Issue the command getenforce to ensure the mode has been set (Figure 3) - -![](https://www.linux.com/images/stories/66866/jack-selinux_c.png) - ->Figure 3: Setting the SELinux mode to Permissive. - -NOTE: Setting the mode via command line overrides the setting in the SELinux config file. - -If you’d prefer to set the mode in the SELinux command file, open up that particular file in your favorite text editor and look for the line: - ->SELINUX=permissive - -You can change the mode to suit your preference and then save the file. - -There is also a third method of changing the SELinux mode (via the bootloader), but I don’t recommend it for a beginning user. - -### Policy Type - -There are two types of SELinux policies: - -- Targeted — only targeted network daemons (dhcpd, httpd, named, nscd, ntpd, portmap, snmpd, squid, and syslogd) are protected - -- Strict — full SELinux protection for all daemons - -You can change the policy type within the /etc/selinux/config file. Open the file in your favorite text editor and look for the line: - ->SELINUXTYPE=targeted - -Change the option in that line to either targeted or strict to match your needs. - -### Checking the Full SELinux Status - -There is a handy SELinux tool you might want to know about that will display a detailed status report of your SELinux-enabled system. The command is run from a terminal window like this: - ->sestatus -v - -You should see output similar to that shown in Figure 4. - -![](https://www.linux.com/images/stories/66866/jack-selinux_d.png) - ->Figure 4: The output of the sestatus -v command. - -### Just Scratching the Surface - -As you might expect, I have only scratched the surface of SELinux. It is quite a complex system and will require diving much deeper to obtain a solid understanding of how it works for you and how you can make it better work for your desktops and servers. I still have yet to cover troubleshooting and creating custom SELinux policies. - -SELinux is a powerful tool that any Linux administrator should know. Now that you’ve been introduced, I highly recommend you return to Linux.com (when more tutorials on the subject are posted) or take a look at the [NSA SELinux documentation][3] for very in-depth tutorials. - - --------------------------------------------------------------------------------- - -via: https://www.linux.com/learn/docs/ldp/883671-an-introduction-to-selinux - -作者:[Jack Wallen][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.com/community/forums/person/93 -[1]: http://selinuxproject.org/page/Main_Page -[2]: https://www.nsa.gov/research/selinux/ -[3]: https://www.nsa.gov/research/selinux/docs.shtml diff --git a/translated/tech/20160204 An Introduction to SELinux.md b/translated/tech/20160204 An Introduction to SELinux.md new file mode 100644 index 0000000000..bc82106189 --- /dev/null +++ b/translated/tech/20160204 An Introduction to SELinux.md @@ -0,0 +1,139 @@ +An Introduction to SELinux +=============================== + +![](https://www.linux.com/images/stories/66866/jack2-selinux_a.png) + +>图 1:getenforce 命令显示 SELinux 的状态是 Enforcing 启用状态。 + +回到 Kernel 2.6 时代,那时候引入了一个新的安全系统,用以提供访问控制安全策略的机制。这个系统就是 [Security Enhanced Linux (SELinux)][1],它是由[美国国家安全局(NSA)][2]引入的,合并进 Linux 内核子系统的强制控制访问架构实现。 + +如果你在你整个 Linux 生涯中禁用或忽略 SELinux,这篇文章就是为你量身定制的——对存在于你的 Linux 桌面或服务器之下的 SELinux 系统的介绍,它能够限制权限,甚至消除程序或守护进程的妥协而造成破坏的可能性。 + +在我开始之前,你应该了解的是 SELinux 主要是红帽 Red Hat Linux 以及它的衍生发行版的一个工具。这就类似 Ubuntu 和 SUSE(以及它们的衍生发行版)使用 AppArmor 一样。SELinux 和 AppArmor 有显著的不同。你可以在 SUSE,openSUSE,Ubuntu 等等发行版上安装 SELinux,但这是项难以置信的挑战,除非你十分精通 Linux。 + +说了这么多,让我来向你介绍 SELinux。 + +### DAC vs. MAC + +Linux 上保守的访问控制标准是自主访问控制(Discretionary Access Control,DAC)。在这种形式下,一个软件或守护进程运行在 User ID(UID)或 Set User ID(SUID)下,并且拥有该用户的目标权限(文件,套接字,以及其它进程)。这使得恶意代码很容易运行在特定权限之下,从而取得访问关键的子系统的权限。 + +另一方面,强制访问控制(Mandatory Access Control,MAC)基于保密性和完整性强制信息的隔离以限制破坏。限制单元相对于传统的 Linux 安全机制独立运作,并且没有超级用户的概念。 + +### SELinux 如何工作 + +考虑一下 SELinux 的相关概念: + +- Subjects 主体 + +- Objects 目标 + +- Policy 策略 + +- Mode 模式 + +当一个主体(Subject,如一个程序)尝试访问一个目标(Object,如一个文件),SELinux 安全服务器(SELinux Security Server,在内核中)从策略数据库中运行一个检查。基于当前的模式,如果 SELinux 安全服务器授予权限,该主体就能够访问该目标。如果 SELinux 安全服务器拒绝了权限,一条拒绝信息会被记录到 /var/log/messages。 + +听起来相对比较简单是不是?实际上过程要更加复杂,但为了简单介绍,这些是重要的步骤。 + +### 模式 + +SELinux 有三个模式(可以由用户设置)。这些模式将规定 SELinux 在主体请求时如何应对。这些模式是: + +- Enforcing — SELinux 策略强制执行,基于 SELinux 策略规则授予或拒绝主体对目标的访问 + +- Permissive — SELinux 策略不强制执行,不实际拒绝访问,但会有警告信息且拒绝会写入日志 + +- Disabled — 完全禁用 SELinux + +默认情况下,大部分系统的 SELinux 设置为 Enforcing。你要如何知道你的系统当前是什么模式?你可以使用一条简单的命令来查看,这条命令就是 getenforce。这个命令用起来难以置信的简单(因为它仅仅用来报告 SELinux 的模式)。要使用这个工具,打开一个终端窗口并执行 getenforce 命令。命令会返回 Enforcing,Permissive,或者 Disabled(见上方图 1)。 + +设置 SELinux 的模式实际上很简单——取决于你想设置什么模式。记住:永远不推荐关闭 SELinux。为什么?当你这么做了,你就有了这种可能性:你磁盘上的文件可能会被打上错误的标签,需要你重新标签来修复。而且你无法修改一个以 Disabled 模式启动的系统的模式。你的最佳模式是 Enforcing 或者 Permissive。 + +你可以从命令行或 /etc/selinux/config 文件更改 SELinux 的模式。要从命令行设置模式,你可以使用 setenforce 工具。要设置 Enforcing 模式,按下面这么做: + +1. 打开一个终端窗口 + +2. 执行 su 然后输入你的管理员密码 + +3. 执行 setenforce 1 + +4. 执行 getenforce 确定模式已经正确设置(图 2) + +![](https://www.linux.com/images/stories/66866/jack-selinux_b.png) + +>图 2:设置 SELinux 模式为 Enforcing。 + +要设置模式为 Permissive,这么做: + +1. 打开一个终端窗口 + +2. 执行 su 然后输入你的管理员密码 + +3. 执行 setenforce 0 + +4. 执行 getenforce 确定模式已经正确设置(图 3) + +![](https://www.linux.com/images/stories/66866/jack-selinux_c.png) + +>图 3:设置 SELinux 模式为 Permissive. + +注:通过命令行设置模式会覆盖 SELinux 配置文件中的设置。 + +如果你更愿意在 SELinux 命令文件中设置模式,用你喜欢的编辑器打开那个文件找到这一行: + +>SELINUX=permissive + +你可以按你的偏好设置模式,然后保存文件。 + +还有第三种方法修改 SELinux 的模式(通过 bootloader),但我不推荐新用户这么做。 + +### 策略类型 + +SELinux 策略有两种: + +- Targeted — 只有目标网络进程(dhcpd,httpd,named,nscd,ntpd,portmap,snmpd,squid,以及 syslogd)受保护 + +- Strict — 对所有进程完全的 SELinux 保护 + +你可以在 /etc/selinux/config 文件中修改策略类型。用你喜欢的编辑器打开这个文件找到这一行: + +>SELINUXTYPE=targeted + +修改这个选项为 targeted 或 strict 以满足你的需求。 + +### 检查完整的 SELinux 状态 + +有个方便的 SELinux 工具,你可能想要用它来获取你启用了 SELinux 的系统的详细状态报告。这个命令在终端像这样运行: + +>sestatus -v + +你可以看到像图 4 那样的输出。 + +![](https://www.linux.com/images/stories/66866/jack-selinux_d.png) + +>图 4:sestatus -v 命令的输出。 + +### 仅是皮毛 + +和你预想的一样,我只介绍了 SELinux 的一点皮毛。SELinux 的确是个复杂的系统,想要更扎实地理解它是如何工作的,以及了解如何让它更好地为你的桌面或服务器工作需要更加地深入。我的内容还没有覆盖到疑难解答和创建自定义 SELinux 策略。 + +SELinux 是所有 Linux 管理员都应该知道的强大工具。现在已经向你介绍了 SELinux,我强烈推荐你回到 Linux.com(当有更多关于此话题的文章发表的时候)或看看 [NSA SELinux 文档][3] 获得更加深入的指南。 + +LCTT - 相关阅读:[鸟哥的 Linux 私房菜——程序管理与 SELinux 初探][4] + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/learn/docs/ldp/883671-an-introduction-to-selinux + +作者:[Jack Wallen][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/community/forums/person/93 +[1]: http://selinuxproject.org/page/Main_Page +[2]: https://www.nsa.gov/research/selinux/ +[3]: https://www.nsa.gov/research/selinux/docs.shtml +[4]: http://vbird.dic.ksu.edu.tw/linux_basic/0440processcontrol_5.php From c5bb7de061f2d89b27edf38ca4b64479cec5b750 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Wed, 4 May 2016 02:39:22 +0800 Subject: [PATCH 1300/1710] Proofread 20151227 Upheaval in the Debian Live project Moved original file to news folder though it's a little bit obsolete. --- ...227 Upheaval in the Debian Live project.md | 83 ------------------- ...227 Upheaval in the Debian Live project.md | 67 +++++++++++++++ 2 files changed, 67 insertions(+), 83 deletions(-) delete mode 100644 translated/20151227 Upheaval in the Debian Live project.md create mode 100644 translated/news/20151227 Upheaval in the Debian Live project.md diff --git a/translated/20151227 Upheaval in the Debian Live project.md b/translated/20151227 Upheaval in the Debian Live project.md deleted file mode 100644 index 7d03ce831a..0000000000 --- a/translated/20151227 Upheaval in the Debian Live project.md +++ /dev/null @@ -1,83 +0,0 @@ -Debian Live项目的剧变 - -围绕Debian Live 项目发生了很多戏剧性事件,但是有一个关于Debian Live项目][1]结束的[公告][2],它比项目第一次出现的时候影响力还小。这个项目的创始人退出必定是有原因的,社区对他的待遇和项目的收效是很令人沮丧的,但是这个项目还是会以其他的形式继续下去。所以Debian仍然会有很多的工具去在创造启动光盘和其他介质的道路上继续向前。项目创始人Dabiel Baumann和Debian CD团队以及安装检测团队之间出现的长期争论已经被"解决"了,尽管是用这样一种有遗憾的方式。                                      - -在11月9日,Baumann发表了题为"Dabian Live项目的突然结束"的一篇公告。在那篇短文中,他一一列举出了自从这个和他有关的[项目被发起][3]以来10间发生的不同的事件,可以表明他在Debian Live项目上的努力一直没有被重视,至少从这些方面。最具决定性的因素是因为在"包的含义"上存在冲突,R.Learmonth[申请][4]了新的包名,而这却侵犯了在Debian Live上使用的命名空间。 - -考虑到最主要的Debian Live包之一被命名为"live-build",而新的包名却叫"live-build-ng",这简直是对"live-build"的挑战。live-build-ng意为一种围绕[vmdebootstrap][5]【译者注:创造真实的和虚拟机Debian的磁盘映像】工具的外部包装,这种包装是为了创造live介质(光盘和USB的插入),也是Debian Live最需要的的部分。但是当 Baumann Learmonth[要求][6]为他的包换一个不同的名字的时候,他得到了一个“有趣”的[回复][7]: - -``` - -live-build不是一个Debian项目,这件事应该受到我们的关注,它是一个外部的项目。但是社区要求它成为一个官方的Debian项目,这件事需要我们敲定。 -这不是命名空间的问题,我们要将以目前维护的live配置和live启动包为基础,把它加入到Debian的本地项目。如果迫不得已的话,这将会有很多分支,但是我希望它不要发生,这样的话我们就可以把这些包整合到Debian中继续以一种协作的方式去开发。 -live-build已经被debian-cd放弃,live-build-ng将会取代它。至少在一个精简的Debian环境中,live-build会被放弃。live-build-ng将要通过debian-cd和Debian安装者合作的方式去开发。 -``` - - - -Debian Live 是一个“官方的”Debian项目(或者可以狭义的"官方"),尽管它因为思路上的不同产生过争论.除此之外,vmdebootstrap的维护者Neil Willians为脱离Debian Live项目[提供了如下的解释][8]: - -``` - -为了更好的支持live-build的代替者,vmdebootstrap肯定会被推广。这项工作会由debian-cd团队来负责,debian-cd能够用live-build解决目前存在的问题。 这些问题包括可靠性问题,以及不能很好的支持多种机器和UEFI等。 vmdebootstrap也存在着这些问题,我们用来自于对live-boot和live-config的支持情况来确定vmdebootstrap的功能。 -``` - - - -这些想要取代"live-build"的说辞看起来有道理,但是目前的项目存在的上述问题已经得到了初步解决。相反的,一些秘密的项目很明显的意图是取代live-build。正如Baumann[指出][9]的,这些计划没有被加入到debian-live的邮件列表中。人们可以从Debian Live项目中得到这些计划的信息也是因为这一次的ITP事件。所以它看起来像是一个"秘密计划"—有些东西在一个像Debian这样的项目中不能很好的安排。 - -人们可能已经猜到了,有很多帖子都支持Baumann[重命名][10]"live-build-ng"的请求,但是紧跟着,人们就因为他要停止在Debian Live 上继续工作的决定而变得沮丧。但是Learmonth 和 Williams却坚定不移,他们两人都是取代live-build所需要的开发者。Learmonth 给“live-build-ng”换了一个新的有很少争议性的名字:Live-wrapper。他说他的目标是为Debian Live项目加入新的工具(并且“把Debian Live 项目引入Debian里面),但是完成这件事还需要很大的努力。 - - -``` - -我向已经被ITP问题所困扰的每个人道歉。作为live-build的取代者,live-wrapper这个软件的稳定性还很差,为了让人们知道工作的进展同时收集反馈,它已经被存档。虽然有了这部分的工作,但是收到的反馈并不是我所需要的。 -``` - -这种对于取代live-build的强烈的反对或许已经被预知到了。自由软件社区的沟通和交流很关键,所以,替换一个项目核心的计划是很有争议的——更何况这个计划一直不被人们所知。从Banumann的角度来说,他当然不是完美的,他通过上传和下载一个不合适的[syslinux包][11]来延迟“wheezy”的发布,并且从那以后他从一个Debian发起人[成为][12]了一个Debian维护者。——但是他也不应该受到这种对待。当然,这个项目还有其他人参与,所以不仅仅是Baumann受到了影响。 - -Ben Armstrong是这些人中的其中之一,在这个事件中,他很圆滑地处理了一些事,并且想从这个事件中全身而退。他从一个邮件[13]开始,这个邮件是为了庆祝这个项目以及他和他的团队在过去几年完成的一些工作。正如他所说,这种基于Debian Live的[下流项目列表][14]是很令人振奋的。在另一个邮件中,他也[指出][15]了这个项目不是没有生命力的: - - -``` - -如果Debian CD开发团队通过他们的努力获得成功,这样产品的替换就会是可行的、可靠的、利于测试的,同时有一个合适的候选者去取代live-build,这对于Debian项目有利无害。如果他们继续做这件事,他们不会“用一个官方改良的,不可靠的,几乎没有测试的待选者取代live-build”。到目前为止,我还没有看到他们那样做。其间,live-build仍在存档,没有很快删除,它仍然处于良好状态,并没有一种改进的继任者来取代它。 -``` - - -11月24号,Armstrong也在[他的博客][16]上[发布][17]了一个有关Debian Live的新消息。它展示了自从 Baumann退出后两周内的让人高兴的进展。可以说是在这个项目和live-wrapper开发者之间产生合作的里程碑。博客上也有了一个[计划表][18],同时不可避免地寻求更多的帮助。他也列举了一些理由,试图让人们相信围绕项目发生的戏剧性事件仅仅是一个可以避免的小问题,而不是像现在这样。 - - - - - - ---------------------------------- - -via: https://lwn.net/Articles/665839/ - -作者:Jake Edge -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - - -[1]: https://lwn.net/Articles/666127/ -[2]: http://live.debian.net/ -[3]: https://www.debian.org/News/weekly/2006/08/ -[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804315 -[5]: http://liw.fi/vmdebootstrap/ -[6]: https://lwn.net/Articles/666173/ -[7]: https://lwn.net/Articles/666176/ -[8]: https://lwn.net/Articles/666181/ -[9]: https://lwn.net/Articles/666208/ -[10]: https://lwn.net/Articles/666321/ -[11]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699808 -[12]: https://nm.debian.org/public/process/14450 -[13]: https://lwn.net/Articles/666336/ -[14]: http://live.debian.net/project/downstream/ -[15]: https://lwn.net/Articles/666338/ -[16]: https://lwn.net/Articles/666340/ -[17]: http://syn.theti.ca/2015/11/24/debian-live-after-debian-live/ -[18]: https://wiki.debian.org/DebianLive/TODO diff --git a/translated/news/20151227 Upheaval in the Debian Live project.md b/translated/news/20151227 Upheaval in the Debian Live project.md new file mode 100644 index 0000000000..9b3d4dc2f0 --- /dev/null +++ b/translated/news/20151227 Upheaval in the Debian Live project.md @@ -0,0 +1,67 @@ +Debian Live项目的剧变 +================================================================================== + +尽管围绕 Debian Live 项目发生了很多戏剧性事件,关于 [Debian Live 项目][1]结束的[公告][2]的影响力甚至小于该项目首次出现时的公告。主要开发者的离开是最显而易见的损失,而社区对他本人及其项目的态度是很令人困惑的,但是这个项目也许还是会以其他的形式继续下去。所以 Debian 仍然会有更多的工具去创造启动光盘和其他介质。尽管是用这样一种有遗憾的方式,项目创始人 Dabiel Baumann 和 Debian CD 团队以及安装检测团队之间出现的长期争论已经被「解决」了。                                      +在 11 月 9 日, Baumann 发表了题为「 Debian Live 项目的突然结束」的一篇公告。在那篇短文中,他一一列举出了自从这个和他有关的[项目被发起][3]以来近 10 年间发生的不同的事件,这些事件可以表明他在 Debian Live 项目上的努力一直没有被重视或没有被足够重视。最具决定性的因素是因为在「包的含义」上存在冲突, R.Learmonth [申请][4]了新的包名,而这侵犯了在 Debian Live 上使用的命名空间。 + +考虑到最主要的 Debian Live 包之一被命名为 live-build ,而 R.Learmonth 申请的新包名却是 live-build-ng ,这简直是对 live-build 的挑战。 live-build-ng 意为一种围绕 [vmdebootstrap][5]【译者注:创造真实的和虚拟机Debian的磁盘映像】工具的外部包装,这种包装是为了创造 live 介质(光盘和USB的插入),也是 Debian Live 最需要的的部分。但是当 Baumann Learmonth [要求][6]为他的包换一个不同的名字的时候,他得到了一个「有趣」的[回复][7]: + +``` +应该注意到, live-build 不是一个 Debian 项目,它是一个声称自己是官方 Debian 项目的外部项目,这是一个需要我们解决的问题。 +这不是命名空间的问题,我们要将以目前维护的 live-config 和 live-boot 包为基础,把它们加入到 Debian 的本地项目。如果迫不得已的话,这将会有很多分支,但是我希望它不要发生,这样的话我们就可以把这些包整合到 Debian 中并继续以一种协作的方式去开发。 +live-build 已经被 debian-cd 放弃,live-build-ng 将会取代它。至少在一个精简的 Debian 环境中,live-build 会被放弃。我们(开发团队)正在与 debian-cd 和 Debian Installer 团队合作开发 live-build-ng 。 +``` + +Debian Live 是一个「官方的」 Debian 项目(也可以是狭义的「官方」),尽管它因为思路上的不同产生过争论。除此之外, vmdebootstrap 的维护者 Neil Willians 为脱离 Debian Live 项目[提供了如下的解释][8]: + +``` +为了更好的支持 live-build 的代替者, vmdebootstrap 肯定会被推广。为了能够用 live-build 解决目前存在的问题,这项工作会由 debian-cd 团队来负责。这些问题包括可靠性问题,以及不能很好的支持多种机器和 UEFI 等。 vmdebootstrap 也存在着这些问题,我们用来自于对 live-boot 和 live-config 的支持情况来确定 vmdebootstrap 的功能。 +``` + +这些抱怨听起来合情合理,但是它们可能已经在目前的项目中得到了解决。然而一些秘密的项目有很明显的取代 live-build 的意图。正如 Baumann [指出][9]的,这些计划没有被发布到 debian-live 的邮件列表中。人们首次从 Debian Live 项目中获知这些计划正是因为这一次的ITP事件,所以它看起来像是一个「秘密计划」——有些事情在像 Debian 这样的项目中得不到很好的安排。 + +人们可能已经猜到了,有很多帖子都支持 Baumann [重命名][10] live-build-ng 的请求,但是紧接着,人们就因为他要停止继续在 Debian Live 上工作的决定而变得沮丧。然而 Learmonth 和 Williams 却坚持认为取代 live-build 很有必要。Learmonth 给 live-build-ng 换了一个争议性也许小一些的名字: live-wrapper 。他说他的目标是为 Debian Live 项目加入新的工具(并且「把 Debian Live 项目引入 Debian 里面」),但是完成这件事还需要很大的努力。 + +``` +我向已经被 ITP 问题所困扰的每个人道歉。我们已经告知大家 live-wrapper 还不足以完全替代 live-build 且开发工作仍在进行以收集反馈。尽管有了这部分的工作,我们收到的反馈缺并不是我们所需要的。 +``` + +这种对于取代 live-build 的强烈反对或许已经被预知到了。自由软件社区的沟通和交流很关键,所以,计划去替换一个项目的核心很容易引起争议——更何况是一个一直不为人所知的计划。从 Banumann 的角度来说,他当然不是完美的,他因为上传个不合适的 [syslinux 包][11]导致了 wheezy 的延迟发布,并且从那以后他被从 Debian 开发者暂时[降级][12]为 Debian 维护者。但是这不意味着他应该受到这种对待。当然,这个项目还有其他人参与,所以不仅仅是 Baumann 受到了影响。 + +Ben Armstrong 是其他参与者中的一位,在这个事件中,他很圆滑地处理了一些事,并且想从这个事件中全身而退。他从一封邮件[13]开始,这个邮件是为了庆祝这个项目,以及他和他的团队在过去几年取得的成果。正如他所说, Debian Live 的[下游项目列表][14]是很令人振奋的。在另一封邮件中,他也[指出][15]了这个项目不是没有生命力的: + +``` +如果 Debian CD 开发团队通过他们的努力开发出可行的、可靠的、经过完善测试替代品,以及一个合适的取代 live-build 的候选者,这对于 Debian 项目有利无害。如果他们继续做这件事,他们不会「用一个官方改良,但不可靠且几乎没有经过测试的待选者取代 live-build 」。到目前为止,我还没有看到他们那样做的迹象。其间, live-build 仍保留在存档中——它仍然处于良好状态,且没有一种经过改良的继任者来取代它,因此开发团队没有必要尽快删除它。 +``` + +11 月 24 号, Armstrong 也在[他的博客][16]上[发布][17]了一个有关 Debian Live 的新消息。它展示了从 Baumann 退出起两周内的令人高兴的进展。甚至有迹象表明 Debian Live 项目与 live-wrapper 开发者开展了合作。博客上也有了一个[计划表][18],同时不可避免地寻求更多的帮助。这让人们有理由相信围绕项目发生的戏剧性事件仅仅是一个小摩擦——也许不可避免,但绝不是像现在看起来这么糟糕。 + +--------------------------------- + +via: https://lwn.net/Articles/665839/ + +作者:Jake Edge +译者:[vim-kakali](https://github.com/vim-kakali) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[1]: https://lwn.net/Articles/666127/ +[2]: http://live.debian.net/ +[3]: https://www.debian.org/News/weekly/2006/08/ +[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804315 +[5]: http://liw.fi/vmdebootstrap/ +[6]: https://lwn.net/Articles/666173/ +[7]: https://lwn.net/Articles/666176/ +[8]: https://lwn.net/Articles/666181/ +[9]: https://lwn.net/Articles/666208/ +[10]: https://lwn.net/Articles/666321/ +[11]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699808 +[12]: https://nm.debian.org/public/process/14450 +[13]: https://lwn.net/Articles/666336/ +[14]: http://live.debian.net/project/downstream/ +[15]: https://lwn.net/Articles/666338/ +[16]: https://lwn.net/Articles/666340/ +[17]: http://syn.theti.ca/2015/11/24/debian-live-after-debian-live/ +[18]: https://wiki.debian.org/DebianLive/TODO From 2e120295fef699836401cd1f359ab774e444a0fc Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 09:43:47 +0800 Subject: [PATCH 1301/1710] Update Part 1 - LXD 2.0: Introduction to LXD.md --- .../Part 1 - LXD 2.0: Introduction to LXD.md | 72 +++++++++---------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index 4c33d2fc8f..373a8c03dc 100644 --- a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -12,10 +12,6 @@ Part 1 - LXD 2.0: LXD 入门 #### 什么是 LXD ? -At its simplest, LXD is a daemon which provides a REST API to drive LXC containers. - -Its main goal is to provide a user experience that’s similar to that of virtual machines but using Linux containers rather than hardware virtualization. - 简单来说 LXD 就是一个提供了 REST API 的 LXC 容器管理器。 LXD 最主要的目标就是使用 Linux 容器而不是硬件虚拟化向用户提供一种接近虚拟机的使用体验。 @@ -44,68 +40,70 @@ LXD 聚焦于系统容器,通常也被称为架构容器。这就是说 LXD ### LXD 的主要组件 -There are a number of main components that make LXD, those are typically visible in the LXD directory structure, in its command line client and in the API structure itself. +LXD 是由几个主要组件构成的,在它的命令行客户端和 API结构体里,这些组件都是 LXD 目录结构下可见的。 #### 容器 -Containers in LXD are made of: +LXD 中的容器包括以下及部分: -- A filesystem (rootfs) -- A list of configuration options, including resource limits, environment, security options and more -- A bunch of devices like disks, character/block unix devices and network interfaces -- A set of profiles the container inherits configuration from (see below) -- Some properties (container architecture, ephemeral or persistent and the name) -- Some runtime state (when using CRIU for checkpoint/restore) +- 根文件系统 +- 设备:包括磁盘、unix 字符/块设备、网络接口 +- 一组继承而来的容器配置文件 +- 属性(容器架构,暂时的或持久的,容器名) +- 运行时状态(当时为了记录检查点、恢复时用到了 CRIU时) #### 快照 -Container snapshots are identical to containers except for the fact that they are immutable, they can be renamed, destroyed or restored but cannot be modified in any way. +容器快照和容器是一回事,只不过快照是不可修改的,只能被重命名,销毁或者用来恢复系统,但是无论如何都不能被修改。 -It is worth noting that because we allow storing the container runtime state, this effectively gives us the concept of “stateful” snapshots. That is, the ability to rollback the container including its cpu and memory state at the time of the snapshot. +值得注意的是,因为我们允许用户保存容器的运行时状态,这就有效的为我们提供了“有状态”的快照的功能。这就是说我们可以使用快照回滚容器的 cpu 和内存。 #### 镜像 -LXD is image based, all LXD containers come from an image. Images are typically clean Linux distribution images similar to what you would use for a virtual machine or cloud instance. +LXD 是基于镜像实现的,所有的 LXD 容器都是来自于镜像。容器镜像经常是一些干净的 Linux 发布版的镜像,类似于你们在虚拟机和云实例上使用的镜像。 -It is possible to “publish” a container, making an image from it which can then be used by the local or remote LXD hosts. +所以就可以“发布”容器:使用容器制作一个镜像,然后可以在本地或者远程 LXD 主机上使用。 -Images are uniquely identified by their sha256 hash and can be referenced by using their full or partial hash. Because typing long hashes isn’t particularly user friendly, images can also have any number of properties applied to them, allowing for an easy search through the image store. Aliases can also be set as a one to one mapping between a unique user friendly string and an image hash. +镜像通常使用 sha256 来区分,同时也可以使用它的全部或部分哈希码。因为输入长长的哈希码对用户来说不好,所以镜像可以使用几个自身的属性来区分,这就允许让用户在镜像商店里方便搜索镜像。别名也可以用来把对用户友好的字符串 1 比 1 的映射成镜像的哈希码。 -LXD comes pre-configured with three remote image servers (see remotes below): +LXD 安装时已经配置好了三个远程镜像服务器(参见下面的远程一节): -- “ubuntu:” provides stable Ubuntu images -- “ubunt-daily:” provides daily builds of Ubuntu -- “images:” is a community run image server providing images for a number of other Linux distributions using the upstream LXC templates -Remote images are automatically cached by the LXD daemon and kept for a number of days (10 by default) since they were last used before getting expired. +- “ubuntu:” 提供稳定版的 Ubuntu 镜像 +- “ubuntu-daily:” 提供每天构建出来的 Ubuntu +- “images:” 社区维护的镜像服务器,提供一系列的 Linux 发布版,使用的是上游 LXC 的模板 + +LXD 守护进程会从镜像上次被使用开始自动缓存远程镜像一段时间(默认是 10 天),然后这些镜像才会失效。 + +此外 LXD 还会自动更新远程镜像(除非指明不更新),所以本地的镜像会一直是最新版的。 -Additionally LXD also automatically updates remote images (unless told otherwise) so that the freshest version of the image is always available locally. #### 配置 -Profiles are a way to define container configuration and container devices in one place and then have it apply to any number of containers. +配置文件是一种在一处定义容器配置和容器设备,然后应用到一系列容器的方法。 -A container can have multiple profiles applied to it. When building the final container configuration (known as expanded configuration), the profiles will be applied in the order they were defined in, overriding each other when the same configuration key or device is found. Then the local container configuration is applied on top of that, overriding anything that came from a profile. +一个容器可以被应用多个配置文件。当构建最终容器配置时(即通常的扩展配置),这些配置文件都会按照他们定义顺序被应用到容器上,当有重名的配置,新的会覆盖掉旧的。然后本地容器配置会应用在这些之上,覆盖所有来自配置文件的选项。 -LXD ships with two pre-configured profiles: +LXD 自带两种预配置的配置文件: -- “default” is automatically applied to all containers unless an alternative list of profiles is provided by the user. This profile currently does just one thing, define a “eth0” network device for the container. -- “docker” is a profile you can apply to a container which you want to allow to run Docker containers. It requests LXD load some required kernel modules, turns on container nesting and sets up a few device entries. +- “default” 配置是自动应用在所有容器之上,除非用户提供了一系列替代的配置文件。目前这个配置文件只做一件事,为容器定义 “eth0” 网络设备。 +- “docker” 配置是一个允许你在容器里运行 Docker 容器的配置文件。它会要求 LXD 加载一些需要的内核模块,这样就能允许容器嵌套,并且创建一些设备入口。 #### 远程 -As I mentioned earlier, LXD is a networked daemon. The command line client that comes with it can therefore talk to multiple remote LXD servers as well as image servers. +如我之前提到的, LXD 是一个基于网络的守护进程。附带的命令行客户端可以与多个远程 LXD 服务器、镜像服务器通信。 -By default, our command line client comes with the following remotes defined +默认情况下我们的命令行客户端会与下面几个预定义的远程服务器通信: -local: (default remote, talks to the local LXD daemon over a unix socket) -ubuntu: (Ubuntu image server providing stable builds) -ubuntu-daily: (Ubuntu image server providing daily builds) -images: (images.linuxcontainers.org image server) -Any combination of those remotes can be used with the command line client. +- local:(默认的远程服务器,使用 UNIX socket 和本地的 LXD 守护进程通信) +- ubuntu:(buntu 镜像服务器,提供稳定版的 Ubuntu 镜像) +- ubuntu-daily:(Ubuntu 镜像服务器,提供每天构建出来的 Ubuntu) +- images:(images.linuxcontainers.org 镜像服务器) -You can also add any number of remote LXD hosts that were configured to listen to the network. Either anonymously if they are a public image server or after going through authentication when managing remote containers. +所有这些远程服务器的组合都可以在命令行客户端里使用。 -It’s that remote mechanism that makes it possible to interact with remote image servers as well as copy or move containers between hosts. +你也可以添加任意数量的远程 LXD 主机来监听网络。匿名服务器如果是开放镜像服务器,或者通过认证可以管理远程容器的镜像服务器,都可以添加进来。 + +正是这种远程机制使得和远程镜像服务器交互就像在主机间复制、移动容器成为可能。 ### 安全性 From d596b5ea8972d4df070601da4a39ff3743071306 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 10:08:45 +0800 Subject: [PATCH 1302/1710] Update Part 1 - LXD 2.0: Introduction to LXD.md --- .../Part 1 - LXD 2.0: Introduction to LXD.md | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index 373a8c03dc..2e748d098c 100644 --- a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -107,18 +107,20 @@ LXD 自带两种预配置的配置文件: ### 安全性 -One aspect that was core to our design of LXD was to make it as safe as possible while allowing modern Linux distributions to run inside it unmodified. +我们设计 LXD 时的一个核心要求就当现代 Linux 发布版运行在容器里的时候要尽可能的安全。 -The main security features used by LXD through its use of the LXC library are: +LXD 使用的主要安全特是通过使用 LXC 库实现的: -- Kernel namespaces. Especially the user namespace as a way to keep everything the container does separate from the rest of the system. LXD uses the user namespace by default (contrary to LXC) and allows for the user to turn it off on a per-container basis (marking the container “privileged”) when absolutely needed. -- Seccomp. To filter some potentially dangerous system calls. -- AppArmor: To provide additional restrictions on mounts, socket, ptrace and file access. Specifically restricting cross-container communication. -- Capabilities. To prevent the container from loading kernel modules, altering the host system time, … -- CGroups. To restrict resource usage and prevent DoS attacks against the host. -Rather than exposing those features directly to the user as LXC would, we’ve built a new configuration language which abstracts most of those into something that’s more user friendly. For example, one can tell LXD to pass any host device into the container without having to also lookup its major/minor numbers to manually update the cgroup policy. +- 内核名字空间。特别是用户名字空间是一种让容器和系统剩余部分完全分割的方法。LXD 默认使用用户名字空间(和 LXC 相反),允许用户在需要的时候以容器为单位进行打开、关闭。 +- Seccomp 系统调用。用来隔离潜在危险的系统调用。 +- AppArmor:对 mount、socket、ptrace 和文件访问提供额外的限制。特别是限制跨容器通信。 +- Capabilities。组织容器加载内核模块,修改主机系统时间,等等。 +- CGroups。限制资源使用,防止对主机的 DoS 攻击。 -Communications with LXD itself are secured using TLS 1.2 with a very limited set of allowed ciphers. When dealing with hosts outside of the system certificate authority, LXD will prompt the user to validate the remote fingerprint (SSH style), then cache the certificate for future use. + +和 LXC 直接将这些特性暴露出来不同, 为了对用户友好 ,LXD 构建了一个新的配置语言把大部分的这些特性都抽象封装起来。举了例子,一个用户可以告诉 LXD 把主机设备放进容器而不需要手动检查他们的主/次设备号来更新 CGroup 策略。 + +和 LXD 本身通信是基于使用 TLS 1.2 的链路,这些链路只允许使用有限的几个被允许的密钥。当和那些经过系统证书认证之外的主机通信时, LXD 会提示用户验证主机的远程足迹(SSH 方式),然后把足迹缓存起来以供以后使用。 ### REST 接口 From 9054c17dfc98486580d48ccb1e39ab49ac059b80 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 12:50:12 +0800 Subject: [PATCH 1303/1710] Update Part 1 - LXD 2.0: Introduction to LXD.md --- .../tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index 2e748d098c..750dce0e43 100644 --- a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -124,15 +124,15 @@ LXD 使用的主要安全特是通过使用 LXC 库实现的: ### REST 接口 -Everything that LXD does is done over its REST API. There is no other communication channel between the client and the daemon. +LXD 的工作都是通过 REST 接口实现的。在客户端和守护进程之间并没有其他的通讯手段。 -The REST API can be access over a local unix socket, only requiring group membership for authentication or over a HTTPs socket using a client certificate for authentication. +REST 接口可以通过本地的 unix socket 访问,这只需要经过组认证,或者经过 HTTP 套接字使用客户端认证进行通信。 -The structure of the REST API matches the different components described above and is meant to be very simple and intuitive to use. +REST 接口的结构能够和上文所说的不同的组件匹配,是一种简单、直观的使用方法。 -When a more complex communication mechanism is required, LXD will negotiate websockets and use those for the rest of the communication. This is used for interactive console session, container migration and for event notification. +当需要一种复杂的通信机制时, LXD 将会进行websocket 协商完成剩余的通信工作。主要用于交互式终端会话,容器迁移和事件通知。 -With LXD 2.0, comes the /1.0 stable API. We will not break backward compatibility within the /1.0 API endpoint however we may add extra features to it, which we’ll signal by declaring additional API extensions that the client can look for. +LXD 2.0 附带了 1.0 版的 API。我们虽然在 1.0 版 API 添加了额外的特性,但是这不会在 1.0 版 API 的端点里破坏向后兼容性,我们会声明额外的 API 扩展使得客户端可以找到新的接口。 ### 容器规模化 From 461c872ae0de43bbc52537ef77b2b04ee6fb16ad Mon Sep 17 00:00:00 2001 From: VicYu Date: Wed, 4 May 2016 13:00:31 +0800 Subject: [PATCH 1304/1710] Update 20160429 Master OpenStack with 5 new tutorials.md --- sources/tech/20160429 Master OpenStack with 5 new tutorials.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160429 Master OpenStack with 5 new tutorials.md b/sources/tech/20160429 Master OpenStack with 5 new tutorials.md index 34ef86c06a..b43952bc2f 100644 --- a/sources/tech/20160429 Master OpenStack with 5 new tutorials.md +++ b/sources/tech/20160429 Master OpenStack with 5 new tutorials.md @@ -1,3 +1,5 @@ + Vic020 + Master OpenStack with 5 new tutorials ======================================= From 17f0cbff3d5b55190b0b54a92dea7e3892a9f067 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 13:28:58 +0800 Subject: [PATCH 1305/1710] translated --- .../LXD/Part 1 - LXD 2.0: Introduction to LXD.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index 750dce0e43..9e21eb1aa7 100644 --- a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -1,5 +1,3 @@ -translating by ezio - Part 1 - LXD 2.0: LXD 入门 ====================================== @@ -136,18 +134,18 @@ LXD 2.0 附带了 1.0 版的 API。我们虽然在 1.0 版 API 添加了额外 ### 容器规模化 -While LXD provides a good command line client, that client isn’t meant to manage thousands of containers on multiple hosts. For that kind of use cases, we have nova-lxd which is an OpenStack plugin that makes OpenStack treat LXD containers in the exact same way it would treat VMs. +虽然 LXD 提供了一个很好的命令行客户端,但是这个客户端并不能管理多个主机的大量的容器。在这种使用情况下,我们可以使用 OpenStack 的插件 nova-lxd ,它可以使得 OpenStack 像使用虚拟机一样使用 LXD 容器。 -This allows for very large deployments of LXDs on a large number of hosts, using the OpenStack APIs to manage network, storage and load-balancing. +这就允许在大量的主机上部署大量的 LXD 容器,然后使用 OpenStack 的 API 来管理网络、存储以及负载均衡。 ### 额外信息 -The main LXD website is at: -Development happens on Github at: -Mailing-list support happens on: -IRC support happens in: #lxcontainers on irc.freenode.net +LXD 的主站在: +LXD 的 GitHub 仓库: +LXD 的邮件列表: +LXD 的 IRC 频道: #lxcontainers on irc.freenode.net -And if you can’t wait until the next few posts to try LXD, you can [take our guided tour online][2] and try it for free right from your web browser! +如果你不想或者不能在你的机器上安装 LXD ,你可以在 web 上[试试在线版的 LXD][2] 。 -------------------------------------------------------------------------------- From 3d85a8e67d707c631659ce19208aa67badc0d788 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 13:30:13 +0800 Subject: [PATCH 1306/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E8=AF=B7=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md (100%) diff --git a/sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md similarity index 100% rename from sources/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md rename to translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md From 8dd41c4263fe47f0fee73de6e7d33d1ce721d5db Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 13:33:08 +0800 Subject: [PATCH 1307/1710] =?UTF-8?q?=E8=AF=B7=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index 9e21eb1aa7..f8ed83a482 100644 --- a/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -141,8 +141,11 @@ LXD 2.0 附带了 1.0 版的 API。我们虽然在 1.0 版 API 添加了额外 ### 额外信息 LXD 的主站在: + LXD 的 GitHub 仓库: + LXD 的邮件列表: + LXD 的 IRC 频道: #lxcontainers on irc.freenode.net 如果你不想或者不能在你的机器上安装 LXD ,你可以在 web 上[试试在线版的 LXD][2] 。 @@ -152,7 +155,7 @@ LXD 的 IRC 频道: #lxcontainers on irc.freenode.net via: https://www.stgraber.org/2016/03/11/lxd-2-0-introduction-to-lxd-112/ 作者:[Stéphane Graber][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 36d702e61788254b29969d2eee4a80b369a01964 Mon Sep 17 00:00:00 2001 From: pengkai Date: Wed, 4 May 2016 13:58:39 +0800 Subject: [PATCH 1308/1710] kylepeng93 is translating --- sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md b/sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md index 7bf9ba5b16..1da7e4ec62 100644 --- a/sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md +++ b/sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md @@ -1,3 +1,4 @@ +kylepeng93 is translating Part 3 - LXD 2.0: Your first LXD container ========================================== From 9a8784ec08034a071030b0f09f36e263643558ef Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 4 May 2016 00:32:25 -0700 Subject: [PATCH 1309/1710] =?UTF-8?q?=E5=BD=92=E6=A1=A3201605?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20151028 10 Tips for 10x Application Performance.md | 0 .../20151109 How to Configure Tripwire IDS on Debian.md | 0 ... to Setup Drone - a Continuous Integration Service in Linux.md | 0 .../20151119 Going Beyond Hello World Containers is Hard Stuff.md | 0 .../20151126 Microsoft and Linux--True Romance or Toxic Love.md | 0 ...212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md | 0 ...0 Make Sudo Insult User For Each Incorrect Password Attempt.md | 0 .../20160223 BeeGFS Parallel File System Goes Open Source.md | 0 .../20160226 How to use Python to hack your Eclipse IDE.md | 0 ... Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md | 0 ...Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201604}/20151028 10 Tips for 10x Application Performance.md (100%) rename published/{ => 201604}/20151109 How to Configure Tripwire IDS on Debian.md (100%) rename published/{ => 201604}/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md (100%) rename published/{ => 201604}/20151119 Going Beyond Hello World Containers is Hard Stuff.md (100%) rename published/{ => 201604}/20151126 Microsoft and Linux--True Romance or Toxic Love.md (100%) rename published/{ => 201604}/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md (100%) rename published/{ => 201604}/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md (100%) rename published/{ => 201604}/20160223 BeeGFS Parallel File System Goes Open Source.md (100%) rename published/{ => 201604}/20160226 How to use Python to hack your Eclipse IDE.md (100%) rename published/{ => 201604}/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md (100%) rename published/{ => 201604}/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md (100%) diff --git a/published/20151028 10 Tips for 10x Application Performance.md b/published/201604/20151028 10 Tips for 10x Application Performance.md similarity index 100% rename from published/20151028 10 Tips for 10x Application Performance.md rename to published/201604/20151028 10 Tips for 10x Application Performance.md diff --git a/published/20151109 How to Configure Tripwire IDS on Debian.md b/published/201604/20151109 How to Configure Tripwire IDS on Debian.md similarity index 100% rename from published/20151109 How to Configure Tripwire IDS on Debian.md rename to published/201604/20151109 How to Configure Tripwire IDS on Debian.md diff --git a/published/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md b/published/201604/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md similarity index 100% rename from published/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md rename to published/201604/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md diff --git a/published/20151119 Going Beyond Hello World Containers is Hard Stuff.md b/published/201604/20151119 Going Beyond Hello World Containers is Hard Stuff.md similarity index 100% rename from published/20151119 Going Beyond Hello World Containers is Hard Stuff.md rename to published/201604/20151119 Going Beyond Hello World Containers is Hard Stuff.md diff --git a/published/20151126 Microsoft and Linux--True Romance or Toxic Love.md b/published/201604/20151126 Microsoft and Linux--True Romance or Toxic Love.md similarity index 100% rename from published/20151126 Microsoft and Linux--True Romance or Toxic Love.md rename to published/201604/20151126 Microsoft and Linux--True Romance or Toxic Love.md diff --git a/published/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md b/published/201604/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md similarity index 100% rename from published/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md rename to published/201604/20160212 How to Add New Disk in Linux CentOS 7 Without Rebooting.md diff --git a/published/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md b/published/201604/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md similarity index 100% rename from published/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md rename to published/201604/20160220 Make Sudo Insult User For Each Incorrect Password Attempt.md diff --git a/published/20160223 BeeGFS Parallel File System Goes Open Source.md b/published/201604/20160223 BeeGFS Parallel File System Goes Open Source.md similarity index 100% rename from published/20160223 BeeGFS Parallel File System Goes Open Source.md rename to published/201604/20160223 BeeGFS Parallel File System Goes Open Source.md diff --git a/published/20160226 How to use Python to hack your Eclipse IDE.md b/published/201604/20160226 How to use Python to hack your Eclipse IDE.md similarity index 100% rename from published/20160226 How to use Python to hack your Eclipse IDE.md rename to published/201604/20160226 How to use Python to hack your Eclipse IDE.md diff --git a/published/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md b/published/201604/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md similarity index 100% rename from published/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md rename to published/201604/20160405 Ubuntu Budgie Could Be the New Flavor of Ubuntu Linux, as Part of Ubuntu 16.10.md diff --git a/published/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md b/published/201604/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md similarity index 100% rename from published/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md rename to published/201604/20160414 Linux Kernel 3.12 to Be Supported Until 2017 Because of SUSE Linux Enterprise 12.md From b46148b4a26d087fb8b9edbe88ffc273e4587f1b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 4 May 2016 00:33:06 -0700 Subject: [PATCH 1310/1710] PUB:20151202 KDE vs GNOME vs XFCE Desktop @kylepeng93 --- .../20151202 KDE vs GNOME vs XFCE Desktop.md | 53 +++++++++++++++++++ .../20151202 KDE vs GNOME vs XFCE Desktop.md | 47 ---------------- 2 files changed, 53 insertions(+), 47 deletions(-) create mode 100644 published/20151202 KDE vs GNOME vs XFCE Desktop.md delete mode 100644 translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md diff --git a/published/20151202 KDE vs GNOME vs XFCE Desktop.md b/published/20151202 KDE vs GNOME vs XFCE Desktop.md new file mode 100644 index 0000000000..4eb3044958 --- /dev/null +++ b/published/20151202 KDE vs GNOME vs XFCE Desktop.md @@ -0,0 +1,53 @@ +KDE、GNOME 和 XFCE 桌面比较 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2013/07/300px-Xfce_logo.svg_.png) + +这么多年来,很多人一直都在他们的 linux 桌面端使用 KDE 或者 GNOME 桌面环境。在这两个桌面环境多年不断发展的同时,其它的桌面也在持续增加它们的用户规模。举个例子说,在轻量级桌面环境下,XFCE 一举成为了最受欢迎的桌面环境,相较于 LXDE 缺少的优美视觉效果,默认配置下的 XFCE 在这方面就可以打败前者。XFCE 提供的功能特性都能在 GNOME2 下得到,然而,在一些较老的计算机上,它的轻量级的特性却能取得更好的效果。 + +### 桌面主题定制 ### + +用户完成安装之后,XFCE 看起来可能会有一点无趣,因为它在视觉上还缺少一些吸引力。但是,请不要误解我的话, XFCE 仍然拥有漂亮的桌面,但是对于大多数刚刚接触 XFCE 桌面环境的人来说,可能它看起来像香草一样普普通通。不过好消息是当我们想要给 XFCE 安装新的主题的时候,这会是一个十分轻松的过程,因为你能够快速的找到你喜欢的 XFCE 主题,之后你就可以将它解压到一个合适的目录中。从这一点上来说,XFCE 自带的一个放在“外观”下的重要的图形界面工具可以帮助用户更加容易的选择中意的主题,这可能是目前在 XFCE 上这方面最好用的工具了。如果用户按照上面的建议去做的话,对于想要尝试使用 XFCE 的任何用户来说都将不存在困难。 + +在 GNOME 桌面上,用户也可以按照类似上面的方法去做。不过,其中最主要的不同点就是在你做之前,用户必须手动下载并安装 GNOME Tweak Tool。当然,对于使用来说都不会有什么障碍,但是对于用户来说,使用 XFCE 安装和激活主题并不需要去额外去下载安装各种调整工具,这可能是他们无法忽略的一个优势。而在 GNOME 上,尤其是在用户已经下载并安装了 GNOME Tweak tool 之后,你仍将必须确保你已经安装了“用户主题扩展”。 + +同 XFCE 一样,用户需要去搜索并下载自己喜欢的主题,然后,用户可以再次使用 GNOME Tweak tool,并点击该工具界面左边的“外观”按钮,接着用户便可以直接查看页面底部并点击文件浏览按钮,然后浏览到那个压缩的文件夹并打开。当完成这些之后,用户将会看到一个告诉用户已经成功应用了主题的对话框,这样你的主题便已经安装完成。然后用户就可以简单的使用下拉菜单来选择他们想要的主题。和 XFCE 一样,主题激活的过程也是十分简单的,然而,对于因为要使用一个新的主题而去下载一个没有预先安装到系统里面的应用,这种情况也是需要考虑的。 + +最后,就是 KDE 桌面主题定制的过程了。和 XFCE 一样,不需要去下载额外的工具来安装主题。从这点来看,让人有种XFCE 可能要被 KDE 战胜了的感觉。不仅在 KDE 上可以完全使用图形用户界面来安装主题,而且甚至只需要用户点击获取新主题的按钮就可以找到、查看新的主题,并且最后自动安装。 + +然而,我们应该注意到 KDE 相比 XFCE 而言,是一个更加健壮完善的桌面环境。当然,对于主要以极简设计为目的的桌面来说,缺失一些更多的功能是有一定的道理的。为此,我们要为这样优秀的功能给 KDE 加分。 + +### MATE 不是一个轻量级的桌面环境 ### + +在继续比较 XFCE、GNOME3 和 KDE 之前,对于老手我们需要澄清一下,我们没有将 MATE 桌面环境加入到我们的比较中。MATE 可被看作是 GNOME2 的另一个衍生品,但是它并没有主要作为一款轻量级或者快捷桌面出现。相反,它的主要目的是成为一款更加传统和舒适的桌面环境,并使它的用户在使用它时就像在家里一样舒适。 + +另一方面,XFCE 生来就是要实现他自己的一系列使命。XFCE 给它的用户提供了一个更轻量而仍保持吸引人的视觉体验的桌面环境。然后,对于一些认为 MATE 也是一款轻量级的桌面环境的人来说,其实 MATE 真正的目标并不是成为一款轻量级的桌面环境。这两种选择在各自安装了一款好的主题之后看起来都会让人觉得非常具有吸引力。 + +### 桌面导航 ### + +XFCE 除了桌面,还提供了一个醒目的导航器。任何使用过传统的 Windows 或者 GNOME 2/MATE 桌面环境的用户都可以在没有任何帮助的情况下自如的使用新安装的 XFCE 桌面环境的导航器。紧接着,添加小程序到面板中也是很显眼的。就像找一个已经安装的应用程序一样,直接使用启动器并点击你想要运行的应用程序图标就行。除了 LXDE 和 MATE 之外,还没有其他的桌面的导航器可以做到如此简单。不仅如此,更好的是控制面板的使用是非常容易使用的,对于刚刚使用这个新桌面的用户来说这是一个非常大的好处。如果用户更喜欢通过老式的方法去使用他们的桌面,那么 GNOME 就不合适。通过热角而取代了最小化按钮,加上其他的应用排布方式,这可以让大多数新用户易于使用它。 + +如果用户来自类似 Windows 这样的桌面环境,那么这些用户需要摒弃这些习惯,不能简单的通过鼠标右击一下就将一个小程序添加到他们的工作空间顶部。与此相反,它可以通过使用扩展来实现。GNOME 是可以安装拓展的,并且是非常的容易,这些容易之处体现在只需要用户简单的使用位于 GNOME 扩展页面上的 on/off 开关即可。不过,用户必须知道这个东西,才能真正使用上这个功能。 + +另一方面,GNOME 正在它的外观中体现它的设计理念,即为用户提供一个直观和易用的控制面板。你可能认为那并不是什么大事,但是,在我看来,它确实是我认为值得称赞并且有必要被提及的方面。KDE 给它的用户提供了更多的传统桌面使用体验,并通过提供相似的启动器和一种更加类似的获取软件的方式的能力来迎合来自 Windows 的用户。添加小部件或者小程序到 KDE 桌面是件非常简单的事情,只需要在桌面上右击即可。唯一的问题是 KDE 中这个功能不好发现,就像 KDE 中的其它东西一样,对于用户来说好像是隐藏的。KDE 的用户可能不同意我的观点,但我仍然坚持我的说法。 + +要增加一个小部件,只要在“我的面板”上右击就可以看见面板选项,但是并不是安装小部件的一个直观的方法。你并不能看见“添加部件”,除非你选择了“面板选项”,然后才能看见“添加部件”。这对我来说不是个问题,但是对于一些用户来说,它变成了不必要的困惑。而使事情变得更复杂的是,在用户能够找到部件区域后,他们后来发现一种称为“活动”的新术语。它和部件在同一个地方,可是它在自己的区域却是另外一种行为。 + +现在请不要误解我,KDE 中的活动特性是很不错的,也是很有价值的,但是从可用性的角度看,为了不让新手感到困惑,它更加适合于放在另一个菜单项。用户各有不同,但是让新用户多测试一段时间可以让它不断改进。对“活动”的批评先放一边,KDE 添加新部件的方法的确很棒。与 KDE 的主题一样,用户不能通过使用提供的图形用户界面浏览和自动安装部件。这是一个有点神奇的功能,但是它这样也可以工作。KDE 的控制面板可能和用户希望的样子不一样,它不是足够的简单。但是有一点很清楚,这将是他们致力于改进的地方。 + +### 因此,XFCE 是最好的桌面环境,对吗? ### + +就我自己而言,我在我的计算机上使用 GNOME、KDE,并在我的办公室和家里的电脑上使用 Xfce。我也有一些老机器在使用 Openbox 和 LXDE。每一个桌面的体验都可以给我提供一些有用的东西,可以帮助我以适合的方式使用每台机器。对我来说,Xfce 是我的心中的挚爱,因为 Xfce 是一个我使用了多年的桌面环境。但对于这篇文章,我是用我日常使用的机器来撰写的,事实上,它用的是 GNOME。 + +这篇文章的主要思想是,对于那些正在寻找稳定的、传统的、容易理解的桌面环境的用户来说,我还是觉得 Xfce 能提供好一点的用户体验。欢迎您在评论部分和我们分享你的意见。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/kde-vs-gnome-vs-xfce-desktop/ + +作者:[M.el Khamlichi][a] +译者:[kylepeng93](https://github.com/kylepeng93) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/pirat9/ diff --git a/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md b/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md deleted file mode 100644 index bdbaf2cdbd..0000000000 --- a/translated/talk/20151202 KDE vs GNOME vs XFCE Desktop.md +++ /dev/null @@ -1,47 +0,0 @@ -translating by kylepeng93 -KDE,GNOME和XFCE的较量 -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2013/07/300px-Xfce_logo.svg_.png) -这么多年来,很多人一直都在他们的linux桌面端使用KDE或者GNOME桌面环境。这两个桌面环境经过多年的发展之后仍然在继续增加他们的用户基数。然而,在轻量级桌面环境下,XFCE一举成为了最受欢迎的桌面环境,相较于LXDE缺少的优美视觉效果,默认配置下的XFCE就可以在这方面打败前者。XFCE提供了用户能在GNOME2下使用的所有功能特性。但是,必须承认,在一些太老的计算机上,它的轻量级的特性并不能得到很好的效果。 - -### 桌面主题定制 ### -用户完成安装之后,XFCE看起来可能会有一点无聊,因为它在视觉上还缺少一些吸引力。但是,请不要误解我的话,XFCE仍然拥有漂亮的桌面,可能看起来像是用户眼中的香草,正如大多数刚刚接触XFCE桌面环境的人。好消息是当我们给XFCE安装新的主题的时候,这会是一个十分容易的过程,因为你能够快速的找到你喜欢的XFCE主题,之后,你可以将它解压到一个合适的目录中。从这一点上来说,XFCE自带的一个重要的图形界面工具可以帮助用户更加容易的选中你已经选好的主题,这可能是目前在XFCE上最好用的工具了。如果用户按照上面的指示去做的话,对于任何想要尝试使用XFCE的用户来说将不存在任何困难。 - -在GNOME桌面上,用户也可以按照上面的方法去做。不过,其中最主要的不同点就是用户必须手动下载并安装GNOME Tweak Tool,这样才能继续你想做的事。当然,对于使用任何一种方式都不会有什么障碍,但是对于用户来说,使用XFCE安装和激活主题并不需要去额外的下载并安装任何tweak tool可能是他们无法忽略的一个优势。而在GNOME上,尤其是在用户已经下载并安装了GNOME Tweak tool之后,你仍将必须确保你已经安装了用户主题拓展。 - -在XFCE一样,用户将会去搜索并下载自己喜欢的主题,然后,用户可以重新使用GNOME Tweak tool,并点击该工具界面左边的Appearance按钮,接着用户便可以简单的通过点击相应的按钮并选择自己已经下载好的主题来使用自己的主题,当一切都完成之后,用户将会看到一个告诉用户已经成功应用了主题的对话框,这样,你的主题便已经安装完成。对于这一点,用户可以简单的使用滚动条来选择他们想要的主题。和XFCE一样,主题激活的过程也是十分简单的,然而,对于因为要使用一个新的主题而下载一个不被包含的应用的需求也是需要考虑的。 - -最后,就是KDE桌面主题定制的过程了。和XFCE一样,不需要去下载额外的工具来安装主题。从这点来看,让人有种XFCE必将使KDE成为最后的赢家的感觉。不仅在KDE上可以完全使用图形用户界面来安装主题,而且甚至只需要用户点击获取新主题的按钮就可以定位,查看,并且最后自动安装新的主题。 - -然而,我们不应该认为KDE相比XFCE是一个更加稳定的桌面环境。因此,现在正是我们思考为什么一些额外的功能可能会从桌面环境中移除来达到最小化的目的。为此,我们都必须为拥有这样出色的功能而给予KDE更多的支持。 - -### MATE不是一个轻量级的桌面环境 ### -在继续比较XFCE,GNOME3和KDE之前,必须对这方面的老手作一个事先说明,我们不会将MATE桌面环境加入到我们的比较中。MATE可被认为是GNOME2的另一个衍生品,但是它并没有声称是作为一款轻量级或者快捷桌面。相反,它的主要目的是成为一款更加传统和舒适的桌面环境,并使它的用户感觉就像在家里使用它一样。 - -另一方面,XFCE生来就是要实现他自己的一系列使命。XFCE给它的用户提供一个更加轻量级的桌面环境,至今仍然有着吸引人的桌面视觉体验。然后,对于一些认为MATE也是一款轻量级的桌面环境的人来说,其实MATE真正的目标并不是成为一款轻量级的桌面环境。这两个选择在各自安装了一款好的主题之后看起来都会让人觉得非常具有吸引力。 - -### 桌面导航 ### -XFCE在窗口之外提供了一个显眼的导航器。任何使用过传统的windows或者GNOME 2/MATE桌面环境的用户都可以在没有任何帮助的情况下自如的使用新安装的XFCE桌面环境的导航器。紧接着,添加小程序到面板中也是很明显的。和找到已经安装的应用程序一样,直接使用启动器并点击你想要运行的应用程序图标。除了LXDE和MATE之外,还没有其他的桌面的导航器可以做到如此简单。不仅如此,更加简单的是对控制面板的使用,对于刚刚使用这个新桌面的每个用户来说这是一个非常大的好处。如果用户更喜欢通过老式的方法去使用他们的桌面,对于GNOME来说,这不是一个问题。和没有最小化按钮形成的用户关注热点一样,加上其他应用布局方法,这将使新用户更加容易习惯这个风格设计。 - -如果用户来自windows桌面环境,那么这些用户将要放弃这些习惯,因为,他们将不能简单的通过鼠标右击一下就可以将一个小程序添加到他们的工作空间的顶部。与此相反,它可以通过使用拓展来实现。GNOME中的KDE拓展是可用的,并且是非常的容易,这些容易之处体现在只需要用户简单的使用位于GNOME拓展页面上的on/off开关。用户必须清楚,只能通过访问该页面才能使用这个功能。 - -另一方面,GNOME正在它的外观中体现它的设计理念,即为用户提供一个直观和易用的控制面板。你可能认为那并不是什么大事,但是,在我看来,它确实是我认为值得称赞并且有必要被提及的方面。KDE提供给它的用户大量传统的桌面使用体验,并通过提供相似的启动器和一种更加类似的获取软件的方式的能力来迎合来自windows的用户。添加小图标或者小程序到KDE桌面是件非常简单的事情,只需要在桌面的底部右击即可。只有在KDE的使用中才会存在的的问题,对于KDE用户寻找的很多KDE的特性实际上都是隐藏的。KDE的用户可能会指责这我的观点,但我仍然坚持我的说法。 - -为了增加小部件,仅仅在我的面板上右击就可以看见面板选项,但是并不是安装小部件的一个快速的方法。通常在你选择面板选项之前你都不会看到添加的小部件,然后,就添加小部件吧。这对我来说不是个问题,但是后来对于一些用户来说,它变成了不必要的困惑。而使事情变得更加复杂,用户管理定位部件区域后,他们后来发现一种称为“Activities”的品牌新术语。在同一地区的小部件,但它是在自己的领域是什么。 - -现在请不要误解我,KDE中的活动特性是很不错的,也是很有价值的,但是从可用性的角度看,为了不让新手感到困惑,它更加适合于应用在另一个目录选项。欢迎来自用户的分歧,,但为了测试这个新手对一些长时间的可以一遍又一遍的证明它是正确的。责骂放在一边,KDE添加新部件的方法的确很棒。与KDE的主题一样,用户不能通过使用提供的图形用户界面浏览和自动安装部件。这是一个神奇的功能,也可以是这样的方式去庆祝。KDE的控制面板可能和用户希望的样子不一样,它不是足够的简单。但是有一点很清楚,这将是他们致力于改进的地方。 - -### 因此,XFCE是最好的桌面环境,对吗? ### -我在我的计算机上使用GNOME,KDE,并在我的办公室和家里的电脑上使用Xfce。我也有一些老机器在使用Openbox和LXDE。每一个使用桌面的经验都可以给我提供一些有用的东西,可以帮助我使用每台机器,因为我认为它是合适的。对我来说,在我的心里有一个柔软的地方,因为Xfce作为一个桌面环境,我坚持使用了很多年。但在这篇文章中,我只是在写我使用电脑的日常,事实上,它是GNOME。 -这篇文章的主要思想是我还是觉得Xfce能提供好一点的用户体验,对于那些正在寻找稳定的、传统的、容易理解的桌面环境的用户来说,XFCE是理想的。欢迎您在评论部分和我们分享你的意见。 --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/kde-vs-gnome-vs-xfce-desktop/ - -作者:[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/ From 00ccc5e744f6017240b18d82330ba4309869a2e4 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 4 May 2016 00:34:07 -0700 Subject: [PATCH 1311/1710] PUB:20151227 Upheaval in the Debian Live project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @vim-kakali 请参考 @PurlingNayuki 的校对,包括内容和格式的调整。@PurlingNayuki 你速度好快! --- .../20151227 Upheaval in the Debian Live project.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/news => published}/20151227 Upheaval in the Debian Live project.md (100%) diff --git a/translated/news/20151227 Upheaval in the Debian Live project.md b/published/20151227 Upheaval in the Debian Live project.md similarity index 100% rename from translated/news/20151227 Upheaval in the Debian Live project.md rename to published/20151227 Upheaval in the Debian Live project.md From 6b7e639eb9531017916f3b8acef16b6572a363bb Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:00:19 +0800 Subject: [PATCH 1312/1710] =?UTF-8?q?20160504-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LXD/Part 4 - LXD 2.0: Resource control.md | 405 ++++++++++++++++++ 1 file changed, 405 insertions(+) create mode 100644 sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md diff --git a/sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md b/sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md new file mode 100644 index 0000000000..178c46ea32 --- /dev/null +++ b/sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md @@ -0,0 +1,405 @@ +Part 4 - LXD 2.0: Resource control +====================================== + +This is the fourth blog post [in this series about LXD 2.0][0]. + +As there are a lot of commands involved with managing LXD containers, this post is rather long. If you’d instead prefer a quick step-by-step tour of those same commands, you can [try our online demo instead][1]! + +![](https://linuxcontainers.org/static/img/containers.png) + +### Available resource limits + +LXD offers a variety of resource limits. Some of those are tied to the container itself, like memory quotas, CPU limits and I/O priorities. Some are tied to a particular device instead, like I/O bandwidth or disk usage limits. + +As with all LXD configuration, resource limits can be dynamically changed while the container is running. Some may fail to apply, for example if setting a memory value smaller than the current memory usage, but LXD will try anyway and report back on failure. + +All limits can also be inherited through profiles in which case each affected container will be constrained by that limit. That is, if you set limits.memory=256MB in the default profile, every container using the default profile (typically all of them) will have a memory limit of 256MB. + +We don’t support resource limits pooling where a limit would be shared by a group of containers, there is simply no good way to implement something like that with the existing kernel APIs. + +#### Disk + +This is perhaps the most requested and obvious one. Simply setting a size limit on the container’s filesystem and have it enforced against the container. + +And that’s exactly what LXD lets you do! +Unfortunately this is far more complicated than it sounds. Linux doesn’t have path-based quotas, instead most filesystems only have user and group quotas which are of little use to containers. + +This means that right now LXD only supports disk limits if you’re using the ZFS or btrfs storage backend. It may be possible to implement this feature for LVM too but this depends on the filesystem being used with it and gets tricky when combined with live updates as not all filesystems allow online growth and pretty much none of them allow online shrink. + +#### CPU + +When it comes to CPU limits, we support 4 different things: + +* Just give me X CPUs + + In this mode, you let LXD pick a bunch of cores for you and then load-balance things as more containers and CPUs go online/offline. + + The container only sees that number of CPU. +* Give me a specific set of CPUs (say, core 1, 3 and 5) + + Similar to the first mode except that no load-balancing is happening, you’re stuck with those cores no matter how busy they may be. +* Give me 20% of whatever you have + + In this mode, you get to see all the CPUs but the scheduler will restrict you to 20% of the CPU time but only when under load! So if the system isn’t busy, your container can have as much fun as it wants. When containers next to it start using the CPU, then it gets capped. +* Out of every measured 200ms, give me 50ms (and no more than that) + + This mode is similar to the previous one in that you get to see all the CPUs but this time, you can only use as much CPU time as you set in the limit, no matter how idle the system may be. On a system without over-commit this lets you slice your CPU very neatly and guarantees constant performance to those containers. + +It’s also possible to combine one of the first two with one of the last two, that is, request a set of CPUs and then further restrict how much CPU time you get on those. + +On top of that, we also have a generic priority knob which is used to tell the scheduler who wins when you’re under load and two containers are fighting for the same resource. + +#### Memory + +Memory sounds pretty simple, just give me X MB of RAM! + +And it absolutely can be that simple. We support that kind of limits as well as percentage based requests, just give me 10% of whatever the host has! + +Then we support some extra stuff on top. For example, you can choose to turn swap on and off on a per-container basis and if it’s on, set a priority so you can choose what container will have their memory swapped out to disk first! + +Oh and memory limits are “hard” by default. That is, when you run out of memory, the kernel out of memory killer will start having some fun with your processes. + +Alternatively you can set the enforcement policy to “soft”, in which case you’ll be allowed to use as much memory as you want so long as nothing else is. As soon as something else wants that memory, you won’t be able to allocate anything until you’re back under your limit or until the host has memory to spare again. + +#### Network I/O + +Network I/O is probably our simplest looking limit, trust me, the implementation really isn’t simple though! + +We support two things. The first is a basic bit/s limits on network interfaces. You can set a limit of ingress and egress or just set the “max” limit which then applies to both. This is only supported for “bridged” and “p2p” type interfaces. + +The second thing is a global network I/O priority which only applies when the network interface you’re trying to talk through is saturated. + +#### Block I/O + +I kept the weirdest for last. It may look straightforward and feel like that to the user but there are a bunch of cases where it won’t exactly do what you think it should. + +What we support here is basically identical to what I described in Network I/O. + +You can set IOps or byte/s read and write limits directly on a disk device entry and there is a global block I/O priority which tells the I/O scheduler who to prefer. + +The weirdness comes from how and where those limits are applied. Unfortunately the underlying feature we use to implement those uses full block devices. That means we can’t set per-partition I/O limits let alone per-path. + +It also means that when using ZFS or btrfs which can use multiple block devices to back a given path (with or without RAID), we effectively don’t know what block device is providing a given path. + +This means that it’s entirely possible, in fact likely, that a container may have multiple disk entries (bind-mounts or straight mounts) which are coming from the same underlying disk. + +And that’s where things get weird. To make things work, LXD has logic to guess what block devices back a given path, this does include interrogating the ZFS and btrfs tools and even figures things out recursively when it finds a loop mounted file backing a filesystem. + +That logic while not perfect, usually yields a set of block devices that should have a limit applied. LXD then records that and moves on to the next path. When it’s done looking at all the paths, it gets to the very weird part. It averages the limits you’ve set for every affected block devices and then applies those. + +That means that “in average” you’ll be getting the right speed in the container, but it also means that you can’t have a “/fast” and a “/slow” directory both coming from the same physical disk and with differing speed limits. LXD will let you set it up but in the end, they’ll both give you the average of the two values. + +### How does it all work? + +Most of the limits described above are applied through the Linux kernel Cgroups API. That’s with the exception of the network limits which are applied through good old “tc”. + +LXD at startup time detects what cgroups are enabled in your kernel and will only apply the limits which your kernel support. Should you be missing some cgroups, a warning will also be printed by the daemon which will then get logged by your init system. + +On Ubuntu 16.04, everything is enabled by default with the exception of swap memory accounting which requires you pass the “swapaccount=1” kernel boot parameter. + +### Applying some limits + +All the limits described above are applied directly to the container or to one of its profiles. Container-wide limits are applied with: + +``` +lxc config set CONTAINER KEY VALUE +``` + +or for a profile: + +``` +lxc profile set PROFILE KEY VALUE +``` + +while device-specific ones are applied with: + +``` +lxc config device set CONTAINER DEVICE KEY VALUE +``` + +or for a profile: + +``` +lxc profile device set PROFILE DEVICE KEY VALUE +``` + +The complete list of valid configuration keys, device types and device keys can be [found here][1]. + +#### CPU + +To just limit a container to any 2 CPUs, do: + +``` +lxc config set my-container limits.cpu 2 +``` + +To pin to specific CPU cores, say the second and fourth: + +``` +lxc config set my-container limits.cpu 1,3 +``` + +More complex pinning ranges like this works too: + +``` +lxc config set my-container limits.cpu 0-3,7-11 +``` + +The limits are applied live, as can be seen in this example: + +``` +stgraber@dakara:~$ lxc exec zerotier -- cat /proc/cpuinfo | grep ^proces +processor : 0 +processor : 1 +processor : 2 +processor : 3 +stgraber@dakara:~$ lxc config set zerotier limits.cpu 2 +stgraber@dakara:~$ lxc exec zerotier -- cat /proc/cpuinfo | grep ^proces +processor : 0 +processor : 1 +``` + +Note that to avoid utterly confusing userspace, lxcfs arranges the /proc/cpuinfo entries so that there are no gaps. + +As with just about everything in LXD, those settings can also be applied in profiles: + +``` +stgraber@dakara:~$ lxc exec snappy -- cat /proc/cpuinfo | grep ^proces +processor : 0 +processor : 1 +processor : 2 +processor : 3 +stgraber@dakara:~$ lxc profile set default limits.cpu 3 +stgraber@dakara:~$ lxc exec snappy -- cat /proc/cpuinfo | grep ^proces +processor : 0 +processor : 1 +processor : 2 +``` + +To limit the CPU time of a container to 10% of the total, set the CPU allowance: + +``` +lxc config set my-container limits.cpu.allowance 10% +``` + +Or to give it a fixed slice of CPU time: + +``` +lxc config set my-container limits.cpu.allowance 25ms/200ms +``` + +And lastly, to reduce the priority of a container to a minimum: + +``` +lxc config set my-container limits.cpu.priority 0 +``` + +#### Memory + +To apply a straightforward memory limit run: + +``` +lxc config set my-container limits.memory 256MB +``` + +(The supported suffixes are kB, MB, GB, TB, PB and EB) + +To turn swap off for the container (defaults to enabled): + +``` +lxc config set my-container limits.memory.swap false +``` + +To tell the kernel to swap this container’s memory first: + +``` +lxc config set my-container limits.memory.swap.priority 0 +``` + +And finally if you don’t want hard memory limit enforcement: + +``` +lxc config set my-container limits.memory.enforce soft +``` + +#### Disk and block I/O + +Unlike CPU and memory, disk and I/O limits are applied to the actual device entry, so you either need to edit the original device or mask it with a more specific one. + +To set a disk limit (requires btrfs or ZFS): + +``` +lxc config device set my-container root size 20GB +``` + +For example: + +``` +stgraber@dakara:~$ lxc exec zerotier -- df -h / +Filesystem Size Used Avail Use% Mounted on +encrypted/lxd/containers/zerotier 179G 542M 178G 1% / +stgraber@dakara:~$ lxc config device set zerotier root size 20GB +stgraber@dakara:~$ lxc exec zerotier -- df -h / +Filesystem Size Used Avail Use% Mounted on +encrypted/lxd/containers/zerotier 20G 542M 20G 3% / +``` + +To restrict speed you can do the following: + +``` +lxc config device set my-container root limits.read 30MB +lxc config device set my-container root.limits.write 10MB +``` + +Or to restrict IOps instead: + +``` +lxc config device set my-container root limits.read 20Iops +lxc config device set my-container root limits.write 10Iops +``` + +And lastly, if you’re on a busy system with over-commit, you may want to also do: + +``` +lxc config set my-container limits.disk.priority 10 +``` + +To increase the I/O priority for that container to the maximum. + +#### Network I/O + +Network I/O is basically identical to block I/O as far the knobs available. + +For example: + +``` +stgraber@dakara:~$ lxc exec zerotier -- wget http://speedtest.newark.linode.com/100MB-newark.bin -O /dev/null +--2016-03-26 22:17:34-- http://speedtest.newark.linode.com/100MB-newark.bin +Resolving speedtest.newark.linode.com (speedtest.newark.linode.com)... 50.116.57.237, 2600:3c03::4b +Connecting to speedtest.newark.linode.com (speedtest.newark.linode.com)|50.116.57.237|:80... connected. +HTTP request sent, awaiting response... 200 OK +Length: 104857600 (100M) [application/octet-stream] +Saving to: '/dev/null' + +/dev/null 100%[===================>] 100.00M 58.7MB/s in 1.7s + +2016-03-26 22:17:36 (58.7 MB/s) - '/dev/null' saved [104857600/104857600] + +stgraber@dakara:~$ lxc profile device set default eth0 limits.ingress 100Mbit +stgraber@dakara:~$ lxc profile device set default eth0 limits.egress 100Mbit +stgraber@dakara:~$ lxc exec zerotier -- wget http://speedtest.newark.linode.com/100MB-newark.bin -O /dev/null +--2016-03-26 22:17:47-- http://speedtest.newark.linode.com/100MB-newark.bin +Resolving speedtest.newark.linode.com (speedtest.newark.linode.com)... 50.116.57.237, 2600:3c03::4b +Connecting to speedtest.newark.linode.com (speedtest.newark.linode.com)|50.116.57.237|:80... connected. +HTTP request sent, awaiting response... 200 OK +Length: 104857600 (100M) [application/octet-stream] +Saving to: '/dev/null' + +/dev/null 100%[===================>] 100.00M 11.4MB/s in 8.8s + +2016-03-26 22:17:56 (11.4 MB/s) - '/dev/null' saved [104857600/104857600] +``` + +And that’s how you throttle an otherwise nice gigabit connection to a mere 100Mbit/s one! + +And as with block I/O, you can set an overall network priority with: + +``` +lxc config set my-container limits.network.priority 5 +``` + +### Getting the current resource usage + +The [LXD API][2] exports quite a bit of information on current container resource usage, you can get: + +* Memory: current, peak, current swap and peak swap +* Disk: current disk usage +* Network: bytes and packets received and transferred for every interface + +And now if you’re running a very recent LXD (only in git at the time of this writing), you can also get all of those in “lxc info”: + +``` +stgraber@dakara:~$ lxc info zerotier +Name: zerotier +Architecture: x86_64 +Created: 2016/02/20 20:01 UTC +Status: Running +Type: persistent +Profiles: default +Pid: 29258 +Ips: + eth0: inet 172.17.0.101 + eth0: inet6 2607:f2c0:f00f:2700:216:3eff:feec:65a8 + eth0: inet6 fe80::216:3eff:feec:65a8 + lo: inet 127.0.0.1 + lo: inet6 ::1 + lxcbr0: inet 10.0.3.1 + lxcbr0: inet6 fe80::f0bd:55ff:feee:97a2 + zt0: inet 29.17.181.59 + zt0: inet6 fd80:56c2:e21c:0:199:9379:e711:b3e1 + zt0: inet6 fe80::79:e7ff:fe0d:5123 +Resources: + Processes: 33 + Disk usage: + root: 808.07MB + Memory usage: + Memory (current): 106.79MB + Memory (peak): 195.51MB + Swap (current): 124.00kB + Swap (peak): 124.00kB + Network usage: + lxcbr0: + Bytes received: 0 bytes + Bytes sent: 570 bytes + Packets received: 0 + Packets sent: 0 + zt0: + Bytes received: 1.10MB + Bytes sent: 806 bytes + Packets received: 10957 + Packets sent: 10957 + eth0: + Bytes received: 99.35MB + Bytes sent: 5.88MB + Packets received: 64481 + Packets sent: 64481 + lo: + Bytes received: 9.57kB + Bytes sent: 9.57kB + Packets received: 81 + Packets sent: 81 +Snapshots: + zerotier/blah (taken at 2016/03/08 23:55 UTC) (stateless) +``` + +### Conclusion + +The LXD team spent quite a few months iterating over the language we’re using for those limits. It’s meant to be as simple as it can get while remaining very powerful and specific when you want it to. + +Live application of those limits and inheritance through profiles makes it a very powerful tool to live manage the load on your servers without impacting the running services. + +### Extra information + +The main LXD website is at: +Development happens on Github at: +Mailing-list support happens on: +IRC support happens in: #lxcontainers on irc.freenode.net + +And if you don’t want or can’t install LXD on your own machine, you can always [try it online instead][3]! + + +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[1]: https://github.com/lxc/lxd/blob/master/doc/configuration.md +[2]: https://github.com/lxc/lxd/blob/master/doc/rest-api.md +[3]: https://linuxcontainers.org/lxd/try-it From f1094fc9f4b6bf9932d0d970bcda6e4be4e1bad5 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:10:47 +0800 Subject: [PATCH 1313/1710] =?UTF-8?q?20160504-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/LXD/Part 5 - LXD 2.0: Image management.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sources/tech/LXD/Part 5 - LXD 2.0: Image management.md diff --git a/sources/tech/LXD/Part 5 - LXD 2.0: Image management.md b/sources/tech/LXD/Part 5 - LXD 2.0: Image management.md new file mode 100644 index 0000000000..3a69aadd00 --- /dev/null +++ b/sources/tech/LXD/Part 5 - LXD 2.0: Image management.md @@ -0,0 +1,7 @@ +Part 5 - LXD 2.0: Image management +================================== +<正文待补充> + + + +原文:https://www.stgraber.org/2016/03/30/lxd-2-0-image-management-512/ From f110d02330299f58652ddba71ccbc14d73814c65 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:11:43 +0800 Subject: [PATCH 1314/1710] =?UTF-8?q?20160306-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rt 6 - LXD 2.0: Remote hosts and container migration.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md diff --git a/sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md b/sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md new file mode 100644 index 0000000000..95c825a30e --- /dev/null +++ b/sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md @@ -0,0 +1,7 @@ +Part 6 - LXD 2.0: Remote hosts and container migration +======================================================= + +<正文待补充> + + +https://www.stgraber.org/2016/04/12/lxd-2-0-remote-hosts-and-container-migration-612/ From 12949d4661238b4aadb5affd73978d487a528a5a Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:12:39 +0800 Subject: [PATCH 1315/1710] =?UTF-8?q?20160306-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/LXD/Part 7 - LXD 2.0: Docker in LXD.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sources/tech/LXD/Part 7 - LXD 2.0: Docker in LXD.md diff --git a/sources/tech/LXD/Part 7 - LXD 2.0: Docker in LXD.md b/sources/tech/LXD/Part 7 - LXD 2.0: Docker in LXD.md new file mode 100644 index 0000000000..60bb3883df --- /dev/null +++ b/sources/tech/LXD/Part 7 - LXD 2.0: Docker in LXD.md @@ -0,0 +1,6 @@ +Part 7 - LXD 2.0: Docker in LXD +================================== + +<正文待补充> + +原文: https://www.stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/ From 81de00207daa9d689bde2d5c4b7d4f9104f6a59d Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:13:27 +0800 Subject: [PATCH 1316/1710] =?UTF-8?q?20160306-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/LXD/Part 7 - LXD 2.0: LXD in LXD.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sources/tech/LXD/Part 7 - LXD 2.0: LXD in LXD.md diff --git a/sources/tech/LXD/Part 7 - LXD 2.0: LXD in LXD.md b/sources/tech/LXD/Part 7 - LXD 2.0: LXD in LXD.md new file mode 100644 index 0000000000..bdb26be75d --- /dev/null +++ b/sources/tech/LXD/Part 7 - LXD 2.0: LXD in LXD.md @@ -0,0 +1,6 @@ +Part 7 - LXD 2.0: LXD in LXD +============================== + +<原文待补充> + +原文:https://www.stgraber.org/2016/04/14/lxd-2-0-lxd-in-lxd-812/ From b146d488a2323fa086324d10dac9e29fb65e5e00 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:14:16 +0800 Subject: [PATCH 1317/1710] =?UTF-8?q?20160306-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/LXD/Part 9 - LXD 2.0: Live migration.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sources/tech/LXD/Part 9 - LXD 2.0: Live migration.md diff --git a/sources/tech/LXD/Part 9 - LXD 2.0: Live migration.md b/sources/tech/LXD/Part 9 - LXD 2.0: Live migration.md new file mode 100644 index 0000000000..7be46f6a00 --- /dev/null +++ b/sources/tech/LXD/Part 9 - LXD 2.0: Live migration.md @@ -0,0 +1,6 @@ +Part 9 - LXD 2.0: Live migration +================================= + +<正文待补充> + +原文:https://www.stgraber.org/2016/04/25/lxd-2-0-live-migration-912/ From 1058b3399606e06dc1e541d72627dc9924d5e10f Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:15:11 +0800 Subject: [PATCH 1318/1710] =?UTF-8?q?20160504-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/LXD/Part 4 - LXD 2.0: Resource control.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md b/sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md index 178c46ea32..e404cccffa 100644 --- a/sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md +++ b/sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md @@ -390,7 +390,7 @@ And if you don’t want or can’t install LXD on your own machine, you can alwa -------------------------------------------------------------------------------- -via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ +via: https://www.stgraber.org/2016/03/26/lxd-2-0-resource-control-412/ 作者:[Stéphane Graber][a] 译者:[译者ID](https://github.com/译者ID) From 6564cc0aaaef3f0f67124665031a15d2a686eca1 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:16:12 +0800 Subject: [PATCH 1319/1710] =?UTF-8?q?20160504-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 2177dbc5a3c9d69f9dae4e880c61f7730d990b89 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 4 May 2016 16:17:57 +0800 Subject: [PATCH 1320/1710] =?UTF-8?q?20160504-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...- LXD 2.0: LXD in LXD.md => Part 8 - LXD 2.0: LXD in LXD.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename sources/tech/LXD/{Part 7 - LXD 2.0: LXD in LXD.md => Part 8 - LXD 2.0: LXD in LXD.md} (80%) diff --git a/sources/tech/LXD/Part 7 - LXD 2.0: LXD in LXD.md b/sources/tech/LXD/Part 8 - LXD 2.0: LXD in LXD.md similarity index 80% rename from sources/tech/LXD/Part 7 - LXD 2.0: LXD in LXD.md rename to sources/tech/LXD/Part 8 - LXD 2.0: LXD in LXD.md index bdb26be75d..76c361e517 100644 --- a/sources/tech/LXD/Part 7 - LXD 2.0: LXD in LXD.md +++ b/sources/tech/LXD/Part 8 - LXD 2.0: LXD in LXD.md @@ -1,4 +1,4 @@ -Part 7 - LXD 2.0: LXD in LXD +Part 8 - LXD 2.0: LXD in LXD ============================== <原文待补充> From 772cba3035747d49f6e5ed838bf11cfd369d41b4 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Wed, 4 May 2016 17:24:07 +0800 Subject: [PATCH 1321/1710] Proofread LXD/Part 1 - LXD 2.0: Introduction to LXD --- .../Part 1 - LXD 2.0: Introduction to LXD.md | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md index f8ed83a482..011f385881 100644 --- a/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md +++ b/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md @@ -10,7 +10,7 @@ Part 1 - LXD 2.0: LXD 入门 #### 什么是 LXD ? -简单来说 LXD 就是一个提供了 REST API 的 LXC 容器管理器。 +简单地说, LXD 就是一个提供了 REST API 的 LXC 容器管理器。 LXD 最主要的目标就是使用 Linux 容器而不是硬件虚拟化向用户提供一种接近虚拟机的使用体验。 @@ -18,27 +18,27 @@ LXD 最主要的目标就是使用 Linux 容器而不是硬件虚拟化向用户 这是一个最常被问起的问题,现在就让我们直接指出其中的不同吧。 -LXD 聚焦于系统容器,通常也被称为架构容器。这就是说 LXD 容器实际上运行了一个完整的 Linux 操作系统,就像在裸机或虚拟机上运行的一样。 +LXD 聚焦于系统容器,通常也被称为架构容器。这就是说 LXD 容器实际上如在裸机或虚拟机上运行一般运行了一个完整的 Linux 操作系统。 -这些容器一般都是基于一个干净的发布镜像,会长时间运行。传统的配置管理工具和发布工具可以和 LXD 一起使用,就像你在虚拟机、云或者物理机器上使用一样。 +这些容器一般基于一个干净的发布镜像并会长时间运行。传统的配置管理工具和部署工具可以如在虚拟机、云和物理机器上一样与 LXD 一起使用。 -相对的, Docker 关注于短视的、无状态的最小容器,这些容器通常并不会升级或者重新配置,它们一般都是作为一个整体被替换掉。这就使得 Docker 和类似的项目更像是一种软件发布机制,而不是一个机器管理工具。 +相对的, Docker 关注于短期的、无状态的最小容器,这些容器通常并不会升级或者重新配置,而是作为一个整体被替换掉。这就使得 Docker 及类似项目更像是一种软件发布机制,而不是一个机器管理工具。 -这两种模型并不是完全互斥的。你完全可以使用 LXD 为你的用户提供一个完整的 Linux 系统,而他们可以在 LXD 上面安装 Docker 来运行他们想要的软件。 +这两种模型并不是完全互斥的。你完全可以使用 LXD 为你的用户提供一个完整的 Linux 系统,而他们可以在 LXD 内安装 Docker 来运行他们想要的软件。 #### 为什么要用 LXD? -我们已经在 LXC 上工作了好几个年头了。 LXC 成功的实现了它的目标,它提供了一系列很棒的底层工具和库来创建、管理容器。 +我们已经持续开发并改进 LXC 好几年了。 LXC 成功的实现了它的目标,它提供了一系列很棒的用于创建和管理容器的底层工具和库。 -然而这些底层工具的使用界面对用户并不是很友好。他们需要用户有很多的基础知识来理解他们要干什么和怎么去干。同时向后兼容旧的容器和部署策略已经阻止 LXC 默认使用一些安全特性,这导致用户需要进行更多人工操作来实现本可以自动完成的工作。 +然而这些底层工具的使用界面对用户并不是很友好。使用它们需要用户有很多的基础知识以理解它们的工作方式和目的。同时,向后兼容旧的容器和部署策略也使得 LXC 无法默认使用一些安全特性,这导致用户需要进行更多人工操作来实现本可以自动完成的工作。 -我们把 LXD 作为解决这些缺陷的一个很好的机会。作为一个长时间运行的守护进程可以让我们定位到很多 LXC 的限制,比如动态资源限制,容器迁移和有效的进行在线迁移,它同时也给了我们机会来提供一个新的默认体验:默认开启安全特性,对用户更加友好。 +我们把 LXD 作为解决这些缺陷的一个很好的机会。作为一个长时间运行的守护进程, LXD 可以绕开 LXC 的许多限制,比如动态资源限制、无法进行容器迁移和高效的在线迁移;同时,它也为创造新的默认体验提供了机会:默认开启安全特性,对用户更加友好。 ### LXD 的主要组件 -LXD 是由几个主要组件构成的,在它的命令行客户端和 API结构体里,这些组件都是 LXD 目录结构下可见的。 +LXD 是由几个主要组件构成的,这些组件都是 LXD 目录结构、命令行客户端和 API 结构体里下可见的。 #### 容器 @@ -54,15 +54,15 @@ LXD 中的容器包括以下及部分: 容器快照和容器是一回事,只不过快照是不可修改的,只能被重命名,销毁或者用来恢复系统,但是无论如何都不能被修改。 -值得注意的是,因为我们允许用户保存容器的运行时状态,这就有效的为我们提供了“有状态”的快照的功能。这就是说我们可以使用快照回滚容器的 cpu 和内存。 +值得注意的是,因为我们允许用户保存容器的运行时状态,这就有效的为我们提供了“有状态”的快照的功能。这就是说我们可以使用快照回滚容器的 CPU 和内存。 #### 镜像 -LXD 是基于镜像实现的,所有的 LXD 容器都是来自于镜像。容器镜像经常是一些干净的 Linux 发布版的镜像,类似于你们在虚拟机和云实例上使用的镜像。 +LXD 是基于镜像实现的,所有的 LXD 容器都是来自于镜像。容器镜像通常是一些纯净的 Linux 发行版的镜像,类似于你们在虚拟机和云实例上使用的镜像。 -所以就可以“发布”容器:使用容器制作一个镜像,然后可以在本地或者远程 LXD 主机上使用。 +所以就可以「发布」容器:使用容器制作一个镜像并在本地或者远程 LXD 主机上使用。 -镜像通常使用 sha256 来区分,同时也可以使用它的全部或部分哈希码。因为输入长长的哈希码对用户来说不好,所以镜像可以使用几个自身的属性来区分,这就允许让用户在镜像商店里方便搜索镜像。别名也可以用来把对用户友好的字符串 1 比 1 的映射成镜像的哈希码。 +镜像通常使用全部或部分 sha256 哈希码来区分。因为输入长长的哈希码对用户来说不好,所以镜像可以使用几个自身的属性来区分,这就使得用户在镜像商店里方便搜索镜像。别名也可以用来 1 对 1 地把对用户友好的名字映射到某个镜像的哈希码。 LXD 安装时已经配置好了三个远程镜像服务器(参见下面的远程一节): @@ -70,55 +70,55 @@ LXD 安装时已经配置好了三个远程镜像服务器(参见下面的远 - “ubuntu-daily:” 提供每天构建出来的 Ubuntu - “images:” 社区维护的镜像服务器,提供一系列的 Linux 发布版,使用的是上游 LXC 的模板 -LXD 守护进程会从镜像上次被使用开始自动缓存远程镜像一段时间(默认是 10 天),然后这些镜像才会失效。 +LXD 守护进程会从镜像上次被使用开始自动缓存远程镜像一段时间(默认是 10 天),超过时限后这些镜像才会失效。 -此外 LXD 还会自动更新远程镜像(除非指明不更新),所以本地的镜像会一直是最新版的。 +此外, LXD 还会自动更新远程镜像(除非指明不更新),所以本地的镜像会一直是最新版的。 #### 配置 配置文件是一种在一处定义容器配置和容器设备,然后应用到一系列容器的方法。 -一个容器可以被应用多个配置文件。当构建最终容器配置时(即通常的扩展配置),这些配置文件都会按照他们定义顺序被应用到容器上,当有重名的配置,新的会覆盖掉旧的。然后本地容器配置会应用在这些之上,覆盖所有来自配置文件的选项。 +一个容器可以被应用多个配置文件。当构建最终容器配置时(即通常的扩展配置),这些配置文件都会按照他们定义顺序被应用到容器上,当有重名的配置时,新的会覆盖掉旧的。然后本地容器设置会在这些基础上应用,覆盖所有来自配置文件的选项。 LXD 自带两种预配置的配置文件: -- “default” 配置是自动应用在所有容器之上,除非用户提供了一系列替代的配置文件。目前这个配置文件只做一件事,为容器定义 “eth0” 网络设备。 -- “docker” 配置是一个允许你在容器里运行 Docker 容器的配置文件。它会要求 LXD 加载一些需要的内核模块,这样就能允许容器嵌套,并且创建一些设备入口。 +- 「 default 」配置是自动应用在所有容器之上,除非用户提供了一系列替代的配置文件。目前这个配置文件只做一件事,为容器定义 eth0 网络设备。 +- 「 docker” 」配置是一个允许你在容器里运行 Docker 容器的配置文件。它会要求 LXD 加载一些需要的内核模块以支持容器嵌套并创建一些设备入口。 #### 远程 如我之前提到的, LXD 是一个基于网络的守护进程。附带的命令行客户端可以与多个远程 LXD 服务器、镜像服务器通信。 -默认情况下我们的命令行客户端会与下面几个预定义的远程服务器通信: +默认情况下,我们的命令行客户端会与下面几个预定义的远程服务器通信: - local:(默认的远程服务器,使用 UNIX socket 和本地的 LXD 守护进程通信) -- ubuntu:(buntu 镜像服务器,提供稳定版的 Ubuntu 镜像) -- ubuntu-daily:(Ubuntu 镜像服务器,提供每天构建出来的 Ubuntu) -- images:(images.linuxcontainers.org 镜像服务器) +- ubuntu:( Ubuntu 镜像服务器,提供稳定版的 Ubuntu 镜像) +- ubuntu-daily:( Ubuntu 镜像服务器,提供每天构建出来的 Ubuntu ) +- images:( images.linuxcontainers.org 镜像服务器) 所有这些远程服务器的组合都可以在命令行客户端里使用。 -你也可以添加任意数量的远程 LXD 主机来监听网络。匿名服务器如果是开放镜像服务器,或者通过认证可以管理远程容器的镜像服务器,都可以添加进来。 +你也可以添加任意数量的远程 LXD 主机来监听网络。匿名的开放镜像服务器,或者通过认证可以管理远程容器的镜像服务器,都可以添加进来。 -正是这种远程机制使得和远程镜像服务器交互就像在主机间复制、移动容器成为可能。 +正是这种远程机制使得与远程镜像服务器交互及在主机间复制、移动容器成为可能。 ### 安全性 -我们设计 LXD 时的一个核心要求就当现代 Linux 发布版运行在容器里的时候要尽可能的安全。 +我们设计 LXD 时的一个核心要求,就是在不修改现代 Linux 发行版的前提下,使容器尽可能的安全。 -LXD 使用的主要安全特是通过使用 LXC 库实现的: +LXD 使用的、通过使用 LXC 库实现的主要安全特性有: -- 内核名字空间。特别是用户名字空间是一种让容器和系统剩余部分完全分割的方法。LXD 默认使用用户名字空间(和 LXC 相反),允许用户在需要的时候以容器为单位进行打开、关闭。 +- 内核名字空间。尤其是用户名字空间,它让容器和系统剩余部分完全分离。LXD 默认使用用户名字空间(和 LXC 相反),并允许用户在需要的时候以容器为单位打开或关闭。 - Seccomp 系统调用。用来隔离潜在危险的系统调用。 - AppArmor:对 mount、socket、ptrace 和文件访问提供额外的限制。特别是限制跨容器通信。 -- Capabilities。组织容器加载内核模块,修改主机系统时间,等等。 +- Capabilities。阻止容器加载内核模块,修改主机系统时间,等等。 - CGroups。限制资源使用,防止对主机的 DoS 攻击。 -和 LXC 直接将这些特性暴露出来不同, 为了对用户友好 ,LXD 构建了一个新的配置语言把大部分的这些特性都抽象封装起来。举了例子,一个用户可以告诉 LXD 把主机设备放进容器而不需要手动检查他们的主/次设备号来更新 CGroup 策略。 +为了对用户友好 , LXD 构建了一个新的配置语言把大部分的这些特性都抽象封装起来,而不是如 LXC 一般直接将这些特性暴露出来。举了例子,一个用户可以告诉 LXD 把主机设备放进容器而不需要手动检查他们的主/次设备号来更新 CGroup 策略。 -和 LXD 本身通信是基于使用 TLS 1.2 的链路,这些链路只允许使用有限的几个被允许的密钥。当和那些经过系统证书认证之外的主机通信时, LXD 会提示用户验证主机的远程足迹(SSH 方式),然后把足迹缓存起来以供以后使用。 +和 LXD 本身通信是基于使用 TLS 1.2 保护的链路,这些链路只允许使用有限的几个被允许的密钥。当和那些经过系统证书认证之外的主机通信时, LXD 会提示用户验证主机的远程足迹(SSH 方式),然后把足迹缓存起来以供以后使用。 ### REST 接口 @@ -128,13 +128,13 @@ REST 接口可以通过本地的 unix socket 访问,这只需要经过组认 REST 接口的结构能够和上文所说的不同的组件匹配,是一种简单、直观的使用方法。 -当需要一种复杂的通信机制时, LXD 将会进行websocket 协商完成剩余的通信工作。主要用于交互式终端会话,容器迁移和事件通知。 +当需要一种复杂的通信机制时, LXD 将会进行 websocket 协商完成剩余的通信工作。这主要用于交互式终端会话、容器迁移和事件通知。 -LXD 2.0 附带了 1.0 版的 API。我们虽然在 1.0 版 API 添加了额外的特性,但是这不会在 1.0 版 API 的端点里破坏向后兼容性,我们会声明额外的 API 扩展使得客户端可以找到新的接口。 +LXD 2.0 附带了 1.0 版的稳定 API。虽然我们在 1.0 版 API 添加了额外的特性,但是这不会在 1.0 版 API 的端点里破坏向后兼容性,因为我们会声明额外的 API 扩展使得客户端可以找到新的接口。 ### 容器规模化 -虽然 LXD 提供了一个很好的命令行客户端,但是这个客户端并不能管理多个主机的大量的容器。在这种使用情况下,我们可以使用 OpenStack 的插件 nova-lxd ,它可以使得 OpenStack 像使用虚拟机一样使用 LXD 容器。 +虽然 LXD 提供了一个很好的命令行客户端,但是这个客户端并不能管理多个主机上大量的容器。在这种使用情况下,我们可以使用 OpenStack 的 nova-lxd 插件,它可以使 OpenStack 像使用虚拟机一样使用 LXD 容器。 这就允许在大量的主机上部署大量的 LXD 容器,然后使用 OpenStack 的 API 来管理网络、存储以及负载均衡。 @@ -148,7 +148,7 @@ LXD 的邮件列表: LXD 的 IRC 频道: #lxcontainers on irc.freenode.net -如果你不想或者不能在你的机器上安装 LXD ,你可以在 web 上[试试在线版的 LXD][2] 。 +如果你不想或者不能在你的机器上安装 LXD ,你可以在 web 上[试试在线版的 LXD] [2] 。 -------------------------------------------------------------------------------- @@ -156,7 +156,7 @@ via: https://www.stgraber.org/2016/03/11/lxd-2-0-introduction-to-lxd-112/ 作者:[Stéphane Graber][a] 译者:[ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 654aed05cd8c243bddd89fabc64cfe878363ff40 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 5 May 2016 10:00:00 +0800 Subject: [PATCH 1322/1710] Update Part 2 - LXD 2.0: Installing and configuring LXD.md --- ...LXD 2.0: Installing and configuring LXD.md | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md index 079b91c429..9f00e4eed2 100644 --- a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md +++ b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md @@ -9,11 +9,11 @@ Part 2 - LXD 2.0: 安装与配置 ### 安装篇 -There are many ways to get the latest and greatest LXD. We recommend you use LXD with the latest LXC and Linux kernel to benefit from all its features but we try to degrade gracefully where possible to support older Linux distributions. +获得 LXD 有很多种办法。我们推荐你是用配合最新版的 LXC 和 Linux 内核使用 LXD,这样就可以享受到它的全部特性,但是注意,我们现在也在慢慢的降低对旧版本 Linux 发布版的支持。 #### Ubuntu 标准版 -All new releases of LXD get uploaded to the Ubuntu development release within a few minutes of the upstream release. That package is then used to seed all the other source of packages for Ubuntu users. +所有新发布的 LXD 都会在发布几分钟后上传到 Ubuntu 开发版的安装源里。这个安装包然后就会当作种子给全部其他的安装包源,供 Ubuntu 用户使用。 如果使用 Ubuntu 16.04 则可以直接安装: @@ -56,21 +56,21 @@ sudo emerge --ask lxd #### 源代码 -Building LXD from source isn’t very difficult if you are used to building Go projects. Note however that you will need the LXC development headers. In order to run LXD, your distribution also needs a recent Linux kernel (3.13 at least), recent LXC (1.1.5 or higher), LXCFS and a version of shadow that supports user sub-uid/gid allocations. +如果你曾经编译过 Go 工程,那么从源代码编译 LXD 并不是十分困难。然而要住你的是你需要 LXC 的开发头文件。为了运行 LXD , 你的 发布版铜须也需要使用比较新的内核(最起码是 3.13),比较新的 LXC (1.1.4 或更高版本) ,LXCFS 以及支持用户子 uid/gid 分配的 shadow 。 -The latest instructions on building LXD from source can be found in the [upstream README][2]. +从源代码编译 LXD 的最新指令可以在[上游 README][2]里找到。 ### ubuntu 上的网络配置 -The Ubuntu packages provide you with a “lxdbr0” bridge as a convenience. This bridge comes unconfigured by default, offering only IPv6 link-local connectivity through an HTTP proxy. +Ubuntu 的安装包会很方便的给你提供一个 "lxdbr0" 网桥。这个网桥默认是没有配置过的,只提供通过 HTTP 代理的 IPV6 的本地连接。 -To reconfigure the bridge and add some IPv4 or IPv6 subnet to it, you can run: +要配置这个网桥和添加 IPV4 、 IPV6 子网,你可以运行下面的命令: ``` sudo dpkg-reconfigure -p medium lxd ``` -Or go through the whole LXD step by step setup (see below) with: +或者直接通过 LXD 初始化命令一步一步的配置: ``` sudo lxd init @@ -78,14 +78,13 @@ sudo lxd init ### 存储系统 -LXD supports a number of storage backends. It’s best to know what backend you want to use prior to starting to use LXD as we do not support moving existing containers or images between backends. +LXD 提供了集中存储后端。在开始使用 LXD 之前,你最好直到自己想要的后端,因为我们不支持在后端之间迁移已经生成的容器。 -A feature comparison table of the different backends can be found [here][3]. +各个[后端特性的比较表格][3]可以在这里找到。 #### ZFS -Our recommendation is ZFS as it supports all the features LXD needs to offer the fastest and most reliable container experience. This includes per-container disk quotas, immediate snapshot/restore, optimized migration (send/receive) and instant container creation from an image. It is also considered more mature than btrfs. - +我们的推荐是 ZFS , 因为他能支持 LXD 的全部特性,同时提供最快和最可靠的容器体验。它包括了以容器为单位的磁盘配额,直接快照和恢复,优化了的迁移(发送/接收),以及快速从镜像创建容器。它同时也被认为要比 btrfs 更成熟。 要和 LXD 一起使用 ZFS ,你需要首先在你的系统上安装 ZFS。 @@ -115,26 +114,28 @@ sudo apt install ubuntu-zfs sudo lxd init ``` -This will ask you a few questions about what kind of zfs configuration you’d like for your LXD and then configure it for you. +这条命令接下来会想你提问一下你想要的 ZFS 的配置,然后为你配置好 ZFS 。 #### btrfs -If ZFS isn’t available, then btrfs offers the same level of integration with the exception that it doesn’t properly report disk usage inside the container (quotas do apply though). -btrfs also has the nice property that it can nest properly which ZFS doesn’t yet. That is, if you plan on using LXD inside LXD, btrfs is worth considering. +如果 ZFS 不可用,那么 btrfs 可以提供相同级别的集成,除了不会合理的报告容器内的磁盘使用情况(虽然配额还是可以用的)。 -LXD doesn’t need any configuration to use btrfs, you just need to make sure that /var/lib/lxd is stored on a btrfs filesystem and LXD will automatically make use of it for you. +btrfs 同时拥有很好的嵌套属性,而这时 ZFS 所不具有的。也就是说如果你计划在 LXD 中再使用 LXD ,那么 btrfs 就很值得你考虑一下。 + +使用 btrfs 的话,LXD 不需要进行任何的配置,你只需要保证 `/var/lib/lxd` 是保存在 btrfs 文件系统中,然后 LXD 就会自动为你使用 btrfs 了。 #### LVM -If ZFS and btrfs aren’t an option for you, you can still get some of their benefits by using LVM instead. LXD uses LVM with thin provisioning, creating an LV for each image and container and using LVM snapshots as needed. +如果 ZFS 和 btrfs 都不是你想要的,你仍然可以考虑使用 LVM。 LXD 会以自动精简配置的方式使用 LVM,为每个镜像和容器创建 LV,如果需要的话也会使用 LVM 的快照功能。 + +要配置 LXD 使用 LVM,需要创建一个 LVM 的 VG ,然后运行: -To configure LXD to use LVM, create a LVM VG and run: ``` lxc config set storage.lvm_vg_name "THE-NAME-OF-YOUR-VG" ``` -By default LXD uses ext4 as the filesystem for all the LVs. You can change that to XFS if you’d like: +默认情况下 LXD 使用 ext4 作为全部 LV 的文件系统。如果你喜欢的话可以改成 XFS: ``` lxc config set storage.lvm_fstype xfs @@ -142,21 +143,19 @@ lxc config set storage.lvm_fstype xfs #### 简单目录 -If none of the above are an option for you, LXD will still work but without any of those advanced features. It will simply create a directory for each container, unpack the image tarballs for each container creation and do a full filesystem copy on container copy or snapshot. +如果上面全部方案你都不打算使用, LXD 还可以工作,但是不会使用任何高级特性。它只会为每个容器创建一个目录,然后在创建每个容器时解压缩镜像的压缩包,在容器拷贝和快照时会进行一次完整的文件系统拷贝。 -All features are supported except for disk quotas, but this is very wasteful of disk space and also very slow. If you have no other choice, it will work, but you should really consider one of the alternatives above. - - +除了磁盘配额以外的特性都是支持的,但是很浪费磁盘空间,并且非常慢。如果你没有其他选择,这还是可以工作的,但是你还是需要认真的考虑一下上面的几个方案。 ### 配置篇 -The complete list of configuration options for the LXD daemon can be found [here][4]. +LXD 守护进程的完整配置项列表可以在[这里找到][4]。 #### 网络配置 -By default LXD doesn’t listen to the network. The only way to talk to it is over a local unix socket at /var/lib/lxd/unix.socket. +默认情况下 LXD 不会监听网络。和它通信的唯一办法是使用本地 unix socket 通过 `/var/lib/lxd/unix.socket` 进行通信。 -To have it listen to the network, there are two useful keys to set: +要让 LXD 监听网络,下面有两个有用的命令: ``` lxc config set core.https_address [::] @@ -208,8 +207,11 @@ At this point you should have a working version of the latest LXD release, you c ### 额外信息 LXD 的主站在: + LXD 的 GitHub 仓库: + LXD 的邮件列表: + LXD 的 IRC 频道: #lxcontainers on irc.freenode.net 如果你不想或者不能在你的机器上安装 LXD ,你可以[试试在线版的 LXD][1] 。 @@ -219,7 +221,7 @@ LXD 的 IRC 频道: #lxcontainers on irc.freenode.net via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ 作者:[Stéphane Graber][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 fc97797762024265989ba4393e9cca85f3652901 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 5 May 2016 11:58:32 +0800 Subject: [PATCH 1323/1710] Update Part 2 - LXD 2.0: Installing and configuring LXD.md --- .../LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md index 9f00e4eed2..2f30288a2d 100644 --- a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md +++ b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md @@ -162,11 +162,11 @@ lxc config set core.https_address [::] lxc config set core.trust_password some-secret-string ``` -The first instructs LXD to bind the “::” IPv6 address, namely, all addresses on the machine. You can obviously replace this by a specific IPv4 or IPv6 address and can append the TCP port you’d like it to bind (defaults to 8443). +第一条命令将 LXD 绑定到 IPV6 地址 “::”,也就是监听机器的所有 IPV6 地址。你可以显式的使用一个特定的 IPV4 或者 IPV6 地址替代默认地址,如果你想绑定 TCP 端口(默认是 8443)的话可以在地址后面添加端口号即可。 -The second sets a password which is used for remote clients to add themselves to the LXD certificate trust store. When adding the LXD host, they will be prompted for the password, if the password matches, the LXD daemon will store their client certificate and they’ll be trusted, never needing the password again (it can be changed or unset entirely at that point). +第二条命令设置了密码,可以让远程客户端用来把自己添加到 LXD 可信证书中心。如果已经给主机设置了密码,当添加 LXD 主机时会提示输入密码, LXD 守护进程会保存他们的客户端的证书以确保客户端是可信的,这样就不需要再次输入密码(可以随时设置和取消) -You can also choose not to set a password and instead manually trust each new client by having them give you their “client.crt” file (from ~/.config/lxc) and add it to the trust store yourself with: +你也可以选择不设置密码,然后通过给每个客户端发送 "client.crt" (来自于 `~/.config/lxc`)文件,然后把它添加到你自己的可信中信来实现人工验证每个新客户端是否可信,可以使用下面的命令: ``` lxc config trust add client.crt From d759e47fa5f18fafdc2968ae1957110a1e20a204 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 5 May 2016 12:45:30 +0800 Subject: [PATCH 1324/1710] =?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 --- ...art 2 - LXD 2.0: Installing and configuring LXD.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md index 2f30288a2d..8e405254d3 100644 --- a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md +++ b/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md @@ -188,9 +188,9 @@ With those, all transfers initiated by LXD will use the squid01.internal HTTP pr #### 镜像管理 -LXD does dynamic image caching. When instructed to create a container from a remote image, it will download that image into its image store, mark it as cached and record its origin. After a number of days without seeing any use (10 by default), the image is automatically removed. Every few hours (6 by default), LXD also goes looking for a newer version of the image and updates its local copy. +LXD 使用动态镜像缓存。当从远程镜像创建容器的时候,它会自动把镜像下载到本地镜像商店,同时标志为已缓存并记录来源。几天后(默认10天)如果没有再被使用,那么这个镜像就会自动被删除。每个几小时(默认是6小时) LXD 还会检查一下这个镜像是否有新版本,然后更新镜像的本地拷贝。 -All of that can be configured through the following configuration options: +所有这些都可以通过下面的配置选项进行配置: ``` lxc config set images.remote_cache_expiry 5 @@ -198,11 +198,12 @@ lxc config set images.auto_update_interval 24 lxc config set images.auto_update_cached false ``` -Here we are instructing LXD to override all of those defaults and instead cache images for up to 5 days since they were last used, look for image updates every 24 hours and only update images which were directly marked as such (–auto-update flag in lxc image copy) but not the images which were automatically cached by LXD. +这些命令让 LXD 修改了它的默认属性,缓存期替换为 5 天,更新间隔为 24 小时,而且只更新那些标志为自动更新的镜像(lxc 镜像拷贝有标志 `–auto-update`)而不是 LXD 自动缓存的镜像。 + ### 总结 -At this point you should have a working version of the latest LXD release, you can now start playing with it on your own or wait for the next blog post where we’ll create our first container and play with the LXD command line tool. +到这里为止,你就应该有了一个可以工作的、最新版的 LXD ,现在你可以开始用 LXD 了,或者等待我们的下一条博文,那时我们会介绍如何创建第一个容器以及使用 LXD 命令行工具操作容器。 ### 额外信息 @@ -218,7 +219,7 @@ LXD 的 IRC 频道: #lxcontainers on irc.freenode.net -------------------------------------------------------------------------------- -via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ +via: https://www.stgraber.org/2016/03/15/lxd-2-0-installing-and-configuring-lxd-212/ 作者:[Stéphane Graber][a] 译者:[ezio](https://github.com/oska874) From 0187ce4c5c35355cacd3aced0aa99920bc876dc2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 5 May 2016 12:46:52 +0800 Subject: [PATCH 1325/1710] Rename sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md to translated/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md --- .../tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md (100%) diff --git a/sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md b/translated/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md similarity index 100% rename from sources/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md rename to translated/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md From 4d00e7e90f044cedf31e149f8a96c954b348a0ce Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 5 May 2016 15:36:32 +0800 Subject: [PATCH 1326/1710] =?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 --- ... do after installing openSUSE Leap 42.1.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md index 109bf6c11d..ef5434da3d 100644 --- a/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md +++ b/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md @@ -1,28 +1,28 @@ -装好 openSUSE Leap 42.1 之后要做的 8 件事 +安装 openSUSE Leap 42.1 之后要做的 8 件事 ================================================================================ ![Credit: Metropolitan Transportation/Flicrk](http://images.techhive.com/images/article/2015/11/things-to-do-100626947-primary.idge.jpg) 致谢:[Metropolitan Transportation/Flicrk][1] -> 你已经在你的电脑上安装了 openSUSE。这是你接下来要做的。 +> 你已经在你的电脑上安装了 openSUSE,这是你接下来要做的。 -[openSUSE Leap 确实是个巨大的飞跃][2],它允许用户运行一个和 SUSE Linux 企业版拥有一样基因的发行版。和其它系统一样,在使用它之前需要做些优化设置。 +[openSUSE Leap 确实是个巨大的飞跃][2],它允许用户运行一个和 SUSE Linux 企业版拥有一样基因的发行版。和其它系统一样,为了实现最佳的使用效果,在使用它之前需要做些优化设置。 -下面是一些我在安装 openSUSE 到我的电脑上之后做的一些事情(不适用于服务器)。这里面没有强制性要求的设置,基本安装对来说你也可能足够了。但如果你想获得更好的 openSUSE Leap 体验,那就跟着我往下看吧。 +下面是一些我在我的电脑上安装 openSUSE Leap 之后做的一些事情(不适用于服务器)。这里面没有强制性要求的设置,基本安装对你来说也可能足够了。但如果你想获得更好的 openSUSE Leap 体验,那就跟着我往下看吧。 ### 1. 添加 Packman 仓库 ### -由于专利和授权等原因,openSUSE 和许多 Linux 发行版一样,不通过官方仓库(repos)提供一些软件,解码器,以及驱动等。取而代之的是通过第三方或社区仓库来提供。第一个也是最重要的仓库是“Packman”。因为这些仓库不是默认启用的,我们需要添加它们。你可以通过 YaST (openSUSE 的特色之一)或者命令行完成(如下方介绍)。 +由于专利和授权等原因,openSUSE 和许多 Linux 发行版一样,不通过官方仓库(repos)提供一些软件、解码器,以及驱动等。取而代之的是通过第三方或社区仓库来提供。第一个也是最重要的仓库是“Packman”。因为这些仓库不是默认启用的,我们需要添加它们。你可以通过 YaST(openSUSE 的特色之一)或者命令行完成(如下方介绍)。 ![o42 yast repo](http://images.techhive.com/images/article/2015/11/o42-yast-repo-100626952-large970.idge.png) 添加 Packman 仓库。 -使用 YsST,打开软件源部分。点击“添加”按钮并选择“社区仓库(Community Repositories)”。点击“下一步”。一旦仓库列表加载出来了,选择 Packman 仓库。点击“确认”,然后点击“信任”导入信任的 GnuPG 密钥。 +使用 YaST,打开软件源部分。点击“添加”按钮并选择“社区仓库(Community Repositories)”。点击“下一步”。一旦仓库列表加载出来了,选择 Packman 仓库。点击“确认”,然后点击“信任”导入信任的 GnuPG 密钥。 或者在终端里使用以下命令添加并启用 Packman 仓库: zypper ar -f -n packmanhttp://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_42.1/ packman -仓库添加之后,你就能接触到更多的包了。想安装任意软件或包,打开 YaST 软件管理器,搜索并安装即可。 +仓库添加之后,你就可以使用更多的包了。想安装任意软件或包,打开 YaST 软件管理器,搜索并安装即可。 ### 2. 安装 VLC ### @@ -34,7 +34,7 @@ VLC 是媒体播放器里的瑞士军刀,几乎可以播放任何媒体文件 ### 3. 安装 Handbrake ### -如果你需要转码或转换视频文件格式,[Handbrake 是你的不二之选][3]。Handbrake 就在我们启用的仓库中,所以只要在 YaST 中搜索并安装它。 +如果你需要转码或转换视频文件格式,[Handbrake 是你的不二之选][3]。Handbrake 就在我们启用的仓库中,所以只需要在 YaST 中搜索并安装它即可。 如果你用终端,运行以下命令: @@ -44,7 +44,7 @@ VLC 是媒体播放器里的瑞士军刀,几乎可以播放任何媒体文件 ### 4. 安装 Chrome ### -openSUSE 的默认浏览器是 Firefox。但是因为 Firefox 不能胜任播放专有媒体,比如 Netflix,我推荐安装 Chrome。这需要额外的工作。首先你需要从谷歌导入信任密钥。打开终端执行“wget”命令下载密钥: +openSUSE 的默认浏览器是 Firefox。但是因为 Firefox 不能够播放专有媒体,比如 Netflix,我推荐安装 Chrome。这需要额外的工作。首先你需要从谷歌导入信任密钥。打开终端执行“wget”命令下载密钥: wget https://dl.google.com/linux/linux_signing_key.pub @@ -72,11 +72,11 @@ openSUSE 的默认浏览器是 Firefox。但是因为 Firefox 不能胜任播放 ### 6. 安装媒体解码器 ### -你安装 VLC 之后就不需要安装媒体解码器了,但如果你要使用其它软件来播放媒体的话就需要安装了。一些开发者写了脚本/工具来简化这个过程。打开[这个页面][5]并点击合适的按钮安装完整的包。他会打开 YaST 并自动安装包(当然通常你还需要提供 root 权限密码并信任 GnuPG 密钥)。 +你安装 VLC 之后就不需要安装媒体解码器了,但如果你要使用其它软件来播放媒体的话就需要安装了。一些开发者写了脚本/工具来简化这个过程。打开[这个页面][5]并点击合适的按钮安装完整的包。它会打开 YaST 并自动安装包(当然通常你还需要提供 root 权限密码并信任 GnuPG 密钥)。 -### 7. 安装你偏好的电子邮件客户端 ### +### 7. 安装你喜欢的电子邮件客户端 ### -openSUSE 自带 Kmail 或 Evolution,这取决于你安装的桌面环境。我用的是 Plasma,自带 Kmail,这个邮件客户端还有许多地方有待改进。我建议可以试试 Thunderbird 或 Evolution。所有主要的邮件客户端都能在官方仓库找到。你还可以看看我的[精心挑选的 Linux 最佳邮件客户端][7]。 +openSUSE 自带 Kmail 或 Evolution,这取决于你安装的桌面环境。我用的是 Plasma,自带 Kmail,这个邮件客户端还有许多地方有待改进。我建议可以试试 Thunderbird 或 Evolution。所有主要的邮件客户端都能在官方仓库找到。你还可以看看我[精心挑选的 Linux 最佳邮件客户端][7]。 ### 8. 在防火墙允许 Samba 服务 ### @@ -85,7 +85,7 @@ openSUSE 自带 Kmail 或 Evolution,这取决于你安装的桌面环境。我 ![o42 firewall](http://images.techhive.com/images/article/2015/11/o42-firewall-100626948-large970.idge.png) 在防火墙设置里允许 Samba 客户端和服务端 -打开 YaST 并搜索 Firewall。在防火墙设置里,到“允许的服务”那里你会在“要允许的服务”下面看到一个下拉列表。选择“Samba 客户端”,然后点击“添加”。对“Samba 服务端”也一样地添加。都添加了之后,点击“下一步”,然后点击“完成”,现在你就可以通过本地网络从你的 openSUSE 分享文件以及访问其它机器了。 +打开 YaST 并搜索 Firewall。在防火墙设置里,进入到“允许的服务(Allowed Services)”,你会在“要允许的服务(Service to allow)”下面看到一个下拉列表。选择“Samba 客户端”,然后点击“添加”。同样方法添加“Samba 服务器”。都添加了之后,点击“下一步”,然后点击“完成”,现在你就可以通过本地网络从你的 openSUSE 分享文件以及访问其它机器了。 这差不多就是我以我喜欢的方式对我的新 openSUSE 系统做的所有设置了。如果你有任何问题,欢迎在评论区提问。 @@ -95,7 +95,7 @@ via: http://www.itworld.com/article/3003865/open-source-tools/8-things-to-do-aft 作者:[Swapnil Bhartiya][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ea79a2f555eda7d7c74d54737ade5be163b87115 Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Thu, 5 May 2016 17:32:04 +0800 Subject: [PATCH 1327/1710] vim-kakal --- ...rce Linux Distributions Would Presidential Hopefuls Run.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 index 2a850a7468..cfb653f702 100644 --- 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 @@ -1,3 +1,5 @@ +vim-kakali translating + Which Open Source Linux Distributions Would Presidential Hopefuls Run? ================================================================================ ![Republican presidential candidate Donald Trump @@ -50,4 +52,4 @@ via: http://thevarguy.com/open-source-application-software-companies/081715/whic [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 +[7]:http://ubuntu.com/ From d4d536b295605d2f24b797d66fdb0c6f54083aea Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 5 May 2016 22:10:30 +0800 Subject: [PATCH 1328/1710] [translating]20160301 The Evolving Markrt for ... --- ...lving Market for Commercial Software Built On Open Source.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md b/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md index 85ba752bfa..5cd6a2f1c1 100644 --- a/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md +++ b/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md @@ -1,3 +1,5 @@ +alim0x translating + The Evolving Market for Commercial Software Built On Open Source ===================================================================== From dfad964c88a4ff6bb7ccbcbe5f624d125444c328 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 6 May 2016 10:04:18 +0800 Subject: [PATCH 1329/1710] =?UTF-8?q?20160504-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update --- .../LXD/Part 5 - LXD 2.0: Image management.md | 453 +++++++++++++++++- 1 file changed, 452 insertions(+), 1 deletion(-) diff --git a/sources/tech/LXD/Part 5 - LXD 2.0: Image management.md b/sources/tech/LXD/Part 5 - LXD 2.0: Image management.md index 3a69aadd00..1e2e9ace01 100644 --- a/sources/tech/LXD/Part 5 - LXD 2.0: Image management.md +++ b/sources/tech/LXD/Part 5 - LXD 2.0: Image management.md @@ -1,7 +1,458 @@ Part 5 - LXD 2.0: Image management ================================== -<正文待补充> +This is the fifth blog post [in this series about LXD 2.0][0]. + +As there are a lot of commands involved with managing LXD containers, this post is rather long. If you’d instead prefer a quick step-by-step tour of those same commands, you can [try our online demo instead][1]! + +![](https://linuxcontainers.org/static/img/containers.png) + +### Container images + +If you’ve used LXC before, you probably remember those LXC “templates”, basically shell scripts that spit out a container filesystem and a bit of configuration. + +Most templates generate the filesystem by doing a full distribution bootstrapping on your local machine. This may take quite a while, won’t work for all distributions and may require significant network bandwidth. + +Back in LXC 1.0, I wrote a “download” template which would allow users to download pre-packaged container images, generated on a central server from the usual template scripts and then heavily compressed, signed and distributed over https. A lot of our users switched from the old style container generation to using this new, much faster and much more reliable method of creating a container. + +With LXD, we’re taking this one step further by being all-in on the image based workflow. All containers are created from an image and we have advanced image caching and pre-loading support in LXD to keep the image store up to date. + +### Interacting with LXD images + +Before digging deeper into the image format, lets quickly go through what LXD lets you do with those images. + +#### Transparently importing images + +All containers are created from an image. The image may have come from a remote image server and have been pulled using its full hash, short hash or an alias, but in the end, every LXD container is created from a local image. + +Here are a few examples: + +``` +lxc launch ubuntu:14.04 c1 +lxc launch ubuntu:75182b1241be475a64e68a518ce853e800e9b50397d2f152816c24f038c94d6e c2 +lxc launch ubuntu:75182b1241be c3 +``` + +All of those refer to the same remote image (at the time of this writing), the first time one of those is run, the remote image will be imported in the local LXD image store as a cached image, then the container will be created from it. + +The next time one of those commands are run, LXD will only check that the image is still up to date (when not referring to it by its fingerprint), if it is, it will create the container without downloading anything. + +Now that the image is cached in the local image store, you can also just start it from there without even checking if it’s up to date: + +``` +lxc launch 75182b1241be c4 +``` + +And lastly, if you have your own local image under the name “myimage”, you can just do: + +``` +lxc launch my-image c5 +``` + +If you want to change some of that automatic caching and expiration behavior, there are instructions in an earlier post in this series. + +#### Manually importing images + +##### Copying from an image server + +If you want to copy some remote image into your local image store but not immediately create a container from it, you can use the “lxc image copy” command. It also lets you tweak some of the image flags, for example: + +``` +lxc image copy ubuntu:14.04 local: +``` + +This simply copies the remote image into the local image store. + +If you want to be able to refer to your copy of the image by something easier to remember than its fingerprint, you can add an alias at the time of the copy: + +``` +lxc image copy ubuntu:12.04 local: --alias old-ubuntu +lxc launch old-ubuntu c6 +``` + +And if you would rather just use the aliases that were set on the source server, you can ask LXD to copy the for you: + +lxc image copy ubuntu:15.10 local: --copy-aliases +lxc launch 15.10 c7 +All of the copies above were one-shot copy, so copying the current version of the remote image into the local image store. If you want to have LXD keep the image up to date, as it does for the ones stored in its cache, you need to request it with the `–auto-update` flag: + +``` +lxc image copy images:gentoo/current/amd64 local: --alias gentoo --auto-update +``` + +##### Importing a tarball + +If someone provides you with a LXD image as a single tarball, you can import it with: + +``` +lxc image import +``` + +If you want to set an alias at import time, you can do it with: + +``` +lxc image import --alias random-image +``` + +Now if you were provided with two tarballs, identify which contains the LXD metadata. Usually the tarball name gives it away, if not, pick the smallest of the two, metadata tarballs are tiny. Then import them both together with: + +``` +lxc image import +``` + +##### Importing from a URL + +“lxc image import” also works with some special URLs. If you have an https web server which serves a path with the LXD-Image-URL and LXD-Image-Hash headers set, then LXD will pull that image into its image store. + +For example you can do: + +``` +lxc image import https://dl.stgraber.org/lxd --alias busybox-amd64 +``` + +When pulling the image, LXD also sets some headers which the remote server could check to return an appropriate image. Those are LXD-Server-Architectures and LXD-Server-Version. + +This is meant as a poor man’s image server. It can be made to work with any static web server and provides a user friendly way to import your image. + +#### Managing the local image store + +Now that we have a bunch of images in our local image store, lets see what we can do with them. We’ve already covered the most obvious, creating containers from them but there are a few more things you can do with the local image store. + +##### Listing images + +To get a list of all images in the store, just run “lxc image list”: + +``` +stgraber@dakara:~$ lxc image list ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCH | SIZE | UPLOAD DATE | ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +| alpine-32 | 6d9c131efab3 | yes | Alpine edge (i386) (20160329_23:52) | i686 | 2.50MB | Mar 30, 2016 at 4:36am (UTC) | ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +| busybox-amd64 | 74186c79ca2f | no | Busybox x86_64 | x86_64 | 0.79MB | Mar 30, 2016 at 4:33am (UTC) | ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +| gentoo | 1a134c5951e0 | no | Gentoo current (amd64) (20160329_14:12) | x86_64 | 232.50MB | Mar 30, 2016 at 4:34am (UTC) | ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +| my-image | c9b6e738fae7 | no | Scientific Linux 6 x86_64 (default) (20160215_02:36) | x86_64 | 625.34MB | Mar 2, 2016 at 4:56am (UTC) | ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +| old-ubuntu | 4d558b08f22f | no | ubuntu 12.04 LTS amd64 (release) (20160315) | x86_64 | 155.09MB | Mar 30, 2016 at 4:30am (UTC) | ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +| w (11 more) | d3703a994910 | no | ubuntu 15.10 amd64 (release) (20160315) | x86_64 | 153.35MB | Mar 30, 2016 at 4:31am (UTC) | ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +| | 75182b1241be | no | ubuntu 14.04 LTS amd64 (release) (20160314) | x86_64 | 118.17MB | Mar 30, 2016 at 4:27am (UTC) | ++---------------+--------------+--------+------------------------------------------------------+--------+----------+------------------------------+ +``` + +You can filter based on the alias or fingerprint simply by doing: + +``` +stgraber@dakara:~$ lxc image list amd64 ++---------------+--------------+--------+-----------------------------------------+--------+----------+------------------------------+ +| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCH | SIZE | UPLOAD DATE | ++---------------+--------------+--------+-----------------------------------------+--------+----------+------------------------------+ +| busybox-amd64 | 74186c79ca2f | no | Busybox x86_64 | x86_64 | 0.79MB | Mar 30, 2016 at 4:33am (UTC) | ++---------------+--------------+--------+-----------------------------------------+--------+----------+------------------------------+ +| w (11 more) | d3703a994910 | no | ubuntu 15.10 amd64 (release) (20160315) | x86_64 | 153.35MB | Mar 30, 2016 at 4:31am (UTC) | ++---------------+--------------+--------+-----------------------------------------+--------+----------+------------------------------+ +``` + +Or by specifying a key=value filter of image properties: + +``` +stgraber@dakara:~$ lxc image list os=ubuntu ++-------------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+ +| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCH | SIZE | UPLOAD DATE | ++-------------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+ +| old-ubuntu | 4d558b08f22f | no | ubuntu 12.04 LTS amd64 (release) (20160315) | x86_64 | 155.09MB | Mar 30, 2016 at 4:30am (UTC) | ++-------------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+ +| w (11 more) | d3703a994910 | no | ubuntu 15.10 amd64 (release) (20160315) | x86_64 | 153.35MB | Mar 30, 2016 at 4:31am (UTC) | ++-------------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+ +| | 75182b1241be | no | ubuntu 14.04 LTS amd64 (release) (20160314) | x86_64 | 118.17MB | Mar 30, 2016 at 4:27am (UTC) | ++-------------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+ +``` + +To see everything LXD knows about a given image, you can use “lxc image info”: + +``` +stgraber@castiana:~$ lxc image info ubuntu +Fingerprint: e8a33ec326ae7dd02331bd72f5d22181ba25401480b8e733c247da5950a7d084 +Size: 139.43MB +Architecture: i686 +Public: no +Timestamps: + Created: 2016/03/15 00:00 UTC + Uploaded: 2016/03/16 05:50 UTC + Expires: 2017/04/26 00:00 UTC +Properties: + version: 12.04 + aliases: 12.04,p,precise + architecture: i386 + description: ubuntu 12.04 LTS i386 (release) (20160315) + label: release + os: ubuntu + release: precise + serial: 20160315 +Aliases: + - ubuntu +Auto update: enabled +Source: + Server: https://cloud-images.ubuntu.com/releases + Protocol: simplestreams + Alias: precise/i386 +``` + +##### Editing images + +A convenient way to edit image properties and some of the flags is to use: + +lxc image edit +This opens up your default text editor with something like this: + +autoupdate: true +properties: + aliases: 14.04,default,lts,t,trusty + architecture: amd64 + description: ubuntu 14.04 LTS amd64 (release) (20160314) + label: release + os: ubuntu + release: trusty + serial: "20160314" + version: "14.04" +public: false +You can change any property you want, turn auto-update on and off or mark an image as publicly available (more on that later). + +##### Deleting images + +Remove an image is a simple matter of running: + +``` +lxc image delete +``` + +Note that you don’t have to remove cached entries, those will automatically be removed by LXD after they expire (by default, after 10 days since they were last used). + +##### Exporting images + +If you want to get image tarballs from images currently in your image store, you can use “lxc image export”, like: + +``` +stgraber@dakara:~$ lxc image export old-ubuntu . +Output is in . +stgraber@dakara:~$ ls -lh *.tar.xz +-rw------- 1 stgraber domain admins 656 Mar 30 00:55 meta-ubuntu-12.04-server-cloudimg-amd64-lxd.tar.xz +-rw------- 1 stgraber domain admins 156M Mar 30 00:55 ubuntu-12.04-server-cloudimg-amd64-lxd.tar.xz +``` + +#### Image formats + +LXD right now supports two image layouts, unified or split. Both of those are effectively LXD-specific though the latter makes it easier to re-use the filesystem with other container or virtual machine runtimes. + +LXD being solely focused on system containers, doesn’t support any of the application container “standard” image formats out there, nor do we plan to. + +Our images are pretty simple, they’re made of a container filesystem, a metadata file describing things like when the image was made, when it expires, what architecture its for, … and optionally a bunch of file templates. + +See this document for up to date details on the [image format][1]. + +##### Unified image (single tarball) + +The unified image format is what LXD uses when generating images itself. They are a single big tarball, containing the container filesystem inside a “rootfs” directory, have the metadata.yaml file at the root of the tarball and any template goes into a “templates” directory. + +Any compression (or none at all) can be used for that tarball. The image hash is the sha256 of the resulting compressed tarball. + +##### Split image (two tarballs) + +This format is most commonly used by anyone rolling their own images and who already have a compressed filesystem tarball. + +They are made of two distinct tarball, the first contains just the metadata bits that LXD uses, so the metadata.yaml file at the root and any template in the “templates” directory. + +The second tarball contains only the container filesystem directly at its root. Most distributions already produce such tarballs as they are common for bootstrapping new machines. This image format allows re-using them unmodified. + +Any compression (or none at all) can be used for either tarball, they can absolutely use different compression algorithms. The image hash is the sha256 of the concatenation of the metadata and rootfs tarballs. + +##### Image metadata + +A typical metadata.yaml file looks something like: + +``` +architecture: "i686" +creation_date: 1458040200 +properties: + architecture: "i686" + description: "Ubuntu 12.04 LTS server (20160315)" + os: "ubuntu" + release: "precise" +templates: + /var/lib/cloud/seed/nocloud-net/meta-data: + when: + - start + template: cloud-init-meta.tpl + /var/lib/cloud/seed/nocloud-net/user-data: + when: + - start + template: cloud-init-user.tpl + properties: + default: | + #cloud-config + {} + /var/lib/cloud/seed/nocloud-net/vendor-data: + when: + - start + template: cloud-init-vendor.tpl + properties: + default: | + #cloud-config + {} + /etc/init/console.override: + when: + - create + template: upstart-override.tpl + /etc/init/tty1.override: + when: + - create + template: upstart-override.tpl + /etc/init/tty2.override: + when: + - create + template: upstart-override.tpl + /etc/init/tty3.override: + when: + - create + template: upstart-override.tpl + /etc/init/tty4.override: + when: + - create + template: upstart-override.tpl +``` + +##### Properties + +The two only mandatory fields are the creation date (UNIX EPOCH) and the architecture. Everything else can be left unset and the image will import fine. + +The extra properties are mainly there to help the user figure out what the image is about. The “description” property for example is what’s visible in “lxc image list”. The other properties can be used by the user to search for specific images using key/value search. + +Those properties can then be edited by the user through “lxc image edit” in contrast, the creation date and architecture fields are immutable. + +##### Templates + +The template mechanism allows for some files in the container to be generated or re-generated at some point in the container lifecycle. + +We use the pongo2 templating engine for those and we export just about everything we know about the container to the template. That way you can have custom images which use user-defined container properties or normal LXD properties to change the content of some specific files. + +As you can see in the example above, we’re using those in Ubuntu to seed cloud-init and to turn off some init scripts. + +### Creating your own images + +LXD being focused on running full Linux systems means that we expect most users to just use clean distribution images and not spin their own image. + +However there are a few cases where having your own images is useful. Such as having pre-configured images of your production servers or building your own images for a distribution or architecture that we don’t build images for. + +#### Turning a container into an image + +The easiest way by far to build an image with LXD is to just turn a container into an image. + +This can be done with: + +``` +lxc launch ubuntu:14.04 my-container +lxc exec my-container bash + +lxc publish my-container --alias my-new-image +``` + +You can even turn a past container snapshot into a new image: + +``` +lxc publish my-container/some-snapshot --alias some-image +``` + +#### Manually building an image + +Building your own image is also pretty simple. + +1. Generate a container filesystem. This entirely depends on the distribution you’re using. For Ubuntu and Debian, it would be by using debootstrap. +2. Configure anything that’s needed for the distribution to work properly in a container (if anything is needed). +3. Make a tarball of that container filesystem, optionally compress it. +4. Write a new metadata.yaml file based on the one described above. +5. Create another tarball containing that metadata.yaml file. +6. Import those two tarballs as a LXD image with: + ``` + lxc image import --alias some-name + ``` + +You will probably need to go through this a few times before everything works, tweaking things here and there, possibly adding some templates and properties. + +### Publishing your images + +All LXD daemons act as image servers. Unless told otherwise all images loaded in the image store are marked as private and so only trusted clients can retrieve those images, but should you want to make a public image server, all you have to do is tag a few images as public and make sure you LXD daemon is listening to the network. + +#### Just running a public LXD server + +The easiest way to share LXD images is to run a publicly visible LXD daemon. + +You typically do that by running: + +``` +lxc config set core.https_address "[::]:8443" +``` + +Remote users can then add your server as a public image server with: + +``` +lxc remote add --public +``` + +They can then use it just as they would any of the default image servers. As the remote server was added with “–public”, no authentication is required and the client is restricted to images which have themselves been marked as public. + +To change what images are public, just “lxc image edit” them and set the public flag to true. + +#### Use a static web server + +As mentioned above, “lxc image import” supports downloading from a static http server. The requirements are basically: + +* The server must support HTTPs with a valid certificate, TLS1.2 and EC ciphers +* When hitting the URL provided to “lxc image import”, the server must return an answer including the LXD-Image-Hash and LXD-Image-URL HTTP headers + +If you want to make this dynamic, you can have your server look for the LXD-Server-Architectures and LXD-Server-Version HTTP headers which LXD will provide when fetching the image. This allows you to return the right image for the server’s architecture. + +#### Build a simplestreams server + +The “ubuntu:” and “ubuntu-daily:” remotes aren’t using the LXD protocol (“images:” is), those are instead using a different protocol called simplestreams. + +simplestreams is basically an image server description format, using JSON to describe a list of products and files related to those products. + +It is used by a variety of tools like OpenStack, Juju, MAAS, … to find, download or mirror system images and LXD supports it as a native protocol for image retrieval. + +While certainly not the easiest way to start providing LXD images, it may be worth considering if your images can also be used by some of those other tools. + +More information can be found here. + +### Conclusion + +I hope this gave you a good idea of how LXD manages its images and how to build and distribute your own. The ability to have the exact same image easily available bit for bit on a bunch of globally distributed system is a big step up from the old LXC days and leads the way to more reproducible infrastructure. + +### Extra information + +The main LXD website is at: +Development happens on Github at: +Mailing-list support happens on: +IRC support happens in: #lxcontainers on irc.freenode.net + +And if you don’t want or can’t install LXD on your own machine, you can always [try it online instead][3]! +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/03/30/lxd-2-0-image-management-512/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[1]: https://github.com/lxc/lxd/blob/master/doc/image-handling.md +[2]: https://launchpad.net/simplestreams +[3]: https://linuxcontainers.org/lxd/try-it 原文:https://www.stgraber.org/2016/03/30/lxd-2-0-image-management-512/ From 4634a12411cce1ea4ec8caeef4c39e32b126f1c7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 6 May 2016 10:29:16 +0800 Subject: [PATCH 1330/1710] =?UTF-8?q?20160506-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nfessions of a cross-platform developer.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/talk/20160505 Confessions of a cross-platform developer.md diff --git a/sources/talk/20160505 Confessions of a cross-platform developer.md b/sources/talk/20160505 Confessions of a cross-platform developer.md new file mode 100644 index 0000000000..807dfd544b --- /dev/null +++ b/sources/talk/20160505 Confessions of a cross-platform developer.md @@ -0,0 +1,72 @@ +Confessions of a cross-platform developer +============================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/business_clouds.png?itok=cucHuJnU) + +[Andreia Gaita][1] is giving a talk at this year's OSCON, titled [Confessions of a cross-platform developer][2]. She's a long-time open source and [Mono][3] contributor, and develops primarily in C#/C++. Andreia works at GitHub, where she's focused on building the GitHub Extension manager for Visual Studio. + +I caught up with Andreia ahead of her talk to ask about cross-platform development and what she's learned in her 16 years as a cross-platform developer. + +![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) + +**What languages have you found easiest and hardest to develop cross-platform code for?** + +It's less about which languages are good and more about the libraries and tooling available for those languages. The compilers/interpreters/build systems available for languages determine how easy it is to do cross-platform work with them (or whether it's even possible), and the libraries available for UI and native system access determine how deep you can integrate with the OS. With that in mind, I found C# to be the best for cross-platform work. The language itself includes features that allow fast native calls and accurate memory mapping, which you really need if you want your code to talk to the OS and native libraries. When I need very specific OS integration, I switch to C or C++. + +**What cross-platform toolkits/abstractions have you used?** + +Most of my cross-platform work has been developing tools, libraries and bindings for other people to develop cross-platform applications with, mostly in Mono/C# and C/C++. I don't get to use a lot of abstractions at that level, beyond glib and friends. I mostly rely on Mono for any cross-platform app that includes a UI, and Unity3D for the occasional game development. I play with Electron every now and then. + +**What has been your approach to build systems, and how does this vary by language or platform?** + +I try to pick the build system that is most suited for the language(s) I'm using. That way, it'll (hopefully) give me less headaches. It needs to allow for platform and architecture selection, be smart about build artifact locations (for multiple parallel builds), and be decently configurable. Most of the time I have projects combining C/C++ and C# and I want to build all the different configurations at the same time from the same source tree (Debug, Release, Windows, OSX, Linux, Android, iOS, etc, etc.), and that usually requires selecting and invoking different compilers with different flags per output build artifact. So the build system has to let me do all of this without getting (too much) in my way. I try out different build systems every now and then, just to see what's new, but in the end, I end up going back to makefiles and a combination of either shell and batch scripts or Perl scripts for driving them (because if I want users to build my things, I'd better pick a command line script language that is available everywhere). + +**How do you balance the desire for native look and feel with the need for uniform user interfaces?** + +Cross-platform UI is hard! I've implemented several cross-platform GUIs over the years, and it's the one thing for which I don't think there's an optimal solution. There's basically two options. You can pick a cross-platform GUI toolkit and do a UI that doesn't feel quite right in all the platforms you support, with a small codebase and low maintenance cost. Or you can choose to develop platform-specific UIs that will look and feel native and well integrated with a larger codebase and higher maintenance cost. The decision really depends on the type of app, how many features it has, how many resources you have, and how many platforms you're shipping to. + +In the end, I think there's an increase in users' tolerance for "One UI To Rule Them All" with frameworks like Electron. I have a Chromium+C+C# framework side project that will one day hopefully allow me build Electron-style apps in C#, giving me the best of both worlds. + +**Has building/packaging dependencies been an issue for you?** + +I'm very conservative about my use of dependencies, having been bitten so many times by breaking ABIs, clashing symbols, and missing packages. I decide which OS version(s) I'm targeting and pick the lowest common denominator release available of a dependency to minimize issues. That usually means having five different copies of Xcode and OSX Framework libraries, five different versions of Visual Studio installed side-to-side on the same machine, multiple clang and gcc versions, and a bunch of VMs running various other distros. If I'm unsure of the state of packages in the OS I'm targeting, I will sometimes link statically and sometimes submodule dependencies to make sure they're always available. And most of all, I avoid the bleeding edge unless I really, really need something there. + +**Do you use continuous integration, code review, and related tools?** + +All the time! It's the only way to keep sane. The first thing I do on a project is set up cross-platform build scripts to ensure everything is automateable as early as possible. When you're targeting multiple platforms, CI is essential. It's impossible for everyone to build all the different combinations of platforms in one machine, and as soon as you're not building all of them you're going to break something without being aware of it. In a shared multi-platform codebase, different people own different platforms and features, so the only way to guarantee quality is to have cross-team code reviews combined with CI and other analysis tools. It's no different than other software projects, there's just more points of failure. + +**Do you rely on automated build testing, or do you tend to build on each platform and test locally?** + +For tools and libraries that don't include UIs, I can usually get away with automated build testing. If there's a UI, then I need to do both—reliable, scriptable UI automation for existing GUI toolkits is rare to non-existent, so I would have to either invest in creating UI automation tools that work across all the platforms I want to support, or I do it manually. If a project uses a custom UI toolkit (like, say, an OpenGL UI like Unity3D does), then it's fairly easy to develop scriptable automation tools and automate most of that stuff. Still, there's nothing like the human ability to break things with a couple of clicks! + +**If you are developing cross-platform, do you support cross-editor build systems so that you can use Visual Studio on Windows, Qt Creator on Linux, and XCode on Mac? Or do you tend toward supporting one platform such as Eclipse on all platforms?** + +I favor cross-editor build systems. I prefer generating project files for different IDEs (preferably in a way that makes it easier to add more IDEs), with build scripts that can drive builds from the IDEs for the platform they're on. Editors are the most important tool for a developer. It takes time and effort to learn them, and they're not interchangeable. I have my favorite editors and tools, and everyone else should be able to use their favorite tool, too. + +**What is your preferred editor/development environment/IDE for cross-platform development?** + +The cross-platform developer is cursed with having to pick the lowest common denominator editor that works across the most platforms. I love Visual Studio, but I can't rely on it for anything except Windows work (and you really don't want to make Windows your primary cross-compiling platform), so I can't make it my primary IDE. Even if I could, an essential skill of cross-platform development is to know and use as many platforms as possible. That means really knowing them—using the platform's editors and libraries, getting to know the OS and its assumptions, behaviors, and limitations, etc. To do that and keep my sanity (and my shortcut muscle memory), I have to rely on cross-platform editors. So, I use Emacs and Sublime. + +**What are some of your favorite past and current cross-platform projects?** + +Mono is my all-time favorite, hands down, and most of the others revolve around it in some way. Gluezilla was a Mozilla binding I did years ago to allow C# apps to embed web browser views, and that one was a doozy. At one point I had a Winforms app, built on Linux, running on Windows with an embedded GTK view in it that was running a Mozilla browser view. The CppSharp project (formerly Cxxi, formerly CppInterop) is a project I started to generate C# bindings for C++ libraries so that you could call, create instances of, and subclass C++ classes from C#. It was done in such a way that it would detect at runtime what platform you'd be running on and what compiler was used to create the native library and generate the correct C# bindings for it. That was fun! + +**Where do you see cross-platform development heading in the future?** + +The way we build native applications is already changing, and I feel like the visual differences between the various desktop operating systems are going to become even more blurred so that it will become easier to build cross-platform apps that integrate reasonably well without being fully native. Unfortunately, that might mean applications will be worse in terms of accessibility and less innovative when it comes to using the OS to its full potential. Cross-platform development of tools, libraries, and runtimes is something that we know how to do well, but there's still a lot of work to do with cross-platform application development. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/16/5/oscon-interview-andreia-gaita + +作者:[Marcus D. Hanwell ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mhanwell +[1]: https://twitter.com/sh4na +[2]: http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/48702 +[3]: http://www.mono-project.com/ From 27cb03f2a78329851f4f7608176decef769dff94 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 6 May 2016 11:39:44 +0800 Subject: [PATCH 1331/1710] =?UTF-8?q?20160506-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ction of Drupal, IoT, and open hardware.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md diff --git a/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md b/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md new file mode 100644 index 0000000000..751024fb3a --- /dev/null +++ b/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md @@ -0,0 +1,52 @@ +The intersection of Drupal, IoT, and open hardware +======================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/drupal_blue_gray_lead.jpeg?itok=t7W_KD-D) + + +Meet [Amber Matz][1], a Production Manager and Trainer at [Drupalize.Me][3], a service of Lullabot Education. When she's not tinkering around with Arduinos, Raspberry Pis, and electronic wearables, you can find her wrangling presenters for the Portland Drupal User Group. + +Coming up at [DrupalCon NOLA][3], Amber will host a session about Drupal and IoT. If you're attending and want to learn about the intersection of open hardware, IoT, and Drupal, this session is for you. If you're not able to join us in New Orleans, Amber has some pretty cool things to share. In this interview, she tells us how she got involved with Drupal, a few of her favorite open hardware projects, and what the future holds for IoT and Drupal. + +![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) + +**How did you get involved with the Drupal community?** + +Back in the day, I was working at a large nonprofit in the "webmaster's office" of the marketing department and was churning out custom PHP/MySQL forms like nobody's business. I finally got weary of that and starting hunting around the web for a better way. I found Drupal 6 and starting diving in on my own. Years later, after a career shift and a move, I discovered the Portland Drupal User Group and landed a job as a full-time Drupal developer. I continued to regularly attend the meetups in Portland, which I found to be a great source of community, friendships, and professional development. Eventually, I landed a job with Lullabot as a trainer creating content for Drupalize.Me. Now, I'm managing the Drupalize.Me content pipeline, creating Drupal 8 content, and am very much involved in the Portland Drupal community. I'm this year's coordinator, finding and scheduling speakers. + +**We have to know: What is Arduino prototyping, how did you discover it, and what's the coolest thing you've done with an Arduino?** + +Arduino, Raspberry Pi, and wearable electronics have been these terms that I've heard thrown around for years. I found [Adafruit's Wearable Electronics][4] with Becky Stern YouTube show years ago (which, up until recently, when Becky moved on, aired every Wednesday). I was fascinated by wearables and even ordered an LED sewing kit but never did anything with it. I just didn't get it. I had no background in electronics whatsoever, and while I was fascinated by the projects I was finding, I didn't see how I could ever make anything like that. It seemed so out of reach. + +Finally, I found a Coursera "Internet of Things" specialization. (So trendy, right?) But I was immediately hooked! I finally got an explanation of what an Arduino was, along with all these other important terms and concepts. I ordered the recommended Arduino starter kit, which came with a getting started booklet. When I made that first LED blink, it was pure delight. I had two weeks' vacation over the holidays and after Christmas, and I did nothing but make and program Arduino circuits from the getting started booklet. It was oddly so relaxing! I enjoyed it so much. + +In January, I started creating my own prototypes. When I found out I was emceeing our company retreat's lightning talks, I created a Lightning Talk Visual Timer prototype with five LEDs and an Arduino. + +![](https://opensource.com/sites/default/files/resize/amber-arduino-lightning-talk-timer-400x400.jpg) + +It was a huge hit. I also made my first wearable project, a glowing hoodie, using the Arduino IDE compatible Gemma microcontroller, a tiny round sewable component, to which I sewed using conductive thread, a conductive slider connected to a hoodie's drawstring, which controlled the colors of five NeoPixels sewn around the inside of the hood. So that's what I mean by prototyping: Making crazy projects that are fun and maybe even a little practical. + +**What are the biggest opportunities for Drupal and IoT?** + +IoT isn't that much different than the web services and decoupling Drupal trends. It's the movement of data from thing one to thing two and the rendering of that data into something useful. But how does it get there? And what do you do with it? You think there are a lot of solutions, and apps, and frameworks, and APIs out there now? With IoT, that's only going to continue to increase—exponentially. What I've found is that given any device or any "thing", there is a way to connect it to the Internet—many ways. And there are plenty of code libraries out there to help makers get their data from thing one to thing two. + +So where does Drupal fit in? Web services, for one, is going to be the first obvious place. But as a maker, I don't want to spend my time coding custom modules in Drupal. I want to plug and play! So I would love to see modules emerge that connect with IoT Cloud APIs and services like ThingSpeak and Adafruit.io and IFTTT and others. I think there's an opportunity, too, for a business to build an IoT cloud service in Drupal that allows people to send and store their sensor data, visualize it charts and graphs, and build widgets that react to certain values or thresholds. Each of these IoT Cloud API services fill a slightly different niche, and there's plenty of room for others. + +**What are a few things you're looking forward to at DrupalCon?** + +I love reconnecting with Drupal friends, meeting new people, and also seeing Lullabot and Drupalize.Me co-workers (we're distributed companies)! There's so much to learn with Drupal 8 and it's been overwhelming at times to put together training materials for our customers. So, I'm looking forward to attending Drupal 8-related sessions and getting up-to-speed on the latest developments. Finally, I'm really curious about New Orleans! I haven't been there since 2004 and I'm excited to see what's changed. + +**Tell us about your DrupalCon talk Beyond the blink: Add Drupal to your IoT playground. Why should someone attend? What are the major takeaways?** + +My session title, Beyond the blink: Add Drupal to your IoT playground, in itself is so full of assumptions that first off I'm going to get everyone up to speed and on the same page. You don't need to know anything about Arduino, the Internet of Things, or even Drupal to follow along. We'll start with making an LED blink with an Arduino, and then I want to talk about what the main takeaways have been for me: Play, learn, teach, and make. I'll show examples that have inspired me and that will hopefully inspire and encourage others in the audience to give it a try. Then, it's demo time! + +First, thing one. Thing one is a Build Notifier Tower Light. In this demo, I'll show how I connected the Tower Light to the Internet and how I got it to respond to data received from a Cloud API service. Next, Thing two. Thing two is a "weather watch" in the form of a steampunk iPhone case. It's got small LED matrix that displays an icon of the local-to-me weather, a barometric pressure and temperature sensor, a GPS module, and a Bluetooth LE module, all connected and controlled with an Adafruit Flora microcontroller. Thing two sends weather and location data to Adafruit.io by connecting to an app on my iPhone over Bluetooth and sends it up to the cloud using an MQTT protocol! Then, on the Drupal side, I'm pulling down that data from the cloud, updating a block with the weather, and updating a map. So folks will get a taste of what you can do with web services, maps, and blocks in Drupal 8, too. + +It's been a brain-melting adventure learning and making these demo prototypes, and I hope others will come to the session and catch a little of this contagious enthusiasm I have for this intersection of technologies! I'm very excited to share what I've discovered. + + + +[1]: https://www.drupal.org/u/amber-himes-matz +[2]: https://drupalize.me/ +[3]: https://events.drupal.org/neworleans2016/ +[4]: https://www.adafruit.com/beckystern From 268194d76dd61c84886d9c79647512905169b815 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 6 May 2016 11:45:30 +0800 Subject: [PATCH 1332/1710] =?UTF-8?q?20160506-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 开启 “我的开源路” 系列 --- .../20160429 Why and how I became a software engineer.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk/my-open-source-story}/20160429 Why and how I became a software engineer.md (100%) diff --git a/sources/tech/20160429 Why and how I became a software engineer.md b/sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md similarity index 100% rename from sources/tech/20160429 Why and how I became a software engineer.md rename to sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md From e8506bf62ab616d18895a4c40ae48224728294ae Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 6 May 2016 11:49:18 +0800 Subject: [PATCH 1333/1710] =?UTF-8?q?20160506-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Silicon Valley shares her 'nerd' story.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md diff --git a/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md b/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md new file mode 100644 index 0000000000..afb210298d --- /dev/null +++ b/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md @@ -0,0 +1,82 @@ +A daughter of Silicon Valley shares her 'nerd' story +======================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) + +Back in 2014, my colleague [Crystal Beasley][1] started a thread of women in tech/hackers posting their "nerd stories" in response to some comments out there on the Internet about the lack of women in tech. This is my nerd story, shared with you because I do believe in role models, and I do believe that there are many paths one can take to a satisfying challenging career and a life that helps one fulfill their goals. + +### Growing up with computers + +I am, among other things, a daughter of Silicon Valley. Mine is not a story of arriving at tech from the sidelines, or of dedication from childhood. It is more a story of how exposure shapes you—of the power of being marinated in a culture, if you will. This is not the story of a straight path or a clear dedication from childhood to one goal. It is a story of intense privilege, I am aware. + +I was born in Manhattan, but we lived in New Jersey while my dad was working on a PhD in computer science at Rutgers on the GI Bill. When I was four, someone at school asked me what my dad did for a living and I said, "He watches TV and hunts for bugs, but I never seen 'em." He had a dumb terminal at home, presumably for his job at Bolt Beranek Newman working on the artificial intelligence aspects of the early Internet. I was watching. + +I did not get to play with dad's bug hunting TV, but I was steeped in tech from an early age, and I value the gift of that early exposure. Early exposure is one of the things we must give to the future nerds—take time to talk to the kids you know about what you do! + +![](https://opensource.com/sites/default/files/resize/moss-520x433.png) + +>My dad's terminal was similar, if not identical, to this one. CC BY-SA 4.0 + +When I was six, we moved to California. Dad was taking a job at Xerox PARC. I remember thinking that the city would be full of bears, because there was a bear on the flag. In 1979, Palo Alto was a college town and still had orchards and open space. + +After a year of public school in Palo Alto, my sisters and I were sent to Peninsula School, a "democratic model" school that shaped me deeply. Curiosity and creativity were considered central curriculum values, and education was led substantively by group decisions of the students ourselves. We rarely saw anything one would call a computer at school, but home was another story. + +After his days at Xerox PARC, dad went to Apple, where he worked on and brought home the first computers I played with: the Apple II and the LISA. My dad was on the original LISA development team, and I vividly remember that he made us "play" the mousing tutorial over and over because he wanted my 3 year-old sister to be comfortable with it... and she was. + +![](https://opensource.com/sites/default/files/resize/600px-apple_lisa-520x520.jpg) + +>Our LISA computer pretty much looked like this. See the mouse? CC BY-SA 4.0 + +At the same time in school, while I was great at conceptual math, I floundered in basic computation. One teacher at my first school told my parents, and me, that I was bad at math and "stupid." While I excelled in our "regular" math program, understanding logical puzzles beyond what one expects of a 7 year-old, I could not successfully complete the math "drills" we had to do at the beginning of each day. She called me stupid, and I didn't forget it. I didn't get back to believing in my own logical and algorithmic mental capabilities for more than 10 years after that. Do not underestimate the power of the words you say to children. + +Years of playing with dad's computers followed. He went from Apple to EA to SGI, and I played with all his machines. This led to us having what we thought was the coolest house in town, because we had an SGI machine on which to play Doom in our garage. I didn't code much at all, but what I got from those years, I see now, was a measure of fearlessness about trying out new technologies. At the same time, my mom, whose background was literature and education, became a technical writer and showed me both that careers can change and that it is possible to manage a technical career and motherhood together. I would not say that was easy for her, but she made it look easy to me. You'd think that all of this early exposure might send me straight into a technical degree and career. It did not. + +### Undergrad years + +I thought I wanted to be an elementary school teacher, and I enrolled at Mills College with every intention of doing that. Instead, I moved toward women's studies and later theology, primarily driven by one of my great desires in life: to understand human motivation and work for a better world. + +At the same time, I was for the first time being exposed to the full power of the Internet. In 1991, it was a very heady thing to have your own unix shell account and a world of people to talk to. I learned a lot from just "playing" online, and more from having people around willing to answer my many questions. It turned out that these same explorations led me down my career path at least as much as any formal academic education. All information is useful. I do not think it is any accident that this critical period of learning and exposure happened at a women's college where a brilliant woman ran the CS department. We were not just allowed, but encouraged to explore many paths in that rarified atmosphere of empowerment (we had access to lots and lots of technology and to smart people who wanted to help), and I did. I've always been grateful for it. It was also where I learned about geek culture. + +I went to grad school to study feminist theology, but technology was in my blood by then. When I realized I didn't want to be a professor or an academic ethicist, I left academia and came home with a lot of school debt and not a lot of ideas. + +### A new beginning + +I was stunned, in 1995, at the power I saw in the World Wide Web to connect people and share thoughts and information (I still am). I wanted in on it. It occurred to me that I could go into the "family business," but not really how. I started working as a temporary contractor at offices in the valley and tried a few things (writing very basic databases on semiconductor data, pre-press work for technical manuals, filing payroll stubs) before I landed my first "real" tech job at Sun Microsystems. It was a very exciting place to be. (We were, after all, "the dot in dot-com.") + +At Sun, I stuck my neck out, trying as many new things as I could. I worked firsthand at HTMLing (What? It's a word!) white papers, then hacking basic surveying tools (Perl, mostly) for beta programs. Then I became a program manager for Solaris beta programs, and at last got my first whiff of open source in running beta programs for Open Solaris. + +The biggest thing I did was learn. I found it to be an atmosphere where engineering and education were both valued, and where my questions were not "stupid." I was lucky in my choices of mentors and friends. I took every class I could, read every book I could, and tried to give myself the technical, business, and project management skill sets I hadn't obtained in school before deciding to take the oft-discussed "mommy break" to prepare for the birth of my second child. + +### Getting back to work + +When I was ready to go back to work, Sun was no longer a viable place to go. So, I gathered my contacts (networking is your friend) and my consulting skills and ended up with a rather long-term contract release managing a web "portal" (in 2005, everything was a portal) and exposing myself to everything I could about CRMs, release methodology, localization, networking, and more. I explain all of this background mostly because my biggest lesson was that the education I got was in what I tried and in what I failed to do, as much as in what I succeeded at. I think we need role models for that, too. + +In many respects, the entire first part of my career was my technical education. It was a different time and place—I worked on supporting women and other underrepresented minorities in the organization, but it was not as overtly difficult to be a woman in tech then. I was undoubtedly blind to some issues at the time, but there's also a case to be made that our industry has become more misogynistic, not less. + +After all of this, I still did not see myself as a role model, or as highly technical. I was quite shocked when a geek friend I knew from parenting circles encouraged me to apply for a job as product manager at a very obscure seeming and highly technical nonprofit open source infrastructure shop (Internet Systems Consortium, makers of BIND, the widely deployed open source DNS nameserver, and operators of one of the 13 root nameservers). For the longest time, I couldn't figure out why they hired me! I knew very little about DNS, infrastructure, or protocol development, but I found my mentors again and flourished. I spent my time traveling, working on critical processes, figuring out how to work with highly international teams, solving hairy problems, and most of all, embracing open source and the vibrant community that loved and supported our efforts so very much. I learned most of all, again, by making mistakes. I learned what it takes to build a vision for a product, and how building things in the open and in community takes all sorts of specific skills, talent, and patience, but adds so much value. + +### Becoming a mentor + +It was while I was at ISC that, through the amazing [TechWomen program][2] (which brings technical women from the Middle East and North Africa to Silicon Valley for mentoring), I got hooked on mentoring and supporting other women in tech, particularly in open source and open culture. It was when I started mentoring that I started believing in my own abilities, too. That was a long lesson to learn. + +When I first read the advert for TechWomen mentors, I didn't think they would even want to talk to me! My impostor syndrome was so strong. I was so shocked when I was asked to mentor the first cohort (and every one after that for six years), but I am learning to believe that I earned these things. Impostor Syndrome is real, but over time it can be overcome. + +### Today + +In the end, I had to leave my job at ISC. Luckily, my work and my values brought me to Mozilla, where I've been both perseverant and lucky enough to have several meaningful roles. Today, I'm the senior program manager of diversity and inclusion. I work full-time on building a more diverse and inclusive Mozilla, standing on the shoulders of giants who did the same before me and in partnership with many of the smartest and kindest people I know. I've followed my passion for empowering people to find meaningful ways to contribute to the Internet I believe the world needs: an expansion of the one that excited me so long ago. And I get to see a lot of the world while I do it! + +Taking a new approach to changing culture through organizational and behavioral interventions is such an incredible way to connect my entire trajectory—from my early academics through my career to now. It's a new challenge every day, and I guess that's what I love most about working in tech and in particular on the open web. The very pluralistic nature of the web that first drew me in is the same possibility I still seek—a world where there is opportunity for all and where there are resources for people no matter their backgrounds. Role models, mentors, resources, and, above all, respect are essential components of evolving tech and open source culture to be all that I believe it can be—including access and opportunity for all of us. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/5/my-open-source-story-larissa-shapiro + +作者:[Larissa Shapiro][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/larissa-shapiro +[1]: http://skinnywhitegirl.com/blog/my-nerd-story/1101/ +[2]: https://www.techwomen.org/mentorship/why-i-keep-coming-back-to-mentor-with-techwomen From b92c14255c44c0ef0f161fe91dbfa2d4417693a2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 6 May 2016 12:41:09 +0800 Subject: [PATCH 1334/1710] translating by martin2011qi @martin2011qi --- .../20160429 Why and how I became a software engineer.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md b/sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md index 722464168f..0fb8b3d549 100644 --- a/sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md +++ b/sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md @@ -1,3 +1,5 @@ +translating by martin2011qi + Why and how I became a software engineer ========================================== From 636f491cba43d65ca19e3b53418735a691ec7d02 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 6 May 2016 16:45:00 +0800 Subject: [PATCH 1335/1710] =?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 --- ...Raspberry Pi projects for the classroom.md | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md b/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md index 6c86172f7a..490708355d 100644 --- a/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md +++ b/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md @@ -8,9 +8,9 @@ ![](https://opensource.com/sites/default/files/lava.png) >Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1]. -我的世界是世界上很多青少年最喜欢的一个游戏,而且他也是目前最能激发年轻人创造力的一款游戏。这个树莓派版上自带的我的世界不仅仅是一个具有创造性的建筑游戏,他还是一个具有编程接口、可以通过 Python 与之交互的版本。 +我的世界是世界上几乎每一个青少年都特别喜欢的一款游戏,而且它成功抓住了年轻人眼球,成为目前最能激发年轻人创造力的游戏之一。这个树莓派版本自带的我的世界不仅仅是一个具有创造性的建筑游戏,还是一个具有编程接口,可以通过 Python 与之交互的版本。 -我的世界:Pi 版对于老师来说是一个非常好的教授学生解决问题和编写代码完成任务的途径。你可以使用 Python API 创建一个房子,并且一直跟随这你的脚步移动,当你需要桥梁的时候给你建造一座桥,让老天呀下雨,显示天空的温度,以及其它你可以想象到的一切东西。 +我的世界:Pi 版对于老师来说是一个教授学生解决问题和编写代码完成任务的好方式。你可以使用 Python API 创建一个房子,并且一直跟随这你的脚步移动,在所到之处建造一座桥,让天空落下熔岩雨滴,在空中显示温度,以及其它你可以想象到的一切东西。 详情请见 "[Getting Started with Minecraft Pi][2]." @@ -19,24 +19,22 @@ ![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg) >源于 [Low Voltage Labs][3]. [CC BY-SA 4.0][1]. -使用树莓派可以很轻松的进行物理计算——只需要连接几个 LED 和按钮到 开发板上的 GPIO 接口,再用几行代码你就可以按下按钮来开灯。一旦你指导了如何使用代码来做这些基本的东西,接下来就可以根据你的想象来做其它事情了。 +使用树莓派可以很轻松地进行物理计算,只需要连接几个 LED 和按钮到开发板上的 GPIO 接口,再用几行代码你就可以按下按钮来开灯。一旦你了解了如何使用代码来完成这些基本的操作,接下来就可以根据你的想象来做其它事情了。 -如果你知道如何让一个灯闪烁,你就可以让三个灯开始闪烁。挑选三个和交通灯一样颜色的 LED 灯,然后编写控制交通灯的代码。如果你知道如何使用按钮触发实践,那么你就可以模拟行人过马路。同时你可以参考其它已经完成的交通灯附件,比如[PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6],等等。 +如果你知道如何让一个灯闪烁,你就可以控制三个灯闪烁。挑选三个和交通灯一样颜色的 LED 灯,然后编写控制交通灯的代码。如果你知道如何使用按钮触发事件,那么你就可以模拟一个行人过马路。同时你可以参考其它已经完成的交通灯附件,比如[PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6],等等。 -代码并不是全部——这些联系只是让你理解真是世界里使如何完成这些事的。计算思维是一个在你一生中都会很有用的技能。 +代码并不是全部——这只是一个演练,让你理解现实世界里系统是如何完成设计的。计算思维是一个让你终身受用的技能。 ![](https://opensource.com/sites/default/files/reaction-game.png) >源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. - -接下来试着接通两个按钮和 LED 灯的电源,实现一个反应游戏 —— 让 LED 灯随机的点亮,然后看是最先按下按钮。 - +接下来试着接通两个按钮和 LED 灯的电源,实现一个双玩家的反应游戏 —— 让 LED 灯随机时间点亮,然后看是谁抢先按下按钮。 要想了解更多可以看看 [GPIO Zero recipes][7]。你所需要的资料都可以在 [CamJam EduKit 1][8] 找到。 -### 3. 电子宠物 +### 3. Sense HAT 电子宠物 -Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是你并没有错过亲手把玩这个硬件的机会。Sense HAT 是 Astro Pi 的一个传感器扩展板,现在已经开放购买了。你可以使用它来进行数据搜集,科学实验,游戏和其它很多事。可以看看下面树莓派的 Carrie Anne 拍摄的 Gurl Geek Diaries 的视频,里面演示了一种很棒的入门途径——给生活添加一个你自己创造的生动的像素宠物: +Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是你并没有错过亲手把玩这个硬件的机会。Sense HAT 是使用在 Astro Pi 的一个传感器扩展板,现在已经开放购买了。你可以使用它来进行数据搜集、科学实验,游戏等等。可以看看下面树莓派的 Carrie Anne 拍摄的 Gurl Geek Diaries 的视频,里面演示了一种很棒的入门途径——在 Sense HAT 屏幕上自己设计一个生动的像素宠物: [video](https://youtu.be/gfRDFvEVz-w) @@ -47,9 +45,9 @@ Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是 ![](https://opensource.com/sites/default/files/ir-bird-box.png) >源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. -让整个班级都可以参与进来的好主意是在鸟笼立方一个树莓派和夜视镜头,以及一些红外线灯,这样子你就可以在黑暗中看见鸟笼里的情况了,然后使用树莓派通过网络串流视频。然后就可以等待小鸟归笼了,你可以在不干扰小鸟习惯的情况下观察他们了。 +让整个班级都可以参与进来的好主意是在鸟笼里放置一个树莓派和夜视镜头,以及一些红外线灯,这样子你就可以在黑暗中看见鸟笼里的情况了,然后使用树莓派通过网络串流视频。然后就可以等待小鸟归笼了,你可以在不打扰的情况下近距离观察小窝里的它们了。 -要了解更多有关红外线和光谱的知识,以及如何调校摄像头和使用软件控制摄像头,可以访问 [Make an infrared bird box][10]。 +要了解更多有关红外线和光谱的知识,以及如何校准摄像头焦点和使用软件控制摄像头,可以访问 [Make an infrared bird box][10]。 @@ -58,22 +56,21 @@ Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是 ![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg) >源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. -只需要一个树莓派和很少几个电机和电机控制器,你就可以制作一个你自己的机器人。你可以制作的机器人有很多种,从简单的由几个轮子和自制底盘拼凑小车,到由游戏控制器驱动的、具有自我意识、配备了传感器、装配了摄像头的金属种马。 +只需要一个树莓派、很少的几个电机和电机控制器,你就可以自己动手制作一个机器人。可以制作的机器人有很多种,从简单的由几个轮子和自制底盘拼凑的简单小车,到由游戏控制器驱动、具有自我意识、配备了传感器,安装了摄像头的金属种马。 -要学习如何控制不同的电机,可以使用 RTK 电机驱动开发板入门或者使用配置了电机、轮子和传感器的 CamJam 机器人开发套件——具有很大的价值和大量的学习潜力——深入学习。 +要学习如何控制不同的电机,可以使用 RTK 电机驱动开发板入门或者使用配置了电机、轮子和传感器的 CamJam 机器人开发套件——具有很大的价值和大量的学习潜力。 -或者,如果你还想了解更多核心内容,可以试试 PiBorg 的 [4Borg][11] 和 [DiddyBorg][12],或者购买 Metal 版 DoodleBorg ,然后构建一个最小版本的 [DoodleBorg tank][13]。 +或者,如果你还想了解更多核心内容,可以试试 PiBorg 的 [4Borg][11](£99/$150)和 [DiddyBorg][12](£180/$273),或者购买 Metal 版 DoodleBorg (£250/$380),然后构建一个最小版本的 [DoodleBorg tank][13](非卖品)。 详情可见 [机器人装备表][14]。 - ------------------------------------------------------------------------------ via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom 作者:[Ben Nuttall][a] 译者:[ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 404762e335a82c1d98f941bf28cb8736f739ccec Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 6 May 2016 16:48:18 +0800 Subject: [PATCH 1336/1710] =?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 --- .../20151207 5 great Raspberry Pi projects for the classroom.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md b/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md index 490708355d..5204511c1d 100644 --- a/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md +++ b/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md @@ -6,7 +6,7 @@ ### 1. 我的世界: Pi ![](https://opensource.com/sites/default/files/lava.png) ->Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1]. +>源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. 我的世界是世界上几乎每一个青少年都特别喜欢的一款游戏,而且它成功抓住了年轻人眼球,成为目前最能激发年轻人创造力的游戏之一。这个树莓派版本自带的我的世界不仅仅是一个具有创造性的建筑游戏,还是一个具有编程接口,可以通过 Python 与之交互的版本。 From bc37fb186a2b31d92f08817ce54231a55a7e5503 Mon Sep 17 00:00:00 2001 From: Name1e5s <836401406@qq.com> Date: Sat, 7 May 2016 18:03:12 +0800 Subject: [PATCH 1337/1710] Name1e5s translating... --- ...60505 A daughter of Silicon Valley shares her 'nerd' story.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md b/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md index afb210298d..2ef0f680b0 100644 --- a/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md +++ b/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md @@ -1,3 +1,4 @@ +Name1e5s translating... A daughter of Silicon Valley shares her 'nerd' story ======================================================= From 2313cbf811230a018b470101ab219c5b055197fe Mon Sep 17 00:00:00 2001 From: sonofelice Date: Sat, 7 May 2016 18:21:50 +0800 Subject: [PATCH 1338/1710] =?UTF-8?q?sonofelice=20=E7=BF=BB=E8=AF=919=20Ke?= =?UTF-8?q?y=20Trends=20in=20Hybrid=20Cloud=20Computing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sonofelice 翻译9 Key Trends in Hybrid Cloud Computing --- sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md b/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md index 003405b4b7..4c6e74ed2d 100644 --- a/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md +++ b/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md @@ -1,3 +1,4 @@ +sonofelice translating 9 Key Trends in Hybrid Cloud Computing ======================================== From 08398858f2cfeec2c5dc815c4622e097f86b4c15 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Sun, 8 May 2016 01:06:36 +0800 Subject: [PATCH 1339/1710] Proofread 20151019 Gaming On Linux--All You Need To Know --- ...9 Gaming On Linux--All You Need To Know.md | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/translated/talk/20151019 Gaming On Linux--All You Need To Know.md b/translated/talk/20151019 Gaming On Linux--All You Need To Know.md index d43b548f7c..b58f822c72 100644 --- a/translated/talk/20151019 Gaming On Linux--All You Need To Know.md +++ b/translated/talk/20151019 Gaming On Linux--All You Need To Know.md @@ -4,27 +4,27 @@ Linux上的游戏:所有你需要知道的 ** 我能在 Linux 上玩游戏吗 ?** -这是打算[投奔 Linux 阵营][1]的人最经常问的问题之一。毕竟,在 Linux 上面玩游戏经常被认为有点难以实现。事实上,一些人甚至考虑他们能不能在 Linux 上看电影或者听音乐。考虑到这些,关于 Linux 的平台的游戏的问题是很现实的。「 +这是打算[投奔 Linux 阵营][1]的人最经常问的问题之一。毕竟,在 Linux 上面玩游戏经常被认为有点难以实现。事实上,一些人甚至考虑他们能不能在 Linux 上看电影或者听音乐。考虑到这些,关于 Linux 的平台的游戏的问题是很现实的。 -在本文中,我将解答大多数 Linux 新手关于在 Linux 打游戏的问题。例如 Linux 下能不能玩游戏,如果能的话,在**哪里下载游戏**或者如何获取有关游戏的信息。 +在本文中,我将解答大多数 Linux 新手关于在 Linux 中打游戏的问题。例如 Linux 下能不能玩游戏,如果能的话,在哪里**下载游戏**或者如何获取有关游戏的信息。 -但是在此之前,我需要说明一下。我不是一个 PC 上的玩家或者说我不认为我是一个在 Linux 桌面上完游玩戏的家伙。我更喜欢在 PS4 上玩游戏并且我不关心 PC 上的游戏甚至也不关心手机上的游戏(我没有给我的任何一个朋友安利糖果传奇)。这也就是你很少在 It's FOSS 上很少看见关于 [Linux 上的游戏][2]的部分。 +但是在此之前,我需要说明一下。我不是一个 PC 上的玩家或者说我不认为我是一个在 Linux 桌面游戏玩家。我更喜欢在 PS4 上玩游戏并且我不关心 PC 上的游戏甚至也不关心手机上的游戏(我没有给我的任何一个朋友安利糖果传奇)。这也就是你很少能在 It's FOSS 上很少看见关于 [Linux 上的游戏][2]的原因。 -所以我为什么要写这个主题? +所以我为什么要提到这个主题? -因为别人问过我几次有关 Linux 上的游戏的问题并且我想要写出来一个能解答这些问题的 Linux 上的游戏指南。注意,在这里我不只是讨论 Ubuntu 上的游戏。我讨论的是在所有的 Linux 上的游戏。 +因为别人问过我几次有关 Linux 上的游戏的问题并且我想要写出来一个能解答这些问题的 Linux 游戏指南。注意,在这里我不只是讨论在 Ubuntu 上玩游戏。我讨论的是在所有的 Linux 上的游戏。 ### 我能在 Linux 上玩游戏吗 ? ### 是,但不是完全是。 -“是”,是指你能在Linux上玩游戏;“不完全是”,是指你不能在 Linux 上玩 ’所有的游戏‘。 +“是”,是指你能在Linux上玩游戏;“不完全是”,是指你不能在 Linux 上玩 ‘所有的游戏’。 -什么?你是拒绝的?不必这样。我的意思是你能在 Linux 上玩很多流行的游戏,比如[反恐精英以及地铁:最后的曙光][3]等。但是你可能不能玩到所有在 Windows 上流行的最新游戏,比如[实况足球2015][4]。 +感到迷惑了吗?不必这样。我的意思是你能在 Linux 上玩很多流行的游戏,比如[反恐精英以及地铁:最后的曙光][3]等。但是你可能不能玩到所有在 Windows 上流行的最新游戏,比如[实况足球 2015 ][4]。 -在我看来,造成这种情况的原因是 Linux 在桌面系统中仅占不到 2%,这占比使得大多数开发者没有在 Linux 上发布他们的游戏的打算。 +在我看来,造成这种情况的原因是 Linux 在桌面系统中仅占不到 2%,这样的占比使得大多数开发者没有开发其游戏的 Linux 版的动力。 -这就意味指大多数近年来被提及的比较多的游戏很有可能不能在 Linux 上玩。不要灰心。我们能以某种方式在 Linux 上玩这些游戏,我们将在下面的章节中讨论这些方法。但是,在此之前,让我们看看在 Linux 上能玩的游戏的种类。 +这就意味指大多数近年来被提及的比较多的游戏很有可能不能在 Linux 上玩。不要灰心。还有别的方式在 Linux 上玩这些游戏,我们将在下面的章节中讨论这些方法。但是,在此之前,让我们看看在 Linux 上能玩的游戏的种类。 要我说的话,我会把那些游戏分为四类: @@ -33,7 +33,7 @@ Linux上的游戏:所有你需要知道的 3. 浏览器里的游戏 4. 终端里的游戏 -让我们以最重要的 Linux 的原生游戏开始。 +让我们以最重要的一类, Linux 的原生游戏开始。 --------- @@ -41,15 +41,15 @@ Linux上的游戏:所有你需要知道的 原生游戏指的是官方支持 Linux 的游戏。这些游戏有原生的 Linux 客户端并且能像在 Linux 上的其他软件一样不需要附加的步骤就能安装在 Linux 上面(我们将在下一节讨论)。 -所以,如你所见,这里有一些为 Linux 开发的游戏,下一个问题就是在哪能找到这些游戏以及如何安装。我将列出来一些让你玩到游戏的渠道了。 +所以,如你所见,有一些为 Linux 开发的游戏,下一个问题就是在哪能找到这些游戏以及如何安装。我将列出一些让你玩到游戏的渠道。 #### Steam #### ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Install-Steam-Ubuntu-11.jpeg) -“[Steam][5] 是一个游戏的分发平台。就如同 Kindle 是电子书的分发平台,iTunes 是音乐的分发平台一样,Steam 也具有那样的功能。它给了你购买和安装游戏,玩多人游戏以及在它的平台上关注其他游戏的选项。这些游戏被[ DRM ][6]所保护。” +“[Steam][5] 是一个游戏的分发平台。就如同 Kindle 是电子书的分发平台, iTunes 是音乐的分发平台一样, Steam 也具有那样的功能。它提供购买和安装游戏,玩多人游戏以及在它的平台上关注其他游戏的选项。其上的游戏被[ DRM ][6]所保护。” -两年以前,游戏平台 Steam 宣布支持 Linux,这在当时是一个大新闻。这是 Linux 上玩游戏被严肃的对待的一个迹象。尽管这个决定更多地影响了他们自己的基于 Linux 游戏平台[ Steam OS][7]。这仍然是令人欣慰的事情,因为它给 Linux 带来了一大堆游戏。 +两年以前,游戏平台 Steam 宣布支持 Linux ,这在当时是一个大新闻。这是 Linux 上玩游戏被严肃对待的一个迹象。尽管这个决定更多地影响了他们自己的基于 Linux 游戏平台以及一个独立 Linux 发行版[ Steam OS][7] ,这仍然是令人欣慰的事情,因为它给 Linux 带来了一大堆游戏。 我已经写了一篇详细的关于安装以及使用 Steam 的文章。如果你想开始使用 Steam 的话,读读那篇文章。 @@ -57,23 +57,23 @@ Linux上的游戏:所有你需要知道的 #### GOG.com #### -[GOG.com][9] 失灵一个与 Steam 类似的平台。与 Steam 一样,你能在这上面找到数以百计的 Linux 游戏,你可以购买和安装它们。如果游戏支持好几个平台,尼卡一在多个操作系统上安装他们。你买到你账户的游戏你可以随时玩。捏可以在你想要下载的任何时间下载。 +[GOG.com][9] 是另一个与 Steam 类似的平台。与 Steam 一样,你能在这上面找到数以百计的 Linux 游戏,并购买和安装它们。如果游戏支持好几个平台,你可以在多个操作系统上安装他们。你可以随时游玩使用你的账户购买的游戏。你也可以在任何时间下载。 GOG.com 与 Steam 不同的是前者仅提供没有 DRM 保护的游戏以及电影。而且,GOG.com 完全是基于网页的,所以你不需要安装类似 Steam 的客户端。你只需要用浏览器下载游戏然后安装到你的系统上。 #### Portable Linux Games #### -[Portable Linux Games][10] 是一个集聚了不少 Linux 游戏的网站。这家网站最特别以及最好的就是你能离线安装这些游戏。 +[Portable Linux Games][10] 是一个集聚了不少 Linux 游戏的网站。这家网站最特别以及最好的点就是你能离线安装这些游戏。 -你下载到的文件包含所有的依赖(仅需 Wine 以及 Perl)并且他们也是与平台无关的。你所需要的仅仅是下载文件并且双击来启动安装程序。你也可以把文件储存起来以用于将来的安装,如果你网速不够快的话我很推荐您这样做。 +你下载到的文件包含所有的依赖(仅需 Wine 以及 Perl)并且他们也是与平台无关的。你所需要的仅仅是下载文件并且双击来启动安装程序。你也可以把文件储存起来以用于将来的安装。如果你网速不够快的话,我很推荐你这样做。 #### Game Drift 游戏商店 #### -[Game Drift][11] 是一个只专注于游戏的基于 Ubuntu 的 Linux 发行版。但是如果你不想只为游戏就去安装这个发行版的话,你也可以经常上线看哪个游戏可以在 Linux 上运行并且安装他们。 +[Game Drift][11] 是一个只专注于游戏的基于 Ubuntu 的 Linux 发行版。但是如果你不想只为游戏就去安装这个发行版的话,你也可以经常去它的在线游戏商店去看哪个游戏可以在 Linux 上运行并且安装他们。 #### Linux Game Database #### -如其名字所示,[Linux Game Database][12]是一个收集了很多 Linux 游戏的网站。你能在这里浏览诸多类型的游戏并从游戏开发者的网站下载/安装这些游戏。作为这家网站的会员,你甚至可以为游戏打分。LGDB,有点像 Linux 游戏界的 IMDB 或者 IGN. +如其名字所示,[Linux Game Database][12]是一个收集了很多 Linux 游戏的网站。你能在这里浏览诸多类型的游戏并从游戏开发者的网站下载/安装这些游戏。作为这家网站的会员,你甚至可以为游戏打分。 LGDB 有点像 Linux 游戏界的 IMDB 或者 IGN. #### Penguspy #### @@ -81,7 +81,7 @@ GOG.com 与 Steam 不同的是前者仅提供没有 DRM 保护的游戏以及电 #### 软件源 #### -看看你自己的发行版的软件源。那里可能有一些游戏。如果你用 Ubuntu 的话,它的软件中心里有一个游戏的分类。在一些其他的发行版里也有,比如 Liux Mint 等。 +看看你自己的发行版的软件源。其中可能有一些游戏。如果你用 Ubuntu 的话,它的软件中心里有一个游戏的分类。在一些其他的发行版里也有,比如 Linux Mint 等。 ---------- @@ -89,19 +89,19 @@ GOG.com 与 Steam 不同的是前者仅提供没有 DRM 保护的游戏以及电 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Wine-Linux.png) -到现在为止,我们一直在讨论 Linux 的原生游戏。但是并没有很多 Linux 上的原生游戏,或者说,火的不要不要的游戏大多不支持 Linux,但是都支持 Windows PC。所以,如何在 Linux 上玩 Wendows 的游戏? +到现在为止,我们一直在讨论 Linux 的原生游戏。但是并没有很多 Linux 上的原生游戏,或者更准确地说,火的不要不要的游戏大多不支持 Linux,但是都支持 Windows PC 。所以,如何在 Linux 上玩 Windows 的游戏? -幸好,由于我们有 Wine, PlayOnLinux 和 CrossOver 等工具,我们能在 Linux 上玩不少的 Wendows 游戏。 +幸好,由于我们有 Wine 、 PlayOnLinux 和 CrossOver 等工具,我们能在 Linux 上玩不少的 Windows 游戏。 #### Wine #### -Wine 是一个能使 Wendows 应用在类似 Linux, BSD 和 OS X 上运行的兼容层。在 Wine 的帮助下,你可以在 Linux 下安装以及使用很多 Windows 下的应用。 +Wine 是一个能使 Windows 应用在类似 Linux , BSD 和 OS X 上运行的兼容层。在 Wine 的帮助下,你可以在 Linux 下安装以及使用很多 Windows 下的应用。 [在 Ubuntu 上安装 Wine][14]或者在其他 Linux 上安装 Wine 是很简单的,因为大多数发行版的软件源里都有它。这里也有一个很大的[ Wine 支持的应用的数据库][15]供您浏览。 #### CrossOver #### -[CrossOver][16] 是 Wine 的增强版,它给 Wine 提供了专业的技术上的支持。但是与 Wine 不同, CrossOver 不是免费的。你需要购买许可。好消息是它会把更新也贡献到 Wine 的开发者那里并且事实上加速了 Wine 的开发使得 Wine 能支持更多的 Windows 上的游戏和应用。如果你可以一年支付 48 美元,你可以购买 CrossOver 并得到他们提供的技术支持。 +[CrossOver][16] 是 Wine 的增强版,它给 Wine 提供了专业的技术上的支持。但是与 Wine 不同, CrossOver 不是免费的。你需要购买许可。好消息是它会把更新也贡献到 Wine 的开发者那里并且事实上加速了 Wine 的开发使得 Wine 能支持更多的 Windows 上的游戏和应用。如果你可以接受每年支付 48 美元,你可以购买 CrossOver 并得到他们提供的技术支持。 ### PlayOnLinux ### @@ -113,9 +113,9 @@ PlayOnLinux 也基于 Wine 但是执行程序的方式略有不同。它有着 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Chrome-Web-Store.jpeg) -不必说你也应该知道有非常多的基于网页的游戏,这些游戏都可以在任何操作系统里运行,无论是 Windows,Linux,还是 OS X。大多数让人上瘾的手机游戏,比如[帝国之战][18]就有官方的网页版。 +不必说你也应该知道有非常多的基于网页的游戏,这些游戏都可以在任何操作系统里运行,无论是 Windows ,Linux ,还是 OS X 。大多数让人上瘾的手机游戏,比如[帝国之战][18]就有官方的网页版。 -除了这些,还有 [Google Chrome在线商店][19],你可以在 Linux 上玩更多的这些游戏。这些 Chrome 上的游戏可以像一个单独的应用一样安装并从应用菜单中打开,一些游戏就算是离线也能运行。 +除了这些,还有 [Google Chrome 在线商店][19],你可以在 Linux 上玩更多的这些游戏。这些 Chrome 上的游戏可以像一个单独的应用一样安装并从应用菜单中打开,一些游戏就算是离线也能运行。 ---------- @@ -123,7 +123,7 @@ PlayOnLinux 也基于 Wine 但是执行程序的方式略有不同。它有着 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/03/nSnake_Linux_terminal_game.jpeg) -使用 Linux 的一个附加优势就是可以使用命令行终端玩游戏。我知道这不是最好的玩游戏的 方法,但是在终端里玩[贪吃蛇][20]或者 [2048][21] 很有趣。在[这个博客][21]中有一些好玩的的终端游戏。你可以浏览并安装你喜欢的游戏。 +使用 Linux 的一个附加优势就是可以使用命令行终端玩游戏。我知道这不是最好的玩游戏的方法,但是在终端里玩[贪吃蛇][20]或者 [2048][21] 很有趣。在[这个博客][21]中有一些好玩的的终端游戏。你可以浏览并安装你喜欢的游戏。 ---------- @@ -131,21 +131,21 @@ PlayOnLinux 也基于 Wine 但是执行程序的方式略有不同。它有着 当你了解了不少的在 Linux 上你可以玩到的游戏以及你如何使用他们,下一个问题就是如何保持游戏的版本是最新的。对于这件事,我建议你看看下面的博客,这些博客能告诉你 Linux 游戏世界的最新消息: -- [Gaming on Linux][23]:我认为我把它叫做 Linux 游戏的门户并没有错误。在这你可以得到关于 Linux 的游戏的最新的传言以及新闻。最近, Gaming on Linux 有了一个由 Linux 游戏爱好者组成的漂亮的社区。 +- [Gaming on Linux][23]:我认为我把它叫做 Linux 游戏专业门户并没有错误。在这你可以得到关于 Linux 的游戏的最新的传言以及新闻。它经常更新, 还有由 Linux 游戏爱好者组成的优秀社区。 - [Free Gamer][24]:一个专注于免费开源的游戏的博客。 - [Linux Game News][25]:一个提供很多的 Linux 游戏的升级的 Tumbler 博客。 #### 还有别的要说的吗? #### -我认为让你知道如何开始在 Linux 上的游戏人生是一个好事。如果你仍然不能被说服。我推荐你做个[双系统][26],把 Linux 作为你的主要桌面系统,当你想玩游戏时,重启到 Windows。这是一个对游戏妥协的解决办法。 +我认为让你知道如何开始在 Linux 上的游戏人生是一个好事。如果你仍然不能被说服,我推荐你做个[双系统][26],把 Linux 作为你的主要桌面系统,当你想玩游戏时,重启到 Windows。这是一个对游戏妥协的解决办法。 -现在,这里是你说出你自己的状况的时候了。你在 Linux 上玩游戏吗?你最喜欢什么游戏?你关注了哪些游戏博客? +现在,这里是你说出你自己的想法的时候了。你在 Linux 上玩游戏吗?你最喜欢什么游戏?你关注了哪些游戏博客? 投票项目: 你怎样在 Linux 上玩游戏? -- 我玩原生 Linux 游戏,我也用 Wine 以及 PlayOnLinux 运行 Windows 游戏 +- 我玩原生 Linux 游戏,也用 Wine 以及 PlayOnLinux 运行 Windows 游戏 - 我喜欢网页游戏 - 我喜欢终端游戏 - 我只玩原生 Linux 游戏 @@ -167,7 +167,7 @@ via: http://itsfoss.com/linux-gaming-guide/ 作者:[Abhishek][a] 译者:[name1e5s](https://github.com/name1e5s) -校对:[校对者ID](https://github.com/校对者ID) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3ef908138d5ddb3497d022c3c047219a14ebf7e8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 8 May 2016 08:29:31 +0800 Subject: [PATCH 1340/1710] =?UTF-8?q?20160508-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...action-packed experience with Wikipedia.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md diff --git a/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md b/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md new file mode 100644 index 0000000000..c40a7dafa3 --- /dev/null +++ b/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md @@ -0,0 +1,74 @@ +A four year, action-packed experience with Wikipedia +======================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/wikipedia_checkuser_lead.jpg?itok=4lVDjSSM) + + +I consider myself to be an Odia Wikimedian. I contribute [Odia][1] knowledge (the predominant language of the Indian state of [Odisha][2]) to many Wikimedia projects, like Wikipedia and Wikisource, by writing articles and correcting mistakes in articles. I also contribute to Hindi and English Wikipedia articles. + +![](https://opensource.com/sites/default/files/resize/1st_day_at_odia_wikipedia_workshop_image_source_facebook-200x133.jpg) + +My love for Wikimedia started while I was reading an article about the [Bangladesh Liberation war][3] on the English Wikipedia after my 10th board exam (like, an annual exam for 10th grade students in America). By mistake I clicked on a link that took me to an India Wikipedia article, and I started reading. Something was written in Odia on the lefthand side of the article, so I clicked on that, and reached a [ଭାରତ/Bhārat][4] article on the Odia Wikipedia. I was excited to find a Wikipedia article in my native language! + +![](https://opensource.com/sites/default/files/resize/introducing_wikipedia_at_google_io_image_by_gdg_bhubaneswar-251x166.png) + +A banner inviting readers to be part of the 2nd Bhubaneswar workshop on April 1, 2012 sparked my curiousity. I had never contributed to Wikipedia before, only used it for research, and I wasn't familiar with open source and the community contribution process. Plus, I was only 15 years old. I registered. There were many language enthusiasts at the workshop, and all older than me. My father encouraged me to the participate despite my fear; he has played an important role—he's not a Wikimedian, like me, but his encouragement has helped me change Odia Wikipedia and participate in community activities. + +I believe that knowledge about Odia language and literature needs to improve—there are many misconceptions and knowledge gaps—so, I help organize events and workshops for Odia Wikipedia. On my accomplished list at the point, I have: + +* initiated three major edit-a-thons in Odia Wikipedia: Women's Day 2015, Women's Day 2016, abd [Nabakalebara edit-a-thon 2015][5] +* initiated a photograph contest to get more [Rathyatra][6] images from all over the India +* represented Odia Wikipedia during two events by Google ([Google I/O extended][7] and Google Dev Fest) +* spoke at [Perception][8] 2015 and the first [Open Access India][9] meetup + +![](https://opensource.com/sites/default/files/resize/bengali_wikipedia_10th_anniversary_cc-by-sa4.0_biswaroop_ganguly-251x166.jpg) + +I was just an editor to Wikipedia projects until last year, in January 2015, when I attended [Bengali Wikipedia's 10th anniversary conference][10] and [Vishnu][11], the director of the [Center for Internet and Society][12] at the time, invited me to attend the [Train the Trainer][13] Program. I was inspired to start doing outreach for Odia Wikipedia and hosting meetups for [GLAM]14] activities and training new Wikimedians. These experience taught me how to work with a community of contributors. + +[Ravi][15], the director of Wikimedia India at the time, also played an important role in my journey. He trusted me and made me a part of [Wiki Loves Food][16], a public photo competition on Wikimedia Commons, and the organizing committee of [Wikiconference India 2016][17]. During Wiki Loves Food 2015, my team helped add 10,000+ CC BY-SA images on Wikimedia Commons. Ravi further solidified my commitment by sharing a lot of information with me about the Wikimedia movement, and his own journey, during [Odia Wikipedia's 13th anniversary][18]. + +Less than a year later, in December 2015, I became a Program Associate at the Center for Internet and Society's [Access to Knowledge program][19] (CIS-A2K). One of my proud moments was at a workshop in Puri, India where we helped bring 20 new Wikimedian editors to the Odia Wikimedia community. Now, I mentor Wikimedians during an informal meetup called [WikiTungi][20] Puri. I am working with this group to make Odia Wikiquotes a live project. I am also dedicated to bridging the gender gap in Odia Wikipedia. [Eight female editors][21] are now helping to organize meetups and workshops, and participate in the [Women's History month edit-a-thon][22]. + +During my brief but action-packed journey during the four years since, I have also been involved in the [Wikipedia Education Program][23], the [newsletter team][24], and two global edit-a-thons: [Art and Feminsim][25] and [Menu Challenge][26]. I look forward to the many more to come! + +I would also like to thank [Sameer][27] and [Anna][28] (both previous members of the Wikipedia Education Program). + +------------------------------------------------------------------------------ + +via: https://opensource.com/life/16/4/my-open-source-story-gloria-bwandungi + +作者:[Sailesh Patnaik][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/saileshpat +[1]: https://en.wikipedia.org/wiki/Odia_language +[2]: https://en.wikipedia.org/wiki/Odisha +[3]: https://en.wikipedia.org/wiki/Bangladesh_Liberation_War +[4]: https://or.wikipedia.org/s/d2 +[5]: https://or.wikipedia.org/s/toq +[6]: https://commons.wikimedia.org/wiki/Commons:The_Rathyatra_Challenge +[7]: http://cis-india.org/openness/blog-old/odia-wikipedia-meets-google-developer-group +[8]: http://perception.cetb.in/events/odia-wikipedia-event/ +[9]: https://opencon2015kolkata.sched.org/speaker/sailesh.patnaik007 +[10]: https://meta.wikimedia.org/wiki/Bengali_Wikipedia_10th_Anniversary_Celebration_Kolkata +[11]: https://www.facebook.com/vishnu.vardhan.50746?fref=ts +[12]: http://cis-india.org/ +[13]: https://meta.wikimedia.org/wiki/CIS-A2K/Events/Train_the_Trainer_Program/2015 +[14]: https://en.wikipedia.org/wiki/Wikipedia:GLAM +[15]: https://www.facebook.com/ravidreams?fref=ts +[16]: https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Food +[17]: https://meta.wikimedia.org/wiki/WikiConference_India_2016 +[18]: https://or.wikipedia.org/s/sml +[19]: https://meta.wikimedia.org/wiki/CIS-A2K +[20]: https://or.wikipedia.org/s/xgx +[21]: https://or.wikipedia.org/s/ysg +[22]: https://or.wikipedia.org/s/ynj +[23]: https://outreach.wikimedia.org/wiki/Education +[24]: https://outreach.wikimedia.org/wiki/Talk:Education/News#Call_for_volunteers +[25]: https://en.wikipedia.org/wiki/User_talk:Saileshpat#Barnstar_for_Art_.26_Feminism_Challenge +[26]: https://opensource.com/life/15/11/tasty-translations-the-open-source-way +[27]: https://www.facebook.com/samirsharbaty?fref=ts +[28]: https://www.facebook.com/anna.koval.737?fref=ts From 1da9cd9bc2403cd394fd4403e1f6204e22a9c0ac Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 8 May 2016 08:30:37 +0800 Subject: [PATCH 1341/1710] =?UTF-8?q?20160508-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0415 A four year, action-packed experience with Wikipedia.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md b/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md index c40a7dafa3..9c45c209e9 100644 --- a/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md +++ b/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md @@ -35,7 +35,7 @@ I would also like to thank [Sameer][27] and [Anna][28] (both previous members of ------------------------------------------------------------------------------ -via: https://opensource.com/life/16/4/my-open-source-story-gloria-bwandungi +via: https://opensource.com/life/16/4/my-open-source-story-sailesh-patnaik 作者:[Sailesh Patnaik][a] 译者:[译者ID](https://github.com/译者ID) From 424b0a635ee82bfbd76d5383de9d927c0bc5eedb Mon Sep 17 00:00:00 2001 From: Name1e5s <836401406@qq.com> Date: Sun, 8 May 2016 13:06:22 +0800 Subject: [PATCH 1342/1710] [Translated]20160505 A daughter of Silicon Valley shares her 'nerd' story --- ... Silicon Valley shares her 'nerd' story.md | 83 ------------------- ... Silicon Valley shares her 'nerd' story.md | 82 ++++++++++++++++++ 2 files changed, 82 insertions(+), 83 deletions(-) delete mode 100644 sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md create mode 100644 translated/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md diff --git a/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md b/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md deleted file mode 100644 index 2ef0f680b0..0000000000 --- a/sources/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md +++ /dev/null @@ -1,83 +0,0 @@ -Name1e5s translating... -A daughter of Silicon Valley shares her 'nerd' story -======================================================= - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) - -Back in 2014, my colleague [Crystal Beasley][1] started a thread of women in tech/hackers posting their "nerd stories" in response to some comments out there on the Internet about the lack of women in tech. This is my nerd story, shared with you because I do believe in role models, and I do believe that there are many paths one can take to a satisfying challenging career and a life that helps one fulfill their goals. - -### Growing up with computers - -I am, among other things, a daughter of Silicon Valley. Mine is not a story of arriving at tech from the sidelines, or of dedication from childhood. It is more a story of how exposure shapes you—of the power of being marinated in a culture, if you will. This is not the story of a straight path or a clear dedication from childhood to one goal. It is a story of intense privilege, I am aware. - -I was born in Manhattan, but we lived in New Jersey while my dad was working on a PhD in computer science at Rutgers on the GI Bill. When I was four, someone at school asked me what my dad did for a living and I said, "He watches TV and hunts for bugs, but I never seen 'em." He had a dumb terminal at home, presumably for his job at Bolt Beranek Newman working on the artificial intelligence aspects of the early Internet. I was watching. - -I did not get to play with dad's bug hunting TV, but I was steeped in tech from an early age, and I value the gift of that early exposure. Early exposure is one of the things we must give to the future nerds—take time to talk to the kids you know about what you do! - -![](https://opensource.com/sites/default/files/resize/moss-520x433.png) - ->My dad's terminal was similar, if not identical, to this one. CC BY-SA 4.0 - -When I was six, we moved to California. Dad was taking a job at Xerox PARC. I remember thinking that the city would be full of bears, because there was a bear on the flag. In 1979, Palo Alto was a college town and still had orchards and open space. - -After a year of public school in Palo Alto, my sisters and I were sent to Peninsula School, a "democratic model" school that shaped me deeply. Curiosity and creativity were considered central curriculum values, and education was led substantively by group decisions of the students ourselves. We rarely saw anything one would call a computer at school, but home was another story. - -After his days at Xerox PARC, dad went to Apple, where he worked on and brought home the first computers I played with: the Apple II and the LISA. My dad was on the original LISA development team, and I vividly remember that he made us "play" the mousing tutorial over and over because he wanted my 3 year-old sister to be comfortable with it... and she was. - -![](https://opensource.com/sites/default/files/resize/600px-apple_lisa-520x520.jpg) - ->Our LISA computer pretty much looked like this. See the mouse? CC BY-SA 4.0 - -At the same time in school, while I was great at conceptual math, I floundered in basic computation. One teacher at my first school told my parents, and me, that I was bad at math and "stupid." While I excelled in our "regular" math program, understanding logical puzzles beyond what one expects of a 7 year-old, I could not successfully complete the math "drills" we had to do at the beginning of each day. She called me stupid, and I didn't forget it. I didn't get back to believing in my own logical and algorithmic mental capabilities for more than 10 years after that. Do not underestimate the power of the words you say to children. - -Years of playing with dad's computers followed. He went from Apple to EA to SGI, and I played with all his machines. This led to us having what we thought was the coolest house in town, because we had an SGI machine on which to play Doom in our garage. I didn't code much at all, but what I got from those years, I see now, was a measure of fearlessness about trying out new technologies. At the same time, my mom, whose background was literature and education, became a technical writer and showed me both that careers can change and that it is possible to manage a technical career and motherhood together. I would not say that was easy for her, but she made it look easy to me. You'd think that all of this early exposure might send me straight into a technical degree and career. It did not. - -### Undergrad years - -I thought I wanted to be an elementary school teacher, and I enrolled at Mills College with every intention of doing that. Instead, I moved toward women's studies and later theology, primarily driven by one of my great desires in life: to understand human motivation and work for a better world. - -At the same time, I was for the first time being exposed to the full power of the Internet. In 1991, it was a very heady thing to have your own unix shell account and a world of people to talk to. I learned a lot from just "playing" online, and more from having people around willing to answer my many questions. It turned out that these same explorations led me down my career path at least as much as any formal academic education. All information is useful. I do not think it is any accident that this critical period of learning and exposure happened at a women's college where a brilliant woman ran the CS department. We were not just allowed, but encouraged to explore many paths in that rarified atmosphere of empowerment (we had access to lots and lots of technology and to smart people who wanted to help), and I did. I've always been grateful for it. It was also where I learned about geek culture. - -I went to grad school to study feminist theology, but technology was in my blood by then. When I realized I didn't want to be a professor or an academic ethicist, I left academia and came home with a lot of school debt and not a lot of ideas. - -### A new beginning - -I was stunned, in 1995, at the power I saw in the World Wide Web to connect people and share thoughts and information (I still am). I wanted in on it. It occurred to me that I could go into the "family business," but not really how. I started working as a temporary contractor at offices in the valley and tried a few things (writing very basic databases on semiconductor data, pre-press work for technical manuals, filing payroll stubs) before I landed my first "real" tech job at Sun Microsystems. It was a very exciting place to be. (We were, after all, "the dot in dot-com.") - -At Sun, I stuck my neck out, trying as many new things as I could. I worked firsthand at HTMLing (What? It's a word!) white papers, then hacking basic surveying tools (Perl, mostly) for beta programs. Then I became a program manager for Solaris beta programs, and at last got my first whiff of open source in running beta programs for Open Solaris. - -The biggest thing I did was learn. I found it to be an atmosphere where engineering and education were both valued, and where my questions were not "stupid." I was lucky in my choices of mentors and friends. I took every class I could, read every book I could, and tried to give myself the technical, business, and project management skill sets I hadn't obtained in school before deciding to take the oft-discussed "mommy break" to prepare for the birth of my second child. - -### Getting back to work - -When I was ready to go back to work, Sun was no longer a viable place to go. So, I gathered my contacts (networking is your friend) and my consulting skills and ended up with a rather long-term contract release managing a web "portal" (in 2005, everything was a portal) and exposing myself to everything I could about CRMs, release methodology, localization, networking, and more. I explain all of this background mostly because my biggest lesson was that the education I got was in what I tried and in what I failed to do, as much as in what I succeeded at. I think we need role models for that, too. - -In many respects, the entire first part of my career was my technical education. It was a different time and place—I worked on supporting women and other underrepresented minorities in the organization, but it was not as overtly difficult to be a woman in tech then. I was undoubtedly blind to some issues at the time, but there's also a case to be made that our industry has become more misogynistic, not less. - -After all of this, I still did not see myself as a role model, or as highly technical. I was quite shocked when a geek friend I knew from parenting circles encouraged me to apply for a job as product manager at a very obscure seeming and highly technical nonprofit open source infrastructure shop (Internet Systems Consortium, makers of BIND, the widely deployed open source DNS nameserver, and operators of one of the 13 root nameservers). For the longest time, I couldn't figure out why they hired me! I knew very little about DNS, infrastructure, or protocol development, but I found my mentors again and flourished. I spent my time traveling, working on critical processes, figuring out how to work with highly international teams, solving hairy problems, and most of all, embracing open source and the vibrant community that loved and supported our efforts so very much. I learned most of all, again, by making mistakes. I learned what it takes to build a vision for a product, and how building things in the open and in community takes all sorts of specific skills, talent, and patience, but adds so much value. - -### Becoming a mentor - -It was while I was at ISC that, through the amazing [TechWomen program][2] (which brings technical women from the Middle East and North Africa to Silicon Valley for mentoring), I got hooked on mentoring and supporting other women in tech, particularly in open source and open culture. It was when I started mentoring that I started believing in my own abilities, too. That was a long lesson to learn. - -When I first read the advert for TechWomen mentors, I didn't think they would even want to talk to me! My impostor syndrome was so strong. I was so shocked when I was asked to mentor the first cohort (and every one after that for six years), but I am learning to believe that I earned these things. Impostor Syndrome is real, but over time it can be overcome. - -### Today - -In the end, I had to leave my job at ISC. Luckily, my work and my values brought me to Mozilla, where I've been both perseverant and lucky enough to have several meaningful roles. Today, I'm the senior program manager of diversity and inclusion. I work full-time on building a more diverse and inclusive Mozilla, standing on the shoulders of giants who did the same before me and in partnership with many of the smartest and kindest people I know. I've followed my passion for empowering people to find meaningful ways to contribute to the Internet I believe the world needs: an expansion of the one that excited me so long ago. And I get to see a lot of the world while I do it! - -Taking a new approach to changing culture through organizational and behavioral interventions is such an incredible way to connect my entire trajectory—from my early academics through my career to now. It's a new challenge every day, and I guess that's what I love most about working in tech and in particular on the open web. The very pluralistic nature of the web that first drew me in is the same possibility I still seek—a world where there is opportunity for all and where there are resources for people no matter their backgrounds. Role models, mentors, resources, and, above all, respect are essential components of evolving tech and open source culture to be all that I believe it can be—including access and opportunity for all of us. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/5/my-open-source-story-larissa-shapiro - -作者:[Larissa Shapiro][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/larissa-shapiro -[1]: http://skinnywhitegirl.com/blog/my-nerd-story/1101/ -[2]: https://www.techwomen.org/mentorship/why-i-keep-coming-back-to-mentor-with-techwomen diff --git a/translated/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md b/translated/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md new file mode 100644 index 0000000000..4c4463df63 --- /dev/null +++ b/translated/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md @@ -0,0 +1,82 @@ +A daughter of Silicon Valley shares her 'nerd' story +======================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) + +在 2014 年,为了对网上一些关于女性在科技行业的缺失的评论作出回应,我的同事 [Crystal Beasley][1] 建立了一个能让在科技/信息安全方面工作的女性在网络上分享自己的“天才之路”。这篇文章就是我的故事。我把我的故事与你们分享是因为我相信榜样的力量,我也相信有一个人有很多的方式进入一个让自己满意的有挑战性的工作和一个实现了所有目标的人生。 + +### 和电脑相伴的童年 + +我,在其他的光环之下,是硅谷的女儿。我的故事不是一个观众变成舞台的主角的故事。也不是从小就为这份事业做贡献的故事。这个故事更多的是关于环境如何塑造你 — 通过它的那种已然存在的文化来改变你,如果你想要被改变的话。这不是从小就看是努力并为一个明确的目标而奋斗的故事,我知道这是关于特权的故事。 + +我出生在曼哈顿,但是我在新泽西州长大,因为我的爸爸作为一个退伍军人在那里的罗格斯大学攻读计算机科学的博士学位。当我四岁时,学校里有人问我我的爸爸干什么谋生时,我说,“他就是看电视和捕捉小虫子,但是我从没有见过那些小虫子”(译者注:小虫子,bug)。他在家里有一台哑终端,这大概与他在博尔特-贝拉尼克-纽曼公司的工作有关,他会通过早期的互联网来进行它在人工智能方面的工作。我就在旁边看着。 + +我没能玩上父亲的会抓小虫子的电视,但是我很早就接触到了技术领域,我很珍惜这个礼物。提早的熏陶对于一个未来的天才是十分必要的 — 所以,请花时间和你的小孩谈谈他以后要做什么! + +![](https://opensource.com/sites/default/files/resize/moss-520x433.png) + +>我父亲的终端和这个很类似——如果不是这个的话 CC BY-SA 4.0 + +当我六岁时,我们搬到了加州。父亲在施乐的研究中心找到了一个工作。我记得那时我认为这个城市一定有很多熊,因为在它的旗帜上都有一个熊。在1979年,帕洛阿尔托还是一个大学城,还有果园和开阔地带。 + +在帕洛阿尔托的公立学校待了一年之后,我的姐姐和我被送到了“半岛学校”,这个“模范学校”对我造成了深刻的影响。在那里,好奇心和创新意识是被推崇的,教育也是有学生自己决定的。我们很少在学校看到能叫做电脑的东西,但是在家就不同了。 + +在父亲从施乐辞职之后,他就去了苹果,在那里他帮助研发——以及带回家让我玩的第一批电脑就是:Apple II 和 LISA。我的父亲在原先的 LISA 的研发团队。我直到现在还深刻的记得他让我们一次又一次的“玩鼠标”场景,因为他想让我的 3 岁大的妹妹对这个东西感到舒服——她也确实那样。 + +![](https://opensource.com/sites/default/files/resize/600px-apple_lisa-520x520.jpg) + +>我们的 LISA 看起来就像这样,看到鼠标了吗?CC BY-SA 4.0 + +在学校,我的数学的概念学得不错,但是基本计算却惨不忍睹。我的第一个学校的老师告诉我的家长,还有我,说我的数学很差以及我很“笨”。虽然我在“常规的”数学项目中表现出色,能理解一个 7 岁的孩子能理解的逻辑谜题,但是我不能完成我们每天早上都要做的“练习”。她说我傻,这事我不会忘记。在那之后的十年我都没能相信自己的逻辑能力和算法的水平。不要 低估你给孩子的说的话的力量。 + +在我玩了几年爸爸的电脑之后,他从苹果跳到了 EA 又跳到了 SGI,我又体验了他带回来的新玩意。这让我们认为我们家的房子是镇里最酷的,因为我们在车库里有一个能玩 Doom 的 SGI 的机器。我不会太多的编程,但是现在我发现,在那些年里我对尝试新的科技不再恐惧。同时,我的学文学和教育的母亲,成为了一个科技行业的作家,她向我证实了一个人的职业可以改变以及科技行业的人也可以做母亲。我不是说这对她来说很简单,但是她让我认为这件是看起来很简单。你可能回想这些早期的熏陶能把我带到科技行业,但是它没有。 + +### 本科时光 + +我想我要成为一个小学教师,我就读米尔斯学院就是想要做这个。但是后来我开始研究女性,后来有研究神学,我这样做仅仅是由于我自己的一个渴求:我希望能理解人类的意志以及为更好的世界而努力。 + +同时,我也感受到了互联网的巨大力量。在 1991 年,拥有你自己的 UNIX 的账户是很令人高兴的事,这件事值得你向全世界的人吹嘘。我仅仅从在互联网中“玩”就学到了不少,从那些愿意回答我提出的问题的人那里学到的就更多了。这些学习对我的职业生涯的影响不亚于我在学校教育部之中学到的知识。没有没有用的信息。我在一个女子学院度过了影响我一生的关键时期,然后那个女子学院的一个辉煌的女人跑进了计算机院,我不忍为这是一个事故。在那个老师的权力不算太大的学院,我们不止是被允许,甚至是被鼓励去尝试很多的道路(我们能接触到很多很多的科技,还能有聪明人来供我们求助),我也确实那样做了。我十分感激当年的教育。在那个学院,我也了解了什么是极客文化。 + +之后我去了研究生院去学习 女权主义神学,但是技术行业的气息已经渗入我的灵魂。当我知道我不能成为一个教授或者一个专家时,我离开了学术圈,带着债务和很多点子回到了家。 + +### 新的开端 + +在 1995 年,我被我看见的万维网连接 人们以及分享想法和信息的能力所震惊(直到现在仍是如此)。我想要进入这个行业。看起来我好像要“女承父业”,但是我不知道我会用什么方式来这样做。我开始在硅谷做临时工,在我在太阳微系统公司得到我的第一个“技术”职位前做一些事情(为数据写最基础的数据库,技术手册印发钱的事务,备份工资单的存跟)。这些事很让人激动。(毕竟,我们是“点 com”的那个”点“)。 + +在 Sun ,我努力学习,尽可能多的尝试我新事物。我的第一个工作是网页化(啥?这是一个单独的词汇)论文以及为测试中的 Solaris 修改一些基础的服务工具(大多数是Perl写的)。在那里最终在 Open Solaris 的测试版运行时我感受到了开源的力量。 + +在那里我学到了一个很重要的事情。我发现在同样重视工程和教育的地方有一种气氛,在那里我的问题不再显得“傻”。我很庆幸我选对了导师和朋友。在决定为第二个孩子的出生产假之前,我上每一堂我能上的课程,读每一本我能读的书,尝试自学我在学校没有学习过的技术,商业以及项目管理方面的技能。 + +### 重回工作 + +当我准备重新工作时,Sun 已经不是一个值得回去的地方。所以,我收集了很多人的信息(网络是你的朋友),利用我的沟通技能最终建立了一个互联网门户(2005 年时,一切皆门户),并且开始了解 CRM,发布产品的方式,本地化,网络等知识。我这么做是基于我过去的尝试以及失败的经历所得出的教训,也是这个教训让我成功。我也认为我们需要这个方面的榜样。 + +从很多方面来看,我的职业生涯的第一部分是 我的技术上的自我教育。这事发生的时间和地点都和现在不一样——我在帮助女性和其他弱势群体的组织工作,但是我之后成为一个技术行业的女性。当时我无疑,没有看到这个行业的缺陷,现在这个行业更加的厌恶女性,而不是更加喜欢她们。 + +在这些事情之后,我还没有把自己当作一个榜样,或者一个高级技术人员。当我的一个在父母的圈子里认识极客朋友鼓励我申请一个看起来定位十分模糊且技术性很强的开源的非盈利基础设施商店(互联网系统协会,BIND,一个广泛部署的开源服务器的开发商,13 台 DNS 根域名服务器之一的运营商)的项目经理时,我很震惊。有很长一段时间,我都不知道他们为什么要雇佣我!我对 DNS ,基础设备,以及协议的开发知之甚少,但是我再次遇到了老师,并再度开始飞速发展。我花时间旅行,在关键流程攻关,搞清楚如何与高度国际化的团队合作,解决麻烦的问题,最重要的是,拥抱支持我们的开源和充满活力的社区。我几乎重新学了一切,通过试错的方式。我学习如何构思一个产品。如何通过建设开源社区,领导那些有这特定才能,技能和耐心的人,是他们给了产品价值。 + +### 成为别人的导师 + +当我在 ISC 工作时,我通过 [TechWomen 项目][2] (一个让来自中东和北非的技术行业的女性带到硅谷来接受教育的计划),我开始喜欢教学生以及支持那些女性,特别是在开源行业中奋斗的。这也就是我开始相信自己的能力的开端。我还需要学很多。 + +当我第一次读 TechWomen 的广告时,我认为那些导师甚至都不会想要和我说话!我有冒名顶替综合征。当他们邀请我成为第一批导师(以及以后 6 年的导师)时,我很震惊,但是现在我学会了相信这些都是我努力得到的待遇。冒名顶替综合征是真实的,但是它能被时间冲淡。 + +### 现在 + +最后,我不得不离开我在 ISC 的工作。幸运的是,我的工作以及我的价值让我进入了 Mozilla ,在这里我的努力和我的幸运让我在这里有着重要的作用。现在,我是一名支持多样性的包容的高级项目经理。我致力于构建一个更多样化,更有包容性的 Mozilla ,站在之前的做同样事情的巨人的肩膀上,与最聪明友善的人们一起工作。我用我的激情来让人们找到贡献一个世界需要的互联网的有意义的方式:这让我兴奋了很久。我能看见,我做到了! + +通过对组织和个人行为的干预来用一种新的方法来改变一种文化这件事情和我的人生有着十分奇怪的联系 —— 从我的早期的学术生涯,到职业生涯再到现在。每天都是一个新的挑战,我想我最喜欢的就是在科技行业的工作,尤其是在开放互联网的工作。互联网天然的多元性是它最开始吸引我的原因,也是我还在寻求的——一个所有人都有获取的资源可能性,无论背景如何。榜样,导师,资源,以及最重要的,对不断发展的技术和开源文化的尊重能实现我相信它能实现的事 —— 包括给任何的平等的接入权和机会。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/5/my-open-source-story-larissa-shapiro + +作者:[Larissa Shapiro][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/larissa-shapiro +[1]: http://skinnywhitegirl.com/blog/my-nerd-story/1101/ +[2]: https://www.techwomen.org/mentorship/why-i-keep-coming-back-to-mentor-with-techwomen From 36e44067607e34fc17afed464f4b0f808cb7198b Mon Sep 17 00:00:00 2001 From: Name1e5s <836401406@qq.com> Date: Sun, 8 May 2016 13:12:32 +0800 Subject: [PATCH 1343/1710] Title changed.... --- ...0505 A daughter of Silicon Valley shares her 'nerd' story.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md b/translated/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md index 4c4463df63..279a7fd843 100644 --- a/translated/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md +++ b/translated/talk/my-open-source-story/20160505 A daughter of Silicon Valley shares her 'nerd' story.md @@ -1,4 +1,4 @@ -A daughter of Silicon Valley shares her 'nerd' story +”硅谷的女儿“的天才故事 ======================================================= ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) From 00c09fb6d37220e0352b46a6f65495fa30e82569 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 8 May 2016 13:29:49 +0800 Subject: [PATCH 1344/1710] =?UTF-8?q?20160506-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0: Remote hosts and container migration.md | 206 +++++++++++++++++- 1 file changed, 204 insertions(+), 2 deletions(-) diff --git a/sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md b/sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md index 95c825a30e..bbeb4f3eea 100644 --- a/sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md +++ b/sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md @@ -1,7 +1,209 @@ Part 6 - LXD 2.0: Remote hosts and container migration ======================================================= -<正文待补充> +This is the third blog post [in this series about LXD 2.0][0]. + +![](https://linuxcontainers.org/static/img/containers.png) + +### Remote protocols + +LXD 2.0 supports two protocols: + +* LXD 1.0 API: That’s the REST API used between the clients and a LXD daemon as well as between LXD daemons when copying/moving images and containers. +* Simplestreams: The Simplestreams protocol is a read-only, image-only protocol used by both the LXD client and daemon to get image information and import images from some public image servers (like the Ubuntu images). + +Everything below will be using the first of those two. + +### Security + +Authentication for the LXD API is done through client certificate authentication over TLS 1.2 using recent ciphers. When two LXD daemons must exchange information directly, a temporary token is generated by the source daemon and transferred through the client to the target daemon. This token may only be used to access a particular stream and is immediately revoked so cannot be re-used. + +To avoid Man In The Middle attacks, the client tool also sends the certificate of the source server to the target. That means that for a particular download operation, the target server is provided with the source server URL, a one-time access token for the resource it needs and the certificate that the server is supposed to be using. This prevents MITM attacks and only give temporary access to the object of the transfer. + +### Network requirements + +LXD 2.0 uses a model where the target of an operation (the receiving end) is connecting directly to the source to fetch the data. + +This means that you must ensure that the target server can connect to the source directly, updating any needed firewall along the way. + +We have [a plan][1] to allow this to be reversed and also to allow proxying through the client itself for those rare cases where draconian firewalls are preventing any communication between the two hosts. + +### Interacting with remote hosts + +Rather than having our users have to always provide hostname or IP addresses and then validating certificate information whenever they want to interact with a remote host, LXD is using the concept of “remotes”. + +By default, the only real LXD remote configured is “local:” which also happens to be the default remote (so you don’t have to type its name). The local remote uses the LXD REST API to talk to the local daemon over a unix socket. + +### Adding a remote + +Say you have two machines with LXD installed, your local machine and a remote host that we’ll call “foo”. + +First you need to make sure that “foo” is listening to the network and has a password set, so get a remote shell on it and run: + +``` +lxc config set core.https_address [::]:8443 +lxc config set core.trust_password something-secure +``` + +Now on your local LXD, we just need to make it visible to the network so we can transfer containers and images from it: + +lxc config set core.https_address [::]:8443 +Now that the daemon configuration is done on both ends, you can add “foo” to your local client with: + +``` +lxc remote add foo 1.2.3.4 +``` + +(replacing 1.2.3.4 by your IP address or FQDN) + +You’ll see something like this: + +``` +stgraber@dakara:~$ lxc remote add foo 2607:f2c0:f00f:2770:216:3eff:fee1:bd67 +Certificate fingerprint: fdb06d909b77a5311d7437cabb6c203374462b907f3923cefc91dd5fce8d7b60 +ok (y/n)? y +Admin password for foo: +Client certificate stored at server: foo +``` + +You can then list your remotes and you’ll see “foo” listed there: + +``` +stgraber@dakara:~$ lxc remote list ++-----------------+-------------------------------------------------------+---------------+--------+--------+ +| NAME | URL | PROTOCOL | PUBLIC | STATIC | ++-----------------+-------------------------------------------------------+---------------+--------+--------+ +| foo | https://[2607:f2c0:f00f:2770:216:3eff:fee1:bd67]:8443 | lxd | NO | NO | ++-----------------+-------------------------------------------------------+---------------+--------+--------+ +| images | https://images.linuxcontainers.org:8443 | lxd | YES | NO | ++-----------------+-------------------------------------------------------+---------------+--------+--------+ +| local (default) | unix:// | lxd | NO | YES | ++-----------------+-------------------------------------------------------+---------------+--------+--------+ +| ubuntu | https://cloud-images.ubuntu.com/releases | simplestreams | YES | YES | ++-----------------+-------------------------------------------------------+---------------+--------+--------+ +| ubuntu-daily | https://cloud-images.ubuntu.com/daily | simplestreams | YES | YES | ++-----------------+-------------------------------------------------------+---------------+--------+--------+ +``` + +### Interacting with it + +Ok, so we have a remote server defined, what can we do with it now? + +Well, just about everything you saw in the posts until now, the only difference being that you must tell LXD what host to run against. + +For example: + +``` +lxc launch ubuntu:14.04 c1 +``` + +Will run on the default remote (“lxc remote get-default”) which is your local host. + +``` +lxc launch ubuntu:14.04 foo:c1 +``` + +Will instead run on foo. + +Listing running containers on a remote host can be done with: + +``` +stgraber@dakara:~$ lxc list foo: ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +| c1 | RUNNING | 10.245.81.95 (eth0) | 2607:f2c0:f00f:2770:216:3eff:fe43:7994 (eth0) | PERSISTENT | 0 | ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +``` + +One thing to keep in mind is that you have to specify the remote host for both images and containers. So if you have a local image called “my-image” on “foo” and want to create a container called “c2” from it, you have to run: + +``` +lxc launch foo:my-image foo:c2 +``` + +Finally, getting a shell into a remote container works just as you would expect: + +``` +lxc exec foo:c1 bash +``` + +### Copying containers + +Copying containers between hosts is as easy as it sounds: + +``` +lxc copy foo:c1 c2 +``` +And you’ll have a new local container called “c2” created from a copy of the remote “c1” container. This requires “c1” to be stopped first, but you could just copy a snapshot instead and do it while the source container is running: + +``` +lxc snapshot foo:c1 current +lxc copy foo:c1/current c3 +``` + +### Moving containers + +Unless you’re doing live migration (which will be covered in a later post), you have to stop the source container prior to moving it, after which everything works as you’d expect. + +``` +lxc stop foo:c1 +lxc move foo:c1 local: +``` + +This example is functionally identical to: + +``` +lxc stop foo:c1 +lxc move foo:c1 c1 +``` + +### How this all works + +Interactions with remote containers work as you would expect, rather than using the REST API over a local Unix socket, LXD just uses the exact same API over a remote HTTPS transport. + +Where it gets a bit trickier is when interaction between two daemons must occur, as is the case for copy and move. + +In those cases the following happens: + +1. The user runs “lxc move foo:c1 c1”. +2. The client contacts the local: remote to check for an existing “c1” container. +3. The client fetches container information from “foo”. +4. The client requests a migration token from the source “foo” daemon. +5. The client sends that migration token as well as the source URL and “foo”‘s certificate to the local LXD daemon alongside the container configuration and devices. +6. The local LXD daemon then connects directly to “foo” using the provided token + A. It connects to a first control websocket + B. It negotiates the filesystem transfer protocol (zfs send/receive, btrfs send/receive or plain rsync) + C. If available locally, it unpacks the image which was used to create the source container. This is to avoid needless data transfer. + D. It then transfers the container and any of its snapshots as a delta. +7. If succesful, the client then instructs “foo” to delete the source container. + +### Try all this online + +Don’t have two machines to try remote interactions and moving/copying containers? + +That’s okay, you can test it all online using our [demo service][2]. +The included step-by-step walkthrough even covers it! + +### Extra information + +The main LXD website is at: +Development happens on Github at: +Mailing-list support happens on: +IRC support happens in: #lxcontainers on irc.freenode.net -https://www.stgraber.org/2016/04/12/lxd-2-0-remote-hosts-and-container-migration-612/ +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[1]: https://github.com/lxc/lxd/issues/553 +[2]: https://linuxcontainers.org/lxd/try-it/ From 85ba77f9d3af8d1a826196a5d8419886810cc29a Mon Sep 17 00:00:00 2001 From: sonofelice Date: Sun, 8 May 2016 16:36:25 +0800 Subject: [PATCH 1345/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=909?= =?UTF-8?q?=20Key=20Trends=20in=20Hybrid=20Cloud=20Computing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成9 Key Trends in Hybrid Cloud Computing --- ... 9 Key Trends in Hybrid Cloud Computing.md | 75 ------------------ ... 9 Key Trends in Hybrid Cloud Computing.md | 76 +++++++++++++++++++ 2 files changed, 76 insertions(+), 75 deletions(-) delete mode 100644 sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md create mode 100644 translated/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md diff --git a/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md b/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md deleted file mode 100644 index 4c6e74ed2d..0000000000 --- a/sources/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md +++ /dev/null @@ -1,75 +0,0 @@ -sonofelice translating -9 Key Trends in Hybrid Cloud Computing -======================================== - -All three forms of cloud computing – public, private, and hybrid – have undergone considerable evolution since the concepts first gained the attention of IT years ago. Hybrid cloud is the overwhelming favorite form of the cloud, with [88% of firms surveyed](https://www.greenhousedata.com/blog/hybrid-continues-to-be-most-popular-cloud-option-adoption-accelerating) rating it as important or critical to their business. - -The lightning-fast evolution of hybrid cloud means the conventional wisdom of a year or two back is already obsolete. So we asked several industry analysts where they saw the hybrid cloud headed in 2016 and got some interesting answers. - -1. **2016 might be the year that we get hybrid cloud to actually work.** - - By its very nature, hybrid cloud relies on private cloud, which has proven elusive for most enterprises. The fact is that the public cloud – Amazon, Google, Microsoft – have had much more investment and a longer head start. The private cloud has hamstrung the hybrid cloud's growth and usability. - - There hasn't been as much investment in the private cloud because by its very nature, the private cloud means keeping and investing in your own data center. And many public cloud providers are pushing enterprises to reduce or eliminate their data center spending all together. - - However, this year will see the private cloud start to catch up thanks to advances in OpenStack and Microsoft's Azure Stack, which is basically a private cloud in a box. The tools, infrastructures, and architectures to support hybrid cloud are also becoming much more robust. - -2. **Containers, microservices, and unikernels will bolster the hybrid cloud.** - - These are all cloud native technologies and will all be more or less mainstream by the end of 2016, analysts predict. They are maturing rapidly and serving as a viable alternative to virtual machines, which require more resources. - - More importantly, they work in an on-premises scenario as well as an off-premises scenario. Containerization and orchestration allow rapid scale up, scale out, and service migration between public and private cloud, making it even easier to move your services around. - -3. **Data and relevance take center stage** - - The cloud, in all its forms, has been in growth mode. That makes it a technology story. But with the cloud shifting into maturity, data and relevance become more important, according to the consultancy [Avoa](http://avoa.com/2016/01/01/2016-is-the-year-of-data-and-relevance/). At first, the cloud and Big Data were all about sucking up as much data as possible. Then they worried about what to do with it. - - In 2016, organizations will hone their craft in how data is collected and used. There is still much progress to be made in the technological and cultural aspects that must be dealt with. But 2016 should bring a renewed focus on the importance of data from all aspects and finding the most relevant information, not just lots of it. - -4. **Cloud services move beyond just on-demand workloads** - - AWS got its start as a place where a programmer/developer could spin up a VM real quick, get some work done, and get off. That's the essence of on-demand use, and given how much it can cost to leave those services constantly running, there is almost a disincentive to keep them running 24/7. - - However, IT organizations are starting to act as service brokers to provide all manner of IT services to their in-house users. This can be anything from in-house IT services, public cloud infrastructure providers, platform-as-a-service, and software-as-a-service. - - They will increasingly recognize the value of tools like cloud management platforms to provide consistent policy-based management over many of these different services. And they will see the value of technology such as containers to enhance portability. However, cloud service brokering in the sense of rapidly moving workloads between clouds for price arbitrage and related reasons will continue to be a non-starter. - -5. **Service providers become cloud service providers** - - Up to now, buying cloud services has been a direct sale model. The user was frequently the buyer of AWS EC2 services, either through officially recognized channels at work or through Shadow IT. But as cloud services become more comprehensive, and the menu of services more confusing, more and more people are turning to resellers and services providers to act as the purchaser of IT services for them. - - A recent survey by 2nd Watch, a Seattle-based cloud services provider, found nearly 85 percent of IT executives in the United States would be willing to pay a small premium to buy public cloud from a channel partner if it were to make it less complex. And about four out of every five within that 85 percent would shell out an extra 15 percent or more, the survey found. One in three executives surveyed said they could use the help in buying, using, and managing public cloud services. - -6. **IoT and cloud is to 2016 what mobile and cloud was to 2012** - - IoT is gaining mindshare and, more importantly, it's moving from test beds to real use cases. The cloud is a vital part for IoT due to its distributed nature, and for industrial IoT, where machinery and heavy equipment talk to back-end systems, a hybrid cloud will be most natural driver because the connection, data collection, and processing will happen in a hybrid cloud environment, due to perceived benefits of the private cloud side, like security and privacy. - -7. **The NIST definition of the cloud begins to break down** - - In 2011, the National Institute of Standards and Technology published "[The NIST Definition of Cloud Computing](http://csrc.nist.gov/publications/nistpubs/800-145/SP800-145.pdf)" (PDF) that became the standard definitions of private, public, and hybrid cloud terms and as-a-service models. - - Over time, though, the definitions have changed. IaaS has become much more complex, supporting things like OpenStack, [Swift](https://wiki.openstack.org/wiki/Swift) for object storage and [Neutron networking](https://wiki.openstack.org/wiki/Neutron). PaaS seems to be fading out because there's little that separates it from traditional middleware application development. And SaaS, which was just apps accessed through a browser, is losing steam because with so many cloud APIs for apps and services, you can access them through anything, not just a browser. - -8. **Analytics becomes more important** - - Analytics will be a huge growth opportunity for hybrid cloud because the high volume of data used in analytics is well suited to cloud, with its advantages of large scale and elasticity. For some forms of analytics, like highly sensitive data, then the private cloud will still rule. But the private cloud is part of the hybrid cloud, so either way, hybrid cloud wins. - -9. **Security takes on a new urgency** - - As hybrid cloud grows in 2016 and adds all kinds of new technologies, like IoT and containers, this just adds more vulnerable surface areas for data breaches. Add to it the tendency to rush into a new technology and then secure it later, which happens all the time, along with inexperienced technologists who don't think to secure the system – and you have a recipe for disaster. - - When new technologies come out, management discipline almost always lags and we think about securing the technology later. Containers are a good example. You can download all kinds of sample containers from Docker, but do you know where it came from? Docker had to go back and add security verifications after it started letting people download and run containers without any idea what was really in it. - - Mobile technologies like Path and Snapchat had major security problems a few years back as the smartphone market was taking off. It's inevitable that a new technology will be exploited by the bad guys. So security researchers will have their hands full trying to secure these new technologies. Probably after they get deployed. - ------------------------------------------------------------------------------- - -via: http://www.datamation.com/cloud-computing/9-key-trends-in-hybrid-cloud-computing.html - -作者:[Andy Patrizio][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/Andy-Patrizio-90720.html diff --git a/translated/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md b/translated/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md new file mode 100644 index 0000000000..5efec75ec3 --- /dev/null +++ b/translated/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md @@ -0,0 +1,76 @@ +混合云计算的9大关键趋势 +======================================== + +自从几年前云计算的概念受到IT界的关注以来,公有云、私有云和混合云这三种云计算方式都有了可观的演进。其中混合云计算方式是最热门的云计算方式,在接受调查的公司中,有[88%的公司](https://www.greenhousedata.com/blog/hybrid-continues-to-be-most-popular-cloud-option-adoption-accelerating)将混合云计算摆在至关重要的地位。 + +混合云计算的疾速演进意味着一两年前的传统观念已经过时了。为此,我们询问了几个行业分析师,混合云在2016年的走势将会如何,我们得到了几个比较有意思的答案。 + +1. **2016年可能是我们将混合云投入使用的一年。** + + 混合云从本质上来说依赖于私有云,这对企业来说是比较难实现的。事实上,亚马逊,谷歌和微软的公有云已经进行了大量的投资,并且起步也比较早。私有云拖了混合云发展和使用的后腿。 + + 私有云没有得到这么多的投资,这是有私有云的性质决定的。私有云意味着维护和投资你自己的数据中心。许多公有云提供商正在推动企业减少或者消除他们的数据中心。 + + 然而,得益于OpenStack的发展和微软的 Azure Stack ,这两者基本上就是封装在一个盒子里的私有云,我们将会看到私有云慢慢追上公有云的发展步伐。支持混合云的工具、基础设施和架构也变得更加健壮。 + + +2. **容器,微服务和unikernels将会促进混合云的发展。** + + 分析师预言,到2016年底,这些原生云技术会或多或少成为主流的。这些云技术正在快速成熟,将会成为虚拟机的一个替代品,而虚拟机需要更多的资源。 + + 更重要的是,他们既能工作在在线场景,也能工作在离线场景。容器化和编排允许快速的扩大规模,进行公有云和私有云之间的服务迁移,使你能够更容易移动你的服务。 + +3. **数据和相关性占据核心舞台。** + + 所有的云计算方式都处在发展模式。这使得云计算变成了一个技术类的故事。咨询公司[Avoa](http://avoa.com/2016/01/01/2016-is-the-year-of-data-and-relevance/)称,随着云趋于成熟,数据和相关性变得越来越重要。起初,云计算和大数据都是关于怎么吸收尽可能多的数据,然后他们担心如何处理这海量的数据。 + + 2016年,相关组织将会继续锤炼如何进行数据收集和使用的相关技术。在必须处理的技术和文化方面仍然有待提高。但是2016年应该重新将关注点放在从各个方面考虑的数据重要性上,发现最相关的信息,而不只是数据的数量。 + +4. **云服务将超越按需工作负载。** + + AWS(Amazon Web Services)起初是提供给程序员或者是开发人员能够快速启动虚拟机,做一些工作然后离线的一个地方。这就是按需使用的本质。要让这些服务持续运行,几乎需要全天候工作。 + + 然而,IT组织正开始作为服务代理,为内部用户提供各种IT服务。可以是内部IT服务,公有云基础架构提供商,平台服务和软件服务。 + + 他们将越来越多的认识到想云管理平台这样的工具的价值。云管理平台可以提供针对不同服务的基于策略的一致性管理。他们也将看到像提高可移植性的容器等技术的价值。然而,云服务代理,在不同云之间快速移动的工作负载进行价格套利或者相关原因的意义上来讲,仍然是行不通的。 + +5. **服务提供商转变成了云服务提供商。** + + 到目前为止,购买云服务成了直销模式。AWS EC2 服务的使用者通常变成了购买者,通过官方认证渠道或者通过影子IT。但是随着云服务越来越全面,提供的服务菜单越来越复杂,越来越多的人转向了经销商,服务提供商转变成了他们IT服务的购买者。 + + 2nd Watch (2nd Watch是为企业提供云管理的 AWS 的首选合作伙伴)最近的一项调查发现,在美国将近85%的IT高管愿意支付一个小的溢价从渠道商那里购买公有云服务,如果购买过程变得不再那么复杂。根据调查,这85%的高管有五分之四的愿意支付额外的15%或者更多。三分之一的受访高管表示,他们可以使用帮助来购买、使用和管理公有云服务。 + +6. **物联网和云对于2016年的意义好比移动和云对2012年的意义。** + + 物联网获得了广泛的关注,更重要的是,物联网已经从测试场景进行了实际应用。云的分布式特性使得云成为了物联网非常重要的一部分,对于工业物联网,与后端系统交互的机械和重型设备,混合云将会成为最自然的驱动者,连接,数据采集和处理将会发生在混合云环境中,这得益于私有云在安全和隐私方面的好处。 + +7. **NIST 对云的定义开始瓦解。** + + 2011年,美国国家标准与技术研究院发布了“[ NIST 对于云计算的定义](http://csrc.nist.gov/publications/nistpubs/800-145/SP800-145.pdf)”(PDF),这个定义成为了私有云、公有云、混合云和 aas模板的标准定义。 + + 然而随着时间的推移,定义开始改变。Iaas变得更加复杂,开始支持OpenStack,[Swift](https://wiki.openstack.org/wiki/Swift) 对象存储和神经网络这样的项目。Paas似乎正在消退,因为Paas和传统的中间件开发几乎无异。Saas,只是通过浏览器进行访问的应用,也正在失去发展动力,因为许多app和服务提供了许多云接口,你可以通过各种手段调用接口,不仅仅通过浏览器。 + +8. **分析变得更加重要** + + 对于混合云计算来说,分析将会成为一个巨大的增长机遇,云计算具有规模大、灵活性高的优势,使得云计算非常适合需要海量数据的分析工作。对于某些分析方式,比如高度敏感的数据,私有云仍然是主导地位但是私有云也是混合云的一部分。因此,无论如何,混合云计算胜出。 + +9. **安全仍然是一个非常紧迫的问题。** + + 随着混合云计算在2016年的发展,以及对物联网和容器等新技术的引进,这同时也增加了更多的脆弱可攻破的地方从而导致数据泄露。先增加使用新技术的趋势,然后再去考虑安全性,这种问题经常发生,同时还有缺少经验的工程师不去考虑系统的安全问题,总有一天你会尝到灾难的后果的。 + + 当一项新技术出来,管理规范总是落后于安全问题产生后,然后我们才考虑去保护技术。容器就是一个很鲜明的例子。你可以从Docker下周各种示例容器,但是你知道你下载的东西来自哪里么?在人们在对容器内容不知情的情况下下载并运行了容器之后,Docker不得不重新加上安全验证。 + + 像Path和Snapchat这样的移动技术在智能手机市场火起来之后也出现了重大的安全问题。一项新技术被恶意利用无可避免。所以安全研究人员需要通过各种手段来保证新技术的安全性。很有可能在部署之后才会发现安全问题。 + + +------------------------------------------------------------------------------ + +via: http://www.datamation.com/cloud-computing/9-key-trends-in-hybrid-cloud-computing.html + +作者:[Andy Patrizio][a] +译者:[棣琦](https://github.com/sonofelice) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.datamation.com/author/Andy-Patrizio-90720.html From 7b9dacc10a469015373582f48aa7ec899c601d16 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Sun, 8 May 2016 18:24:05 +0800 Subject: [PATCH 1346/1710] Proofread 20151124 Review--5 memory debuggers for Linux coding --- ...ew--5 memory debuggers for Linux coding.md | 150 +++++++++--------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md b/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md index b49ba9e40a..2335222ac8 100644 --- a/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md +++ b/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md @@ -3,11 +3,11 @@ ![](http://images.techhive.com/images/article/2015/11/penguinadmin-2400px-100627186-primary.idge.jpg) Credit: [Moini][1] -作为一个程序员,我知道我总在犯错误——事实是,怎么可能会不犯错的!程序员也是人啊。有的错误能在编码过程中及时发现,而有些却得等到软件测试才显露出来。然而,有一类错误并不能在这两个时期被排除,从而导致软件不能正常运行,甚至是提前中止。 +作为一个程序员,我知道我总在犯错误——事实是,怎么可能会不犯错的!程序员也是人啊。有的错误能在编码过程中及时发现,而有些却得等到软件测试才显露出来。然而,还有一类错误并不能在这两个时期被排除,从而导致软件不能正常运行,甚至是提前中止。 -想到了吗?我说的就是内存相关的错误。手动调试这些错误不仅耗时,而且很难发现并纠正。值得一提的是,这种错误非常地常见,特别是在一些软件里,这些软件是用C/C++这类允许[手动管理内存][2]的语言编写的。 +想到了吗?我说的就是内存相关的错误。手动调试这些错误不仅耗时,而且很难发现并纠正。值得一提的是,这种错误非常常见,特别是在用 C/C++ 这类允许[手动管理内存][2]的语言编写的软件里。 -幸运的是,现行有一些编程工具能够帮你找到软件程序中这些内存相关的错误。在这些工具集中,我评定了五款Linux可用的,流行、免费并且开源的内存调试器:Dmalloc、Electric Fence、 Memcheck、 Memwatch以及Mtrace。日常编码过程中我已经把这五个调试器用了个遍,所以这些点评是建立在我的实际体验之上的。 +幸运的是,现行有一些编程工具能够帮你找到软件程序中这些内存相关的错误。在这些工具集中,我评定了五款Linux可用的,流行、免费并且开源的内存调试器: Dmalloc 、 Electric Fence 、 Memcheck 、 Memwatch 以及 Mtrace 。在日常编码中,我已经把这五个调试器用了个遍,所以这些点评是建立在我的实际体验之上的。 ### [Dmalloc][3] ### @@ -15,11 +15,11 @@ Credit: [Moini][1] **点评版本**:5.5.2 -**Linux支持**:所有种类 +**支持的 Linux**:所有种类 -**许可**:知识共享署名-相同方式共享许可证3.0 +**许可**:知识共享署名-相同方式共享许可证 3.0 -Dmalloc是Gray Watson开发的一款内存调试工具。它实现成库,封装了标准内存管理函数如**malloc(), calloc(), free()**等,使得程序员得以检测出有问题的代码。 +Dmalloc 是 Gray Watson 开发的一款内存调试工具。它实现成库,封装了标准内存管理函数如 *malloc() , calloc() , free()* 等,使程序员得以检测出有问题的代码。 ![cw dmalloc output](http://images.techhive.com/images/article/2015/11/cw_dmalloc-output-100627040-large.idge.png) Dmalloc @@ -28,29 +28,29 @@ Dmalloc #### 更新内容 #### -5.5.2版本是一个[bug修复发行版][6],同时修复了构建和安装的问题。 +5.5.2 版本是一个 [bug 修复发行版][6],同时修复了构建和安装的问题。 #### 有何优点 #### -Dmalloc最大的优点是可以进行任意配置。比如说,你可以配置以支持C++程序和多线程应用。Dmalloc还提供一个有用的功能:运行时可配置,这表示在Dmalloc执行时,可以轻易地使能或者禁能它提供的特性。 +Dmalloc 最大的优点就是高度可配置性。比如说,你可以配置以支持 C++ 程序和多线程应用。 Dmalloc 还提供一个有用的功能:运行时可配置,这表示在 Dmalloc 执行时,可以轻易地使能或者禁能它提供的特性。 -你还可以配合[GNU Project Debugger (GDB)][7]来使用Dmalloc,只需要将dmalloc.gdb文件(位于Dmalloc源码包中的contrib子目录里)的内容添加到你的主目录中的.gdbinit文件里即可。 +你还可以配合 [GNU Project Debugger (GDB)][7]来使用 Dmalloc ,只需要将 *dmalloc.gdb* 文件(位于 Dmalloc 源码包中的 contrib 子目录里)的内容添加到你的主目录中的 *.gdbinit* 文件里即可。 -另外一个优点让我对Dmalloc爱不释手的是它有大量的资料文献。前往官网的[Documentation标签][8],可以获取任何内容,有关于如何下载、安装、运行,怎样使用库,和Dmalloc所提供特性的细节描述,及其输入文件的解释。里面还有一个章节介绍了一般问题的解决方法。 +另外一个让我对 Dmalloc 爱不释手的优点是它有大量的资料文献。前往官网的 [Documentation 标签][8],可以获取所有关于如何下载、安装、运行,怎样使用库,和 Dmalloc 所提供特性的细节描述,及其输入文件的解释。其中还有一个章节介绍了一般问题的解决方法。 #### 注意事项 #### -跟Mtrace一样,Dmalloc需要程序员改动他们的源代码。比如说你可以(必须的)添加头文件**dmalloc.h**,工具就能汇报产生问题的调用的文件或行号。这个功能非常有用,因为它节省了调试的时间。 +跟 Mtrace 一样, Dmalloc 需要程序员改动他们的源代码。比如说你可以(必须的)添加头文件 *dmalloc.h* ,工具就能汇报产生问题的调用的文件或行号。这个功能非常有用,因为它节省了调试的时间。 -除此之外,还需要在编译你的程序时,把Dmalloc库(编译源码包时产生的)链接进去。 +除此之外,还需要在编译你的程序时,把 Dmalloc 库(编译源码包时产生的)链接进去。 -然而,还有点更麻烦的事,需要设置一个环境变量,命名为**DMALLOC_OPTION**,以供工具在运行时配置内存调试特性,以及输出文件的路径。可以手动为该环境变量分配一个值,不过初学者可能会觉得这个过程有点困难,因为你想使能的Dmalloc特性是存在于这个值之中的——表示为各自的十六进制值的累加。[这里][9]有详细介绍。 +然而,还有点更麻烦的事,需要设置一个环境变量,命名为 *DMALLOC_OPTION* ,以供工具在运行时配置内存调试特性,以及输出文件的路径。可以手动为该环境变量分配一个值,不过初学者可能会觉得这个过程有点困难,因为该值的一部分用来表示要启用的 Dmalloc 特性——表示为各自的十六进制值的累加。[这里][9]有详细介绍。 -一个比较简单方法设置这个环境变量是使用[Dmalloc实用指令][10],这是专为这个目的设计的方法。 +一个比较简单方法设置这个环境变量是使用 [Dmalloc 实用指令][10],这是专为这个目的设计的方法。 #### 总结 #### -Dmalloc真正的优势在于它的可配置选项。而且高度可移植,曾经成功移植到多种操作系统如AIX、BSD/OS、DG/UX、Free/Net/OpenBSD、GNU/Hurd、HPUX、Irix、Linux、MS-DOG、NeXT、OSF、SCO、Solaris、SunOS、Ultrix、Unixware甚至Unicos(运行在Cray T3E主机上)。虽然Dmalloc有很多东西需要学习,但是它所提供的特性值得为之付出。 +Dmalloc 真正的优势在于它的可配置选项。而且高度可移植,曾经成功移植到多种操作系统如 AIX 、 BSD/OS 、 DG/UX 、 Free/Net/OpenBSD 、 GNU/Hurd 、 HPUX 、 Irix 、 Linux 、 MS-DOG 、 NeXT 、 OSF 、 SCO 、 Solaris 、 SunOS 、 Ultrix 、 Unixware 甚至 Unicos(运行在 Cray T3E 主机上)。虽然使用 Dmalloc 需要学习许多知识,但是它所提供的特性值得为之付出。 ### [Electric Fence][15] ### @@ -58,95 +58,95 @@ Dmalloc真正的优势在于它的可配置选项。而且高度可移植,曾 **点评版本**:2.2.3 -**Linux支持**:所有种类 +**支持的 Linux**:所有种类 **许可**:GNU 通用公共许可证 (第二版) -Electric Fence是Bruce Perens开发的一款内存调试工具,它以库的形式实现,你的程序需要链接它。Electric Fence能检测出[栈][11]内存溢出和访问已经释放的内存。 +Electric Fence 是 Bruce Perens 开发的一款内存调试工具,它以库的形式实现,你的程序需要链接它。Electric Fence 能检测出[栈][11]内存溢出和访问已经释放的内存。 ![cw electric fence output](http://images.techhive.com/images/article/2015/11/cw_electric-fence-output-100627041-large.idge.png) Electric Fence -顾名思义,Electric Fence在每个申请的缓存边界建立了fence(防护),任何非法内存访问都会导致[段错误][12]。这个调试工具同时支持C和C++编程。 +顾名思义, Electric Fence 在每个申请的缓存边界建立了 virtual fence(虚拟围栏),任何非法内存访问都会导致[段错误][12]。这个调试工具同时支持 C 和 C++ 程序。 #### 更新内容 #### -2.2.3版本修复了工具的构建系统,使得-fno-builtin-malloc选项能真正传给[GNU Compiler Collection (GCC)][13]。 +2.2.3 版本修复了工具的构建系统,使得 `-fno-builtin-malloc` 选项能真正传给 [GNU Compiler Collection (GCC)][13]。 #### 有何优点 #### -我喜欢Electric Fence首要的一点是(Memwatch、Dmalloc和Mtrace所不具有的),这个调试工具不需要你的源码做任何的改动,你只需要在编译的时候把它的库链接进你的程序即可。 +我喜欢 Electric Fence 首要的一点是它(不同于 Memwatch 、 Dmalloc 和 Mtrace ,)不需要你的源码做任何的改动,你只需要在编译的时候把它的库链接进你的程序即可。 -其次,Electric Fence实现一个方法,确认导致越界访问(a bounds violation)的第一个指令就是引起段错误的原因。这比在后面再发现问题要好多了。 +其次, Electric Fence 的实现保证了导致越界访问( a bounds violation )的第一个指令就是引起段错误的原因。这比在后面再发现问题要好多了。 -不管是否有检测出错误,Electric Fence经常会在输出产生版权信息。这一点非常有用,由此可以确定你所运行的程序已经启用了Electric Fence。 +不管是否有检测出错误, Electric Fence 都会在输出产生版权信息。这一点非常有用,由此可以确定你所运行的程序已经启用了 Electric Fence 。 #### 注意事项 #### -另一方面,我对Electric Fence真正念念不忘的是它检测内存泄漏的能力。内存泄漏是C/C++软件最常见也是最难隐秘的问题之一。不过,Electric Fence不能检测出堆内存溢出,而且也不是线程安全的。 +另一方面,我对 Electric Fence 真正念念不忘的是它检测内存泄漏的能力。内存泄漏是 C/C++ 软件最常见也是最难隐秘的问题之一。不过, Electric Fence 不能检测出堆内存溢出,而且也不是线程安全的。 -基于Electric Fence会在用户分配内存区的前后分配禁止访问的虚拟内存页,如果你过多的进行动态内存分配,将会导致你的程序消耗大量的额外内存。 +由于 Electric Fence 会在用户分配内存区的前后分配禁止访问的虚拟内存页,如果你过多的进行动态内存分配,将会导致你的程序消耗大量的额外内存。 -Electric Fence还有一个局限是不能明确指出错误代码所在的行号。它所能做只是在监测到内存相关错误时产生段错误。想要定位行号,需要借助[The Gnu Project Debugger (GDB)][14]这样的调试工具来调试你启用了Electric Fence的程序。 +Electric Fence 还有一个局限是不能明确指出错误代码所在的行号。它所能做只是在监测到内存相关错误时产生段错误。想要定位行号,需要借助 [The Gnu Project Debugger ( GDB )][14]这样的调试工具来调试启用了 Electric Fence 的程序。 -最后一点,Electric Fence虽然能检测出大部分的缓冲区溢出,有一个例外是,如果所申请的缓冲区大小不是系统字长的倍数,这时候溢出(即使只有几个字节)就不能被检测出来。 +最后一点,尽管 Electric Fence 能检测出大部分的缓冲区溢出,有一个例外是,如果所申请的缓冲区大小不是系统字长的倍数,这时候溢出(即使只有几个字节)就不能被检测出来。 #### 总结 #### -尽管有那么多的局限,但是Electric Fence的优点却在于它的易用性。程序只要链接工具一次,Electric Fence就可以在监测出内存相关问题的时候报警。不过,如同前面所说,Electric Fence需要配合像GDB这样的源码调试器使用。 +尽管局限性较大, Electric Fence 的易用性仍然是加分项。只要链接一次程序, Electric Fence 就可以在监测出内存相关问题的时候报警。不过,如同前面所说, Electric Fence 需要配合像 GDB 这样的源码调试器使用。 ### [Memcheck][16] ### -**开发者**:[Valgrind开发团队][17] +**开发者**:[Valgrind 开发团队][17] **点评版本**:3.10.1 -**Linux支持**:所有种类 +**支持的 Linux**:所有种类 **许可**:通用公共许可证 -[Valgrind][18]是一个提供好几款调试和Linux程序性能分析工具的套件。虽然Valgrind和编写语言各不相同(有Java、Perl、Python、Assembly code、ortran、Ada等等)的程序配合工作,但是它所提供的工具大部分都意在支持C/C++所编写的程序。 +[Valgrind][18] 是一个提供好几款调试和 Linux 程序性能分析工具的套件。虽然 Valgrind 能和编写语言各不相同(有 Java 、 Perl 、 Python 、 Assembly code 、 ortran 、 Ada等等)的程序配合工作,但是它所提供的工具主要针对用 C/C++ 所编写的程序。 -Memcheck作为内存错误检测器,是一款最受欢迎的Memcheck工具。它能够检测出诸多问题诸如内存泄漏、无效的内存访问、未定义变量的使用以及栈内存分配和释放相关的问题等。 +Memcheck ,一款内存错误检测器,是其中最受欢迎的工具。它能够检测出如内存泄漏、无效的内存访问、未定义变量的使用以及栈内存分配和释放相关的问题等诸多问题。 #### 更新内容 #### -工具套件(3.10.1)的[发行版][19]是一个副版本,主要修复了3.10.0版本发现的bug。除此之外,从主版本backport一些包,修复了缺失的AArch64 ARMv8指令和系统调用。 +工具套件( 3.10.1 )的[发行版][19]是一个副版本,主要修复了 3.10.0 版本发现的 bug 。除此之外,从主版本向后移植(标音: backport )一些包,修复了缺失的 AArch64 ARMv8 指令和系统调用。 #### 有何优点 #### -同其它所有Valgrind工具一样,Memcheck也是基本的命令行实用程序。它的操作非常简单:通常我们会使用诸如prog arg1 arg2格式的命令来运行程序,而Memcheck只要求你多加几个值即可,就像valgrind --leak-check=full prog arg1 arg2。 +同其它所有 Valgrind 工具一样, Memcheck 也是命令行实用程序。它的操作非常简单:通常我们会使用诸如 prog arg1 arg2 格式的命令来运行程序,而 Memcheck 只要求你多加几个值即可,如 valgrind --leak-check=full prog arg1 arg2 。 ![cw memcheck output](http://images.techhive.com/images/article/2015/11/cw_memcheck-output-100627037-large.idge.png) Memcheck -(注意:因为Memcheck是Valgrind的默认工具所以无需提及Memcheck。但是,需要在编译程序之初带上-g参数选项,这一步会添加调试信息,使得Memcheck的错误信息会包含正确的行号。) +(注意:因为 Memcheck 是 Valgrind 的默认工具所以无需提及 Memcheck。但是,需要在编译程序之初带上 -g 参数选项,这一步会添加调试信息,使得 Memcheck 的错误信息会包含正确的行号。) -我真正倾心于Memcheck的是它提供了很多命令行选项(如上所述的--leak-check选项),如此不仅能控制工具运转还可以控制它的输出。 +我真正倾心于 Memcheck 的是它提供了很多命令行选项(如上所述的 *--leak-check* 选项),如此不仅能控制工具运转还可以控制它的输出。 -举个例子,可以开启--track-origins选项,以查看程序源码中未初始化的数据。可以开启--show-mismatched-frees选项让Memcheck匹配内存的分配和释放技术。对于C语言所写的代码,Memcheck会确保只能使用free()函数来释放内存,malloc()函数来申请内存。而对C++所写的源码,Memcheck会检查是否使用了delete或delete[]操作符来释放内存,以及new或者new[]来申请内存。 +举个例子,可以开启 *--track-origins* 选项,以查看程序源码中未初始化的数据;可以开启 *--show-mismatched-frees* 选项让 Memcheck 匹配内存的分配和释放技术。对于 C 语言所写的代码, Memcheck 会确保只能使用 *free()* 函数来释放内存, *malloc()* 函数来申请内存。而对 C++ 所写的源码, Memcheck 会检查是否使用了 *delete* 或 *delete[]* 操作符来释放内存,以及 *new* 或者*new[]* 来申请内存。 -Memcheck最好的特点,尤其是对于初学者来说的,是它会给用户建议使用那个命令行选项能让输出更加有意义。比如说,如果你不使用基本的--leak-check选项,Memcheck会在输出时建议“使用--leak-check=full重新运行,查看更多泄漏内存细节”。如果程序有未初始化的变量,Memcheck会产生信息“使用--track-origins=yes,查看未初始化变量的定位”。 +Memcheck 最好的特点,尤其是对于初学者来说,是它会给用户建议使用哪个命令行选项能让输出更加有意义。比如说,如果你不使用基本的 *--leak-check* 选项, Memcheck 会在输出时建议“使用 --leak-check=full 重新运行以查看更多泄漏内存细节”。如果程序有未初始化的变量, Memcheck 会产生信息“使用 --track-origins=yes 以查看未初始化变量的定位”。 -Memcheck另外一个有用的特性是它可以[创建抑制文件(suppression files)][20],由此可以忽略特定不能修正的错误,这样Memcheck运行时就不会每次都报警了。值得一提的是,Memcheck会去读取默认抑制文件来忽略系统库(比如C库)中的报错,这些错误在系统创建之前就已经存在了。可以选择创建一个新的抑制文件,或是编辑现有的(通常是/usr/lib/valgrind/default.supp)。 +Memcheck 另外一个有用的特性是它可以[创建抑制文件( suppression files )][20],由此可以忽略特定不能修正的错误,这样 Memcheck 运行时就不会每次都报警了。值得一提的是, Memcheck 会去读取默认抑制文件来忽略系统库(比如 C 库)中的报错,这些错误在系统创建之前就已经存在了。可以选择创建一个新的抑制文件,或是编辑现有的文件(通常是*/usr/lib/valgrind/default.supp*)。 -Memcheck还有高级功能,比如可以使用[定制内存分配器][22]来[检测内存错误][21]。除此之外,Memcheck提供[监控命令][23],当用到Valgrind的内置gdbserver,以及[客户端请求][24]机制(不仅能把程序的行为告知Memcheck,还可以进行查询)时可以使用。 +Memcheck 还有高级功能,比如可以使用[定制内存分配器][22]来[检测内存错误][21]。除此之外, Memcheck 提供[监控命令][23],当用到 Valgrind 内置的 gdbserver ,以及[客户端请求][24]机制(不仅能把程序的行为告知 Memcheck ,还可以进行查询)时可以使用。 #### 注意事项 #### -毫无疑问,Memcheck可以节省很多调试时间以及省去很多麻烦。但是它使用了很多内存,导致程序执行变慢([由资料可知][25],大概花上20至30倍时间)。 +毫无疑问, Memcheck 可以节省很多调试时间以及省去很多麻烦。但是它使用了很多内存,导致程序执行变慢([由文档可知][25],大概花上 20 至 30 倍时间)。 -除此之外,Memcheck还有其它局限。根据用户评论,Memcheck明显不是[线程安全][26]的;它不能检测出 [静态缓冲区溢出][27];还有就是,一些Linux程序如[GNU Emacs][28],目前还不能使用Memcheck。 +除此之外, Memcheck 还有其它局限。根据用户评论, Memcheck 明显不是[线程安全][26]的;它不能检测出 [静态缓冲区溢出][27];还有就是,一些 Linux 程序如 [GNU Emacs][28] 目前还不能使用 Memcheck 。 -如果有兴趣,可以在[这里][29]查看Valgrind详尽的局限性说明。 +如果有兴趣,可以在[这里][29]查看 Valgrind 详尽的局限性说明。 #### 总结 #### -无论是对于初学者还是那些需要高级特性的人来说,Memcheck都是一款便捷的内存调试工具。如果你仅需要基本调试和错误核查,Memcheck会非常容易上手。而当你想要使用像抑制文件或者监控指令这样的特性,就需要花一些功夫学习了。 +无论是对于初学者还是那些需要高级特性的人来说, Memcheck 都是一款便捷的内存调试工具。如果你仅需要基本调试和错误核查, Memcheck 会非常容易上手。而当你想要使用像抑制文件或者监控指令这样的特性,就需要花一些功夫学习了。 -虽然罗列了大量的局限性,但是Valgrind(包括Memcheck)在它的网站上声称全球有[成千上万程序员][30]使用了此工具。开发团队称收到来自超过30个国家的用户反馈,而这些用户的工程代码有的高达2.5千万行。 +虽然罗列了大量的局限性,但是 Valgrind(包括 Memcheck )在它的网站上声称全球有[成千上万程序员][30]使用了此工具。开发团队称收到来自超过 30 个国家的用户反馈,而这些用户的工程代码有的高达 2.5 千万行。 ### [Memwatch][31] ### @@ -154,40 +154,40 @@ Memcheck还有高级功能,比如可以使用[定制内存分配器][22]来[ **点评版本**:2.71 -**Linux支持**:所有种类 +**支持的 Linux**:所有种类 **许可**:GNU通用公共许可证 - -Memwatch是由Johan Lindh开发的内存调试工具,虽然它主要扮演内存泄漏检测器的角色,但是它也具有检测其它如[重复释放跟踪和内存错误释放][32]、缓冲区溢出和下溢、[野指针][33]写入等等内存相关问题的能力(根据网页介绍所知)。 -Memwatch支持用C语言所编写的程序。可以在C++程序中使用它,但是这种做法并不提倡(由Memwatch源码包随附的Q&A文件中可知)。 +Memwatch 是由 Johan Lindh 开发的内存调试工具,虽然它主要扮演内存泄漏检测器的角色,但是(根据网页介绍)它也具有检测其它如[重复释放跟踪和内存错误释放][32]、缓冲区溢出和下溢、[野指针][33]写入等等内存相关问题的能力。 + +Memwatch 支持用 C 语言所编写的程序。也可以在 C++ 程序中使用它,但是这种做法并不提倡(由 Memwatch 源码包随附的 Q&A 文件中可知)。 #### 更新内容 #### -这个版本添加了ULONG_LONG_MAX以区分32位和64位程序。 +这个版本添加了 *ULONG_LONG_MAX* 以区分 32 位和 64 位程序。 #### 有何优点 #### -跟Dmalloc一样,Memwatch也有优秀的文献资料。参考USING文件,可以学习如何使用Memwatch,可以了解Memwatch是如何初始化、如何清理以及如何进行I/O操作的,等等不一而足。还有一个FAQ文件,旨在帮助用户解决使用过程遇到的一般问题。最后还有一个test.c文件提供工作案例参考。 +跟 Dmalloc 一样, Memwatch 也有优秀的文档资料。参考 USING 文件,可以学习如何使用 Memwatch ,可以了解 Memwatch 是如何初始化、如何清理以及如何进行 I/O 操作,等等。还有一个 FAQ 文件,旨在帮助用户解决使用过程遇到的一般问题。最后还有一个 *test.c* 文件提供工作案例参考。 ![cw memwatch output](http://images.techhive.com/images/article/2015/11/cw_memwatch_output-100627038-large.idge.png) Memwatch -不同于Mtrace,Memwatch的输出产生的日志文件(通常是memwatch.log)是人类可阅读格式。而且,Memwatch每次运行时总会拼接内存调试输出到此文件末尾,而不是进行覆盖(译改)。如此便可在需要之时,轻松查看之前的输出信息。 +不同于 Mtrace , Memwatch 的输出产生的日志文件(通常是 *memwatch.log* )是人类可阅读格式。而且, Memwatch 每次运行时总会拼接内存调试输出到文件末尾。如此便可在需要之时,轻松查看之前的输出信息。 -同样值得一提的是当你执行了启用Memwatch的程序,Memwatch会在[标准输出][34]中产生一个单行输出,告知发现了错误,然后你可以在日志文件中查看输出细节。如果没有产生错误信息,就可以确保日志文件不会写入任何错误,多次运行的话能实际节省时间。 +同样值得一提的是当你执行了启用 Memwatch 的程序, Memwatch 会在[标准输出][34]中产生一个单行输出,告知发现了错误,然后你可以在日志文件中查看输出细节。如果没有产生错误信息,就可以确保日志文件不会写入任何错误,多次运行的话确实能节省时间。 -另一个我喜欢的优点是Memwatch同样在源码中提供一个方法,你可以据此获取Memwatch的输出信息,然后任由你进行处理(参考Memwatch源码中的mwSetOutFunc()函数获取更多有关的信息)。 +另一个我喜欢的优点是 Memwatch 还提供了在源码中获取其输出信息的方式,你可以获取信息,然后任由你进行处理(参考 Memwatch 源码中的 *mwSetOutFunc()* 函数获取更多有关的信息)。 #### 注意事项 #### -跟Mtrace和Dmalloc一样,Memwatch也需要你往你的源文件里增加代码:你需要把memwatch.h这个头文件包含进你的代码。而且,编译程序的时候,你需要连同memwatch.c一块编译;或者你可以把已经编译好的目标模块包含起来,然后在命令行定义MEMWATCH和MW_STDIO变量。不用说,想要在输出中定位行号,-g编译器选项也少不了。 +跟 Mtrace 和 Dmalloc 一样, Memwatch 也需要你往你的源文件里增加代码:你需要把 *memwatch.h* 这个头文件包含进你的代码。而且,编译程序的时候,你需要连同 *memwatch.c* 一块编译;或者你可以把已经编译好的目标模块包含起来,然后在命令行定义 *MEMWATCH* 和 *MW_STDIO* 变量。不用说,想要在输出中定位行号, -g 编译器选项也少不了。 -还有一些没有具备的特性。比如Memwatch不能检测出往一块已经被释放的内存写入操作,或是在分配的内存块之外的读取操作。而且,Memwatch也不是线程安全的。还有一点,正如我在开始时指出,在C++程序上运行Memwatch的结果是不能预料的。 +此外, Memwatch 缺少一些特性。比如 Memwatch 不能检测出往一块已经被释放的内存写入操作,或是在分配的内存块之外的读取操作。而且, Memwatch 也不是线程安全的。还有一点,正如我在开始时指出,在 C++ 程序上运行 Memwatch 的结果是不能预料的。 #### 总结 #### -Memcheck可以检测很多内存相关的问题,在处理C程序时是非常便捷的调试工具。因为源码小巧,所以可以从中了解Memcheck如何运转,有需要的话可以调试它,甚至可以根据自身需求扩展升级它的功能。 +Memcheck 可以检测很多内存相关的问题,在处理 C 程序时是非常便捷的调试工具。因为源码小巧,所以可以从中了解 Memcheck 如何运转,有需要的话可以调试它,甚至可以根据自身需求扩展升级它的功能。 ### [Mtrace][35] ### @@ -195,60 +195,60 @@ Memcheck可以检测很多内存相关的问题,在处理C程序时是非常 **点评版本**: 2.21 -**Linux支持**:所有种类 +**支持的 Linux**:所有种类 -**许可**:GNU通用公共许可证 +**许可**:GNU 通用公共许可证 -Mtrace是[GNU C库][36]中的一款内存调试工具,同时支持Linux C和C++程序,检测由malloc()和free()函数的不对等调用所引起的内存泄漏问题。 +Mtrace 是 [GNU C 库][36]中的一款内存调试工具,同时支持 Linux 上的 C 和 C++ 程序,检测由 *malloc()* 和 *free()* 函数的不对等调用所引起的内存泄漏问题。 ![cw mtrace output](http://images.techhive.com/images/article/2015/11/cw_mtrace-output-100627039-large.idge.png) Mtrace -Mtrace实现为对mtrace()函数的调用,跟踪程序中所有malloc/free调用,在用户指定的文件中记录相关信息。文件以一种机器可读的格式记录数据,所以有一个Perl脚本(同样命名为mtrace)用来把文件转换并展示为人类可读格式。 +Mtrace 实现为对 *mtrace()* 函数的调用,跟踪程序中所有 malloc/free 调用,并在用户指定的文件中记录相关信息。文件以一种机器可读的格式记录数据,所以有一个 Perl 脚本(同样命名为 mtrace )用来把文件转换并展示为人类可读格式。 #### 更新内容 #### -[Mtrace源码][37]和[Perl文件][38]同GNU C库(2.21版本)一起释出,除了更新版权日期,其它别无改动。 +[Mtrace 源码][37]和 [Perl 文件][38]同 GNU C 库( 2.21 版本)一起释出,除了更新版权日期,其它别无改动。 #### 有何优点 #### -Mtrace最优秀的特点是非常简单易学。你只需要了解在你的源码中如何以及何处添加mtrace()及其对立的muntrace()函数,还有如何使用Mtrace的Perl脚本。后者非常简单,只需要运行指令mtrace (例子见开头截图最后一条指令)。 +Mtrace 最优秀的特点是非常简单易学。你只需要了解在你的源码中如何以及何处添加mtrace()及其对立的muntrace()函数,还有如何使用Mtrace的Perl脚本。后者非常简单,只需要运行指令 *mtrace *(例子见开头截图最后一条指令)。 -Mtrace另外一个优点是它的可收缩性,体现在,不仅可以使用它来调试完整的程序,还可以使用它来检测程序中独立模块的内存泄漏。只需在每个模块里调用mtrace()和muntrace()即可。 +Mtrace 另外一个优点是它的可收缩性,体现在,不仅可以使用它来调试完整的程序,还可以使用它来检测程序中独立模块的内存泄漏。只需在每个模块里调用 *mtrace()* 和 *muntrace()* 即可。 -最后一点,因为Mtrace会在mtace()(在源码中添加的函数)执行时被触发,因此可以很灵活地[使用信号][39]动态地(在程序执行周期内)使能Mtrace。 +最后一点,因为 Mtrace 会在 *mtace()*(在源码中添加的函数)执行时被触发,因此可以很灵活地[使用信号][39]动态地(在程序执行周期内)使能 Mtrace 。 #### 注意事项 #### -因为mtrace()和mauntrace()函数(在mcheck.h文件中声明,所以必须在源码中包含此头文件)的调用是Mtrace运行(mauntrace()函数并非[总是必要][40])的根本,因此Mtrace要求程序员至少改动源码一次。 +因为 *mtrace()* 和 *mauntrace()* 函数(声明在 *mcheck.h* 文件中,所以必须在源码中包含此头文件)的调用是 Mtrace 运行( *mauntrace()* 函数并非[总是必要][40])的根本,因此 Mtrace 要求程序员至少改动源码一次。 -了解需要在编译程序的时候带上-g选项([GCC][41]和[G++][42]编译器均由提供),才能使调试工具在输出展示正确的行号。除此之外,有些程序(取决于源码体积有多大)可能会花很长时间进行编译。最后,带-g选项编译会增加了可执行文件的内存(因为提供了额外的调试信息),因此记得程序需要在测试结束,不带-g选项重新进行编译。 +需要注意的是,在编译程序的时候带上 -g 选项( [GCC][41] 和 [G++][42] 编译器均有提供),才能使调试工具在输出展示正确的行号。除此之外,有些程序(取决于源码体积有多大)可能会花很长时间进行编译。最后,带 -g 选项编译会增加了可执行文件的内存(因为提供了额外的调试信息),因此记得程序需要在测试结束后,不带 -g 选项重新进行编译。 -使用Mtrace,你需要掌握Linux环境变量的基本知识,因为在程序执行之前,需要把用户指定文件(mtrace()函数用以记载全部信息)的路径设置为环境变量MALLOC_TRACE的值。 +使用 Mtrace ,你需要掌握 Linux 环境变量的基本知识,因为在程序执行之前,需要把用户指定的文件( *mtrace()* 函数将会记录全部信息到其中)路径设置为环境变量 *MALLOC_TRACE* 的值。 -Mtrace在检测内存泄漏和尝试释放未经过分配的内存方面存在局限。它不能检测其它内存相关问题如非法内存访问、使用未初始化内存。而且,[有人抱怨][43]Mtrace不是[线程安全][44]的。 +Mtrace 在检测内存泄漏和尝试释放未经过分配的内存方面存在局限。它不能检测其它内存相关问题如非法内存访问、使用未初始化内存。而且,[有人抱怨][43] Mtrace 不是[线程安全][44]的。 ### 总结 ### 不言自明,我在此讨论的每款内存调试器都有其优点和局限。所以,哪一款适合你取决于你所需要的特性,虽然有时候容易安装和使用也是一个决定因素。 -要想捕获软件程序中的内存泄漏,Mtrace最适合不过了。它还可以节省时间。由于Linux系统已经预装了此工具,对于不能联网或者不可以下载第三方调试调试工具的情况,Mtrace也是极有助益的。 +要想捕获软件程序中的内存泄漏, Mtrace 最适合不过了。它还可以节省时间。由于 Linux 系统已经预装了此工具,对于不能联网或者不可以下载第三方调试调试工具的情况, Mtrace 也是极有助益的。 -另一方面,相比Mtrace,,Dmalloc不仅能检测更多错误类型,还你呢个提供更多特性,比如运行时可配置、GDB集成。而且,Dmalloc不像这里所说的其它工具,它是线程安全的。更不用说它的详细资料了,这让Dmalloc成为初学者的理想选择。 +另一方面,相比 Mtrace , Dmalloc 不仅能检测更多错误类型,还提供更多特性,比如运行时可配置、 GDB 集成。而且, Dmalloc 不像这里所说的其它工具,它是线程安全的。更不用说它的详细资料了,这让 Dmalloc 成为初学者的理想选择。 -虽然Memwatch的资料比Dmalloc的更加丰富,而且还能检测更多的错误种类,但是你只能在C语言写就的软件程序上使用它。一个让Memwatch脱颖而出的特性是它允许在你的程序源码中处理它的输出,这对于想要定制输出格式来说是非常有用的。 +虽然 Memwatch 的资料比 Dmalloc 的更加丰富,而且还能检测更多的错误种类,但是你只能在 C 语言写就的程序中使用它。一个让 Memwatch 脱颖而出的特性是它允许在你的程序源码中处理它的输出,这对于想要定制输出格式来说是非常有用的。 -如果改动程序源码非你所愿,那么使用Electric Fence吧。不过,请记住,Electric Fence只能检测两种错误类型,而此二者均非内存泄漏。还有就是,需要了解GDB基础以最大程序发挥这款内存调试工具的作用。 +如果改动程序源码非你所愿,那么使用 Electric Fence 吧。不过,请记住, Electric Fence 只能检测两种错误类型,而此二者均非内存泄漏。还有就是,需要了解 GDB 基础以最大化发挥这款内存调试工具的作用。 -Memcheck可能是这当中综合性最好的了。相比这里所说其它工具,它检测更多的错误类型,提供更多的特性,而且不需要你的源码做任何改动。但请注意,基本功能并不难上手,但是想要使用它的高级特性,就必须学习相关的专业知识了。 +Memcheck 可能是其中综合性最好的了。相比这里提及的其它工具,它能检测更多的错误类型,提供更多的特性,而且不需要你的源码做任何改动。但请注意,基本功能并不难上手,但是想要使用它的高级特性,就必须学习相关的专业知识了。 -------------------------------------------------------------------------------- via: http://www.computerworld.com/article/3003957/linux/review-5-memory-debuggers-for-linux-coding.html 作者:[Himanshu Arora][a] -译者:[译者ID](https://github.com/soooogreen) -校对:[校对者ID](https://github.com/校对者ID) +译者:[soooogreen](https://github.com/soooogreen) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9bd6bcca6268335935b009839ec50bb7b23ad0d8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 8 May 2016 21:36:04 +0800 Subject: [PATCH 1347/1710] PUB:20151019 Gaming On Linux--All You Need To Know @name1e5s @PurlingNayuki --- .../20151019 Gaming On Linux--All You Need To Know.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/talk => published}/20151019 Gaming On Linux--All You Need To Know.md (99%) diff --git a/translated/talk/20151019 Gaming On Linux--All You Need To Know.md b/published/20151019 Gaming On Linux--All You Need To Know.md similarity index 99% rename from translated/talk/20151019 Gaming On Linux--All You Need To Know.md rename to published/20151019 Gaming On Linux--All You Need To Know.md index b58f822c72..a7e3e9b91b 100644 --- a/translated/talk/20151019 Gaming On Linux--All You Need To Know.md +++ b/published/20151019 Gaming On Linux--All You Need To Know.md @@ -2,7 +2,7 @@ Linux上的游戏:所有你需要知道的 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Gaming-on-Linux.jpeg) -** 我能在 Linux 上玩游戏吗 ?** +**我能在 Linux 上玩游戏吗 ?** 这是打算[投奔 Linux 阵营][1]的人最经常问的问题之一。毕竟,在 Linux 上面玩游戏经常被认为有点难以实现。事实上,一些人甚至考虑他们能不能在 Linux 上看电影或者听音乐。考虑到这些,关于 Linux 的平台的游戏的问题是很现实的。 From 42b2b4903f45a8ff25317539cd9e76c706e6374a Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 8 May 2016 22:17:09 +0800 Subject: [PATCH 1348/1710] [translated]20160301 The Evolving Markrt for ... --- ...ommercial Software Built On Open Source.md | 42 ------------------- ...ommercial Software Built On Open Source.md | 36 ++++++++++++++++ 2 files changed, 36 insertions(+), 42 deletions(-) delete mode 100644 sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md create mode 100644 translated/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md diff --git a/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md b/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md deleted file mode 100644 index 5cd6a2f1c1..0000000000 --- a/sources/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md +++ /dev/null @@ -1,42 +0,0 @@ -alim0x translating - -The Evolving Market for Commercial Software Built On Open Source -===================================================================== - -![](https://www.linux.com/images/stories/41373/Structure-event-photo.jpg) ->Attendees listen to a presentation during Structure at the UCSF Mission Bay Conference Center, where Structure Data 2016 will take place. Image credit: Structure Events. - -It's really hard to understate the impact of open source projects on the enterprise software market these days; open source integration became the norm so quickly we could be forgiven for missing the turning point. - -Hadoop, for example, changed more than just the world of data analysis. It gave rise to a new generation of data companies that created their own software around open source projects, tweaking and supporting that code as needed, much like how Red Hat embraced Linux in the 1990s and early 2000s. And this software is increasingly delivered over public clouds, rather than run on the buyer's own servers, enabling an amazing degree of operational flexibility but raising all sorts of new questions about licensing, support, and pricing. - -We've been following this closely over the years when putting together the lineup for our Structure Data conference, and Structure Data 2016 is no exception. The CEOs of three of the most important companies in big data operating around Hadoop -- Hortonworks, Cloudera and MapR -- will share the stage to discuss how they sell enterprise software and services around open source projects, generating cash while giving back to that community project at the same time. - -There was a time when making money on enterprise software was easier. Once purchased by a customer, a mega-package of software from an enterprise vendor turned into its own cash register, generating something close to lifetime income from maintenance contracts and periodic upgrades to software that became harder and harder to displace as it became the heart of a customer’s business. Customers grumbled about lock-in, but they didn't really have much of a choice if they wanted to make their workforce more productive. - -That is no longer the case. While an awful lot of companies are still stuck running immense software packages critical to their infrastructure, new projects are being deployed on cloud servers using open source technologies. This makes it much easier to upgrade one's capabilities without having to rip out a huge software package and reinstall something else, and it also allows companies to pay as they go, rather than paying for a bunch of features they'll never use. - -And there are a lot of customers who want to take advantage of open source projects without building and supporting a team of engineers to tweak one of those projects for their own unique needs. Those customers are willing to pay for software packages whose value is based on the delta between the open source projects and the proprietary features laid on top of that project. - -This is especially true for infrastructure-related software. Sure, your customers could install their own tweaks to a project like Hadoop or Spark or Node.js, but there's money to be made helping those customers out with a customizable package that lets them implement some of today's vital open source technologies without having to do all of the heavy lifting themselves. Just look at Structure Data 2016 presenters such as Confluent (Kafka), Databricks (Spark), and the Cloudera-Hortonworks-MapR (Hadoop) trio. - -There's certainly something to be said for having a vendor to yell at when things go wrong. If your engineers botch the implementation of an open source project, you've only yourself to blame. But If you contract with a company that is willing to guarantee certain performance and uptime metrics inside of a service-level agreement, you're willing to pay for support, guidance, and a chance to yell at somebody outside of your organization when inevitable problems crop up. - -The evolving market for commercial software on top of open source projects is something we've been tracking at Structure Data for years, and we urge you to join us in San Francisco March 9 and 10 if this is a topic near and dear to your heart. - - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/enterprise/cloud-computing/889564-the-evolving-market-for-commercial-software-built-on-open-source- - -作者:[Tom Krazit ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/community/forums/person/70513 - - - - diff --git a/translated/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md b/translated/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md new file mode 100644 index 0000000000..c45b3eb760 --- /dev/null +++ b/translated/tech/20160301 The Evolving Market for Commercial Software Built On Open Source.md @@ -0,0 +1,36 @@ +构建在开源之上的商业软件市场持续成长 +===================================================================== + +![](https://www.linux.com/images/stories/41373/Structure-event-photo.jpg) +> 与会者在 Structure 上听取演讲,Structure Data 2016 也将在 UCSF Mission Bay 会议中心举办。图片来源:Structure Events。 + +如今真的很难低估开源项目对于企业软件市场的影响;开源集成如此快速地形成了规范,我们没能捕捉到转折点也情有可原。 + +举个例子,Hadoop,改变的不止是数据分析的世界。它引领了新一代数据公司,它们围绕开源项目创造自己的软件,按需调整和支持那些代码,更像红帽在 90 年代和 21 世纪早期拥抱 Linux 那样。软件越来越多地通过公有云交付,而不是购买者自己的服务器,拥有了令人惊奇的操作灵活性,但同时也带来了一些关于授权,支持以及价格之类的新问题。 + +我们多年来持续追踪这个趋势,它们组成了我们的 Structure Data 会议,而 Structure Data 2016 也不例外。三家围绕 Hadoop 最重要的大数据公司——Hortonworks,Cloudera 和 MapR——的 CEO 将会共同讨论它们是如何销售他们围绕开源项目的企业软件和服务,获利的同时回报那个社区项目。 + +以前在企业软件上获利是很容易的事情。一个客户购买了之后,企业供应商的一系列大型软件就变成了它自己的收银机,从维护合同和阶段性升级中获得近乎终生的收入,软件也越来越难以被替代,因为它已经成为了客户的业务核心。客户抱怨这种绑定,但如果它们想提高工作队伍的生产力也确实没有多少选择。 + +而现在的情况不再是这样了。尽管无数的公司还陷于在他们的基础设施上运行至关重要的巨大软件包,新的项目被使用开源技术部署到云服务器上。这让升级功能不再需要去掉大量软件包再重新安装别的,同时也让公司按需付费,而不是为一堆永远用不到的特性买单。 + +有很多客户想要利用开源项目的优势,而又不想建立和支持一支工程师队伍来调整开源项目以满足自己的需求。这些客户愿意为开源项目和在这之上的专有特性之间的差异付费。 + +这对于基础设施相关的软件来说格外正确。当然,你的客户们可以安装他们自己对项目的调整,比如 Hadoop,Spark 或 Node.js,但付费可以帮助他们自定义包部署如今重要的开源技术而不用自己干这些活儿。只需看看 Structure Data 2016 的发言者就明白了,比如 Confluent(Kafka),Databricks(Spark),以及 Cloudera-Hortonworks-MapR(Hadoop)三人组。 + +当然还有一个值得提到的是在出错的时候有个供应商给你指责。如果你的工程师弄糟了开源项目的实现,那你只能怪你自己了。但是如果你和一个愿意保证在服务级别的特定性能和正常运行时间指标的公司签订了合同,你就是愿意为支持,指导,以及在突然出现不可避免的问题时朝你公司外的人发火的机会买单。 + +构建在开源之上的商业软件市场的持续成长是我们在 Structure Data 上追踪多年的内容,如果这个话题正合你意,我们鼓励你加入我们,在旧金山,3 月 9 日和 10 日。 + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/enterprise/cloud-computing/889564-the-evolving-market-for-commercial-software-built-on-open-source- + +作者:[Tom Krazit ][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/community/forums/person/70513 From 024fc67a61b6472a2118833a226d52339379d83b Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 9 May 2016 10:24:10 +0800 Subject: [PATCH 1349/1710] rename for windows users --- ...container.md => Part 3 - LXD 2.0--Your first LXD container.md} | 0 ... Resource control.md => Part 4 - LXD 2.0--Resource control.md} | 0 ... Image management.md => Part 5 - LXD 2.0--Image management.md} | 0 ... => Part 6 - LXD 2.0--Remote hosts and container migration.md} | 0 ...D 2.0: Docker in LXD.md => Part 7 - LXD 2.0--Docker in LXD.md} | 0 ...8 - LXD 2.0: LXD in LXD.md => Part 8 - LXD 2.0--LXD in LXD.md} | 0 ...2.0: Live migration.md => Part 9 - LXD 2.0--Live migration.md} | 0 ...duction to LXD.md => Part 1 - LXD 2.0--Introduction to LXD.md} | 0 ...LXD.md => Part 2 - LXD 2.0--Installing and configuring LXD.md} | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename sources/tech/LXD/{Part 3 - LXD 2.0: Your first LXD container.md => Part 3 - LXD 2.0--Your first LXD container.md} (100%) rename sources/tech/LXD/{Part 4 - LXD 2.0: Resource control.md => Part 4 - LXD 2.0--Resource control.md} (100%) rename sources/tech/LXD/{Part 5 - LXD 2.0: Image management.md => Part 5 - LXD 2.0--Image management.md} (100%) rename sources/tech/LXD/{Part 6 - LXD 2.0: Remote hosts and container migration.md => Part 6 - LXD 2.0--Remote hosts and container migration.md} (100%) rename sources/tech/LXD/{Part 7 - LXD 2.0: Docker in LXD.md => Part 7 - LXD 2.0--Docker in LXD.md} (100%) rename sources/tech/LXD/{Part 8 - LXD 2.0: LXD in LXD.md => Part 8 - LXD 2.0--LXD in LXD.md} (100%) rename sources/tech/LXD/{Part 9 - LXD 2.0: Live migration.md => Part 9 - LXD 2.0--Live migration.md} (100%) rename translated/tech/LXD/{Part 1 - LXD 2.0: Introduction to LXD.md => Part 1 - LXD 2.0--Introduction to LXD.md} (100%) rename translated/tech/LXD/{Part 2 - LXD 2.0: Installing and configuring LXD.md => Part 2 - LXD 2.0--Installing and configuring LXD.md} (100%) diff --git a/sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md b/sources/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md similarity index 100% rename from sources/tech/LXD/Part 3 - LXD 2.0: Your first LXD container.md rename to sources/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md diff --git a/sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md b/sources/tech/LXD/Part 4 - LXD 2.0--Resource control.md similarity index 100% rename from sources/tech/LXD/Part 4 - LXD 2.0: Resource control.md rename to sources/tech/LXD/Part 4 - LXD 2.0--Resource control.md diff --git a/sources/tech/LXD/Part 5 - LXD 2.0: Image management.md b/sources/tech/LXD/Part 5 - LXD 2.0--Image management.md similarity index 100% rename from sources/tech/LXD/Part 5 - LXD 2.0: Image management.md rename to sources/tech/LXD/Part 5 - LXD 2.0--Image management.md diff --git a/sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md b/sources/tech/LXD/Part 6 - LXD 2.0--Remote hosts and container migration.md similarity index 100% rename from sources/tech/LXD/Part 6 - LXD 2.0: Remote hosts and container migration.md rename to sources/tech/LXD/Part 6 - LXD 2.0--Remote hosts and container migration.md diff --git a/sources/tech/LXD/Part 7 - LXD 2.0: Docker in LXD.md b/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md similarity index 100% rename from sources/tech/LXD/Part 7 - LXD 2.0: Docker in LXD.md rename to sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md diff --git a/sources/tech/LXD/Part 8 - LXD 2.0: LXD in LXD.md b/sources/tech/LXD/Part 8 - LXD 2.0--LXD in LXD.md similarity index 100% rename from sources/tech/LXD/Part 8 - LXD 2.0: LXD in LXD.md rename to sources/tech/LXD/Part 8 - LXD 2.0--LXD in LXD.md diff --git a/sources/tech/LXD/Part 9 - LXD 2.0: Live migration.md b/sources/tech/LXD/Part 9 - LXD 2.0--Live migration.md similarity index 100% rename from sources/tech/LXD/Part 9 - LXD 2.0: Live migration.md rename to sources/tech/LXD/Part 9 - LXD 2.0--Live migration.md diff --git a/translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md b/translated/tech/LXD/Part 1 - LXD 2.0--Introduction to LXD.md similarity index 100% rename from translated/tech/LXD/Part 1 - LXD 2.0: Introduction to LXD.md rename to translated/tech/LXD/Part 1 - LXD 2.0--Introduction to LXD.md diff --git a/translated/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md b/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md similarity index 100% rename from translated/tech/LXD/Part 2 - LXD 2.0: Installing and configuring LXD.md rename to translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md From 73b06dc23e34ba2afde01eb3288894a06fe33fce Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 9 May 2016 10:35:29 +0800 Subject: [PATCH 1350/1710] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng List of Raspberry Pi 2 Distributions.md | 68 ----------------- ...e Becomes Real With First Ubuntu Tablet.md | 73 ------------------- 2 files changed, 141 deletions(-) delete mode 100644 sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md delete mode 100644 sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md diff --git a/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md b/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md deleted file mode 100644 index 062fcae483..0000000000 --- a/sources/tech/20160218 Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions.md +++ /dev/null @@ -1,68 +0,0 @@ -Tizen 3.0 Joins Growing List of Raspberry Pi 2 Distributions -============================================================== - -Last week’s news that Tizen 3.0 has been ported to the Raspberry Pi 2 Model B is the latest example of how the year-old ARMv7 version of the Pi is attracting ports from more powerful Linux distributions, most notably Fedora, Ubuntu MATE, and Snappy. The [Samsung Open Source Group’s Tizen for Pi][1] project has been underway for several years, achieving several beta releases, and now the effort has shifted to the new Tizen 3.0. It’s still in beta, but now you can create builds for the Pi 2 using tools from the [Yocto][2] Project and [OpenEmbedded project][3]. - -Tizen 3.0 offers performance and security improvements, multiple-user and 64-bit support, and an Internet of Things (IoT) framework. Samsung, the principal backer of the [Linux Foundation hosted Tizen project][4], is using the Pi port to expand the base of developers using Tizen for IoT projects, according to an [IDG News Service post][5] that reported on the port. - -Although Samsung finally [shipped a Tizen-based][6] phone in India last summer, and Gear smartwatches continue to use Tizen, the main focus now appears to be on IoT. At CES last month, Samsung [announced][7] that all of its Tizen-based, 2016 Smart TVs will be able to act as SmartThings home automation hubs, letting users monitor the household while watching TV. - -### The Growing List of Pi Distros - -[Elinux.org][8] lists some 46 ARMv6-ready distributions that run on all the Raspberry Pi boards. A separate listing notes two ARMv7-only distros that require the ARMv7 Raspberry Pi 2: Ubuntu MATE, which replaces the resource-intensive Unity desktop with the Gnome 2.0 flavored MATE, and Windows 10 IoT Core. The prominent placement of a Microsoft distribution is not as controversial as one might have thought. To many younger Linux developers and casual Pi hackers, Microsoft is just another tech company, not so much the evil empire loathed by old-time Linux hackers. - -Windows 10 IoT Core isn’t the only non-Linux distro running on the Pi. There’s also the Unix-like FreeBSD and NetBSD, as well as the revived RISC OS Pi version of the old Acorn Computers OS. Some of the 48 operating systems on the Elinux.org list are incomplete, out-of-date, or dedicated to limited niches. [DistroWatch][9] offers a more manageable list of 20. - -The [Raspberry Pi Foundation][10] still prominently posts a download page for its homegrown, Debian-based Raspbian, in both standard and NOOBS packages. This lightweight distro is still the most popular and typically the highest rated Linux build for the Pi. The Scratch-ready distro is especially equally suited for desktop use and embedded hacking with home automation gear, robots, and other IoT gizmos. Raspbian recently [received an update][11] with an experimental OpenGL driver for doing hardware acceleration on the VideoCore IV GPU used with the Pi 2’s Broadcom BCM2836 SoC. - -The Pi Foundation also lists several [third-party downloads][12]. In addition to Windows 10 IoT Core and and Ubuntu MATE, the list includes the lightweight, transactionally focused [Snappy Ubuntu Core][13] for the Pi 2. Canonical is aiming Snappy at those who want an app platform and cloud integration in embedded devices like drones and IoT devices. Snappy also came out last week in a version designed for [Intel NUC mini-PCs][14]. The Pi Foundation also posts images for RISC OS and the education-focused PINET. There are also two media center distros related to KODI/XBMC: OSMC and OpenElec. - -In addition to its list of 48 released distros, Elinux.org lists several “announced” distros including Firefox OS, [openSUSE][15], Meego MER & XBMC, Puppy, RPi-Buildroot, and Aros. Missing, however, is Tizen, as well as newly announced ports such as [Manjaro-ARM][16] and the CentOS 7-based [CentOS AltArch 7][17] for the Pi 2, Banana Pi, and CubieTruck SBCs. - -### Android Still Pi in the Sky - -Elinux.org’s “announced” list also includes Android and a Miracast-like program called Android Transporter. People have been trying to port Android to the Pi for years; yet, even with the more suitable [Pi 2][18] shipping for a year now, Android is still pretty much a no-show. Android can run on lower-powered SoCs than the Pi 2’s quad-core, Cortex-A7, but the limited 1GB of RAM and the lack of GPU acceleration are big challenges. Perhaps Raspbian’s OpenGL driver could be ported to Android as well, although the Pi Foundation does not seem very interested in Android. - -There are several Android-for-Pi projects in the works, but without the foundation’s backing, there is still nothing close to a complete port. Projects include an [AOSP Marshmallow][19] patch-set from Peter Yoon, as well as a [RaspAnd][20] release based on the Ubuntu-based RaspEx, which makes use of the Aptoide package manager to load some Android 5.1 apps on a Pi 2. The [Razdroid project][21], which aims to tap into the secrets of Broadcom hardware acceleration, seems to have stalled. - -Most Rasp Pi users, however, appear more interested in [Ubuntu MATE][22], which was never optimized for ARMv6, and Fedora. For years, Pi users have run the lightweight spin-down of Fedora called Pidora, but with the Pi 2, they can now try the real thing. The Raspberry Pi Foundation has yet to post Fedora, but the recent [betas of the Pi 2 port][23] have received high marks. - -Other Linux distributions that regularly make Top Pi distro lists include Arch Linux, which unlike most ports from mature Linux distros, works just fine on ARMv6. A recent [TechRadar Top 5 list][24] includes several more niche distros in addition to Raspbian. These include the OSMC media player environment, RetroPie for playing classic games, OpenMediaVault for turning your Pi into a NAS, and Pi MusicBox, based on the Mopidy music streaming server. - -Beyond Ubuntu, Fedora, and Tizen, other distros, both arcane and general, are heading for the Pi 2, as well. The platform is rapidly expanding the boundaries of, as well as redefining the meaning of, desktop Linux. - ------------------------------------------------------------------------------- - -via: http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-joins-growing-list-of-raspberry-pi-2-distros - -作者:[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://blogs.s-osg.org/bringing-tizen-to-a-raspberry-pi-2-near-you/ -[2]:https://www.yoctoproject.org/ -[3]:http://www.openembedded.org/wiki/Main_Page -[4]:https://www.tizen.org/ -[5]:http://www.cio.com/article/3031812/samsung-hopes-raspberry-pi-can-spread-tizen-os-adoption.html -[6]:http://www.linux.com/news/embedded-mobile/mobile-linux/837843-samsung-sells-a-million-tizen-phones-as-mozilla-rethinks-firefox-os -[7]:http://www.linux.com/news/embedded-mobile/mobile-linux/877879-linux-based-drones-upstage-other-mobile-gadgets-at-ces -[8]:http://elinux.org/RPi_Distributions -[9]:https://distrowatch.com/search.php?category=Raspberry+Pi -[10]:https://www.raspberrypi.org/ -[11]:http://news.softpedia.com/news/raspbian-gets-experimental-opengl-driver-gpu-now-used-for-acceleration-500152.shtml -[12]:https://www.raspberrypi.org/downloads/ -[13]:http://www.linux.com/news/embedded-mobile/mobile-linux/804659-ubuntu-snappy-leads-mobile-linux-migration-to-iot -[14]:https://insights.ubuntu.com/2016/02/10/ubuntu-core-is-available-for-the-intel-nuc/ -[15]:https://www.reddit.com/r/openSUSE/comments/3hxrz4/opensuse_on_a_raspberry_pi_2_armv7/ -[16]:http://www.linux-arm.info/index.php/1103-hands-on-more-adventures-with-manjaro-arm-for-the-raspberry-pi-2 -[17]:http://www.linux-arm.info/index.php/1054-centos-altarch-7-now-available-for-aarch64-powerpc64-powerpc8-le-and-armhfp -[18]:http://www.linux.com/news/embedded-mobile/mobile-linux/807087-faster-raspberry-pi-2-says-yes-to-ubuntu-and-windows-but-wheres-android -[19]:http://www.linux.com/news/embedded-mobile/mobile-linux/886126-tizen-30-joins-growing-list-of-raspberry-pi-2-distros#!topic/android-rpi/YW_gGr8wZkk -[20]:https://extonlinux.wordpress.com/2015/04/05/run-android-5-1-lollipop-exton-build-on-your-raspberry-pi-2/ -[21]:https://www.raspberrypi.org/forums/viewtopic.php?f=73&t=19106 -[22]:https://ubuntu-mate.org/raspberry-pi/ -[23]:https://chisight.wordpress.com/2015/10/19/fedora-22-or-23-on-raspberry-pi-2/ -[24]:http://www.techradar.com/us/news/software/5-of-the-most-popular-raspberry-pi-distros-1292537 diff --git a/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md b/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md deleted file mode 100644 index a7beb58156..0000000000 --- a/sources/tech/20160220 Convergence Becomes Real With First Ubuntu Tablet.md +++ /dev/null @@ -1,73 +0,0 @@ -Convergence Becomes Real With First Ubuntu Tablet -==================================================== - -![](http://itsfoss.com/wp-content/uploads/2016/02/front-landscape-1-e1454624669422.jpg) - -First Ubuntu tablet has been just announced. Canonical, parent company of Ubuntu, and Spanish hardware manufacturer BQ are all set to unveil the first Ubuntu tablet at Mobile World Congress, later this month. - -BQ is also the manufacturer of the [first Ubuntu Phone](http://itsfoss.com/ubuntu-phone-specification-release-date-pricing/). The partnership between Canonical and BQ extends to the tablet as well. - -Ubuntu has been running the [#reinvent campaign on social media](https://business.facebook.com/media/set/?set=a.656637987810305.1073741827.115098615297581&type=3) and the web ahead of the launch to generate curiosity over the tablet. But does an Ubuntu fan really need a dedicated campaign to know about such things? I think not. - -Ahead of this launch, specifications of the Ubuntu tablet and some teasers have been released. No surprises that the main focus has been on [convergence](https://insights.ubuntu.com/2015/10/20/ubuntus-path-to-convergence/). - -[Ubuntu Phone has demonstrated convergence](http://www.omgubuntu.co.uk/2015/02/new-video-shows-off-ubuntu-convergence-demoed-on-tablet-phone) several times in the past. Ubuntu tablet takes it to the next level. Just adding an HDMI cable makes it to a full-fledged desktop. All you need is a keyboard and a mouse. - -![](http://itsfoss.com/wp-content/uploads/2016/02/convergence-ubuntu-e1454624459103.jpg) - -## BQ Ubuntu tablet specification - -BQ will be using its trusted [Aquaris M10](http://www.bq.com/es/aquaris-m10) series to launch an Ubuntu edition. This is a strategy they used earlier with Ubuntu Phone where they launched an Ubuntu edition of their Aquaris e4.5 Android smartphone. - -Aquaris M10 boasts of a decent hardware and an enormous 10 inches screen size. A quick list of specification includes: - -- 10.1 inch multi-touch screen -- MediaTek Quad Core MT8163A processor up to 1.5GHz -- High capacity Li-Po battery (7280mAh) -- Full HD (1080p) camera for super-sharp video recording -- 2GB RAM and 16GB internal memory -- MicroSD slot for extra storage (up to 64GB) -- 12 megapixel camera with autofocus and dual flash -- Frontal speakers -- Micro HDMI slot -- Dimensions: 246 x 171 x 8.2mm -- Lightweight at only 470g - -These proposed specifications have been taken from Ubuntu’s official website which doesn’t match up with the Aquaris M10 specification on BQ website though. Ubuntu website shows a 12 MP camera while BQ website has 8 MP max. - -As you can see, first Ubuntu tablet is not really a power horse. In 2016, 2GB of RAM doesn’t seem to be sufficient. Moreover, the closed source MediaTek processors are another let down of the first Ubuntu Phone. - -However, a supposed price tag of Euro 260 (the Android version costs the same) is a positive factor here and considering its capability to converge into a desktop, 10 inches screen keeps it in the entry level Netbook section. - -The 470 g weight is another plus factor. - -## First look at Ubuntu tablet - -While Ubuntu tablet will be officially unveiled at Mobile World Congress, you can have a glimpse of its looks and functionings in the pictures below: - -![](http://itsfoss.com/wp-content/uploads/2016/02/tablet-overview-hero-300x182.png) - -## Price, availability and release date - -BQ Aquaris M10 Ubuntu edition will go on sale in the second quarter of the year 2016. Guessing from Ubuntu Phone experience, it should be available for Europe and UK first and later in other parts of the world. - -The price should be around 260-270 Euro. This too is an estimate based on the price of the Android version. - -## Up for the grab? - -I was not very convinced at the first Ubuntu Phone. However, I think Ubuntu tablet is a better device than the Ubuntu Phone. With Snappy coming in action, Ubuntu tablet has the potential to become a mobile device cum desktop. - -What do you think of it? - ------------------------------------------------------------------------------- - -via: http://itsfoss.com/ubuntu-tablet/ - -作者:[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/ - From 30c8e2f46aba4cb58a4e99d7465a6390510c33cf Mon Sep 17 00:00:00 2001 From: tinyeyeser Date: Mon, 9 May 2016 11:30:31 +0800 Subject: [PATCH 1351/1710] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=20by?= =?UTF-8?q?=E5=B0=8F=E7=9C=BC=E5=84=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Doubly linked list in the Linux Kernel.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/20151122 Doubly linked list in the Linux Kernel.md b/translated/tech/20151122 Doubly linked list in the Linux Kernel.md index 631d918813..c11e968a18 100644 --- a/translated/tech/20151122 Doubly linked list in the Linux Kernel.md +++ b/translated/tech/20151122 Doubly linked list in the Linux Kernel.md @@ -5,7 +5,7 @@ Linux 内核里的数据结构——双向链表 -------------------------------------------------------------------------------- -Linux 内核自己实现了双向链表,可以在[include/linux/list.h](https://github.com/torvalds/linux/blob/master/include/linux/list.h)找到定义。我们将会从双向链表数据结构开始`内核的数据结构`。为什么?因为它在内核里使用的很广泛,你只需要在[free-electrons.com](http://lxr.free-electrons.com/ident?i=list_head) 检索一下就知道了。 +Linux 内核自己实现了双向链表,可以在[include/linux/list.h](https://github.com/torvalds/linux/blob/master/include/linux/list.h)找到定义。我们将会从双向链表数据结构开始介绍`内核里的数据结构`。为什么?因为它在内核里使用的很广泛,你只需要在[free-electrons.com](http://lxr.free-electrons.com/ident?i=list_head) 检索一下就知道了。 首先让我们看一下在[include/linux/types.h](https://github.com/torvalds/linux/blob/master/include/linux/types.h) 里的主结构体: @@ -25,7 +25,7 @@ struct GList { }; ``` -通常来说一个链表会包含一个指向某个项目的指针。但是内核的实现并没有这样做。所以问题来了:`链表在哪里保存数据呢?`。实际上内核里实现的链表实际上是`侵入式链表`。侵入式链表并不在节点内保存数据-节点仅仅包含指向前后节点的指针,然后把数据是附加到链表的。这就使得这个数据结构是通用的,使用起来就不需要考虑节点数据的类型了。 +通常来说一个链表结构会包含一个指向某个项目的指针。但是Linux内核中的链表实现并没有这样做。所以问题来了:`链表在哪里保存数据呢?`。实际上,内核里实现的链表是`侵入式链表`。侵入式链表并不在节点内保存数据-它的节点仅仅包含指向前后节点的指针,以及指向链表节点数据部分的指针——数据就是这样附加在链表上的。这就使得这个数据结构是通用的,使用起来就不需要考虑节点数据的类型了。 比如: @@ -36,7 +36,7 @@ struct nmi_desc { }; ``` -让我们看几个例子来理解一下在内核里是如何使用`list_head` 的。如上所述,在内核里有实在很多不同的地方用到了链表。我们来看一个在杂项字符驱动里面的使用的例子。在 [drivers/char/misc.c](https://github.com/torvalds/linux/blob/master/drivers/char/misc.c) 的杂项字符驱动API 被用来编写处理小型硬件和虚拟设备的小驱动。这些驱动共享相同的主设备号: +让我们看几个例子来理解一下在内核里是如何使用`list_head` 的。如上所述,在内核里有很多很多不同的地方都用到了链表。我们来看一个在杂项字符驱动里面的使用的例子。在 [drivers/char/misc.c](https://github.com/torvalds/linux/blob/master/drivers/char/misc.c) 的杂项字符驱动API 被用来编写处理小型硬件或虚拟设备的小驱动。这些驱动共享相同的主设备号: ```C #define MISC_MAJOR 10 @@ -84,7 +84,7 @@ struct miscdevice }; ``` -可以看到结构体的第四个变量`list` 是所有注册过的设备的链表。在源代码文件的开始可以看到这个链表的定义: +可以看到结构体`miscdevice`的第四个变量`list` 是所有注册过的设备的链表。在源代码文件的开始可以看到这个链表的定义: ```C static LIST_HEAD(misc_list); @@ -103,7 +103,7 @@ static LIST_HEAD(misc_list); #define LIST_HEAD_INIT(name) { &(name), &(name) } ``` -现在来看看注册杂项设备的函数`misc_register`。它在开始就用 `INIT_LIST_HEAD` 初始化了`miscdevice->list`。 +现在来看看注册杂项设备的函数`misc_register`。它在开始就用函数 `INIT_LIST_HEAD` 初始化了`miscdevice->list`。 ```C INIT_LIST_HEAD(&misc->list); @@ -119,13 +119,13 @@ static inline void INIT_LIST_HEAD(struct list_head *list) } ``` -在函数`device_create` 创建了设备后我们就用下面的语句将设备添加到设备链表: +接下来,在函数`device_create` 创建了设备后,我们就用下面的语句将设备添加到设备链表: ``` list_add(&misc->list, &misc_list); ``` -内核文件`list.h` 提供了项链表添加新项的API 接口。我们来看看它的实现: +内核文件`list.h` 提供了向链表添加新项的API 接口。我们来看看它的实现: ```C @@ -138,8 +138,8 @@ static inline void list_add(struct list_head *new, struct list_head *head) 实际上就是使用3个指定的参数来调用了内部函数`__list_add`: * new - 新项。 -* head - 新项将会被添加到`head`之前. -* head->next - `head` 之后的项。 +* head - 新项将会插在`head`的后面 +* head->next - 插入前,`head` 后面的项。 `__list_add`的实现非常简单: @@ -155,9 +155,9 @@ static inline void __list_add(struct list_head *new, } ``` -我们会在`prev`和`next` 之间添加一个新项。所以我们用宏`LIST_HEAD_INIT`定义的`misc` 链表会包含指向`miscdevice->list` 的向前指针和向后指针。 +这里,我们在`prev`和`next` 之间添加了一个新项。所以我们开始时用宏`LIST_HEAD_INIT`定义的`misc` 链表会包含指向`miscdevice->list` 的向前指针和向后指针。 -这里有一个问题:如何得到列表的内容呢?这里有一个特殊的宏: +这儿还有一个问题:如何得到列表的内容呢?这里有一个特殊的宏: ```C #define list_entry(ptr, type, member) \ @@ -166,7 +166,7 @@ static inline void __list_add(struct list_head *new, 使用了三个参数: -* ptr - 指向链表头的指针; +* ptr - 指向结构 `list_head` 的指针; * type - 结构体类型; * member - 在结构体内类型为`list_head` 的变量的名字; @@ -207,7 +207,7 @@ int main() { 最终会打印`2` -下一点就是`typeof`,它也很简单。就如你从名字所理解的,它仅仅返回了给定变量的类型。当我第一次看到宏`container_of`的实现时,让我觉得最奇怪的就是`container_of`中的0.实际上这个指针巧妙的计算了从结构体特定变量的偏移,这里的`0`刚好就是位宽里的零偏移。让我们看一个简单的例子: +下一点就是`typeof`,它也很简单。就如你从名字所理解的,它仅仅返回了给定变量的类型。当我第一次看到宏`container_of`的实现时,让我觉得最奇怪的就是表达式`((type *)0)`中的0.实际上这个指针巧妙的计算了从结构体特定变量的偏移,这里的`0`刚好就是位宽里的零偏移。让我们看一个简单的例子: ```C #include @@ -226,13 +226,13 @@ int main() { 结果显示`0x5`。 -下一个宏`offsetof` 会计算从结构体的某个变量的相对于结构体起始地址的偏移。它的实现和上面类似: +下一个宏`offsetof`会计算从结构体起始地址到某个给定结构字段的偏移。它的实现和上面类似: ```C #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) ``` -现在我们来总结一下宏`container_of`。只需要知道结构体里面类型为`list_head` 的变量的名字和结构体容器的类型,它可以通过结构体的变量`list_head`获得结构体的起始地址。在宏定义的第一行,声明了一个指向结构体成员变量`ptr`的指针`__mptr`,并且把`ptr` 的地址赋给它。现在`ptr` 和`__mptr` 指向了同一个地址。从技术上讲我们并不需要这一行,但是它可以方便的进行类型检查。第一行保证了特定的结构体(参数`type`)包含成员变量`member`。第二行代码会用宏`offsetof`计算成员变量相对于结构体起始地址的偏移,然后从结构体的地址减去这个偏移,最后就得到了结构体。 +现在我们来总结一下宏`container_of`。只需给定结构体中`list_head`类型 字段的地址、名字和结构体容器的类型,它就可以返回结构体的起始地址。在宏定义的第一行,声明了一个指向结构体成员变量`ptr`的指针`__mptr`,并且把`ptr` 的地址赋给它。现在`ptr` 和`__mptr` 指向了同一个地址。从技术上讲我们并不需要这一行,但是它可以方便地进行类型检查。第一行保证了特定的结构体(参数`type`)包含成员变量`member`。第二行代码会用宏`offsetof`计算成员变量相对于结构体起始地址的偏移,然后从结构体的地址减去这个偏移,最后就得到了结构体。 当然了`list_add` 和 `list_entry`不是``提供的唯一功能。双向链表的实现还提供了如下API: From 3db59a8d65e75ee6291c67a556bc9f11494232d9 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Mon, 9 May 2016 11:44:35 +0800 Subject: [PATCH 1352/1710] [translating] 20160502 The intersection of Drupal, IoT, and open hardware.md --- ...0160502 The intersection of Drupal, IoT, and open hardware.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md b/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md index 751024fb3a..43ee75fae6 100644 --- a/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md +++ b/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md @@ -1,3 +1,4 @@ +zpl1025 The intersection of Drupal, IoT, and open hardware ======================================================= From bcb7787beec5881741db0cbde0efb7afbfb253cf Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 9 May 2016 10:19:43 +0800 Subject: [PATCH 1353/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E6=88=90?= =?UTF-8?q?=E5=91=98=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 76 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 7fbc7a5f36..cfa5aee47e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ 简介 ------------------------------- -LCTT是“Linux中国”([http://linux.cn/](http://linux.cn/))的翻译组,负责从国外优秀媒体翻译Linux相关的技术、资讯、杂文等内容。 +LCTT是“Linux中国”([https://linux.cn/](https://linux.cn/))的翻译组,负责从国外优秀媒体翻译Linux相关的技术、资讯、杂文等内容。 -LCTT已经拥有近百余名活跃成员,并欢迎更多的Linux志愿者加入我们的团队。 +LCTT已经拥有几百名活跃成员,并欢迎更多的Linux志愿者加入我们的团队。 ![logo](http://img.linux.net.cn/static/image/common/lctt_logo.png) @@ -52,13 +52,15 @@ LCTT的组成 * 2015/04/19 发起 LFS-BOOK-7.7-systemd 项目。 * 2015/06/09 提升ictlyh和dongfengweixiao为Core Translators成员。 * 2015/11/10 提升strugglingyouth、FSSlc、Vic020、alim0x为Core Translators成员。 +* 2016/05/09 提升PurlingNayuki为校对。 活跃成员 ------------------------------- 目前 TP 活跃成员有: -- CORE @wxy, -- CORE @DeadFire, +- Leader @wxy, +- Source @oska874, +- Proofreader @PurlingNayuki, - CORE @geekpi, - CORE @GOLinux, - CORE @ictlyh, @@ -71,6 +73,7 @@ LCTT的组成 - CORE @Vic020, - CORE @dongfengweixiao, - CORE @alim0x, +- Senior @DeadFire, - Senior @reinoir, - Senior @tinyeyeser, - Senior @vito-L, @@ -80,41 +83,42 @@ LCTT的组成 - ZTinoZ, - theo-l, - luoxcat, -- disylee, +- martin2011qi, - wi-cuckoo, +- disylee, - haimingfg, - KayGuoWhu, - wwy-hust, -- martin2011qi, -- cvsher, +- felixonmars, - su-kaiyao, +- ivo-wang, +- GHLandy, +- cvsher, +- wyangsun, +- DongShuaike, - flsf, - SPccman, - Stevearzh +- mr-ping, - Linchenguang, -- oska874 - Linux-pdz, - 2q1w2007, -- felixonmars, -- wyangsun, -- MikeCoder, -- mr-ping, -- xiqingongzi - H-mudcup, -- zhangboyue, +- cposture, +- xiqingongzi, - goreliu, -- DongShuaike, +- NearTan, - TxmszLou, - ZhouJ-sh, - wangjiezhe, -- NearTan, - icybreaker, - shipsw, - johnhoow, +- soooogreen, - linuhap, -- boredivan, - blueabysm, -- liaoishere, +- boredivan, +- name1e5s, - yechunxiao19, - l3b2w1, - XLCYun, @@ -122,43 +126,55 @@ LCTT的组成 - tenght, - coloka, - luoyutiantang, -- yupmoon, +- sonofelice, - jiajia9linuxer, - scusjs, - tnuoccalanosrep, - woodboow, - 1w2b3l, +- JonathanKang, - crowner, - mtunique, - dingdongnigetou, - CNprober, -- JonathanKang, -- Medusar, - hyaocuk, - szrlee, +- KnightJoker, - Xuanwo, - nd0104, +- jerryling315, - xiaoyu33, - guodongxiaren, -- zzlyzq, -- yujianxuechuan, -- ailurus1991, +- ynmlml, +- kylepeng93, - ggaaooppeenngg, - Ricky-Gong, +- zky001, +- Flowsnow, - lfzark, - 213edu, - Tanete, - liuaiping, -- jerryling315, +- bestony, +- Timeszoro, +- rogetfan, +- itsang, +- JeffDing, +- Yuking-net, + +- MikeCoder, +- zhangboyue, +- liaoishere, +- yupmoon, +- Medusar, +- zzlyzq, +- yujianxuechuan, +- ailurus1991, - tomatoKiller, - stduolc, - shaohaolin, -- Timeszoro, -- rogetfan, - FineFan, - kingname, -- jasminepeng, -- JeffDing, - CHINAANSHE, (按提交行数排名前百) @@ -173,7 +189,7 @@ LFS 项目活跃成员有: - @KevinSJ - @Yuking-net -(更新于2015/11/29) +(更新于2016/05/09) 谢谢大家的支持! From fa862ff68404f9f1463db5df73edd9a1e2c31682 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 9 May 2016 11:49:30 +0800 Subject: [PATCH 1354/1710] PUB:20160204 An Introduction to SELinux @alim0x --- .../20160204 An Introduction to SELinux.md | 127 ++++++++++++++++ .../20160204 An Introduction to SELinux.md | 139 ------------------ 2 files changed, 127 insertions(+), 139 deletions(-) create mode 100644 published/20160204 An Introduction to SELinux.md delete mode 100644 translated/tech/20160204 An Introduction to SELinux.md diff --git a/published/20160204 An Introduction to SELinux.md b/published/20160204 An Introduction to SELinux.md new file mode 100644 index 0000000000..777a4094a0 --- /dev/null +++ b/published/20160204 An Introduction to SELinux.md @@ -0,0 +1,127 @@ +SELinux 入门 +=============================== + +回到 Kernel 2.6 时代,那时候引入了一个新的安全系统,用以提供访问控制安全策略的机制。这个系统就是 [Security Enhanced Linux (SELinux)][1],它是由[美国国家安全局(NSA)][2]贡献的,它为 Linux 内核子系统引入了一个健壮的强制控制访问(Mandatory Access Control)架构。 + +如果你在之前的 Linux 生涯中都禁用或忽略了 SELinux,这篇文章就是专门为你写的:这是一篇对存在于你的 Linux 桌面或服务器之下的 SELinux 系统的介绍,它能够限制权限,甚至消除程序或守护进程的脆弱性而造成破坏的可能性。 + +在我开始之前,你应该已经了解的是 SELinux 主要是红帽 Red Hat Linux 以及它的衍生发行版上的一个工具。类似地, Ubuntu 和 SUSE(以及它们的衍生发行版)使用的是 AppArmor。SELinux 和 AppArmor 有显著的不同。你可以在 SUSE,openSUSE,Ubuntu 等等发行版上安装 SELinux,但这是项难以置信的挑战,除非你十分精通 Linux。 + +说了这么多,让我来向你介绍 SELinux。 + +### DAC vs. MAC + +Linux 上传统的访问控制标准是自主访问控制(Discretionary Access Control,DAC)。在这种形式下,一个软件或守护进程以 User ID(UID)或 Set owner User ID(SUID)的身份运行,并且拥有该用户的目标(文件、套接字、以及其它进程)权限。这使得恶意代码很容易运行在特定权限之下,从而取得访问关键的子系统的权限。 + +另一方面,强制访问控制(Mandatory Access Control,MAC)基于保密性和完整性强制信息的隔离以限制破坏。该限制单元独立于传统的 Linux 安全机制运作,并且没有超级用户的概念。 + +### SELinux 如何工作 + +考虑一下 SELinux 的相关概念: + +- 主体(Subjects) +- 目标(Objects) +- 策略(Policy) +- 模式(Mode) + +当一个主体(Subject,如一个程序)尝试访问一个目标(Object,如一个文件),SELinux 安全服务器(SELinux Security Server,在内核中)从策略数据库(Policy Database)中运行一个检查。基于当前的模式(mode),如果 SELinux 安全服务器授予权限,该主体就能够访问该目标。如果 SELinux 安全服务器拒绝了权限,就会在 /var/log/messages 中记录一条拒绝信息。 + +听起来相对比较简单是不是?实际上过程要更加复杂,但为了简化介绍,只列出了重要的步骤。 + +### 模式 + +SELinux 有三个模式(可以由用户设置)。这些模式将规定 SELinux 在主体请求时如何应对。这些模式是: + +- Enforcing (强制)— SELinux 策略强制执行,基于 SELinux 策略规则授予或拒绝主体对目标的访问 +- Permissive (宽容)— SELinux 策略不强制执行,不实际拒绝访问,但会有拒绝信息写入日志 +- Disabled (禁用)— 完全禁用 SELinux + +![](https://www.linux.com/images/stories/66866/jack2-selinux_a.png) + +*图 1:getenforce 命令显示 SELinux 的状态是 Enforcing 启用状态。* + +默认情况下,大部分系统的 SELinux 设置为 Enforcing。你要如何知道你的系统当前是什么模式?你可以使用一条简单的命令来查看,这条命令就是 `getenforce`。这个命令用起来难以置信的简单(因为它仅仅用来报告 SELinux 的模式)。要使用这个工具,打开一个终端窗口并执行 `getenforce` 命令。命令会返回 Enforcing、Permissive,或者 Disabled(见上方图 1)。 + +设置 SELinux 的模式实际上很简单——取决于你想设置什么模式。记住:**永远不推荐关闭 SELinux**。为什么?当你这么做了,就会出现这种可能性:你磁盘上的文件可能会被打上错误的权限标签,需要你重新标记权限才能修复。而且你无法修改一个以 Disabled 模式启动的系统的模式。你的最佳模式是 Enforcing 或者 Permissive。 + +你可以从命令行或 `/etc/selinux/config` 文件更改 SELinux 的模式。要从命令行设置模式,你可以使用 `setenforce` 工具。要设置 Enforcing 模式,按下面这么做: + +1. 打开一个终端窗口 +2. 执行 `su` 然后输入你的管理员密码 +3. 执行 `setenforce 1` +4. 执行 `getenforce` 确定模式已经正确设置(图 2) + +![](https://www.linux.com/images/stories/66866/jack-selinux_b.png) + +*图 2:设置 SELinux 模式为 Enforcing。* + +要设置模式为 Permissive,这么做: + +1. 打开一个终端窗口 +2. 执行 `su` 然后输入你的管理员密码 +3. 执行 `setenforce 0` +4. 执行 `getenforce` 确定模式已经正确设置(图 3) + +![](https://www.linux.com/images/stories/66866/jack-selinux_c.png) + +*图 3:设置 SELinux 模式为 Permissive。* + +注:通过命令行设置模式会覆盖 SELinux 配置文件中的设置。 + +如果你更愿意在 SELinux 命令文件中设置模式,用你喜欢的编辑器打开那个文件找到这一行: + + SELINUX=permissive + +你可以按你的偏好设置模式,然后保存文件。 + +还有第三种方法修改 SELinux 的模式(通过 bootloader),但我不推荐新用户这么做。 + +### 策略类型 + +SELinux 策略有两种: + +- Targeted — 只有目标网络进程(dhcpd,httpd,named,nscd,ntpd,portmap,snmpd,squid,以及 syslogd)受保护 +- Strict — 对所有进程完全的 SELinux 保护 + +你可以在 `/etc/selinux/config` 文件中修改策略类型。用你喜欢的编辑器打开这个文件找到这一行: + + SELINUXTYPE=targeted + +修改这个选项为 targeted 或 strict 以满足你的需求。 + +### 检查完整的 SELinux 状态 + +有个方便的 SELinux 工具,你可能想要用它来获取你启用了 SELinux 的系统的详细状态报告。这个命令在终端像这样运行: + + sestatus -v + +你可以看到像图 4 那样的输出。 + +![](https://www.linux.com/images/stories/66866/jack-selinux_d.png) + +*图 4:sestatus -v 命令的输出。* + +### 仅是皮毛 + +和你预想的一样,我只介绍了 SELinux 的一点皮毛。SELinux 的确是个复杂的系统,想要更扎实地理解它是如何工作的,以及了解如何让它更好地为你的桌面或服务器工作需要更加地深入学习。我的内容还没有覆盖到疑难解答和创建自定义 SELinux 策略。 + +SELinux 是所有 Linux 管理员都应该知道的强大工具。现在已经向你介绍了 SELinux,我强烈推荐你回到 Linux.com(当有更多关于此话题的文章发表的时候)或看看 [NSA SELinux 文档][3] 获得更加深入的指南。 + +LCTT - 相关阅读:[鸟哥的 Linux 私房菜——程序管理与 SELinux 初探][4] + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/learn/docs/ldp/883671-an-introduction-to-selinux + +作者:[Jack Wallen][a] +译者:[alim0x](https://github.com/alim0x) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/community/forums/person/93 +[1]: http://selinuxproject.org/page/Main_Page +[2]: https://www.nsa.gov/research/selinux/ +[3]: https://www.nsa.gov/research/selinux/docs.shtml +[4]: http://vbird.dic.ksu.edu.tw/linux_basic/0440processcontrol_5.php diff --git a/translated/tech/20160204 An Introduction to SELinux.md b/translated/tech/20160204 An Introduction to SELinux.md deleted file mode 100644 index bc82106189..0000000000 --- a/translated/tech/20160204 An Introduction to SELinux.md +++ /dev/null @@ -1,139 +0,0 @@ -An Introduction to SELinux -=============================== - -![](https://www.linux.com/images/stories/66866/jack2-selinux_a.png) - ->图 1:getenforce 命令显示 SELinux 的状态是 Enforcing 启用状态。 - -回到 Kernel 2.6 时代,那时候引入了一个新的安全系统,用以提供访问控制安全策略的机制。这个系统就是 [Security Enhanced Linux (SELinux)][1],它是由[美国国家安全局(NSA)][2]引入的,合并进 Linux 内核子系统的强制控制访问架构实现。 - -如果你在你整个 Linux 生涯中禁用或忽略 SELinux,这篇文章就是为你量身定制的——对存在于你的 Linux 桌面或服务器之下的 SELinux 系统的介绍,它能够限制权限,甚至消除程序或守护进程的妥协而造成破坏的可能性。 - -在我开始之前,你应该了解的是 SELinux 主要是红帽 Red Hat Linux 以及它的衍生发行版的一个工具。这就类似 Ubuntu 和 SUSE(以及它们的衍生发行版)使用 AppArmor 一样。SELinux 和 AppArmor 有显著的不同。你可以在 SUSE,openSUSE,Ubuntu 等等发行版上安装 SELinux,但这是项难以置信的挑战,除非你十分精通 Linux。 - -说了这么多,让我来向你介绍 SELinux。 - -### DAC vs. MAC - -Linux 上保守的访问控制标准是自主访问控制(Discretionary Access Control,DAC)。在这种形式下,一个软件或守护进程运行在 User ID(UID)或 Set User ID(SUID)下,并且拥有该用户的目标权限(文件,套接字,以及其它进程)。这使得恶意代码很容易运行在特定权限之下,从而取得访问关键的子系统的权限。 - -另一方面,强制访问控制(Mandatory Access Control,MAC)基于保密性和完整性强制信息的隔离以限制破坏。限制单元相对于传统的 Linux 安全机制独立运作,并且没有超级用户的概念。 - -### SELinux 如何工作 - -考虑一下 SELinux 的相关概念: - -- Subjects 主体 - -- Objects 目标 - -- Policy 策略 - -- Mode 模式 - -当一个主体(Subject,如一个程序)尝试访问一个目标(Object,如一个文件),SELinux 安全服务器(SELinux Security Server,在内核中)从策略数据库中运行一个检查。基于当前的模式,如果 SELinux 安全服务器授予权限,该主体就能够访问该目标。如果 SELinux 安全服务器拒绝了权限,一条拒绝信息会被记录到 /var/log/messages。 - -听起来相对比较简单是不是?实际上过程要更加复杂,但为了简单介绍,这些是重要的步骤。 - -### 模式 - -SELinux 有三个模式(可以由用户设置)。这些模式将规定 SELinux 在主体请求时如何应对。这些模式是: - -- Enforcing — SELinux 策略强制执行,基于 SELinux 策略规则授予或拒绝主体对目标的访问 - -- Permissive — SELinux 策略不强制执行,不实际拒绝访问,但会有警告信息且拒绝会写入日志 - -- Disabled — 完全禁用 SELinux - -默认情况下,大部分系统的 SELinux 设置为 Enforcing。你要如何知道你的系统当前是什么模式?你可以使用一条简单的命令来查看,这条命令就是 getenforce。这个命令用起来难以置信的简单(因为它仅仅用来报告 SELinux 的模式)。要使用这个工具,打开一个终端窗口并执行 getenforce 命令。命令会返回 Enforcing,Permissive,或者 Disabled(见上方图 1)。 - -设置 SELinux 的模式实际上很简单——取决于你想设置什么模式。记住:永远不推荐关闭 SELinux。为什么?当你这么做了,你就有了这种可能性:你磁盘上的文件可能会被打上错误的标签,需要你重新标签来修复。而且你无法修改一个以 Disabled 模式启动的系统的模式。你的最佳模式是 Enforcing 或者 Permissive。 - -你可以从命令行或 /etc/selinux/config 文件更改 SELinux 的模式。要从命令行设置模式,你可以使用 setenforce 工具。要设置 Enforcing 模式,按下面这么做: - -1. 打开一个终端窗口 - -2. 执行 su 然后输入你的管理员密码 - -3. 执行 setenforce 1 - -4. 执行 getenforce 确定模式已经正确设置(图 2) - -![](https://www.linux.com/images/stories/66866/jack-selinux_b.png) - ->图 2:设置 SELinux 模式为 Enforcing。 - -要设置模式为 Permissive,这么做: - -1. 打开一个终端窗口 - -2. 执行 su 然后输入你的管理员密码 - -3. 执行 setenforce 0 - -4. 执行 getenforce 确定模式已经正确设置(图 3) - -![](https://www.linux.com/images/stories/66866/jack-selinux_c.png) - ->图 3:设置 SELinux 模式为 Permissive. - -注:通过命令行设置模式会覆盖 SELinux 配置文件中的设置。 - -如果你更愿意在 SELinux 命令文件中设置模式,用你喜欢的编辑器打开那个文件找到这一行: - ->SELINUX=permissive - -你可以按你的偏好设置模式,然后保存文件。 - -还有第三种方法修改 SELinux 的模式(通过 bootloader),但我不推荐新用户这么做。 - -### 策略类型 - -SELinux 策略有两种: - -- Targeted — 只有目标网络进程(dhcpd,httpd,named,nscd,ntpd,portmap,snmpd,squid,以及 syslogd)受保护 - -- Strict — 对所有进程完全的 SELinux 保护 - -你可以在 /etc/selinux/config 文件中修改策略类型。用你喜欢的编辑器打开这个文件找到这一行: - ->SELINUXTYPE=targeted - -修改这个选项为 targeted 或 strict 以满足你的需求。 - -### 检查完整的 SELinux 状态 - -有个方便的 SELinux 工具,你可能想要用它来获取你启用了 SELinux 的系统的详细状态报告。这个命令在终端像这样运行: - ->sestatus -v - -你可以看到像图 4 那样的输出。 - -![](https://www.linux.com/images/stories/66866/jack-selinux_d.png) - ->图 4:sestatus -v 命令的输出。 - -### 仅是皮毛 - -和你预想的一样,我只介绍了 SELinux 的一点皮毛。SELinux 的确是个复杂的系统,想要更扎实地理解它是如何工作的,以及了解如何让它更好地为你的桌面或服务器工作需要更加地深入。我的内容还没有覆盖到疑难解答和创建自定义 SELinux 策略。 - -SELinux 是所有 Linux 管理员都应该知道的强大工具。现在已经向你介绍了 SELinux,我强烈推荐你回到 Linux.com(当有更多关于此话题的文章发表的时候)或看看 [NSA SELinux 文档][3] 获得更加深入的指南。 - -LCTT - 相关阅读:[鸟哥的 Linux 私房菜——程序管理与 SELinux 初探][4] - - --------------------------------------------------------------------------------- - -via: https://www.linux.com/learn/docs/ldp/883671-an-introduction-to-selinux - -作者:[Jack Wallen][a] -译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.com/community/forums/person/93 -[1]: http://selinuxproject.org/page/Main_Page -[2]: https://www.nsa.gov/research/selinux/ -[3]: https://www.nsa.gov/research/selinux/docs.shtml -[4]: http://vbird.dic.ksu.edu.tw/linux_basic/0440processcontrol_5.php From 64d68242cb87e5c4cd87499f8190d40226ec2e0c Mon Sep 17 00:00:00 2001 From: tinyeyeser Date: Mon, 9 May 2016 14:53:51 +0800 Subject: [PATCH 1355/1710] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=20by?= =?UTF-8?q?=E5=B0=8F=E7=9C=BC=E5=84=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20151122 Doubly linked list in the Linux Kernel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20151122 Doubly linked list in the Linux Kernel.md b/translated/tech/20151122 Doubly linked list in the Linux Kernel.md index c11e968a18..1a5772320e 100644 --- a/translated/tech/20151122 Doubly linked list in the Linux Kernel.md +++ b/translated/tech/20151122 Doubly linked list in the Linux Kernel.md @@ -253,6 +253,6 @@ int main() { via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/dlist.md 译者:[Ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Mr小眼儿](https://github.com/tinyeyeser) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ea9da368369434f87c40b4f17607c1d477a54379 Mon Sep 17 00:00:00 2001 From: tinyeyeser Date: Mon, 9 May 2016 15:59:42 +0800 Subject: [PATCH 1356/1710] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=20by?= =?UTF-8?q?=E5=B0=8F=E7=9C=BC=E5=84=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Tape Managements Commands For Sysadmins.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md index f115444665..1985d63960 100644 --- a/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md +++ b/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md @@ -1,6 +1,6 @@ -15条给系统管理员的实用 Linux/Unix 磁带管理命令 +给系统管理员的15条实用 Linux/Unix 磁带管理命令 ================================================================================ -磁带设备应只用于定期的文件归档或将数据从一台服务器传送至另一台。通常磁带设备与 Unix 机器连接,用 mt 或 mtx 控制。你可以将所有的数据备份到磁盘(也许是云中)和磁带设备。在这个教程中你将会了解到: +磁带设备应只用于定期的文件归档或将数据从一台服务器传送至另一台。通常磁带设备与 Unix 机器连接,用 mt 或 mtx 控制。强烈建议您将所有的数据同时备份到磁盘(也许是云中)和磁带设备中。在本教程中你将会了解到: - 磁带设备名 - 管理磁带驱动器的基本命令 @@ -8,12 +8,13 @@ ### 为什么备份? ### -一个备份设备是很重要的: +一个备份计划对定期备份文件来说很有必要,如果你宁愿选择不备份,那么丢失重要数据的风险会大大增加。有了备份,你就有了从磁盘故障中恢复的能力。备份还可以帮助你抵御: -- 从磁盘故障中恢复的能力 - 意外的文件删除 - 文件或文件系统损坏 - 服务器完全毁坏,包括由于火灾或其他问题导致的同盘备份毁坏 +- 硬盘或SSD崩溃 +- 病毒或勒索软件破坏或删除文件 你可以使用磁带归档备份整个服务器并将其离线存储。 @@ -23,7 +24,7 @@ 图01:磁带文件标记 -每个磁带设备能存储多个备份文件。磁带备份文件通过 cpio,tar,dd 等命令创建。但是,磁带设备可以由各种程序打开,写入数据,并关闭。你可以存储若干备份(磁带文件)到一个物理磁带上。在每个磁带文件之间有个“磁带文件标记”。这个是用来指示一个物理磁带上磁带文件的结尾以及另一个文件的开始。你需要使用 mt 命令来定位磁带(快进,倒带和标记)。 +每个磁带设备能存储多个备份文件。磁带备份文件通过 cpio,tar,dd 等命令创建。同时,磁带设备可以由多种程序打开、写入数据、及关闭。你可以存储若干备份(磁带文件)到一个物理磁带上。在每个磁带文件之间有个“磁带文件标记”。这用来指示一个物理磁带上磁带文件的结尾以及另一个文件的开始。你需要使用 mt 命令来定位磁带(快进,倒带和标记)。 #### 磁带上的数据是如何存储的 #### @@ -87,7 +88,7 @@ 图03:Linux 服务器上已安装的磁带设备 -### mt 命令实例 ### +### mt 命令示例 ### 在 Linux 和类Unix系统上,mt 命令用来控制磁带驱动器的操作,比如查看状态或查找磁带上的文件或写入磁带控制标记。下列大多数命令需要作为 root 用户执行。语法如下: @@ -111,7 +112,7 @@ mt -f /dev/nsa0 status #FreeBSD mt -f /dev/rmt/1 status #Unix unity 1 也就是 tape device no. 1 -你可以像下面一样使用 shell 循环调查系统并定位所有的磁带驱动器: +你可以像下面一样使用 shell 循环语句遍历一个系统并定位其所有的磁带驱动器: for d in 0 1 2 3 4 5 do @@ -133,7 +134,7 @@ mt -f /dev/mt/0 off mt -f /dev/st0 eject -### 4:擦除磁带(倒带,在可以的情况下卸载磁带) ### +### 4:擦除磁带(倒带,在支持的情况下卸载磁带) ### mt erase mt -f /dev/st0 erase #Linux @@ -179,7 +180,7 @@ bsfm 后退指定的文件标记数目。磁带定位在下一个文件的第一块。 - asf The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks.磁带定位在 + asf 磁带定位在指定文件标记数目的开始位置。定位通过先倒带,再前进指定的文件标记数目来实现。 fsr 前进指定的记录数。 @@ -413,7 +414,7 @@ via: http://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands 作者:Vivek Gite 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Mr小眼儿](https://github.com/tinyeyeser) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0f73a1098ef6b7a3bc3155d754ebeb72a65cb546 Mon Sep 17 00:00:00 2001 From: hkurj <663831938@qq.com> Date: Mon, 9 May 2016 21:35:09 +0800 Subject: [PATCH 1357/1710] hkurj translating --- ...60415 A four year, action-packed experience with Wikipedia.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md b/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md index 9c45c209e9..4621c50a97 100644 --- a/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md +++ b/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md @@ -1,3 +1,4 @@ +hkurj translating A four year, action-packed experience with Wikipedia ======================================================= From 9243e460525bcf3a2a99b36df0a77d3445c63c29 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 10 May 2016 05:13:47 +0800 Subject: [PATCH 1358/1710] PUB:20151202 8 things to do after installing openSUSE Leap 42.1 @alim0x @carolinewuyan --- ... do after installing openSUSE Leap 42.1.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) rename {translated/tech => published}/20151202 8 things to do after installing openSUSE Leap 42.1.md (87%) diff --git a/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md b/published/20151202 8 things to do after installing openSUSE Leap 42.1.md similarity index 87% rename from translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md rename to published/20151202 8 things to do after installing openSUSE Leap 42.1.md index ef5434da3d..38cefbf356 100644 --- a/translated/tech/20151202 8 things to do after installing openSUSE Leap 42.1.md +++ b/published/20151202 8 things to do after installing openSUSE Leap 42.1.md @@ -1,20 +1,22 @@ 安装 openSUSE Leap 42.1 之后要做的 8 件事 ================================================================================ ![Credit: Metropolitan Transportation/Flicrk](http://images.techhive.com/images/article/2015/11/things-to-do-100626947-primary.idge.jpg) -致谢:[Metropolitan Transportation/Flicrk][1] -> 你已经在你的电脑上安装了 openSUSE,这是你接下来要做的。 +*致谢:[Metropolitan Transportation/Flicrk][1]* -[openSUSE Leap 确实是个巨大的飞跃][2],它允许用户运行一个和 SUSE Linux 企业版拥有一样基因的发行版。和其它系统一样,为了实现最佳的使用效果,在使用它之前需要做些优化设置。 +> 如果你已经在你的电脑上安装了 openSUSE,这就是你接下来要做的。 -下面是一些我在我的电脑上安装 openSUSE Leap 之后做的一些事情(不适用于服务器)。这里面没有强制性要求的设置,基本安装对你来说也可能足够了。但如果你想获得更好的 openSUSE Leap 体验,那就跟着我往下看吧。 +[openSUSE Leap 确实是个巨大的飞跃][2],它允许用户运行一个和 SUSE Linux 企业版拥有同样基因的发行版。和其它系统一样,为了实现最佳的使用效果,在使用它之前需要做些优化设置。 + +下面是一些我在我的电脑上安装 openSUSE Leap 之后做的一些事情(不适用于服务器)。这里面没有强制性的设置,基本安装对你来说也可能足够了。但如果你想获得更好的 openSUSE Leap 体验,那就跟着我往下看吧。 ### 1. 添加 Packman 仓库 ### 由于专利和授权等原因,openSUSE 和许多 Linux 发行版一样,不通过官方仓库(repos)提供一些软件、解码器,以及驱动等。取而代之的是通过第三方或社区仓库来提供。第一个也是最重要的仓库是“Packman”。因为这些仓库不是默认启用的,我们需要添加它们。你可以通过 YaST(openSUSE 的特色之一)或者命令行完成(如下方介绍)。 ![o42 yast repo](http://images.techhive.com/images/article/2015/11/o42-yast-repo-100626952-large970.idge.png) -添加 Packman 仓库。 + +*添加 Packman 仓库。* 使用 YaST,打开软件源部分。点击“添加”按钮并选择“社区仓库(Community Repositories)”。点击“下一步”。一旦仓库列表加载出来了,选择 Packman 仓库。点击“确认”,然后点击“信任”导入信任的 GnuPG 密钥。 @@ -58,7 +60,7 @@ openSUSE 的默认浏览器是 Firefox。但是因为 Firefox 不能够播放专 ### 5. 安装 Nvidia 驱动 ### -即便你有 Nvidia 或 ATI 显卡,openSUSE Leap 也能够开箱即用。但是,如果你需要专有驱动来游戏或其它目的,你可以安装这些驱动,但需要一点额外的工作。 +即便你使用 Nvidia 或 ATI 显卡,openSUSE Leap 也能够开箱即用。但是,如果你需要专有驱动来游戏或其它目的,你可以安装这些驱动,但需要一点额外的工作。 首先你需要添加 Nvidia 源;它的步骤和使用 YaST 添加 Packman 仓库是一样的。唯一的不同是你需要在社区仓库部分选择 Nvidia。添加好了之后,到 **软件管理 > 附加** 去并选择“附加/安装所有匹配的推荐包”。 @@ -76,14 +78,15 @@ openSUSE 的默认浏览器是 Firefox。但是因为 Firefox 不能够播放专 ### 7. 安装你喜欢的电子邮件客户端 ### -openSUSE 自带 Kmail 或 Evolution,这取决于你安装的桌面环境。我用的是 Plasma,自带 Kmail,这个邮件客户端还有许多地方有待改进。我建议可以试试 Thunderbird 或 Evolution。所有主要的邮件客户端都能在官方仓库找到。你还可以看看我[精心挑选的 Linux 最佳邮件客户端][7]。 +openSUSE 自带 Kmail 或 Evolution,这取决于你安装的桌面环境。我用的是 KDE Plasma 自带的 Kmail,这个邮件客户端还有许多地方有待改进。我建议可以试试 Thunderbird 或 Evolution。所有主要的邮件客户端都能在官方仓库找到。你还可以看看我[精心挑选的 Linux 最佳邮件客户端][7]。 ### 8. 在防火墙允许 Samba 服务 ### 相比于其它发行版,openSUSE 默认提供了更加安全的系统。但对新用户来说它也需要一点设置。如果你正在使用 Samba 协议分享文件到本地网络的话,你需要在防火墙允许该服务。 ![o42 firewall](http://images.techhive.com/images/article/2015/11/o42-firewall-100626948-large970.idge.png) -在防火墙设置里允许 Samba 客户端和服务端 + +*在防火墙设置里允许 Samba 客户端和服务端* 打开 YaST 并搜索 Firewall。在防火墙设置里,进入到“允许的服务(Allowed Services)”,你会在“要允许的服务(Service to allow)”下面看到一个下拉列表。选择“Samba 客户端”,然后点击“添加”。同样方法添加“Samba 服务器”。都添加了之后,点击“下一步”,然后点击“完成”,现在你就可以通过本地网络从你的 openSUSE 分享文件以及访问其它机器了。 From 1b7fb67c2a58df07ad86c982174d575983fd7bab Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 10 May 2016 05:37:20 +0800 Subject: [PATCH 1359/1710] PUB:20151122 Doubly linked list in the Linux Kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @oska874 @tinyeyeser 可以将译文投递到原项目处 --- ... Doubly linked list in the Linux Kernel.md | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) rename {translated/tech => published}/20151122 Doubly linked list in the Linux Kernel.md (73%) diff --git a/translated/tech/20151122 Doubly linked list in the Linux Kernel.md b/published/20151122 Doubly linked list in the Linux Kernel.md similarity index 73% rename from translated/tech/20151122 Doubly linked list in the Linux Kernel.md rename to published/20151122 Doubly linked list in the Linux Kernel.md index 1a5772320e..d21ae7ded6 100644 --- a/translated/tech/20151122 Doubly linked list in the Linux Kernel.md +++ b/published/20151122 Doubly linked list in the Linux Kernel.md @@ -4,10 +4,9 @@ Linux 内核里的数据结构——双向链表 双向链表 -------------------------------------------------------------------------------- +Linux 内核中自己实现了双向链表,可以在 [include/linux/list.h](https://github.com/torvalds/linux/blob/master/include/linux/list.h) 找到定义。我们将会首先从双向链表数据结构开始介绍**内核里的数据结构**。为什么?因为它在内核里使用的很广泛,你只需要在 [free-electrons.com](http://lxr.free-electrons.com/ident?i=list_head) 检索一下就知道了。 -Linux 内核自己实现了双向链表,可以在[include/linux/list.h](https://github.com/torvalds/linux/blob/master/include/linux/list.h)找到定义。我们将会从双向链表数据结构开始介绍`内核里的数据结构`。为什么?因为它在内核里使用的很广泛,你只需要在[free-electrons.com](http://lxr.free-electrons.com/ident?i=list_head) 检索一下就知道了。 - -首先让我们看一下在[include/linux/types.h](https://github.com/torvalds/linux/blob/master/include/linux/types.h) 里的主结构体: +首先让我们看一下在 [include/linux/types.h](https://github.com/torvalds/linux/blob/master/include/linux/types.h) 里的主结构体: ```C struct list_head { @@ -15,7 +14,7 @@ struct list_head { }; ``` -你可能注意到这和你以前见过的双向链表的实现方法是不同的。举个例子来说,在[glib](http://www.gnu.org/software/libc/) 库里是这样实现的: +你可能注意到这和你以前见过的双向链表的实现方法是不同的。举个例子来说,在 [glib](http://www.gnu.org/software/libc/) 库里是这样实现的: ```C struct GList { @@ -25,7 +24,7 @@ struct GList { }; ``` -通常来说一个链表结构会包含一个指向某个项目的指针。但是Linux内核中的链表实现并没有这样做。所以问题来了:`链表在哪里保存数据呢?`。实际上,内核里实现的链表是`侵入式链表`。侵入式链表并不在节点内保存数据-它的节点仅仅包含指向前后节点的指针,以及指向链表节点数据部分的指针——数据就是这样附加在链表上的。这就使得这个数据结构是通用的,使用起来就不需要考虑节点数据的类型了。 +通常来说一个链表结构会包含一个指向某个项目的指针。但是 Linux 内核中的链表实现并没有这样做。所以问题来了:**链表在哪里保存数据呢?**。实际上,内核里实现的链表是**侵入式链表(Intrusive list)**。侵入式链表并不在节点内保存数据-它的节点仅仅包含指向前后节点的指针,以及指向链表节点数据部分的指针——数据就是这样附加在链表上的。这就使得这个数据结构是通用的,使用起来就不需要考虑节点数据的类型了。 比如: @@ -36,7 +35,7 @@ struct nmi_desc { }; ``` -让我们看几个例子来理解一下在内核里是如何使用`list_head` 的。如上所述,在内核里有很多很多不同的地方都用到了链表。我们来看一个在杂项字符驱动里面的使用的例子。在 [drivers/char/misc.c](https://github.com/torvalds/linux/blob/master/drivers/char/misc.c) 的杂项字符驱动API 被用来编写处理小型硬件或虚拟设备的小驱动。这些驱动共享相同的主设备号: +让我们看几个例子来理解一下在内核里是如何使用 `list_head` 的。如上所述,在内核里有很多很多不同的地方都用到了链表。我们来看一个在杂项字符驱动里面的使用的例子。在 [drivers/char/misc.c](https://github.com/torvalds/linux/blob/master/drivers/char/misc.c) 的杂项字符驱动 API 被用来编写处理小型硬件或虚拟设备的小驱动。这些驱动共享相同的主设备号: ```C #define MISC_MAJOR 10 @@ -68,7 +67,7 @@ crw------- 1 root root 10, 63 Mar 21 12:01 vga_arbiter crw------- 1 root root 10, 137 Mar 21 12:01 vhci ``` -现在让我们看看它是如何使用链表的。首先看一下结构体`miscdevice`: +现在让我们看看它是如何使用链表的。首先看一下结构体 `miscdevice`: ```C struct miscdevice @@ -97,13 +96,13 @@ static LIST_HEAD(misc_list); struct list_head name = LIST_HEAD_INIT(name) ``` -然后使用宏`LIST_HEAD_INIT` 进行初始化,这会使用变量`name` 的地址来填充`prev`和`next` 结构体的两个变量。 +然后使用宏 `LIST_HEAD_INIT` 进行初始化,这会使用变量`name` 的地址来填充`prev`和`next` 结构体的两个变量。 ```C #define LIST_HEAD_INIT(name) { &(name), &(name) } ``` -现在来看看注册杂项设备的函数`misc_register`。它在开始就用函数 `INIT_LIST_HEAD` 初始化了`miscdevice->list`。 +现在来看看注册杂项设备的函数`misc_register`。它在一开始就用函数 `INIT_LIST_HEAD` 初始化了`miscdevice->list`。 ```C INIT_LIST_HEAD(&misc->list); @@ -125,7 +124,7 @@ static inline void INIT_LIST_HEAD(struct list_head *list) list_add(&misc->list, &misc_list); ``` -内核文件`list.h` 提供了向链表添加新项的API 接口。我们来看看它的实现: +内核文件`list.h` 提供了向链表添加新项的 API 接口。我们来看看它的实现: ```C @@ -205,9 +204,9 @@ int main() { } ``` -最终会打印`2` +最终会打印出`2` -下一点就是`typeof`,它也很简单。就如你从名字所理解的,它仅仅返回了给定变量的类型。当我第一次看到宏`container_of`的实现时,让我觉得最奇怪的就是表达式`((type *)0)`中的0.实际上这个指针巧妙的计算了从结构体特定变量的偏移,这里的`0`刚好就是位宽里的零偏移。让我们看一个简单的例子: +下一点就是`typeof`,它也很简单。就如你从名字所理解的,它仅仅返回了给定变量的类型。当我第一次看到宏`container_of`的实现时,让我觉得最奇怪的就是表达式`((type *)0)`中的0。实际上这个指针巧妙的计算了从结构体特定变量的偏移,这里的`0`刚好就是位宽里的零偏移。让我们看一个简单的例子: ```C #include @@ -236,21 +235,23 @@ int main() { 当然了`list_add` 和 `list_entry`不是``提供的唯一功能。双向链表的实现还提供了如下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 +* 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 等等很多其它API。 -via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/dlist.md +---- + +via: https://github.com/0xAX/linux-insides/blob/master/DataStructures/dlist.md 译者:[Ezio](https://github.com/oska874) 校对:[Mr小眼儿](https://github.com/tinyeyeser) From 8b1a24ceab9827616e930d978773f604952034e2 Mon Sep 17 00:00:00 2001 From: tinyeyeser Date: Tue, 10 May 2016 16:20:25 +0800 Subject: [PATCH 1360/1710] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=20by?= =?UTF-8?q?=E5=B0=8F=E7=9C=BC=E5=84=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Top 4 open source issue tracking tools.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/20160218 Top 4 open source issue tracking tools.md b/translated/tech/20160218 Top 4 open source issue tracking tools.md index 840a3d80fc..1ffd21a759 100644 --- a/translated/tech/20160218 Top 4 open source issue tracking tools.md +++ b/translated/tech/20160218 Top 4 open source issue tracking tools.md @@ -1,19 +1,19 @@ -排名前4的开源漏洞追踪工具 +开源问题跟踪管理工具Top4 ======================================== -生活充满了漏洞。 +生活充满了bug。 -无论怎样小心计划,无论花多少时间去设计,在执行阶段当轮胎压在路上,任何工程都会有未知的问题。也无妨。也许对于任何一个组织的最佳弹性衡量不是他们如何一切都按计划运行地处理事情,而是,当出现磕磕碰碰时他们处理速度。 +无论怎样小心计划,无论花多少时间去设计,在执行阶段当轮胎压在路上,任何工程都会有未知的问题。也无妨。也许对于任何一个组织的最佳弹性衡量不是他们如何一切都按计划运行地处理事情,而是,当出现磕磕碰碰时他们如何驾驭。 -一个任意工程管理流程的关键工具,特别是在软件开发领域,是一个问题追踪系统。基础很简单;允许漏洞在合作的方式被打开,追踪,和解决,同时很容易跟随进展。除了基本功能,还有很多专注于满足特定需求的选择,和使用案例,包括软件开发和更多。你可能熟悉托管版本的这些工具,像 [GitHub Issues](https://guides.github.com/features/issues/)或者[Launchpad](https://launchpad.net/),这些是他们自己开放的资源。 +对任何一个项目管理流程来说,特别是在软件开发领域,都需要一个关键工具——问题跟踪管理系统。其基本功能很简单:可以对bug进行查看、追踪,并以协作的方式解决bug,有了它,我们更容易跟随整个过程的进展。除了基本功能,还有很多专注于满足特定需求的选项及功能,使用场景不仅限于软件开发。你可能已经熟悉某些托管版本的工具,像 [GitHub Issues](https://guides.github.com/features/issues/)或者[Launchpad](https://launchpad.net/),其中一些工具已经有了自己的开源社区。 -让我们看一看四个管理漏洞和问题的优秀选择,全部开源代码、易于下载和自我托管。要清楚,我们可能没有办法在这里列出每一个问题跟踪工具;然而,这有四个我们偏爱的,基于功能丰富和项目背后的社区项目的规模。还有其他,可以肯定的是,如果你有一个好的理由你喜欢的没有列在这里,一定要让我们知道这是你最喜欢的工具,在下面的评论中使它脱颖而出。 +接下来,这四个bug问题跟踪管理软件的极佳备选,全部开源、易于下载,自己就可以部署。先说好,我们可能没有办法在这里列出每一个问题跟踪工具;相反,我们列出这四个,基于的是其丰富的功能和项目背后的社区规模。当然,肯定还有其他类似软件,如果你喜欢的没有列在这里,如果你有一个好的理由,一定要让我们知道,在下面的评论中使它脱颖而出吧。 ## Redmine -[Redmine](http://www.redmine.org/) 是一个流行的漏洞追踪工具建立在Ruby on Rails和可以追溯到2006年。很多类似于Trac,另一方面我们最爱的是,Redmine可以管理多个项目然后整合了多种版本控制系统。除了基本问题追踪,Redmine也提供论坛,wiki,时间跟踪工具,和生成甘特图和日历的能力来跟踪项目的进展。 +[Redmine](http://www.redmine.org/) 是一个很流行的追踪管理工具,基于Ruby on Rails构建,可以追溯到2006年。很多方面类似于Trac(另一个我们的最爱),Redmine可以管理多个项目,整合了多种版本控制系统。除了基本问题追踪,Redmine也提供论坛,wiki,时间跟踪工具,同时,它还具有生成甘特图表(Gantt charts)和日历的能力,用来跟踪项目的进展。 -Redmine的设置相当灵活,支持多种数据库后端和几十种语言,还是可定制的,可以添加自定义字段到问题,用户,工程和更多。通过社区创建的插件和主题它可以进一步定制。 +Redmine的设置相当灵活,支持多种数据库后端和几十种语言,还是可定制的,可以向问题(issue)、用户、工程等添加自定义字段。通过社区创建的插件和主题它可以进一步定制。 如果你想试一试,一个[在线演示](http://demo.redmine.org/)可提供使用。Redmine在开源[GPL版本2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)下许可;开源代码可以在工程的[svn仓库](https://svn.redmine.org/redmine)或在[GitHub](https://github.com/redmine/redmine)镜像上找到。 @@ -21,19 +21,19 @@ Redmine的设置相当灵活,支持多种数据库后端和几十种语言, ## Bugzilla -[Bugzilla](https://www.bugzilla.org/)是另一个流行的有漏洞追踪功能的开发工具。从名字您可能已经猜到了,Bugzilla最初是[Mozilla基金会](https://www.mozilla.org/en-US/)创建,用来跟踪当时称为网景通信套件开发漏洞的。为了更好的通过性从原来的Tcl移植到Perl路径,Bugzilla是一个比较老的和更广泛采用的问题跟踪系统,因为它用在许多著名的开源项目如GNOME,KDE,Linux内核本身。 +[Bugzilla](https://www.bugzilla.org/)是另一个流行的具备问题跟踪能力的开发工具。从名字您可能已经猜到了,Bugzilla最初是[Mozilla基金会](https://www.mozilla.org/en-US/)创建的,用来跟踪当时称为网景通信套件中的bug。为了更好的可读性,它从原来的Tcl移植到Perl,Bugzilla是一个比较老,但却广泛采用的问题跟踪系统,它被用在许多著名的开源项目如GNOME、KDE,以及Linux内核本身。 -拥有一些先进的工具,从通知到共享搜索重复的漏洞检测,Bugzilla是一个功能更丰富的选项。Bugzilla有高级搜索系统与全面的报表工具,生成图表和自动化计划报告的能力。像Redmine,Bugzilla是可扩展和可定制的,两者在字段本身像能创建自定义漏洞工作流一样。它也支持多种后端数据库,和自带的多语言支持。 +从通知到重复bug检测再到搜索共享,Bugzilla拥有许多高级工具,是一个功能更丰富的选项。Bugzilla拥有一套高级搜索系统以及全面的报表工具,具有生成图表和自动化按计划生成报告的能力。像Redmine一样,Bugzilla是可扩展和可定制的,除了字段本身,还能针对bug创建自定义工作流。它也支持多种后端数据库,和自带的多语言支持。 -Bugzilla在[Mozilla公共许可证](https://en.wikipedia.org/wiki/Mozilla_Public_License)下许可,你可以读取他们[未来路线图](https://www.bugzilla.org/status/roadmap.html)还有在官网尝试一个[示例服务](https://landfill.bugzilla.org/) +Bugzilla在[Mozilla公共许可证](https://en.wikipedia.org/wiki/Mozilla_Public_License)下许可,你可以读取他们的[未来路线图](https://www.bugzilla.org/status/roadmap.html)还有在官网尝试一个[示例服务](https://landfill.bugzilla.org/) ![](https://opensource.com/sites/default/files/images/business-uploads/issues-bugzilla.png) ## Trac -[Trac](http://trac.edgewall.org/browser)自称是使用简单的方法基于web的软件工程管理软件,但不要混淆极简主义与缺乏功能。 +[Trac](http://trac.edgewall.org/browser)自称是基于web的极简主义软件工程管理软件,这里请不要混淆极简主义与缺乏功能。 -python编写,Trac紧密结合它的漏洞跟踪与它的wiki系统和你选择的版本控制系统。项目管理能力突出,如生成的里程碑和路线图,一个可定制的报表系统,大事记,支持多资源库,内置的垃圾邮件过滤,还可以使用很多一般的语言。如其他漏洞追踪软件我们已经看到,有很多插件可进一步扩展其基本特性。 +由python编写的Trac,将其漏洞跟踪能力与它的wiki系统和版本控制系统轻度整合。项目管理能力突出,如生成里程碑和路线图,一个可定制的报表系统,大事记,支持多资源库,内置的垃圾邮件过滤,还可以使用很多通用语言。如其他我们已经看到的漏洞追踪软件,有很多插件可进一步扩展其基本特性。 Trac是在改进的[BSD许可](http://trac.edgewall.org/wiki/TracLicense)下获得开放源码许可,虽然更老的版本发布在GPL下。你可以在一个[自托管仓库](http://trac.edgewall.org/browser)预览Trac的源码或者查看他们的[路线图](http://trac.edgewall.org/wiki/TracRoadmap)对未来的规划。 @@ -41,13 +41,13 @@ Trac是在改进的[BSD许可](http://trac.edgewall.org/wiki/TracLicense)下获 ## Mantis -[Mantis](https://www.mantisbt.org/)是这次收集中我们将看的最后一个工具,一个基于PHP且有16年历史的漏洞跟踪工具。另外漏洞跟踪支持多种不同的版本控制系统和一个事件驱动的通知系统,Mantis有一个与其他工具类似的功能设置。虽然它不本身包含一个wiki,它整合很多流行的wiki平台且本地化到多种语言。 +[Mantis](https://www.mantisbt.org/)是这次合集中我们将看到的最后一个工具,基于PHP,且有16年历史。作为另一个支持多种不同版本控制系统和事件驱动通知系统的bug跟踪管理软件,Mantis有一个与其他工具类似的功能设置。虽然它不本身包含wiki,但它整合了很多流行的wiki平台且本地化到多种语言。 Mantis在[GPL版本2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)下获得开源许可证书;你可以在[GitHub](https://github.com/mantisbt/mantisbt)浏览他的源代码或查看自托管[路线图](https://www.mantisbt.org/bugs/roadmap_page.php?project=mantisbt&version=1.3.x)对未来的规划。一个示例,你可以查看他们的内部[漏洞跟踪](https://www.mantisbt.org/bugs/my_view_page.php)。 ![](https://opensource.com/sites/default/files/images/business-uploads/issues-mantis.png) -正如我们指出的,这四个不是唯一的选项。想要探索更多?[Apache Bloodhound](https://issues.apache.org/bloodhound/),[Fossil](http://fossil-scm.org/index.html/doc/trunk/www/index.wiki),[The Bug Genie](http://www.thebuggenie.com/),还有很多可替换品都有专注的追随者,每个都有不同的优点和缺点。另外,一些工具在我们[项目管理](https://opensource.com/business/15/1/top-project-management-tools-2015)摘要有问题跟踪功能。所以,哪个是你首选的跟踪和挤压漏洞的工具? +正如我们指出的,这四个不是唯一的选项。想要探索更多?[Apache Bloodhound](https://issues.apache.org/bloodhound/),[Fossil](http://fossil-scm.org/index.html/doc/trunk/www/index.wiki),[The Bug Genie](http://www.thebuggenie.com/),还有很多可替换品都有专注的追随者,每个都有不同的优点和缺点。另外,一些工具在我们[项目管理](https://opensource.com/business/15/1/top-project-management-tools-2015)摘要有问题跟踪功能。所以,哪个是你首选的跟踪和碾压bug的工具? ------------------------------------------------------------------------------ @@ -56,7 +56,7 @@ via: https://opensource.com/business/16/2/top-issue-support-and-bug-tracking-too 作者:[Jason Baker][a] 译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Mr小眼儿](https://github.com/tinyeyeser) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b1c5b451bfeb13a9333a18056925f4f968d90adc Mon Sep 17 00:00:00 2001 From: VicYu Date: Tue, 10 May 2016 17:51:42 +0800 Subject: [PATCH 1361/1710] Translated 20160429 Master OpenStack with 5 new tutorials.md --- ...9 Master OpenStack with 5 new tutorials.md | 39 ------------------- ...9 Master OpenStack with 5 new tutorials.md | 37 ++++++++++++++++++ 2 files changed, 37 insertions(+), 39 deletions(-) delete mode 100644 sources/tech/20160429 Master OpenStack with 5 new tutorials.md create mode 100644 translated/tech/20160429 Master OpenStack with 5 new tutorials.md diff --git a/sources/tech/20160429 Master OpenStack with 5 new tutorials.md b/sources/tech/20160429 Master OpenStack with 5 new tutorials.md deleted file mode 100644 index b43952bc2f..0000000000 --- a/sources/tech/20160429 Master OpenStack with 5 new tutorials.md +++ /dev/null @@ -1,39 +0,0 @@ - Vic020 - -Master OpenStack with 5 new tutorials -======================================= - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/EDUCATION_tools.png?itok=ybxr0Qe9) - - -Returning from OpenStack Summit this week, I am reminded of just how vast the open source cloud ecosystem is and just how many different projects and concepts you need to be familiar with in order to succeed. Although, we're actually quite fortunate with the resources available for keeping up. In addition to the [official documentation][1], many great educational tools are out there, from third party training and certification, to in-person events, and many community-contributed tutorials as well. - -To help you stay on top of things, every month we round up a collection of new tutorials, how-tos, guides, and tips created by the OpenStack community. Here are some of the great pieces published this past month. - -- First up, if you're looking for a (reasonably) affordable home OpenStack test lab, the Intel NUC is a great platform to consider. Small in form factor, but reasonably well-powered, you can get a literal stack of them running OpenStack pretty quickly with this guide to using [TripleO to deploy OpenStack][2] on the NUC, and read about some common quirks to watch out for. -- After you've been running OpenStack for a while, the various processes keeping your cloud alive have probably generated quite a pile of log files. While some are probably safe to purge, you still need to have a plan for managing them. Here are some [quick thoughts][3] on managing logs in Ceilometer after nine-months in to a production deployment. -- The OpenStack infrastructure project can be an intimidating place for a newcomer just trying to land a patch. What's a gate job, what's a test, and what are all of these steps my commit is going through? Get a quick overview of the whole process from Arie Bregman in this [handy blog post][4]. -- Compute hosts fail occasionally, and whether the cause is hardware or software, the good news is that OpenStack makes it easy to migrate your running instance to another host. However, some people have found the commands to perform this migration a little confusing. Learn the difference between the migrate and evacuate commands in plain English in [this great writeup][5]. -- Network Functions Virtualization technologies require some functionality from OpenStack that are outside of what other users might be familiar with. For example, SR-IOV and PCI passthrough are ways of exposing physical hardware directly for maximizing performance. Learn the [steps involved][6] to make this happen within an OpenStack deployment. - -That wraps up our collection for this month, but if you're still looking for more, be sure to check out our past archive of [OpenStack tutorials][7] for even more learning resources. And if there's a tutorial or guide you think we ought to include in our next roundup, be sure to let us know in the comments below. - ------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/4/master-openstack-new-tutorials - -作者:[Jason Baker][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jason-baker - -[1]: http://docs.openstack.org/ -[2]: http://acksyn.org/posts/2016/03/tripleo-on-nucs/ -[3]: http://silverskysoft.com/open-stack-xwrpr/2016/03/long-term-openstack-usage-summary/ -[4]: http://abregman.com/2016/03/05/openstack-infra-jenkins-jobs/ -[5]: http://www.danplanet.com/blog/2016/03/03/evacuate-in-nova-one-command-to-confuse-us-all/ -[6]: https://trickycloud.wordpress.com/2016/03/28/openstack-for-nfv-applications-sr-iov-and-pci-passthrough/ -[7]: https://opensource.com/resources/openstack-tutorials diff --git a/translated/tech/20160429 Master OpenStack with 5 new tutorials.md b/translated/tech/20160429 Master OpenStack with 5 new tutorials.md new file mode 100644 index 0000000000..18cbbf2435 --- /dev/null +++ b/translated/tech/20160429 Master OpenStack with 5 new tutorials.md @@ -0,0 +1,37 @@ +Master OpenStack with 5 new tutorials +5篇文章快速掌握OpenStack +======================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/EDUCATION_tools.png?itok=ybxr0Qe9) + +回顾这周的OpenStack峰会,我仍然回味着开源云生态系统的浩瀚无垠,并且需要熟悉多少个不同的项目和概念才能获得成功.但是,我们却如此的幸运有许多资源让我们跟随项目的脚步.不单是[官方文档][1],还包括了许多学习的工具,来自三方的组织的培训和认证,也有个人的分享,以及许多社区贡献的教程. + +为了让我们保持获得最新消息,每一个月我们将会整合发布,penStack社区的最新教程,指导,和小贴士等.下面是我们过去几个月最棒的发布分享. + +- 首先,如果你正在寻找一个靠谱实惠的OpenStack测试实验室,Intel NUC是最值得考虑的平台.麻雀虽小,五脏俱全,通过指导文章,可以很轻松的按照教程在NUC上使用[Triple0部署OpenStack][2],并且还可以轻松预防一些常见的怪异问题. +- 当你已经运行的一段时间OpenStack后,你会发现在你的云系统上许多组件生成了大量日志.其中一些是可以安全删除的,你同样需要一个计划去管理这些日志.参看这篇文章[突然的想法][3]学习在部署9个月后Celiometer上如何管理日志. +- 对于OpenStack基础设施项目的新手,想要提交补丁到OpenStack是相当困难的.入口在哪里,测试怎么做,我的提交步骤是怎么样的?可以通过Arie Bregman的[博客文章][4]快速了解整个提交过程. +- 突发计算节点失效,不知道是硬件还是软件问题,好消息是OpenStack提供了一套非常简单的迁移计划让当机节点迁移到别的主机.然而,许多人发现使用这个命令总会遇到一些问题.可以学习[这篇文章][5]来理解migrate和evacuate命令的不同. +- 网络功能虚拟化技术需要OpenStack的额外用户不熟悉的知识。例如,SR-IOV和PCI直通是最大限度地提高物理硬件性能的方式.学习[部署步骤][6]使OpenStack部署获得更多效能. + +这些文章基本涵盖了本月推送,如果你还需要更多文章,可以检索过去推送的[OpenStack文献][7]来获取更多资源.如果有新的教程或指导,你认为我们应该推荐,请在评论中告诉我们,谢谢. + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/4/master-openstack-new-tutorials + +作者:[Jason Baker][a] +译者:[VicYu/Vic020](http://vicyu.net) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jason-baker + +[1]: http://docs.openstack.org/ +[2]: http://acksyn.org/posts/2016/03/tripleo-on-nucs/ +[3]: http://silverskysoft.com/open-stack-xwrpr/2016/03/long-term-openstack-usage-summary/ +[4]: http://abregman.com/2016/03/05/openstack-infra-jenkins-jobs/ +[5]: http://www.danplanet.com/blog/2016/03/03/evacuate-in-nova-one-command-to-confuse-us-all/ +[6]: https://trickycloud.wordpress.com/2016/03/28/openstack-for-nfv-applications-sr-iov-and-pci-passthrough/ +[7]: https://opensource.com/resources/openstack-tutorials From 2d1473d3a72b7ab2615e820f119b08490263c33b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 11 May 2016 08:22:23 +0800 Subject: [PATCH 1362/1710] PUB:20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins @alim0x @tinyeyeser --- ...Tape Managements Commands For Sysadmins.md | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) rename {translated/tech => published}/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md (90%) diff --git a/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/published/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md similarity index 90% rename from translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md rename to published/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md index 1985d63960..5bf991fef4 100644 --- a/translated/tech/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md +++ b/published/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md @@ -13,7 +13,7 @@ - 意外的文件删除 - 文件或文件系统损坏 - 服务器完全毁坏,包括由于火灾或其他问题导致的同盘备份毁坏 -- 硬盘或SSD崩溃 +- 硬盘或 SSD 崩溃 - 病毒或勒索软件破坏或删除文件 你可以使用磁带归档备份整个服务器并将其离线存储。 @@ -22,7 +22,7 @@ ![Fig.01: Tape file marks](http://s0.cyberciti.org/uploads/cms/2015/10/tape-format.jpg) -图01:磁带文件标记 +*图01:磁带文件标记* 每个磁带设备能存储多个备份文件。磁带备份文件通过 cpio,tar,dd 等命令创建。同时,磁带设备可以由多种程序打开、写入数据、及关闭。你可以存储若干备份(磁带文件)到一个物理磁带上。在每个磁带文件之间有个“磁带文件标记”。这用来指示一个物理磁带上磁带文件的结尾以及另一个文件的开始。你需要使用 mt 命令来定位磁带(快进,倒带和标记)。 @@ -30,7 +30,7 @@ ![Fig.02: How data is stored on a tape](http://s0.cyberciti.org/uploads/cms/2015/10/how-data-is-stored-on-a-tape.jpg) -图02:磁带上的数据是如何存储的 +*图02:磁带上的数据是如何存储的* 所有的数据使用 tar 以连续磁带存储格式连续地存储。第一个磁带归档会从磁带的物理开始端开始存储(tar #0)。接下来的就是 tar #1,以此类推。 @@ -60,22 +60,22 @@ 输入下列命令: - ## Linux(更多信息参阅 man) ## + ### Linux(更多信息参阅 man) ### lsscsi lsscsi -g - ## IBM AIX ## + ### IBM AIX ### lsdev -Cc tape lsdev -Cc adsm lscfg -vl rmt* - ## Solaris Unix ## + ### Solaris Unix ### cfgadm –a cfgadm -al luxadm probe iostat -En - ## HP-UX Unix ## + ### HP-UX Unix ### ioscan Cf ioscan -funC tape ioscan -fnC tape @@ -86,11 +86,11 @@ ![Fig.03: Installed tape devices on Linux server](http://s0.cyberciti.org/uploads/cms/2015/10/linux-find-tape-devices-command.jpg) -图03:Linux 服务器上已安装的磁带设备 +*图03:Linux 服务器上已安装的磁带设备* ### mt 命令示例 ### -在 Linux 和类Unix系统上,mt 命令用来控制磁带驱动器的操作,比如查看状态或查找磁带上的文件或写入磁带控制标记。下列大多数命令需要作为 root 用户执行。语法如下: +在 Linux 和类 Unix 系统上,mt 命令用来控制磁带驱动器的操作,比如查看状态或查找磁带上的文件或写入磁带控制标记。下列大多数命令需要作为 root 用户执行。语法如下: mt -f /tape/device/name operation @@ -98,7 +98,7 @@ 你可以设置 TAPE shell 变量。这是磁带驱动器的路径名。在 FreeBSD 上默认的(如果变量没有设置,而不是 null)是 /dev/nsa0。可以通过 mt 命令的 -f 参数传递变量覆盖它,就像下面解释的那样。 - ## 添加到你的 shell 配置文件 ## + ### 添加到你的 shell 配置文件 ### TAPE=/dev/st1 #Linux TAPE=/dev/rmt/2 #Unix TAPE=/dev/nsa3 #FreeBSD @@ -106,11 +106,11 @@ ### 1:显示磁带/驱动器状态 ### - mt status #Use default - mt -f /dev/rmt/0 status #Unix - mt -f /dev/st0 status #Linux - mt -f /dev/nsa0 status #FreeBSD - mt -f /dev/rmt/1 status #Unix unity 1 也就是 tape device no. 1 + mt status ### Use default + mt -f /dev/rmt/0 status ### Unix + mt -f /dev/st0 status ### Linux + mt -f /dev/nsa0 status ### FreeBSD + mt -f /dev/rmt/1 status ### Unix unity 1 也就是 tape device no. 1 你可以像下面一样使用 shell 循环语句遍历一个系统并定位其所有的磁带驱动器: @@ -208,7 +208,7 @@ mt -f /dev/st0 rewind; dd if=/dev/st0 of=- - ## tar 格式 ## + ### tar 格式 ### tar tvf {DEVICE} {Directory-FileName} tar tvf /dev/st0 tar tvf /dev/st0 desktop @@ -216,40 +216,40 @@ ### 12:使用 dump 或 ufsdump 备份分区 ### - ## Unix 备份 c0t0d0s2 分区 ## + ### Unix 备份 c0t0d0s2 分区 ### ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s2 - ## Linux 备份 /home 分区 ## + ### Linux 备份 /home 分区 ### dump 0uf /dev/nst0 /dev/sda5 dump 0uf /dev/nst0 /home - ## FreeBSD 备份 /usr 分区 ## + ### FreeBSD 备份 /usr 分区 ### dump -0aL -b64 -f /dev/nsa0 /usr ### 12:使用 ufsrestore 或 restore 恢复分区 ### - ## Unix ## + ### Unix ### ufsrestore xf /dev/rmt/0 - ## Unix 交互式恢复 ## + ### Unix 交互式恢复 ### ufsrestore if /dev/rmt/0 - ## Linux ## + ### Linux ### restore rf /dev/nst0 - ## 从磁带媒介上的第6个备份交互式恢复 ## + ### 从磁带媒介上的第6个备份交互式恢复 ### restore isf 6 /dev/nst0 - ## FreeBSD 恢复 ufsdump 格式 ## + ### FreeBSD 恢复 ufsdump 格式 ### restore -i -f /dev/nsa0 ### 13:从磁带开头开始写入(见图02) ### - ## 这会覆盖磁带上的所有数据 ## + ### 这会覆盖磁带上的所有数据 ### mt -f /dev/st1 rewind - ### 备份 home ## + ### 备份 home ### tar cvf /dev/st1 /home - ## 离线并卸载磁带 ## + ### 离线并卸载磁带 ### mt -f /dev/st0 offline 从磁带开头开始恢复: @@ -260,22 +260,22 @@ ### 14:从最后一个 tar 后开始写入(见图02) ### - ## 这会保留之前写入的数据 ## + ### 这会保留之前写入的数据 ### mt -f /dev/st1 eom - ### 备份 home ## + ### 备份 home ### tar cvf /dev/st1 /home - ## 卸载 ## + ### 卸载 ### mt -f /dev/st0 offline ### 15:从 tar number 2 后开始写入(见图02) ### - ## 在 tar number 2 之后写入(应该是 2+1) + ### 在 tar number 2 之后写入(应该是 2+1)### mt -f /dev/st0 asf 3 tar cvf /dev/st0 /usr - ## asf 等效于 fsf ## + ### asf 等效于 fsf ### mt -f /dev/sf0 rewind mt -f /dev/st0 fsf 2 From 4cc38307f7439cc75587efa92a19aa9df6f03832 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Wed, 11 May 2016 15:12:43 +0800 Subject: [PATCH 1363/1710] Proofread 20160429 Master OpenStack with 5 new tutorials --- ...9 Master OpenStack with 5 new tutorials.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20160429 Master OpenStack with 5 new tutorials.md b/translated/tech/20160429 Master OpenStack with 5 new tutorials.md index 18cbbf2435..710baacbb3 100644 --- a/translated/tech/20160429 Master OpenStack with 5 new tutorials.md +++ b/translated/tech/20160429 Master OpenStack with 5 new tutorials.md @@ -1,20 +1,20 @@ -Master OpenStack with 5 new tutorials +MMaster OpenStack with 5 new tutorials 5篇文章快速掌握OpenStack ======================================= ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/EDUCATION_tools.png?itok=ybxr0Qe9) -回顾这周的OpenStack峰会,我仍然回味着开源云生态系统的浩瀚无垠,并且需要熟悉多少个不同的项目和概念才能获得成功.但是,我们却如此的幸运有许多资源让我们跟随项目的脚步.不单是[官方文档][1],还包括了许多学习的工具,来自三方的组织的培训和认证,也有个人的分享,以及许多社区贡献的教程. +回顾这周的 OpenStack 峰会,我仍然回味着开源云生态系统的浩瀚无垠,并且需要熟悉多少个不同的项目和概念才能获得成功。但是,我们是幸运的,因为有许多资源让我们跟随项目的脚步。除了[官方文档][1]外,我们还有许多来自三方组织的培训和认证、个人分享,以及许多社区贡献的学习资源。 -为了让我们保持获得最新消息,每一个月我们将会整合发布,penStack社区的最新教程,指导,和小贴士等.下面是我们过去几个月最棒的发布分享. +为了让我们保持获得最新消息,每个月我们将会整合发布 OpenStack 社区的最新教程、指导和小贴士等。下面是我们过去几个月最棒的发布分享。 -- 首先,如果你正在寻找一个靠谱实惠的OpenStack测试实验室,Intel NUC是最值得考虑的平台.麻雀虽小,五脏俱全,通过指导文章,可以很轻松的按照教程在NUC上使用[Triple0部署OpenStack][2],并且还可以轻松预防一些常见的怪异问题. -- 当你已经运行的一段时间OpenStack后,你会发现在你的云系统上许多组件生成了大量日志.其中一些是可以安全删除的,你同样需要一个计划去管理这些日志.参看这篇文章[突然的想法][3]学习在部署9个月后Celiometer上如何管理日志. -- 对于OpenStack基础设施项目的新手,想要提交补丁到OpenStack是相当困难的.入口在哪里,测试怎么做,我的提交步骤是怎么样的?可以通过Arie Bregman的[博客文章][4]快速了解整个提交过程. -- 突发计算节点失效,不知道是硬件还是软件问题,好消息是OpenStack提供了一套非常简单的迁移计划让当机节点迁移到别的主机.然而,许多人发现使用这个命令总会遇到一些问题.可以学习[这篇文章][5]来理解migrate和evacuate命令的不同. -- 网络功能虚拟化技术需要OpenStack的额外用户不熟悉的知识。例如,SR-IOV和PCI直通是最大限度地提高物理硬件性能的方式.学习[部署步骤][6]使OpenStack部署获得更多效能. +- 首先,如果你正在寻找一个靠谱实惠的 OpenStack 测试实验室, Intel NUC 是最值得考虑的平台.麻雀虽小,五脏俱全,通过指导文章,可以很轻松的按照教程在 NUC 上使用 [TripleO 部署 OpenStack][2] ,并且还可以轻松预防一些常见的怪异问题。 +- 当你已经运行的一段时间 OpenStack 后,你会发现在你的云系统上许多组件生成了大量日志。其中一些是可以安全删除的,而你需要一个管理这些日志的方案。参考在部署生产 9 个月后使用 Celiometer 管理日志的[一些思考][3]。 +- 对于 OpenStack 基础设施项目的新手,想要提交补丁到 OpenStack 是相当困难的。入口在哪里,测试怎么做,我的提交步骤是怎么样的?可以通过 Arie Bregman 的[博客文章][4]快速了解整个提交过程。 +- 突发计算节点失效,不知道是硬件还是软件问题。好消息是 OpenStack 提供了一套非常简单的迁移计划可以让迁移当机节点到别的主机。然而,迁移过程中使用的命令令许多人感到困惑。可以通过[这篇文章][5]来理解 migrate 和 evacuate 命令的不同。 +- 网络功能虚拟化技术需要 OpenStack 中的额外的功能,而用户可能不熟悉它们。例如, SR-IOV 和 PCI 直通是最大限度地提高物理硬件性能的方式。可以学习[部署步骤][6]以使 OpenStack 的性能最大化。 -这些文章基本涵盖了本月推送,如果你还需要更多文章,可以检索过去推送的[OpenStack文献][7]来获取更多资源.如果有新的教程或指导,你认为我们应该推荐,请在评论中告诉我们,谢谢. +这些文章基本涵盖了本月(译者注: 4 月)推送,如果你还需要更多文章,可以检索过去推送的 [OpenStack 文献][7]来获取更多资源。如果有你认为我们应该推荐的新教程,请在评论中告诉我们,谢谢。 ------------------------------------------------------------------------------ @@ -22,7 +22,7 @@ via: https://opensource.com/business/16/4/master-openstack-new-tutorials 作者:[Jason Baker][a] 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b9bff95411ad5f7737e9f1a9e0edf7c1c9165b07 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Wed, 11 May 2016 15:15:24 +0800 Subject: [PATCH 1364/1710] Proofread: Fix typo in 20160429 Master OpenStack with 5 new tutorials --- .../tech/20160429 Master OpenStack with 5 new tutorials.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20160429 Master OpenStack with 5 new tutorials.md b/translated/tech/20160429 Master OpenStack with 5 new tutorials.md index 710baacbb3..47ad95b663 100644 --- a/translated/tech/20160429 Master OpenStack with 5 new tutorials.md +++ b/translated/tech/20160429 Master OpenStack with 5 new tutorials.md @@ -1,4 +1,4 @@ -MMaster OpenStack with 5 new tutorials +Master OpenStack with 5 new tutorials 5篇文章快速掌握OpenStack ======================================= From 788dcd5af6bf05c70f6c472a45e7de66cb47d2be Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Wed, 11 May 2016 16:00:23 +0800 Subject: [PATCH 1365/1710] Proofread 20160304 Image processing at NASA with open source tools --- ...ocessing at NASA with open source tools.md | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/translated/tech/20160304 Image processing at NASA with open source tools.md b/translated/tech/20160304 Image processing at NASA with open source tools.md index e3d59b0f51..a26b96936c 100644 --- a/translated/tech/20160304 Image processing at NASA with open source tools.md +++ b/translated/tech/20160304 Image processing at NASA with open source tools.md @@ -4,27 +4,27 @@ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/nasa_spitzer_space_pink_spiral.jpg?itok=3XEUstkl) -这个已逝的夏天,我是位于格伦的 [NASA](http://www.nasa.gov/centers/glenn/home/index.html) [GVIS](https://ocio.grc.nasa.gov/gvis/) 实验室的研究生,我将我对开源的热情带到了那里。我的任务是提高我们实验室对 Dan Schroeder 开发的一个开源流体动力学模拟器的贡献。原本的模拟器为用户呈现出可以用鼠标绘制的障碍,用来计算流体动力学模型。我们团队的贡献是加入图像处理的代码,这些代码分析实况视频的每一帧以显示一个物体如何与液体相互作用。而且,我们还要做更多事情。 +在刚结束的这个夏天里,我是 [NASA 格伦中心][1] [GVIS][2] 实验室的实习生,我将我对开源的热情带到了那里。我的任务是改进我们实验室对 Dan Schroeder 开发的一个开源流体动力学模拟器的贡献。原本的模拟器可以显示用户用鼠标绘制的障碍物,并建立计算流体动力学模型。我们团队的贡献是加入图像处理的代码,分析实况视频的每一帧以显示特定的物体如何与液体相互作用。而且,我们还要做更多事情。 -我们想要让图像处理部分更加健全,所以我致力于改善图像处理库。 +我们想要让图像处理部分更加健壮,所以我致力于改善图像处理库。 -基于新的库,模拟器可以检测轮廓、进行空间坐标变换以及找到物体的质心。图像处理并不直接与流体动力学模拟器物理相关。它用摄像头检测物体,并且获取物体轮廓,为流体模拟器创建一个障碍物。然后,流体模拟器启动,输出结果会被投射到真实物体上。 +得益于新的库,模拟器可以检测轮廓、进行空间坐标变换以及找到物体的质心。图像处理并不直接与流体动力学模拟器物理相关。它用摄像头检测物体,并且获取物体轮廓,为流体模拟器创建一个障碍物。随后,流体模拟器开始运行,而输出结果会被投射到真实物体上。 -我的目标是通过以下三种方式改进模拟器: +我的目标是通过以下三个方面改进模拟器: 1. 找寻物体的轮廓 2. 找寻物体的质心 3. 能对物体中心进行相关的精确转换 -我的导师建议我安装 [Node.js](http://nodejs.org/), [OpenCV](http://opencv.org/), 和 [Node.js bindings for OpenCV](https://github.com/peterbraden/node-opencv).。在等待软件安装的过程中,我查看了 OpenCV 的 [GitHub 主页](https://github.com/peterbraden/node-opencv) 上的示例源码。我发现示例源码使用 JavaScript 写的,而我还不懂 JavaScript ,所以我在 Codecademy 上学了一些课程。两天后,我对 JavaScript 依旧生疏,不过我还是开始了我的项目。。。它包含了更多的JavaScript。 +我的导师建议我安装 [Node.js](http://nodejs.org/) 、 [OpenCV](http://opencv.org/) 和 [Node.js bindings for OpenCV](https://github.com/peterbraden/node-opencv)。在等待软件安装的过程中,我查看了 OpenCV 的 [GitHub 主页][3]上的示例源码。我发现示例源码使用 JavaScript 写的,而我还不懂 JavaScript ,所以我在 Codecademy 上学了一些课程。两天后,我对 JavaScript 依旧生疏,不过我还是开始了我的项目…它包含了更多的 JavaScript 。 -示例的轮廓检测代码工作得很好。事实上,它使得我用几个小时就完成了第一个目标!为了获取一幅图片的轮廓,它看起来像这样: +检测轮廓的示例代码工作得很好。事实上,它使得我用几个小时就完成了第一个目标!获取一幅图片的轮廓,它看起来像这样: ![](https://opensource.com/sites/default/files/resize/image_processing_nasa_1-520x293.jpg) > 包括所有轮廓的原始图, -示例的检测轮廓的代码工作得有点好过头了。不仅物体的轮廓被检测到了,整个图片中的轮廓都检测到了。这会导致模拟器要与那些没用的轮廓打交道。这是一个严重的问题,因为它会返回错误的数据。为了避免模拟器接触到不想要的轮廓,我加了一个区域约束。轮廓要位于一定的区域范围内才会被画出来。区域约束使得轮廓变干净了。 +检测轮廓的示例代码工作得有点好过头了。不仅物体的轮廓被检测到了,整个图片中的轮廓都检测到了。这会导致模拟器要与那些没用的轮廓打交道。这是一个严重的问题,因为它会返回错误的数据。为了避免模拟器接触到不想要的轮廓,我加了一个区域约束。轮廓要位于一定的区域范围内才会被画出来。区域约束使得轮廓变干净了。 ![](https://opensource.com/sites/default/files/resize/image_processing_nasa_2-520x293.jpg) @@ -44,21 +44,25 @@ > 最后的干净轮廓。 -这个时候,我可以获取干净的轮廓、计算质心了。可惜的是,我没有足够的时间去完成质心的相关变换。因为我的实习时间不多了,我开始考虑我在这段有限时间内能做的其它事情。其中一个就是边界矩形。边界矩形是包含了图片轮廓的最小四边形。边界矩形很重要,因为它是在页面上缩放轮廓的关键。虽然很遗憾我没时间利用边界矩形做更多事情,但是我仍然想去了解更多,因为这是个很有用的工具。 +这个时候,我可以获取干净的轮廓、计算质心了。可惜的是,我没有足够的时间去完成质心的相关变换。由于我的实习时间只剩下几天了,我开始考虑我在这段有限时间内能做的其它事情。其中一个就是边界矩形。边界矩形是包含了图片轮廓的最小四边形。边界矩形很重要,因为它是在页面上缩放轮廓的关键。虽然很遗憾我没时间利用边界矩形做更多事情,但是我仍然想学习它,因为它是个很有用的工具。 最后,经过以上的努力,我完成了对图像的处理! ![](https://opensource.com/sites/default/files/resize/image_processing_nasa_5-521x293.jpg) -> 最后图像,红色的边界矩形和质心。 +> 最终图像,红色的边界矩形和质心。 -当这些图像处理代码写完之后,我用我的代码替代了模拟器中的老代码。非常意外的,它可以工作。 +当这些图像处理代码写完之后,我用我的代码替代了模拟器中的老代码。令我意外的是,它可以工作。 嗯,基本可以。 -程序有内存泄露,每 1/10 秒泄露 100MB 。我很高兴原因不是我的代码。坏消息是修复它并不是我能控制的。好消息是有个解决方法我可以使用。它并不是最理想的,方法是不断检查模拟器使用的内存,当使用内存超过 1 GB,重新启动模拟器。 + -在 NASA 实验室,我们使用很多的开源软件,没有这些开源软件的帮助,我不可能完成这些工作。 +( Youtube 演示视频) + +程序有内存泄露,每 1/10 秒泄露 100MB 。我很高兴原因不是我的代码。坏消息是我并不能修复它。好消息是仍然有解决方法。它并非最理想的,但我可以使用。这个方法是不断检查模拟器使用的内存,当使用内存超过 1GB 时,重新启动模拟器。 + +在 NASA 实验室,我们会使用很多的开源软件,没有这些开源软件的帮助,我不可能完成这些工作。 * * * @@ -66,6 +70,10 @@ via: [https://opensource.com/life/16/3/image-processing-nasa](https://opensource 作者:[Lauren Egts](https://opensource.com/users/laurenegts) 译者:[willowyoung](https://github.com/willowyoung) -校对:[校对者ID](https://github.com/校对者ID) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: http://www.nasa.gov/centers/glenn/home/index.html +[2]: https://ocio.grc.nasa.gov/gvis/ +[3]: https://github.com/peterbraden/node-opencv From 6040ac9b7d7e1caa5c302d3b39417c2e2d6aae3f Mon Sep 17 00:00:00 2001 From: tinyeyeser Date: Wed, 11 May 2016 16:09:43 +0800 Subject: [PATCH 1366/1710] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=20by?= =?UTF-8?q?=E5=B0=8F=E7=9C=BC=E5=84=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...123 Data Structures in the Linux Kernel.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/translated/tech/20151123 Data Structures in the Linux Kernel.md b/translated/tech/20151123 Data Structures in the Linux Kernel.md index 78526e6d94..899a69af3d 100644 --- a/translated/tech/20151123 Data Structures in the Linux Kernel.md +++ b/translated/tech/20151123 Data Structures in the Linux Kernel.md @@ -1,14 +1,14 @@ -Linux内核数据结构 +Linux内核中的数据结构 —— 基数树 ================================================================================ 基数树 Radix tree -------------------------------------------------------------------------------- -正如你所知道的,Linux内核提供了许多不同的库和函数,它们实现了不同的数据结构和算法。在这部分,我们将研究其中一种数据结构——[基数树 Radix tree](http://en.wikipedia.org/wiki/Radix_tree)。在Linux内核中,有两个与基数树实现和API相关的文件: +正如你所知道的,Linux内核提供了许多不同的库和函数,它们实现了不同的数据结构和算法。在这部分,我们将研究其中一种数据结构——[基数树 Radix tree](http://en.wikipedia.org/wiki/Radix_tree)。在 Linux 内核中,有两个文件与基数树的实现和API相关: * [include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h) * [lib/radix-tree.c](https://github.com/torvalds/linux/blob/master/lib/radix-tree.c) -让我们讨论什么是`基数树`吧。基数树是一种`压缩的字典树`,而[字典树](http://en.wikipedia.org/wiki/Trie)是实现了关联数组接口并允许以`键值对`方式存储值的一种数据结构。该键通常是字符串,但能够使用任何数据类型。字典树因为它的节点而与`n叉树`不同。字典树的节点不存储键;相反,字典树的一个节点存储单个字符的标签。与一个给定节点关联的键可以通过从根遍历到该节点获得。举个例子: +让我们先说说什么是 `基数树` 吧。基数树是一种 `压缩的字典树 (compressed trie)` ,而[字典树](http://en.wikipedia.org/wiki/Trie)是实现了关联数组接口并允许以 `键值对` 方式存储值的一种数据结构。这里的键通常是字符串,但可以使用任意数据类型。字典树因为它的节点而与 `n叉树` 不同。字典树的节点不存储键,而是存储单个字符的标签。与一个给定节点关联的键可以通过从根遍历到该节点获得。举个例子: ```                +-----------+ @@ -39,9 +39,9 @@ Linux内核数据结构                             +-----------+ ``` -因此在这个例子中,我们可以看到一个有着两个键`go`和`cat`的`字典树`。压缩的字典树或者`基数树`和`字典树`不同于所有只有一个孩子的中间节点都被删除。 +因此在这个例子中,我们可以看到一个有着两个键 `go` 和 `cat` 的 `字典树` 。压缩的字典树或者说 `基数树` ,它和 `字典树` 的不同之处在于,所有只有一个孩子的中间节点都被删除。 -Linu内核中的基数树是映射值到整形键的一种数据结构。[include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h)文件中的以下结构体表示了基数树: +Linux 内核中的基数树是把值映射到整形键的一种数据结构。[include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h)文件中的以下结构体描述了基数树: ```C struct radix_tree_root { @@ -51,15 +51,15 @@ struct radix_tree_root { }; ``` -这个结构体表示了一个基数树的根,并包含了3个域成员: +这个结构体描述了一个基数树的根,它包含了3个域成员: * `height` - 树的高度; -* `gfp_mask` - 告诉如何执行动态内存分配; +* `gfp_mask` - 告知如何执行动态内存分配; * `rnode` - 孩子节点指针. -我们第一个要讨论的域是`gfp_mask`: +我们第一个要讨论的字段是 `gfp_mask` : -底层内核内存动态分配函数以一组标志作为` gfp_mask `,用于描述如何执行动态内存分配。这些控制分配进程的`GFP_`标志拥有以下值:(`GF_NOIO`标志)意味着睡眠等待内存,(`__GFP_HIGHMEM`标志)意味着高端内存能够被使用,(`GFP_ATOMIC`标志)意味着分配进程拥有高优先级并不能睡眠等等。 +底层内核的内存动态分配函数以一组标志作为 `gfp_mask` ,用于描述如何执行动态内存分配。这些控制分配进程的 `GFP_` 标志拥有以下值:( `GF_NOIO` 标志)意味着睡眠以及等待内存,( `__GFP_HIGHMEM` 标志)意味着高端内存能够被使用,( `GFP_ATOMIC` 标志)意味着分配进程拥有高优先级并不能睡眠等等。 * `GFP_NOIO` - 睡眠等待内存 * `__GFP_HIGHMEM` - 高端内存能够被使用; @@ -67,7 +67,7 @@ struct radix_tree_root { 等等。 -下一个域是`rnode`: +下一个字段是`rnode`: ```C struct radix_tree_node { @@ -86,7 +86,7 @@ struct radix_tree_node { unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; }; ``` -这个结构体包含的信息有父节点中的偏移以及到底端(叶节点)的高度、孩子节点的个数以及用于访问和释放节点的域成员。这些域成员描述如下: +这个结构体包含的信息有父节点中的偏移以及到底端(叶节点)的高度、孩子节点的个数以及用于访问和释放节点的字段成员。这些字段成员描述如下: * `path` - 父节点中的偏移和到底端(叶节点)的高度 * `count` - 孩子节点的个数; @@ -95,20 +95,20 @@ struct radix_tree_node { * `rcu_head` - 用于释放节点; * `private_list` - 由树的用户使用; -`radix_tree_node`的最后两个成员——`tags`和`slots`非常重要且令人关注。Linux内核基数树的每个节点都包含一组存储指向数据指针的slots。Linux内核基数树实现的空slots存储`NULL`值。Linux内核中的基数树也支持与`radix_tree_node`结构体的`tags`域相关联的标签。标签允许在基数树存储的记录中设置各个位。 +`radix_tree_node` 的最后两个成员—— `tags` 和 `slots` 非常重要且令人关注。Linux 内核基数树的每个节点都包含了一组指针槽( slots ),槽里存储着指向数据的指针。在Linux内核基数树的实现中,空槽存储的是 `NULL` 。Linux内核中的基数树也支持标签( tags ),它与 `radix_tree_node` 结构体的 `tags` 字段相关联。有了标签,我们就可以对基数树中存储的记录以单个比特位( bit )进行设置。 既然我们了解了基数树的结构,那么该是时候看一下它的API了。 Linux内核基数树API --------------------------------------------------------------------------------- -我们从结构体的初始化开始。有两种方法初始化一个新的基数树。第一种是使用`RADIX_TREE`宏: +我们从结构体的初始化开始。有两种方法初始化一个新的基数树。第一种是使用 `RADIX_TREE` 宏: ```C RADIX_TREE(name, gfp_mask); ```` -正如你所看到的,我们传递`name`参数,所以使用`RADIX_TREE`宏,我们能够定义和初始化基数树为给定的名字。`RADIX_TREE`的实现是简单的: +正如你所看到的,我们传递了 `name` 参数,所以通过 `RADIX_TREE` 宏,我们能够定义和初始化基数树为给定的名字。`RADIX_TREE` 的实现很简单: ```C #define RADIX_TREE(name, mask) \ @@ -121,16 +121,16 @@ RADIX_TREE(name, gfp_mask); } ``` -在`RADIX_TREE`宏的开始,我们使用给定的名字定义`radix_tree_root`结构体实例,并使用给定的mask调用`RADIX_TREE_INIT`宏。`RADIX_TREE_INIT`宏只是初始化`radix_tree_root`结构体为默认值和给定的mask而已。 +在 `RADIX_TREE` 宏的开始,我们使用给定的名字定义 `radix_tree_root` 结构体实例,并使用给定的 mask 调用 `RADIX_TREE_INIT` 宏。 而 `RADIX_TREE_INIT` 宏则是使用默认值和给定的mask对 `radix_tree_root` 结构体进行了初始化。 -第二种方法是亲手定义`radix_tree_root`结构体,并且将它和mask传给`INIT_RADIX_TREE`宏: +第二种方法是手动定义`radix_tree_root`结构体,并且将它和mask传给 `INIT_RADIX_TREE` 宏: ```C struct radix_tree_root my_radix_tree; INIT_RADIX_TREE(my_tree, gfp_mask_for_my_radix_tree); ``` -where: +`INIT_RADIX_TREE` 宏的定义如下: ```C #define INIT_RADIX_TREE(root, mask) \ @@ -141,20 +141,20 @@ do { \ } while (0) ``` -和`RADIX_TREE_INIT`宏所做的初始化一样,初始化为默认值。 +和`RADIX_TREE_INIT`宏所做的初始化工作一样,`INIT_RADIX_TREE` 宏使用默认值和给定的 mask 完成初始化工作。 -接下来是用于从基数树插入和删除数据的两个函数: +接下来是用于向基数树插入和删除数据的两个函数: * `radix_tree_insert`; * `radix_tree_delete`; -第一个函数`radix_tree_insert`需要3个参数: +第一个函数 `radix_tree_insert` 需要3个参数: * 基数树的根; * 索引键; * 插入的数据; -`radix_tree_delete`函数需要和`radix_tree_insert`一样的一组参数,但是没有data。 +`radix_tree_delete` 函数需要和 `radix_tree_insert` 一样的一组参数,但是不需要传入要删除的数据。 基数树的搜索以两种方法实现: @@ -167,7 +167,7 @@ do { \ * 基数树的根; * 索引键; -这个函数尝试在树中查找给定的键,并返回和该键相关联的记录。第二个函数`radix_tree_gang_lookup`有以下的函数签名: +这个函数尝试在树中查找给定的键,并返回和该键相关联的记录。第二个函数 `radix_tree_gang_lookup` 有以下的函数签名: ```C unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, @@ -176,9 +176,9 @@ unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, unsigned int max_items); ``` -和返回记录的个数,(results指向的数据)按键排序并从第一个索引开始。返回的记录个数将不会超过`max_items`。 +它返回的是记录的个数。 `results` 中的结果,按键排序,并从第一个索引开始。返回的记录个数将不会超过 `max_items` 的值。 -最后一个函数`radix_tree_lookup_slot`将会返回包含数据的slot。 +最后一个函数`radix_tree_lookup_slot`将会返回包含数据的指针槽。 链接 --------------------------------------------------------------------------------- @@ -192,7 +192,7 @@ via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/radix-tree 作者:[0xAX] 译者:[cposture](https://github.com/cposture) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Mr小眼儿](https://github.com/tinyeyeser) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f61b9adc838aa3ca7f37064ea28153b80a337f47 Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Wed, 11 May 2016 19:39:23 +0800 Subject: [PATCH 1367/1710] translated --- ...minism and increasing diversity in tech.md | 2 +- ...butions Would Presidential Hopefuls Run.md | 55 -------------- ...151117 How bad a boss is Linus Torvalds.md | 2 +- ...butions Would Presidential Hopefuls Run.md | 72 +++++++++++++++++++ 4 files changed, 74 insertions(+), 57 deletions(-) delete mode 100644 sources/talk/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md create mode 100644 translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.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 index 36f5642c10..10a30119e1 100644 --- 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 @@ -78,4 +78,4 @@ via: http://opensource.com/life/15/8/patricia-torvalds-interview [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 +[7]:https://www.facebook.com/groups/LadiesStormHackathons/ 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 deleted file mode 100644 index cfb653f702..0000000000 --- a/sources/talk/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md +++ /dev/null @@ -1,55 +0,0 @@ -vim-kakali translating - -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/ 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 76e9f4c244..7ebba90483 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 @@ -75,4 +75,4 @@ via: http://www.computerworld.com/article/3004387/it-management/how-bad-a-boss-i [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 +[4]:http://sarah.thesharps.us/2015/10/05/closing-a-door/ diff --git a/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md b/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md new file mode 100644 index 0000000000..a7419bd07a --- /dev/null +++ b/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md @@ -0,0 +1,72 @@ +总统更乐意使用哪种开源Linux分支? +================================================================================ +![Republican presidential candidate Donald Trump +](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/08/donaldtrump.jpg) + + + +共和党总统候选人Donald Trump【译者注:唐纳德·特朗普,美国地产大亨、作家、主持人】 + + +如果人们要竞选总统,而决定因素却是使用Linux或另一个开源操作系统,那么这样的系统会属于哪个分支呢?关键是存在与其他很多事情有关的问题,而这正好使我们很难抉择;比如,一些“政治立场”问题,或者是要判断某一个分支诞生时为它的名字加上感叹号是否合适——而这些问题一直被忽视。而忽视到此就结束了:接下来是时事新闻工作者关于总统大选和Linux分支的报道。 + + +对于那些已经看了很多年我的文字的人来说(除了我亲爱的的编辑之外,他们是不是也不够幸运一直听我的瞎扯?),这些话听起来很熟悉,这是因为我在去年的总统选举期间写了一个[similar post][1]。一些有趣的读者把这里面的内容看的很正式,然而我并不是这样想的,所以我会花点时间阐述我的观点:事实上,我不认为开源软件和政治运动对于一些事情有多大的意义。我写那样的文章仅仅是新的一周的自我消遣罢了。 + + + +当然,你也可以去了解更多的你想知道的东西,毕竟你才是读者。 + +###Linux分支:共和党人的选择### + +今天,我只是谈及一些有关共和主义的话题,我甚至只会谈论他们的其中一部分。因为共和党的期望提名太多了以至于我写满了整篇文章。由此开始: + + +如果**Jeb (Jeb!?) Bush**使用Linux,它定是[Debian][2]。Debian属于一个相当无趣的分支,它是为真正意义上的黑客设计的,这样的黑客通过使用这样的操作系统快速成长,并且乐此不疲。而且他们可以通过攻击一些初级开源爱好者的电脑来大捞一笔。当然,这也使得Debian显得很枯燥,所以它已有的用户基础一直在缩减。 + + + +**Scott Walker**是一个[Damn Small Linux][3] (DSL) 用户。这个系统仅仅需要50MB的硬盘空间和16MB的RAM便可完美运行。DSL可以使一台20年前的486计算机充满活力;而这恰好满足了**Scott Walker**消减硬件成本的需求。当然,你使用DSL的体验也是最原始的;这个系统平台只能够运行一个浏览器。但是至少你在1993年购买的机器现在仍然能很好的工作,这样你也不用浪费钱财购买新的电脑硬件。 + + +**Chris Christie**会使用哪种系统呢?他肯定会依赖于一次设置便可持续工作的逻辑Linux灾难恢复方案,而这就是[Relax-and-Recover Linux][4]。Christie使用它主要是因为他的政治工作,从那次华盛顿大桥事故后,他的政治动力就受到了影响。不管它是否能够让Christie挽回一切事故,但是当他的电脑死机的时候,至少可以找到一些意外丢失的机密邮件。 + + + +对于**Carly Fiorina**,她不否定将要使用来自于[Hewlett-Packard][6] (HPQ)的软件为 "[The Machine][5]"开发操作系统,HPQ是她在1999年到2005年这6年期间所管理的公司。事实上,这种机器可以运行部分不同操作系统,而我不知道这些系统是否是基于Linux的; **Carly Fiorina**被惠普公司辞退后,开发操作系统工作就开始了。尽管如此,她仍然是她研究的计算机领域中的成功管理者。同时这也意味着她和惠普的联系彻底绝。 + + + +这才是重点,你也猜到了,他就是**Donald Trump**。想要拥有免费的、优秀的操作系统,他可能会用数百万美元去雇佣一个精英黑客团队去定制属于自己的操作系统;同时他也可以向别人炫耀自己的财力。他可能会吹嘘自己的操作系统是目前最好的系统。它肯定没有使用POSIX【译者注:可移植操作系统接口】或者采用一些其他的标准,因为那样的话就需要提供一些其他的很多的规则。人们也不知道它的运行方式,因此,如果**Donald Trump**向人们展示了他的系统的运行方式,很明显他可能会把所有的机密都泄露给了伊斯兰国家,这是相当冒险的。 + + + +非此即彼,如果**Donald Trump**非要选择一种已有的类Linux操作系统, [Ubuntu][7]是明智的选择。而**Donald Trump**也是Ubuntu的开发者,他和他的团队通过使用他们已有的应用程序接口去定制他们认为的真正的开源软件。自由软件纯化论者却很不喜欢这种开发模式,他们很反感使用Ubuntu,反而很多其他人更喜欢Ubuntu。当然,用户自己的这种仅仅在软件和政治上的不同立场也是无伤大雅的,即使这样的分歧可能会一直存在。 + + +###敬请期待### + + +如果你想知道为什么我还没有提到民主党候人,别想了。我不会在这篇文章中提及他们,因为我一直对民主党和共和党保持中立观点(我个人认为,像美国这样的的情况,只有两个政党是不合理的;事实上,这种意义上的民主就显得很可笑,所以我不太相信这些党派候选人)。 + + +相反,也可能会有很多人关心民主党候选人使用的Linux分支。后续的帖子中我会提及的,请拭目以待。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/081715/which-open-source-linux-distributions-would-presidential- + +作者:[Christopher Tozzi][a] +译者:[vim-kakali](https://github.com/vim-kakali) +校对:[校对者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/ From 2a6c3ea7aa165fe0d7e1b8185d40726505ff7761 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Wed, 11 May 2016 21:08:03 +0800 Subject: [PATCH 1368/1710] Proofread 20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run --- ...butions Would Presidential Hopefuls Run.md | 125 ++++++++---------- 1 file changed, 53 insertions(+), 72 deletions(-) diff --git a/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md b/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md index a7419bd07a..30a81a51da 100644 --- a/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md +++ b/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md @@ -1,72 +1,53 @@ -总统更乐意使用哪种开源Linux分支? -================================================================================ -![Republican presidential candidate Donald Trump -](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/08/donaldtrump.jpg) - - - -共和党总统候选人Donald Trump【译者注:唐纳德·特朗普,美国地产大亨、作家、主持人】 - - -如果人们要竞选总统,而决定因素却是使用Linux或另一个开源操作系统,那么这样的系统会属于哪个分支呢?关键是存在与其他很多事情有关的问题,而这正好使我们很难抉择;比如,一些“政治立场”问题,或者是要判断某一个分支诞生时为它的名字加上感叹号是否合适——而这些问题一直被忽视。而忽视到此就结束了:接下来是时事新闻工作者关于总统大选和Linux分支的报道。 - - -对于那些已经看了很多年我的文字的人来说(除了我亲爱的的编辑之外,他们是不是也不够幸运一直听我的瞎扯?),这些话听起来很熟悉,这是因为我在去年的总统选举期间写了一个[similar post][1]。一些有趣的读者把这里面的内容看的很正式,然而我并不是这样想的,所以我会花点时间阐述我的观点:事实上,我不认为开源软件和政治运动对于一些事情有多大的意义。我写那样的文章仅仅是新的一周的自我消遣罢了。 - - - -当然,你也可以去了解更多的你想知道的东西,毕竟你才是读者。 - -###Linux分支:共和党人的选择### - -今天,我只是谈及一些有关共和主义的话题,我甚至只会谈论他们的其中一部分。因为共和党的期望提名太多了以至于我写满了整篇文章。由此开始: - - -如果**Jeb (Jeb!?) Bush**使用Linux,它定是[Debian][2]。Debian属于一个相当无趣的分支,它是为真正意义上的黑客设计的,这样的黑客通过使用这样的操作系统快速成长,并且乐此不疲。而且他们可以通过攻击一些初级开源爱好者的电脑来大捞一笔。当然,这也使得Debian显得很枯燥,所以它已有的用户基础一直在缩减。 - - - -**Scott Walker**是一个[Damn Small Linux][3] (DSL) 用户。这个系统仅仅需要50MB的硬盘空间和16MB的RAM便可完美运行。DSL可以使一台20年前的486计算机充满活力;而这恰好满足了**Scott Walker**消减硬件成本的需求。当然,你使用DSL的体验也是最原始的;这个系统平台只能够运行一个浏览器。但是至少你在1993年购买的机器现在仍然能很好的工作,这样你也不用浪费钱财购买新的电脑硬件。 - - -**Chris Christie**会使用哪种系统呢?他肯定会依赖于一次设置便可持续工作的逻辑Linux灾难恢复方案,而这就是[Relax-and-Recover Linux][4]。Christie使用它主要是因为他的政治工作,从那次华盛顿大桥事故后,他的政治动力就受到了影响。不管它是否能够让Christie挽回一切事故,但是当他的电脑死机的时候,至少可以找到一些意外丢失的机密邮件。 - - - -对于**Carly Fiorina**,她不否定将要使用来自于[Hewlett-Packard][6] (HPQ)的软件为 "[The Machine][5]"开发操作系统,HPQ是她在1999年到2005年这6年期间所管理的公司。事实上,这种机器可以运行部分不同操作系统,而我不知道这些系统是否是基于Linux的; **Carly Fiorina**被惠普公司辞退后,开发操作系统工作就开始了。尽管如此,她仍然是她研究的计算机领域中的成功管理者。同时这也意味着她和惠普的联系彻底绝。 - - - -这才是重点,你也猜到了,他就是**Donald Trump**。想要拥有免费的、优秀的操作系统,他可能会用数百万美元去雇佣一个精英黑客团队去定制属于自己的操作系统;同时他也可以向别人炫耀自己的财力。他可能会吹嘘自己的操作系统是目前最好的系统。它肯定没有使用POSIX【译者注:可移植操作系统接口】或者采用一些其他的标准,因为那样的话就需要提供一些其他的很多的规则。人们也不知道它的运行方式,因此,如果**Donald Trump**向人们展示了他的系统的运行方式,很明显他可能会把所有的机密都泄露给了伊斯兰国家,这是相当冒险的。 - - - -非此即彼,如果**Donald Trump**非要选择一种已有的类Linux操作系统, [Ubuntu][7]是明智的选择。而**Donald Trump**也是Ubuntu的开发者,他和他的团队通过使用他们已有的应用程序接口去定制他们认为的真正的开源软件。自由软件纯化论者却很不喜欢这种开发模式,他们很反感使用Ubuntu,反而很多其他人更喜欢Ubuntu。当然,用户自己的这种仅仅在软件和政治上的不同立场也是无伤大雅的,即使这样的分歧可能会一直存在。 - - -###敬请期待### - - -如果你想知道为什么我还没有提到民主党候人,别想了。我不会在这篇文章中提及他们,因为我一直对民主党和共和党保持中立观点(我个人认为,像美国这样的的情况,只有两个政党是不合理的;事实上,这种意义上的民主就显得很可笑,所以我不太相信这些党派候选人)。 - - -相反,也可能会有很多人关心民主党候选人使用的Linux分支。后续的帖子中我会提及的,请拭目以待。 - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/081715/which-open-source-linux-distributions-would-presidential- - -作者:[Christopher Tozzi][a] -译者:[vim-kakali](https://github.com/vim-kakali) -校对:[校对者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/ +总统更乐意使用哪种开源Linux分支? +================================================================================ +![Republican presidential candidate Donald Trump +](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/08/donaldtrump.jpg) + +共和党总统候选人 Donald Trump【译者注:唐纳德·特朗普,美国地产大亨、作家、主持人】 + +如果人们要竞选总统,而决定因素却是使用 Linux 或其他的开源操作系统,那么这样的系统会是哪个发行版呢?关键是存在与其他很多事情有关的问题,而这正好使我们很难抉择;比如,一些“政治立场”问题,或者是要判断某一个分支诞生时为它的名字加上感叹号是否合适——而这些问题一直被忽视。而忽视到此就结束了:接下来是时事新闻工作者关于总统大选和 Linux 分支的报道。 + +对于那些已经看了很多年我的文字的人来说(除了我亲爱的的编辑之外,他们一直听我的瞎扯是不是倒霉到家了?),这些话听起来很熟悉,这是因为我在去年的总统选举期间写了一篇[类似的文章][1]。一些有趣的读者把这里面的内容看的很正式,然而我并不是这样想的,所以我会花点时间阐述我的观点:事实上,我不认为开源软件和政治运动对于一些事情有多大的意义。我写那样的文章仅仅是新的一周的自我消遣罢了。 + +当然,你也可以去了解更多的你想知道的东西,毕竟你才是读者。 + +### Linux 分支:共和党人的选择 ### + +今天,我只是谈及一些有关共和主义的话题,我甚至只会谈论他们的其中一部分。因为共和党的期望提名太多了以至于我写满了整篇文章。由此开始: + +如果 **Jeb (Jeb!?) Bush** 使用 Linux,它一定是 [Debian][2]。Debian 属于一个相当无趣的分支,它是为真正意义上的黑客设计的,它们将快速成长起来并清理经验不甚丰富的开源爱好者造成的混乱视为一大使命。当然,这也使得Debian显得很枯燥,所以它已有的用户基础一直在缩减。 + +**Scott Walker** 是一个 [Damn Small Linux][3] (DSL) 用户。这个系统仅仅需要 50MB 的硬盘空间和 16MB 的 RAM 便可完美运行。DSL 可以使一台 20 年前的 486 计算机充满活力;而这恰好满足了 **Scott Walker** 消减硬件成本的需求。当然,你使用 DSL 的体验也是最原始的;这个系统平台只能够运行一个浏览器。但是至少你在 1993 年购买的机器现在仍然能很好的工作,这样你也不用浪费钱财购买新的电脑硬件。 + +**Chris Christie** 会使用哪种系统呢?他肯定会依赖于一次设置便可持续工作的裸机 Linux 灾难恢复方案,而这就是 [Relax-and-Recover Linux][4]。Christie 使用它主要是因为他的政治工作,从那次华盛顿大桥事故后,他的政治动力就受到了影响。不管它是否能够让 Christie 挽回一切事故,但是当他的电脑死机的时候,至少可以找到一些意外丢失的机密邮件。 + +至于 **Carly Fiorina**,她无疑将要使用 [Hewlett-Packard][6] (HPQ)为“[The Machine][5]”操作系统开发的软件,HPQ 是她在 1999 年到 2005 年这 6 年期间所管理的公司。事实上,这种机器可以运行部分不同操作系统,而我们并不清楚这些系统是否基于 Linux;**Carly Fiorina** 被惠普公司辞退后,开发操作系统工作就开始了。尽管如此,她仍然是她研究的计算机领域中的成功管理者。同时这也意味着她很难与惠普的彻底断绝关系。 + +最后——这才是重点,你也猜到了——**Donald Trump**。想要拥有免费的、优秀的操作系统,他可能会用数百万美元去雇佣一个精英黑客团队去定制属于自己的操作系统;同时他也可以向别人炫耀自己的财力。他可能会吹嘘自己的操作系统是目前最好的系统。它肯定没有兼容 POSIX【译者注:可移植操作系统接口】或者采用一些其他的标准,因为那样的话就需要提供一些其他的很多的规则。同时这个系统完全不提供任何文档,因为如果 **Donald Trump** 向人们展示了他的系统的运行方式,很明显他会经受所有机密被泄露至伊斯兰国家的风险。 + +非此即彼,如果 **Donald Trump** 非要选择一种已有的 Linux 操作系统, [Ubuntu][7] 应该是明智的选择。而 **Donald Trump** 也是 Ubuntu 的开发者,他和他的团队按照他们的想法,通过开发他们自由的甚至是专有的应用和接口去打造他们认为的开源软件。自由软件纯化论者却很不喜欢这种开发模式,他们很反感使用 Ubuntu,反而很多其他人更喜欢 Ubuntu。当然,长远来看,关于这种做法的争论(无论是政治领域还是软件领域)还待见分晓。 + +### 敬请期待 ### + +如果你想知道为什么我还没有提到民主党候人,别想了。我不会在这篇文章中提及他们,因为我一直对民主党和共和党保持中立观点(我个人认为,像美国这样的的情况,只有两个政党是不合理的;事实上,这种意义上的民主就显得很可笑,所以我不太相信这些党派候选人)。 + +相反,也可能会有很多人关心民主党候选人使用的Linux分支。后续的帖子中我会提及的,请拭目以待。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/081715/which-open-source-linux-distributions-would-presidential- + +作者:[Christopher Tozzi][a] +译者:[vim-kakali](https://github.com/vim-kakali) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) + +本文由 [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/ From 46b106bb7a390f09a0e80292b30271fb5ed42f71 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 May 2016 21:30:43 +0800 Subject: [PATCH 1369/1710] =?UTF-8?q?20160511-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LXD/Part 7 - LXD 2.0--Docker in LXD.md | 143 +++++++++++++++++- 1 file changed, 141 insertions(+), 2 deletions(-) diff --git a/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md b/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md index 60bb3883df..bf4fe35c4f 100644 --- a/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md +++ b/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md @@ -1,6 +1,145 @@ Part 7 - LXD 2.0: Docker in LXD ================================== -<正文待补充> +This is the third blog post [in this series about LXD 2.0][0]. -原文: https://www.stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/ +![](https://linuxcontainers.org/static/img/containers.png) + +### Why run Docker inside LXD + +As I briefly covered in the [first post of this series][1], LXD’s focus is system containers. That is, we run a full unmodified Linux distribution inside our containers. LXD for all intent and purposes doesn’t care about the workload running in the container. It just sets up the container namespaces and security policies, then spawns /sbin/init and waits for the container to stop. + +Application containers such as those implemented by Docker or Rkt are pretty different in that they are used to distribute applications, will typically run a single main process inside them and be much more ephemeral than a LXD container. + +Those two container types aren’t mutually exclusive and we certainly see the value of using Docker containers to distribute applications. That’s why we’ve been working hard over the past year to make it possible to run Docker inside LXD. + +This means that with Ubuntu 16.04 and LXD 2.0, you can create containers for your users who will then be able to connect into them just like a normal Ubuntu system and then run Docker to install the services and applications they want. + +### Requirements + +There are a lot of moving pieces to make all of this working and we got it all included in Ubuntu 16.04: + +- A kernel with CGroup namespace support (4.4 Ubuntu or 4.6 mainline) +- LXD 2.0 using LXC 2.0 and LXCFS 2.0 +- A custom version of Docker (or one built with all the patches that we submitted) +- A Docker image which behaves when confined by user namespaces, or alternatively make the parent LXD container a privileged container (security.privileged=true) + +### Running a basic Docker workload + +Enough talking, lets run some Docker containers! + +First of all, you need an Ubuntu 16.04 container which you can get with: + +``` +lxc launch ubuntu-daily:16.04 docker -p default -p docker +``` + +The “-p default -p docker” instructs LXD to apply both the “default” and “docker” profiles to the container. The default profile contains the basic network configuration while the docker profile tells LXD to load a few required kernel modules and set up some mounts for the container. The docker profile also enables container nesting. + +Now lets make sure the container is up to date and install docker: + +``` +lxc exec docker -- apt update +lxc exec docker -- apt dist-upgrade -y +lxc exec docker -- apt install docker.io -y +``` + +And that’s it! You’ve got Docker installed and running in your container. +Now lets start a basic web service made of two Docker containers: + +``` +stgraber@dakara:~$ lxc exec docker -- docker run --detach --name app carinamarina/hello-world-app +Unable to find image 'carinamarina/hello-world-app:latest' locally +latest: Pulling from carinamarina/hello-world-app +efd26ecc9548: Pull complete +a3ed95caeb02: Pull complete +d1784d73276e: Pull complete +72e581645fc3: Pull complete +9709ddcc4d24: Pull complete +2d600f0ec235: Pull complete +c4cf94f61cbd: Pull complete +c40f2ab60404: Pull complete +e87185df6de7: Pull complete +62a11c66eb65: Pull complete +4c5eea9f676d: Pull complete +498df6a0d074: Pull complete +Digest: sha256:6a159db50cb9c0fbe127fb038ed5a33bb5a443fcdd925ec74bf578142718f516 +Status: Downloaded newer image for carinamarina/hello-world-app:latest +c8318f0401fb1e119e6c5bb23d1e706e8ca080f8e44b42613856ccd0bf8bfb0d + +stgraber@dakara:~$ lxc exec docker -- docker run --detach --name web --link app:helloapp -p 80:5000 carinamarina/hello-world-web +Unable to find image 'carinamarina/hello-world-web:latest' locally +latest: Pulling from carinamarina/hello-world-web +efd26ecc9548: Already exists +a3ed95caeb02: Already exists +d1784d73276e: Already exists +72e581645fc3: Already exists +9709ddcc4d24: Already exists +2d600f0ec235: Already exists +c4cf94f61cbd: Already exists +c40f2ab60404: Already exists +e87185df6de7: Already exists +f2d249ff479b: Pull complete +97cb83fe7a9a: Pull complete +d7ce7c58a919: Pull complete +Digest: sha256:c31cf04b1ab6a0dac40d0c5e3e64864f4f2e0527a8ba602971dab5a977a74f20 +Status: Downloaded newer image for carinamarina/hello-world-web:latest +d7b8963401482337329faf487d5274465536eebe76f5b33c89622b92477a670f +``` + +With those two Docker containers now running, we can then get the IP address of our LXD container and access the service! + +``` +stgraber@dakara:~$ lxc list ++--------+---------+----------------------+----------------------------------------------+------------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++--------+---------+----------------------+----------------------------------------------+------------+-----------+ +| docker | RUNNING | 172.17.0.1 (docker0) | 2001:470:b368:4242:216:3eff:fe55:45f4 (eth0) | PERSISTENT | 0 | +| | | 10.178.150.73 (eth0) | | | | ++--------+---------+----------------------+----------------------------------------------+------------+-----------+ + +stgraber@dakara:~$ curl http://10.178.150.73 +The linked container said... "Hello World!" +``` + +### Conclusion + +That’s it! It’s really that simple to run Docker containers inside a LXD container. + +Now as I mentioned earlier, not all Docker images will behave as well as my example, that’s typically because of the extra confinement that comes with LXD, specifically the user namespace. + +Only the overlayfs storage driver of Docker works in this mode. That storage driver may come with its own set of limitation which may further limit how many images will work in this environment. + +If your workload doesn’t work properly and you trust the user inside the LXD container, you can try: + +``` +lxc config set docker security.privileged true +lxc restart docker +``` + +That will de-activate the user namespace and will run the container in privileged mode. + +Note however that in this mode, root inside the container is the same uid as root on the host. There are a number of known ways for users to escape such containers and gain root privileges on the host, so you should only ever do that if you’d trust the user inside your LXD container with root privileges on the host. + +### Extra information + +The main LXD website is at: +Development happens on Github at: +Mailing-list support happens on: +IRC support happens in: #lxcontainers on irc.freenode.net + + +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[1]: https://www.stgraber.org/2016/03/11/lxd-2-0-introduction-to-lxd-112/ +[2]: https://linuxcontainers.org/lxd/try-it/ From b54faae06699c6c0b2c7881824fc32019aa12d83 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 May 2016 21:36:18 +0800 Subject: [PATCH 1370/1710] =?UTF-8?q?20150511-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/LXD/Part 8 - LXD 2.0--LXD in LXD.md | 124 +++++++++++++++++- 1 file changed, 122 insertions(+), 2 deletions(-) diff --git a/sources/tech/LXD/Part 8 - LXD 2.0--LXD in LXD.md b/sources/tech/LXD/Part 8 - LXD 2.0--LXD in LXD.md index 76c361e517..85d9873313 100644 --- a/sources/tech/LXD/Part 8 - LXD 2.0--LXD in LXD.md +++ b/sources/tech/LXD/Part 8 - LXD 2.0--LXD in LXD.md @@ -1,6 +1,126 @@ Part 8 - LXD 2.0: LXD in LXD ============================== -<原文待补充> +This is the eighth blog post [in this series about LXD 2.0][0]. -原文:https://www.stgraber.org/2016/04/14/lxd-2-0-lxd-in-lxd-812/ +![](https://linuxcontainers.org/static/img/containers.png) + +### Introduction + +In the previous post I covered how to run [Docker inside LXD][1] which is a good way to get access to the portfolio of application provided by Docker while running in the safety of the LXD environment. + +One use case I mentioned was offering a LXD container to your users and then have them use their container to run Docker. Well, what if they themselves want to run other Linux distributions inside their container using LXD, or even allow another group of people to have access to a Linux system by running a container for them? + +Turns out, LXD makes it very simple to allow your users to run nested containers. + +### Nesting LXD + +The most simple case can be shown by using an Ubuntu 16.04 image. Ubuntu 16.04 cloud images come with LXD pre-installed. The daemon itself isn’t running as it’s socket-activated so it doesn’t use any resources until you actually talk to it. + +So lets start an Ubuntu 16.04 container with nesting enabled: + +``` +lxc launch ubuntu-daily:16.04 c1 -c security.nesting=true +``` + +You can also set the security.nesting key on an existing container with: + +``` +lxc config set security.nesting true +``` + +Or for all containers using a particular profile with: + +``` +lxc profile set security.nesting true +``` + +With that container started, you can now get a shell inside it, configure LXD and spawn a container: + +``` +stgraber@dakara:~$ lxc launch ubuntu-daily:16.04 c1 -c security.nesting=true +Creating c1 +Starting c1 + +stgraber@dakara:~$ lxc exec c1 bash +root@c1:~# lxd init +Name of the storage backend to use (dir or zfs): dir + +We detected that you are running inside an unprivileged container. +This means that unless you manually configured your host otherwise, +you will not have enough uid and gid to allocate to your containers. + +LXD can re-use your container's own allocation to avoid the problem. +Doing so makes your nested containers slightly less safe as they could +in theory attack their parent container and gain more privileges than +they otherwise would. + +Would you like to have your containers share their parent's allocation (yes/no)? yes +Would you like LXD to be available over the network (yes/no)? no +Do you want to configure the LXD bridge (yes/no)? yes +Warning: Stopping lxd.service, but it can still be activated by: + lxd.socket +LXD has been successfully configured. + +root@c1:~# lxc launch ubuntu:14.04 trusty +Generating a client certificate. This may take a minute... +If this is your first time using LXD, you should also run: sudo lxd init + +Creating trusty +Retrieving image: 100% +Starting trusty + +root@c1:~# lxc list ++--------+---------+-----------------------+----------------------------------------------+------------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++--------+---------+-----------------------+----------------------------------------------+------------+-----------+ +| trusty | RUNNING | 10.153.141.124 (eth0) | fd7:f15d:d1d6:da14:216:3eff:fef1:4002 (eth0) | PERSISTENT | 0 | ++--------+---------+-----------------------+----------------------------------------------+------------+-----------+ +root@c1:~# +``` + +It really is that simple! + +### The online demo server + +As this post is pretty short, I figured I would spend a bit of time to talk about the [demo server][2] we’re running. We also just reached the 10000 sessions mark earlier today! + +That server is basically just a normal LXD running inside a pretty beefy virtual machine with a tiny daemon implementing the REST API used by our website. + +When you accept the terms of service, a new LXD container is created for you with security.nesting enabled as we saw above. You are then attached to that container as you would when using “lxc exec” except that we’re doing it using websockets and javascript. + +The containers you then create inside this environment are all nested LXD containers. +You can then nest even further in there if you want to. + +We are using the whole range of [LXD resource limitations][3] to prevent one user’s actions from impacting the others and pretty closely monitor the server for any sign of abuse. + +If you want to run your own similar server, you can grab the code for our website and the daemon with: + +``` +git clone https://github.com/lxc/linuxcontainers.org +git clone https://github.com/lxc/lxd-demo-server +``` + +### Extra information + +The main LXD website is at: +Development happens on Github at: +Mailing-list support happens on: +IRC support happens in: #lxcontainers on irc.freenode.net + + +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/04/14/lxd-2-0-lxd-in-lxd-812/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[1]: https://www.stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/ +[2]: https://linuxcontainers.org/lxd/try-it/ +[3]: https://www.stgraber.org/2016/03/26/lxd-2-0-resource-control-412/ From be6667966757a8f337dff561873685ce51d65a5c Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 May 2016 21:36:49 +0800 Subject: [PATCH 1371/1710] =?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 --- sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md b/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md index bf4fe35c4f..d9b35735b8 100644 --- a/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md +++ b/sources/tech/LXD/Part 7 - LXD 2.0--Docker in LXD.md @@ -1,7 +1,7 @@ Part 7 - LXD 2.0: Docker in LXD ================================== -This is the third blog post [in this series about LXD 2.0][0]. +This is the seventh blog post [in this series about LXD 2.0][0]. ![](https://linuxcontainers.org/static/img/containers.png) From 3718792549e28b9f72ee4303db456c481147427d Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 May 2016 21:42:57 +0800 Subject: [PATCH 1372/1710] =?UTF-8?q?20150511-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LXD/Part 9 - LXD 2.0--Live migration.md | 326 +++++++++++++++++- 1 file changed, 324 insertions(+), 2 deletions(-) diff --git a/sources/tech/LXD/Part 9 - LXD 2.0--Live migration.md b/sources/tech/LXD/Part 9 - LXD 2.0--Live migration.md index 7be46f6a00..51f9c8b1a7 100644 --- a/sources/tech/LXD/Part 9 - LXD 2.0--Live migration.md +++ b/sources/tech/LXD/Part 9 - LXD 2.0--Live migration.md @@ -1,6 +1,328 @@ Part 9 - LXD 2.0: Live migration ================================= -<正文待补充> +This is the ninth blog post [in this series about LXD 2.0][0]. -原文:https://www.stgraber.org/2016/04/25/lxd-2-0-live-migration-912/ +![](https://linuxcontainers.org/static/img/containers.png) + +### Introduction + +One of the very exciting feature of LXD 2.0, albeit experimental, is the support for container checkpoint and restore. + +Simply put, checkpoint/restore means that the running container state can be serialized down to disk and then restored, either on the same host as a stateful snapshot of the container or on another host which equates to live migration. + +### Requirements + +To have access to container live migration and stateful snapshots, you need the following: + +- A very recent Linux kernel, 4.4 or higher. +- CRIU 2.0, possibly with some cherry-picked commits depending on your exact kernel configuration. +- Run LXD directly on the host. It’s not possible to use those features with container nesting. +- For migration, the target machine must at least implement the instruction set of the source, the target kernel must at least offer the same syscalls as the source and any kernel filesystem which was mounted on the source must also be mountable on the target. + +All the needed dependencies are provided by Ubuntu 16.04 LTS, in which case, all you need to do is install CRIU itself: + +``` +apt install criu +``` + +### Using the thing + +#### Stateful snapshots + +A normal container snapshot looks like: + +``` +stgraber@dakara:~$ lxc snapshot c1 first +stgraber@dakara:~$ lxc info c1 | grep first + first (taken at 2016/04/25 19:35 UTC) (stateless) + ``` + +A stateful snapshot instead looks like: + +``` +stgraber@dakara:~$ lxc snapshot c1 second --stateful +stgraber@dakara:~$ lxc info c1 | grep second + second (taken at 2016/04/25 19:36 UTC) (stateful) + ``` + +This means that all the container runtime state was serialized to disk and included as part of the snapshot. Restoring one such snapshot is done as you would a stateless one: + +``` +stgraber@dakara:~$ lxc restore c1 second +stgraber@dakara:~$ +``` + +#### Stateful stop/start + +Say you want to reboot your server for a kernel update or similar maintenance. Rather than have to wait for all the containers to start from scratch after reboot, you can do: + +``` +stgraber@dakara:~$ lxc stop c1 --stateful +``` + +The container state will be written to disk and then picked up the next time you start it. + +You can even look at what the state looks like: + +``` +root@dakara:~# tree /var/lib/lxd/containers/c1/rootfs/state/ +/var/lib/lxd/containers/c1/rootfs/state/ +├── cgroup.img +├── core-101.img +├── core-102.img +├── core-107.img +├── core-108.img +├── core-109.img +├── core-113.img +├── core-114.img +├── core-122.img +├── core-125.img +├── core-126.img +├── core-127.img +├── core-183.img +├── core-1.img +├── core-245.img +├── core-246.img +├── core-50.img +├── core-52.img +├── core-95.img +├── core-96.img +├── core-97.img +├── core-98.img +├── dump.log +├── eventfd.img +├── eventpoll.img +├── fdinfo-10.img +├── fdinfo-11.img +├── fdinfo-12.img +├── fdinfo-13.img +├── fdinfo-14.img +├── fdinfo-2.img +├── fdinfo-3.img +├── fdinfo-4.img +├── fdinfo-5.img +├── fdinfo-6.img +├── fdinfo-7.img +├── fdinfo-8.img +├── fdinfo-9.img +├── fifo-data.img +├── fifo.img +├── filelocks.img +├── fs-101.img +├── fs-113.img +├── fs-122.img +├── fs-183.img +├── fs-1.img +├── fs-245.img +├── fs-246.img +├── fs-50.img +├── fs-52.img +├── fs-95.img +├── fs-96.img +├── fs-97.img +├── fs-98.img +├── ids-101.img +├── ids-113.img +├── ids-122.img +├── ids-183.img +├── ids-1.img +├── ids-245.img +├── ids-246.img +├── ids-50.img +├── ids-52.img +├── ids-95.img +├── ids-96.img +├── ids-97.img +├── ids-98.img +├── ifaddr-9.img +├── inetsk.img +├── inotify.img +├── inventory.img +├── ip6tables-9.img +├── ipcns-var-10.img +├── iptables-9.img +├── mm-101.img +├── mm-113.img +├── mm-122.img +├── mm-183.img +├── mm-1.img +├── mm-245.img +├── mm-246.img +├── mm-50.img +├── mm-52.img +├── mm-95.img +├── mm-96.img +├── mm-97.img +├── mm-98.img +├── mountpoints-12.img +├── netdev-9.img +├── netlinksk.img +├── netns-9.img +├── netns-ct-9.img +├── netns-exp-9.img +├── packetsk.img +├── pagemap-101.img +├── pagemap-113.img +├── pagemap-122.img +├── pagemap-183.img +├── pagemap-1.img +├── pagemap-245.img +├── pagemap-246.img +├── pagemap-50.img +├── pagemap-52.img +├── pagemap-95.img +├── pagemap-96.img +├── pagemap-97.img +├── pagemap-98.img +├── pages-10.img +├── pages-11.img +├── pages-12.img +├── pages-13.img +├── pages-1.img +├── pages-2.img +├── pages-3.img +├── pages-4.img +├── pages-5.img +├── pages-6.img +├── pages-7.img +├── pages-8.img +├── pages-9.img +├── pipes-data.img +├── pipes.img +├── pstree.img +├── reg-files.img +├── remap-fpath.img +├── route6-9.img +├── route-9.img +├── rule-9.img +├── seccomp.img +├── sigacts-101.img +├── sigacts-113.img +├── sigacts-122.img +├── sigacts-183.img +├── sigacts-1.img +├── sigacts-245.img +├── sigacts-246.img +├── sigacts-50.img +├── sigacts-52.img +├── sigacts-95.img +├── sigacts-96.img +├── sigacts-97.img +├── sigacts-98.img +├── signalfd.img +├── stats-dump +├── timerfd.img +├── tmpfs-dev-104.tar.gz.img +├── tmpfs-dev-109.tar.gz.img +├── tmpfs-dev-110.tar.gz.img +├── tmpfs-dev-112.tar.gz.img +├── tmpfs-dev-114.tar.gz.img +├── tty.info +├── unixsk.img +├── userns-13.img +└── utsns-11.img + +0 directories, 154 files +``` + +Restoring the container can be done with a simple: + +``` +stgraber@dakara:~$ lxc start c1 +``` + +### Live migration + +Live migration is basically the same as the stateful stop/start above, except that the container directory and configuration happens to be moved to another machine too. + +``` +stgraber@dakara:~$ lxc list c1 ++------+---------+-----------------------+----------------------------------------------+------------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++------+---------+-----------------------+----------------------------------------------+------------+-----------+ +| c1 | RUNNING | 10.178.150.197 (eth0) | 2001:470:b368:4242:216:3eff:fe19:27b0 (eth0) | PERSISTENT | 2 | ++------+---------+-----------------------+----------------------------------------------+------------+-----------+ + +stgraber@dakara:~$ lxc list s-tollana: ++------+-------+------+------+------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++------+-------+------+------+------+-----------+ + +stgraber@dakara:~$ lxc move c1 s-tollana: + +stgraber@dakara:~$ lxc list c1 ++------+-------+------+------+------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++------+-------+------+------+------+-----------+ + +stgraber@dakara:~$ lxc list s-tollana: ++------+---------+-----------------------+----------------------------------------------+------------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++------+---------+-----------------------+----------------------------------------------+------------+-----------+ +| c1 | RUNNING | 10.178.150.197 (eth0) | 2001:470:b368:4242:216:3eff:fe19:27b0 (eth0) | PERSISTENT | 2 | ++------+---------+-----------------------+----------------------------------------------+------------+-----------+ +``` + +### Limitations + +As I said before, checkpoint/restore of containers is still pretty new and we’re still very much working on this feature, fixing issues as we are made aware of them. We do need more people trying this feature and sending us feedback, I would however not recommend using this in production just yet. + +The current list of issues we’re tracking is [available on Launchpad][1]. + +We expect a basic Ubuntu container with a few services to work properly with CRIU in Ubuntu 16.04. However more complex containers, using device passthrough, complex network services or special storage configurations are likely to fail. + +Whenever possible, CRIU will fail at dump time, rather than at restore time. In such cases, the source container will keep running, the snapshot or migration will simply fail and a log file will be generated for debugging. + +In rare cases, CRIU fails to restore the container, in which case the source container will still be around but will be stopped and will have to be manually restarted. + +### Sending bug reports + +We’re tracking bugs related to checkpoint/restore against the CRIU Ubuntu package on Launchpad. Most of the work to fix those bugs will then happen upstream either on CRIU itself or the Linux kernel, but it’s easier for us to track things this way. + +To file a new bug report, head here. + +Please make sure to include: + +The command you ran and the error message as displayed to you + +- Output of “lxc info” (*) +- Output of “lxc info ” +- Output of “lxc config show –expanded ” +- Output of “dmesg” (*) +- Output of “/proc/self/mountinfo” (*) +- Output of “lxc exec — cat /proc/self/mountinfo” +- Output of “uname -a” (*) +- The content of /var/log/lxd.log (*) +- The content of /etc/default/lxd-bridge (*) +- A tarball of /var/log/lxd// (*) + +If reporting a migration bug as opposed to a stateful snapshot or stateful stop bug, please include the data for both the source and target for any of the above which has been marked with a (*). + +### Extra information + +The CRIU website can be found at: + +The main LXD website is at: + +Development happens on Github at: + +Mailing-list support happens on: + +IRC support happens in: #lxcontainers on irc.freenode.net + + +-------------------------------------------------------------------------------- + +via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ + +作者:[Stéphane Graber][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[1]: https://bugs.launchpad.net/ubuntu/+source/criu/+bugs +[3]: https://launchpad.net/ubuntu/+source/criu/+filebug?no-redirect From 943a78716503f97b05a645b778d511a98d6eac03 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Thu, 12 May 2016 13:31:42 +0800 Subject: [PATCH 1373/1710] Fix typos --- ...e Linux Distributions Would Presidential Hopefuls Run.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md b/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md index 30a81a51da..e87e93ca32 100644 --- a/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md +++ b/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md @@ -21,11 +21,11 @@ **Chris Christie** 会使用哪种系统呢?他肯定会依赖于一次设置便可持续工作的裸机 Linux 灾难恢复方案,而这就是 [Relax-and-Recover Linux][4]。Christie 使用它主要是因为他的政治工作,从那次华盛顿大桥事故后,他的政治动力就受到了影响。不管它是否能够让 Christie 挽回一切事故,但是当他的电脑死机的时候,至少可以找到一些意外丢失的机密邮件。 -至于 **Carly Fiorina**,她无疑将要使用 [Hewlett-Packard][6] (HPQ)为“[The Machine][5]”操作系统开发的软件,HPQ 是她在 1999 年到 2005 年这 6 年期间所管理的公司。事实上,这种机器可以运行部分不同操作系统,而我们并不清楚这些系统是否基于 Linux;**Carly Fiorina** 被惠普公司辞退后,开发操作系统工作就开始了。尽管如此,她仍然是她研究的计算机领域中的成功管理者。同时这也意味着她很难与惠普的彻底断绝关系。 +至于 **Carly Fiorina**,她无疑将要使用 [Hewlett-Packard][6] (HPQ)为“[The Machine][5]”操作系统开发的软件,HPQ 是她在 1999 年到 2005 年这 6 年期间所管理的公司。事实上,这种机器可以运行部分不同操作系统,而我们并不清楚这些系统是否基于 Linux;**Carly Fiorina** 被惠普公司辞退后,开发操作系统工作就开始了。尽管如此,她仍然是她研究的计算机领域中的成功管理者。同时这也意味着她很难与惠普彻底断绝关系。 -最后——这才是重点,你也猜到了——**Donald Trump**。想要拥有免费的、优秀的操作系统,他可能会用数百万美元去雇佣一个精英黑客团队去定制属于自己的操作系统;同时他也可以向别人炫耀自己的财力。他可能会吹嘘自己的操作系统是目前最好的系统。它肯定没有兼容 POSIX【译者注:可移植操作系统接口】或者采用一些其他的标准,因为那样的话就需要提供一些其他的很多的规则。同时这个系统完全不提供任何文档,因为如果 **Donald Trump** 向人们展示了他的系统的运行方式,很明显他会经受所有机密被泄露至伊斯兰国家的风险。 +最后——这才是重点,你也猜到了——**Donald Trump**。想要拥有免费的、优秀的操作系统的他,可能会用数百万美元去雇佣一个精英黑客团队去定制属于自己的操作系统;同时他也可以向别人炫耀自己的财力。他可能会吹嘘自己的操作系统是目前最好的系统。它肯定没有兼容 POSIX【译者注:可移植操作系统接口】或者采用一些其他的标准,因为那样的话就需要提供一些其他的很多的规则。同时这个系统完全不提供任何文档,因为如果 **Donald Trump** 向人们展示了他的系统的运行方式,很明显他会经受所有机密被泄露至伊斯兰国家的风险。 -非此即彼,如果 **Donald Trump** 非要选择一种已有的 Linux 操作系统, [Ubuntu][7] 应该是明智的选择。而 **Donald Trump** 也是 Ubuntu 的开发者,他和他的团队按照他们的想法,通过开发他们自由的甚至是专有的应用和接口去打造他们认为的开源软件。自由软件纯化论者却很不喜欢这种开发模式,他们很反感使用 Ubuntu,反而很多其他人更喜欢 Ubuntu。当然,长远来看,关于这种做法的争论(无论是政治领域还是软件领域)还待见分晓。 +非此即彼,如果 **Donald Trump** 非要选择一种已有的 Linux 操作系统, [Ubuntu][7] 应该是明智的选择。而 **Donald Trump** 也是 Ubuntu 的开发者,他和他的团队按照他们的想法,通过开发他们自有的甚至是专有的应用和接口去打造他们认为的开源软件。自由软件纯化论者却很不喜欢这种开发模式,他们很反感使用 Ubuntu,反而很多其他人更喜欢 Ubuntu。当然,长远来看,关于这种做法的争论(无论是政治领域还是软件领域)还待见分晓。 ### 敬请期待 ### From 15da08fd841b06edba8d4c79dc5adaaa72d66d1a Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 12 May 2016 21:20:14 +0800 Subject: [PATCH 1374/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/LXD/Part 4 - LXD 2.0--Resource control.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/tech/LXD/Part 4 - LXD 2.0--Resource control.md b/sources/tech/LXD/Part 4 - LXD 2.0--Resource control.md index e404cccffa..736c5b84bc 100644 --- a/sources/tech/LXD/Part 4 - LXD 2.0--Resource control.md +++ b/sources/tech/LXD/Part 4 - LXD 2.0--Resource control.md @@ -1,3 +1,6 @@ +ezio is translating + + Part 4 - LXD 2.0: Resource control ====================================== From e4e812e422e93fd5d4cb0d98598b9ff23169e18a Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Fri, 13 May 2016 16:18:24 +0800 Subject: [PATCH 1375/1710] vim-kakali translating --- .../20160505 Confessions of a cross-platform developer.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/talk/20160505 Confessions of a cross-platform developer.md b/sources/talk/20160505 Confessions of a cross-platform developer.md index 807dfd544b..0f6af84070 100644 --- a/sources/talk/20160505 Confessions of a cross-platform developer.md +++ b/sources/talk/20160505 Confessions of a cross-platform developer.md @@ -1,3 +1,7 @@ +vim-kakali translating + + + Confessions of a cross-platform developer ============================================= From edc75c98c9a9b269823119a29ef1c4f670c5aae8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 14 May 2016 18:19:44 +0800 Subject: [PATCH 1376/1710] PUB:20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @vim-kakali , @PurlingNayuki ,我认为这篇文章的翻译和校对都存在一些问题,因此我做了较大篇幅的修正,请参考比较。可能也有错误或者大家有不同的翻译意见,希望可以展开讨论。 --- ...butions Would Presidential Hopefuls Run.md | 53 +++++++++++++++++++ ...butions Would Presidential Hopefuls Run.md | 53 ------------------- 2 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md delete mode 100644 translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md diff --git a/published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md b/published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md new file mode 100644 index 0000000000..87c91930b3 --- /dev/null +++ b/published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md @@ -0,0 +1,53 @@ +如果总统候选人们要使用 Linux 发行版,他们会选择哪个? +================================================================================ +![Republican presidential candidate Donald Trump +](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/08/donaldtrump.jpg) + +*共和党总统候选人 Donald Trump【译者注:唐纳德·特朗普,美国地产大亨、作家、主持人】* + +如果要竞选总统的人们使用 Linux 或其他的开源操作系统,那么会使用哪个发行版呢?问题的关键是存在许多其它的因素,比如,一些“政治立场”问题,或者是给一个发行版的名字添加上感叹号是否合适——而这问题一直被忽视。先不管这些忽视:接下来是时事新闻工作者关于总统大选和 Linux 发行版的报道。 + +对于那些已经看了很多年我的文字的人来说(除了我亲爱的的编辑之外,他们一直听我的瞎扯是不是倒霉到家了?),这篇文章听起来很熟悉,这是因为我在去年的总统选举期间写了一篇[类似的文章][1]。一些读者把这篇文章的内容看的比我想象的还要严肃,所以我会花点时间阐述我的观点:事实上,我不认为开源软件和政治运动彼此之间有多大的关系。我写那样的文章仅仅是新的一周的自我消遣罢了。 + +当然,你也可以认为它们彼此相关,毕竟你才是读者。 + +### Linux 发行版之选:共和党人们 ### + +今天,我只是谈及一些有关共和党人们的话题,我甚至只会谈论他们的其中一部分。因为共和党的提名人太多了,以至于我写满了整篇文章。由此开始: + +如果 **Jeb (Jeb!?) Bush** 使用 Linux,它一定是 [Debian][2]。Debian 属于一个相当无趣的分支,它是为真正意义上的、成熟的黑客设计的,这些人将清理那些由经验不甚丰富的开源爱好者所造成的混乱视为一大使命。当然,这也使得 Debian 显得很枯燥,所以它已有的用户基数一直在缩减。 + +**Scott Walker** ,对于他来说,应该是一个 [Damn Small Linux][3] (DSL) 用户。这个系统仅仅需要 50MB 的硬盘空间和 16MB 的 RAM 便可运行。DSL 可以使一台 20 年前的 486 计算机焕发新春,而这恰好符合了 **Scott Walker** 所主张的消减成本计划。当然,你在 DSL 上的用户体验也十分原始,这个系统平台只能够运行一个浏览器。但是至少你你不用浪费钱财购买新的电脑硬件,你那台 1993 年购买的机器仍然可以为你好好的工作。 + +**Chris Christie** 会使用哪种系统呢?他肯定会使用 [Relax-and-Recover Linux][4],它号称“一次搞定(Setup-and-forget)的裸机 Linux 灾难恢复方案” 。从那次不幸的华盛顿大桥事故后,“一次搞定(Setup-and-forget)”基本上便成了 Christie 的政治主张。不管灾难恢复是否能够让 Christie 最终挽回一切,但是当他的电脑死机的时候,至少可以找到一两封意外丢失的机密邮件。 + +至于 **Carly Fiorina**,她无疑将要使用 [惠普][6] (HPQ)为“[The Machine][5]”开发的操作系统,她在 1999 年到 2005 年这 6 年期间管理的这个公司。事实上,The Machine 可以运行几种不同的操作系统,也许是基于 Linux 的,也许不是,我们并不太清楚,它的开发始于 **Carly Fiorina** 在惠普公司的任期结束后。不管怎么说,作为 IT 圈里一个成功的管理者,这是她履历里面重要的组成部分,同时这也意味着她很难与惠普彻底断绝关系。 + +最后,但并不是不重要,你也猜到了——**Donald Trump**。他显然会动用数百万美元去雇佣一个精英黑客团队去定制属于自己的操作系统——尽管他原本是想要免费获得一个完美的、现成的操作系统——然后还能向别人炫耀自己的财力。他可能会吹嘘自己的操作系统是目前最好的系统,虽然它可能没有兼容 POSIX 或者一些其它的标准,因为那样的话就需要花掉更多的钱。同时这个系统也将根本不会提供任何文档,因为如果 **Donald Trump** 向人们解释他的系统的实际运行方式,他会冒着所有机密被泄露至伊斯兰国家的风险,绝对是这样的。 + +另外,如果 **Donald Trump** 非要选择一种已有的 Linux 平台的话, [Ubuntu][7] 应该是明智的选择。就像 **Donald Trump** 一样, Ubuntu 的开发者秉承“我们做自己想要做的”原则,通过他们自己的实现来构建开源软件。自由软件纯化论者却很反感 Ubuntu 这一点,但是很多普通用户却更喜欢一些。当然,无论你是不是一个纯粹论者,无论是在软件领域还是政治领域,还需要时间才能知道分晓。 + +### 敬请期待 ### + +如果你想知道为什么我还没有提到民主党候选人,别想多了。我没有在这篇文章中提及他们,是因为我对民主党并不比共和党喜欢更多或更少一点(我个人认为,这种只有两个政党的美国特色是不荒谬的,根本不能体现民主,我也不相信这些党派候选人)。 + +另一方面,也可能会有很多人关心民主党候选人使用的 Linux 发行版。后续的帖子中我会提及的,请拭目以待。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/081715/which-open-source-linux-distributions-would-presidential- + +作者:[Christopher Tozzi][a] +译者:[vim-kakali](https://github.com/vim-kakali) +校对:[PurlingNayuki](https://github.com/PurlingNayuki), [wxy](https://github.com/wxy/) + +本文由 [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/ diff --git a/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md b/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md deleted file mode 100644 index e87e93ca32..0000000000 --- a/translated/news/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md +++ /dev/null @@ -1,53 +0,0 @@ -总统更乐意使用哪种开源Linux分支? -================================================================================ -![Republican presidential candidate Donald Trump -](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/08/donaldtrump.jpg) - -共和党总统候选人 Donald Trump【译者注:唐纳德·特朗普,美国地产大亨、作家、主持人】 - -如果人们要竞选总统,而决定因素却是使用 Linux 或其他的开源操作系统,那么这样的系统会是哪个发行版呢?关键是存在与其他很多事情有关的问题,而这正好使我们很难抉择;比如,一些“政治立场”问题,或者是要判断某一个分支诞生时为它的名字加上感叹号是否合适——而这些问题一直被忽视。而忽视到此就结束了:接下来是时事新闻工作者关于总统大选和 Linux 分支的报道。 - -对于那些已经看了很多年我的文字的人来说(除了我亲爱的的编辑之外,他们一直听我的瞎扯是不是倒霉到家了?),这些话听起来很熟悉,这是因为我在去年的总统选举期间写了一篇[类似的文章][1]。一些有趣的读者把这里面的内容看的很正式,然而我并不是这样想的,所以我会花点时间阐述我的观点:事实上,我不认为开源软件和政治运动对于一些事情有多大的意义。我写那样的文章仅仅是新的一周的自我消遣罢了。 - -当然,你也可以去了解更多的你想知道的东西,毕竟你才是读者。 - -### Linux 分支:共和党人的选择 ### - -今天,我只是谈及一些有关共和主义的话题,我甚至只会谈论他们的其中一部分。因为共和党的期望提名太多了以至于我写满了整篇文章。由此开始: - -如果 **Jeb (Jeb!?) Bush** 使用 Linux,它一定是 [Debian][2]。Debian 属于一个相当无趣的分支,它是为真正意义上的黑客设计的,它们将快速成长起来并清理经验不甚丰富的开源爱好者造成的混乱视为一大使命。当然,这也使得Debian显得很枯燥,所以它已有的用户基础一直在缩减。 - -**Scott Walker** 是一个 [Damn Small Linux][3] (DSL) 用户。这个系统仅仅需要 50MB 的硬盘空间和 16MB 的 RAM 便可完美运行。DSL 可以使一台 20 年前的 486 计算机充满活力;而这恰好满足了 **Scott Walker** 消减硬件成本的需求。当然,你使用 DSL 的体验也是最原始的;这个系统平台只能够运行一个浏览器。但是至少你在 1993 年购买的机器现在仍然能很好的工作,这样你也不用浪费钱财购买新的电脑硬件。 - -**Chris Christie** 会使用哪种系统呢?他肯定会依赖于一次设置便可持续工作的裸机 Linux 灾难恢复方案,而这就是 [Relax-and-Recover Linux][4]。Christie 使用它主要是因为他的政治工作,从那次华盛顿大桥事故后,他的政治动力就受到了影响。不管它是否能够让 Christie 挽回一切事故,但是当他的电脑死机的时候,至少可以找到一些意外丢失的机密邮件。 - -至于 **Carly Fiorina**,她无疑将要使用 [Hewlett-Packard][6] (HPQ)为“[The Machine][5]”操作系统开发的软件,HPQ 是她在 1999 年到 2005 年这 6 年期间所管理的公司。事实上,这种机器可以运行部分不同操作系统,而我们并不清楚这些系统是否基于 Linux;**Carly Fiorina** 被惠普公司辞退后,开发操作系统工作就开始了。尽管如此,她仍然是她研究的计算机领域中的成功管理者。同时这也意味着她很难与惠普彻底断绝关系。 - -最后——这才是重点,你也猜到了——**Donald Trump**。想要拥有免费的、优秀的操作系统的他,可能会用数百万美元去雇佣一个精英黑客团队去定制属于自己的操作系统;同时他也可以向别人炫耀自己的财力。他可能会吹嘘自己的操作系统是目前最好的系统。它肯定没有兼容 POSIX【译者注:可移植操作系统接口】或者采用一些其他的标准,因为那样的话就需要提供一些其他的很多的规则。同时这个系统完全不提供任何文档,因为如果 **Donald Trump** 向人们展示了他的系统的运行方式,很明显他会经受所有机密被泄露至伊斯兰国家的风险。 - -非此即彼,如果 **Donald Trump** 非要选择一种已有的 Linux 操作系统, [Ubuntu][7] 应该是明智的选择。而 **Donald Trump** 也是 Ubuntu 的开发者,他和他的团队按照他们的想法,通过开发他们自有的甚至是专有的应用和接口去打造他们认为的开源软件。自由软件纯化论者却很不喜欢这种开发模式,他们很反感使用 Ubuntu,反而很多其他人更喜欢 Ubuntu。当然,长远来看,关于这种做法的争论(无论是政治领域还是软件领域)还待见分晓。 - -### 敬请期待 ### - -如果你想知道为什么我还没有提到民主党候人,别想了。我不会在这篇文章中提及他们,因为我一直对民主党和共和党保持中立观点(我个人认为,像美国这样的的情况,只有两个政党是不合理的;事实上,这种意义上的民主就显得很可笑,所以我不太相信这些党派候选人)。 - -相反,也可能会有很多人关心民主党候选人使用的Linux分支。后续的帖子中我会提及的,请拭目以待。 - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/081715/which-open-source-linux-distributions-would-presidential- - -作者:[Christopher Tozzi][a] -译者:[vim-kakali](https://github.com/vim-kakali) -校对:[PurlingNayuki](https://github.com/PurlingNayuki) - -本文由 [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/ From a890ab283011bb733da579e875f3e1e5021909cb Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 14 May 2016 19:44:53 +0800 Subject: [PATCH 1377/1710] Translated sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md --- ...d Services SysVinit Systemd and Upstart.md | 67 ++++++++++++++++--- 1 file changed, 58 insertions(+), 9 deletions(-) rename {sources => translated}/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md (70%) diff --git a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md similarity index 70% rename from sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md rename to translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md index af3ac034be..b902fd23d9 100644 --- a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md +++ b/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md @@ -1,92 +1,127 @@ -ictlyh Translating +LFCS 系列第七讲: 通过 SysVinit、Systemd 和 Upstart 管理系统自启动进程和服务 Part 7 - LFCS: Managing System Startup Process and Services (SysVinit, Systemd and Upstart) ================================================================================ +几个月前, Linux 基金会宣布 LFCS(Linux 基金会认证系统管理员) 认证诞生了,这个令人兴奋的新计划定位于让来自全球各地的初级到中级的 Linux 系统管理员得到认证。这其中包括维护已经在运行的系统和服务能力、第一手的问题查找和分析能力、以及决定何时向开发团队提交问题的能力。 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 基金会认证系统管理员 Linux Foundation Certified Sysadmin – Part 7 +下面的视频简要介绍了 Linux 基金会认证计划。 The following video describes an brief introduction to The Linux Foundation Certification Program. 注:youtube 视频 +这篇博文是 10 指南系列中的第七篇,在这篇文章中,我们会介绍如何管理 Linux 系统自启动进程和服务,这是 LFCS 认证考试要求的一部分。 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. +### 管理 Linux 自启动进程 ### ### Managing the Linux Startup Process ### +Linux 系统的启动程序包括多个阶段,每个阶段由一个不同的组件表示。下面的图示简要总结了启动过程以及所有包括的主要组件。 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 启动过程 Linux Boot Process +当你按下你机器上的电源键时, 存储在主板 EEPROM 芯片中的固件初始化 POST(通电自检) 检查系统硬件资源的状态。POST 结束后,固件会搜索并加载位于第一块可用磁盘上的 MBR 或 EFI 分区的第一阶段引导程序,并把控制权交给引导程序。 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 方式 #### #### MBR Method #### +MBR 是位于 BISO 设置中标记为可启动磁盘上的第一个扇区,大小是 512 个字节。 The MBR is located in the first sector of the disk marked as bootable in the BIOS settings and is 512 bytes in size. +- 前面 446 个字节:包括可执行代码和错误信息文本的引导程序 +- 接下来的 64 个字节:四个分区(主分区或扩展分区)中每个分区一条记录的分区表。其中,每条记录标示了每个一个分区的状态(是否活跃)、大小以及开始和结束扇区。 +- 最后 2 个字节: MBR 有效性检查的魔数。 - 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. +下面的命令对 MBR 进行备份(在本例中,/dev/sda 是第一块硬盘)。结果文件 mbr.bkp 在分区表被破坏、例如系统不可引导时能排上用场。 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. +当然,为了后面需要的时候能使用它,我们需要把它保存到别的地方(例如一个 USB 设备)。该文件能帮助我们重新恢复 MBR,这只在我们操作过程中没有改变硬盘驱动布局时才有效。 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. +**备份 MBR** **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) +在 Linux 中备份 MBR Backup MBR in Linux +**恢复 MBR** **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) +在 Linux 中恢复 MBR Restore MBR in Linux +#### EFI/UEFI 方式 #### #### EFI/UEFI Method #### +对于使用 EFI/UEFI 方式的系统, UEFI 固件读取它的设置来决定从哪里启动哪个 UEFI 应用。(例如, EFI 分区位于哪块磁盘或分区)。 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). +接下来,加载并运行第二阶段引导程序(又名引导管理器)。GRUB[GRand Unified Boot] 是 Linux 中最常使用的引导管理器。今天大部分使用的系统中都能找到它两个中的其中一个版本。 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 有效配置文件: /boot/grub/menu.lst(旧发行版, EFI/UEFI 固件不支持)。 +- GRUB2 配置文件: 通常是 /etc/default/grub。 - GRUB legacy configuration file: /boot/grub/menu.lst (older distributions, not supported by EFI/UEFI firmwares). - GRUB2 configuration file: most likely, /etc/default/grub. +尽管 LFCS 考试目标没有明确要求了解 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 +为了使更改生效,你需要以 root 用户修改 GRUB 的配置。 As root after modifying GRUB’s configuration in order to apply the changes. +首先, GRUB 加载默认的内核以及 initrd 或 initramfs 镜像。补充一句,initrd 或者 initramfs 帮助完成硬件检测、内核模块加载、以及发现挂载根目录文件系统需要的设备。 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. +一旦真正的根目录文件系统启动,为了显示用户界面,内核就会执行系统和服务管理器(init 或 systemd,进程号 PID 一般为 1)开始普通用户态的引导程序。 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. +init 和 systemd 都是管理其它守护进程的守护进程(后台进程),它们总是最先启动(系统引导时),最后结束(系统关闭时)。 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 +Systemd 和 Init +### 自启动服务(SysVinit) ### ### Starting Services (SysVinit) ### +Linux 中运行等级的概念表示通过控制运行哪些服务来以不同方式使用系统。换句话说,运行等级控制着当前执行状态下可以完成什么任务(以及什么不能完成)。 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). +传统上,这个启动过程是基于起源于 System V Unix 的形式,通过执行脚本启动或者停止服务从而使机器进入指定的运行等级(换句话说,是一个不同的系统运行模式)。 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). +在每个运行等级中,独立服务可以设置为运行、或者在运行时关闭。一些主流发行版的最新版本中,已经移除了标准的 System V,而用一个称为 systemd(表示系统守护进程)的新服务和系统管理器代替,但为了兼容性,通常也支持 sysv 命令。这意味着你可以在基于 systemd 的发行版中运行大部分有名的 sysv 初始化工具。 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] +- 推荐阅读: [Linux 为什么用 ‘systemd’ 代替 ‘init’][1] +除了启动系统进程,init 还会查看 /etc/inittab 来决定进入哪个运行等级。 Besides starting the system process, init looks to the /etc/inittab file to decide what runlevel must be entered. 注:表格 @@ -102,61 +137,73 @@ Besides starting the system process, init looks to the /etc/inittab file to deci 0 -  Halt the system. Runlevel 0 is a special transitional state used to shutdown the system quickly. +  停止系统。运行等级 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. +  别名为 s 或 S,这个运行等级有时候也称为维护模式。在这个运行等级启动的服务由于发行版不同而不同。通常用于正常系统操作损坏时低级别的系统维护。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. +  多用户。在 Debian 系统及其衍生版中,这是默认的运行等级,还包括了一个图形化登录(如果有的话)。在基于红帽的系统中,这是没有网络的多用户模式。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. +  在基于红帽的系统中,这是默认的多用户模式,运行除了图形化环境以外的所有东西。基于 Debian 的系统中通常不会使用这个运行等级以及等级 4 和 5。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. +  通常默认情况下不使用,可用于自定制。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. +  基于红帽的系统中,支持 GUI 登录的完全多用户模式。这个运行等级和等级 3 类似,但是有可用的 GUI 登录。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. +  重启系统。Reboot the system. +要在运行等级之间切换,我们只需要使用 init 命令更改运行等级:init N(其中 N 是上面列出的一个运行等级)。 +请注意这并不是运行中的系统切换运行等级的推荐方式,因为它不会给已经登录的用户发送警告(因而导致他们丢失工作以及进程异常终结)。 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). +相反,应该用 shutdown 命令重启系统(它首先发送警告信息给所有已经登录的用户,并锁住任何新的登录;然后再给 init 发送信号切换运行等级)但是,首先要在 /etc/inittab 文件中设置好默认的运行等级(系统引导到的等级)。 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. +因为这个原因,按照下面的步骤切当地切换运行等级。以 root 用户在 /etc/inittab 中查找下面的行。 For that reason, follow these steps to properly switch between runlevels, As root, look for the following line in /etc/inittab. id:2:initdefault: +并用你喜欢的文本编辑器,例如 vim(本系列的[第二讲 : 如何在 Linux 中使用 vi/vim 编辑器][2]),更改数字 2 为想要的运行等级。 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). +然后,以 root 用户执行 Next, run as root. # shutdown -r now +最后一个命令会重启系统,并使它在下一次引导时进入指定的运行等级,并会执行保存在 /etc/rc[runlevel].d 目录中的脚本以决定应该启动什么服务、不应该启动什么服务。例如,在下面的系统中运行等级 2。 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) +在 Linux 中更改运行等级 Change Runlevels in Linux +#### 使用 chkconfig 管理服务 #### #### Manage Services using chkconfig #### +为了在启动时启动或者停用系统服务,我们可以在 CentOS / openSUSE 中使用 [chkconfig 命令][3],在 Debian 及其衍生版中使用 sysv-rc-conf 命令。这个工具还能告诉我们对于一个指定的运行等级预先配置的状态是什么。 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. +- 推荐阅读: [如何在 Linux 中停止和停用不想要的服务][4] - Read Also: [How to Stop and Disable Unwanted Services in Linux][4] +列出某个服务的运行等级配置。 Listing the runlevel configuration for a service. # chkconfig --list [service name] @@ -165,8 +212,10 @@ Listing the runlevel configuration for a service. ![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). From 4a8e4315d6b3d1df79bc8d0d9255beed9e652440 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 14 May 2016 23:21:00 +0800 Subject: [PATCH 1378/1710] Translated tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md --- ...d Services SysVinit Systemd and Upstart.md | 204 +++++++----------- 1 file changed, 79 insertions(+), 125 deletions(-) diff --git a/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md index b902fd23d9..0c4c1ac766 100644 --- a/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md +++ b/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md @@ -1,128 +1,92 @@ LFCS 系列第七讲: 通过 SysVinit、Systemd 和 Upstart 管理系统自启动进程和服务 -Part 7 - LFCS: Managing System Startup Process and Services (SysVinit, Systemd and Upstart) ================================================================================ 几个月前, Linux 基金会宣布 LFCS(Linux 基金会认证系统管理员) 认证诞生了,这个令人兴奋的新计划定位于让来自全球各地的初级到中级的 Linux 系统管理员得到认证。这其中包括维护已经在运行的系统和服务能力、第一手的问题查找和分析能力、以及决定何时向开发团队提交问题的能力。 -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 基金会认证系统管理员 -Linux Foundation Certified Sysadmin – Part 7 下面的视频简要介绍了 Linux 基金会认证计划。 -The following video describes an brief introduction to The Linux Foundation Certification Program. 注:youtube 视频 这篇博文是 10 指南系列中的第七篇,在这篇文章中,我们会介绍如何管理 Linux 系统自启动进程和服务,这是 LFCS 认证考试要求的一部分。 -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. ### 管理 Linux 自启动进程 ### -### Managing the Linux Startup Process ### Linux 系统的启动程序包括多个阶段,每个阶段由一个不同的组件表示。下面的图示简要总结了启动过程以及所有包括的主要组件。 -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 启动过程 -Linux Boot Process 当你按下你机器上的电源键时, 存储在主板 EEPROM 芯片中的固件初始化 POST(通电自检) 检查系统硬件资源的状态。POST 结束后,固件会搜索并加载位于第一块可用磁盘上的 MBR 或 EFI 分区的第一阶段引导程序,并把控制权交给引导程序。 -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 方式 #### -#### MBR Method #### MBR 是位于 BISO 设置中标记为可启动磁盘上的第一个扇区,大小是 512 个字节。 -The MBR is located in the first sector of the disk marked as bootable in the BIOS settings and is 512 bytes in size. - 前面 446 个字节:包括可执行代码和错误信息文本的引导程序 - 接下来的 64 个字节:四个分区(主分区或扩展分区)中每个分区一条记录的分区表。其中,每条记录标示了每个一个分区的状态(是否活跃)、大小以及开始和结束扇区。 - 最后 2 个字节: MBR 有效性检查的魔数。 -- 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. 下面的命令对 MBR 进行备份(在本例中,/dev/sda 是第一块硬盘)。结果文件 mbr.bkp 在分区表被破坏、例如系统不可引导时能排上用场。 -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. 当然,为了后面需要的时候能使用它,我们需要把它保存到别的地方(例如一个 USB 设备)。该文件能帮助我们重新恢复 MBR,这只在我们操作过程中没有改变硬盘驱动布局时才有效。 -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. **备份 MBR** -**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) 在 Linux 中备份 MBR -Backup MBR in Linux **恢复 MBR** -**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) 在 Linux 中恢复 MBR -Restore MBR in Linux #### EFI/UEFI 方式 #### -#### EFI/UEFI Method #### -对于使用 EFI/UEFI 方式的系统, UEFI 固件读取它的设置来决定从哪里启动哪个 UEFI 应用。(例如, EFI 分区位于哪块磁盘或分区)。 -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). +对于使用 EFI/UEFI 方式的系统, UEFI 固件读取它的设置来决定从哪里启动哪个 UEFI 应用。(例如, EFI 分区位于哪块磁盘或分区。 接下来,加载并运行第二阶段引导程序(又名引导管理器)。GRUB[GRand Unified Boot] 是 Linux 中最常使用的引导管理器。今天大部分使用的系统中都能找到它两个中的其中一个版本。 -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 有效配置文件: /boot/grub/menu.lst(旧发行版, EFI/UEFI 固件不支持)。 - GRUB2 配置文件: 通常是 /etc/default/grub。 -- GRUB legacy configuration file: /boot/grub/menu.lst (older distributions, not supported by EFI/UEFI firmwares). -- GRUB2 configuration file: most likely, /etc/default/grub. 尽管 LFCS 考试目标没有明确要求了解 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 为了使更改生效,你需要以 root 用户修改 GRUB 的配置。 -As root after modifying GRUB’s configuration in order to apply the changes. 首先, GRUB 加载默认的内核以及 initrd 或 initramfs 镜像。补充一句,initrd 或者 initramfs 帮助完成硬件检测、内核模块加载、以及发现挂载根目录文件系统需要的设备。 -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. 一旦真正的根目录文件系统启动,为了显示用户界面,内核就会执行系统和服务管理器(init 或 systemd,进程号 PID 一般为 1)开始普通用户态的引导程序。 -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. init 和 systemd 都是管理其它守护进程的守护进程(后台进程),它们总是最先启动(系统引导时),最后结束(系统关闭时)。 -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 和 Init ### 自启动服务(SysVinit) ### -### Starting Services (SysVinit) ### Linux 中运行等级的概念表示通过控制运行哪些服务来以不同方式使用系统。换句话说,运行等级控制着当前执行状态下可以完成什么任务(以及什么不能完成)。 -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). 传统上,这个启动过程是基于起源于 System V Unix 的形式,通过执行脚本启动或者停止服务从而使机器进入指定的运行等级(换句话说,是一个不同的系统运行模式)。 -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). 在每个运行等级中,独立服务可以设置为运行、或者在运行时关闭。一些主流发行版的最新版本中,已经移除了标准的 System V,而用一个称为 systemd(表示系统守护进程)的新服务和系统管理器代替,但为了兼容性,通常也支持 sysv 命令。这意味着你可以在基于 systemd 的发行版中运行大部分有名的 sysv 初始化工具。 -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] - 推荐阅读: [Linux 为什么用 ‘systemd’ 代替 ‘init’][1] 除了启动系统进程,init 还会查看 /etc/inittab 来决定进入哪个运行等级。 -Besides starting the system process, init looks to the /etc/inittab file to decide what runlevel must be entered. 注:表格 @@ -137,74 +101,63 @@ Besides starting the system process, init looks to the /etc/inittab file to deci - + - + - + - + - + - + - +
0 停止系统。运行等级 0 是一个用于快速关闭系统的特殊过渡状态。Halt the system. Runlevel 0 is a special transitional state used to shutdown the system quickly. 停止系统。运行等级 0 是一个用于快速关闭系统的特殊过渡状态。
1 别名为 s 或 S,这个运行等级有时候也称为维护模式。在这个运行等级启动的服务由于发行版不同而不同。通常用于正常系统操作损坏时低级别的系统维护。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. 别名为 s 或 S,这个运行等级有时候也称为维护模式。在这个运行等级启动的服务由于发行版不同而不同。通常用于正常系统操作损坏时低级别的系统维护。
2 多用户。在 Debian 系统及其衍生版中,这是默认的运行等级,还包括了一个图形化登录(如果有的话)。在基于红帽的系统中,这是没有网络的多用户模式。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. 多用户。在 Debian 系统及其衍生版中,这是默认的运行等级,还包括了一个图形化登录(如果有的话)。在基于红帽的系统中,这是没有网络的多用户模式。
3 在基于红帽的系统中,这是默认的多用户模式,运行除了图形化环境以外的所有东西。基于 Debian 的系统中通常不会使用这个运行等级以及等级 4 和 5。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. 在基于红帽的系统中,这是默认的多用户模式,运行除了图形化环境以外的所有东西。基于 Debian 的系统中通常不会使用这个运行等级以及等级 4 和 5。
4 通常默认情况下不使用,可用于自定制。Typically unused by default and therefore available for customization. 通常默认情况下不使用,可用于自定制。
5 基于红帽的系统中,支持 GUI 登录的完全多用户模式。这个运行等级和等级 3 类似,但是有可用的 GUI 登录。On Red-Hat based systems, full multiuser mode with GUI login. This runlevel is like level 3, but with a GUI login available. 基于红帽的系统中,支持 GUI 登录的完全多用户模式。这个运行等级和等级 3 类似,但是有可用的 GUI 登录。
6 重启系统。Reboot the system. 重启系统。
要在运行等级之间切换,我们只需要使用 init 命令更改运行等级:init N(其中 N 是上面列出的一个运行等级)。 请注意这并不是运行中的系统切换运行等级的推荐方式,因为它不会给已经登录的用户发送警告(因而导致他们丢失工作以及进程异常终结)。 -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). 相反,应该用 shutdown 命令重启系统(它首先发送警告信息给所有已经登录的用户,并锁住任何新的登录;然后再给 init 发送信号切换运行等级)但是,首先要在 /etc/inittab 文件中设置好默认的运行等级(系统引导到的等级)。 -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. 因为这个原因,按照下面的步骤切当地切换运行等级。以 root 用户在 /etc/inittab 中查找下面的行。 -For that reason, follow these steps to properly switch between runlevels, As root, look for the following line in /etc/inittab. id:2:initdefault: 并用你喜欢的文本编辑器,例如 vim(本系列的[第二讲 : 如何在 Linux 中使用 vi/vim 编辑器][2]),更改数字 2 为想要的运行等级。 -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). 然后,以 root 用户执行 -Next, run as root. # shutdown -r now 最后一个命令会重启系统,并使它在下一次引导时进入指定的运行等级,并会执行保存在 /etc/rc[runlevel].d 目录中的脚本以决定应该启动什么服务、不应该启动什么服务。例如,在下面的系统中运行等级 2。 -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) 在 Linux 中更改运行等级 -Change Runlevels in Linux #### 使用 chkconfig 管理服务 #### -#### Manage Services using chkconfig #### 为了在启动时启动或者停用系统服务,我们可以在 CentOS / openSUSE 中使用 [chkconfig 命令][3],在 Debian 及其衍生版中使用 sysv-rc-conf 命令。这个工具还能告诉我们对于一个指定的运行等级预先配置的状态是什么。 -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. - 推荐阅读: [如何在 Linux 中停止和停用不想要的服务][4] -- 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 @@ -213,95 +166,95 @@ Listing the runlevel configuration for a service. ![Listing Runlevel Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Listing-Runlevel-Configuration.png) 列出运行等级配置 -Listing Runlevel Configuration +从上图中我们可以看出,当系统进入运行等级 2 到 5 的时候就会启动 postfix,而默认情况下运行等级 2 到 4 时会运行 mysqld。现在假设我们并不希望如此。 -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. +例如,我们希望运行等级为 5 时也启动 mysqld,运行等级为 4 或 5 时关闭 postfix。下面分别针对两种情况进行设置(以 root 用户执行以下命令)。 -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) +![在 Linux 中启用/停用服务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. +我们在基于 Debian 的系统中使用 sysv-rc-conf 完成类似任务。 -#### Manage Services using sysv-rc-conf #### +#### 使用 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. +1. 我们可以用下面的命令查看启动 mdadm 时的运行等级。 # 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 +![查看运行中服务的运行等级Check Runlevel of Service Running](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Service-Runlevel.png) -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). +查看运行中服务的运行等级 + +2. 我们使用 sysv-rc-conf 设置防止 mdadm 在运行等级2 之外的其它等级启动。只需根据需要(你可以使用上下左右按键)选中或取消选中(通过空格键)。 # sysv-rc-conf -![SysV Runlevel Config](http://www.tecmint.com/wp-content/uploads/2014/10/SysV-Runlevel-Config.png) +![Sysv 运行等级配置SysV Runlevel Config](http://www.tecmint.com/wp-content/uploads/2014/10/SysV-Runlevel-Config.png) -SysV Runlevel Config +Sysv 运行等级配置 -Then press q to quit. +然后输入 q 退出。 -3. We will restart the system and run again the command from STEP 1. +3. 重启系统并从步骤 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](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. +从上图中我们可以看出 mdadm 配置为只在运行等级 2 上启动。 -### What About systemd? ### +### 那关于 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. +systemd 是另外一个被多种主流 Linux 发行版采用的服务和系统管理器。它的目标是允许系统启动时多个任务尽可能并行(而 sysvinit 并非如此,sysvinit 一般比较慢,因为它每次只启动一个进程,而且会检查彼此之间是否有依赖,在启动其它服务之前还要等待守护进程启动),充当运行中系统动态资源管理的角色。 -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. +要查看你系统中运行的原生 systemd 服务和 Sysv 服务,可以用以下的命令。 # systemctl -![Check All Running Processes in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-All-Running-Processes.png) +![在 Linux 中查看运行中的进程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 +LOAD 一列显示了单元(UNIT 列,显示服务或者由 systemd 维护的其它进程)是否正确加载,ACTIVE 和 SUB 列则显示了该单元当前的状态。 -When the ACTIVE column indicates that an unit’s status is other than active, we can check what happened using. +显示服务当前状态的信息 + +当 ACTIVE 列显示某个单元状态并非活跃时,我们可以使用以下命令查看具体原因。 # systemctl status [unit] -For example, in the image above, media-samba.mount is in failed state. Let’s run. +例如,上图中 media-samba.mount 处于失败状态。我们可以运行: # systemctl status media-samba.mount -![Check Linux Service Status](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Service-Status.png) +![查看 Linux 服务状态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. +我们可以看到 media-samba.mount 失败的原因是 host dev1 上的挂载进程无法找到 //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. +一旦 //192.168.0.10/gacanepa 上的共享网络可用,我们可以再来尝试启动、停止以及重启 media-samba.mount 单元。执行每次操作之后,我们都执行 systemctl stats media-samba.mout 来查看它的状态。 # systemctl start media-samba.mount # systemctl status media-samba.mount @@ -309,59 +262,60 @@ Once the network share //192.168.0.10/gacanepa becomes available, let’s try to # 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](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. +使用 systemd 你可以在系统启动时启用或停用某服务 - # systemctl enable [service] # enable a service - # systemctl disable [service] # prevent a service from starting at boot + # systemctl enable [service] # 启用服务 + # systemctl disable [service] # 阻止服务随系统启动 -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) +启用或停用某服务随系统启动包括在 /etc/systemd/system/multi-user.target.wants 目录添加或者删除符号链接。 -Enabling Disabling Services +![启用或停用服务](http://www.tecmint.com/wp-content/uploads/2014/10/Enabling-Disabling-Services.jpeg) -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. +基于事件的 Upstart 是 /sbin/init 守护进程的替代品,它仅为在需要那些服务的时候启动服务而生,(或者当它们在运行时管理它们),以及处理发生的实践,因此 Upstart 优于基于依赖的 sysvinit 系统。 -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. +一开始它是为 Ubuntu 发行版开发的,但在红帽企业版 Linux 6.0 中得到使用。尽管希望它能在所有 Linux 发行版中替代 sysvinit,但它已经被 systemd 超越。2014 年 2 月 14 日,Mark Shuttleworth(Canonical Ltd. 创建者)发布声明之后的 Ubuntu 发行版采用 systemd 作为默认初始化守护进程。 -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. +由于 Sysv 启动脚本已经流行很长时间了,很多软件包中都包括了 Sysv 启动脚本。为了兼容这些软件, Upstart 提供了兼容模式:它可以运行保存在常用位置(/etc/rc.d/rc?.d, /etc/init.d/rc?.d, /etc/rc?.d或其它类似的位置)的Sysv 启动脚本。因此,如果我们安装了一个还没有 Upstart 配置脚本的软件,仍然可以用原来的方式启动它。 -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. +另外,如果我们还安装了类似 [chkconfig][5] 的工具,你还可以和在基于 sysvinit 的系统中一样用它们管理基于 Sysv 的服务。 -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. +Upstart 脚本除了支持 Sysv 启动脚本,还支持基于多种方式启动或者停用服务;例如, Upstart 可以在一个特定硬件设备连接上的时候启动一个服务。 -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. +使用 Upstart以及它原生脚本的系统替换了 /etc/inittab 文件和 /etc/init 目录下和运行等级相关的以 .conf 作为后缀的 Sysv 启动脚本目录。 -These *.conf scripts (also known as job definitions) generally consists of the following: +这些 *.conf 脚本(也称为任务定义)通常包括以下几部分: -- 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 @@ -380,30 +334,30 @@ For example, # 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. +要使更改生效,你要让 upstart 重新加载它的配置文件。 # 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. +其中 yourjobname 是之前 yourjobname.conf 脚本中添加的任务名称。 -A more complete and detailed reference guide for Upstart is available in the project’s web site under the menu “[Cookbook][6]”. +关于 Upstart 更完整和详细的介绍可以参考该项目网站的 “[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. +了解 Linux 启动进程对于你进行错误处理、调整计算机系统以及根据需要运行服务非常有用。 -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) +译者:[ictlyh](http://mutouxiaogui.cn/blog/) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8a721cf1f6ea95c1847737dee074efe0c0de266a Mon Sep 17 00:00:00 2001 From: ezio Date: Sun, 15 May 2016 11:20:07 +0800 Subject: [PATCH 1379/1710] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=96=87=E7=AB=A0?= 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 ---------- ... How to Configure OpenNMS on CentOS 7.x.md | 219 ------------ ...co Virtual Private Networking on Docker.md | 322 ------------------ ...Raspberry Pi projects for the classroom.md | 119 ------- 4 files changed, 839 deletions(-) delete mode 100644 sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md delete mode 100644 sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md delete mode 100644 sources/tech/20151012 Getting Started to Calico Virtual Private Networking on Docker.md delete mode 100644 sources/tech/20151207 5 great Raspberry Pi projects for the classroom.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 deleted file mode 100644 index 6624a3c590..0000000000 --- a/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md +++ /dev/null @@ -1,179 +0,0 @@ -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 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 deleted file mode 100644 index f209c8e45c..0000000000 --- a/sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md +++ /dev/null @@ -1,219 +0,0 @@ -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/ 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 deleted file mode 100644 index 27d60729e9..0000000000 --- a/sources/tech/20151012 Getting Started to Calico Virtual Private Networking on Docker.md +++ /dev/null @@ -1,322 +0,0 @@ -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/20151207 5 great Raspberry Pi projects for the classroom.md b/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md deleted file mode 100644 index b7455d11f7..0000000000 --- a/sources/tech/20151207 5 great Raspberry Pi projects for the classroom.md +++ /dev/null @@ -1,119 +0,0 @@ -ezio - -5 great Raspberry Pi projects for the classroom -===================================================== - - -5 个很适合在课堂上演示的树莓派项目 -===================================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png?itok=fSUS0fIt) - -### 1. 我的世界 Pi - -![](https://opensource.com/sites/default/files/lava.png) ->Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1]. - -Minecraft is the favorite game of pretty much every teenager in the world—and it's one of the most creative games ever to capture the attention of young people. The version that comes with every Raspberry Pi is not only a creative thinking building game, but comes with a programming interface allowing for additional interaction with the Minecraft world through Python code. - -我的世界是世界上很多青少年最喜欢的一个游戏,而且他也是目前最能激发年轻人创造力的一款游戏。这个树莓派版上自带的我的世界不仅仅是一个具有创造性的建筑游戏,他还是一个具有编程接口、可以通过 Python 与之交互的版本。 - -Minecraft: Pi Edition is a great way for teachers to engage students with problem solving and writing code to perform tasks. You can use the Python API to build a house and have it follow you wherever you go, build a bridge wherever you walk, make it rain lava, show the temperature in the sky, and anything else your imagination can create. - -我的世界:Pi 版对于老师来说是一个非常好的教授学生解决问题和编写代码完成任务的途径。你可以使用 Python API 创建一个房子,并且一直跟随这你的脚步移动,当你需要桥梁的时候给你建造一座桥,让老天呀下雨,显示天空的温度,以及其它你可以想象到的一切东西。 - -Read more in "[Getting Started with Minecraft Pi][2]." - -详情请见 "[Getting Started with Minecraft Pi][2]." - -### 2. 反应游戏和交通灯 Reaction game and traffic lights - -![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg) ->Courtesy of [Low Voltage Labs][3]. [CC BY-SA 4.0][1]. - -It's really easy to get started with physical computing on Raspberry Pi—just connect up LEDs and buttons to the GPIO pins, and with a few lines of code you can turn lights on and control things with button presses. Once you know the code to do the basics, it's down to your imagination as to what you do next! - -使用树莓派可以很轻松的进行物理计算——只需要连接几个 LED 和按钮到 开发板上的 GPIO 接口,再用几行代码你就可以按下按钮来开灯。一旦你指导了如何使用代码来做这些基本的东西,接下来就可以根据你的想象来做其它事情了。 - -If you know how to flash one light, you can flash three. Pick out three LEDs in traffic light colors and you can code the traffic light sequence. If you know how to use a button to a trigger an event, then you have a pedestrian crossing! Also look out for great pre-built traffic light add-ons like [PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6], and more. - -如果你知道如何让一个灯闪烁,你就可以让三个灯开始闪烁。挑选三个和交通灯一样颜色的 LED 灯,然后编写控制交通灯的代码。如果你知道如何使用按钮触发实践,那么你就可以模拟行人过马路。同时你可以参考其它已经完成的交通灯附件,比如[PI-TRAFFIC][4], [PI-STOP][5], [Traffic HAT][6],等等。 - -It's not always about the code—this can be used as an exercise in understanding how real world systems are devised. Computational thinking is a useful skill in any walk of life. - -代码并不是全部——这些联系只是让你理解真是世界里使如何完成这些事的。计算思维是一个在你一生中都会很有用的技能。 - -![](https://opensource.com/sites/default/files/reaction-game.png) ->Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1]. - -Next, try wiring up two buttons and an LED and making a two-player reaction game—let the light come on after a random amount of time and see who can press the button first! - -接下来试着接通两个按钮和 LED 灯的电源,实现一个反应游戏 —— 让 LED 灯随机的点亮,然后看是最先按下按钮。 - -To learn more, check out [GPIO Zero recipes][7]. Everything you need is in [CamJam EduKit 1][8]. - -要想了解更多可以看看 [GPIO Zero recipes][7]。你所需要的资料都可以在 [CamJam EduKit 1][8] 找到。 - -### 3. 电子宠物 Sense HAT Pixel Pet - -The Astro Pi—an augmented Raspberry Pi—is going to space this December, but you haven't missed your chance to get your hands on the hardware. The Sense HAT is the sensor board add-on used in the Astro Pi mission and it's available for anyone to buy. You can use it for data collection, science experiments, games and more. Watch this Gurl Geek Diaries video from Raspberry Pi's Carrie Anne for a great way to get started—by bringing to life an animated pixel pet of your own design on the Sense HAT display: - -Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是你并没有错过亲手把玩这个硬件的机会。Sense HAT 是 Astro Pi 的一个传感器扩展板,现在已经开放购买了。你可以使用它来进行数据搜集,科学实验,游戏和其它很多事。可以看看下面树莓派的 Carrie Anne 拍摄的 Gurl Geek Diaries 的视频,里面演示了一种很棒的入门途径——给生活添加一个你自己创造的生动的像素宠物: - -[video](https://youtu.be/gfRDFvEVz-w) - ->Learn more in "[Exploring the Sense HAT][9]." ->详见 "[探索 Sense HAT][9]." - -### 4. 红外鸟笼 Infrared bird box - -![](https://opensource.com/sites/default/files/ir-bird-box.png) ->Courtesy of the Raspberry Pi Foundation. [CC BY-SA 4.0][1]. - -A great exercise for the whole class to get involved with—place a Raspberry Pi and the NoIR camera module inside a bird box along with some infra-red lights so you can see in the dark, then stream video from the Pi over the network or on the internet. Wait for birds to nest and you can observe them without disturbing them in their habitat. - - - -Learn all about infrared and the light spectrum, and how to adjust the camera focus and control the camera in software. - -Learn more in "[Make an infrared bird box][10]." - -### 5. 机器人 Robotics - -![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg) ->Courtesy of Low Voltage Labs. [CC BY-SA 4.0][1]. - -With a Raspberry Pi and as little as a couple of motors and a motor controller board, you can build your own robot. There is a vast range of robots you can make, from basic buggies held together by sellotape and a homemade chassis, all the way to self-aware, sensor-laden metallic stallions with camera attachments driven by games controllers. - -Learn how to control individual motors with something straightforward like the RTK Motor Controller Board (£8/$12), or dive into the new CamJam robotics kit (£17/$25) which comes with motors, wheels and a couple of sensors—great value and plenty of learning potential. - -Alternatively, if you'd like something more hardcore, try PiBorg's [4Borg][11] (£99/$150) or [DiddyBorg][12] (£180/$273) or go the whole hog and treat yourself to their DoodleBorg Metal edition (£250/$380)—and build a mini version of their infamous [DoodleBorg tank][13] (unfortunately not for sale). - -Check out the [CamJam robotics kit worksheets][14]. - - ------------------------------------------------------------------------------- - -via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom - -作者:[Ben Nuttall][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/bennuttall -[1]: https://creativecommons.org/licenses/by-sa/4.0/ -[2]: https://opensource.com/life/15/5/getting-started-minecraft-pi -[3]: http://lowvoltagelabs.com/ -[4]: http://lowvoltagelabs.com/products/pi-traffic/ -[5]: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390 -[6]: https://ryanteck.uk/hats/1-traffichat-0635648607122.html -[7]: http://pythonhosted.org/gpiozero/recipes/ -[8]: http://camjam.me/?page_id=236 -[9]: https://opensource.com/life/15/10/exploring-raspberry-pi-sense-hat -[10]: https://www.raspberrypi.org/learning/infrared-bird-box/ -[11]: https://www.piborg.org/4borg -[12]: https://www.piborg.org/diddyborg -[13]: https://www.piborg.org/doodleborg -[14]: http://camjam.me/?page_id=1035#worksheets From 849699211b51b3b9b70a6102874f691cbd51e9f7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 11:40:21 +0800 Subject: [PATCH 1380/1710] =?UTF-8?q?20160515-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ata processing with Cassandra and Spark.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md diff --git a/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md b/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md new file mode 100644 index 0000000000..149ab6fbb7 --- /dev/null +++ b/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md @@ -0,0 +1,50 @@ +An introduction to data processing with Cassandra and Spark +============================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc_520x292_opendata_0613mm.png?itok=mzC0Tb28) + + +There's been a huge surge of interest around the Apache Cassandra database due to the increasing uptime and performance demands of modern cloud applications. + +So, what is Apache Cassandra? A distributed OLTP database built for high availability and linear scalability. When people ask what Cassandra is used for, think about the type of system you want close to the customer. This is ultimately the system that our users interact with. Applications that must always be available: product catalogs, IoT, medical systems, and mobile applications. In these categories downtime can mean loss of revenue or even more dire outcomes depending on your specific use case. Netflix was one of the earliest adopters of this project, which was open sourced in 2008, and their contributions, along with successes, put it on the radar of the masses. + +Cassandra became a top level Apache Software Foundation project in 2010 and has been riding the wave in popularity since then. Now even knowledge in Cassandra gets you serious returns in the job market. It's both crazy and awesome to consider a NoSQL and open source technology could perform this sort of disruption next to the giants of enterprise SQL. This begs the question, what makes it so popular? + +Cassandra has the ability to be always on in spite of massive hardware and network failures by utilizing a design first widely discussed in [the Dynamo paper from Amazon][1]. By using a peer to peer model, with no single point of failure, we can survive rack failure and even complete network partitions. We can deal with an entire data center failure without impacting our customer's experience. A distributed system that plans for failure is a properly planned distributed system, because frankly, failures are just going to happen. With Cassandra, we accept that cruel fact of life, and bake it into the database's architecture and functionality. + +We know what you’re thinking, "But, I’m coming from a relational background, isn't this going to be a daunting transition?" The answer is somewhat yes and no. Data modeling with Cassandra will feel familiar to developers coming from the relational world. We use tables to model our data, and CQL, the Cassandra Query Language, to query the database. However, unlike SQL, Cassandra supports more complex data structures such as nested and user defined types. For instance, instead of creating a dedicated table to store likes on a cat photo, we can store that data in a collection with the photo itself enabling faster, sequential lookups. That's expressed very naturally in CQL. In our photo table we may want to track the name, URL, and the people that liked the photo. + +![](https://opensource.com/sites/default/files/resize/screen_shot_2016-05-06_at_7.17.33_am-350x198.png) + +In a high performance system milliseconds matter for both user experience and for customer retention. Expensive JOIN operations limit our ability to scale out by adding unpredictable network calls. By denormalizing our data so it can be fetched in as few requests as possible, we profit from the trend of decreasing costs in disk space and in return get predictable, high performance applications. We embrace the concept of denormalization with Cassandra because it offers a pretty appealing tradeoff. + +We're obviously not just limited to storing likes on cat photos. Cassandra is a optimized for high write throughput. This makes it the perfect solution for big data applications where we’re constantly ingesting data. Time series and IoT use cases are growing at a steady rate in both demand and appearance in the market, and we're continuously finding ways to utilize the data we collect to improve our technological application. + +This brings us to the next step, we've talked about storing our data in a modern, cost-effective fashion, but how do we get even more horsepower? Meaning, once we've collected all that data, what do we do with it? How can we analyze hundreds of terabytes efficiently? How can we react to information we're receiving in real-time, making decisions in seconds rather than hours? Enter Apache Spark. + +Spark is the next step in the evolution of big data processing. Hadoop and MapReduce were revolutionary projects, giving the big data world an opportunity to crunch all the data we've collected. Spark takes our big data analysis to the next level by drastically improving performance and massively decreasing code complexity. Through Spark, we can perform massive batch processing calculations, react quickly to stream processing, make smart decisions through machine learning, and understand complex, recursive relationships through graph traversals. It’s not just about offering your customers a fast and reliable connection to their application (which is what Cassandra offers), it's also about being able to leverage insights from the data Cassandra stores to make more intelligent business decisions and better cater to customer needs. + +You can check out the [Spark-Cassandra Connector][2] (open source) and give it a shot. To learn more about both technologies, we highly recommend the free self-paced courses on [DataStax Academy][3]. + +Have fun digging in and learning some killer new technology! If you want to learn more, check out our [OSCON tutorial][4], with a hands on exploration into the worlds of both Cassandra and Spark. + +We also love taking questions on Twitter, so give us a shout and we’ll try to help: [Dani][5] and [Jon][6]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/5/basics-cassandra-and-spark-data-processing + +作者:[Jon Haddad][a],[Dani Traphagen][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twitter.com/rustyrazorblade +[b]: https://opensource.com/users/dtrapezoid +[1]: http://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf +[2]: https://github.com/datastax/spark-cassandra-connector +[3]: https://academy.datastax.com/ +[4]: http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/49162 +[5]: https://twitter.com/dtrapezoid +[6]: https://twitter.com/rustyrazorblade From 0f082c887259262d50cfb1109d53a22f87b1f78e Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 11:47:09 +0800 Subject: [PATCH 1381/1710] =?UTF-8?q?20160515-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rt Devices, Security Concerns, and More.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sources/talk/20160506 Linus Torvalds Talks IoT, Smart Devices, Security Concerns, and More.md diff --git a/sources/talk/20160506 Linus Torvalds Talks IoT, Smart Devices, Security Concerns, and More.md b/sources/talk/20160506 Linus Torvalds Talks IoT, Smart Devices, Security Concerns, and More.md new file mode 100644 index 0000000000..e17c33bd81 --- /dev/null +++ b/sources/talk/20160506 Linus Torvalds Talks IoT, Smart Devices, Security Concerns, and More.md @@ -0,0 +1,46 @@ +Linus Torvalds Talks IoT, Smart Devices, Security Concerns, and More[video] +=========================================================================== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/elc-linus-b.jpg?itok=6WwnCSjL) +>Dirk Hohndel interviews Linus Torvalds at ELC. + +For the first time in the 11-year history of the [Embedded Linux Conference (ELC)][0], held in San Diego, April 4-6, the keynotes included a discussion with Linus Torvalds. The creator and lead overseer of the Linux kernel, and “the reason we are all here,” in the words of his interviewer, Intel Chief Linux and Open Source Technologist Dirk Hohndel, seemed upbeat about the state of Linux in embedded and Internet of Things applications. Torvalds very presence signaled that embedded Linux, which has often been overshadowed by Linux desktop, server, and cloud technologies, had come of age. + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/elc-linus_0.jpg?itok=FNPIDe8k) +>Linus Torvalds speaking at Embedded Linux Conference. + +IoT was the main topic at ELC, which included an OpenIoT Summit track, and the chief topic in the Torvalds interview. + +“Maybe you won’t see Linux at the IoT leaf nodes, but anytime you have a hub, you will need it,” Torvalds told Hohndel. “You need smart devices especially if you have 23 [IoT standards]. If you have all these stupid devices that don’t necessarily run Linux, and they all talk with slightly different standards, you will need a lot of smart devices. We will never have one completely open standard, one ring to rule them all, but you will have three of four major protocols, and then all these smart hubs that translate.” + +Torvalds remained customarily philosophical when Hohndel asked about the gaping security holes in IoT. “I don’t worry about security because there’s not a lot we can do,” he said. “IoT is unpatchable -- it’s a fact of life.” + +The Linux creator seemed more concerned about the lack of timely upstream contributions from one-off embedded projects, although he noted there have been significant improvements in recent years, partially due to consolidation on hardware. + +“The embedded world has traditionally been hard to interact with as an open source developer, but I think that’s improving,” Torvalds said. “The ARM community has become so much better. Kernel people can now actually keep up with some of the hardware improvements. It’s improving, but we’re not nearly there yet.” + +Torvalds admitted to being more at home on the desktop than in embedded and to having “two left hands” when it comes to hardware. + +“I’ve destroyed things with a soldering iron many times,” he said. “I’m not really set up to do hardware.” On the other hand, Torvalds guessed that if he were a teenager today, he would be fiddling around with a Raspberry Pi or BeagleBone. “The great part is if you’re not great at soldering, you can just buy a new one.” + +Meanwhile, Torvalds vowed to continue fighting for desktop Linux for another 25 years. “I’ll wear them down,” he said with a smile. + +Watch the full video, below. + +Get the Latest on Embedded Linux and IoT. Access 150+ recorded sessions from Embedded Linux Conference 2016. [Watch Now][1]. + +[video](https://youtu.be/tQKUWkR-wtM) + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/linus-torvalds-talks-iot-smart-devices-security-concerns-and-more-video + +作者:[ERIC BROWN][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/ericstephenbrown +[0]: http://events.linuxfoundation.org/events/embedded-linux-conference +[1]: http://go.linuxfoundation.org/elc-openiot-summit-2016-videos?utm_source=lf&utm_medium=blog&utm_campaign=linuxcom From db9a8c2bbb36947e80ed72bf6148d70efdf8e5fd Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 11:55:30 +0800 Subject: [PATCH 1382/1710] =?UTF-8?q?20160515-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...se: Six Unsung Apache Big Data Projects.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md diff --git a/sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md b/sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md new file mode 100644 index 0000000000..76d97b7505 --- /dev/null +++ b/sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md @@ -0,0 +1,80 @@ +On the Rise: Six Unsung Apache Big Data Projects +================================================= + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/star-clusters-74052_1920.jpg?itok=HJISFdwo) +>Creative Commons Zero + +Countless organizations around the world are now working with data sets so large and complex that traditional data processing applications can no longer drive optimized analytics and insights. That’s the problem that the new wave of Big Data applications aims to solve, and the Apache Software Foundation (ASF) has recently graduated a slew of interesting open source Big Data projects to Top-Level status. That means that they will get active development and strong community support. + +Most people have heard of Apache Spark, [a Big Data processing framework][1] with built-in modules for streaming, SQL, machine learning and graph processing. IBM and other companies are pouring billions of development dollars into Spark initiatives, and NASA and the [SETI Institute][2] are collaborating to analyze terabytes of complex deep space radio signals using Spark’s machine learning capabilities in a hunt for patterns that might betray the presence of intelligent extraterrestrial life. + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/asf.jpg?itok=wtu0hq36) + +However, several other recently elevated Apache Big Data projects deserve attention, too. In fact, some of them may produce ecosystems of activity and development that will rival Spark’s. In conjunction with this week’s [ApacheCon North America conference][3] and Apache: Big Data events, this article will round up the Apache Big Data projects that you should know about. + +Here are six projects on the rise: + +### Kylin + +Apache recently [announced][4] that its Kylin project, an open source Big Data project born at eBay, has graduated to Top-Level status. Kylin is an open source Distributed Analytics Engine designed to provide an SQL interface and multi-dimensional analysis (OLAP) on Apache Hadoop, supporting extremely large datasets. It is still widely used at eBay and at a few other organizations. + +"Apache Kylin's incubation journey has demonstrated the value of Open Source governance at ASF and the power of building an open-source community and ecosystem around the project," said Luke Han, Vice President of Apache Kylin. "Our community is engaging the world's biggest local developer community in alignment with the Apache Way." + +As an OLAP-on-Hadoop solution, Apache Kylin aims to fill the gap between Big Data exploration and human use, "enabling interactive analysis on massive datasets with sub-second latency for analysts, end users, developers, and data enthusiasts," according to developers. "Apache Kylin brings back business intelligence (BI) to Apache Hadoop to unleash the value of Big Data," they added. + +### Lens + +Apache also recently [announced][5] that Apache Lens, an open source Big Data and analytics tool, has graduated from the Apache Incubator to become a Top-Level Project (TLP). According to the announcement: "Apache Lens is a Unified Analytics platform. It provides an optimal execution environment for analytical queries in the unified view. Apache Lens aims to cut the Data Analytics silos by providing a single view of data across multiple tiered data stores." + +"By providing an online analytical processing (OLAP) model on top of data, Lens seamlessly integrates Apache Hadoop with traditional data warehouses to appear as one. It also provides query history and statistics for queries running in the system along with query life cycle management." + +"Incubating Apache Lens has been an amazing experience at the ASF," said Amareshwari Sriramadasu, Vice President of Apache Lens. "Apache Lens solves a very critical problem in Big Data analytics space with respect to end users. It enables business users, analysts, data scientists, developers and other users to do complex analysis with ease, without knowing the underlying data layout." + +### Ignite + +The ASF has also [announced][6] that Apache Ignite has become a top-level project. It's an open source effort to build an in-memory data fabric. + +“Apache Ignite is a high-performance, integrated and distributed In-Memory Data Fabric for computing and transacting on large-scale data sets in real-time, "orders of magnitude faster than possible with traditional disk-based or flash technologies," according to Apache community members. “It is designed to easily power both existing and new applications in a distributed, massively parallel architecture on affordable, industry-standard hardware.” + +### Brooklyn + +The foundation [announced][7] that Apache Brooklyn is now a Top-Level Project (TLP), "signifying that the project's community and products have been well-governed under the ASF's meritocratic process and principles." Brooklyn is an application blueprint and management platform used for integrating services across multiple data centers as well as and a wide range of software in the cloud. + +According to the Brooklyn announcement: "With modern applications being composed of many components, and increasing interest in micro-services architecture, the deployment and ongoing evolution of deployed apps is an increasingly difficult problem. Apache Brooklyn’s blueprints provide a clear, concise way to model an application, its components and their configuration, and the relationships between components, before deploying to public Cloud or private infrastructure. Policy-based management, built on the foundation of autonomic computing theory, continually evaluates the running application and makes modifications to it to keep it healthy and optimize for metrics such as cost and responsiveness." + +Brooklyn is in use at some notable organizations. Cloud service providers Canopy and Virtustream have created product offerings built on Brooklyn. IBM has also made extensive use of Apache Brooklyn in order to migrate large workloads from AWS to IBM Softlayer. + +### Apex + +In April, the Apache Software Foundation [elevated][8] its Apex project to Top-Level status. It is billed as “a large scale, high throughput, low latency, fault tolerant, unified Big Data stream and batch processing platform for the Apache Hadoop ecosystem.” Apex works in conjunction with Apache Hadoop YARN, a resource management platform for working with Hadoop clusters. + +### Tajo + +Finally, Apache Tajo, an advanced open source data warehousing system in Apache Hadoop, is another new Big Data project to know about. Apache claims that Tajo provides the ability to rapidly extract more intelligence for Hadoop deployments, third party databases, and commercial business intelligence tools. + +Clearly, although Apache Spark draws the bulk of the headlines, it is not the only Big Data tool from Apache to keep your eyes on. As this year continues, Apache likely will graduate even more compelling Big Data projects to Top-Level status, where they will benefit from optimized development resources and more. + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/enterprise/systems-management/887177-achieving-enterprise-ready-container-tools-with-werckers-open-source-cli + +作者:[SAM DEAN][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/sam-dean +[1]: https://www.linux.com/news/apache-spark-16-strong-typing-faster-throughput +[2]: http://www.seti.org/ +[3]: http://events.linuxfoundation.org/events/apachecon-north-america +[4]: http://globenewswire.com/news-release/2015/12/08/793713/0/en/The-Apache-Software-Foundation-Announces-Apache-Kylin-as-a-Top-Level-Project.html +[5]: http://globenewswire.com/news-release/2015/08/26/763513/10147133/en/The-Apache-Software-Foundation-Announces-Apache-tm-Lens-tm-as-a-Top-Level-Project.html +[6]: http://globenewswire.com/news-release/2015/08/25/763148/10146997/en/The-Apache-Software-Foundation-Announces-Apache-tm-Ignite-tm-as-a-Top-Level-Project.html +[7]: http://globenewswire.com/news-release/2015/11/23/789504/0/en/The-Apache-Software-Foundation-Announces-Apache-Brooklyn-as-a-Top-Level-Project.html +[8]: https://globenewswire.com/news-release/2016/04/25/832114/0/en/The-Apache-Software-Foundation-Announces-Apache-Apex-as-a-Top-Level-Project.html + + + + From a1d4ad07969ab517b59332f67b2d7587e3072bc7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 12:06:27 +0800 Subject: [PATCH 1383/1710] =?UTF-8?q?20160511-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...11 4 Container Networking Tools to Know.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sources/tech/20160511 4 Container Networking Tools to Know.md diff --git a/sources/tech/20160511 4 Container Networking Tools to Know.md b/sources/tech/20160511 4 Container Networking Tools to Know.md new file mode 100644 index 0000000000..5b80791c6f --- /dev/null +++ b/sources/tech/20160511 4 Container Networking Tools to Know.md @@ -0,0 +1,63 @@ +4 Container Networking Tools to Know +======================================= + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/network-crop.jpeg?itok=Na1tb9aR) +>[Creative Commons Zero][1] + +With so many new cloud computing technologies, tools, and techniques to keep track of, it can be hard to know where to start learning new skills. This series on [next-gen cloud technologies][2] aims to help you get up to speed on the important projects and products in emerging and rapidly changing areas such as software-defined networking (SDN) , containers, and the space where they coincide: container networking. + +The relationship between containers and networks remains challenging for enterprise container deployment. Containers need networking functionality to connect distributed applications. Part of the challenge, according to a recent [Enterprise Networking Planet][3] article, is “to deploy containers in a way that provides the isolation they need to function as their own self-contained data environments while still maintaining effective connectivity.” + +[Docker][4], the popular container platform, uses software-defined virtual networks to connect containers with the local network. Additionally, it uses Linux bridging features and virtual extensible LAN (VXLAN) technology so containers can communicate with each other in the same Swarm, or cluster. Docker’s plug-in architecture also allows other network management tools, such as those listed below, to control containers. + +Innovation in container networking has enabled containers to connect with other containers across hosts. This enables developers to start an application in a container on a host in a development environment and transition it across testing and then into a production environment enabling continuous integration, agility, and rapid deployment. + +Container networking tools help accomplish container networking scalability, mainly by: + +1) enabling complex, multi-host systems to be distributed across multiple container hosts. + +2) enabling orchestration for container systems spanning a tremendous number of hosts across multiple public and private cloud platforms. + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/john-willis_k.jpg?itok=lTsH9eqI) +>John Willis speaking at Open Networking Summit 2016. + +For more information, check out the [Docker Networking Tutorial][5] video, which was presented by Brent Salisbury and John Willis at the recent [Open Networking Summit (ONS)][6]. This and many other ONS keynotes and presentations can be found [here][7]. + +Container networking tools and projects you should know about include: + +[Calico][8] -- The Calico project (from [Metaswitch][9]) leverages Border Gateway Protocol (BGP) and integrates with cloud orchestration systems for secure IP communication between virtual machines and containers. + +[Flannel][10] -- Flannel (previously called rudder) from [CoreOS][11] provides an overlay network that can be used as an alternative to existing SDN solutions. + +[Weaveworks][12] -- The Weaveworks projects for managing containers include [Weave Net][13], Weave Scope, and Weave Flux. Weave Net is a tool for building and deploying Docker container networks. + +[Canal][14] -- Just this week, CoreOS and Tigera announced the formation of a new open source project called Canal. According to the announcement, the Canal project aims to combine aspects of Calico and Flannel, "weaving security policy into both the network fabric and the cloud orchestrator." + +You can learn more about container management, software-defined networking, and other next-gen cloud technologies through The Linux Foundation’s free “Cloud Infrastructure Technologies” course -- a massively open online course being offered through edX. [Registration for this course is open now][15], and course content will be available in June. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/4-container-networking-tools-know + +作者:[AMBER ANKERHOLZ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/aankerholz +[1]: https://www.linux.com/licenses/category/creative-commons-zero +[2]: https://www.linux.com/news/5-next-gen-cloud-technologies-you-should-know +[3]: http://www.enterprisenetworkingplanet.com/datacenter/datacenter-blog/container-networking-challenges-for-the-enterprise.html +[4]: https://docs.docker.com/engine/userguide/networking/dockernetworks/ +[5]: https://youtu.be/Le0bEg4taak +[6]: http://events.linuxfoundation.org/events/open-networking-summit +[7]: https://www.linux.com/watch-videos-from-ons2016 +[8]: https://www.projectcalico.org/ +[9]: http://www.metaswitch.com/cloud-network-virtualization +[10]: https://coreos.com/blog/introducing-rudder/ +[11]: https://coreos.com/ +[12]: https://www.weave.works/ +[13]: https://www.weave.works/products/weave-net/ +[14]: https://github.com/tigera/canal +[15]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-cloud-infrastructure-technologies?utm_source=linuxcom&utm_medium=article&utm_campaign=cloud%20mooc%20article%201 From 05d3ca22870bc60193ff17bd5d46fd7bcee894c8 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Sun, 15 May 2016 12:36:26 +0800 Subject: [PATCH 1384/1710] [translated] 20160502 The intersection of Drupal, IoT, and open hardware.md --- ...ction of Drupal, IoT, and open hardware.md | 53 ---------------- ...ction of Drupal, IoT, and open hardware.md | 62 +++++++++++++++++++ 2 files changed, 62 insertions(+), 53 deletions(-) delete mode 100644 sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md create mode 100644 translated/tech/20160502 The intersection of Drupal, IoT, and open hardware.md diff --git a/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md b/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md deleted file mode 100644 index 43ee75fae6..0000000000 --- a/sources/tech/20160502 The intersection of Drupal, IoT, and open hardware.md +++ /dev/null @@ -1,53 +0,0 @@ -zpl1025 -The intersection of Drupal, IoT, and open hardware -======================================================= - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/drupal_blue_gray_lead.jpeg?itok=t7W_KD-D) - - -Meet [Amber Matz][1], a Production Manager and Trainer at [Drupalize.Me][3], a service of Lullabot Education. When she's not tinkering around with Arduinos, Raspberry Pis, and electronic wearables, you can find her wrangling presenters for the Portland Drupal User Group. - -Coming up at [DrupalCon NOLA][3], Amber will host a session about Drupal and IoT. If you're attending and want to learn about the intersection of open hardware, IoT, and Drupal, this session is for you. If you're not able to join us in New Orleans, Amber has some pretty cool things to share. In this interview, she tells us how she got involved with Drupal, a few of her favorite open hardware projects, and what the future holds for IoT and Drupal. - -![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) - -**How did you get involved with the Drupal community?** - -Back in the day, I was working at a large nonprofit in the "webmaster's office" of the marketing department and was churning out custom PHP/MySQL forms like nobody's business. I finally got weary of that and starting hunting around the web for a better way. I found Drupal 6 and starting diving in on my own. Years later, after a career shift and a move, I discovered the Portland Drupal User Group and landed a job as a full-time Drupal developer. I continued to regularly attend the meetups in Portland, which I found to be a great source of community, friendships, and professional development. Eventually, I landed a job with Lullabot as a trainer creating content for Drupalize.Me. Now, I'm managing the Drupalize.Me content pipeline, creating Drupal 8 content, and am very much involved in the Portland Drupal community. I'm this year's coordinator, finding and scheduling speakers. - -**We have to know: What is Arduino prototyping, how did you discover it, and what's the coolest thing you've done with an Arduino?** - -Arduino, Raspberry Pi, and wearable electronics have been these terms that I've heard thrown around for years. I found [Adafruit's Wearable Electronics][4] with Becky Stern YouTube show years ago (which, up until recently, when Becky moved on, aired every Wednesday). I was fascinated by wearables and even ordered an LED sewing kit but never did anything with it. I just didn't get it. I had no background in electronics whatsoever, and while I was fascinated by the projects I was finding, I didn't see how I could ever make anything like that. It seemed so out of reach. - -Finally, I found a Coursera "Internet of Things" specialization. (So trendy, right?) But I was immediately hooked! I finally got an explanation of what an Arduino was, along with all these other important terms and concepts. I ordered the recommended Arduino starter kit, which came with a getting started booklet. When I made that first LED blink, it was pure delight. I had two weeks' vacation over the holidays and after Christmas, and I did nothing but make and program Arduino circuits from the getting started booklet. It was oddly so relaxing! I enjoyed it so much. - -In January, I started creating my own prototypes. When I found out I was emceeing our company retreat's lightning talks, I created a Lightning Talk Visual Timer prototype with five LEDs and an Arduino. - -![](https://opensource.com/sites/default/files/resize/amber-arduino-lightning-talk-timer-400x400.jpg) - -It was a huge hit. I also made my first wearable project, a glowing hoodie, using the Arduino IDE compatible Gemma microcontroller, a tiny round sewable component, to which I sewed using conductive thread, a conductive slider connected to a hoodie's drawstring, which controlled the colors of five NeoPixels sewn around the inside of the hood. So that's what I mean by prototyping: Making crazy projects that are fun and maybe even a little practical. - -**What are the biggest opportunities for Drupal and IoT?** - -IoT isn't that much different than the web services and decoupling Drupal trends. It's the movement of data from thing one to thing two and the rendering of that data into something useful. But how does it get there? And what do you do with it? You think there are a lot of solutions, and apps, and frameworks, and APIs out there now? With IoT, that's only going to continue to increase—exponentially. What I've found is that given any device or any "thing", there is a way to connect it to the Internet—many ways. And there are plenty of code libraries out there to help makers get their data from thing one to thing two. - -So where does Drupal fit in? Web services, for one, is going to be the first obvious place. But as a maker, I don't want to spend my time coding custom modules in Drupal. I want to plug and play! So I would love to see modules emerge that connect with IoT Cloud APIs and services like ThingSpeak and Adafruit.io and IFTTT and others. I think there's an opportunity, too, for a business to build an IoT cloud service in Drupal that allows people to send and store their sensor data, visualize it charts and graphs, and build widgets that react to certain values or thresholds. Each of these IoT Cloud API services fill a slightly different niche, and there's plenty of room for others. - -**What are a few things you're looking forward to at DrupalCon?** - -I love reconnecting with Drupal friends, meeting new people, and also seeing Lullabot and Drupalize.Me co-workers (we're distributed companies)! There's so much to learn with Drupal 8 and it's been overwhelming at times to put together training materials for our customers. So, I'm looking forward to attending Drupal 8-related sessions and getting up-to-speed on the latest developments. Finally, I'm really curious about New Orleans! I haven't been there since 2004 and I'm excited to see what's changed. - -**Tell us about your DrupalCon talk Beyond the blink: Add Drupal to your IoT playground. Why should someone attend? What are the major takeaways?** - -My session title, Beyond the blink: Add Drupal to your IoT playground, in itself is so full of assumptions that first off I'm going to get everyone up to speed and on the same page. You don't need to know anything about Arduino, the Internet of Things, or even Drupal to follow along. We'll start with making an LED blink with an Arduino, and then I want to talk about what the main takeaways have been for me: Play, learn, teach, and make. I'll show examples that have inspired me and that will hopefully inspire and encourage others in the audience to give it a try. Then, it's demo time! - -First, thing one. Thing one is a Build Notifier Tower Light. In this demo, I'll show how I connected the Tower Light to the Internet and how I got it to respond to data received from a Cloud API service. Next, Thing two. Thing two is a "weather watch" in the form of a steampunk iPhone case. It's got small LED matrix that displays an icon of the local-to-me weather, a barometric pressure and temperature sensor, a GPS module, and a Bluetooth LE module, all connected and controlled with an Adafruit Flora microcontroller. Thing two sends weather and location data to Adafruit.io by connecting to an app on my iPhone over Bluetooth and sends it up to the cloud using an MQTT protocol! Then, on the Drupal side, I'm pulling down that data from the cloud, updating a block with the weather, and updating a map. So folks will get a taste of what you can do with web services, maps, and blocks in Drupal 8, too. - -It's been a brain-melting adventure learning and making these demo prototypes, and I hope others will come to the session and catch a little of this contagious enthusiasm I have for this intersection of technologies! I'm very excited to share what I've discovered. - - - -[1]: https://www.drupal.org/u/amber-himes-matz -[2]: https://drupalize.me/ -[3]: https://events.drupal.org/neworleans2016/ -[4]: https://www.adafruit.com/beckystern diff --git a/translated/tech/20160502 The intersection of Drupal, IoT, and open hardware.md b/translated/tech/20160502 The intersection of Drupal, IoT, and open hardware.md new file mode 100644 index 0000000000..7cfffd953f --- /dev/null +++ b/translated/tech/20160502 The intersection of Drupal, IoT, and open hardware.md @@ -0,0 +1,62 @@ +Drupal, IoT 和开源硬件的交叉点 +======================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/drupal_blue_gray_lead.jpeg?itok=t7W_KD-D) + + +认识一下 [Amber Matz][1],来自由 Lullabot Education 提供的 [Drupalize.Me][3] 的生产经理以及培训师。当她没有倒腾 Arduino,Raspberry Pi 以及电子穿戴设备时,通常会在波特兰 Drupal 用户组里和主持人争论。 + +在即将举行的 [DrupalCon NOLA][3] 大会上,Amber 将主持一个关于 Drupal 和 IoT 的主题。如果你会去参加,也想了解下开源硬件,IoT 和 Drupal 之间的交叉点,那这个将很合适。如果你去不了新奥尔良的现场也没关系,Amber 还分享了许多很酷的事情。在这次采访中,她讲述了自己参与 Drupal 的原因,一些她自己喜欢的开源硬件项目,以及 IoT 和 Drupal 的未来。 + +![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) + +**你是怎么加入 Drupal 社区的?** + +在这之前,我在一家大型非盈利性机构市场部的“站长办公室”工作,大量产出没人喜欢的定制 PHP/MySQL 表格。终于我觉得这样很烦并开始在网上寻找更好的方式。然后我找到了 Drupal 6 并开始自己沉迷进去。多年以后,在准备职业转换的时候,发现了波特兰 Drupal 用户组,然后在里面找了一份全职的 Drupal 开发者工作。我一直经常参加在波特兰的聚会,我觉得它是一种很好的社区,交友,以及专业开发的资源。一个偶然的机会,我在 Lullabot 找了一份培训师的工作为 Drupalize.Me 提供内容。现在,我管理着 Drupalize.Me 的内容管道,创建 Drupal 8 的内容,还很大程度地参与到波特兰 Drupal 社区中。我是今年的协调员,寻找并规划演讲者。 + +**我们得明白:什么是 Arduino 原型,你是怎么找到它的,以及你用 Arduino 做过的最酷的事是什么?** + +Arduino,Raspberry Pi,以及可穿戴电子设备,这些年到处都能听到这些术语。我在几年前通过 Becky Stern YouTube 秀(最近由 Becky 继续主持,每周三播出)发现了 [Adafruit 的可穿戴电子设备][4]。我被那些可穿戴设备迷住了,还订了一套 LED 缝制工具,不过没做出任何东西。我就是没搞懂。我没有任何电子相关的背景,而且在我被那些项目吸引的时候,我根本不知道怎么做出那样的东西。看上去太遥远了。 + +后来,我找到一个 Coursera 的“物联网”专题。(很时髦,对吧?)但我很快就喜欢上了。我最终找到了 Arduino 是什么的解释,以及所有这些其他的重要术语和概念。我订了一套推荐的 Arduino 初学者套件,还附带了一本如何上手的小册子。当我第一次让 LED 闪烁的时候,开心极了。我在圣诞节以及之后有两个星期的假期,然后我什么都没干,就一直根据初学者小册子给 Arduino 电路编程。很奇怪我觉得很放松!我太喜欢了。 + +一月份的时候,我开始构思我自己的原型设备。在知道我要主持公司培训的开场白时,我用五个 LED 灯和 Arduino 搭建了一个开场白视觉计时器。 + +![](https://opensource.com/sites/default/files/resize/amber-arduino-lightning-talk-timer-400x400.jpg) + +这是一次巨大的成功。我还做了我的第一个可穿戴项目,一件会发光的连帽衫,使用了和 Arduino IDE 兼容的 Gemma 微控制器,一个小的圆形可缝制部件,然后用可导电的线缝起来,将一个滑动可变电阻和衣服帽口的收缩绳连在一起,用来控制缝到帽子里的五个 NeoPixel 灯的颜色。这就是我对原型设计的看法:开展一些很好玩也可能会有点实际用途的疯狂项目。 + +**Drupal 和 IoT 带来的最大机遇是什么??** + +IoT 和网站服务以及 Drupal 分层趋势实际并没有太大差别。就是将数据从一个物体传送到另一个物体,然后将数据转换成一些有用的东西。但数据是如何送达?能用来做点什么?你觉得现在就有一大堆现成的解决方案,应用,中间层,以及 API?采用 IoT,这只会继续成指数增长。我觉得,给我任何一个设备或“物体”,需要只用一种方式来将它连接到因特网的无线可能上。然后有现成的各种代码库来帮助制作者将他们的数据从一个物体送到另一个物体。 + +那么 Drupal 在这里处于什么位置?首先,网站服务将是第一个明显的地方。但作为一个制作者,我不希望将时间花在编写 Drupal 的订制模块上。我想要的是即插即用!所以我很高兴出现这样的模块能连接 IoT 云端 API 和服务,比如 ThingSpeak,Adafruit.io,IFTTT,以及其他的。我觉得也有一个很好的商业机会,在 Drupal 里构建一套 IoT 云服务,允许用户发送和存储他们的传感器数据,并可以制成表格和图像,还可以写一些插件可以响应特定数据或阙值。每一个 IoT 云 API 服务都是一个细分的机会,所以能留下很大空间给其他人。 + +**这次 DrupalCon 你有哪些期待?** + +我喜欢重新联系 Drupal 上的朋友,认识一些新的人,还能见到 Lullabot 和 Drupalize.Me 的同事(我们是分布式的公司)!Drupal 8 有太多东西可以去探索了,不可抗拒地要帮我们的客户收集培训资料。所以,我很期待参与一些 Drupal 8 相关的主题,以及跟上最新的开发活动。最后,我对新奥尔良也很感兴趣!我曾经在 2004 年去过,很期待将这次将看到哪些改变。 + +**谈一谈你这次 DrupalCon 上的演讲,超越闪烁:将 Drupal 加到你的 IoT 游乐场中。别人为什么要参与?他们最重要的收获会是什么?** + +我的主题的标题是,超越闪烁:将 Drupal 加到你的 IoT 游乐场中,本身有很多假设,我将让所有人都放在同一速度和层次。你不需要了解任何关于 Arduino,物联网,甚至是 Drupal,都能跟上。我将从用 Arduino 让 LED 灯闪烁开始,然后我会谈一下我自己在这里面的最大收获:玩,学,教,和做。我会列出一些曾经激发过我的例子,它们也很有希望能激发和鼓励其他听众去尝试一下。然后,就是展示时间! + +首先,第一个东西。它是一个构建提醒信号灯。在这个展示里,我会说明如何将信号灯连到互联网上,以及如何响应从云 API 服务收到的数据。然后,第二个东西。它是一个蒸汽朋克风格 iPhone 外壳形式的“天气手表”。有一个小型 LED 矩阵用来显示我的天气的图标,一个气压和温度传感器,一个 GPS 模块,以及一个 Bluetooth LE 模块,都连接到一个 Adafruit Flora 微控制器上。第二个东西能通过蓝牙连接到我的 iPhone 上的一个应用,并将天气和位置数据通过 MQTT 协议发到 Adafruit.io 的服务器!然后,在 Drupal 这边,我会从云端下载这些数据,根据天气更新一个功能块,然后更新地图。所以大家也能体验一下通过网站服务,地图和 Drupal 8 的功能块所能做的事情。 + +学习和制作这些展示原型是一次烧脑的探险,我也希望有人能参与这个主题并感染一点我对这个技术交叉的传染性热情!我很兴奋能分享一些我的发现。 + + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/5/drupalcon-interview-amber-matz + +作者:[Jason Hibbets][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jhibbets +[1]: https://www.drupal.org/u/amber-himes-matz +[2]: https://drupalize.me/ +[3]: https://events.drupal.org/neworleans2016/ +[4]: https://www.adafruit.com/beckystern From 5069ba41d243b6c99fdeaa2c531b9e710548da20 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 12:44:20 +0800 Subject: [PATCH 1385/1710] =?UTF-8?q?20160515-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...actor Authentication for Login and sudo.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md diff --git a/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md b/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md new file mode 100644 index 0000000000..81cf285cf0 --- /dev/null +++ b/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md @@ -0,0 +1,116 @@ +How to Set Up 2-Factor Authentication for Login and sudo +========================================================== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_crop.png?itok=z_cdYZZf) +>[Used with permission][1] + +Security is all the rage—as it should be. We live in a world where data is an incredibly valuable currency, and you’re always at risk of loss. Because of this, you must do everything you can to ensure what you hold on your desktops and servers is safe. To that end, administrators and users will create incredibly complex passwords, employ password managers, and more. But, what if I told you could take the login to your Linux servers and desktops one step—nay, two steps—further? Thanks to the [Google Authenticator][2], you can. On top of that, it’s incredibly easy to set up. + +I am going to walk you through the process of setting up two-factor authentication for use on login and sudo. I will demonstrate this on a Ubuntu 16.04 desktop, but the process works for the server as well. To handle the two-factor side of things, I will be making use of the Google Authenticator. + +There is one very important caveat to this: Once you’ve set this up, you will not be able to log into the account (or issue sudo commands) without a six-digit code from the authenticator. This also adds another step for you, so if having to pull out your smartphone every time you need to log into your Linux machine (or use sudo), this might not be for you. Remember, however, this added step brings with it an extra layer of security you wouldn’t have otherwise. + +With that said, let’s set this up. + +### Installing the Necessary Components + +There are two pieces of this puzzle that must be installed—both in the form of the Google Authenticator. The first is the smartphone app. Here’s how to install from the Google Play Store: + +1. Open the Google Play Store on your Android device + +2. Search for google authenticator + +3. Locate and tap the entry by Google Inc. + +4. Tap Install + +5. Tap Accept + +6. Allow the installation to complete + +Now let’s move on to installing the authenticator on your Linux machine. Here’s how: + +1. Open a terminal window + +2. Issue the command sudo apt-get install google-authenticator + +3. Type your sudo password and hit Enter + +4. If prompted, type y and hit Enter + +5. Allow the installation to complete + +It’s now time to configure the login process to work with the google-authenticator. + +### Configuration + +Just one file must be edited to add two-step authentication for both login and sudo usage. The file is /etc/pam.d/common-auth. Open it and look for the line: + +``` +auth [success=1 default=ignore] pam_unix.so nullok_secure +``` + +Above that line, add the following: + +``` +auth required pam_google_authenticator.so +``` + +Save and close the file. + +The next step is to set up google-authenticator for every user on the system (otherwise, they will not be able to log in). For example’s sake, we’ll assume there are two users on your system: jack and olivia. We’ll first set this up for jack (we’ll assume this is the account we’ve been working with all along). + +Open up a terminal window and issue the command google-authenticator. You will be asked a series of questions (each of which you should answer with a y. The questions are: + +* Do you want me to update your "/home/jlwallen/.google_authenticator" file (y/n) y + +* Do you want to disallow multiple uses of the same authentication token? This restricts you to one login about every 30s, but it increases your chances to notice or even prevent man-in-the-middle attacks (y/n) + +* By default, tokens are good for 30 seconds, and to compensate for possible time-skew between the client and the server, we allow an extra token before and after the current time. If you experience problems with poor time synchronization, you can increase the window from its default size of 1:30min to about 4min. Do you want to do so (y/n) + +* If the computer that you are logging into isn't hardened against brute-force login attempts, you can enable rate-limiting for the authentication module. By default, this limits attackers to no more than 3 login attempts every 30s. Do you want to enable rate-limiting (y/n) + +Once you’ve answered these questions, you’ll be presented with your secret key, a verification code, and five emergency scratch codes. Print out the scratch codes and keep them with you. These codes can be used if you do not have your phone (each code is a one-time use only). The secret key is what you use to set up the account on the Google Authenticator app and the verification code is a one-time use code that you can use immediately (if needed). + +### Setting Up the App + +You now have the user jack set up. Before you can set up the user olivia, you need to add an account for jack on the Google Authenticator app. Open the app and the, from the main window, tap the menu button (three vertical dots in the upper right hand corner). Tap Set up account and then tap Enter provided key. In the next window (Figure 1), you will enter 16-digit secret key provided when you issued the google-authenticator app. Give the account a name (so you will remember which account this is to be used on) and tap ADD. + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/auth_a.png?itok=xSMkd-Mf) +>Figure 1: Adding a new account to the Google Authenticator app. + +Now that you’ve added the account, you will be presented with six-digit keys that will be requested every time you log in or attempt to use sudo. + +Finally, you have to set up the other accounts on the system. As I mentioned, we’re going to set up the account called olivia. Here’s how: + +1. Open up a terminal window + +2. Issue the command sudo su olivia + +3. Open the Google Authenticator on your smartphone + +4. Type the six digit authentication code (provided by the app) in the terminal window (Figure 2) and hit Enter + +5. Type your sudo password and hit Enter + +6. As the new user, issue the google-authenticator command, answer the questions, and record the keys and codes provided + +After you’ve successfully set up the user olivia, with the google-authenticator command, add a new account on the Google Authenticator app with that user’s info (in the same manner you did for the initial user). You should now have accounts on the Google Authenticator app for both jack and olivia. + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_b.png?itok=FH36V1r0) +>Figure 2: Entering the six-digit authentication code for sudo. + +That’s it. Every time you attempt to log into your machine (or use sudo), you will be required to provide a six-digit authentication key, before you can enter your user password. Your Linux machine is now far more secure than it was before adding two-factor authentication. Although some might consider this process a hassle, I highly recommend setting it up...especially for machines that house sensitive data. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_b.png?itok=FH36V1r0 + +作者:[JACK WALLEN][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://www.linux.com/users/jlwallen +[1]: https://www.linux.com/licenses/category/used-permission +[2]: https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2 + From 9bb424eb15956506937d9c20daf80569c3263203 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 12:47:40 +0800 Subject: [PATCH 1386/1710] =?UTF-8?q?20160515-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ing sys admin works his way up in Linux.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sources/talk/my-open-source-story/20160510 Aspiring sys admin works his way up in Linux.md diff --git a/sources/talk/my-open-source-story/20160510 Aspiring sys admin works his way up in Linux.md b/sources/talk/my-open-source-story/20160510 Aspiring sys admin works his way up in Linux.md new file mode 100644 index 0000000000..7a2cc8d071 --- /dev/null +++ b/sources/talk/my-open-source-story/20160510 Aspiring sys admin works his way up in Linux.md @@ -0,0 +1,38 @@ +Aspiring sys admin works his way up in Linux +=============================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_workplay.png?itok=uQqFssrf) + +I first saw Linux in action around 2001 at my first job. I was as an account manager for an Austrian automotive industry supplier and shared an office with our IT guy. He was creating a CD burning station (one of those huge things that can burn and print several CDs simultaneously) so that we could create and send CDs of our car parts catalogue to customers. While the burning station was originally designed for Windows, he just could not get it to work. He eventually gave up on Windows and turned to Linux, and it worked flawlessly. + +For me, it was all kind of arcane. Most of the work was done on the command line, which looked like DOS but was much more powerful (even back then, I recognized this). I had been a Mac user since 1993, and a CLI (command line interface) seemed a bit old fashioned to me at the time. + +It was not until years later—I believe around 2009—that I really discovered Linux for myself. By then, I had moved to the Netherlands and found a job working for a retail supplier. It was a small company (about 20 people) where, aside from my normal job as a key account manager, I had involuntarily become the first line of IT support. Whenever something didn't work, people first came to me before calling the expensive external IT consultant. + +One of my colleagues had fallen for a phishing attack and clicked on an .exe file in an email that appeared to be from DHL. (Yes, it does happen.) His computer got completely taken over and he could not do anything. Even a complete reformat wouldn't help, as the virus kept rearing it's ugly head. I only later learned that it probably had written itself to the MBR (Master Boot Record). By this time, the contract with the external IT consultant had been terminated due to cost savings. + +I turned to Ubuntu to get my colleague to work again. And work it did—like a charm. The computer was humming along again, and I got all the important applications to work like they should. In some ways it wasn't the most elegant solution, I'll admit, yet he (and I) liked the speed and stability of the system. + +However, my colleague was so entrenched in the Windows world that he just couldn't get used to the fact that some things were done differently. He just kept complaining. (Sound familiar?) + +While my colleague couldn't bear that things were done differently, I noticed that this was much less of an issue for me as a Mac user. There were more similarities. I was intrigued. So, I installed a dual boot with Ubuntu on my work laptop and found that I got much more work done in less time and it was much easier to get the machine to do what I wanted. Ever since then I've been regularly using several Linux distros, with Ubuntu and Elementary being my personal favorites. + +At the moment, I am unemployed and hence have a lot of time to educate myself. Because I've always had an interest in IT, I am working to get into Linux systems administration. But is awfully hard to get a chance to show your knowledge nowadays because 95% of what I have learned over the years can't be shown on a paper with a stamp on it. Interviews are the place for me to have a conversation about what I know. So, I signed up for Linux certifications that I hope give me the boost I need. + +I have also been contributing to open source for some time. I started by doing translations (English to German) for the xTuple ERP and have since moved on to doing Mozilla "customer service" on Twitter, filing bug reports, etc. I evangelize for free and open software (with varying degrees of success) and financially support several FOSS advocate organizations (DuckDuckGo, bof.nl, EFF, GIMP, LibreCAD, Wikipedia, and many others) whenever I can. I am also currently working to set up a regional privacy cafe. + +Aside from that, I have started working on my first book. It's supposed to be a lighthearted field manual for normal people about computer privacy and security, which I hope to self-publish by the end of the year. (The book will be licensed under Creative Commons.) As for content, you can expect that I will explain in detail why privacy is important and what is wrong with the whole "I have nothing to hide" mentality. But the biggest part will be instructions how to get rid of pesky ad-trackers, encrypting your hard disk and mail, chat OTR, how to use TOR, etc. While it's a manual first, I aim for a tone that is casual and easy to understand spiced up with stories of personal experiences. + +I still love my Macs and will use them whenever I can afford it (mainly because of the great construction), but Linux is always there in a VM and is used for most of my daily work. Nothing fancy here, though: word processing (LibreOffice and Scribus), working on my website and blog (Wordpress and Jekyll), editing some pictures (Shotwell and Gimp), listening to music (Rhythmbox), and pretty much every other task that comes along. + +Whichever way my job hunt turns out, I know that Linux will always be my go-to system. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/5/my-linux-story-rene-raggl + +作者:[Rene Raggl][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://opensource.com/users/rraggl From ada80430b5d849b36718c88a50319b840e03758c Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 12:53:49 +0800 Subject: [PATCH 1387/1710] =?UTF-8?q?20160515-7=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...re contributing to open source projects.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sources/talk/20160510 65% of companies are contributing to open source projects.md diff --git a/sources/talk/20160510 65% of companies are contributing to open source projects.md b/sources/talk/20160510 65% of companies are contributing to open source projects.md new file mode 100644 index 0000000000..ad3b4ef680 --- /dev/null +++ b/sources/talk/20160510 65% of companies are contributing to open source projects.md @@ -0,0 +1,63 @@ +65% of companies are contributing to open source projects +========================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUSINESS_openseries.png?itok=s7lXChId) + +This year marks the 10th annual Future of Open Source Survey to examine trends in open source, hosted by Black Duck and North Bridge. The big takeaway from the survey this year centers around the mainstream acceptance of open source today and how much has changed over the last decade. + +The [2016 Future of Open Source Survey][1] analyzed responses from nearly 3,400 professionals. Developers made their voices heard in the survey this year, comprising roughly 70% of the participants. The group that showed exponential growth were security professionals, whose participation increased by over 450%. Their participation shows the increasing interest in ensuring that the open source community pays attention to security issues in open source software and securing new technologies as they emerge. + +Black Duck's [Open Source Rookies][2] of the Year awards identify some of these emerging technologies, like Docker and Kontena in containers. Containers themselves have seen huge growth this year–76% of respondents say their company has some plans to use containers. And an amazing 59% of respondents are already using containers in a variety of deployments, from development and testing to internal and external production environment. The developer community has embraced containers as a way to get their code out quickly and easily. + +It's not surprising that the survey shows a miniscule number of organizations having no developers contributing to open source software. When large corporations like Microsoft and Apple open source some of their solutions, developers gain new opportunities to participate in open source. I certainly hope this trend will continue, with more software developers contributing to open source projects at work and outside of work. + +### Highlights from the 2016 survey + +#### Business value + +* Open source is an essential element in development strategy with more than 65% of respondents relying on open source to speed development. +* More than 55% leverage open source within their production environments. + +#### Engine for innovation + +* Respondents reported use of open source to drive innovation through faster, more agile development; accelerated time to market and vastly superior interoperability. +* Additional innovation is afforded by open source's quality of solutions; competitive features and technical capabilities; and ability to customize. + +#### Proliferation of open source business models and investment + +* More diverse business models are emerging that promise to deliver more value to open source companies than ever before. They are not as dependent on SaaS and services/support. +* Open source private financing has increased almost 4x in five years. + +#### Security and management + +The development of best-in-class open source security and management practices has not kept pace with growth in adoption. Despite a proliferation of expensive, high-profile open source breaches in recent years, the survey revealed that: + +* 50% of companies have no formal policy for selecting and approving open source code. +* 47% of companies don’t have formal processes in place to track open source code, limiting their visibility into their open source and therefore their ability to control it. +* More than one-third of companies have no process for identifying, tracking or remediating known open source vulnerabilities. + +#### Open source participation on the rise + +The survey revealed an active corporate open source community that spurs innovation, delivers exponential value and shares camaraderie: + +* 67% of respondents report actively encouraging developers to engage in and contribute to open source projects. +* 65% of companies are contributing to open source projects. +* One in three companies have a fulltime resource dedicated to open source projects. +* 59% of respondents participate in open source projects to gain competitive edge. + +Black Duck and North Bridge learned a great deal this year about security, policy, business models and more from the survey, and we’re excited to share these findings. Thank you to our many collaborators and all the respondents for taking the time to take the survey. It’s been a great ten years, and I am happy that we can safely say that the future of open source is full of possibilities. + +Learn more, see the [full results][3]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/16/5/2016-future-open-source-survey + +作者:[Haidee LeClair][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://opensource.com/users/blackduck2016 +[1]: http://www.slideshare.net/blackducksoftware/2016-future-of-open-source-survey-results +[2]: https://info.blackducksoftware.com/OpenSourceRookies2015.html +[3]: http://www.slideshare.net/blackducksoftware/2016-future-of-open-source-survey-results%C2%A0 From 105a8d226cc76d137ab4d5ab26606b7be19f0957 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 12:58:32 +0800 Subject: [PATCH 1388/1710] =?UTF-8?q?20160515-8=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...160316 Growing a career alongside Linux.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sources/talk/my-open-source-story/20160316 Growing a career alongside Linux.md diff --git a/sources/talk/my-open-source-story/20160316 Growing a career alongside Linux.md b/sources/talk/my-open-source-story/20160316 Growing a career alongside Linux.md new file mode 100644 index 0000000000..24799508c3 --- /dev/null +++ b/sources/talk/my-open-source-story/20160316 Growing a career alongside Linux.md @@ -0,0 +1,49 @@ +Growing a career alongside Linux +================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/OPENHERE_blue.png?itok=3eqp-7gT) + +My Linux story started in 1998 and continues today. Back then, I worked for The Gap managing thousands of desktops running [OS/2][1] (and a few years later, [Warp 3.0][2]). As an OS/2 guy, I was really happy then. The desktops hummed along and it was quite easy to support thousands of users with the tools the GAP had built. Changes were coming, though. + +In November of 1998, I received an invitation to join a brand new startup which would focus on Linux in the enterprise. This startup became quite famous as [Linuxcare][2]. + +### My time at Linuxcare + +I had played with Linux a bit, but had never considered delivering it to enterprise customers. Mere months later (which is a turn of the corner in startup time and space), I was managing a line of business that let enterprises get their hardware, software, and even books certified on a few flavors of Linux that were popular back then. + +I supported customers like IBM, Dell, and HP in ensuring their hardware ran Linux successfully. You hear a lot now about preloading Linux on hardware today, but way back then I was invited to Dell to discuss getting a laptop certified to run Linux for an upcoming trade show. Very exciting times! We also supported IBM and HP on a number of certification efforts that spanned a few years. + +Linux was changing fast, much like it always has. It gained hardware support for more key devices like sound, network, graphics. At around that time, I shifted from RPM-based systems to [Debian][3] for my personal use. + +### Using Linux through the years + +Fast forward some years and I worked at a number of companies that did Linux as hardened appliances, Linux as custom software, and Linux in the data center. By the mid 2000s, I was busy doing consulting for that rather large software company in Redmond around some analysis and verification of Linux compared to their own solutions. My personal use had not changed though—I would still run Debian testing systems on anything I could. + +I really appreciated the flexibility of a distribution that floated and was forever updated. Debian is one of the most fun and well supported distributions and has the best community I've ever been a part of. + +When I look back at my own adoption of Linux, I remember with fondness the numerous Linux Expo trade shows in San Jose, San Francisco, Boston, and New York in the early and mid 2000's. At Linuxcare we always did fun and funky booths, and walking the show floor always resulted in getting re-acquainted with old friends. Rumors of work were always traded, and the entire thing underscored the fun of using Linux in real endeavors. + +The rise of virtualization and cloud has really made the use of Linux even more interesting. When I was with Linuxcare, we partnered with a small 30-person company in Palo Alto. We would drive to their offices and get things ready for a trade show that they would attend with us. Who would have ever known that little startup would become VMware? + +I have so many stories, and there were so many people I was so fortunate to meet and work with. Linux has evolved in so many ways and has become so important. And even with its increasing importance, Linux is still fun to use. I think its openness and the ability to modify it has contributed to a legion of new users, which always astounds me. + +### Today + +I've moved away from doing mainstream Linux things over the past five years. I manage large scale infrastructure projects that include a variety of OSs (both proprietary and open), but my heart has always been with Linux. + +The constant evolution and fun of using Linux has been a driving force for me for over the past 18 years. I started with the 2.0 Linux kernel and have watched it become what it is now. It's a remarkable thing. An organic thing. A cool thing. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/3/my-linux-story-michael-perry + +作者:[Michael Perry][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://opensource.com/users/mpmilestogo +[1]: https://en.wikipedia.org/wiki/OS/2 +[2]: https://archive.org/details/IBMOS2Warp3Collection +[3]: https://en.wikipedia.org/wiki/Linuxcare +[4]: https://www.debian.org/ +[5]: From 4c56beb7781bf87c983463e2cec90200545f66ca Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 13:03:07 +0800 Subject: [PATCH 1389/1710] =?UTF-8?q?20160515-9=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...omputer virus, sys admin looks to Linux.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sources/talk/my-open-source-story/20160330 After a nasty computer virus, sys admin looks to Linux.md diff --git a/sources/talk/my-open-source-story/20160330 After a nasty computer virus, sys admin looks to Linux.md b/sources/talk/my-open-source-story/20160330 After a nasty computer virus, sys admin looks to Linux.md new file mode 100644 index 0000000000..3fb63afa4f --- /dev/null +++ b/sources/talk/my-open-source-story/20160330 After a nasty computer virus, sys admin looks to Linux.md @@ -0,0 +1,54 @@ +After a nasty computer virus, sys admin looks to Linux +======================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/OPENHERE_blue.png?itok=3eqp-7gT) + +My first brush with open source came while I was working for my university as a part-time system administrator in 2001. I was part of a small group that created business case studies for teaching not just in the university, but elsewhere in academia. + +As the team grew, the need for a robust LAN setup with file serving, intranet applications, domain logons, etc. emerged. Our IT infrastructure consisted mostly of bootstrapped Windows 98 computers that had become too old for the university's IT labs and were reassigned to our department. + +### Discovering Linux + +One day, as part of the university's IT procurement plan, our department received an IBM server. We planned to use it as an Internet gateway, domain controller, file and backup server, and intranet application host. + +Upon unboxing, we noticed that it came with Red Hat Linux CDs. No one on our 22-person team (including me) knew anything about Linux. After a few days of research, I met a friend of a friend who did Linux RTOS programming for a living. I asked him for some help installing it. + +It was heady stuff as I watched the friend load up the CD drive with the first of the installation CDs and boot into the Anaconda install system. In about an hour we had completed the basic installation, but still had no working internet connection. + +Another hour of tinkering got us connected to the Internet, but we still weren't anywhere near domain logons or Internet gateway functionality. After another weekend of tinkering, we were able to instruct our Windows 98 terminals to accept the IP of the the Linux PC as the proxy so that we had a working shared Internet connection. But domain logons were still some time away. + +We downloaded [Samba][1] over our awfully slow phone modem connection and hand configured it to serve as the domain controller. File services were also enabled via NFS Kernel Server and creating user directories and making the necessary adjustments and configurations on Windows 98 in Network Neighborhood. + +This setup ran flawlessly for quite some time, and we eventually decided to get started with Intranet applications for timesheet management and some other things. By this time, I was leaving the organization and had handed over most of the sys admin stuff to someone who replaced me. + +### A second Linux experience + +In 2004, I got into Linux once again. My wife ran an independent staff placement business that used data from services like Monster.com to connect clients with job seekers. + +Being the more computer literate of the two of us, it was my job to set things right with the computer or Internet when things went wrong. We also needed to experiment with a lot of tools for sifting through the mountains of resumes and CVs she had to go through on a daily basis. + +Windows [BSoDs][2] were a routine affair, but that was tolerable as long as the data we paid for was safe. I had to spend a few hours each week creating backups. + +One day, we had a virus that simply would not go away. Little did we know what was happening to the data on the slave disk. When it finally failed, we plugged in the week-old slave backup and it failed a week later. Our second backup simply refused to boot up. It was time for professional help, so we took our PC to a reputable repair shop. After two days, we learned that some malware or virus had wiped certain file types, including our paid data, clean. + +This was a body blow to my wife's business plans and meant lost contracts and delayed invoice payments. I had in the interim travelled abroad on business and purchased my first laptop computer from [Computex 2004][3] in Taiwan. It had Windows XP pre-installed, but I wanted to replace it with Linux. I had read that Linux was ready for the desktop and that [Mandrake Linux][4] was a good choice. My first attempt at installation went without a glitch. Everything worked beautifully. I used [OpenOffice][5] for my writing, presentation, and spreadsheet needs. + +We got new hard drives for our computer and installed Mandrake Linux on them. OpenOffice replaced Microsoft Office. We relied on webmail for mailing needs, and [Mozilla Firefox][6] was a welcome change in November 2004. My wife saw the benefits immediately, as there were no crashes or virus/malware infections. More importantly, we bade goodbye to the frequent crashes that plagued Windows 98 and XP. She continued to use the same distribution. + +I, on the other hand, started playing around with other distributions. I love distro-hopping and trying out new ones every once in a while. I also regularly try and test out web applications like Drupal, Joomla, and WordPress on Apache and NGINX stacks. And now our son, who was born in 2006, grew up on Linux. He's very happy with Tux Paint, Gcompris, and SMPlayer. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/3/my-linux-story-soumya-sarkar + +作者:[Soumya Sarkar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://opensource.com/users/ssarkarhyd +[1]: https://www.samba.org/ +[2]: https://en.wikipedia.org/wiki/Blue_Screen_of_Death +[3]: https://en.wikipedia.org/wiki/Computex_Taipei +[4]: https://en.wikipedia.org/wiki/Mandriva_Linux +[5]: http://www.openoffice.org/ +[6]: https://www.mozilla.org/en-US/firefox/new/ From ca948618682a6b9ad1f11b47d23d9c242cb260f5 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 13:11:03 +0800 Subject: [PATCH 1390/1710] =?UTF-8?q?20160515-10=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...301 Linux gives me all the tools I need.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md diff --git a/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md b/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md new file mode 100644 index 0000000000..b1689f4164 --- /dev/null +++ b/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md @@ -0,0 +1,56 @@ +Linux gives me all the tools I need +========================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/OPENHERE_blue.png?itok=3eqp-7gT) + +[Linux][0] is all around us. It's [on our phones][1] in the form of Android. It's [used on the International Space Station][2]. It [provides much of the backbone of the Internet][3]. And yet many people never notice it. Discovering Linux is a rewarding endeavor. Lots of other people have [shared their Linux stories][4] on Opensource.com, and now it's my turn. + +I still remember when I first discovered Linux in 2008. The person who helped me discover Linux was my father, Socrates Ballais. He was an economics professor here in Tacloban City, Philippines. He was also a technology enthusiast. He taught me a lot about computers and technology, but only advocated using Linux as a fallback operating system in case Windows fails. + +### My earliest days + +Before we had a computer in the home, I was a Windows user. I played games, created documents, and did all the other things kids do with computers. I didn't know what Linux was or what it was used for. The Windows logo was my symbol for a computer. + +When we got our first computer, my father installed Linux ([Ubuntu][5] 8.04) on it. Being the curious kid I was, I booted into the operating system. I was astonished with the interface. It was beautiful. I found it to be very user friendly. For some time, all I did in Ubuntu was play the bundled games. I would do my school work in Windows. + +### The first install + +Four years later, I decided that I would reinstall Windows on our family computer. Without hesitation, I also decided to install Ubuntu. With that, I had fallen in love with Linux (again). Over time, I became more adept with Ubuntu and would casually advocate its use to my friends. When I got my first laptop, I installed it right away. + +### Today + +Today, Linux is my go-to operating system. When I need to do something on a computer, I do it in Linux. For documents and presentations, I use Microsoft Office via [Wine][6]. For my web needs, there's [Chrome and Firefox][7]. For email, there's [Geary][8]. You can do pretty much everything with Linux. + +Most, if not all, of my programming work is done in Linux. The lack of a standard Integrated Development Environment (IDE) like [Visual Studio][9] or [XCode][10] taught me to be flexible and learn more things as a programmer. Now a text editor and a compiler/interpreter are all I need to start coding. I only use an IDE in cases when it's the best tool for accomplishing a task at hand. I find Linux to be more developer-friendly than Windows. To generalize, Linux gives me all the tools I need to develop software. + +Today, I am the co-founder and CTO of a startup called [Creatomiv Studios][11]. I use Linux to develop code for the backend server of our latest project, Basyang. I'm also an amateur photographer, and use [GIMP][12] and [Darktable][13] to edit and manage photos. For communication with my team, I use [Telegram][14]. + +### The beauty of Linux + +Many may see Linux as an operating system only for those who love solving complicated problems and working on the command line. Others may see it as a rubbish operating system lacking the support of many companies. However, I see Linux as a thing of beauty and a tool for creation. I love Linux the way it is and hope to see it continue to grow. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/3/my-linux-story-sean-ballais + +作者:[Sean Francis N. Ballais][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://opensource.com/users/seanballais +[0]: https://opensource.com/resources/what-is-linux +[1]: http://www.howtogeek.com/189036/android-is-based-on-linux-but-what-does-that-mean/ +[2]: http://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability +[3]: https://www.youtube.com/watch?v=JzsLkbwi1LA +[4]: https://opensource.com/tags/my-linux-story +[5]: http://ubuntu.com/ +[6]: https://www.winehq.org/ +[7]: https://www.google.com/chrome/browser/desktop/index.html +[8]: https://wiki.gnome.org/Apps/Geary +[9]: https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx +[10]: https://developer.apple.com/xcode/ +[11]: https://www.facebook.com/CreatomivStudios/ +[12]: https://www.gimp.org/ +[13]: http://www.darktable.org/ +[14]: https://telegram.org/ From b6029cd4e8d6ad35888b3e48ba478c324d2de18f Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 15 May 2016 17:23:31 +0800 Subject: [PATCH 1391/1710] Translating sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md --- ...3 How to Set Up 2-Factor Authentication for Login and sudo.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md b/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md index 81cf285cf0..0a4a6ae0af 100644 --- a/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md +++ b/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Set Up 2-Factor Authentication for Login and sudo ========================================================== From 6a3836fff4748f87aa84894ba1b8e30ce5de7aae Mon Sep 17 00:00:00 2001 From: ezio Date: Sun, 15 May 2016 17:44:12 +0800 Subject: [PATCH 1392/1710] rename for windows user --- ...orvalds Talks IoT Smart Devices Security Concerns and More.md} | 0 ...0330 After a nasty computer virus sys admin looks to Linux.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename sources/talk/{20160506 Linus Torvalds Talks IoT, Smart Devices, Security Concerns, and More.md => 20160506 Linus Torvalds Talks IoT Smart Devices Security Concerns and More.md} (100%) rename sources/talk/my-open-source-story/{20160330 After a nasty computer virus, sys admin looks to Linux.md => 20160330 After a nasty computer virus sys admin looks to Linux.md} (100%) diff --git a/sources/talk/20160506 Linus Torvalds Talks IoT, Smart Devices, Security Concerns, and More.md b/sources/talk/20160506 Linus Torvalds Talks IoT Smart Devices Security Concerns and More.md similarity index 100% rename from sources/talk/20160506 Linus Torvalds Talks IoT, Smart Devices, Security Concerns, and More.md rename to sources/talk/20160506 Linus Torvalds Talks IoT Smart Devices Security Concerns and More.md diff --git a/sources/talk/my-open-source-story/20160330 After a nasty computer virus, sys admin looks to Linux.md b/sources/talk/my-open-source-story/20160330 After a nasty computer virus sys admin looks to Linux.md similarity index 100% rename from sources/talk/my-open-source-story/20160330 After a nasty computer virus, sys admin looks to Linux.md rename to sources/talk/my-open-source-story/20160330 After a nasty computer virus sys admin looks to Linux.md From 8566fa608409bc0c9adc9669058e1e054928d386 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 May 2016 18:31:23 +0800 Subject: [PATCH 1393/1710] =?UTF-8?q?=E8=AF=B7=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md b/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md index 8e405254d3..3464cd07eb 100644 --- a/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md +++ b/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md @@ -1,5 +1,3 @@ -translating by ezio - Part 2 - LXD 2.0: 安装与配置 ================================================= From 67793aa8b7ba041be2c54bcf65f7985a1fa19b0b Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 15 May 2016 19:05:24 +0800 Subject: [PATCH 1394/1710] Translated: sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md Remove: sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md --- ...se: Six Unsung Apache Big Data Projects.md | 80 ------------ ...actor Authentication for Login and sudo.md | 117 ------------------ ...actor Authentication for Login and sudo.md | 117 ++++++++++++++++++ 3 files changed, 117 insertions(+), 197 deletions(-) delete mode 100644 sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md delete mode 100644 sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md create mode 100644 translated/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md diff --git a/sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md b/sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md deleted file mode 100644 index 76d97b7505..0000000000 --- a/sources/tech/20160510 On the Rise: Six Unsung Apache Big Data Projects.md +++ /dev/null @@ -1,80 +0,0 @@ -On the Rise: Six Unsung Apache Big Data Projects -================================================= - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/star-clusters-74052_1920.jpg?itok=HJISFdwo) ->Creative Commons Zero - -Countless organizations around the world are now working with data sets so large and complex that traditional data processing applications can no longer drive optimized analytics and insights. That’s the problem that the new wave of Big Data applications aims to solve, and the Apache Software Foundation (ASF) has recently graduated a slew of interesting open source Big Data projects to Top-Level status. That means that they will get active development and strong community support. - -Most people have heard of Apache Spark, [a Big Data processing framework][1] with built-in modules for streaming, SQL, machine learning and graph processing. IBM and other companies are pouring billions of development dollars into Spark initiatives, and NASA and the [SETI Institute][2] are collaborating to analyze terabytes of complex deep space radio signals using Spark’s machine learning capabilities in a hunt for patterns that might betray the presence of intelligent extraterrestrial life. - -![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/asf.jpg?itok=wtu0hq36) - -However, several other recently elevated Apache Big Data projects deserve attention, too. In fact, some of them may produce ecosystems of activity and development that will rival Spark’s. In conjunction with this week’s [ApacheCon North America conference][3] and Apache: Big Data events, this article will round up the Apache Big Data projects that you should know about. - -Here are six projects on the rise: - -### Kylin - -Apache recently [announced][4] that its Kylin project, an open source Big Data project born at eBay, has graduated to Top-Level status. Kylin is an open source Distributed Analytics Engine designed to provide an SQL interface and multi-dimensional analysis (OLAP) on Apache Hadoop, supporting extremely large datasets. It is still widely used at eBay and at a few other organizations. - -"Apache Kylin's incubation journey has demonstrated the value of Open Source governance at ASF and the power of building an open-source community and ecosystem around the project," said Luke Han, Vice President of Apache Kylin. "Our community is engaging the world's biggest local developer community in alignment with the Apache Way." - -As an OLAP-on-Hadoop solution, Apache Kylin aims to fill the gap between Big Data exploration and human use, "enabling interactive analysis on massive datasets with sub-second latency for analysts, end users, developers, and data enthusiasts," according to developers. "Apache Kylin brings back business intelligence (BI) to Apache Hadoop to unleash the value of Big Data," they added. - -### Lens - -Apache also recently [announced][5] that Apache Lens, an open source Big Data and analytics tool, has graduated from the Apache Incubator to become a Top-Level Project (TLP). According to the announcement: "Apache Lens is a Unified Analytics platform. It provides an optimal execution environment for analytical queries in the unified view. Apache Lens aims to cut the Data Analytics silos by providing a single view of data across multiple tiered data stores." - -"By providing an online analytical processing (OLAP) model on top of data, Lens seamlessly integrates Apache Hadoop with traditional data warehouses to appear as one. It also provides query history and statistics for queries running in the system along with query life cycle management." - -"Incubating Apache Lens has been an amazing experience at the ASF," said Amareshwari Sriramadasu, Vice President of Apache Lens. "Apache Lens solves a very critical problem in Big Data analytics space with respect to end users. It enables business users, analysts, data scientists, developers and other users to do complex analysis with ease, without knowing the underlying data layout." - -### Ignite - -The ASF has also [announced][6] that Apache Ignite has become a top-level project. It's an open source effort to build an in-memory data fabric. - -“Apache Ignite is a high-performance, integrated and distributed In-Memory Data Fabric for computing and transacting on large-scale data sets in real-time, "orders of magnitude faster than possible with traditional disk-based or flash technologies," according to Apache community members. “It is designed to easily power both existing and new applications in a distributed, massively parallel architecture on affordable, industry-standard hardware.” - -### Brooklyn - -The foundation [announced][7] that Apache Brooklyn is now a Top-Level Project (TLP), "signifying that the project's community and products have been well-governed under the ASF's meritocratic process and principles." Brooklyn is an application blueprint and management platform used for integrating services across multiple data centers as well as and a wide range of software in the cloud. - -According to the Brooklyn announcement: "With modern applications being composed of many components, and increasing interest in micro-services architecture, the deployment and ongoing evolution of deployed apps is an increasingly difficult problem. Apache Brooklyn’s blueprints provide a clear, concise way to model an application, its components and their configuration, and the relationships between components, before deploying to public Cloud or private infrastructure. Policy-based management, built on the foundation of autonomic computing theory, continually evaluates the running application and makes modifications to it to keep it healthy and optimize for metrics such as cost and responsiveness." - -Brooklyn is in use at some notable organizations. Cloud service providers Canopy and Virtustream have created product offerings built on Brooklyn. IBM has also made extensive use of Apache Brooklyn in order to migrate large workloads from AWS to IBM Softlayer. - -### Apex - -In April, the Apache Software Foundation [elevated][8] its Apex project to Top-Level status. It is billed as “a large scale, high throughput, low latency, fault tolerant, unified Big Data stream and batch processing platform for the Apache Hadoop ecosystem.” Apex works in conjunction with Apache Hadoop YARN, a resource management platform for working with Hadoop clusters. - -### Tajo - -Finally, Apache Tajo, an advanced open source data warehousing system in Apache Hadoop, is another new Big Data project to know about. Apache claims that Tajo provides the ability to rapidly extract more intelligence for Hadoop deployments, third party databases, and commercial business intelligence tools. - -Clearly, although Apache Spark draws the bulk of the headlines, it is not the only Big Data tool from Apache to keep your eyes on. As this year continues, Apache likely will graduate even more compelling Big Data projects to Top-Level status, where they will benefit from optimized development resources and more. - - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/enterprise/systems-management/887177-achieving-enterprise-ready-container-tools-with-werckers-open-source-cli - -作者:[SAM DEAN][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/sam-dean -[1]: https://www.linux.com/news/apache-spark-16-strong-typing-faster-throughput -[2]: http://www.seti.org/ -[3]: http://events.linuxfoundation.org/events/apachecon-north-america -[4]: http://globenewswire.com/news-release/2015/12/08/793713/0/en/The-Apache-Software-Foundation-Announces-Apache-Kylin-as-a-Top-Level-Project.html -[5]: http://globenewswire.com/news-release/2015/08/26/763513/10147133/en/The-Apache-Software-Foundation-Announces-Apache-tm-Lens-tm-as-a-Top-Level-Project.html -[6]: http://globenewswire.com/news-release/2015/08/25/763148/10146997/en/The-Apache-Software-Foundation-Announces-Apache-tm-Ignite-tm-as-a-Top-Level-Project.html -[7]: http://globenewswire.com/news-release/2015/11/23/789504/0/en/The-Apache-Software-Foundation-Announces-Apache-Brooklyn-as-a-Top-Level-Project.html -[8]: https://globenewswire.com/news-release/2016/04/25/832114/0/en/The-Apache-Software-Foundation-Announces-Apache-Apex-as-a-Top-Level-Project.html - - - - diff --git a/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md b/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md deleted file mode 100644 index 0a4a6ae0af..0000000000 --- a/sources/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md +++ /dev/null @@ -1,117 +0,0 @@ -ictlyh Translating -How to Set Up 2-Factor Authentication for Login and sudo -========================================================== - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_crop.png?itok=z_cdYZZf) ->[Used with permission][1] - -Security is all the rage—as it should be. We live in a world where data is an incredibly valuable currency, and you’re always at risk of loss. Because of this, you must do everything you can to ensure what you hold on your desktops and servers is safe. To that end, administrators and users will create incredibly complex passwords, employ password managers, and more. But, what if I told you could take the login to your Linux servers and desktops one step—nay, two steps—further? Thanks to the [Google Authenticator][2], you can. On top of that, it’s incredibly easy to set up. - -I am going to walk you through the process of setting up two-factor authentication for use on login and sudo. I will demonstrate this on a Ubuntu 16.04 desktop, but the process works for the server as well. To handle the two-factor side of things, I will be making use of the Google Authenticator. - -There is one very important caveat to this: Once you’ve set this up, you will not be able to log into the account (or issue sudo commands) without a six-digit code from the authenticator. This also adds another step for you, so if having to pull out your smartphone every time you need to log into your Linux machine (or use sudo), this might not be for you. Remember, however, this added step brings with it an extra layer of security you wouldn’t have otherwise. - -With that said, let’s set this up. - -### Installing the Necessary Components - -There are two pieces of this puzzle that must be installed—both in the form of the Google Authenticator. The first is the smartphone app. Here’s how to install from the Google Play Store: - -1. Open the Google Play Store on your Android device - -2. Search for google authenticator - -3. Locate and tap the entry by Google Inc. - -4. Tap Install - -5. Tap Accept - -6. Allow the installation to complete - -Now let’s move on to installing the authenticator on your Linux machine. Here’s how: - -1. Open a terminal window - -2. Issue the command sudo apt-get install google-authenticator - -3. Type your sudo password and hit Enter - -4. If prompted, type y and hit Enter - -5. Allow the installation to complete - -It’s now time to configure the login process to work with the google-authenticator. - -### Configuration - -Just one file must be edited to add two-step authentication for both login and sudo usage. The file is /etc/pam.d/common-auth. Open it and look for the line: - -``` -auth [success=1 default=ignore] pam_unix.so nullok_secure -``` - -Above that line, add the following: - -``` -auth required pam_google_authenticator.so -``` - -Save and close the file. - -The next step is to set up google-authenticator for every user on the system (otherwise, they will not be able to log in). For example’s sake, we’ll assume there are two users on your system: jack and olivia. We’ll first set this up for jack (we’ll assume this is the account we’ve been working with all along). - -Open up a terminal window and issue the command google-authenticator. You will be asked a series of questions (each of which you should answer with a y. The questions are: - -* Do you want me to update your "/home/jlwallen/.google_authenticator" file (y/n) y - -* Do you want to disallow multiple uses of the same authentication token? This restricts you to one login about every 30s, but it increases your chances to notice or even prevent man-in-the-middle attacks (y/n) - -* By default, tokens are good for 30 seconds, and to compensate for possible time-skew between the client and the server, we allow an extra token before and after the current time. If you experience problems with poor time synchronization, you can increase the window from its default size of 1:30min to about 4min. Do you want to do so (y/n) - -* If the computer that you are logging into isn't hardened against brute-force login attempts, you can enable rate-limiting for the authentication module. By default, this limits attackers to no more than 3 login attempts every 30s. Do you want to enable rate-limiting (y/n) - -Once you’ve answered these questions, you’ll be presented with your secret key, a verification code, and five emergency scratch codes. Print out the scratch codes and keep them with you. These codes can be used if you do not have your phone (each code is a one-time use only). The secret key is what you use to set up the account on the Google Authenticator app and the verification code is a one-time use code that you can use immediately (if needed). - -### Setting Up the App - -You now have the user jack set up. Before you can set up the user olivia, you need to add an account for jack on the Google Authenticator app. Open the app and the, from the main window, tap the menu button (three vertical dots in the upper right hand corner). Tap Set up account and then tap Enter provided key. In the next window (Figure 1), you will enter 16-digit secret key provided when you issued the google-authenticator app. Give the account a name (so you will remember which account this is to be used on) and tap ADD. - -![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/auth_a.png?itok=xSMkd-Mf) ->Figure 1: Adding a new account to the Google Authenticator app. - -Now that you’ve added the account, you will be presented with six-digit keys that will be requested every time you log in or attempt to use sudo. - -Finally, you have to set up the other accounts on the system. As I mentioned, we’re going to set up the account called olivia. Here’s how: - -1. Open up a terminal window - -2. Issue the command sudo su olivia - -3. Open the Google Authenticator on your smartphone - -4. Type the six digit authentication code (provided by the app) in the terminal window (Figure 2) and hit Enter - -5. Type your sudo password and hit Enter - -6. As the new user, issue the google-authenticator command, answer the questions, and record the keys and codes provided - -After you’ve successfully set up the user olivia, with the google-authenticator command, add a new account on the Google Authenticator app with that user’s info (in the same manner you did for the initial user). You should now have accounts on the Google Authenticator app for both jack and olivia. - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_b.png?itok=FH36V1r0) ->Figure 2: Entering the six-digit authentication code for sudo. - -That’s it. Every time you attempt to log into your machine (or use sudo), you will be required to provide a six-digit authentication key, before you can enter your user password. Your Linux machine is now far more secure than it was before adding two-factor authentication. Although some might consider this process a hassle, I highly recommend setting it up...especially for machines that house sensitive data. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_b.png?itok=FH36V1r0 - -作者:[JACK WALLEN][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -[a]: https://www.linux.com/users/jlwallen -[1]: https://www.linux.com/licenses/category/used-permission -[2]: https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2 - diff --git a/translated/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md b/translated/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md new file mode 100644 index 0000000000..1ed524c4d4 --- /dev/null +++ b/translated/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md @@ -0,0 +1,117 @@ +如何为登录和 sudo 设置双重认证 +========================================================== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_crop.png?itok=z_cdYZZf) +>[Used with permission][1] + +安全就是一切。我们生活的当今世界,数据具有令人难以置信的价值,而你也一直处于数据丢失的风险之中。因此,你必须想尽办法保证你桌面系统和服务器中东西的安全。结果,管理员和用户就会创建极其复杂的密码、使用密码管理器甚至其它更复杂的东西。但是,如果我告诉你你可以只需要一步-至多两步就能登录到你的 Linux 服务器或桌面系统中呢?多亏了 [Google Authenticator][2],现在你可以做到了。在这之上配置也极其简单。 + +我会给你简要介绍为登录和 sudo 设值双重认证的步骤。我基于 Ubuntu 16.04 桌面系统进行介绍,但这些步骤也适用于其它服务器。为了做到双重认证,我会使用 Google Authenticator。 + +这里有个非常重要的警告:一旦你设置了认证,没有一个从认证器中获得的由 6 个数字组成的验证码你就不可能登录账户(或者执行 sudo 命令)。这也给你增加了一步额外的操作,因此如果你不想每次登录到 Linux 服务器(或者使用 sudo)的时候都要拿出你的智能手机,这个方案就不适合你。但你也要记住,这额外的一个步骤也给你带来一层其它方法无法给予的保护。 + +话不多说,开始吧。 + +### 安装必要的组件 + +安装 Google 认证,首先要解决两个问题。一是安装智能机应用。下面是如何从 Google 应用商店安装的方法: + +1. 在你的安卓设备中打开 Google 应用商店 + +2. 搜索 google 认证 + +3. 找到并点击有 Google 标识的应用 + +4. 点击安装 + +5. 点击 接受 + +6. 等待安装完成 + +接下来,我们继续在你的 Linux 机器上安装认证。步骤如下: + +1. 打开一个终端窗口 + +2. 输入命令 sudo apt-get install google-authenticator + +3. 输入你的 sudo 密码并敲击回车 + +4. 如果有弹窗提示,输入 y 并敲击回车 + +5. 等待安装完成 + +接下来配置使用 google-authenticator 进行登录。 + +### 配置 + +要为登录和 sudo 添加两阶段认证只需要编辑一个文件。也就是 /etc/pam.d/common-auth。打开并找到如下一行: +Just one file must be edited to add two-step authentication for both login and sudo usage. The file is /etc/pam.d/common-auth. Open it and look for the line + +``` +auth [success=1 default=ignore] pam_unix.so nullok_secure +``` + +在这行上面添加: + +``` +auth required pam_google_authenticator.so +``` + +保存并关闭文件。 + +下一步就是为系统中的每个用户设置 google-authenticator(否则会不允许他们登录)。为了简单起见,我们假设你的系统中有两个用户:jack 和 olivia。首先为 jack 设置(我们假设这是我们一直使用的账户)。 + +打开一个终端窗口并输入命令 google-authenticator。之后会问你一系列的问题(每个问题你都应该用 y 回答)。问题包括: + +* 是否允许更新你的 "/home/jlwallen/.google_authenticator" 文件 (y/n) y + +* 是否禁止多个用户使用同一个认证令牌?这会限制你每 30 秒内只能登录一次,但能增加你注意到甚至防止中间人攻击的可能 (y/n) + +* 默认情况下令牌时长为 30 秒即可,为了补偿客户端和服务器之间可能出现的时间偏差,我们允许添加一个当前时间之前或之后的令牌。如果你无法进行时间同步,你可以把时间窗口由默认的 1:30 分钟增加到 4 分钟。是否希望如此 (y/n) + +* 如果你尝试登陆的计算机没有针对蛮力登陆进行加固,你可以为验证模块启用速率限制。默认情况下,限制攻击者每 30 秒不能尝试登陆超过 3 次。是否启用速率限制 (y/n) + +一旦完成了问题回答,你就会看到你的密钥、验证码以及 5 个紧急刮码。把刮码输出保存起来。你可以在无法使用手机的时候使用它们(每个刮码仅限使用一次)。密钥用于你在 Google Authenticator 上设置账户,验证码是你能立即使用(如果需要)的一次性验证码。 + +### 设置应用 + +现在你已经配置好了用户 jack。在设置用户 olivia 之前,你需要在 Google Authenticator 应用上为 jack 添加账户。在主屏幕上打开应用,点击 菜单 按钮(右上角三个竖排点)。点击添加账户然后输入提供的密钥。在下一个窗口(示意图1),你需要输入你运行 google-authenticator 应用时提供的 16 个数字的密钥。给账户取个名字(以便你记住这用于哪个账户),然后点击添加。 + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/auth_a.png?itok=xSMkd-Mf) +>Figure 1: 在 Google Authenticator 应用上新建账户 + +添加完账户之后,你就会看到一个 6 个数字的密码,你每次登录或者使用 sudo 的时候都会需要这个密码。 + +最后,在系统上设置其它账户。正如之前提到的,我们会设置一个叫 olivia 的账户。步骤如下: + +1. 打开一个终端窗口 + +2. 输入命令 sudo su olivia + +3. 在智能机上打开 Google Authenticator + +4. 在终端窗口(示意图2)中输入(应用提供的) 6 位数字验证码并敲击回车 + +5. 输入你的 sudo 密码并敲击回车 + +6. 以新用户输入命令 google-authenticator,回答问题并记录生成的密钥和验证码。 + +成功为 olivia 用户设置好之后,用 google-authenticator 命令,在 Google Authenticator 应用上根据用户信息(和之前为第一个用户添加账户相同)添加一个新的账户。现在你在 Google Authenticator 应用上就会有 jack 和 olivia 两个账户了。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_b.png?itok=FH36V1r0) +>Figure 2: 为 sudo 输入 6位数字验证码 + +好了,就是这些。每次你尝试登陆系统(或者使用 sudo) 的时候,在你输入用户密码之前,都会要求你输入提供的 6 位数字验证码。现在你的 Linux 机器就比添加双重认证之前安全多了。虽然有些人会认为这非常麻烦,我仍然推荐使用,尤其是那些保存了敏感数据的机器。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_b.png?itok=FH36V1r0 + +作者:[JACK WALLEN][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://www.linux.com/users/jlwallen +[1]: https://www.linux.com/licenses/category/used-permission +[2]: https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2 + From 70463eae9605135a8a53c31c9e8140391d1342a0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 15 May 2016 20:57:07 +0800 Subject: [PATCH 1395/1710] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rce Linux Distributions Would Presidential Hopefuls Run.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md b/published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md index 87c91930b3..22b7c1e498 100644 --- a/published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md +++ b/published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md @@ -17,11 +17,11 @@ 如果 **Jeb (Jeb!?) Bush** 使用 Linux,它一定是 [Debian][2]。Debian 属于一个相当无趣的分支,它是为真正意义上的、成熟的黑客设计的,这些人将清理那些由经验不甚丰富的开源爱好者所造成的混乱视为一大使命。当然,这也使得 Debian 显得很枯燥,所以它已有的用户基数一直在缩减。 -**Scott Walker** ,对于他来说,应该是一个 [Damn Small Linux][3] (DSL) 用户。这个系统仅仅需要 50MB 的硬盘空间和 16MB 的 RAM 便可运行。DSL 可以使一台 20 年前的 486 计算机焕发新春,而这恰好符合了 **Scott Walker** 所主张的消减成本计划。当然,你在 DSL 上的用户体验也十分原始,这个系统平台只能够运行一个浏览器。但是至少你你不用浪费钱财购买新的电脑硬件,你那台 1993 年购买的机器仍然可以为你好好的工作。 +**Scott Walker** ,对于他来说,应该是一个 [Damn Small Linux][3] (DSL) 用户。这个系统仅仅需要 50MB 的硬盘空间和 16MB 的 RAM 便可运行。DSL 可以使一台 20 年前的 486 计算机焕发新春,而这恰好符合了 **Scott Walker** 所主张的消减成本计划。当然,你在 DSL 上的用户体验也十分原始,这个系统平台只能够运行一个浏览器。但是至少你不用浪费钱财购买新的电脑硬件,你那台 1993 年购买的机器仍然可以为你好好的工作。 **Chris Christie** 会使用哪种系统呢?他肯定会使用 [Relax-and-Recover Linux][4],它号称“一次搞定(Setup-and-forget)的裸机 Linux 灾难恢复方案” 。从那次不幸的华盛顿大桥事故后,“一次搞定(Setup-and-forget)”基本上便成了 Christie 的政治主张。不管灾难恢复是否能够让 Christie 最终挽回一切,但是当他的电脑死机的时候,至少可以找到一两封意外丢失的机密邮件。 -至于 **Carly Fiorina**,她无疑将要使用 [惠普][6] (HPQ)为“[The Machine][5]”开发的操作系统,她在 1999 年到 2005 年这 6 年期间管理的这个公司。事实上,The Machine 可以运行几种不同的操作系统,也许是基于 Linux 的,也许不是,我们并不太清楚,它的开发始于 **Carly Fiorina** 在惠普公司的任期结束后。不管怎么说,作为 IT 圈里一个成功的管理者,这是她履历里面重要的组成部分,同时这也意味着她很难与惠普彻底断绝关系。 +至于 **Carly Fiorina**,她无疑将要使用 [惠普][6] (HPQ)为“[The Machine][5]”开发的操作系统,她在 1999 年到 2005 年这 6 年期间管理该公司。事实上,The Machine 可以运行几种不同的操作系统,也许是基于 Linux 的,也许不是,我们并不太清楚,它的开发始于 **Carly Fiorina** 在惠普公司的任期结束后。不管怎么说,作为 IT 圈里一个成功的管理者,这是她履历里面重要的组成部分,同时这也意味着她很难与惠普彻底断绝关系。 最后,但并不是不重要,你也猜到了——**Donald Trump**。他显然会动用数百万美元去雇佣一个精英黑客团队去定制属于自己的操作系统——尽管他原本是想要免费获得一个完美的、现成的操作系统——然后还能向别人炫耀自己的财力。他可能会吹嘘自己的操作系统是目前最好的系统,虽然它可能没有兼容 POSIX 或者一些其它的标准,因为那样的话就需要花掉更多的钱。同时这个系统也将根本不会提供任何文档,因为如果 **Donald Trump** 向人们解释他的系统的实际运行方式,他会冒着所有机密被泄露至伊斯兰国家的风险,绝对是这样的。 From ea571e68dded4515c6ee05cf7a16519c2e144a24 Mon Sep 17 00:00:00 2001 From: kyle Date: Sun, 15 May 2016 20:59:14 +0800 Subject: [PATCH 1396/1710] translated --- index.html.1 | 356 +++++++++++ ...t 3 - LXD 2.0--Your first LXD container.md | 561 ------------------ test | 11 + ...t 3 - LXD 2.0--Your first LXD container.md | 438 ++++++++++++++ 4 files changed, 805 insertions(+), 561 deletions(-) create mode 100644 index.html.1 delete mode 100644 sources/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md create mode 100644 test create mode 100644 translated/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md diff --git a/index.html.1 b/index.html.1 new file mode 100644 index 0000000000..3188a12288 --- /dev/null +++ b/index.html.1 @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + How people build software · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + + + +
+ +
+
+ + +
+ +
+
+
+
+

How people build software

+

Millions of developers use GitHub to build personal projects, support their businesses, and work together on open source technologies.

+
+ +
+
+
+ +
+
+

Welcome home, developers

+

GitHub fosters a fast, flexible, and collaborative development process that lets you work on your own or with others.

+
+
+
+
+ +

For everything you build

+

Host and manage your code on GitHub. You can keep your work private or share it with the world.

+
+
+ +

A better way to work

+

From hobbyists to professionals, GitHub helps developers simplify the way they build software.

+
+
+ +

Millions of projects

+

GitHub is home to millions of open source projects. Try one out or get inspired to create your own.

+
+
+ +

One platform, from start to finish

+

With hundreds of integrations, GitHub is flexible enough to be at the center of your development process.

+
+
+
+
+ +
+
+

Who uses GitHub?

+
+
+ + + +
+
+
+ +
+ NASA is on GitHub +
+
+
+
+ +
+
+
+ +
+ Public projects are always free. Private plans start at $7/month. +
+
+
+
+ + + +
+ + + + + + + + + +
+ + + Something went wrong with that request. Please try again. +
+ + + + + + + + + + + + + + + diff --git a/sources/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md b/sources/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md deleted file mode 100644 index 1da7e4ec62..0000000000 --- a/sources/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md +++ /dev/null @@ -1,561 +0,0 @@ -kylepeng93 is translating -Part 3 - LXD 2.0: Your first LXD container -========================================== - -This is the third blog post [in this series about LXD 2.0][0]. - -As there are a lot of commands involved with managing LXD containers, this post is rather long. If you’d instead prefer a quick step-by-step tour of those same commands, you can [try our online demo instead][1]! - -![](https://linuxcontainers.org/static/img/containers.png) - -### Creating and starting a new container - -As I mentioned in the previous posts, the LXD command line client comes pre-configured with a few image sources. Ubuntu is the best covered with official images for all its releases and architectures but there also are a number of unofficial images for other distributions. Those are community generated and maintained by LXC upstream contributors. - -### Ubuntu - -If all you want is the best supported release of Ubuntu, all you have to do is: - -``` -lxc launch ubuntu: -``` - -Note however that the meaning of this will change as new Ubuntu LTS releases are released. So for scripting use, you should stick to mentioning the actual release you want (see below). - -### Ubuntu 14.04 LTS - -To get the latest, tested, stable image of Ubuntu 14.04 LTS, you can simply run: - -``` -lxc launch ubuntu:14.04 -``` - -In this mode, a random container name will be picked. -If you prefer to specify your own name, you may instead do: - -``` -lxc launch ubuntu:14.04 c1 -``` - -Should you want a specific (non-primary) architecture, say a 32bit Intel image, you can do: - -``` -lxc launch ubuntu:14.04/i386 c2 -``` - -### Current Ubuntu development release - -The “ubuntu:” remote used above only provides official, tested images for Ubuntu. If you instead want untested daily builds, as is appropriate for the development release, you’ll want to use the “ubuntu-daily:” remote instead. - -``` -lxc launch ubuntu-daily:devel c3 -``` - -In this example, whatever the latest Ubuntu development release is will automatically be picked. - -You can also be explicit, for example by using the code name: - -``` -lxc launch ubuntu-daily:xenial c4 -``` - -### Latest Alpine Linux - -Alpine images are available on the “images:” remote and can be launched with: - -``` -lxc launch images:alpine/3.3/amd64 c5 -``` - -### And many more - -A full list of the Ubuntu images can be obtained with: - -``` -lxc image list ubuntu: -lxc image list ubuntu-daily: -``` - -And of all the unofficial images: - -``` -lxc image list images: -``` - -A list of all the aliases (friendly names) available on a given remote can also be obtained with (for the “ubuntu:” remote): - -``` -lxc image alias list ubuntu: -``` - -### Creating a container without starting it - -If you want to just create a container or a batch of container but not also start them immediately, you can just replace “lxc launch” by “lxc init”. All the options are identical, the only different is that it will not start the container for you after creation. - -``` -lxc init ubuntu: -``` - -### Information about your containers - -#### Listing the containers - -To list all your containers, you can do: - -``` -lxc list -``` - -There are a number of options you can pass to change what columns are displayed. On systems with a lot of containers, the default columns can be a bit slow (due to having to retrieve network information from the containers), you may instead want: - -``` -lxc list --fast -``` - -Which shows a different set of columns that require less processing on the server side. - -You can also filter based on name or properties: - -``` -stgraber@dakara:~$ lxc list security.privileged=true -+------+---------+---------------------+-----------------------------------------------+------------+-----------+ -| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | -+------+---------+---------------------+-----------------------------------------------+------------+-----------+ -| suse | RUNNING | 172.17.0.105 (eth0) | 2607:f2c0:f00f:2700:216:3eff:fef2:aff4 (eth0) | PERSISTENT | 0 | -+------+---------+---------------------+-----------------------------------------------+------------+-----------+ -``` - -In this example, only containers that are privileged (user namespace disabled) are listed. - -``` -stgraber@dakara:~$ lxc list --fast alpine -+-------------+---------+--------------+----------------------+----------+------------+ -| NAME | STATE | ARCHITECTURE | CREATED AT | PROFILES | TYPE | -+-------------+---------+--------------+----------------------+----------+------------+ -| alpine | RUNNING | x86_64 | 2016/03/20 02:11 UTC | default | PERSISTENT | -+-------------+---------+--------------+----------------------+----------+------------+ -| alpine-edge | RUNNING | x86_64 | 2016/03/20 02:19 UTC | default | PERSISTENT | -+-------------+---------+--------------+----------------------+----------+------------+ -``` - -And in this example, only the containers which have “alpine” in their names (complex regular expressions are also supported). - -#### Getting detailed information from a container - -As the list command obviously can’t show you everything about a container in a nicely readable way, you can query information about an individual container with: - -``` -lxc info -``` - -For example: - -``` -stgraber@dakara:~$ lxc info zerotier -Name: zerotier -Architecture: x86_64 -Created: 2016/02/20 20:01 UTC -Status: Running -Type: persistent -Profiles: default -Pid: 31715 -Processes: 32 -Ips: - eth0: inet 172.17.0.101 - eth0: inet6 2607:f2c0:f00f:2700:216:3eff:feec:65a8 - eth0: inet6 fe80::216:3eff:feec:65a8 - lo: inet 127.0.0.1 - lo: inet6 ::1 - lxcbr0: inet 10.0.3.1 - lxcbr0: inet6 fe80::c0a4:ceff:fe52:4d51 - zt0: inet 29.17.181.59 - zt0: inet6 fd80:56c2:e21c:0:199:9379:e711:b3e1 - zt0: inet6 fe80::79:e7ff:fe0d:5123 -Snapshots: - zerotier/blah (taken at 2016/03/08 23:55 UTC) (stateless) - ``` - -### Life-cycle management commands - -Those are probably the most obvious commands of any container or virtual machine manager but they still need to be covered. - -Oh and all of them accept multiple container names for batch operation. - -#### start - -Starting a container is as simple as: - -``` -lxc start -``` - -#### stop - -Stopping a container can be done with: - -``` -lxc stop -``` - -If the container isn’t cooperating (not responding to SIGPWR), you can force it with: - -``` -lxc stop --force -``` - -#### restart - -Restarting a container is done through: - -``` -lxc restart -``` - -And if not cooperating (not responding to SIGINT), you can force it with: - -``` -lxc restart --force -``` - -#### pause - -You can also “pause” a container. In this mode, all the container tasks will be sent the equivalent of a SIGSTOP which means that they will still be visible and will still be using memory but they won’t get any CPU time from the scheduler. - -This is useful if you have a CPU hungry container that takes quite a while to start but that you aren’t constantly using. You can let it start, then pause it, then start it again when needed. - -``` -lxc pause -``` - -#### delete - -Lastly, if you want a container to go away, you can delete it for good with: - -``` -lxc delete -``` - -Note that you will have to pass “–force” if the container is currently running. - -### Container configuration - -LXD exposes quite a few container settings, including resource limitation, control of container startup and a variety of device pass-through options. The full list is far too long to cover in this post but it’s available [here][2]. - -As far as devices go, LXD currently supports the following device types: - -- disk -This can be a physical disk or partition being mounted into the container or a bind-mounted path from the host. -- nic -A network interface. It can be a bridged virtual ethernet interrface, a point to point device, an ethernet macvlan device or an actual physical interface being passed through to the container. -- unix-block -A UNIX block device, e.g. /dev/sda -- unix-char -A UNIX character device, e.g. /dev/kvm -- none -This special type is used to hide a device which would otherwise be inherited through profiles. - -#### Configuration profiles - -The list of all available profiles can be obtained with: - -``` -lxc profile list -``` - -To see the content of a given profile, the easiest is to use: - -``` -lxc profile show -``` - -And should you want to change anything inside it, use: - -``` -lxc profile edit -``` - -You can change the list of profiles which apply to a given container with: - -``` -lxc profile apply ,,,... -``` - -#### Local configuration - -For things that are unique to a container and so don’t make sense to put into a profile, you can just set them directly against the container: - -``` -lxc config edit -``` - -This behaves the exact same way as “profile edit” above. - -Instead of opening the whole thing in a text editor, you can also modify individual keys with: - -``` -lxc config set -``` -Or add devices, for example: - -``` -lxc config device add my-container kvm unix-char path=/dev/kvm -``` - -Which will setup a /dev/kvm entry for the container named “my-container”. - -The same can be done for a profile using “lxc profile set” and “lxc profile device add”. - -#### Reading the configuration - -You can read the container local configuration with: - -``` -lxc config show -``` - -Or to get the expanded configuration (including all the profile keys): - -``` -lxc config show --expanded -``` - -For example: - -``` -stgraber@dakara:~$ lxc config show --expanded zerotier -name: zerotier -profiles: -- default -config: - security.nesting: "true" - user.a: b - volatile.base_image: a49d26ce5808075f5175bf31f5cb90561f5023dcd408da8ac5e834096d46b2d8 - volatile.eth0.hwaddr: 00:16:3e:ec:65:a8 - volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]' -devices: - eth0: - name: eth0 - nictype: macvlan - parent: eth0 - type: nic - limits.ingress: 10Mbit - limits.egress: 10Mbit - root: - path: / - size: 30GB - type: disk - tun: - path: /dev/net/tun - type: unix-char -ephemeral: false -``` - -That one is very convenient to check what will actually be applied to a given container. - -#### Live configuration update - -Note that unless indicated in the documentation, all configuration keys and device entries are applied to affected containers live. This means that you can add and remove devices or alter the security profile of running containers without ever having to restart them. - -### Getting a shell - -LXD lets you execute tasks directly into the container. The most common use of this is to get a shell in the container or to run some admin tasks. - -The benefit of this compared to SSH is that you’re not dependent on the container being reachable over the network or on any software or configuration being present inside the container. - -Execution environment - -One thing that’s a bit unusual with the way LXD executes commands inside the container is that it’s not itself running inside the container, which means that it can’t know what shell to use, what environment variables to set or what path to use for your home directory. - -Commands executed through LXD will always run as the container’s root user (uid 0, gid 0) with a minimal PATH environment variable set and a HOME environment variable set to /root. - -Additional environment variables can be passed through the command line or can be set permanently against the container through the “environment.” configuration options. - -#### Executing commands - -Getting a shell inside a container is typically as simple as: - -``` -lxc exec bash -``` - -That’s assuming the container does actually have bash installed. - - -More complex commands require the use of a separator for proper argument parsing: - -``` -lxc exec -- ls -lh / -``` - -To set or override environment variables, you can use the “–env” argument, for example: - -``` -stgraber@dakara:~$ lxc exec zerotier --env mykey=myvalue env | grep mykey -mykey=myvalue -``` - -### Managing files - -Because LXD has direct access to the container’s file system, it can directly read and write any file inside the container. This can be very useful to pull log files or exchange files with the container. - -#### Pulling a file from the container - -To get a file from the container, simply run: - -``` -lxc file pull / -``` - -For example: - -``` -stgraber@dakara:~$ lxc file pull zerotier/etc/hosts hosts -``` - -Or to read it to standard output: - -``` -stgraber@dakara:~$ lxc file pull zerotier/etc/hosts - -127.0.0.1 localhost - -# The following lines are desirable for IPv6 capable hosts -::1 ip6-localhost ip6-loopback -fe00::0 ip6-localnet -ff00::0 ip6-mcastprefix -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters -ff02::3 ip6-allhosts -``` - -#### Pushing a file to the container - -Push simply works the other way: - -``` -lxc file push / -``` - -#### Editing a file directly - -Edit is a convenience function which simply pulls a given path, opens it in your default text editor and then pushes it back to the container when you close it: - -``` -lxc file edit / -``` - -### Snapshot management - -LXD lets you snapshot and restore containers. Snapshots include the entirety of the container’s state (including running state if –stateful is used), which means all container configuration, container devices and the container file system. - -#### Creating a snapshot - -You can snapshot a container with: - -``` -lxc snapshot -``` - -It’ll get named snapX where X is an incrementing number. - -Alternatively, you can name your snapshot with: - -``` -lxc snapshot -``` - -#### Listing snapshots - -The number of snapshots a container has is listed in “lxc list”, but the actual snapshot list is only visible in “lxc info”. - -``` -lxc info -``` - -#### Restoring a snapshot - -To restore a snapshot, simply run: - -``` -lxc restore -``` - -#### Renaming a snapshot - -Renaming a snapshot can be done by moving it with: - -``` -lxc move / / -``` - -#### Creating a new container from a snapshot - -You can create a new container which will be identical to another container’s snapshot except for the volatile information being reset (MAC address): - -``` -lxc copy / -``` - -#### Deleting a snapshot - -And finally, to delete a snapshot, just run: - -``` -lxc delete / -``` - -### Cloning and renaming - -Getting clean distribution images is all nice and well, but sometimes you want to install a bunch of things into your container, configure it and then branch it into a bunch of other containers. - -#### Copying a container - -To copy a container and effectively clone it into a new one, just run: - -``` -lxc copy -``` - -The destination container will be identical in every way to the source one, except it won’t have any snapshot and volatile keys (MAC address) will be reset. - -#### Moving a container - -LXD lets you copy and move containers between hosts, but that will get covered in a later post. - -For now, the “move” command can be used to rename a container with: - -``` -lxc move -``` - -The only requirement is that the container be stopped, everything else will be kept exactly as it was, including the volatile information (MAC address and such). - -### Conclusion - -This pretty long post covered most of the commands you’re likely to use in day to day operation. - -Obviously a lot of those commands have extra arguments that let you be more efficient or tweak specific aspects of your LXD containers. The best way to learn about all of those is to go through the help for those you care about (–help). - -### Extra information - -The main LXD website is at: -Development happens on Github at: -Mailing-list support happens on: -IRC support happens in: #lxcontainers on irc.freenode.net - -And if you don’t want or can’t install LXD on your own machine, you can always [try it online instead][1]! - - --------------------------------------------------------------------------------- - -via: https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ - -作者:[Stéphane Graber][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.stgraber.org/author/stgraber/ -[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ -[1]: https://linuxcontainers.org/lxd/try-it -[2]: https://github.com/lxc/lxd/blob/master/doc/configuration.md diff --git a/test b/test new file mode 100644 index 0000000000..3fcac2634a --- /dev/null +++ b/test @@ -0,0 +1,11 @@ + 1. 移动光标到本行。 + + 2. 接着按 v 键,将光标移动至下面第五个条目上。您会注意到之间的文本被高亮了。 + + 3. 然后按 : 字符。您将看到屏幕底部会出现 :'<,'> 。 + + 4. 现在请输入 w TEST,其中 TEST 是一个未被使用的文件名。确认您看到了 + :'<,'>w TEST 之后按 <回车> 键。 + + 5. 这时 Vim 会把选中的行写入到以 TEST 命名的文件中去。使用 :!dir 或 :!ls + 确认文件被正确保存。这次先别删除它!我们在下一讲中会用到它。 diff --git a/translated/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md b/translated/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md new file mode 100644 index 0000000000..4b6dcfd8aa --- /dev/null +++ b/translated/tech/LXD/Part 3 - LXD 2.0--Your first LXD container.md @@ -0,0 +1,438 @@ +kylepeng93 is translating +你的地一个LXD容器 +========================================== + +这是第三篇发布的博客[LXD2.0系列] +由于在管理LXD容器时涉及到大量的命令,所以这篇文章的篇幅是比较长的,如果你更喜欢使用同样的命令来快速的一步步实现整个过程,你可以[尝试我们的在线示例]! +![](https://linuxcontainers.org/static/img/containers.png) + +### 创建并启动一个新的容器 +正如我在先前的文章中提到的一样,LXD命令行客户端使用了少量的图片来做了一个预配置。Ubuntu的所有发行版和架构平台都拥有最好的官方图片,但是对于其他的发行版仍然有大量的非官方图片,那些图片都是由社区制作并且被LXC上层贡献者所维护。 +### Ubuntu +如果你想要支持最为完善的ubuntu版本,你可以按照下面的去做: +``` +lxc launch ubuntu: +``` +注意,这里所做的解释会随着ubuntu LTS的发布而变化。因此对于你使用的脚本应该取决于下面提到的具体你想要安装的版本: +###Ubuntu14.04 LTS +得到最新的,已经测试过的,稳定的ubuntu14.04 LTS镜像,你可以简单的执行: +``` +lxc launch ubuntu:14.04 +``` +这该模式下,一个任意的容器名将会被指定给它。 +如果你更喜欢指定一个你自己的命令,你可以这样做: +``` +lxc launch ubuntu:14.04 c1 +``` + +如果你想要指定一个特定的体系架构(非主要的),比如32位Intel镜像,你可以这样做: +``` +lxc launch ubuntu:14.04/i386 c2 +``` + +### 当前的Ubuntu开发版本 +上面使用的“ubuntu:”远程方式只会给你提供官方的并经过测试的ubuntu镜像。但是如果你想要未经测试过的日常构建版本,开发版可能对你来说是合适的,你将要使用“ubuntu-daily”来远程获取。 +``` +lxc launch ubuntu-daily:devel c3 +``` + +在这个例子中,最新的ubuntu开发版本将会被选自动选中。 +你也可以更加精确,比如你可以使用代号名: +``` +lxc launch ubuntu-daily:xenial c4 +``` + +### 最新的Alpine Linux +Alpine镜像在“Images:”远程中可用,可以通过如下命令执行: +``` +lxc launch images:alpine/3.3/amd64 c5 +``` + +### And many more +### 其他 +所有ubuntu镜像列表可以这样获得: +``` +lxc image list ubuntu: +lxc image list ubuntu-daily: +``` + +所有的非官方镜像: +``` +lxc image list images: +``` + +所有给定的可用远程别名清单可以这样获得(针对“ubuntu:”远程): +``` +lxc image alias list ubuntu: +``` + + +### 创建但不启动一个容器 +如果你想创建一个容器或者一批容器,但是你不想马上启动他们,你可以使用“lxc init”替换掉“lxc launch”。所有的选项都是相同的,唯一的不同就是它并不会在你创建完成之后启动容器。 +``` +lxc init ubuntu: +``` + +### 关于你的容器的信息 +### 列出所有的容器 +为了列出你的所有容器,你可以这样这做: +``` +lxc list +``` + +有大量的选项供你选择来改变被显示出来的列。在一个拥有大量容器的系统上,默认显示的列可能会有点慢(因为必须获取容器中的网络信息),你可以这样做来避免这种情况: +``` +lxc list --fast +``` + +上面的命令显示了一个不同的列的集合,这个集合在服务器端需要处理的信息更少。 +你也可以基于名字或者属性来过滤掉一些东西: +``` +stgraber@dakara:~$ lxc list security.privileged=true ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +| suse | RUNNING | 172.17.0.105 (eth0) | 2607:f2c0:f00f:2700:216:3eff:fef2:aff4 (eth0) | PERSISTENT | 0 | ++------+---------+---------------------+-----------------------------------------------+------------+-----------+ +``` + +在这个例子中,只有那些有特权(用户命名空间不可用)的容器才会被列出来。 +``` +stgraber@dakara:~$ lxc list --fast alpine ++-------------+---------+--------------+----------------------+----------+------------+ +| NAME | STATE | ARCHITECTURE | CREATED AT | PROFILES | TYPE | ++-------------+---------+--------------+----------------------+----------+------------+ +| alpine | RUNNING | x86_64 | 2016/03/20 02:11 UTC | default | PERSISTENT | ++-------------+---------+--------------+----------------------+----------+------------+ +| alpine-edge | RUNNING | x86_64 | 2016/03/20 02:19 UTC | default | PERSISTENT | ++-------------+---------+--------------+----------------------+----------+------------+ +``` + +在这个例子中,只有在名字中带有“alpine”的容器才会被列出来(支持复杂的正则表达式)。 +### 获取容器的详细信息 +由于list命令显然不能以一种友好的可读方式显示容器的所有信息,因此你可以使用如下方式来查询单个容器的信息: +``` +lxc info +``` + +例如: +``` +stgraber@dakara:~$ lxc info zerotier +Name: zerotier +Architecture: x86_64 +Created: 2016/02/20 20:01 UTC +Status: Running +Type: persistent +Profiles: default +Pid: 31715 +Processes: 32 +Ips: + eth0: inet 172.17.0.101 + eth0: inet6 2607:f2c0:f00f:2700:216:3eff:feec:65a8 + eth0: inet6 fe80::216:3eff:feec:65a8 + lo: inet 127.0.0.1 + lo: inet6 ::1 + lxcbr0: inet 10.0.3.1 + lxcbr0: inet6 fe80::c0a4:ceff:fe52:4d51 + zt0: inet 29.17.181.59 + zt0: inet6 fd80:56c2:e21c:0:199:9379:e711:b3e1 + zt0: inet6 fe80::79:e7ff:fe0d:5123 +Snapshots: + zerotier/blah (taken at 2016/03/08 23:55 UTC) (stateless) + ``` + +### 生命周期管理命令 +这些命令对于任何容器或者虚拟机管理器或许都是最普通的命令,但是它们仍然需要被涉及到。 +所有的这些命令在批量操作时都能接受多个容器名。 +### 启动 +启动一个容器就向下面一样简单: +``` +lxc start +``` + +### 停止 +停止一个容器可以这样来完成: +``` +lxc stop +``` + +如果容器不合作(即没有对发出的信号产生回应),这时候,你可以使用下面的方式强制执行: +``` +lxc stop --force +``` + +### 重启 +通过下面的命令来重启一个容器: +``` +lxc restart +``` + +如果容器不合作(即没有对发出的信号产生回应),你可以使用下面的方式强制执行: +``` +lxc restart --force +``` + +### 暂停 +你也可以“暂停”一个容器,在这种模式下,所有的容器任务将会被发送相同的信号,这也意味着他们将仍然是可见的,并且仍然会占用内存,但是他们不会从调度程序中得到任何的CPU时间片。 +如果你有一个CPU的饥饿容器,而这个容器需要一点时间来启动,但是你却并 不会经常用到它。这时候,你可以先启动它,然后将它暂停,并在你需要它的时候再启动它。 +``` +lxc pause +``` + +### 删除 +最后,如果你不需要这个容器了,你可以用下面的命令删除它: +``` +lxc delete +``` + +注意,如果容器还处于运行状态时你将必须使用“-forece”。 +### 容器的配置 +LXD拥有大量的容器配置设定,包括资源限制,容器启动控制以及对各种设备是否允许访问的配置选项。完整的清单因为太长所以并没有在本文中列出,但是,你可以从[here]获取它。 +就设备而言,LXD当前支持下面列出的这些设备: +- 磁盘 +既可以是一块物理磁盘,也可以只是一个被挂挂载到容器上的分区,还可以是一个来自主机的绑定挂载路径。 +- 网络接口卡 +一块网卡。它可以是一块桥接的虚拟网卡,或者是一块点对点设备,还可以是一块以太局域网设备或者一块已经被连接到容器的真实物理接口。 +- unix块 +一个UNIX块设备,比如/dev/sda +- unix字符 +一块UNIX字符设备,比如/dev/kvm +- none +这种特殊类型被用来隐藏那种可以通过profiles文件被继承的设备。 + +### 配置profiles文件 +所有可用的profiles的文件列表可以这样获取: +``` +lxc profile list +``` + +为了看到给定profile文件的内容,最简单的方式是这样做: +``` +lxc profile show +``` + +你可能想要改变文件里面的内容,可以这样做: +``` +lxc profile edit +``` + +你可以使用如下命令来改变profiles的列表并将这种变化应用到给定的容器中: +``` +lxc profile apply ,,,... +``` + +### 本地配置 +For things that are unique to a container and so don’t make sense to put into a profile, you can just set them directly against the container: + +``` +lxc config edit +``` + +上面的命令将会完成和“profile edit”命令一样的功能。 + +即使不在文本编辑器中打开整个文件的内容,你也可以像这样修改单独的键: +``` +lxc config set +``` +或者添加设备,例如 +``` +lxc config device add my-container kvm unix-char path=/dev/kvm +``` + +上面的命令将会为名为“my-container”的容器打开一个/dev/kvm入口。 +对一个profile文件使用“lxc profile set”和“lxc profile device add”命令也能实现上面的功能。 +#### 读取配置 +你可以使用如下命令来阅读容器的本地配置: +``` +lxc config show +``` + +或者得到已经被展开了的配置(包含了所有的键值): +``` +lxc config show --expanded +``` + +例如: +``` +stgraber@dakara:~$ lxc config show --expanded zerotier +name: zerotier +profiles: +- default +config: + security.nesting: "true" + user.a: b + volatile.base_image: a49d26ce5808075f5175bf31f5cb90561f5023dcd408da8ac5e834096d46b2d8 + volatile.eth0.hwaddr: 00:16:3e:ec:65:a8 + volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]' +devices: + eth0: + name: eth0 + nictype: macvlan + parent: eth0 + type: nic + limits.ingress: 10Mbit + limits.egress: 10Mbit + root: + path: / + size: 30GB + type: disk + tun: + path: /dev/net/tun + type: unix-char +ephemeral: false +``` + +这样做可以很方便的检查有哪些配置属性被应用到了给定的容器。 +### 实时配置更新 +注意,除非在文档中已经被明确指出,否则所有的键值和设备入口都会被应用到受影响的实时容器。这意味着你可以添加和移除某些设备或者在不重启容器的情况下修改正在运行的容器的安全profile配置文件。 +### 获得一个shell +LXD允许你对容器中的任务进行直接的操作。最常用的做法是在容器中得到一个shell或者执行一些管理员任务。 +和SSH相比,这样做的好处是你可以接触到独立与容器之外的网络或者任何一个软件又或者任何一个能够在容器内可见的文件配置。 +执行环境 +对比LXD在容器内执行命令的方式,有一点是不同的,那就是它自身并不是在容器中运行。这也意味着它不知道该使用什么样的shell,以及设置什么样的环境变量和哪里是它的家目录。 +通过LXD来执行命令必须总是在最小路径环境变量集并且HONE环境变量必须为/root的情况下以容器的超级用户身份来执行(即uid为0,gid为0)。 +其他的环境变量可以通过命令行来设置,或者在“environment.”配置文件中设置成永久环境变量。 +### 执行命令 +在容器中获得一个shell可以简单的执行下列命令得到: +``` +lxc exec bash +``` + +当然,这样做的前提是容器内已经安装了bash。 + +更多复杂的命令要求有对参数分隔符的合理使用。 +``` +lxc exec -- ls -lh / +``` + +如果想要设置或者重写变量,你可以使用“-env”参数,例如: +``` +stgraber@dakara:~$ lxc exec zerotier --env mykey=myvalue env | grep mykey +mykey=myvalue +``` + +### 管理文件 +因为LXD可以直接访问容器的文件系统,因此,它可以直接往容器中读取和写入任意文件。当我们需要提取日志文件或者与容器发生交互时,这个特性是很有用的。 +#### 从容器中取回一个文件 +想要从容器中获得一个文件,简单的执行下列命令: +``` +lxc file pull / +``` + +例如: +``` +stgraber@dakara:~$ lxc file pull zerotier/etc/hosts hosts +``` + +或者将它读取到标准输出: +``` +stgraber@dakara:~$ lxc file pull zerotier/etc/hosts - +127.0.0.1 localhost + +# 下面的所有行对于支持IPv6的主机是有用的 +::1 ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +ff02::3 ip6-allhosts +``` + +#### 向容器发送一个文件 + +发送会简单的以另一种方式完成: +``` +lxc file push / +``` + +#### 直接编辑一个文件 +当只是简单的提取一个给定的路径时,编辑是一个很方便的功能,在你的默认文本编辑器中打开它,这样在你关闭编辑器时会自动将编辑的内容保存到容器。 +``` +lxc file edit / +``` + +### 快照管理 +LXD允许你对容器执行快照功能并恢复它。快照包括了容器在某一时刻的完整状态(如果-stateful被使用的话将会包括运行状态),这也意味着所有的容器配置,容器设备和容器文件系统也会被包保存。 +#### 创建一个快照 +你可以使用下面的命令来执行快照功能: +``` +lxc snapshot +``` + +命令执行完成之后将会生成名为snapX(X为一个自动增长的数)的记录。 +除此之外,你还可以使用如下命令命名你的快照: +``` +lxc snapshot +``` + +#### 列出所有的快照 +一个容器的所有快照的数量可以使用“lxc list”来得到,但是真正的快照列表只能执行“lxc info”命令才能看到。 +``` +lxc info +``` + +#### 恢复快照 +为了恢复快照,你可以简单的执行下面的命令: +``` +lxc restore +``` + +#### 给快照重命名 +可以使用如下命令来给快照重命名: +``` +lxc move / / +``` + +#### 从快照中创建一个新的容器 +你可以使用快照来创建一个新的容器,而这个新的容器除了一些可变的信息将会被重置之外(例如MAC地址)其余所有信息都将和快照完全相同。 +``` +lxc copy / +``` + +#### 删除一个快照 + +最后,你可以执行下面的命令来删除一个快照: +``` +lxc delete / +``` + +### 克隆并重命名 +得到一个纯净的发行版镜像总是让人感到愉悦,但是,有时候你想要安装一系列的软件到你的容器中,这时,你需要配置它然后将它分割并分配到多个其他的容器中。 +#### 复制一个容器 +为了复制一个容器并有效的将它克隆到一个新的容器中,你可以执行下面的命令: +``` +lxc copy +``` +目标容器在所有方面将会完全和源容器等同。除非它没有 +目标容器在所有方面将会完全和源容器等同。除了新的容器没有任何源容器的快照以及一些可变值将会被重置之外(例如MAC地址)。 +#### 移除一个快照 +LXD允许你复制容器并在主机之间移动它。但是,关于这一点将在后面的文章中介绍。 +现在,“move”命令将会被用作给容器重命名。 +``` +lxc move +``` + +唯一的要求就是当容器被停止时,容器内的任何事情都会被保存成它本来的样子,包括可变化的信息(类似MAC地址等)。 +### 结论 +这篇如此长的文章介绍了大多数你可能会在日常操作中使用到的命令。 +很显然,那些如此之多的命令都会有额外的可以让你的命令更加有效率或者可以让你指定你的LXD容器的某个具体方面的参数。最好的学习这些命令的方式就是深入学习它们的帮助文档,当然。只是对于那些你真正需要用到的命令参数。 +### 额外的信息 +LXD的主要网站是: +Github上的开发说明: +邮件列表支持: +IRC支持: #lxcontainers on irc.freenode.net +如果你不想或者不能在你的机器上安装LXD,你可以[try it online instead][1]! + +-------------------------------------------------------------------------------- + +来自于:https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/ +作者:[Stéphane Graber][a] +译者:[kylepeng93](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.stgraber.org/author/stgraber/ +[0]: https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/ +[1]: https://linuxcontainers.org/lxd/try-it +[2]: https://github.com/lxc/lxd/blob/master/doc/configuration.md From 1da48286956f1047e70134dc45812257288839ac Mon Sep 17 00:00:00 2001 From: kyle Date: Sun, 15 May 2016 21:09:20 +0800 Subject: [PATCH 1397/1710] translated --- index.html.1 | 356 --------------------------------------------------- 1 file changed, 356 deletions(-) delete mode 100644 index.html.1 diff --git a/index.html.1 b/index.html.1 deleted file mode 100644 index 3188a12288..0000000000 --- a/index.html.1 +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - How people build software · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Skip to content - - - - - - - - - - - - -
- -
-
- - -
- -
-
-
-
-

How people build software

-

Millions of developers use GitHub to build personal projects, support their businesses, and work together on open source technologies.

-
- -
-
-
- -
-
-

Welcome home, developers

-

GitHub fosters a fast, flexible, and collaborative development process that lets you work on your own or with others.

-
-
-
-
- -

For everything you build

-

Host and manage your code on GitHub. You can keep your work private or share it with the world.

-
-
- -

A better way to work

-

From hobbyists to professionals, GitHub helps developers simplify the way they build software.

-
-
- -

Millions of projects

-

GitHub is home to millions of open source projects. Try one out or get inspired to create your own.

-
-
- -

One platform, from start to finish

-

With hundreds of integrations, GitHub is flexible enough to be at the center of your development process.

-
-
-
-
- -
-
-

Who uses GitHub?

-
-
- - - -
-
-
- -
- NASA is on GitHub -
-
-
-
- -
-
-
- -
- Public projects are always free. Private plans start at $7/month. -
-
-
-
- - - -
- - - - - - - - - -
- - - Something went wrong with that request. Please try again. -
- - - - - - - - - - - - - - - From 6ad5a2c3b0ef6864c0d388bc0ae8246c83f109eb Mon Sep 17 00:00:00 2001 From: kyle Date: Sun, 15 May 2016 21:14:47 +0800 Subject: [PATCH 1398/1710] translated --- test | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 test diff --git a/test b/test deleted file mode 100644 index 3fcac2634a..0000000000 --- a/test +++ /dev/null @@ -1,11 +0,0 @@ - 1. 移动光标到本行。 - - 2. 接着按 v 键,将光标移动至下面第五个条目上。您会注意到之间的文本被高亮了。 - - 3. 然后按 : 字符。您将看到屏幕底部会出现 :'<,'> 。 - - 4. 现在请输入 w TEST,其中 TEST 是一个未被使用的文件名。确认您看到了 - :'<,'>w TEST 之后按 <回车> 键。 - - 5. 这时 Vim 会把选中的行写入到以 TEST 命名的文件中去。使用 :!dir 或 :!ls - 确认文件被正确保存。这次先别删除它!我们在下一讲中会用到它。 From 86ea7ee56c0b5f647ad9f2cdfd36d724ee547e8f Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 16 May 2016 22:23:54 +0800 Subject: [PATCH 1399/1710] =?UTF-8?q?20160516-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 from a recruiter's perspective.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sources/talk/20160516 Open source from a recruiter's perspective.md diff --git a/sources/talk/20160516 Open source from a recruiter's perspective.md b/sources/talk/20160516 Open source from a recruiter's perspective.md new file mode 100644 index 0000000000..15fc396139 --- /dev/null +++ b/sources/talk/20160516 Open source from a recruiter's perspective.md @@ -0,0 +1,51 @@ +Open source from a recruiter's perspective +============================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_workplay.png?itok=uQqFssrf) + +I fell in love with technology when I went to my first open source convention in 2012. + +After spending years in recruiting, I decided to take a job specializing in big data at [Greythorn][1]. I had been trying to learn the ropes for a few months leading up to [OSCON][2], but going to the conference sped that process up like crazy. There were so many brilliant people all in one place, and everyone was willing to share what they knew. It wasn't because they were trying to sell me anything, but because they were all so passionate about what they were working on. + +I soon realized that, in many ways, the open source and big data industry was less an industry and more of a community. That's why I now try to pay it forward and share what I've learned about open source with those who are just getting started in their careers. + +### Why employers want open source contributors + +Many clients tell me that although they want a candidate who has an exceptional technical mind, the ideal person should also really like this stuff. When you are passionate about something, you find yourself working on it even when you aren't getting paid. + +My clients often ask, "Do they code in their spare time?" "Can I find their work anywhere?" "What do they really enjoy?" Open source contributors are often at an advantage because they check these boxes, and not only are their projects out in the open—so is the evidence of their coding proficiency. + +#### Why recruiters search for open source contributors + +Solid tech recruiters understand the technologies and roles they're recruiting for, and they're going to assess your skills accordingly. But I'll admit that many of us have found that the best candidates we've come across have a tendency to be involved in open source, so we often just start our search there. Recruiters provide value to clients when they find candidates who are motivated to work on a team to create something awesome, because that's basically the description of a top-performing employee. + +It makes sense to me: When you take really smart people and give them the chance to be collaborative—for the sake of making something that works really well or may change the landscape of our everyday lives—it creates an energy that can be addictive. + +### What open source contributors can do to build a happy career + +There are obvious things you can do to leverage your open source work to build your career: Put your code on GitHub, participate in projects, go to conferences and join panels and workshops, etc. These are worthwhile, but more than anything you need to know what will make you happy in your work. + +Ask yourself questions like... + +* **Is it important to work for a company that gives back to the open source and software community?** I find that some of my best candidates insist on this, and it makes a huge difference in their job satisfaction. +* **Do you want to work for a company that is based on open source?** The culture is often different in these environments, and it helps to know if that's where you think you'll fit best. +* **Are there people you'd specifically like to work with?** Although you can always try to join the same projects, the odds of collaborating with and learning from someone you admire are better if your day jobs align at the same company. + +Once you know your own career priorities, it's easier to filter out the jobs that won't move you closer to your goals—and if you're working with a recruiter, it helps them match you with the right employer and team. + +Although I don't contribute code, I'll always share what I've learned with those who are working on their career in open source. This community is made up of supportive and smart people, and I love that I've been able to be a small part of it. + + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/5/open-source-recruiters-perspective + +作者:[Lindsey Thorne][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lindsey-thorne +[1]: http://www.greythorn.com/ +[2]: http://conferences.oreilly.com/oscon From 724b0feea00843d611c45bed0283e326f105446f Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 16 May 2016 22:32:50 +0800 Subject: [PATCH 1400/1710] =?UTF-8?q?20160516-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r operating system of 21st century cars.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sources/talk/20160516 Linux will be the major operating system of 21st century cars.md diff --git a/sources/talk/20160516 Linux will be the major operating system of 21st century cars.md b/sources/talk/20160516 Linux will be the major operating system of 21st century cars.md new file mode 100644 index 0000000000..ec7a33aaa6 --- /dev/null +++ b/sources/talk/20160516 Linux will be the major operating system of 21st century cars.md @@ -0,0 +1,38 @@ +Linux will be the major operating system of 21st century cars +=============================================================== + +>Cars are more than engines and good looking bodies. They're also complex computing devices so, of course, Linux runs inside them. + +Linux doesn't just run your servers and, via Android, your phones. It also runs your cars. Of course, no one has ever bought a car for its operating system. But Linux is already powering the infotainment, heads-up display and connected car 4G and Wi-Fi systems for such major car manufacturers as Toyota, Nissan, and Jaguar Land Rover and [Linux is on its way to Ford][1], Mazda, Mitsubishi, and Subaru cars. + +![](http://zdnet4.cbsistatic.com/hub/i/2016/05/10/743f0c14-6458-4d1e-8723-d2d94d0d0e69/c297b7d52e27e97d8721d4cb46bb371b/agl-logo.jpg) +>All the Linux and open-source car software efforts have now been unified under the Automotive Grade Linux project. + +Software companies are also getting into this Internet of mobile things act. Movimento, Oracle, Qualcomm, Texas Instruments, UIEvolution and VeriSilicon have all [joined the Automotive Grade Linux (AGL)][2] project. The [AGL][3] is a collaborative open-source project devoted to creating a common, Linux-based software stack for the connected car. + +AGL has seen tremendous growth over the past year as demand for connected car technology and infotainment are rapidly increasing," said Dan Cauchy, the Linux Foundation's General Manager of Automotive, in a statement. + +Cauchy continued, "Our membership base is not only growing rapidly, but it is also diversifying across various business interests, from semiconductors and in-vehicle software to IoT and connected cloud services. This is a clear indication that the connected car revolution has broad implications across many industry verticals." + +These companies have joined after AGL's recent announcement of a new AGL Unified Code Base (UCB). This new Linux distribution is based on AGL and two other car open-source projects: [Tizen][4] and the [GENIVI Alliance][5]. UCB is a second-generation car Linux. It was built from the ground up to address automotive specific applications. It handles navigation, communications, safety, security and infotainment functionality, + +"The automotive industry needs a standard open operating system and framework to enable automakers and suppliers to quickly bring smartphone-like capabilities to the car," said Cauchy. "This new distribution integrates the best components from AGL, Tizen, GENIVI and related open-source code into a single AGL Unified Code Base, allowing car-makers to leverage a common platform for rapid innovation. The AGL UCB distribution will play a huge role in the adoption of Linux-based systems for all functions in the vehicle." + +He's right. Since its release in January 2016, four car companies and ten new software businesses have joined AGL. Esso, now Exxon, made the advertising slogan, "Put a tiger in your tank!" famous. I doubt that "Put a penguin under your hood" will ever become well-known, but that's exactly what's happening. Linux is well on its way to becoming the major operating system of 21st century cars. + +------------------------------------------------------------------------------ + +via: http://www.zdnet.com/article/the-linux-in-your-car-movement-gains-momentum/ + +作者:[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]: https://www.automotivelinux.org/news/announcement/2016/01/ford-mazda-mitsubishi-motors-and-subaru-join-linux-foundation-and +[2]: https://www.automotivelinux.org/news/announcement/2016/05/oracle-qualcomm-innovation-center-texas-instruments-and-others-support +[3]: https://www.automotivelinux.org/ +[4]: https://www.tizen.org/ +[5]: http://www.genivi.org/ From b6f9b754b58382c48b4a0caaf783254f54d8e759 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 16 May 2016 22:43:03 +0800 Subject: [PATCH 1401/1710] =?UTF-8?q?20160516-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20160512 Bitmap in Linux Kernel.md | 397 ++++++++++++++++++ 1 file changed, 397 insertions(+) create mode 100644 sources/tech/20160512 Bitmap in Linux Kernel.md diff --git a/sources/tech/20160512 Bitmap in Linux Kernel.md b/sources/tech/20160512 Bitmap in Linux Kernel.md new file mode 100644 index 0000000000..b7e832ba0a --- /dev/null +++ b/sources/tech/20160512 Bitmap in Linux Kernel.md @@ -0,0 +1,397 @@ +Data Structures in the Linux Kernel +================================================================================ + +Bit arrays and bit operations in the Linux kernel +-------------------------------------------------------------------------------- + +Besides different [linked](https://en.wikipedia.org/wiki/Linked_data_structure) and [tree](https://en.wikipedia.org/wiki/Tree_%28data_structure%29) based data structures, the Linux kernel provides [API](https://en.wikipedia.org/wiki/Application_programming_interface) for [bit arrays](https://en.wikipedia.org/wiki/Bit_array) or `bitmap`. Bit arrays are heavily used in the Linux kernel and following source code files contain common `API` for work with such structures: + +* [lib/bitmap.c](https://github.com/torvalds/linux/blob/master/lib/bitmap.c) +* [include/linux/bitmap.h](https://github.com/torvalds/linux/blob/master/include/linux/bitmap.h) + +Besides these two files, there is also architecture-specific header file which provides optimized bit operations for certain architecture. We consider [x86_64](https://en.wikipedia.org/wiki/X86-64) architecture, so in our case it will be: + +* [arch/x86/include/asm/bitops.h](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) + +header file. As I just wrote above, the `bitmap` is heavily used in the Linux kernel. For example a `bit array` is used to store set of online/offline processors for systems which support [hot-plug](https://www.kernel.org/doc/Documentation/cpu-hotplug.txt) cpu (more about this you can read in the [cpumasks](https://0xax.gitbooks.io/linux-insides/content/Concepts/cpumask.html) part), a `bit array` stores set of allocated [irqs](https://en.wikipedia.org/wiki/Interrupt_request_%28PC_architecture%29) during initialization of the Linux kernel and etc. + +So, the main goal of this part is to see how `bit arrays` are implemented in the Linux kernel. Let's start. + +Declaration of bit array +================================================================================ + +Before we will look on `API` for bitmaps manipulation, we must know how to declare it in the Linux kernel. There are two common method to declare own bit array. The first simple way to declare a bit array is to array of `unsigned long`. For example: + +```C +unsigned long my_bitmap[8] +``` + +The second way is to use the `DECLARE_BITMAP` macro which is defined in the [include/linux/types.h](https://github.com/torvalds/linux/blob/master/include/linux/types.h) header file: + +```C +#define DECLARE_BITMAP(name,bits) \ + unsigned long name[BITS_TO_LONGS(bits)] +``` + +We can see that `DECLARE_BITMAP` macro takes two parameters: + +* `name` - name of bitmap; +* `bits` - amount of bits in bitmap; + +and just expands to the definition of `unsigned long` array with `BITS_TO_LONGS(bits)` elements, where the `BITS_TO_LONGS` macro converts a given number of bits to number of `longs` or in other words it calculates how many `8` byte elements in `bits`: + +```C +#define BITS_PER_BYTE 8 +#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) +#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) +``` + +So, for example `DECLARE_BITMAP(my_bitmap, 64)` will produce: + +```python +>>> (((64) + (64) - 1) / (64)) +1 +``` + +and: + +```C +unsigned long my_bitmap[1]; +``` + +After we are able to declare a bit array, we can start to use it. + +Architecture-specific bit operations +================================================================================ + +We already saw above a couple of source code and header files which provide [API](https://en.wikipedia.org/wiki/Application_programming_interface) for manipulation of bit arrays. The most important and widely used API of bit arrays is architecture-specific and located as we already know in the [arch/x86/include/asm/bitops.h](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) header file. + +First of all let's look at the two most important functions: + +* `set_bit`; +* `clear_bit`. + +I think that there is no need to explain what these function do. This is already must be clear from their name. Let's look on their implementation. If you will look into the [arch/x86/include/asm/bitops.h](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) header file, you will note that each of these functions represented by two variants: [atomic](https://en.wikipedia.org/wiki/Linearizability) and not. Before we will start to dive into implementations of these functions, first of all we must to know a little about `atomic` operations. + +In simple words atomic operations guarantees that two or more operations will not be performed on the same data concurrently. The `x86` architecture provides a set of atomic instructions, for example [xchg](http://x86.renejeschke.de/html/file_module_x86_id_328.html) instruction, [cmpxchg](http://x86.renejeschke.de/html/file_module_x86_id_41.html) instruction and etc. Besides atomic instructions, some of non-atomic instructions can be made atomic with the help of the [lock](http://x86.renejeschke.de/html/file_module_x86_id_159.html) instruction. It is enough to know about atomic operations for now, so we can begin to consider implementation of `set_bit` and `clear_bit` functions. + +First of all, let's start to consider `non-atomic` variants of this function. Names of non-atomic `set_bit` and `clear_bit` starts from double underscore. As we already know, all of these functions are defined in the [arch/x86/include/asm/bitops.h](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) header file and the first function is `__set_bit`: + +```C +static inline void __set_bit(long nr, volatile unsigned long *addr) +{ + asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory"); +} +``` + +As we can see it takes two arguments: + +* `nr` - number of bit in a bit array. +* `addr` - address of a bit array where we need to set bit. + +Note that the `addr` parameter is defined with `volatile` keyword which tells to compiler that value maybe changed by the given address. The implementation of the `__set_bit` is pretty easy. As we can see, it just contains one line of [inline assembler](https://en.wikipedia.org/wiki/Inline_assembler) code. In our case we are using the [bts](http://x86.renejeschke.de/html/file_module_x86_id_25.html) instruction which selects a bit which is specified with the first operand (`nr` in our case) from the bit array, stores the value of the selected bit in the [CF](https://en.wikipedia.org/wiki/FLAGS_register) flags register and set this bit. + +Note that we can see usage of the `nr`, but there is `addr` here. You already might guess that the secret is in `ADDR`. The `ADDR` is the macro which is defined in the same header code file and expands to the string which contains value of the given address and `+m` constraint: + +```C +#define ADDR BITOP_ADDR(addr) +#define BITOP_ADDR(x) "+m" (*(volatile long *) (x)) +``` + +Besides the `+m`, we can see other constraints in the `__set_bit` function. Let's look on they and try to understand what do they mean: + +* `+m` - represents memory operand where `+` tells that the given operand will be input and output operand; +* `I` - represents integer constant; +* `r` - represents register operand + +Besides these constraint, we also can see - the `memory` keyword which tells compiler that this code will change value in memory. That's all. Now let's look at the same function but at `atomic` variant. It looks more complex that its `non-atomic` variant: + +```C +static __always_inline void +set_bit(long nr, volatile unsigned long *addr) +{ + if (IS_IMMEDIATE(nr)) { + asm volatile(LOCK_PREFIX "orb %1,%0" + : CONST_MASK_ADDR(nr, addr) + : "iq" ((u8)CONST_MASK(nr)) + : "memory"); + } else { + asm volatile(LOCK_PREFIX "bts %1,%0" + : BITOP_ADDR(addr) : "Ir" (nr) : "memory"); + } +} +``` + +First of all note that this function takes the same set of parameters that `__set_bit`, but additionally marked with the `__always_inline` attribute. The `__always_inline` is macro which defined in the [include/linux/compiler-gcc.h](https://github.com/torvalds/linux/blob/master/include/linux/compiler-gcc.h) and just expands to the `always_inline` attribute: + +```C +#define __always_inline inline __attribute__((always_inline)) +``` + +which means that this function will be always inlined to reduce size of the Linux kernel image. Now let's try to understand implementation of the `set_bit` function. First of all we check a given number of bit at the beginning of the `set_bit` function. The `IS_IMMEDIATE` macro defined in the same [header](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) file and expands to the call of the builtin [gcc](https://en.wikipedia.org/wiki/GNU_Compiler_Collection) function: + +```C +#define IS_IMMEDIATE(nr) (__builtin_constant_p(nr)) +``` + +The `__builtin_constant_p` builtin function returns `1` if the given parameter is known to be constant at compile-time and returns `0` in other case. We no need to use slow `bts` instruction to set bit if the given number of bit is known in compile time constant. We can just apply [bitwise or](https://en.wikipedia.org/wiki/Bitwise_operation#OR) for byte from the give address which contains given bit and masked number of bits where high bit is `1` and other is zero. In other case if the given number of bit is not known constant at compile-time, we do the same as we did in the `__set_bit` function. The `CONST_MASK_ADDR` macro: + +```C +#define CONST_MASK_ADDR(nr, addr) BITOP_ADDR((void *)(addr) + ((nr)>>3)) +``` + +expands to the give address with offset to the byte which contains a given bit. For example we have address `0x1000` and the number of bit is `0x9`. So, as `0x9` is `one byte + one bit` our address with be `addr + 1`: + +```python +>>> hex(0x1000 + (0x9 >> 3)) +'0x1001' +``` + +The `CONST_MASK` macro represents our given number of bit as byte where high bit is `1` and other bits are `0`: + +```C +#define CONST_MASK(nr) (1 << ((nr) & 7)) +``` + +```python +>>> bin(1 << (0x9 & 7)) +'0b10' +``` + +In the end we just apply bitwise `or` for these values. So, for example if our address will be `0x4097` and we need to set `0x9` bit: + +```python +>>> bin(0x4097) +'0b100000010010111' +>>> bin((0x4097 >> 0x9) | (1 << (0x9 & 7))) +'0b100010' +``` + +the `ninth` bit will be set. + +Note that all of these operations are marked with `LOCK_PREFIX` which is expands to the [lock](http://x86.renejeschke.de/html/file_module_x86_id_159.html) instruction which guarantees atomicity of this operation. + +As we already know, besides the `set_bit` and `__set_bit` operations, the Linux kernel provides two inverse functions to clear bit in atomic and non-atomic context. They are `clear_bit` and `__clear_bit`. Both of these functions are defined in the same [header file](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) and takes the same set of arguments. But not only arguments are similar. Generally these functions are very similar on the `set_bit` and `__set_bit`. Let's look on the implementation of the non-atomic `__clear_bit` function: + +```C +static inline void __clear_bit(long nr, volatile unsigned long *addr) +{ + asm volatile("btr %1,%0" : ADDR : "Ir" (nr)); +} +``` + +Yes. As we see, it takes the same set of arguments and contains very similar block of inline assembler. It just uses the [btr](http://x86.renejeschke.de/html/file_module_x86_id_24.html) instruction instead of `bts`. As we can understand form the function's name, it clears a given bit by the given address. The `btr` instruction acts like `btr`. This instruction also selects a given bit which is specified in the first operand, stores its value in the `CF` flag register and clears this bit in the given bit array which is specifed with second operand. + +The atomic variant of the `__clear_bit` is `clear_bit`: + +```C +static __always_inline void +clear_bit(long nr, volatile unsigned long *addr) +{ + if (IS_IMMEDIATE(nr)) { + asm volatile(LOCK_PREFIX "andb %1,%0" + : CONST_MASK_ADDR(nr, addr) + : "iq" ((u8)~CONST_MASK(nr))); + } else { + asm volatile(LOCK_PREFIX "btr %1,%0" + : BITOP_ADDR(addr) + : "Ir" (nr)); + } +} +``` + +and as we can see it is very similar on `set_bit` and just contains two differences. The first difference it uses `btr` instruction to clear bit when the `set_bit` uses `bts` instruction to set bit. The second difference it uses negated mask and `and` instruction to clear bit in the given byte when the `set_bit` uses `or` instruction. + +That's all. Now we can set and clear bit in any bit array and and we can go to other operations on bitmasks. + +Most widely used operations on a bit arrays are set and clear bit in a bit array in the Linux kernel. But besides this operations it is useful to do additional operations on a bit array. Yet another widely used operation in the Linux kernel - is to know is a given bit set or not in a bit array. We can achieve this with the help of the `test_bit` macro. This macro is defined in the [arch/x86/include/asm/bitops.h](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) header file and expands to the call of the `constant_test_bit` or `variable_test_bit` depends on bit number: + +```C +#define test_bit(nr, addr) \ + (__builtin_constant_p((nr)) \ + ? constant_test_bit((nr), (addr)) \ + : variable_test_bit((nr), (addr))) +``` + +So, if the `nr` is known in compile time constant, the `test_bit` will be expanded to the call of the `constant_test_bit` function or `variable_test_bit` in other case. Now let's look at implementations of these functions. Let's start from the `variable_test_bit`: + +```C +static inline int variable_test_bit(long nr, volatile const unsigned long *addr) +{ + int oldbit; + + asm volatile("bt %2,%1\n\t" + "sbb %0,%0" + : "=r" (oldbit) + : "m" (*(unsigned long *)addr), "Ir" (nr)); + + return oldbit; +} +``` + +The `variable_test_bit` function takes similar set of arguments as `set_bit` and other function take. We also may see inline assembly code here which executes [bt](http://x86.renejeschke.de/html/file_module_x86_id_22.html) and [sbb](http://x86.renejeschke.de/html/file_module_x86_id_286.html) instruction. The `bt` or `bit test` instruction selects a given bit which is specified with first operand from the bit array which is specified with the second operand and stores its value in the [CF](https://en.wikipedia.org/wiki/FLAGS_register) bit of flags register. The second `sbb` instruction substracts first operand from second and subscrtact value of the `CF`. So, here write a value of a given bit number from a given bit array to the `CF` bit of flags register and execute `sbb` instruction which calculates: `00000000 - CF` and writes the result to the `oldbit`. + +The `constant_test_bit` function does the same as we saw in the `set_bit`: + +```C +static __always_inline int constant_test_bit(long nr, const volatile unsigned long *addr) +{ + return ((1UL << (nr & (BITS_PER_LONG-1))) & + (addr[nr >> _BITOPS_LONG_SHIFT])) != 0; +} +``` + +It generates a byte where high bit is `1` and other bits are `0` (as we saw in `CONST_MASK`) and applies bitwise [and](https://en.wikipedia.org/wiki/Bitwise_operation#AND) to the byte which contains a given bit number. + +The next widely used bit array related operation is to change bit in a bit array. The Linux kernel provides two helper for this: + +* `__change_bit`; +* `change_bit`. + +As you already can guess, these two variants are atomic and non-atomic as for example `set_bit` and `__set_bit`. For the start, let's look at the implementation of the `__change_bit` function: + +```C +static inline void __change_bit(long nr, volatile unsigned long *addr) +{ + asm volatile("btc %1,%0" : ADDR : "Ir" (nr)); +} +``` + +Pretty easy, is not it? The implementation of the `__change_bit` is the same as `__set_bit`, but instead of `bts` instruction, we are using [btc](http://x86.renejeschke.de/html/file_module_x86_id_23.html). This instruction selects a given bit from a given bit array, stores its value in the `CF` and changes its value by the applying of complement operation. So, a bit with value `1` will be `0` and vice versa: + +```python +>>> int(not 1) +0 +>>> int(not 0) +1 +``` + +The atomic version of the `__change_bit` is the `change_bit` function: + +```C +static inline void change_bit(long nr, volatile unsigned long *addr) +{ + if (IS_IMMEDIATE(nr)) { + asm volatile(LOCK_PREFIX "xorb %1,%0" + : CONST_MASK_ADDR(nr, addr) + : "iq" ((u8)CONST_MASK(nr))); + } else { + asm volatile(LOCK_PREFIX "btc %1,%0" + : BITOP_ADDR(addr) + : "Ir" (nr)); + } +} +``` + +It is similar on `set_bit` function, but also has two differences. The first difference is `xor` operation instead of `or` and the second is `bts` instead of `bts`. + +For this moment we know the most important architecture-specific operations with bit arrays. Time to look at generic bitmap API. + +Common bit operations +================================================================================ + +Besides the architecture-specific API from the [arch/x86/include/asm/bitops.h](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) header file, the Linux kernel provides common API for manipulation of bit arrays. As we know from the beginning of this part, we can find it in the [include/linux/bitmap.h](https://github.com/torvalds/linux/blob/master/include/linux/bitmap.h) header file and additionally in the * [lib/bitmap.c](https://github.com/torvalds/linux/blob/master/lib/bitmap.c) source code file. But before these source code files let's look into the [include/linux/bitops.h](https://github.com/torvalds/linux/blob/master/include/linux/bitops.h) header file which provides a set of useful macro. Let's look on some of they. + +First of all let's look at following four macros: + +* `for_each_set_bit` +* `for_each_set_bit_from` +* `for_each_clear_bit` +* `for_each_clear_bit_from` + +All of these macros provide iterator over certain set of bits in a bit array. The first macro iterates over bits which are set, the second does the same, but starts from a certain bits. The last two macros do the same, but iterates over clear bits. Let's look on implementation of the `for_each_set_bit` macro: + +```C +#define for_each_set_bit(bit, addr, size) \ + for ((bit) = find_first_bit((addr), (size)); \ + (bit) < (size); \ + (bit) = find_next_bit((addr), (size), (bit) + 1)) +``` + +As we may see it takes three arguments and expands to the loop from first set bit which is returned as result of the `find_first_bit` function and to the last bit number while it is less than given size. + +Besides these four macros, the [arch/x86/include/asm/bitops.h](https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/bitops.h) provides API for rotation of `64-bit` or `32-bit` values and etc. + +The next [header](https://github.com/torvalds/linux/blob/master/include/linux/bitmap.h) file which provides API for manipulation with a bit arrays. For example it provdes two functions: + +* `bitmap_zero`; +* `bitmap_fill`. + +To clear a bit array and fill it with `1`. Let's look on the implementation of the `bitmap_zero` function: + +```C +static inline void bitmap_zero(unsigned long *dst, unsigned int nbits) +{ + if (small_const_nbits(nbits)) + *dst = 0UL; + else { + unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); + memset(dst, 0, len); + } +} +``` + +First of all we can see the check for `nbits`. The `small_const_nbits` is macro which defined in the same header [file](https://github.com/torvalds/linux/blob/master/include/linux/bitmap.h) and looks: + +```C +#define small_const_nbits(nbits) \ + (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG) +``` + +As we may see it checks that `nbits` is known constant in compile time and `nbits` value does not overflow `BITS_PER_LONG` or `64`. If bits number does not overflow amount of bits in a `long` value we can just set to zero. In other case we need to calculate how many `long` values do we need to fill our bit array and fill it with [memset](http://man7.org/linux/man-pages/man3/memset.3.html). + +The implementation of the `bitmap_fill` function is similar on implementation of the `biramp_zero` function, except we fill a given bit array with `0xff` values or `0b11111111`: + +```C +static inline void bitmap_fill(unsigned long *dst, unsigned int nbits) +{ + unsigned int nlongs = BITS_TO_LONGS(nbits); + if (!small_const_nbits(nbits)) { + unsigned int len = (nlongs - 1) * sizeof(unsigned long); + memset(dst, 0xff, len); + } + dst[nlongs - 1] = BITMAP_LAST_WORD_MASK(nbits); +} +``` + +Besides the `bitmap_fill` and `bitmap_zero` functions, the [include/linux/bitmap.h](https://github.com/torvalds/linux/blob/master/include/linux/bitmap.h) header file provides `bitmap_copy` which is similar on the `bitmap_zero`, but just uses [memcpy](http://man7.org/linux/man-pages/man3/memcpy.3.html) instead of [memset](http://man7.org/linux/man-pages/man3/memset.3.html). Also it provides bitwise operations for bit array like `bitmap_and`, `bitmap_or`, `bitamp_xor` and etc. We will not consider implementation of these functions because it is easy to understand implementations of these functions if you understood all from this part. Anyway if you are interested how did these function implemented, you may open [include/linux/bitmap.h](https://github.com/torvalds/linux/blob/master/include/linux/bitmap.h) header file and start to research. + +That's all. + +Links +================================================================================ + +* [bitmap](https://en.wikipedia.org/wiki/Bit_array) +* [linked data structures](https://en.wikipedia.org/wiki/Linked_data_structure) +* [tree data structures](https://en.wikipedia.org/wiki/Tree_%28data_structure%29) +* [hot-plug](https://www.kernel.org/doc/Documentation/cpu-hotplug.txt) +* [cpumasks](https://0xax.gitbooks.io/linux-insides/content/Concepts/cpumask.html) +* [IRQs](https://en.wikipedia.org/wiki/Interrupt_request_%28PC_architecture%29) +* [API](https://en.wikipedia.org/wiki/Application_programming_interface) +* [atomic operations](https://en.wikipedia.org/wiki/Linearizability) +* [xchg instruction](http://x86.renejeschke.de/html/file_module_x86_id_328.html) +* [cmpxchg instruction](http://x86.renejeschke.de/html/file_module_x86_id_41.html) +* [lock instruction](http://x86.renejeschke.de/html/file_module_x86_id_159.html) +* [bts instruction](http://x86.renejeschke.de/html/file_module_x86_id_25.html) +* [btr instruction](http://x86.renejeschke.de/html/file_module_x86_id_24.html) +* [bt instruction](http://x86.renejeschke.de/html/file_module_x86_id_22.html) +* [sbb instruction](http://x86.renejeschke.de/html/file_module_x86_id_286.html) +* [btc instruction](http://x86.renejeschke.de/html/file_module_x86_id_23.html) +* [man memcpy](http://man7.org/linux/man-pages/man3/memcpy.3.html) +* [man memset](http://man7.org/linux/man-pages/man3/memset.3.html) +* [CF](https://en.wikipedia.org/wiki/FLAGS_register) +* [inline assembler](https://en.wikipedia.org/wiki/Inline_assembler) +* [gcc](https://en.wikipedia.org/wiki/GNU_Compiler_Collection) + + +------------------------------------------------------------------------------ + +via: https://github.com/0xAX/linux-insides/blob/master/DataStructures/bitmap.md + +作者:[0xAX][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twitter.com/0xAX From b4cfdcb0bf910cdf7a6c640363bf8fad411d1c46 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 17 May 2016 13:30:29 +0800 Subject: [PATCH 1402/1710] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=20?= =?UTF-8?q?=E2=80=9D5=20memory=20debuggers=20for=20Linux=20coding=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ew--5 memory debuggers for Linux coding.md | 113 +++++++++--------- 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md b/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md index 2335222ac8..424d91bba4 100644 --- a/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md +++ b/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md @@ -1,38 +1,38 @@ 点评:Linux编程中五款内存调试器 ================================================================================ ![](http://images.techhive.com/images/article/2015/11/penguinadmin-2400px-100627186-primary.idge.jpg) -Credit: [Moini][1] +>Credit: [Moini][1] -作为一个程序员,我知道我总在犯错误——事实是,怎么可能会不犯错的!程序员也是人啊。有的错误能在编码过程中及时发现,而有些却得等到软件测试才显露出来。然而,还有一类错误并不能在这两个时期被排除,从而导致软件不能正常运行,甚至是提前中止。 +作为一个程序员,我知道我肯定会犯错误——怎么可能不犯错!程序员也是人啊。有的错误能在编码过程中及时发现,而有些却得等到软件测试了才能显露出来。然而,还有一类错误并不能在这两个阶段被解决,这就导致软件不能正常运行,甚至是提前终止。 -想到了吗?我说的就是内存相关的错误。手动调试这些错误不仅耗时,而且很难发现并纠正。值得一提的是,这种错误非常常见,特别是在用 C/C++ 这类允许[手动管理内存][2]的语言编写的软件里。 +如果你还没猜出是那种错误,我说的就是和内存相关的错误。手动调试这些错误不仅耗时,而且很难发现并纠正。值得一提的是,这种错误很常见,特别是在用 C/C++ 这类允许[手动管理内存][2]的语言编写的软件里。 -幸运的是,现行有一些编程工具能够帮你找到软件程序中这些内存相关的错误。在这些工具集中,我评定了五款Linux可用的,流行、免费并且开源的内存调试器: Dmalloc 、 Electric Fence 、 Memcheck 、 Memwatch 以及 Mtrace 。在日常编码中,我已经把这五个调试器用了个遍,所以这些点评是建立在我的实际体验之上的。 +幸运的是,现行有一些编程工具能够帮你在软件程序中咋猴岛这些和内存相关的错误。在这些工具集中,我评估了五款 Linux 下可用的,流行、免费并且开源的内存调试器: Dmalloc 、 Electric Fence 、 Memcheck 、 Memwatch 以及 Mtrace 。在日常编码中,我已经用过这五个调试器了,所以这些评估是建立在我的实际体验之上的。 ### [Dmalloc][3] ### **开发者**:Gray Watson -**点评版本**:5.5.2 +**评估版本**:5.5.2 -**支持的 Linux**:所有种类 +**支持的 Linux 版本**:所有种类 -**许可**:知识共享署名-相同方式共享许可证 3.0 +**许可**: CC 3.0 -Dmalloc 是 Gray Watson 开发的一款内存调试工具。它实现成库,封装了标准内存管理函数如 *malloc() , calloc() , free()* 等,使程序员得以检测出有问题的代码。 +Dmalloc 是 Gray Watson 开发的一款内存调试工具。它是作为库来实现的,封装了标准内存管理函数如 *malloc() , calloc() , free()* 等,使程序员得以检测出有问题的代码。 ![cw dmalloc output](http://images.techhive.com/images/article/2015/11/cw_dmalloc-output-100627040-large.idge.png) Dmalloc -如同工具的网页所列,这个调试器提供的特性包括内存泄漏跟踪、[重复释放(double free)][4]错误跟踪、以及[越界写入(fence-post write)][5]检测。其它特性包括文件/行号报告、普通统计记录。 +如同工具的网页所示,这个调试器提供的特性包括内存泄漏跟踪、[重复释放内存(double free)][4]错误跟踪、以及[越界写入(fence-post write)][5]检测。其它特性包括报告错误的文件/行号、通用的数据统计记录。 #### 更新内容 #### -5.5.2 版本是一个 [bug 修复发行版][6],同时修复了构建和安装的问题。 +5.5.2 版本是一个 [bug 修正发行版][6],修复了几个有关构建和安装的问题。 #### 有何优点 #### -Dmalloc 最大的优点就是高度可配置性。比如说,你可以配置以支持 C++ 程序和多线程应用。 Dmalloc 还提供一个有用的功能:运行时可配置,这表示在 Dmalloc 执行时,可以轻易地使能或者禁能它提供的特性。 +Dmalloc 最大的优点就是高度可配置性。比如说,你可以配置以支持 C++ 程序和多线程应用。 Dmalloc 还提供一个有用的功能:运行时可配置,这表示在 Dmalloc 执行时,可以轻易地使能或者禁能它提供的一些特性。 你还可以配合 [GNU Project Debugger (GDB)][7]来使用 Dmalloc ,只需要将 *dmalloc.gdb* 文件(位于 Dmalloc 源码包中的 contrib 子目录里)的内容添加到你的主目录中的 *.gdbinit* 文件里即可。 @@ -42,7 +42,7 @@ Dmalloc 最大的优点就是高度可配置性。比如说,你可以配置以 跟 Mtrace 一样, Dmalloc 需要程序员改动他们的源代码。比如说你可以(必须的)添加头文件 *dmalloc.h* ,工具就能汇报产生问题的调用的文件或行号。这个功能非常有用,因为它节省了调试的时间。 -除此之外,还需要在编译你的程序时,把 Dmalloc 库(编译源码包时产生的)链接进去。 +除此之外,还需要在编译你的程序时,把 Dmalloc 库(编译 Dmalloc 源码包时产生的)链接进去。 然而,还有点更麻烦的事,需要设置一个环境变量,命名为 *DMALLOC_OPTION* ,以供工具在运行时配置内存调试特性,以及输出文件的路径。可以手动为该环境变量分配一个值,不过初学者可能会觉得这个过程有点困难,因为该值的一部分用来表示要启用的 Dmalloc 特性——表示为各自的十六进制值的累加。[这里][9]有详细介绍。 @@ -56,19 +56,18 @@ Dmalloc 真正的优势在于它的可配置选项。而且高度可移植,曾 **开发者**:Bruce Perens -**点评版本**:2.2.3 +**评估版本**:2.2.3 -**支持的 Linux**:所有种类 +**支持的 Linux 版本**:所有种类 -**许可**:GNU 通用公共许可证 (第二版) +**许可**:GPL v2 -Electric Fence 是 Bruce Perens 开发的一款内存调试工具,它以库的形式实现,你的程序需要链接它。Electric Fence 能检测出[栈][11]内存溢出和访问已经释放的内存。 +Electric Fence 是 Bruce Perens 开发的一款内存调试工具,它以库的形式实现,你的程序需要链接它。Electric Fence 能检测出[堆][11]内存溢出和访问已经释放的内存。 ![cw electric fence output](http://images.techhive.com/images/article/2015/11/cw_electric-fence-output-100627041-large.idge.png) Electric Fence -顾名思义, Electric Fence 在每个申请的缓存边界建立了 virtual fence(虚拟围栏),任何非法内存访问都会导致[段错误][12]。这个调试工具同时支持 C 和 C++ 程序。 - +顾名思义, Electric Fence 在每个申请的缓存边界建立了虚拟围栏,这样以来任何非法的内存访问都会导致[段错误][12]。这个调试工具同时支持 C 和 C++ 程序。 #### 更新内容 #### @@ -76,19 +75,19 @@ Electric Fence #### 有何优点 #### -我喜欢 Electric Fence 首要的一点是它(不同于 Memwatch 、 Dmalloc 和 Mtrace ,)不需要你的源码做任何的改动,你只需要在编译的时候把它的库链接进你的程序即可。 +我喜欢 Electric Fence 的首要一点是它不同于 Memwatch 、 Dmalloc 和 Mtrace ,不需要堆你的源码做任何的改动,你只需要在编译的时候把它的库链接进你的程序即可。 -其次, Electric Fence 的实现保证了导致越界访问( a bounds violation )的第一个指令就是引起段错误的原因。这比在后面再发现问题要好多了。 +其次, Electric Fence 的实现保证了产生越界访问的第一个指令就会引起段错误。这比在后面再发现问题要好多了。 不管是否有检测出错误, Electric Fence 都会在输出产生版权信息。这一点非常有用,由此可以确定你所运行的程序已经启用了 Electric Fence 。 #### 注意事项 #### -另一方面,我对 Electric Fence 真正念念不忘的是它检测内存泄漏的能力。内存泄漏是 C/C++ 软件最常见也是最难隐秘的问题之一。不过, Electric Fence 不能检测出堆内存溢出,而且也不是线程安全的。 +另一方面,我对 Electric Fence 真正念念不忘的是它检测内存泄漏的能力。内存泄漏是 C/C++ 软件最常见也是最不容易发现的问题之一。不过, Electric Fence 不能检测出栈溢出,而且也不是线程安全的。 由于 Electric Fence 会在用户分配内存区的前后分配禁止访问的虚拟内存页,如果你过多的进行动态内存分配,将会导致你的程序消耗大量的额外内存。 -Electric Fence 还有一个局限是不能明确指出错误代码所在的行号。它所能做只是在监测到内存相关错误时产生段错误。想要定位行号,需要借助 [The Gnu Project Debugger ( GDB )][14]这样的调试工具来调试启用了 Electric Fence 的程序。 +Electric Fence 还有一个局限是不能明确指出错误代码所在的行号。它所能做只是在检测到内存相关错误时产生段错误。想要定位错误的行号,需要借助 [GDB][14]这样的调试工具来调试启用了 Electric Fence 的程序。 最后一点,尽管 Electric Fence 能检测出大部分的缓冲区溢出,有一个例外是,如果所申请的缓冲区大小不是系统字长的倍数,这时候溢出(即使只有几个字节)就不能被检测出来。 @@ -101,50 +100,50 @@ Electric Fence 还有一个局限是不能明确指出错误代码所在的行 **开发者**:[Valgrind 开发团队][17] -**点评版本**:3.10.1 +**评估版本**:3.10.1 -**支持的 Linux**:所有种类 +**支持的 Linux 发行版**:所有种类 -**许可**:通用公共许可证 +**许可**:GPL -[Valgrind][18] 是一个提供好几款调试和 Linux 程序性能分析工具的套件。虽然 Valgrind 能和编写语言各不相同(有 Java 、 Perl 、 Python 、 Assembly code 、 ortran 、 Ada等等)的程序配合工作,但是它所提供的工具主要针对用 C/C++ 所编写的程序。 +[Valgrind][18] 是一个提供好几款调试和分析 Linux 程序性能的工具套件。虽然 Valgrind 能和不同语言——Java 、 Perl 、 Python 、 Assembly code 、 ortran 、 Ada 灯——编写的程序一起工作,但是它主要还针对使用 C/C++ 所编写的程序。 -Memcheck ,一款内存错误检测器,是其中最受欢迎的工具。它能够检测出如内存泄漏、无效的内存访问、未定义变量的使用以及栈内存分配和释放相关的问题等诸多问题。 +Memcheck ,一款内存错误检测器,是其中最受欢迎的工具。它能够检测出如内存泄漏、无效的内存访问、未定义变量的使用以及堆内存分配和释放相关的问题等诸多问题。 #### 更新内容 #### -工具套件( 3.10.1 )的[发行版][19]是一个副版本,主要修复了 3.10.0 版本发现的 bug 。除此之外,从主版本向后移植(标音: backport )一些包,修复了缺失的 AArch64 ARMv8 指令和系统调用。 +[工具套件( 3.10.1 )][19]主要修复了 3.10.0 版本发现的 bug 。除此之外,从主版本向后移植一些包,修复了缺失的 AArch64 ARMv8 指令和系统调用。 -#### 有何优点 #### +#### 有何优点 #### -同其它所有 Valgrind 工具一样, Memcheck 也是命令行实用程序。它的操作非常简单:通常我们会使用诸如 prog arg1 arg2 格式的命令来运行程序,而 Memcheck 只要求你多加几个值即可,如 valgrind --leak-check=full prog arg1 arg2 。 +同其它所有 Valgrind 工具一样, Memcheck 也是命令行程序。它的操作非常简单:通常我们会使用诸如 `prog arg1 arg2` 格式的命令来运行程序,而 Memcheck 只要求你多加几个值即可,如 `valgrind --leak-check=full prog arg1 arg2` 。 ![cw memcheck output](http://images.techhive.com/images/article/2015/11/cw_memcheck-output-100627037-large.idge.png) Memcheck -(注意:因为 Memcheck 是 Valgrind 的默认工具所以无需提及 Memcheck。但是,需要在编译程序之初带上 -g 参数选项,这一步会添加调试信息,使得 Memcheck 的错误信息会包含正确的行号。) +(注意:因为 Memcheck 是 Valgrind 的默认工具所以在命令行执行命令时无需提及 Memcheck。但是,需要在编译程序之初带上 `-g` 参数选项,这一步会添加调试信息,使得 Memcheck 的错误信息会包含正确的行号。) 我真正倾心于 Memcheck 的是它提供了很多命令行选项(如上所述的 *--leak-check* 选项),如此不仅能控制工具运转还可以控制它的输出。 举个例子,可以开启 *--track-origins* 选项,以查看程序源码中未初始化的数据;可以开启 *--show-mismatched-frees* 选项让 Memcheck 匹配内存的分配和释放技术。对于 C 语言所写的代码, Memcheck 会确保只能使用 *free()* 函数来释放内存, *malloc()* 函数来申请内存。而对 C++ 所写的源码, Memcheck 会检查是否使用了 *delete* 或 *delete[]* 操作符来释放内存,以及 *new* 或者*new[]* 来申请内存。 -Memcheck 最好的特点,尤其是对于初学者来说,是它会给用户建议使用哪个命令行选项能让输出更加有意义。比如说,如果你不使用基本的 *--leak-check* 选项, Memcheck 会在输出时建议“使用 --leak-check=full 重新运行以查看更多泄漏内存细节”。如果程序有未初始化的变量, Memcheck 会产生信息“使用 --track-origins=yes 以查看未初始化变量的定位”。 +Memcheck 最好的特点,尤其是对于初学者来说,是它会给用户建议使用哪个命令行选项能让输出更加有意义。比如说,如果你不使用基本的 *--leak-check* 选项, Memcheck 会在输出时给出建议:“使用 --leak-check=full 重新运行以查看更多泄漏内存细节”。如果程序有未初始化的变量, Memcheck 会产生信息:“使用 --track-origins=yes 以查看未初始化变量的定位”。 -Memcheck 另外一个有用的特性是它可以[创建抑制文件( suppression files )][20],由此可以忽略特定不能修正的错误,这样 Memcheck 运行时就不会每次都报警了。值得一提的是, Memcheck 会去读取默认抑制文件来忽略系统库(比如 C 库)中的报错,这些错误在系统创建之前就已经存在了。可以选择创建一个新的抑制文件,或是编辑现有的文件(通常是*/usr/lib/valgrind/default.supp*)。 +Memcheck 另外一个有用的特性是它可以[创建抑制文件( suppression files )][20],由此可以略过特定的不能修正的错误,这样 Memcheck 运行时就不会每次都报警了。值得一提的是, Memcheck 会去读取默认抑制文件来忽略系统库(比如 C 库)中的报错,这些错误在系统创建之前就已经存在了。可以选择创建一个新的抑制文件,或是编辑现有的文件(通常是*/usr/lib/valgrind/default.supp*)。 Memcheck 还有高级功能,比如可以使用[定制内存分配器][22]来[检测内存错误][21]。除此之外, Memcheck 提供[监控命令][23],当用到 Valgrind 内置的 gdbserver ,以及[客户端请求][24]机制(不仅能把程序的行为告知 Memcheck ,还可以进行查询)时可以使用。 #### 注意事项 #### -毫无疑问, Memcheck 可以节省很多调试时间以及省去很多麻烦。但是它使用了很多内存,导致程序执行变慢([由文档可知][25],大概花上 20 至 30 倍时间)。 +毫无疑问, Memcheck 可以节省很多调试时间以及省去很多麻烦。但是它使用了很多内存,导致程序执行变慢([由文档可知][25],大概会花费 20 至 30 倍时间)。 -除此之外, Memcheck 还有其它局限。根据用户评论, Memcheck 明显不是[线程安全][26]的;它不能检测出 [静态缓冲区溢出][27];还有就是,一些 Linux 程序如 [GNU Emacs][28] 目前还不能使用 Memcheck 。 +除此之外, Memcheck 还有其它局限。根据用户评论, Memcheck 很明显不是[线程安全][26]的;它不能检测出 [静态缓冲区溢出][27];还有就是,一些 Linux 程序如 [GNU Emacs][28] 目前还不能配合 Memcheck 工作。 -如果有兴趣,可以在[这里][29]查看 Valgrind 详尽的局限性说明。 +如果有兴趣,可以在[这里][29]查看 Valgrind 局限性的详细说明。 #### 总结 #### -无论是对于初学者还是那些需要高级特性的人来说, Memcheck 都是一款便捷的内存调试工具。如果你仅需要基本调试和错误核查, Memcheck 会非常容易上手。而当你想要使用像抑制文件或者监控指令这样的特性,就需要花一些功夫学习了。 +无论是对于初学者还是那些需要高级特性的人来说, Memcheck 都是一款便捷的内存调试工具。如果你仅需要基本调试和错误检查, Memcheck 会非常容易上手。而当你想要使用像抑制文件或者监控指令这样的特性,就需要花一些功夫学习了。 虽然罗列了大量的局限性,但是 Valgrind(包括 Memcheck )在它的网站上声称全球有[成千上万程序员][30]使用了此工具。开发团队称收到来自超过 30 个国家的用户反馈,而这些用户的工程代码有的高达 2.5 千万行。 @@ -152,13 +151,13 @@ Memcheck 还有高级功能,比如可以使用[定制内存分配器][22]来[ **开发者**:Johan Lindh -**点评版本**:2.71 +**评估版本**:2.71 -**支持的 Linux**:所有种类 +**支持的 Linux 发行版**:所有种类 -**许可**:GNU通用公共许可证 +**许可**:GNU GPL -Memwatch 是由 Johan Lindh 开发的内存调试工具,虽然它主要扮演内存泄漏检测器的角色,但是(根据网页介绍)它也具有检测其它如[重复释放跟踪和内存错误释放][32]、缓冲区溢出和下溢、[野指针][33]写入等等内存相关问题的能力。 +Memwatch 是由 Johan Lindh 开发的内存调试工具,虽然它扮演的主要角色是内存泄漏检测器,但是(根据网页介绍)它也具有检测其它如[内存重复释放和错误释放][32]、缓冲区溢出和下溢、[野指针][33]写入等等内存相关问题的能力。 Memwatch 支持用 C 语言所编写的程序。也可以在 C++ 程序中使用它,但是这种做法并不提倡(由 Memwatch 源码包随附的 Q&A 文件中可知)。 @@ -173,7 +172,7 @@ Memwatch 支持用 C 语言所编写的程序。也可以在 C++ 程序中使用 ![cw memwatch output](http://images.techhive.com/images/article/2015/11/cw_memwatch_output-100627038-large.idge.png) Memwatch -不同于 Mtrace , Memwatch 的输出产生的日志文件(通常是 *memwatch.log* )是人类可阅读格式。而且, Memwatch 每次运行时总会拼接内存调试输出到文件末尾。如此便可在需要之时,轻松查看之前的输出信息。 +不同于 Mtrace , Memwatch 产生的日志文件(通常是 *memwatch.log* )是人类可阅读的格式。而且, Memwatch 每次运行时总会把内存调试结果拼接到输出文件的末尾。如此便可在需要之时轻松查看之前的输出信息。 同样值得一提的是当你执行了启用 Memwatch 的程序, Memwatch 会在[标准输出][34]中产生一个单行输出,告知发现了错误,然后你可以在日志文件中查看输出细节。如果没有产生错误信息,就可以确保日志文件不会写入任何错误,多次运行的话确实能节省时间。 @@ -183,7 +182,7 @@ Memwatch 跟 Mtrace 和 Dmalloc 一样, Memwatch 也需要你往你的源文件里增加代码:你需要把 *memwatch.h* 这个头文件包含进你的代码。而且,编译程序的时候,你需要连同 *memwatch.c* 一块编译;或者你可以把已经编译好的目标模块包含起来,然后在命令行定义 *MEMWATCH* 和 *MW_STDIO* 变量。不用说,想要在输出中定位行号, -g 编译器选项也少不了。 -此外, Memwatch 缺少一些特性。比如 Memwatch 不能检测出往一块已经被释放的内存写入操作,或是在分配的内存块之外的读取操作。而且, Memwatch 也不是线程安全的。还有一点,正如我在开始时指出,在 C++ 程序上运行 Memwatch 的结果是不能预料的。 +此外, Memwatch 缺少一些特性。比如 Memwatch 不能检测出对一块已经被释放的内存进行写入操作,或是在分配的内存块之外的进行读取操作。而且, Memwatch 也不是线程安全的。还有一点,正如我在开始时指出,在 C++ 程序上运行 Memwatch 的结果是不能预料的。 #### 总结 #### @@ -191,20 +190,20 @@ Memcheck 可以检测很多内存相关的问题,在处理 C 程序时是非 ### [Mtrace][35] ### -**开发者**: Roland McGrath and Ulrich Drepper +**开发者**: Roland McGrath 和 Ulrich Drepper -**点评版本**: 2.21 +**评估版本**: 2.21 -**支持的 Linux**:所有种类 +**支持的 Linux 发行版**:所有种类 -**许可**:GNU 通用公共许可证 +**许可**:GNU GPL -Mtrace 是 [GNU C 库][36]中的一款内存调试工具,同时支持 Linux 上的 C 和 C++ 程序,检测由 *malloc()* 和 *free()* 函数的不对等调用所引起的内存泄漏问题。 +Mtrace 是 [GNU C 库][36]中的一款内存调试工具,同时支持 Linux 上的 C 和 C++ 程序,可以检测由函数 *malloc()* 和 *free()* 不匹配的调用所引起的内存泄漏问题。 ![cw mtrace output](http://images.techhive.com/images/article/2015/11/cw_mtrace-output-100627039-large.idge.png) Mtrace -Mtrace 实现为对 *mtrace()* 函数的调用,跟踪程序中所有 malloc/free 调用,并在用户指定的文件中记录相关信息。文件以一种机器可读的格式记录数据,所以有一个 Perl 脚本(同样命名为 mtrace )用来把文件转换并展示为人类可读格式。 +Mtrace 的实现实际上是 *mtrace()* 函数,它可以跟踪程序中所有 malloc/free 调用,并在用户指定的文件中记录相关信息。文件以一种机器可读的格式记录数据,所以有一个 Perl 脚本——同样命名为 mtrace ——用来把文件转换并为人类可读格式。 #### 更新内容 #### @@ -212,21 +211,21 @@ Mtrace 实现为对 *mtrace()* 函数的调用,跟踪程序中所有 malloc/fr #### 有何优点 #### -Mtrace 最优秀的特点是非常简单易学。你只需要了解在你的源码中如何以及何处添加mtrace()及其对立的muntrace()函数,还有如何使用Mtrace的Perl脚本。后者非常简单,只需要运行指令 *mtrace *(例子见开头截图最后一条指令)。 +Mtrace 最好的地方是它非常简单易学。你只需要了解在你的源码中如何以及何处添加 mtrace() 及对应的 muntrace() 函数,还有如何使用 Mtrace 的 Perl 脚本。后者非常简单,只需要运行指令 *mtrace *(例子见开头截图最后一条指令)。 -Mtrace 另外一个优点是它的可收缩性,体现在,不仅可以使用它来调试完整的程序,还可以使用它来检测程序中独立模块的内存泄漏。只需在每个模块里调用 *mtrace()* 和 *muntrace()* 即可。 +Mtrace 另外一个优点是它的可收缩性,这体现在不仅可以使用它来调试完整的程序,还可以使用它来检测程序中独立模块的内存泄漏。只需在每个模块里调用 *mtrace()* 和 *muntrace()* 即可。 -最后一点,因为 Mtrace 会在 *mtace()*(在源码中添加的函数)执行时被触发,因此可以很灵活地[使用信号][39]动态地(在程序执行周期内)使能 Mtrace 。 +最后一点,因为 Mtrace 会在 *mtrace()*——在源码中添加的函数——执行时被触发,因此可以很灵活地[使用信号][39]动态地(在程序执行时)使能 Mtrace 。 #### 注意事项 #### -因为 *mtrace()* 和 *mauntrace()* 函数(声明在 *mcheck.h* 文件中,所以必须在源码中包含此头文件)的调用是 Mtrace 运行( *mauntrace()* 函数并非[总是必要][40])的根本,因此 Mtrace 要求程序员至少改动源码一次。 +因为 *mtrace()* 和 *mauntrace()* 函数 —— 声明在 *mcheck.h* 文件中,所以必须在源码中包含此头文件 —— 的调用是 Mtrace 工作的基础运行( *mauntrace()* 函数并非[总是必要][40]),因此 Mtrace 要求程序员至少改动源码一次。 -需要注意的是,在编译程序的时候带上 -g 选项( [GCC][41] 和 [G++][42] 编译器均有提供),才能使调试工具在输出展示正确的行号。除此之外,有些程序(取决于源码体积有多大)可能会花很长时间进行编译。最后,带 -g 选项编译会增加了可执行文件的内存(因为提供了额外的调试信息),因此记得程序需要在测试结束后,不带 -g 选项重新进行编译。 +需要注意的是,在编译程序的时候带上 -g 选项( [GCC][41] 和 [G++][42] 编译器均有提供),才能使调试工具在输出结果时展示正确的行号。除此之外,有些程序(取决于源码体积有多大)可能会花很长时间进行编译。最后,带 -g 选项编译会增加了可执行文件的大小(因为提供了额外的调试信息),因此记得程序需要在测试结束后,不带 -g 选项重新进行编译。 -使用 Mtrace ,你需要掌握 Linux 环境变量的基本知识,因为在程序执行之前,需要把用户指定的文件( *mtrace()* 函数将会记录全部信息到其中)路径设置为环境变量 *MALLOC_TRACE* 的值。 +使用 Mtrace ,你需要掌握 Linux 环境变量的基本知识,因为在程序执行之前,需要把用户把环境变量 *MALLOC_TRACE* 的值设为指定的文件( *mtrace()* 函数将会记录全部信息到其中)路径。 -Mtrace 在检测内存泄漏和尝试释放未经过分配的内存方面存在局限。它不能检测其它内存相关问题如非法内存访问、使用未初始化内存。而且,[有人抱怨][43] Mtrace 不是[线程安全][44]的。 +Mtrace 在检测内存泄漏和试图释放未经过分配的内存方面存在局限。它不能检测其它内存相关问题如非法内存访问、使用未初始化内存。而且,[有人抱怨][43] Mtrace 不是[线程安全][44]的。 ### 总结 ### @@ -248,7 +247,7 @@ via: http://www.computerworld.com/article/3003957/linux/review-5-memory-debugger 作者:[Himanshu Arora][a] 译者:[soooogreen](https://github.com/soooogreen) -校对:[PurlingNayuki](https://github.com/PurlingNayuki) +校对:[PurlingNayuki](https://github.com/PurlingNayuki),[ezio](https://github.com/oska874) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a852300d1755bcbb6dd8a6de65cad62d3e36d683 Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 17 May 2016 22:51:09 +0800 Subject: [PATCH 1403/1710] Update and rename sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md to translated/talk/my-open-source-story/20160429 Why and how I became a software engineer.md --- ...hy and how I became a software engineer.md | 103 ------------------ ...hy and how I became a software engineer.md | 101 +++++++++++++++++ 2 files changed, 101 insertions(+), 103 deletions(-) delete mode 100644 sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md create mode 100644 translated/talk/my-open-source-story/20160429 Why and how I became a software engineer.md diff --git a/sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md b/sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md deleted file mode 100644 index 0fb8b3d549..0000000000 --- a/sources/talk/my-open-source-story/20160429 Why and how I became a software engineer.md +++ /dev/null @@ -1,103 +0,0 @@ -translating by martin2011qi - -Why and how I became a software engineer -========================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) - -The year was 1989. The city was Kampala, Uganda. - -In their infinite wisdom, my parents decided that instead of all the troublemaking I was getting into at home, they would send me off to my uncle's office to learn how to use a computer. A few days later, I found myself on the 21st floor in a cramped room with six or seven other teens and a brand new computer on a desk perpendicular to the teacher's desk. It was made abundantly clear that we were not skilled enough to touch it. After three frustrating weeks of writing and perfecting DOS commands, the magic moment happened. It was my turn to type **copy doc.txt d:**. - -The alien scratching noises that etched a simple text file onto the five-inch floppy sounded like beautiful music. For a while, that floppy disk was my most prized possession. I copied everything I could onto it. However, in 1989, Ugandans tended to take life pretty seriously, and messing around with computers, copying files, and formatting disks did not count as serious. I had to focus on my education, which led me away from computer science and into architectural engineering. - -Like any young person of my generation, a multitude of job titles and skills acquisition filled the years in between. I taught kindergarten, taught adults how to use software, worked in a clothing store, and served as a paid usher in a church. While I earned my degree at the University of Kansas, I worked as a tech assistant to the technical administrator, which is really just a fancy title for someone who messes around with the student database. - -By the time I graduated in 2007, technology had become inescapable. Every aspect of architectural engineering was deeply intertwined with computer science, so we all inadvertently learned simple programming skills. For me, that part was always more fascinating. But because I had to be a serious engineer, I developed a secret hobby: writing science fiction. - -In my stories, I lived vicariously through the lives of my heroines. They were scientists with amazing programming skills who were always getting embroiled in adventures and fighting tech scallywags with technology they invented, sometimes inventing them on the spot. Sometimes the new tech I came up with was based on real-world inventions. Other times it was the stuff I read about or saw in the science fiction I consumed. This meant that I had to understand how the tech worked and my research led me to some interesting subreddits and e-zines. - -### Open source: The ultimate goldmine - -Throughout my experiences, the fascinating weeks I'd spent writing out DOS commands remained a prominent influence, bleeding into little side projects and occupying valuable study time. As soon as Geocities became available to all Yahoo! Users, I created a website where I published blurry pictures that I'd taken on a tiny digital camera. I created websites for free, helped friends and family fix issues they had with their computers, and created a library database for a church. - -This meant that I was always researching and trying to find more information about how things could be made better. The Internet gods blessed me and open source fell into my lap. Suddenly, 30-day trials and restrictive licenses became a ghost of computing past. I could continue to create using GIMP, Inkscape, and OpenOffice. - -### Time to get serious - -I was fortunate to have a business partner who saw the magic in my stories. She too is a dreamer and visionary who imagines a better connected world that functions efficiently and conveniently. Together, we came up with several solutions to pain points we experienced in the journey to success, but implementation had been a problem. We both lacked the skills to make our products come to life, something that was made evident every time we approached investors with our ideas. - -We needed to learn to program. So, at the end of the summer in 2015, we embarked on a journey that would lead us right to the front steps of Holberton School, a community-driven, project-based school in San Francisco. - -My business partner came to me one morning and started a conversation the way she does when she has a new crazy idea that I'm about to get sucked into. - -**Zee**: Gloria, I'm going to tell you something and I want you to listen first before you say no. - -**Me**: No. - -**Zee**: We're going to be applying to go to a school for full-stack engineers. - -**Me**: What? - -**Zee**: Here, look! We're going to learn how to program by applying to this school. - -**Me**: I don't understand. We're doing online courses in Python and... - -**Zee**: This is different. Trust me. - -**Me**: What about the... - -**Zee**: That's not trusting me. - -**Me**: Fine. Show me. - -### Removing the bias - -What I read sounded similar to something we had seen online. It was too good to be true, but we decided to give it a try, jump in with both feet, and see what would come out of it. - -To become students, we had to go through a four-step selection process based solely on talent and motivation, not on the basis of educational degree or programming experience. The selection process is the beginning of the curriculum, so we started learning and collaborating through it. - -It has been my experience—and that of my business partner—that the process of applying for anything was an utter bore compared to the application process Holberton School created. It was like a game. If you completed a challenge, you got to go to the next level, where another fascinating challenge awaited. We created Twitter accounts, blogged on Medium, learned HTML and CSS in order to create a website, and created a vibrant community online even before we knew who was going to get to go. - -The most striking thing about the online community was how varied our experience with computers was, and how our background and gender did not factor into the choices that were being made by the founders (who we secretly called "The Trinity"). We just enjoyed being together and talking to each other. We were all smart people on a journey to increasing our nerd cred by learning how to code. - -For much of the application process, our identities were not very evident. For example, my business partner's name does not indicate her gender or race. It was during the final step, a video chat, that The Trinity even knew she was a woman of color. Thus far, only her enthusiasm and talent had propelled her through the levels. The color of her skin and her gender did not hinder nor help her. How cool is that? - -The night we got our acceptance letters, we knew our lives were about to change in ways we had only dreamt of. On the 22nd of January 2016, we walked into 98 Battery Street to meet our fellow [Hippokampoiers][2] for the first time. It was evident then, as it had been before, that the Trinity had started something amazing. They had assembled a truly diverse collection of passionate and enthusiastic people who had dedicated themselves to become full-stack engineers. - -The school is an experience like no other. Every day is an intense foray into some facet of programming. We're handed a project and, with a little guidance, we use every resource available to us to find the solution. The premise that [Holberton School][1] is built upon is that information is available to us in more places than we've ever had before. MOOCs, tutorials, the availability of open source software and projects, and online communities are all bursting at the seams with knowledge that shakes up some of the projects we have to complete. And with the support of the invaluable team of mentors to guide us to solutions, the school becomes more than just a school; we've become a community of learners. I would highly recommend this school for anyone who is interested in software engineering and is also interested in the learning style. The next class is in October 2016 and is accepting new applications. It's both terrifying and exhilarating, but so worth it. - -### Open source matters - -My earliest experience with an open source operating system was [Fedora][3], a [Red Hat][4]-sponsored project. During a panicked conversation with an IRC member, she recommended this free OS. I had never installed my own OS before, but it sparked my interest in open source and my dependence on open source software for my computing needs. We are advocates for open source contribution, creation, and use. Our projects are on GitHub where anyone can use or contribute to them. We also have the opportunity to access existing open source projects to use or contribute to in our own way. Many of the tools that we use at school are open source, such as Fedora, [Vagrant][5], [VirtualBox][6], [GCC][7], and [Discourse][8], to name a few. - -As I continue on my journey to becoming a software engineer, I still dream of a time when I will be able to contribute to the open source community and be able to share my knowledge with others. - -### Diversity Matters - -Standing in the room and talking to 29 other bright-eyed learners was intoxicating. 40% of the people there were women and 44% were people of color. These numbers become very important when you are a woman of color in a field that has been famously known for its lack of diversity. It was an oasis in the tech Mecca of the world. I knew I had arrived. - -The notion of becoming a full-stack engineer is daunting, and you may even struggle to know what that means. It is a challenging road to travel with immeasurable rewards to reap. The future is run by technology, and you are an important part of that bright future. While the media continues to trip over handling the issue of diversity in tech companies, know that whoever you are, whatever your background is, whatever your reasons might be for becoming a full-stack engineer, you can find a place to thrive. - -But perhaps most importantly, a strong reminder of the role of women in the history of computing can help more women return to the tech world, and they can be fully engaged without hesitation due to their gender or their capabilities as women. Their talents will help shape the future not just of tech, but of the world. - - ------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/4/my-open-source-story-gloria-bwandungi - -作者:[Gloria Bwandungi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/nappybrain -[1]: https://www.holbertonschool.com/ -[2]: https://twitter.com/hippokampoiers -[3]: https://en.wikipedia.org/wiki/Fedora_(operating_system) -[4]: https://www.redhat.com/ -[5]: https://www.vagrantup.com/ -[6]: https://www.virtualbox.org/ -[7]: https://gcc.gnu.org/ -[8]: https://www.discourse.org/ diff --git a/translated/talk/my-open-source-story/20160429 Why and how I became a software engineer.md b/translated/talk/my-open-source-story/20160429 Why and how I became a software engineer.md new file mode 100644 index 0000000000..2e024c33bf --- /dev/null +++ b/translated/talk/my-open-source-story/20160429 Why and how I became a software engineer.md @@ -0,0 +1,101 @@ +我成为一名软件工程师的原因和经历 +========================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/myopensourcestory.png?itok=6TXlAkFi) + +1989 年乌干达首都,坎帕拉。 + +赞美我的父母,他们机智的把我送到叔叔的办公室,去学着用电脑,而非将我留在家里添麻烦。几日后,我和另外六、七个小孩,还有一台放置在与讲台相垂直课桌子上的崭新电脑,一起置身于 21 层楼高的狭小房间中。很明显我们还不够格去碰那家伙。在长达三周无趣的 DOS 命令学习后,终于迎来了这美妙的时光。终于轮到我来输 **copy doc.txt d:** 了。 + +那奇怪的声音其实是将一个简单文件写入五英寸软盘的声音,但听起来却像音乐般美妙。那段时间,这块软盘简直成为了我的至宝。我把所有我可以拷贝的东西都放在上面了。然而,1989 年的乌干达,人们的生活十分正经,相较而言捣鼓电脑,拷贝文件还有格式化磁盘就称不上正经。我不得不专注于自己的学业,这让我离开了计算机科学走入了建筑工程学。 + +在这些年里,我和同龄人一样,干过很多份工作也学到了许多技能。我教过幼儿园的小朋友,也教过大人如何使用软件,在服装店工作过,还在教堂中担任过付费招待。在我获取堪萨斯大学的学位时,我正在技术高管的手下做技术助理,其实也就听上去比较洋气,也就是搞搞学生数据库而已。 + +当我 2007 年毕业时,这些技术已经变得不可或缺。建筑工程学的方方面面都与计算机科学深深的交织在一起,所以我们也都在不经意间也都学了些简单的编程知识。我对于这方面一直很着迷。但由于我不得不成为一位正经的工程师,所以我发展了一项私人爱好:写科幻小说。 + +在我的故事中,我以我笔下的女英雄的形式存在。她们都是编程能力出众的科学家,总是在冒险的途中用自己的技术发明战胜那些渣渣们,有时发明要在战斗中进行。我想出的这些“新技术”,一般基于真实世界中的发明。也有些是从买来的科幻小说中读到的。这就意味着我需要了解这些技术的原理,而且我的研究使我有意无意的关注了许多有趣的 subreddit 和电子杂志 + +### 开源:巨大的宝库 + +在我的经历中,那几周花在 DOS 命令上的时间仍然记忆犹新,在一些偏门的项目上耗费心血,并占据了宝贵的学习时间。Geocities 一向所有 Yahoo! 用户开放,我就创建了一个网站,用于发布一些由我用小型数码相机拍摄的个人图片。这个网站是我随性而为的,用来帮助家人和朋友,解决一些他们所遇到的电脑问题。同时也为教堂搭建了一个图书馆数据库。 + +这意味着,我需要一直研究并尝试获取更多的信息,使它们变得更棒。上帝保佑,让互联网和开源砸在了我的面前。然后,30 天试用和 license 限制对我而言就变成了过去式。我可以完全不受这些限制,持续的使用 GIMP、Inkscape 和 OpenOffice。 + +### 是时候正经了 + +我很幸运,有商业伙伴看出了我故事中的奇妙。她也是个想象力丰富的人,对更高效、更便捷的互联这个世界,充满了各种美好的想法。我们根据我们以往成功道路中经历的痛点制定了解决方案,但执行却成了一个问题。我们都缺乏那种将产品带入生活的能力,每当我们试图将想法带到投资人面前时,都表现的尤为突出。 + +我们需要学习编程。所以在 2015 年的夏末,我们踏上了征途,来到了 Holberton 学校的阶前。那是一所座落于旧金山由社区推进,基于项目教学的学校。 + +我的商业伙伴一天早上找到我,并开始了一段充满她方式的对话,每当她有疯狂想法想要拉我入伙时。 + +**Zee**: Gloria,我想和你说点事,在拒绝前能先听我说完吗? + +**Me**: 不行。 + +**Zee**: 我们想要申请一所学校的全栈工程师。 + +**Me**: 什么? + +**Zee**: 就是这,看!就是这所学校,我们要申请这所学校学习编程。 + +**Me**: 我不明白。我们不是正在网上学 Python 和… + +**Zee**: 这不一样。相信我。 + +**Me**: 那… + +**Zee**: 还不相信吗? + +**Me**: 好吧…我看看。 + +### 抛开偏见 + +我看到的和我们在网上听说的几乎差不多。这简直太棒了,以至于让人觉得不太真实,但我们还是决定尝试一下,双脚起跳,看看结果如何。 + +要成为学生,我们需要经历四个步骤,仅仅是针对才能和态度,无关学历和编程经历的筛选。筛选便是课程的开始,通过它我们开始学习与合作。 + +根据我和我合作伙伴的经验,相比 Holberton 学校的申请流程,其他的申请流程实在是太无聊了。就像场游戏。如果你完成了一项挑战,你就能通往下一关,在那里有别的有趣的挑战正等着你。我们创建了 Twitter 账号,在 Medium 上写博客,为了创建网站而学习 HTML 和 CSS, 打造了一个充满活力的社区,虽然在此之前我们并不知晓有谁会来。 + +在线社区最吸引人的就是我们使用电脑的经验是多种多样的,而我们的背景和性别并非创始人(我们私下里称他为“The Trinity(三位一体)”)做出选择的因素。大家只是喜欢聚在一块交流。我们都是通过学习编程来提升自己计算机技术的聪明人。 + +相较于其他的的申请流程,我们不需要泄露很多的身份信息。就像我的商业伙伴,她的名字里看不出她的性别和种族。直到最后一个步骤,在视频聊天的时候, The Trinity 才知道她是一位有色人种女性。迄今为止,促使她达到这个程度的只是她的热情和才华。肤色和性别,并没有妨碍或者帮助到她。还有比这更酷的吗? + +那个我们获得录取通知书的晚上,我们知道我们的命运已经改变,我们获得了原先梦寐以求的生活。2016 年 1 月 22 日,我们来到北至巴特瑞大街 98 号,去见我们的小伙伴 [Hippokampoiers][2],这是我们的初次见面。很明显,在见面之前,“The Trinity”就已经开始做一些令人激动的事了。他们已经聚集了一批形形色色的人,他们都专注于成为全栈工程师,并为之乐此不疲。 + +这所大学有种与众不同的体验。感觉每天都是向编程的一次竭力的冲锋。我们着手的工程,并不会有很多指导,我们需要使用一切我们可以使用的资源找出解决方案。[Holberton 学校][1] 的办学宗旨便是向学员提供,相较于我们已知而言,更为多样的信息渠道。MOOCs(大型开放式课程)、教程、可用的开源软件和项目,以及线上社区层出不穷,将我们完成项目所需要的知识全都衔接了起来。加之宝贵的导师团队来指导我们制定解决方案,这所学校变得并不仅仅是一所学校;我们已经成为了求学者的社区。任何对软件工程感兴趣并对这种学习方法感兴趣的人,我都十分推荐这所学校。下次开课在 2016 年 10 月,并且会接受新的申请。虽然会让人有些悲喜交加,但是那真的很值得。 + +### 开源问题 + +我最早使用的开源系统是 [Fedora][3],一个 [Red Hat][4] 赞助的项目。在与 IRC 中一名成员一番惊慌失措的交流后,她推荐了这款免费的系统。 虽然在此之前,我还未独自安装过操作系统,但是这激起了我对开源的兴趣和日常使用计算机时对开源软件的依赖性。我们提倡为开源贡献代码,创造并使用开源的项目。我们的项目就在 Github 上,任何人都可以使用或是向它贡献出自己的力量。我们也会使用或以自己的方式为一些既存的开源项目做出贡献。在学校里,我们使用的大部分工具是开源的,例如 Fedora、[Vagrant][5]、[VirtualBox][6]、[GCC][7] 和 [Discourse][8],仅举几例。 + +重回软件工程师之路以后,我始终憧憬着有这样一个时刻——能为开源社区做出一份贡献,能与他人分享我所掌握的知识。 + +### Diversity Matters + +站在教室里,在着 29 双明亮的眼睛关注下交流心得,真是令人陶醉。学员中有 40% 是女性,有 44% 的有色人种。当你是一位有色人种且为女性,并身处于这个以缺乏多样而著名的领域时,这些数字就变得非常重要了。那是高科技圣地麦加上的绿洲。我知道我做到了。 + +想要成为一个全栈的工程师是十分困难的,你甚至很难了解这意味着什么。这是一条充满挑战的路途,道路四周布满了对收获的未知。科技推动着未来飞速发展,而你也是美好未来很重要的一部分。虽然媒体在持续的关注解决科技公司的多样化的问题,但是如果能认清自己,了解自己,知道自己为什么想成为一名全栈工程师,这样你便能觅得一处生根发芽。 + +不过可能最重要的是,提醒人们女性在计算机的发展史上扮演着多么重要的角色,以帮助更多的女性回归到科技界,并使她们充满期待,而非对自己的性别与能力感到犹豫。她们的才能将会描绘出不仅仅是科技的未来,而是整个世界的未来。 + + +------------------------------------------------------------------------------ + +via: https://opensource.com/life/16/4/my-open-source-story-gloria-bwandungi + +作者:[Gloria Bwandungi][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/nappybrain +[1]: https://www.holbertonschool.com/ +[2]: https://twitter.com/hippokampoiers +[3]: https://en.wikipedia.org/wiki/Fedora_(operating_system) +[4]: https://www.redhat.com/ +[5]: https://www.vagrantup.com/ +[6]: https://www.virtualbox.org/ +[7]: https://gcc.gnu.org/ +[8]: https://www.discourse.org/ From 401da5a979504f8e68ddfa64375430352d42f98f Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Tue, 17 May 2016 23:11:31 +0800 Subject: [PATCH 1404/1710] Proofread Part 2 - LXD 2.0--Installing and configuring LXD --- ...LXD 2.0--Installing and configuring LXD.md | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md b/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md index 3464cd07eb..fe386f3229 100644 --- a/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md +++ b/translated/tech/LXD/Part 2 - LXD 2.0--Installing and configuring LXD.md @@ -1,4 +1,4 @@ -Part 2 - LXD 2.0: 安装与配置 +Part 2 - LXD 2.0: 安装与配置 ================================================= 这是 LXD 2.0 [系列介绍文章][2]的第二篇。 @@ -7,19 +7,19 @@ Part 2 - LXD 2.0: 安装与配置 ### 安装篇 -获得 LXD 有很多种办法。我们推荐你是用配合最新版的 LXC 和 Linux 内核使用 LXD,这样就可以享受到它的全部特性,但是注意,我们现在也在慢慢的降低对旧版本 Linux 发布版的支持。 +有很多种办法可以获得 LXD。我们推荐你配合最新版的 LXC 和 Linux 内核使用 LXD,这样就可以享受到它的全部特性。需要注意的是,我们现在也在慢慢的降低对旧版本 Linux 发布版的支持。 #### Ubuntu 标准版 所有新发布的 LXD 都会在发布几分钟后上传到 Ubuntu 开发版的安装源里。这个安装包然后就会当作种子给全部其他的安装包源,供 Ubuntu 用户使用。 -如果使用 Ubuntu 16.04 则可以直接安装: +如果使用 Ubuntu 16.04,可以直接安装: ``` sudo apt install lxd ``` -如果运行的是 Ubuntu 14.04,可以这样安装: +如果运行的是 Ubuntu 14.04,则可以这样安装: ``` sudo apt -t trusty-backports install lxd @@ -27,15 +27,15 @@ sudo apt -t trusty-backports install lxd #### Ubuntu Core -使用Ubuntu Core 稳定版的用户可以使用下面的命令安装 LXD: +使用 Ubuntu Core 稳定版的用户可以使用下面的命令安装 LXD: ``` sudo snappy install lxd.stgraber ``` -#### ubuntu 官方 PPA +#### Ubuntu 官方 PPA -是哟个其他 Ubuntu 发布版 —— 比如 Ubuntu 15.10 —— 的用户可以添加下面的 PPA (Personal Package Archive) 来安装: +使用其他 Ubuntu 发布版 —— 比如 Ubuntu 15.10 —— 的用户可以添加下面的 PPA(Personal Package Archive)来安装: ``` sudo apt-add-repository ppa:ubuntu-lxc/stable @@ -46,23 +46,23 @@ sudo apt install lxd #### Gentoo -Gentoo 已经有了最新的 LXD 安装包,你可以直接安装: +Gentoo 已经有了最新的 LXD 包,你可以直接安装: ``` sudo emerge --ask lxd ``` -#### 源代码 +#### 使用源代码安装 -如果你曾经编译过 Go 工程,那么从源代码编译 LXD 并不是十分困难。然而要住你的是你需要 LXC 的开发头文件。为了运行 LXD , 你的 发布版铜须也需要使用比较新的内核(最起码是 3.13),比较新的 LXC (1.1.4 或更高版本) ,LXCFS 以及支持用户子 uid/gid 分配的 shadow 。 +如果你曾经编译过 Go 语言的项目,那么从源代码编译 LXD 并不是十分困难。然而注意,你需要 LXC 的开发头文件。为了运行 LXD, 你的发布版需也要使用比较新的内核(最起码是 3.13)、比较新的 LXC (1.1.4 或更高版本)、LXCFS 以及支持用户子 uid/gid 分配的 shadow。 -从源代码编译 LXD 的最新指令可以在[上游 README][2]里找到。 +从源代码编译 LXD 的最新教程可以在[上游 README][2]里找到。 -### ubuntu 上的网络配置 +### Ubuntu 上的网络配置 -Ubuntu 的安装包会很方便的给你提供一个 "lxdbr0" 网桥。这个网桥默认是没有配置过的,只提供通过 HTTP 代理的 IPV6 的本地连接。 +Ubuntu 的安装包会很方便的给你提供一个“lxdbr0”网桥。这个网桥默认是没有配置过的,只提供通过 HTTP 代理的 IPv6 的本地连接。 -要配置这个网桥和添加 IPV4 、 IPV6 子网,你可以运行下面的命令: +要配置这个网桥并添加 IPv4 、 IPv6 子网,你可以运行下面的命令: ``` sudo dpkg-reconfigure -p medium lxd @@ -74,15 +74,15 @@ sudo dpkg-reconfigure -p medium lxd sudo lxd init ``` -### 存储系统 +### 存储后端 -LXD 提供了集中存储后端。在开始使用 LXD 之前,你最好直到自己想要的后端,因为我们不支持在后端之间迁移已经生成的容器。 +LXD 提供了许多集中存储后端。在开始使用 LXD 之前,你应该决定将要使用的后端,因为我们不支持在后端之间迁移已经生成的容器。 -各个[后端特性的比较表格][3]可以在这里找到。 +各个[后端特性比较表][3]可以在[这里][3]找到。 #### ZFS -我们的推荐是 ZFS , 因为他能支持 LXD 的全部特性,同时提供最快和最可靠的容器体验。它包括了以容器为单位的磁盘配额,直接快照和恢复,优化了的迁移(发送/接收),以及快速从镜像创建容器。它同时也被认为要比 btrfs 更成熟。 +我们的推荐是 ZFS, 因为它能支持 LXD 的全部特性,同时提供最快和最可靠的容器体验。它包括了以容器为单位的磁盘配额,即时快照和恢复,优化了的迁移(发送/接收),以及快速从镜像创建容器的能力。它同时也被认为要比 btrfs 更成熟。 要和 LXD 一起使用 ZFS ,你需要首先在你的系统上安装 ZFS。 @@ -98,7 +98,7 @@ sudo apt install zfsutils-linux sudo apt install zfsutils-linux zfs-dkms ``` -如果是更旧的版本,你需要这样安装: +如果是更旧的版本,你需要从 zfsonlinux PPA 安装: ``` sudo apt-add-repository ppa:zfs-native/stable @@ -106,27 +106,27 @@ sudo apt update sudo apt install ubuntu-zfs ``` -配置 LXD 只需要简单的执行下面的命令: +配置 LXD 只需要执行下面的命令: ``` sudo lxd init ``` -这条命令接下来会想你提问一下你想要的 ZFS 的配置,然后为你配置好 ZFS 。 +这条命令接下来会向你提问一下一些 ZFS 的配置细节,然后为你配置好 ZFS。 #### btrfs -如果 ZFS 不可用,那么 btrfs 可以提供相同级别的集成,除了不会合理的报告容器内的磁盘使用情况(虽然配额还是可以用的)。 +如果 ZFS 不可用,那么 btrfs 可以提供相同级别的集成,但不会合理地报告容器内的磁盘使用情况(虽然配额仍然可用)。 -btrfs 同时拥有很好的嵌套属性,而这时 ZFS 所不具有的。也就是说如果你计划在 LXD 中再使用 LXD ,那么 btrfs 就很值得你考虑一下。 +btrfs 同时拥有很好的嵌套属性,而这是 ZFS 所不具有的。也就是说如果你计划在 LXD 中再使用 LXD,那么 btrfs 就很值得你考虑。 -使用 btrfs 的话,LXD 不需要进行任何的配置,你只需要保证 `/var/lib/lxd` 是保存在 btrfs 文件系统中,然后 LXD 就会自动为你使用 btrfs 了。 +使用 btrfs 的话,LXD 不需要进行任何的配置,你只需要保证 `/var/lib/lxd` 保存在 btrfs 文件系统中,然后 LXD 就会自动为你使用 btrfs 了。 #### LVM -如果 ZFS 和 btrfs 都不是你想要的,你仍然可以考虑使用 LVM。 LXD 会以自动精简配置的方式使用 LVM,为每个镜像和容器创建 LV,如果需要的话也会使用 LVM 的快照功能。 +如果 ZFS 和 btrfs 都不是你想要的,你还可以考虑使用 LVM 以获得部分特性。 LXD 会以自动精简配置的方式使用 LVM,为每个镜像和容器创建 LV,如果需要的话也会使用 LVM 的快照功能。 -要配置 LXD 使用 LVM,需要创建一个 LVM 的 VG ,然后运行: +要配置 LXD 使用 LVM,需要创建一个 LVM VG,然后运行: ``` @@ -141,9 +141,9 @@ lxc config set storage.lvm_fstype xfs #### 简单目录 -如果上面全部方案你都不打算使用, LXD 还可以工作,但是不会使用任何高级特性。它只会为每个容器创建一个目录,然后在创建每个容器时解压缩镜像的压缩包,在容器拷贝和快照时会进行一次完整的文件系统拷贝。 +如果上面全部方案你都不打算使用,LXD 依然能在不使用任何高级特性情况下工作。它会为每个容器创建一个目录,然后在创建每个容器时解压缩镜像的压缩包,并在容器拷贝和快照时进行一次完整的文件系统拷贝。 -除了磁盘配额以外的特性都是支持的,但是很浪费磁盘空间,并且非常慢。如果你没有其他选择,这还是可以工作的,但是你还是需要认真的考虑一下上面的几个方案。 +除了磁盘配额以外的特性都是支持的,但是很浪费磁盘空间,并且非常慢。如果你没有其他选择,这还是可以工作的,但是你还是需要认真的考虑一下上面的几个替代方案。 ### 配置篇 @@ -151,7 +151,7 @@ LXD 守护进程的完整配置项列表可以在[这里找到][4]。 #### 网络配置 -默认情况下 LXD 不会监听网络。和它通信的唯一办法是使用本地 unix socket 通过 `/var/lib/lxd/unix.socket` 进行通信。 +默认情况下 LXD 不会监听网络。和它通信的唯一办法是通过 `/var/lib/lxd/unix.socket` 使用本地 unix socket 进行通信。 要让 LXD 监听网络,下面有两个有用的命令: @@ -160,11 +160,11 @@ lxc config set core.https_address [::] lxc config set core.trust_password some-secret-string ``` -第一条命令将 LXD 绑定到 IPV6 地址 “::”,也就是监听机器的所有 IPV6 地址。你可以显式的使用一个特定的 IPV4 或者 IPV6 地址替代默认地址,如果你想绑定 TCP 端口(默认是 8443)的话可以在地址后面添加端口号即可。 +第一条命令将 LXD 绑定到 IPv6 地址 “::”,也就是监听机器的所有 IPv6 地址。你可以显式的使用一个特定的 IPv4 或者 IPv6 地址替代默认地址,如果你想绑定 TCP 端口(默认是 8443)的话可以在地址后面添加端口号即可。 -第二条命令设置了密码,可以让远程客户端用来把自己添加到 LXD 可信证书中心。如果已经给主机设置了密码,当添加 LXD 主机时会提示输入密码, LXD 守护进程会保存他们的客户端的证书以确保客户端是可信的,这样就不需要再次输入密码(可以随时设置和取消) +第二条命令设置了密码,用于让远程客户端用来把自己添加到 LXD 可信证书中心。如果已经给主机设置了密码,当添加 LXD 主机时会提示输入密码,LXD 守护进程会保存他们的客户端的证书以确保客户端是可信的,这样就不需要再次输入密码(可以随时设置和取消)。 -你也可以选择不设置密码,然后通过给每个客户端发送 "client.crt" (来自于 `~/.config/lxc`)文件,然后把它添加到你自己的可信中信来实现人工验证每个新客户端是否可信,可以使用下面的命令: +你也可以选择不设置密码,然后通过给每个客户端发送“client.crt”(来自于 `~/.config/lxc`)文件,然后把它添加到你自己的可信中信来实现人工验证每个新客户端是否可信,可以使用下面的命令: ``` lxc config trust add client.crt @@ -172,9 +172,9 @@ lxc config trust add client.crt #### 代理配置 -In most setups, you’ll want the LXD daemon to fetch images from remote servers. +大多数情况下,你会想让 LXD 守护进程从远程服务器上获取镜像。 -If you are in an environment where you must go through a HTTP(s) proxy to reach the outside world, you’ll want to set a few configuration keys or alternatively make sure that the standard PROXY environment variables are set in the daemon’s environment. +如果你处在一个必须通过 HTTP(s) 代理链接外网的环境下,你需要对 LXD 做一些配置,或保证已在守护进程的环境中设置正确的 PROXY 环境变量。 ``` lxc config set core.proxy_http http://squid01.internal:3128 @@ -182,11 +182,11 @@ lxc config set core.proxy_https http://squid01.internal:3128 lxc config set core.proxy_ignore_hosts image-server.local ``` -With those, all transfers initiated by LXD will use the squid01.internal HTTP proxy, except for traffic to the server at image-server.local +以上代码使所有 LXD 发起的数据传输都使用 squid01.internal HTTP 代理,但与在 image-server.local 的服务器的数据传输则是例外。 #### 镜像管理 -LXD 使用动态镜像缓存。当从远程镜像创建容器的时候,它会自动把镜像下载到本地镜像商店,同时标志为已缓存并记录来源。几天后(默认10天)如果没有再被使用,那么这个镜像就会自动被删除。每个几小时(默认是6小时) LXD 还会检查一下这个镜像是否有新版本,然后更新镜像的本地拷贝。 +LXD 使用动态镜像缓存。当从远程镜像创建容器的时候,它会自动把镜像下载到本地镜像商店,同时标志为已缓存并记录来源。几天后(默认 10 天)如果某个镜像没有被使用过,那么它就会自动地被删除。每个几小时(默认是 6 小时)LXD 还会检查一下这个镜像是否有新版本,然后更新镜像的本地拷贝。 所有这些都可以通过下面的配置选项进行配置: @@ -196,12 +196,12 @@ lxc config set images.auto_update_interval 24 lxc config set images.auto_update_cached false ``` -这些命令让 LXD 修改了它的默认属性,缓存期替换为 5 天,更新间隔为 24 小时,而且只更新那些标志为自动更新的镜像(lxc 镜像拷贝有标志 `–auto-update`)而不是 LXD 自动缓存的镜像。 +这些命令让 LXD 修改了它的默认属性,缓存期替换为 5 天,更新间隔为 24 小时,而且只更新那些标记为自动更新的镜像(lxc 镜像拷贝被标记为 `–auto-update`)而不是 LXD 自动缓存的镜像。 ### 总结 -到这里为止,你就应该有了一个可以工作的、最新版的 LXD ,现在你可以开始用 LXD 了,或者等待我们的下一条博文,那时我们会介绍如何创建第一个容器以及使用 LXD 命令行工具操作容器。 +到这里为止,你就应该有了一个可以工作的、最新版的 LXD,现在你可以开始用 LXD 了,或者等待我们的下一篇博文,我们会在其中介绍如何创建第一个容器以及使用 LXD 命令行工具操作容器。 ### 额外信息 @@ -213,7 +213,7 @@ LXD 的邮件列表: LXD 的 IRC 频道: #lxcontainers on irc.freenode.net -如果你不想或者不能在你的机器上安装 LXD ,你可以[试试在线版的 LXD][1] 。 +如果你不想或者不能在你的机器上安装 LXD ,你可以[试试在线版的 LXD][1]。 -------------------------------------------------------------------------------- @@ -221,7 +221,7 @@ via: https://www.stgraber.org/2016/03/15/lxd-2-0-installing-and-configuring-lxd- 作者:[Stéphane Graber][a] 译者:[ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 917ea80685819b39438194574ed4de9f170024b1 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 May 2016 08:59:30 +0800 Subject: [PATCH 1405/1710] PUB:20151123 Data Structures in the Linux Kernel @cposture @tinyeyeser --- ...123 Data Structures in the Linux Kernel.md | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) rename {translated/tech => published}/20151123 Data Structures in the Linux Kernel.md (75%) diff --git a/translated/tech/20151123 Data Structures in the Linux Kernel.md b/published/20151123 Data Structures in the Linux Kernel.md similarity index 75% rename from translated/tech/20151123 Data Structures in the Linux Kernel.md rename to published/20151123 Data Structures in the Linux Kernel.md index 899a69af3d..d46d4293c4 100644 --- a/translated/tech/20151123 Data Structures in the Linux Kernel.md +++ b/published/20151123 Data Structures in the Linux Kernel.md @@ -1,4 +1,4 @@ -Linux内核中的数据结构 —— 基数树 +Linux 内核里的数据结构 —— 基数树 ================================================================================ 基数树 Radix tree @@ -11,35 +11,35 @@ Linux内核中的数据结构 —— 基数树 让我们先说说什么是 `基数树` 吧。基数树是一种 `压缩的字典树 (compressed trie)` ,而[字典树](http://en.wikipedia.org/wiki/Trie)是实现了关联数组接口并允许以 `键值对` 方式存储值的一种数据结构。这里的键通常是字符串,但可以使用任意数据类型。字典树因为它的节点而与 `n叉树` 不同。字典树的节点不存储键,而是存储单个字符的标签。与一个给定节点关联的键可以通过从根遍历到该节点获得。举个例子: ``` -               +-----------+ -               |           | -               |    " "    | + +-----------+ | | -        +------+-----------+------+ -        |                         | -        |                         | -   +----v------+            +-----v-----+ -   |           |            |           | -   |    g      |            |     c     | + | " " | + | | + +------+-----------+------+ + | | + | | + +----v------+ +-----v-----+ | | | | -   +-----------+            +-----------+ -        |                         | -        |                         | -   +----v------+            +-----v-----+ -   |           |            |           | -   |    o      |            |     a     | + | g | | c | | | | | -   +-----------+            +-----------+ -                                  | -                                  | -                            +-----v-----+ -                            |           | -                            |     t     | + +-----------+ +-----------+ + | | + | | + +----v------+ +-----v-----+ + | | | | + | o | | a | + | | | | + +-----------+ +-----------+ + | + | + +-----v-----+ | | -                            +-----------+ + | t | + | | + +-----------+ ``` -因此在这个例子中,我们可以看到一个有着两个键 `go` 和 `cat` 的 `字典树` 。压缩的字典树或者说 `基数树` ,它和 `字典树` 的不同之处在于,所有只有一个孩子的中间节点都被删除。 +因此在这个例子中,我们可以看到一个有着两个键 `go` 和 `cat` 的 `字典树` 。压缩的字典树也叫做 `基数树` ,它和 `字典树` 的不同之处在于,所有只有一个子节点的中间节点都被删除。 Linux 内核中的基数树是把值映射到整形键的一种数据结构。[include/linux/radix-tree.h](https://github.com/torvalds/linux/blob/master/include/linux/radix-tree.h)文件中的以下结构体描述了基数树: @@ -86,10 +86,10 @@ struct radix_tree_node { unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; }; ``` -这个结构体包含的信息有父节点中的偏移以及到底端(叶节点)的高度、孩子节点的个数以及用于访问和释放节点的字段成员。这些字段成员描述如下: +这个结构体包含的信息有父节点中的偏移以及到底端(叶节点)的高度、子节点的个数以及用于访问和释放节点的字段成员。这些字段成员描述如下: * `path` - 父节点中的偏移和到底端(叶节点)的高度 -* `count` - 孩子节点的个数; +* `count` - 子节点的个数; * `parent` - 父节点指针; * `private_data` - 由树的用户使用; * `rcu_head` - 用于释放节点; @@ -188,9 +188,9 @@ unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, -------------------------------------------------------------------------------- -via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/radix-tree.md +via: https://github.com/0xAX/linux-insides/blob/master/DataStructures/radix-tree.md -作者:[0xAX] +作者:0xAX 译者:[cposture](https://github.com/cposture) 校对:[Mr小眼儿](https://github.com/tinyeyeser) From 6a60da452fde75eae9c17deab9be738cc2f7e039 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 May 2016 09:43:40 +0800 Subject: [PATCH 1406/1710] PUB:20151124 Review--5 memory debuggers for Linux coding @soooogreen @PurlingNayuki @oska874 --- ...ew--5 memory debuggers for Linux coding.md | 78 ++++++++++--------- 1 file changed, 41 insertions(+), 37 deletions(-) rename {translated/talk => published}/20151124 Review--5 memory debuggers for Linux coding.md (74%) diff --git a/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md b/published/20151124 Review--5 memory debuggers for Linux coding.md similarity index 74% rename from translated/talk/20151124 Review--5 memory debuggers for Linux coding.md rename to published/20151124 Review--5 memory debuggers for Linux coding.md index 424d91bba4..4c2e8373a0 100644 --- a/translated/talk/20151124 Review--5 memory debuggers for Linux coding.md +++ b/published/20151124 Review--5 memory debuggers for Linux coding.md @@ -1,4 +1,4 @@ -点评:Linux编程中五款内存调试器 +点评五款用于 Linux 编程的内存调试器 ================================================================================ ![](http://images.techhive.com/images/article/2015/11/penguinadmin-2400px-100627186-primary.idge.jpg) >Credit: [Moini][1] @@ -7,7 +7,7 @@ 如果你还没猜出是那种错误,我说的就是和内存相关的错误。手动调试这些错误不仅耗时,而且很难发现并纠正。值得一提的是,这种错误很常见,特别是在用 C/C++ 这类允许[手动管理内存][2]的语言编写的软件里。 -幸运的是,现行有一些编程工具能够帮你在软件程序中咋猴岛这些和内存相关的错误。在这些工具集中,我评估了五款 Linux 下可用的,流行、免费并且开源的内存调试器: Dmalloc 、 Electric Fence 、 Memcheck 、 Memwatch 以及 Mtrace 。在日常编码中,我已经用过这五个调试器了,所以这些评估是建立在我的实际体验之上的。 +幸运的是,现行有一些编程工具能够帮你在软件程序中找到这些和内存相关的错误。在这些工具集中,我评估了五款支持 Linux 的、流行的、自由开源的内存调试器: Dmalloc 、 Electric Fence 、 Memcheck 、 Memwatch 以及 Mtrace 。在日常编码中,我已经用过这五个调试器了,所以这些评估是建立在我的实际体验之上的。 ### [Dmalloc][3] ### @@ -19,10 +19,11 @@ **许可**: CC 3.0 -Dmalloc 是 Gray Watson 开发的一款内存调试工具。它是作为库来实现的,封装了标准内存管理函数如 *malloc() , calloc() , free()* 等,使程序员得以检测出有问题的代码。 +Dmalloc 是 Gray Watson 开发的一款内存调试工具。它是作为库来实现的,封装了标准内存管理函数如`malloc() , calloc() , free()`等,使程序员得以检测出有问题的代码。 ![cw dmalloc output](http://images.techhive.com/images/article/2015/11/cw_dmalloc-output-100627040-large.idge.png) -Dmalloc + +*Dmalloc* 如同工具的网页所示,这个调试器提供的特性包括内存泄漏跟踪、[重复释放内存(double free)][4]错误跟踪、以及[越界写入(fence-post write)][5]检测。其它特性包括报告错误的文件/行号、通用的数据统计记录。 @@ -32,19 +33,19 @@ Dmalloc #### 有何优点 #### -Dmalloc 最大的优点就是高度可配置性。比如说,你可以配置以支持 C++ 程序和多线程应用。 Dmalloc 还提供一个有用的功能:运行时可配置,这表示在 Dmalloc 执行时,可以轻易地使能或者禁能它提供的一些特性。 +Dmalloc 最大的优点就是高度可配置性。比如说,你可以配置它以支持 C++ 程序和多线程应用。 Dmalloc 还提供一个有用的功能:运行时可配置,这表示在 Dmalloc 执行时,可以轻易地启用或者禁用它提供的一些特性。 -你还可以配合 [GNU Project Debugger (GDB)][7]来使用 Dmalloc ,只需要将 *dmalloc.gdb* 文件(位于 Dmalloc 源码包中的 contrib 子目录里)的内容添加到你的主目录中的 *.gdbinit* 文件里即可。 +你还可以配合 [GNU Project Debugger (GDB)][7]来使用 Dmalloc ,只需要将`dmalloc.gdb`文件(位于 Dmalloc 源码包中的 contrib 子目录里)的内容添加到你的主目录中的`.gdbinit`文件里即可。 -另外一个让我对 Dmalloc 爱不释手的优点是它有大量的资料文献。前往官网的 [Documentation 标签][8],可以获取所有关于如何下载、安装、运行,怎样使用库,和 Dmalloc 所提供特性的细节描述,及其输入文件的解释。其中还有一个章节介绍了一般问题的解决方法。 +另外一个让我对 Dmalloc 爱不释手的优点是它有大量的资料文献。前往官网的 [Documentation 栏目][8],可以获取所有关于如何下载、安装、运行、怎样使用库,和 Dmalloc 所提供特性的细节描述,及其生成的输出文件的解释。其中还有一个章节介绍了一般问题的解决方法。 #### 注意事项 #### -跟 Mtrace 一样, Dmalloc 需要程序员改动他们的源代码。比如说你可以(必须的)添加头文件 *dmalloc.h* ,工具就能汇报产生问题的调用的文件或行号。这个功能非常有用,因为它节省了调试的时间。 +跟 Mtrace 一样, Dmalloc 需要程序员改动他们的源代码。比如说你可以(也是必须的)添加头文件`dmalloc.h`,工具就能汇报产生问题的调用的文件或行号。这个功能非常有用,因为它节省了调试的时间。 除此之外,还需要在编译你的程序时,把 Dmalloc 库(编译 Dmalloc 源码包时产生的)链接进去。 -然而,还有点更麻烦的事,需要设置一个环境变量,命名为 *DMALLOC_OPTION* ,以供工具在运行时配置内存调试特性,以及输出文件的路径。可以手动为该环境变量分配一个值,不过初学者可能会觉得这个过程有点困难,因为该值的一部分用来表示要启用的 Dmalloc 特性——表示为各自的十六进制值的累加。[这里][9]有详细介绍。 +然而,还有点更麻烦的事,需要设置一个环境变量,命名为`DMALLOC_OPTION`,以供工具在运行时配置内存调试特性,比如定义输出文件的路径。可以手动为该环境变量分配一个值,不过初学者可能会觉得这个过程有点困难,因为该值的一部分用来表示要启用的 Dmalloc 特性——以十六进制值的累加值表示。[这里][9]有详细介绍。 一个比较简单方法设置这个环境变量是使用 [Dmalloc 实用指令][10],这是专为这个目的设计的方法。 @@ -65,9 +66,10 @@ Dmalloc 真正的优势在于它的可配置选项。而且高度可移植,曾 Electric Fence 是 Bruce Perens 开发的一款内存调试工具,它以库的形式实现,你的程序需要链接它。Electric Fence 能检测出[堆][11]内存溢出和访问已经释放的内存。 ![cw electric fence output](http://images.techhive.com/images/article/2015/11/cw_electric-fence-output-100627041-large.idge.png) -Electric Fence -顾名思义, Electric Fence 在每个申请的缓存边界建立了虚拟围栏,这样以来任何非法的内存访问都会导致[段错误][12]。这个调试工具同时支持 C 和 C++ 程序。 +*Electric Fence* + +顾名思义, Electric Fence 在每个所申请的缓存边界建立了虚拟围栏,这样一来任何非法的内存访问都会导致[段错误][12]。这个调试工具同时支持 C 和 C++ 程序。 #### 更新内容 #### @@ -75,7 +77,7 @@ Electric Fence #### 有何优点 #### -我喜欢 Electric Fence 的首要一点是它不同于 Memwatch 、 Dmalloc 和 Mtrace ,不需要堆你的源码做任何的改动,你只需要在编译的时候把它的库链接进你的程序即可。 +我喜欢 Electric Fence 的首要一点是它不同于 Memwatch 、 Dmalloc 和 Mtrace ,不需要对你的源码做任何的改动,你只需要在编译的时候把它的库链接进你的程序即可。 其次, Electric Fence 的实现保证了产生越界访问的第一个指令就会引起段错误。这比在后面再发现问题要好多了。 @@ -95,7 +97,6 @@ Electric Fence 还有一个局限是不能明确指出错误代码所在的行 尽管局限性较大, Electric Fence 的易用性仍然是加分项。只要链接一次程序, Electric Fence 就可以在监测出内存相关问题的时候报警。不过,如同前面所说, Electric Fence 需要配合像 GDB 这样的源码调试器使用。 - ### [Memcheck][16] ### **开发者**:[Valgrind 开发团队][17] @@ -106,30 +107,31 @@ Electric Fence 还有一个局限是不能明确指出错误代码所在的行 **许可**:GPL -[Valgrind][18] 是一个提供好几款调试和分析 Linux 程序性能的工具套件。虽然 Valgrind 能和不同语言——Java 、 Perl 、 Python 、 Assembly code 、 ortran 、 Ada 灯——编写的程序一起工作,但是它主要还针对使用 C/C++ 所编写的程序。 +[Valgrind][18] 是一个提供好几款调试和分析 Linux 程序性能的工具的套件。虽然 Valgrind 能和不同语言——Java 、 Perl 、 Python 、 Assembly code 、 ortran 、 Ada 等——编写的程序一起工作,但是它主要还是针对使用 C/C++ 所编写的程序。 Memcheck ,一款内存错误检测器,是其中最受欢迎的工具。它能够检测出如内存泄漏、无效的内存访问、未定义变量的使用以及堆内存分配和释放相关的问题等诸多问题。 #### 更新内容 #### -[工具套件( 3.10.1 )][19]主要修复了 3.10.0 版本发现的 bug 。除此之外,从主版本向后移植一些包,修复了缺失的 AArch64 ARMv8 指令和系统调用。 +[工具套件( 3.10.1 )][19]主要修复了 3.10.0 版本发现的 bug 。除此之外,“从主干开发版本向后移植的一些补丁,修复了缺失的 AArch64 ARMv8 指令和系统调用”。 #### 有何优点 #### 同其它所有 Valgrind 工具一样, Memcheck 也是命令行程序。它的操作非常简单:通常我们会使用诸如 `prog arg1 arg2` 格式的命令来运行程序,而 Memcheck 只要求你多加几个值即可,如 `valgrind --leak-check=full prog arg1 arg2` 。 ![cw memcheck output](http://images.techhive.com/images/article/2015/11/cw_memcheck-output-100627037-large.idge.png) -Memcheck -(注意:因为 Memcheck 是 Valgrind 的默认工具所以在命令行执行命令时无需提及 Memcheck。但是,需要在编译程序之初带上 `-g` 参数选项,这一步会添加调试信息,使得 Memcheck 的错误信息会包含正确的行号。) +*Memcheck* -我真正倾心于 Memcheck 的是它提供了很多命令行选项(如上所述的 *--leak-check* 选项),如此不仅能控制工具运转还可以控制它的输出。 +(注意:因为 Memcheck 是 Valgrind 的默认工具,所以在命令行执行命令时无需提及 Memcheck。但是,需要在编译程序之初带上 `-g` 参数选项,这一步会添加调试信息,使得 Memcheck 的错误信息会包含正确的行号。) -举个例子,可以开启 *--track-origins* 选项,以查看程序源码中未初始化的数据;可以开启 *--show-mismatched-frees* 选项让 Memcheck 匹配内存的分配和释放技术。对于 C 语言所写的代码, Memcheck 会确保只能使用 *free()* 函数来释放内存, *malloc()* 函数来申请内存。而对 C++ 所写的源码, Memcheck 会检查是否使用了 *delete* 或 *delete[]* 操作符来释放内存,以及 *new* 或者*new[]* 来申请内存。 +我真正倾心于 Memcheck 的是它提供了很多命令行选项(如上所述的`--leak-check`选项),如此不仅能控制工具运转还可以控制它的输出。 -Memcheck 最好的特点,尤其是对于初学者来说,是它会给用户建议使用哪个命令行选项能让输出更加有意义。比如说,如果你不使用基本的 *--leak-check* 选项, Memcheck 会在输出时给出建议:“使用 --leak-check=full 重新运行以查看更多泄漏内存细节”。如果程序有未初始化的变量, Memcheck 会产生信息:“使用 --track-origins=yes 以查看未初始化变量的定位”。 +举个例子,可以开启`--track-origins`选项,以查看程序源码中未初始化的数据;可以开启`--show-mismatched-frees`选项让 Memcheck 匹配内存的分配和释放技术。对于 C 语言所写的代码, Memcheck 会确保只能使用`free()`函数来释放内存,`malloc()`函数来申请内存。而对 C++ 所写的源码, Memcheck 会检查是否使用了`delete`或`delete[]`操作符来释放内存,以及`new`或者`new[]`来申请内存。 -Memcheck 另外一个有用的特性是它可以[创建抑制文件( suppression files )][20],由此可以略过特定的不能修正的错误,这样 Memcheck 运行时就不会每次都报警了。值得一提的是, Memcheck 会去读取默认抑制文件来忽略系统库(比如 C 库)中的报错,这些错误在系统创建之前就已经存在了。可以选择创建一个新的抑制文件,或是编辑现有的文件(通常是*/usr/lib/valgrind/default.supp*)。 +Memcheck 最好的特点,尤其是对于初学者来说,是它会给用户建议使用哪个命令行选项能让输出更加有意义。比如说,如果你不使用基本的`--leak-check`选项, Memcheck 会在输出时给出建议:“使用 --leak-check=full 重新运行以查看更多泄漏内存细节”。如果程序有未初始化的变量, Memcheck 会产生信息:“使用 --track-origins=yes 以查看未初始化变量的定位”。 + +Memcheck 另外一个有用的特性是它可以[创建抑制文件( suppression files )][20],由此可以略过特定的不能修正的错误,这样 Memcheck 运行时就不会每次都报警了。值得一提的是, Memcheck 会去读取默认抑制文件来忽略系统库(比如 C 库)中的报错,这些错误在系统创建之前就已经存在了。可以选择创建一个新的抑制文件,或是编辑现有的文件(通常是`/usr/lib/valgrind/default.supp`)。 Memcheck 还有高级功能,比如可以使用[定制内存分配器][22]来[检测内存错误][21]。除此之外, Memcheck 提供[监控命令][23],当用到 Valgrind 内置的 gdbserver ,以及[客户端请求][24]机制(不仅能把程序的行为告知 Memcheck ,还可以进行查询)时可以使用。 @@ -145,7 +147,7 @@ Memcheck 还有高级功能,比如可以使用[定制内存分配器][22]来[ 无论是对于初学者还是那些需要高级特性的人来说, Memcheck 都是一款便捷的内存调试工具。如果你仅需要基本调试和错误检查, Memcheck 会非常容易上手。而当你想要使用像抑制文件或者监控指令这样的特性,就需要花一些功夫学习了。 -虽然罗列了大量的局限性,但是 Valgrind(包括 Memcheck )在它的网站上声称全球有[成千上万程序员][30]使用了此工具。开发团队称收到来自超过 30 个国家的用户反馈,而这些用户的工程代码有的高达 2.5 千万行。 +虽然罗列了大量的局限性,但是 Valgrind(包括 Memcheck )在它的网站上声称全球有[成千上万程序员][30]使用了此工具。开发团队称收到来自超过 30 个国家的用户反馈,而这些用户的工程代码有的高达两千五百万行。 ### [Memwatch][31] ### @@ -163,24 +165,25 @@ Memwatch 支持用 C 语言所编写的程序。也可以在 C++ 程序中使用 #### 更新内容 #### -这个版本添加了 *ULONG_LONG_MAX* 以区分 32 位和 64 位程序。 +这个版本添加了`ULONG_LONG_MAX`以区分 32 位和 64 位程序。 #### 有何优点 #### -跟 Dmalloc 一样, Memwatch 也有优秀的文档资料。参考 USING 文件,可以学习如何使用 Memwatch ,可以了解 Memwatch 是如何初始化、如何清理以及如何进行 I/O 操作,等等。还有一个 FAQ 文件,旨在帮助用户解决使用过程遇到的一般问题。最后还有一个 *test.c* 文件提供工作案例参考。 +跟 Dmalloc 一样, Memwatch 也有优秀的文档资料。参考 USING 文件,可以学习如何使用 Memwatch ,可以了解 Memwatch 是如何初始化、如何清理以及如何进行 I/O 操作,等等。还有一个 FAQ 文件,旨在帮助用户解决使用过程遇到的一般问题。最后还有一个`test.c`文件提供工作案例参考。 ![cw memwatch output](http://images.techhive.com/images/article/2015/11/cw_memwatch_output-100627038-large.idge.png) -Memwatch -不同于 Mtrace , Memwatch 产生的日志文件(通常是 *memwatch.log* )是人类可阅读的格式。而且, Memwatch 每次运行时总会把内存调试结果拼接到输出文件的末尾。如此便可在需要之时轻松查看之前的输出信息。 +*Memwatch* + +不同于 Mtrace , Memwatch 产生的日志文件(通常是`memwatch.log`)是人类可阅读的格式。而且, Memwatch 每次运行时总会把内存调试结果拼接到输出该文件的末尾。如此便可在需要之时轻松查看之前的输出信息。 同样值得一提的是当你执行了启用 Memwatch 的程序, Memwatch 会在[标准输出][34]中产生一个单行输出,告知发现了错误,然后你可以在日志文件中查看输出细节。如果没有产生错误信息,就可以确保日志文件不会写入任何错误,多次运行的话确实能节省时间。 -另一个我喜欢的优点是 Memwatch 还提供了在源码中获取其输出信息的方式,你可以获取信息,然后任由你进行处理(参考 Memwatch 源码中的 *mwSetOutFunc()* 函数获取更多有关的信息)。 +另一个我喜欢的优点是 Memwatch 还提供了在源码中获取其输出信息的方式,你可以获取信息,然后任由你进行处理(参考 Memwatch 源码中的`mwSetOutFunc()`函数获取更多有关的信息)。 #### 注意事项 #### -跟 Mtrace 和 Dmalloc 一样, Memwatch 也需要你往你的源文件里增加代码:你需要把 *memwatch.h* 这个头文件包含进你的代码。而且,编译程序的时候,你需要连同 *memwatch.c* 一块编译;或者你可以把已经编译好的目标模块包含起来,然后在命令行定义 *MEMWATCH* 和 *MW_STDIO* 变量。不用说,想要在输出中定位行号, -g 编译器选项也少不了。 +跟 Mtrace 和 Dmalloc 一样, Memwatch 也需要你往你的源文件里增加代码:你需要把`memwatch.h`这个头文件包含进你的代码。而且,编译程序的时候,你需要连同`memwatch.c`一块编译;或者你可以把已经编译好的目标模块包含起来,然后在命令行定义`MEMWATCH`和`MW_STDIO`变量。不用说,想要在输出中定位行号, -g 编译器选项也少不了。 此外, Memwatch 缺少一些特性。比如 Memwatch 不能检测出对一块已经被释放的内存进行写入操作,或是在分配的内存块之外的进行读取操作。而且, Memwatch 也不是线程安全的。还有一点,正如我在开始时指出,在 C++ 程序上运行 Memwatch 的结果是不能预料的。 @@ -198,12 +201,13 @@ Memcheck 可以检测很多内存相关的问题,在处理 C 程序时是非 **许可**:GNU GPL -Mtrace 是 [GNU C 库][36]中的一款内存调试工具,同时支持 Linux 上的 C 和 C++ 程序,可以检测由函数 *malloc()* 和 *free()* 不匹配的调用所引起的内存泄漏问题。 +Mtrace 是 [GNU C 库][36]中的一款内存调试工具,同时支持 Linux 上的 C 和 C++ 程序,可以检测由函数`malloc()`和`free()`不匹配的调用所引起的内存泄漏问题。 ![cw mtrace output](http://images.techhive.com/images/article/2015/11/cw_mtrace-output-100627039-large.idge.png) -Mtrace -Mtrace 的实现实际上是 *mtrace()* 函数,它可以跟踪程序中所有 malloc/free 调用,并在用户指定的文件中记录相关信息。文件以一种机器可读的格式记录数据,所以有一个 Perl 脚本——同样命名为 mtrace ——用来把文件转换并为人类可读格式。 +*Mtrace* + +Mtrace 实际上是实现了一个名为`mtrace()`的函数,它可以跟踪程序中所有 malloc/free 调用,并在用户指定的文件中记录相关信息。文件以一种机器可读的格式记录数据,所以有一个 Perl 脚本——同样命名为 mtrace ——用来把文件转换并为人类可读格式。 #### 更新内容 #### @@ -211,19 +215,19 @@ Mtrace 的实现实际上是 *mtrace()* 函数,它可以跟踪程序中所有 #### 有何优点 #### -Mtrace 最好的地方是它非常简单易学。你只需要了解在你的源码中如何以及何处添加 mtrace() 及对应的 muntrace() 函数,还有如何使用 Mtrace 的 Perl 脚本。后者非常简单,只需要运行指令 *mtrace *(例子见开头截图最后一条指令)。 +Mtrace 最好的地方是它非常简单易学。你只需要了解在你的源码中如何以及何处添加 mtrace() 及对应的 muntrace() 函数,还有如何使用 Mtrace 的 Perl 脚本。后者非常简单,只需要运行指令`mtrace `(例子见开头截图最后一条指令)。 -Mtrace 另外一个优点是它的可收缩性,这体现在不仅可以使用它来调试完整的程序,还可以使用它来检测程序中独立模块的内存泄漏。只需在每个模块里调用 *mtrace()* 和 *muntrace()* 即可。 +Mtrace 另外一个优点是它的可伸缩性,这体现在不仅可以使用它来调试完整的程序,还可以使用它来检测程序中独立模块的内存泄漏。只需在每个模块里调用`mtrace()`和`muntrace()`即可。 -最后一点,因为 Mtrace 会在 *mtrace()*——在源码中添加的函数——执行时被触发,因此可以很灵活地[使用信号][39]动态地(在程序执行时)使能 Mtrace 。 +最后一点,因为 Mtrace 会在`mtrace()`——在源码中添加的函数——执行时被触发,因此可以很灵活地[使用信号][39]动态地(在程序执行时)使能 Mtrace 。 #### 注意事项 #### -因为 *mtrace()* 和 *mauntrace()* 函数 —— 声明在 *mcheck.h* 文件中,所以必须在源码中包含此头文件 —— 的调用是 Mtrace 工作的基础运行( *mauntrace()* 函数并非[总是必要][40]),因此 Mtrace 要求程序员至少改动源码一次。 +因为`mtrace()`和`mauntrace()`函数 —— 声明在`mcheck.h`文件中,所以必须在源码中包含此头文件 —— 的调用是 Mtrace 工作的基础(`mauntrace()`函数并非[总是必要][40]),因此 Mtrace 要求程序员至少改动源码一次。 需要注意的是,在编译程序的时候带上 -g 选项( [GCC][41] 和 [G++][42] 编译器均有提供),才能使调试工具在输出结果时展示正确的行号。除此之外,有些程序(取决于源码体积有多大)可能会花很长时间进行编译。最后,带 -g 选项编译会增加了可执行文件的大小(因为提供了额外的调试信息),因此记得程序需要在测试结束后,不带 -g 选项重新进行编译。 -使用 Mtrace ,你需要掌握 Linux 环境变量的基本知识,因为在程序执行之前,需要把用户把环境变量 *MALLOC_TRACE* 的值设为指定的文件( *mtrace()* 函数将会记录全部信息到其中)路径。 +使用 Mtrace ,你需要掌握 Linux 环境变量的基本知识,因为在程序执行之前,需要把用户把环境变量`MALLOC_TRACE`的值设为指定的文件(`mtrace()`函数将会记录全部信息到其中)路径。 Mtrace 在检测内存泄漏和试图释放未经过分配的内存方面存在局限。它不能检测其它内存相关问题如非法内存访问、使用未初始化内存。而且,[有人抱怨][43] Mtrace 不是[线程安全][44]的。 @@ -237,7 +241,7 @@ Mtrace 在检测内存泄漏和试图释放未经过分配的内存方面存在 虽然 Memwatch 的资料比 Dmalloc 的更加丰富,而且还能检测更多的错误种类,但是你只能在 C 语言写就的程序中使用它。一个让 Memwatch 脱颖而出的特性是它允许在你的程序源码中处理它的输出,这对于想要定制输出格式来说是非常有用的。 -如果改动程序源码非你所愿,那么使用 Electric Fence 吧。不过,请记住, Electric Fence 只能检测两种错误类型,而此二者均非内存泄漏。还有就是,需要了解 GDB 基础以最大化发挥这款内存调试工具的作用。 +如果改动程序源码非你所愿,那么使用 Electric Fence 吧。不过,请记住, Electric Fence 只能检测两种错误类型,而此二者均非内存泄漏。还有就是,需要基本了解 GDB 以最大化发挥这款内存调试工具的作用。 Memcheck 可能是其中综合性最好的了。相比这里提及的其它工具,它能检测更多的错误类型,提供更多的特性,而且不需要你的源码做任何改动。但请注意,基本功能并不难上手,但是想要使用它的高级特性,就必须学习相关的专业知识了。 From 8def8133c619937ac2afc2afdbdb49171424dc72 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 May 2016 10:35:39 +0800 Subject: [PATCH 1407/1710] PUB:20151207 5 great Raspberry Pi projects for the classroom @carolinewuyan @oska874 --- ...Raspberry Pi projects for the classroom.md | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) rename {translated/tech => published}/20151207 5 great Raspberry Pi projects for the classroom.md (87%) diff --git a/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md b/published/20151207 5 great Raspberry Pi projects for the classroom.md similarity index 87% rename from translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md rename to published/20151207 5 great Raspberry Pi projects for the classroom.md index 5204511c1d..ddf2258d97 100644 --- a/translated/tech/20151207 5 great Raspberry Pi projects for the classroom.md +++ b/published/20151207 5 great Raspberry Pi projects for the classroom.md @@ -6,18 +6,20 @@ ### 1. 我的世界: Pi ![](https://opensource.com/sites/default/files/lava.png) ->源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. -我的世界是世界上几乎每一个青少年都特别喜欢的一款游戏,而且它成功抓住了年轻人眼球,成为目前最能激发年轻人创造力的游戏之一。这个树莓派版本自带的我的世界不仅仅是一个具有创造性的建筑游戏,还是一个具有编程接口,可以通过 Python 与之交互的版本。 +*源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]* + +“我的世界”是世界上几乎每一个青少年都特别喜欢的一款游戏,而且它成功抓住了年轻人眼球,成为目前最能激发年轻人创造力的游戏之一。这个树莓派版本自带的我的世界不仅仅是一个具有创造性的建筑游戏,还是一个具有编程接口,可以通过 Python 与之交互的版本。 我的世界:Pi 版对于老师来说是一个教授学生解决问题和编写代码完成任务的好方式。你可以使用 Python API 创建一个房子,并且一直跟随这你的脚步移动,在所到之处建造一座桥,让天空落下熔岩雨滴,在空中显示温度,以及其它你可以想象到的一切东西。 -详情请见 "[Getting Started with Minecraft Pi][2]." +详情请见 "[我的世界: Pi 入门][2]" ### 2. 反应游戏和交通灯 ![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg) ->源于 [Low Voltage Labs][3]. [CC BY-SA 4.0][1]. + +*源于 [Low Voltage Labs][3]. [CC BY-SA 4.0][1]* 使用树莓派可以很轻松地进行物理计算,只需要连接几个 LED 和按钮到开发板上的 GPIO 接口,再用几行代码你就可以按下按钮来开灯。一旦你了解了如何使用代码来完成这些基本的操作,接下来就可以根据你的想象来做其它事情了。 @@ -26,7 +28,8 @@ 代码并不是全部——这只是一个演练,让你理解现实世界里系统是如何完成设计的。计算思维是一个让你终身受用的技能。 ![](https://opensource.com/sites/default/files/reaction-game.png) ->源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. + +*源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]* 接下来试着接通两个按钮和 LED 灯的电源,实现一个双玩家的反应游戏 —— 让 LED 灯随机时间点亮,然后看是谁抢先按下按钮。 @@ -38,25 +41,25 @@ Astro Pi —— 一个增强版的树莓派 —— 将在 12 月问世,但是 [video](https://youtu.be/gfRDFvEVz-w) ->详见 "[探索 Sense HAT][9]." +> 详见 "[探索 Sense HAT][9]." ### 4. 红外鸟笼 ![](https://opensource.com/sites/default/files/ir-bird-box.png) ->源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. + +*源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]* 让整个班级都可以参与进来的好主意是在鸟笼里放置一个树莓派和夜视镜头,以及一些红外线灯,这样子你就可以在黑暗中看见鸟笼里的情况了,然后使用树莓派通过网络串流视频。然后就可以等待小鸟归笼了,你可以在不打扰的情况下近距离观察小窝里的它们了。 -要了解更多有关红外线和光谱的知识,以及如何校准摄像头焦点和使用软件控制摄像头,可以访问 [Make an infrared bird box][10]。 - - +要了解更多有关红外线和光谱的知识,以及如何校准摄像头焦点和使用软件控制摄像头,可以访问 [打造一个红外鸟笼][10]。 ### 5. 机器人 ![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg) ->源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]. -只需要一个树莓派、很少的几个电机和电机控制器,你就可以自己动手制作一个机器人。可以制作的机器人有很多种,从简单的由几个轮子和自制底盘拼凑的简单小车,到由游戏控制器驱动、具有自我意识、配备了传感器,安装了摄像头的金属种马。 +*源于 Raspberry Pi 基金会. [CC BY-SA 4.0][1]* + +只需要一个树莓派、很少的几个电机和电机控制器,你就可以自己动手制作一个机器人。可以制作的机器人有很多种,从简单的由几个轮子和自制底盘拼凑的简单小车,到由游戏控制器驱动、具有自我意识、配备了传感器,安装了摄像头的金属小马。 要学习如何控制不同的电机,可以使用 RTK 电机驱动开发板入门或者使用配置了电机、轮子和传感器的 CamJam 机器人开发套件——具有很大的价值和大量的学习潜力。 From 1d586ec845e76f91f58822a8624a5a48b9c22e2d Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 May 2016 10:52:46 +0800 Subject: [PATCH 1408/1710] PUB:20160415 Docker 1.11 Adopts Open Container Project Components @geekpi --- ...dopts Open Container Project Components.md | 48 ++++++++++++++++++ ...dopts Open Container Project Components.md | 50 ------------------- 2 files changed, 48 insertions(+), 50 deletions(-) create mode 100644 published/20160415 Docker 1.11 Adopts Open Container Project Components.md delete mode 100644 translated/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md diff --git a/published/20160415 Docker 1.11 Adopts Open Container Project Components.md b/published/20160415 Docker 1.11 Adopts Open Container Project Components.md new file mode 100644 index 0000000000..9b73c52b8c --- /dev/null +++ b/published/20160415 Docker 1.11 Adopts Open Container Project Components.md @@ -0,0 +1,48 @@ +Docker 1.11 采纳了开源容器项目(OCP)组件 +======================================================= + +![](http://images.techhive.com/images/article/2015/01/docker-620x465-100559026-primary.idge.jpg) + +> Docker 在开放容器项目(Open Container Project,OCP)中的参与度达成圆满,最新构建的Docker采用了Docker 贡献给 OCP 的组件。 + +新发布的 [Docker 1.11][1] 的最大新闻并不是它的功能,而是它使用了在 OCP 支持下的标准化的组件版本。 + +去年,Docker 贡献了它的 [runC][2] 核心给 OCP 作为构建构建容器工具的基础。同样还有 [containerd][3],作为守护进程或者服务端用于控制 runC 的实例。Docker 1.11 现在使用的就是这个捐赠和公开的版本。 + + +Docker 此举挑战了它的容器生态仍[主要由 Docker 自身决定][6]这个说法。它并不是为了作秀才将容器规范和运行时细节贡献给 OCP。它希望项目将来的开发越开放和广泛越好。 + +![](http://images.techhive.com/images/article/2016/04/docker-runc-100656060-large.idge.png) + +> Docker 1.11 已经用贡献给 OCP 的 runC 和 containerd 进行了重构。runC 如果需要的话可以换成另外一个。 + +runC 的[两位主要提交者][7]来自 Docker,但是来自 Virtuozzo(Parallels fame)、OpenShift、Project Atomic、华为、GE Healthcare、Suse Linux 也都是提交人员里面的常客。 + +Docker 1.11 中一个更明显的变化是先前 Docker runtime 在 Docker 中是唯一可用的,并且评论家认为这个会限制用户的选择。runC runtime 现在是可替换的;虽然 Docker 在发布时将 runC 作为默认引擎,但是任何兼容的引擎都可以用来替换它。(Docker 同样希望它可以不用杀死并重启现在运行的容器,但是这个作为今后的改进规划。) + +Docker 正在将基于 OCP 的开发流程作为内部创建其产品的更好方式。在它发布 1.11 的[官方博客中称][8]:“将 Docker 切分成独立的工具意味着更专注的维护者,最终会有更好的软件质量。” + +除了修复长期以来存在的问题和确保 Docker 的 runC/containerd 跟上步伐,Docker 还在 Docker 1.11 中加入了一些改进。Docker Engine 现在支持 VLAN 和 IPv6 服务发现,并且会自动在多个相同别名容器间执行 DNS 轮询负载均衡。 + + +------------------------------------------------------------------------------ + +via: http://www.infoworld.com/article/3055966/open-source-tools/docker-111-adopts-open-container-project-components.html + +作者:[Serdar Yegulalp][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.infoworld.com/author/Serdar-Yegulalp/ +[1]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ +[2]: http://runc.io/ +[3]: https://containerd.tools/ +[4]: http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker#tk.ifw-infsb +[5]: http://www.infoworld.com/newsletters/signup.html#tk.ifw-infsb +[6]: http://www.infoworld.com/article/2876801/application-virtualization/docker-reorganization-grows-up.html +[7]: https://github.com/opencontainers/runc/graphs/contributors +[8]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ + + diff --git a/translated/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md b/translated/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md deleted file mode 100644 index 98e8d49c06..0000000000 --- a/translated/tech/20160415 Docker 1.11 Adopts Open Container Project Components.md +++ /dev/null @@ -1,50 +0,0 @@ -Docker 1.11采纳了开源容器项目组件 -======================================================= - -![](http://images.techhive.com/images/article/2015/01/docker-620x465-100559026-primary.idge.jpg) - ->Docker参与的开源项目完成了一个闭环,最新构建的Docker采用了Docker贡献给OCP的组件。 - -[Docker 1.11][1]最大的新闻并不是它的功能,而是它使用了在OCP支持下的标准化的组件版本。 - -去年,Docker贡献了它的[runC][2]核心给OCP作为构建构建容器工具的基础。同样还有[containerd][3],作为守护进程或者服务端用于控制runC的实例。Docker 1.11现在使用的是捐赠和公开的版本。 - ->在InfoWorld的[Docker初学者指南][4]中深入这个热门开源框架。今天就拿来看!|在[InfoWorld每日简讯][5]中获取今日的技术新闻。 - ->Docker此举挑战了它的容器生态仍[主要由Docker自身决定][6]的传说。它并不是为了作秀才将容器规范和运行时细节贡献给OCP。它希望项目将来的开发越开放和广泛越好。 - -![](http://images.techhive.com/images/article/2016/04/docker-runc-100656060-large.idge.png) - ->Docker 1.11已经用贡献给OCP的runC和containerd进行了重构。runC如果需要可以被交换出去并被替换。 - -runC的[两位主要提交者][7]来自Docker,但是来自Virtuozzo(Parallels fame)、OpenShift、Project Atomic、华为、GE Healthcare、Suse Linux也都是提交的常客。 - -Docker 1.11中一个更明显的变化是先前Docker运行时在Docker中是唯一可用的,并且评论家认为这个会限制用户的选择。runC运行时现在是可交换的;虽然Docker在发布时将runC作为默认的引擎,但是任何兼容的引擎都可以被交换进入。(Docker同样希望它可以不用杀死并重启现在运行的容器,但是这个作为今后的改进规划。) - -Docker正在将基于OCP开发流程作为内部更好的方式去创建它的产品。在它的发布1.11的[官方博客中称][8]:“将Docker切分成独立的工具意味着更专注的维护者,最终有更好的软件质量。” - -除了修复长期以来存在的问题何确保Docker的runC/containerd跟上步伐,Docker还在Docker 1.11中加入了一些改进。Docker Engine现在支持VLAN和IPv6服务发现,并且会自动在多个相同别名容器间执行DNS轮询负载均衡。 - - - ------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/3055966/open-source-tools/docker-111-adopts-open-container-project-components.html - -作者:[Serdar Yegulalp][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.infoworld.com/author/Serdar-Yegulalp/ -[1]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ -[2]: http://runc.io/ -[3]: https://containerd.tools/ -[4]: http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker#tk.ifw-infsb -[5]: http://www.infoworld.com/newsletters/signup.html#tk.ifw-infsb -[6]: http://www.infoworld.com/article/2876801/application-virtualization/docker-reorganization-grows-up.html -[7]: https://github.com/opencontainers/runc/graphs/contributors -[8]: https://blog.docker.com/2016/04/docker-engine-1-11-runc/ - - From a3f6f50ebbd349548835a51d279a0d270ac8a956 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 18 May 2016 19:50:04 +0800 Subject: [PATCH 1409/1710] =?UTF-8?q?20160518-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0160516 Scaling Collaboration in DevOps.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/tech/20160516 Scaling Collaboration in DevOps.md diff --git a/sources/tech/20160516 Scaling Collaboration in DevOps.md b/sources/tech/20160516 Scaling Collaboration in DevOps.md new file mode 100644 index 0000000000..ea1e193b96 --- /dev/null +++ b/sources/tech/20160516 Scaling Collaboration in DevOps.md @@ -0,0 +1,67 @@ +Scaling Collaboration in DevOps +================================= + +![](http://devops.com/wp-content/uploads/2016/05/ScalingCollaboration.jpg) + +Those familiar with DevOps generally agree that it is equally as much about culture as it is about technology. There are certainly tools and practices involved in the effective implementation of DevOps, but the foundation of DevOps success is how well [teams and individuals collaborate][1] across the enterprise to get things done more rapidly, efficiently and effectively. + +Most DevOps platforms and tools are designed with scalability in mind. DevOps environments often run in the cloud and tend to be volatile. It’s important for the software that supports DevOps to be able to scale in real time to address spikes and lulls in demand. The same thing is true for the human element as well, but scaling collaboration is a whole different story. + +Collaboration across the enterprise is critical for DevOps success. Great code and development needs to make it over the finish line to production to benefit customers. The challenge organizations face is how to do that seamlessly and with as much speed and automation as possible without sacrificing quality or performance. How can businesses streamline code development and deployment, while maintaining visibility, governance and compliance? + +### Emerging Trends + +First, I want to provide some background and share some data gathered by 451 Research on DevOps and DevOps adoption in general. Cloud, agile and DevOps capabilities are important for organizations today—both in perception and reality. 451 sees enterprise adoption of these things, as well as container technologies, growing—including increased usage in production environments. + +There are a number of advantages to embracing these technologies and methodologies, such as increased flexibility and speed, reduction of costs, improvements in resilience and reliability, and fitness for new or emerging applications. According to 451 Research, organizations also face some barriers including a lack of familiarity and required skills internally, the immaturity of these emerging technologies, and cost and security concerns. + +In the “[Voice of the Enterprise: SDI Q4 2015 survey][2],” 451 Research found that more than half of the respondents (51.7 percent) consider themselves to be late adopters, or even the last adopters of new technology. The flip side of that is that almost half (48.3 percent) label themselves as first or early adopters. + +Those general sentiments are reflected in the survey responses to other questions. When asked about implementation of containers, 50.3 percent stated it is not in their plans at all, while the remaining 49.7 percent are in some state of planning, pilot or active use of container technologies. Nearly two-thirds (65.1 percent) indicated that they use agile development methodologies for application development, but only 39.6 percent responded that they’ve embraced DevOps approaches. Nevertheless, while agile software development has been in the industry for years, 451 notes the impressive adoption of containers and DevOps, given they are emergent trends. + +When asked what the top three IT pain points are, the leading responses were cost or budget, insufficient staff and legacy software issues. As organizations move to cloud, DevOps, and containers issues such as these will need to be addressed, along with how to scale both technologies and collaboration effectively. + +### The Current State + +The industry—driven in large part by the DevOps revolution—is in the midst of a sea change, where software development is becoming more highly integrated across the entire business. The creation of software is less segregated and is more and more a function of collaboration and socialization. + +Concepts and methodologies that were novel or niche just a few years ago have matured quickly to become the mainstream technologies and frameworks that are driving value today. Businesses rely on concepts such as agile, lean, virtualization, cloud, automation and microservices to streamline development and enable them to work more effectively and efficiently at the same time. + +To adapt and evolve, enterprises need to accomplish a number of key tasks. The challenge companies face today is how to accelerate development while reducing costs. Organizations need to eliminate the barriers that exist between IT and the rest of the business, and work cooperatively toward a strategy that provides more effectiveness in a technology-driven, competitive environment. + +Agile, cloud, DevOps and containers all play a role in that process, but the one thing that binds it all is effective collaboration. Each of these technologies and methodologies provides unique benefits, but the real value comes from the organization as a whole—and the tools and platforms used by the organization—being able to collaborate at scale. Successful DevOps implementations also require participation from other stakeholders beyond development and IT operations teams, including security, database, storage and line-of-business teams. + +### Collaboration-as-a-Platform + +There are services and platforms online—such as GitHub—that facilitate and streamline collaboration. The online platform functions as a code repository, but the value extends beyond just providing a place to store code. + +Such a [collaboration platform][4] helps developers and teams collaborate more effectively because it provides a community where the code and process can be shared and discussed. Managers can monitor progress and track what code is shipping next. Developers can experiment with new ideas in a safe environment before taking those experiments to a live production environment, and new ideas and experiments can be effectively communicated to the appropriate teams. + +One of the keys to more agile development and DevOps is to allow developers to test things and gather relevant feedback quickly. The goal is to produce quality code and features faster, not to waste time setting up and managing infrastructure or scheduling more meetings to talk about it. The GitHub platform, for example, enables more effective and scalable collaboration because code review can occur when it is most convenient for the participants. There is no need to try and coordinate and schedule code review meetings, so the developers can continue to work uninterrupted, resulting in greater productivity and job satisfaction. + +Steven Anderson of Sendachi noted that GitHub is a collaboration platform, but it’s also a place for your tools to work with you, too. This means it can help not only with collaboration and continuous integration, but also with code quality. + +One of the benefits of a collaboration platform is that large teams of developers can be broken down into smaller teams that can focus more efficiently on specific components. It also allows things such as document sharing alongside code development to blur the lines between technical and non-technical contributions and enable increased collaboration and visibility. + +### Collaboration is Key + +The importance of collaboration can’t be stressed enough. It is a key tenet of DevOps culture, and it’s vital to agile development and maintaining a competitive edge in today’s world. Executive or management support and internal evangelism are important. Organizations also need to embrace the culture shift—blending skills across functional areas toward a common goal. + +With that culture established, though, effective collaboration is crucial. A collaboration platform is an essential element of collaborating at scale because it streamlines productivity and reduces redundancy and effort, and yields higher quality results at the same time. + + +-------------------------------------------------------------------------------- + +via: http://devops.com/2016/05/16/scaling-collaboration-devops/ + +作者:[TONY BRADLEY][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://devops.com/author/tonybsg/ +[1]: http://devops.com/2014/12/15/four-strategies-supporting-devops-collaboration/ +[2]: https://451research.com/ +[3]: https://451research.com/customer-insight-voice-of-the-enterprise-overview +[4]: http://devops.com/events/analytics-of-collaboration-on-github/ From 82010d8daffaf7c14706764e26395f709c4e8660 Mon Sep 17 00:00:00 2001 From: "eric.xiaozhen" Date: Thu, 19 May 2016 09:58:43 +0800 Subject: [PATCH 1410/1710] Request to translate this article --- .../talk/20160516 Open source from a recruiter's perspective.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20160516 Open source from a recruiter's perspective.md b/sources/talk/20160516 Open source from a recruiter's perspective.md index 15fc396139..e8d48f77d0 100644 --- a/sources/talk/20160516 Open source from a recruiter's perspective.md +++ b/sources/talk/20160516 Open source from a recruiter's perspective.md @@ -1,3 +1,4 @@ +eriwoon 翻译中 -- 2106-May-19 Open source from a recruiter's perspective ============================================ From f3724ec48293f4a45bc73b19d1f8df616afbede1 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 19 May 2016 22:09:20 +0800 Subject: [PATCH 1411/1710] PUB:Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart @ictlyh --- ...d Services SysVinit Systemd and Upstart.md | 124 +++++++----------- 1 file changed, 47 insertions(+), 77 deletions(-) rename {translated/tech => published}/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md (72%) diff --git a/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/published/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md similarity index 72% rename from translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md rename to published/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md index 0c4c1ac766..ff987c3e9b 100644 --- a/translated/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md +++ b/published/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md @@ -1,35 +1,35 @@ -LFCS 系列第七讲: 通过 SysVinit、Systemd 和 Upstart 管理系统自启动进程和服务 +LFCS 系列第七讲:通过 SysVinit、Systemd 和 Upstart 管理系统自启动进程和服务 ================================================================================ -几个月前, Linux 基金会宣布 LFCS(Linux 基金会认证系统管理员) 认证诞生了,这个令人兴奋的新计划定位于让来自全球各地的初级到中级的 Linux 系统管理员得到认证。这其中包括维护已经在运行的系统和服务能力、第一手的问题查找和分析能力、以及决定何时向开发团队提交问题的能力。 +几个月前, Linux 基金会宣布 LFCS (Linux 基金会认证系统管理员) 认证诞生了,这个令人兴奋的新计划定位于让来自全球各地的初级到中级的 Linux 系统管理员得到认证。这其中包括维护已经在运行的系统和服务的能力、第一手的问题查找和分析能力、以及决定何时向开发团队提交问题的能力。 ![Linux Foundation Certified Sysadmin – Part 7](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-7.png) -第七讲: Linux 基金会认证系统管理员 +*第七讲: Linux 基金会认证系统管理员* 下面的视频简要介绍了 Linux 基金会认证计划。 注:youtube 视频 -这篇博文是 10 指南系列中的第七篇,在这篇文章中,我们会介绍如何管理 Linux 系统自启动进程和服务,这是 LFCS 认证考试要求的一部分。 +本讲是系列教程中的第七讲,在这篇文章中,我们会介绍如何管理 Linux 系统自启动进程和服务,这是 LFCS 认证考试要求的一部分。 ### 管理 Linux 自启动进程 ### -Linux 系统的启动程序包括多个阶段,每个阶段由一个不同的组件表示。下面的图示简要总结了启动过程以及所有包括的主要组件。 +Linux 系统的启动程序包括多个阶段,每个阶段由一个不同的图示块表示。下面的图示简要总结了启动过程以及所有包括的主要组件。 ![Linux Boot Process](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-Boot-Process.png) -Linux 启动过程 +*Linux 启动过程* -当你按下你机器上的电源键时, 存储在主板 EEPROM 芯片中的固件初始化 POST(通电自检) 检查系统硬件资源的状态。POST 结束后,固件会搜索并加载位于第一块可用磁盘上的 MBR 或 EFI 分区的第一阶段引导程序,并把控制权交给引导程序。 +当你按下你机器上的电源键时,存储在主板 EEPROM 芯片中的固件初始化 POST(通电自检) 检查系统硬件资源的状态。POST 结束后,固件会搜索并加载位于第一块可用磁盘上的 MBR 或 EFI 分区的第一阶段引导程序,并把控制权交给引导程序。 #### MBR 方式 #### -MBR 是位于 BISO 设置中标记为可启动磁盘上的第一个扇区,大小是 512 个字节。 +MBR 是位于 BIOS 设置中标记为可启动磁盘上的第一个扇区,大小是 512 个字节。 - 前面 446 个字节:包括可执行代码和错误信息文本的引导程序 - 接下来的 64 个字节:四个分区(主分区或扩展分区)中每个分区一条记录的分区表。其中,每条记录标示了每个一个分区的状态(是否活跃)、大小以及开始和结束扇区。 -- 最后 2 个字节: MBR 有效性检查的魔数。 +- 最后 2 个字节: MBR 有效性检查的魔法数。 下面的命令对 MBR 进行备份(在本例中,/dev/sda 是第一块硬盘)。结果文件 mbr.bkp 在分区表被破坏、例如系统不可引导时能排上用场。 @@ -41,7 +41,7 @@ MBR 是位于 BISO 设置中标记为可启动磁盘上的第一个扇区,大 ![Backup MBR in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Backup-MBR-in-Linux.png) -在 Linux 中备份 MBR +*在 Linux 中备份 MBR* **恢复 MBR** @@ -49,7 +49,7 @@ MBR 是位于 BISO 设置中标记为可启动磁盘上的第一个扇区,大 ![Restore MBR in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Restore-MBR-in-Linux.png) -在 Linux 中恢复 MBR +*在 Linux 中恢复 MBR* #### EFI/UEFI 方式 #### @@ -74,11 +74,11 @@ init 和 systemd 都是管理其它守护进程的守护进程(后台进程) ![Systemd and Init](http://www.tecmint.com/wp-content/uploads/2014/10/systemd-and-init.png) -Systemd 和 Init +*Systemd 和 Init* ### 自启动服务(SysVinit) ### -Linux 中运行等级的概念表示通过控制运行哪些服务来以不同方式使用系统。换句话说,运行等级控制着当前执行状态下可以完成什么任务(以及什么不能完成)。 +Linux 中运行等级通过控制运行哪些服务来以不同方式使用系统。换句话说,运行等级控制着当前执行状态下可以完成什么任务(以及什么不能完成)。 传统上,这个启动过程是基于起源于 System V Unix 的形式,通过执行脚本启动或者停止服务从而使机器进入指定的运行等级(换句话说,是一个不同的系统运行模式)。 @@ -88,47 +88,17 @@ Linux 中运行等级的概念表示通过控制运行哪些服务来以不同 除了启动系统进程,init 还会查看 /etc/inittab 来决定进入哪个运行等级。 -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Runlevel Description
0 停止系统。运行等级 0 是一个用于快速关闭系统的特殊过渡状态。
1 别名为 s 或 S,这个运行等级有时候也称为维护模式。在这个运行等级启动的服务由于发行版不同而不同。通常用于正常系统操作损坏时低级别的系统维护。
2 多用户。在 Debian 系统及其衍生版中,这是默认的运行等级,还包括了一个图形化登录(如果有的话)。在基于红帽的系统中,这是没有网络的多用户模式。
3 在基于红帽的系统中,这是默认的多用户模式,运行除了图形化环境以外的所有东西。基于 Debian 的系统中通常不会使用这个运行等级以及等级 4 和 5。
4 通常默认情况下不使用,可用于自定制。
5 基于红帽的系统中,支持 GUI 登录的完全多用户模式。这个运行等级和等级 3 类似,但是有可用的 GUI 登录。
6 重启系统。
+ +|Runlevel| Description| +|--------|------------| +|0|停止系统。运行等级 0 是一个用于快速关闭系统的特殊过渡状态。| +|1|别名为 s 或 S,这个运行等级有时候也称为维护模式。在这个运行等级启动的服务由于发行版不同而不同。通常用于正常系统操作损坏时低级别的系统维护。| +|2|多用户。在 Debian 系统及其衍生版中,这是默认的运行等级,还包括了一个图形化登录(如果有的话)。在基于红帽的系统中,这是没有网络的多用户模式。| +|3|在基于红帽的系统中,这是默认的多用户模式,运行除了图形化环境以外的所有东西。基于 Debian 的系统中通常不会使用这个运行等级以及等级 4 和 5。| +|4|通常默认情况下不使用,可用于自定制。| +|5|基于红帽的系统中,支持 GUI 登录的完全多用户模式。这个运行等级和等级 3 类似,但是有可用的 GUI 登录。| +|6|重启系统。| + 要在运行等级之间切换,我们只需要使用 init 命令更改运行等级:init N(其中 N 是上面列出的一个运行等级)。 请注意这并不是运行中的系统切换运行等级的推荐方式,因为它不会给已经登录的用户发送警告(因而导致他们丢失工作以及进程异常终结)。 @@ -139,7 +109,7 @@ Linux 中运行等级的概念表示通过控制运行哪些服务来以不同 id:2:initdefault: -并用你喜欢的文本编辑器,例如 vim(本系列的[第二讲 : 如何在 Linux 中使用 vi/vim 编辑器][2]),更改数字 2 为想要的运行等级。 +并用你喜欢的文本编辑器,例如 vim(本系列的 [LFCS 系列第二讲:如何安装和使用纯文本编辑器 vi/vim][2]),更改数字 2 为想要的运行等级。 然后,以 root 用户执行 @@ -149,7 +119,7 @@ Linux 中运行等级的概念表示通过控制运行哪些服务来以不同 ![Change Runlevels in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Runlevels-in-Linux.jpeg) -在 Linux 中更改运行等级 +*在 Linux 中更改运行等级* #### 使用 chkconfig 管理服务 #### @@ -165,7 +135,7 @@ Linux 中运行等级的概念表示通过控制运行哪些服务来以不同 ![Listing Runlevel Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Listing-Runlevel-Configuration.png) -列出运行等级配置 +*列出运行等级配置* 从上图中我们可以看出,当系统进入运行等级 2 到 5 的时候就会启动 postfix,而默认情况下运行等级 2 到 4 时会运行 mysqld。现在假设我们并不希望如此。 @@ -183,7 +153,7 @@ Linux 中运行等级的概念表示通过控制运行哪些服务来以不同 ![在 Linux 中启用/停用服务Enable Disable Services in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Disable-Services.png) -启用/停用服务 +*启用/停用服务* 我们在基于 Debian 的系统中使用 sysv-rc-conf 完成类似任务。 @@ -193,32 +163,32 @@ Linux 中运行等级的概念表示通过控制运行哪些服务来以不同 1. 我们可以用下面的命令查看启动 mdadm 时的运行等级。 - # ls -l /etc/rc[0-6].d | grep -E 'rc[0-6]|mdadm' + # 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](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Service-Runlevel.png) -查看运行中服务的运行等级 + *查看运行中服务的运行等级* 2. 我们使用 sysv-rc-conf 设置防止 mdadm 在运行等级2 之外的其它等级启动。只需根据需要(你可以使用上下左右按键)选中或取消选中(通过空格键)。 - # sysv-rc-conf + # sysv-rc-conf -![Sysv 运行等级配置SysV Runlevel Config](http://www.tecmint.com/wp-content/uploads/2014/10/SysV-Runlevel-Config.png) + ![Sysv 运行等级配置SysV Runlevel Config](http://www.tecmint.com/wp-content/uploads/2014/10/SysV-Runlevel-Config.png) -Sysv 运行等级配置 + *Sysv 运行等级配置* -然后输入 q 退出。 + 然后输入 q 退出。 3. 重启系统并从步骤 1 开始再操作一遍。 - # ls -l /etc/rc[0-6].d | grep -E 'rc[0-6]|mdadm' + # 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](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Service-Runlevel.png) -验证服务运行等级 + *验证服务运行等级* -从上图中我们可以看出 mdadm 配置为只在运行等级 2 上启动。 + 从上图中我们可以看出 mdadm 配置为只在运行等级 2 上启动。 ### 那关于 systemd 呢? ### @@ -232,11 +202,11 @@ systemd 是另外一个被多种主流 Linux 发行版采用的服务和系统 ![在 Linux 中查看运行中的进程Check All Running Processes in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-All-Running-Processes.png) -查看运行中的进程 +*查看运行中的进程* LOAD 一列显示了单元(UNIT 列,显示服务或者由 systemd 维护的其它进程)是否正确加载,ACTIVE 和 SUB 列则显示了该单元当前的状态。 -显示服务当前状态的信息 +**显示服务当前状态的信息** 当 ACTIVE 列显示某个单元状态并非活跃时,我们可以使用以下命令查看具体原因。 @@ -248,7 +218,7 @@ LOAD 一列显示了单元(UNIT 列,显示服务或者由 systemd 维护的 ![查看 Linux 服务状态Check Linux Service Status](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Service-Status.png) -查看服务状态 +*查看服务状态* 我们可以看到 media-samba.mount 失败的原因是 host dev1 上的挂载进程无法找到 //192.168.0.10/gacanepa 上的共享网络。 @@ -262,9 +232,9 @@ LOAD 一列显示了单元(UNIT 列,显示服务或者由 systemd 维护的 # 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) +![启动停止服务](http://www.tecmint.com/wp-content/uploads/2014/10/Starting-Stoping-Service.jpeg) -启动停止服务 +*启动停止服务* **启用或停用某服务随系统启动** @@ -278,7 +248,7 @@ LOAD 一列显示了单元(UNIT 列,显示服务或者由 systemd 维护的 ![启用或停用服务](http://www.tecmint.com/wp-content/uploads/2014/10/Enabling-Disabling-Services.jpeg) -启用或停用服务 +*启用或停用服务* 你也可以用下面的命令查看某个服务的当前状态(启用或者停用)。 @@ -358,13 +328,13 @@ via: http://www.tecmint.com/linux-boot-process-and-manage-services/ 作者:[Gabriel Cánepa][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/gacanepa/ [1]:http://www.tecmint.com/systemd-replaces-init-in-linux/ -[2]:http://www.tecmint.com/vi-editor-usage/ +[2]:https://linux.cn/article-7165-1.html [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/ From 00f2e0e11c865569941e20e1165d3e73ca4944e5 Mon Sep 17 00:00:00 2001 From: hkurj <663831938@qq.com> Date: Thu, 19 May 2016 22:15:12 +0800 Subject: [PATCH 1412/1710] ok --- ...action-packed experience with Wikipedia.md | 75 ------------------- ...action-packed experience with Wikipedia.md | 74 ++++++++++++++++++ 2 files changed, 74 insertions(+), 75 deletions(-) delete mode 100644 sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md create mode 100644 translated/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md diff --git a/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md b/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md deleted file mode 100644 index 4621c50a97..0000000000 --- a/sources/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md +++ /dev/null @@ -1,75 +0,0 @@ -hkurj translating -A four year, action-packed experience with Wikipedia -======================================================= - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/wikipedia_checkuser_lead.jpg?itok=4lVDjSSM) - - -I consider myself to be an Odia Wikimedian. I contribute [Odia][1] knowledge (the predominant language of the Indian state of [Odisha][2]) to many Wikimedia projects, like Wikipedia and Wikisource, by writing articles and correcting mistakes in articles. I also contribute to Hindi and English Wikipedia articles. - -![](https://opensource.com/sites/default/files/resize/1st_day_at_odia_wikipedia_workshop_image_source_facebook-200x133.jpg) - -My love for Wikimedia started while I was reading an article about the [Bangladesh Liberation war][3] on the English Wikipedia after my 10th board exam (like, an annual exam for 10th grade students in America). By mistake I clicked on a link that took me to an India Wikipedia article, and I started reading. Something was written in Odia on the lefthand side of the article, so I clicked on that, and reached a [ଭାରତ/Bhārat][4] article on the Odia Wikipedia. I was excited to find a Wikipedia article in my native language! - -![](https://opensource.com/sites/default/files/resize/introducing_wikipedia_at_google_io_image_by_gdg_bhubaneswar-251x166.png) - -A banner inviting readers to be part of the 2nd Bhubaneswar workshop on April 1, 2012 sparked my curiousity. I had never contributed to Wikipedia before, only used it for research, and I wasn't familiar with open source and the community contribution process. Plus, I was only 15 years old. I registered. There were many language enthusiasts at the workshop, and all older than me. My father encouraged me to the participate despite my fear; he has played an important role—he's not a Wikimedian, like me, but his encouragement has helped me change Odia Wikipedia and participate in community activities. - -I believe that knowledge about Odia language and literature needs to improve—there are many misconceptions and knowledge gaps—so, I help organize events and workshops for Odia Wikipedia. On my accomplished list at the point, I have: - -* initiated three major edit-a-thons in Odia Wikipedia: Women's Day 2015, Women's Day 2016, abd [Nabakalebara edit-a-thon 2015][5] -* initiated a photograph contest to get more [Rathyatra][6] images from all over the India -* represented Odia Wikipedia during two events by Google ([Google I/O extended][7] and Google Dev Fest) -* spoke at [Perception][8] 2015 and the first [Open Access India][9] meetup - -![](https://opensource.com/sites/default/files/resize/bengali_wikipedia_10th_anniversary_cc-by-sa4.0_biswaroop_ganguly-251x166.jpg) - -I was just an editor to Wikipedia projects until last year, in January 2015, when I attended [Bengali Wikipedia's 10th anniversary conference][10] and [Vishnu][11], the director of the [Center for Internet and Society][12] at the time, invited me to attend the [Train the Trainer][13] Program. I was inspired to start doing outreach for Odia Wikipedia and hosting meetups for [GLAM]14] activities and training new Wikimedians. These experience taught me how to work with a community of contributors. - -[Ravi][15], the director of Wikimedia India at the time, also played an important role in my journey. He trusted me and made me a part of [Wiki Loves Food][16], a public photo competition on Wikimedia Commons, and the organizing committee of [Wikiconference India 2016][17]. During Wiki Loves Food 2015, my team helped add 10,000+ CC BY-SA images on Wikimedia Commons. Ravi further solidified my commitment by sharing a lot of information with me about the Wikimedia movement, and his own journey, during [Odia Wikipedia's 13th anniversary][18]. - -Less than a year later, in December 2015, I became a Program Associate at the Center for Internet and Society's [Access to Knowledge program][19] (CIS-A2K). One of my proud moments was at a workshop in Puri, India where we helped bring 20 new Wikimedian editors to the Odia Wikimedia community. Now, I mentor Wikimedians during an informal meetup called [WikiTungi][20] Puri. I am working with this group to make Odia Wikiquotes a live project. I am also dedicated to bridging the gender gap in Odia Wikipedia. [Eight female editors][21] are now helping to organize meetups and workshops, and participate in the [Women's History month edit-a-thon][22]. - -During my brief but action-packed journey during the four years since, I have also been involved in the [Wikipedia Education Program][23], the [newsletter team][24], and two global edit-a-thons: [Art and Feminsim][25] and [Menu Challenge][26]. I look forward to the many more to come! - -I would also like to thank [Sameer][27] and [Anna][28] (both previous members of the Wikipedia Education Program). - ------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/4/my-open-source-story-sailesh-patnaik - -作者:[Sailesh Patnaik][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/saileshpat -[1]: https://en.wikipedia.org/wiki/Odia_language -[2]: https://en.wikipedia.org/wiki/Odisha -[3]: https://en.wikipedia.org/wiki/Bangladesh_Liberation_War -[4]: https://or.wikipedia.org/s/d2 -[5]: https://or.wikipedia.org/s/toq -[6]: https://commons.wikimedia.org/wiki/Commons:The_Rathyatra_Challenge -[7]: http://cis-india.org/openness/blog-old/odia-wikipedia-meets-google-developer-group -[8]: http://perception.cetb.in/events/odia-wikipedia-event/ -[9]: https://opencon2015kolkata.sched.org/speaker/sailesh.patnaik007 -[10]: https://meta.wikimedia.org/wiki/Bengali_Wikipedia_10th_Anniversary_Celebration_Kolkata -[11]: https://www.facebook.com/vishnu.vardhan.50746?fref=ts -[12]: http://cis-india.org/ -[13]: https://meta.wikimedia.org/wiki/CIS-A2K/Events/Train_the_Trainer_Program/2015 -[14]: https://en.wikipedia.org/wiki/Wikipedia:GLAM -[15]: https://www.facebook.com/ravidreams?fref=ts -[16]: https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Food -[17]: https://meta.wikimedia.org/wiki/WikiConference_India_2016 -[18]: https://or.wikipedia.org/s/sml -[19]: https://meta.wikimedia.org/wiki/CIS-A2K -[20]: https://or.wikipedia.org/s/xgx -[21]: https://or.wikipedia.org/s/ysg -[22]: https://or.wikipedia.org/s/ynj -[23]: https://outreach.wikimedia.org/wiki/Education -[24]: https://outreach.wikimedia.org/wiki/Talk:Education/News#Call_for_volunteers -[25]: https://en.wikipedia.org/wiki/User_talk:Saileshpat#Barnstar_for_Art_.26_Feminism_Challenge -[26]: https://opensource.com/life/15/11/tasty-translations-the-open-source-way -[27]: https://www.facebook.com/samirsharbaty?fref=ts -[28]: https://www.facebook.com/anna.koval.737?fref=ts diff --git a/translated/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md b/translated/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md new file mode 100644 index 0000000000..ce5bb497d7 --- /dev/null +++ b/translated/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md @@ -0,0 +1,74 @@ +在维基激动人心的四年 +======================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/wikipedia_checkuser_lead.jpg?itok=4lVDjSSM) + + +我自认为自己是个奥迪亚的维基人。我通过写文章和纠正错误的文章贡献[奥迪亚][1]知识(在印度的[奥里萨邦][2]的主要的语言 )给很多维基项目,像维基百科和维基文库,我也为用印地语和英语写的维基文章做贡献。 + +![](https://opensource.com/sites/default/files/resize/1st_day_at_odia_wikipedia_workshop_image_source_facebook-200x133.jpg) + +我对维基的爱从我第 10 次考试(像在美国的 10 年级学生的年级考试)之后看到的英文维基文章[孟加拉解放战争][3]开始。一不小心我打开了印度维基文章的链接,,并且开始阅读它. 在文章左边有用奥迪亚语写的东西, 所以我点击了一下, 打开了一篇在奥迪亚维基上的 [????/Bhārat][4] 文章. 发现了用母语写的维基让我很激动! + +![](https://opensource.com/sites/default/files/resize/introducing_wikipedia_at_google_io_image_by_gdg_bhubaneswar-251x166.png) + +一个邀请读者参加 2014 年 4 月 1 日第二次布巴内斯瓦尔的研讨会的标语引起了我的好奇。我过去从来没有为维基做过贡献, 只用它搜索过, 我并不熟悉开源和社区贡献流程。加上,我只有 15 岁。我注册了。在研讨会上有很多语言爱好者,我是中间最年轻的一个。尽管我害怕我父亲还是鼓励我去参与。他起了非常重要的作用—他不是一个维基媒体人,和我不一样,但是他的鼓励给了我改变奥迪亚维基的动力和参加社区活动的勇气。 + +我相信奥迪亚语言和文学需要改进很多错误的想法和知识缺口所以,我帮助组织关于奥迪亚维基的活动和和研讨会,我完成了如下列表: + +* 发起3次主要的 edit-a-thons 在奥迪亚维基:2015 年妇女节,2016年妇女节, abd [Nabakalebara edit-a-thon 2015][5] +* 在全印度发起了征集[檀车节][6]图片的比赛 +* 在谷歌的两大事件([谷歌I/O大会扩展][7]和谷歌开发节)中代表奥迪亚维基 +* 在2015[Perception][8]和第一次[Open Access India][9]会议 + +![](https://opensource.com/sites/default/files/resize/bengali_wikipedia_10th_anniversary_cc-by-sa4.0_biswaroop_ganguly-251x166.jpg) + +我只编辑维基项目到了去年,在 2015 年一月,当我出席[孟加拉语维基百科的十周年会议][10]和[毗瑟挐]活动时[11],[互联网和社会中心][12]主任,邀请我参加[培训培训师][13] 计划。我的灵感始于扩展奥迪亚维基,为[华丽][14]的活动举办的聚会和培训新的维基人。这些经验告诉我作为一个贡献者该如何为社区工作。 + +[Ravi][15],在当时维基的主任,在我的旅程也发挥了重要作用。他非常相信我让我参与到了[Wiki Loves Food][16],维基共享中的公共摄影比赛,组织方是[2016 印度维基会议][17]。在2015的 Loves Food 活动期间,我的团队在维基共享中加入了 10,000+ 有 CC BY-SA 协议的图片。Ravi 进一步巩固了我的承诺,和我分享很多关于维基媒体运动的信息,和他自己在 [奥迪亚维基百科13周年][18]的经历。 + +不到一年后,在 2015 年十二月,我成为了网络与社会中心的[获取知识的程序][19]的项目助理( CIS-A2K 运动)。我自豪的时刻之一是在普里的研讨会,我们从印度带了 20 个新的维基人来编辑奥迪亚维基媒体社区。现在,我的指导者在一个普里非正式聚会被叫作[WikiTungi][20]。我和这个小组一起工作,把 wikiquotes 变成一个真实的计划项目。在奥迪亚维基我也致力于缩小性别差距。[八个女编辑][21]也正帮助组织聚会和研讨会,参加 [Women's History month edit-a-thon][22]。 + +在我四年短暂而令人激动的旅行之中,我也参与到 [维基百科的教育项目][23],[通讯团队][24],两个全球的 edit-a-thons: [Art and Feminsim][25] 和 [Menu Challenge][26]。我期待着更多的到来! + +我还要感谢 [Sameer][27] 和 [Anna][28](都是之前维基百科教育计划的成员)。 + +------------------------------------------------------------------------------ + +via: https://opensource.com/life/16/4/my-open-source-story-sailesh-patnaik + +作者:[Sailesh Patnaik][a] +译者:[译者ID](https://github.com/hkurj) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/saileshpat +[1]: https://en.wikipedia.org/wiki/Odia_language +[2]: https://en.wikipedia.org/wiki/Odisha +[3]: https://en.wikipedia.org/wiki/Bangladesh_Liberation_War +[4]: https://or.wikipedia.org/s/d2 +[5]: https://or.wikipedia.org/s/toq +[6]: https://commons.wikimedia.org/wiki/Commons:The_Rathyatra_Challenge +[7]: http://cis-india.org/openness/blog-old/odia-wikipedia-meets-google-developer-group +[8]: http://perception.cetb.in/events/odia-wikipedia-event/ +[9]: https://opencon2015kolkata.sched.org/speaker/sailesh.patnaik007 +[10]: https://meta.wikimedia.org/wiki/Bengali_Wikipedia_10th_Anniversary_Celebration_Kolkata +[11]: https://www.facebook.com/vishnu.vardhan.50746?fref=ts +[12]: http://cis-india.org/ +[13]: https://meta.wikimedia.org/wiki/CIS-A2K/Events/Train_the_Trainer_Program/2015 +[14]: https://en.wikipedia.org/wiki/Wikipedia:GLAM +[15]: https://www.facebook.com/ravidreams?fref=ts +[16]: https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Food +[17]: https://meta.wikimedia.org/wiki/WikiConference_India_2016 +[18]: https://or.wikipedia.org/s/sml +[19]: https://meta.wikimedia.org/wiki/CIS-A2K +[20]: https://or.wikipedia.org/s/xgx +[21]: https://or.wikipedia.org/s/ysg +[22]: https://or.wikipedia.org/s/ynj +[23]: https://outreach.wikimedia.org/wiki/Education +[24]: https://outreach.wikimedia.org/wiki/Talk:Education/News#Call_for_volunteers +[25]: https://en.wikipedia.org/wiki/User_talk:Saileshpat#Barnstar_for_Art_.26_Feminism_Challenge +[26]: https://opensource.com/life/15/11/tasty-translations-the-open-source-way +[27]: https://www.facebook.com/samirsharbaty?fref=ts +[28]: https://www.facebook.com/anna.koval.737?fref=ts From 182bb5bcab56ab86b557cbf58f3bb29a925f73d4 Mon Sep 17 00:00:00 2001 From: hkurj <663831938@qq.com> Date: Thu, 19 May 2016 22:16:08 +0800 Subject: [PATCH 1413/1710] ok --- ...0415 A four year, action-packed experience with Wikipedia.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md b/translated/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md index ce5bb497d7..b2be6a7a01 100644 --- a/translated/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md +++ b/translated/talk/my-open-source-story/20160415 A four year, action-packed experience with Wikipedia.md @@ -23,7 +23,7 @@ ![](https://opensource.com/sites/default/files/resize/bengali_wikipedia_10th_anniversary_cc-by-sa4.0_biswaroop_ganguly-251x166.jpg) -我只编辑维基项目到了去年,在 2015 年一月,当我出席[孟加拉语维基百科的十周年会议][10]和[毗瑟挐]活动时[11],[互联网和社会中心][12]主任,邀请我参加[培训培训师][13] 计划。我的灵感始于扩展奥迪亚维基,为[华丽][14]的活动举办的聚会和培训新的维基人。这些经验告诉我作为一个贡献者该如何为社区工作。 +我只编辑维基项目到了去年,在 2015 年一月,当我出席[孟加拉语维基百科的十周年会议][10]和[毗瑟挐][11]活动时,[互联网和社会中心][12]主任,邀请我参加[培训培训师][13] 计划。我的灵感始于扩展奥迪亚维基,为[华丽][14]的活动举办的聚会和培训新的维基人。这些经验告诉我作为一个贡献者该如何为社区工作。 [Ravi][15],在当时维基的主任,在我的旅程也发挥了重要作用。他非常相信我让我参与到了[Wiki Loves Food][16],维基共享中的公共摄影比赛,组织方是[2016 印度维基会议][17]。在2015的 Loves Food 活动期间,我的团队在维基共享中加入了 10,000+ 有 CC BY-SA 协议的图片。Ravi 进一步巩固了我的承诺,和我分享很多关于维基媒体运动的信息,和他自己在 [奥迪亚维基百科13周年][18]的经历。 From f051e571046137604fc03fff4817b3f234cd6dc1 Mon Sep 17 00:00:00 2001 From: cposture Date: Fri, 20 May 2016 01:29:44 +0800 Subject: [PATCH 1414/1710] Translating by cposture --- sources/tech/20160512 Bitmap in Linux Kernel.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160512 Bitmap in Linux Kernel.md b/sources/tech/20160512 Bitmap in Linux Kernel.md index b7e832ba0a..06297fa204 100644 --- a/sources/tech/20160512 Bitmap in Linux Kernel.md +++ b/sources/tech/20160512 Bitmap in Linux Kernel.md @@ -1,3 +1,4 @@ +[Translating By cposture 20160520] Data Structures in the Linux Kernel ================================================================================ From b00b9fbf4ed6ce3482532cfc2f5f0d5cf76428f8 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Thu, 19 May 2016 23:42:26 -0500 Subject: [PATCH 1415/1710] Translation in progress by KevinSJ (#3992) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @KevinSJ 下次最好在本地的repo 里面提交一次,再发起 PR 。万一我手抖了弄错了就不好了 --- ...n introduction to data processing with Cassandra and Spark.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md b/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md index 149ab6fbb7..46331a9ae5 100644 --- a/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md +++ b/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md @@ -1,3 +1,4 @@ +Translating KevinSJ An introduction to data processing with Cassandra and Spark ============================================================== From 8ed7798fd9392bdfde0610edcca48ac86cf7331f Mon Sep 17 00:00:00 2001 From: FSSlc Date: Fri, 20 May 2016 22:58:49 +0800 Subject: [PATCH 1416/1710] =?UTF-8?q?=E9=A6=96=E6=AC=A1=E6=A0=A1=E5=AF=B9?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160225 The Tao of project management.md | 106 ++++++++---------- 1 file changed, 45 insertions(+), 61 deletions(-) diff --git a/translated/tech/20160225 The Tao of project management.md b/translated/tech/20160225 The Tao of project management.md index e0238e2cee..758a7d0217 100644 --- a/translated/tech/20160225 The Tao of project management.md +++ b/translated/tech/20160225 The Tao of project management.md @@ -4,63 +4,55 @@ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUSINESS_orgchart1.png?itok=DGsp6jB5) -[道德经][1],[据确认][2]为公元前六世纪的圣人[老子][3]所编写,是现存被翻译的语言版本最多的经文。从[宗教][4]到[关于约会的有趣电影][5]等一切的一切,它都影响至深,作者们借用它来隐喻,以解释各种各样的事情(甚至是[编程][6])。 +[道德经][1],[被认为][2]是由圣人[老子][3]于公元前六世纪时所编写,是现存最为广泛翻译的经文之一。从[宗教][4]到[关于约会的有趣电影][5]等方方面面,它都深深地影响着它们,作者们借用它来做隐喻,以解释各种各样的事情(甚至是[编程][6])。 -当考虑开放性组织的项目管理时上面这段文字会立马浮现在我脑海。 +在思考有关开放性组织的项目管理时,我的脑海中便立马浮现出上面的这段文字。 -这听起来会很奇怪。要理解我为什么会有这种想法,应该是从读了*《开放性组织:点燃激情提升执行力》*这书开始的,它是红帽公司总裁、CEO Jim Whitehurst 所著作的关于企业文化和新领导榜样的宣言。在这本书里,Jim(给予其它红帽子人的一点帮助而) 解释了传统组织机构(“自上而下”的方式,做决定的是高层,命令下达到员工,而员工是通过薪酬和晋升来激励的)和开放组织机构(自下而上,领导专注于激励和鼓励,员工被充分授权使其发挥主观能动性而做得最好)的差异。 +这听起来可能会有点奇怪。若要理解我的这种想法从何而来,你应该读读 +*《开放性组织:点燃激情提升执行力》* 这本书,它是红帽公司总裁、首席执行官 Jim Whitehurst 所写的一本有关企业文化和新领导力范式的宣言。在这本书中,Jim(还有来自其他红帽人的一点帮助)解释了传统组织机构(一种 “自上而下” 的方式,来自高层的决策被传达到员工,而员工通过晋升和薪酬来激励)和开放性组织机构(一种 自下而上 的方式,领导专注于激励和鼓励,员工被充分授权以各尽其能)之间的差异。 -在开放性组织中的员工意味有激情、有目的性和有参与感,这些我认为是项目管理者应该关注的。 +在开放性组织中的员工都是被激情、目标和参与感所激励,这个观点正是我认为项目管理者所应该关注的。 -要解释这一切,让我们回到*道德经*上来。 +要解释这一切,我将从*道德经*上寻找依据。 ### 不要让工作职衔框住自身 ->道,可道, ->非常道; ->名,可名, ->非常名。 +>道,可道也,非恒道也。名,可名也,非恒名也。 ->无,名天地之始; ->有,名万物之母。 +>“无”,名天地之始;“有”,名万物之母。 [[1]][7] -项目管理到底是什么?做为一个项目管理者应该做些什么呢? +项目管理到底是什么?作为一个项目管理者应该做些什么呢? -如您所想,项目管理者的一部分工作就是管理项目:收集需求、项目相关人员的沟通、设置项目优先级、安排任务、帮助团队解决困扰。许多教育培训机构都可以教授如何做好项目管理,这些技能值得去学习。 +如您所想,项目管理者的一部分工作就是管理项目:收集需求、与项目相关人员沟通、设置项目优先级、安排任务、帮助团队解决困扰。许多机构都可以教你如何做好项目管理,并且这些技能你值得拥有。 -然而,在开放性组织中,字面上的项目管理技能仅仅只是项目管理者需要做到一小部分,这些组织需要更多的:勇气。如果您擅长于管理项目(或者是真的擅长于任何工作),那么您就进入了舒适区。这时候就是需要鼓起勇气开始尝试冒险之时。 +然而,在开放性组织中,字面上的项目管理技能仅仅只是项目管理者需要做到一小部分,这些组织需要更多其他的东西:即勇气。如果你擅长于管理项目(或者是真的擅长于任何工作),那么你就进入了舒适区。这时候就是需要鼓起勇气开始尝试冒险之时。 -您有勇气跨出舒适区吗?向权威人士提出提出挑战性问题,可能会引发对方的不快,也可能会发现一个好的方法,您有勇气这样做吗?有确定需要做的下一件事,然后真正去完成它的勇气吗?有主动去解决因为沟通空白而留下的问题的勇气吗?有去尝试各种事情的勇气吗?有失败的勇气吗? +您有勇气跨出舒适区吗?向权威人士提出挑战性的问题,可能会引发对方的不快,但也可能会开启一个更好的方法,您有勇气这样做吗?有确定需要做的下一件事,然后真正去完成它的勇气吗?有主动去解决因为交流的鸿沟而遗留下来的问题的勇气吗?有去尝试各种事情的勇气吗?有失败的勇气吗? -道德经的开篇(上面引用的)就表明词语、标签、名字这些是有限制的,也包括工作职衔。在开放性组织中,项目经理不仅仅是执行管理项目所需的机械任务,而且要帮助团队完成组织的使命,尽管只是定义。 +道德经的开篇(上面引用的)就表明词语、标签、名字这些是有限制的,当然也包括工作职衔。在开放性组织中,项目经理不仅仅是执行管理项目所需的机械任务,而且要帮助团队完成组织的使命,尽管这已经被限定了。 -### 结交正确的人 +### 联系起合适的人 ->三十辐共一毂, ->当其无, ->有车之用。 +>三十辐共一轂,当其无,有车之用。 [[11]][8] -当我开始学习要过渡到项目管理时,遇到最困难的一课就是并不是所有解决方案都是可接受的,甚至有的连预期都达不到。那对我来说是全新的,我喜欢所有的解决方案。但作为项目管理者,我的角色更多的是与人沟通--因此与那些有解决方案的人合作更有效率。 +当我过渡到项目管理的工作时,我必须学会的最为困难的一课是:并不是所有解决方案都是完全可接受的,甚至有的连预期都达不到。这对我来说是全新的,我喜欢所有的解决方案。但作为项目管理者,我的角色更多的是与人沟通--使得那些确实有解决方案的人可以更高效地合作。 -这决不是逃避责任和不负责的意思。这意味着可以很舒适的说,“我不知道,但我会给您找出答案”,然后就可迅速的关闭此循环。 +这并不是逃避责任或者不负责。这意味着可以很舒适的说,“我不知道,但我会给你找出答案”,然后就可迅速地结束这个循环。 -想像马车的车轮。无中心孔的稳定性和方向,辐条车轮会自行崩溃。在一个开放性的组织中,项目管理者可以帮助一个团队,把正确的人凝聚在一起,主持积极讨论,以保持团队一直前进。 +想像一下马车的车轮,如果没有毂中的孔洞所提供的稳定性和方向,辐条便会失去支持,车轮也会散架。在一个开放性的组织中,项目管理者可以通过把合适的人凝聚在一起,培养正确的讨论话题来帮助团队保持持续向前的动力。 -### 信任您的团队 +### 信任你的团队 ->太上, 不知有之; ->其次,亲而誉之; ->其次,畏之; ->其次,侮之。 +>太上,不知有之;其次,亲而誉之;其次,畏之;其次,侮之。 > >信不足焉,有不信焉。 > ->悠兮,其贵言。功成事遂,百姓皆谓“我自然”。 +>悠兮,其贵言。功成事遂,百姓皆谓:“我自然”。 [[17]][9] -[Rebecca Fernandez][10]曾经告诉我开放性组织的领导与其它最大的不同点,不是取得别人的信任,而是信任别人。 +[Rebecca Fernandez][10]曾经告诉我开放性组织的领导与其它组织的领导者最大的不同点在于,我们不取得别人的信任,而是信任别人。 开放性组织会雇佣那些非常聪明的,且对公司正在做的事情充满激情的人来做工作。为了能使他们能更好的工作,我们会提供其所需,并尊重他们的工作方式。 @@ -71,61 +63,54 @@ >上德无为而无以为;下德为之而有以为。 [[38]][11] -你认识总是忙忙碌碌的这种类型的人吗?认识因为有太多事情要做而看起来疲倦和压抑的人吗? +你认识那类总是极其忙碌的人吗?认识那些因为有太多事情要做而看起来疲倦和压抑的人吗? 不要成为那样的人。 -我知道说比做容易。要远离那种人最有帮助的事就是请记住大家都很忙。我没有那样讨厌的同事。 +我知道说比做容易。帮助我没有成为那类人的最重要的东西是:我时刻记着*大家都很忙*这件事。我没有一个那样无聊的同事。 -但需要有人在狂风暴雨中保持镇定;需要这样的人,能根据实际和一天工作时间的数量找到平衡参数的方式来做工作,并安慰团队让一切都好(因为这是我们正在做的事实)。 +但总需要有人成为在狂风暴雨中仍保持镇定的人。总需要有人能够宽慰团队告诉他们一切都会好起来,我们将在现实和一天中工作时间有限的情况下,找到方法使得任务能够完成(因为事实就是这样的,而且我们必须这样)。 -要成为那样的人。 +成为那样的人吧。 -道德经所说的,在我理解来就是总是夸夸其谈的人其实并没有干实事。如里您能把工作做的得心应手的话,那就说明您的工作做对了。 +对于上面这段道德经所说的,我的理解是那些总是谈论他或她正在做什么的人实际上并*没有时间*去做他们谈论的事。如果相比于你周围的人,你能把你的工作做的毫不费劲,那就说明你的工作做对了。 -### 作为一个文化传教士 +### 做一名文化传教士 ->上士闻道,勤而行之; ->中士闻道,若存若亡; ->下士闻道,大笑之。 ->不笑不足以为道。 +>上士闻道,勤而行之;中士闻道,若存若亡;下士闻道,大笑之。不笑不足以為道。 [[41]][12] -去年秋天,我跟着一群联邦雇员注册了一个工商管理硕士课程。当我开始介绍我公司的文化、价值和伦理框架以及公司如何运行时,我的同学和教授都认为我就像一个天真可爱的小姑娘在做着[许多甜美的白日梦][13],这就是我得到的直接印象。他们告诉我事情并不是如此的。他们告诉我应该进一步考察。 +去年秋天,我跟着一群联邦雇员注册了一个工商管理硕士课程。当我开始介绍我们公司的文化、价值和伦理框架时,我得到的直接印象是:我的同学和教授都认为我就像一个天真可爱的小姑娘,做着许多关于公司应该如何运作的[甜美白日梦][13]。他们告诉我事情不可能是它们看起来的那样,他们还告诉我应该进一步考察。 -所有我照做了。 +所以我照做了。 -到现在我发现:正是如此。 +然而我发现的是:事情*恰好*是他们看起来的那样。 -开放性组织的企业文化。应该跟随着企业的成长而时时维护那些文化,以使它随时精神焕发,充满斗志。我(和其它开源组织的成员)并不想过如我同学所描述的“为生活而工作”。我需要有激情和有目的性;我需要明白自己的日常工作如何对那些有价值的东西服务。 +在开放性组织,关于企业文化,人们应该随着企业的成长而时时维护那些文化,以使它随时精神焕发,充满斗志。我(和其它开源组织的成员)并不想过如我同学所描述的那样,“为生活而工作”。我需要有激情、有目标,需要明白自己的日常工作是如何对那些我所坚信的东西做贡献的。 -作为一个项目管理者,虽然你的工作与培养你的团队的文化无关,但是工作本身就是文化。 +作为一个项目管理者,你可能会认为在你的团队中,你的工作对培养你们公司的企业文化没有多少帮助。然而你的工作正是孕育文化本身。 -### 持续改善 +### Kaizen (持续改善) ->为学日益, ->为道日损, ->损之又损,以至于无为。无为而无不为,取天下常以无事 +>为学日益,为道日损。损之又损,以至于无为。无为而无不为。 [[48]][14] -虽然项目管理的一般领域都太过于专注最新最强大的的工具,但是您应该使用哪种工具这问题的答案总是一致的:“最简单的”。 +项目管理的一般领域都太过于专注最新、最强大的的工具,但对于应该使用哪种工具,这个问题的答案总是一致的:“最简单的”。 -例如,我将任务列表放在桌面的一个文本文件中,因为它很单纯,没有不必要的干扰。您想介绍给团队的,无论是何种工具、流程和程序都应该是能提高效率,排除障碍的,而不是引入额外的复杂性。所以不应该专注于工具本身,而应该专注于使用这些工具来解决的问题。 +例如,我将任务列表放在桌面的一个文本文件中,因为它很单纯,不会受到不必要的干扰。您想介绍给团队的,无论是何种工具、流程和程序都应该是能提高效率,排除障碍的,而不是引入额外的复杂性。所以与其专注于工具,还不如专注于要使用这些工具来解决的*问题*。 -我最喜欢的一个项目经理在一个灵活的世界是有自由扔什么不工作。在 Agile world 中我喜欢项目管理者能自由的做决定,抛出不能做的工作。这就是改善的概念,或叫“持续改进”。不要害怕尝试和失败。失败是我们在学习的过程中所用的标签,不能代表什么,但这是提高的唯一方式。 +作为一个项目经理,我最喜爱的部分是在敏捷世界中,我有自由抛弃那些没有成效的东西的权利。这与 kaizen 的概念相关,或叫 “持续改进”。不要害怕尝试和失败。失败是我们在探索什么能够起作用,什么不能起作用的过程中所用的标签,这是提高的唯一方式。 - -最好的过程都不是一蹴而就的。作为项目管理者,您应该帮助您的团队,支持团队让其自己提升,而不是强迫团队。 +最好的过程都不是一蹴而就的。作为项目管理者,你应该通过支持他们,而不是强迫他们去做某些事来帮助你的团队。 ### 实践 >天下皆谓我"道"大,似不肖。夫唯大,故似不肖。若肖,久矣其细也夫! [[67]][15] -我相信开放性组织正在做的。开放性组织在管理领域的工作几乎和他们所提供的产品和服务一样重要。我们有机会以身作则,激发他人的激情和目的,创造激励和充分授权的工作环境。 - -我鼓励您们找到办法把这些想法融入到自己的项目和团队中,看看会发生什么。了解组织的使命和您的项目怎么样帮助它们。鼓起勇气,尝试一些不好的事情,同时不要忘记和我们的社区分享你所学到的经验,这样我们就可以继续改进。 +我相信开放性组织正在做的事。开放性组织在管理领域的工作几乎与他们提供的产品和服务一样重要。我们有机会以身作则,激发他人的激情和目的,创造激励和充分授权的工作环境。 +我鼓励你们找到办法把这些想法融入到自己的项目和团队中,看看会发生什么。了解你们组织的使命,知晓你的项目是如何为这个使命做贡献的。鼓起勇气,尝试某些看起来没有多少成效的事,同时不要忘记和我们的社区分享你所学到的经验,这样我们就可以继续改进。 -------------------------------------------------------------------------------- @@ -133,7 +118,7 @@ via: https://opensource.com/open-organization/16/2/tao-project-management 作者:[Allison Matlack][a] 译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +校对:[FSSlc](https://github.com/FSSlc) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -146,11 +131,10 @@ via: https://opensource.com/open-organization/16/2/tao-project-management [6]: http://www.mit.edu/~xela/tao.html [7]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#1 [8]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#11 -[9]:http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#17 +[9]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#17 [10]: https://opensource.com/users/rebecca [11]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#38 [12]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#41 [13]: https://opensource.com/open-organization/15/9/reflections-open-organization-starry-eyed-dreamer [14]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#48 -[15]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#67 - +[15]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#67 \ No newline at end of file From adb009ba1e6a6cefcc6ef150cb3c8b4e6fd90596 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 21 May 2016 10:16:31 +0800 Subject: [PATCH 1417/1710] =?UTF-8?q?20160521-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit python3 , encrypt , --- ...160518 Python 3: An Intro to Encryption.md | 278 ++++++++++++++++++ 1 file changed, 278 insertions(+) create mode 100644 sources/tech/20160518 Python 3: An Intro to Encryption.md diff --git a/sources/tech/20160518 Python 3: An Intro to Encryption.md b/sources/tech/20160518 Python 3: An Intro to Encryption.md new file mode 100644 index 0000000000..43c042d5c1 --- /dev/null +++ b/sources/tech/20160518 Python 3: An Intro to Encryption.md @@ -0,0 +1,278 @@ +Python 3: An Intro to Encryption +=================================== + +Python 3 doesn’t have very much in its standard library that deals with encryption. Instead, you get hashing libraries. We’ll take a brief look at those in the chapter, but the primary focus will be on the following 3rd party packages: PyCrypto and cryptography. We will learn how to encrypt and decrypt strings with both of these libraries. + +--- + +### Hashing + +If you need secure hashes or message digest algorithms, then Python’s standard library has you covered in the **hashlib** module. It includes the FIPS secure hash algorithms SHA1, SHA224, SHA256, SHA384, and SHA512 as well as RSA’s MD5 algorithm. Python also supports the adler32 and crc32 hash functions, but those are in the **zlib** module. + +One of the most popular uses of hashes is storing the hash of a password instead of the password itself. Of course, the hash has to be a good one or it can be decrypted. Another popular use case for hashes is to hash a file and then send the file and its hash separately. Then the person receiving the file can run a hash on the file to see if it matches the hash that was sent. If it does, then that means no one has changed the file in transit. + + +Let’s try creating an md5 hash: + +``` +>>> import hashlib +>>> md5 = hashlib.md5() +>>> md5.update('Python rocks!') +Traceback (most recent call last): + File "", line 1, in + md5.update('Python rocks!') +TypeError: Unicode-objects must be encoded before hashing +>>> md5.update(b'Python rocks!') +>>> md5.digest() +b'\x14\x82\xec\x1b#d\xf6N}\x16*+[\x16\xf4w' +``` + +Let’s take a moment to break this down a bit. First off, we import **hashlib** and then we create an instance of an md5 HASH object. Next we add some text to the hash object and we get a traceback. It turns out that to use the md5 hash, you have to pass it a byte string instead of a regular string. So we try that and then call it’s **digest** method to get our hash. If you prefer the hex digest, we can do that too: + +``` +>>> md5.hexdigest() +'1482ec1b2364f64e7d162a2b5b16f477' +``` + +There’s actually a shortcut method of creating a hash, so we’ll look at that next when we create our sha512 hash: + +``` +>>> sha = hashlib.sha1(b'Hello Python').hexdigest() +>>> sha +'422fbfbc67fe17c86642c5eaaa48f8b670cbed1b' +``` + +As you can see, we can create our hash instance and call its digest method at the same time. Then we print out the hash to see what it is. I chose to use the sha1 hash as it has a nice short hash that will fit the page better. But it’s also less secure, so feel free to try one of the others. + +--- + +### Key Derivation + +Python has pretty limited support for key derivation built into the standard library. In fact, the only method that hashlib provides is the **pbkdf2_hmac** method, which is the PKCS#5 password-based key derivation function 2. It uses HMAC as its psuedorandom function. You might use something like this for hashing your password as it supports a salt and iterations. For example, if you were to use SHA-256 you would need a salt of at least 16 bytes and a minimum of 100,000 iterations. + +As a quick aside, a salt is just random data that you use as additional input into your hash to make it harder to “unhash” your password. Basically it protects your password from dictionary attacks and pre-computed rainbow tables. + +Let’s look at a simple example: + +``` +>>> import binascii +>>> dk = hashlib.pbkdf2_hmac(hash_name='sha256', + password=b'bad_password34', + salt=b'bad_salt', + iterations=100000) +>>> binascii.hexlify(dk) +b'6e97bad21f6200f9087036a71e7ca9fa01a59e1d697f7e0284cd7f9b897d7c02' +``` + +Here we create a SHA256 hash on a password using a lousy salt but with 100,000 iterations. Of course, SHA is not actually recommended for creating keys of passwords. Instead you should use something like **scrypt** instead. Another good option would be the 3rd party package, bcrypt. It is designed specifically with password hashing in mind. + +--- + +### PyCryptodome + +The PyCrypto package is probably the most well known 3rd party cryptography package for Python. Sadly PyCrypto’s development stopping in 2012. Others have continued to release the latest version of PyCryto so you can still get it for Python 3.5 if you don’t mind using a 3rd party’s binary. For example, I found some binary Python 3.5 wheels for PyCrypto on Github (https://github.com/sfbahr/PyCrypto-Wheels). + +Fortunately there is a fork of the project called PyCrytodome that is a drop-in replacement for PyCrypto. To install it for Linux, you can use the following pip command: + + +``` +pip install pycryptodome +``` + +Windows is a bit different: + +``` +pip install pycryptodomex +``` + +If you run into issues, it’s probably because you don’t have the right dependencies installed or you need a compiler for Windows. Check out the PyCryptodome [website][1] for additional installation help or to contact support. + +Also worth noting is that PyCryptodome has many enhancements over the last version of PyCrypto. It is well worth your time to visit their home page and see what new features exist. + +### Encrypting a String + +Once you’re done checking their website out, we can move on to some examples. For our first trick, we’ll use DES to encrypt a string: + +``` +>>> from Crypto.Cipher import DES +>>> key = 'abcdefgh' +>>> def pad(text): + while len(text) % 8 != 0: + text += ' ' + return text +>>> des = DES.new(key, DES.MODE_ECB) +>>> text = 'Python rocks!' +>>> padded_text = pad(text) +>>> encrypted_text = des.encrypt(text) +Traceback (most recent call last): + File "", line 1, in + encrypted_text = des.encrypt(text) + File "C:\Programs\Python\Python35-32\lib\site-packages\Crypto\Cipher\blockalgo.py", line 244, in encrypt + return self._cipher.encrypt(plaintext) +ValueError: Input strings must be a multiple of 8 in length +>>> encrypted_text = des.encrypt(padded_text) +>>> encrypted_text +b'>\xfc\x1f\x16x\x87\xb2\x93\x0e\xfcH\x02\xd59VQ' +``` + +This code is a little confusing, so let’s spend some time breaking it down. First off, it should be noted that the key size for DES encryption is 8 bytes, which is why we set our key variable to a size letter string. The string that we will be encrypting must be a multiple of 8 in length, so we create a function called **pad** that can pad any string out with spaces until it’s a multiple of 8. Next we create an instance of DES and some text that we want to encrypt. We also create a padded version of the text. Just for fun, we attempt to encrypt the original unpadded variant of the string which raises a **ValueError**. Here we learn that we need that padded string after all, so we pass that one in instead. As you can see, we now have an encrypted string! + +Of course the example wouldn’t be complete if we didn’t know how to decrypt our string: + +``` +>>> des.decrypt(encrypted_text) +b'Python rocks! ' +``` + +Fortunately, that is very easy to accomplish as all we need to do is call the **decrypt** method on our des object to get our decrypted byte string back. Our next task is to learn how to encrypt and decrypt a file with PyCrypto using RSA. But first we need to create some RSA keys! + +### Create an RSA Key + +If you want to encrypt your data with RSA, then you’ll need to either have access to a public / private RSA key pair or you will need to generate your own. For this example, we will just generate our own. Since it’s fairly easy to do, we will do it in Python’s interpreter: + +``` +>>> from Crypto.PublicKey import RSA +>>> code = 'nooneknows' +>>> key = RSA.generate(2048) +>>> encrypted_key = key.exportKey(passphrase=code, pkcs=8, + protection="scryptAndAES128-CBC") +>>> with open('/path_to_private_key/my_private_rsa_key.bin', 'wb') as f: + f.write(encrypted_key) +>>> with open('/path_to_public_key/my_rsa_public.pem', 'wb') as f: + f.write(key.publickey().exportKey()) +``` + +First we import **RSA** from **Crypto.PublicKey**. Then we create a silly passcode. Next we generate an RSA key of 2048 bits. Now we get to the good stuff. To generate a private key, we need to call our RSA key instance’s **exportKey** method and give it our passcode, which PKCS standard to use and which encryption scheme to use to protect our private key. Then we write the file out to disk. + +Next we create our public key via our RSA key instance’s **publickey** method. We used a shortcut in this piece of code by just chaining the call to exportKey with the publickey method call to write it to disk as well. + +### Encrypting a File + +Now that we have both a private and a public key, we can encrypt some data and write it to a file. Here’s a pretty standard example: + +``` +from Crypto.PublicKey import RSA +from Crypto.Random import get_random_bytes +from Crypto.Cipher import AES, PKCS1_OAEP + +with open('/path/to/encrypted_data.bin', 'wb') as out_file: + recipient_key = RSA.import_key( + open('/path_to_public_key/my_rsa_public.pem').read()) + session_key = get_random_bytes(16) + + cipher_rsa = PKCS1_OAEP.new(recipient_key) + out_file.write(cipher_rsa.encrypt(session_key)) + + cipher_aes = AES.new(session_key, AES.MODE_EAX) + data = b'blah blah blah Python blah blah' + ciphertext, tag = cipher_aes.encrypt_and_digest(data) + + out_file.write(cipher_aes.nonce) + out_file.write(tag) + out_file.write(ciphertext) +``` + +The first three lines cover our imports from PyCryptodome. Next we open up a file to write to. Then we import our public key into a variable and create a 16-byte session key. For this example we are going to be using a hybrid encryption method, so we use PKCS#1 OAEP, which is Optimal asymmetric encryption padding. This allows us to write a data of an arbitrary length to the file. Then we create our AES cipher, create some data and encrypt the data. This will return the encrypted text and the MAC. Finally we write out the nonce, MAC (or tag) and the encrypted text. + +As an aside, a nonce is an arbitrary number that is only used for crytographic communication. They are usually random or pseudorandom numbers. For AES, it must be at least 16 bytes in length. Feel free to try opening the encrypted file in your favorite text editor. You should just see gibberish. + +Now let’s learn how to decrypt our data: + +``` +from Crypto.PublicKey import RSA +from Crypto.Cipher import AES, PKCS1_OAEP + +code = 'nooneknows' + +with open('/path/to/encrypted_data.bin', 'rb') as fobj: + private_key = RSA.import_key( + open('/path_to_private_key/my_rsa_key.pem').read(), + passphrase=code) + + enc_session_key, nonce, tag, ciphertext = [ fobj.read(x) + for x in (private_key.size_in_bytes(), + 16, 16, -1) ] + + cipher_rsa = PKCS1_OAEP.new(private_key) + session_key = cipher_rsa.decrypt(enc_session_key) + + cipher_aes = AES.new(session_key, AES.MODE_EAX, nonce) + data = cipher_aes.decrypt_and_verify(ciphertext, tag) + +print(data) +``` + +If you followed the previous example, this code should be pretty easy to parse. In this case, we are opening our encrypted file for reading in binary mode. Then we import our private key. Note that when you import the private key, you must give it your passcode. Otherwise you will get an error. Next we read in our file. You will note that we read in the private key first, then the next 16 bytes for the nonce, which is followed by the next 16 bytes which is the tag and finally the rest of the file, which is our data. + +Then we need to decrypt our session key, recreate our AES key and decrypt the data. + +You can use PyCryptodome to do much, much more. However we need to move on and see what else we can use for our cryptographic needs in Python. + +--- + +### The cryptography package + +The **cryptography** package aims to be “cryptography for humans” much like the **requests** library is “HTTP for Humans”. The idea is that you will be able to create simple cryptographic recipes that are safe and easy-to-use. If you need to, you can drop down to low=level cryptographic primitives, which require you to know what you’re doing or you might end up creating something that’s not very secure. + +If you are using Python 3.5, you can install it with pip, like so: + +``` +pip install cryptography +``` + +You will see that cryptography installs a few dependencies along with itself. Assuming that they all completed successfully, we can try encrypting some text. Let’s give the **Fernet** symmetric encryption algorithm. The Fernet algorithm guarantees that any message you encrypt with it cannot be manipulated or read without the key you define. Fernet also support key rotation via **MultiFernet**. Let’s take a look at a simple example: + +``` +>>> from cryptography.fernet import Fernet +>>> cipher_key = Fernet.generate_key() +>>> cipher_key +b'APM1JDVgT8WDGOWBgQv6EIhvxl4vDYvUnVdg-Vjdt0o=' +>>> cipher = Fernet(cipher_key) +>>> text = b'My super secret message' +>>> encrypted_text = cipher.encrypt(text) +>>> encrypted_text +(b'gAAAAABXOnV86aeUGADA6mTe9xEL92y_m0_TlC9vcqaF6NzHqRKkjEqh4d21PInEP3C9HuiUkS9f' + b'6bdHsSlRiCNWbSkPuRd_62zfEv3eaZjJvLAm3omnya8=') +>>> decrypted_text = cipher.decrypt(encrypted_text) +>>> decrypted_text +b'My super secret message' +``` + +First off we need to import Fernet. Next we generate a key. We print out the key to see what it looks like. As you can see, it’s a random byte string. If you want, you can try running the **generate_key** method a few times. The result will always be different. Next we create our Fernet cipher instance using our key. + +Now we have a cipher we can use to encrypt and decrypt our message. The next step is to create a message worth encrypting and then encrypt it using the **encrypt** method. I went ahead and printed our the encrypted text so you can see that you can no longer read the text. To **decrypt** our super secret message, we just call decrypt on our cipher and pass it the encrypted text. The result is we get a plain text byte string of our message. + +--- + +### Wrapping Up + +This chapter barely scratched the surface of what you can do with PyCryptodome and the cryptography packages. However it does give you a decent overview of what can be done with Python in regards to encrypting and decrypting strings and files. Be sure to read the documentation and start experimenting to see what else you can do! + +--- + +### Related Reading + +PyCrypto Wheels for Python 3 on [github][2] + +PyCryptodome [documentation][3] + +Python’s Cryptographic [Services][4] + +The cryptography package’s [website][5] + +------------------------------------------------------------------------------ + +via: http://www.blog.pythonlibrary.org/2016/05/18/python-3-an-intro-to-encryption/ + +作者:[Mike][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.blog.pythonlibrary.org/author/mld/ +[1]: http://pycryptodome.readthedocs.io/en/latest/ +[2]: https://github.com/sfbahr/PyCrypto-Wheels +[3]: http://pycryptodome.readthedocs.io/en/latest/src/introduction.html +[4]: https://docs.python.org/3/library/crypto.html +[5]: https://cryptography.io/en/latest/ From e09c30b9119649247e05e6b3c5b51628e72ab03f Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 21 May 2016 15:21:53 +0800 Subject: [PATCH 1418/1710] =?UTF-8?q?20160521-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker , Raspberry PI --- ... Rapid prototyping with docker-compose.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sources/tech/20160512 Rapid prototyping with docker-compose.md diff --git a/sources/tech/20160512 Rapid prototyping with docker-compose.md b/sources/tech/20160512 Rapid prototyping with docker-compose.md new file mode 100644 index 0000000000..0c67223697 --- /dev/null +++ b/sources/tech/20160512 Rapid prototyping with docker-compose.md @@ -0,0 +1,142 @@ + +Rapid prototyping with docker-compose +======================================== + +In this write-up we'll look at a Node.js prototype for **finding stock of the Raspberry PI Zero** from three major outlets in the UK. + +I wrote the code and deployed it to an Ubuntu VM in Azure within a single evening of hacking. Docker and the docker-compose tool made the deployment and update process extremely quick. + +### Remember linking? + +If you've already been through the [Hands-On Docker tutorial][1] then you will have experience linking Docker containers on the command line. Linking a Node hit counter to a Redis server on the command line may look like this: + +``` +$ docker run -d -P --name redis1 +$ docker run -d hit_counter -p 3000:3000 --link redis1:redis +``` + +Now imagine your application has three tiers + +- Web front-end +- Batch tier for processing long running tasks +- Redis or mongo database + +Explicit linking through `--link` is just about manageable with a couple of containers, but can get out of hand as we add more tiers or containers to the application. + +### Enter docker-compose + +![](http://blog.alexellis.io/content/images/2016/05/docker-compose-logo-01.png) +>Docker Compose logo + +The docker-compose tool is part of the standard Docker Toolbox and can also be downloaded separately. It provides a rich set of features to configure all of an application's parts through a plain-text YAML file. + +The above example would look like this: + +``` +version: "2.0" +services: + redis1: + image: redis + hit_counter: + build: ./hit_counter + ports: + - 3000:3000 +``` + +From Docker 1.10 onwards we can take advantage of network overlays to help us scale out across multiple hosts. Prior to this linking only worked across a single host. The `docker-compose scale` command can be used to bring on more computing power as the need arises. + +>View the [docker-compose][2] reference on docker.com + +### Real-world example: Raspberry PI Stock Alert + +![](http://blog.alexellis.io/content/images/2016/05/Raspberry_Pi_Zero_ver_1-3_1_of_3_large.JPG) +>The new Raspberry PI Zero v1.3 image courtesy of Pimoroni + +There is a huge buzz around the Raspberry PI Zero - a tiny microcomputer with a 1GHz CPU and 512MB RAM capable of running full Linux, Docker, Node.js, Ruby and many other popular open-source tools. One of the best things about the PI Zero is that costs only 5 USD. That also means that stock gets snapped up really quickly. + +*If you want to try Docker or Swarm on the PI check out the tutorial below.* + +>[Docker Swarm on the PI Zero][3] + +### Original site: whereismypizero.com + +I found a webpage which used screen scraping to find whether 4-5 of the most popular outlets had stock. + +- The site contained a static HTML page +- Issued one XMLHttpRequest per outlet accessing /public/api/ +- The server issued the HTTP request to each shop and performed the scraping + +Every call to /public/api/ took 3 seconds to execute and using Apache Bench (ab) I was only able to get through 0.25 requests per second. + +### Reinventing the wheel + +The retailers didn't seem to mind whereismypizero.com scraping their sites for stock, so I set about writing a similar tool from the ground up. I had the intention of handing a much higher amount of requests per second through caching and de-coupling the scrape from the web tier. Redis was the perfect tool for the job. It allowed me to set an automatically expiring key/value pair (i.e. a simple cache) and also to transmit messages between Node processes through pub/sub. + +>Fork or star the code on Github: [alexellis/pi_zero_stock][4] + +If you've worked with Node.js before then you will know it is single-threaded and that any CPU intensive tasks such as parsing HTML or JSON could lead to a slow-down. One way to mitigate that is to use a second worker process and a Redis messaging channel as connective tissue between this and the web tier. + +- Web tier + -Gives 200 for cache hit (Redis key exists for store) + -Gives 202 for cache miss (Redis key doesn't exist, so issues message) + -Since we are only ever reading a Redis key the response time is very quick. +- Stock Fetcher + -Performs HTTP request + -Scrapes for different types of web stores + -Updates a Redis key with a cache expire of 60 seconds + -Also locks a Redis key to prevent too many in-flight HTTP requests to the web stores. +``` +version: "2.0" +services: + web: + build: ./web/ + ports: + - "3000:3000" + stock_fetch: + build: ./stock_fetch/ + redis: + image: redis +``` + +*The docker-compose.yml file from the example.* + +Once I had this working locally deploying to an Ubuntu 16.04 image in the cloud (Azure) took less than 5 minutes. I logged in, cloned the repository and typed in `docker compose up -d`. That was all it took - rapid prototyping a whole system doesn't get much better. Anyone (including the owner of whereismypizero.com) can deploy the new solution with just two lines: + +``` +$ git clone https://github.com/alexellis/pi_zero_stock +$ docker-compose up -d +``` + +Updating the site is easy and just involves a `git pull` followed by a `docker-compose up -d` with the `--build` argument passed along. + +If you are still linking your Docker containers manually, try Docker Compose for yourself or my code below: + +>Fork or star the code on Github: [alexellis/pi_zero_stock][5] + +### Check out the test site + +The test site is currently deployed now using docker-compose. + +>[stockalert.alexellis.io][6] + +![](http://blog.alexellis.io/content/images/2016/05/Screen-Shot-2016-05-16-at-22-34-26-1.png) + +Preview as of 16th of May 2016 + +---------- +via: http://blog.alexellis.io/rapid-prototype-docker-compose/ + +作者:[Alex Ellis][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://blog.alexellis.io/author/alex/ +[1]: http://blog.alexellis.io/handsondocker +[2]: https://docs.docker.com/compose/compose-file/ +[3]: http://blog.alexellis.io/dockerswarm-pizero/ +[4]: https://github.com/alexellis/pi_zero_stock +[5]: https://github.com/alexellis/pi_zero_stock +[6]: http://stockalert.alexellis.io/ + From abe380f19dfca8d160106bcd204f662dd6f002c8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 22 May 2016 19:47:46 +0800 Subject: [PATCH 1419/1710] =?UTF-8?q?20160522-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cloud , storage --- ...sharing: integrating Pydio and ownCloud.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md diff --git a/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md b/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md new file mode 100644 index 0000000000..0461fda34d --- /dev/null +++ b/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md @@ -0,0 +1,65 @@ +The future of sharing: integrating Pydio and ownCloud +========================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_darwincloud_520x292_0311LL.png?itok=5yWIaEDe) +>Image by : +opensource.com + +The open source file sharing ecosystem accommodates a large variety of projects, each supplying their own solution, and each with a different approach. There are a lot of reasons to choose an open source solution rather than commercial solutions like Dropbox, Google Drive, iCloud, or OneDrive. These solutions offer to take away worries about managing your data but come with certain limitations, including a lack of control and integration into existing infrastructure. + +There are quite a few file sharing and sync alternatives available to users, including ownCloud and Pydio. + +### Pydio + +The Pydio (Put your data in orbit) project was founded by musician Charles du Jeu, who needed a way to share large audio files with his bandmates. [Pydio][1] is a file sharing and sync solution, with multiple storage backends, designed with developers and system administrators in mind. It has over one million downloads worldwide and has been translated into 27 languages. + +Open source from the very start, the project grew organically on [SourceForge][2] and now finds its home on [GitHub][3]. + +The user interface is based on Google's [Material Design][4]. Users can use an existing legacy file infrastructure or set up Pydio with an on-premise approach, and use web, desktop, and mobile applications to manage their assets everywhere. For administrators, the fine-grained access rights are a powerful tool for configuring access to assets.​ + +On the [Pydio community page][5], you will find several resources to get you up to speed quickly. The Pydio website gives some clear guidelines on [how to contribute][6] to the Pydio repositories on GitHub. The [forum][7] includes sections for developers and community. + +### ownCloud + +[ownCloud][8] has over 8 million users worldwide and is an open source, self-hosted file sync and sharing technology. There are sync clients for all major platforms as well as WebDAV through a web interface. ownCloud has an easy to use interface, powerful administrator tools, and extensive sharing and collaboration features—designed to give users control over their data. + +ownCloud's open architecture is extensible via an API and offers a platform for apps. Over 300 applications have been written, featuring capabilities like handling calendar, contacts, mail, music, passwords, notes, and many other types of data. ownCloud provides security, scales from a Raspberry Pi to a cluster with petabytes of storage and millions of users, and is developed by an international community of hundreds of contributors. + +### Federated sharing + +File sharing is starting to shift toward teamwork, and standardization provides a solid basis for such collaboration. + +Federated sharing, a new open standard supported by the [OpenCloudMesh][9] project, is a step in that direction. Among other things, it allows for the sharing of files and folders between servers that support this, like Pydio and ownCloud instances. + +First introduced in ownCloud 7, this server-to-server sharing allows you to mount file shares from remote servers, in effect creating your own cloud of clouds. You can create direct share links with users on other servers that support federated cloud sharing. + +Implementing this new API allows for deeper integration between storage solutions while maintaining the security, control, and attributes of the original platforms. + +"Exchanging and sharing files is something that is essential today and tomorrow," ownCloud founder Frank Karlitschek said. "Because of that, it is important to do this in a federated and distributed way without centralized data silos. The number one design goal [of federated sharing] is to enable sharing in the most seamless and easiest way while protecting the security and privacy of the users." + +### What's next? + +An initiative like OpenCloudMesh will extend this new open standard of file sharing through cooperation of institutions and companies like Pydio and ownCloud. ownCloud 9 has already introduced the ability for federated servers to exchange user lists, enabling the same seamless auto-complete experience you have with users on your own server. In the future, the idea of having a (federated!) set of central address book servers that can be used to search for others' federated cloud IDs might bring inter-cloud collaboration to an even higher level. + +The initiative will undoubtedly contribute to already growing open technical community within which members can easily discuss, develop, and contribute to the "OCM sharing API" as a vendor-neutral protocol. All leading partners of the OCM project are fully committed to the open API design principle and welcome other open source file share and sync communities to participate and join the connected cloud. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/16/5/sharing-files-pydio-owncloud + +作者:[ben van 't ende][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/benvantende +[1]: https://pydio.com/ +[2]: https://sourceforge.net/projects/ajaxplorer/ +[3]: https://github.com/pydio/ +[4]: https://www.google.com/design/spec/material-design/introduction.html +[5]: https://pydio.com/en/community +[6]: https://pydio.com/en/community/contribute +[7]: https://pydio.com/forum/f +[8]: https://owncloud.org/ +[9]: https://wiki.geant.org/display/OCM/Open+Cloud+Mesh From 35ac596b5b89c7bde9c3cccf7e88e63a4438ba67 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 23 May 2016 09:23:28 +0800 Subject: [PATCH 1420/1710] =?UTF-8?q?20160523-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ubuntu,snap --- ...S UBUNTU’S SNAP PACKAGING REALLY SECURE.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sources/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md diff --git a/sources/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md b/sources/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md new file mode 100644 index 0000000000..2752b5855f --- /dev/null +++ b/sources/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md @@ -0,0 +1,54 @@ +IS UBUNTU’S SNAP PACKAGING REALLY SECURE +========================================== + + +The recent release of [Ubuntu 16.04 LTS has brought a number of new features][1], one of which we covered was the [inclusion of ZFS][2]. Another feature that many people have been talking about is the Snap package format. But according to one of the developers of [CoreOS][3], the Snap packages are not as safe as the claim. + +### WHAT ARE SNAP PACKAGES? + +Snap packages are inspired by containers. This new package format allows [developers to issue updates for applications running on Ubuntu Long-Term-Support (LTS) releases][4]. This gives users the option to run a stable operating system, but keep their applications updated. This is accomplished by including all of the application’s dependencies in the same package. This prevents the program from breaking when a dependency updates. + +Another advantage of Snap packages is that the applications are isolated from the rest of the system. This means that if you change something with a Snap package, it will not affect the rest of the system. It also prevents other applications from accessing your private information, which makes it harder for hackers to get your data. + +### BUT WAIT… + +According to [Matthew Garrett][5], Snap can’t quite deliver on the last promise. Garret works as a Linux kernel developer and security developer at CoreOS, so he should know what he’s talking about. + +[According to Garret][6], “Any Snap package you install is completely capable of copying all your private data to wherever it wants with very little difficulty.” + +[ZDnet][7] reported: + +>*“To prove his point, he built a proof-of-concept attack package in Snap, which first shows an “adorable” teddy bear and then logs keystrokes from Firefox and could be used to steal private SSH keys. The PoC actually injects a harmless command, but could be tweaked to include a cURL session to steal SSH keys.”* + +### BUT WAIT A LITTLE MORE… + +Is it really that Snap has security flaws? Apparently not so. + +Garret himself said that this problem was caused by the X11 window system and did not affect mobile devices that use Mir. So, it is the flaw in X11 that does it. It’s not Snap itself. + +>how X11 trusts applications is a well-known security risk. Snap doesn’t change X11’s trust model, so the fact that applications can see what other applications are doing isn’t a weakness in the new package format, but rather X11’s. + +Garrett is just actually trying to show that when Canonical is all praises for Snap and its security; Snap applications are not fully sandboxed. They are as risky as any other binaries. + +Keeping the fact in mind that Ubuntu 16.04 still uses X11 display, and not Mir, downloading and installing Snap packages from unknown sources might be harmful. But that’s the case with any other packaging, isn’t it? + +In related articles, you should check out [how to use Snap packages in Ubuntu 16.04][8]. And do let us know of your views on Snap and its security. + +---------- +via: http://itsfoss.com/snap-package-securrity-issue/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[ John Paul][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/john/ +[1]: http://itsfoss.com/features-ubuntu-1604/ +[2]: http://itsfoss.com/oracle-canonical-lawsuit/ +[3]: https://en.wikipedia.org/wiki/CoreOS +[4]: https://insights.ubuntu.com/2016/04/13/snaps-for-classic-ubuntu/ +[5]: https://mjg59.dreamwidth.org/l +[6]: https://mjg59.dreamwidth.org/42320.html +[7]: http://www.zdnet.com/article/linux-expert-matthew-garrett-ubuntu-16-04s-new-snap-format-is-a-security-risk/ +[8]: http://itsfoss.com/use-snap-packages-ubuntu-16-04/ From 5a220dbdd7d1be0ade05d8ecae63d727f07d37ee Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 23 May 2016 09:36:41 +0800 Subject: [PATCH 1421/1710] =?UTF-8?q?20160523-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ubuntu , orb , package --- ...: NEW GENERATION OF LINUX APPS ARE HERE.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sources/tech/20160520 ORB: NEW GENERATION OF LINUX APPS ARE HERE.md diff --git a/sources/tech/20160520 ORB: NEW GENERATION OF LINUX APPS ARE HERE.md b/sources/tech/20160520 ORB: NEW GENERATION OF LINUX APPS ARE HERE.md new file mode 100644 index 0000000000..8ea5e6b803 --- /dev/null +++ b/sources/tech/20160520 ORB: NEW GENERATION OF LINUX APPS ARE HERE.md @@ -0,0 +1,142 @@ +ORB: NEW GENERATION OF LINUX APPS ARE HERE +============================================= + +![](http://itsfoss.com/wp-content/uploads/2016/05/ORB-Apps.jpeg) + +We have talked about [installing applications offline in Ubuntu][1] before. And we are going to talk about it once again. + +[Orbital Apps][2] has brought us a new type of application package, **ORB**, with portable applications, interactive installer support and offline usage ability. + +Portable applications are always handy. Mostly because they can run on-the-fly without needing any administrator privileges, and also it can be carried around on small USB sticks along with all their settings and data. And these interactive installers will be able to allow us to install applications with ease. + +### OPEN RUNNABLE BUNDLE (ORB) + +ORB is a free & open-source package format and it’s different from the others in numerous ways. Some of the specifications of ORB is followings: + +- **Compression**: All the packages are compressed with squashfs making them up-to 60% smaller. +- **Portable Mode**: If a portable ORB application is run from a removable drive, it’ll store its settings and data on that drive. +- **Security**: All ORB packages are signed with PGP/RSA and distributed via TLS 1.2. +- **Offline**: All the dependencies are bundled with the package, so no downloading dependencies anymore. +- **Open package**: ORB packages can be mounted as ISO images. + +### VARIETY + +ORB applications are now available in two varieties: + +- Portable Applications +- SuperDEB + +#### 1. PORTABLE ORB APPLICATIONS + +Portable ORB Applications is capable of running right away without needing any installation beforehand. That means it’ll need no administrator privileges and no dependencies! You can just download them from the Orbital Apps website and get to work. + +And as it supports Portable Mode, you can copy it on a USB stick and carry it around. All its settings and data will be stored with it on that USB stick. Just connect the USB stick with any system running on Ubuntu 16.04 and you’ll be ready to go. + +##### AVAILABLE PORTABLE APPLICATIONS + +Currently, more than 35 applications are available as portable packages, including some very popular applications like: [Deluge][3], [Firefox][4], [GIMP][5], [Libreoffice][6], [uGet][7] & [VLC][8]. + +For a full list of available packages, check the [Portable ORB Apps list][9]. + +##### USING PORTABLE APPLICATION + +Follow the steps for using Portable ORB Applications: + +- Download your desired package from the Orbital Apps site. +- Move it wherever you want (local drive / USB stick). +- Open the directory where you’ve stored the ORB package. + +![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-1-1024x576.jpg) + +- Open Properties of the ORB package. + +![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-2.jpg) +>Add Execute permission to ORB package + +- Add Execute permission from Permissions tab. +- Double-click on it. + +Wait for a few seconds as it prepares itself for running. And you’re good to go. + +#### 2. SUPERDEB + +Another variety of ORB Applications is SuperDEB. SuperDEBs are easy and interactive installers that make the software installation process a lot smoother. If you don’t like to install software from terminal or software centers, SuperDEB is exactly for you. + +And the most interesting part is that you won’t need an active internet connection for installing as all the dependencies are bundled with the installer. + +##### AVAILABLE SUPERDEBS + +More than 60 applications are currently available as SuperDEB. Some of the popular software among them are: [Chromium][10], [Deluge][3], [Firefox][4], [GIMP][5], [Libreoffice][6], [uGet][7] & [VLC][8]. + +For a full list of available SuperDEBs, check the [SuperDEB list][11]. + +##### USING SUPERDEB INSTALLER + +- Download your desired SuperDEB from Orbital Apps site. +- Add **Execute permission** to it just like before ( Properties > Permissions ). +- Double-click on the SuperDEB installer and follow the interactive instructions: + +![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-1.png) +>Click OK + +![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-2.png) +>Enter your password and proceed + +![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-3.png) +>It’ll start Installing… + +![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-4.png) +>And soon it’ll be done… + +- After finishing the installation, you’re good to use it normally. + +### ORB APPS COMPATIBILITY + +According to Orbital Apps, they are fully compatible with Ubuntu 16.04 [64 bit]. + +>Reading suggestion: [How To Know If You Have 32 Bit or 64 Bit Computer in Ubuntu][12]. + +As for other distros compatibility is not guaranteed. But we can say that, it’ll work on any Ubuntu 16.04 flavors (UbuntuMATE, UbuntuGNOME, Lubuntu, Xubuntu etc.) and Ubuntu 16.04 based distros (like upcoming Linux Mint 18). We currently have no information if Orbital Apps is planning on expanding its support for other Ubuntu versions/Linux Distros or not. + +If you’re going to use Portable ORB applications often on your system, you can consider installing ORB Launcher. It’s not necessary but is recommended installing to get an improved experience. The shortest method of installing ORB Launcher is opening the terminal and enter the following command: + +``` +wget -O - https://www.orbital-apps.com/orb.sh | bash +``` + +You can find the detailed instructions at [official documentation][13]. + +### WHAT IF I NEED AN APP THAT’S NOT LISTED? + +If you need an application as ORB package that is not available right now, you can [contact][14] Orbital Apps. And the good news is, Orbital Apps is working hard and planning on releasing a tool for creating ORB packages. So, hopefully, soon we’ll be able to make ORB packages ourselves! + +Just to add, this was about installing apps offline. If you are interested, you should read [how to update or upgrade Ubuntu offline][15]. + +So, what do you think about Orbital Apps’ Portable Applications and SuperDEB installers? Will you try them? + + +---------------------------------- +via: http://itsfoss.com/orb-linux-apps/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Munif Tanjim][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/munif/ +[1]: http://itsfoss.com/cube-lets-install-linux-applications-offline/ +[2]: https://www.orbital-apps.com/ +[3]: https://www.orbital-apps.com/download/portable_apps_linux/deluge +[4]: https://www.orbital-apps.com/download/portable_apps_linux/firefox +[5]: https://www.orbital-apps.com/download/portable_apps_linux/gimp +[6]: https://www.orbital-apps.com/download/portable_apps_linux/libreoffice +[7]: https://www.orbital-apps.com/download/portable_apps_linux/uget +[8]: https://www.orbital-apps.com/download/portable_apps_linux/vlc +[9]: https://www.orbital-apps.com/download/portable_apps_linux/ +[10]: https://www.orbital-apps.com/download/superdeb_installers/ubuntu_16.04_64bits/chromium/ +[11]: https://www.orbital-apps.com/superdebs/ubuntu_16.04_64bits/ +[12]: http://itsfoss.com/32-bit-64-bit-ubuntu/ +[13]: https://www.orbital-apps.com/documentation +[14]: https://www.orbital-apps.com/contact +[15]: http://itsfoss.com/upgrade-or-update-ubuntu-offline-without-internet/ From 20a7e2822a13e2c768307900c7d693a72df8e37c Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 23 May 2016 11:42:12 +0800 Subject: [PATCH 1422/1710] PUB:20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack @DongShuaike --- ...ur Ubuntu or Linux Mint with SystemBack.md | 44 +++++++++++++++++++ ...ur Ubuntu or Linux Mint with SystemBack.md | 43 ------------------ 2 files changed, 44 insertions(+), 43 deletions(-) create mode 100644 published/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md delete mode 100644 translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md diff --git a/published/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/published/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md new file mode 100644 index 0000000000..aeb82f69e4 --- /dev/null +++ b/published/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md @@ -0,0 +1,44 @@ +使用 SystemBack 备份/还原你的 Ubuntu/Linux Mint +================================================= + +对于任何一款允许用户还原电脑到之前状态(包括文件系统,安装的应用,以及系统设置)的操作系统来说,系统还原功能都是必备功能,它可以恢复系统故障以及其他的问题。 + +有的时候安装一个程序或者驱动可能让你的系统黑屏。系统还原则可以让你电脑里面的系统文件(LCTT 译注:是系统文件,并非普通文件,详情请看**注意**部分)和程序恢复到之前工作正常时候的状态,进而让你远离那让人头痛的排障过程了,而且它也不会影响你的文件,照片或者其他数据。 + +简单的系统备份还原工具 [Systemback](https://launchpad.net/systemback) 可以让你很容易地创建系统备份以及用户配置文件。一旦遇到问题,你可以简单地恢复到系统先前的状态。它还有一些额外的特征包括系统复制,系统安装以及Live系统创建。 + +**截图** + +![systemback](http://2.bp.blogspot.com/-2UPS3yl3LHw/VlilgtGAlvI/AAAAAAAAGts/ueRaAghXNvc/s1600/systemback-1.jpg) + +![systemback](http://2.bp.blogspot.com/-7djBLbGenxE/Vlilgk-FZHI/AAAAAAAAGtk/2PVNKlaPO-c/s1600/systemback-2.jpg) + +![](http://3.bp.blogspot.com/-beZYwKrsT4o/VlilgpThziI/AAAAAAAAGto/cwsghXFNGRA/s1600/systemback-3.jpg) + +![](http://1.bp.blogspot.com/-t_gmcoQZrvM/VlilhLP--TI/AAAAAAAAGt0/GWBg6bGeeaI/s1600/systemback-5.jpg) + +**注意**:使用系统还原不会还原你自己的文件、音乐、电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机没有创建还原点,那么系统恢复就无法奏效,所以这个工具就无法帮助你(还原系统),如果你尝试恢复一个主要问题,你将需要移步到另外的步骤来进行故障排除。 + +> 适用于 Ubuntu 15.10 Wily/16.04/15.04 Vivid/14.04 Trusty/Linux Mint 14.x/其他Ubuntu衍生版,打开终端,将下面这些命令复制过去: + +终端命令: + +``` +sudo add-apt-repository ppa:nemh/systemback +sudo apt-get update +sudo apt-get install systemback + +``` + +大功告成。 + +-------------------------------------------------------------------------------- + +via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html + +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://launchpad.net/systemback diff --git a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md deleted file mode 100644 index c931365600..0000000000 --- a/translated/tech/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md +++ /dev/null @@ -1,43 +0,0 @@ -# 使用 SystemBack 备份你的 Ubuntu/Linux Mint(系统还原) - -对于任何一款允许用户还原电脑到之前状态(包括文件系统,安装的应用,以及系统设置)的操作系统来说,系统还原都是必备功能,可以恢复系统故障以及其他的问题。 - -有的时候安装一个程序或者驱动可能让你的系统黑屏。系统还原则让你电脑里面的系统文件(译者注:是系统文件,并非普通文件,详情请看**注意**部分)和程序恢复到之前工作正常时候的状态,进而让你远离那让人头痛的排障过程了。而且它也不会影响你的文件,照片或者其他数据。 - -简单的系统备份还原工具[Systemback](https://launchpad.net/systemback)让你很容易地创建系统备份以及用户配置文件。一旦遇到问题,你可以简单地恢复到系统先前的状态。它还有一些额外的特征包括系统复制,系统安装以及Live系统创建。 - -截图 - -![systemback](http://2.bp.blogspot.com/-2UPS3yl3LHw/VlilgtGAlvI/AAAAAAAAGts/ueRaAghXNvc/s1600/systemback-1.jpg) - -![systemback](http://2.bp.blogspot.com/-7djBLbGenxE/Vlilgk-FZHI/AAAAAAAAGtk/2PVNKlaPO-c/s1600/systemback-2.jpg) - -![](http://3.bp.blogspot.com/-beZYwKrsT4o/VlilgpThziI/AAAAAAAAGto/cwsghXFNGRA/s1600/systemback-3.jpg) - -![](http://1.bp.blogspot.com/-t_gmcoQZrvM/VlilhLP--TI/AAAAAAAAGt0/GWBg6bGeeaI/s1600/systemback-5.jpg) - -**注意**:使用系统还原不会还原你的文件,音乐,电子邮件或者其他任何类型的私人文件。对不同用户来讲,这既是优点又是缺点。坏消息是它不会还原你意外删除的文件,不过你可以通过一个文件恢复程序来解决这个问题。如果你的计算机没有还原点,那么系统恢复就无法奏效,所以这个工具就无法帮助你(还原系统),如果你尝试恢复一个主要问题,你将需要移步到另外的步骤来进行故障排除。 - -> > >适用于Ubuntu 15.10 Wily/16.04/15.04 Vivid/14.04 Trusty/Linux Mint 14.x/其他Ubuntu衍生版,打开终端,将下面这些命令复制过去: - -终端命令: - -``` -sudo add-apt-repository ppa:nemh/systemback -sudo apt-get update -sudo apt-get install systemback - -``` - -大功告成。 - --------------------------------------------------------------------------------- - -via: http://www.noobslab.com/2015/11/backup-system-restore-point-your.html - -译者:[DongShuaike](https://github.com/DongShuaike) -校对:[Caroline](https://github.com/carolinewuyan) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://launchpad.net/systemback From ddcaa22c2647772ebd00e27527684833263b68b7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 24 May 2016 09:31:42 +0800 Subject: [PATCH 1423/1710] =?UTF-8?q?20160524-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit editor --- ...DERN OPEN SOURCE CODE EDITORS FOR LINUX.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md diff --git a/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md b/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md new file mode 100644 index 0000000000..f17cbf551c --- /dev/null +++ b/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md @@ -0,0 +1,86 @@ +4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX +================================================== + +![](http://itsfoss.com/wp-content/uploads/2015/01/Best_Open_Source_Editors.jpeg) + +Looking for **best programming editors in Linux**? If you ask the old school Linux users, their answer would be Vi, Vim, Emacs, Nano etc. But I am not talking about them. I am going to talk about new age, cutting edge, great looking, sleek and yet powerful, feature rich **best open source code editors for Linux** that would enhance your programming experience. + +### BEST MODERN OPEN SOURCE EDITORS FOR LINUX + +I use Ubuntu as my main desktop and hence I have provided installation instructions for Ubuntu based distributions. But this doesn’t make this list as **best text editors for Ubuntu** because the list is apt for any Linux distribution. Just to add, the list is not in any particular priority order. + +### BRACKETS + +![](http://itsfoss.com/wp-content/uploads/2015/01/brackets_UI.jpeg) + +[Brackets][1] is an open source code editor from [Adobe][2]. Brackets focuses exclusively on the needs of web designers with built in support for HTML, CSS and Java Script. It’s light weight and yet powerful. It provides you with inline editing and live preview. There are plenty of plugins available to further enhance your experience with Brackets. + +To [install Brackets in Ubuntu][3] and Ubuntu based distributions such as Linux Mint, you can use this unofficial PPA: + +``` +sudo add-apt-repository ppa:webupd8team/brackets +sudo apt-get update +sudo apt-get install brackets +``` + +For other Linux distributions, you can get the source code as well as binaries for Linux, OS X and Windows on its website. + +[Download Brackets Source Code and Binaries](https://github.com/adobe/brackets/releases) + +### ATOM + +![](http://itsfoss.com/wp-content/uploads/2014/08/Atom_Editor.jpeg) + +[Atom][4] is another modern and sleek looking open source editor for programmers. Atom is developed by Github and promoted as a “hackable text editor for the 21st century”. The looks of Atom resembles a lot like Sublime Text editor, a hugely popular but closed source text editors among programmers. + +Atom has recently released .deb and .rpm packages so that one can easily install Atom in Debian and Fedora based Linux distributions. Of course, its source code is available as well. + + +[Download Atom .deb](https://atom.io/download/deb) + +[Download Atom .rpm](https://atom.io/download/rpm) + +[Get Atom source code](https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md) + +### LIME TEXT + +![](http://itsfoss.com/wp-content/uploads/2014/08/LimeTextEditor.jpeg) + +So you like Sublime Text editor but you are not comfortable with the fact that it is not open source. No worries. We have an [open source clone of Sublime Text][5], called [Lime Text][6]. It is built on Go, HTML and QT. The reason behind cloning of Sublime Text is that there are numerous bugs in Sublime Text 2 and Sublime Text 3 is in beta since forever. There are no transparency in its development, on whether the bugs are being fixed or not. + +So open source lovers, rejoice and get the source code of Lime Text from the link below: + +[Get Lime Text Source Code](https://github.com/limetext/lime) + +### LIGHT TABLE + +![](http://itsfoss.com/wp-content/uploads/2015/01/Light_Table.jpeg) + +Flaunted as “the next generation code editor”, [Light Table][7] is another modern looking, feature rich open source editor which is more of an IDE than a mere text editor. There are numerous extensions available to enhance its capabilities. Inline evaluation is what you would love in it. You have to use it to believe how useful Light Table actually is. + +[Install Light Table in Ubuntu Linux](http://itsfoss.com/install-lighttable-ubuntu/) + +### WHAT’S YOUR PICK? + +No, we are not limited to just four code editors in Linux. The list was about modern editors for programmers. Of course, you have plenty of other options such as [Notepad++ alternative Notepadqq][8] or [SciTE][9] and many more. So, among these four, which one is your favorite code editor for Linux? + + +---------- +via: http://itsfoss.com/best-modern-open-source-code-editors-for-linux/?utm_source=newsletter&utm_medium=email&utm_campaign=offline_and_portable_linux_apps_and_other_linux_stories + +作者:[Abhishek Prakash][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://brackets.io/ +[2]: http://www.adobe.com/ +[3]: http://itsfoss.com/install-brackets-ubuntu/ +[4]: https://atom.io/ +[5]: http://itsfoss.com/lime-text-open-source-alternative/ +[6]: http://limetext.org/ +[7]: http://lighttable.com/ +[8]: http://itsfoss.com/notepadqq-notepad-for-linux/ +[9]: http://itsfoss.com/scite-the-notepad-for-linux/ From 305a7e7b3809ff46186fc0a781b105c92230cea5 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 24 May 2016 09:41:05 +0800 Subject: [PATCH 1424/1710] [translating]20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX (#3994) --- ...20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md b/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md index f17cbf551c..93bf396c4a 100644 --- a/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md +++ b/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md @@ -1,3 +1,5 @@ +alim0x translating + 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX ================================================== From 2bb497d0b0b897f4f4845c6836bdb3bd177ff662 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 May 2016 16:03:21 +0800 Subject: [PATCH 1425/1710] PUB:20160225 The Tao of project management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @runningwater @FSSlc 不错! --- .../20160225 The Tao of project management.md | 108 ++++++++++++++---- 1 file changed, 84 insertions(+), 24 deletions(-) rename {translated/tech => published}/20160225 The Tao of project management.md (57%) diff --git a/translated/tech/20160225 The Tao of project management.md b/published/20160225 The Tao of project management.md similarity index 57% rename from translated/tech/20160225 The Tao of project management.md rename to published/20160225 The Tao of project management.md index 758a7d0217..938484b498 100644 --- a/translated/tech/20160225 The Tao of project management.md +++ b/published/20160225 The Tao of project management.md @@ -1,4 +1,4 @@ -项目管理之道 +《道德经》之项目管理 ================================= @@ -8,8 +8,7 @@ 在思考有关开放性组织的项目管理时,我的脑海中便立马浮现出上面的这段文字。 -这听起来可能会有点奇怪。若要理解我的这种想法从何而来,你应该读读 -*《开放性组织:点燃激情提升执行力》* 这本书,它是红帽公司总裁、首席执行官 Jim Whitehurst 所写的一本有关企业文化和新领导力范式的宣言。在这本书中,Jim(还有来自其他红帽人的一点帮助)解释了传统组织机构(一种 “自上而下” 的方式,来自高层的决策被传达到员工,而员工通过晋升和薪酬来激励)和开放性组织机构(一种 自下而上 的方式,领导专注于激励和鼓励,员工被充分授权以各尽其能)之间的差异。 +这听起来可能会有点奇怪。若要理解我的这种想法从何而来,你应该读读 *《开放性组织:点燃激情提升执行力》* 这本书,它是红帽公司总裁、首席执行官 Jim Whitehurst 所写的一本有关企业文化和新领导力范式的宣言。在这本书中,Jim(还有来自其他红帽人的一点帮助)解释了传统组织机构(一种 “自上而下” 的方式,来自高层的决策被传达到员工,而员工通过晋升和薪酬来激励)和开放性组织机构(一种 自下而上 的方式,领导专注于激励和鼓励,员工被充分授权以各尽其能)之间的差异。 在开放性组织中的员工都是被激情、目标和参与感所激励,这个观点正是我认为项目管理者所应该关注的。 @@ -17,27 +16,39 @@ ### 不要让工作职衔框住自身 ->道,可道也,非恒道也。名,可名也,非恒名也。 +> 道,可道也,(The tao that can be told) ->“无”,名天地之始;“有”,名万物之母。 +> 非恒道也。(is not the eternal Tao) + +> 名,可名也,(The name that can be named) + +> 非恒名也。(is not the eternal Name.) + +> “无”,名天地之始;(The unnameable is the eternally real.) + +> “有”,名万物之母。(Naming is the origin of all particular things.) [[1]][7] 项目管理到底是什么?作为一个项目管理者应该做些什么呢? 如您所想,项目管理者的一部分工作就是管理项目:收集需求、与项目相关人员沟通、设置项目优先级、安排任务、帮助团队解决困扰。许多机构都可以教你如何做好项目管理,并且这些技能你值得拥有。 -然而,在开放性组织中,字面上的项目管理技能仅仅只是项目管理者需要做到一小部分,这些组织需要更多其他的东西:即勇气。如果你擅长于管理项目(或者是真的擅长于任何工作),那么你就进入了舒适区。这时候就是需要鼓起勇气开始尝试冒险之时。 +然而,在开放性组织中,字面上的项目管理技能仅仅只是项目管理者需要做到的一小部分,这些组织需要更多其他的东西:即勇气。如果你擅长于管理项目(或者是真的擅长于任何工作),那么你就进入了舒适区。这时候就是需要鼓起勇气开始尝试冒险之时。 您有勇气跨出舒适区吗?向权威人士提出挑战性的问题,可能会引发对方的不快,但也可能会开启一个更好的方法,您有勇气这样做吗?有确定需要做的下一件事,然后真正去完成它的勇气吗?有主动去解决因为交流的鸿沟而遗留下来的问题的勇气吗?有去尝试各种事情的勇气吗?有失败的勇气吗? -道德经的开篇(上面引用的)就表明词语、标签、名字这些是有限制的,当然也包括工作职衔。在开放性组织中,项目经理不仅仅是执行管理项目所需的机械任务,而且要帮助团队完成组织的使命,尽管这已经被限定了。 +道德经的开篇(上面引用的)就表明词语(words)、标签(labels)、名字(names)这些是有限制的,当然也包括工作职衔。在开放性组织中,项目经理不仅仅是执行管理项目所需的机械任务,而且要帮助团队完成组织的使命,尽管这已经被限定了。 ### 联系起合适的人 ->三十辐共一轂,当其无,有车之用。 +> 三十辐共一轂,(We join spokes together in a wheel,) + +> 当其无,(but it is the center hole) + +> 有车之用。(that makes the wagon move.) [[11]][8] -当我过渡到项目管理的工作时,我必须学会的最为困难的一课是:并不是所有解决方案都是完全可接受的,甚至有的连预期都达不到。这对我来说是全新的,我喜欢所有的解决方案。但作为项目管理者,我的角色更多的是与人沟通--使得那些确实有解决方案的人可以更高效地合作。 +当我过渡到项目管理的工作时,我必须学会的最为困难的一课是:并不是所有解决方案都是可完全地接受,甚至有的连预期都达不到。这对我来说是全新的一页。我*喜欢*全部都能解决。但作为项目管理者,我的角色更多的是与人沟通--使得那些确实有解决方案的人可以更高效地合作。 这并不是逃避责任或者不负责。这意味着可以很舒适的说,“我不知道,但我会给你找出答案”,然后就可迅速地结束这个循环。 @@ -45,14 +56,28 @@ ### 信任你的团队 ->太上,不知有之;其次,亲而誉之;其次,畏之;其次,侮之。 -> ->信不足焉,有不信焉。 -> ->悠兮,其贵言。功成事遂,百姓皆谓:“我自然”。 +>太上,不知有之;(When the Master governs, the people +are hardly aware that he exists.) + +> 其次,亲而誉之;(Next best is a leader who is loved.) + +> 其次,畏之;(Next, one who is feared.) + +> 其次,侮之。(The worst is one who is despised.) + +>信不足焉,(If you don't trust the people,) + +>有不信焉。(you make them untrustworthy.) + +>悠兮,其贵言。(The Master doesn't talk, he acts.) + +> 功成事遂,(When his work is done,) + +> 百姓皆谓:“我自然”。(the people say, "Amazing: +we did it, all by ourselves!") [[17]][9] -[Rebecca Fernandez][10]曾经告诉我开放性组织的领导与其它组织的领导者最大的不同点在于,我们不取得别人的信任,而是信任别人。 +[Rebecca Fernandez][10] 曾经告诉我开放性组织的领导与其它组织的领导者最大的不同点在于,我们不是去取得别人的信任,而是信任别人。 开放性组织会雇佣那些非常聪明的,且对公司正在做的事情充满激情的人来做工作。为了能使他们能更好的工作,我们会提供其所需,并尊重他们的工作方式。 @@ -60,7 +85,11 @@ ### 顺其自然 ->上德无为而无以为;下德为之而有以为。 +>上德无为而无以为;(The Master does nothing +yet he leaves nothing undone.) + +>下德为之而有以为。(The ordinary man is always doing things, +yet many more are left to be done.) [[38]][11] 你认识那类总是极其忙碌的人吗?认识那些因为有太多事情要做而看起来疲倦和压抑的人吗? @@ -77,35 +106,65 @@ ### 做一名文化传教士 ->上士闻道,勤而行之;中士闻道,若存若亡;下士闻道,大笑之。不笑不足以為道。 +>上士闻道,(When a superior man hears of the Tao,) + +> 勤而行之;(he immediately begins to embody it.) + +> 中士闻道,(When an average man hears of the Tao,) + +>若存若亡;(he half believes it, half doubts it.) + +> 下士闻道,(When a foolish man hears of the Tao,) + +> 大笑之。(he laughs out loud.) + +> 不笑不足以為道。(If he didn't laugh,it wouldn't be the Tao.) [[41]][12] -去年秋天,我跟着一群联邦雇员注册了一个工商管理硕士课程。当我开始介绍我们公司的文化、价值和伦理框架时,我得到的直接印象是:我的同学和教授都认为我就像一个天真可爱的小姑娘,做着许多关于公司应该如何运作的[甜美白日梦][13]。他们告诉我事情不可能是它们看起来的那样,他们还告诉我应该进一步考察。 +去年秋天,我和一群联邦雇员参加了一堂 MBA 的商业准则课程。当我开始介绍我们公司的文化、价值和伦理框架时,我得到的直接印象是:我的同学和教授都认为我就像一个天真可爱的小姑娘,做着许多关于公司应该如何运作的[甜美白日梦][13]。他们告诉我事情不可能是他们看起来的那样,他们还告诉我应该进一步考察。 所以我照做了。 然而我发现的是:事情*恰好*是他们看起来的那样。 -在开放性组织,关于企业文化,人们应该随着企业的成长而时时维护那些文化,以使它随时精神焕发,充满斗志。我(和其它开源组织的成员)并不想过如我同学所描述的那样,“为生活而工作”。我需要有激情、有目标,需要明白自己的日常工作是如何对那些我所坚信的东西做贡献的。 +在开放性组织,关于企业文化,人们应该随着企业的成长而时时维护那些文化,以使它随时精神焕发,充满斗志。我(和其它开源组织的成员)并不想过着如我同学们所描述的那样,“为生活而工作”。我需要有激情、有目标,需要明白自己的日常工作是如何对那些我所坚信的东西做贡献的。 作为一个项目管理者,你可能会认为在你的团队中,你的工作对培养你们公司的企业文化没有多少帮助。然而你的工作正是孕育文化本身。 ### Kaizen (持续改善) ->为学日益,为道日损。损之又损,以至于无为。无为而无不为。 +>为学日益,(In pursuit of knowledge,every day something is added.) + +> 为道日损。(In the practice of the Tao,every day something is dropped.) + +> 损之又损,(Less and less do you need to force things,) + +> 以至于无为。(until finally you arrive at non-action. ) + +> 无为而无不为。(When nothing is done,nothing is left undone.) [[48]][14] -项目管理的一般领域都太过于专注最新、最强大的的工具,但对于应该使用哪种工具,这个问题的答案总是一致的:“最简单的”。 +项目管理的常规领域都太过于专注最新、最强大的的工具,但对于应该使用哪种工具,这个问题的答案总是一致的:“最简单的”。 例如,我将任务列表放在桌面的一个文本文件中,因为它很单纯,不会受到不必要的干扰。您想介绍给团队的,无论是何种工具、流程和程序都应该是能提高效率,排除障碍的,而不是引入额外的复杂性。所以与其专注于工具,还不如专注于要使用这些工具来解决的*问题*。 -作为一个项目经理,我最喜爱的部分是在敏捷世界中,我有自由抛弃那些没有成效的东西的权利。这与 kaizen 的概念相关,或叫 “持续改进”。不要害怕尝试和失败。失败是我们在探索什么能够起作用,什么不能起作用的过程中所用的标签,这是提高的唯一方式。 +作为一个项目经理,我最喜爱的部分是在敏捷世界中,我有自由抛弃那些没有成效的东西的权利。这与 [kaizen][16] 的概念相关,或叫 “持续改进”。不要害怕尝试和失败。失败是我们在探索什么能够起作用,什么不能起作用的过程中所用的标签,这是提高的唯一方式。 最好的过程都不是一蹴而就的。作为项目管理者,你应该通过支持他们,而不是强迫他们去做某些事来帮助你的团队。 ### 实践 ->天下皆谓我"道"大,似不肖。夫唯大,故似不肖。若肖,久矣其细也夫! +>天下皆谓我"道"大,(Some say that my teaching is nonsense.) + +> 似不肖。(Others call it lofty but impractical.) + +> 夫唯大,(But to those who have looked inside themselves,) + +> 故似不肖。(this nonsense makes perfect sense.) + +>若肖,(And to those who put it into practice,) + +> 久矣其细也夫!(this loftiness has roots that go deep.) [[67]][15] 我相信开放性组织正在做的事。开放性组织在管理领域的工作几乎与他们提供的产品和服务一样重要。我们有机会以身作则,激发他人的激情和目的,创造激励和充分授权的工作环境。 @@ -137,4 +196,5 @@ via: https://opensource.com/open-organization/16/2/tao-project-management [12]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#41 [13]: https://opensource.com/open-organization/15/9/reflections-open-organization-starry-eyed-dreamer [14]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#48 -[15]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#67 \ No newline at end of file +[15]: http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html#67 +[16]: https://www.kaizen.com/about-us/definition-of-kaizen.html \ No newline at end of file From 684d4581ea4a8794d0fe442b7777aca4c07ee149 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 24 May 2016 21:45:36 +0800 Subject: [PATCH 1426/1710] [translated]20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX --- ...DERN OPEN SOURCE CODE EDITORS FOR LINUX.md | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md b/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md index 93bf396c4a..cbced20708 100644 --- a/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md +++ b/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md @@ -1,23 +1,21 @@ -alim0x translating - -4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX +Linux 上四个最佳的现代开源代码编辑器 ================================================== ![](http://itsfoss.com/wp-content/uploads/2015/01/Best_Open_Source_Editors.jpeg) -Looking for **best programming editors in Linux**? If you ask the old school Linux users, their answer would be Vi, Vim, Emacs, Nano etc. But I am not talking about them. I am going to talk about new age, cutting edge, great looking, sleek and yet powerful, feature rich **best open source code editors for Linux** that would enhance your programming experience. +在寻找 **Linux 上最好的代码编辑器**?如果你问那些老派的 Linux 用户,他们的答案肯定是 Vi,Vim,Emacs,Nano 等等。但我不讨论它们。我要讨论的是最新的,美观,优美强大,功能丰富,能够提高你编程体验的,**最好的 Linux 开源代码编辑器**。 -### BEST MODERN OPEN SOURCE EDITORS FOR LINUX +### Linux 上最佳的现代开源代码编辑器 -I use Ubuntu as my main desktop and hence I have provided installation instructions for Ubuntu based distributions. But this doesn’t make this list as **best text editors for Ubuntu** because the list is apt for any Linux distribution. Just to add, the list is not in any particular priority order. +我使用 Ubuntu 作为我的主力系统,因此提供的安装说明适用于基于 Ubuntu 的发行版。但这并不会让这个列表变成 **Ubuntu 上的最佳文本编辑器**,因为这些编辑器对所有 Linux 发行版都适用。多说一句,这个清单没有任何优先顺序。 ### BRACKETS ![](http://itsfoss.com/wp-content/uploads/2015/01/brackets_UI.jpeg) -[Brackets][1] is an open source code editor from [Adobe][2]. Brackets focuses exclusively on the needs of web designers with built in support for HTML, CSS and Java Script. It’s light weight and yet powerful. It provides you with inline editing and live preview. There are plenty of plugins available to further enhance your experience with Brackets. +[Brackets][1] 是 [Adobe][2] 的一个开源代码编辑器。Brackets 专注与 web 设计师的需求,内置 HTML,CSS 和 JavaScript 支持。它很轻量,也很强大。它提供了行内编辑和实时预览。还有无数可用的插件,进一步加强你在 Brackets 上的体验。 -To [install Brackets in Ubuntu][3] and Ubuntu based distributions such as Linux Mint, you can use this unofficial PPA: +在 Ubuntu 以及基于 Ubuntu 的发行版(比如 Linux Mint)上[安装 Brackets][3] 的话,你可以用这个非官方的 PPA: ``` sudo add-apt-repository ppa:webupd8team/brackets @@ -25,53 +23,53 @@ sudo apt-get update sudo apt-get install brackets ``` -For other Linux distributions, you can get the source code as well as binaries for Linux, OS X and Windows on its website. +至于其它 Linux 发行版,你可以从它的网站上获取到适用于 Linux,OS X 和 Windows 源码和二进制文件。 -[Download Brackets Source Code and Binaries](https://github.com/adobe/brackets/releases) +[下载 Brackets 源码和二进制包](https://github.com/adobe/brackets/releases) ### ATOM ![](http://itsfoss.com/wp-content/uploads/2014/08/Atom_Editor.jpeg) -[Atom][4] is another modern and sleek looking open source editor for programmers. Atom is developed by Github and promoted as a “hackable text editor for the 21st century”. The looks of Atom resembles a lot like Sublime Text editor, a hugely popular but closed source text editors among programmers. +[Atom][4] 是另一个给程序员开源代码编辑器,现代而且美观。Atom 是由 Github 开发的,宣称是“21世纪的可定制文本编辑器”。Atom 的外观看起来类似 Sublime Text,一个在程序员中很流行但是闭源的文本编辑器。 -Atom has recently released .deb and .rpm packages so that one can easily install Atom in Debian and Fedora based Linux distributions. Of course, its source code is available as well. +Atom 最近发布了 .deb 和 .rpm 包,所以你可以轻而易举地在基于 Debian 和 Fedora 的 Linux 发行版上安装它。当然,它的源代码也是提供了的。 -[Download Atom .deb](https://atom.io/download/deb) +[下载 Atom .deb](https://atom.io/download/deb) -[Download Atom .rpm](https://atom.io/download/rpm) +[下载 Atom .rpm](https://atom.io/download/rpm) -[Get Atom source code](https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md) +[获取 Atom 源码](https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md) ### LIME TEXT ![](http://itsfoss.com/wp-content/uploads/2014/08/LimeTextEditor.jpeg) -So you like Sublime Text editor but you are not comfortable with the fact that it is not open source. No worries. We have an [open source clone of Sublime Text][5], called [Lime Text][6]. It is built on Go, HTML and QT. The reason behind cloning of Sublime Text is that there are numerous bugs in Sublime Text 2 and Sublime Text 3 is in beta since forever. There are no transparency in its development, on whether the bugs are being fixed or not. +你喜欢 Sublime Text 但是你对它是闭源的这一事实感觉不是很舒服?别担心,我们有 [Sublime Text 的开源克隆版][5],叫做 [Lime Text][6]。它是基于 Go,HTML 和 QT 的。克隆 Sublime Text 的原因是 Sublime Text 2 中有无数 bug,而 Sublime Text 3 看起来会永远处于 beta 之中。它的开发过程并不透明,也就无从得知 bug 是否被修复了。 -So open source lovers, rejoice and get the source code of Lime Text from the link below: +所以开源爱好者们,开心地去下面这个链接下载 Lime Text 的源码吧: -[Get Lime Text Source Code](https://github.com/limetext/lime) +[获取 Lime Text 源码](https://github.com/limetext/lime) ### LIGHT TABLE ![](http://itsfoss.com/wp-content/uploads/2015/01/Light_Table.jpeg) -Flaunted as “the next generation code editor”, [Light Table][7] is another modern looking, feature rich open source editor which is more of an IDE than a mere text editor. There are numerous extensions available to enhance its capabilities. Inline evaluation is what you would love in it. You have to use it to believe how useful Light Table actually is. +标榜“下一代代码编辑器”,[Light Table][7] 是另一个外观现代,功能丰富的开源代码编辑器,它更像一个 IDE 而不仅仅是个文本编辑器。它还有无数扩展用以加强它的功能。也许你会喜欢它的行内求值。你得用用它才会相信 Light Table 有多好用。 -[Install Light Table in Ubuntu Linux](http://itsfoss.com/install-lighttable-ubuntu/) +[在 Ubuntu 上安装 Light Table](http://itsfoss.com/install-lighttable-ubuntu/) -### WHAT’S YOUR PICK? +### 你的选择是? -No, we are not limited to just four code editors in Linux. The list was about modern editors for programmers. Of course, you have plenty of other options such as [Notepad++ alternative Notepadqq][8] or [SciTE][9] and many more. So, among these four, which one is your favorite code editor for Linux? +不,我们的选择没有限制在这四个 Linux 代码编辑器之中。这个清单只是关于程序员的现代编辑器。当然,你还有很多选择,比如 [Notepad++ 的替代选择 Notepadqq][8] 或 [SciTE][9] 以及更多。那么,在上面四个中,对 Linux 而言哪个是你最喜欢的代码编辑器? ---------- via: http://itsfoss.com/best-modern-open-source-code-editors-for-linux/?utm_source=newsletter&utm_medium=email&utm_campaign=offline_and_portable_linux_apps_and_other_linux_stories 作者:[Abhishek Prakash][a] -译者:[译者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 d9dae92abe4ff91a508afb62d9a6698bc0b5a88e Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 24 May 2016 21:57:30 +0800 Subject: [PATCH 1427/1710] Move file and adjust some translation --- ...BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {sources => translated}/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md (85%) diff --git a/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md b/translated/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md similarity index 85% rename from sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md rename to translated/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md index cbced20708..f3045322f3 100644 --- a/sources/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md +++ b/translated/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md @@ -7,13 +7,13 @@ Linux 上四个最佳的现代开源代码编辑器 ### Linux 上最佳的现代开源代码编辑器 -我使用 Ubuntu 作为我的主力系统,因此提供的安装说明适用于基于 Ubuntu 的发行版。但这并不会让这个列表变成 **Ubuntu 上的最佳文本编辑器**,因为这些编辑器对所有 Linux 发行版都适用。多说一句,这个清单没有任何优先顺序。 +我使用 Ubuntu 作为我的主力系统,因此提供的安装说明适用于基于 Ubuntu 的发行版。但这并不会让这个列表变成 **Ubuntu 上的最佳文本编辑器**,因为这些编辑器对所有 Linux 发行版都适用。多说一句,这个清单没有任何先后顺序。 ### BRACKETS ![](http://itsfoss.com/wp-content/uploads/2015/01/brackets_UI.jpeg) -[Brackets][1] 是 [Adobe][2] 的一个开源代码编辑器。Brackets 专注与 web 设计师的需求,内置 HTML,CSS 和 JavaScript 支持。它很轻量,也很强大。它提供了行内编辑和实时预览。还有无数可用的插件,进一步加强你在 Brackets 上的体验。 +[Brackets][1] 是 [Adobe][2] 的一个开源代码编辑器。Brackets 专注于 web 设计师的需求,内置 HTML,CSS 和 JavaScript 支持。它很轻量,也很强大。它提供了行内编辑和实时预览。还有无数可用的插件,进一步加强你在 Brackets 上的体验。 在 Ubuntu 以及基于 Ubuntu 的发行版(比如 Linux Mint)上[安装 Brackets][3] 的话,你可以用这个非官方的 PPA: @@ -31,9 +31,9 @@ sudo apt-get install brackets ![](http://itsfoss.com/wp-content/uploads/2014/08/Atom_Editor.jpeg) -[Atom][4] 是另一个给程序员开源代码编辑器,现代而且美观。Atom 是由 Github 开发的,宣称是“21世纪的可定制文本编辑器”。Atom 的外观看起来类似 Sublime Text,一个在程序员中很流行但是闭源的文本编辑器。 +[Atom][4] 是另一个给程序员的开源代码编辑器,现代而且美观。Atom 是由 Github 开发的,宣称是“21世纪的可定制文本编辑器”。Atom 的外观看起来类似 Sublime Text,一个在程序员中很流行但是闭源的文本编辑器。 -Atom 最近发布了 .deb 和 .rpm 包,所以你可以轻而易举地在基于 Debian 和 Fedora 的 Linux 发行版上安装它。当然,它的源代码也是提供了的。 +Atom 最近发布了 .deb 和 .rpm 包,所以你可以轻而易举地在基于 Debian 和 Fedora 的 Linux 发行版上安装它。当然,它也提供了源代码。 [下载 Atom .deb](https://atom.io/download/deb) @@ -56,13 +56,13 @@ Atom 最近发布了 .deb 和 .rpm 包,所以你可以轻而易举地在基于 ![](http://itsfoss.com/wp-content/uploads/2015/01/Light_Table.jpeg) -标榜“下一代代码编辑器”,[Light Table][7] 是另一个外观现代,功能丰富的开源代码编辑器,它更像一个 IDE 而不仅仅是个文本编辑器。它还有无数扩展用以加强它的功能。也许你会喜欢它的行内求值。你得用用它才会相信 Light Table 有多好用。 +[Light Table][7] 是另一个外观现代,功能丰富的开源代码编辑器,标榜“下一代代码编辑器”,它更像一个 IDE 而不仅仅是个文本编辑器。它还有无数扩展用以加强它的功能。也许你会喜欢它的行内求值。你得用用它才会相信 Light Table 有多好用。 [在 Ubuntu 上安装 Light Table](http://itsfoss.com/install-lighttable-ubuntu/) ### 你的选择是? -不,我们的选择没有限制在这四个 Linux 代码编辑器之中。这个清单只是关于程序员的现代编辑器。当然,你还有很多选择,比如 [Notepad++ 的替代选择 Notepadqq][8] 或 [SciTE][9] 以及更多。那么,在上面四个中,对 Linux 而言哪个是你最喜欢的代码编辑器? +不,我们的选择没有限制在这四个 Linux 代码编辑器之中。这个清单只是关于程序员的现代编辑器。当然,你还有很多选择,比如 [Notepad++ 的替代选择 Notepadqq][8] 或 [SciTE][9] 以及更多。那么,上面四个中,在 Linux 上而言你最喜欢哪个代码编辑器? ---------- From 9f10cd8b574823319cee97331f2424dbe10241be Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 25 May 2016 20:16:51 +0800 Subject: [PATCH 1428/1710] =?UTF-8?q?20160525-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit linux , car , IVI --- ...Driving cars into the future with Linux.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/talk/20160523 Driving cars into the future with Linux.md diff --git a/sources/talk/20160523 Driving cars into the future with Linux.md b/sources/talk/20160523 Driving cars into the future with Linux.md new file mode 100644 index 0000000000..38ef546789 --- /dev/null +++ b/sources/talk/20160523 Driving cars into the future with Linux.md @@ -0,0 +1,104 @@ +Driving cars into the future with Linux +=========================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/open-snow-car-osdc-lead.png?itok=IgYZ6mNY) + +I don't think much about it while I'm driving, but I sure do love that my car is equipped with a system that lets me use a few buttons and my voice to call my wife, mom, and children. That same system allows me to choose whether I listen to music streaming from the cloud, satellite radio, or the more traditional AM/FM radio. I also get weather updates and can direct my in-vehicle GPS to find the fastest route to my next destination. [In-vehicle infotainment][1], or IVI as it's known in the industry, has become ubiquitous in today's newest automobiles. + +A while ago, I had to travel hundreds of miles by plane and then rent a car. Happily, I discovered that my rental vehicle was equipped with IVI technology similar to my own car. In no time, I was connected via Bluetooth, had uploaded my contacts into the system, and was calling home to let my family know I arrived safely and my hosts to let them know I was en route to their home. + +In a recent [news roundup][2], Scott Nesbitt cited an article that said Ford Motor Company is getting substantial backing from a rival automaker for its open source [Smart Device Link][3] (SDL) middleware framework, which supports mobile phones. SDL is a project of the [GENIVI Alliance][4], a nonprofit committed to building middleware to support open source in-vehicle infotainment systems. According to [Steven Crumb][5], executive director of GENIVI, their [membership][6] is broad and includes Daimler Group, Hyundai, Volvo, Nissan, Honda, and 170 others. + +In order to remain competitive in the industry, automotive companies need a middleware system that can support the various human machine interface technologies available to consumers today. Whether you own an Android, iOS, or other device, automotive OEMs want their units to be able to support these systems. Furthermore, these IVI systems must be adaptable enough to support the ever decreasing half-life of mobile technology. OEMs want to provide value and add services in their IVI stacks that will support a variety of options for their customers. Enter Linux and open source software. + +In addition to GENIVI's efforts, the [Linux Foundation][7] sponsors the [Automotive Grade Linux][8] (AGL) workgroup, a software foundation dedicated to finding open source solutions for automotive applications. Although AGL will initially focus on IVI systems, they envision branching out to include [telematics][9], heads up displays, and other control systems. AGL has over 50 members at this time, including Jaguar, Toyota, and Nissan, and in a [recent press release][10] announced that Ford, Mazda, Mitsubishi, and Subaru have joined. + +To find out more, we interviewed two leaders in this emerging field. Specifically, we wanted to know how Linux and open source software are being used and if they are in fact changing the face of the automotive industry. First, we talk to [Alison Chaiken][11], a software engineer at Peloton Technology and an expert on automotive Linux, cybersecurity, and transparency. She previously worked for Mentor Graphics, Nokia, and the Stanford Linear Accelerator. Then, we chat with [Steven Crumb][12], executive director of GENIVI, who got started in open source in high-performance computing environments (supercomputers and early cloud computing). He says that though he's not a coder anymore, he loves to help organizations solve real business problems with open source software. + +### Interview with Alison Chaiken (by [Deb Nicholson][13]) + +#### How did you get interested in the automotive software space? + +I was working on [MeeGo][14] in phones at Nokia in 2009 when the project was cancelled. I thought, what's next? A colleague was working on [MeeGo-IVI][15], an early automotive Linux distribution. "Linux is going to be big in cars," I thought, so I headed in that direction. + +#### Can you tell us what aspects you're working on these days? + +I'm currently working for a startup on an advanced cruise control system that uses real-time Linux to increase the safety and fuel economy of big-rig trucks. I love working in this area, as no one would disagree that trucking can be improved. + +#### There have been a few stories about hacked cars in recent years. Can open source solutions help address this issue? + +I presented a talk on precisely this topic, on how Linux can (and cannot) contribute to security solutions in automotive at Southern California Linux Expo 2016 ([Slides][16]). Notably, GENIVI and Automotive Grade Linux have published their code and both projects take patches via Git. Please send your fixes upstream! Many eyes make all bugs shallow. + +#### Law enforcement agencies and insurance companies could find plenty of uses for data about drivers. How easy will it be for them to obtain this information? + +Good question. The Dedicated Short Range Communication Standard (IEEE-1609) takes great pains to keep drivers participating in Wi-Fi safety messaging anonymous. Still, if you're posting to Twitter from your car, someone will be able to track you. + +#### What can developers and private citizens do to make sure civil liberties are protected as automotive technology evolves? + +The Electronic Frontier Foundation (EFF) has done an excellent job of keeping on top of automotive issues, having commented through official channels on what data may be stored in automotive "black boxes" and on how DMCA's Provision 1201 applies to cars. + +#### What are some of the exciting things you see coming for drivers in the next few years? + +Adaptive cruise control and collision avoidance systems are enough of an advance to save lives. As they roll out through vehicle fleets, I truly believe that fatalities will decline. If that's not exciting, I don't know what is. Furthermore, capabilities like automated parking assist will make cars easier to drive and reduce fender-benders. + +#### What needs to be built and how can people get involved? + +Automotive Grade Linux is developed in the open and runs on cheap hardware (e.g. Raspberry Pi 2 and moderately priced Renesas Porter board) that anyone can buy. GENIVI automotive Linux middleware consortium has lots of software publicly available via Git. Furthermore, there is the ultra cool [OSVehicle open hardware][17] automotive platform. + +#### There are many ways for Linux software and open hardware folks with moderate budgets to get involved. Join us at #automotive on Freenode IRC if you have questions. + +### Interview with Steven Crumb (by Don Watkins) + +#### What's so huge about GENIVI's approach to IVI? + +GENIVI filled a huge gap in the automotive industry by pioneering the use of free and open source software, including Linux, for non-safety-critical automotive software like in-vehicle infotainment (IVI) systems. As consumers came to expect the same functionality in their vehicles as on their smartphones, the amount of software required to support IVI functions grew exponentially. The increased amount of software has also increased the costs of building the IVI systems and thus slowed time to market. + +GENIVI's use of open source software and a community development model has saved automakers and their software suppliers significant amounts of money while significantly reducing the time to market. I'm excited about GENIVI because we've been fortunate to lead a revolution of sorts in the automotive industry by slowly evolving organizations from a highly structured and proprietary methodology to a community-based approach. We're not done yet, but it's been a privilege to take part in a transformation that is yielding real benefits. + +#### How do your major members drive the direction of GENIVI? + +GENIVI has a lot of members and non-members contributing to our work. As with many open source projects, any company can influence the technical output by simply contributing code, patches, and time to test. With that said, BMW, Mercedes-Benz, Hyundai Motor, Jaguar Land Rover, PSA, Renault/Nissan, and Volvo are all active adopters of and contributors to GENIVI—and many other OEMs have IVI solutions in their cars that extensively use GENIVI's software. + +#### What licenses cover the contributed code? + +GENIVI employs a number of licenses ranging from (L)GPLv2 to MPLv2 to Apache 2.0. Some of our tools use the Eclipse license. We have a [public licensing policy][18] that details our licensing preferences. + +#### How does a person or group get involved? How important are community contributions to the ongoing success of the project? + +GENIVI does its development completely in the open ([projects.genivi.org][19]) and thus, anyone interested in using open software in automotive is welcome to participate. That said, the alliance can fund its continued development in the open through companies [joining GENIVI][20] as members. GENIVI members enjoy a wide variety of benefits, not the least of which is participation in the global community of 140 companies that has been developed over the last six years. + +Community is hugely important to GENIVI, and we could not have produced and maintained the valuable software we developed over the years without an active community of contributors. We've worked hard to make contributing to GENIVI as simple as joining an [email list][21] and connecting to the people in the various software projects. We use standard practices employed by many open source projects and provide high-quality tools and infrastructure to help developers feel at home and be productive. + +Regardless of someone's familiarity with the automotive software, they are welcome to join our community. People have modified cars for years, so for many people there is a natural draw to anything automotive. Software is the new domain for cars, and GENIVI wants to be the open door for anyone interested in working with automotive, open source software. + +------------------------------- +via: https://opensource.com/business/16/5/interview-alison-chaiken-steven-crumb + +作者:[Don Watkins][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[1]: https://en.wikipedia.org/wiki/In_car_entertainment +[2]: https://opensource.com/life/16/1/weekly-news-jan-9 +[3]: http://projects.genivi.org/smartdevicelink/home +[4]: http://www.genivi.org/ +[5]: https://www.linkedin.com/in/stevecrumb +[6]: http://www.genivi.org/genivi-members +[7]: http://www.linuxfoundation.org/ +[8]: https://www.automotivelinux.org/ +[9]: https://en.wikipedia.org/wiki/Telematics +[10]: https://www.automotivelinux.org/news/announcement/2016/01/ford-mazda-mitsubishi-motors-and-subaru-join-linux-foundation-and +[11]: https://www.linkedin.com/in/alison-chaiken-3ba456b3 +[12]: https://www.linkedin.com/in/stevecrumb +[13]: https://opensource.com/users/eximious +[14]: https://en.wikipedia.org/wiki/MeeGo +[15]: http://webinos.org/deliverable-d026-target-platform-requirements-and-ipr/automotive/ +[16]: http://she-devel.com/Chaiken_automotive_cybersecurity.pdf +[17]: https://www.osvehicle.com/ +[18]: http://projects.genivi.org/how +[19]: http://projects.genivi.org/ +[20]: http://genivi.org/join +[21]: http://lists.genivi.org/mailman/listinfo/genivi-projects From b7968ec4071b96ec0c01ac1192c3adc8a1917490 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 25 May 2016 20:53:41 +0800 Subject: [PATCH 1429/1710] =?UTF-8?q?20160525-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit container , Raspberry Pi , Arduino --- ...can learn from Arduino and Raspberry Pi.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sources/talk/20160525 What containers and unikernels can learn from Arduino and Raspberry Pi.md diff --git a/sources/talk/20160525 What containers and unikernels can learn from Arduino and Raspberry Pi.md b/sources/talk/20160525 What containers and unikernels can learn from Arduino and Raspberry Pi.md new file mode 100644 index 0000000000..a1d6257d4d --- /dev/null +++ b/sources/talk/20160525 What containers and unikernels can learn from Arduino and Raspberry Pi.md @@ -0,0 +1,51 @@ +What containers and unikernels can learn from Arduino and Raspberry Pi +========================================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/bus-containers.png?itok=vM7_7vs0) + + +Just the other day, I was speaking with a friend who is a mechanical engineer. He works on computer assisted braking systems for semi trucks and mentioned that his company has [Arduinos][1] all over the office. The idea is to encourage people to quickly experiment with new ideas. He also mentioned that Arduinos are more expensive than printed circuits. I was surprised by his comment about price, because coming from the software side of things, my perceptions of Arduinos was that they cost less than designing a specialized circuit. + +I had always viewed [Arduinos][2] and [Raspberry Pi][3] as these cool, little, specialized devices that can be used to make all kinds of fun gadgets. I came from the software side of the world and have always considered Linux on x86 and x86-64 "general purpose." The truth is, Arduinos are not specialized. In fact, they are very general purpose. They are fairly small, fairly cheap, and extremely flexible—that's why they caught on like wildfire. They have all kinds of I/O ports and expansion cards. They allow a maker to go out and build something cool really quickly. They even allow companies to build new products quickly. + +The unit price for an Arduino is much higher than a printed circuit, but time to a minimum viable idea is much lower. With a printed circuit, the unit price can be driven much lower but the upfront capital investment is much higher. So, long story short, the answer is—it depends. + +### Unikernels, rump kernels, and container hosts + +Enter unikernels, rump kernels, and minimal Linux distributions—these operating systems are purpose-built for specific use cases. These specialized operating systems are kind of like printed circuits. They require some up-front investment in planning and design to utilize, but could provide a great performance increase when deploying a specific workload at scale. + +Minimal operating systems such as Red Hat Enterprise Linux Atomic or CoreOS are purpose-built to run containers. They are small, quick, easily configured at boot time, and run containers quite well. The downside is that it requires extra engineering to add third-party extensions such as monitoring agents or tools for virtualization. Some side-loaded tooling needs redesigned as super-privileged containers. This extra engineering could be worth it if you are building a big enough container environment, but might not be necessary to just try out containers. + +Containers provide the ability to run standard workloads (things built on [glibc][4], etc.). The advantage is that the workload artifact (Docker image) can be built and tested on your desktop and deployed in production on completely different hardware or in the cloud with confidence that it will run with the same characteristics. In the production environment, container hosts are still configured by the operations teams, but the application is controlled by the developer. This is a sort of a best of both worlds. + +Unikernels and rump kernels are also purpose-built, but go a step further. The entire operating system is configured at build time by the developer or architect. This has benefits and challenges. + +One benefit is that the developer can control a lot about how the workload will run. Theoretically, a developer could try out [different TCP stacks][5] for different performance characteristics and choose the best one. The developer can configure the IP address ahead of time or have the system configure itself at boot with DHCP. The developer can also cut out anything that is not necessary for their application. There is also the promise of increased performance because of less [context switching][6]. + +There are also challenges with unikernels. Currently, there is a lot of tooling missing. It's much like a printed circuit world right now. A developer has to invest a lot of time and energy discerning if all of the right libraries exist, or they have to change the way their application works. There may also be challenges with how the "embedded" operating system is configured at runtime. Finally, every time a major change is made to the OS, it requires [going back to the developer][7] to change it. This is not a clean separation between development and operations, so I envision some organizational changes being necessary to truly adopt this model. + +### Conclusion + +There is a lot of interesting buzz around specialized container hosts, rump kernels, and unikernels because they hold the potential to revolutionize certain workloads (embedded, cloud, etc.). Keep your eye on this exciting, fast moving space, but cautiously. + +Currently, unikernels seem quite similar to building printed circuits. They require a lot of upfront investment to utilize and are very specialized, providing benefits for certain workloads. In the meantime containers are quite interesting even for conventional workloads and don't require as much investment. Typically an operations team should be able to port an application to containers, whereas it takes real re-engineering to port an application to unikernels and the industry is still not quite sure what workloads can be ported to unikernels. + +Here's to an exciting future of containers, rump kernels, and unikernels! + +-------------------------------------- +via: https://opensource.com/business/16/5/containers-unikernels-learn-arduino-raspberry-pi + +作者:[Scott McCarty][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/fatherlinux +[1]: https://opensource.com/resources/what-arduino +[2]: https://opensource.com/life/16/4/arduino-day-3-projects +[3]: https://opensource.com/resources/what-raspberry-pi +[4]: https://en.wikipedia.org/wiki/GNU_C_Library +[5]: http://www.eetasia.com/ARTICLES/2001JUN/2001JUN18_NTEK_CT_AN5.PDF +[6]: https://en.wikipedia.org/wiki/Context_switch +[7]: http://developers.redhat.com/blog/2016/05/18/3-reasons-i-should-build-my-containerized-applications-on-rhel-and-openshift/ From d25ebf4b5ebc8161ecb4bb05c693bfca60661bb7 Mon Sep 17 00:00:00 2001 From: robot527 Date: Wed, 25 May 2016 22:26:07 +0800 Subject: [PATCH 1430/1710] translating ... modified: sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md --- .../20160218 Linux Systems Patched for Critical glibc Flaw.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md index 19c654e27e..18559701b4 100644 --- a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md +++ b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md @@ -1,3 +1,5 @@ +robot527 translating + Linux Systems Patched for Critical glibc Flaw ================================================= From 04bb5e7109e5d086357b2f70b8983365087034b5 Mon Sep 17 00:00:00 2001 From: "eric.xiaozhen" Date: Thu, 26 May 2016 09:43:09 +0800 Subject: [PATCH 1431/1710] translated --- ...n source from a recruiter's perspective.md | 52 ------------------- ...n source from a recruiter's perspective.md | 49 +++++++++++++++++ 2 files changed, 49 insertions(+), 52 deletions(-) delete mode 100644 sources/talk/20160516 Open source from a recruiter's perspective.md create mode 100644 translated/talk/20160516 Open source from a recruiter's perspective.md diff --git a/sources/talk/20160516 Open source from a recruiter's perspective.md b/sources/talk/20160516 Open source from a recruiter's perspective.md deleted file mode 100644 index e8d48f77d0..0000000000 --- a/sources/talk/20160516 Open source from a recruiter's perspective.md +++ /dev/null @@ -1,52 +0,0 @@ -eriwoon 翻译中 -- 2106-May-19 -Open source from a recruiter's perspective -============================================ - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_workplay.png?itok=uQqFssrf) - -I fell in love with technology when I went to my first open source convention in 2012. - -After spending years in recruiting, I decided to take a job specializing in big data at [Greythorn][1]. I had been trying to learn the ropes for a few months leading up to [OSCON][2], but going to the conference sped that process up like crazy. There were so many brilliant people all in one place, and everyone was willing to share what they knew. It wasn't because they were trying to sell me anything, but because they were all so passionate about what they were working on. - -I soon realized that, in many ways, the open source and big data industry was less an industry and more of a community. That's why I now try to pay it forward and share what I've learned about open source with those who are just getting started in their careers. - -### Why employers want open source contributors - -Many clients tell me that although they want a candidate who has an exceptional technical mind, the ideal person should also really like this stuff. When you are passionate about something, you find yourself working on it even when you aren't getting paid. - -My clients often ask, "Do they code in their spare time?" "Can I find their work anywhere?" "What do they really enjoy?" Open source contributors are often at an advantage because they check these boxes, and not only are their projects out in the open—so is the evidence of their coding proficiency. - -#### Why recruiters search for open source contributors - -Solid tech recruiters understand the technologies and roles they're recruiting for, and they're going to assess your skills accordingly. But I'll admit that many of us have found that the best candidates we've come across have a tendency to be involved in open source, so we often just start our search there. Recruiters provide value to clients when they find candidates who are motivated to work on a team to create something awesome, because that's basically the description of a top-performing employee. - -It makes sense to me: When you take really smart people and give them the chance to be collaborative—for the sake of making something that works really well or may change the landscape of our everyday lives—it creates an energy that can be addictive. - -### What open source contributors can do to build a happy career - -There are obvious things you can do to leverage your open source work to build your career: Put your code on GitHub, participate in projects, go to conferences and join panels and workshops, etc. These are worthwhile, but more than anything you need to know what will make you happy in your work. - -Ask yourself questions like... - -* **Is it important to work for a company that gives back to the open source and software community?** I find that some of my best candidates insist on this, and it makes a huge difference in their job satisfaction. -* **Do you want to work for a company that is based on open source?** The culture is often different in these environments, and it helps to know if that's where you think you'll fit best. -* **Are there people you'd specifically like to work with?** Although you can always try to join the same projects, the odds of collaborating with and learning from someone you admire are better if your day jobs align at the same company. - -Once you know your own career priorities, it's easier to filter out the jobs that won't move you closer to your goals—and if you're working with a recruiter, it helps them match you with the right employer and team. - -Although I don't contribute code, I'll always share what I've learned with those who are working on their career in open source. This community is made up of supportive and smart people, and I love that I've been able to be a small part of it. - - ------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/5/open-source-recruiters-perspective - -作者:[Lindsey Thorne][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lindsey-thorne -[1]: http://www.greythorn.com/ -[2]: http://conferences.oreilly.com/oscon diff --git a/translated/talk/20160516 Open source from a recruiter's perspective.md b/translated/talk/20160516 Open source from a recruiter's perspective.md new file mode 100644 index 0000000000..200b6ed48c --- /dev/null +++ b/translated/talk/20160516 Open source from a recruiter's perspective.md @@ -0,0 +1,49 @@ +ͷôԴ +============================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_workplay.png?itok=uQqFssrf) + +2012 ʱҳϯһԴľۻᣬ֮Ҿϲҵ + +ͷܶ꣬ [Greythorn][1] ˾רŴ´ݷƸԼ֮ǰѧϰ˼´ݣǵҲμ [OSCON][2] Դᣬŷ֮ǰѧϰôЧʡOSCON ۼ˷dzˣÿ˶ԸǵĵáԭƷΪϲ + +Һܿʶ˵Դʹһҵ˵һcommunityҲΪʲôرҴӿԴѧĶңرǸЩո̤빤ˡ + +### ΪʲôϲԴߣcontributor +ҵͻ˵һ˵ļȻҪϲԼµĹҪȰԼĹϰ岻Ӱ๤㶼̲סӰࡣ + +ҵĿͻҲʣû¶ʱд𣿡ĶҵǵƷأʲôѽʱԴߵƾͳˣΪǸġĿԴǵҲԴ + +#### ΪʲôͷѰҿԴ + +ӲɿƼҵͷ˽⼼֪ԼһʲôˣͷҲȷ˽ļܡҷ֣ͷҵ˲źܶʱҲԴǾֱȥԴѰǵĿꡣͷǻ߹ҵǸϲŶһ˲IJƷͬҪ + +˵ĿĿǸıδǵЩŶ֮ԼͻᰮԼĹ + +### Դεõõְҵ + +ôĹ׸Ϊ֪أѴŵGithubϣԴĿμӻֵȵȡЩ벻ջġ + +ԳһԼ + +* **ڵĹ˾ǷԴҪ**ܶ˲Ŷǿһ㣬ҲἫǶԹȡ +* **ƷǷڿԴ**ڿԴĹ˾ĻΧ˾ڲͬҲѡְλʱҪǵ⡣ +* **ûر֮ˣ**ȻʱĿŶݻ͵ˣǹͰˡ + +˽Լ׷ô˵Щʺְλͼ򵥶ˣһͷҵϵĹŶӵĻʹˡ + +ȻԼд룬һҴӿԴѧĶҡԴһȺڷɣҺܿҲССһӡ + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/5/open-source-recruiters-perspective + +ߣ[Lindsey Thorne][a] +ߣ[eriwoon](https://github.com/eriwoon) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +[a]: https://opensource.com/users/lindsey-thorne +[1]: http://www.greythorn.com/ +[2]: http://conferences.oreilly.com/oscon From 37b55febf4201763980f1aed698e634eb4ce9958 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 26 May 2016 22:28:37 +0800 Subject: [PATCH 1432/1710] =?UTF-8?q?20160526-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit linux , nodejs --- ...OS : LINUX DISTRIBUTION FOR NODE LOVERS.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md diff --git a/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md b/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md new file mode 100644 index 0000000000..55b7690423 --- /dev/null +++ b/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md @@ -0,0 +1,53 @@ +NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS +================================================ + +![](http://itsfoss.com/wp-content/uploads/2016/05/node-os-linux.jpg) + +[NodeOS][1], the operating system based on [Node.js][2], is now heading towards its version 1.0 following the release of its first [Release Candidate][3] last year. + +If this is the first time you’re hearing about it, NodeOS is the first ever operating system powered by Node.js & [npm][4] and built on top of the [Linux][5] Kernel. [Jacob Groundwater][6] introduced this project in mid-2013. The primary technologies used in building the system are: + +- **Linux Kernel**: The entire OS is built off the Linux Kernel. +- **Node.js runtime**: Node is used as the primary runtime. +- **npm Packages**: npm is used for package management. + +NodeOS source is hosted on [Github Repository][7]. So, anybody interested can easily contribute and report bugs. Users can build from source or use the [pre-built images][8] available. The build process and quick start guide can be found at project repository. + +The idea behind NodeOS is to provide just enough to let npm run on it and then the rest of the functionalities will come from npm packages. So, the users have access the vast collection of about 250,000 packages and that number is continuously increasing every day. And everything being open-source, it’s always easy to patch bugs and add more packages to npm according to your need. + +NodeOS core development is separated into layers and the general structure includes: + +- **barebones** – custom Linux kernel along with an initramfs that boots to a Node.js REPL +- **initramfs** – Initram filesystem to mount the users partition & boot the system +- **rootfs** – Read-only partition image hosting the Linux kernel & initramfs files +- **usersfs** – multi-user filesystem (as traditional OSes) + +NodeOS aims to be able to run on virtually any platforms, including – **Real Hardware** (personal computers or SOCs), **Cloud platforms, Virtual machines, PaaS providers, Containers** (Docker & Vagga ) etc. And so far, it seems that they’re doing pretty good. On March 3, [Jesús Leganés Combarro][9], NodeOS member on GitHub, [announced][10] that: + +>**NodeOS is not a toy OS anymore**, and it’s very capable to be used on production environments for real use cases from now on. + +So, if you are a die-hard fan of Node.js and/or have a knack for trying new things, this might be the thing for you to try. And in related post, you should read about these niche [Linux distributions for specific usage][11]. + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/nodeos-operating-system/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Munif Tanjim][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/munif/ +[1]: http://node-os.com/ +[2]: https://nodejs.org/en/ +[3]: https://github.com/NodeOS/NodeOS/releases/tag/v1.0-RC1 +[4]: https://www.npmjs.com/ +[5]: http://itsfoss.com/tag/linux/ +[6]: https://github.com/groundwater +[7]: https://github.com/nodeos/nodeos +[8]: https://github.com/NodeOS/NodeOS/releases +[9]: https://github.com/piranna +[10]: https://github.com/NodeOS/NodeOS/issues/216 +[11]: http://itsfoss.com/weird-ubuntu-based-linux-distributions/ From 1622096bc64597a037118d0e24d2c5d1e61e6872 Mon Sep 17 00:00:00 2001 From: dongfengweixiao Date: Thu, 26 May 2016 22:56:16 +0800 Subject: [PATCH 1433/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=9A20160426=20IS=20UBUNTU=E2=80=99S=20SNAP....?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成:20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md --- ...S UBUNTU’S SNAP PACKAGING REALLY SECURE.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md diff --git a/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md b/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md new file mode 100644 index 0000000000..f898f3536d --- /dev/null +++ b/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md @@ -0,0 +1,60 @@ +Ubuntu 的 SNAP 封装真的足够安全? +========================================== + + +最近发布的 Ubuntu 16.04 LTS 版本带来了一些新功能,其中之一就是对 ZFS 格式文件系统的支持。 +另一个值得广为讨论的特性就是 Snap 格式的软件包。不过,据 CoreOS 的开发者之一所述, +Snap 封装并不像声称的那样安全。 + +### 什么是 Snap 格式? + +Snap 封装受容器的启发。这种新的封装格式允许开发人员发布运行于 Ubuntu Long-Term-Support (LTS) releases 之上的应用程序更新。 +这就可以让用户虽然运行着稳定版本的系统,但却能够让应用程序保持最新的状态。之所以能够这样, +是因为软件包本身就包含了程序运行的所有依赖。这可以防止依赖的软件更新后软件挂掉。 + +### 然而…… + +据 [Matthew Garrett][5] 的说法,Snap 封装不能完全兑现最后的承诺。Garret 最为 Linux +内核的开发人员和 CoreOS 的安全性相关工作的开发者,我想他一定知道自己在说些什么。 + +[According to Garret][6], “仅需要克服一点点困难,安装的任何 Snap 格式的软件包就能够将你的私有数据复制到任何地方”。 + +[ZDnet][7] 的报道: + +>*“为了证明自己的观点,他在Snap中构建了一个仅用于验证原理的攻击包,它首先会显示一个可爱的泰迪熊, +然后将会记录按键点击事件,并且能够窃取私人的 SSH 密钥。这个仅用于验证原理的工具包实际上注入的是一个无害的命令, +但是却能够修改 cURL session 过程来窃取 SSH 密钥。” + +### 但是稍等…… +难道 Snap 真的有安全缺陷?当然不是啦! + +Garret 自己也说,此问题仅出现在使用 X11 窗口的系统上,而对于那些使用 Mir 的移动设备无效。 +所以这个缺陷是 X11 的而不是 Snap 的。 + +>X11 是如何对应用程序进行受信是一个众所周知的安全风险。Snap 并没有更改 X11 的受信模型。 +所以一个应用程序能够看到其它应用程序的行为并不是新的包格式的缺点,而是 X11 的。 + +Garrett 实际上仅仅是想要表达,当 Canonical 歌颂 Snap 和它的安全性时,Snap 应用程序并不是完全沙盒化的。 +和其他二进制文件一样,它们也存在风险。 + +牢记 Ubuntu 16.04 当前还在使用 X11 而不是 Mir 的事实,从未知的源下载和安全 Snap 格式的软件包具有风险,然而其它不也是如此嘛?! + +相关链接: [如何在 Ubuntu 16.04 中使用 Snap 格式软件包][8]。期待您分享关于 Snap 格式及其安全性的观点。 +---------- +via: http://itsfoss.com/snap-package-securrity-issue/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[ John Paul][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/john/ +[1]: http://itsfoss.com/features-ubuntu-1604/ +[2]: http://itsfoss.com/oracle-canonical-lawsuit/ +[3]: https://en.wikipedia.org/wiki/CoreOS +[4]: https://insights.ubuntu.com/2016/04/13/snaps-for-classic-ubuntu/ +[5]: https://mjg59.dreamwidth.org/l +[6]: https://mjg59.dreamwidth.org/42320.html +[7]: http://www.zdnet.com/article/linux-expert-matthew-garrett-ubuntu-16-04s-new-snap-format-is-a-security-risk/ +[8]: http://itsfoss.com/use-snap-packages-ubuntu-16-04/ From 80d76f707f45512f0ccca993b5fa647a5606ce66 Mon Sep 17 00:00:00 2001 From: dongfengweixiao Date: Thu, 26 May 2016 22:57:14 +0800 Subject: [PATCH 1434/1710] =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=2020160426=20IS=20UBUNTU=E2=80=99S=20SNAP=20?= =?UTF-8?q?....?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 已经完成翻译 --- ...S UBUNTU’S SNAP PACKAGING REALLY SECURE.md | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 sources/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md diff --git a/sources/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md b/sources/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md deleted file mode 100644 index 2752b5855f..0000000000 --- a/sources/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md +++ /dev/null @@ -1,54 +0,0 @@ -IS UBUNTU’S SNAP PACKAGING REALLY SECURE -========================================== - - -The recent release of [Ubuntu 16.04 LTS has brought a number of new features][1], one of which we covered was the [inclusion of ZFS][2]. Another feature that many people have been talking about is the Snap package format. But according to one of the developers of [CoreOS][3], the Snap packages are not as safe as the claim. - -### WHAT ARE SNAP PACKAGES? - -Snap packages are inspired by containers. This new package format allows [developers to issue updates for applications running on Ubuntu Long-Term-Support (LTS) releases][4]. This gives users the option to run a stable operating system, but keep their applications updated. This is accomplished by including all of the application’s dependencies in the same package. This prevents the program from breaking when a dependency updates. - -Another advantage of Snap packages is that the applications are isolated from the rest of the system. This means that if you change something with a Snap package, it will not affect the rest of the system. It also prevents other applications from accessing your private information, which makes it harder for hackers to get your data. - -### BUT WAIT… - -According to [Matthew Garrett][5], Snap can’t quite deliver on the last promise. Garret works as a Linux kernel developer and security developer at CoreOS, so he should know what he’s talking about. - -[According to Garret][6], “Any Snap package you install is completely capable of copying all your private data to wherever it wants with very little difficulty.” - -[ZDnet][7] reported: - ->*“To prove his point, he built a proof-of-concept attack package in Snap, which first shows an “adorable” teddy bear and then logs keystrokes from Firefox and could be used to steal private SSH keys. The PoC actually injects a harmless command, but could be tweaked to include a cURL session to steal SSH keys.”* - -### BUT WAIT A LITTLE MORE… - -Is it really that Snap has security flaws? Apparently not so. - -Garret himself said that this problem was caused by the X11 window system and did not affect mobile devices that use Mir. So, it is the flaw in X11 that does it. It’s not Snap itself. - ->how X11 trusts applications is a well-known security risk. Snap doesn’t change X11’s trust model, so the fact that applications can see what other applications are doing isn’t a weakness in the new package format, but rather X11’s. - -Garrett is just actually trying to show that when Canonical is all praises for Snap and its security; Snap applications are not fully sandboxed. They are as risky as any other binaries. - -Keeping the fact in mind that Ubuntu 16.04 still uses X11 display, and not Mir, downloading and installing Snap packages from unknown sources might be harmful. But that’s the case with any other packaging, isn’t it? - -In related articles, you should check out [how to use Snap packages in Ubuntu 16.04][8]. And do let us know of your views on Snap and its security. - ----------- -via: http://itsfoss.com/snap-package-securrity-issue/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 - -作者:[ John Paul][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/john/ -[1]: http://itsfoss.com/features-ubuntu-1604/ -[2]: http://itsfoss.com/oracle-canonical-lawsuit/ -[3]: https://en.wikipedia.org/wiki/CoreOS -[4]: https://insights.ubuntu.com/2016/04/13/snaps-for-classic-ubuntu/ -[5]: https://mjg59.dreamwidth.org/l -[6]: https://mjg59.dreamwidth.org/42320.html -[7]: http://www.zdnet.com/article/linux-expert-matthew-garrett-ubuntu-16-04s-new-snap-format-is-a-security-risk/ -[8]: http://itsfoss.com/use-snap-packages-ubuntu-16-04/ From ae31eb2c390e69cc153502322ae9b18800c5e908 Mon Sep 17 00:00:00 2001 From: dongfengweixiao Date: Thu, 26 May 2016 23:03:14 +0800 Subject: [PATCH 1435/1710] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改错别字 --- translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md b/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md index f898f3536d..f2585bf33d 100644 --- a/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md +++ b/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md @@ -14,7 +14,7 @@ Snap 封装受容器的启发。这种新的封装格式允许开发人员发布 ### 然而…… -据 [Matthew Garrett][5] 的说法,Snap 封装不能完全兑现最后的承诺。Garret 最为 Linux +据 [Matthew Garrett][5] 的说法,Snap 封装不能完全兑现最后的承诺。Garret 作为 Linux 内核的开发人员和 CoreOS 的安全性相关工作的开发者,我想他一定知道自己在说些什么。 [According to Garret][6], “仅需要克服一点点困难,安装的任何 Snap 格式的软件包就能够将你的私有数据复制到任何地方”。 From f61f31a7aae4dd873d1416d3a65dc7ab014c61b7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 27 May 2016 00:02:15 +0800 Subject: [PATCH 1436/1710] =?UTF-8?q?20160526-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fedora , openstack , web --- ...st Fedora 24 Beta in an OpenStack cloud.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md diff --git a/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md b/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md new file mode 100644 index 0000000000..c550880223 --- /dev/null +++ b/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md @@ -0,0 +1,77 @@ +Test Fedora 24 Beta in an OpenStack cloud +=========================================== + +![](https://major.io/wp-content/uploads/2012/01/fedorainfinity.png) + +Although there are a few weeks remaining before [Fedora 24][1] is released, you can test out the Fedora 24 Beta release today! This is a great way to get [a sneak peek at new features][2] and help find bugs that still need a fix. + +The [Fedora Cloud][3] image is available for download from your favorite [local mirror][4] or directly from [Fedora’s servers][5]. In this post, I’ll show you how to import this image into an OpenStack environment and begin testing Fedora 24 Beta. + +One last thing: this is beta software. It has been reliable for me so far, but your experience may vary. I would recommend waiting for the final release before deploying any mission critical applications on it. + +### Importing the image + +The older glance client (version 1) allows you to import an image from a URL that is reachable from your OpenStack environment. This is helpful since my OpenStack cloud has a much faster connection to the internet (1 Gbps) than my home does (~ 20 mbps upload speed). However, the functionality to import from a URL was [removed in version 2 of the glance client][6]. The [OpenStackClient][7] doesn’t offer the feature either. + +There are two options here: + +- Install an older version of the glance client +- Use Horizon (the web dashboard) + +Getting an older version of glance client installed is challenging. The OpenStack requirements file for the liberty release [leaves the version of glance client without a maximum version cap][8] and it’s difficult to get all of the dependencies in order to make the older glance client work. + +Let’s use Horizon instead so we can get back to the reason for the post. + +### Adding an image in Horizon + +Log into the Horizon panel and click Compute > Images. Click + Create Image at the top right of the page and a new window should appear. Add this information in the window: + +- **Name**: Fedora 24 Cloud Beta +- **Image Source**: Image Location +- **Image Location**: http://mirrors.kernel.org/fedora/releases/test/24_Beta/CloudImages/x86_64/images/Fedora-Cloud-Base-24_Beta-1.6.x86_64.qcow2 +- **Format**: QCOW2 – QEMU Emulator +- **Copy Data**: ensure the box is checked + +When you’re finished, the window should look like this: + +![](https://major.io/wp-content/uploads/2016/05/horizon_image.png) + +Click Create Image and the images listing should show Saving for a short period of time. Once it switches to Active, you’re ready to build an instance. + +### Building the instance + +Since we’re already in Horizon, we can finish out the build process there. + +On the image listing page, find the row with the image we just uploaded and click Launch Instance on the right side. A new window will appear. The Image Name drop down should already have the Fedora 24 Beta image selected. From here, just choose an instance name, select a security group and keypair (on the Access & Security tab), and a network (on the Networking tab). Be sure to choose a flavor that has some available storage as well (m1.tiny is not enough). + +Click Launch and wait for the instance to boot. + +Once the instance build has finished, you can connect to the instance over ssh as the fedora user. If your [security group allows the connection][9] and your keypair was configured correctly, you should be inside your new Fedora 24 Beta instance! + +Not sure what to do next? Here are some suggestions: + +- Update all packages and reboot (to ensure that you are testing the latest updates) +- Install some familiar applications and verify that they work properly +- Test out your existing automation or configuration management tools +- Open bug tickets! + +-------------------------------------------------------------------------------- + +via: https://major.io/2016/05/24/test-fedora-24-beta-openstack-cloud/ + +作者:[major.io][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://major.io/about-the-racker-hacker/ +[1]: https://fedoraproject.org/wiki/Releases/24/Schedule +[2]: https://fedoraproject.org/wiki/Releases/24/ChangeSet +[3]: https://getfedora.org/en/cloud/ +[4]: https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora/24/x86_64 +[5]: https://getfedora.org/en/cloud/download/ +[6]: https://wiki.openstack.org/wiki/Glance-v2-v1-client-compatability +[7]: http://docs.openstack.org/developer/python-openstackclient/ +[8]: https://github.com/openstack/requirements/blob/stable/liberty/global-requirements.txt#L159 +[9]: https://major.io/2016/05/16/troubleshooting-openstack-network-connectivity/ From e7a8ea803b136327e46b94cf8fc7389248769676 Mon Sep 17 00:00:00 2001 From: David Dai Date: Fri, 27 May 2016 10:15:38 +0800 Subject: [PATCH 1437/1710] Translate 20160301 Linux gives me all the tools I need (#3998) --- .../20160301 Linux gives me all the tools I need.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md b/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md index b1689f4164..b092044827 100644 --- a/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md +++ b/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md @@ -1,3 +1,5 @@ +StdioA Translating + Linux gives me all the tools I need ========================================== From a83e3ae5a44485f78219587fd02ae863cc2a7aeb Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 27 May 2016 10:18:18 +0800 Subject: [PATCH 1438/1710] =?UTF-8?q?20160523-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改文件名 for windows --- ...md => 20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/{20160520 ORB: NEW GENERATION OF LINUX APPS ARE HERE.md => 20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md} (100%) diff --git a/sources/tech/20160520 ORB: NEW GENERATION OF LINUX APPS ARE HERE.md b/sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md similarity index 100% rename from sources/tech/20160520 ORB: NEW GENERATION OF LINUX APPS ARE HERE.md rename to sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md From 4a9146cb5d44b961df7bfb8249d0f366569692fc Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 27 May 2016 10:26:14 +0800 Subject: [PATCH 1439/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E8=AF=B7=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移动到对应目录 @dongfengweixiao --- .../20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md | 1 + 1 file changed, 1 insertion(+) rename translated/{ => tech}/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md (99%) diff --git a/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md b/translated/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md similarity index 99% rename from translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md rename to translated/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md index f2585bf33d..891af48b0b 100644 --- a/translated/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md +++ b/translated/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md @@ -40,6 +40,7 @@ Garrett 实际上仅仅是想要表达,当 Canonical 歌颂 Snap 和它的安 牢记 Ubuntu 16.04 当前还在使用 X11 而不是 Mir 的事实,从未知的源下载和安全 Snap 格式的软件包具有风险,然而其它不也是如此嘛?! 相关链接: [如何在 Ubuntu 16.04 中使用 Snap 格式软件包][8]。期待您分享关于 Snap 格式及其安全性的观点。 + ---------- via: http://itsfoss.com/snap-package-securrity-issue/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 From fb72e1620690ccb24d4062de37ecb8a3909a60c1 Mon Sep 17 00:00:00 2001 From: cposture Date: Fri, 27 May 2016 19:56:10 +0800 Subject: [PATCH 1440/1710] Translating by cposture --- sources/tech/20160518 Python 3: An Intro to Encryption.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160518 Python 3: An Intro to Encryption.md b/sources/tech/20160518 Python 3: An Intro to Encryption.md index 43c042d5c1..f80702a771 100644 --- a/sources/tech/20160518 Python 3: An Intro to Encryption.md +++ b/sources/tech/20160518 Python 3: An Intro to Encryption.md @@ -1,3 +1,4 @@ +[Translating by cposture] Python 3: An Intro to Encryption =================================== From cbf1008263ccaf56baf3a24c598a469056c25f90 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 May 2016 22:50:43 +0800 Subject: [PATCH 1441/1710] =?UTF-8?q?PUB:20160426=20IS=20UBUNTU=E2=80=99S?= =?UTF-8?q?=20SNAP=20PACKAGING=20REALLY=20SECURE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @dongfengweixiao --- ...S UBUNTU’S SNAP PACKAGING REALLY SECURE.md | 53 ++++++++++++++++ ...S UBUNTU’S SNAP PACKAGING REALLY SECURE.md | 61 ------------------- 2 files changed, 53 insertions(+), 61 deletions(-) create mode 100644 published/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md delete mode 100644 translated/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md diff --git a/published/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md b/published/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md new file mode 100644 index 0000000000..42da17d2b7 --- /dev/null +++ b/published/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md @@ -0,0 +1,53 @@ +Ubuntu 的 snap 软件包封装真的安全吗? +========================================== + +最近发布的 [Ubuntu 16.04 LTS 版本带来了一些新功能[1],其中之一就是对 [ZFS 格式文件系统的支持][2]。另一个值得广为讨论的特性就是 Snap 软件包格式。不过,据 [CoreOS][3] 的开发者之一所述,Snap 软件包并不像声称的那样安全。 + +### 什么是 Snap 软件包? + +Snap 软件包的灵感来自容器。这种新的封装格式允许[开发人员为运行于 Ubuntu 长期支持版本 (LTS)之上的应用程序发布更新][4]。这就可以让用户虽然运行着稳定版本的操作系统,但却能够让应用程序保持最新的状态。之所以能够这样,是因为软件包本身就包含了程序运行的所有依赖。这可以防止依赖的软件更新后软件挂掉。 + +snap 软件包的另外一个优势是应用与系统的其它部分是隔离的。这意味着如果你改变了 snap 软件包的一些东西,它不会影响到系统的其它部分。这也可以防止其它的应用访问你的隐私信息,从而使骇客根据难以获取你的数据。 + +### 然而…… + +据 [Matthew Garrett][5] 的说法,Snap 软件包不能完全兑现上述承诺。Garret 作为 Linux 内核的开发人员和 CoreOS 的安全性方面的开发者,我想他一定知道自己在说些什么。 + +[据 Garret 说][6], “仅需要克服一点点困难,安装的任何 Snap 格式的软件包就完全能够将你所有的私有数据复制到任何地方”。 + +[ZDnet][7] 的报道: + +> “为了证明自己的观点,他在 Snap 中构建了一个仅用于验证其原理的用于破坏的软件包,它首先会显示一个可爱的泰迪熊,然后将会记录 Firefox 的键盘按键事件,并且能够窃取 SSH 私钥。这个仅用于验证原理的软件包实际上注入的是一个无害的命令,但是却能够修改成一个窃取 SSH 密钥的 cURL 会话。” + +### 但是稍等…… + +难道 Snap 真的有安全缺陷?事实上却不是! + +Garret 自己也说,此问题仅出现在使用 X11 窗口系统上,而对于那些使用 Mir 的移动设备无效。所以这个缺陷是 X11 的而不是 Snap 的。 + +> X11 是如何信任应用程序的,这是一个众所周知的安全风险。Snap 并没有更改 X11 的信任模型。所以一个应用程序能够看到其它应用程序的行为并不是这种新的封装格式的缺点,而是 X11 的。 + +Garrett 实际上想表达的只是,当 Canonical 歌颂 Snap 和它的安全性时,Snap 应用程序并不是完全沙盒化的。和其他二进制文件一样,它们也存在风险。 + +请牢记 Ubuntu 16.04 当前还在使用 X11 而不是 Mir 的事实,从未知的源下载和安装 Snap 格式的软件包也许还是有风险的,然而其它不也是如此嘛?! + +相关链接: [如何在 Ubuntu 16.04 中使用 Snap 软件包][8]。期待您分享关于 Snap 格式及其安全性的观点。 + +---------- +via: http://itsfoss.com/snap-package-securrity-issue/ + +作者:[John Paul][a] +译者:[dongfengweixiao](https://github.com/dongfengweixiao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://itsfoss.com/author/john/ +[1]: http://itsfoss.com/features-ubuntu-1604/ +[2]: http://itsfoss.com/oracle-canonical-lawsuit/ +[3]: https://en.wikipedia.org/wiki/CoreOS +[4]: https://insights.ubuntu.com/2016/04/13/snaps-for-classic-ubuntu/ +[5]: https://mjg59.dreamwidth.org/l +[6]: https://mjg59.dreamwidth.org/42320.html +[7]: http://www.zdnet.com/article/linux-expert-matthew-garrett-ubuntu-16-04s-new-snap-format-is-a-security-risk/ +[8]: http://itsfoss.com/use-snap-packages-ubuntu-16-04/ diff --git a/translated/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md b/translated/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md deleted file mode 100644 index 891af48b0b..0000000000 --- a/translated/tech/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md +++ /dev/null @@ -1,61 +0,0 @@ -Ubuntu 的 SNAP 封装真的足够安全? -========================================== - - -最近发布的 Ubuntu 16.04 LTS 版本带来了一些新功能,其中之一就是对 ZFS 格式文件系统的支持。 -另一个值得广为讨论的特性就是 Snap 格式的软件包。不过,据 CoreOS 的开发者之一所述, -Snap 封装并不像声称的那样安全。 - -### 什么是 Snap 格式? - -Snap 封装受容器的启发。这种新的封装格式允许开发人员发布运行于 Ubuntu Long-Term-Support (LTS) releases 之上的应用程序更新。 -这就可以让用户虽然运行着稳定版本的系统,但却能够让应用程序保持最新的状态。之所以能够这样, -是因为软件包本身就包含了程序运行的所有依赖。这可以防止依赖的软件更新后软件挂掉。 - -### 然而…… - -据 [Matthew Garrett][5] 的说法,Snap 封装不能完全兑现最后的承诺。Garret 作为 Linux -内核的开发人员和 CoreOS 的安全性相关工作的开发者,我想他一定知道自己在说些什么。 - -[According to Garret][6], “仅需要克服一点点困难,安装的任何 Snap 格式的软件包就能够将你的私有数据复制到任何地方”。 - -[ZDnet][7] 的报道: - ->*“为了证明自己的观点,他在Snap中构建了一个仅用于验证原理的攻击包,它首先会显示一个可爱的泰迪熊, -然后将会记录按键点击事件,并且能够窃取私人的 SSH 密钥。这个仅用于验证原理的工具包实际上注入的是一个无害的命令, -但是却能够修改 cURL session 过程来窃取 SSH 密钥。” - -### 但是稍等…… -难道 Snap 真的有安全缺陷?当然不是啦! - -Garret 自己也说,此问题仅出现在使用 X11 窗口的系统上,而对于那些使用 Mir 的移动设备无效。 -所以这个缺陷是 X11 的而不是 Snap 的。 - ->X11 是如何对应用程序进行受信是一个众所周知的安全风险。Snap 并没有更改 X11 的受信模型。 -所以一个应用程序能够看到其它应用程序的行为并不是新的包格式的缺点,而是 X11 的。 - -Garrett 实际上仅仅是想要表达,当 Canonical 歌颂 Snap 和它的安全性时,Snap 应用程序并不是完全沙盒化的。 -和其他二进制文件一样,它们也存在风险。 - -牢记 Ubuntu 16.04 当前还在使用 X11 而不是 Mir 的事实,从未知的源下载和安全 Snap 格式的软件包具有风险,然而其它不也是如此嘛?! - -相关链接: [如何在 Ubuntu 16.04 中使用 Snap 格式软件包][8]。期待您分享关于 Snap 格式及其安全性的观点。 - ----------- -via: http://itsfoss.com/snap-package-securrity-issue/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 - -作者:[ John Paul][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/john/ -[1]: http://itsfoss.com/features-ubuntu-1604/ -[2]: http://itsfoss.com/oracle-canonical-lawsuit/ -[3]: https://en.wikipedia.org/wiki/CoreOS -[4]: https://insights.ubuntu.com/2016/04/13/snaps-for-classic-ubuntu/ -[5]: https://mjg59.dreamwidth.org/l -[6]: https://mjg59.dreamwidth.org/42320.html -[7]: http://www.zdnet.com/article/linux-expert-matthew-garrett-ubuntu-16-04s-new-snap-format-is-a-security-risk/ -[8]: http://itsfoss.com/use-snap-packages-ubuntu-16-04/ From 1fe23001aa6a888b5bc3cebde3760a4361058bd8 Mon Sep 17 00:00:00 2001 From: qingyunha Date: Sat, 28 May 2016 00:32:21 +0800 Subject: [PATCH 1442/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=2020160527=20A=20Python=20Interpreter=20Written=20in=20Python?= =?UTF-8?q?=20(#4000)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @qingyunha merged --- ... A Python Interpreter Written in Python.md | 996 ++++++++++++++++++ 1 file changed, 996 insertions(+) create mode 100644 translated/tech/20160527 A Python Interpreter Written in Python.md diff --git a/translated/tech/20160527 A Python Interpreter Written in Python.md b/translated/tech/20160527 A Python Interpreter Written in Python.md new file mode 100644 index 0000000000..dbf8dc7cf4 --- /dev/null +++ b/translated/tech/20160527 A Python Interpreter Written in Python.md @@ -0,0 +1,996 @@ +用Python实现Python解释器 +=== + +_Allison是Dropbox的工程师,在那里她维护着世界上最大的由Python客户组成的网络。在Dropbox之前,她是Recurse Center的导师, 曾在纽约写作。在北美的PyCon做过关于Python内部机制的演讲,并且她喜欢奇怪的bugs。她的博客地址是[akaptur.com](http://akaptur.com)._ + +## Introduction + +Byterun是一个用Python实现的Python解释器。随着我在Byterun上的工作,我惊讶并很高兴地的发现,这个Python解释器的基础结构可以满足500行的限制。在这一章我们会搞清楚这个解释器的结构,给你足够的知识探索下去。我们的目标不是向你展示解释器的每个细节---像编程和计算机科学其他有趣的领域一样,你可能会投入几年的时间去搞清楚这个主题。 + +Byterun是Ned Batchelder和我完成的,建立在Paul Swartz的工作之上。它的结构和主要的Python实现(CPython)差不多,所以理解Byterun会帮助你理解大多数解释器特别是CPython解释器。(如果你不知道你用的是什么Python,那么很可能它就是CPython)。尽管Byterun很小,但它能执行大多数简单的Python程序。 + +### A Python Interpreter + +在开始之前,让我们缩小一下“Pyhton解释器”的意思。在讨论Python的时候,“解释器”这个词可以用在很多不同的地方。有的时候解释器指的是REPL,当你在命令行下敲下`python`时所得到的交互式环境。有时候人们会相互替代的使用Python解释器和Python来说明执行Python代码的这一过程。在本章,“解释器”有一个更精确的意思:执行Python程序过程中的最后一步。 + +在解释器接手之前,Python会执行其他3个步骤:词法分析,语法解析和编译。这三步合起来把源代码转换成_code object_,它包含着解释器可以理解的指令。而解释器的工作就是解释code object中的指令。 + +你可能很奇怪执行Python代码会有编译这一步。Python通常被称为解释型语言,就像Ruby,Perl一样,它们和编译型语言相对,比如C,Rust。然而,这里的术语并不是它看起来的那样精确。大多数解释型语言包括Python,确实会有编译这一步。而Python被称为解释型的原因是相对于编译型语言,它在编译这一步的工作相对较少(解释器做相对多的工作)。在这章后面你会看到,Python的编译器比C语言编译器需要更少的关于程序行为的信息。 + +### A Python Python Interpreter + +Byterun是一个用Python写的Python解释器,这点可能让你感到奇怪,但没有比用C语言写C语言编译器更奇怪。(事实上,广泛使用的gcc编译器就是用C语言本身写的)你可以用几乎的任何语言写一个Python解释器。 + +用Python写Python既有优点又有缺点。最大的缺点就是速度:用Byterun执行代码要比用CPython执行慢的多,CPython解释器是用C语言实现的并做了优化。然而Byterun是为了学习而设计的,所以速度对我们不重要。使用Python最大优点是我们可以*仅仅*实现解释器,而不用担心Python运行时的部分,特别是对象系统。比如当Byterun需要创建一个类时,它就会回退到“真正”的Python。另外一个优势是Byterun很容易理解,部分原因是它是用高级语言写的(Python!)(另外我们不会对解释器做优化 --- 再一次,清晰和简单比速度更重要) + +## Building an Interpreter + +在我们考察Byterun代码之前,我们需要一些对解释器结构的高层次视角。Python解释器是如何工作的? + +Python解释器是一个_虚拟机_,模拟真实计算机的软件。我们这个虚拟机是栈机器,它用几个栈来完成操作(与之相对的是寄存器机器,它从特定的内存地址读写数据)。 + +Python解释器是一个_字节码解释器_:它的输入是一些命令集合称作_字节码_。当你写Python代码时,词法分析器,语法解析器和编译器生成code object让解释器去操作。每个code object都包含一个要被执行的指令集合 --- 它就是字节码 --- 另外还有一些解释器需要的信息。字节码是Python代码的一个_中间层表示_:它以一种解释器可以理解的方式来表示源代码。这和汇编语言作为C语言和机器语言的中间表示很类似。 + +### A Tiny Interpreter + +为了让说明更具体,让我们从一个非常小的解释器开始。它只能计算两个数的和,只能理解三个指令。它执行的所有代码只是这三个指令的不同组合。下面就是这三个指令: + +- `LOAD_VALUE` +- `ADD_TWO_VALUES` +- `PRINT_ANSWER` + +我们不关心词法,语法和编译,所以我们也不在乎这些指令是如何产生的。你可以想象,你写下`7 + 5`,然后一个编译器为你生成那三个指令的组合。如果你有一个合适的编译器,你甚至可以用Lisp的语法来写,只要它能生成相同的指令。 + +假设 + +```python +7 + 5 +``` + +生成这样的指令集: + +```python +what_to_execute = { + "instructions": [("LOAD_VALUE", 0), # the first number + ("LOAD_VALUE", 1), # the second number + ("ADD_TWO_VALUES", None), + ("PRINT_ANSWER", None)], + "numbers": [7, 5] } +``` + +Python解释器是一个_栈机器_,所以它必须通过操作栈来完成这个加法。(\aosafigref{500l.interpreter.stackmachine}.)解释器先执行第一条指令,`LOAD_VALUE`,把第一个数压到栈中。接着它把第二个数也压到栈中。然后,第三条指令,`ADD_TWO_VALUES`,先把两个数从栈中弹出,加起来,再把结果压入栈中。最后一步,把结果弹出并输出。 + +\aosafigure[240pt]{interpreter-images/interpreter-stack.png}{A stack machine}{500l.interpreter.stackmachine} + +`LOAD_VALUE`这条指令告诉解释器把一个数压入栈中,但指令本身并没有指明这个数是多少。指令需要一个额外的信息告诉解释器去哪里找到这个数。所以我们的指令集有两个部分:指令本身和一个常量列表。(在Python中,字节码就是我们称为的“指令”,而解释器执行的是_code object_。) + +为什么不把数字直接嵌入指令之中?想象一下,如果我们加的不是数字,而是字符串。我们可不想把字符串这样的东西加到指令中,因为它可以有任意的长度。另外,我们这种设计也意味着我们只需要对象的一份拷贝,比如这个加法 `7 + 7`, 现在常量表 `"numbers"`只需包含一个`7`。 + +你可能会想为什么会需要除了`ADD_TWO_VALUES`之外的指令。的确,对于我们两个数加法,这个例子是有点人为制作的意思。然而,这个指令却是建造更复杂程序的轮子。比如,就我们目前定义的三个指令,只要给出正确的指令组合,我们可以做三个数的加法,或者任意个数的加法。同时,栈提供了一个清晰的方法去跟踪解释器的状态,这为我们增长的复杂性提供了支持。 + +现在让我们来完成我们的解释器。解释器对象需要一个栈,它可以用一个列表来表示。它还需要一个方法来描述怎样执行每条指令。比如,`LOAD_VALUE`会把一个值压入栈中。 + +```python +class Interpreter: + def __init__(self): + self.stack = [] + + def LOAD_VALUE(self, number): + self.stack.append(number) + + def PRINT_ANSWER(self): + answer = self.stack.pop() + print(answer) + + def ADD_TWO_VALUES(self): + first_num = self.stack.pop() + second_num = self.stack.pop() + total = first_num + second_num + self.stack.append(total) +``` + +这三个方法完成了解释器所理解的三条指令。但解释器还需要一样东西:一个能把所有东西结合在一起并执行的方法。这个方法就叫做`run_code`, 它把我们前面定义的字典结构`what-to-execute`作为参数,循环执行里面的每条指令,如何指令有参数,处理参数,然后调用解释器对象中相应的方法。 + +```python + def run_code(self, what_to_execute): + instructions = what_to_execute["instructions"] + numbers = what_to_execute["numbers"] + for each_step in instructions: + instruction, argument = each_step + if instruction == "LOAD_VALUE": + number = numbers[argument] + self.LOAD_VALUE(number) + elif instruction == "ADD_TWO_VALUES": + self.ADD_TWO_VALUES() + elif instruction == "PRINT_ANSWER": + self.PRINT_ANSWER() +``` + +为了测试,我们创建一个解释器对象,然后用前面定义的 7 + 5 的指令集来调用`run_code`。 + +```python + interpreter = Interpreter() + interpreter.run_code(what_to_execute) +``` + +显然,它会输出12 + +尽管我们的解释器功能受限,但这个加法过程几乎和真正的Python解释器是一样的。这里,我们还有几点要注意。 + +首先,一些指令需要参数。在真正的Python bytecode中,大概有一半的指令有参数。像我们的例子一样,参数和指令打包在一起。注意_指令_的参数和传递给对应方法的参数是不同的。 + +第二,指令`ADD_TWO_VALUES`不需要任何参数,它从解释器栈中弹出所需的值。这正是以栈为基础的解释器的特点。 + +记得我们说过只要给出合适的指令集,不需要对解释器做任何改变,我们就能做多个数的加法。考虑下面的指令集,你觉得会发生什么?如果你有一个合适的编译器,什么代码才能编译出下面的指令集? + +```python + what_to_execute = { + "instructions": [("LOAD_VALUE", 0), + ("LOAD_VALUE", 1), + ("ADD_TWO_VALUES", None), + ("LOAD_VALUE", 2), + ("ADD_TWO_VALUES", None), + ("PRINT_ANSWER", None)], + "numbers": [7, 5, 8] } +``` + +从这点出发,我们开始看到这种结构的可扩展性:我们可以通过向解释器对象增加方法来描述更多的操作(只要有一个编译器能为我们生成组织良好的指令集)。 + +#### Variables + +接下来给我们的解释器增加变量的支持。我们需要一个保存变量值的指令,`STORE_NAME`;一个取变量值的指令`LOAD_NAME`;和一个变量到值的映射关系。目前,我们会忽略命名空间和作用域,所以我们可以把变量和值的映射直接存储在解释器对象中。最后,我们要保证`what_to_execute`除了一个常量列表,还要有个变量名字的列表。 + +```python +>>> def s(): +... a = 1 +... b = 2 +... print(a + b) +# a friendly compiler transforms `s` into: + what_to_execute = { + "instructions": [("LOAD_VALUE", 0), + ("STORE_NAME", 0), + ("LOAD_VALUE", 1), + ("STORE_NAME", 1), + ("LOAD_NAME", 0), + ("LOAD_NAME", 1), + ("ADD_TWO_VALUES", None), + ("PRINT_ANSWER", None)], + "numbers": [1, 2], + "names": ["a", "b"] } +``` + +我们的新的的实现在下面。为了跟踪哪名字绑定到那个值,我们在`__init__`方法中增加一个`environment`字典。我们也增加了`STORE_NAME`和`LOAD_NAME`方法,它们获得变量名,然后从`environment`字典中设置或取出这个变量值。 + +现在指令参数就有两个不同的意思,它可能是`numbers`列表的索引,也可能是`names`列表的索引。解释器通过检查所执行的指令就能知道是那种参数。而我们打破这种逻辑 ,把指令和它所用何种参数的映射关系放在另一个单独的方法中。 + +```python +class Interpreter: + def __init__(self): + self.stack = [] + self.environment = {} + + def STORE_NAME(self, name): + val = self.stack.pop() + self.environment[name] = val + + def LOAD_NAME(self, name): + val = self.environment[name] + self.stack.append(val) + + def parse_argument(self, instruction, argument, what_to_execute): + """ Understand what the argument to each instruction means.""" + numbers = ["LOAD_VALUE"] + names = ["LOAD_NAME", "STORE_NAME"] + + if instruction in numbers: + argument = what_to_execute["numbers"][argument] + elif instruction in names: + argument = what_to_execute["names"][argument] + + return argument + + def run_code(self, what_to_execute): + instructions = what_to_execute["instructions"] + for each_step in instructions: + instruction, argument = each_step + argument = self.parse_argument(instruction, argument, what_to_execute) + + if instruction == "LOAD_VALUE": + self.LOAD_VALUE(argument) + elif instruction == "ADD_TWO_VALUES": + self.ADD_TWO_VALUES() + elif instruction == "PRINT_ANSWER": + self.PRINT_ANSWER() + elif instruction == "STORE_NAME": + self.STORE_NAME(argument) + elif instruction == "LOAD_NAME": + self.LOAD_NAME(argument) +``` + +仅仅五个指令,`run_code`这个方法已经开始变得冗长了。如果保持这种结构,那么每条指令都需要一个`if`分支。这里,我们要利用Python的动态方法查找。我们总会给一个称为`FOO`的指令定义一个名为`FOO`的方法,这样我们就可用Python的`getattr`函数在运行时动态查找方法,而不用这个大大的分支结构。`run_code`方法现在是这样: + +```python + def execute(self, what_to_execute): + instructions = what_to_execute["instructions"] + for each_step in instructions: + instruction, argument = each_step + argument = self.parse_argument(instruction, argument, what_to_execute) + bytecode_method = getattr(self, instruction) + if argument is None: + bytecode_method() + else: + bytecode_method(argument) +``` + +## Real Python Bytecode + +现在,放弃我们的小指令集,去看看真正的Python字节码。字节码的结构和我们的小解释器的指令集差不多,除了字节码用一个字节而不是一个名字来指示这条指令。为了理解它的结构,我们将考察一个函数的字节码。考虑下面这个例子: + +```python +>>> def cond(): +... x = 3 +... if x < 5: +... return 'yes' +... else: +... return 'no' +... +``` + +Python在运行时会暴露一大批内部信息,并且我们可以通过REPL直接访问这些信息。对于函数对象`cond`,`cond.__code__`是与其关联的code object,而`cond.__code__.co_code`就是它的字节码。当你写Python代码时,你永远也不会想直接使用这些属性,但是这可以让我们做出各种恶作剧,同时也可以看看内部机制。 + +```python +>>> cond.__code__.co_code # the bytecode as raw bytes +b'd\x01\x00}\x00\x00|\x00\x00d\x02\x00k\x00\x00r\x16\x00d\x03\x00Sd\x04\x00Sd\x00 + \x00S' +>>> list(cond.__code__.co_code) # the bytecode as numbers +[100, 1, 0, 125, 0, 0, 124, 0, 0, 100, 2, 0, 107, 0, 0, 114, 22, 0, 100, 3, 0, 83, + 100, 4, 0, 83, 100, 0, 0, 83] +``` + +当我们直接输出这个字节码,它看起来完全无法理解 --- 唯一我们了解的是它是一串字节。很幸运,我们有一个很强大的工具可以用:Python标准库中的`dis`模块。 + +`dis`是一个字节码反汇编器。反汇编器以为机器而写的底层代码作为输入,比如汇编代码和字节码,然后以人类可读的方式输出。当我们运行`dis.dis`, 它输出每个字节码的解释。 + +```python +>>> dis.dis(cond) + 2 0 LOAD_CONST 1 (3) + 3 STORE_FAST 0 (x) + + 3 6 LOAD_FAST 0 (x) + 9 LOAD_CONST 2 (5) + 12 COMPARE_OP 0 (<) + 15 POP_JUMP_IF_FALSE 22 + + 4 18 LOAD_CONST 3 ('yes') + 21 RETURN_VALUE + + 6 >> 22 LOAD_CONST 4 ('no') + 25 RETURN_VALUE + 26 LOAD_CONST 0 (None) + 29 RETURN_VALUE +``` + +这些都是什么意思?让我们以第一条指令`LOAD_CONST`为例子。第一列的数字(`2`)表示对应源代码的行数。第二列的数字是字节码的索引,告诉我们指令`LOAD_CONST`在0位置。第三列是指令本身对应的人类可读的名字。如果第四列存在,它表示指令的参数。如果第5列存在,它是一个关于参数是什么的提示。 + +考虑这个字节码的前几个字节:[100, 1, 0, 125, 0, 0]。这6个字节表示两条带参数的指令。我们可以使用`dis.opname`,一个字节到可读字符串的映射,来找到指令100和指令125代表是什么: + +```python +>>> dis.opname[100] +'LOAD_CONST' +>>> dis.opname[125] +'STORE_FAST' +``` + +第二和第三个字节 --- 1 ,0 ---是`LOAD_CONST`的参数,第五和第六个字节 --- 0,0 --- 是`STORE_FAST`的参数。就像我们前面的小例子,`LOAD_CONST`需要知道的到哪去找常量,`STORE_FAST`需要找到名字。(Python的`LOAD_CONST`和我们小例子中的`LOAD_VALUE`一样,`LOAD_FAST`和`LOAD_NAME`一样)。所以这六个字节代表第一行源代码`x = 3`.(为什么用两个字节表示指令的参数?如果Python使用一个字节,每个code object你只能有256个常量/名字,而用两个字节,就增加到了256的平方,65536个)。 + +### Conditionals and Loops + +到目前为止,我们的解释器只能一条接着一条的执行指令。这有个问题,我们经常会想多次执行某个指令,或者在特定的条件下跳过它们。为了可以写循环和分支结构,解释器必须能够在指令中跳转。在某种程度上,Python在字节码中使用`GOTO`语句来处理循环和分支!让我们再看一个`cond`函数的反汇编结果: + +```python +>>> dis.dis(cond) + 2 0 LOAD_CONST 1 (3) + 3 STORE_FAST 0 (x) + + 3 6 LOAD_FAST 0 (x) + 9 LOAD_CONST 2 (5) + 12 COMPARE_OP 0 (<) + 15 POP_JUMP_IF_FALSE 22 + + 4 18 LOAD_CONST 3 ('yes') + 21 RETURN_VALUE + + 6 >> 22 LOAD_CONST 4 ('no') + 25 RETURN_VALUE + 26 LOAD_CONST 0 (None) + 29 RETURN_VALUE +``` + +第三行的条件表达式`if x < 5`被编译成四条指令:`LOAD_FAST`, `LOAD_CONST`, `COMPARE_OP`和 `POP_JUMP_IF_FALSE`。`x < 5`对应加载`x`,加载5,比较这两个值。指令`POP_JUMP_IF_FALSE`完成`if`语句。这条指令把栈顶的值弹出,如果值为真,什么都不发生。如果值为假,解释器会跳转到另一条指令。 + +这条将被加载的指令称为跳转目标,它作为指令`POP_JUMP`的参数。这里,跳转目标是22,索引为22的指令是`LOAD_CONST`,对应源码的第6行。(`dis`用`>>`标记跳转目标。)如果`X < 5`为假,解释器会忽略第四行(`return yes`),直接跳转到第6行(`return "no"`)。因此解释器通过跳转指令选择性的执行指令。 + +Python的循环也依赖于跳转。在下面的字节码中,`while x < 5`这一行产生了和`if x < 10`几乎一样的字节码。在这两种情况下,解释器都是先执行比较,然后执行`POP_JUMP_IF_FALSE`来控制下一条执行哪个指令。第四行的最后一条字节码`JUMP_ABSOLUT`(循环体结束的地方),让解释器返回到循环开始的第9条指令处。当 `x < 10`变为假,`POP_JUMP_IF_FALSE`会让解释器跳到循环的终止处,第34条指令。 + +```python +>>> def loop(): +... x = 1 +... while x < 5: +... x = x + 1 +... return x +... +>>> dis.dis(loop) + 2 0 LOAD_CONST 1 (1) + 3 STORE_FAST 0 (x) + + 3 6 SETUP_LOOP 26 (to 35) + >> 9 LOAD_FAST 0 (x) + 12 LOAD_CONST 2 (5) + 15 COMPARE_OP 0 (<) + 18 POP_JUMP_IF_FALSE 34 + + 4 21 LOAD_FAST 0 (x) + 24 LOAD_CONST 1 (1) + 27 BINARY_ADD + 28 STORE_FAST 0 (x) + 31 JUMP_ABSOLUTE 9 + >> 34 POP_BLOCK + + 5 >> 35 LOAD_FAST 0 (x) + 38 RETURN_VALUE +``` + +### Explore Bytecode + +我希望你用`dis.dis`来试试你自己写的函数。一些有趣的问题值得探索: + +- 对解释器而言for循环和while循环有什么不同? +- 能不能写出两个不同函数,却能产生相同的字节码? +- `elif`是怎么工作的?列表推导呢? + +## Frames + +到目前为止,我们已经知道了Python虚拟机是一个栈机器。它能顺序执行指令,在指令间跳转,压入或弹出栈值。但是这和我们期望的解释器还有一定距离。在前面的那个例子中,最后一条指令是`RETURN_VALUE`,它和`return`语句相对应。但是它返回到哪里去呢? + +为了回答这个问题,我们必须再增加一层复杂性:frame。一个frame是一些信息的集合和代码的执行上下文。frames在Python代码执行时动态的创建和销毁。每个frame对应函数的一次调用。--- 所以每个frame只有一个code object与之关联,而一个code object可以有多个frame。比如你有一个函数递归的调用自己10次,这会产生11个frame,每次调用对应一个,再加上启动模块对应的一个frame。总的来说,Python程序的每个作用域有一个frame,比如,模块,函数,类。 + +Frame存在于_调用栈_中,一个和我们之前讨论的完全不同的栈。(你最熟悉的栈就是调用栈,就是你经常看到的异常回溯,每个以"File 'program.py'"开始的回溯对应一个frame。)解释器在执行字节码时操作的栈,我们叫它_数据栈_。其实还有第三个栈,叫做_块栈_,用于特定的控制流块,比如循环和异常处理。调用栈中的每个frame都有它自己的数据栈和块栈。 + +让我们用一个具体的例子来说明。假设Python解释器执行到标记为3的地方。解释器正在`foo`函数的调用中,它接着调用`bar`。下面是frame调用栈,块栈和数据栈的示意图。我们感兴趣的是解释器先从最底下的`foo()`开始,接着执行`foo`的函数体,然后到达`bar`。 + +```python +>>> def bar(y): +... z = y + 3 # <--- (3) ... and the interpreter is here. +... return z +... +>>> def foo(): +... a = 1 +... b = 2 +... return a + bar(b) # <--- (2) ... which is returning a call to bar ... +... +>>> foo() # <--- (1) We're in the middle of a call to foo ... +3 +``` + +\aosafigure[240pt]{interpreter-images/interpreter-callstack.png}{The call stack}{500l.interpreter.callstack} + +现在,解释器在`bar`函数的调用中。调用栈中有3个frame:一个对应于模块层,一个对应函数`foo`,别一个对应函数`bar`。(\aosafigref{500l.interpreter.callstack}.)一旦`bar`返回,与它对应的frame就会从调用栈中弹出并丢弃。 + +字节码指令`RETURN_VALUE`告诉解释器在frame间传递一个值。首先,它把位于调用栈栈顶的frame中的数据栈的栈顶值弹出。然后把整个frame弹出丢弃。最后把这个值压到下一个frame的数据栈中。 + +当Ned Batchelder和我在写Byterun时,很长一段时间我们的实现中一直有个重大的错误。我们整个虚拟机中只有一个数据栈,而不是每个frame都有一个。我们写了很多测试代码,同时在Byterun和真正的Python上运行,希望得到一致结果。我们几乎通过了所有测试,只有一样东西不能通过,那就是生成器。最后,通过仔细的阅读CPython的源码,我们发现了错误所在[^thanks]。把数据栈移到每个frame就解决了这个问题。 + +[^thanks]: 感谢 Michael Arntzenius 对这个bug的洞悉。 + +回头在看看这个bug,我惊讶的发现Python真的很少依赖于每个frame有一个数据栈这个特性。在Python中几乎所有的操作都会清空数据栈,所以所有的frame公用一个数据栈是没问题的。在上面的例子中,当`bar`执行完后,它的数据栈为空。即使`foo`公用这一个栈,它的值也不会受影响。然而,对应生成器,一个关键的特点是它能暂停一个frame的执行,返回到其他的frame,一段时间后它能返回到原来的frame,并以它离开时的相同状态继续执行。 + +## Byterun + +现在我们有足够的Python解释器的知识背景去考察Byterun。 + +Byterun中有四种对象。 + +- `VirtualMachine`类,它管理高层结构,frame调用栈,指令到操作的映射。这是一个比前面`Inteprter`对象更复杂的版本。 +- `Frame`类,每个`Frame`类都有一个code object,并且管理者其他一些必要的状态信息,全局和局部命名空间,指向调用它的frame的指针和最后执行的字节码指令。 +- `Function`类,它被用来代替真正的Python函数。回想一下,调用函数时会创建一个新的frame。我们自己实现`Function`,所以我们控制新frame的创建。 +- `Block`类,它只是包装了block的3个属性。(block的细节不是解释器的核心,我们不会花时间在它身上,把它列在这里,是因为Byterun需要它。) + +### The `VirtualMachine` Class + +程序运行时只有一个`VirtualMachine`被创建,因为我们只有一个解释器。`VirtualMachine`保存调用栈,异常状态,在frame中传递的返回值。它的入口点是`run_code`方法,它以编译后的code object为参数,以创建一个frame为开始,然后运行这个frame。这个frame可能再创建出新的frame;调用栈随着程序的运行增长缩短。当第一个frame返回时,执行结束。 + +```python +class VirtualMachineError(Exception): + pass + +class VirtualMachine(object): + def __init__(self): + self.frames = [] # The call stack of frames. + self.frame = None # The current frame. + self.return_value = None + self.last_exception = None + + def run_code(self, code, global_names=None, local_names=None): + """ An entry point to execute code using the virtual machine.""" + frame = self.make_frame(code, global_names=global_names, + local_names=local_names) + self.run_frame(frame) + +``` + +### The `Frame` Class + +接下来,我们来写`Frame`对象。frame是一个属性的集合,它没有任何方法。前面提到过,这些属性包括由编译器生成的code object;局部,全局和内置命名空间;前一个frame的引用;一个数据栈;一个块栈;最后执行的指令指针。(对于内置命名空间我们需要多做一点工作,Python在不同模块中对这个命名空间有不同的处理;但这个细节对我们的虚拟机不重要。) + +```python +class Frame(object): + def __init__(self, code_obj, global_names, local_names, prev_frame): + self.code_obj = code_obj + self.global_names = global_names + self.local_names = local_names + self.prev_frame = prev_frame + self.stack = [] + if prev_frame: + self.builtin_names = prev_frame.builtin_names + else: + self.builtin_names = local_names['__builtins__'] + if hasattr(self.builtin_names, '__dict__'): + self.builtin_names = self.builtin_names.__dict__ + + self.last_instruction = 0 + self.block_stack = [] +``` + +接着,我们在虚拟机中增加对frame的操作。这有3个帮助函数:一个创建新的frame的方法,和压栈和出栈的方法。第四个函数,`run_frame`,完成执行frame的主要工作,待会我们再讨论这个方法。 + +```python +class VirtualMachine(object): + [... snip ...] + + # Frame manipulation + def make_frame(self, code, callargs={}, global_names=None, local_names=None): + if global_names is not None and local_names is not None: + local_names = global_names + elif self.frames: + global_names = self.frame.global_names + local_names = {} + else: + global_names = local_names = { + '__builtins__': __builtins__, + '__name__': '__main__', + '__doc__': None, + '__package__': None, + } + local_names.update(callargs) + frame = Frame(code, global_names, local_names, self.frame) + return frame + + def push_frame(self, frame): + self.frames.append(frame) + self.frame = frame + + def pop_frame(self): + self.frames.pop() + if self.frames: + self.frame = self.frames[-1] + else: + self.frame = None + + def run_frame(self): + pass + # we'll come back to this shortly +``` + +### The `Function` Class + +`Function`的实现有点扭曲,但是大部分的细节对理解解释器不重要。重要的是当调用函数时 --- `__call__`方法被调用 --- 它创建一个新的`Frame`并运行它。 + +```python +class Function(object): + """ + Create a realistic function object, defining the things the interpreter expects. + """ + __slots__ = [ + 'func_code', 'func_name', 'func_defaults', 'func_globals', + 'func_locals', 'func_dict', 'func_closure', + '__name__', '__dict__', '__doc__', + '_vm', '_func', + ] + + def __init__(self, name, code, globs, defaults, closure, vm): + """You don't need to follow this closely to understand the interpreter.""" + self._vm = vm + self.func_code = code + self.func_name = self.__name__ = name or code.co_name + self.func_defaults = tuple(defaults) + self.func_globals = globs + self.func_locals = self._vm.frame.f_locals + self.__dict__ = {} + self.func_closure = closure + self.__doc__ = code.co_consts[0] if code.co_consts else None + + # Sometimes, we need a real Python function. This is for that. + kw = { + 'argdefs': self.func_defaults, + } + if closure: + kw['closure'] = tuple(make_cell(0) for _ in closure) + self._func = types.FunctionType(code, globs, **kw) + + def __call__(self, *args, **kwargs): + """When calling a Function, make a new frame and run it.""" + callargs = inspect.getcallargs(self._func, *args, **kwargs) + # Use callargs to provide a mapping of arguments: values to pass into the new + # frame. + frame = self._vm.make_frame( + self.func_code, callargs, self.func_globals, {} + ) + return self._vm.run_frame(frame) + +def make_cell(value): + """Create a real Python closure and grab a cell.""" + # Thanks to Alex Gaynor for help with this bit of twistiness. + fn = (lambda x: lambda: x)(value) + return fn.__closure__[0] +``` + +接着,回到`VirtualMachine`对象,我们对数据栈的操作也增加一些帮助方法。字节码操作的栈总是在当前frame的数据栈。这些帮助函数让我们能实现`POP_TOP`,`LOAD_FAST`字节码,并且让其他操作栈的指令可读性更高。 + +```python +class VirtualMachine(object): + [... snip ...] + + # Data stack manipulation + def top(self): + return self.frame.stack[-1] + + def pop(self): + return self.frame.stack.pop() + + def push(self, *vals): + self.frame.stack.extend(vals) + + def popn(self, n): + """Pop a number of values from the value stack. + A list of `n` values is returned, the deepest value first. + """ + if n: + ret = self.frame.stack[-n:] + self.frame.stack[-n:] = [] + return ret + else: + return [] +``` + +在我们运行frame之前,我们还需两个方法。 + +第一个方法,`parse_byte_and_args`,以一个字节码为输入,先检查它是否有参数,如果有,就解析它的参数。这个方法同时也更新frame的`last_instruction`属性,它指向最后执行的指令。一条没有参数的指令只有一个字节长度,而有参数的字节有3个字节长。参数的意义依赖于指令是什么。比如,前面说过,指令`POP_JUMP_IF_FALSE`,它的参数指的是跳转目标。`BUILD_LIST`, 它的参数是列表的个数。`LOAD_CONST`,它的参数是常量的索引。 + +一些指令用简单的数字作为参数。对于另一些,虚拟机需要一点努力去发现它含意。标准库中的`dis`模块中有一个备忘单,它解释什么参数有什么意思,这让我们的代码更加简洁。比如,列表`dis.hasname`告诉我们`LOAD_NAME`, `IMPORT_NAME`,`LOAD_GLOBAL`,以及另外的9个指令都有同样的意思:名字列表的索引。 + +```python +class VirtualMachine(object): + [... snip ...] + + def parse_byte_and_args(self): + f = self.frame + opoffset = f.last_instruction + byteCode = f.code_obj.co_code[opoffset] + f.last_instruction += 1 + byte_name = dis.opname[byteCode] + if byteCode >= dis.HAVE_ARGUMENT: + # index into the bytecode + arg = f.code_obj.co_code[f.last_instruction:f.last_instruction+2] + f.last_instruction += 2 # advance the instruction pointer + arg_val = arg[0] + (arg[1] * 256) + if byteCode in dis.hasconst: # Look up a constant + arg = f.code_obj.co_consts[arg_val] + elif byteCode in dis.hasname: # Look up a name + arg = f.code_obj.co_names[arg_val] + elif byteCode in dis.haslocal: # Look up a local name + arg = f.code_obj.co_varnames[arg_val] + elif byteCode in dis.hasjrel: # Calculate a relative jump + arg = f.last_instruction + arg_val + else: + arg = arg_val + argument = [arg] + else: + argument = [] + + return byte_name, argument +``` + +下一个方法是`dispatch`,它查看给定的指令并执行相应的操作。在CPython中,这个分派函数用一个巨大的switch语句实现,有超过1500行的代码。幸运的是,我们用的是Python,我们的代码会简洁的多。我们会为每一个字节码名字定义一个方法,然后用`getattr`来查找。就像我们前面的小解释器一样,如果一条指令叫做`FOO_BAR`,那么它对应的方法就是`byte_FOO_BAR`。现在,我们先把这些方法当做一个黑盒子。每个指令方法都会返回`None`或者一个字符串`why`,有些情况下虚拟机需要这个额外`why`信息。这些指令方法的返回值,仅作为解释器状态的内部指示,千万不要和执行frame的返回值相混淆。 + + +```python +class VirtualMachine(object): + [... snip ...] + + def dispatch(self, byte_name, argument): + """ Dispatch by bytename to the corresponding methods. + Exceptions are caught and set on the virtual machine.""" + + # When later unwinding the block stack, + # we need to keep track of why we are doing it. + why = None + try: + bytecode_fn = getattr(self, 'byte_%s' % byte_name, None) + if bytecode_fn is None: + if byte_name.startswith('UNARY_'): + self.unaryOperator(byte_name[6:]) + elif byte_name.startswith('BINARY_'): + self.binaryOperator(byte_name[7:]) + else: + raise VirtualMachineError( + "unsupported bytecode type: %s" % byte_name + ) + else: + why = bytecode_fn(*argument) + except: + # deal with exceptions encountered while executing the op. + self.last_exception = sys.exc_info()[:2] + (None,) + why = 'exception' + + return why + + def run_frame(self, frame): + """Run a frame until it returns (somehow). + Exceptions are raised, the return value is returned. + """ + self.push_frame(frame) + while True: + byte_name, arguments = self.parse_byte_and_args() + + why = self.dispatch(byte_name, arguments) + + # Deal with any block management we need to do + while why and frame.block_stack: + why = self.manage_block_stack(why) + + if why: + break + + self.pop_frame() + + if why == 'exception': + exc, val, tb = self.last_exception + e = exc(val) + e.__traceback__ = tb + raise e + + return self.return_value +``` + +### The `Block` Class + +在我们完成每个字节码方法前,我们简单的讨论一下块。一个块被用于某种控制流,特别是异常处理和循环。它负责保证当操作完成后数据栈处于正确的状态。比如,在一个循环中,一个特殊的迭代器会存在栈中,当循环完成时它从栈中弹出。解释器需要检查循环仍在继续还是已经停止。 + +为了跟踪这些额外的信息,解释器设置了一个标志来指示它的状态。我们用一个变量`why`实现这个标志,它可以是`None`或者是下面几个字符串这一,`"continue"`, `"break"`,`"excption"`,`return`。他们指示对块栈和数据栈进行什么操作。回到我们迭代器的例子,如果块栈的栈顶是一个`loop`块,`why`是`continue`,迭代器就因该保存在数据栈上,不是如果`why`是`break`,迭代器就会被弹出。 + +块操作的细节比较精细,我们不会花时间在这上面,但是有兴趣的读者值得仔细的看看。 + +```python +Block = collections.namedtuple("Block", "type, handler, stack_height") + +class VirtualMachine(object): + [... snip ...] + + # Block stack manipulation + def push_block(self, b_type, handler=None): + level = len(self.frame.stack) + self.frame.block_stack.append(Block(b_type, handler, stack_height)) + + def pop_block(self): + return self.frame.block_stack.pop() + + def unwind_block(self, block): + """Unwind the values on the data stack corresponding to a given block.""" + if block.type == 'except-handler': + # The exception itself is on the stack as type, value, and traceback. + offset = 3 + else: + offset = 0 + + while len(self.frame.stack) > block.level + offset: + self.pop() + + if block.type == 'except-handler': + traceback, value, exctype = self.popn(3) + self.last_exception = exctype, value, traceback + + def manage_block_stack(self, why): + """ """ + frame = self.frame + block = frame.block_stack[-1] + if block.type == 'loop' and why == 'continue': + self.jump(self.return_value) + why = None + return why + + self.pop_block() + self.unwind_block(block) + + if block.type == 'loop' and why == 'break': + why = None + self.jump(block.handler) + return why + + if (block.type in ['setup-except', 'finally'] and why == 'exception'): + self.push_block('except-handler') + exctype, value, tb = self.last_exception + self.push(tb, value, exctype) + self.push(tb, value, exctype) # yes, twice + why = None + self.jump(block.handler) + return why + + elif block.type == 'finally': + if why in ('return', 'continue'): + self.push(self.return_value) + + self.push(why) + + why = None + self.jump(block.handler) + return why + return why +``` + +## The Instructions + +剩下了的就是完成那些指令方法了:`byte_LOAD_FAST`,`byte_BINARY_MODULO`等等。而这些指令的实现并不是很有趣,这里我们只展示了一小部分,完整的实现在这儿https://github.com/nedbat/byterun。(足够执行我们前面所述的所有代码了。) + +```python +class VirtualMachine(object): + [... snip ...] + + ## Stack manipulation + + def byte_LOAD_CONST(self, const): + self.push(const) + + def byte_POP_TOP(self): + self.pop() + + ## Names + def byte_LOAD_NAME(self, name): + frame = self.frame + if name in frame.f_locals: + val = frame.f_locals[name] + elif name in frame.f_globals: + val = frame.f_globals[name] + elif name in frame.f_builtins: + val = frame.f_builtins[name] + else: + raise NameError("name '%s' is not defined" % name) + self.push(val) + + def byte_STORE_NAME(self, name): + self.frame.f_locals[name] = self.pop() + + def byte_LOAD_FAST(self, name): + if name in self.frame.f_locals: + val = self.frame.f_locals[name] + else: + raise UnboundLocalError( + "local variable '%s' referenced before assignment" % name + ) + self.push(val) + + def byte_STORE_FAST(self, name): + self.frame.f_locals[name] = self.pop() + + def byte_LOAD_GLOBAL(self, name): + f = self.frame + if name in f.f_globals: + val = f.f_globals[name] + elif name in f.f_builtins: + val = f.f_builtins[name] + else: + raise NameError("global name '%s' is not defined" % name) + self.push(val) + + ## Operators + + BINARY_OPERATORS = { + 'POWER': pow, + 'MULTIPLY': operator.mul, + 'FLOOR_DIVIDE': operator.floordiv, + 'TRUE_DIVIDE': operator.truediv, + 'MODULO': operator.mod, + 'ADD': operator.add, + 'SUBTRACT': operator.sub, + 'SUBSCR': operator.getitem, + 'LSHIFT': operator.lshift, + 'RSHIFT': operator.rshift, + 'AND': operator.and_, + 'XOR': operator.xor, + 'OR': operator.or_, + } + + def binaryOperator(self, op): + x, y = self.popn(2) + self.push(self.BINARY_OPERATORS[op](x, y)) + + COMPARE_OPERATORS = [ + operator.lt, + operator.le, + operator.eq, + operator.ne, + operator.gt, + operator.ge, + lambda x, y: x in y, + lambda x, y: x not in y, + lambda x, y: x is y, + lambda x, y: x is not y, + lambda x, y: issubclass(x, Exception) and issubclass(x, y), + ] + + def byte_COMPARE_OP(self, opnum): + x, y = self.popn(2) + self.push(self.COMPARE_OPERATORS[opnum](x, y)) + + ## Attributes and indexing + + def byte_LOAD_ATTR(self, attr): + obj = self.pop() + val = getattr(obj, attr) + self.push(val) + + def byte_STORE_ATTR(self, name): + val, obj = self.popn(2) + setattr(obj, name, val) + + ## Building + + def byte_BUILD_LIST(self, count): + elts = self.popn(count) + self.push(elts) + + def byte_BUILD_MAP(self, size): + self.push({}) + + def byte_STORE_MAP(self): + the_map, val, key = self.popn(3) + the_map[key] = val + self.push(the_map) + + def byte_LIST_APPEND(self, count): + val = self.pop() + the_list = self.frame.stack[-count] # peek + the_list.append(val) + + ## Jumps + + def byte_JUMP_FORWARD(self, jump): + self.jump(jump) + + def byte_JUMP_ABSOLUTE(self, jump): + self.jump(jump) + + def byte_POP_JUMP_IF_TRUE(self, jump): + val = self.pop() + if val: + self.jump(jump) + + def byte_POP_JUMP_IF_FALSE(self, jump): + val = self.pop() + if not val: + self.jump(jump) + + ## Blocks + + def byte_SETUP_LOOP(self, dest): + self.push_block('loop', dest) + + def byte_GET_ITER(self): + self.push(iter(self.pop())) + + def byte_FOR_ITER(self, jump): + iterobj = self.top() + try: + v = next(iterobj) + self.push(v) + except StopIteration: + self.pop() + self.jump(jump) + + def byte_BREAK_LOOP(self): + return 'break' + + def byte_POP_BLOCK(self): + self.pop_block() + + ## Functions + + def byte_MAKE_FUNCTION(self, argc): + name = self.pop() + code = self.pop() + defaults = self.popn(argc) + globs = self.frame.f_globals + fn = Function(name, code, globs, defaults, None, self) + self.push(fn) + + def byte_CALL_FUNCTION(self, arg): + lenKw, lenPos = divmod(arg, 256) # KWargs not supported here + posargs = self.popn(lenPos) + + func = self.pop() + frame = self.frame + retval = func(*posargs) + self.push(retval) + + def byte_RETURN_VALUE(self): + self.return_value = self.pop() + return "return" +``` + +## Dynamic Typing: What the Compiler Doesn't Know + +你可能听过Python是一种动态语言 --- 是它是动态类型的。在我们建造解释器的过程中,已经透露出这样的信息。 + +动态的一个意思是很多工作在运行时完成。前面我们看到Python的编译器没有很多关于代码真正做什么的信息。举个例子,考虑下面这个简单的函数`mod`。它取两个参数,返回它们的模运算值。从它的字节码中,我们看到变量`a`和`b`首先被加载,然后字节码`BINAY_MODULO`完成这个模运算。 + +```python +>>> def mod(a, b): +... return a % b +>>> dis.dis(mod) + 2 0 LOAD_FAST 0 (a) + 3 LOAD_FAST 1 (b) + 6 BINARY_MODULO + 7 RETURN_VALUE +>>> mod(19, 5) +4 +``` + +计算19 % 5得4,--- 一点也不奇怪。如果我们用不同类的参数呢? + +```python +>>> mod("by%sde", "teco") +'bytecode' +``` + +刚才发生了什么?你可能见过这样的语法,格式化字符串。 + +``` +>>> print("by%sde" % "teco") +bytecode +``` + +用符号`%`去格式化字符串会调用字节码`BUNARY_MODULO`.它取栈顶的两个值求模,不管这两个值是字符串,数字或是你自己定义的类的实例。字节码在函数编译时生成(或者说,函数定义时)相同的字节码会用于不同类的参数。 + +Python的编译器关于字节码的功能知道的很少。而取决于解释器来决定`BINAYR_MODULO`应用于什么类型的对象并完成正确的操作。这就是为什么Python被描述为_动态类型_:直到运行前你不必知道这个函数参数的类型。相反,在一个静态类型语言中,程序员需要告诉编译器参数的类型是什么(或者编译器自己推断出参数的类型。) + +编译器的无知是优化Python的一个挑战 --- 只看字节码,而不真正运行它,你就不知道每条字节码在干什么!你可以定义一个类,实现`__mod__`方法,当你对这个类的实例使用`%`时,Python就会自动调用这个方法。所以,`BINARY_MODULO`其实可以运行任何代码。 + +看看下面的代码,第一个`a % b`看起来没有用。 + +```python +def mod(a,b): + a % b + return a %b +``` + +不幸的是,对这段代码进行静态分析 --- 不运行它 --- 不能确定第一个`a % b`没有做任何事。用 `%`调用`__mod__`可能会写一个文件,或是和程序的其他部分交互,或者其他任何可以在Python中完成的事。很难优化一个你不知道它会做什么的函数。在Russell Power和Alex Rubinsteyn的优秀论文中写道,“我们可以用多快的速度解释Python?”,他们说,“在普遍缺乏类型信息下,每条指令必须被看作一个`INVOKE_ARBITRARY_METHOD`。” + +## Conclusion + +Byterun是一个比CPython容易理解的简洁的Python解释器。Byterun复制了CPython的主要结构:一个基于栈的指令集称为字节码,它们顺序执行或在指令间跳转,向栈中压入和从中弹出数据。解释器随着函数和生成器的调用和返回,动态的创建,销毁frame,并在frame间跳转。Byterun也有着和真正解释器一样的限制:因为Python使用动态类型,解释器必须在运行时决定指令的正确行为。 + +我鼓励你去反汇编你的程序,然后用Byterun来运行。你很快会发现这个缩短版的Byterun所没有实现的指令。完整的实现在https://github.com/nedbat/byterun,或者仔细阅读真正的CPython解释器`ceval.c`,你也可以实现自己的解释器! + +## Acknowledgements + +Thanks to Ned Batchelder for originating this project and guiding my contributions, Michael Arntzenius for his help debugging the code and editing the prose, Leta Montopoli for her edits, and the entire Recurse Center community for their support and interest. Any errors are my own. + +-------------------------------------- +via:http://aosabook.org/en/500L/a-python-interpreter-written-in-python.html + +作者: Allison Kaptur Allison + +译者:[qingyunha](https://github.com/qingyunha) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9415b5b74954aac10a1a5c1827e23a9960fb37e2 Mon Sep 17 00:00:00 2001 From: mudongliang Date: Fri, 27 May 2016 14:16:35 -0400 Subject: [PATCH 1443/1710] translation apply --- .../tech/20160218 How to Best Manage Encryption Keys on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md index 19aab96541..e09f88db3e 100644 --- a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md +++ b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md @@ -1,3 +1,4 @@ +mudongliang translating How to Best Manage Encryption Keys on Linux ============================================= From 3bbb70b826d9930a66ff979e52f190445b73ff64 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 May 2016 09:27:16 +0800 Subject: [PATCH 1444/1710] PUB:20160223 Intel shows budget Android phone powering big-screen Linux @geekpi --- ...Android phone powering big-screen Linux.md | 34 +++++++++++++++++++ ...Android phone powering big-screen Linux.md | 34 ------------------- 2 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 published/20160223 Intel shows budget Android phone powering big-screen Linux.md delete mode 100644 translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md diff --git a/published/20160223 Intel shows budget Android phone powering big-screen Linux.md b/published/20160223 Intel shows budget Android phone powering big-screen Linux.md new file mode 100644 index 0000000000..45f9f05032 --- /dev/null +++ b/published/20160223 Intel shows budget Android phone powering big-screen Linux.md @@ -0,0 +1,34 @@ +Intel 展示了可在大屏幕显示 Linux 系统的低端 Android 手机 +============================================================== + +![](https://regmedia.co.uk/2016/02/23/intel-bigscreen.jpg?x=648&y=348&crop=1) + +在世界移动大会 **MWC16** 上 Intel 展示了称之为“大屏体验”的一款的 Android 智能手机,它在插入一个外部显示后运行了一个完整的 Linux 桌面。 + +这个概念大体上与微软在 Windows 10 手机中的 Continuum 相似,但是 Continuum 面向的是高端设备,Intel 的项目面向的是低端智能机和新兴市场。 + +在巴塞罗那的这场大会上展示的是拥有 Atom x3、2GB RAM 和 16GB 存储以及支持外部显示的的 SoFIA(Intel 架构的智能或功能手机)智能机原型。插上键盘、鼠标和显示,它就变成了一台桌面 Linux,并可以选择在大屏幕的一个窗口中显示 Android 桌面。 + +Intel 的拓荒小组(Path Finding Group)经理 Nir Metzer 告诉我们:“Android 基于 Linux 内核,因此我们运行在一个内核上,我们有一个 Android 栈和一个 Linux 栈,并且我们共享同一个环境,因此文件系统是相同的。电话是全功能的。” + +Metzer 说:“我有一个多窗口环境。只要我插入显示器后就可以使用电子表格,我可以进行拖放操作,播放音频。在一个低端平台实现这一切是一个挑战。” + +现在当连上外部显示器时设备的屏幕显示是空白的,但是 Metzer 说下个版本的 Atom X3 会支持双显示。 + +其使用的 Linux 版本是由 Intel 维护的。Metzer 说:“我们需要将 Linux 和 Android 保持一致。框架是预安装的,你不能下载任何 app。” + +英特尔在移动世界大会上向手机制造商们推销这一想法,但却没有实际说希望购买该设备的消费者。Metzer 说:“芯片已经准备好了,已经为量产准备好了。明天就可以进入生产。但是这要看商业需求。” + +-------------------------------------------------------------------------------- + +via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ + +作者:[Tim Anderson][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.theregister.co.uk/Author/2878 + + diff --git a/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md b/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md deleted file mode 100644 index aedd61f966..0000000000 --- a/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md +++ /dev/null @@ -1,34 +0,0 @@ -Intel展示了带动大屏幕Linux的便宜Android手机 -============================================================== - -![](https://regmedia.co.uk/2016/02/23/intel-bigscreen.jpg?x=648&y=348&crop=1) - -在世界移动会议**MWC16**上Intel展示了称之为“大屏体验”的一款的Android智能手机,它在插入一个外部显示后运行了一个完整的Linux桌面。 - -这个概念大体上与微软在Windows 10手机中的Continuum相似,但是Continuum面向的是高端设备,Intel的项目面向的是低端智能机何新兴市场。 - -显示上Barcelona是拥有Atom x3、2GB RAM和16GB存储以及支持外部显示的的SoFIA(Intel架构的只能或功能手机)智能机原型。插上键盘、鼠标何显示,它就变成了一台桌面Linux,可以选择在大屏幕中显示Android桌面。 - -Intel的拓荒小组经理Nir Metzer告诉Reg:“Android基于Linux内核,因此我们运行的是一个内核,我们有一个Android栈和一个Linux栈,并且我们共享一个上下文,因此文件系统是相同的。电话是全功能的。” - -Metzer说:“我有一个多窗口环境。只要我插入后就可以做电子表格,我可以拖拽、播放音频。在一个低端平台实现这一切是一个挑战。” - -现在当连上外部显示器时设备的屏幕显示的空白,但是Metzer说下个版本的Atom X3会支持双显示。 - -使用的Linux版本是由Intel维护的。Metzer说:“我们需要将Linux和Android保持一致。框架是预安装的,你不能下载任何app” - -英特尔在移动世界大会上向手机制造商们推销这一想法,但却没有实际报告购买该设备的消费者。Metzer说:“芯片已经准备好了,已经为量产准备好了。这可以明天进入生产。这是一个商业决定。” - --------------------------------------------------------------------------------- - -via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ - -作者:[Tim Anderson][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.theregister.co.uk/Author/2878 - - From 50fb557a139cf6c63921821a045ffac865856806 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 May 2016 09:41:16 +0800 Subject: [PATCH 1445/1710] PUB:20160429 Master OpenStack with 5 new tutorials @Vic020 @PurlingNayuki --- ...0160429 Master OpenStack with 5 new tutorials.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename {translated/tech => published}/20160429 Master OpenStack with 5 new tutorials.md (70%) diff --git a/translated/tech/20160429 Master OpenStack with 5 new tutorials.md b/published/20160429 Master OpenStack with 5 new tutorials.md similarity index 70% rename from translated/tech/20160429 Master OpenStack with 5 new tutorials.md rename to published/20160429 Master OpenStack with 5 new tutorials.md index 47ad95b663..7f189b8f51 100644 --- a/translated/tech/20160429 Master OpenStack with 5 new tutorials.md +++ b/published/20160429 Master OpenStack with 5 new tutorials.md @@ -1,18 +1,17 @@ -Master OpenStack with 5 new tutorials -5篇文章快速掌握OpenStack +推荐五篇 OpenStack 的新指南 ======================================= ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/EDUCATION_tools.png?itok=ybxr0Qe9) -回顾这周的 OpenStack 峰会,我仍然回味着开源云生态系统的浩瀚无垠,并且需要熟悉多少个不同的项目和概念才能获得成功。但是,我们是幸运的,因为有许多资源让我们跟随项目的脚步。除了[官方文档][1]外,我们还有许多来自三方组织的培训和认证、个人分享,以及许多社区贡献的学习资源。 +回顾这周的 OpenStack 峰会,我仍然回味着开源云生态系统的浩瀚无垠,有那么多需要了解的项目及概念才能获得成功。不过我们很幸运,因为有许多资源让我们跟随着项目的脚步。除了[官方文档][1]外,我们还有许多来自第三方提供的培训和认证、个人分享,以及许多社区贡献的学习资源。 为了让我们保持获得最新消息,每个月我们将会整合发布 OpenStack 社区的最新教程、指导和小贴士等。下面是我们过去几个月最棒的发布分享。 -- 首先,如果你正在寻找一个靠谱实惠的 OpenStack 测试实验室, Intel NUC 是最值得考虑的平台.麻雀虽小,五脏俱全,通过指导文章,可以很轻松的按照教程在 NUC 上使用 [TripleO 部署 OpenStack][2] ,并且还可以轻松预防一些常见的怪异问题。 +- 首先,如果你正在寻找一个靠谱实惠的 OpenStack 测试实验室, Intel NUC 是最值得考虑的平台。麻雀虽小,五脏俱全,通过指导文章,可以很轻松的按照教程在 NUC 上使用 [TripleO 部署 OpenStack][2] ,并且还可以轻松避开一些常见的古怪问题。 - 当你已经运行的一段时间 OpenStack 后,你会发现在你的云系统上许多组件生成了大量日志。其中一些是可以安全删除的,而你需要一个管理这些日志的方案。参考在部署生产 9 个月后使用 Celiometer 管理日志的[一些思考][3]。 -- 对于 OpenStack 基础设施项目的新手,想要提交补丁到 OpenStack 是相当困难的。入口在哪里,测试怎么做,我的提交步骤是怎么样的?可以通过 Arie Bregman 的[博客文章][4]快速了解整个提交过程。 -- 突发计算节点失效,不知道是硬件还是软件问题。好消息是 OpenStack 提供了一套非常简单的迁移计划可以让迁移当机节点到别的主机。然而,迁移过程中使用的命令令许多人感到困惑。可以通过[这篇文章][5]来理解 migrate 和 evacuate 命令的不同。 -- 网络功能虚拟化技术需要 OpenStack 中的额外的功能,而用户可能不熟悉它们。例如, SR-IOV 和 PCI 直通是最大限度地提高物理硬件性能的方式。可以学习[部署步骤][6]以使 OpenStack 的性能最大化。 +- 对于 OpenStack 基础设施项目的新手,想要提交补丁到 OpenStack 是相当困难的。入口在哪里,测试怎么做,我的提交步骤是怎么样的?可以通过 Arie Bregman 的这篇[博客文章][4]快速了解整个提交过程。 +- 突发计算节点失效,不知道是硬件还是软件问题。不过好消息是 OpenStack 提供了一套非常简单的迁移计划可以让你迁移当机节点到别的主机。然而,迁移过程中使用的命令令许多人感到困惑。可以通过[这篇文章][5]来理解 migrate 和 evacuate 命令的不同。 +- 网络功能虚拟化技术需要 OpenStack 之外的一些功能,而用户可能不熟悉它们。例如, SR-IOV 和 PCI 直通是最大限度地提高物理硬件性能的方式。可以学习[部署步骤][6]以使 OpenStack 的性能最大化。 这些文章基本涵盖了本月(译者注: 4 月)推送,如果你还需要更多文章,可以检索过去推送的 [OpenStack 文献][7]来获取更多资源。如果有你认为我们应该推荐的新教程,请在评论中告诉我们,谢谢。 From 2ac616c1579a8afcc7aa994627e7b1f42dca51c0 Mon Sep 17 00:00:00 2001 From: David Dai Date: Sat, 28 May 2016 10:09:37 +0800 Subject: [PATCH 1446/1710] Translated 20160301 Linux gives me all the tools I need.md (#4002) * Translated 20160301 Linux gives me all the tools I need.md * Remove 'Translating' header --- ...301 Linux gives me all the tools I need.md | 58 ------------------- ...301 Linux gives me all the tools I need.md | 56 ++++++++++++++++++ 2 files changed, 56 insertions(+), 58 deletions(-) delete mode 100644 sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md create mode 100644 translated/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md diff --git a/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md b/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md deleted file mode 100644 index b092044827..0000000000 --- a/sources/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md +++ /dev/null @@ -1,58 +0,0 @@ -StdioA Translating - -Linux gives me all the tools I need -========================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/OPENHERE_blue.png?itok=3eqp-7gT) - -[Linux][0] is all around us. It's [on our phones][1] in the form of Android. It's [used on the International Space Station][2]. It [provides much of the backbone of the Internet][3]. And yet many people never notice it. Discovering Linux is a rewarding endeavor. Lots of other people have [shared their Linux stories][4] on Opensource.com, and now it's my turn. - -I still remember when I first discovered Linux in 2008. The person who helped me discover Linux was my father, Socrates Ballais. He was an economics professor here in Tacloban City, Philippines. He was also a technology enthusiast. He taught me a lot about computers and technology, but only advocated using Linux as a fallback operating system in case Windows fails. - -### My earliest days - -Before we had a computer in the home, I was a Windows user. I played games, created documents, and did all the other things kids do with computers. I didn't know what Linux was or what it was used for. The Windows logo was my symbol for a computer. - -When we got our first computer, my father installed Linux ([Ubuntu][5] 8.04) on it. Being the curious kid I was, I booted into the operating system. I was astonished with the interface. It was beautiful. I found it to be very user friendly. For some time, all I did in Ubuntu was play the bundled games. I would do my school work in Windows. - -### The first install - -Four years later, I decided that I would reinstall Windows on our family computer. Without hesitation, I also decided to install Ubuntu. With that, I had fallen in love with Linux (again). Over time, I became more adept with Ubuntu and would casually advocate its use to my friends. When I got my first laptop, I installed it right away. - -### Today - -Today, Linux is my go-to operating system. When I need to do something on a computer, I do it in Linux. For documents and presentations, I use Microsoft Office via [Wine][6]. For my web needs, there's [Chrome and Firefox][7]. For email, there's [Geary][8]. You can do pretty much everything with Linux. - -Most, if not all, of my programming work is done in Linux. The lack of a standard Integrated Development Environment (IDE) like [Visual Studio][9] or [XCode][10] taught me to be flexible and learn more things as a programmer. Now a text editor and a compiler/interpreter are all I need to start coding. I only use an IDE in cases when it's the best tool for accomplishing a task at hand. I find Linux to be more developer-friendly than Windows. To generalize, Linux gives me all the tools I need to develop software. - -Today, I am the co-founder and CTO of a startup called [Creatomiv Studios][11]. I use Linux to develop code for the backend server of our latest project, Basyang. I'm also an amateur photographer, and use [GIMP][12] and [Darktable][13] to edit and manage photos. For communication with my team, I use [Telegram][14]. - -### The beauty of Linux - -Many may see Linux as an operating system only for those who love solving complicated problems and working on the command line. Others may see it as a rubbish operating system lacking the support of many companies. However, I see Linux as a thing of beauty and a tool for creation. I love Linux the way it is and hope to see it continue to grow. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/3/my-linux-story-sean-ballais - -作者:[Sean Francis N. Ballais][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -[a]: https://opensource.com/users/seanballais -[0]: https://opensource.com/resources/what-is-linux -[1]: http://www.howtogeek.com/189036/android-is-based-on-linux-but-what-does-that-mean/ -[2]: http://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability -[3]: https://www.youtube.com/watch?v=JzsLkbwi1LA -[4]: https://opensource.com/tags/my-linux-story -[5]: http://ubuntu.com/ -[6]: https://www.winehq.org/ -[7]: https://www.google.com/chrome/browser/desktop/index.html -[8]: https://wiki.gnome.org/Apps/Geary -[9]: https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx -[10]: https://developer.apple.com/xcode/ -[11]: https://www.facebook.com/CreatomivStudios/ -[12]: https://www.gimp.org/ -[13]: http://www.darktable.org/ -[14]: https://telegram.org/ diff --git a/translated/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md b/translated/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md new file mode 100644 index 0000000000..5c746acab8 --- /dev/null +++ b/translated/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md @@ -0,0 +1,56 @@ +Linux 给了我所有所需的工具 +========================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/OPENHERE_blue.png?itok=3eqp-7gT) + +[Linux][0] 就在我们身边。它以 Android 的形式[存在我们的手机中][1],它[在国际空间站中被使用][2],它[还是互联网的主要支柱][3],可是迄今为止很多人从未留意过它。对 Linux 的探索是一种很有成就感的尝试。很多人都在 Opensource.com [分享过他们与 Linux 的故事][4]。现在,轮到我了。 + +我依然记得我在 2008 年第一次探索 Linux 的时刻。协助我探索 Linux 的人是我的父亲,Socrates Ballais。他是菲律宾塔克洛班的一名经济学专家,也是一个技术狂热者。他教会了我许多计算机技术方面的知识,但只提倡我将 Linux 作为 Windows 崩溃后的备用操作系统。 + +### 从前的日子 + +在我们在家中购置电脑之前,我曾是一个 Windows 用户。我使用电脑玩游戏,制作文档,做那些小孩子都会用电脑做的事。我不知道什么是 Linux,更不知道它的用处。在那个时候,电脑在我心中的象征就是一个 Windows 的商标。 + +当我们买到第一台电脑时,我爸爸在上面安装了 Linux ([Ubuntu][5] 8.04)。充满了好奇心的我,第一次引导进入了那个操作系统。我被它的用户界面震惊了。它非常漂亮,而且我发现它对用户很友好。在那之后的一段时间,我只会使用 Linux 它内置的几款游戏。我还是会在 Windows 中做我的家庭作业。 + +### 第一次安装 + +4 年后,我决定为家里的电脑重新安装 Windows。我同时毫不犹豫地安装了 Ubuntu。从那次开始,我(再次)爱上了 Linux。随着时间推移,我慢慢适应了 Ubuntu,还会无意地将它推荐给我的朋友。当我拿到我的第一台笔记本电脑时,我立刻在上面安装了它。 + +### 现在 + +如今,Linux 是我的默认操作系统。当我需要使用电脑做一些工作时,我会在 Linux 中完成。至于文档和幻灯片,我会通过 [Wine][6] 来使用微软的 Office 办公软件。我会用 [Chrome 和 Firefox][7] 来满足我的上网需要,会用 [Geary][8] 来收发邮件。你可以使用 Linux 来做很多很多事情。 + +我的大多数——并不是全部——编程工作都会在 Linux 中完成。像 [Visual Studio][9] 和 [XCode][10] 这样的基本集成开发环境 (IDE) 的缺乏教会我这个程序员如何变得灵活、如何去学习更多知识。现在,我只需要一个文本编辑器和一个编译器/解释器就可以开始编程。只有当 IDE 是我完成手头上的任务的最佳最佳工具时,我才会使用它。总而言之,Linux 给了我开发软件所需要的一切工具。 + +现在,我是一个名叫 [Creatomiv Studios][11] 的初创公司的联合创始人和首席技术官。我使用 Linux 来编写我们的最新产品 Basyang 的后端服务器代码。我还是一个业余摄影家,使用 [GIMP][12] 和 [Darktable][13] 来编辑、管理照片。至于团队沟通,我会使用 [Telegram][14]。 + +### Linux 之美 + +很多人认为 Linux 只是为那些喜欢解决复杂问题或者在命令行中工作的人而生的操作系统。还有些人会认为它就是一个缺乏公司支持维护的垃圾。不过,我认为 Linux 是一个完美的操作系统,也是一个为创造而生的绝佳工具。所以我热爱 Linux,同时希望看到它继续成长。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/3/my-linux-story-sean-ballais + +作者:[Sean Francis N. Ballais][a] +译者:[StdioA](https://github.com/StdioA) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://opensource.com/users/seanballais +[0]: https://opensource.com/resources/what-is-linux +[1]: http://www.howtogeek.com/189036/android-is-based-on-linux-but-what-does-that-mean/ +[2]: http://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability +[3]: https://www.youtube.com/watch?v=JzsLkbwi1LA +[4]: https://opensource.com/tags/my-linux-story +[5]: http://ubuntu.com/ +[6]: https://www.winehq.org/ +[7]: https://www.google.com/chrome/browser/desktop/index.html +[8]: https://wiki.gnome.org/Apps/Geary +[9]: https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx +[10]: https://developer.apple.com/xcode/ +[11]: https://www.facebook.com/CreatomivStudios/ +[12]: https://www.gimp.org/ +[13]: http://www.darktable.org/ +[14]: https://telegram.org/ From e9edeaa63d290fe5cc992e76481f8498475f5701 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 27 May 2016 21:18:08 -0500 Subject: [PATCH 1447/1710] =?UTF-8?q?20160528-1=20=E9=80=89=E9=A2=98=20(#4?= =?UTF-8?q?003)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 20160527 选题 python , linux , script * 20160528-1 选题 python , linux , script , Tutorial --- ...ramming and Scripting in Linux – Part 1.md | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md diff --git a/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md b/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md new file mode 100644 index 0000000000..14ec294b04 --- /dev/null +++ b/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md @@ -0,0 +1,182 @@ +Getting Started with Python Programming and Scripting in Linux – Part 1 +=============================================================================== + + +It has been said (and often required by recruitment agencies) that system administrators need to be proficient in a scripting language. While most of us may be comfortable using [Bash][1] (or other shell of our choice) to run command-line scripts, a powerful language such as Python can add several benefits. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Programming-Scripting-in-Linux.png) +>Learn Python Programming Scripting in Linux + +To begin with, Python allows us to access the tools of the command-line environment and to make use of Object Oriented Programming features (more on this later in this article). + +On top of it, learning Python can boost your career in the fields of [desktop applications][2] and [data science][3]. + +Being so easy to learn, so vastly used, and having a plethora of ready-to-use modules (external files that contain Python statements), no wonder Python is the preferred language to teach programming to first-year computer science students in the United States. + +In this 2-article series we will review the fundamentals of Python in hopes that you will find it useful as a springboard to get you started with programming and as a quick-reference guide afterwards. That said, let’s get started. + +### Python in Linux + +Python versions 2.x and 3.x are usually available in most modern Linux distributions out of the box. You can enter a Python shell by typing `python` or `python3` in your terminal emulator and exit with `quit()`: + +``` +$ which python +$ which python3 +$ python -v +$ python3 -v +$ python +>>> quit() +$ python3 +>>> quit() +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Running-Python-Commands-on-Linux.png) +>Running Python Commands on Linux + +If you want to discard Python 2.x and use 3.x instead when you type python, you can modify the corresponding symbolic links as follows: + +``` +$ sudo rm /usr/bin/python +$ cd /usr/bin +$ ln -s python3.2 python # Choose the Python 3.x binary here +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Remove-Python-2-and-Use-Python-3.png) +>Remove Python 2 and Use Python 3 + +By the way, it is important to note that although versions 2.x are still used, they are not actively maintained. For that reason, you may want to consider switching to 3.x as indicated above. Since there are some syntax differences between 2.x and 3.x, we will focus on the latter in this series. + +Another way you can use Python in Linux is through the IDLE (the Python Integrated Development Environment), a graphical user interface for writing Python code. Before installing it, it is a good idea to perform a search to find out what are the versions available for your distribution: + +``` +# aptitude search idle [Debian and derivatives] +# yum search idle [CentOS and Fedora] +# dnf search idle [Fedora 23+ version] +``` + +Then, you can install it as follows: + +``` +$ sudo aptitude install idle-python3.2 # I'm using Linux Mint 13 +``` + +Once installed, you will see the following screen after launching the IDLE. While it resembles the Python shell, you can do more with the IDLE than with the shell. + +For example, you can: + +1. open external files easily (File → Open). + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Python-Shell.png) +>Python Shell + +2) copy (`Ctrl + C`) and paste (`Ctrl + V`) text, 3) find and replace text, 4) show possible completions (a feature known as Intellisense or Autocompletion in other IDEs), 5) change the font type and size, and much more. + +On top of this, you can use the IDLE to create desktop applications. + +Since we will not be developing a desktop application in this 2-article series, feel free to choose between the IDLE and the Python shell to follow the examples. + +### Basic Operations with Python + +As it is to be expected, you can perform arithmetic operations (feel free to use as many parentheses as needed to perform all the operations you want!) and manipulate text strings very easily with Python. + +You can also assign the results of operations to variables and display them in the screen. A handy feature in Python is concatenation – just supply the values of variables and / or strings in a comma-delimited list (inside parentheses) to the print function and it will return the sentence composed by the items in the sequence: + +``` +>>> a = 5 +>>> b = 8 +>>> x = b / a +>>> x +1.6 +>>> print(b, "divided by", a, "equals", x) +``` + +Note that you can mix variables of different types (numbers, strings, booleans, etc) and once you have assigned a value to a variable you can change the data type without problems later (for this reason Python is said to be a dynamically typed language). + +If you attempt to do this in a statically typed language (such as Java or C#), an error will be thrown. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Basic-Operations.png) +>Learn Python Basic Operations + +### A brief comment about Object Oriented Programming + +In Object Oriented Programming (OOP), all entities in a program are represented as objects and thus they can interact with others. As such, they have properties and most of them can perform actions (known as methods). + +For example, let’s suppose we want to create a dog object. Some of the possible properties are color, breed, age, etc, whereas some of the actions a dog can perform are bark(), eat(), sleep(), and many others. + +Methods names, as you can see, are followed by a set of parentheses which may (or may not) contain one (or more) arguments (values that are passed to the method). + +Let’s illustrate these concepts with one of the basic object types in Python: lists. + +### Illustrating methods and properties of objects: Lists in Python + +A list is an ordered group of items, which do not necessarily have to be all of the same data type. To create an empty list named rockBands, use a pair of square brackets as follows: + +To append an item to the end of the list, pass the item to the `append()` method as follows: + +``` +>>> rockBands = [] +>>> rockBands.append("The Beatles") +>>> rockBands.append("Pink Floyd") +>>> rockBands.append("The Rolling Stones") +``` + +To remove an item from the list, we can pass the specific element to the remove() method, or the position of the element (count starts at zero) in the list to pop(). + +In other words, we can use either of the following options to remove “The Beatles” from the list: + +``` +>>> rockBands.remove("The Beatles") +``` + +or + +``` +>>> rockBands.pop(0) +``` + +You can display the list of available methods for an object by pressing Ctrl + Space once you’ve typed the name followed by a dot: + +![](http://www.tecmint.com/wp-content/uploads/2016/05/List-Available-Python-Methods.png) +>List Available Python Methods + +A property of a list object is the number of items it contains. It is actually called length and is invoked by passing the list as argument to the len built-in function (by the way, the print statement, which we exemplified earlier-, is another Python built-in function). + +If you type len followed by an opening parentheses in the IDLE, you will see the default syntax of the function: + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Python-len-Function.png) +>Python len Function + +Now what about the individual items of the list. Do they have methods and properties as well? The answer is yes. For example, you can convert a string item to uppercase and get the number of characters it contains as follows: + +``` +>>> rockBands[0].upper() +'THE BEATLES' +>>> len(rockBands[0]) +11 +``` + +### Summary + +In this article we have provided a brief introduction to Python, its command-line shell, and the IDLE, and demonstrated how to perform arithmetic calculations, how to store values in variables, how to print back those values to the screen (either on its own or as part of a concatenation), and explained through a practical example what are the methods and properties of an object. + +In the next article we will discuss control flow with conditionals and loops. We will also demonstrate how to use what we have learned to write a script to help us in our sysadmin tasks. + +Does Python sound like something you would like to learn more about? Stay tuned for the second part in this series (where among other things we will combine the bounties of Python and command-line tools in a script), and also consider buying our Ultimate Python Coding bundle (more details [here][4]). + +As always, you can count on us if you have any questions about this article. Just send us a message using the contact form below and we will get back to you as soon as possible. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/learn-python-programming-and-scripting-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/category/bash-shell/ +[2]: http://www.tecmint.com/create-gui-applications-in-linux/ +[3]: http://www.datasciencecentral.com/profiles/blogs/the-guide-to-learning-python-for-data-science-2 +[4]: http://www.tecmint.com/learn-python-programming-online-with-ultimate-python-coding/ From 8ec9db5a4c5763c0b598b347b72d6fd760488012 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 May 2016 10:19:44 +0800 Subject: [PATCH 1448/1710] PUB:20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing @zky001 --- ... Mode ASCII-art Box and Comment Drawing.md | 58 +++++++++---------- 1 file changed, 26 insertions(+), 32 deletions(-) rename {translated/tech => published}/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md (71%) diff --git a/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/published/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md similarity index 71% rename from translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md rename to published/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md index ce9c76f324..639f29b851 100644 --- a/translated/tech/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md +++ b/published/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md @@ -1,18 +1,14 @@ - -Linux / Unix 桌面娱乐 : -文字模式的带有ASCII艺术的Box与评论绘制 - +Linux/Unix 桌面趣事:文字模式下的 ASCII 艺术与注释绘画 ================================================================================ -Boxes 命令不仅是一个文本过滤器,同时是一个很少人知道的可以为了乐趣或者需要在它的输入文本或者代码周围画各种ASCII艺术画的工具。你可以迅速创建邮件签名,或者使用各种编程语言创建局部评论。这个命令计划被vim文本编辑器使用,但是也可以被支持过滤的文本编辑器使用,同时从命令行作为一个单独的工具使用。 - +boxes 命令不仅是一个文本过滤器,同时是一个很少人知道的有趣工具,它可以在输入的文本或者代码周围框上各种ASCII 艺术画。你可以用它快速创建邮件签名,或者在各种编程语言中留下评论块。这个命令可以在 vim 文本编辑器中使用,但是也可以在各种支持过滤器的文本编辑器中使用,同时也可以在命令行中单独使用。 ### 任务: 安装 boxes ### -使用 [apt-get command][1] 在 Debian / Ubuntu Linux中安装 boxes : +使用 [apt-get 命令][1] 在 Debian / Ubuntu Linux 中安装 boxes: $ sudo apt-get install boxes -输出示例 : +输出示例: Reading package lists... Done Building dependency tree @@ -28,11 +24,11 @@ Boxes 命令不仅是一个文本过滤器,同时是一个很少人知道的 Processing triggers for man-db ... Setting up boxes (1.0.1a-2.3) ... -RHEL / CentOS / Fedora Linux 用户, 使用 [yum command to install boxes][2] (首先 [enable EPEL repo as described here][3]): +RHEL / CentOS / Fedora Linux 用户, 使用 [yum 命令来安装][2] boxes,(请先[启用 EPEL 软件仓库][3]): # yum install boxes -输出示例 : +输出示例: Loaded plugins: rhnplugin Setting up Install Process @@ -64,21 +60,21 @@ RHEL / CentOS / Fedora Linux 用户, 使用 [yum command to install boxes][2] ( boxes.x86_64 0:1.1-8.el6 Complete! -FreeBSD 用户可以按如下来使用 : +FreeBSD 用户可以按如下使用: cd /usr/ports/misc/boxes/ && make install clean -或者,使用 pkg_add 命令来增加包: +或者,使用 pkg_add 命令来增加包: # pkg_add -r boxes -### 在一些给定文本周围画出任何种类的box ### +### 在一些给定文本周围画出任何种类的包围框 ### -输入下列命令 : +输入下列命令: echo "This is a test" | boxes -或者,通过设置要使用的设计的名字来使用 : +或者,指定要使用的图案的名字: echo -e "\n\tVivek Gite\n\tvivek@nixcraft.com\n\twww.cyberciti.biz" | boxes -d dog @@ -86,31 +82,29 @@ FreeBSD 用户可以按如下来使用 : ![Unix / Linux: Boxes Command To Draw Various Designs](http://s0.cyberciti.org/uploads/l/tips/2012/06/unix-linux-boxes-draw-dog-design.png) -Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计 +*图01: Unix / Linux: Boxes 命令来画出各式各样的图案 * -#### 怎么样输出所有的设计 #### +#### 怎么样输出所有的图案 #### -语法如下: +语法如下: boxes option pipe | boxes options echo "text" | boxes -d foo boxes -l -设计 -d 选项设置要使用的设计的名字 . 语法如下: - +-d 选项用来设置要使用的图案的名字。语法如下: echo "Text" | boxes -d design pipe | boxes -d desig --l 选项列出所有设计 . 它显示在配置文件中的所有的box设计图,同时也显示关于其创作者的信息。 +-l 选项列出所有图案。它显示了在配置文件中的所有的框线设计图,同时也显示关于其创作者的信息。 - boxes -l boxes -l | more boxes -l | less -输出示例: +输出示例: 43 Available Styles in "/etc/boxes/boxes-config": ------------------------------------------------- @@ -146,20 +140,21 @@ Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计 output truncated .. -### 在使用vi/vim文本编辑器时如何通过boxes过滤文本? ### +### 在使用 vi/vim 文本编辑器时如何通过 boxes 过滤文本? ### -你可以使用vi或vim支持的任何附加命令,在这个例子中, [insert current date and time][4], 输入: +你可以在 vi 或 vim 中使用任何外部命令,比如在这个例子中,[插入当前日期和时间][4],输入: !!date 或者 :r !date -你需要在vim中输入以上命令来读取数据命令的输出,这将在当前行后面加入日期和时分秒: + +你需要在 vim 中输入以上命令来读取 date 命令的输出,这将在当前行后面加入日期和时分秒: Tue Jun 12 00:05:38 IST 2012 -你可以用boxes命令做到同样的. 创建一个作为样本的shell脚本或者如下的一个c程序: +你可以用 boxes 命令做到同样的功能。如下创建一个作为示例的 shell 脚本或者c程序: #!/bin/bash @@ -167,7 +162,7 @@ Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计 Author: Vivek Gite Last updated on: Tue Jun, 12 2012 -现在输入如下 (将光标移到第二行,也就是以"Purpose: ..."开头的行) +现在输入如下(将光标移到第二行,也就是以“Purpose: ...”开头的行) 3!!boxes @@ -184,11 +179,10 @@ Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计 注:youtube 视频 -(Video:01: boxes command in action. BTW, this is my first video so go easy on me and let me know what you think.) -另见 +参见 -- boxes man 手册 +- boxes 帮助手册 -------------------------------------------------------------------------------- @@ -196,7 +190,7 @@ via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text 作者:Vivek Gite 译者:[zky001](https://github.com/zky001) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4aa64d3f1006148d11d2f19d5102e0cf8f75b98f Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 28 May 2016 10:30:38 +0800 Subject: [PATCH 1449/1710] =?UTF-8?q?20160528-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit linux , software , best --- ...LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md diff --git a/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md b/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md new file mode 100644 index 0000000000..1b1cbc2110 --- /dev/null +++ b/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md @@ -0,0 +1,161 @@ +BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016 +============================================= + +![](http://itsfoss.com/wp-content/uploads/2016/05/Best-Linux-Photo-Management-Software.jpg) + +When it comes to Linux applications, at times there are so many choices and alternatives. But sometimes there are only a few options. + +One of our readers had requested to make a list of decent **Linux photo management software**. Something that could replace now defunct Picasa on Linux. + +Turns out, though not many, there are some really good applications for managing photo libraries available out there. Either you have a huge collection of photos or only a few of them, one of these options ought to suit your needs. + +This list of **best photo management applications for Linux** is different from our earlier list of [best photo applications for Linux][1]. That list contained image related applications for various purposes such as editing, painting etc., while this list deals with only photo managing applications. + +So, here we go. I’ve also included the installation commands of these applications for Ubuntu and its derivatives. All you need to do is open a terminal and run those. + +### [GTHUMB](https://wiki.gnome.org/Apps/gthumb) + +![](http://itsfoss.com/wp-content/uploads/2016/05/gThumb-1-1024x540.jpg) +>gThumb Photo Editing + +gThumb is a lightweight photo management application built mainly for GNOME desktop environment. It includes all the basic photo management features as well as some editing and advance operations. Some of the main features of gThumb are: + +- Image Viewer: Supports all the major image format (including GIF) and metadata (EXIF, XMP etc). +- Image Browser: All the basic browsing operations (thumbnails, move, copy, delete etc) and bookmarking support. +- Image Organizer: Organize photos with tags, catalogs and Libraries. Importing photos from Digital Cameras. Web albums (Picasa, Flickr, Facebook etc) integration. +- Image Editor: Basic photo editing operations, filters, format conversion etc. + +And there’s much more, check the official [gThumb feature][2] list. If you use GNOME or GNOME based desktop environments (like MATE) you should definitely try this one out. + +#### GTHUMB INSTALLATION + +``` +sudo apt-get install gthumb +``` + + +### [DIGIKAM][3] + +![](http://itsfoss.com/wp-content/uploads/2016/05/digiKam-1-1024x540.png) +>digiKam + +digiKam is mainly developed for KDE, but works just as well on other desktop environments. It comes with a lot of features with an interface that works nicely. The main features of digiKam includes: + +- Photo Organizer: Albums, sub-albums, tags, comments, metadata, sorting support. +- Photo Importer: Import support from Digital Cameras, USB devices, Web Albums (including Picasa & Facebook) and some other features. +- Photo Exporter: Export support for various online platforms and format conversion. +- Photo Editor: Wide range of photo editing operations. + +digiKam is certainly one of the best Linux photo management software, if not best. + +#### DIGIKAM INSTALLATION + +``` +sudo apt-get install digikam +``` + +### [SHOTWELL][4] + +![](http://itsfoss.com/wp-content/uploads/2016/05/Shotwell-1-1024x540.png) +>Shotwell + +Shotwell photo manager is also for GNOME desktop environment. Shotwell, while isn’t as feature-rich as gThumb, does what it promises. The main features of Shotwell are: + +- Import photos from Disks or Digital Cameras. +- Event, tags and folder based organization. +- Basic photo editing features and format conversion. +- Supports uploading to web services (Facebook, Flickr, Tumblr etc). + +If you want something simple, you can check this one out. + +#### SHOTWELL INSTALLATION + +``` +sudo apt-get install shotwell +``` + +### [KPHOTOALBUM][5] + +![](http://itsfoss.com/wp-content/uploads/2016/05/KPhotoAlbum-1-1024x540.png) +>KPhotoAlbum + +KPhotoAlbum is a photo management application also intended to be used on [KDE desktop environment][6]. What makes KPhotoAlbum unique is its categorization process and time-based browsing. You can categorize photos by People, Places, Events etc. And for time-based browsing, it has a dedicated timeline or Date Bar at the bottom of the user interface. + +KPhotoAlbum comes with a wide range of features for photo management and editing. Some of the main features include: + +- Advance photo organization (with categories, sub-categories, tags, metadata, annotation support and much more). +- Wide range of import and export options (including almost every major photo sharing platforms). +- Various editing options (includes batch operations). + +All these advanced organization features do have their downsides – user has to do most of them manually. But if you’re a KDE lover, this can be a good pick. You can use KPhotoAlbum on other desktop environments too, but it delivers the optimal experience on KDE. + +#### KPHOTOALBUM INSTALLATION + +``` +sudo apt-get install kphotoalbum +``` + +### [DARKTABLE][7] + +![](http://itsfoss.com/wp-content/uploads/2016/05/darktable-1-1024x540.png) +>Darktable + +Darktable is more of a photo editing application than an organizer. Darktable stands out for its own user interface regardless of the desktop environment you might be using, and of course for its editing capabilities. The basic features include: + +- Basic photo organization. +- Advance and feature-rich photo editing. +- Export support for Picasa & Flickr and format conversion. + +If you’re into photo editing and retouching, Darktable is a nice choice. + +> Reading Suggestion: [How to install Darktable 2.0 in Ubuntu via PPA][8] + +#### DARKTABLE INSTALLATION + +``` +sudo add-apt-repository ppa:pmjdebruijn/darktable-release +sudo apt-get update +sudo apt-get install darktable +``` + +### OTHERS + +If you want a simple application for pulling images from your portable devices (cameras, phones, portable drives etc) and storing them on your Hard Disk, using [Rapid Photo Downloader][9] is a no-brainer. It is an incredible application for importing and backing up photos from portable devices. The installation and configuration process is quite easy and simple. + +For installing Rapid Photo Downloader on Ubuntu, fire up a terminal and run this command: + +``` +sudo apt-get install rapid-photo-downloader +``` + +If you are still interested in trying a few more options, here you go: + +- [GNOME Photos][10] (Photo viewer for GNOME desktop environment) +- [Gwenview][11] (Photo viewer for KDE desktop environment) +- [Picty][12] (Open-source photo collection manager) + +So, are you using, or plan to use, any one of these applications? Which, according to you is the best photo management application for Ubuntu or any other Linux? Do you have any favorites to term as Linux photo manager? Do share your views. + + +---------- +via: http://itsfoss.com/linux-photo-management-software/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Munif Tanjim][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/munif/ +[1]: http://itsfoss.com/image-applications-ubuntu-linux/ +[2]: https://wiki.gnome.org/Apps/gthumb/features +[3]: https://www.digikam.org/ +[4]: https://wiki.gnome.org/Apps/Shotwell +[5]: https://www.kphotoalbum.org/ +[6]: https://www.kde.org/ +[7]: http://www.darktable.org/ +[8]: http://itsfoss.com/darktable-20-released-installation-ppa/ +[9]: http://www.damonlynch.net/rapid/index.html +[10]: https://wiki.gnome.org/Apps/Photos +[11]: https://userbase.kde.org/Gwenview +[12]: https://github.com/spillz/picty From 98d71b5279b0a90be7792f0c380ee0e0a0a68a94 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 28 May 2016 11:10:29 +0800 Subject: [PATCH 1450/1710] [translating]20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE --- .../20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md b/sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md index 8ea5e6b803..1402151642 100644 --- a/sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md +++ b/sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md @@ -1,3 +1,5 @@ +alim0x translating + ORB: NEW GENERATION OF LINUX APPS ARE HERE ============================================= From 1860a20537070ea1a219468ef5bf147bf01e59d5 Mon Sep 17 00:00:00 2001 From: David Dai Date: Sat, 28 May 2016 11:22:42 +0800 Subject: [PATCH 1451/1710] =?UTF-8?q?Translating=2020160525=20Getting=20St?= =?UTF-8?q?arted=20with=20Python=20Programming=20and=20Scripting=20in=20Li?= =?UTF-8?q?nux=20=E2=80=93=20Part=201=20(#4005)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d with Python Programming and Scripting in Linux – Part 1.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md b/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md index 14ec294b04..dac5b0385f 100644 --- a/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md +++ b/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md @@ -1,3 +1,5 @@ +StdioA translating + Getting Started with Python Programming and Scripting in Linux – Part 1 =============================================================================== From 4c2d37795549ceab632f78794c4c293de557a676 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 28 May 2016 12:02:58 +0800 Subject: [PATCH 1452/1710] translating --- .../20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md b/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md index 55b7690423..f1b70daa36 100644 --- a/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md +++ b/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md @@ -1,3 +1,5 @@ +translating----geekpi + NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS ================================================ From cc26c6aea732c7fd7aa42d880311ea0de932131a Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 28 May 2016 13:55:11 +0800 Subject: [PATCH 1453/1710] translated --- ...OS : LINUX DISTRIBUTION FOR NODE LOVERS.md | 55 ------------------- ...OS : LINUX DISTRIBUTION FOR NODE LOVERS.md | 53 ++++++++++++++++++ 2 files changed, 53 insertions(+), 55 deletions(-) delete mode 100644 sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md create mode 100644 translated/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md diff --git a/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md b/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md deleted file mode 100644 index f1b70daa36..0000000000 --- a/sources/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md +++ /dev/null @@ -1,55 +0,0 @@ -translating----geekpi - -NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS -================================================ - -![](http://itsfoss.com/wp-content/uploads/2016/05/node-os-linux.jpg) - -[NodeOS][1], the operating system based on [Node.js][2], is now heading towards its version 1.0 following the release of its first [Release Candidate][3] last year. - -If this is the first time you’re hearing about it, NodeOS is the first ever operating system powered by Node.js & [npm][4] and built on top of the [Linux][5] Kernel. [Jacob Groundwater][6] introduced this project in mid-2013. The primary technologies used in building the system are: - -- **Linux Kernel**: The entire OS is built off the Linux Kernel. -- **Node.js runtime**: Node is used as the primary runtime. -- **npm Packages**: npm is used for package management. - -NodeOS source is hosted on [Github Repository][7]. So, anybody interested can easily contribute and report bugs. Users can build from source or use the [pre-built images][8] available. The build process and quick start guide can be found at project repository. - -The idea behind NodeOS is to provide just enough to let npm run on it and then the rest of the functionalities will come from npm packages. So, the users have access the vast collection of about 250,000 packages and that number is continuously increasing every day. And everything being open-source, it’s always easy to patch bugs and add more packages to npm according to your need. - -NodeOS core development is separated into layers and the general structure includes: - -- **barebones** – custom Linux kernel along with an initramfs that boots to a Node.js REPL -- **initramfs** – Initram filesystem to mount the users partition & boot the system -- **rootfs** – Read-only partition image hosting the Linux kernel & initramfs files -- **usersfs** – multi-user filesystem (as traditional OSes) - -NodeOS aims to be able to run on virtually any platforms, including – **Real Hardware** (personal computers or SOCs), **Cloud platforms, Virtual machines, PaaS providers, Containers** (Docker & Vagga ) etc. And so far, it seems that they’re doing pretty good. On March 3, [Jesús Leganés Combarro][9], NodeOS member on GitHub, [announced][10] that: - ->**NodeOS is not a toy OS anymore**, and it’s very capable to be used on production environments for real use cases from now on. - -So, if you are a die-hard fan of Node.js and/or have a knack for trying new things, this might be the thing for you to try. And in related post, you should read about these niche [Linux distributions for specific usage][11]. - - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/nodeos-operating-system/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 - -作者:[Munif Tanjim][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/munif/ -[1]: http://node-os.com/ -[2]: https://nodejs.org/en/ -[3]: https://github.com/NodeOS/NodeOS/releases/tag/v1.0-RC1 -[4]: https://www.npmjs.com/ -[5]: http://itsfoss.com/tag/linux/ -[6]: https://github.com/groundwater -[7]: https://github.com/nodeos/nodeos -[8]: https://github.com/NodeOS/NodeOS/releases -[9]: https://github.com/piranna -[10]: https://github.com/NodeOS/NodeOS/issues/216 -[11]: http://itsfoss.com/weird-ubuntu-based-linux-distributions/ diff --git a/translated/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md b/translated/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md new file mode 100644 index 0000000000..d189753fd5 --- /dev/null +++ b/translated/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md @@ -0,0 +1,53 @@ +NODEOS: NODE爱好者的Linux发行版 +================================================ + +![](http://itsfoss.com/wp-content/uploads/2016/05/node-os-linux.jpg) + +[NodeOS][1]是一个基于[Node.js][2]的操作系统,自去年的首个[发布候选版][3]之后正朝着它的1.0版本进发。 + +如果你是第一次听到它,NodeOS是首个在[Linux][5]内核之上由Node.js和[npm][4]驱动的操作系统。[Jacob Groundwater][6]仔2013年中介绍了这个项目。操作系统中用到的主要技术是: + +- **Linux 内核**: 这个系统内置了Linux内核 +- **Node.js 运行时**: Node作为主要的运行时 +- **npm 包管理**: npm作为包管理 + +NodeOS源码托管在[Github][7]上,因此,任何感兴趣的人都可以轻松贡献或者报告bug。用户可以从源码构建或者使用[预编译镜像][8]。构建过程及使用可以在项目仓库中找到。 + +NodeOS背后的思想是提供足够npm运行的环境,剩余的功能就可以来自npm包管理。因此,用户可以使用大量的大约250,000的包,并且这个数目每天都还在增长。并且所有的都是开源的,你可以根据你的需要很容易地打补丁或者增加更多的包。 + +NodeOS核心开发被分离成了不同的层,基本的结构包含: + +- **barebones** – 带有可以启动到Node.js REPL的initramfs的自定义内核 +- **initramfs** – =用于挂载用户分区以及启动系统的initram文件系统 +- **rootfs** – 托管linux内核及initramfs文件的只读分区 +- **usersfs** – 多用户文件系统(如传统系统一样) + +NodeOS的目标是可以仔任何平台上运行,包括- **真实的硬件(用户计算机或者SoC)**、**云平台、虚拟机、PaaS提供商,容器**(Docker和Vagga)等等。如今看来,它做得似乎不错。在3.3号,NodeOS的成员[Jesús Leganés Combarro][9]在Github上[宣布][10]: + +>**NodeOS不再是一个玩具系统了**,它现在开始可以用在有实际需求的生产环境中了。 + +因此,如果你是Node.js的死忠或者乐于尝试新鲜事物,这或许值得你一试。在相关的文章中,你应该了解这些[Linux发行版的具体用法][11] + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/nodeos-operating-system/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Munif Tanjim][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/munif/ +[1]: http://node-os.com/ +[2]: https://nodejs.org/en/ +[3]: https://github.com/NodeOS/NodeOS/releases/tag/v1.0-RC1 +[4]: https://www.npmjs.com/ +[5]: http://itsfoss.com/tag/linux/ +[6]: https://github.com/groundwater +[7]: https://github.com/nodeos/nodeos +[8]: https://github.com/NodeOS/NodeOS/releases +[9]: https://github.com/piranna +[10]: https://github.com/NodeOS/NodeOS/issues/216 +[11]: http://itsfoss.com/weird-ubuntu-based-linux-distributions/ From a8ac5c747250faf9e83eb6c10247aa47f090facc Mon Sep 17 00:00:00 2001 From: Stdio A Date: Sat, 28 May 2016 15:51:31 +0800 Subject: [PATCH 1454/1710] Translated 20160525 Getting Started with Python Programming and Scripting in Linux - Part 1 --- ...ramming and Scripting in Linux – Part 1.md | 184 ----------------- ...ramming and Scripting in Linux – Part 1.md | 187 ++++++++++++++++++ 2 files changed, 187 insertions(+), 184 deletions(-) delete mode 100644 sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md create mode 100644 translated/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md diff --git a/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md b/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md deleted file mode 100644 index dac5b0385f..0000000000 --- a/sources/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md +++ /dev/null @@ -1,184 +0,0 @@ -StdioA translating - -Getting Started with Python Programming and Scripting in Linux – Part 1 -=============================================================================== - - -It has been said (and often required by recruitment agencies) that system administrators need to be proficient in a scripting language. While most of us may be comfortable using [Bash][1] (or other shell of our choice) to run command-line scripts, a powerful language such as Python can add several benefits. - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Programming-Scripting-in-Linux.png) ->Learn Python Programming Scripting in Linux - -To begin with, Python allows us to access the tools of the command-line environment and to make use of Object Oriented Programming features (more on this later in this article). - -On top of it, learning Python can boost your career in the fields of [desktop applications][2] and [data science][3]. - -Being so easy to learn, so vastly used, and having a plethora of ready-to-use modules (external files that contain Python statements), no wonder Python is the preferred language to teach programming to first-year computer science students in the United States. - -In this 2-article series we will review the fundamentals of Python in hopes that you will find it useful as a springboard to get you started with programming and as a quick-reference guide afterwards. That said, let’s get started. - -### Python in Linux - -Python versions 2.x and 3.x are usually available in most modern Linux distributions out of the box. You can enter a Python shell by typing `python` or `python3` in your terminal emulator and exit with `quit()`: - -``` -$ which python -$ which python3 -$ python -v -$ python3 -v -$ python ->>> quit() -$ python3 ->>> quit() -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Running-Python-Commands-on-Linux.png) ->Running Python Commands on Linux - -If you want to discard Python 2.x and use 3.x instead when you type python, you can modify the corresponding symbolic links as follows: - -``` -$ sudo rm /usr/bin/python -$ cd /usr/bin -$ ln -s python3.2 python # Choose the Python 3.x binary here -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Remove-Python-2-and-Use-Python-3.png) ->Remove Python 2 and Use Python 3 - -By the way, it is important to note that although versions 2.x are still used, they are not actively maintained. For that reason, you may want to consider switching to 3.x as indicated above. Since there are some syntax differences between 2.x and 3.x, we will focus on the latter in this series. - -Another way you can use Python in Linux is through the IDLE (the Python Integrated Development Environment), a graphical user interface for writing Python code. Before installing it, it is a good idea to perform a search to find out what are the versions available for your distribution: - -``` -# aptitude search idle [Debian and derivatives] -# yum search idle [CentOS and Fedora] -# dnf search idle [Fedora 23+ version] -``` - -Then, you can install it as follows: - -``` -$ sudo aptitude install idle-python3.2 # I'm using Linux Mint 13 -``` - -Once installed, you will see the following screen after launching the IDLE. While it resembles the Python shell, you can do more with the IDLE than with the shell. - -For example, you can: - -1. open external files easily (File → Open). - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Python-Shell.png) ->Python Shell - -2) copy (`Ctrl + C`) and paste (`Ctrl + V`) text, 3) find and replace text, 4) show possible completions (a feature known as Intellisense or Autocompletion in other IDEs), 5) change the font type and size, and much more. - -On top of this, you can use the IDLE to create desktop applications. - -Since we will not be developing a desktop application in this 2-article series, feel free to choose between the IDLE and the Python shell to follow the examples. - -### Basic Operations with Python - -As it is to be expected, you can perform arithmetic operations (feel free to use as many parentheses as needed to perform all the operations you want!) and manipulate text strings very easily with Python. - -You can also assign the results of operations to variables and display them in the screen. A handy feature in Python is concatenation – just supply the values of variables and / or strings in a comma-delimited list (inside parentheses) to the print function and it will return the sentence composed by the items in the sequence: - -``` ->>> a = 5 ->>> b = 8 ->>> x = b / a ->>> x -1.6 ->>> print(b, "divided by", a, "equals", x) -``` - -Note that you can mix variables of different types (numbers, strings, booleans, etc) and once you have assigned a value to a variable you can change the data type without problems later (for this reason Python is said to be a dynamically typed language). - -If you attempt to do this in a statically typed language (such as Java or C#), an error will be thrown. - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Basic-Operations.png) ->Learn Python Basic Operations - -### A brief comment about Object Oriented Programming - -In Object Oriented Programming (OOP), all entities in a program are represented as objects and thus they can interact with others. As such, they have properties and most of them can perform actions (known as methods). - -For example, let’s suppose we want to create a dog object. Some of the possible properties are color, breed, age, etc, whereas some of the actions a dog can perform are bark(), eat(), sleep(), and many others. - -Methods names, as you can see, are followed by a set of parentheses which may (or may not) contain one (or more) arguments (values that are passed to the method). - -Let’s illustrate these concepts with one of the basic object types in Python: lists. - -### Illustrating methods and properties of objects: Lists in Python - -A list is an ordered group of items, which do not necessarily have to be all of the same data type. To create an empty list named rockBands, use a pair of square brackets as follows: - -To append an item to the end of the list, pass the item to the `append()` method as follows: - -``` ->>> rockBands = [] ->>> rockBands.append("The Beatles") ->>> rockBands.append("Pink Floyd") ->>> rockBands.append("The Rolling Stones") -``` - -To remove an item from the list, we can pass the specific element to the remove() method, or the position of the element (count starts at zero) in the list to pop(). - -In other words, we can use either of the following options to remove “The Beatles” from the list: - -``` ->>> rockBands.remove("The Beatles") -``` - -or - -``` ->>> rockBands.pop(0) -``` - -You can display the list of available methods for an object by pressing Ctrl + Space once you’ve typed the name followed by a dot: - -![](http://www.tecmint.com/wp-content/uploads/2016/05/List-Available-Python-Methods.png) ->List Available Python Methods - -A property of a list object is the number of items it contains. It is actually called length and is invoked by passing the list as argument to the len built-in function (by the way, the print statement, which we exemplified earlier-, is another Python built-in function). - -If you type len followed by an opening parentheses in the IDLE, you will see the default syntax of the function: - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Python-len-Function.png) ->Python len Function - -Now what about the individual items of the list. Do they have methods and properties as well? The answer is yes. For example, you can convert a string item to uppercase and get the number of characters it contains as follows: - -``` ->>> rockBands[0].upper() -'THE BEATLES' ->>> len(rockBands[0]) -11 -``` - -### Summary - -In this article we have provided a brief introduction to Python, its command-line shell, and the IDLE, and demonstrated how to perform arithmetic calculations, how to store values in variables, how to print back those values to the screen (either on its own or as part of a concatenation), and explained through a practical example what are the methods and properties of an object. - -In the next article we will discuss control flow with conditionals and loops. We will also demonstrate how to use what we have learned to write a script to help us in our sysadmin tasks. - -Does Python sound like something you would like to learn more about? Stay tuned for the second part in this series (where among other things we will combine the bounties of Python and command-line tools in a script), and also consider buying our Ultimate Python Coding bundle (more details [here][4]). - -As always, you can count on us if you have any questions about this article. Just send us a message using the contact form below and we will get back to you as soon as possible. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/learn-python-programming-and-scripting-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/category/bash-shell/ -[2]: http://www.tecmint.com/create-gui-applications-in-linux/ -[3]: http://www.datasciencecentral.com/profiles/blogs/the-guide-to-learning-python-for-data-science-2 -[4]: http://www.tecmint.com/learn-python-programming-online-with-ultimate-python-coding/ diff --git a/translated/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md b/translated/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md new file mode 100644 index 0000000000..24df8ca66b --- /dev/null +++ b/translated/tech/20160525 Getting Started with Python Programming and Scripting in Linux – Part 1.md @@ -0,0 +1,187 @@ +Linux 平台下 Python 脚本编程入门 – Part 1 +=============================================================================== + + +众所周知,系统管理员需要精通一门脚本语言,而且招聘机构列出的职位需求上也会这么写。大多数人会认为 Bash (或者其他的 shell 语言)用起来很方便,但一些强大的语言(比如 Python)会给你带来一些其它的好处。 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Programming-Scripting-in-Linux.png) +> 在 Linux 中学习 Python 脚本编程 + +首先,我们会使用 Python 的命令行工具,还会接触到 Python 的面向对象特性(这篇文章的后半部分会谈到它)。 + +最后,学习 Python + 可以助力于你在[桌面应用开发][2]及[数据科学领域][3]的事业。 + +容易上手,广泛使用,拥有海量“开箱即用”的模块(它是一组包含 Python 声明的外部文件),Python 理所当然地成为了美国计算机专业大学生在一年级时所上的程序设计课所用语言的不二之选。 + +在这个由两篇文章构成的系列中,我们将回顾 Python +的基础部分,希望初学编程的你能够将这篇实用的文章作为一个编程入门的跳板,和日后使用 Python 时的一篇快速指引。 + +### Linux 中的 Python + +Python 2.x 和 3.x 通常已经内置在现代 Linux 发行版中,你可以立刻使用它。你可以终端模拟器中输入 `python` 或 `python3` 来进入 Python shell, 并输入 `quit()` 退出。 + +``` +$ which python +$ which python3 +$ python -v +$ python3 -v +$ python +>>> quit() +$ python3 +>>> quit() +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Running-Python-Commands-on-Linux.png) +> 在 Linux 中运行 Python 命令 + +如果你希望在键入 `python` 时使用 Python 3.x 而不是 2.x,你可以像下面一样更改对应的符号链接: + +``` +$ sudo rm /usr/bin/python +$ cd /usr/bin +$ ln -s python3.2 python # Choose the Python 3.x binary here +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Remove-Python-2-and-Use-Python-3.png) +> 删除 Python 2,使用 Python 3 + +顺便一提,有一点需要注意:尽管 Python 2.x 仍旧被使用,但它并不会被积极维护。因此,你可能要考虑像上面指示的那样来切换到 3.x。2.x 和 3.x 的语法有一些不同,我们会在这个系列文章中使用后者。 + +另一个在 Linux 中使用 Python 的方法是通过 IDLE (the Python Integrated Development Environment),一个为编写 Python 代码而生的图形用户界面。在安装它之前,你最好查看一下适用于你的 Linux 发行版的 IDLE 可用版本。 + +``` +# aptitude search idle [Debian 及其衍生发行版] +# yum search idle [CentOS 和 Fedora] +# dnf search idle [Fedora 23+ 版本] +``` + +然后,你可以像下面一样安装它: + +``` +$ sudo aptitude install idle-python3.2 # I'm using Linux Mint 13 +``` + +安装成功后,你会看到 IDLE 的运行画面。它很像 Python shell,但是你可以用它做更多 Python shell 做不了的事。 + +比如,你可以: + +1. 轻松打开外部文件 (File → Open); + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Python-Shell.png) +> Python Shell + +2. 复制 (`Ctrl + C`) 和粘贴 (`Ctrl + V`) 文本; +3. 查找和替换文本; +4. 显示可能的代码补全(一个在其他 IDE 里可能叫做 Intellisense 或者 Autocompletion 的功能); +5. 更改字体和字号,等等。 + +最厉害的是,你可以用 IDLE 创建桌面工程。 + +我们在这两篇文章中不会开发桌面应用,所以你可以根据喜好来选择 IDLE 或 Python shell 去运行下面的例子。 + +### Python 中的基本运算 + +就像你预料的那样,你能够直接进行算术操作(你可以在所有操作中使用足够多的括号!),还可以轻松地使用 Python 拼接字符串。 + +你还可以将运算结果赋给一个变量,然后在屏幕上显示它。Python 有一个叫做输出 (concatenation) 的实用功能——把一串变量和/或字符串用逗号分隔,然后在 print 函数中插入,它会返回一个由你刚才提供的变量依序构成的句子: + +``` +>>> a = 5 +>>> b = 8 +>>> x = b / a +>>> x +1.6 +>>> print(b, "divided by", a, "equals", x) +``` + +注意,你可以将不同类型的变量(数字,字符串,布尔符号等等)混合在一起。当你将一个值赋给一个变量后,你可以随后更改它的类型,不会有任何问题(因此,Python 被称为动态类型语言)。 + +如果你尝试在静态类型语言中(如 Java 或 C#)做这件事,它将抛出一个错误。 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Basic-Operations.png) +> 学习 Python 的基本操作 + +### 面向对象编程的简单介绍 + +在面向对象编程(OOP)中,程序中的所有实体都会由对象的形式呈现,所以它们可以与其他对象交互。因此,对象拥有属性,而且大多数对象可以完成动作(这被称为对象的方法)。 + +举个例子:我们来想象一下,创建一个对象“狗”。它可能拥有的一些属性有`颜色`、`品种`、`年龄`等等,而它可以完成的动作有 `叫()`、`吃()`、`睡觉()`,诸如此类。 + +你可以看到,方法名后面会跟着一对括号,他们当中可能会包含一个或多个参数(向方法中传递的值),也有可能什么都不包含。 + +我们用 Python 的基本对象类型之一——列表来解释这些概念。 + +### 解释对象的属性和方法:Python 中的列表 + +列表是条目的有序组合,而这些条目所属的数据类型并不需要相同。我们像下面一样来使用一对方括号,来创建一个名叫 `rockBands` 的列表: + +你可以向 `rockBands` 的 `append()` 方法传递条目,来将它添加到列表的尾部,就像下面这样: + +``` +>>> rockBands = [] +>>> rockBands.append("The Beatles") +>>> rockBands.append("Pink Floyd") +>>> rockBands.append("The Rolling Stones") +``` + +为了从列表中移除元素,我们可以向 `remove()` 方法传递特定元素,或向 `pop()` 中传递列表中待删除元素的位置(从 0 开始计数)。 + +换句话说,我们可以用下面这种方法来从列表中删除 “The Beatles”: + +``` +>>> rockBands.remove("The Beatles") +``` + +或者用这种方法: + +``` +>>> rockBands.pop(0) +``` + +如果你输入了对象的名字,然后在后面输入了一个点,你可以按 Ctrl + 空格来显示这个对象的可用方法列表。 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/List-Available-Python-Methods.png) +> 列出可用的 Python 方法 + +列表中含有的元素个数是它的一个属性。它通常被叫做“长度”,你可以通过向内建函数 `len` 传递一个列表作为它的参数来显示该列表的长度(顺便一提,之前的例子中提到的 print 语句,是 Python 的另一个内建函数)。 + +如果你在 IDLE 中输入 `len`,然后跟上一个不闭合的括号,你会看到这个函数的默认语法: + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Python-len-Function.png) +> Python 的 len 函数 + +现在我们来看看列表中的特定条目。他们也有属性和方法吗?答案是肯定的。比如,你可以将一个字符串条目装换为大写形式,并获取这个字符串所包含的字符数量。像下面这样做: + +``` +>>> rockBands[0].upper() +'THE BEATLES' +>>> len(rockBands[0]) +11 +``` + +### 总结 + +在这篇文章中,我们简要介绍了 Python,它的命令行 shell,IDLE,展示了如何执行算术运算,如何在变量中存储数据,如何使用 `print` 函数在屏幕上重新显示那些数据(无论是它们本身还是它们的一部分),还通过一个实际的例子解释了对象的属性和方法。 + +下一篇文章中,我们会展示如何使用条件语句和循环语句来实现流程控制。我们也会解释如何编写一个脚本来帮助我们完成系统管理任务。 + +你是不是想继续学习一些有关 Python 的知识呢?敬请期待本系列的第二部分(我们会将 Python 的慷慨、脚本中的命令行工具与其他部分结合在一起),你还可以考虑购买我们的《终极 Python 编程》系列教程([这里][4]有详细信息)。 + +像往常一样,如果你对这篇文章有什么问题,可以向我们寻求帮助。你可以使用下面的联系表单向我们发送留言,我们会尽快回复你。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/learn-python-programming-and-scripting-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[StdioA](https://github.com/StdioA) +校对:[校对者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/category/bash-shell/ +[2]: http://www.tecmint.com/create-gui-applications-in-linux/ +[3]: http://www.datasciencecentral.com/profiles/blogs/the-guide-to-learning-python-for-data-science-2 +[4]: http://www.tecmint.com/learn-python-programming-online-with-ultimate-python-coding/ From 1a82c20dc69fabd1cb8dc5081b2252d47079c217 Mon Sep 17 00:00:00 2001 From: SarishiNoHara Date: Sat, 28 May 2016 16:15:50 +0200 Subject: [PATCH 1455/1710] BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md (#4010) translating... --- .../20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md b/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md index 1b1cbc2110..9e3e630282 100644 --- a/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md +++ b/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md @@ -1,3 +1,5 @@ +translating by sarishinohara + BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016 ============================================= From ed2663977a6de104162cc9631628452a1b8e26a7 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 28 May 2016 23:11:39 +0800 Subject: [PATCH 1456/1710] [translated]20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE --- ...- NEW GENERATION OF LINUX APPS ARE HERE.md | 144 ------------------ ...- NEW GENERATION OF LINUX APPS ARE HERE.md | 142 +++++++++++++++++ 2 files changed, 142 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md create mode 100644 translated/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md diff --git a/sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md b/sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md deleted file mode 100644 index 1402151642..0000000000 --- a/sources/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md +++ /dev/null @@ -1,144 +0,0 @@ -alim0x translating - -ORB: NEW GENERATION OF LINUX APPS ARE HERE -============================================= - -![](http://itsfoss.com/wp-content/uploads/2016/05/ORB-Apps.jpeg) - -We have talked about [installing applications offline in Ubuntu][1] before. And we are going to talk about it once again. - -[Orbital Apps][2] has brought us a new type of application package, **ORB**, with portable applications, interactive installer support and offline usage ability. - -Portable applications are always handy. Mostly because they can run on-the-fly without needing any administrator privileges, and also it can be carried around on small USB sticks along with all their settings and data. And these interactive installers will be able to allow us to install applications with ease. - -### OPEN RUNNABLE BUNDLE (ORB) - -ORB is a free & open-source package format and it’s different from the others in numerous ways. Some of the specifications of ORB is followings: - -- **Compression**: All the packages are compressed with squashfs making them up-to 60% smaller. -- **Portable Mode**: If a portable ORB application is run from a removable drive, it’ll store its settings and data on that drive. -- **Security**: All ORB packages are signed with PGP/RSA and distributed via TLS 1.2. -- **Offline**: All the dependencies are bundled with the package, so no downloading dependencies anymore. -- **Open package**: ORB packages can be mounted as ISO images. - -### VARIETY - -ORB applications are now available in two varieties: - -- Portable Applications -- SuperDEB - -#### 1. PORTABLE ORB APPLICATIONS - -Portable ORB Applications is capable of running right away without needing any installation beforehand. That means it’ll need no administrator privileges and no dependencies! You can just download them from the Orbital Apps website and get to work. - -And as it supports Portable Mode, you can copy it on a USB stick and carry it around. All its settings and data will be stored with it on that USB stick. Just connect the USB stick with any system running on Ubuntu 16.04 and you’ll be ready to go. - -##### AVAILABLE PORTABLE APPLICATIONS - -Currently, more than 35 applications are available as portable packages, including some very popular applications like: [Deluge][3], [Firefox][4], [GIMP][5], [Libreoffice][6], [uGet][7] & [VLC][8]. - -For a full list of available packages, check the [Portable ORB Apps list][9]. - -##### USING PORTABLE APPLICATION - -Follow the steps for using Portable ORB Applications: - -- Download your desired package from the Orbital Apps site. -- Move it wherever you want (local drive / USB stick). -- Open the directory where you’ve stored the ORB package. - -![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-1-1024x576.jpg) - -- Open Properties of the ORB package. - -![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-2.jpg) ->Add Execute permission to ORB package - -- Add Execute permission from Permissions tab. -- Double-click on it. - -Wait for a few seconds as it prepares itself for running. And you’re good to go. - -#### 2. SUPERDEB - -Another variety of ORB Applications is SuperDEB. SuperDEBs are easy and interactive installers that make the software installation process a lot smoother. If you don’t like to install software from terminal or software centers, SuperDEB is exactly for you. - -And the most interesting part is that you won’t need an active internet connection for installing as all the dependencies are bundled with the installer. - -##### AVAILABLE SUPERDEBS - -More than 60 applications are currently available as SuperDEB. Some of the popular software among them are: [Chromium][10], [Deluge][3], [Firefox][4], [GIMP][5], [Libreoffice][6], [uGet][7] & [VLC][8]. - -For a full list of available SuperDEBs, check the [SuperDEB list][11]. - -##### USING SUPERDEB INSTALLER - -- Download your desired SuperDEB from Orbital Apps site. -- Add **Execute permission** to it just like before ( Properties > Permissions ). -- Double-click on the SuperDEB installer and follow the interactive instructions: - -![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-1.png) ->Click OK - -![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-2.png) ->Enter your password and proceed - -![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-3.png) ->It’ll start Installing… - -![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-4.png) ->And soon it’ll be done… - -- After finishing the installation, you’re good to use it normally. - -### ORB APPS COMPATIBILITY - -According to Orbital Apps, they are fully compatible with Ubuntu 16.04 [64 bit]. - ->Reading suggestion: [How To Know If You Have 32 Bit or 64 Bit Computer in Ubuntu][12]. - -As for other distros compatibility is not guaranteed. But we can say that, it’ll work on any Ubuntu 16.04 flavors (UbuntuMATE, UbuntuGNOME, Lubuntu, Xubuntu etc.) and Ubuntu 16.04 based distros (like upcoming Linux Mint 18). We currently have no information if Orbital Apps is planning on expanding its support for other Ubuntu versions/Linux Distros or not. - -If you’re going to use Portable ORB applications often on your system, you can consider installing ORB Launcher. It’s not necessary but is recommended installing to get an improved experience. The shortest method of installing ORB Launcher is opening the terminal and enter the following command: - -``` -wget -O - https://www.orbital-apps.com/orb.sh | bash -``` - -You can find the detailed instructions at [official documentation][13]. - -### WHAT IF I NEED AN APP THAT’S NOT LISTED? - -If you need an application as ORB package that is not available right now, you can [contact][14] Orbital Apps. And the good news is, Orbital Apps is working hard and planning on releasing a tool for creating ORB packages. So, hopefully, soon we’ll be able to make ORB packages ourselves! - -Just to add, this was about installing apps offline. If you are interested, you should read [how to update or upgrade Ubuntu offline][15]. - -So, what do you think about Orbital Apps’ Portable Applications and SuperDEB installers? Will you try them? - - ----------------------------------- -via: http://itsfoss.com/orb-linux-apps/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 - -作者:[Munif Tanjim][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/munif/ -[1]: http://itsfoss.com/cube-lets-install-linux-applications-offline/ -[2]: https://www.orbital-apps.com/ -[3]: https://www.orbital-apps.com/download/portable_apps_linux/deluge -[4]: https://www.orbital-apps.com/download/portable_apps_linux/firefox -[5]: https://www.orbital-apps.com/download/portable_apps_linux/gimp -[6]: https://www.orbital-apps.com/download/portable_apps_linux/libreoffice -[7]: https://www.orbital-apps.com/download/portable_apps_linux/uget -[8]: https://www.orbital-apps.com/download/portable_apps_linux/vlc -[9]: https://www.orbital-apps.com/download/portable_apps_linux/ -[10]: https://www.orbital-apps.com/download/superdeb_installers/ubuntu_16.04_64bits/chromium/ -[11]: https://www.orbital-apps.com/superdebs/ubuntu_16.04_64bits/ -[12]: http://itsfoss.com/32-bit-64-bit-ubuntu/ -[13]: https://www.orbital-apps.com/documentation -[14]: https://www.orbital-apps.com/contact -[15]: http://itsfoss.com/upgrade-or-update-ubuntu-offline-without-internet/ diff --git a/translated/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md b/translated/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md new file mode 100644 index 0000000000..cc212e7a4c --- /dev/null +++ b/translated/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md @@ -0,0 +1,142 @@ +ORB:新一代 Linux 应用 +============================================= + +![](http://itsfoss.com/wp-content/uploads/2016/05/ORB-Apps.jpeg) + +我们之前讨论过[在 Ubuntu 上离线安装应用][1]。我们现在要再次讨论它。 + +[Orbital Apps][2] 给我们带来了新的软件包类型,**ORB**,它带有便携软件,交互式安装向导支持,以及离线使用的能力。 + +便携软件很方便。主要是因为它们能够无需任何管理员权限直接运行,也能够带着所有的设置和数据随U盘存储。而交互式的安装向导也能让我们轻松地安装应用。 + +### 开放可运行包 OPEN RUNNABLE BUNDLE (ORB) + +ORB 是一个免费和开源的包格式,它和其它包格式在很多方面有所不同。ORB 的一些特性: + +- **压缩**:所有的包经过压缩,使用 squashfs,体积最多减少 60%。 +- **便携模式**:如果一个便携 ORB 应用是从可移动设备运行的,它会把所有设置和数据存储在那之上。 +- **安全**:所有的 ORB 包使用 PGP/RSA 签名,通过 TLS 1.2 分发。 +- **离线**:所有的依赖都打包进软件包,所以不再需要下载依赖。 +- **开放包**:ORB 包可以作为 ISO 镜像挂载。 + +### 种类 + +ORB 应用现在有两种类别: + +- 便携软件 +- SuperDEB + +#### 1. 便携 ORB 软件 + +便携 ORB 软件可以立即运行而不需要任何的事先安装。那意味着它不需要管理员权限和依赖!你可以直接从 Orbital Apps 网站下载下来就能使用。 + +并且由于它支持便携模式,你可以将它拷贝到U盘携带。它所有的设置和数据会和它一起存储在U盘。只需将U盘连接到任何运行 Ubuntu 16.04 的机器上就行了。 + +##### 可用便携软件 + +目前有超过 35 个软件以便携包的形式提供,包括一些十分流行的软件,比如:[Deluge][3],[Firefox][4],[GIMP][5],[Libreoffice][6],[uGet][7] 以及 [VLC][8]。 + +完整的可用包列表可以查阅 [便携 ORB 软件列表][9]。 + +##### 使用便携软件 + +按照以下步骤使用便携 ORB 软件: + +- 从 Orbital Apps 网站下载想要的软件包。 +- 将其移动到想要的位置(本地磁盘/U盘)。 +- 打开存储 ORB 包的目录。 + +![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-1-1024x576.jpg) + +- 打开 ORB 包的属性。 + +![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-2.jpg) +>给 ORB 包添加运行权限 + +- 在权限标签页添加运行权限。 +- 双击打开它。 + +等待几秒,让它准备好运行。大功告成。 + +#### 2. SuperDEB + +另一种类型的 ORB 软件是 SuperDEB。SuperDEB 很简单,交互式安装向导能够让软件安装过程顺利得多。如果你不喜欢从终端或软件中心安装软件,superDEB 就是你的菜。 + +最有趣的部分是你安装时不需要一个互联网连接,因为所有的依赖都由安装向导打包了。 + +##### 可用的 SuperDEB + +超过 60 款软件以 SuperDEB 的形式提供。其中一些流行的有:[Chromium][10],[Deluge][3],[Firefox][4],[GIMP][5],[Libreoffice][6],[uGet][7] 以及 [VLC][8]。 + +完整的可用 SuperDEB 列表,参阅 [SuperDEB 列表][11]。 + +##### 使用 SuperDEB 安装向导 + +- 从 Orbital Apps 网站下载需要的 SuperDEB。 +- 像前面一样给它添加**运行权限**(属性 > 权限)。 +- 双击 SuperDEB 安装向导并按下列说明操作: + +![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-1.png) +>点击 OK + +![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-2.png) +>输入你的密码并继续 + +![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-3.png) +>它会开始安装… + +![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-4.png) +>一会儿他就完成了… + +- 完成安装之后,你就可以正常使用了。 + +### ORB 软件兼容性 + +从 Orbital Apps 可知,它们完全适配 Ubuntu 16.04 [64 bit]。 + +>阅读建议:[如何在 Ubuntu 获知你的是电脑 32 位还是 64 位的][12]。 + +至于其它发行版兼容性不受保证。但我们可以说,它在所有 Ubuntu 16.04 衍生版(UbuntuMATE,UbuntuGNOME,Lubuntu,Xubuntu 等)以及基于 Ubuntu 16.04 的发行版(比如即将到来的 Linux Mint 18)上都适用。我们现在还不清楚 Orbital Apps 是否有计划拓展它的支持到其它版本 Ubuntu 或 Linux 发行版上。 + +如果你在你的系统上经常使用便携 ORB 软件,你可以考虑安装 ORB 启动器。它不是必需的,但是推荐安装它以获取更佳的体验。最简短的 ORB 启动器安装流程是打开终端输入以下命令: + +``` +wget -O - https://www.orbital-apps.com/orb.sh | bash +``` + +你可以在[官方文档][13]找到更加详细的介绍。 + +### 如果我需要的软件不在列表里? + +如果你需要一个当前并没有可用 ORB 包的软件,你可以[联系][14] Orbital Apps。好消息是,Orbital Apps 正在致力于推出一个创建 ORB 包的工具。所以,不久后我们有希望可以自己制作 ORB 包! + +多说一句,这个文章是关于离线安装软件的。如果你感兴趣的话,你可以看看[如何离线更新或升级 Ubuntu][15]。 + +所以,你怎么看 Orbital Apps 的便携软件和 SuperDEB 安装向导?你会试试吗? + + +---------------------------------- +via: http://itsfoss.com/orb-linux-apps/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Munif Tanjim][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/munif/ +[1]: http://itsfoss.com/cube-lets-install-linux-applications-offline/ +[2]: https://www.orbital-apps.com/ +[3]: https://www.orbital-apps.com/download/portable_apps_linux/deluge +[4]: https://www.orbital-apps.com/download/portable_apps_linux/firefox +[5]: https://www.orbital-apps.com/download/portable_apps_linux/gimp +[6]: https://www.orbital-apps.com/download/portable_apps_linux/libreoffice +[7]: https://www.orbital-apps.com/download/portable_apps_linux/uget +[8]: https://www.orbital-apps.com/download/portable_apps_linux/vlc +[9]: https://www.orbital-apps.com/download/portable_apps_linux/ +[10]: https://www.orbital-apps.com/download/superdeb_installers/ubuntu_16.04_64bits/chromium/ +[11]: https://www.orbital-apps.com/superdebs/ubuntu_16.04_64bits/ +[12]: http://itsfoss.com/32-bit-64-bit-ubuntu/ +[13]: https://www.orbital-apps.com/documentation +[14]: https://www.orbital-apps.com/contact +[15]: http://itsfoss.com/upgrade-or-update-ubuntu-offline-without-internet/ From da07e37c3ad6879ded414349f92ea69aab4b542e Mon Sep 17 00:00:00 2001 From: sarishinohara Date: Sat, 28 May 2016 19:21:02 +0200 Subject: [PATCH 1457/1710] translated --- ...LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md | 163 ----------------- ...LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md | 172 ++++++++++++++++++ 2 files changed, 172 insertions(+), 163 deletions(-) delete mode 100644 sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md create mode 100644 translated/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md diff --git a/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md b/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md deleted file mode 100644 index 9e3e630282..0000000000 --- a/sources/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md +++ /dev/null @@ -1,163 +0,0 @@ -translating by sarishinohara - -BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016 -============================================= - -![](http://itsfoss.com/wp-content/uploads/2016/05/Best-Linux-Photo-Management-Software.jpg) - -When it comes to Linux applications, at times there are so many choices and alternatives. But sometimes there are only a few options. - -One of our readers had requested to make a list of decent **Linux photo management software**. Something that could replace now defunct Picasa on Linux. - -Turns out, though not many, there are some really good applications for managing photo libraries available out there. Either you have a huge collection of photos or only a few of them, one of these options ought to suit your needs. - -This list of **best photo management applications for Linux** is different from our earlier list of [best photo applications for Linux][1]. That list contained image related applications for various purposes such as editing, painting etc., while this list deals with only photo managing applications. - -So, here we go. I’ve also included the installation commands of these applications for Ubuntu and its derivatives. All you need to do is open a terminal and run those. - -### [GTHUMB](https://wiki.gnome.org/Apps/gthumb) - -![](http://itsfoss.com/wp-content/uploads/2016/05/gThumb-1-1024x540.jpg) ->gThumb Photo Editing - -gThumb is a lightweight photo management application built mainly for GNOME desktop environment. It includes all the basic photo management features as well as some editing and advance operations. Some of the main features of gThumb are: - -- Image Viewer: Supports all the major image format (including GIF) and metadata (EXIF, XMP etc). -- Image Browser: All the basic browsing operations (thumbnails, move, copy, delete etc) and bookmarking support. -- Image Organizer: Organize photos with tags, catalogs and Libraries. Importing photos from Digital Cameras. Web albums (Picasa, Flickr, Facebook etc) integration. -- Image Editor: Basic photo editing operations, filters, format conversion etc. - -And there’s much more, check the official [gThumb feature][2] list. If you use GNOME or GNOME based desktop environments (like MATE) you should definitely try this one out. - -#### GTHUMB INSTALLATION - -``` -sudo apt-get install gthumb -``` - - -### [DIGIKAM][3] - -![](http://itsfoss.com/wp-content/uploads/2016/05/digiKam-1-1024x540.png) ->digiKam - -digiKam is mainly developed for KDE, but works just as well on other desktop environments. It comes with a lot of features with an interface that works nicely. The main features of digiKam includes: - -- Photo Organizer: Albums, sub-albums, tags, comments, metadata, sorting support. -- Photo Importer: Import support from Digital Cameras, USB devices, Web Albums (including Picasa & Facebook) and some other features. -- Photo Exporter: Export support for various online platforms and format conversion. -- Photo Editor: Wide range of photo editing operations. - -digiKam is certainly one of the best Linux photo management software, if not best. - -#### DIGIKAM INSTALLATION - -``` -sudo apt-get install digikam -``` - -### [SHOTWELL][4] - -![](http://itsfoss.com/wp-content/uploads/2016/05/Shotwell-1-1024x540.png) ->Shotwell - -Shotwell photo manager is also for GNOME desktop environment. Shotwell, while isn’t as feature-rich as gThumb, does what it promises. The main features of Shotwell are: - -- Import photos from Disks or Digital Cameras. -- Event, tags and folder based organization. -- Basic photo editing features and format conversion. -- Supports uploading to web services (Facebook, Flickr, Tumblr etc). - -If you want something simple, you can check this one out. - -#### SHOTWELL INSTALLATION - -``` -sudo apt-get install shotwell -``` - -### [KPHOTOALBUM][5] - -![](http://itsfoss.com/wp-content/uploads/2016/05/KPhotoAlbum-1-1024x540.png) ->KPhotoAlbum - -KPhotoAlbum is a photo management application also intended to be used on [KDE desktop environment][6]. What makes KPhotoAlbum unique is its categorization process and time-based browsing. You can categorize photos by People, Places, Events etc. And for time-based browsing, it has a dedicated timeline or Date Bar at the bottom of the user interface. - -KPhotoAlbum comes with a wide range of features for photo management and editing. Some of the main features include: - -- Advance photo organization (with categories, sub-categories, tags, metadata, annotation support and much more). -- Wide range of import and export options (including almost every major photo sharing platforms). -- Various editing options (includes batch operations). - -All these advanced organization features do have their downsides – user has to do most of them manually. But if you’re a KDE lover, this can be a good pick. You can use KPhotoAlbum on other desktop environments too, but it delivers the optimal experience on KDE. - -#### KPHOTOALBUM INSTALLATION - -``` -sudo apt-get install kphotoalbum -``` - -### [DARKTABLE][7] - -![](http://itsfoss.com/wp-content/uploads/2016/05/darktable-1-1024x540.png) ->Darktable - -Darktable is more of a photo editing application than an organizer. Darktable stands out for its own user interface regardless of the desktop environment you might be using, and of course for its editing capabilities. The basic features include: - -- Basic photo organization. -- Advance and feature-rich photo editing. -- Export support for Picasa & Flickr and format conversion. - -If you’re into photo editing and retouching, Darktable is a nice choice. - -> Reading Suggestion: [How to install Darktable 2.0 in Ubuntu via PPA][8] - -#### DARKTABLE INSTALLATION - -``` -sudo add-apt-repository ppa:pmjdebruijn/darktable-release -sudo apt-get update -sudo apt-get install darktable -``` - -### OTHERS - -If you want a simple application for pulling images from your portable devices (cameras, phones, portable drives etc) and storing them on your Hard Disk, using [Rapid Photo Downloader][9] is a no-brainer. It is an incredible application for importing and backing up photos from portable devices. The installation and configuration process is quite easy and simple. - -For installing Rapid Photo Downloader on Ubuntu, fire up a terminal and run this command: - -``` -sudo apt-get install rapid-photo-downloader -``` - -If you are still interested in trying a few more options, here you go: - -- [GNOME Photos][10] (Photo viewer for GNOME desktop environment) -- [Gwenview][11] (Photo viewer for KDE desktop environment) -- [Picty][12] (Open-source photo collection manager) - -So, are you using, or plan to use, any one of these applications? Which, according to you is the best photo management application for Ubuntu or any other Linux? Do you have any favorites to term as Linux photo manager? Do share your views. - - ----------- -via: http://itsfoss.com/linux-photo-management-software/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 - -作者:[Munif Tanjim][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/munif/ -[1]: http://itsfoss.com/image-applications-ubuntu-linux/ -[2]: https://wiki.gnome.org/Apps/gthumb/features -[3]: https://www.digikam.org/ -[4]: https://wiki.gnome.org/Apps/Shotwell -[5]: https://www.kphotoalbum.org/ -[6]: https://www.kde.org/ -[7]: http://www.darktable.org/ -[8]: http://itsfoss.com/darktable-20-released-installation-ppa/ -[9]: http://www.damonlynch.net/rapid/index.html -[10]: https://wiki.gnome.org/Apps/Photos -[11]: https://userbase.kde.org/Gwenview -[12]: https://github.com/spillz/picty diff --git a/translated/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md b/translated/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md new file mode 100644 index 0000000000..24cb248921 --- /dev/null +++ b/translated/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md @@ -0,0 +1,172 @@ +2016年最佳 Linux 图像管理软件 +============================================= + +![](http://itsfoss.com/wp-content/uploads/2016/05/Best-Linux-Photo-Management-Software.jpg) + +通常谈及 Linux 上的应用程序时,我们有很多选择,但有时候选择的余地却很小。 + +有一些读者要我们做一个合宜的**图像管理软件**列表,来代替 Linux 上已被弃用的 Picasa 应用。 + +其实 Linux 平台上还是有很多很好的图像管理软件的,你可以根据你图片库的大小选择合适的应用。 + +这个列表和我们先前的 [最佳图像程序应用][1] 有些差别,上次我们介绍了图像编辑软件,绘图软件等,而这次的介绍主要集中在图像管理软件上。 + +好,下面我们开始介绍。我会详细说明在 Ubuntu 下的安装命令以及衍生的命令,我们只需要打开终端运行这些命令。 + +### [GTHUMB](https://wiki.gnome.org/Apps/gthumb) + +![](http://itsfoss.com/wp-content/uploads/2016/05/gThumb-1-1024x540.jpg) +>gThumb 图像编辑器 + +gThumb 是在 GNOME 桌面环境下的一个轻量级的图像管理应用,它涵盖了基本图像管理功能,编辑图片以及更加高级的操作,gThumb 主要功能如下: + +- 图片查看:支持所有主流的图片格式(包括gif)和元数据(EXIF, XMP 等)。 + +- 图片浏览:所有基础的浏览操作(缩略图,移动,复制,删除等)以及书签支持。 + +- 图片管理:使用标签操作图片,目录和图片库。从数码相机,网络相册(Picasa,Flickr,Facebook等)整合,导入图片。 + +- 图片编辑:基本图像编辑操作,滤镜,格式转换等。 + +- 更多功能请参考官方 [gThumb功能][2] 列表。如果你使用的是 GNOME 或者基于 GNOME 的桌面环境(如 MATE),那么你一定要试用一下。 + +#### GTHUMB 安装 + +``` +sudo apt-get install gthumb +``` + + +### [DIGIKAM][3] + +![](http://itsfoss.com/wp-content/uploads/2016/05/digiKam-1-1024x540.png) +>digiKam + +digiKam 主要为 KDE 而设计,在其他桌面环境下也可以使用。它有很多很好的图像界面功能,主要功能如下所示: + +- 图片管理:相册,子相册,标签,评论,元数据,排序支持。 + +- 图片导入:支持从数码相机,USB设备,网络相册(包括 Picasa 和 Facebook)导入,以及另外一些功能。 + +- 图片输出:支持输出至很多网络在线平台,以及各式转换。 + +- 图片编辑:支持很多图像编辑的操作。 + +digiKam 是众多优秀图像管理软件之一。 + +#### DIGIKAM 安装 + +``` +sudo apt-get install digikam +``` + +### [SHOTWELL][4] + +![](http://itsfoss.com/wp-content/uploads/2016/05/Shotwell-1-1024x540.png) +>Shotwell + +Shotwell 图像管理也是为 GNOME 桌面环境设计,虽然功能不及 gThumb 多,但满足了基本需求。主要功能如下: + +- 从磁盘或数码相机导入图片。 + +- 项目,标签和文件夹管理。 + +- 基本图片编辑功能和格式转换。 + +- 支持上传至网络平台(Facebook,Flickr,Tumblr 等)。 + +如果你想要一款功能相对简单的应用,你可以尝试一下这个。 + +#### SHOTWELL 安装 + +``` +sudo apt-get install shotwell +``` + +### [KPHOTOALBUM][5] + +![](http://itsfoss.com/wp-content/uploads/2016/05/KPhotoAlbum-1-1024x540.png) +>KPhotoAlbum + +KPhotoAlbum 是一款在 KDE 桌面环境下的图像管理应用。它有一些独特的功能:分类和基于时间浏览。你可以基于人物,地点,时间分类;另外在用户图形界面底部会显示时间栏。 + +KPhotoAlbum 有很多图像管理和编辑功能,主要功能包括: + +- 高级图片操作(目录,子目录,标签,元数据,注释等)。 + +- 图片导入导出功能(包括主流图片分享平台)。 + +- 众多编辑功能(包括批量处理)。 + +这些高级的功能有它们的缺点,就是用户需要手工操作。但如果你是KDE爱好者,这是个好的选择。它完美适用 KDE,但是你也可以在非 KDE 桌面环境下使用 KPhotoAlbum。 + +#### KPHOTOALBUM 安装 + +``` +sudo apt-get install kphotoalbum +``` + +### [DARKTABLE][7] + +![](http://itsfoss.com/wp-content/uploads/2016/05/darktable-1-1024x540.png) +>Darktable + +Darktable 相较于图像管理更偏向于图像编辑。Darktable 有良好的用户图形界面,对桌面环境没有特殊的要求,以及图像编辑功能。它的基本功能如下: + +- 基本图片管理。 + +- 众多高级的图片编辑功能。 + +- 支持导出至 Picasa 和 Flickr 和格式转换。 + +如果你喜欢照片编辑和润色,Darktable 是个好的选择。 + +> 推荐阅读:[怎样在Ubuntu下通过PPA安装Darktable 2.0][8] + +#### DARKTABLE 安装 + +``` +sudo add-apt-repository ppa:pmjdebruijn/darktable-release +sudo apt-get update +sudo apt-get install darktable +``` + +### 其它 + +如果你想要功能简单的应用,比如从便携设备(相机,手机,便携设备等)中导入照片并存入磁盘,使用 [Rapid Photo Downloader][9],它很适合从便携设备中导入和备份图片,而且安装配置过程简单。 + +在 Ubuntu 上安装 Rapid Photo Downloade,打开终端输入命令: + +``` +sudo apt-get install rapid-photo-downloader +``` + +如果你想尝试更多的选择: +- [GNOME Photos][10] (GNOME桌面环境下的图像查看器) +- [Gwenview][11] (KDE桌面环境下的图像查看器) +- [Picty][12] (开源图像管理器) + +那么,你正在使用,或者打算使用其中一款应用吗?你有其它更好的推荐吗?你有最喜欢的 Linux 图像管理软件吗?分享你的观点。 + +---------- +via: http://itsfoss.com/linux-photo-management-software/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Munif Tanjim][a] +译者:[sarishinohara](https://github.com/sarishinohara) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://itsfoss.com/author/munif/ +[1]: http://itsfoss.com/image-applications-ubuntu-linux/ +[2]: https://wiki.gnome.org/Apps/gthumb/features +[3]: https://www.digikam.org/ +[4]: https://wiki.gnome.org/Apps/Shotwell +[5]: https://www.kphotoalbum.org/ +[6]: https://www.kde.org/ +[7]: http://www.darktable.org/ +[8]: http://itsfoss.com/darktable-20-released-installation-ppa/ +[9]: http://www.damonlynch.net/rapid/index.html +[10]: https://wiki.gnome.org/Apps/Photos +[11]: https://userbase.kde.org/Gwenview +[12]: https://github.com/spillz/picty From 591fa82e100b2efa01677b84465490dd0c70c7db Mon Sep 17 00:00:00 2001 From: mudongliang Date: Sun, 29 May 2016 00:51:52 -0400 Subject: [PATCH 1458/1710] translated --- ...to Best Manage Encryption Keys on Linux.md | 100 +++++++++--------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md index e09f88db3e..b833d94658 100644 --- a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md +++ b/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md @@ -1,110 +1,108 @@ -mudongliang translating -How to Best Manage Encryption Keys on Linux +Linux 如何最好地管理加密密钥 ============================================= ![](http://www.linux.com/images/stories/41373/key-management-diagram.png) -Storing SSH encryption **keys** and memorizing passwords can be a headache. But unfortunately in today's world of malicious hackers and exploits, basic security precautions are an essential practice. For a lot of general users, this amounts to simply memorizing passwords and perhaps finding a good program to store the passwords, as we remind such users not to use the same password for every site. But for those of us in various IT fields, we need to take this up a level. We have to deal with encryption keys such as SSH keys, not just passwords. +存储 SSH 的加密秘钥以及记住密码一直是一个让人头疼的问题。但是不幸的是,在当前充满了恶意黑客和攻击的世界中,基本的安全预警是必不可少的。对于大量的普通用户,它相当于简单地记住密码,也可能寻找一个好程序去存储密码,正如我们提醒这些用户不要在每个网站都有相同的密码。但是对于在各个 IT 领域的我们,我们需要将这个提高一个层次。我们不得不处理加密秘钥,比如 SSH 密钥,而不只是密码。 -Here's a scenario: I have a server running on a cloud that I use for my main git repository. I have multiple computers I work from. All of those computers need to log into that central server to push to and pull from. I have git set up to use SSH. When git uses SSH, git essentially logs into the server in the same way you would if you were to launch a command line into the server with the SSH command. In order to configure everything, I created a config file in my .ssh directory that contains a Host entry providing a name for the server, the host name, the user to log in as, and the path to a key file. I can then test this configuration out by simply typing the command +设想一个场景:我有一个运行在云上的服务器,用于我的主 git 库。我有很多台工作电脑。所有电脑都需要登陆中央服务器去 push 与 pull。我设置 git 使用 SSH。当 git 使用 SSH, git 实际上以相同的方式登陆服务器,就好像你通过 SSH 命令打开一个服务器的命令行。为了配置所有内容,我在我的 .ssh 目录下创建一个配置文件,其中包含一个有服务器名字,主机名,登陆用户,密钥文件的路径的主机项。之后我可以通过输入命令来测试这个配置。 >ssh gitserver -And soon I'm presented with the server's bash shell. Now I can configure git to use this same entry to log in with the stored key. Easy enough, except for one problem: For each computer I use to log into that server, I need to have a key file. That means more than one key file floating around. I have several such keys on this computer, and several such keys on my other computers. In the same way everyday users have a gazillion passwords, it's easy for us IT folks to end up with a gazillion key files. What to do? +很快我得到了服务器的 bash shell。现在我可以配置 git 使用相同项与存储的密钥来登陆服务器。很简单,除了一个问题,对于每一个我用于登陆服务器的电脑,我需要有一个密钥文件。那意味着需要不止一个密钥文件。当前这台电脑和我的其他电脑都存储有这些密钥文件。同样的,用户每天有特大量的密码,对于我们 IT人员,很容易结束这特大量的密钥文件。怎么办呢? -## Cleaning Up +## 清理 -Before starting out with a program to help you manage your keys, you have to lay some groundwork on how your keys should be handled, and whether the questions we're asking even make sense. And that requires first and foremost that you understand where your public keys go and where your private keys go. I'm going to assume you know: +在开始使用程序去帮助你管理你的密钥之前,你不得不在你的密码应该怎么处理和我们问的问题是否有意义这两个方面打下一些基础。同时,这需要第一,也是最重要的,你明白你的公钥和私钥的使用位置。我将设想你知道: + +1. 公钥和私钥之间的差异; -1. The difference between a public key and private key +2. 为什么你不可以从公钥生成私钥,但是你可以逆向生成? -2. Why you can't generate a private key from a public key but you can do the reverse +3. `authorized_keys` 文件的目的以及它的内容; -3. The purpose of the authorized_keys file and what goes in it +4. 你如何使用私钥去登陆服务器,其中服务器上的 `authorized_keys` 文件中存有相应的公钥; -4. How you use private keys to log into a server that has the corresponding public key in its authorized_keys file. +这里有一个例子。当你在亚马逊的网络服务上创建一个云服务器,你必须提供一个 SSH 密码,用于连接你的服务器。每一个密钥有一个公开的部分,和私密的部分。因为你想保持你的服务器安全,乍看之下你可能要将你的私钥放到服务器上,同时你自己带着公钥。毕竟,你不想你的服务器被公开访问,对吗?但是实际上这是逆向的。 -Here's an example. When you create a cloud server on Amazon Web Services, you have to provide an SSH key that you'll use for connecting to your server. Each key has a public part and a private part. Because you want your server to stay secure, at first glance it might seem you put the private key onto that server, and that you take the public key with you. After all, you don't want that server to be publicly accessible, right? But that's actually backwards. +你把自己的公钥放到 AWS 服务器,同时你持有你自己的私钥用于登陆服务器。你保护私钥,同时保持私钥在自己一方,而不是在一些远程服务器上,正如上图中所示。 -You put the public key on the AWS server, and you hold onto your private key for logging into the server. You guard that private key and keep it by your side, not on some remote server, as shown in the figure above. +原因如下:如果公钥公之于众,他们不可以登陆服务器,因为他们没有私钥。进一步说,如果有人成功攻入你的服务器,他们所能找到的只是公钥。你不可以从公钥生成私钥。同时如果你在其他的服务器上使用相同的密钥,他们不可以使用它去登陆别的电脑。 -Here's why: If the public key were to become known to others, they wouldn't be able to log into the server since they don't have the private key. Further, if somebody did manage to break into your server, all they would find is a public key. You can't generate a private key from a public key. And so if you're using that same key on other servers, they wouldn't be able to use it to log into those other computers. +这就是为什么你把你自己的公钥放到你的服务器上以便通过 SSH 登陆这些服务器。你持有这些私钥,不要让这些私钥脱离你的控制。 -And that's why you put your public key on your servers for logging into them through SSH. The private keys stay with you. You don't let those private keys out of your hands. +但是还有麻烦。试想一下我 git 服务器的例子。我要做一些决定。有时我登陆架设在别的地方的开发服务器。在开发服务器上,我需要连接我的 git 服务器。如何使我的开发服务器连接 git 服务器?通过使用私钥。同时这里面还有麻烦。这个场景需要我把私钥放置到一个架设在别的地方的服务器上。这相当危险。 -But there's still trouble. Consider the case of my git server. I had some decisions to make. Sometimes I'm logged into a development server that's hosted elsewhere. While on that dev box, I need to connect to my git server. How can the dev box connect to the git server? By using the private key. And therein lies trouble. This scenario requires I put a private key on a server that is hosted elsewhere, which is potentially dangerous. +一个进一步的场景:如果我要使用一个密钥去登陆许多的服务器,怎么办?如果一个入侵者得到这个私钥,他或她将拥有私钥,并且得到服务器的全部虚拟网络的权限,同时准备做一些严重的破坏。这一点也不好。 -Now a further scenario: What if I were to use a single key to log into multiple servers? If an intruder got hold of this one private key, he or she would have that private key and gain access to the full virtual network of servers, ready to do some serious damage. Not good at all. +同时那当然会带来一个别的问题,我真的应该在这些其他服务器上使用相同的密钥?因为我刚才描述的,那会非常危险的。 -And that, of course, brings up the other question: Should I really use the same key for those other servers? That's could be dangerous because of what I just described. +最后,这听起来有些混乱,但是有一些简单的解决方案。让我们有条理地组织一下: -In the end, this sounds messy, but there are some simple solutions. Let's get organized. +(注意你有很多地方需要密钥登陆服务器,但是我提出这个作为一个场景去向你展示当你处理密钥的时候你面对的问题) -(Note that there are many places you need to use keys besides just logging into servers, but I'm presenting this as one scenario to show you what you're faced with when dealing with keys.) +## 关于口令句 -## Regarding Passphrases +当你创建你的密钥时,你可以选择是否包含一个口令字,这个口令字会在使用私钥的时候是必不可少的。有了这个口令字,私钥文件本身会被口令字加密。例如,如果你有一个公钥存储在服务器上,同时你使用私钥去登陆服务器的时候,你会被提示,输入口令字。没有口令字,这个密钥是无法使用的。或者,你可以配置你的密钥不需要口令字。然后所有你需要的只是用于登陆服务器的密钥文件。 -When you create your keys, you have the option to include a passphrase that is required when using the private key. With this passphrase, the private key file itself is encrypted using the passphrase. For example, if you have a public key stored on a server and you use the private key to log into that server, you'll be prompted to enter a passphrase. Without the passphrase, the key cannot be used. Alternatively, you can configure your key without a passphrase to begin with. Then all you need is the key file to log into the server. +普遍上,不使用口令字对于用户来说是更容易的,但是我强烈建议在很多情况下使用口令字,原因是,如果私钥文件被偷了,偷密钥的人仍然不可以使用它,除非他或者她可以找到口令字。在理论上,这个将节省你很多时间,因为你可以在攻击者发现口令字之前,从服务器上删除公钥文件,从而保护你的系统。还有一些别的原因去使用口令字,但是这个原因对我来说在很多场合更有价值。(举一个例子,我的 Android 平板上有 VNC 软件。平板上有我的密钥。如果我的平板被偷了之后,我会马上从服务器上删除公钥,使得它的私钥没有作用,无论有没有口令字。)但是在一些情况下我不使用口令字,是因为我正在登陆的服务器上没有什么有价值的数据。它取决于情境。 -Generally going without a passphrase is easier on the users, but one reason I strongly recommend using the passphrase in many situations is this: If the private key file gets stolen, the person who steals it still can't use it until he or she is able to find out the passphrase. In theory, this will save you time as you remove the public key from the server before the attacker can discover the passphrase, thus protecting your system. There are other reasons to use a passphrase, but this one alone makes it worth it to me in many situations. (As an example, I have VNC software on an Android tablet. The tablet holds my private key. If my tablet gets stolen, I'll immediately revoke the public key from the server it logs into, rendering its private key useless, with or without the passphrase.) But in some cases I don't use it, because the server I'm logging into might not have much valuable data on it. It depends on the situation. +## 服务器基础设施 -## Server Infrastructure +你如何设置自己服务器的基础设置将会影响到你如何管理你的密钥。例如,如果你有很多用户登陆,你将需要决定每个用户是否需要一个单独的密钥。(普遍来说,他们应该;你不会想要用户之间共享私钥。那样当一个用户离开组织或者失去信任时,你可以删除那个用户的公钥,而不需要必须给其他人生成新的密钥。相似地,通过共享密钥,他们能以其他人的身份登录,这就更坏了。)但是另外一个问题,你如何配置你的服务器。你是否使用工具,比如 Puppet,配置大量的服务器?同时你是否基于你自己的镜像创建大量的服务器?当你复制你的服务器,你是否需要为每个人设置相同的密钥?不同的云服务器软件允许你配置这个;你可以让这些服务器使用相同的密钥,或者给每一个生成一个新的密钥。 -How you design your infrastructure of servers will impact how you manage your keys. For example, if you have multiple users logging in, you'll need to decide whether each user gets a separate key. (Generally speaking, they should; you don't want users sharing private keys. That way if one user leaves the organization or loses trust, you can revoke that user's key without having to generate new keys for everyone else. And similarly, by sharing keys they could log in as each other, which is also bad.) But another issue is how you're allocating your servers. Do you allocate a lot of servers using tools such as Puppet, for example? And do you create multiple servers based on your own images? When you replicate your servers, do you need to have the same key for each? Different cloud server software allows you to configure this how you choose; you can have the servers get the same key, or have a new one generated for each. +如果你在处理复制的服务器,它可能导致混淆如果用户需要使用不同的密钥登陆两个不同的系统。但是另一方面,服务器共享相同的密钥会有安全风险。或者,第三,如果你的密钥有除了登陆之外的需要(比如挂载加密的驱动),之后你会在很多地方需要相同的密钥。正如你所看到的,你是否需要在不同的服务器上使用相同的密钥不是我为你做的决定;这其中有权衡,而且你需要去决定什么是最好的。 -If you're dealing with replicated servers, it can get confusing if the users need to use different keys to log into two different servers that are otherwise similar. But on the other hand, there could be security risks by having the servers share the same keys. Or, on the third hand, if your keys are needed for something other than logging in (such as mounting an encrypted drive), then you would need the same key in multiple places. As you can see, whether you need to use the same keys across different servers is not a decision I can make for you; there are trade offs, and you need to decide for yourself what's best. +最终,你可能会有: -In the end, you're likely to have: +- 需要登录的多个服务器 -- Multiple servers that need to be logged into +- 多个用户登陆不同的服务器,每个都有自己的密钥 -- Multiple users logging into different servers, each with their own key +- 每个用户多个密钥当他们登陆不同的服务器的时候 -- Multiple keys for each user as they log into different servers. +(如果你正在别的情况下使用密钥,相同的普遍概念会应用于如何使用密钥,需要多少密钥,他们是否共享,你如何处理密钥的私密部分和公开部分。) -(If you're using keys in other situations, as you likely are, the same general concepts will apply regarding how keys are used, how many keys are needed, whether they're shared, and how you handle private and public parts of keys.) +## 安全方法 -## Method of safety +知道你的基础设施和独一无二的情况,你需要组合一个密钥管理方案,它会引导你去分发和存储你的密钥。比如,正如我之前提到的,如果我的平板被偷了,我会从我服务器上删除公钥,期望在平板在用于访问服务器。同样的,我会在我的整体计划中考虑以下内容: -Knowing your infrastructure and unique situation, you need to put together a key management plan that will help guide you on how you distribute and store your keys. For example, earlier I mentioned that if my tablet gets stolen, I will revoke the public key from my server, hopefully before the tablet can be used to access the server. As such, I can allow for the following in my overall plan: +1. 移动设备上的私钥没有问题,但是必须包含口令字; -1. Private keys are okay on mobile devices, but they must include a passphrase +2. 必须有一个方法可以快速地从服务器上删除公钥。 -2. There must exist a way to quickly revoke public keys from a server. +在你的情况中,你可能决定,你不想在自己经常登录的系统上使用口令字;比如,这个系统可能是一个开发者一天登录多次的测试机器。这没有问题,但是你需要调整你的规则。你可能添加一条规则,不可以通过移动设备登录机器。换句话说,你需要根据自己的状况构建你的协议,不要假设某个方案放之四海而皆准。 -In your situation, you might decide you just don't want to use passphrases for a system you log into regularly; for example, the system might be a test machine that the developers log into many times a day. That's fine, but then you'll need to adjust your rules a bit. You might include a rule that that machine is not to be logged into from mobile devices. In other words, you need to build your protocols based on your own situation, and not assume one size fits all. +## 软件 -## Software +至于软件,毫不意外,现实世界中并没有很多好的,可用的软件解决方案去存储和管理你的私钥。但是应该有吗?考虑到这个,如果你有一个程序存储你所有服务器的全部密钥,并且这个程序被一个核心密钥锁住,那么你的密钥就真的安全了吗?或者,同样的,如果你的密钥被放置在你的硬盘上,用于 SSH 程序快速访问,那样一个密钥管理软件是否真正提供了任何保护吗? -On to software. Surprisingly, there aren't a lot of good, solid software solutions for storing and managing your private keys. But should there be? Consider this: If you have a program storing all your keys for all your servers, and that program is locked down by a quick password, are your keys really secure? Or, similarly, if your private keys are sitting on your hard drive for quick access by the SSH program, is a key management software really providing any protection? +但是对于整体基础设施和创建,管理公钥,有许多的解决方案。我已经提到了 Puppet。在 Puppet 的世界中,你创建模块来以不同的方式管理你的服务器。这个想法是服务器是动态的,而且不必要准确地复制其他机器。[这里有一个聪明的途径](http://manuel.kiessling.net/2014/03/26/building-manageable-server-infrastructures-with-puppet-part-4/),它在不同的服务器上使用相同的密钥,但是对于每一个用户使用不同的 Puppet 模块。这个方案可能适合你,也可能不适合你。 -But for overall infrastructure and creating and managing public keys, there are some solutions. I already mentioned Puppet. In the Puppet world, you create modules to manage your servers in different ways. The idea is that servers are dynamic and not necessarily exact duplicates of each other. [Here's one clever approach](http://manuel.kiessling.net/2014/03/26/building-manageable-server-infrastructures-with-puppet-part-4/) that uses the same keys on different servers, but uses a different Puppet module for each user. This solution may or may not apply to you. +或者,另一个选项就是完全换挡。在 Docker 的世界中,你可以采取一个不同的方式,正如[关于 SSH 和 Docker 博客](http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/)所描述的。 -Or, another option is to shift gears altogether. In the world of Docker, you can take a different approach, as described in [this blog regarding SSH and Docker](http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/). +但是怎么样管理私钥?如果你搜索,你无法找到很多的软件选择,原因我之前提到过;密钥存放在你的硬盘上,一个管理软件可能无法提到很多额外的安全。但是我确实使用这种方法来管理我的密钥: -But what about managing the private keys? If you search, you're not going to find many software options, for the reasons I mentioned earlier; the private keys are sitting on your hard drive, and a management program might not provide much additional security. But I do manage my keys using this method: +首先,我的 `.ssh/config` 文件中有很多的主机项。我有一个我登陆的主机项,但是有时我对于一个单独的主机有不止一项。如果我有很多登陆,那种情况就会发生。对于架设我的 git 库的服务器,我有两个不同的登陆项;一个限制于 git,另一个为普遍目的的 bash 访问。这个为 git 设置的登陆选项在机器上有极大的限制。还记得我之前说的关于我存在于远程开发机器上的 git 密钥吗?好了。虽然这些密钥可以登陆到我其中一个服务器,但是使用的账号是被严格限制的。 -First, I have multiple Host entries in my .ssh/config file. I have an entry for hosts that I log into, but sometimes I have more than one entry for a single host. That happens if I have multiple logins. I have two different logins for the server hosting my git repository; one is strictly for git, and the other is for general-purpose bash access. The one for git has greatly restricted rights on that machine. Remember what I said earlier about my git keys living on remote development machines? There we go. Although those keys can log into one of my servers, the accounts used are severely limited. +其次,大部分的私钥都包含口令字。(对于处理不得不多次输入口令字的情况,考虑使用 [ssh-agent](http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/)。) - Second, most of these private keys include a passphrase. (For dealing with having to type the passphrase multiple times, considering using [ssh-agent](http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/).) +再次,我确实有许多服务器,我想要更加小心地防御,并且在我 host 文件中并没有这样的项。这更加接近于社交工程方面,因为密钥文件还存在于那里,但是可能需要攻击者花费更长的时间去定位这个密钥文件,分析出来他们攻击的机器。在这些例子中,我只是手动打出来长的 SSH 命令。(这真不怎么坏。) -Third, I do have some servers that I want to guard a bit more carefully, and I don't have an entry into my Host file. This is more a social engineering aspect, because the key files are still present, but it might take an intruder a bit longer to locate the key file and figure out which machine they go with. In those cases, I just type out the long ssh command manually. (It's really not that bad.) +同时你可以看出来我没有使用任何特别的软件去管理这些私钥。 -And you can see that I'm not using any special software to manage these private keys. +## 无放之四海而皆准的方案 -## One Size Doesn't Fit All - -We occasionally get questions at linux.com for advice on good software for managing keys. But let's take a step back. The question actually needs to be re-framed, because there isn't a one-size-fits-all solution. The questions you ask should be based on your own situation. Are you simply trying to find a place to store your key files? Are you looking for a way to manage multiple users each with their own public key that needs to be inserted into the authorized_keys file? - -Throughout this article, I've covered the basics of how all this fits together, and hopefully at this point you'll see that how you manage your keys, and whatever software you look for (if you even need additional software at all), should happen only after you ask the right questions. +我们偶然间收到 linux.com 的问题,关于管理密钥的好软件的建议。但是让我们后退一步。这个问题事实上需要重新定制,因为没有一个普适的解决方案。你问的问题基于你自己的状况。你是否简单地尝试找到一个位置去存储你的密钥文件?你是否寻找一个方法去管理多用户问题,其中每个人都需要将他们自己的公钥插入到 `authorized_keys` 文件中? +通过这篇文章,我已经囊括了基础知识,希望到此你明白如何管理你的密钥,并且,只有当你问了正确的问题,无论你寻找任何软件(甚至你需要另外的软件),它都会出现。 ------------------------------------------------------------------------------ via: http://www.linux.com/learn/tutorials/838235-how-to-best-manage-encryption-keys-on-linux 作者:[Jeff Cogswell][a] -译者:[译者ID](https://github.com/译者ID) +译者:[mudongliang](https://github.com/mudongliang) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 693d7d6082bdcbeb7f30be4c1096bdb0d47fb5ef Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 May 2016 16:01:27 +0800 Subject: [PATCH 1459/1710] =?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 @mudongliang --- .../tech/20160218 How to Best Manage Encryption Keys on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20160218 How to Best Manage Encryption Keys on Linux.md (100%) diff --git a/sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md b/translated/tech/20160218 How to Best Manage Encryption Keys on Linux.md similarity index 100% rename from sources/tech/20160218 How to Best Manage Encryption Keys on Linux.md rename to translated/tech/20160218 How to Best Manage Encryption Keys on Linux.md From 0f7c20db13b8fc60ff40c85c0be816b1e9acb2ca Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 May 2016 16:15:02 +0800 Subject: [PATCH 1460/1710] PUB:20160516 Open source from a recruiter's perspective MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @eriwoon 翻译的不错!文笔流畅,把握准确。 --- ...n source from a recruiter's perspective.md | 50 +++++++++++++++++++ ...n source from a recruiter's perspective.md | 49 ------------------ 2 files changed, 50 insertions(+), 49 deletions(-) create mode 100644 published/20160516 Open source from a recruiter's perspective.md delete mode 100644 translated/talk/20160516 Open source from a recruiter's perspective.md diff --git a/published/20160516 Open source from a recruiter's perspective.md b/published/20160516 Open source from a recruiter's perspective.md new file mode 100644 index 0000000000..31402662e2 --- /dev/null +++ b/published/20160516 Open source from a recruiter's perspective.md @@ -0,0 +1,50 @@ +猎头们怎么看开源 +============================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_workplay.png?itok=uQqFssrf) + +2012 年时候,我出席了一个开源社区的聚会,打那之后我就喜欢上了这个行业。 + +我做猎头很多年,现在我在 [Greythorn][1] 公司专门从事大数据方向招聘。我自己之前学习了几个月大数据,可是当我参加了 [OSCON][2] 开源大会,才发现之前的学习多么低效率。OSCON 里聚集了非常多聪明的人,他们每个人都很愿意分享他们的心得。分享的原因不是他们想推销产品,纯粹是因为喜欢。 + +我很快意识到,与其说开源和大数据是一个行业,不如说他们是一个社区(community)。这也是为什么我现在特别想把我从开源中学到的东西分享给大家,特别是给那些刚刚踏入工作的新人。 + +### 为什么雇主喜欢开源贡献者(contributor) + +我的许多客户跟我说过:一个人的技术虽然重要,但真心**喜欢**自己从事的工作更重要。如果你热爱自己的工作,即便老板不给加班工资你都忍不住想加班。 + +我的客户也经常问,“这个人没事儿的时候写代码吗?”“我能在哪儿找到他们的作品呢?”“他们有什么爱好呀?”这时候开源社区贡献者的优势就出来了,因为上面的问题就是给他们量身定做的。他们做的项目开源,这就是他们编码能力的例证。 + +#### 为什么猎头在寻找开源贡献者 + +硬派科技行业猎头了解技术,知道自己在找一个什么样的人,这样的猎头也能正确的了解对象的技能。我发现,猎头们找到的最优秀的人才很多时候也在做开源,所以我们经常直接去开源社区寻找我们的目标。猎头们会告诉雇主,“我们找到的那个人喜欢和团队一起创造了不起的产品”,而这基本上是优秀雇主共同的要求。 + +所以说:如果你的项目目标是改变人类的未来,那当这些聪明人来到你的团队之后,他们自己就会爱上自己的工作。 + +### 开源贡献者如何得到更好的职业生涯呢 + +怎么让你的贡献更广为人知呢:把代码放到 Github 上;做开源项目;参加会议和研讨等等。做这些事情你会有意想不到的收获的。 + +可以尝试问一下自己: + +* **你觉得所在的公司是否回馈开源社区这件事重要吗?**很多优秀的人才都强调这一点,回馈社区也会极大的提升他们对工作本身的满意度。 +* **你在做产品是否基于开源软件?**基于开源软件的公司的文化氛围会与其他公司与众不同,这也是你选择职位时候需要考虑的问题。 +* **你有没有特别想与之工作的人?**虽然你可以随时换项目,但如果团队里有你崇拜或者欣赏的人,那工作就棒极了。 + +假如你了解自己的人生追求,那么过滤掉那些不适合你的职位就简单多了;假如你有一个相熟的猎头,那找到相合的雇主和团队的机会就大多了。 + +虽然我自己不写代码,但我会把我从开源社区中学到的东西分享给大家。开源社区是由一大群聪明又乐于分享的人组成,我很开心我也是其中小小的一份子。 + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/5/open-source-recruiters-perspective + +作者:[Lindsey Thorne][a] +译者:[eriwoon](https://github.com/eriwoon) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lindsey-thorne +[1]: http://www.greythorn.com/ +[2]: http://conferences.oreilly.com/oscon diff --git a/translated/talk/20160516 Open source from a recruiter's perspective.md b/translated/talk/20160516 Open source from a recruiter's perspective.md deleted file mode 100644 index 200b6ed48c..0000000000 --- a/translated/talk/20160516 Open source from a recruiter's perspective.md +++ /dev/null @@ -1,49 +0,0 @@ -ͷôԴ -============================================ - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_workplay.png?itok=uQqFssrf) - -2012 ʱҳϯһԴľۻᣬ֮Ҿϲҵ - -ͷܶ꣬ [Greythorn][1] ˾רŴ´ݷƸԼ֮ǰѧϰ˼´ݣǵҲμ [OSCON][2] Դᣬŷ֮ǰѧϰôЧʡOSCON ۼ˷dzˣÿ˶ԸǵĵáԭƷΪϲ - -Һܿʶ˵Դʹһҵ˵һcommunityҲΪʲôرҴӿԴѧĶңرǸЩո̤빤ˡ - -### ΪʲôϲԴߣcontributor -ҵͻ˵һ˵ļȻҪϲԼµĹҪȰԼĹϰ岻Ӱ๤㶼̲סӰࡣ - -ҵĿͻҲʣû¶ʱд𣿡ĶҵǵƷأʲôѽʱԴߵƾͳˣΪǸġĿԴǵҲԴ - -#### ΪʲôͷѰҿԴ - -ӲɿƼҵͷ˽⼼֪ԼһʲôˣͷҲȷ˽ļܡҷ֣ͷҵ˲źܶʱҲԴǾֱȥԴѰǵĿꡣͷǻ߹ҵǸϲŶһ˲IJƷͬҪ - -˵ĿĿǸıδǵЩŶ֮ԼͻᰮԼĹ - -### Դεõõְҵ - -ôĹ׸Ϊ֪أѴŵGithubϣԴĿμӻֵȵȡЩ벻ջġ - -ԳһԼ - -* **ڵĹ˾ǷԴҪ**ܶ˲Ŷǿһ㣬ҲἫǶԹȡ -* **ƷǷڿԴ**ڿԴĹ˾ĻΧ˾ڲͬҲѡְλʱҪǵ⡣ -* **ûر֮ˣ**ȻʱĿŶݻ͵ˣǹͰˡ - -˽Լ׷ô˵Щʺְλͼ򵥶ˣһͷҵϵĹŶӵĻʹˡ - -ȻԼд룬һҴӿԴѧĶҡԴһȺڷɣҺܿҲССһӡ - ------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/5/open-source-recruiters-perspective - -ߣ[Lindsey Thorne][a] -ߣ[eriwoon](https://github.com/eriwoon) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -[a]: https://opensource.com/users/lindsey-thorne -[1]: http://www.greythorn.com/ -[2]: http://conferences.oreilly.com/oscon From 2e93258a60db1b6af7436d3de799c11ef611b3a6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 May 2016 17:15:38 +0800 Subject: [PATCH 1461/1710] PUB:20151202 A new Mindcraft moment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zpl1025 这篇翻译的不错,不过我更想将华盛顿邮报那篇长文翻译过来 /cry --- published/20151202 A new Mindcraft moment.md | 46 +++++++++++++++++++ .../tech/20151202 A new Mindcraft moment.md | 43 ----------------- 2 files changed, 46 insertions(+), 43 deletions(-) create mode 100644 published/20151202 A new Mindcraft moment.md delete mode 100644 translated/tech/20151202 A new Mindcraft moment.md diff --git a/published/20151202 A new Mindcraft moment.md b/published/20151202 A new Mindcraft moment.md new file mode 100644 index 0000000000..cfb240e220 --- /dev/null +++ b/published/20151202 A new Mindcraft moment.md @@ -0,0 +1,46 @@ +又一次 Mindcraft 事件? +======================= + +Linux 内核开发很少吸引像华盛顿邮报这样主流媒体的关注,内核社区在安全方面进展的冗长功能列表就更少人看了。所以当[这样一个专题][1]发布到网上,就吸引了很多人的注意(LCTT 译注:华盛顿邮报发表了一篇很长的[专题文章][2],批评 Linux “没有一个系统性的机制以在骇客之前发现和解决安全问题,或引入更新的防御技术”,“Linux 内核开发社区没有一个首席安全官”等等)。关于这篇文章有不同的反应,很多人认为这是对 Linux 直接的攻击。文章背后的动机很难知道,但是从历史经验来看,它也可以看作对我们早就该前进的方向的一次非常必要的推动。 + +回顾一件昏暗遥远过去的事件 - 确切地说是在 1999 年 4 月。一家叫 Mindcraft 的分析公司发布了一份[报告][3]显示 Windows NT 在 Web 服务器开销方面完胜 Red Hat Linux 5.2 加 Apache。Linux 社区,包括当时还[很年轻的 LWN][4],对此反应很迅速而且强烈。这份报告是微软资助的 FUD 的一部分,用来消除那些全球垄断计划的新兴威胁。报告中所用的 Linux 系统有意配置成低性能,同时选择了当时 Linux 并不能很好支持的硬件,等等。 + +在大家稍微冷静一点后,尽管如此,事实很明显:Mindcraft 的人,不管什么动机,说的也有一定道理。当时 Linux 确实在性能方面存在一些已经被充分认识到的问题。然后社区做了最正确的事情:我们坐下来解决问题。比如,单独唤醒的调度器可以解决接受连接请求时的[惊群问题][5]。其他很多小问题也都解决了。在差不多一年里,内核在这类开销方面的性能已经有了非常大的改善。 + +这份 Mindcraft 的报告,某种意义上来说,往 Linux 屁股上踢了很有必要的一脚,推动整个社区去处理一些当时被忽略的事情。 + +华盛顿邮报的文章明显以负面的看法看待 Linux 内核以及它的贡献者。它随意地混淆了内核问题和其他根本不是内核脆弱性引起的问题(比如,AshleyMadison.com 被黑)。不过供应商没什么兴趣为他们的客户提供安全补丁的事实,就像一头在房间里巨象一样明显。还有谣言说这篇文章后面的黑暗势力希望打击一下 Linux 的势头。这些也许都是真的,但是也不能掩盖一个简单的事实,就是文章说的确实是真的。 + +我们会合理地测试并解决问题。而这些问题,不管是不是安全相关,能很快得到修复,然后再通过稳定更新的机制将这些补丁发布给内核用户。比起外面很多应用程序(自由的和商业的),内核的支持工作做的非常好。但是指责我们解决问题的能力时却遗漏了关键的一点:解决安全问题终究来说是一个打鼹鼠游戏。总是会出来更多的鼹鼠,其中有一些在攻击者发现并利用后很长时间我们都还不知道(所以没法使劲打下去)。尽管 Linux 的商业支持已经非常努力地在将补丁传递给用户,这种问题还是会让我们的用户很受伤 - 只是这并不是故意的。 + +关键是只是解决问题并不够,一些关心安全性的开发者也已经开始尝试做些什么。我们必须认识到,缺陷永远都解决不完,所以要让缺陷更难被发现和利用。这意思就是限制访问内核信息,绝对不允许内核执行用户空间内存中的指令,让内核去侦测整形溢出,以及 [Kee Cook 在十月底内核峰会的讲话][6]中所提出的其他所有事情。其中许多技术被其他操作系统深刻理解并采用了;另外一些需要我们去创新。但是,如果我们想充分保护我们的用户免受攻击,这些改变是必须要做的。 + +为什么内核还没有引入这些技术?华盛顿邮报的文章坚定地指责开发社区,特别是 Linus Torvalds。内核社区的传统就是相对安全性更侧重于性能和功能,在需要牺牲性能来改善内核安全性时并不愿意折衷处理。这些指责一定程度上是对的;好的一面是,因为问题的范围变得清晰,态度看上去有所改善。Kee 的演讲都听进去了,而且很明显让开发者开始思考和讨论这些问题了。 + +而被忽略的一点是,并不仅仅是 Linus 在拒绝有用的安全补丁。而是就没有多少这种补丁在内核社区里流传。特别是,在这个领域工作的开发者就那么些人,而且从没有认真地尝试把自己的工作整合到上游。要合并任何大的侵入性补丁,需要和内核社区一起工作,为这些改动编写用例,将改动分割成方便审核的碎片,处理审核意见,等等。整个过程可能会有点无聊而且让人沮丧,但这却是内核维护的运作方式,而且很明显只有这样才能在长时间的开发中形成更有用更可维护的内核。 + +几乎没有人会走这个流程来将最新的安全技术引入内核。对于这类补丁可能收到的不利反应,有人觉得也许会导致“寒蝉效应”,但是这个说法并不充分:不管最初的反应有多麻烦,多年以来开发者已经合并了大量的改动。而少数安全开发者连试都没试过。 + +他们为什么不愿意尝试?一个比较明显的答案是,几乎没有人会因此拿到报酬。几乎所有引入内核的工作都由付费开发者完成,而且已经持续多年。公司能看到利润的领域在内核里都有大量的工作以及很好的进展。而公司觉得和它们没关系的领域就不会这样了。为实时 Linux 的开发找到赞助支持的困难就是很明显的例子。其他领域,比如文档,也在慢慢萧条。安全性很明显也属于这类领域。可能有很多原因导致 Linux 落后于防御式安全技术,但是其中最关键的一条是,靠 Linux 赚钱的公司没有重视这些技术的开发和应用。 + +有迹象显示局面已有所转变。越来越多的开发人员开始关注安全相关问题,尽管对他们工作的商业支持还仍然不够。对于安全相关的改变已经没有之前那样的下意识反应了。像[内核自我保护项目][7]这样,已经开始把现有的安全技术集成进入内核了。 + +我们还有很长的路要走,但是,如果能有一些支持以及正确的观念,短期内就能有很大的进展。内核社区在确定了自己的想法后可以做到很让人惊叹的事情。幸运的是,华盛顿邮报的文章将有助于提供形成这种想法的必要动力。以历史的角度看,我们很可能会把这次事件看作一个转折点,我们最终被倒逼着去完成之前很明确需要做的事情。Linux 不应该再继续讲述这个安全不合格的故事了。 + +--------------------------- + +via: https://lwn.net/Articles/663474/ + +作者:Jonathan Corbet +译者:[zpl1025](https://github.com/zpl1025) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]: https://lwn.net/Articles/663338/ +[2]:http://www.washingtonpost.com/sf/business/2015/11/05/net-of-insecurity-the-kernel-of-the-argument/ +[3]: http://www.mindcraft.com/whitepapers/nts4rhlinux.html +[4]: https://static.lwn.net/1999/features/MindCraft1.0.php3 +[5]: https://en.wikipedia.org/wiki/Thundering_herd_problem +[6]: https://lwn.net/Articles/662219/ +[7]: https://lwn.net/Articles/663361/ \ No newline at end of file diff --git a/translated/tech/20151202 A new Mindcraft moment.md b/translated/tech/20151202 A new Mindcraft moment.md deleted file mode 100644 index 808124dec2..0000000000 --- a/translated/tech/20151202 A new Mindcraft moment.md +++ /dev/null @@ -1,43 +0,0 @@ -又一次 Mindcraft 事件? -======================= - -感谢:Jonathan Corbet - -Linux 内核开发很少吸引像华盛顿邮报这样主流媒体的关注,内核社区在安全方面进展的冗长功能列表就更少人看了。所以当这样一个功能发布到网上,就吸引了很多人的注意。关于这篇文章有不同的反应,很多人认为这是对 Linux 直接的攻击。文章背后的动机很难知道,但是从历史经验来看,它也可以看作对我们早就该前进的方向的一次非常必要的推动。 - -回顾一次在昏暗遥远过去的事件 - 确切地说是 1999 年 4 月。一家叫 Mindcraft 的分析公司发布了一份报告显示 Windows NT 在服务器开销方面完胜 Red Hat Linux 5.2 加 Apache。Linux 社区,包括当时还很年轻的 LWN,的反应很迅速而且强烈。这份报告是微软资助的 FUD 的一部分,用来消除那些全球垄断计划的新兴威胁。报告指出,Linux 系统有意配置成低性能,Linux 不支持当时的很多硬件,等等。 - -在大家稍微冷静一点后,尽管如此,事实很明显:Mindcraft 的人,不管什么动机,说的也有道理。当时 Linux 确实在性能方面存在一些已经被充分认识到的问题。然后社区做了最正确的事情:我们坐下来解决问题。比如,单独唤醒的调度器可以终结接受连接请求时的惊群问题。其他很多小问题也都解决了。在差不多一年里,内核在这类开销方面的性能已经有了非常大的改善。 - -这份 Mindcraft 的报告,某种意义上来说,往 Linux 背后踢了很有必要的一脚,推动整个社区去处理一些当时被忽略的事情。 - -华盛顿邮报的文章明显在鄙视 Linux 内核以及它的贡献者。它随意地混淆了内核问题和其他根本不是内核脆弱性引起的问题(比如,AshleyMadison.com 被黑)。不过供应商没什么兴趣为他们的客户提供安全补丁的事实,就像一头巨象在房间里跳舞一样明显。还有谣言说这篇文章后面的黑暗势力希望打击一下 Linux 的势头。这些也许都是真的,但是也不能掩盖一个简单的事实,就是文章说的确实是真的。 - -我们会合理地测试并解决问题。而问题,不管是不是安全相关,能很快得到修复,然后再通过稳定更新的机制将这些补丁发布给内核用户。比起外面很多应用程序(免费的和付费的),内核的支持非常好。但是指责我们解决问题的能力时却遗漏了关键的一点:解决安全问题最终是一个打鼹鼠游戏。总是会出来更多的鼹鼠,其中有一些在攻击者发现并利用后很长时间我们都还不知道(所以没法使劲打下去)。尽管商业 Linux 已经非常努力地在将补丁传递给用户,这种问题还是会让我们的用户很受伤 - 只是这并不是故意的。 - -关键是只是解决问题并不够,一些关心安全性的开发者也已经开始尝试。我们必须认识到,问题永远都解不完,所以要让问题更难被发现和利用。意思就是限制访问内核信息,绝对不允许内核执行用户空间内存的指令,指示内核侦测整数溢出,以及 Kee Cook 在十月底内核峰会的讲话中所提出的其他所有事情。其中许多技术被其他操作系统深刻理解并采用了;它们的创新也有我们的功劳。但是,如果我们想充分保护我们的用户免受攻击,这些改变是必须要做的。 - -为什么内核还没有引入这些技术?华盛顿邮报的文章坚定地指责开发社区,特别是 Linus Torvalds。内核社区的传统就是相对安全性更侧重于性能和功能,在需要牺牲性能来改善内核安全性时并不愿意折中处理。这些指责一定程度上是对的;好的一面是,因为问题的范围变得清晰,态度看上去有点改善。Kee 的演讲都听进去了,而且很明显让开发者开始思考和讨论这些问题。 - -而被忽略的一点是,并不仅仅是 Linus 在拒绝有用的安全补丁。而是就没有多少这种补丁在内核社区里流传。特别是,在这个领域工作的开发者就那么些人,而且从没有认真地尝试把自己的工作合并到上游。要合并任何大的侵入性补丁,需要和内核社区一起工作,为改动编写用例,将改动分割成方便审核的碎片,处理审核意见,等等。整个过程可能会有点无聊而且让人沮丧,但这却是内核维护的运作方式,而且很明显只有这样才能在长时间的开发中形成更有用更可维护的内核。 - -几乎没有人会走这个流程来将最新的安全技术引入内核。对于这类补丁可能收到的不利反应,有人觉得也许会导致“寒蝉效应”,但是这个说法并不充分:不管最初的反应有多麻烦,多年以来开发者已经合并了大量的改动。而少数安全开发者连试都没试过。 - -他们为什么不愿意尝试?一个比较明显的答案是,几乎没有人会因此拿到报酬。几乎所有引入内核的工作都由付费开发者完成,而且已经持续多年。公司能看到利润的领域在内核里都有大量的工作以及很好的进展。而公司觉得和它们没关系的领域就不会这样了。为实时开发找到赞助支持的困难就是很明显的例子。其他领域,比如文档,也在慢慢萧条。安全性很明显也属于这类领域。可能有很多原因导致 Linux 落后于防御式安全技术,但是其中最关键的一条是,靠 Linux 赚钱的公司没有重视这些技术的开发和应用。 - -有迹象显示局面已有所转变。越来越多的开发人员开始关注安全相关问题,尽管对他们工作的商业支持还仍然不够。对于安全相关的改变已经没有之前那样的下意识反应了。像内核自我保护项目这样,已经开始把现存的安全技术集成进入内核了。 - -我们还有很长的路要走,但是,如果能有一些支持以及正确的思想,短期内能有很大的进展。内核社区在确定了自己的想法后可以做到很让人惊叹的事情。幸运的是,华盛顿邮报的文章将有助于提供形成这种想法的必要动力。在历史的角度上,我们很可能会把这次事件看作一个转折点,我们最终被倒逼着去完成之前很明确需要做的事情。Linux 不应该再继续讲述这个安全不合格的故事了。 - ---------------------------- - -via: https://lwn.net/Articles/663474/ - -作者:Jonathan Corbet - -译者:[zpl1025](https://github.com/zpl1025) - -校对:[校对者ID](https://github.com/校对者ID) - - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d67730971aaf29524caa9b49f97b5842309f1704 Mon Sep 17 00:00:00 2001 From: robot527 Date: Sun, 29 May 2016 21:31:40 +0800 Subject: [PATCH 1462/1710] Translated 20160218 Linux Systems Patched for Critical glibc Flaw (#4014) deleted: sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md new file: translated/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md --- ...Systems Patched for Critical glibc Flaw.md | 52 ------------------- ...Systems Patched for Critical glibc Flaw.md | 50 ++++++++++++++++++ 2 files changed, 50 insertions(+), 52 deletions(-) delete mode 100644 sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md create mode 100644 translated/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md diff --git a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md b/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md deleted file mode 100644 index 18559701b4..0000000000 --- a/sources/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md +++ /dev/null @@ -1,52 +0,0 @@ -robot527 translating - -Linux Systems Patched for Critical glibc Flaw -================================================= - -**Google exposed a critical flaw affecting major Linux distributions. The glibc flaw could have potentially led to remote code execution.** - -Linux users today are scrambling to patch a critical flaw in the core glibc open-source library that could be exposing systems to a remote code execution risk. The glibc vulnerability is identified as CVE-2015-7547 and is titled, "getaddrinfo stack-based buffer overflow." - -The glibc, or GNU C Library, is an open-source implementation of the C and C++ programming language libraries and is part of every major Linux distribution. Google engineers came across the CVE-2015-7547 issue when they were attempting to connect into a certain host system and a segmentation fault (segfault) occurred, causing the connection to crash. Further investigation revealed that glibc was at fault and the crash could potentially achieve an arbitrary remote code execution condition. - -"The glibc DNS client side resolver is vulnerable to a stack-based buffer overflow when the getaddrinfo() library function is used," Google wrote in a blog post. "Software using this function may be exploited with attacker-controlled domain names, attacker-controlled DNS [Domain Name System] servers, or through a man-in-the-middle attack." - -Actually exploiting the CVE-2015-7547 issue is not trivial, but it is possible. To prove that the issue can be exploited, Google has published proof-of-concept (PoC) code on GitHub that demonstrates if an end user or system is vulnerable. - -"The server code triggers the vulnerability and therefore will crash the client code," the GitHub PoC page states. - -Mark Loveless, senior security researcher at Duo Security, explained that the main risk of CVE-2015-7547 is to Linux client-based applications that rely on DNS responses. - -"There are some specific conditions, so not every single application will be impacted, but it appears that several command-line utilities, including the popular SSH [Secure Shell] client could trigger the flaw," Loveless told eWEEK. "We deem this serious mainly because of the existing risks to Linux systems, but also because of the potential for other issues." - -Other issues could potentially include a risk of an email-based attack that triggers the vulnerable glibc getaddrinfo() library call. Also of note is the fact that the vulnerability was in the code for years before it was discovered. - -Google's engineers were not the first or only group to discover the security risk in glibc. The issue was first reported to a glibc bug [tracker](https://sourceware.org/bugzilla/show_bug.cgi?id=1866) on July 13, 2015. The roots of the flaw go back even further with the actual code commit that introduced the flaw first in glibc 2.9, which was released in May 2008. - -Linux vendor Red Hat also independently was looking at the bug in glibc and on Jan. 6, 2016, Google and Red Hat developers confirmed that they had been independently working on the same vulnerability as part of the initial private discussion with upstream glibc maintainers. - -"Once it was confirmed that both teams were working on the same vulnerability, we collaborated on potential fixes, mitigations and regression testing," Florian Weimer, principal software engineer for product security at Red Hat, told eWEEK. "We also worked together to make the test coverage as wide as possible to catch any related problems in the code to help prevent future issues." - -It took years to discover that there was a security issue with the glibc code because that flaw isn't obvious or immediately apparent. - -"To diagnose bugs in a networking component, like a DNS resolver, it is common to look at packet traces which were captured while the issue was encountered," Weimer said. "Such packet captures were not available in this case, so some experimentation was needed to reproduce the exact scenario that triggered the bug." - -Weimer added that once the packet captures were available, considerable effort went into validating the fix, leading to a series of refinements culminating in the regression test suite that was contributed upstream to the glibc project. - -In many cases in Linux, the Security Enhanced Linux (SELinux) mandatory access security controls can mitigate the risk of potential vulnerabilities, but that's not the case with the new glibc issue. - -"The risk is a compromise of important system functionality due to the execution of arbitrary code supplied by an attacker," Weimer said. "A suitable SELinux policy can contain some of the damage an attacker might do and constrain their access to the system, but DNS is used by many applications and system components, so SELinux policies offer only limited containment for this issue." - -Alongside the vulnerability disclosure today, there is now a patch available to mitigate the potential risk of CVE-2015-7547. - ------------------------------------------------------------------------------- - -via: http://www.eweek.com/security/linux-systems-patched-for-critical-glibc-flaw.html - -作者:[Michael Kerner][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://twitter.com/TechJournalist diff --git a/translated/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md b/translated/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md new file mode 100644 index 0000000000..284ac99fa0 --- /dev/null +++ b/translated/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md @@ -0,0 +1,50 @@ +修补 Linux 系统 glibc 严重漏洞 +================================================= + +**谷歌揭露的一个严重漏洞影响主流的 Linux 发行版。glibc 的漏洞可能导致远程代码执行。** + +Linux 用户今天都竞相给一个可以使系统暴露在远程代码执行风险中的核心 glibc 开放源码库的严重漏洞打补丁。glibc 的漏洞被确定为 CVE-2015-7547,题为“getaddrinfo 基于堆栈的缓冲区溢出”。 + +glibc,或 GNU C 库,是一个开放源码的 C 和 C++ 编程语言库的实现,是每一个主流 Linux 发行版的一部分。谷歌工程师们在他们试图连接到某个主机系统时发生了一个段错误导致连接崩溃,偶然发现了 CVE-2015-7547 问题。进一步的研究表明, glibc 有缺陷而且该崩溃可能实现任意远程代码执行的条件。 + +谷歌在一篇博客文章中写道, “当 getaddrinfo() 库函数被使用时,glibc 的 DNS 客户端解析器易受基于堆栈缓冲区溢出的攻击,使用该功能的软件可能被利用为攻击者控制的域名,攻击者控制的 DNS[域名系统] 服务器,或通过中间人攻击。” + +其实利用 CVE-2015-7547 问题并不简单,但它是可能的。为了证明这个问题能被利用,谷歌发布了论证一个终端用户或系统是否易受攻击的概念验证(POC)代码到 GitHub 上。 + +GitHub 上的 POC 网页声明“服务器代码触发漏洞,因此会使客户端代码崩溃”。 + +Duo Security 公司的高级安全研究员 Mark Loveless 解释说 CVE-2015-7547 的主要风险在于 Linux 上依赖于 DNS 响应的基于客户端的应用程序。 + +Loveless 告诉 eWEEK “需要一些特定的条件,所以不是每个应用程序都会受到影响,但似乎一些命令行工具,包括流行的 SSH[安全 Shell] 客户端都可能触发该漏洞,我们认为这是严重的,主要是因为对 Linux 系统存在的风险,但也因为潜在的其他问题。” + +其他问题可能包括一种触发调用易受攻击的 glibc 库 getaddrinfo() 的基于电子邮件攻击的风险。另外值得注意的是,该漏洞被发现之前已存在于代码之中多年。 + +谷歌的工程师不是第一或唯一发现 glibc 中的安全风险的团体。这个问题于 2015 年 7 月 13 日首先被报告给了 glibc 的 bug[跟踪系统](https://sourceware.org/bugzilla/show_bug.cgi?id=1866)。该缺陷的根源可以更进一步追溯到在 2008 五月发布的 glibc 2.9 的代码提交时首次引入缺陷。 + +Linux 厂商红帽也独立找到了 glibc 中的这个 bug,而且在 2016 年 1 月 6 日,谷歌和红帽开发人员证实,他们作为最初与上游 glibc 的维护者私下讨论的部分人员,已经独立在为同一个漏洞工作。 + +红帽产品安全首席软件工程师 Florian Weimer 告诉 eWEEK “一旦确认了两个团队都在为同一个漏洞工作,我们合作进行可能的修复,缓解措施和回归测试,我们还共同努力,使测试覆盖尽可能广,捕捉代码中的任何相关问题,以帮助避免今后更多问题。” + +由于缺陷不明显或不易立即显现,我们花了几年时间才发现 glibc 代码有一个安全问题。 + +Weimer 说“要诊断一个网络组件的漏洞,如 DNS 解析器,当遇到问题时通常要看被抓数据包的踪迹,在这种情况下这样的抓包不适用,所以需要一些实验来重现触发这个 bug 的确切场景。” + +Weimer 补充说,一旦可以抓取数据包,大量精力投入到验证修复程序中,最终导致回归测试套件一系列的改进,有助于上游 glibc 项目。 + +在许多情况下,安全增强式 Linux (SELinux) 的强制访问安全控制可以减少潜在漏洞风险,除了这个 glibc 的新问题。 + +Weimer 说“由于攻击者提供的任意代码的执行,风险是重要系统功能的一个妥协。一个合适的 SELinux 策略可以遏制一些攻击者可能会做的损害,并限制他们访问系统,但是 DNS 被许多应用程序和系统组件使用,所以 SELinux 策略只提供了针对此问题有限的遏制。” + +在揭露漏洞的今天,现在有一个可用的补丁来减少 CVE-2015-7547 的潜在风险。 + +------------------------------------------------------------------------------ + +via: http://www.eweek.com/security/linux-systems-patched-for-critical-glibc-flaw.html + +作者:[Michael Kerner][a] +译者:[robot527](https://github.com/robot527) +校对:[校对者 ID](https://github.com/校对者 ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]:https://twitter.com/TechJournalist From 820066b96f0fc195d6b12e8c6f77e582b9fc38c0 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sun, 29 May 2016 23:56:40 +0800 Subject: [PATCH 1463/1710] =?UTF-8?q?=E5=85=88=E6=8F=90=E4=BA=A4=E5=B7=B2?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E9=83=A8=E5=88=86=EF=BC=8C=E8=A1=A8=E6=98=8E?= =?UTF-8?q?=E8=BF=98=E5=9C=A8=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng and Linux Filesystem Troubleshooting.md | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 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 65a853bc84..199d65957e 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,52 +1,54 @@ -GHLandy Translating +LFCS 第十讲:学习简单的 Shell 脚本编程和文件系统故障排除 -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. +Linux 基金会发起了 LFCS 认证 (Linux Foundation Certified Sysadmin, Linux 基金会认证系统管理员),这是一个全新的认证体系,主要目标是让全世界任何人都有机会考取认证。认证内容为 Linux 中间系统的管理,主要包括:系统运行和服务的维护、全面监控和分析的能力以及问题来临时何时想上游团队请求帮助的决策能力 ![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 +LFCS 系列第十讲 -Check out the following video that guides you an introduction to the Linux Foundation Certification Program. +请看以下视频,这里边介绍了 Linux 基金会认证程序。 注: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. +本讲是系列教程中的第十讲,主要集中讲解简单的 Shell 脚本编程和文件系统故障排除。这两块内容都是 LFCS 认证中的必备考点。 -### Understanding Terminals and Shells ### +### 理解终端 (Terminals) 和 Shell ### -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. +- Shell 是一个程序,它将命令传递给操作系统来执行。 +- Terminal 也是一个程序,作为最终用户,我们需要使用它与 Shell 来交互。比如,下边的图片是 GNOME Terminal。 ![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. +启动 Shell 之后,会呈现一个命令提示符 (也称为命令行) 提示我们 Shell 已经做好了准备,接受标准输入设备输入的命令,这个标准输入设备通常是键盘。 -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. +你可以参考该系列文章的 [第一讲 使用命令创建、编辑和操作文件][1] 来温习一些常用的命令。 -Linux provides a range of options for shells, the following being the most common: +Linux 为提供了许多可以选用的 Shell,下面列出一些常用的: **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. +Bash 代表 Bourne Again Shell,它是 GNU 项目默认的 Shell。它借鉴了 Korn shell (ksh) 和 C shell (csh) 中有用的特性,并同时对性能进行了提升。它同时也是 LFCS 认证中所涵盖的风发行版中默认 Shell,也是本系列教程将使用的 Shell。 **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 +Bash Shell 是一个比较古老的 shell,一次多年来都是多数类 Unix 系统的默认 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. +**ksh 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. +Korn SHell (ksh shell) 也是一个 Unix shell,是贝尔实验室 (Bell Labs) 的 David Korn 在 19 世纪 80 年代初的时候开发的。它兼容 Bourne shell ,并同时包含了 C shell 中的多数特性。 -### Basic Shell Scripting ### + +一个 shell 脚本仅仅只是一个可执行的文本文件,里边包含一条条可执行命令。 + +### 简单的 Shell 脚本编程 ### 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. @@ -292,7 +294,7 @@ If we’re only interested in finding out what’s wrong (without trying to fix 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. @@ -305,7 +307,7 @@ If you have any questions or comments, they are always welcome – so don’t he via: http://www.tecmint.com/linux-basic-shell-scripting-and-linux-filesystem-troubleshooting/ 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GHLandy](https://github.com/GHLandy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 9fac016cc2082bfc90d7ab3961961a31aeef9826 Mon Sep 17 00:00:00 2001 From: Bestony Date: Mon, 30 May 2016 21:06:14 +0800 Subject: [PATCH 1464/1710] Translating by Bestony (#4018) --- sources/tech/20160516 Scaling Collaboration in DevOps.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160516 Scaling Collaboration in DevOps.md b/sources/tech/20160516 Scaling Collaboration in DevOps.md index ea1e193b96..bee9ab5415 100644 --- a/sources/tech/20160516 Scaling Collaboration in DevOps.md +++ b/sources/tech/20160516 Scaling Collaboration in DevOps.md @@ -1,3 +1,4 @@ +Translating by Bestony Scaling Collaboration in DevOps ================================= From 5b09fac9f8c711c0cd4374e4fe920eb040796a27 Mon Sep 17 00:00:00 2001 From: Dongliang Mu Date: Mon, 30 May 2016 09:45:04 -0400 Subject: [PATCH 1465/1710] remove useless line (#4017) --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index cfa5aee47e..e68f260b71 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,6 @@ LCTT的组成 - itsang, - JeffDing, - Yuking-net, - - MikeCoder, - zhangboyue, - liaoishere, From c39fc2017e27c25e78b72b32412819067e3de718 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 30 May 2016 22:08:10 +0800 Subject: [PATCH 1466/1710] =?UTF-8?q?20160530-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...P 2.0 Support for Nginx on Ubuntu 16.04.md | 302 ++++++++++++++++++ 1 file changed, 302 insertions(+) create mode 100644 sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md diff --git a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md new file mode 100644 index 0000000000..e6b143cc00 --- /dev/null +++ b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md @@ -0,0 +1,302 @@ +Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04 +===================================================================================== + + +The LEMP stack is an acronym which represents is a group of packages (Linux OS, Nginx web server, MySQL\MariaDB database and PHP server-side dynamic programming language) which are used to deploy dynamic web applications and web pages. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-Nginx-with-FastCGI-on-Ubuntu-16.04.png) +>Install Nginx with MariaDB 10, PHP 7 and HTTP 2.0 Support on Ubuntu 16.04 + +This tutorial will guide you on how to install a LEMP stack (Nginx with MariaDB and PHP7) on Ubuntu 16.04 server. + +Requirements + +[Installation of Ubuntu 16.04 Server Edition][1] + +### Step 1: Install the Nginx Web Server + +#### 1. Nginx is a modern and resources efficient web server used to display web pages to visitors on the internet. We’ll start by installing Nginx web server from Ubuntu official repositories by using the [apt command line][2]. + +``` +$ sudo apt-get install nginx +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-Nginx-on-Ubuntu-16.04.png) +>Install Nginx on Ubuntu 16.04 + +#### 2. Next, issue the [netstat][3] and [systemctl][4] commands in order to confirm if Nginx is started and binds on port 80. + +``` +$ netstat -tlpn +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Network-Port-Connection.png) +>Check Nginx Network Port Connection + +``` +$ sudo systemctl status nginx.service +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Service-Status.png) +>Check Nginx Service Status + +Once you have the confirmation that the server is started you can open a browser and navigate to your server IP address or DNS record using HTTP protocol in order to visit Nginx default web page. + +``` +http://IP-Address +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Verify-Nginx-Webpage.png) +>Verify Nginx Webpage + +### Step 2: Enable Nginx HTTP/2.0 Protocol + +#### 3. The HTTP/2.0 protocol which is build by default in the latest release of Nginx binaries on Ubuntu 16.04 works only in conjunction with SSL and promises a huge speed improvement in loading web SSL web pages. + +To enable the protocol in Nginx on Ubuntu 16.04, first navigate to Nginx available sites configuration files and backup the default configuration file by issuing the below command. + +``` +$ cd /etc/nginx/sites-available/ +$ sudo mv default default.backup +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Backup-Nginx-Sites-Configuration-File.png) +>Backup Nginx Sites Configuration File + +#### 4. Then, using a text editor create a new default page with the below instructions: + +``` +server { + listen 443 ssl http2 default_server; + listen [::]:443 ssl http2 default_server; + + root /var/www/html; + + index index.html index.htm index.php; + + server_name 192.168.1.13; + + location / { + try_files $uri $uri/ =404; + } + + ssl_certificate /etc/nginx/ssl/nginx.crt; + ssl_certificate_key /etc/nginx/ssl/nginx.key; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; + ssl_dhparam /etc/nginx/ssl/dhparam.pem; + ssl_session_cache shared:SSL:20m; + ssl_session_timeout 180m; + resolver 8.8.8.8 8.8.4.4; + add_header Strict-Transport-Security "max-age=31536000; + #includeSubDomains" always; + + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + } + + location ~ /\.ht { + deny all; + } + +} + +server { + listen 80; + listen [::]:80; + server_name 192.168.1.13; + return 301 https://$server_name$request_uri; +} +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Enable-Nginx-HTTP-2-Protocol.png) +>Enable Nginx HTTP 2 Protocol + +The above configuration snippet enables the use of `HTTP/2.0` by adding the http2 parameter to all SSL listen directives. + +Also, the last part of the excerpt enclosed in server directive is used to redirect all non-SSL traffic to SSL/TLS default host. Also, replace the `server_name` directive to match your own IP address or DNS record (FQDN preferably). + +#### 5. Once you finished editing Nginx default configuration file with the above settings, generate and list the SSL certificate file and key by executing the below commands. + +Fill the certificate with your own custom settings and pay attention to Common Name setting to match your DNS FQDN record or your server IP address that will be used to access the web page. + +``` +$ sudo mkdir /etc/nginx/ssl +$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt +$ ls /etc/nginx/ssl/ +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Generate-SSL-Certificate-and-Key.png) +>Generate SSL Certificate and Key for Nginx + +#### 6. Also, create a strong DH cypher, which was changed on the above configuration file on `ssl_dhparam` instruction line, by issuing the below command: + +``` +$ sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Create-Diffie-Hellman-Key.png) +>Create Diffie-Hellman Key + +#### 7. Once the `Diffie-Hellman` key has been created, verify if Nginx configuration file is correctly written and can be applied by Nginx web server and restart the daemon to reflect changes by running the below commands. + +``` +$ sudo nginx -t +$ sudo systemctl restart nginx.service +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Configuration.png) +>Check Nginx Configuration + +#### 8. In order to test if Nginx uses HTTP/2.0 protocol issue the below command. The presence of `h2` advertised protocol confirms that Nginx has been successfully configured to use HTTP/2.0 protocol. All modern up-to-date browsers should support this protocol by default. + +``` +$ openssl s_client -connect localhost:443 -nextprotoneg '' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Test-Nginx-HTTP-2-Protocol.png) +>Test Nginx HTTP 2.0 Protocol + +### Step 3: Install PHP 7 Interpreter + +Nginx can be used with PHP dynamic processing language interpreter to generate dynamic web content with the help of FastCGI process manager obtained by installing the php-fpm binary package from Ubuntu official repositories. + +#### 9. In order to grab PHP7.0 and the additional packages that will allow PHP to communicate with Nginx web server issue the below command on your server console: + +``` +$ sudo apt install php7.0 php7.0-fpm +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-PHP-7-PHP-FPM-for-Ngin.png) +>Install PHP 7 and PHP-FPM for Ngin + +#### 10. Once the PHP7.0 interpreter has been successfully installed on your machine, start and check php7.0-fpm daemon by issuing the below command: + +``` +$ sudo systemctl start php7.0-fpm +$ sudo systemctl status php7.0-fpm +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Start-Verify-php-fpm-Service.png) +>Start and Verify php-fpm Service + +#### 11. The current configuration file of Nginx is already configured to use PHP FastCGI process manager in order to server dynamic content. + +The server block that enables Nginx to use PHP interpreter is presented on the below excerpt, so no further modifications of default Nginx configuration file are required. + +``` +location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + } +``` + +Below is a screenshot of what instructions you need to uncomment and modify is case of an original Nginx default configuration file. + + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Enable-PHP-FastCGI-for-Nginx.png) +>Enable PHP FastCGI for Nginx + +#### 12. To test Nginx web server relation with PHP FastCGI process manager create a PHP `info.php` test configuration file by issuing the below command and verify the settings by visiting this configuration file using the below address: `http://IP_or domain/info.php`. + +``` +$ sudo su -c 'echo "" |tee /var/www/html/info.php' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Create-PHP-Info-File.png) +>Create PHP Info File + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Verify-PHP-FastCGI-Info.png) +>Verify PHP FastCGI Info + +Also check if HTTP/2.0 protocol is advertised by the server by locating the line `$_SERVER[‘SERVER_PROTOCOL’]` on PHP Variables block as illustrated on the below screenshot. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-HTTP-2.0-Protocol-Info.png) +>Check HTTP 2.0 Protocol Info + +#### 13. In order to install extra PHP7.0 modules use the `apt search php7.0` command to find a PHP module and install it. + +Also, try to install the following PHP modules which can come in handy in case you are planning to [install WordPress][5] or other CMS. + +``` +$ sudo apt install php7.0-mcrypt php7.0-mbstring +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-PHP-7-Modules.png) +>Install PHP 7 Modules + +#### 14. To register the PHP extra modules just restart PHP-FPM daemon by issuing the below command. + +``` +$ sudo systemctl restart php7.0-fpm.service +``` + +### Step 4: Install MariaDB Database + +#### 15. Finally, in order to complete our LEMP stack we need the MariaDB database component to store and manage website data. + +Install MariaDB database management system by running the below command and restart PHP-FPM service in order to use MySQL module to access the database. + +``` +$ sudo apt install mariadb-server mariadb-client php7.0-mysql +$ sudo systemctl restart php7.0-fpm.service +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-MariaDB-for-Nginx.png) +>Install MariaDB for Nginx + +#### 16. To secure the MariaDB installation, run the security script provided by the binary package from Ubuntu repositories which will ask you set a root password, remove anonymous users, disable root login remotely and remove test database. + +Run the script by issuing the below command and answer all questions with yes. Use the below screenshot as a guide. + +``` +$ sudo mysql_secure_installation +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Secure-MariaDB-Installation-for-Nginx.png) +>Secure MariaDB Installation for Nginx + +#### 17. To configure MariaDB so that ordinary users can access the database without system sudo privileges, go to MySQL command line interface with root privileges and run the below commands on MySQL interpreter: + +``` +$ sudo mysql +MariaDB> use mysql; +MariaDB> update user set plugin=’‘ where User=’root’; +MariaDB> flush privileges; +MariaDB> exit +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/MariaDB-User-Permissions.png) +>MariaDB User Permissions + +Finally, login to MariaDB database and run an arbitrary command without root privileges by executing the below command: + +``` +$ mysql -u root -p -e 'show databases' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-MariaDB-Databases.png) +>Check MariaDB Databases + +That’ all! Now you have a **LEMP** stack configured on **Ubuntu 16.04** server that allows you to deploy complex dynamic web applications that can interact with databases. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-nginx-mariadb-php7-http2-on-ubuntu-16-04/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[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/installation-of-ubuntu-16-04-server-edition/ +[2]: http://www.tecmint.com/apt-advanced-package-command-examples-in-ubuntu/ +[3]: http://www.tecmint.com/20-netstat-commands-for-linux-network-management/ +[4]: http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ +[5]: http://www.tecmint.com/install-wordpress-using-lamp-or-lemp-on-rhel-centos-fedora/ From cae29dd5f6ab8ec7891e7fdedb391385852fd947 Mon Sep 17 00:00:00 2001 From: Dongliang Mu Date: Mon, 30 May 2016 11:21:20 -0400 Subject: [PATCH 1467/1710] proofread Linux File Permission (#4019) --- ... Getting to Know Linux File Permissions.md | 68 ++++++++----------- 1 file changed, 28 insertions(+), 40 deletions(-) diff --git a/translated/tech/20160218 Getting to Know Linux File Permissions.md b/translated/tech/20160218 Getting to Know Linux File Permissions.md index b38cef6f32..2730806d61 100644 --- a/translated/tech/20160218 Getting to Know Linux File Permissions.md +++ b/translated/tech/20160218 Getting to Know Linux File Permissions.md @@ -1,16 +1,15 @@ 初识Linux文件权限 ================================================================================ +在 Linux 中最基本的任务之一就是设置文件权限。理解如何实现是你进入 LInux 世界的第一步。如您所料,这一基本操作在类 UNIX 操作系统中大同小异。实际上,Linux 文件权限系统就直接取自于 UNIX 文件权限(甚至使用许多相同的工具)。 + ![](http://www.linux.com/images/stories/66866/files_a.png) -在Linux中最基本的任务就是设置文件权限。理解如何实现是你进入LInux世界的第一步。如您所料,这一基本操作在类UNIX操作系统中大同小异。 -实际上,Linux文件权限系统就直接取自UNIX文件权限(甚至使用许多相同的工具)。 - -但不要以为在学习第二种文件权限系统的时候你需要再次一点一点的学起。事实上会很简单,让我们一起来看看你需要了解哪些内容以及如何使用它们。 +但不要以为理解文件权限需要长时间的学习。事实上会很简单,让我们一起来看看你需要了解哪些内容以及如何使用它们。 ##基础概念 -首先你要知道文件权限适用于什么,如何有效的设置一个分组的权限。当你将其分解,那这个概念就真的简单多了。那到底什么是权限什么是分组呢。 +你要明白的第一件事是文件权限适用于什么。你做的更有效的就是设置一个分组的权限。当你将其分解,那这个概念就真的简单多了。那到底什么是权限,什么是分组呢? 你可以设置的3种权限: @@ -20,32 +19,31 @@ - 执行 — 允许该组执行(运行)文件(用`x`表示) -为了更好的解释为何是应用于一个分组,你可是尝试允许一个分组读和写一个文件,但不能执行。或者你可以允许一个组读和执行一个文件,但不能写。 -甚至你可以允许一组有读、写、执行全部的权限,也可以删除全部权限。 +为了更好地解释这如何应用于一个分组,例如,你允许一个分组读和写一个文件,但不能执行。或者,你可以允许一个组读和执行一个文件,但不能写。甚至你可以允许一组有读、写、执行全部的权限,也可以删除全部权限来剥夺组权限。 -什么是分组呢,有以下4个: +现在,什么是分组呢,有以下4个: - user — 文件实际的拥有者 - group — 用户所在的组 -- others — 用户组内的其他用户 +- others — 用户组外的其他用户 - all — 所有用户 -大多数情况,你只会对前3组进行操作,all这一组只是作为快捷方式(稍后我会解释)。 +大多数情况,你只会对前3组进行操作,`all` 这一组只是作为快捷方式(稍后我会解释)。 到目前为止很简单,对吧?接下来我们将深入一层。 -如果你打开一个终端并运行命令 ls -l ,你将会看到逐行列出当前工作目录下所有的文件和文件夹的列表(如图1). +如果你打开一个终端并运行命令 `ls -l`,你将会看到逐行列出当前工作目录下所有的文件和文件夹的列表(如图1). -你会留意到最左边那列是像·-rw-rw-r--·这样的。 +你会留意到最左边那列是像 `-rw-rw-r--` 这样的。 实际上这列表该这样看的: >rw- rw- r-- -将其分为如下3部分: +正如你所见,列表将其分为如下3部分: - rw- @@ -55,11 +53,11 @@ 权限和组的顺序都很重要,顺序总是: -- 用户 组 其他 — 分组 +- 所属者 所属组 其他人 — 分组 -- 读 写 操作 — 权限 +- 读 写 执行 — 权限 -在我们上面示例的权限列表中,用户拥有读/写权限,用户组拥有读/写权限,其他用户仅拥有读权限。这些分组中赋予执行权限的话,就用一个x表示。 +在我们上面示例的权限列表中,所属者拥有读/写权限,所属组拥有读/写权限,其他人用户仅拥有读权限。这些分组中赋予执行权限的话,就用一个x表示。 ## 等效数值 @@ -75,8 +73,7 @@ >-42-42-4-- -你该把每个分组的数值相加,给用户读和写权限,你该用4 + 2 得到6。给用户组相同的权限,也是使用相同的数值。假如你只想给其他用户读的权限, -那就设置它为4。现在用数只表示为: +你该把每个分组的数值相加,给用户读和写权限,你该用 4 + 2 得到 6。给用户组相同的权限,也是使用相同的数值。假如你只想给其他用户读的权限,那就设置它为4。现在用数值表示为: >664 @@ -84,27 +81,24 @@ >chmod 664 FILENAME -FILENAME处为文件名。 +FILENAME 处为文件名。 ## 更改权限 -既然你已经理解了文件权限,那是时候学习如何更改这些权限了。就是使用chmod命令来实现。第一步你要知道你能否更改文件权限, -你必须是文件的所有者或者有权限编辑文件(或者使用su或sudo进行操作)。正因为这样,你不能随意切换目录和更改文件权限。 +既然你已经理解了文件权限,那是时候学习如何更改这些权限了。就是使用chmod命令来实现。第一步你要知道你能否更改文件权限,你必须是文件的所有者或者有权限编辑文件(或者使用su或sudo进行操作)。正因为这样,你不能随意切换目录和更改文件权限。 - -继续用我们的例子(`-rw-rw-r--`),假设这个文件(命名为script.sh)实际是个shell脚本,需要执行。但是你你只想让自己有权限执行这个脚本。 -这个时候,你可能会想:“我需要是文件的权限如`-rwx-rw-r--`这样来设置`x`”。实际你可以这样使用chmod命令: +继续用我们的例子 (`-rw-rw-r--`)。假设这个文件(命名为 script.sh)实际是个shell脚本,需要被执行,但是你只想让自己有权限执行这个脚本。这个时候,你可能会想:“我需要是文件的权限如 `-rwx-rw-r--`”。为了设置 `x` 权限位,你可以这样使用 `chmod` 命令: >chmod u+x script.sh 这时候,列表中显示的应该是 -rwx-rw-r-- 。 -如果你想同时让用户及其所在组同时拥有执行权限,命令应该这样: +如果你想同时让用户及其所属组同时拥有执行权限,命令应该这样: >chmod ug+x script.sh +明白这是怎么工作的了吗?下面我们让它更有趣些。不管什么原因,你不小心给了所有分组对文件的执行权限(列表中是这样的 `-rwx-rwx-r-x`)。 -明白这是怎么工作的了,下面我们让它更有趣些。不管什么原因,你不小心给了所有分组对文件的执行权限(列表中是这样的 `-rwx-rwx-r-x` )。 如果你想去除其他用户的执行权限,只需运行命令: >chmod o-x script.sh @@ -117,35 +111,29 @@ FILENAME处为文件名。 >chmod a-x script.sh -以上就是所有内容,能使操作更有效率。我希望能避免哪些可能会导致一些问题的操作(例如你不小心对script.sh使用`a-rwx`这样的chmod命令)。 +以上就是所有内容,能使操作更有效率。我希望能避免哪些可能会导致一些问题的操作(例如你不小心对 script.sh 使用 `a-rwx` 这样的chmod命令)。 ## 目录权限 -You can also execute the chmod command on a directory. When you create a new directory as a user, it is typically created with the following permissions: -你也可以对一个目录执行chmod命令,当你创建一个新的目录,通常新建目录具有这样的权限: +你也可以对一个目录执行 `chmod` 命令。当你作为用户创建一个新的目录,通常新建目录具有这样的权限: >drwxrwxr-x -注:开头的d表示这是一个目录。 +注:开头的 `d` 表示这是一个目录。 -正如你所见,用户及其所在组都对文件夹具有操作权限,但这并不意味着在这文件夹中出创建的问价也具有与其相同的权限 -(创建的文件使用默认系统的权限`-rw-rw-r--`)。但如果你想在新文件夹中创建文件,并且移除用户组的写权限, -你不用切换到该目录下并对所有文件使用chmod命令。你可以用加上参数R(意味着递归)的chmod命令,同时更改该文件夹及其目录下所有的文件的权限。 +正如你所见,用户及其所在组都对文件夹具有操作权限,但这并不意味着在这文件夹中出创建的问价也具有与其相同的权限(创建的文件使用默认系统的权限 `-rw-rw-r--`)。但如果你想在新文件夹中创建文件,并且移除用户组的写权限,你不用切换到该目录下并对所有文件使用chmod命令。你可以用加上参数R(意味着递归)的 `chmod` 命令,同时更改该文件夹及其目录下所有的文件的权限。 -现在,假设有一文件夹TEST,里面有一些脚本,所有这些(包括TEST文件夹)拥有权限`-rwxrwxr-x`。如果你想移除用户组的写权限, -你可以运行命令: +现在,假设有一文件夹 TEST,里面有一些脚本,所有这些(包括 TEST 文件夹)拥有权限 `-rwxrwxr-x`。如果你想移除用户组的写权限,你可以运行命令: >chmod -R g-w TEST -运行命令`ls -l`,你讲看到列出的TEST文件夹的权限信息是`drwxr-xr-x`。用户组被去除了写权限(其目录下的所有文件也如此)。 +运行命令 `ls -l`,你讲看到列出的 TEST 文件夹的权限信息是 `drwxr-xr-x`。用户组被去除了写权限(其目录下的所有文件也如此)。 ## 总结 -现在,你应该对基本的Linux文件权限有了深入的理解。对于更高级的东西学起来会很轻松,像setid,setuid和ACLs这些。没有良好的基础, -你很快就会混淆不清概念的。 - -Linux文件权限从早期到现在没有太大变化,而且很可能以后也不会。 +现在,你应该对基本的Linux文件权限有了深入的理解。对于更高级的东西学起来会很轻松,像`setid`,`setuid` 和 `ACLs` 这些。没有良好的基础,你很快就会混淆不清概念的。 +Linux 文件权限从早期到现在没有太大变化,而且很可能以后也不会。 ------------------------------------------------------------------------------ From cf2189c02a83424959740c34a137c2376426c575 Mon Sep 17 00:00:00 2001 From: mudongliang Date: Mon, 30 May 2016 11:41:30 -0400 Subject: [PATCH 1468/1710] proofread add open source experience to your resume --- ...d open source experience to your resume.md | 88 ++++++++++++------- 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/translated/tech/20160225 How to add open source experience to your resume.md b/translated/tech/20160225 How to add open source experience to your resume.md index 234038f878..3a990bc074 100644 --- a/translated/tech/20160225 How to add open source experience to your resume.md +++ b/translated/tech/20160225 How to add open source experience to your resume.md @@ -1,49 +1,75 @@ 怎样将开源经历添加到你的简历中去 ================================================== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/lightning-test.png?itok=aMceg0Vg) -在这篇文章中,我将会分享我的一些方法,目的是让你因为曾经为开源事业作出贡献的经历使得你在技术领域的求职中脱颖而出。 -凡事预则立,不预则废。在你即将进入一个新的领域或者正准备花费整个晚上来彻底完善你的简历之前,先来定义你正在寻找的工作的特征是值得的。你的简历是一张有说服力的作品,因此你必须了解你的观众,从而让它发挥出所有的潜力。看你简历的可能是任何需要你的技能并且恰好能在预算之内聘用你的人。当编辑简历的时候,读一读你的简历上的内容,同时想象一下它们最应该被书写的位置。你看起来像是一个你将会聘用的候选人吗? -在我看来,我发现对于我所要求的目标职位的所有理想候选人,针对他们每个人的特点列出一张清单有时候是很有帮助的。我将他们每个人的特点清单合并到他们的个人经历中,并阅读工作记录,然后以同样的角色询问同事们。人际关系网和会议是很好的地方去寻求一些乐意提供这种建议的人。一些人喜欢谈论他们自己,并且邀请他们去讲述他们自己的故事的一部分来帮助你去拓展你的知识面,通过这样方式可以使每个人感觉更好。当你和其他人谈论他们的职业路线时,你不仅将会明白怎样去得到你想要从事的工作,而且还能知道你应该避免哪些容易让你失去工作机会的情况和行为。 -例如,对于一个差劲的角色,有关于他的关键特性列表可能看起来像下面这样: +在这篇文章中,我将会分享我的技术,让大家利用开源贡献在技术领域的求职中脱颖而出,成为强有力的候选者。 + +凡事预则立,不预则废。在你即将进入一个新的领域或者正准备熬夜彻查你的简历之前,清楚定义你正在寻找的工作的特征是值得的。你的简历是一部有说服力的作品,因此你必须了解你的观众,从而让它发挥出所有的潜力。看你简历的可能是任何需要你的技能并且能在预算之内聘用你的人。当编辑简历的时候,读一读你的简历上的内容,同时想象一下,以他们的角度怎么看待这份简历。你看起来像是一个你将会聘用的候选人吗? + +我个人认为,对于目标职位的理想候选人所表现出来的关键特征,列出一张清单是很有帮助的。我从个人经历,如阅读工作帖、询问相同角色的同事,的组合中收集这个列表。LinkedIn 和会议是很好的地方去寻求一些乐意提供这种建议的人。一些人喜欢谈论他们自己,并且邀请他们去讲述他们自己故事的一部分来帮助你去拓展你的知识面,通过这样方式可以使每个人感觉更好。当你和其他人谈论他们的职业路线时,你不仅将会明白怎样去得到你想要从事的工作,而且还能知道你应该避免那些容易让你失去工作机会的特征或行为。 + +例如,对于一个低级角色,他的关键特征列表可能如下所示: + ###技术: -- 拥有计算机从业方面的经验,更加容易受到Jenkins的青睐。 -- 深厚的脚本编写背景,如Python和Ruby -- 精通eclipse的使用 -- 基本的git和bash知识 + +- 拥有 CI(Continuous Integration) 方面的经验,特别是 Jenkins +- 深厚的脚本编写背景,如 Python 和 Ruby +- 精通 Eclipse IDE +- 基本的 Git 和 Bash 知识 + ###个人而言: + - 自我学习者 -- 良好的交流和文档技巧 +- 良好的交流和文档技 - 在团队开发方面富有经验 -- 精通事件捕捉工作流 +- 精通事件跟踪工作流 (issue tracker workflow) + ###以任意方式应用 -记住,你没有必要为了得到一份工作而去满足上面的工作描述列表中列出的每个标准。工作细节描述了任何人都可以离开这个角色,如果你已经知道你即将签约并为之工作几年的公司的全部信息,并且这份工作并不会让你觉得有什么挑战性,或者要求你去拓展你你的技能。如果你对你无法满足清单上的技能列表而感到紧张,那么检查一下自己是否有来自其他经历并能与之媲美的技能。 -例如,即使有些人从来没有使用过Jenkins,那他也可能从之前使用过Buildbot或者travis CI的项目经验中明白持续集成测试的原则。 -如果你正在申请一家大型公司,而他们可能拥有一个专门的部门和一套完整的筛选过程来确保他们不会聘用任何不能胜任职位的候选人。也就是说,在你求职的过程中,你所能做的只是提交申请,而决定是否拒绝你是公司管理层的工作。不要过早的将工作拒之门外。 -现在你已经知道了你的任务是什么,并且还知道你将需要哪些技能去完成这次面试。下一步要做的取决与你已经获取到的经验。 + +记住,你没有必要为了得到一份工作而去满足上面的工作描述列表中列出的每个标准。 + +工作细节描述了任何人都可以离开这个角色,如果你已经知道你即将签约并为之工作几年的公司的全部信息,并且这份工作并不会让你觉得有什么挑战性,或者要求你去拓展你你的技能。如果你对你无法满足清单上的技能列表而感到紧张,那么检查一下自己是否有来自其他经历并能与之媲美的技能。例如,即使有些人从来没有使用过 Jenkins,那他也可能从之前使用过 Buildbot 或者 travis CI 的项目经验中明白持续集成测试的原则。 + +如果你正在申请一家大型公司,他们可能拥有一个专门的部门和一套完整的筛选过程来确保他们不会聘用任何不能胜任职位的候选人。也就是说,在你求职的过程中,你所能做的只是提交申请,而决定是否拒绝你是公司管理层的工作。不要过早地将工作拒之门外。 + +现在你已经知道了你的任务是什么,并且还知道你需要的技能让面试官印象深刻。下一步要做的取决与你已经获取到的经验。 + ### 制造已经存在的事物之间的关联 -列出一张你过去几年曾经参与过的所有项目。下面是一条快速得到这张清单的方式,生成一个跳转到你的github上的库的导航器,但是需要过滤掉你从其他地方复制过来的项目。除此之外,检查下你的清单上是否有曾经处于领导地位的项目。如果你已经有了一份简历,那么请确保你已经将你所有的经历都列在了上面。 -考虑下任何一个你曾经作为一个潜在的领导经历并拥有过特权的IRC项目。检查你的会唔和聚会并将你曾经组织过或者作为志愿者参与过的事情添加到你的清单上面。略过你前几年的日程并且标注所有志愿行动或者有作为导师的经历又或者有接触过的公共演讲. -现在进入了比较艰难的环节了,将清单上列出的必备技能与个人经历列表上的内容一一对照,我喜欢给工作需要的每个特性用一个字母或者数字作为标记,然后在每一段你经历或参与过并表现出了某一特性的地方标记相同的符号。当你产生怀疑的时候,无论如何也要加上它,尽管这样做更像是在吹嘘,但也好过显示出你的无能。 -在我们写简历的时候常常被这样的情况所困扰,就是我们不愿冒着过分吹嘘自己的技能的风险。这通常会帮助我们重新考虑这个问题,比如我们会考虑那些组织了会晤的人会表现出更好的领导才能和计划技巧吗?而不是当我组织这个会晤的时候我是否展示出了这些技巧。 + +列出一张你过去几年曾经参与过的所有项目。下面是一条快速得到这张清单的方法,跳转到你的 Github profile 中的**库**标签页,并且过滤掉 fork 过来的项目。除此之外,检查下你的清单上是否有曾经处于领导地位的项目。如果你已经有了一份简历,那么请确保你已经将你所有的经历都列在了上面。 + +考虑下任何一个你曾经作为一个潜在的领导经历并拥有过特权的 IRC 频道。检查你的 Meetup 和Eventbrite 账号,并将你曾经组织过或者作为志愿者参与过的活动添加到你的清单上。浏览你前几年的日程并且标注所有志愿服务,或者有作为导师的经历,又或者参与过的公共演讲。 + +现在进入了比较艰难的环节了,将清单上列出的必备技能与个人经历列表上的内容一一对照,我喜欢给工作需要的每个特征用一个字母或者数字作为标记,然后在每一段你经历或参与过并表现出了某一特征的地方标记相同的符号。当你产生怀疑的时候,无论如何也要加上它,尽管这样做更像是在吹嘘,但也好过显示出你的无能。 + +在我们写简历的时候常常被这样的情况所困扰,就是我们不愿冒着过分吹嘘自己的技能的风险。这通常会帮助我们重新考虑这个问题,“我们会考虑那些组织了会晤的人会表现出更好的领导才能和计划技巧吗?”,而不是“当我组织这个会晤的时候我是否展示出了这些技巧?”。 + 如果你已经充分了解了你在过去的几年里的业余时间都是怎么度过的或者你写了很多代码,那么你可能现在正面临着一个令人奇怪的问题,你已经拥有了太多的经验以至于一张纸的简历已经无法容纳下这些经验了。那么,如果那些列在你的清单上的经验无法证明你尝试去表现的任何技能的话,那么请扔掉它们吧。如果这份已经被缩短的简历清单上的内容仍然超过一张单页纸的容量的话,那么将你的经验按照一定的优先级排序,例如根据你获得了相关的故事或丰富的经验与所需的技术。 -在这一方面,显而易见,如果你想要磨练一个独特的技能,那么你就需要一个不错的经历。考虑使用一个类似OpenHatch的问题聚合器,并用它来寻找一个通过使用你从没使用过的工具和技术来锻炼你的技能的开源项目。 -让你的简历更加漂亮 -一份简历是否美观取决于它的简洁度,清晰度和布局。每一段经历都应该通过足够的信息来展示给读者并让他们立刻就能明白为什么你要将它包含进去,而且恰到好处。每种类型的信息都应该使用一致的文档格式来表示,一份含有斜体格式或者右对齐格式的或者其他与整体风格不协调的数据绝对会让看的人十分反感。 -使用工具来给你的简历排版会使之前设定的目标更加容易实现。我喜欢使用LaTeX,因为它 -的宏系统能够使可视化一致性变得更加容易,并且大量的面试官都能一眼就认出他。你的工具的选择可能是LibreOffice或者HTML,这取决于你的技能和你希望怎样去发布你的简历。 -记住一点,一份以数字方式提交的简历可以通过关键字被浏览到。因此,当你需要描述你的工作经历的时候使用和工作招聘告示一样的英文缩写对你的求职会有很大的帮助。为了让你的简历更加容易被面试官所使用,首先就要放上最重要的信息。 -程序员通常难以在为文档排版时量化平衡和布局。我最喜欢的技术是回退并评估我的文档的空格是否处于正确的位置,而这样做的目的就是我的PDF可以全屏显示或者打印出来,然后 -在镜像里面查看它。如果你正在使用LibreOffice Writer,保存一份你的简历的副本,然后将你的简历中的字体换成一种你无法阅读的语言。这两种技术都强制将你从阅读的内容中脱离出来,让你以一种新的方式查看文档的整体布局。他们把你从一个”那句话措辞不当!”对注意到的事物的批评,比如“在这条线上只有一个字,看起来很有趣”。 -最后,再次检查你的简历是否在它将要的展示的多媒体上看起来完全正确。如果你以网页的形式发布它,那么在不同屏幕大小的浏览器中测试它的效果。如果它是一份PDF文档,那么在你的手机或者你的朋友的电脑上面打开它,并确保它所需要的字体都是可用的。 -接下来的步骤 -最后,不要让你辛苦做出来的简历被浪费了,利用你的LinkedIn帐号把它做成一个镜像。当招聘人员找到你的时候也不要感到奇怪。尽管他们描述的工作内容并不是恰好适合你,但是你可以利用他们的时间和兴趣来得到关于你的简历中有哪些地方好与不好的反馈信息。 + +在这一方面,显而易见,如果你想要磨练一个独特的技能,那么你就需要一个不错的经历。考虑使用一个类似 OpenHatch 的问题聚合器,并用它来寻找一个通过使用你从没使用过的工具和技术来锻炼你的技能的开源项目。 + +### 让你的简历更加漂亮 + +一份简历是否美观取决于它的简洁度,清晰度和布局。每一段经历都应该通过足够的信息来展示给读者,并让他们立刻明白为什么你要将它包含进去,而且恰到好处。每种类型的信息都应该使用一致的文档格式来表示,一份含有斜体格式或者右对齐格式的或者其他与整体风格不协调的数据绝对会让人分心。 + +使用工具来给你的简历排版会使之前设定的目标更加容易实现。我喜欢使用 [LaTeX][5],因为它 +的宏系统能够使可视化一致性变得更加容易,并且大量的面试官都能一眼就认出它。你的工具的选择可能是 LibreOffice 或者 HTML,这取决于你的技能和你希望怎样去发布你的简历。 + +记住一点,一份以电子方式提交的简历可以通过关键字被浏览到。因此,当你需要描述你的工作经历的时候使用和工作招聘告示一样的英文缩写对你的求职会有很大的帮助。为了让你的简历更加容易被面试官所使用,首先就要放上最重要的信息。 + +程序员通常难以在为文档排版时量化平衡和布局。我最喜欢的回退和评估我的文档的空格是否处于正确的位置技术,就是全屏显示我的PDF或者打印出来,然后在镜像里面查看它。如果你正在使用 LibreOffice Writer,保存一份你的简历的副本,然后将你的简历中的字体换成一种你无法阅读的语言。这两种技术都强制将你从阅读的内容中脱离出来,让你以一种新的方式查看文档的整体布局。他们把你从一个“那句话措辞不当!”这样的批评到注意到,如“在这条线上只有一个字,看起来很有趣”之类的事情。 + +最后,再次检查你的简历是否在它将要的展示的多媒体上看起来完全正确。如果你以网页的形式发布它,那么在不同屏幕大小的浏览器中测试它的效果。如果它是一份 PDF 文档,那么在你的手机或者你的朋友的电脑上面打开它,并确保它所需要的字体都是可用的。 + +###接下来的步骤 + +最后,不要让你辛苦做出来的简历内容浪费了,利用你的 LinkedIn 帐号把它做成一个镜像(完全使用招聘公告中的流行词),同时当招聘人员找到你的时候也不要感到奇怪。尽管他们描述的工作内容并不是恰好适合你,但是你可以利用他们的时间和兴趣来得到关于你的简历中有哪些地方好与不好的反馈信息。 -------------------------------------------------------------------------------- via: https://opensource.com/business/16/2/add-open-source-to-your-resume 作者:[edunham][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[pengkai](https://github.com/pengkai) +校对:[mudongliang](https://github.com/mudongliang) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 214fd7f68c9e11be432789fa5127530cece0048c Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 31 May 2016 08:19:53 +0800 Subject: [PATCH 1469/1710] PUB:20160301 Linux gives me all the tools I need MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @StdioA 翻译的很好,校对很轻松~ --- .../20160301 Linux gives me all the tools I need.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk/my-open-source-story => published}/20160301 Linux gives me all the tools I need.md (92%) diff --git a/translated/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md b/published/20160301 Linux gives me all the tools I need.md similarity index 92% rename from translated/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md rename to published/20160301 Linux gives me all the tools I need.md index 5c746acab8..0ac2e84c02 100644 --- a/translated/talk/my-open-source-story/20160301 Linux gives me all the tools I need.md +++ b/published/20160301 Linux gives me all the tools I need.md @@ -3,7 +3,7 @@ Linux 给了我所有所需的工具 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/OPENHERE_blue.png?itok=3eqp-7gT) -[Linux][0] 就在我们身边。它以 Android 的形式[存在我们的手机中][1],它[在国际空间站中被使用][2],它[还是互联网的主要支柱][3],可是迄今为止很多人从未留意过它。对 Linux 的探索是一种很有成就感的尝试。很多人都在 Opensource.com [分享过他们与 Linux 的故事][4]。现在,轮到我了。 +[Linux][0] 就在我们身边。它以 Android 的形式[存在我们的手机中][1],它[用在国际空间站中][2],它[还是互联网的主要支柱][3],可是迄今为止很多人从未留意过它。对 Linux 的探索是一种很有成就感的尝试。很多人都在 Opensource.com [分享过他们与 Linux 的故事][4]。现在,轮到我了。 我依然记得我在 2008 年第一次探索 Linux 的时刻。协助我探索 Linux 的人是我的父亲,Socrates Ballais。他是菲律宾塔克洛班的一名经济学专家,也是一个技术狂热者。他教会了我许多计算机技术方面的知识,但只提倡我将 Linux 作为 Windows 崩溃后的备用操作系统。 @@ -36,7 +36,7 @@ via: https://opensource.com/life/16/3/my-linux-story-sean-ballais 作者:[Sean Francis N. Ballais][a] 译者:[StdioA](https://github.com/StdioA) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) [a]: https://opensource.com/users/seanballais [0]: https://opensource.com/resources/what-is-linux From c5e1a5839e836caaf27c50a1961e5278f700d317 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 31 May 2016 09:05:24 +0800 Subject: [PATCH 1470/1710] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E4=B8=AD=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...md => 20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md => 20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md} (100%) diff --git a/translated/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md b/translated/tech/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md similarity index 100% rename from translated/tech/20160514 NODEOS : LINUX DISTRIBUTION FOR NODE LOVERS.md rename to translated/tech/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md From f6c54b796ca0ac211a7fe46adc2d526d650159ac Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 31 May 2016 11:20:54 +0800 Subject: [PATCH 1471/1710] PUB:20160225 How to add open source experience to your resume @pengkai @mudongliang --- ...d open source experience to your resume.md | 83 +++++++++++++++++++ ...d open source experience to your resume.md | 82 ------------------ 2 files changed, 83 insertions(+), 82 deletions(-) create mode 100644 published/20160225 How to add open source experience to your resume.md delete mode 100644 translated/tech/20160225 How to add open source experience to your resume.md diff --git a/published/20160225 How to add open source experience to your resume.md b/published/20160225 How to add open source experience to your resume.md new file mode 100644 index 0000000000..cff9f4c6f1 --- /dev/null +++ b/published/20160225 How to add open source experience to your resume.md @@ -0,0 +1,83 @@ +怎样将开源经历添加到你的简历中去 +================================================== +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/lightning-test.png?itok=aMceg0Vg) + +在这篇文章中,我将会分享我的方法,让大家利用开源贡献在技术领域的求职中脱颖而出,成为强有力的候选者。 + +凡事预则立,不预则废。在你即将进入一个新的领域或者正准备熬夜修订你的简历之前,清楚地定义你正在寻找的工作的特征是值得的。你的简历是一部有说服力的作品,因此你必须了解你的观众,从而让它发挥出所有的潜力。看你简历的可能是任何需要你的技能并且能在预算之内聘用你的人。当编辑简历的时候,读一读你的简历上的内容,同时想象一下,以他们的角度怎么看待这份简历。你看起来像是一个“你”将会聘用的候选人吗? + +我个人认为,对于目标职位的理想候选人所表现出来的关键特征,列出一张清单是很有帮助的。我结合了个人经验、阅读工作招聘信息、询问相同角色的同事等方面来收集这个清单。LinkedIn 和各种会议是寻求一些乐意提供这种建议的人的很好的地方。一些人喜欢谈论他们自己,那么通过邀请他们讲述他们自己的一些故事可以帮助你来拓展你的知识面,这样大家都会感觉很好。当你和其他人谈论他们的职业路线时,你不仅将会明白怎样去得到你想要从事的工作,而且还能知道你应该避免那些容易让你失去工作机会的特征或行为。 + +例如,对于一个不太资深的工作位置来说,关键特征列表可能如下所示: + +###技术方面: + +- 拥有 CI (持续集成) 方面的经验,特别是 Jenkins +- 深厚的脚本编写背景,如 Python 和 Ruby +- 精通 Eclipse IDE +- 基本的 Git 和 Bash 知识 + +###个人而言: + +- 自我驱动的学习者 +- 良好的交流和文档技巧 +- 在团队开发方面富有经验(团队成员) +- 精通事件跟踪的工作流 + +###尽管去申请职位 + +记住,你没有必要为了得到一份工作而去满足上面的工作描述列表中列出的每个标准。 + +工作细节(JD)描述了这个角色,让你一开始就知道你即将签约并为之工作几年的公司的全部信息,并且这份工作并不会让你觉得有什么挑战性,或者要求你去拓展你的技能。如果你对你无法满足清单上的技能列表而感到紧张,那么检查一下自己是否有来自其他方面的经历并能与之媲美的技能。例如,即使有些人从来没有使用过 [Jenkins][1],那他也可能从之前使用过 [Buildbot][2] 或者 [travis CI][3] 的项目经验中明白持续集成测试的原则。 + +如果你正在申请一家大型公司,他们可能拥有一个专门的部门和一套完整的筛选过程来确保他们不会聘用任何不能胜任职位的候选人。也就是说,在你求职的过程中,你所能做的只是提交申请,而决定是否拒绝你是公司管理层的工作。不要过早地将工作拒之门外。 + +现在你已经知道了你的任务是什么,并且还知道你将需要让面试官印象深刻的技巧。下一步要做的取决于你已有的经验。 + +### 制造已经存在的事物之间的关联 + +列出一张你过去几年曾经参与过的所有项目。下面是一条快速得到这张清单的方法,跳转到你的 Github profile 中的**Repositories**标签页,并且过滤掉 fork 过来的项目。除此之外,检查下你的清单上是否有曾经处于领导地位的[Organizations][4]。如果你已经有了一份简历,那么请确保你已经将你所有的经历都列在了上面。 + +考虑下任何一个你曾经作为一个潜在的领导经历并拥有过特权的 IRC 频道。检查下你的 Meetup 和Eventbrite 账号,并将你曾经组织过或者作为志愿者参与过的活动添加到你的清单上。浏览你前几年的日程并且标注所有志愿服务,或者有作为导师的经历,又或者参与过的公共演讲。 + +现在进入了比较艰难的环节了,将清单上列出的必备技能与个人经历列表上的内容一一对照,我喜欢给该工作所需要的每个特征用一个字母或者数字作为标记,然后在每一段你经历或参与过并表现出了某一特征的地方标记相同的符号。当你不太确定的时候,那就毫不犹豫地标记上它,尽管这样做更像是在吹嘘,但也好过显示出你的无能。 + +在我们写简历的时候常常被这样的情况所困扰,就是我们不愿冒着过分吹嘘自己的技能的风险。通常应该这样去想,“那些组织了聚会的人会表现出了更好的领导才能和计划技巧吗?”,而不是“当我组织了这个聚会的时候我是否展示出了这些技巧?”。 + +如果你已经充分了解了你在过去的一两年里的业余时间都是怎么度过的,而且你写了很多代码,那么你可能现在正面临着一个令人奇怪的问题,你已经拥有了太多的经验以至于一张纸的简历已经无法容纳下这些经验了。那么,如果那些列在你的清单上的经验,但无法证明你尝试去表现的任何技能的话,那么请扔掉它们吧。如果这份已经被缩短的简历清单上的内容仍然超过一张单页纸的容量的话,那么将你的经验按照一定的优先级排序,例如根据与所需技术的相关经历或丰富经验。 + +在这一方面,显而易见,如果你想要磨练一个独特的技能,那么你就需要一个不错的经历。考虑使用一个类似 [OpenHatch][7] 的问题聚合器,并用它来寻找一个通过使用你从没使用过的工具和技术来锻炼你的技能的开源项目。 + +### 让你的简历更加漂亮 + +一份简历是否美观取决于它的简洁度、清晰度和布局。每一段经历都应该通过足够的信息来展示给读者,并让他们立刻明白为什么你要将它包含进去,而且恰到好处。每种类型的信息都应该使用一致的文档格式来表示,一份含有斜体格式的日期或者右对齐的或者与整体风格不协调的部分绝对会让人分心。 + +使用工具来给你的简历排版会使之前设定的目标更加容易实现。我喜欢使用 [LaTeX][5],因为它的宏系统能够使可视化一致性变得更加容易,并且大量的面试官都能一眼就认出它。你的工具的选择可能是 [LibreOffice][6] 或者 HTML,这取决于你的技能和你希望怎样去发布你的简历。 + +记住一点,一份以电子方式提交的简历可以通过关键字被浏览到。因此,当你需要描述你的工作经历的时候使用和工作招聘告示一样的英文缩写对你的求职会有很大的帮助。为了让你的简历更加容易被面试官看到,首先就要放上最重要的信息。 + +程序员通常难以在为文档排版时量化平衡和布局。我最喜欢的修改和评估我的文档中的空格是否处于正确位置的技术,就是全屏显示我的 PDF 或者打印出来,然后在镜子里面查看它。如果你正在使用 LibreOffice Writer,保存一份你的简历的副本,然后将你的简历中的字体换成一种你看不懂的语言。这两种技术都强制将你从阅读的内容中脱离出来,让你以一种新的方式查看文档的整体布局。他们把你从一个“那句话措辞不当!”这样的批评转到了注意如“在这行上只有一个字,看起来挺逗”之类的事情。 + +最后,再次检查你的简历是否在它将要的展示的多媒体上看起来完全正确。如果你以网页的形式发布它,那么在不同屏幕大小的浏览器中测试它的效果。如果它是一份 PDF 文档,那么在你的手机或者你的朋友的电脑上打开它,并确保它所需要的字体都是可用的。 + +###接下来的步骤 + +最后,不要让你辛苦做出来的简历内容浪费了,将它完整的复制到你的 LinkedIn 帐号上(完全使用招聘公告中的流行词),然后毫无疑问招聘人员就会找到你了。尽管他们描述的工作内容并不是恰好适合你,但是你可以利用他们的时间和兴趣来得到关于你的简历中有哪些地方好与不好的反馈信息。 + +-------------------------------------------------------------------------------- +via: https://opensource.com/business/16/2/add-open-source-to-your-resume + +作者:[edunham][a] +译者:[pengkai](https://github.com/pengkai) +校对:[mudongliang](https://github.com/mudongliang),[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/edunham +[1]: https://jenkins-ci.org/ +[2]: http://buildbot.net/ +[3]: https://travis-ci.org/ +[4]: https://github.com/settings/organizations +[5]: https://www.latex-project.org/ +[6]: https://www.libreoffice.org/download/libreoffice-fresh/ +[7]: http://openhatch.org/ diff --git a/translated/tech/20160225 How to add open source experience to your resume.md b/translated/tech/20160225 How to add open source experience to your resume.md deleted file mode 100644 index 3a990bc074..0000000000 --- a/translated/tech/20160225 How to add open source experience to your resume.md +++ /dev/null @@ -1,82 +0,0 @@ -怎样将开源经历添加到你的简历中去 -================================================== -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/lightning-test.png?itok=aMceg0Vg) - -在这篇文章中,我将会分享我的技术,让大家利用开源贡献在技术领域的求职中脱颖而出,成为强有力的候选者。 - -凡事预则立,不预则废。在你即将进入一个新的领域或者正准备熬夜彻查你的简历之前,清楚定义你正在寻找的工作的特征是值得的。你的简历是一部有说服力的作品,因此你必须了解你的观众,从而让它发挥出所有的潜力。看你简历的可能是任何需要你的技能并且能在预算之内聘用你的人。当编辑简历的时候,读一读你的简历上的内容,同时想象一下,以他们的角度怎么看待这份简历。你看起来像是一个你将会聘用的候选人吗? - -我个人认为,对于目标职位的理想候选人所表现出来的关键特征,列出一张清单是很有帮助的。我从个人经历,如阅读工作帖、询问相同角色的同事,的组合中收集这个列表。LinkedIn 和会议是很好的地方去寻求一些乐意提供这种建议的人。一些人喜欢谈论他们自己,并且邀请他们去讲述他们自己故事的一部分来帮助你去拓展你的知识面,通过这样方式可以使每个人感觉更好。当你和其他人谈论他们的职业路线时,你不仅将会明白怎样去得到你想要从事的工作,而且还能知道你应该避免那些容易让你失去工作机会的特征或行为。 - -例如,对于一个低级角色,他的关键特征列表可能如下所示: - -###技术: - -- 拥有 CI(Continuous Integration) 方面的经验,特别是 Jenkins -- 深厚的脚本编写背景,如 Python 和 Ruby -- 精通 Eclipse IDE -- 基本的 Git 和 Bash 知识 - -###个人而言: - -- 自我学习者 -- 良好的交流和文档技 -- 在团队开发方面富有经验 -- 精通事件跟踪工作流 (issue tracker workflow) - -###以任意方式应用 - -记住,你没有必要为了得到一份工作而去满足上面的工作描述列表中列出的每个标准。 - -工作细节描述了任何人都可以离开这个角色,如果你已经知道你即将签约并为之工作几年的公司的全部信息,并且这份工作并不会让你觉得有什么挑战性,或者要求你去拓展你你的技能。如果你对你无法满足清单上的技能列表而感到紧张,那么检查一下自己是否有来自其他经历并能与之媲美的技能。例如,即使有些人从来没有使用过 Jenkins,那他也可能从之前使用过 Buildbot 或者 travis CI 的项目经验中明白持续集成测试的原则。 - -如果你正在申请一家大型公司,他们可能拥有一个专门的部门和一套完整的筛选过程来确保他们不会聘用任何不能胜任职位的候选人。也就是说,在你求职的过程中,你所能做的只是提交申请,而决定是否拒绝你是公司管理层的工作。不要过早地将工作拒之门外。 - -现在你已经知道了你的任务是什么,并且还知道你需要的技能让面试官印象深刻。下一步要做的取决与你已经获取到的经验。 - -### 制造已经存在的事物之间的关联 - -列出一张你过去几年曾经参与过的所有项目。下面是一条快速得到这张清单的方法,跳转到你的 Github profile 中的**库**标签页,并且过滤掉 fork 过来的项目。除此之外,检查下你的清单上是否有曾经处于领导地位的项目。如果你已经有了一份简历,那么请确保你已经将你所有的经历都列在了上面。 - -考虑下任何一个你曾经作为一个潜在的领导经历并拥有过特权的 IRC 频道。检查你的 Meetup 和Eventbrite 账号,并将你曾经组织过或者作为志愿者参与过的活动添加到你的清单上。浏览你前几年的日程并且标注所有志愿服务,或者有作为导师的经历,又或者参与过的公共演讲。 - -现在进入了比较艰难的环节了,将清单上列出的必备技能与个人经历列表上的内容一一对照,我喜欢给工作需要的每个特征用一个字母或者数字作为标记,然后在每一段你经历或参与过并表现出了某一特征的地方标记相同的符号。当你产生怀疑的时候,无论如何也要加上它,尽管这样做更像是在吹嘘,但也好过显示出你的无能。 - -在我们写简历的时候常常被这样的情况所困扰,就是我们不愿冒着过分吹嘘自己的技能的风险。这通常会帮助我们重新考虑这个问题,“我们会考虑那些组织了会晤的人会表现出更好的领导才能和计划技巧吗?”,而不是“当我组织这个会晤的时候我是否展示出了这些技巧?”。 - -如果你已经充分了解了你在过去的几年里的业余时间都是怎么度过的或者你写了很多代码,那么你可能现在正面临着一个令人奇怪的问题,你已经拥有了太多的经验以至于一张纸的简历已经无法容纳下这些经验了。那么,如果那些列在你的清单上的经验无法证明你尝试去表现的任何技能的话,那么请扔掉它们吧。如果这份已经被缩短的简历清单上的内容仍然超过一张单页纸的容量的话,那么将你的经验按照一定的优先级排序,例如根据你获得了相关的故事或丰富的经验与所需的技术。 - -在这一方面,显而易见,如果你想要磨练一个独特的技能,那么你就需要一个不错的经历。考虑使用一个类似 OpenHatch 的问题聚合器,并用它来寻找一个通过使用你从没使用过的工具和技术来锻炼你的技能的开源项目。 - -### 让你的简历更加漂亮 - -一份简历是否美观取决于它的简洁度,清晰度和布局。每一段经历都应该通过足够的信息来展示给读者,并让他们立刻明白为什么你要将它包含进去,而且恰到好处。每种类型的信息都应该使用一致的文档格式来表示,一份含有斜体格式或者右对齐格式的或者其他与整体风格不协调的数据绝对会让人分心。 - -使用工具来给你的简历排版会使之前设定的目标更加容易实现。我喜欢使用 [LaTeX][5],因为它 -的宏系统能够使可视化一致性变得更加容易,并且大量的面试官都能一眼就认出它。你的工具的选择可能是 LibreOffice 或者 HTML,这取决于你的技能和你希望怎样去发布你的简历。 - -记住一点,一份以电子方式提交的简历可以通过关键字被浏览到。因此,当你需要描述你的工作经历的时候使用和工作招聘告示一样的英文缩写对你的求职会有很大的帮助。为了让你的简历更加容易被面试官所使用,首先就要放上最重要的信息。 - -程序员通常难以在为文档排版时量化平衡和布局。我最喜欢的回退和评估我的文档的空格是否处于正确的位置技术,就是全屏显示我的PDF或者打印出来,然后在镜像里面查看它。如果你正在使用 LibreOffice Writer,保存一份你的简历的副本,然后将你的简历中的字体换成一种你无法阅读的语言。这两种技术都强制将你从阅读的内容中脱离出来,让你以一种新的方式查看文档的整体布局。他们把你从一个“那句话措辞不当!”这样的批评到注意到,如“在这条线上只有一个字,看起来很有趣”之类的事情。 - -最后,再次检查你的简历是否在它将要的展示的多媒体上看起来完全正确。如果你以网页的形式发布它,那么在不同屏幕大小的浏览器中测试它的效果。如果它是一份 PDF 文档,那么在你的手机或者你的朋友的电脑上面打开它,并确保它所需要的字体都是可用的。 - -###接下来的步骤 - -最后,不要让你辛苦做出来的简历内容浪费了,利用你的 LinkedIn 帐号把它做成一个镜像(完全使用招聘公告中的流行词),同时当招聘人员找到你的时候也不要感到奇怪。尽管他们描述的工作内容并不是恰好适合你,但是你可以利用他们的时间和兴趣来得到关于你的简历中有哪些地方好与不好的反馈信息。 --------------------------------------------------------------------------------- -via: https://opensource.com/business/16/2/add-open-source-to-your-resume - -作者:[edunham][a] -译者:[pengkai](https://github.com/pengkai) -校对:[mudongliang](https://github.com/mudongliang) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/edunham -[1]: https://jenkins-ci.org/ -[2]: http://buildbot.net/ -[3]: https://travis-ci.org/ -[4]: https://github.com/settings/organizations -[5]: https://www.latex-project.org/ -[6]: https://www.libreoffice.org/download/libreoffice-fresh/ From f4fff4818befcf07d58d292041a57cd761b98306 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 31 May 2016 12:49:07 +0800 Subject: [PATCH 1472/1710] =?UTF-8?q?20160531-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 USE WEBP IMAGES IN UBUNTU LINUX.md | 180 ++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md diff --git a/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md b/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md new file mode 100644 index 0000000000..45cc53157e --- /dev/null +++ b/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md @@ -0,0 +1,180 @@ +HOW TO USE WEBP IMAGES IN UBUNTU LINUX +========================================= + +![](http://itsfoss.com/wp-content/uploads/2016/05/support-webp-ubuntu-linux.jpg) +>Brief: This guide shows you how to view WebP images in Linux and how to convert WebP images to JPEG or PNG format. + +###WHAT IS WEBP? + +It’s been over five years since Google introduced [WebP file format][0] for images. WebP provides lossy and lossless compression and WebP compressed files are around 25% smaller in size when compared to JPEG compression, Google claims. + +Google aimed WebP to become the new standard for images on the web but I don’t see it happening. It’s over five years and it’s still not adopted as a standard except in Google’s ecosystem. But as we know, Google is pushy about its technologies. Few months back Google changed all the images on Google Plus to WebP. + +If you download those images from Google Plus using Google Chrome, you’ll have WebP images, no matter if you had uploaded PNG or JPEG. And that’s not the problem. The actual problem is when you try to open that files in Ubuntu using the default GNOME Image Viewer and you see this error: + +>**Could not find XYZ.webp** +>**Unrecognized image file format** + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-1.png) +>GNOME Image Viewer doesn’t support WebP images + +In this tutorial, we shall see + +- how to add WebP support in Linux +- list of programs that support WebP images +- how to convert WebP images to PNG or JPEG +- how to download WebP images directly as PNG images + +### HOW TO VIEW WEBP IMAGES IN UBUNTU AND OTHER LINUX + +[GNOME Image Viewer][3], the default image viewer in many Linux distributions including Ubuntu, doesn’t support WebP images. There are no plugins available at present that could enable GNOME Image Viewer to add WebP support. + +This means that we simply cannot use GNOME Image Viewer to open WebP files in Linux. A better alternative is [gThumb][4] that supports WebP images by default. + +To install gThumb in Ubuntu and other Ubuntu based Linux distributions, use the command below: + +``` +sudo apt-get install gthumb +``` + +Once installed, you can simply rightly click on the WebP image and select gThumb to open it. You should be able to see it now: + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-2.jpeg) +>WebP image in gThumb + +### MAKE GTHUMB THE DEFAULT APPLICATION FOR WEBP IMAGES IN UBUNTU + +For Ubuntu beginners, if you like to make gThumb the default application for opening WebP files, just follow the steps below: + +#### Step 1: Right click on the WebP image and select Properties. + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-3.png) +>Select Properties from Right Click menu + +#### Step 2: Go to Open With tab, select gThumb and click on Set as default. + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-4.png) +>Make gThumb the default application for WebP images in Ubuntu + +### MAKE GTHUMB THE DEFAULT APPLICATIONS FOR ALL IMAGES + +gThumb has a lot more to offer than Image Viewer. For example, you can do simple editing, add color filters to the images etc. Adding the filter is not as effective as XnRetro, the dedicated tool for [adding Instagram like effects on Linux][5], but the basic filters are available. + +I liked gThumb a lot and decided to make it the default image viewer. If you also want to make gThumb the default application for all kind of images in Ubuntu, follow the steps below: + +####Step 1: Open System Settings + +![](http://itsfoss.com/wp-content/uploads/2014/04/System_Settings_ubuntu_1404.jpeg) + +#### Step 2: Go to Details. + +![](http://itsfoss.com/wp-content/uploads/2013/11/System_settings_Ubuntu_1.jpeg) + +#### Step 3: Select gThumb as the default applications for images here. + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-5.png) + +### ALTERNATIVE PROGRAMS TO OPEN WEBP FILES IN LINUX + +It is possible that you might not like gThumb. If that’s the case, you can choose one of the following applications to view WebP images in Linux: + +- [XnView][6] (Not open source) +- GIMP with unofficial WebP plugin that can be installed via this [PPA][7] that is available until Ubuntu 15.10. I’ll cover this part in another article. +- [Gwenview][8] + +### CONVERT WEBP IMAGES TO PNG AND JPEG IN LINUX + +There are two ways to convert WebP images in Linux: + +- Command line +- GUI + +#### 1. USING COMMAND LINE TO CONVERT WEBP IMAGES IN LINUX + +You need to install WebP tools first. Open a terminal and use the following command: + +``` +sudo apt-get install webp +``` + +##### CONVERT JPEG/PNG TO WEBP + +We’ll use cwebp command (does it mean compress to WebP?) to convert JPEG or PNG files to WebP. The command format is like: + +``` +cwebp -q [image_quality] [JPEG/PNG_filename] -o [WebP_filename] +``` + +For example, you can use the following command: + +``` +cwebp -q 90 example.jpeg -o example.webp +``` + +##### CONVERT WEBP TO JPEG/PNG + +To convert WebP images to JPEG or PNG, we’ll use dwebp command. The command format is: + +``` +dwebp [WebP_filename] -o [PNG_filename] +``` + +An example of this command could be: + +``` +dwebp example.webp -o example.png +``` + +#### 2. USING GUI TOOL TO CONVERT WEBP TO JPEG/PNG + +For this purpose, we will use XnConvert which is a free but not open source application. You can download the installer files from their website: + +[Download XnConvert][1] + +Note that XnConvert is a powerful tool that you can use for batch resizing images. However, in this tutorial, we shall only see how to convert a single WebP image to PNG/JPEG. + +Open XnConvert and select the input file: + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-6.jpeg) + +In the Output tab, select the output format you want it to be converted. Once you have selected the output format, click on Convert. + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-7.jpeg) + +That’s all you need to do to convert WebP images to PNG, JPEg or any other image format of your choice. + +### DOWNLOAD WEBP IMAGES AS PNG DIRECTLY IN CHROME WEB BROWSER + +Probably you don’t like WebP image format at all and you don’t want to install a new software just to view WebP images in Linux. It will be a bigger pain if you have to convert the WebP file for future use. + +An easier and less painful way to deal with is to install a Chrome extension Save Image as PNG. With this extension, you can simply right click on a WebP image and save it as PNG directly. + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-8.png) +>Saving WebP image as PNG in Google Chrome + +[Get Save Image as PNG extension][2] + +### WHAT’S YOUR PICK? + +I hope this detailed tutorial helped you to get WebP support on Linux and helped you to convert WebP images. How do you handle WebP images in Linux? Which tool do you use? From the above described methods, which one did you like the most? + + +---------------------- +via: http://itsfoss.com/webp-ubuntu-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Abhishek Prakash][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/ +[0]: https://developers.google.com/speed/webp/ +[1]: http://www.xnview.com/en/xnconvert/#downloads +[2]: https://chrome.google.com/webstore/detail/save-image-as-png/nkokmeaibnajheohncaamjggkanfbphi?utm_source=chrome-ntp-icon +[3]: https://wiki.gnome.org/Apps/EyeOfGnome +[4]: https://wiki.gnome.org/Apps/gthumb +[5]: http://itsfoss.com/add-instagram-effects-xnretro-ubuntu-linux/ +[6]: http://www.xnview.com/en/xnviewmp/#downloads +[7]: https://launchpad.net/~george-edison55/+archive/ubuntu/webp +[8]: https://userbase.kde.org/Gwenview From 46a0239c4d723091d4bfd49f947a52c93531ac55 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 31 May 2016 21:15:02 +0800 Subject: [PATCH 1473/1710] Update 20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md --- ... 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md index e6b143cc00..ef713fff0f 100644 --- a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md +++ b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md @@ -1,3 +1,5 @@ +Translating by strugglingyouth + Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04 ===================================================================================== From d094d2c9874de5b047a69481e664b658d1ec2269 Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 2 Jun 2016 12:08:22 +0800 Subject: [PATCH 1474/1710] [translating]HOW TO USE WEBP IMAGES IN UBUNTU LINUX --- sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md b/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md index 45cc53157e..0012c5ca51 100644 --- a/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md +++ b/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md @@ -1,3 +1,5 @@ +alim0x translating + HOW TO USE WEBP IMAGES IN UBUNTU LINUX ========================================= From cd6058f5bdb9bbb595cbfc4f3c28480e41236c00 Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 2 Jun 2016 20:51:48 +0800 Subject: [PATCH 1475/1710] [translated]HOW TO USE WEBP IMAGES IN UBUNTU LINUX --- ... HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md | 182 ------------------ ... HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md | 181 +++++++++++++++++ 2 files changed, 181 insertions(+), 182 deletions(-) delete mode 100644 sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md create mode 100644 translated/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md diff --git a/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md b/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md deleted file mode 100644 index 0012c5ca51..0000000000 --- a/sources/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md +++ /dev/null @@ -1,182 +0,0 @@ -alim0x translating - -HOW TO USE WEBP IMAGES IN UBUNTU LINUX -========================================= - -![](http://itsfoss.com/wp-content/uploads/2016/05/support-webp-ubuntu-linux.jpg) ->Brief: This guide shows you how to view WebP images in Linux and how to convert WebP images to JPEG or PNG format. - -###WHAT IS WEBP? - -It’s been over five years since Google introduced [WebP file format][0] for images. WebP provides lossy and lossless compression and WebP compressed files are around 25% smaller in size when compared to JPEG compression, Google claims. - -Google aimed WebP to become the new standard for images on the web but I don’t see it happening. It’s over five years and it’s still not adopted as a standard except in Google’s ecosystem. But as we know, Google is pushy about its technologies. Few months back Google changed all the images on Google Plus to WebP. - -If you download those images from Google Plus using Google Chrome, you’ll have WebP images, no matter if you had uploaded PNG or JPEG. And that’s not the problem. The actual problem is when you try to open that files in Ubuntu using the default GNOME Image Viewer and you see this error: - ->**Could not find XYZ.webp** ->**Unrecognized image file format** - -![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-1.png) ->GNOME Image Viewer doesn’t support WebP images - -In this tutorial, we shall see - -- how to add WebP support in Linux -- list of programs that support WebP images -- how to convert WebP images to PNG or JPEG -- how to download WebP images directly as PNG images - -### HOW TO VIEW WEBP IMAGES IN UBUNTU AND OTHER LINUX - -[GNOME Image Viewer][3], the default image viewer in many Linux distributions including Ubuntu, doesn’t support WebP images. There are no plugins available at present that could enable GNOME Image Viewer to add WebP support. - -This means that we simply cannot use GNOME Image Viewer to open WebP files in Linux. A better alternative is [gThumb][4] that supports WebP images by default. - -To install gThumb in Ubuntu and other Ubuntu based Linux distributions, use the command below: - -``` -sudo apt-get install gthumb -``` - -Once installed, you can simply rightly click on the WebP image and select gThumb to open it. You should be able to see it now: - -![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-2.jpeg) ->WebP image in gThumb - -### MAKE GTHUMB THE DEFAULT APPLICATION FOR WEBP IMAGES IN UBUNTU - -For Ubuntu beginners, if you like to make gThumb the default application for opening WebP files, just follow the steps below: - -#### Step 1: Right click on the WebP image and select Properties. - -![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-3.png) ->Select Properties from Right Click menu - -#### Step 2: Go to Open With tab, select gThumb and click on Set as default. - -![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-4.png) ->Make gThumb the default application for WebP images in Ubuntu - -### MAKE GTHUMB THE DEFAULT APPLICATIONS FOR ALL IMAGES - -gThumb has a lot more to offer than Image Viewer. For example, you can do simple editing, add color filters to the images etc. Adding the filter is not as effective as XnRetro, the dedicated tool for [adding Instagram like effects on Linux][5], but the basic filters are available. - -I liked gThumb a lot and decided to make it the default image viewer. If you also want to make gThumb the default application for all kind of images in Ubuntu, follow the steps below: - -####Step 1: Open System Settings - -![](http://itsfoss.com/wp-content/uploads/2014/04/System_Settings_ubuntu_1404.jpeg) - -#### Step 2: Go to Details. - -![](http://itsfoss.com/wp-content/uploads/2013/11/System_settings_Ubuntu_1.jpeg) - -#### Step 3: Select gThumb as the default applications for images here. - -![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-5.png) - -### ALTERNATIVE PROGRAMS TO OPEN WEBP FILES IN LINUX - -It is possible that you might not like gThumb. If that’s the case, you can choose one of the following applications to view WebP images in Linux: - -- [XnView][6] (Not open source) -- GIMP with unofficial WebP plugin that can be installed via this [PPA][7] that is available until Ubuntu 15.10. I’ll cover this part in another article. -- [Gwenview][8] - -### CONVERT WEBP IMAGES TO PNG AND JPEG IN LINUX - -There are two ways to convert WebP images in Linux: - -- Command line -- GUI - -#### 1. USING COMMAND LINE TO CONVERT WEBP IMAGES IN LINUX - -You need to install WebP tools first. Open a terminal and use the following command: - -``` -sudo apt-get install webp -``` - -##### CONVERT JPEG/PNG TO WEBP - -We’ll use cwebp command (does it mean compress to WebP?) to convert JPEG or PNG files to WebP. The command format is like: - -``` -cwebp -q [image_quality] [JPEG/PNG_filename] -o [WebP_filename] -``` - -For example, you can use the following command: - -``` -cwebp -q 90 example.jpeg -o example.webp -``` - -##### CONVERT WEBP TO JPEG/PNG - -To convert WebP images to JPEG or PNG, we’ll use dwebp command. The command format is: - -``` -dwebp [WebP_filename] -o [PNG_filename] -``` - -An example of this command could be: - -``` -dwebp example.webp -o example.png -``` - -#### 2. USING GUI TOOL TO CONVERT WEBP TO JPEG/PNG - -For this purpose, we will use XnConvert which is a free but not open source application. You can download the installer files from their website: - -[Download XnConvert][1] - -Note that XnConvert is a powerful tool that you can use for batch resizing images. However, in this tutorial, we shall only see how to convert a single WebP image to PNG/JPEG. - -Open XnConvert and select the input file: - -![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-6.jpeg) - -In the Output tab, select the output format you want it to be converted. Once you have selected the output format, click on Convert. - -![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-7.jpeg) - -That’s all you need to do to convert WebP images to PNG, JPEg or any other image format of your choice. - -### DOWNLOAD WEBP IMAGES AS PNG DIRECTLY IN CHROME WEB BROWSER - -Probably you don’t like WebP image format at all and you don’t want to install a new software just to view WebP images in Linux. It will be a bigger pain if you have to convert the WebP file for future use. - -An easier and less painful way to deal with is to install a Chrome extension Save Image as PNG. With this extension, you can simply right click on a WebP image and save it as PNG directly. - -![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-8.png) ->Saving WebP image as PNG in Google Chrome - -[Get Save Image as PNG extension][2] - -### WHAT’S YOUR PICK? - -I hope this detailed tutorial helped you to get WebP support on Linux and helped you to convert WebP images. How do you handle WebP images in Linux? Which tool do you use? From the above described methods, which one did you like the most? - - ----------------------- -via: http://itsfoss.com/webp-ubuntu-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 - -作者:[Abhishek Prakash][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/ -[0]: https://developers.google.com/speed/webp/ -[1]: http://www.xnview.com/en/xnconvert/#downloads -[2]: https://chrome.google.com/webstore/detail/save-image-as-png/nkokmeaibnajheohncaamjggkanfbphi?utm_source=chrome-ntp-icon -[3]: https://wiki.gnome.org/Apps/EyeOfGnome -[4]: https://wiki.gnome.org/Apps/gthumb -[5]: http://itsfoss.com/add-instagram-effects-xnretro-ubuntu-linux/ -[6]: http://www.xnview.com/en/xnviewmp/#downloads -[7]: https://launchpad.net/~george-edison55/+archive/ubuntu/webp -[8]: https://userbase.kde.org/Gwenview diff --git a/translated/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md b/translated/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md new file mode 100644 index 0000000000..c08efbc683 --- /dev/null +++ b/translated/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md @@ -0,0 +1,181 @@ +在 Ubuntu Linux 中使用 WEBP 图片 +========================================= + +![](http://itsfoss.com/wp-content/uploads/2016/05/support-webp-ubuntu-linux.jpg) +>简介:这篇指南会向你展示如何在 Linux 下查看 WebP 图片以及将 WebP 图片转换为 JPEG 或 PNG 格式。 + +### 什么是 WEBP? + +Google 为图片推出 [WebP 文件格式][0]已经超过五年了。Google 说,WebP 提供有损和无损压缩,相比 JPEG 压缩,WebP 压缩文件大小能更小约 25%。 + +Google 的目标是让 WebP 成为 web 图片的新标准,但是我没能看到这一切发生。已经五年过去了,除了谷歌的生态系统以外它仍未被接受成为一个标准。但正如我们所知的,Google 对它的技术很有进取心。几个月前 Google 将 Google Plus 的所有图片改为了 WebP 格式。 + +如果你用 Google Chrome 从 Google Plus 上下载那些图片,你会得到 WebP 图片,不论你之前上传的是 PNG 还是 JPEG。这都不是重点。真正的问题在于当你尝试着在 Ubuntu 中使用默认的 GNOME 图片查看器打开它时你会看到如下错误: + +> **Could not find XYZ.webp(无法找到 XYZ.webp)** + +> **Unrecognized image file format(未识别文件格式)** + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-1.png) +>GNOME 图片查看器不支持 WebP 图片 + +在这个教程里,我们会看到 + +- 如何在 Linux 中添加 WebP 支持 +- 支持 WebP 图片的程序列表 +- 如何将 WebP 图片转换到 PNG 或 JPEG +- 如何将 WebP 图片直接下载为 PNG 格式 + +### 如何在 Ubuntu 以及其它 Linux 发行版中查看 WebP 图片 + +[GNOME 图片查看器][3]是许多 Linux 发行版的默认图片查看器,包括 Ubuntu,它不支持 WebP 图片。目前也没有可用的插件给 GNOME 图片查看器添加 WebP 支持。 + +这无非是意味着我们不能在 Linux 上用 GNOME 图片查看器打开 WebP 文件而已。一个更好的替代品,[gThumb][4],默认就支持 WebP 图片。 + +要在 Ubuntu 以及其它基于 Ubuntu 的发行版上安装 gThumb 的话,使用以下命令: + +``` +sudo apt-get install gthumb +``` + +一旦安装完成,你就可以简单地右键点击 WebP 图片,选择 gThumb 来打开它。你现在应该可以看到如下画面: + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-2.jpeg) +>gThumb 中显示的 WebP 图片 + +### 让 gThumb 成为 Ubuntu 中 WebP 图片的默认应用 + +对 Ubuntu 新手而言,如果你想要让 gThumb 成为打开 WebP 文件的默认应用,跟着以下步骤操作: + +#### 步骤 1:右键点击 WebP 文件选择属性。 + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-3.png) +>从右键菜单中选择属性 + +#### 步骤 2:转到打开方式标签,选择 gThumb 并点击设置为默认。 + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-4.png) +>让 gThumb 成为 Ubuntu 中 WebP 图片的默认应用 + +### 让 gThumb 成为所有图片的默认应用 + +gThumb 的功能比图片查看器更多。举个例子,你可以做一些简单的编辑,给图片添加滤镜等。添加滤镜的效率没有 XnRetro(在[ Linux 下添加类似 Instagram 滤镜效果][5]的专用工具)那么高,但它还是有一些基础的滤镜可以用。 + +我非常喜欢 gThumb 并且决定让它成为默认的图片查看器。如果你也想在 Ubuntu 中让 gThumb 成为所有图片的默认默认应用,遵照以下步骤操作: + +#### 步骤1:打开系统设置 + +![](http://itsfoss.com/wp-content/uploads/2014/04/System_Settings_ubuntu_1404.jpeg) + +#### 步骤2:转到详情(Details) + +![](http://itsfoss.com/wp-content/uploads/2013/11/System_settings_Ubuntu_1.jpeg) + +#### 步骤3:在这里将 gThumb 设置为图片的默认应用 + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-5.png) + +### Linux 上打开 WebP 文件的替代程序 + +可能你不喜欢 gThumb。如果这样的话,你可以选择下列应用来在 Linux 中查看 WebP 图片: + +- [XnView][6](非开源) +- GIMP 加上非官方 WebP 插件,可以从这个 [PPA][7] 安装,支持到 Ubuntu 15.10。我会在另一篇文章里提到。 +- [Gwenview][8] + +### 在 Linux 中将 WebP 图片转换为 PNG 和 JPEG + +在 Linux 上转换 WebP 图片有两种途径: + +- 命令行 +- 图形界面 + +#### 1.在 Linux 使用命令行转换 WebP 图片 + +你需要先安装 WebP 工具。打开终端并使用下列命令: + +``` +sudo apt-get install webp +``` + +##### 将 JPEG/PNG 转换为 WebP + +我们将使用 cwebp 命令(它代表压缩为 WebP 吗?)来将 JPEG 或 PNG 文件转换为 WebP。命令格式是这样的: + +``` +cwebp -q [图片质量] [JPEG/PNG_文件名] -o [WebP_文件名] +``` + +举个例子,你可以使用下列命令: + +``` +cwebp -q 90 example.jpeg -o example.webp +``` + +##### 将 WebP 转换为 JPEG/PNG + +要将 WebP 图片转换为 JPEG 或 PNG,我们将使用 dwebp 命令。命令格式是: + +``` +dwebp [WebP_文件名] -o [PNG_文件名] +``` + +该命令的一个例子: + +``` +dwebp example.webp -o example.png +``` + +#### 2.使用图形工具将 WebP 转换为 JPEG/PNG + +要实现这个目标,我们要使用 XnConvert,它是免费的应用但不是开源的。你可以从他们的网站上下载安装文件: + +[下载 XnConvert][1] + +XnConvert 是个强大的工具,你可以用它来批量修改图片尺寸。但在这个教程里,我们只能看到如何将单个 WebP 图片转换为 PNG/JPEG。 + +打开 XnConvert 并选择输入文件: + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-6.jpeg) + +在输出标签,选择你想要的输出格式。选择完后点击转换。 + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-7.jpeg) + +要将 WebP 图片转换为 PNG,JPEG 或其它你选择的图片格式,这就是你所需要做的一切了。 + +### 在 Chrome 浏览器中直接将 WebP 图片下载为 PNG + +也许你一点都不喜欢 WebP 图片格式,也不想在 Linux 仅仅为了查看 WebP 图片而安装一个新软件。如果你不得不将 WebP 文件转换以备将来使用,这会是件更痛苦的事情。 + +一个解决这个问题更简单,不那么痛苦的途径是安装一个 Chrome 扩展 Save Image as PNG。有了这个插件,你可以右键点击 WebP 图片并直接存储为 PNG 格式。 + +![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-8.png) +>在 Google Chrome 中将 WebP 图片保存为 PNG 格式 + +[获取 Save Image as PNG 扩展][2] + +### 你的选择是? + +我希望这个详细的教程能够帮你在 Linux 上获取 WebP 支持并帮你转换 WebP 图片。你在 Linux 怎么处理 WebP 图片?你使用哪个工具?以上描述的方法中,你最喜欢哪一个? + + +---------------------- +via: http://itsfoss.com/webp-ubuntu-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Abhishek Prakash][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/ +[0]: https://developers.google.com/speed/webp/ +[1]: http://www.xnview.com/en/xnconvert/#downloads +[2]: https://chrome.google.com/webstore/detail/save-image-as-png/nkokmeaibnajheohncaamjggkanfbphi?utm_source=chrome-ntp-icon +[3]: https://wiki.gnome.org/Apps/EyeOfGnome +[4]: https://wiki.gnome.org/Apps/gthumb +[5]: http://itsfoss.com/add-instagram-effects-xnretro-ubuntu-linux/ +[6]: http://www.xnview.com/en/xnviewmp/#downloads +[7]: https://launchpad.net/~george-edison55/+archive/ubuntu/webp +[8]: https://userbase.kde.org/Gwenview From bc7255265a34a4d4870af783a75f75f77396fadb Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Jun 2016 22:07:58 +0800 Subject: [PATCH 1476/1710] PUB:Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md @GHLandy --- ...es and Enabling sudo Access on Accounts.md | 169 +++++++++--------- 1 file changed, 89 insertions(+), 80 deletions(-) rename {translated/tech => published}/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md (72%) diff --git a/translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md b/published/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md similarity index 72% rename from translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md rename to published/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md index 5f511676af..c3fc8b67ab 100644 --- a/translated/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md +++ b/published/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md @@ -1,27 +1,26 @@ -GHLandy Translated - LFCS 系列第八讲:管理用户和用户组、文件权限和属性以及启用账户 sudo 访问权限 - ================================================================================ -去年八月份,Linux 基金会发起了全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让世界各地的人能够参与到关于 Linux 系统中间层的基本管理操作的认证考试中去,这项认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时向上游团队请求支持的决策能力。 +去年八月份,Linux 基金会发起了全新的 LFCS(Linux Foundation Certified Sysadmin,Linux 基金会认证系统管理员)认证,旨在让世界各地的人能够参与到中等水平的 Linux 系统的基本管理操作的认证考试中去,这项认证包括:维护正在运行的系统和服务的能力、全面监控和分析的能力以及何时向上游团队请求支持的决策能力。 ![Linux Users and Groups Management](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-8.png) -LFCS 系列第八讲 +*第八讲: Linux 基金会认证系统管理员* 请看以下视频,里边将描述 LFCS 认证程序。 注:youtube视频 -本讲是《十套教程》系列的第八讲,在这一讲中,我们将引导你学习如何在 Linux 管理用户和用户组权限的设置,这些内容是 LFCS 认证开始中的必备知识。 +本讲是系列教程的第八讲,在这一讲中,我们将引导你学习如何在 Linux 管理用户和用户组权限的设置,这些内容是 LFCS 认证的必备知识。 由于 Linux 是一个多用户的操作系统(允许多个用户通过不同主机或者终端访问一个独立系统),因此你需要知道如何才能有效地管理用户:如何添加、编辑、禁用和删除用户账户,并赋予他们足以完成自身任务的必要权限。 +(LCTT 译注:本篇原文章节顺序有误,根据理解做了调整。) + ### 添加用户账户 ### -添加新用户账户,你需要以 root 运行一下两条命令中的任意一条: +添加新用户账户,你需要以 root 运行以下两条命令中的任意一条: # adduser [new_account] # useradd [new_account] @@ -29,43 +28,43 @@ LFCS 系列第八讲 当新用户账户添加到系统时,会自动执行以下操作: 1. 自动创建用户家目录(默认是 /home/username)。 - 2. 自动拷贝下列隐藏文件到新建用户的家目录,用来设置新用户会话的环境变量。 - .bash_logout - .bash_profile - .bashrc + .bash_logout + .bash_profile + .bashrc 3. 自动创建邮件缓存目录 /var/spool/mail/username。 - 4. 自动创建于用户名相同的用户组。 -**理解 /etc/passwd 中的内容** +####理解 /etc/passwd 中的内容#### /etc/passwd 文件中存储了所有用户账户的信息,每个用户在里边都有一条对应的记录,其格式(每个字段用冒号隔开)如下: [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] -- 字段 [username] 和 [Comment] 是自解释的关系。 +- 字段 [username] 和 [Comment] 是不言自明的。 - 第二个字段中 x 表明通过用户名 username 登录系统是有密码保护的, 密码保存在 /etc/shadow 文件中。 - [UID] 和 [GID] 字段用整数表示,代表该用户的用户标识符和对应所在组的组标志符。 - 字段 [Home directory] 为 username 用户家目录的绝对路径。 - 字段 [Default shell] 指定用户登录系统时默认使用的 shell。 -**理解 /etc/group 中的内容** +####理解 /etc/group 中的内容#### /etc/group 文件存储所有用户组的信息。每行记录的格式如下: [Group name]:[Group password]:[GID]:[Group members] - [Group name] 为用户组名称。 -- 字段 [Group password] 为 x 的话,则说明不适用用户组密码。 +- 字段 [Group password] 为 x 的话,则说明不使用用户组密码。 - [GID] 与 /etc/passwd 中保存的 GID 相同。 - [Group members] 用户组中的用户使用逗号隔开。 ![Add User Accounts in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-user-accounts.png) -添加用户账户 +*添加用户账户* + +#### 修改用户信息 #### 添加用户账户之后,你可以使用 usermod 命令来修改用户信息中的部分字段,该命令基本语法如下: @@ -95,24 +94,21 @@ LFCS 系列第八讲 # usermod --shell /bin/sh tecmint -**显示用户所属的用户组** - - # groups tecmint - # id tecmint - 下面,我们一次运行上述命令: # 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 命令例示 +*usermod 命令例示* 扩展阅读 - [15 useradd Command Examples in Linux][1] - [15 usermod Command Examples in Linux][2] +####锁定和解锁账户#### + 对于已有用户账户,我们还可以: **通过锁定密码来禁用账户** @@ -129,33 +125,9 @@ usermod 命令例示 ![Lock User in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/lock-user-in-linux.png) -锁定用户账户 +*锁定用户账户* -**为需要对指定文件进行读写的多个用户建立用户组** - -运行下列几条命令来完成: - - # groupadd common_group # 添加新用户组 - # chown :common_group common.txt # 将 common.txt 的用户组修改为 common_group - # usermod -aG common_group user1 # 添加用户 user1 到 common_group 用户组 - # usermod -aG common_group user2 # 添加用户 user2 到 common_group 用户组 - # usermod -aG common_group user3 # 添加用户 user3 到 common_group 用户组 - -**删除用户组** - -通过以下命令删除用户组: - - # groupdel [group_name] - -属于这个 group_name 用户组的文件是不会被删除的,而仅仅是删除了用户组。 - -### Linux 文件权限 ### - -除了我们在 [Setting File Attributes – Part 3][3] 中说到的基本的读取、写入和执行权限外,文件还有一些不常用却很重要的的权限设置,有时候把它当做“特殊权限”。 - -就像之前我们讨论的基本权限,这里同样使用八进制数字或者一个字母(象征性符号)好表示该权限类型。 - -**删除用户账户** +####删除用户账户#### 你可以通过 userdel --remove 命令来删除用户账户。这样会删除用户拥有的家目录和家目录下的所有文件,以及邮件缓存目录。 @@ -167,9 +139,9 @@ usermod 命令例示 比如,你有下列用户: -- user1 (primary group: user1) -- user2 (primary group: user2) -- user3 (primary group: user3) +- user1 (主组 user1) +- user2 (主组 user2) +- user3 (主组 user3) 他们都需要对你系统里边某个位置的 common.txt 文件,或者 user1 用户刚刚创建的共享进行读写。你可能会运行下列命令: @@ -181,53 +153,88 @@ usermod 命令例示 这时候,用户组就派上用场了,下面将演示怎么做。 +**显示用户所属的用户组** + + # groups tecmint + # id tecmint + +**为需要对指定文件进行读写的多个用户建立用户组** + +运行下列几条命令来完成: + + # groupadd common_group # 添加新用户组 + # chown :common_group common.txt # 将 common.txt 的用户组修改为 common_group + # usermod -aG common_group user1 # 添加用户 user1 到 common_group 用户组 + # usermod -aG common_group user2 # 添加用户 user2 到 common_group 用户组 + # usermod -aG common_group user3 # 添加用户 user3 到 common_group 用户组 + +####删除用户组#### + +通过以下命令删除用户组: + + # groupdel [group_name] + +属于这个 group_name 用户组的文件是不会被删除的,而仅仅是删除了用户组。 + +### Linux 文件权限 ### + +除了我们在 [LFCS 系列第三讲:归档/压缩文件及目录、设置文件属性和搜索文件][3] 中说到的基本的读取、写入和执行权限外,文件还有一些不常用却很重要的的权限设置,有时候把它当做“特殊权限”。 + +就像之前我们讨论的基本权限,这里同样使用八进制数字或者一个字母(象征性符号)表示该权限类型。 + **理解 Setuid 位** -当为可执行文件设置 setuid 位之后,用户运行程序是会继承该程序属主的有效特权。由于这样做会引起安全风险,因此设置 setuid 权限的文件及程序必须尽量少。你会发现,当系统中有用户需要执行 root 用户所管辖的程序时就是设置了 setuid 权限。 +当为可执行文件设置 setuid 位之后,用户运行程序时会继承该程序属主的有效特权。由于这样做会引起安全风险,因此设置 setuid 权限的文件及程序必须尽量少。你会发现,当系统中有用户需要访问属于 root 用户的文件是所运行的程序就带有了 setuid 权限。 -也就是说,用户不仅仅可以运行这个可执行文件,而且能以 root 权限来运行。比如,先检查 /bin/passwd 的权限,这个可执行文件用于改变账户的密码,并修改 /etc/shadow 文件。超级用户可以改变任意账户的密码,但是其他用户只能改变自己账户的密码。 +也就是说,用户不仅仅可以运行这个可执行文件,而且能以 root 权限来运行。比如,让我们来看看 /bin/passwd 的权限,这个可执行文件用于改变账户的密码,修改 /etc/shadow 文件。超级用户可以改变任意账户的密码,但是其他用户只能改变自己账户的密码。 ![passwd Command Examples](http://www.tecmint.com/wp-content/uploads/2014/10/passwd-command.png) -passwd 命令例示 +*passwd 命令例示* 因此,所有用户都有权限运行 /bin/passwd,但只有 root 用户可以指定改变指定用户账户的密码。其他用户只能改变其自身的密码。 ![Change User Password in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/change-user-password.png) -修改用户密码 +*修改用户密码* + + # chmod o+u [filename] + +以八进制形式来设置 setuid 位,在当前基本权限(或者想要设置的权限)前加上数字 4 就行了。 + + # chmod 4755 [filename] **理解 Setgid 位** -设置 setgid 位之后,真实用户的有效 GID 变为属组的 GID。因此,任何用户都能以赋予属组用户的权限来访问文件。另外,当目录置了 setgid 位之后,新建的文件将继承其所属目录的 GID,并且新建的子目录会继承父目录的 setgid 位。通过这个方法,你能够以一个指定用户组的身份来访问该目录里边的文件,而不必管文件属主的主属组。 +设置 setgid 位之后,真实用户的有效 GID 变为属组的 GID。因此,任何用户都能以属组用户的权限来访问文件。另外,当目录置了 setgid 位之后,新建的文件将继承其所属目录的 GID,并且新建的子目录会继承父目录的 setgid 位。通过这个方法,你能够以一个指定的用户组身份来访问该目录里边的文件,而不必管文件属主的主属组。 # chmod g+s [filename] 以八进制形式来设置 setgid 位,在当前基本权限(或者想要设置的权限)前加上数字 2 就行了。 - # chmod 2755 [directory] + # chmod 2755 [filename] -**给目录设置 SETGID 位** +**给目录设置 Setgid 位** ![Add Setgid in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-setgid-to-directory.png) -给命令设置 setgid 位 +*给命令设置 setgid 位* -**理解 Sticky 位** +**理解黏连(Sticky)位** -文件设置了 Sticky 为之后,Linux 会将文件忽略,对于该文件影响到的目录,除了属主或者 root 用户外,其他用户无法删除,甚至重命名目录中其他文件也不行。 +文件设置了黏连(Sticky)位是没有意义,Linux 会忽略该位。如果设置到目录上,会防止其内的文件被删除或改名,除非你是该目录或文件的属主、或者是 root 用户。 -# chmod o+t [directory] + # chmod o+t [directory] 以八进制形式来设置 sticky 位,在当前基本权限(或者想要设置的权限)前加上数字 1 就行了。 -# chmod 1755 [directory] + # chmod 1755 [directory] -若没有 sticky 位,任何有权限读写目录的用户都可删除和重命名文件。因此,sticky 为通常出现在像 /tmp 之类的目录,这些目录是所有人都具有写权限的。 +若没有黏连位,任何有权限读写目录的用户都可删除和重命名其中的文件。因此,黏连位通常出现在像 /tmp 之类的目录,这些目录是所有人都具有写权限的。 ![Add Stickybit in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-sticky-bit-to-directory.png) -给目录设置 sticky 位 +*给目录设置黏连位* ### Linux 特殊文件属性 ### @@ -240,7 +247,7 @@ passwd 命令例示 ![Protect File from Deletion](http://www.tecmint.com/wp-content/uploads/2014/10/chattr-command.png) -通过 Chattr 命令来包含文件 +*通过 Chattr 命令来包含文件* ### 访问 root 账户并启用 sudo ### @@ -251,15 +258,16 @@ passwd 命令例示 然后输入 root 账户密码。 倘若授权成功,你将以 root 身份登录,工作目录则是登录前所在的位置。如果是想要一登录就自动进入 root 用户的家目录,请运行: + $ su - 然后输入 root 账户密码。 -![Enable sudo Access on Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Sudo-Access.png) +![switch user by su ](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Sudo-Access.png) -为用户启用 sudo 访问权限 +*用户通过 su 切换* -执行上个步骤需要普通用户知道 root 账户的密码,这样会引起非常严重的安全问题。于是,系统管理员通常会配置 sudo 命令来让普通用户在严格控制的环境中以其他用户身份(通常是 root)来执行命令。所有,可以在严格控制用户的情况下,又允许他运行一条或多条特权命令。 +执行上个步骤需要普通用户知道 root 账户的密码,这样会引起非常严重的安全问题。于是,系统管理员通常会配置 sudo 命令来让普通用户在严格控制的环境中以其他用户身份(通常是 root)来执行命令。所以,可以在严格控制用户的情况下,又允许他运行一条或多条特权命令。 - 扩展阅读:[Difference Between su and sudo User][5] @@ -269,7 +277,7 @@ passwd 命令例示 # visudo -这样会使用 vim(如果你按照 [Install and Use vim as Editor – Part 2][6] 里边说的来编辑文件)来打开 /etc/sudoers 文件。 +这样会使用 vim(你可以按照 [LFCS 系列第二讲:如何安装和使用纯文本编辑器 vi/vim][6] 里边说的来编辑文件)来打开 /etc/sudoers 文件。 以下是需要设置的相关的行: @@ -283,19 +291,19 @@ passwd 命令例示 Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/usr/local/bin" -这一行指定 sudo 将要使用的目录,这样可以阻止使用用户指定的目录,那样的话可能会危及系统。 +这一行指定 sudo 将要使用的目录,这样可以阻止使用某些用户指定的目录,那样的话可能会危及系统。 下一行是用来指定权限的: root ALL=(ALL) ALL - 第一个 ALL 关键词表明这条规则适用于所有主机。 -- 第二个 ALL 关键词表明第一个字段中指定的用户能以任何用户身份所具有的权限来运行相应命令。 +- 第二个 ALL 关键词表明第一个字段中所指定的用户能以任何用户身份的权限来运行相应命令。 - 第三个 ALL 关键词表明可以运行任何命令。 tecmint ALL=/bin/yum update -如果 = 号后边没有指定用户,sudo 则默认为 root 用户。本例中,tecmint 用户能以 root身份运行 yum update 命令。 +如果 = 号后边没有指定用户,sudo 则默认为 root 用户。本例中,tecmint 用户能以 root 身份运行 yum update 命令。 gacanepa ALL=NOPASSWD:/bin/updatedb @@ -303,16 +311,17 @@ NOPASSWD 关键词表明 gacanepa 用户不需要密码,可以直接运行 /bi %admin ALL=(ALL) ALL -% 符号表示该行应用 admin 用户组。其他部分的含义与对于用户的含义是一样的。本例表示 admin 用户组的成员可以通过任何主机的链接来运行任何命令。 +% 符号表示该行应用于 admin 用户组。其他部分的含义与对于用户的含义是一样的。本例表示 admin 用户组的成员可以通过任何主机连接来运行任何命令。 通过 sudo -l 命令可以查看,你的账户拥有什么样的权限。 ![Sudo Access Rules](http://www.tecmint.com/wp-content/uploads/2014/10/sudo-access-rules.png) -Sudo 访问规则 +*Sudo 访问规则* ### 总结 ### -对于系统管理员来说,高效能的用户和文件管理技能是非常必要的。本文已经涵盖了这些内容,我们希望你将这些作为一个开始,,然后慢慢进步。随时在下边发表评论或提问,我们会尽快回应的。 + +对于系统管理员来说,高效能的用户和文件管理技能是非常必要的。本文已经涵盖了这些内容,我们希望你将这些作为一个开始,然后慢慢进步。随时在下边发表评论或提问,我们会尽快回应的。 -------------------------------------------------------------------------------- @@ -320,14 +329,14 @@ via: http://www.tecmint.com/manage-users-and-groups-in-linux/ 作者:[Gabriel Cánepa][a] 译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者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/compress-files-and-finding-files-in-linux/ +[3]:https://linux.cn/article-7171-1.html [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/ +[6]:https://linux.cn/article-7165-1.html From 2bfad78ab032b04b4ec1ac3d742d34deb25dece1 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Jun 2016 22:08:39 +0800 Subject: [PATCH 1477/1710] =?UTF-8?q?=E5=BD=92=E6=A1=A3201605?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Source Linux Distributions Would Presidential Hopefuls Run.md | 0 .../20151019 Gaming On Linux--All You Need To Know.md | 0 .../20151122 Doubly linked list in the Linux Kernel.md | 0 .../{ => 201605}/20151123 Data Structures in the Linux Kernel.md | 0 .../20151124 Review--5 memory debuggers for Linux coding.md | 0 ...eful Linux and Unix Tape Managements Commands For Sysadmins.md | 0 ...em Restore Point) your Ubuntu or Linux Mint with SystemBack.md | 0 ...20151202 8 things to do after installing openSUSE Leap 42.1.md | 0 published/{ => 201605}/20151202 A new Mindcraft moment.md | 0 published/{ => 201605}/20151202 KDE vs GNOME vs XFCE Desktop.md | 0 .../20151207 5 great Raspberry Pi projects for the classroom.md | 0 ...ix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md | 0 .../{ => 201605}/20151227 Upheaval in the Debian Live project.md | 0 published/{ => 201605}/20160204 An Introduction to SELinux.md | 0 ... Intel shows budget Android phone powering big-screen Linux.md | 0 .../20160225 How to add open source experience to your resume.md | 0 published/{ => 201605}/20160225 The Tao of project management.md | 0 .../{ => 201605}/20160301 Linux gives me all the tools I need.md | 0 ...160415 Docker 1.11 Adopts Open Container Project Components.md | 0 .../20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md | 0 .../20160429 Master OpenStack with 5 new tutorials.md | 0 .../20160516 Open source from a recruiter's perspective.md | 0 22 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201605}/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md (100%) rename published/{ => 201605}/20151019 Gaming On Linux--All You Need To Know.md (100%) rename published/{ => 201605}/20151122 Doubly linked list in the Linux Kernel.md (100%) rename published/{ => 201605}/20151123 Data Structures in the Linux Kernel.md (100%) rename published/{ => 201605}/20151124 Review--5 memory debuggers for Linux coding.md (100%) rename published/{ => 201605}/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md (100%) rename published/{ => 201605}/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md (100%) rename published/{ => 201605}/20151202 8 things to do after installing openSUSE Leap 42.1.md (100%) rename published/{ => 201605}/20151202 A new Mindcraft moment.md (100%) rename published/{ => 201605}/20151202 KDE vs GNOME vs XFCE Desktop.md (100%) rename published/{ => 201605}/20151207 5 great Raspberry Pi projects for the classroom.md (100%) rename published/{ => 201605}/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md (100%) rename published/{ => 201605}/20151227 Upheaval in the Debian Live project.md (100%) rename published/{ => 201605}/20160204 An Introduction to SELinux.md (100%) rename published/{ => 201605}/20160223 Intel shows budget Android phone powering big-screen Linux.md (100%) rename published/{ => 201605}/20160225 How to add open source experience to your resume.md (100%) rename published/{ => 201605}/20160225 The Tao of project management.md (100%) rename published/{ => 201605}/20160301 Linux gives me all the tools I need.md (100%) rename published/{ => 201605}/20160415 Docker 1.11 Adopts Open Container Project Components.md (100%) rename published/{ => 201605}/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md (100%) rename published/{ => 201605}/20160429 Master OpenStack with 5 new tutorials.md (100%) rename published/{ => 201605}/20160516 Open source from a recruiter's perspective.md (100%) diff --git a/published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md b/published/201605/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md similarity index 100% rename from published/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md rename to published/201605/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md diff --git a/published/20151019 Gaming On Linux--All You Need To Know.md b/published/201605/20151019 Gaming On Linux--All You Need To Know.md similarity index 100% rename from published/20151019 Gaming On Linux--All You Need To Know.md rename to published/201605/20151019 Gaming On Linux--All You Need To Know.md diff --git a/published/20151122 Doubly linked list in the Linux Kernel.md b/published/201605/20151122 Doubly linked list in the Linux Kernel.md similarity index 100% rename from published/20151122 Doubly linked list in the Linux Kernel.md rename to published/201605/20151122 Doubly linked list in the Linux Kernel.md diff --git a/published/20151123 Data Structures in the Linux Kernel.md b/published/201605/20151123 Data Structures in the Linux Kernel.md similarity index 100% rename from published/20151123 Data Structures in the Linux Kernel.md rename to published/201605/20151123 Data Structures in the Linux Kernel.md diff --git a/published/20151124 Review--5 memory debuggers for Linux coding.md b/published/201605/20151124 Review--5 memory debuggers for Linux coding.md similarity index 100% rename from published/20151124 Review--5 memory debuggers for Linux coding.md rename to published/201605/20151124 Review--5 memory debuggers for Linux coding.md diff --git a/published/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md b/published/201605/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md similarity index 100% rename from published/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md rename to published/201605/20151130 Useful Linux and Unix Tape Managements Commands For Sysadmins.md diff --git a/published/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md b/published/201605/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md similarity index 100% rename from published/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md rename to published/201605/20151201 Backup (System Restore Point) your Ubuntu or Linux Mint with SystemBack.md diff --git a/published/20151202 8 things to do after installing openSUSE Leap 42.1.md b/published/201605/20151202 8 things to do after installing openSUSE Leap 42.1.md similarity index 100% rename from published/20151202 8 things to do after installing openSUSE Leap 42.1.md rename to published/201605/20151202 8 things to do after installing openSUSE Leap 42.1.md diff --git a/published/20151202 A new Mindcraft moment.md b/published/201605/20151202 A new Mindcraft moment.md similarity index 100% rename from published/20151202 A new Mindcraft moment.md rename to published/201605/20151202 A new Mindcraft moment.md diff --git a/published/20151202 KDE vs GNOME vs XFCE Desktop.md b/published/201605/20151202 KDE vs GNOME vs XFCE Desktop.md similarity index 100% rename from published/20151202 KDE vs GNOME vs XFCE Desktop.md rename to published/201605/20151202 KDE vs GNOME vs XFCE Desktop.md diff --git a/published/20151207 5 great Raspberry Pi projects for the classroom.md b/published/201605/20151207 5 great Raspberry Pi projects for the classroom.md similarity index 100% rename from published/20151207 5 great Raspberry Pi projects for the classroom.md rename to published/201605/20151207 5 great Raspberry Pi projects for the classroom.md diff --git a/published/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md b/published/201605/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md similarity index 100% rename from published/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md rename to published/201605/20151215 Linux or Unix Desktop Fun--Text Mode ASCII-art Box and Comment Drawing.md diff --git a/published/20151227 Upheaval in the Debian Live project.md b/published/201605/20151227 Upheaval in the Debian Live project.md similarity index 100% rename from published/20151227 Upheaval in the Debian Live project.md rename to published/201605/20151227 Upheaval in the Debian Live project.md diff --git a/published/20160204 An Introduction to SELinux.md b/published/201605/20160204 An Introduction to SELinux.md similarity index 100% rename from published/20160204 An Introduction to SELinux.md rename to published/201605/20160204 An Introduction to SELinux.md diff --git a/published/20160223 Intel shows budget Android phone powering big-screen Linux.md b/published/201605/20160223 Intel shows budget Android phone powering big-screen Linux.md similarity index 100% rename from published/20160223 Intel shows budget Android phone powering big-screen Linux.md rename to published/201605/20160223 Intel shows budget Android phone powering big-screen Linux.md diff --git a/published/20160225 How to add open source experience to your resume.md b/published/201605/20160225 How to add open source experience to your resume.md similarity index 100% rename from published/20160225 How to add open source experience to your resume.md rename to published/201605/20160225 How to add open source experience to your resume.md diff --git a/published/20160225 The Tao of project management.md b/published/201605/20160225 The Tao of project management.md similarity index 100% rename from published/20160225 The Tao of project management.md rename to published/201605/20160225 The Tao of project management.md diff --git a/published/20160301 Linux gives me all the tools I need.md b/published/201605/20160301 Linux gives me all the tools I need.md similarity index 100% rename from published/20160301 Linux gives me all the tools I need.md rename to published/201605/20160301 Linux gives me all the tools I need.md diff --git a/published/20160415 Docker 1.11 Adopts Open Container Project Components.md b/published/201605/20160415 Docker 1.11 Adopts Open Container Project Components.md similarity index 100% rename from published/20160415 Docker 1.11 Adopts Open Container Project Components.md rename to published/201605/20160415 Docker 1.11 Adopts Open Container Project Components.md diff --git a/published/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md b/published/201605/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md similarity index 100% rename from published/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md rename to published/201605/20160426 IS UBUNTU’S SNAP PACKAGING REALLY SECURE.md diff --git a/published/20160429 Master OpenStack with 5 new tutorials.md b/published/201605/20160429 Master OpenStack with 5 new tutorials.md similarity index 100% rename from published/20160429 Master OpenStack with 5 new tutorials.md rename to published/201605/20160429 Master OpenStack with 5 new tutorials.md diff --git a/published/20160516 Open source from a recruiter's perspective.md b/published/201605/20160516 Open source from a recruiter's perspective.md similarity index 100% rename from published/20160516 Open source from a recruiter's perspective.md rename to published/201605/20160516 Open source from a recruiter's perspective.md From 3494ad357d0cc99ff54d783dde0b74c81175d46c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Jun 2016 22:24:17 +0800 Subject: [PATCH 1478/1710] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E8=AF=91=E8=80=85?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @kylepeng93 ,@pengkai , @mudongliang --- ...20160225 How to add open source experience to your resume.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/201605/20160225 How to add open source experience to your resume.md b/published/201605/20160225 How to add open source experience to your resume.md index cff9f4c6f1..6c36651976 100644 --- a/published/201605/20160225 How to add open source experience to your resume.md +++ b/published/201605/20160225 How to add open source experience to your resume.md @@ -68,7 +68,7 @@ via: https://opensource.com/business/16/2/add-open-source-to-your-resume 作者:[edunham][a] -译者:[pengkai](https://github.com/pengkai) +译者:[kylepeng93](https://github.com/kylepeng93) 校对:[mudongliang](https://github.com/mudongliang),[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 309ffa918849cd39cfaa834a18db33e5df860573 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 4 Jun 2016 10:51:18 +0800 Subject: [PATCH 1479/1710] translating --- .../tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md b/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md index c550880223..b3cc4c666e 100644 --- a/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md +++ b/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md @@ -1,3 +1,5 @@ +translating---geekpi + Test Fedora 24 Beta in an OpenStack cloud =========================================== From f1943160f0c0fc2cb09b32b14900b096fe93ca02 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 4 Jun 2016 11:42:15 +0800 Subject: [PATCH 1480/1710] translated --- ...st Fedora 24 Beta in an OpenStack cloud.md | 79 ------------------- ...st Fedora 24 Beta in an OpenStack cloud.md | 78 ++++++++++++++++++ 2 files changed, 78 insertions(+), 79 deletions(-) delete mode 100644 sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md create mode 100644 translated/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md diff --git a/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md b/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md deleted file mode 100644 index b3cc4c666e..0000000000 --- a/sources/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md +++ /dev/null @@ -1,79 +0,0 @@ -translating---geekpi - -Test Fedora 24 Beta in an OpenStack cloud -=========================================== - -![](https://major.io/wp-content/uploads/2012/01/fedorainfinity.png) - -Although there are a few weeks remaining before [Fedora 24][1] is released, you can test out the Fedora 24 Beta release today! This is a great way to get [a sneak peek at new features][2] and help find bugs that still need a fix. - -The [Fedora Cloud][3] image is available for download from your favorite [local mirror][4] or directly from [Fedora’s servers][5]. In this post, I’ll show you how to import this image into an OpenStack environment and begin testing Fedora 24 Beta. - -One last thing: this is beta software. It has been reliable for me so far, but your experience may vary. I would recommend waiting for the final release before deploying any mission critical applications on it. - -### Importing the image - -The older glance client (version 1) allows you to import an image from a URL that is reachable from your OpenStack environment. This is helpful since my OpenStack cloud has a much faster connection to the internet (1 Gbps) than my home does (~ 20 mbps upload speed). However, the functionality to import from a URL was [removed in version 2 of the glance client][6]. The [OpenStackClient][7] doesn’t offer the feature either. - -There are two options here: - -- Install an older version of the glance client -- Use Horizon (the web dashboard) - -Getting an older version of glance client installed is challenging. The OpenStack requirements file for the liberty release [leaves the version of glance client without a maximum version cap][8] and it’s difficult to get all of the dependencies in order to make the older glance client work. - -Let’s use Horizon instead so we can get back to the reason for the post. - -### Adding an image in Horizon - -Log into the Horizon panel and click Compute > Images. Click + Create Image at the top right of the page and a new window should appear. Add this information in the window: - -- **Name**: Fedora 24 Cloud Beta -- **Image Source**: Image Location -- **Image Location**: http://mirrors.kernel.org/fedora/releases/test/24_Beta/CloudImages/x86_64/images/Fedora-Cloud-Base-24_Beta-1.6.x86_64.qcow2 -- **Format**: QCOW2 – QEMU Emulator -- **Copy Data**: ensure the box is checked - -When you’re finished, the window should look like this: - -![](https://major.io/wp-content/uploads/2016/05/horizon_image.png) - -Click Create Image and the images listing should show Saving for a short period of time. Once it switches to Active, you’re ready to build an instance. - -### Building the instance - -Since we’re already in Horizon, we can finish out the build process there. - -On the image listing page, find the row with the image we just uploaded and click Launch Instance on the right side. A new window will appear. The Image Name drop down should already have the Fedora 24 Beta image selected. From here, just choose an instance name, select a security group and keypair (on the Access & Security tab), and a network (on the Networking tab). Be sure to choose a flavor that has some available storage as well (m1.tiny is not enough). - -Click Launch and wait for the instance to boot. - -Once the instance build has finished, you can connect to the instance over ssh as the fedora user. If your [security group allows the connection][9] and your keypair was configured correctly, you should be inside your new Fedora 24 Beta instance! - -Not sure what to do next? Here are some suggestions: - -- Update all packages and reboot (to ensure that you are testing the latest updates) -- Install some familiar applications and verify that they work properly -- Test out your existing automation or configuration management tools -- Open bug tickets! - --------------------------------------------------------------------------------- - -via: https://major.io/2016/05/24/test-fedora-24-beta-openstack-cloud/ - -作者:[major.io][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://major.io/about-the-racker-hacker/ -[1]: https://fedoraproject.org/wiki/Releases/24/Schedule -[2]: https://fedoraproject.org/wiki/Releases/24/ChangeSet -[3]: https://getfedora.org/en/cloud/ -[4]: https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora/24/x86_64 -[5]: https://getfedora.org/en/cloud/download/ -[6]: https://wiki.openstack.org/wiki/Glance-v2-v1-client-compatability -[7]: http://docs.openstack.org/developer/python-openstackclient/ -[8]: https://github.com/openstack/requirements/blob/stable/liberty/global-requirements.txt#L159 -[9]: https://major.io/2016/05/16/troubleshooting-openstack-network-connectivity/ diff --git a/translated/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md b/translated/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md new file mode 100644 index 0000000000..e32cd43f2e --- /dev/null +++ b/translated/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md @@ -0,0 +1,78 @@ +在OpenStack云中测试Fedora 24 Beta +=========================================== + +![](https://major.io/wp-content/uploads/2012/01/fedorainfinity.png) + +虽然离[Fedora 24][1]还有几周,你可以今天就测试Fedora 24 Beta了。这是一个[窥探新特性][2]的好机会,并且可以帮助找出仍需要修复的bug。 + +[Fedora Cloud][3]镜像可以从你最喜欢的[本地镜像][4]或者[Fedora的服务器][5]中下载。本篇文章我将向你展示如何将这个镜像导入Openstack环境并且测试Fedora 24 Beta。 + +最后说一下:这还是beta软件。目前对我来说是可靠的,但是你的体验可能会不同。我建议你等到正式版发布再在上面部署关键的应用。 + +### 导入镜像 + +旧版的glance客户端(版本1)允许你在Openstack环境中导入一个URL镜像。由于我Openstack云的连接速度(1 Gbps)比我家 (大约20 mbps上传速度)快,这个功能对我很有用。然而,从URL导入的功能[在glance v2中被移除了]。[OpenStackClient][7]也不支持这个功能。 + +现在由两个选择: + +- 安装旧版的glance客户端 +- 使用 Horizon (网页面板) + +获取旧版本的glance是有挑战性的。Openstack自由发布的需求文件[对glance客户端没有最高版本上限][8],并且很难找到让旧版客户端工作的依赖文件。 + +让我们使用Horizon,来回到写这篇文章的原因。 + + +### 在Horizon中添加一个镜像 + +登录Horizon面板,点击Compute->Image. 点击页面右上方的“+”创建新镜像,一个新的窗口会显示出来。并且窗口中有这些信息: + +- **Name**: Fedora 24 Cloud Beta +- **Image Source**: Image位置 +- **Image Location**: http://mirrors.kernel.org/fedora/releases/test/24_Beta/CloudImages/x86_64/images/Fedora-Cloud-Base-24_Beta-1.6.x86_64.qcow2 +- **Format**: QCOW2 – QEMU Emulator +- **Copy Data**: 确保勾选了 + +完成后,你会看到这个: + +![](https://major.io/wp-content/uploads/2016/05/horizon_image.png) + +点击创建镜像,接着会显示一段时间的Saving。一旦切换到Active,你可以构建一个实例了。 + +### 构建实例 + +既然我们在Horizon,我们可以完成构建过程了。 + +在镜像列表页面,找出我们上传的镜像并且点击右边的启动实例。一个新的窗口会显示出来。下拉框中应该已经选择了Fedora 24 Beta的镜像。在这里,选择一个实例名,选择一个安全组和密钥对(在Access & Security中)和网络(在Networking标签)。确保选择有足够容量的存储(m1.tiny还不够)。 + +点击启动并且等待实例启动。 + +一旦实例构建完成,你可以作为fedora用户通过ssh连接。如果你的[安全组允许连接][9]并且你的密钥对正确配置了,你应该在Fedora 24 Beta中了! + +还不确定接下来做什么?有下面几点建议: + +- 升级所有的包并且重启(确保你测试的是最新的更新) +- 安装一些相似的应用并且验证它们可以正常工作 +- 测试你已有的自动化或者配置管理工具 +- 打开bug报告 + +-------------------------------------------------------------------------------- + +via: https://major.io/2016/05/24/test-fedora-24-beta-openstack-cloud/ + +作者:[major.io][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://major.io/about-the-racker-hacker/ +[1]: https://fedoraproject.org/wiki/Releases/24/Schedule +[2]: https://fedoraproject.org/wiki/Releases/24/ChangeSet +[3]: https://getfedora.org/en/cloud/ +[4]: https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora/24/x86_64 +[5]: https://getfedora.org/en/cloud/download/ +[6]: https://wiki.openstack.org/wiki/Glance-v2-v1-client-compatability +[7]: http://docs.openstack.org/developer/python-openstackclient/ +[8]: https://github.com/openstack/requirements/blob/stable/liberty/global-requirements.txt#L159 +[9]: https://major.io/2016/05/16/troubleshooting-openstack-network-connectivity/ From 3302e27d02a144ade816fb3fc6959e80c1afc998 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 4 Jun 2016 18:33:28 +0800 Subject: [PATCH 1481/1710] =?UTF-8?q?20160604-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1 Linux vs. Windows device driver model.md | 190 ++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 sources/tech/20160531 Linux vs. Windows device driver model.md diff --git a/sources/tech/20160531 Linux vs. Windows device driver model.md b/sources/tech/20160531 Linux vs. Windows device driver model.md new file mode 100644 index 0000000000..2eda1e6927 --- /dev/null +++ b/sources/tech/20160531 Linux vs. Windows device driver model.md @@ -0,0 +1,190 @@ +Linux vs. Windows device driver model : architecture, APIs and build environment comparison +============================================================================================ + +Device drivers are parts of the operating system that facilitate usage of hardware devices via certain programming interface so that software applications can control and operate the devices. As each driver is specific to a particular operating system, you need separate Linux, Windows, or Unix device drivers to enable the use of your device on different computers. This is why when hiring a driver developer or choosing an R&D service provider, it is important to look at their experience of developing drivers for various operating system platforms. + +![](https://c2.staticflickr.com/8/7289/26775594584_d2fe7483f9_c.jpg) + +The first step in driver development is to understand the differences in the way each operating system handles its drivers, underlying driver model and architecture it uses, as well as available development tools. For example, Linux driver model is very different from the Windows one. While Windows facilitates separation of the driver development and OS development and combines drivers and OS via a set of ABI calls, Linux device driver development does not rely on any stable ABI or API, with the driver code instead being incorporated into the kernel. Each of these models has its own set of advantages and drawbacks, but it is important to know them all if you want to provide a comprehensive support for your device. + +In this article we will compare Windows and Linux device drivers and explore the differences in terms of their architecture, APIs, build development, and distribution, in hopes of providing you with an insight on how to start writing device drivers for each of these operating systems. + +### 1. Device Driver Architecture + +Windows device driver architecture is different from the one used in Linux drivers, with either of them having their own pros and cons. Differences are mainly influenced by the fact that Windows is a closed-source OS while Linux is open-source. Comparison of the Linux and Windows device driver architectures will help us understand the core differences behind Windows and Linux drivers. + +#### 1.1. Windows driver architecture + +While Linux kernel is distributed with drivers themselves, Windows kernel does not include device drivers. Instead, modern Windows device drivers are written using the Windows Driver Model (WDM) which fully supports plug-and-play and power management so that the drivers can be loaded and unloaded as necessary. + +Requests from applications are handled by a part of Windows kernel called IO manager which transforms them into IO Request Packets (IRPs) which are used to identify the request and convey data between driver layers. + +WDM provides three kinds of drivers, which form three layers: + +- Filter drivers provide optional additional processing of IRPs. +- Function drivers are the main drivers that implement interfaces to individual devices. +- Bus drivers service various adapters and bus controllers that host devices. + +An IRP passes these layers as it travels from the IO manager down to the hardware. Each layer can handle an IRP by itself and send it back to the IO manager. At the bottom there is Hardware Abstraction Layer (HAL) which provides a common interface to physical devices. + +#### 1.2. Linux driver architecture + +The core difference in Linux device driver architecture as compared to the Windows one is that Linux does not have a standard driver model or a clean separation into layers. Each device driver is usually implemented as a module that can be loaded and unloaded into the kernel dynamically. Linux provides means for plug-and-play support and power management so that drivers can use them to manage devices correctly, but this is not a requirement. + +Modules export functions they provide and communicate by calling these functions and passing around arbitrary data structures. Requests from user applications come from the filesystem or networking level, and are converted into data structures as necessary. Modules can be stacked into layers, processing requests one after another, with some modules providing a common interface to a device family such as USB devices. + +Linux device drivers support three kinds of devices: + +- Character devices which implement a byte stream interface. +- Block devices which host filesystems and perform IO with multibyte blocks of data. +- Network interfaces which are used for transferring data packets through the network. + +Linux also has a Hardware Abstraction Layer that acts as an interface to the actual hardware for the device drivers. + +### 2. Device Driver APIs + +Both Linux and Windows driver APIs are event-driven: the driver code executes only when some event happens: either when user applications want something from the device, or when the device has something to tell to the OS. + +#### 2.1. Initialization + +On Windows, drivers are represented by a DriverObject structure which is initialized during the execution of the DriverEntry function. This entry point also registers a number of callbacks to react to device addition and removal, driver unloading, and handling the incoming IRPs. Windows creates a device object when a device is connected, and this device object handles all application requests on behalf of the device driver. + +As compared to Windows, Linux device driver lifetime is managed by kernel module's module_init and module_exit functions, which are called when the module is loaded or unloaded. They are responsible for registering the module to handle device requests using the internal kernel interfaces. The module has to create a device file (or a network interface), specify a numerical identifier of the device it wishes to manage, and register a number of callbacks to be called when the user interacts with the device file. + +#### 2.2. Naming and claiming devices + +##### **Registering devices on Windows** + +Windows device driver is notified about newly connected devices in its AddDevice callback. It then proceeds to create a device object used to identify this particular driver instance for the device. Depending on the driver kind, device object can be a Physical Device Object (PDO), Function Device Object (FDO), or a Filter Device Object (FIDO). Device objects can be stacked, with a PDO in the bottom. + +Device objects exist for the whole time the device is connected to the computer. DeviceExtension structure can be used to associate global data with a device object. + +Device objects can have names of the form **\Device\DeviceName**, which are used by the system to identify and locate them. An application opens a file with such name using CreateFile API function, obtaining a handle, which then can be used to interact with the device. + +However, usually only PDOs have distinct names. Unnamed devices can be accessed via device class interfaces. The device driver registers one or more interfaces identified by 128-bit globally unique identifiers (GUIDs). User applications can then obtain a handle to such device using known GUIDs. + +##### **Registering devices on Linux** + +On Linux user applications access the devices via file system entries, usually located in the /dev directory. The module creates all necessary entries during module initialization by calling kernel functions like register_chrdev. An application issues an open system call to obtain a file descriptor, which is then used to interact with the device. This call (and further system calls with the returned descriptor like read, write, or close) are then dispatched to callback functions installed by the module into structures like file_operations or block_device_operations. + +The device driver module is responsible for allocating and maintaining any data structures necessary for its operation. A file structure passed into the file system callbacks has a private_data field, which can be used to store a pointer to driver-specific data. The block device and network interface APIs also provide similar fields. + +While applications use file system nodes to locate devices, Linux uses a concept of major and minor numbers to identify devices and their drivers internally. A major number is used to identify device drivers, while a minor number is used by the driver to identify devices managed by it. The driver has to register itself in order to manage one or more fixed major numbers, or ask the system to allocate some unused number for it. + +Currently, Linux uses 32-bit values for major-minor pairs, with 12 bits allocated for the major number allowing up to 4096 distinct drivers. The major-minor pairs are distinct for character and block devices, so a character device and a block device can use the same pair without conflicts. Network interfaces are identified by symbolic names like eth0, which are again distinct from major-minor numbers of both character and block devices. + +#### 2.3. Exchanging data + +Both Linux and Windows support three ways of transferring data between user-level applications and kernel-level drivers: + +- **Buffered Input-Output** which uses buffers managed by the kernel. For write operations the kernel copies data from a user-space buffer into a kernel-allocated buffer, and passes it to the device driver. Reads are the same, with kernel copying data from a kernel buffer into the buffer provided by the application. +- **Direct Input-Output** which does not involve copying. Instead, the kernel pins a user-allocated buffer in physical memory so that it remains there without being swapped out while data transfer is in progress. +- **Memory mapping** can also be arranged by the kernel so that the kernel and user space applications can access the same pages of memory using distinct addresses. + +##### **Driver IO modes on Windows** + +Support for Buffered IO is a built-in feature of WDM. The buffer is accessible to the device driver via the AssociatedIrp.SystemBuffer field of the IRP structure. The driver simply reads from or writes to this buffer when it needs to communicate with the userspace. + +Direct IO on Windows is mediated by memory descriptor lists (MDLs). These are semi-opaque structures accessible via MdlAddress field of the IRP. They are used to locate the physical address of the buffer allocated by the user application and pinned for the duration of the IO request. + +The third option for data transfer on Windows is called METHOD_NEITHER. In this case the kernel simply passes the virtual addresses of user-space input and output buffers to the driver, without validating them or ensuring that they are mapped into physical memory accessible by the device driver. The device driver is responsible for handling the details of the data transfer. + +##### **Driver IO modes on Linux** + +Linux provides a number of functions like clear_user, copy_to_user, strncpy_from_user, and some others to perform buffered data transfers between the kernel and user memory. These functions validate pointers to data buffers and handle all details of the data transfer by safely copying the data buffer between memory regions. + +However, drivers for block devices operate on entire data blocks of known size, which can be simply moved between the kernel and user address spaces without copying them. This case is automatically handled by Linux kernel for all block device drivers. The block request queue takes care of transferring data blocks without excess copying, and Linux system call interface takes care of converting file system requests into block requests. + +Finally, the device driver can allocate some memory pages from kernel address space (which is non-swappable) and then use the remap_pfn_range function to map the pages directly into the address space of the user process. The application can then obtain the virtual address of this buffer and use it to communicate with the device driver. + +### 3. Device Driver Development Environment + +#### 3.1. Device driver frameworks + +##### **Windows Driver Kit** + +Windows is a closed-source operating system. Microsoft provides a Windows Driver Kit to facilitate Windows device driver development by non-Microsoft vendors. The kit contains all that is necessary to build, debug, verify, and package device drivers for Windows. + +Windows Driver Model defines a clean interface framework for device drivers. Windows maintains source and binary compatibility of these interfaces. Compiled WDM drivers are generally forward-compatible: that is, an older driver can run on a newer system as is, without being recompiled, but of course it will not have access to the new features provided by the OS. However, drivers are not guaranteed to be backward-compatible. + +##### **Linux source code** + +In comparison to Windows, Linux is an open-source operating system, thus the entire source code of Linux is the SDK for driver development. There is no formal framework for device drivers, but Linux kernel includes numerous subsystems that provide common services like driver registration. The interfaces to these subsystems are described in kernel header files. + +While Linux does have defined interfaces, these interfaces are not stable by design. Linux does not provide any guarantees about forward or backward compatibility. Device drivers are required to be recompiled to work with different kernel versions. No stability guarantees allow rapid development of Linux kernel as developers do not have to support older interfaces and can use the best approach to solve the problems at hand. + +Such ever-changing environment does not pose any problems when writing in-tree drivers for Linux, as they are a part of the kernel source, because they are updated along with the kernel itself. However, closed-source drivers must be developed separately, out-of-tree, and they must be maintained to support different kernel versions. Thus Linux encourages device driver developers to maintain their drivers in-tree. + +#### 3.2. Build system for device drivers + +Windows Driver Kit adds driver development support for Microsoft Visual Studio, and includes a compiler used to build the driver code. Developing Windows device drivers is not much different from developing a user-space application in an IDE. Microsoft also provides an Enterprise Windows Driver Kit, which enables command-line build environment similar to the one of Linux. + +Linux uses Makefiles as a build system for both in-tree and out-of-tree device drivers. Linux build system is quite developed and usually a device driver needs no more than a handful of lines to produce a working binary. Developers can use any [IDE][5] as long as it can handle Linux source code base and run make, or they can easily compile drivers manually from terminal. + +#### 3.3. Documentation support + +Windows has excellent documentation support for driver development. Windows Driver Kit includes documentation and sample driver code, abundant information about kernel interfaces is available via MSDN, and there exist numerous reference and guide books on driver development and Windows internals. + +Linux documentation is not as descriptive, but this is alleviated with the whole source code of Linux being available to driver developers. The Documentation directory in the source tree documents some of the Linux subsystems, but there are [multiple books][4] concerning Linux device driver development and Linux kernel overviews, which are much more elaborate. + +Linux does not provide designated samples of device drivers, but the source code of existing production drivers is available and can be used as a reference for developing new device drivers. + +#### 3.4. Debugging support + +Both Linux and Windows have logging facilities that can be used to trace-debug driver code. On Windows one would use DbgPrint function for this, while on Linux the function is called printk. However, not every problem can be resolved by using only logging and source code. Sometimes breakpoints are more useful as they allow to examine the dynamic behavior of the driver code. Interactive debugging is also essential for studying the reasons of crashes. + +Windows supports interactive debugging via its kernel-level debugger WinDbg. This requires two machines connected via a serial port: a computer to run the debugged kernel, and another one to run the debugger and control the operating system being debugged. Windows Driver Kit includes debugging symbols for Windows kernel so Windows data structures will be partially visible in the debugger. + +Linux also supports interactive debugging by means of KDB and KGDB. Debugging support can be built into the kernel and enabled at boot time. After that one can either debug the system directly via a physical keyboard, or connect to it from another machine via a serial port. KDB offers a simple command-line interface and it is the only way to debug the kernel on the same machine. However, KDB lacks source-level debugging support. KGDB provides a more complex interface via a serial port. It enables usage of standard application debuggers like GDB for debugging Linux kernel just like any other userspace application. + +### 4. Distributing Device Drivers + +##### 4.1. Installing device drivers + +On Windows installed drivers are described by text files called INF files, which are typically stored in C:\Windows\INF directory. These files are provided by the driver vendor and define which devices are serviced by the driver, where to find the driver binaries, the version of the driver, etc. + +When a new device is plugged into the computer, Windows looks though +installed drivers and loads an appropriate one. The driver will be automatically unloaded as soon as the device is removed. + +On Linux some drivers are built into the kernel and stay permanently loaded. Non-essential ones are built as kernel modules, which are usually stored in the /lib/modules/kernel-version directory. This directory also contains various configuration files, like modules.dep describing dependencies between kernel modules. + +While Linux kernel can load some of the modules at boot time itself, generally module loading is supervised by user-space applications. For example, init process may load some modules during system initialization, and the udev daemon is responsible for tracking the newly plugged devices and loading appropriate modules for them. + +#### 4.2. Updating device drivers + +Windows provides a stable binary interface for device drivers so in some cases it is not necessary to update driver binaries together with the system. Any necessary updates are handled by the Windows Update service, which is responsible for locating, downloading, and installing up-to-date versions of drivers appropriate for the system. + +However, Linux does not provide a stable binary interface so it is necessary to recompile and update all necessary device drivers with each kernel update. Obviously, device drivers, which are built into the kernel are updated automatically, but out-of-tree modules pose a slight problem. The task of maintaining up-to-date module binaries is usually solved with [DKMS][3]: a service that automatically rebuilds all registered kernel modules when a new kernel version is installed. + +#### 4.3. Security considerations + +All Windows device drivers must be digitally signed before Windows loads them. It is okay to use self-signed certificates during development, but driver packages distributed to end users must be signed with valid certificates trusted by Microsoft. Vendors can obtain a Software Publisher Certificate from any trusted certificate authority authorized by Microsoft. This certificate is then cross-signed by Microsoft and the resulting cross-certificate is used to sign driver packages before the release. + +Linux kernel can also be configured to verify signatures of kernel modules being loaded and disallow untrusted ones. The set of public keys trusted by the kernel is fixed at the build time and is fully configurable. The strictness of checks performed by the kernel is also configurable at build time and ranges from simply issuing warnings for untrusted modules to refusing to load anything with doubtful validity. + +### 5. Conclusion + +As shown above, Windows and Linux device driver infrastructure have some things in common, such as approaches to API, but many more details are rather different. The most prominent differences stem from the fact that Windows is a closed-source operating system developed by a commercial corporation. This is what makes good, documented, stable driver ABI and formal frameworks a requirement for Windows while on Linux it would be more of a nice addition to the source code. Documentation support is also much more developed in Windows environment as Microsoft has resources necessary to maintain it. + +On the other hand, Linux does not constrain device driver developers with frameworks and the source code of the kernel and production device drivers can be just as helpful in the right hands. The lack of interface stability also has an implications as it means that up-to-date device drivers are always using the latest interfaces and the kernel itself carries lesser burden of backwards compatibility, which results in even cleaner code. + +Knowing these differences as well as specifics for each system is a crucial first step in providing effective driver development and support for your devices. We hope that this Windows and Linux device driver development comparison was helpful in understanding them, and will serve as a great starting point in your study of device driver development process. + +Download this article as ad-free PDF (made possible by [your kind donation][2]): [Download PDF][1] + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/linux-vs-windows-device-driver-model.html + +作者:[Dennis Turpitka][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/dennis +[1]: http://xmodulo.com/linux-vs-windows-device-driver-model.html?format=pdf +[2]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PBHS9R4MB9RX4 +[3]: http://xmodulo.com/build-kernel-module-dkms-linux.html +[4]: http://xmodulo.com/go/linux_device_driver_books +[5]: http://xmodulo.com/good-ide-for-c-cpp-linux.html From 1247bbd8f57d9b05f7fe568cc00ecbd198473ab8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 4 Jun 2016 18:35:42 +0800 Subject: [PATCH 1482/1710] =?UTF-8?q?20160604-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移动目录 --- .../20160531 Linux vs. Windows device driver model.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20160531 Linux vs. Windows device driver model.md (100%) diff --git a/sources/tech/20160531 Linux vs. Windows device driver model.md b/sources/talk/20160531 Linux vs. Windows device driver model.md similarity index 100% rename from sources/tech/20160531 Linux vs. Windows device driver model.md rename to sources/talk/20160531 Linux vs. Windows device driver model.md From 116ff7ff28f8849771e6a9079747fe7f43dfdc89 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 4 Jun 2016 18:44:27 +0800 Subject: [PATCH 1483/1710] =?UTF-8?q?20160604-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Turn Your Old Laptop into a Chromebook.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md diff --git a/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md b/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md new file mode 100644 index 0000000000..f447357e64 --- /dev/null +++ b/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md @@ -0,0 +1,121 @@ +Turn Your Old Laptop into a Chromebook +======================================== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-main.jpg?itok=gtzJVSq0) +>Learn how to install Chrome OS on your old computer with CloudReady. + +The year of Linux is here. According to [reports][1], Google sold more Chromebooks in the first quarter of 2016 than Apple sold Macbooks. And, Chromebooks are about to get even more exciting. During the Google I/O Summit, the company announced that the Google Play store for Android is coming to Chromebooks in mid June, which will allow users to run Android apps on their Chrome OS devices. + +But, you don’t have to buy a brand new laptop to use Chrome OS; you can now easily convert your old laptop or PC into a powerful Chromebook. I did this for a Dell Mini and a Dell laptop that I bought in 2009. Those two devices were collecting dust and were destined for freecycling, because modern operating systems and desktop environments like Unity, Plasma, and Gnome won’t run on them. + +If you have an old system lying around, you can easily convert it into a Chromebook. You can also dual-boot your laptop with Chrome OS, so you get the best of both worlds. + +Thanks to the open source base of Chrome OS, many solutions out there enable you to install the operating system on your device. I have tried several, but the solution I like most is CloudReady by [Neverware][2]. The company offers a free, community-supported version of the OS along with a commercially supported version for $49 per year, per device. The good part is that all licenses are transferable, so if you sell or donate the device, you can also transfer the Neverware license to the new user. + +### What You’ll Need + +Before you can get started installing CloudReady on your laptop, you will need some preparation: + +- A USB drive with 4GB or more storage + +- Open Chrome browser, go to Google Chrome Store and install [Chromebook Recovery Utility][3]. + +- Change BIOS settings of your target PC so it can boot from the USB + +### Get Started + +Neverware offers two images for CloudReady: 32 bit and 64 bit. [Download][4] the appropriate OS for your hardware from the download page. + +Extract the content of the downloaded zip file, and you will get a chromiumos_image.bin file. Now plug in the USB device and open the Chromebook recovery utility. Click on the gear at the top right corner of the tool and select erase recovery media (Figure 1). + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloudready-erase.png?itok=1si1QrCL) +>Figure 1: Select erase recovery media. [image:cloudready-erase] + +Next, choose the target USB drive and format it. Once formatted, go to the gear again, and this time select the use local image option. Now browse the extracted bin file, select the USB drive, click on continue, and then on the create button (Figure 2). It will start writing the image to the drive. + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloudready-create.png?itok=S1FGzRp-) +>Figure 2: Create CloudReady image. [Image:cloudready-create] + +Once the drive is ready with bootable CloudReady, plug it into the target PC and boot the system. It may take a while for the system to boot into Chromium OS. Once booted, you will see the screen shown in Figure 3. + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-install-1.jpg?itok=D6SjlIQ4) +>Figure 3: Ready to install CloudReady. + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/cloud-ready-install-single_crop.jpg?itok=My2rUjYC) +>Figure 4: Single-boot option. + +Go to the taskbar and click on Install CloudReady. + +You can dual boot your system between Chromium OS and another operating system, but the other OS should already be installed. + +To single boot (Figure 4) or dual boot (Figure 5) your system, choose the option in the next window. + +Just follow the click-next instructions. + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/cloud-ready-install-dual_crop.jpg?itok=Daywck_s) +>Figure 5: Dual-boot option. + +The entire process will take up to 20 minutes, depending on the storage media and the processing power. Once installed, the PC will shut down and reboot. + +After you reboot, you will be greeted with the network settings page (Figure 6). The exciting thing is that, although I had to install wireless drivers for Linux distributions on the same hardware, everything worked out of the box with Chromium OS. + +Once you connect to the wireless network, the system will look for updates and also offer to install Adobe Flash. Once the installation is finished, you will see the Chromium OS login screen. Now you can just log into your Gmail account and start using your “Chromebook” right away. + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-post-install-network.jpg?itok=gSX2fQZS) +>Figure 6: Network settings. + +### Get Netflix to Work + +If you want to play Netflix and other DRM protection-streaming sites, you do need to do some extra work. Go to settings and click on the Install Widevine plugin (Figure 7). + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/install_widevine.png?itok=bUJaRmyx0 +>Figure 7: Install Widevine. + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/user-agent-changer.jpg?itok=5QDCLrZk) +>Figure 8: Install User Agent Switcher. + +Now you need the good old trick of using a user agent switcher (Figure 8). + +Go to Chrome Webstore and install [User Agent Switcher][5]. Once the plugin is installed, it will be added to the bookmark bar of the browser. + +Right-click on the agent switcher icon and create a new entry (Figure 9): + +``` +Name: "CloudReady Widevine" + +String: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/16.10 Chrome/49.0.1453.93" + +Group: "Chrome" (should be filled automatically) + +Append: "Replace" + +Indicator Flag: "IE" + +Click "Add" +``` + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/spoof-netflix.png?itok=8DEZK4Pl) +>Figure 9: Create entry for CloudReady. + +Then, go to the “permanent spoof list” option and add CloudReady Widevine as the permanent string for [www.netflix.com]. + +Now, reboot your system, and you can watch Netflix and many other services. + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/learn/turn-your-old-laptop-chromebook + +作者:[SWAPNIL BHARTIYA][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/arnieswap +[1]: https://chrome.googleblog.com/2016/05/the-google-play-store-coming-to.html +[2]: http://www.neverware.com/#introtext-3 +[3]: https://chrome.google.com/webstore/detail/chromebook-recovery-utili/jndclpdbaamdhonoechobihbbiimdgai?hl=en +[4]: http://www.neverware.com/freedownload +[5]: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg + From f17f4be41233113da89f2b6b00d8e9bb4e9c9070 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 4 Jun 2016 18:49:31 +0800 Subject: [PATCH 1484/1710] =?UTF-8?q?20160604-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...31 Why Ubuntu-based Distros Are Leaders.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md diff --git a/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md b/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md new file mode 100644 index 0000000000..f83d0935be --- /dev/null +++ b/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md @@ -0,0 +1,63 @@ +Why Ubuntu-based Distros Are Leaders +========================================= + +Over the years, I've tried a number of great Linux distributions. The distros that had the greatest impact with me personally were those that maintained a strong community. But there's more to a popular distribution than a strong community. Popular Linux distributions tend to appeal to newcomers, often due to features that make using the distro easier. There are obviously exceptions to this, but generally speaking it is true. + +One distribution that comes to mind is [Ubuntu][1]. Built from a solid [Debian][2] base, Ubuntu has not only become an incredibly popular Linux distro, it's also made countless other distributions such as Linux Mint a reality. In this article, I'll explore why I believe Ubuntu wins the Linux distribution wars and how it's influenced Linux on the desktop as a whole. + +### Ubuntu is easy to use + +Before I first tried Ubuntu years ago, I preferred using the KDE desktop. At that time, it was simply the environment I had the most experience with. The main reason is that KDE was the most popular option among various newbie-friendly Linux distributions. Newbie-friendly distros like Knoppix, Simply Mepis, Xandros, Linspire, amongst others and all of them pointed their users towards the welcoming arms of KDE. + +At this time, KDE did what I needed it to do and I felt little reason to explore other desktop environments. Then one day after my Debian installation failed on me (due to my own user error), I decided to try out this "Ubuntu Dapper Drake" everyone was raving about. At that time, I was less than impressed with the screenshots I had seen, but figured it would be fun to try regardless. + +The biggest impression Ubuntu Dapper Drake made on me was how cleanly everything was laid out. Bear in mind, I came from the KDE world where there were fifteen ways to make one menu change. Ubuntu's implementation of GNOME was very minimalist. + +Flash forward to 2016 with the current 16.04 release: we have multiple Ubuntu flavors available, along with tons of distributions based on the Ubuntu base. The core thing all of these Ubuntu flavors and derivative distributions share in common is they're all designed to be easy to use. And when you're trying to grow your user base, stuff like this matters. + +### Ubuntu LTS + +In the past, I've almost always stuck with LTS releases for my main desktop. The x.10 releases were best left to my testing hard drive or perhaps even an old laptop. My reasons for this were simple – I had no interest in playing with short term releases on a production PC. I'm a busy guy and simply don't feel this is the best use of my time. + +Speaking for myself, I think Ubuntu offering LTS releases is one of the big reasons why the distribution has experienced such success. Think about it – offering folks a desktop Linux distro that will be fully supported for a long period of time has its advantages. To be fair, Ubuntu's not alone here, as there are other distros that do this as well. But I think this LTS strategy bundled with a newbie friendly environment has done Ubuntu a world of good. + +### Ubuntu Snap packages + +In the past, users once raved about the ability to get newer software titles onto their systems using PPAs (personal package archives). Unfortunately, this technology has its shortcomings. Issues like PPA abandonment to discovery are both common issues when working with random software titles. + +Then came the concept of [Snap packages][3]. Certainly not a completely new concept, as similar attempts have been made in the past. But what I think Snap will offer Ubuntu users in the long term is the ability to run the latest software without having to run the very latest Ubuntu release. While I still think we're seeing the early days of where Snap packages could end up, I'm excited at the prospect of bleeding edge software on a stable distribution release. + +The obvious downside is how much disk space Snap packages might potentially use if you're running a lot of software. Not only that, but most software for Ubuntu has yet to officially make the switch over from deb packages. The first issue is solved with ample hard drive space while the latter will simply be a waiting game. + +### Ubuntu Community + +I'm among the first to admit that all of the major Linux distributions have great communities. However, I firmly believe that Ubuntu's community might be the most diverse in terms of folks from different walks of life. For example, we have forums ranging from Apple hardware support to gaming. That's a particularly wide variety of specialized discussions. + +Going beyond the forums, Ubuntu also offers a highly defined community structure. This structure includes a council, technical board, [LoCo teams][4], and Developer Membership board. There are others, but these are the areas of the community structure that really stand out to me. + +Then we have [Ask Ubuntu][5]. In my view, this feature should replace seeking help from the forums as I find it to be far more likely you'll get useful information from this area. Not only that, solutions provided that are voted highly accurate might even make it into the official documentation. + +### Ubuntu's future + +I think Ubuntu's Unity interface has done little to increase desktop adoption. I understand why it was implemented, how it's making things easier for Ubuntu developers and whatnot. But in the end, I also believe it's paved the way for Ubuntu MATE and Linux Mint to increase in popularity as well. + +Another area that I wonder about is the future of Ubuntu's IRC and mailing lists. The fact is, neither lend themselves to bettering documentation like Ask Ubuntu can. As for mailing lists, I've always felt this was a painfully dated way to collaborate, but that's just me – others feel different and that's fine. + +What say you? Do you think Ubuntu will remain a major player going into the future? Perhaps you believe Arch, Linux Mint or others will dethrone Ubuntu in terms of popularity. Hit the Comments and give your favorite distribution a shout-out. If your favorite is based on Ubuntu, explain why you prefer it over Ubuntu proper. I think many of us can mutually agree that, if nothing else, Ubuntu makes a pretty popular base from which to build other distributions. + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/why-ubuntu-based-distros-are-leaders.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.ubuntu.com/ +[2]: https://www.debian.org/ +[3]: http://www.datamation.com/open-source/ubuntu-snap-packages-the-good-the-bad-the-ugly.html +[4]: http://loco.ubuntu.com/ +[5]: http://askubuntu.com/ From 681924b9814cb55345e0b12eb90b26bbb86beac3 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 4 Jun 2016 18:58:37 +0800 Subject: [PATCH 1485/1710] =?UTF-8?q?20160604-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lation Guide on Ubuntu Server 16.04 LTS.md | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md diff --git a/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md b/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md new file mode 100644 index 0000000000..d532b0b464 --- /dev/null +++ b/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md @@ -0,0 +1,159 @@ +LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS +========================================================= + +LAMP stack is a collection of free and open source softwares like **Linux**, Web Server (**Apache**), Database server (**MySQL / MariaDB**) and **PHP** (Scripting Language). LAMP is the platform which is required to install and build dynamic web sites and application like WordPress, Joomla, OpenCart and Drupal. + +In this article i will describe how to install LAMP on Ubuntu Server 16.04 LTS, As We know that Ubuntu is a Linux based Operating system, so it provides the first component of LAMP and i am assuming Ubuntu Server 16.04 is already installed on your system. + +### Installation of Web Server (Apache2) : + +In Ubuntu Linux Web server comes with the name Apache2, Use the beneath apt command to install it. + +``` +linuxtechi@ubuntu:~$ sudo apt update +linuxtechi@ubuntu:~$ sudo apt install apache2 -y +``` + +When Apache2 package is installed then its service is automatically started and enabled across the reboot, In case it is not started and enabled, use the following command : + +``` +linuxtechi@ubuntu:~$ sudo systemctl start apache2.service +linuxtechi@ubuntu:~$ sudo systemctl enable apache2.service +linuxtechi@ubuntu:~$ sudo systemctl status apache2.service +``` + +If Ubuntu firewall (ufw) is active, then allow the Web Server ports (80 and 443) in firewall using below commands. + +``` +linuxtechi@ubuntu:~$ sudo ufw status +Status: active +linuxtechi@ubuntu:~$ sudo ufw allow in 'Apache Full' +Rule added +Rule added (v6) +linuxtechi@ubuntu:~$ +``` + +### Access Web Server now : + +Open the Web browser and type the IP Address or Host name of your server (http://IP_Address_OR_Host_Name), In my Case my server IP is ‘192.168.1.13’ + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Apache2-Ubuntu-server-16.04-1024x955.jpg) + +### Installation of Data Base Server (MySQL Server 5.7) : + +MySQL and MariaDB are the database servers in Ubuntu 16.04. MySQL Server and MariaDB Server’s packages are available in the default repositories and we can install either of the database. Run the following apt command to install MySQL Server from terminal. + +``` +linuxtechi@ubuntu:~$ sudo apt install mysql-server mysql-client +``` + +During the installation, it will prompt us to set the root password of mysql server. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Enter-root-password-mysql-server-ubuntu-16-04.jpg) + +Confirm root password and click on ‘OK’ + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-root-password-mysql-server-ubuntu-16-04.jpg) + +Installation of MySQL Server is completed Now. MySQL Service will be started and enabled automatically.We can verify the MySQL Server’s service using below systemcl command : + +``` +linuxtechi@ubuntu:~$ sudo systemctl status mysql.service +``` + +### Installation of MariaDB Server : + +Use the beneath command to install MariaDB Server 10.0 from the terminal. + +``` +linuxtechi@ubuntu:~$ sudo apt install mariadb-server +``` + +Run the following command to set root password of mariadb and disable other options like disable remote login. + +``` +linuxtechi@ubuntu:~$ sudo mysql_secure_installation +``` + +### Installation of PHP ( Scripting Language ) : + +PHP 7.0 is available in the Ubuntu repositories. Execute the beneath command from the terminal to install PHP 7 : + +``` +linuxtechi@ubuntu:~$ sudo apt install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 +``` + +Create a sample php page and place it in apache document root (/var/ww/html) + +``` +linuxtechi@ubuntu:~$ vi samplepage.php + +``` + +Save and exit the file. + +``` +linuxtechi@ubuntu:~$ sudo mv samplepage.php /var/www/html/ +``` + +Now Access the sample PHP page from the Web Browser, type : “http:///samplepage.php” , You should get the page like below. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Sample-PHP-Page-Ubuntu-Server-16-04.jpg) + +Above Page shows that our PHP installation is completed successfully. + +### Installation of phpMyAdmin : + +phpMyAdmin allows us to perform all the database related administrative and other DB operation task from its web interface. Its package is already listed in the Ubuntu server repositories. + +Use the below commands to Install phpMyAdmin on Ubuntu server 16.04 LTS. + +``` +linuxtechi@ubuntu:~$ sudo apt install php-mbstring php7.0-mbstring php-gettext +linuxtechi@ubuntu:~$ sudo systemctl restart apache2.service +linuxtechi@ubuntu:~$ sudo apt install phpmyadmin +``` + +During its installation it will prompt us to choose the Web server to be configured for phpMyAdmin. + +Select Apache2 and Click on OK. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Web-Server-for-phpMyAdmin-Ubuntu-Server-16-04.jpg) + +Click on ‘Yes’ to Configure database for phpMyAdmin. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/configure-database-for-phpmyadmin-ubuntu-server-16-04.jpg) + +Specify the password for phpMyAdmin to register with Database Server. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Select-Password-for-phpMyadmin-ubuntu-16-04-1024x433.jpg) + +Confirm the password for phpMyAdmin and then click on ‘OK’ + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-password-for-phpmyadmin-ubuntu-server-16-04.jpg) + +Now try to access the phpMyAdmin, open the browser type : “http://Server_IP_OR_Host_Name/phpmyadmin” + +Use the user name as ‘root’ and password that we set during the installation. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-Ubuntu-Server-16-04-1024x557.jpg) + +When we click on ‘Go’, it will redirect the page to ‘phpMyAdmin’ Web interface as shown below. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-portal-overview-ubuntu-server-16-04-1024x557.jpg) + +That’s it, LAMP stack is successfully installed and is ready for use 🙂 . Please share your feedback and comments. + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/lamp-stack-installation-on-ubuntu-server-16-04/ + +作者:[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 c033eaba24eac750cbe0c4499a70b78ff6bf105f Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 4 Jun 2016 21:09:17 +0800 Subject: [PATCH 1486/1710] [translating]Turn Your Old Laptop into a Chromebook --- sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md b/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md index f447357e64..a7413e72e6 100644 --- a/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md +++ b/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md @@ -1,3 +1,5 @@ +alim0x translating + Turn Your Old Laptop into a Chromebook ======================================== From 1c6c356e4fe999dff753e04121d9667b8056857b Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 4 Jun 2016 22:47:21 +0800 Subject: [PATCH 1487/1710] [translated]Turn Your Old Laptop into a Chromebook --- ... Turn Your Old Laptop into a Chromebook.md | 123 ------------------ ... Turn Your Old Laptop into a Chromebook.md | 121 +++++++++++++++++ 2 files changed, 121 insertions(+), 123 deletions(-) delete mode 100644 sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md create mode 100644 translated/tech/20160527 Turn Your Old Laptop into a Chromebook.md diff --git a/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md b/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md deleted file mode 100644 index a7413e72e6..0000000000 --- a/sources/tech/20160527 Turn Your Old Laptop into a Chromebook.md +++ /dev/null @@ -1,123 +0,0 @@ -alim0x translating - -Turn Your Old Laptop into a Chromebook -======================================== - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-main.jpg?itok=gtzJVSq0) ->Learn how to install Chrome OS on your old computer with CloudReady. - -The year of Linux is here. According to [reports][1], Google sold more Chromebooks in the first quarter of 2016 than Apple sold Macbooks. And, Chromebooks are about to get even more exciting. During the Google I/O Summit, the company announced that the Google Play store for Android is coming to Chromebooks in mid June, which will allow users to run Android apps on their Chrome OS devices. - -But, you don’t have to buy a brand new laptop to use Chrome OS; you can now easily convert your old laptop or PC into a powerful Chromebook. I did this for a Dell Mini and a Dell laptop that I bought in 2009. Those two devices were collecting dust and were destined for freecycling, because modern operating systems and desktop environments like Unity, Plasma, and Gnome won’t run on them. - -If you have an old system lying around, you can easily convert it into a Chromebook. You can also dual-boot your laptop with Chrome OS, so you get the best of both worlds. - -Thanks to the open source base of Chrome OS, many solutions out there enable you to install the operating system on your device. I have tried several, but the solution I like most is CloudReady by [Neverware][2]. The company offers a free, community-supported version of the OS along with a commercially supported version for $49 per year, per device. The good part is that all licenses are transferable, so if you sell or donate the device, you can also transfer the Neverware license to the new user. - -### What You’ll Need - -Before you can get started installing CloudReady on your laptop, you will need some preparation: - -- A USB drive with 4GB or more storage - -- Open Chrome browser, go to Google Chrome Store and install [Chromebook Recovery Utility][3]. - -- Change BIOS settings of your target PC so it can boot from the USB - -### Get Started - -Neverware offers two images for CloudReady: 32 bit and 64 bit. [Download][4] the appropriate OS for your hardware from the download page. - -Extract the content of the downloaded zip file, and you will get a chromiumos_image.bin file. Now plug in the USB device and open the Chromebook recovery utility. Click on the gear at the top right corner of the tool and select erase recovery media (Figure 1). - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloudready-erase.png?itok=1si1QrCL) ->Figure 1: Select erase recovery media. [image:cloudready-erase] - -Next, choose the target USB drive and format it. Once formatted, go to the gear again, and this time select the use local image option. Now browse the extracted bin file, select the USB drive, click on continue, and then on the create button (Figure 2). It will start writing the image to the drive. - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloudready-create.png?itok=S1FGzRp-) ->Figure 2: Create CloudReady image. [Image:cloudready-create] - -Once the drive is ready with bootable CloudReady, plug it into the target PC and boot the system. It may take a while for the system to boot into Chromium OS. Once booted, you will see the screen shown in Figure 3. - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-install-1.jpg?itok=D6SjlIQ4) ->Figure 3: Ready to install CloudReady. - -![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/cloud-ready-install-single_crop.jpg?itok=My2rUjYC) ->Figure 4: Single-boot option. - -Go to the taskbar and click on Install CloudReady. - -You can dual boot your system between Chromium OS and another operating system, but the other OS should already be installed. - -To single boot (Figure 4) or dual boot (Figure 5) your system, choose the option in the next window. - -Just follow the click-next instructions. - -![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/cloud-ready-install-dual_crop.jpg?itok=Daywck_s) ->Figure 5: Dual-boot option. - -The entire process will take up to 20 minutes, depending on the storage media and the processing power. Once installed, the PC will shut down and reboot. - -After you reboot, you will be greeted with the network settings page (Figure 6). The exciting thing is that, although I had to install wireless drivers for Linux distributions on the same hardware, everything worked out of the box with Chromium OS. - -Once you connect to the wireless network, the system will look for updates and also offer to install Adobe Flash. Once the installation is finished, you will see the Chromium OS login screen. Now you can just log into your Gmail account and start using your “Chromebook” right away. - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-post-install-network.jpg?itok=gSX2fQZS) ->Figure 6: Network settings. - -### Get Netflix to Work - -If you want to play Netflix and other DRM protection-streaming sites, you do need to do some extra work. Go to settings and click on the Install Widevine plugin (Figure 7). - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/install_widevine.png?itok=bUJaRmyx0 ->Figure 7: Install Widevine. - -![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/user-agent-changer.jpg?itok=5QDCLrZk) ->Figure 8: Install User Agent Switcher. - -Now you need the good old trick of using a user agent switcher (Figure 8). - -Go to Chrome Webstore and install [User Agent Switcher][5]. Once the plugin is installed, it will be added to the bookmark bar of the browser. - -Right-click on the agent switcher icon and create a new entry (Figure 9): - -``` -Name: "CloudReady Widevine" - -String: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/16.10 Chrome/49.0.1453.93" - -Group: "Chrome" (should be filled automatically) - -Append: "Replace" - -Indicator Flag: "IE" - -Click "Add" -``` - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/spoof-netflix.png?itok=8DEZK4Pl) ->Figure 9: Create entry for CloudReady. - -Then, go to the “permanent spoof list” option and add CloudReady Widevine as the permanent string for [www.netflix.com]. - -Now, reboot your system, and you can watch Netflix and many other services. - - --------------------------------------------------------------------------------- - -via: https://www.linux.com/learn/turn-your-old-laptop-chromebook - -作者:[SWAPNIL BHARTIYA][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/arnieswap -[1]: https://chrome.googleblog.com/2016/05/the-google-play-store-coming-to.html -[2]: http://www.neverware.com/#introtext-3 -[3]: https://chrome.google.com/webstore/detail/chromebook-recovery-utili/jndclpdbaamdhonoechobihbbiimdgai?hl=en -[4]: http://www.neverware.com/freedownload -[5]: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg - diff --git a/translated/tech/20160527 Turn Your Old Laptop into a Chromebook.md b/translated/tech/20160527 Turn Your Old Laptop into a Chromebook.md new file mode 100644 index 0000000000..3c7038a2a2 --- /dev/null +++ b/translated/tech/20160527 Turn Your Old Laptop into a Chromebook.md @@ -0,0 +1,121 @@ +把你的旧笔记本变成 Chromebook +======================================== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-main.jpg?itok=gtzJVSq0) +>学习如何用 CloudReady 在你的旧电脑上安装 Chrome OS + +Linux 之年就在眼前。根据[报道][1],Google 在 2016 年第一季度卖出了比苹果卖出的 Macbook 更多的 Chromebook。并且,Chromebook 即将变得更加激动人心。在 Google I/O 大会上,Google 宣布安卓 Google Play 商店将在 6 月中旬来到 Chromebook,这让用户能够在他们的 Chrome OS 设备上运行安卓应用。 + +但是,你不需要购买一台全新的使用 Chrome OS 的笔记本,你可以轻松地将你的旧笔记本或电脑转换成强大的 Chromebook。我在一台 Dell Mini 和一台 2009 年购买的 Dell 笔记本上进行了尝试。那两台设备都在吃灰,而且本来注定是要被回收的,因为现代的操作系统和桌面环境,比如 Unity,Plasma 以及 Gnome 它们跑不动。 + +如果你手边有旧设备,你可以轻松地将它变成 Chromebook。你还可以在你的笔记本上安装 Chrome OS 双系统,这样你就可以同时享受不同系统的优点了。 + +多亏了 Chrome OS 的开源基础,有很多方案可以让你在你的设备上安装 Chrome OS。我试过几个,但我最喜欢的方案是 [Neverware][2] 的 CloudReady。这家公司提供一个免费的,社区支持版的系统,还有一个商业支持版,每台设备每年 49 美元。好消息是所有的授权都是可转移的,所以如果你卖掉或捐掉了设备,你也可以将 Neverware 授权转让给新用户。 + +### 你需要什么 + +在你开始在笔记本上安装 CloudReady 之前,你需要一些准备: + +- 一个容量大于等于 4GB 的 USB 存储设备 + +- 打开 Chrome 浏览器,到 Google Chrome Store 去安装 [Chromebook Recovery Utility(Chrome 恢复工具)][3] + +- 更改目标机器的 BIOS 设置以便能从 USB 启动 + +### 开始 + +Neverware 提供两个版本的 CloudReady 镜像:32 位和 64 位。从下载页面[下载][4]合适你硬件的系统版本。 + +解压下载的 zip 文件,你会得到一个 chromiumos_image.bin 文件。现在插入 U 盘并打开 Chromebook recovery utility。点击工具右上角的齿轮,选择 erase recovery media(擦除恢复媒介,如图 1)。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloudready-erase.png?itok=1si1QrCL) +>图 1:选择 erase recovery media。[image:cloudready-erase] + +接下来,选择目标 USB 驱动器并把它格式化。格式化完成后,再次打开右上齿轮,这次选择 use local image(使用本地镜像)。浏览解压的 bin 文件并选中,选好 USB 驱动器,点击继续,然后点击创建按钮(图 2)。它会开始将镜像写入驱动器。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloudready-create.png?itok=S1FGzRp-) +>图 2:创建 CloudReady 镜像。[Image:cloudready-create] + +驱动器写好可启动的 CloudReady 之后,插到目标 PC 上并启动。系统启动进 Chromium OS 需要一小段时间。启动之后,你会看到图 3 中的界面。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-install-1.jpg?itok=D6SjlIQ4) +>图 3:准备好安装 CloudReady。 + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/cloud-ready-install-single_crop.jpg?itok=My2rUjYC) +>图 4:单系统选项。 + +到任务栏选择 Install CloudReady(安装 CloudReady)。 + +你可以安装 Chromium OS 和其它系统的双系统启动,但另一个系统这时应该已经安装好了。 + +在下一个窗口选择单系统(图 4)或是双系统(图 5)。 + +按照下一步按钮说明选择安装。 + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/cloud-ready-install-dual_crop.jpg?itok=Daywck_s) +>图 5:双系统选项。 + +整个过程最多 20 分钟左右,这取决于存储媒介和处理能力。安装完成后,电脑会关闭并重启。 + +重启之后,你会看到网络设置页面(图 6)。让人激动的是,虽然我在相同硬件上要给 Linux 发行版安装无线驱动,到了 Chromium OS 这里是开箱即用的。 + +你连上无线网络之后,系统会自动查找更新并提供 Adobe Flash 安装。安装完成后,你会看到 Chromium OS 登录界面。现在你只需登录你的 Gmail 账户,开始使用你的“Chromebook”即可。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/cloud-ready-post-install-network.jpg?itok=gSX2fQZS) +>图 6:网络设置。 + +### 让 Netflix 正常工作 + +如果你想要播放 Netflix 或其它 DRM 保护流媒体站点,你需要做一些额外的工作。转到设置并点击安装 Widevine 插件(图 7)。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/install_widevine.png?itok=bUJaRmyx0) +>图 7:安装 Widevine。 + +![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/user-agent-changer.jpg?itok=5QDCLrZk) +>图 8:安装 User Agent Switcher. + +现在你需要使用 user agent switcher 这个伎俩(图 8)。 + +到 Chrome Webstore 去安装 [User Agent Switcher][5]。插件安装完成后,它会自动添加到浏览器的书签栏。 + +右键点击 agent switcher 图标并创建一个新条目(图 9): + +``` +Name: "CloudReady Widevine" + +String: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/16.10 Chrome/49.0.1453.93" + +Group: "Chrome" (应该被自动填上了) + +Append: "Replace" + +Indicator Flag: "IE" + +``` + +点击“添加(Add)”。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/spoof-netflix.png?itok=8DEZK4Pl) +>图 9:为 CloudReady 创建条目。 + +然后,到“permanent spoof list(永久欺骗列表)”选项中将 CloudReady Widevine 添加为 [www.netflix.com](http://www.netflix.com) 的永久 UA 串。 + +现在,重启机器,你就可以观看 Netflix 和其它一些服务了。 + + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/learn/turn-your-old-laptop-chromebook + +作者:[SWAPNIL BHARTIYA][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/arnieswap +[1]: https://chrome.googleblog.com/2016/05/the-google-play-store-coming-to.html +[2]: http://www.neverware.com/#introtext-3 +[3]: https://chrome.google.com/webstore/detail/chromebook-recovery-utili/jndclpdbaamdhonoechobihbbiimdgai?hl=en +[4]: http://www.neverware.com/freedownload +[5]: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg From d2c13ee4a8bbc860f9b822ca8b878ca97debeb3a Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Sun, 5 Jun 2016 16:00:23 +0800 Subject: [PATCH 1488/1710] translated --- ...nfessions of a cross-platform developer.md | 76 ------------- ...nfessions of a cross-platform developer.md | 103 ++++++++++++++++++ 2 files changed, 103 insertions(+), 76 deletions(-) delete mode 100644 sources/talk/20160505 Confessions of a cross-platform developer.md create mode 100644 translated/talk/20160505 Confessions of a cross-platform developer.md diff --git a/sources/talk/20160505 Confessions of a cross-platform developer.md b/sources/talk/20160505 Confessions of a cross-platform developer.md deleted file mode 100644 index 0f6af84070..0000000000 --- a/sources/talk/20160505 Confessions of a cross-platform developer.md +++ /dev/null @@ -1,76 +0,0 @@ -vim-kakali translating - - - -Confessions of a cross-platform developer -============================================= - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/business_clouds.png?itok=cucHuJnU) - -[Andreia Gaita][1] is giving a talk at this year's OSCON, titled [Confessions of a cross-platform developer][2]. She's a long-time open source and [Mono][3] contributor, and develops primarily in C#/C++. Andreia works at GitHub, where she's focused on building the GitHub Extension manager for Visual Studio. - -I caught up with Andreia ahead of her talk to ask about cross-platform development and what she's learned in her 16 years as a cross-platform developer. - -![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) - -**What languages have you found easiest and hardest to develop cross-platform code for?** - -It's less about which languages are good and more about the libraries and tooling available for those languages. The compilers/interpreters/build systems available for languages determine how easy it is to do cross-platform work with them (or whether it's even possible), and the libraries available for UI and native system access determine how deep you can integrate with the OS. With that in mind, I found C# to be the best for cross-platform work. The language itself includes features that allow fast native calls and accurate memory mapping, which you really need if you want your code to talk to the OS and native libraries. When I need very specific OS integration, I switch to C or C++. - -**What cross-platform toolkits/abstractions have you used?** - -Most of my cross-platform work has been developing tools, libraries and bindings for other people to develop cross-platform applications with, mostly in Mono/C# and C/C++. I don't get to use a lot of abstractions at that level, beyond glib and friends. I mostly rely on Mono for any cross-platform app that includes a UI, and Unity3D for the occasional game development. I play with Electron every now and then. - -**What has been your approach to build systems, and how does this vary by language or platform?** - -I try to pick the build system that is most suited for the language(s) I'm using. That way, it'll (hopefully) give me less headaches. It needs to allow for platform and architecture selection, be smart about build artifact locations (for multiple parallel builds), and be decently configurable. Most of the time I have projects combining C/C++ and C# and I want to build all the different configurations at the same time from the same source tree (Debug, Release, Windows, OSX, Linux, Android, iOS, etc, etc.), and that usually requires selecting and invoking different compilers with different flags per output build artifact. So the build system has to let me do all of this without getting (too much) in my way. I try out different build systems every now and then, just to see what's new, but in the end, I end up going back to makefiles and a combination of either shell and batch scripts or Perl scripts for driving them (because if I want users to build my things, I'd better pick a command line script language that is available everywhere). - -**How do you balance the desire for native look and feel with the need for uniform user interfaces?** - -Cross-platform UI is hard! I've implemented several cross-platform GUIs over the years, and it's the one thing for which I don't think there's an optimal solution. There's basically two options. You can pick a cross-platform GUI toolkit and do a UI that doesn't feel quite right in all the platforms you support, with a small codebase and low maintenance cost. Or you can choose to develop platform-specific UIs that will look and feel native and well integrated with a larger codebase and higher maintenance cost. The decision really depends on the type of app, how many features it has, how many resources you have, and how many platforms you're shipping to. - -In the end, I think there's an increase in users' tolerance for "One UI To Rule Them All" with frameworks like Electron. I have a Chromium+C+C# framework side project that will one day hopefully allow me build Electron-style apps in C#, giving me the best of both worlds. - -**Has building/packaging dependencies been an issue for you?** - -I'm very conservative about my use of dependencies, having been bitten so many times by breaking ABIs, clashing symbols, and missing packages. I decide which OS version(s) I'm targeting and pick the lowest common denominator release available of a dependency to minimize issues. That usually means having five different copies of Xcode and OSX Framework libraries, five different versions of Visual Studio installed side-to-side on the same machine, multiple clang and gcc versions, and a bunch of VMs running various other distros. If I'm unsure of the state of packages in the OS I'm targeting, I will sometimes link statically and sometimes submodule dependencies to make sure they're always available. And most of all, I avoid the bleeding edge unless I really, really need something there. - -**Do you use continuous integration, code review, and related tools?** - -All the time! It's the only way to keep sane. The first thing I do on a project is set up cross-platform build scripts to ensure everything is automateable as early as possible. When you're targeting multiple platforms, CI is essential. It's impossible for everyone to build all the different combinations of platforms in one machine, and as soon as you're not building all of them you're going to break something without being aware of it. In a shared multi-platform codebase, different people own different platforms and features, so the only way to guarantee quality is to have cross-team code reviews combined with CI and other analysis tools. It's no different than other software projects, there's just more points of failure. - -**Do you rely on automated build testing, or do you tend to build on each platform and test locally?** - -For tools and libraries that don't include UIs, I can usually get away with automated build testing. If there's a UI, then I need to do both—reliable, scriptable UI automation for existing GUI toolkits is rare to non-existent, so I would have to either invest in creating UI automation tools that work across all the platforms I want to support, or I do it manually. If a project uses a custom UI toolkit (like, say, an OpenGL UI like Unity3D does), then it's fairly easy to develop scriptable automation tools and automate most of that stuff. Still, there's nothing like the human ability to break things with a couple of clicks! - -**If you are developing cross-platform, do you support cross-editor build systems so that you can use Visual Studio on Windows, Qt Creator on Linux, and XCode on Mac? Or do you tend toward supporting one platform such as Eclipse on all platforms?** - -I favor cross-editor build systems. I prefer generating project files for different IDEs (preferably in a way that makes it easier to add more IDEs), with build scripts that can drive builds from the IDEs for the platform they're on. Editors are the most important tool for a developer. It takes time and effort to learn them, and they're not interchangeable. I have my favorite editors and tools, and everyone else should be able to use their favorite tool, too. - -**What is your preferred editor/development environment/IDE for cross-platform development?** - -The cross-platform developer is cursed with having to pick the lowest common denominator editor that works across the most platforms. I love Visual Studio, but I can't rely on it for anything except Windows work (and you really don't want to make Windows your primary cross-compiling platform), so I can't make it my primary IDE. Even if I could, an essential skill of cross-platform development is to know and use as many platforms as possible. That means really knowing them—using the platform's editors and libraries, getting to know the OS and its assumptions, behaviors, and limitations, etc. To do that and keep my sanity (and my shortcut muscle memory), I have to rely on cross-platform editors. So, I use Emacs and Sublime. - -**What are some of your favorite past and current cross-platform projects?** - -Mono is my all-time favorite, hands down, and most of the others revolve around it in some way. Gluezilla was a Mozilla binding I did years ago to allow C# apps to embed web browser views, and that one was a doozy. At one point I had a Winforms app, built on Linux, running on Windows with an embedded GTK view in it that was running a Mozilla browser view. The CppSharp project (formerly Cxxi, formerly CppInterop) is a project I started to generate C# bindings for C++ libraries so that you could call, create instances of, and subclass C++ classes from C#. It was done in such a way that it would detect at runtime what platform you'd be running on and what compiler was used to create the native library and generate the correct C# bindings for it. That was fun! - -**Where do you see cross-platform development heading in the future?** - -The way we build native applications is already changing, and I feel like the visual differences between the various desktop operating systems are going to become even more blurred so that it will become easier to build cross-platform apps that integrate reasonably well without being fully native. Unfortunately, that might mean applications will be worse in terms of accessibility and less innovative when it comes to using the OS to its full potential. Cross-platform development of tools, libraries, and runtimes is something that we know how to do well, but there's still a lot of work to do with cross-platform application development. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/5/oscon-interview-andreia-gaita - -作者:[Marcus D. Hanwell ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mhanwell -[1]: https://twitter.com/sh4na -[2]: http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/48702 -[3]: http://www.mono-project.com/ diff --git a/translated/talk/20160505 Confessions of a cross-platform developer.md b/translated/talk/20160505 Confessions of a cross-platform developer.md new file mode 100644 index 0000000000..611ccf506c --- /dev/null +++ b/translated/talk/20160505 Confessions of a cross-platform developer.md @@ -0,0 +1,103 @@ + +一位跨平台开发者的自白 +============================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/business_clouds.png?itok=cucHuJnU) + +Andreia Gaita[1]将会在OSCON开源大会上发表一个题为[跨平台开发者的自白][2]的演讲。她长期从事于开源工作,并且为Mono[3]【译者注:一个致力于开创.NET在Linux上使用的开源工程】工程做着贡献。Andreia任职于GitHub,她的工作是专注于为Visual Studio构建github上的可扩展管理器。 + + +我在她发表演讲前就迫不及待的想要问她一些关于跨平台开发的事,作为一名跨平台开发者,她已经有了16年的学习经验了。 + +![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) + + +**在你跨平台工作的过程中,你使用过的最简单的和最难的代码语言是什么?** + + +很少讨论某种语言的好坏,大多数是关于对于这种语言的库和工具的易用性。编译器、解释器以及构建器语言决定了用它们做跨平台开发的难易程度(不论它是否可能),能够实现UI和本地系统访问的函数库的可用性都决定了开发时兼容操作系统的程度。如果这样想,我认为C#最适合完成跨平台开发工作。这种语言有它自己的特色,它允许本地快速唤醒和精确的内存地址;如果你希望你的代码能够与系统和本地函数库进行交互,那么你就会需要C#。当我需要特殊的系统集成的时候,我就会切换到C或者C++。 + + +**你使用的跨平台开发工具或者抽象有哪些?** + +我的大部分跨平台工作都是为其他人开发工具和库,然后把它们组合起来开发跨平台的应用程序,其中大多用到MONO/C#。说真的,我不太懂抽象。大多数时候,我依赖Mono去完成一个跨平台的app开发以及它的UI,或者一个偶然的游戏开发中的Unity3D部分。我经常使用Electron【译者注:Atom编辑器的兄弟项目,可以用Electron开发桌面应用】。 + + + +**你接触过哪些构建系统?它们之间的区别是由于语言还是平台的不同?** + + +我试着选择适合我使用语言的构建系统。那样 ,就会很少遇到让我头疼的问题。它需要支持平台和体系结构间的选择、构建智能工件位置(多个并行构建)以及易配置性等。大多数时候,我的项目会结合C/C++和C#,同时我也想要为一些开源分支构建相应的配置环境(Debug, Release, Windows, OSX, Linux, Android, iOS, etc, etc.)),通常也需要为每个构建的智能工件选择带有不同标志的编译器。所以我不得不做很多工作,而这种以我的方式进行的工作并没有很多收获。我时常尝试着用不同的构建系统,仅仅是想了解到最新的情况,但是最终我还是回到使用makefile的情况,采用shell和批处理脚本之一与Perl脚本相结合的方式,以达到使用他们的目的(因为如果我想用户去做很多我做的事情,我还是最好选择一种命令行脚本语言,这样它在哪里都可以用)。 + + + +**你怎样平衡在这种统一用户接口视觉体验需求上的强烈渴望呢?** + + + +用户接口的跨平台实现很困难。在过去几年中我已经使用了一些跨平台GUI,并且我认为一些问题没有最优解。那些问题都基于两种操作,你也可以选择一个跨平台工具去做一个UI,去用你所喜欢的所有的平台,这样感觉不是太对,用小的代码库和比较低的维护费用。或者你可以选择去开发一个特有平台的UI,那样看起来就会是很本地化并且能很好的使其与一个大型的代码库结合,也会有很高的维护费用。这种决定完全取决于APP的类型。它的特色在哪里呢?你有什么资源?你可以把它运行在多少平台上? + + +最后,我认为用户对于这种框架性的“一个UI统治所有”的UI的容忍度更大了,就比如Electron。我曾经有个Chromium+C+C#的框架侧项目,并且希望我在一天内用C#构建Electron型的app,这样的话我就可以做到两全其美了。 + + + **你对构建或者打包有依赖性吗 ?** + + + 我很少谈及依赖性问题。很多次我都被ABI【译者注:应用程序二进制接口】的崩溃、存在冲突的征兆以及包的丢失问题所困扰。我决定我要使用的操作系统的版本,都是选择最低的依赖去使问题最小化。通常这就意味着有五种不同的Xcode的副本和OSX框架库 ,在同样的机器上有五种不同的Visual Studio版本需要相应的被安装,多种clang【译者注:C语言、C++、Object-C、C++语言的轻量级编译器】和gcc版本,一系列的可以运行的其他的VM版本。如果我不能确定我要使用的操作系统的包的规定,我时常会连接静态库与子模块之间的依赖确保它们一直可用。大多时候,我会避免这些很棘手的问题,除非我非常需要使用他们。 + + + **你使用能够持续集成的、代码重读的相关工具吗?** + + 基本每天都用。这是保持高效的唯一方式。我在一个项目中做的第一件事情是配置跨平台构建脚本,保证每件事尽可能自动化完成。当你想要使用多平台的时候,CI【译者注:持续集成】是至关重要的。在一个机器上,没有人能结合所有的不同的平台。并且一旦你的构建过程没有包含所有的平台,你就不会注意到你搞砸的事情。在一个共享的多平台代码库中 ,不同的人拥有不同的平台和特征,所以仅有的方法是保证跨团队浏览代码时结合CI和其他分析工具的公平性。这不同于其他的软件项目,如果不使用相关的工具就只有失败了。 + + + **你依赖于自动构建测试或者趋向于在每个平台上构建并且进行局部测试吗?** + + + 对于不包括UI的工具和库,我通常能够侥幸完成自动构建测试。如果那是一个UI,两种方法我都会用到——做一个可靠的,可自动编写脚本的UI,因为基本没有GUI工具,所以我不得不在去创建UI自动化工具,这种工具可以工作在所有的我用到的平台上,或者我也可以手动完成。如果一个项目使用一个定制的UI工具(一个像Unity3D那样做的OpenGL UI ),开发自动化的可编写脚本工具和更多的自动化工具就相当容易。不过,没有什么东西会像人类一样通过双击而搞砸事情。 + + + + **如果你要做跨平台开发,你想要在不同的平台上使用不同的编辑器,比如在Windows上使用Visual Studio,在Linux上使用Qt Creator,在Mac上使用XCode吗?还是你更趋向于使用Eclipse这样的可以在所有平台上使用的编辑器?** + + + + 我喜欢使用不同的编辑器构建系统。我更喜欢在不同的带有构建脚本的IDE上保存项目文件(可以使增加IDE变得更容易),这些脚本可以为他们支持的平台去驱动IDE开始工作。对于一个开发者来说编辑器是最重要的工具,开发者花费时间和精力去学习使用各种编辑器,但是它们都不能相互替代。我使用我最喜欢的编辑器和工具,每个人也应该能使用他们最喜爱的工具。 + + + + **在跨平台开发的时候,你更喜欢使用什么开发环境和IDE呢?** + + + 跨平台开发者好像被诅咒一样,他们不得不选择小众化的编辑器去完成大多数跨平台的工作。我爱用Visual Studio,但是我不能依赖它完成除windows平台外的工作(你可能不想让windows成为你的初级交叉编译平台,所以我不会使用它作为我的初级集成开发环境。即使我这么做了,跨平台开发者的潜意识也知道有可能会用到很多平台。这就意味着必须很熟悉他们——使用一种平台上的编辑器就必须知道这种操作系统的设置,运行方式以及它的局限性等。做这些事情就需要头脑清醒(我的捷径是加强记忆),我不得不依赖于跨平台编辑器。所以我使用Emacs 和Sublime。 + + + + **你最喜欢的过去跨平台项目是什么**? + + + 我一直很喜欢Mono,并且得心应手,在一些开发中大多数的项目都是用一些方法围绕着它进行的。Gluezilla曾经是我在多年前开发的一个Mozilla【译者注:Mozilla基金会,为支持和领导开源Mozilla项目而设立的非营利组织】结合器,可以C#开发的app嵌入到web浏览器试图中,并且看起来很明显。在这一点上,我开发过一个窗体app,它是在linux上开发的,它运行在带有一个嵌入GTK试图的windows系统上,并且这个系统将会运行一个Mozilla浏览器试图。CppSharp项目(以前叫做Cxxi,更早时叫做CppInterop)是一个我开始结合绑定有C#的C++库的项目,这样就可以唤醒和创建实例来把C#结合到C++中。这样做的话,它在运行的时候就能够发现所使用的平台以及用来创建本地运行库的编译器;而且还为它生成正确的C#绑定。这多么有趣啊。 + + + **你怎样看跨平台开发的未来趋势呢?** + + + 我们构建本地应用程序的方式已经改变了,我觉得在各种桌面操作系统之间存在差异,而且这种差异将会变得更加微妙;所以构建跨平台的应用程序将会更加容易,而且这种应用程序即使没有在本平台也可以完全兼容。不好的是,这可能意味着应用程序很难获得,并且当在操作系统上使用的时候功能得不到最好的发挥。我们知道怎样把库和工具以及运行环境的跨平台开发做的更好,但是跨平台应用程序的开发仍然需要我们的努力。 + + + -------------------------------------------------------------------------------- + + via: https://opensource.com/business/16/5/oscon-interview-andreia-gaita + + 作者:[Marcus D. Hanwell ][a] + 译者:[vim-kakali](https://github.com/vim-kakali) + 校对:[校对者ID](https://github.com/校对者ID) + + 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + [a]: https://opensource.com/users/mhanwell + [1]: https://twitter.com/sh4na + [2]: http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/48702 + [3]: http://www.mono-project.com/ + From b4d7ad6ef78775abd7592b94701451be5d5b7300 Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Sun, 5 Jun 2016 16:16:22 +0800 Subject: [PATCH 1489/1710] vim-kakali translating --- sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md b/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md index f83d0935be..d038db6cfa 100644 --- a/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md +++ b/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md @@ -1,3 +1,5 @@ +vim-kakali translating + Why Ubuntu-based Distros Are Leaders ========================================= From 2018b9f70072dcee76a6b0706d328ba39494253f Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 17:12:25 +0800 Subject: [PATCH 1490/1710] =?UTF-8?q?20160605-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/20160601 Apps to Snaps.md | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sources/tech/20160601 Apps to Snaps.md diff --git a/sources/tech/20160601 Apps to Snaps.md b/sources/tech/20160601 Apps to Snaps.md new file mode 100644 index 0000000000..fb7e712de9 --- /dev/null +++ b/sources/tech/20160601 Apps to Snaps.md @@ -0,0 +1,61 @@ +Apps to Snaps +================ + +![](https://insights.ubuntu.com/wp-content/uploads/27eb/app-snap.png) + +Distributing applications on Linux is not always easy. You have different packaging formats, base systems, available libraries, and distribution release cadences all of which contribute to the headache. But now we have something much simpler: Snaps. + +Snaps are a new way for developers to package their applications, bringing with it many advantages over the more traditional package formats such as .deb, .rpm, and others. Snaps are secure, isolated from each other and the host system using technologies such as AppArmor, they are cross-platform, and they are self-contained, allowing a developer to package the exact software their application needs. This sandboxed isolation also improves security and allows applications, and whole snap-based systems, to be rolled back should an issue occur. Snaps really are the future of Linux application packaging. + +Creating a snap is not difficult. First, you need the snap-based runtime environment that is able to understand and execute snaps on your desktop; this tool is named snapd and comes as default on all Ubuntu 16.04 systems. Next you need the tool to create snaps, Snapcraft, which can be installed simply with: + +``` +$ sudo apt-get install snapcraft +``` + +Once you have this environment available it is time to get snapping. + +Snaps use a special YAML formatted file named snapcraft.yaml that defines how the application is packaged as well as any dependencies it may have. Taking a simple application to demonstrate this point, the following YAML file is a real example of how to snap the moon-buggy game, available from the Ubuntu archive. + +``` +name: moon-buggy +version: 1.0.51.11 +summary: Drive a car across the moon +description: | +A simple command-line game where you drive a buggy on the moon +apps: +play: +command: usr/games/moon-buggy +parts: +moon-buggy: +plugin: nil +stage-packages: [moon-buggy] +snap: +– usr/games/moon-buggy +``` + +The above code demonstrates a few new concepts. The first section is all about making your application discoverable in the store; setting the packaging metadata name, version, summary, and description. The apps section implements the play command which points to the location of the moon-buggy executable. The parts section tells Snapcraft about any required plugins that are needed to build the application along with any packages it depends on. In this simple example all we need is the moon-buggy application itself from the Ubuntu archive and Snapcraft takes care of the rest. + +Running snapcraft in the directory where you have the snapcraft.yaml file will create the moon-buggy_1.0.51.11_amd64.snap which can be installed by running: + +``` +$ snap install moon-buggy_1.0.51.11_amd64.snap +``` + +To seen an example of snapping something a little more complex, like the Electron-based Simplenote application [see here][1], for a tutorial online [here][2] and the corresponding code on [GitHub][3]. More examples can be found on the getting Ubuntu developer [website here][4]. + +-------------------------------------------------------------------------------- + +via: https://insights.ubuntu.com/2016/06/01/apps-to-snaps/ + +作者:[Jamie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://insights.ubuntu.com/author/jamiebennett/ +[1]: http://www.simplenote.com/ +[2]: http://www.linuxuk.org/post/20160518_snapping_electron_based_applications_simplenote/ +[3]: https://github.com/jamiedbennett/snaps/tree/master/simplenote +[4]: https://developer.ubuntu.com/en/desktop/get-started/ From 2d9e4e2eb921869c32c420a80ae82f229f6f3bb0 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 17:28:52 +0800 Subject: [PATCH 1491/1710] =?UTF-8?q?20160605-2=20=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How to Add Cron Jobs in Linux and Unix.md | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md diff --git a/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md new file mode 100644 index 0000000000..9f90a9cb45 --- /dev/null +++ b/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md @@ -0,0 +1,178 @@ +How to Add Cron Jobs in Linux and Unix +====================================== + + +![](https://www.unixmen.com/wp-content/uploads/2016/05/HOW-TO-ADD-CRON-JOBS-IN-LINUX-AND-UNIX-696x334.png) + +### Introduction + +![](http://www.unixmen.com/wp-content/uploads/2016/05/cronjob.gif) + +Cron job are used to schedule commands to be executed periodically. You can setup commands or scripts, which will repeatedly run at a set time. Cron is one of the most useful tool in Linux or UNIX like operating systems. The cron service (daemon) runs in the background and constantly checks the /etc/crontab file, and /etc/cron.*/ directories. It also checks the /var/spool/cron/ directory. + +### Command of crontab + +crontab is the command used to install, deinstall or list the tables (cron configuration file) used to drive the [cron(8)][1] daemon in Vixie Cron. Each user can have their own crontab file, and though these are files in /var/spool/cron/crontabs, they are not intended to be edited directly. You need to use crontab command for editing or setting up your own cron jobs. + +### Types of cron configuration files + +There are different types of configuration files: + +- **The UNIX / Linux system crontab** : Usually, used by system services and critical jobs that requires root like privileges. The sixth field (see below for field description) is the name of a user for the command to run as. This gives the system crontab the ability to run commands as any user. + +- **The user crontabs**: User can install their own cron jobs using the crontab command. The sixth field is the command to run, and all commands run as the user who created the crontab + +**Note**: This faq features cron implementations written by Paul Vixie and included in many [Linux][2] distributions and Unix like systems such as in the popular 4th BSD edition. The syntax is [compatible][3] with various implementations of crond. + +How Do I install or create or edit my own cron jobs? + +To edit your crontab file, type the following command at the UNIX / Linux shell prompt: + +``` +$ crontab -e +``` + +Syntax of crontab (field description) + +The syntax is: + +``` +1 2 3 4 5 /path/to/command arg1 arg2 +``` + +OR + +``` +1 2 3 4 5 /root/ntp_sync.sh +``` + +Where, + +- 1: Minute (0-59) +- 2: Hours (0-23) +- 3: Day (0-31) +- 4: Month (0-12 [12 == December]) +- 5: Day of the week(0-7 [7 or 0 == sunday]) +- /path/to/command – Script or command name to schedule + +Easy to remember format: + +``` +* * * * * command to be executed +– – – – – +| | | | | +| | | | —– Day of week (0 – 7) (Sunday=0 or 7) +| | | ——- Month (1 – 12) +| | ——— Day of month (1 – 31) +| ———– Hour (0 – 23) +————- Minute (0 – 59) +``` + +Example simple crontab. + +```` +## run backupscript 5 minutes 1 time ## +*/5 * * * * /root/backupscript.sh + +## Run backupscript daily on 1:00 am ## + +0 1 * * * /root/backupscript.sh + +## Run backup script monthly on the 1st of month 3:15 am ## + +15 3 1 * * /root/backupscript.sh +``` + +### How do I use operators? + +An operator allows you to specifying multiple values in a field. There are three operators: + +- **The asterisk (*)** : This operator specifies all possible values for a field. For example, an asterisk in the hour time field would be equivalent to every hour or an asterisk in the month field would be equivalent to every month + +- **The comma (,)** : This operator specifies a list of values, for example: “1,5,10,15,20, 25”. + +- **The dash (–)** : This operator specifies a range of values, for example: “5-15” days , which is equivalent to typing “5,6,7,8,9,….,13,14,15” using the comma operator. + +- **The separator (/)** : This operator specifies a step value, for example: “0-23/” can be used in the hours field to specify command execution every other hour. Steps are also permitted after an asterisk, so if you want to say every two hours, just use */2. + + +### Use special string to save time + +Instead of the first five fields, you can use any one of eight special strings. It will not just save your time but it will improve readability. + +Special string | Meaning +|:-- |:-- +@reboot | Run once, at startup. +@yearly | Run once a year, “0 0 1 1 *”. +@annually | (same as @yearly) +@monthly | Run once a month, “0 0 1 * *”. +@weekly | Run once a week, “0 0 * * 0”. +@daily | Run once a day, “0 0 * * *”. +@midnight | (same as @daily) +@hourly | Run once an hour, “0 * * * *”. + + +Examples + +``` +#### Run ntpdate command every hour #### + +@hourly /path/to/ntpdate +``` + + +### More about /etc/crontab file and /etc/cron.d/* directories + +/etc/crontab is system crontabs file. Usually only used by root user or daemons to configure system wide jobs. All individual user must must use crontab command to install and edit their jobs as described above. /var/spool/cron/ or /var/cron/tabs/ is directory for personal user crontab files. It must be backup with users home directory. + +Understanding Default /etc/crontab + +Typical /etc/crontab file entries: + +``` +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +HOME=/ +# run-parts +01 * * * * root run-parts /etc/cron.hourly +02 4 * * * root run-parts /etc/cron.daily +22 4 * * 0 root run-parts /etc/cron.weekly +42 4 1 * * root run-parts /etc/cron.monthly +``` + +First, the environment must be defined. If the shell line is omitted, cron will use the default, which is sh. If the PATH variable is omitted, no default will be used and file locations will need to be absolute. If HOME is omitted, cron will use the invoking users home directory. + +Additionally, cron reads the files in /etc/cron.d/ directory. Usually system daemon such as sa-update or sysstat places their cronjob here. As a root user or superuser you can use following directories to configure cron jobs. You can directly drop your scripts here. The run-parts command run scripts or programs in a directory via /etc/crontab file: + +Directory |Description +|:-- |:-- +/etc/cron.d/ | Put all scripts here and call them from /etc/crontab file. +/etc/cron.daily/ | Run all scripts once a day +/etc/cron.hourly/ | Run all scripts once an hour +/etc/cron.monthly/ | Run all scripts once a month +/etc/cron.weekly/ | Run all scripts once a week + + +### Backup cronjob + +``` +# crontab -l > /path/to/file + +# crontab -u user -l > /path/to/file +``` + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/add-cron-jobs-linux-unix/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+unixmenhowtos+%28Unixmen+Howtos+%26+Tutorials%29 + +作者:[Duy NguyenViet][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.unixmen.com/author/duynv/ +[1]: http://www.manpager.com/linux/man8/cron.8.html +[2]: http://www.linuxsecrets.com/ +[3]: http://www.linuxsecrets.com/linux-hardware/ From ba72d2da3a5c029ee00c833a971c9f8a5e72a682 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 17:31:58 +0800 Subject: [PATCH 1492/1710] =?UTF-8?q?20160605-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...A New Trust-Based Authentication Method.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md diff --git a/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md b/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md new file mode 100644 index 0000000000..2434c0412a --- /dev/null +++ b/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md @@ -0,0 +1,39 @@ +Will Google Replace Passwords With A New Trust-Based Authentication Method? +=========================================================================== + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/Trust-API-Google-replaces-passwords.jpg) + +A newly developed authentication method by Google will rate how trustworthy is your login and will authenticate it based on a “Trust Score”. + + +Abacus is the name of the Google project that aims to rid you off of the nuisance which is remembering and typing passwords. + +In latest Google I/O developer conference, the company has introduced a new feature stemming from the ambitious project, called “**Trust API**“. + +The API (Application Programming Interface) which will be available for Android developers by the year end “if all goes well”, is intended to make use of Android devices’ various types of sensors in order to profile a user and create what they refer to as Trust Score. + +Based on that Trust Score, an application which requires login credentials will be able to verify that indeed you are authorized to login and thus will not prompt for a password. + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/Abacus-to-Trust-API.jpg) +>Abacus to Trust API + +### A Point To Consider + +Although the idea, functionality-wise, sounds pretty great – mitigating the burden which is password authentication. + +The other side of the coin tough, is that once again, by doing so Google pushes us (deliberately or not) to give up our privacy in favor of ease of use. + +Is it worth it? it’s up to you to decide… + + +-------------------------------------------------------------------------------- + +via: http://www.iwillfolo.com/will-google-replace-passwords-with-a-new-trust-based-authentication-method/ + +作者:[iWillFolo][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.iwillfolo.com/ From 886bbccc53cc4bdd418e900af0eb0a7c8c9cce5b Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 17:38:25 +0800 Subject: [PATCH 1493/1710] =?UTF-8?q?20160605-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d Use Apps Even Without Installing Them.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/talk/20160518 Android Use Apps Even Without Installing Them.md diff --git a/sources/talk/20160518 Android Use Apps Even Without Installing Them.md b/sources/talk/20160518 Android Use Apps Even Without Installing Them.md new file mode 100644 index 0000000000..279e9a5edb --- /dev/null +++ b/sources/talk/20160518 Android Use Apps Even Without Installing Them.md @@ -0,0 +1,67 @@ +Android’s Next Revolution: Use Apps Even Without Installing Them! +=================================================================== + + +A new innovation by Google’s Android will let you use apps even if they aren’t installed on your device. A few prototypes have already been made. + +Remember that time when someone sent you a link that required you installing an app in order to view? + +The dilemma of whether you should install the app just to view a one-time link may have frustrated you. Furthermore, the app installation itself may took some of your precious time as well. + +The above scenario has probably been experienced by most, if not all, modern day technology users. Nonetheless, we’ve all came to accept that this is simply the correct and logical way by which things work. + +Or is it? + +To that question Google’s Android division came up with a new, out-of-the-box answer: + +Android Instant Apps + +Android Instant Apps purports to rid you of any such dilemmas in the first place by letting you simply click the link (see opening example) and start using the app straight away. + +Another real life example of a scenario where Instant Apps might come handy, is the case you want to park your car but don’t have the parking meter matching app. + +According to Google, you could simply tap your phone on the meter and the parking app will pop on your screen immediately, ready to be used. + +How Does It Work? + +Instant Apps are basically the same apps you’ve already familiarized yourself with, only with a twist – these apps have been trimmed and modularized in order to supply you only the essential parts required for you to complete a certain task. + +For instance, expanding on the opening scenario as an example, in order to view a link, you don’t have to have a full featured app that can write, send, make coffee or whatever. All you need is the viewing feature – and that’s exactly what you’ll get. + +That way the app could open up rapidly, allowing you to complete the task of which you came for. + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/AIA-demo.jpg) +>AIA demo + +![](https://4.bp.blogspot.com/-p5WOrD6wVy8/VzyIpsDqULI/AAAAAAAADD0/xbtQjurJZ6EEji_MPaY1sLK5wVkXSvxJgCKgB/s800/B%2526H%2B-%2BDevice%2B%2528Final%2529.gif) +>B&H Photo (via Google Search) + +![](https://2.bp.blogspot.com/-q5ApCzECuNA/VzyKa9l0t2I/AAAAAAAADEI/nYhhMClDl5Y3qL5-wiOb2J2QjtGWwbF2wCLcB/s800/BuzzFeed-Device-Install%2B%2528Final%2529.gif) +>BuzzFeedVideo (via a shared link) + +![](https://2.bp.blogspot.com/-mVhKMMzhxms/VzyKg25ihBI/AAAAAAAADEM/dJN6_8H7qkwRyulCF7Yr2234-GGUXzC6ACLcB/s800/Park%2Band%2BPay%2B-%2BDevice%2Bwith%2BMeter%2B%2528Final%2529.gif) +>Park and Pay (example) (via NFC) + + +Sounds great, isn’t it? However, there are still many technical aspects need to be addressed. + +For instance, from a security point of view: if any app can theoretically run on your device, even if you haven’t installed it – how will you keep your device safe from malaware attacks? + +Therefore, in order to iron out such risks, Google is still working on the project, currently with a small set of partners which will gradually expand. + +Eventually, Google plans to release AIA (Android Instant Apps) somewhere along next year. + +relate: [Introducing Android Instant Apps][1] + +-------------------------------------------------------------------------------- + +via: http://www.iwillfolo.com/androids-next-revolution-use-apps-even-without-installing-them/ + +作者:[iwillfolo][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.iwillfolo.com +[1]: http://android-developers.blogspot.co.il/2016/05/android-instant-apps-evolving-apps.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+blogspot/hsDu+%28Android+Developers+Blog%29 From f9f6f0782e79066ea3e9d988f6bc9adb6a9c5af2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 17:47:58 +0800 Subject: [PATCH 1494/1710] =?UTF-8?q?20160605-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d distributors disable IPv4-mapped IPv6.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md diff --git a/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md b/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md new file mode 100644 index 0000000000..2ce0bace45 --- /dev/null +++ b/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md @@ -0,0 +1,60 @@ +Should distributors disable IPv4-mapped IPv6? +============================================= + +By all accounts, the Internet's transition to IPv6 has been a slow affair. In recent years, though, perhaps inspired by the exhaustion of the IPv4 address space, IPv6 usage has been [on the rise][1]. There is a corresponding interest in ensuring that applications work with both IPv4 and IPv6. But, as a recent discussion on the OpenBSD mailing list has highlighted, a mechanism designed to ease the transition to an IPv6 network may also make the net less secure — and Linux distributions may be configured insecurely by default. + +### Address mapping + +IPv6 may look like IPv4 in many ways, but it is a different protocol with a different address space. Server programs wanting to receive connections using either protocol must thus open separate sockets for the two different address families — AF_INET for IPv4, and AF_INET6 for IPv6. In particular, a program wishing to accept connections to any of a host's interfaces using either protocol will need to create an AF_INET socket bound to the all-zeroes wild-card address (0.0.0.0) and an AF_INET6 socket bound to the IPv6 equivalent (written as "::"). It must then listen for connections on both sockets — or so one would think. + +Many years ago, in [RFC 3493][2], the IETF specified a mechanism by which a program could work with either protocol using a single IPv6 socket. With a socket enabled for this behavior, the program need only bind to :: to receive connections to all interfaces with both protocols. When an IPv4 connection is made to the bound port, the source address will be mapped into IPv6 as described in [RFC 2373][3]. So, for example, a program using this mode would see an incoming connection from 192.168.1.1 as originating from ::ffff:192.168.1.1 (the mixed notation is how such addresses are ordinarily written). The program can also open connections to IPv4 addresses by mapping them in the same manner. + +The RFC calls for this behavior to be implemented by default, so most systems do so. There are exceptions, though, one of which is OpenBSD; there, programs wishing to work with both protocols can only do so by creating two independent sockets. A program that opens two sockets on Linux, though, will run into trouble: both the IPv4 and the IPv6 socket will try to bind to the IPv4 address(es), so whichever attempt comes second will fail. In other words, a program that binds a socket to a given port on :: will be bound to that port on both the IPv6 :: and the IPv4 0.0.0.0. If it then tries to bind an IPv4 socket to the same port on 0.0.0.0, the operation will fail as the port is already bound. + +There is a way around that problem, of course; the program can call setsockopt() to turn on the IPV6_V6ONLY option. A program that opens two sockets and sets IPV6_V6ONLY should be portable across all systems. + +Readers may be less than thoroughly shocked to learn that not every program out there gets all of this right. One of those, it turns out, is the [OpenNTPD][4] implementation of the Network Time Protocol. Brent Cook recently [proposed a small patch][5] adding the requisite setsockopt() call to the upstream OpenNTPD source, which lives within OpenBSD itself. That patch does not look likely to be accepted, though, for the most OpenBSD-like of reasons. + +### Security concerns + +As mentioned above, OpenBSD does not support IPv4-mapped IPv6 sockets at all. Even if a program tries to explicitly enable address mapping by setting the IPV6_V6ONLY option to zero, its author will be disappointed; that setting has no effect on OpenBSD systems. The reasoning behind this decision is that this mapping brings some security concerns with it. There are various types of attack surface that it opens up, but it all comes down to the provision of two different ways to reach the same port, each with its own access-control rules. + +Any given server system may have set up firewall rules describing the allowed access to the port in question. There may also be mechanisms like TCP wrappers or a BPF-based filter in place, or a router on the net could be doing its own stateful connection filtering. The result is likely to be gaps in firewall protection and the potential for all kinds of confusion resulting from the same IPv4 address being reachable via two different protocols. If the address mapping is done at the edge of the network, the situation gets even more complex; see [this draft RFC from 2003][6] for a description of some other attack scenarios that come about if mapped addresses are transmitted between hosts. + +Adapting systems and software to properly handle IPv4-mapped IPv6 addresses can certainly be done. But that adds to the overall complexity of the system, and it's a sure bet that this adaptation has not actually been done anywhere near as widely as it should be. As Theo de Raadt [put it][7]: + + **Sometimes people put a bad idea into an RFC. Later they discover it is impossible to walk the idea back to the garbagebin. The result is concepts so complicated that everyone has to be a fulltime expert, on admin side and coder side**. + +It is not at all clear how many of these full-time experts are actually out there configuring systems and networks where IPv4-mapped IPv6 addresses are in use. + +One might well argue that, while IPv4-mapped IPv6 addresses create security hazards, there should be no harm in changing a program so that it turns off address mapping on systems that implement it. But Theo argues that this should not be done, for a couple of reasons. The first is that there are many broken programs out there, and it will never be possible to fix them all. But the real reason is to put pressure on distributors to turn off address mapping by default. As he put it: "**Eventually someone will understand the damage is systematic, and change the system defaults to 'secure by default'**." + +### Address mapping on Linux + +On Linux systems, address mapping is controlled by a sysctl knob called net.ipv6.bindv6only; it is set to zero (enabling address mapping) by default. Administrators (or distributors) can turn off mapping by setting this knob to one, but they would be well advised to be sure that their applications all work properly before deploying such a system in production. A quick survey suggests that none of the primary distributors change the default for this knob; Debian [changed the default][9] for the "squeeze" release in 2009, but the change broke enough packages ([anything involving Java][10], for example) that it was, [after a certain amount of Debian-style discussion][11], reverted. It would appear that quite a few programs rely on address mapping being enabled by default. + +OpenBSD has the freedom to break things outside of its core system in the name of "secure by default"; Linux distributors tend to have a harder time getting away with such changes. So those distributors, being generally averse to receiving abuse from their users, are unlikely to change the default of the bindv6only knob anytime soon. The good news is that this functionality has been the default for years and stories of exploits are hard to find. But, as we all know, that provides no guarantees that exploits are not possible. + + +-------------------------------------------------------------------------------- + +via: https://lwn.net/Articles/688462/ + +作者:[Jonathan Corbet][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://lwn.net/ +[1]: https://www.google.com/intl/en/ipv6/statistics.html +[2]: https://tools.ietf.org/html/rfc3493#section-3.7 +[3]: https://tools.ietf.org/html/rfc2373#page-10 +[4]: https://github.com/openntpd-portable/ +[5]: https://lwn.net/Articles/688464/ +[6]: https://tools.ietf.org/html/draft-itojun-v6ops-v4mapped-harmful-02 +[7]: https://lwn.net/Articles/688465/ +[8]: https://lwn.net/Articles/688466/ +[9]: https://lists.debian.org/debian-devel/2009/10/msg00541.html +[10]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056 +[11]: https://lists.debian.org/debian-devel/2010/04/msg00099.html From bef28311632a7d3afc0ae8e90e86fd70ebfbb6eb Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 17:54:58 +0800 Subject: [PATCH 1495/1710] =?UTF-8?q?20160605-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20160601 scp command in Linux.md | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 sources/tech/20160601 scp command in Linux.md diff --git a/sources/tech/20160601 scp command in Linux.md b/sources/tech/20160601 scp command in Linux.md new file mode 100644 index 0000000000..f2dd409d49 --- /dev/null +++ b/sources/tech/20160601 scp command in Linux.md @@ -0,0 +1,176 @@ +scp command in Linux +======================= + +![](https://www.unixmen.com/wp-content/uploads/2016/05/SCP-LOGO-1.jpg) + + +scp means Secure Copy Protocol, already every Linux/Unix user known about cp command well. scp also works like cp command, cp command copies files or folders from one location i.e source to other location i.e target in local system, but scp copies the files from one host to another host in network. + +The usage of the scp command is as follows, here i copy a file named importantfile from local system(10.10.16.147) to Remote system(10.0.0.6) here instead of ip address you can also use System name. + +``` +[root@localhost ~]# scp importantfile admin@10.0.0.6:/home/admin/ +The authenticity of host '10.0.0.6 (10.0.0.6)' can't be established. +RSA key fingerprint is SHA256:LqBzkeGa6K9BfWWKgcKlQoE0u+gjorX0lPLx5YftX1Y. +RSA key fingerprint is MD5:ed:44:42:59:3e:dd:4c:12:43:4a:89:b1:5d:bd:9e:20. +Are you sure you want to continue connecting (yes/no)? yes +Warning: Permanently added '10.0.0.6' (RSA) to the list of known hosts. +admin@10.0.0.6's password: +importantfile 100% 0 0.0KB/s 00:00 +[root@localhost ~]# +``` + +Similarly if you want to get a file from remote system you can use scp command as follows + +``` +[root@localhost ~]# scp root@10.10.16.137:/root/importantfile /home/admin/ +The authenticity of host '10.10.16.137 (10.10.16.137)' can't be established. +RSA key fingerprint is b0:b0:a3:c3:2e:94:13:0c:29:2e:ba:0b:d3:d6:12:8f. +Are you sure you want to continue connecting (yes/no)? yes +Warning: Permanently added '10.10.16.137' (RSA) to the list of known hosts. +root@10.10.16.137's password: +importantfile 100% 0 0.0KB/s 00:00 +[root@localhost ~]# +``` + +You can also use various options along with scp command like cp command,The man page of the scp command clearly explain about the usage of various options and advantages of that. + +**Sample Output.** + +![](https://www.unixmen.com/wp-content/uploads/2016/05/scp.jpg) + +``` +The options are as follows: + + -B Selects batch mode (prevents asking for passwords or passphrases). + + -C Compression enable. Passes the -C to enable compression. + + -c cipher + Selects the cipher to use for encrypting the data transfer. This + option is directly passed to ssh(1). + + -F ssh_config + Specifies an alternative per-user configuration file for ssh. + This option is directly passed to ssh(1). + + -l limit + Limits the used bandwidth, specified in Kbit/s. + + -P port + Specifies the port to connect to on the remote host. Note that + this option is written with a capital ‘P’, because -p is already + reserved for preserving the times and modes of the file. + + -p Preserves modification times, access times, and modes from the + original file. + + -q Quiet mode: disables the progress meter as well as warning and + diagnostic messages from ssh(1). + + -r Recursively copy entire directories. Note that scp follows sym‐ + bolic links encountered in the tree traversal. + + -v Verbose mode. Causes scp and ssh(1) to print debugging messages + about their progress. This is helpful in debugging connection, + authentication, and configuration problems. + +``` + +The scp command along with -v option you can get detailed information about authentication, debugging information etc. + +![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-v.jpg) + +Sample output is like when we pass the option `-v` + +``` +[root@localhost ~]# scp -v abc.txt admin@10.0.0.6:/home/admin +Executing: program /usr/bin/ssh host 10.0.0.6, user admin, +command scp -v -t/home/admin +OpenSSH_7.1p1, OpenSSL 1.0.2d-fips 9 Jul 2015 +debug1: Reading configuration data /etc/ssh/ssh_config +debug1: /etc/ssh/ssh_config line 56: Applying options for * +debug1: Connecting to 10.0.0.6 [10.0.0.6] port 22. +debug1: Connection established. +debug1: Server host key: ssh-rsa SHA256:LqBzkeGa6K9BfWWKgcKlQoE0u+gjorX0lPLx5YftX1Y +debug1: Next authentication method: publickey +debug1: Trying private key: /root/.ssh/id_rsa +debug1: Trying private key: /root/.ssh/id_dsa +debug1: Trying private key: /root/.ssh/id_ecdsa +debug1: Trying private key: /root/.ssh/id_ed25519 +debug1: Next authentication method: password +admin@10.0.0.6's password: +debug1: Authentication succeeded (password). +Authenticated to 10.0.0.6 ([10.0.0.6]:22). +debug1: channel 0: new [client-session] +debug1: Requesting no-more-sessions@openssh.com +debug1: Entering interactive session. +debug1: Sending environment. +debug1: Sending command: scp -v -t /home/admin +Sending file modes: C0644 174 abc.txt +Sink: C0644 174 abc.txt +abc.txt 100% 174 0.2KB/s 00:00 +Transferred: sent 3024, received 2584 bytes, in 0.3 seconds +Bytes per second: sent 9863.3, received 8428.1 +debug1: Exit status 0 +[root@localhost ~]# +``` + +If we need to copy the Directories or folders we can use the option –r. It Recursively copy entire directories + +![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-r.jpg) + +Quiet mode: + +If you want disables the progress meter as well as warning and diagnostic messages pass the argument -q along with scp command. + +![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-q.jpg) + +last time we pass the argument -r only then it shows the information file by file, but when we pass the argument -q it disables the progress meter this time. + +Preserves modification times, access times, and modes from the original file by passing the option -p along with scp. + +![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-p.jpg) + +Specifies the port to connect to on the remote host by using the option -P. +scp uses the ssh to transfer the files between hosts, ssh uses the port number 22 so the scp also uses the same port number 22. + +If we want to change the port number we can pass the particular port number along with -P(capital P because small p uses for preserving access time etc.) + +for example if we want to use port number 2222 then the command is as follows + +``` +[root@localhost ~]# scp -P 2222 abcd1 root@10.10.16.137:/root/ +``` + +**Limits the used bandwidth, specified in Kbit/s** + +we can limit the bandwidth by using the argument -l option as follows. here i used the limit is 512kbit/s + +![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-l.jpg) + +**Compression enable** + +we can enable the compression mode when we transfer the data through scp command to save tha bandwidth and time as follows + +![](https://www.unixmen.com/wp-content/uploads/2016/05/scp-with-C.jpg) + +**Selects the cipher to use for encrypting the data** + +By default scp uses AES-128, if we want to change the encryption then we can pass the argument -c(small c) along with scp. + +![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-cipher.jpg) + +Now you can transfer the files between different nodes in your network securely by using scp(Secure copy). + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/scp-command-linuxunix/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+unixmenhowtos+%28Unixmen+Howtos+%26+Tutorials%29 + +作者:[Naga Ramesh][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.unixmen.com/author/naga/ From b0ac16385f260ce311f8919e9be3aacf2746716f Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 18:15:13 +0800 Subject: [PATCH 1496/1710] =?UTF-8?q?20160605-7=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 16.04 And Use Its Command line Options.md | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md diff --git a/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md b/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md new file mode 100644 index 0000000000..85fabacc56 --- /dev/null +++ b/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md @@ -0,0 +1,138 @@ +How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options +====================================================================================== + +VirtualBox comes with a suite of command line utilities, and you can use the VirtualBox command line interfaces (CLIs) to manage VMs on a remote headless server. In this tutorial, we will show you how to create and start a VM without VirtualBox GUI using VBoxManage. VBoxManage is the command-line interface to VirtualBox taht you can use to completely control VirtualBox from the command line of your host operating system. VBoxManage supports all the features that the graphical user interface gives you access to, but it supports a lot more than that. It exposes really all the features of the virtualization engine, even those that cannot (yet) be accessed from the GUI. You will need to use the command line if you want to use a different user interface than the main GUI and control some of the more advanced and experimental configuration settings for a VM. + +You will find VBoxManage helpful when you want to create and run virtual machines (VMs) on VirtualBox, but you only have access to a terminal on a remote host machine. This can be a common situation for servers where VMs are managed from remotely. + +### Prerequisites + +Before we start using VBoxManage command line utility, make sure that you have root or sudo user access to your Ubuntu 16.04 server and the Oracle Virtual Box is already installed on it. Then you need to install VirtualBox Extension Pack which is needed to run a VRDE remote desktop server used to access headless VMs. + +### Installing VBoxManage + +You can get your required package by following the link to [Virtual Box Download Page][1] to get the latest extension pack, same version as your installed version of VirtualBox!. + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/12.png) + +You can also make use of below command to get the VBoxManage extension on your system + +``` +$ wget http://download.virtualbox.org/virtualbox/5.0.20/Oracle_VM_VirtualBox_Extension_Pack-5.0.20-106931.vbox-extpack +``` + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/21.png) + +Run the below command to confirm that VBoxManage has been successfully installed. + +``` +$ VBoxManage list extpacks +``` + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/31.png) + +### Using VBoxManage on Ubuntu 16.04 + +Now we are going to use VBoxManage to show you that how easily you can create and manage your virtual machines by using this utility from command line terminal. + +Let’s run the below command to create a virtual machine for Ubuntu OS. + +``` +# VBoxManage createvm --name Ubuntu16.04 --register +``` + +After executing this command it will create virtual machine called “Ubuntu16.vbox” in home folder under “VirtualBox VMs/Ubuntu16/Ubuntu16.04.vbox” . In the above command, “createvm” is used to create a virtual machine and “–name“ defines the name of the virtual machine while “registervm” command is used to register the virtual machine. + +Now, create the hard disk image for the virtual machine using the below command. + +``` +$ VBoxManage createhd --filename Ubuntu16.04 --size 5124 +``` + +Here “createhd” is used to create hard disk image and “–filename” is used to specify the virtual machine’s name, for which the hard disk image is created. Here, “–size” denotes the size of the hard disk image. The size is always given in MB. Here we have specified 5Gb that is 5124MB. + +Next we will set the OS type, if the Linux OS has to be installed, then specify the OS type as Linux or Ubuntu Or Fedora etc using below command. + +``` +$ VBoxManage modifyvm Ubuntu16.04 --ostype Ubuntu +``` + +Use below command to set the memory size for the virtual OS, i.e. the ram size for the virtual OS from the host Machine. + +``` +$ VBoxManage modifyvm Ubuntu10.10 --memory 512 +``` + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/52.png) + +Now we are going to create a storage controller for the virtual machine by using below command. + +``` +$ VBoxManage storagectl Ubuntu16.04 --name IDE --add ide --controller PIIX4 --bootable on +``` + +Here in above command ‘storagectl’ is used to create a storage controller for virtual machine,’–name’ specifies the name of the storage controller that needs to be created, modified or removed from the virtual machine. Then ‘–add’ defines the type of system bus to which the storage controller must be connected. Its available options are ide/sata/scsi/floppy. The ‘–controller’ option allows to choose the type of chipset that is to be emulated for the given storage controller while its available options are LsiLogic / LSILogicSAS / BusLogic / IntelAhci / PIIX3 / PIIX4 / ICH6 / I82078. At the end ‘–bootable’ defines whether this controller is bootable or not. + +The above command creates the storage controller called IDE. Later the virtual media can be attached to the controller using ‘storageattach’ command. + +Now run below command to create a storage controller called SATA, that will be used to attach the hard disk image to this later. + +``` +$ VBoxManage storagectl Ubuntu16.04 --name SATA --add sata --controller IntelAhci --bootable on +``` + +Attach the previously created disk image as well as CD/DVD drive to the IDE controller. Ubuntu installation ISO image which is then inserted to the CD/DVD drive. Now, attach the storage controller to the virtual machine using ‘storageattach’ command. + +``` +$ VBoxManage storageattach Ubuntu16.04 --storagectl SATA --port 0 --device 0 --type hdd --medium "your_iso_filepath" +``` + +This will attach the storage controller SATA to virtual machine Ubuntu16.04 with the medium i.e., to the virtual disk image which is created. + +Run below commands to add some features like networking setup, audio, etc. + +``` +$ VBoxManage modifyvm Ubuntu10.10 --nic1 nat --nictype1 82540EM --cableconnected1 on +$ VBoxManage modifyvm Ubuntu10.10 --vram 128 --accelerate3d on --audio alsa --audiocontroller ac97 +``` + +Now, start the VM by using the below command by specifying the name of the VM that you wish to start. + +``` + $ VBoxManage startvm Ubuntu16.04 +``` + +A new window will be opened where you new VM be booted from your attached file. + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/62.png) + +To stop the virtual machine , you can make use of the following command. + +``` +$ VBoxManage controlvm Ubuntu16.04 poweroff +``` + +The ‘controlvm’ command is used to control the state of the virtual machine. Some of the available options are pause / resume / reset / poweroff / savestate / acpipowerbutton / acpisleepbutton. There are many options in controlvm to see all the options available in it, run below command. + +``` +$VBoxManage controlvm +``` + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/81.png) + +Conclusion + +In this article we have learned about an awesome tool of Oracle Virtual Box that is VBoxManage, that includes its installation and usage on Ubuntu 16.04 Operating system. The article includes a detailed instructions about its useful commands to create and manage your virtual machines using VBoxManage. Hope you find this much helpful, do not forget to share your comments or suggestions. + +-------------------------------------------------------------------------------- + +via: http://linuxpitstop.com/install-and-use-command-line-tool-vboxmanage-on-ubuntu-16-04/ + +作者:[Kashif][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/kashif/ +[1]: https://www.virtualbox.org/wiki/Downloads From b28c9714aacea52fa1ada092a52b8f4bcf9913d4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 18:23:28 +0800 Subject: [PATCH 1497/1710] =?UTF-8?q?20160605-8=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ve on Linux with google-drive-ocamlfuse.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md diff --git a/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md b/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md new file mode 100644 index 0000000000..f043e2e92b --- /dev/null +++ b/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md @@ -0,0 +1,66 @@ +How to mount your Google Drive on Linux with google-drive-ocamlfuse +======================================================================== + +>If you're looking for an easy way to mount your Google Drive folders to a Linux box, Jack Wallen shows you how with the help of google-drive-ocamlfuse. + +![](http://tr4.cbsistatic.com/hub/i/2016/05/18/ee5d7b81-e5be-4b24-843d-d3ca99230a63/651be96ac8714698f8100afa6883e64d/linuxcloudhero.jpg) +>Image: Jack Wallen + +Google has yet to release a Linux version of its Google Drive app, though there are plenty of ways to gain access to your Drive files from Linux. + +If you prefer a GUI tool, you've got Insync. If you prefer the command line, there are tools such as Grive2 and the incredibly easy to use FUSE-based system written in Ocaml. I'll show how to use the latter to mount your Google Drive account on your Linux desktop. Although it's done via the command line, you'll be surprised at how easy it is to pull off. It's so easy, anyone can do it. + +This system features: + +- Full read/write access to ordinary files/folders +- Read-only access to Google Docs, sheets, and slides +- Access to your Drive's Trash (.trash) Directory +- Duplicate file handling +- Support for multiple accounts + +Let's walk through the installation and setup of google-drive-ocamlfuse on a Ubuntu 16.04 desktop so you can gain access to your Drive files. + +### Installation + +1. Open a terminal window. +2. Add the necessary PPA with the command sudo add-apt-repository ppa:alessandro-strada/ppa. +3. When prompted, type your sudo password and hit Enter. +4. Update app with the command sudo apt-get update. +5. Install the software by issuing the command sudo apt-get install google-drive-ocamlfuse. + +### Authorization + +The next step is to authorize google-drive-ocamlfuse so it will have access to your Google account. To do this, go back to the terminal window and issue the command google-drive-ocamlfuse. This command will open a browser window that will either prompt you to log into your Google account or, if you're already logged in, ask you to allow google-drive-ocamlfuse access to your Google account. If you've not logged in, do so and then click Allow. The next window (which appeared on a Ubuntu 16.04 desktop, but not an Elementary OS Freya desktop) will ask you to grant permission for both gdfuse and OAuth2 Endpoint to access your Google account. Click Allow again. The next browser screen will inform you to wait until the authorization tokens have downloaded; you can minimize the browser at this point. When your terminal prompt returns (Figure A), you know the tokens have been downloaded, and you're ready to mount. + +**Figure A** + +![](http://tr4.cbsistatic.com/hub/i/r/2016/05/18/a493122b-445f-4aca-8974-5ec41192eede/resize/620x/6ae5907ad2c08dc7620b7afaaa9e389c/googledriveocamlfuse3.png) +>Image: Jack Wallen + +**The app has been authorized, and you're ready to go.** + +### Mounting your Google Drive + +Before you mount your Google Drive, you must create a folder to serve as the mount point. From the terminal, issue the command mkdir ~/google-drive to create a new folder in your home directory. Finally, issue the command google-drive-ocamlfuse ~/google-drive to mount your Google Drive to the google-drive folder. + +At this point, you should see your Google Drive files/folders populate in the google-drive folder. You can work with Google Drive as if it were a local folder system. + +When you want to unmount the google-drive folder, issue the command fusermount -u ~/google-drive. + +### It's no GUI, but it works like a champ + +I find this particular system really handy to use. It's incredibly fast at syncing with Google Drive, and it can make for an elegant means of backing up your Google Drive account locally. + +Give google-drive-ocamlfuse a go, and see what kind of magic you can make with it. + +-------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/article/how-to-mount-your-google-drive-on-linux-with-google-drive-ocamlfuse/ + +作者:[Jack Wallen ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.techrepublic.com/search/?a=jack+wallen From 2203487baccc2534d243e7a865fe9f37844c824a Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 5 Jun 2016 18:33:02 +0800 Subject: [PATCH 1498/1710] =?UTF-8?q?20160605-9=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160531 The Anatomy of a Linux User.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sources/talk/20160531 The Anatomy of a Linux User.md diff --git a/sources/talk/20160531 The Anatomy of a Linux User.md b/sources/talk/20160531 The Anatomy of a Linux User.md new file mode 100644 index 0000000000..00c198712f --- /dev/null +++ b/sources/talk/20160531 The Anatomy of a Linux User.md @@ -0,0 +1,55 @@ +The Anatomy of a Linux User +================================ + + +**Some new GNU/Linux users understand right away that Linux isn’t Windows. Others never quite get it. The best distro designers strive to keep both in mind.** + +### The Heart of Linux + +Nicky isn’t outwardly remarkable in any way. She’s a thirtysomething who decided to go back to school later in life than most. She spent six years in the Navy until she decided a job offer from an old friend would be a better bet than a career in the armed forces. That happens a lot in any of the post-war military service branches. It was at that job where I met her. She was the regional manager for an eight state trucking broker and I was driving for a meat packing outfit in Dallas. + +![](http://i2.wp.com/fossforce.com/wp-content/uploads/2016/05/anatomy.jpg?w=525) + +We became good friends in 2006, Nicky and me. She’s an outgoing spirit, curious about almost anyone whose path she crosses. We had an ongoing Friday night date to go fight in an indoor laser combat arena. It wasn’t rare for us to burn through three 30 minute sessions in a row. Maybe it wasn’t as cheap as a paint ball arena, but it was climate controlled and had a horror game feel to it. It was during one of those outings that she asked me if I could fix her computer. + +She knew about my efforts to get computers into the homes of disadvantaged kids and I kidded her about paying into Bill Gates’ 401K plan when she complained about her computer becoming too slow. Nicky figured this was as good a time as any to see what Linux was all about. + +Her computer was a decent machine, a mid 2005 Asus desktop with a Dell 19″ monitor. Unfortunately, it had all the obligatory toolbars and popups that a Windows computer can collect when not properly tended. After getting all of the files from the computer, we began the process of installing Linux. We sat together during the install process and I made sure she understood the partitioning process. Inside of an hour, she had a bright new and shiny PCLinuxOS desktop. + +She remarked often, as she navigated her way through her new system, at how beautiful the system looked. She wasn’t mentioning this as an aside; she was almost hypnotized by the sleek beauty in front of her. She remarked that her screen “shimmered” with beauty. That’s something I took away from our install session and have made sure to deploy on every Linux computer I’ve installed since. I want the screen to shimmer for everyone. + +The first week or so, she called or emailed me with the usual questions, but the one that was probably the most important was wanting to know how to save her OpenOffice documents so colleagues could read them. This is key when teaching anyone Linux or Open/LibreOffice. Most people just obey the first popup, allow the document to be saved in Open Document Format and get their fingers bit in the process. + +There was a story going around a year or so ago about a high school kid who claimed he flunked an exam when his professor couldn’t open the file containing his paper. It made for some blustery comments from readers who couldn’t decide who was more of a moron, the kid for not having a clue or his professor for not having a ummm… clue of his own. + +I know some college professors and each and every one of them could figure out how to open an ODF file. Heck, even as much as Microsoft can be grade A, blue-ribbon proprietary jerks, I think Microsoft Office has been able to open an ODT or ODF file for a while now. I can’t say for sure since I haven’t used Microsoft Office much since 2005. + +Even in the bad ol’ days, when Microsoft was openly and flagrantly shoving their way onto enterprise desktops via their vendor lock-in, I never had a problem when conducting business or collaborating with users of Microsoft Office, because I became pro-active and never assumed. I would email the person or people I was to work with and ask what version of Office they were using. From that information, I could make sure to save my documents in a format they could readily open and read. + +But back to Nicky, who put a lot of time into learning about her Linux computer. I was surprised by her enthusiasm. + +Learning how to use Linux on the desktop is made much simpler when the person doing the learning realizes that all habits and tools for using Windows are to be left at the door. Even after telling our Reglue kids this, more often than not when I come back to do a check-up with them there is some_dodgy_file.exe on the desktop or in the download folder. + +While we are in the general vicinity of discussing files, let’s talk about doing updates. For a long time I was dead set against having multiple program installers or updaters on the same computer. In the case of Mint, it was decided to disable the update ability completely within Synaptic and that frosted my flakes. But while for us older folks dpkg and apt are our friends, wise heads have prevailed and have come to understand that the command line doesn’t often seem warm and welcoming to new users. + +I frothed at the mouth and raged against the machine over the crippling of Synaptic until it was ‘splained to me. Do you remember when you were just starting out and had full admin rights to your brand new Linux install? Remember when you combed through the massive amounts of software listed in Synaptic? Remember how you began check marking every cool program you found? Do you remember how many of those cool programs started with the letters “lib”? + +Yeah, me too. I installed and broke a few brand new installations until I found out that those LIB files were the nuts and bolts of the application and not the application itself. That’s why the genius’ behind Linux Mint and Ubuntu have created smart, pretty-to-look-at and easy-to-use application installers. Synaptic is still there for us old heads, but for the people coming up behind us, there are just too many ways to leave a system open to major borks by installing lib files and the like. In the new installers, those files are tucked away and not even shown to the user. And really, that’s the way it should be. + +Unless you are charging for support calls that is. + +There are a lot of smarts built into today’s Linux distros and I applaud those folks because they make my job easier. Not every new user is a Nicky. She was pretty much an install and forget project for me, and she is in the minority. The majority of new Linux users can be needy at times. + +That’s okay. They are the ones who will be teaching their kids how to use Linux. + +-------------------------------------------------------------------------------- + +via: http://fossforce.com/2016/05/anatomy-linux-user/ + +作者:[Ken Starks][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://linuxlock.blogspot.com/ From 44da04b728932c60a53c98b92a29ebd38567fa1b Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 5 Jun 2016 21:31:38 +0800 Subject: [PATCH 1499/1710] [translating]Apps to Snaps --- sources/tech/20160601 Apps to Snaps.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160601 Apps to Snaps.md b/sources/tech/20160601 Apps to Snaps.md index fb7e712de9..1d4f726070 100644 --- a/sources/tech/20160601 Apps to Snaps.md +++ b/sources/tech/20160601 Apps to Snaps.md @@ -1,3 +1,5 @@ +alim0x transalting + Apps to Snaps ================ From fad7d2b6116471aee834df25073011859983cf17 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 5 Jun 2016 23:21:49 +0800 Subject: [PATCH 1500/1710] [translated]Apps to Snaps --- sources/tech/20160601 Apps to Snaps.md | 63 ----------------------- translated/tech/20160601 Apps to Snaps.md | 61 ++++++++++++++++++++++ 2 files changed, 61 insertions(+), 63 deletions(-) delete mode 100644 sources/tech/20160601 Apps to Snaps.md create mode 100644 translated/tech/20160601 Apps to Snaps.md diff --git a/sources/tech/20160601 Apps to Snaps.md b/sources/tech/20160601 Apps to Snaps.md deleted file mode 100644 index 1d4f726070..0000000000 --- a/sources/tech/20160601 Apps to Snaps.md +++ /dev/null @@ -1,63 +0,0 @@ -alim0x transalting - -Apps to Snaps -================ - -![](https://insights.ubuntu.com/wp-content/uploads/27eb/app-snap.png) - -Distributing applications on Linux is not always easy. You have different packaging formats, base systems, available libraries, and distribution release cadences all of which contribute to the headache. But now we have something much simpler: Snaps. - -Snaps are a new way for developers to package their applications, bringing with it many advantages over the more traditional package formats such as .deb, .rpm, and others. Snaps are secure, isolated from each other and the host system using technologies such as AppArmor, they are cross-platform, and they are self-contained, allowing a developer to package the exact software their application needs. This sandboxed isolation also improves security and allows applications, and whole snap-based systems, to be rolled back should an issue occur. Snaps really are the future of Linux application packaging. - -Creating a snap is not difficult. First, you need the snap-based runtime environment that is able to understand and execute snaps on your desktop; this tool is named snapd and comes as default on all Ubuntu 16.04 systems. Next you need the tool to create snaps, Snapcraft, which can be installed simply with: - -``` -$ sudo apt-get install snapcraft -``` - -Once you have this environment available it is time to get snapping. - -Snaps use a special YAML formatted file named snapcraft.yaml that defines how the application is packaged as well as any dependencies it may have. Taking a simple application to demonstrate this point, the following YAML file is a real example of how to snap the moon-buggy game, available from the Ubuntu archive. - -``` -name: moon-buggy -version: 1.0.51.11 -summary: Drive a car across the moon -description: | -A simple command-line game where you drive a buggy on the moon -apps: -play: -command: usr/games/moon-buggy -parts: -moon-buggy: -plugin: nil -stage-packages: [moon-buggy] -snap: -– usr/games/moon-buggy -``` - -The above code demonstrates a few new concepts. The first section is all about making your application discoverable in the store; setting the packaging metadata name, version, summary, and description. The apps section implements the play command which points to the location of the moon-buggy executable. The parts section tells Snapcraft about any required plugins that are needed to build the application along with any packages it depends on. In this simple example all we need is the moon-buggy application itself from the Ubuntu archive and Snapcraft takes care of the rest. - -Running snapcraft in the directory where you have the snapcraft.yaml file will create the moon-buggy_1.0.51.11_amd64.snap which can be installed by running: - -``` -$ snap install moon-buggy_1.0.51.11_amd64.snap -``` - -To seen an example of snapping something a little more complex, like the Electron-based Simplenote application [see here][1], for a tutorial online [here][2] and the corresponding code on [GitHub][3]. More examples can be found on the getting Ubuntu developer [website here][4]. - --------------------------------------------------------------------------------- - -via: https://insights.ubuntu.com/2016/06/01/apps-to-snaps/ - -作者:[Jamie][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://insights.ubuntu.com/author/jamiebennett/ -[1]: http://www.simplenote.com/ -[2]: http://www.linuxuk.org/post/20160518_snapping_electron_based_applications_simplenote/ -[3]: https://github.com/jamiedbennett/snaps/tree/master/simplenote -[4]: https://developer.ubuntu.com/en/desktop/get-started/ diff --git a/translated/tech/20160601 Apps to Snaps.md b/translated/tech/20160601 Apps to Snaps.md new file mode 100644 index 0000000000..7dbf0784c9 --- /dev/null +++ b/translated/tech/20160601 Apps to Snaps.md @@ -0,0 +1,61 @@ +Apps to Snaps +================ + +![](https://insights.ubuntu.com/wp-content/uploads/27eb/app-snap.png) + +在 Linux 分发应用不总是那么容易。你有不同的包格式,基础系统,可用库,以及发行版发布周期,所有的这些都让人头疼。但现在我们有了更简单的东西:Snap。 + +Snap 是开发者打包他们应用的新途径,它相对于传统包格式,如 .deb,.rpm 等带来了许多优点。Snap 安全,互相独立,宿主系统使用类似 AppArmor 的技术,它们跨平台,而且是自足的,让开发者可以准确打包它们应用所需要的依赖。沙盒隔离也加强了安全,并允许应用和整个基于 snap 的系统,在出现问题的时候可以回滚。Snap 确实是 Linux 应用打包的未来。 + +创建一个 snap 包并不困难。首先,你需要一个 snap 基础运行环境,能够在你的桌面理解和运行 snap,这个工具叫做 snapd 并且默认内置于所有 Ubuntu 16.04 系统中。接着你需要创建 snap 的工具,Snapcraft,可以通过一个简单的命令安装: + +``` +$ sudo apt-get install snapcraft +``` + +这个环境安装好了之后就可以 snap 起来了。 + +Snap 使用一个特殊的 YAML 格式文件,称作 snapcraft.yaml,它定义了应用是如何打包的以及它需要的依赖。用一个简单的应用来演示一下,下面的 YAML 文件是个如何 snap 打包 moon-buggy 游戏的实际例子,该游戏在 Ubuntu 源中提供。 + +``` +name: moon-buggy +version: 1.0.51.11 +summary: Drive a car across the moon +description: | +A simple command-line game where you drive a buggy on the moon +apps: +play: +command: usr/games/moon-buggy +parts: +moon-buggy: +plugin: nil +stage-packages: [moon-buggy] +snap: +– usr/games/moon-buggy +``` + +上面的代码演示了几个新概念。第一部分是关于让你的应用可以在商店找到的,设置包元数据名称,版本号,摘要,以及描述。Apps 部分实现了运行命令,指向 moon-buggy 可执行文件位置。Parts 部分告诉 snapcraft 用来构建应用所需要的插件以及依赖的包。在这个简单的例子中我们需要的所有东西就是 Ubuntu 源中的 moon-buggy 应用本身,snapcraft 负责剩下的工作。 + +在你的 snapcraft.yaml 所在目录下运行 snapcraft 会创建 moon-buggy_1.0.51.11_amd64.snap 包,可以通过以下命令来安装它: + +``` +$ snap install moon-buggy_1.0.51.11_amd64.snap +``` + +想了解更复杂一点的 snap 打包,比如基于 Electron 的 Simplenote [看这里][1],在线教程在[这里][2],相应的代码在[Github][3]。更多的例子可以在这里的 Ubuntu 开发者[站点][4]找到。 + +-------------------------------------------------------------------------------- + +via: https://insights.ubuntu.com/2016/06/01/apps-to-snaps/ + +作者:[Jamie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://insights.ubuntu.com/author/jamiebennett/ +[1]: http://www.simplenote.com/ +[2]: http://www.linuxuk.org/post/20160518_snapping_electron_based_applications_simplenote/ +[3]: https://github.com/jamiedbennett/snaps/tree/master/simplenote +[4]: https://developer.ubuntu.com/en/desktop/get-started/ From 0cb962938a7a9239818b70c5fa27aee775017cef Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 6 Jun 2016 09:19:08 +0800 Subject: [PATCH 1501/1710] PUB:20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS @geekpi --- ...OS - LINUX DISTRIBUTION FOR NODE LOVERS.md | 53 +++++++++++++++++++ ...OS - LINUX DISTRIBUTION FOR NODE LOVERS.md | 53 ------------------- 2 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 published/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md delete mode 100644 translated/tech/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md diff --git a/published/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md b/published/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md new file mode 100644 index 0000000000..ea47ad605b --- /dev/null +++ b/published/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md @@ -0,0 +1,53 @@ +NodeOS:Node 爱好者的 Linux 发行版 +================================================ + +![](http://itsfoss.com/wp-content/uploads/2016/05/node-os-linux.jpg) + +[NodeOS][1] 是一款基于 [Node.js][2] 的操作系统,自去年其首个[发布候选版][3]之后正朝着它的1.0版本进发。 + +如果你之前不知道的话,NodeOS 是首个架构在 [Linux][5] 内核之上的由 Node.js 和 [npm][4] 驱动的操作系统。[Jacob Groundwater][6] 在2013年中期介绍了这个项目。该操作系统中用到的主要技术是: + +- **Linux 内核**: 这个系统建造在 Linux 内核上 +- **Node.js 运行时**: Node 作为主要的运行时环境 +- **npm 包管理**: npm 作为包管理 + +NodeOS 源码托管在 [Github][7] 上,因此,任何感兴趣的人都可以轻松贡献或者报告 bug。用户可以从源码构建或者使用[预编译镜像][8]。构建过程及快速起步指南可以在项目仓库中找到。 + +NodeOS 背后的思想是提供足够 npm 运行的环境,剩余的功能就可以让 npm 包管理来完成。因此,用户可以使用多达大约 250,000 个软件包,并且这个数目每天都还在增长。所有的都是开源的,你可以根据你的需要很容易地打补丁或者增加更多的包。 + +NodeOS 核心开发被分离成了不同的层面,基本的结构包含: + +- **barebones** – 带有可以启动到 Node.js REPL 的 initramfs 的自定义内核 +- **initramfs** – 用于挂载用户分区以及启动系统的 initram 文件系统 +- **rootfs** – 存放 linux 内核及 initramfs 文件的只读分区 +- **usersfs** – 多用户文件系统(如传统系统一样) + +NodeOS 的目标是可以在任何平台上运行,包括: **实际的硬件(用户计算机或者 SoC)**、**云平台、虚拟机、PaaS 提供商,容器**(Docker 和 Vagga)等等。如今看来,它做得似乎不错。在3.3号,NodeOS 的成员 [Jesús Leganés Combarro][9] 在 Github上[宣布][10]: + +>**NodeOS 不再是一个玩具系统了**,它现在开始可以用在有实际需求的生产环境中了。 + +因此,如果你是 Node.js 的死忠或者乐于尝试新鲜事物,这或许值得你一试。在相关的文章中,你应该了解这些[Linux 发行版的具体用法][11] + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/nodeos-operating-system/ + +作者:[Munif Tanjim][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://itsfoss.com/author/munif/ +[1]: http://node-os.com/ +[2]: https://nodejs.org/en/ +[3]: https://github.com/NodeOS/NodeOS/releases/tag/v1.0-RC1 +[4]: https://www.npmjs.com/ +[5]: http://itsfoss.com/tag/linux/ +[6]: https://github.com/groundwater +[7]: https://github.com/nodeos/nodeos +[8]: https://github.com/NodeOS/NodeOS/releases +[9]: https://github.com/piranna +[10]: https://github.com/NodeOS/NodeOS/issues/216 +[11]: http://itsfoss.com/weird-ubuntu-based-linux-distributions/ diff --git a/translated/tech/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md b/translated/tech/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md deleted file mode 100644 index d189753fd5..0000000000 --- a/translated/tech/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md +++ /dev/null @@ -1,53 +0,0 @@ -NODEOS: NODE爱好者的Linux发行版 -================================================ - -![](http://itsfoss.com/wp-content/uploads/2016/05/node-os-linux.jpg) - -[NodeOS][1]是一个基于[Node.js][2]的操作系统,自去年的首个[发布候选版][3]之后正朝着它的1.0版本进发。 - -如果你是第一次听到它,NodeOS是首个在[Linux][5]内核之上由Node.js和[npm][4]驱动的操作系统。[Jacob Groundwater][6]仔2013年中介绍了这个项目。操作系统中用到的主要技术是: - -- **Linux 内核**: 这个系统内置了Linux内核 -- **Node.js 运行时**: Node作为主要的运行时 -- **npm 包管理**: npm作为包管理 - -NodeOS源码托管在[Github][7]上,因此,任何感兴趣的人都可以轻松贡献或者报告bug。用户可以从源码构建或者使用[预编译镜像][8]。构建过程及使用可以在项目仓库中找到。 - -NodeOS背后的思想是提供足够npm运行的环境,剩余的功能就可以来自npm包管理。因此,用户可以使用大量的大约250,000的包,并且这个数目每天都还在增长。并且所有的都是开源的,你可以根据你的需要很容易地打补丁或者增加更多的包。 - -NodeOS核心开发被分离成了不同的层,基本的结构包含: - -- **barebones** – 带有可以启动到Node.js REPL的initramfs的自定义内核 -- **initramfs** – =用于挂载用户分区以及启动系统的initram文件系统 -- **rootfs** – 托管linux内核及initramfs文件的只读分区 -- **usersfs** – 多用户文件系统(如传统系统一样) - -NodeOS的目标是可以仔任何平台上运行,包括- **真实的硬件(用户计算机或者SoC)**、**云平台、虚拟机、PaaS提供商,容器**(Docker和Vagga)等等。如今看来,它做得似乎不错。在3.3号,NodeOS的成员[Jesús Leganés Combarro][9]在Github上[宣布][10]: - ->**NodeOS不再是一个玩具系统了**,它现在开始可以用在有实际需求的生产环境中了。 - -因此,如果你是Node.js的死忠或者乐于尝试新鲜事物,这或许值得你一试。在相关的文章中,你应该了解这些[Linux发行版的具体用法][11] - - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/nodeos-operating-system/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 - -作者:[Munif Tanjim][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/munif/ -[1]: http://node-os.com/ -[2]: https://nodejs.org/en/ -[3]: https://github.com/NodeOS/NodeOS/releases/tag/v1.0-RC1 -[4]: https://www.npmjs.com/ -[5]: http://itsfoss.com/tag/linux/ -[6]: https://github.com/groundwater -[7]: https://github.com/nodeos/nodeos -[8]: https://github.com/NodeOS/NodeOS/releases -[9]: https://github.com/piranna -[10]: https://github.com/NodeOS/NodeOS/issues/216 -[11]: http://itsfoss.com/weird-ubuntu-based-linux-distributions/ From 85c44a4ce949a260e64f5a3df702ddb515d7e281 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 6 Jun 2016 09:32:32 +0800 Subject: [PATCH 1502/1710] PUB:20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things @geekpi --- ...it ARM processor for the Internet of Things.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename {translated/tech => published}/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md (64%) diff --git a/translated/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md b/published/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md similarity index 64% rename from translated/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md rename to published/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md index 6711f5d4a6..d31ad4eaea 100644 --- a/translated/tech/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md +++ b/published/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md @@ -1,21 +1,20 @@ -NXP 揭幕了一块超小型物联网64位ARM处理器 +NXP 发布了一块超小型物联网64位 ARM 处理器 ========================================================================= -**标签**:[ARM][1], [物联网][2], [NXP][3], [NXP 半导体][4] ![](http://1u88jj3r4db2x4txp44yqfj1.wpengine.netdna-cdn.com/wp-content/uploads/2016/02/nxp-930x556.jpg) -[NXP 半导体][5]揭幕了一块声称世界上最小的用于物联网(IoT)的低功耗64位ARM处理器。 +[NXP 半导体][5]发布了一块声称世界上最小的用于物联网(IoT)的低功耗64位ARM处理器。 -这片小型的QorIQ LS1012A为电池供电,大小受限的应用提供了网络级的安全和性能加速。这包括了运行物联网应用,或者任何智能及可连接的设备。如果物联网能在2020达到1.7万亿美金的潜力(由IDC研究员估算市场得出),那么它将需要像NXP这样的处理器,该处理器在德国纽伦堡的Embedded World 2016 上揭开了什么的面纱。 +这片小型的QorIQ LS1012A为电池供电、大小受限的应用提供了网络级的安全和性能加速。这包括了运行物联网应用,或者任何智能及可连接的设备。如果物联网能在2020达到1.7万亿美金的潜力(由IDC研究员估算市场得出),那么它将需要像NXP这样的处理器,该处理器在德国纽伦堡的Embedded World 2016 上揭开了什么的面纱。 该芯片带有64位ARMv8芯片,拥有网络包加速及内置的安全。它占用9.6平方毫米的空间,并且大约消耗1瓦特的电力。潜在的应用包括下一代的物联网网关、可携带娱乐平台、高性能可携带存储应用、移动硬盘、相机的移动存储、平板及其他可充电的设备。 -除此之外,LS1012A是第一款为新起的基于对象的存储方案设计的处理器,基于对象存储基于智能硬盘,它直接连接到以太网数据中心。处理器必须足够小才能直接集成在硬盘的集成电路上。 +除此之外,LS1012A是第一款为最新兴起的基于对象的存储方案设计的处理器,基于对象存储通过智能硬盘直接连接到以太网数据中心。处理器必须足够小才能直接集成在硬盘的集成电路上。 -NXP的高级副总裁及数字网络部的经理Tareq Bustami说:“低功耗、占用空间小及网络级性能这些突破性组合的NXP LS1012处理器是消费者、物联网相关应用的理想选择。独有的混合能力解放了物联网设计者及开发者使得他们可以在这个高增长的市场中想象并创造更多创新产品。” +NXP的高级副总裁及数字网络部的经理Tareq Bustami说:“突破性组合了低功耗、占用空间小及网络级性能的NXP LS1012处理器是消费者、物联网相关应用的理想选择。独有地将这些能力结合到一起解放了物联网设计者及开发者,使得他们可以在这个高增长的市场中设计并创造更多创新产品。” -NXP说这是唯一一个能够结合全面的高速外围在一个芯片中的1瓦特、64位处理器,这意味着低系统功耗。归功于创新的封装,该处理器可以在低成本的电路板中布线。 +NXP说这是唯一一个1瓦特功耗、64位的、并将这些高速外设综合到一个芯片中的处理器,这意味着更低的系统级功耗。归功于创新性的封装,该处理器可以运用在低成本的电路板中。 NXP的LS1012A可以在2016年4月开始发货,并且现在可以订货。NXP在全球35个国家拥有超过4,5000名员工。 @@ -25,7 +24,7 @@ via: http://venturebeat.com/2016/02/21/nxp-unveils-a-small-and-tiny-64-bit-arm-p 作者:[DEAN TAKAHASHI][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 b85a41555654d105d86a0f2e6c1f12a5e51e241b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 6 Jun 2016 09:50:10 +0800 Subject: [PATCH 1503/1710] PUB:20160218 7 Steps to Start Your Linux SysAdmin Career @alim0x --- ...eps to Start Your Linux SysAdmin Career.md | 59 ++++++++++++++++ ...eps to Start Your Linux SysAdmin Career.md | 67 ------------------- 2 files changed, 59 insertions(+), 67 deletions(-) create mode 100644 published/20160218 7 Steps to Start Your Linux SysAdmin Career.md delete mode 100644 translated/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md diff --git a/published/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/published/20160218 7 Steps to Start Your Linux SysAdmin Career.md new file mode 100644 index 0000000000..0f46f091d3 --- /dev/null +++ b/published/20160218 7 Steps to Start Your Linux SysAdmin Career.md @@ -0,0 +1,59 @@ +七步开始你的 Linux 系统管理员生涯 +=============================================== + +Linux 现在是个大热门。每个人都在寻求 Linux 才能。招聘人员对有 Linux 经验的人求贤若渴,还有无数的职位虚位以待。但是如果你是 Linux 新手,又想要赶上这波热潮,该从何开始下手呢? + +###1、安装 Linux### + +这应该是不言而喻的,但学习 Linux 的第一关键就是安装 Linux。LFS101x 和 LFS201 课程都包含第一次安装和配置 Linux 的详细内容。 + +###2、 完成 LFS101x 课程### + +如果你是完完全全的 Linux 新手,最佳的起点是我们的免费 Linux 课程 [LFS101x Introduction to Linux](https://www.edx.org/course/introduction-linux-linuxfoundationx-lfs101x-2)。这个在线课程放在 edX.org,探索 Linux 系统管理员和终端用户常用的各种工具和技能以及日常的 Linux 工作环境。该课程是为有一定经验,但较少或没有接触过 Linux 的电脑用户设计的,不论他们是在个人还是企业环境中工作。这个课程会从图形界面和命令行两个方面教会你有用的 Linux 知识,让你能够了解主流的 Linux 发行版。 + +###3、 看看 LFS201 课程### + +在你完成 LFS101x 之后,你就可以开始挑战 Linux 中更加复杂的任务了,这是成为一名专业的系统管理员所必须的。为了掌握这些技能,你应该看看 [LFS201 Essentials of Linux System Administration](http://training.linuxfoundation.org/linux-courses/system-administration-training/essentials-of-system-administration) 这个课程。该课程对每个话题进行了深度的解释和介绍,还有大量的练习和实验,帮助你获得相关主题实际的上手经验。 + +如果你更愿意有个教练,或者你的雇主想将你培养成 Linux 系统管理员的话,你可能会对 LFS220 Linux System Administration 感兴趣。这个课程有 LFS201 中所有的主题,但是它是由专家专人教授的,帮助你进行实验以及解答你在课程主题中的问题。 + +###4、 练习!### + +熟能生巧,和对任何乐器或运动适用一样,这对 Linux 来说也一样适用。在你安装 Linux 之后,经常使用它。一遍遍地练习关键任务,直到你不需要参考材料也能轻而易举地完成。练习命令行的输入输出以及图形界面。这些练习能够保证你掌握成为成功的 Linux 系统管理员所必需的知识和技能。 + +###5、 获得认证### + +在你完成 LFS201 或 LFS220 并且充分练习之后,你现在已经准备好获得系统管理员的认证了。你需要这个证书,因为你需要向雇主证明你拥有一名专业 Linux 系统管理员必需的技能。 + +现在有一些不同的 Linux 证书,它们每个都有其独到之处。但是,它们里大部分不是在特定发行版(如红帽)上认证,就是纯粹的知识测试,没有演示 Linux 的实际技能。Linux 基金会认证系统管理员(Linux Foundation Certified System Administrator)证书对想要一个灵活的,有意义的初级证书的人来说是个不错的选择。 + +###6、 参与进来### + +如果你所在的地方有本地 Linux 用户组(Linux Users Group,LUG)的话,这时候你可以考虑加入他们。这些组织通常由各种年龄和经验水平的人组成,所以不管你的 Linux 经验水平如何,你都能找到和你类似技能水平的人互助,或是更高水平的 Linux 用户来解答你的问题以及介绍有用的资源。要想知道你附近有没有 LUG,上 meet.com 看看,或是附近的大学,又或是上网搜索一下。 + +还有不少在线社区可以在你学习 Linux 的时候帮助你。这些站点和社区向 Linux 新手和有经验的管理员都能够提供帮助和支持: + + - [Linux Admin subreddit](https://www.reddit.com/r/linuxadmin) + - [Linux.com](http://www.linux.com/) + - [training.linuxfoundation.org](http://training.linuxfoundation.org/) + - [http://community.ubuntu.com/help-information/](http://community.ubuntu.com/help-information/) + - [https://forums.opensuse.org/forum.php](https://forums.opensuse.org/forum.php) + - [http://wiki.centos.org/Documentation](http://wiki.centos.org/Documentation) + +###7、 学会热爱文档### + +最后但同样重要的是,如果你困在 Linux 的某些地方,别忘了 Linux 包含的文档。使用命令 man(manual,手册),info 和 help,你从系统内就可以找到 Linux 几乎所有方面的信息。这些内置资源的用处再夸大也不为过,你会发现你在生涯中始终会用到,所以你可能最好早点掌握使用它们。 + +想要了解更多开始你 Linux IT 生涯的信息?查看我们免费的电子书“[开始你 Linux IT 生涯的简短指南](http://training.linuxfoundation.org/sysadmin-it-career-guide)”。 + +------------------------------------------------------------------------------ + +via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps-to-start-your-linux-sysadmin-career + +作者:[linux.com][a] +译者:[alim0x](https://github.com/alim0x) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:linux.com diff --git a/translated/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/translated/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md deleted file mode 100644 index e6b4fa62ab..0000000000 --- a/translated/tech/20160218 7 Steps to Start Your Linux SysAdmin Career.md +++ /dev/null @@ -1,67 +0,0 @@ -七步开始你的 Linux 系统管理员生涯 -=============================================== - - -Linux 现在是个大热门。每个人都在寻求 Linux 才能。招聘人员对有 Linux 经验的人求贤若渴,还有无数的职位虚位以待。但是如果你是 Linux 新手,又想要赶上这波热潮,该从何开始下手呢? - -1. 安装 Linux - - 这应该是不言而喻的,但学习 Linux 的第一关键就是安装 Linux。LFS101x 和 LFS201 课程都包含第一次安装和配置 Linux 的详细内容。 - -2. 完成 LFS101x 课程 - - 如果你是 Linux 完完全全的新手,最佳的起点是免费的 Linux 课程 [LFS101x Introduction](https://www.edx.org/course/introduction-linux-linuxfoundationx-lfs101x-2)。这个在线课程在 edX.org,探索 Linux 系统管理员和终端用户常用的各种工具和技能以及日常 Linux 工作环境。该课程是为有一定经验但较少或没有接触过 Linux 的电脑用户设计的,不论他们是在个人还是企业环境中工作。这个课程会从图形界面和命令行教会你有用的 Linux 知识,让你能够了解主流的 Linux 发行版。 - -3. 看看 LFS201 课程 - - 在你完成 LFS101x 之后,你就准备好开始进入 Linux 更加复杂的任务了,这是成为一名专业的系统管理员所必须的。为了掌握这些技能,你应该看看 [LFS201 Essentials of Linux System Administration](http://training.linuxfoundation.org/linux-courses/system-administration-training/essentials-of-system-administration) 这个课程。该课程对每个话题进行了深度的解释和介绍,还有大量的练习和实验,帮助你获得相关主题实际的上手经验。 - - 如果你更愿意有个教练或者你的雇主对将你培养成 Linux 系统管理员有兴趣,你可能会对 LFS220 Linux System Administration 有兴趣。这个课程有 LFS201 中所有的主题,但是它是由专家专人教授的,帮助你进行实验以及解答你在课程主题中的问题。 - -4. 练习! - - 熟能生巧,和对任何乐器或运动适用一样,这对 Linux 来说也一样适用。在你安装 Linux 之后,经常使用它。一遍遍地练习关键任务,直到你不需要参考材料也能轻而易举地完成。练习命令行和图形界面的输入输出。这些练习能够保证你掌握成为成功的 Linux 系统管理员所必需的知识和技能。 - -5. 获得认证 - - 在你完成 LFS201 或 LFS220 并且充分练习之后,你现在已经准备好获得系统管理员的认证了。你需要这个证书,因为你需要向雇主证明你拥有一名专业 Linux 系统管理员必需的技能。 - - 现在有一些不同的 Linux 证书,它们有它们的独到之处。但是,它们里大部分不是在特定发行版(如红帽)上认证,就是纯粹的知识测试,没有演示 Linux 的实际技能。Linux 基金会认证系统管理员(Linux Foundation Certified System Administrator)证书对想要一个灵活的,有意义的初级证书的人来说是个优秀的替代。 - -6. 参与进来 - - 如果你所在的地方有本地 Linux 用户组(Linux Users Group,LUG)的话,这时候你可能还想要考虑加入他们。这些组织通常由各种年龄和经验水平的人组成,所以不管你的 Linux 经验水平如何,你都能找到和你类似技能水平的人互助,或是更高水平的 Linux 用户来解答你的问题以及介绍有用的资源。要想知道你附近有没有 LUG,上 meet.com 看看,或是附近的大学,又或是上网搜索一下。 - - 还有不少在线社区可以在你学习 Linux 的时候帮助你。这些站点和社区向 Linux 新手和有经验的管理员都能够提供帮助和支持: - - - [Linux Admin subreddit](https://www.reddit.com/r/linuxadmin) - - - [Linux.com](http://www.linux.com/) - - - [training.linuxfoundation.org](http://training.linuxfoundation.org/) - - - [http://community.ubuntu.com/help-information/](http://community.ubuntu.com/help-information/) - - - [https://forums.opensuse.org/forum.php](https://forums.opensuse.org/forum.php) - - - [http://wiki.centos.org/Documentation](http://wiki.centos.org/Documentation) - -7. 学会热爱文档 - - 最后但同样重要的是,如果你困在 Linux 的某些地方,别忘了 Linux 包含的文档。使用命令 man(manual,手册),info 和 help,你从系统内就可以找到 Linux 几乎所有方面的信息。这些内置资源的用处再夸大也不为过,你会发现你在生涯中始终会用到,所以你可能最好早点掌握使用它们。 - - 想要了解更多开始你 Linux IT 生涯的信息?查看我们免费的电子书“[开始你 Linux IT 生涯的简短指南](http://training.linuxfoundation.org/sysadmin-it-career-guide)”。 - -[立刻下载](http://training.linuxfoundation.org/sysadmin-it-career-guide) - ------------------------------------------------------------------------------- - -via: http://www.linux.com/news/featured-blogs/191-linux-training/834644-7-steps-to-start-your-linux-sysadmin-career - -作者:[linux.com][a] -译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:linux.com From 681b3945deca3187652a712d80c36030b7c1742e Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 6 Jun 2016 22:40:31 +0800 Subject: [PATCH 1504/1710] [translating]Will Google Replace Passwords With A New Trust-Based Authentication Method --- ...ce Passwords With A New Trust-Based Authentication Method.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md b/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md index 2434c0412a..66930943a1 100644 --- a/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md +++ b/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md @@ -1,3 +1,5 @@ +alim0x translating + Will Google Replace Passwords With A New Trust-Based Authentication Method? =========================================================================== From b38f2f3a9d51aaaca1fadec758a48d379172a5ee Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 7 Jun 2016 07:49:10 +0800 Subject: [PATCH 1505/1710] PUB:20160218 9 Key Trends in Hybrid Cloud Computing @sonofelice --- ... 9 Key Trends in Hybrid Cloud Computing.md | 74 ++++++++++++++++++ ... 9 Key Trends in Hybrid Cloud Computing.md | 76 ------------------- 2 files changed, 74 insertions(+), 76 deletions(-) create mode 100644 published/20160218 9 Key Trends in Hybrid Cloud Computing.md delete mode 100644 translated/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md diff --git a/published/20160218 9 Key Trends in Hybrid Cloud Computing.md b/published/20160218 9 Key Trends in Hybrid Cloud Computing.md new file mode 100644 index 0000000000..92fba66440 --- /dev/null +++ b/published/20160218 9 Key Trends in Hybrid Cloud Computing.md @@ -0,0 +1,74 @@ +混合云计算的 9 大关键趋势 +======================================== + +自从几年前云计算的概念受到IT界的关注以来,公有云、私有云和混合云这三种云计算方式都有了可观的演进。其中混合云计算方式是最热门的云计算方式,在接受调查的公司中,有[88%的公司](https://www.greenhousedata.com/blog/hybrid-continues-to-be-most-popular-cloud-option-adoption-accelerating)将混合云计算摆在至关重要的地位。 + +混合云计算的疾速演进意味着一两年前的传统观念已经过时了。为此,我们询问了几个行业分析师,混合云在2016年的走势将会如何,我们得到了几个比较有意思的答案。 + +1. **2016年可能是我们将混合云投入使用的一年。** + +混合云从本质上来说依赖于私有云,这对企业来说是比较难实现的。事实上,亚马逊,谷歌和微软的公有云已经进行了大量的投资,并且起步也比较早。私有云拖了混合云发展和使用的后腿。 + +私有云没有得到这么多的投资,这是有私有云的性质决定的。私有云意味着维护和投资你自己的数据中心。而许多公有云提供商正在推动企业减少或者消除他们的数据中心。 + +然而,得益于 OpenStack 的发展和微软的 Azure Stack ,这两者基本上就是封装在一个盒子里的私有云,我们将会看到私有云慢慢追上公有云的发展步伐。支持混合云的工具、基础设施和架构也变得更加健壮。 + +2. **容器,微服务和 unikernels 将会促进混合云的发展。** + +分析师预言,到2016年底,这些原生云技术会或多或少成为主流的。这些云技术正在快速成熟,将会成为虚拟机的一个替代品,而虚拟机需要更多的资源。 + +更重要的是,他们既能工作在在线场景,也能工作在离线场景。容器化和编排允许快速的扩大规模,进行公有云和私有云之间的服务迁移,使你能够更容易移动你的服务。 + +3. **数据和相关性占据核心舞台。** + +所有的云计算方式都处在发展模式。这使得云计算变成了一个技术类的故事。咨询公司 [Avoa](http://avoa.com/2016/01/01/2016-is-the-year-of-data-and-relevance/)称,随着云趋于成熟,数据和相关性变得越来越重要。起初,云计算和大数据都是关于怎么得到尽可能多的数据,然后他们担心如何处理这海量的数据。 + +2016年,相关组织将会继续锤炼如何进行数据收集和使用的相关技术。在必须处理的技术和文化方面仍然有待提高。但是2016年应该重新将关注点放在从各个方面考虑的数据重要性上,发现最相关的信息,而不只是数据的数量。 + +4. **云服务将超越按需工作负载。** + +AWS(Amazon Web Services) 起初是提供给程序员或者是开发人员能够快速启动虚拟机、做一些工作然后离线的一个地方。本质上是按需使用,要花费更多的钱才能让这些服务持续运行、全天候工作。 + +然而,IT 公司正开始作为服务代理,为内部用户提供各种 IT 服务。可以是内部 IT 服务,公有云基础架构提供商,平台服务和软件服务。 + +他们将越来越多的认识到像云管理平台这样的工具的价值。云管理平台可以提供针对不同服务的基于策略的一致性管理。他们也将看到像提高可移植性的容器等技术的价值。然而,云服务代理,在不同云之间快速移动工作负载从而进行价格套利或者类似的原因,仍然是行不通的。 + +5. **服务提供商转变成了云服务提供商。** + +到目前为止,购买云服务成了直销模式。AWS EC2 服务的使用者通常变成了购买者,要么通过官方认证渠道,要么通过影子 IT。但是随着云服务越来越全面,提供的服务菜单越来越复杂,越来越多的人转向了经销商,服务提供商转变成了他们 IT 服务的购买者。 + +2nd Watch (2nd Watch 是为企业提供云管理的 AWS 的首选合作伙伴)最近的一项调查发现,在美国将近85%的 IT 高管愿意支付一个小的溢价从渠道商那里购买公有云服务,如果购买过程变得不再那么复杂。根据调查,这85%的高管有五分之四的愿意支付额外的15%或者更多。三分之一的受访高管表示,这些有助于他们购买、使用和管理公有云服务。 + +6. **物联网和云对于2016年的意义好比移动和云对2012年的意义。** + +物联网获得了广泛的关注,更重要的是,物联网已经从测试场景进行了实际应用。云的分布式特性使得云成为了物联网非常重要的一部分,对于工业物联网,与后端系统交互的机械和重型设备,混合云将会成为最自然的驱动者,连接,数据采集和处理将会发生在混合云环境中,这得益于私有云在安全和隐私方面的好处。 + +7. **NIST 对云的定义开始瓦解。** + +2011年,美国国家标准与技术研究院发布了“[ NIST 对于云计算的定义](http://csrc.nist.gov/publications/nistpubs/800-145/SP800-145.pdf)”(PDF),这个定义成为了私有云、公有云、混合云和 aaS 模板的标准定义。 + +然而随着时间的推移,定义开始改变。IaaS 变得更加复杂,开始支持 OpenStack,[Swift](https://wiki.openstack.org/wiki/Swift) 对象存储和神经网络这样的项目。PaaS 似乎正在消退,因为 PaaS 和传统的中间件开发几乎无异。SaaS,只是通过浏览器进行访问的应用,也正在失去发展动力,因为许多 app 和服务提供了许多云接口,你可以通过各种手段调用接口,不仅仅通过浏览器。 + +8. **分析变得更加重要** + +对于混合云计算来说,分析将会成为一个巨大的增长机遇,云计算具有规模大、灵活性高的优势,使得云计算非常适合需要海量数据的分析工作。对于某些分析方式,比如高度敏感的数据,私有云仍然是主导地位,但是私有云也是混合云的一部分。因此,无论如何,混合云计算胜出。 + +9. **安全仍然是一个非常紧迫的问题。** + +随着混合云计算在2016年的发展,以及对物联网和容器等新技术的引进,这同时也增加了更多的脆弱可攻破的地方,从而导致数据泄露。先增加使用新技术的趋势,然后再去考虑安全性,这种问题经常发生,同时还有缺少经验的工程师不去考虑系统的安全问题,总有一天你会尝到灾难的后果的。 + +当一项新技术出来,管理规范总是落后于安全问题产生后,然后我们才考虑去保护技术。容器就是一个很鲜明的例子。你可以从 Docker 下载各种示例容器,但是你知道你下载的东西来自哪里么?在人们在对容器内容不知情的情况下下载并运行了容器之后,Docker 不得不重新加上安全验证。 + +像 Path 和 Snapchat 这样的移动技术在智能手机市场火起来之后也出现了重大的安全问题。一项新技术被恶意利用无可避免。所以安全研究人员需要通过各种手段来保证新技术的安全性,很有可能在部署之后才会发现安全问题。 + +------------------------------------------------------------------------------ + +via: http://www.datamation.com/cloud-computing/9-key-trends-in-hybrid-cloud-computing.html + +作者:[Andy Patrizio][a] +译者:[棣琦](https://github.com/sonofelice) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.datamation.com/author/Andy-Patrizio-90720.html diff --git a/translated/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md b/translated/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md deleted file mode 100644 index 5efec75ec3..0000000000 --- a/translated/tech/20160218 9 Key Trends in Hybrid Cloud Computing.md +++ /dev/null @@ -1,76 +0,0 @@ -混合云计算的9大关键趋势 -======================================== - -自从几年前云计算的概念受到IT界的关注以来,公有云、私有云和混合云这三种云计算方式都有了可观的演进。其中混合云计算方式是最热门的云计算方式,在接受调查的公司中,有[88%的公司](https://www.greenhousedata.com/blog/hybrid-continues-to-be-most-popular-cloud-option-adoption-accelerating)将混合云计算摆在至关重要的地位。 - -混合云计算的疾速演进意味着一两年前的传统观念已经过时了。为此,我们询问了几个行业分析师,混合云在2016年的走势将会如何,我们得到了几个比较有意思的答案。 - -1. **2016年可能是我们将混合云投入使用的一年。** - - 混合云从本质上来说依赖于私有云,这对企业来说是比较难实现的。事实上,亚马逊,谷歌和微软的公有云已经进行了大量的投资,并且起步也比较早。私有云拖了混合云发展和使用的后腿。 - - 私有云没有得到这么多的投资,这是有私有云的性质决定的。私有云意味着维护和投资你自己的数据中心。许多公有云提供商正在推动企业减少或者消除他们的数据中心。 - - 然而,得益于OpenStack的发展和微软的 Azure Stack ,这两者基本上就是封装在一个盒子里的私有云,我们将会看到私有云慢慢追上公有云的发展步伐。支持混合云的工具、基础设施和架构也变得更加健壮。 - - -2. **容器,微服务和unikernels将会促进混合云的发展。** - - 分析师预言,到2016年底,这些原生云技术会或多或少成为主流的。这些云技术正在快速成熟,将会成为虚拟机的一个替代品,而虚拟机需要更多的资源。 - - 更重要的是,他们既能工作在在线场景,也能工作在离线场景。容器化和编排允许快速的扩大规模,进行公有云和私有云之间的服务迁移,使你能够更容易移动你的服务。 - -3. **数据和相关性占据核心舞台。** - - 所有的云计算方式都处在发展模式。这使得云计算变成了一个技术类的故事。咨询公司[Avoa](http://avoa.com/2016/01/01/2016-is-the-year-of-data-and-relevance/)称,随着云趋于成熟,数据和相关性变得越来越重要。起初,云计算和大数据都是关于怎么吸收尽可能多的数据,然后他们担心如何处理这海量的数据。 - - 2016年,相关组织将会继续锤炼如何进行数据收集和使用的相关技术。在必须处理的技术和文化方面仍然有待提高。但是2016年应该重新将关注点放在从各个方面考虑的数据重要性上,发现最相关的信息,而不只是数据的数量。 - -4. **云服务将超越按需工作负载。** - - AWS(Amazon Web Services)起初是提供给程序员或者是开发人员能够快速启动虚拟机,做一些工作然后离线的一个地方。这就是按需使用的本质。要让这些服务持续运行,几乎需要全天候工作。 - - 然而,IT组织正开始作为服务代理,为内部用户提供各种IT服务。可以是内部IT服务,公有云基础架构提供商,平台服务和软件服务。 - - 他们将越来越多的认识到想云管理平台这样的工具的价值。云管理平台可以提供针对不同服务的基于策略的一致性管理。他们也将看到像提高可移植性的容器等技术的价值。然而,云服务代理,在不同云之间快速移动的工作负载进行价格套利或者相关原因的意义上来讲,仍然是行不通的。 - -5. **服务提供商转变成了云服务提供商。** - - 到目前为止,购买云服务成了直销模式。AWS EC2 服务的使用者通常变成了购买者,通过官方认证渠道或者通过影子IT。但是随着云服务越来越全面,提供的服务菜单越来越复杂,越来越多的人转向了经销商,服务提供商转变成了他们IT服务的购买者。 - - 2nd Watch (2nd Watch是为企业提供云管理的 AWS 的首选合作伙伴)最近的一项调查发现,在美国将近85%的IT高管愿意支付一个小的溢价从渠道商那里购买公有云服务,如果购买过程变得不再那么复杂。根据调查,这85%的高管有五分之四的愿意支付额外的15%或者更多。三分之一的受访高管表示,他们可以使用帮助来购买、使用和管理公有云服务。 - -6. **物联网和云对于2016年的意义好比移动和云对2012年的意义。** - - 物联网获得了广泛的关注,更重要的是,物联网已经从测试场景进行了实际应用。云的分布式特性使得云成为了物联网非常重要的一部分,对于工业物联网,与后端系统交互的机械和重型设备,混合云将会成为最自然的驱动者,连接,数据采集和处理将会发生在混合云环境中,这得益于私有云在安全和隐私方面的好处。 - -7. **NIST 对云的定义开始瓦解。** - - 2011年,美国国家标准与技术研究院发布了“[ NIST 对于云计算的定义](http://csrc.nist.gov/publications/nistpubs/800-145/SP800-145.pdf)”(PDF),这个定义成为了私有云、公有云、混合云和 aas模板的标准定义。 - - 然而随着时间的推移,定义开始改变。Iaas变得更加复杂,开始支持OpenStack,[Swift](https://wiki.openstack.org/wiki/Swift) 对象存储和神经网络这样的项目。Paas似乎正在消退,因为Paas和传统的中间件开发几乎无异。Saas,只是通过浏览器进行访问的应用,也正在失去发展动力,因为许多app和服务提供了许多云接口,你可以通过各种手段调用接口,不仅仅通过浏览器。 - -8. **分析变得更加重要** - - 对于混合云计算来说,分析将会成为一个巨大的增长机遇,云计算具有规模大、灵活性高的优势,使得云计算非常适合需要海量数据的分析工作。对于某些分析方式,比如高度敏感的数据,私有云仍然是主导地位但是私有云也是混合云的一部分。因此,无论如何,混合云计算胜出。 - -9. **安全仍然是一个非常紧迫的问题。** - - 随着混合云计算在2016年的发展,以及对物联网和容器等新技术的引进,这同时也增加了更多的脆弱可攻破的地方从而导致数据泄露。先增加使用新技术的趋势,然后再去考虑安全性,这种问题经常发生,同时还有缺少经验的工程师不去考虑系统的安全问题,总有一天你会尝到灾难的后果的。 - - 当一项新技术出来,管理规范总是落后于安全问题产生后,然后我们才考虑去保护技术。容器就是一个很鲜明的例子。你可以从Docker下周各种示例容器,但是你知道你下载的东西来自哪里么?在人们在对容器内容不知情的情况下下载并运行了容器之后,Docker不得不重新加上安全验证。 - - 像Path和Snapchat这样的移动技术在智能手机市场火起来之后也出现了重大的安全问题。一项新技术被恶意利用无可避免。所以安全研究人员需要通过各种手段来保证新技术的安全性。很有可能在部署之后才会发现安全问题。 - - ------------------------------------------------------------------------------- - -via: http://www.datamation.com/cloud-computing/9-key-trends-in-hybrid-cloud-computing.html - -作者:[Andy Patrizio][a] -译者:[棣琦](https://github.com/sonofelice) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.datamation.com/author/Andy-Patrizio-90720.html From 9b66a44b8eb311be8d3bb4f32547ff621a3a7649 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 7 Jun 2016 10:01:02 +0800 Subject: [PATCH 1506/1710] =?UTF-8?q?20160607-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git,guide --- ...160606 Basic Git Commands You Must Know.md | 219 ++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 sources/tech/20160606 Basic Git Commands You Must Know.md diff --git a/sources/tech/20160606 Basic Git Commands You Must Know.md b/sources/tech/20160606 Basic Git Commands You Must Know.md new file mode 100644 index 0000000000..336bf518a8 --- /dev/null +++ b/sources/tech/20160606 Basic Git Commands You Must Know.md @@ -0,0 +1,219 @@ +Basic Git Commands You Must Know +===================================== + +![](http://itsfoss.com/wp-content/uploads/2016/06/Download-Git-Sheet.jpg) + +*Brief: This quick guide shows you all the basic Git commands and their usage. You can download these commands for quick reference.* + +We have seen the quick guide and [Vi cheat sheet download][1] in an earlier post. In this article, we’ll see all the basic Git commands you need to get started with it. + +### GIT + +[Git][2] is a distributed version control system that is widely used by a number of open source projects. It was started in the year 2005 by Linux founder, [Linus Torvalds][3]. The program allows for a non-linear development of projects, and can handle large amounts of data effectively by storing it on the local server. In this tutorial, we are going to play around Git and learn how to get started with it. + +I am using Ubuntu in this tutorial but you can use any Linux distribution of your choice. Apart from installation, rest all commands are the same in all Linux distributions. + +### INSTALL GIT + +To install git run this command : + +``` +sudo apt-get install git-core +``` + +After it finishes downloading, you will have Git installed and ready to use. + +### SETUP GIT: + +After Git is installed, whether from apt-get or from the source, you need to copy your username and email in the gitconfig file. You can access this file at ~/.gitconfig. + +Opening it following a fresh Git install would reveal a completely blank page: + +``` +sudo vim ~/.gitconfig +``` + +You can use the follow commands to add in the required information. Replace ‘user’ with your username and ‘user@example.com’ with your email. + +``` +git config --global user.name "User" +git config --global user.email user@example.com +``` + +And you are done with setting up. Now let’s get started with Git. + +### REPOSITORY: + +Create a new directory, open it and run this command: + +``` +git init +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-git-1-1024x173.png) + +This will create a new git repository. Your local repository consists of three “trees” maintained by git. + +First one is your Working Directory which holds the actual files. Second one is the Index which acts as a staging area and finally the HEAD which points to the last commit you’ve made.checkout your repository using git clone /path/to/repository. + +Checkout your repository (repository you just created or an existing repository on a server) using git clone /path/to/repository. + +### ADD FILES AND COMMIT: + +You can propose changes using: + +``` +git add +``` + +This will add a new file for the commit. If you want to add every new file, then just do: + +``` +git add --all +``` + +Your files are added check your status using + +``` +git status +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-git-2-1024x219.png) + +As you can see, there are changes but they are not committed. Now you need to commit these changes, use: + +``` +git commit -m "Commit message" +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/playing-around-git-3-1024x124.png) + +You can also do (preferred): + +``` +git commit -a +``` + +And then write your commit message. Now the file is committed to the HEAD, but not in your remote repository yet. + +### PUSH YOUR CHANGES + +Your changes are in the HEAD of your local working copy. If you have not cloned an existing repository and want to connect your repository to a remote server, you need to add it first with: + +``` +git remote add origin +``` + +Now you are able to push your changes to the selected remote server.To send those changes to your remote repository, run: + +``` +git push -u origin master +``` + +### BRANCHING: + +Branches are used to develop features which are isolated from each other. The master branch is the “default” branch when you create a repository. Use other branches for development and merge them back to the master branch upon completion. + +Create a new branch named “mybranch” and switch to it using: + +``` +git checkout -b mybranch +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-Git-4--1024x145.jpg) + +You can switch back to master by running: + +``` +git checkout master +``` + +If you want to delete the branch use: + +``` +git branch -d mybranch +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-Git-5-1-1024x181.jpg) + +A branch is not available to others unless you push the branch to your remote repository, so what are you thinking about just push it: + +``` +git push origin +``` + +### UPDATE AND MERGE + +To update your local repository to the newest commit, run: + +``` +git pull +``` + +In your working directory to fetch and merge remote changes.To merge another branch into your active branch (e.g. master), use : + +``` +git merge +``` + +In both cases, git tries to auto-merge changes. Unfortunately, this is not always possible and results in conflicts. You are responsible for merging those conflicts manually by editing the files shown by git. After changing, you need to mark them as merged with + +``` +git add +``` + +Before merging changes, you can also preview them by using + +``` +git diff +``` + +### GIT LOG: + +You can see the repository history using. + +``` +git log +``` + +To see a log where each commit is one line you can use: + +``` +git log --pretty=oneline +``` + +Or maybe you want to see an ASCII art tree of all the branches, decorated with the names of tags and branches: + +``` +git log --graph --oneline --decorate --all +``` + +If you want to see only which files have changed: + +``` +git log --name-status +``` + +And for any help during the entire process, you can use git --help + +Isn’t Git is awesome!! Congratulation you are done with basics of git. If you like, you can download these basic Git commands as a quick reference guide from the link below: + +[Download Git Cheat Sheet][4] + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/basic-git-commands-cheat-sheet/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Rakhi Sharma][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/rakhi/ +[1]: http://itsfoss.com/download-vi-cheat-sheet/ +[2]: https://git-scm.com/ +[3]: https://en.wikipedia.org/wiki/Linus_Torvalds +[4]: https://drive.google.com/open?id=0By49_3Av9sT1bXpINjhvU29VNUU + From 52a76050c04141efff1a7c5f892b219d9ae4e2d0 Mon Sep 17 00:00:00 2001 From: VicYu Date: Tue, 7 Jun 2016 14:27:01 +0800 Subject: [PATCH 1507/1710] Pick up new one --- sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md index 9f90a9cb45..4bef489ade 100644 --- a/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md +++ b/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md @@ -1,3 +1,5 @@ + Vic020 + How to Add Cron Jobs in Linux and Unix ====================================== From c29a8c8dc93ed00b04c82adeb54987ba1de53b69 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 7 Jun 2016 14:41:40 +0800 Subject: [PATCH 1508/1710] [translated]Will Google Replace Passwords With A New Trust-Based Authentication Method --- ...A New Trust-Based Authentication Method.md | 41 ------------------- ...A New Trust-Based Authentication Method.md | 38 +++++++++++++++++ 2 files changed, 38 insertions(+), 41 deletions(-) delete mode 100644 sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md create mode 100644 translated/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md diff --git a/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md b/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md deleted file mode 100644 index 66930943a1..0000000000 --- a/sources/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md +++ /dev/null @@ -1,41 +0,0 @@ -alim0x translating - -Will Google Replace Passwords With A New Trust-Based Authentication Method? -=========================================================================== - -![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/Trust-API-Google-replaces-passwords.jpg) - -A newly developed authentication method by Google will rate how trustworthy is your login and will authenticate it based on a “Trust Score”. - - -Abacus is the name of the Google project that aims to rid you off of the nuisance which is remembering and typing passwords. - -In latest Google I/O developer conference, the company has introduced a new feature stemming from the ambitious project, called “**Trust API**“. - -The API (Application Programming Interface) which will be available for Android developers by the year end “if all goes well”, is intended to make use of Android devices’ various types of sensors in order to profile a user and create what they refer to as Trust Score. - -Based on that Trust Score, an application which requires login credentials will be able to verify that indeed you are authorized to login and thus will not prompt for a password. - -![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/Abacus-to-Trust-API.jpg) ->Abacus to Trust API - -### A Point To Consider - -Although the idea, functionality-wise, sounds pretty great – mitigating the burden which is password authentication. - -The other side of the coin tough, is that once again, by doing so Google pushes us (deliberately or not) to give up our privacy in favor of ease of use. - -Is it worth it? it’s up to you to decide… - - --------------------------------------------------------------------------------- - -via: http://www.iwillfolo.com/will-google-replace-passwords-with-a-new-trust-based-authentication-method/ - -作者:[iWillFolo][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.iwillfolo.com/ diff --git a/translated/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md b/translated/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md new file mode 100644 index 0000000000..7e0e85d688 --- /dev/null +++ b/translated/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md @@ -0,0 +1,38 @@ +谷歌会用基于信任的认证措施取代密码吗? +=========================================================================== + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/Trust-API-Google-replaces-passwords.jpg) + +一个谷歌新开发的认证措施会评估你的登录有多可靠,并且基于一个“信任分(Trust Score)”认证你的登录。 + +这个谷歌项目的名字是 Abacus,它的目标是让你摆脱讨厌的密码记忆和输入。 + +在最近的 Google I/O 开发者大会上,谷歌引入了自这个雄心勃勃的项目而来的新特性,称作“**Trust API**”。 + +“如果一切进展顺利”,这个 API(Application Programming Interface,应用程序编程接口)会在年底前供安卓开发者使用。API 会利用安卓设备上不同的传感器来识别用户,并创建一个他们称之为“信任分(Trust Score)”的结果。 + +基于这个信任分,一个需要登录认证的应用可以验证你确实可以授权登录,从而不会提示需要密码。 + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/Abacus-to-Trust-API.jpg) +>Abacus 到 Trust API + +### 需要思考的地方 + +尽管这个想法,明智的功能,听起来很棒——减轻了密码认证的负担。 + +但从另一面来说,这是不是谷歌又一次逼迫我们(有意或无意)为了方便使用而放弃我们的隐私? + +是否值得?这取决于你的决定... + + +-------------------------------------------------------------------------------- + +via: http://www.iwillfolo.com/will-google-replace-passwords-with-a-new-trust-based-authentication-method/ + +作者:[iWillFolo][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.iwillfolo.com/ From 9bc20788666eedf45ee45e659e40de823fe806da Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 7 Jun 2016 16:51:39 +0800 Subject: [PATCH 1509/1710] [translating]Basic Git Commands You Must Know --- sources/tech/20160606 Basic Git Commands You Must Know.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160606 Basic Git Commands You Must Know.md b/sources/tech/20160606 Basic Git Commands You Must Know.md index 336bf518a8..6eea21b731 100644 --- a/sources/tech/20160606 Basic Git Commands You Must Know.md +++ b/sources/tech/20160606 Basic Git Commands You Must Know.md @@ -1,3 +1,5 @@ +alim0x translating + Basic Git Commands You Must Know ===================================== @@ -216,4 +218,3 @@ via: http://itsfoss.com/basic-git-commands-cheat-sheet/?utm_source=feedburner&ut [2]: https://git-scm.com/ [3]: https://en.wikipedia.org/wiki/Linus_Torvalds [4]: https://drive.google.com/open?id=0By49_3Av9sT1bXpINjhvU29VNUU - From 9aad0a6b7162cf06bc1b03375676d5d0a031e1e2 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 7 Jun 2016 18:58:52 +0800 Subject: [PATCH 1510/1710] [translated]Basic Git Commands You Must Know --- ...160606 Basic Git Commands You Must Know.md | 220 ------------------ ...160606 Basic Git Commands You Must Know.md | 218 +++++++++++++++++ 2 files changed, 218 insertions(+), 220 deletions(-) delete mode 100644 sources/tech/20160606 Basic Git Commands You Must Know.md create mode 100644 translated/tech/20160606 Basic Git Commands You Must Know.md diff --git a/sources/tech/20160606 Basic Git Commands You Must Know.md b/sources/tech/20160606 Basic Git Commands You Must Know.md deleted file mode 100644 index 6eea21b731..0000000000 --- a/sources/tech/20160606 Basic Git Commands You Must Know.md +++ /dev/null @@ -1,220 +0,0 @@ -alim0x translating - -Basic Git Commands You Must Know -===================================== - -![](http://itsfoss.com/wp-content/uploads/2016/06/Download-Git-Sheet.jpg) - -*Brief: This quick guide shows you all the basic Git commands and their usage. You can download these commands for quick reference.* - -We have seen the quick guide and [Vi cheat sheet download][1] in an earlier post. In this article, we’ll see all the basic Git commands you need to get started with it. - -### GIT - -[Git][2] is a distributed version control system that is widely used by a number of open source projects. It was started in the year 2005 by Linux founder, [Linus Torvalds][3]. The program allows for a non-linear development of projects, and can handle large amounts of data effectively by storing it on the local server. In this tutorial, we are going to play around Git and learn how to get started with it. - -I am using Ubuntu in this tutorial but you can use any Linux distribution of your choice. Apart from installation, rest all commands are the same in all Linux distributions. - -### INSTALL GIT - -To install git run this command : - -``` -sudo apt-get install git-core -``` - -After it finishes downloading, you will have Git installed and ready to use. - -### SETUP GIT: - -After Git is installed, whether from apt-get or from the source, you need to copy your username and email in the gitconfig file. You can access this file at ~/.gitconfig. - -Opening it following a fresh Git install would reveal a completely blank page: - -``` -sudo vim ~/.gitconfig -``` - -You can use the follow commands to add in the required information. Replace ‘user’ with your username and ‘user@example.com’ with your email. - -``` -git config --global user.name "User" -git config --global user.email user@example.com -``` - -And you are done with setting up. Now let’s get started with Git. - -### REPOSITORY: - -Create a new directory, open it and run this command: - -``` -git init -``` - -![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-git-1-1024x173.png) - -This will create a new git repository. Your local repository consists of three “trees” maintained by git. - -First one is your Working Directory which holds the actual files. Second one is the Index which acts as a staging area and finally the HEAD which points to the last commit you’ve made.checkout your repository using git clone /path/to/repository. - -Checkout your repository (repository you just created or an existing repository on a server) using git clone /path/to/repository. - -### ADD FILES AND COMMIT: - -You can propose changes using: - -``` -git add -``` - -This will add a new file for the commit. If you want to add every new file, then just do: - -``` -git add --all -``` - -Your files are added check your status using - -``` -git status -``` - -![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-git-2-1024x219.png) - -As you can see, there are changes but they are not committed. Now you need to commit these changes, use: - -``` -git commit -m "Commit message" -``` - -![](http://itsfoss.com/wp-content/uploads/2016/05/playing-around-git-3-1024x124.png) - -You can also do (preferred): - -``` -git commit -a -``` - -And then write your commit message. Now the file is committed to the HEAD, but not in your remote repository yet. - -### PUSH YOUR CHANGES - -Your changes are in the HEAD of your local working copy. If you have not cloned an existing repository and want to connect your repository to a remote server, you need to add it first with: - -``` -git remote add origin -``` - -Now you are able to push your changes to the selected remote server.To send those changes to your remote repository, run: - -``` -git push -u origin master -``` - -### BRANCHING: - -Branches are used to develop features which are isolated from each other. The master branch is the “default” branch when you create a repository. Use other branches for development and merge them back to the master branch upon completion. - -Create a new branch named “mybranch” and switch to it using: - -``` -git checkout -b mybranch -``` - -![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-Git-4--1024x145.jpg) - -You can switch back to master by running: - -``` -git checkout master -``` - -If you want to delete the branch use: - -``` -git branch -d mybranch -``` - -![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-Git-5-1-1024x181.jpg) - -A branch is not available to others unless you push the branch to your remote repository, so what are you thinking about just push it: - -``` -git push origin -``` - -### UPDATE AND MERGE - -To update your local repository to the newest commit, run: - -``` -git pull -``` - -In your working directory to fetch and merge remote changes.To merge another branch into your active branch (e.g. master), use : - -``` -git merge -``` - -In both cases, git tries to auto-merge changes. Unfortunately, this is not always possible and results in conflicts. You are responsible for merging those conflicts manually by editing the files shown by git. After changing, you need to mark them as merged with - -``` -git add -``` - -Before merging changes, you can also preview them by using - -``` -git diff -``` - -### GIT LOG: - -You can see the repository history using. - -``` -git log -``` - -To see a log where each commit is one line you can use: - -``` -git log --pretty=oneline -``` - -Or maybe you want to see an ASCII art tree of all the branches, decorated with the names of tags and branches: - -``` -git log --graph --oneline --decorate --all -``` - -If you want to see only which files have changed: - -``` -git log --name-status -``` - -And for any help during the entire process, you can use git --help - -Isn’t Git is awesome!! Congratulation you are done with basics of git. If you like, you can download these basic Git commands as a quick reference guide from the link below: - -[Download Git Cheat Sheet][4] - - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/basic-git-commands-cheat-sheet/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 - -作者:[Rakhi Sharma][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/rakhi/ -[1]: http://itsfoss.com/download-vi-cheat-sheet/ -[2]: https://git-scm.com/ -[3]: https://en.wikipedia.org/wiki/Linus_Torvalds -[4]: https://drive.google.com/open?id=0By49_3Av9sT1bXpINjhvU29VNUU diff --git a/translated/tech/20160606 Basic Git Commands You Must Know.md b/translated/tech/20160606 Basic Git Commands You Must Know.md new file mode 100644 index 0000000000..dbaf78ad95 --- /dev/null +++ b/translated/tech/20160606 Basic Git Commands You Must Know.md @@ -0,0 +1,218 @@ +你应该知道的基础 Git 命令 +===================================== + +![](http://itsfoss.com/wp-content/uploads/2016/06/Download-Git-Sheet.jpg) + +*简介:这个快速指南将向你展示所有的基础 Git 命令以及用法。你可以下载这些命令作为快速参考。* + +我们在早先一篇文章中已经见过快速指南和 [Vi cheat sheet 下载][1]了。在这篇文章里,我们将会看到开始使用 Git 所需要的基础命令。 + +### GIT + +[Git][2] 是一个分布式版本控制系统,它被用在大量开源项目中。它是在 2005 年由 Linux 创始人 [Linus Torvalds][3] 写就的。这个程序允许非线性的项目开发,并且能够通过存储在本地服务器高效处理大量数据。在这个教程里,我们将要和 Git 愉快玩耍并学习如何开始使用它。 + +我在这个教程里使用 Ubuntu,但你可以使用你选择的任何发行版。除了安装以外,剩下的所有命令在任何 Linux 发行版上都是一样的。 + +### 安装 GIT + +要安装 git 执行以下命令: + +``` +sudo apt-get install git-core +``` + +在它完成下载之后,你就安装好了 Git 并且可以使用了。 + +### 设置 GIT: + +在 Git 安装之后,不论是从 apt-get 还是从源码安装,你需要将你的用户名和邮箱地址复制到 gitconfig 文件。你可以访问 ~/.gitconfig 这个文件。 + +全新安装 Git 之后打开它会是完全空白的页面: + +``` +sudo vim ~/.gitconfig +``` + +你也可以使用以下命令添加所需的信息。将‘user’替换成你的用户名,‘user@example.com’替换成你的邮箱。 + +``` +git config --global user.name "User" +git config --global user.email user@example.com +``` + +然后你就完成设置了。现在让我们开始 Git。 + +### 仓库: + +创建一个新目录,打开它并运行以下命令: + +``` +git init +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-git-1-1024x173.png) + +这个命令会创建一个新的 git 仓库。你的本地仓库由三个 git 维护的“树”组成。 + +第一个是你的**工作目录**,保存实际的文件。第二个是索引,实际上扮演的是暂存区,最后一个是 HEAD,它指向你最后一个 commit 提交。 + +使用 git clone /path/to/repository 签出你的仓库(从你刚创建的仓库或服务器上已存在的仓库)。 + +### 添加文件并提交: + +你可以用以下命令添加改动: + +``` +git add +``` + +这会添加一个新文件到暂存区以提交。如果你想添加每个新文件,输入: + +``` +git add --all +``` + +添加文件之后可以使用以下命令检查状态: + +``` +git status +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-git-2-1024x219.png) + +正如你看到的,那里已经有一些变化但还没有提交。现在你需要提交这些变化,使用: + +``` +git commit -m "提交信息" +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/playing-around-git-3-1024x124.png) + +你也可以这么做(首选): + +``` +git commit -a +``` + +然后写下你的提交信息。现在你的文件提交到了 HEAD,但还不在你的远程仓库中。 + +### 推送你的改动 + +你的改动在你本地工作副本的 HEAD 中。如果你还没有从一个已存在的仓库克隆或想将你的仓库连接到远程服务器,你需要先添加它: + +``` +git remote add origin <服务器地址> +``` + +现在你可以将改动推送到指定的远程服务器。要将改动发送到远程服务器,运行: + +``` +git push -u origin master +``` + +### 分支: + +分支用于开发特性,它们之间是互相独立的。主分支 master 是你创建一个仓库时的“默认”分支。使用其它分支用于开发,在完成时将它合并回主分支。 + +创建一个名为“mybranch”的分支并切换到它之上: + +``` +git checkout -b mybranch +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-Git-4--1024x145.jpg) + +你可以使用这个命令切换回主分支: + +``` +git checkout master +``` + +如果你想删除这个分支,执行: + +``` +git branch -d mybranch +``` + +![](http://itsfoss.com/wp-content/uploads/2016/05/Playing-around-Git-5-1-1024x181.jpg) + +除非你将分支推送到远程服务器上,否则该分支对其他人是不可用的,所以只需把它推送上去: + +``` +git push origin <分支名> +``` + +### 更新和合并 + +要将你本地仓库更新到最新提交,运行: + +``` +git pull +``` + +在你的工作目录获取和合并远程变动。要合并其它分支到你的活动分支(如 master),使用: + +``` +git merge <分支> +``` + +在这两种情况下,git 会尝试自动合并(auto-merge)改动。不幸的是,这不总是可能的,可能会导致冲突。你需要负责通过编辑 git 显示的文件,手动合并那些冲突。改动之后,你需要用以下命令将它们标记为已合并: + +``` +git add <文件名> +``` + +在合并改动之前,你也可以使用以下命令预览: + +``` +git diff <源分支> <目标分支> +``` + +### GIT 日志: + +你可以这么查看仓库历史: + +``` +git log +``` + +要查看每个提交一行样式的日志你可以用: + +``` +git log --pretty=oneline +``` + +或者也许你想要看一个所有分支的 ASCII 艺术树,带有标签和分支名: + +``` +git log --graph --oneline --decorate --all +``` + +如果你只想看哪些文件改动过: + +``` +git log --name-status +``` + +在这整个过程中如果你需要任何帮助,你可以用 git --help。 + +Git 棒不棒!!!祝贺你你已经会 git 基础了。如果你愿意的话,你可以从下面这个链接下载这些基础 Git 命令作为快速参考: + +[下载 Git Cheat Sheet][4] + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/basic-git-commands-cheat-sheet/ + +作者:[Rakhi Sharma][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/rakhi/ +[1]: http://itsfoss.com/download-vi-cheat-sheet/ +[2]: https://git-scm.com/ +[3]: https://en.wikipedia.org/wiki/Linus_Torvalds +[4]: https://drive.google.com/open?id=0By49_3Av9sT1bXpINjhvU29VNUU From ed6d0fc1fe6c84a62e17dc3489d02f58020f8a66 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 8 Jun 2016 08:59:36 +0800 Subject: [PATCH 1511/1710] PUB:20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache @GOLinux --- ... PHP-FPM Instances with Nginx or Apache.md | 121 ++++++++++++++++++ ... PHP-FPM Instances with Nginx or Apache.md | 119 ----------------- 2 files changed, 121 insertions(+), 119 deletions(-) create mode 100644 published/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md delete mode 100644 translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md diff --git a/published/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/published/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md new file mode 100644 index 0000000000..c9809b68e1 --- /dev/null +++ b/published/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md @@ -0,0 +1,121 @@ +如何启用 Nginx/Apache 的 PHP-FPM 多实例 +================================================================================ + +PHP-FPM 作为 FastCGI 进程管理器而广为熟知,它是 PHP FastCGI 实现的改进,带有更为有用的功能,用于处理高负载的服务器和网站。下面列出其中一些功能: + +### 新功能 ### + + - 拥有具有优雅(graceful)启动/停止选项的高级进程管理能力。 + - 可以通过不同的用户身份/组身份来以监听多个端口以及使用多个PHP配置。 + - 错误日志记录。 + - 支持上传加速。 + - 特别用于在处理一些耗时任务时结束请求和清空所有数据的功能。 + - 同时支持动态和静态的子进程重生。 + - 支持IP地址限制。 + +在本文中,我将要讨论的是,在运行 CPanel 11.52 及 EA3 (EasyApache)的 CentOS 7 服务器上,于 Nginx 和 Apache 之上安装 PHP-FPM,以及如何来通过 CPanel 管理这些安装好的多个 PHP-FPM 实例。 + +在我们开始安装前, 先看看安装的先决条件。 + +### 先决条件 ### + + 1. 启用 Mod_proxy_fcgi 模块 + 2. 启用 MPM_Event + +由于我们要将 PHP-FPM 安装到一台 EA3 服务器,我们需要运行 EasyApache 来编译 Apache 以启用这些模块。 + +你们可以参考我以前写的,关于如何在 Apache 服务器上安装 Nginx 作为反向代理的文档来了解 Nginx 的安装。 + +这里,我将再次简述那些安装步骤。具体细节,你可以参考我之前写的**(如何在 CentOS 7/CPanel 服务器上配置 Nginx 反向代理)**一文。 + +- 步骤 1:安装 Epel 仓库 +- 步骤 2:安装 nDeploy RPM 仓库,这是此次安装中最为**重要**的步骤。 +- 步骤 3:使用 yum 从 nDeploy 仓库安装 nDeploy 和 Nginx 插件。 +- 步骤 4:启用/配置 Nginx 为反向代理。 + +完成这些步骤后,下面为服务器中所有可用 PHP 版本安装 PHP-FPM 包,EA3 使用 remi 仓库来安装这些包。你可以运行这个 nDeploy 脚本来下载所有的包。 + + root@server1 [~]# /opt/nDeploy/scripts/easy_php_setup.sh + Loaded plugins: fastestmirror, tsflags, universal-hooks + EA4 | 2.9 kB 00:00:00 + base | 3.6 kB 00:00:00 + epel/x86_64/metalink | 9.7 kB 00:00:00 + epel | 4.3 kB 00:00:00 + extras | 3.4 kB 00:00:00 + updates | 3.4 kB 00:00:00 + (1/2): epel/x86_64/updateinfo | 460 kB 00:00:00 + (2/2): epel/x86_64/primary_db + +运行该脚本将为 PHP 54,PHP 55,PHP 56 和 PHP 70 安装所有这些 FPM 包。 + + Installed Packages + php54-php-fpm.x86_64 5.4.45-3.el7.remi @remi + php55-php-fpm.x86_64 5.5.31-1.el7.remi @remi + php56-php-fpm.x86_64 5.6.17-1.el7.remi @remi + php70-php-fpm.x86_64 7.0.2-1.el7.remi @remi + +在以上安装完成后,你需要为 Apache 启用 PHP-FPM SAPI。你可以运行下面这个脚本来启用 PHP-FPM 实例。 + + root@server1 [~]# /opt/nDeploy/scripts/apache_php-fpm_setup.sh enable + mod_proxy_fcgi.c + Please choose one default PHP version from the list below + PHP70 + PHP56 + PHP54 + PHP55 + Provide the exact desired version string here and press ENTER: PHP54 + ConfGen:: lxblogger + ConfGen:: blogr + ConfGen:: saheetha + ConfGen:: satest + which: no cagefsctl in (/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin) + info [rebuildhttpdconf] Missing owner for domain server1.centos7-test.com, force lookup to root + Built /usr/local/apache/conf/httpd.conf OK + Waiting for “httpd” to restart gracefully …waiting for “httpd” to initialize …… + …finished. + +它会问你需要运行哪个 PHP 版本作为服务器默认版本,你可以输入那些细节内容,然后继续配置并为现存的域名生成虚拟主机文件。 + +我选择了 PHP 54 作为我服务器上的默认 PHP-FPM 版本。 + +![confirm-php-fpm](http://blog.linoxide.com/wp-content/uploads/2016/01/confirm-php-fpm-1024x525.png) + +虽然服务器配置了 PHP-FPM 54,但是我们可以通过 CPanel 为各个独立的域名修改 PHP-FPM 实例。 + +下面我将通过一些截图来为你们说明一下,怎样通过 CPanel 为各个独立域修改 PHP-FPM 实例。 + +安装了 Nginx 插件后,你的域名的 CPanel 就会有一个 Nginx Webstack 图标,你可以点击该图标来配置你的 Web 服务器。我已经登录进了我其中的一个 CPanel 来配置相应的 Web 服务器。 + +请看这些截图。 + +![nginx webstack](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx-webstack.png) + +![nginxicon1](http://blog.linoxide.com/wp-content/uploads/2016/01/nginxicon1-1024x253.png) + +现在,你可以根据需要为选中的主域配置 web 服务器(这里,我已经选择了主域 saheetha.com)。我已经继续通过自动化配置选项来进行了,因为我不需要添加任何手动设置。 + +![nginx_auto_proxy](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx_auto_proxy-1024x408.png) + +当 Nginx 配置完后,你可以在这里为你的域名选择 PHP-FPM 实例。 + +![php-fpm1](http://blog.linoxide.com/wp-content/uploads/2016/01/php-fpm1-1024x408.png) + +![php54](http://blog.linoxide.com/wp-content/uploads/2016/01/php54-1024x169.png) + +![php55](http://blog.linoxide.com/wp-content/uploads/2016/01/php55.png) + +就像你在截图中所看到的,我服务器上的默认 PHP-FPM 是**PHP 54**,而我正要将我的域名的 PHP-FPM 实例单独修改成 **PHP 55**。当你为你的域修改 PHP-FPM 后,你可以通过访问 **phpinfo** 页面来确认。 + +谢谢你们参考本文,我相信这篇文章会给你提供不少信息和帮助。我会为你们推荐关于这个内容的有价值的评论 :)。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/enable-multiple-php-fpm-instances-nginx-apache/ + +作者:[Saheetha Shameer][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/saheethas/ diff --git a/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md deleted file mode 100644 index befa31312f..0000000000 --- a/translated/tech/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md +++ /dev/null @@ -1,119 +0,0 @@ -启用Nginx/Apache的PHP-FPM多实例 -================================================================================ - -PHP-FPM作为FastCGI进程管理器而广为熟知,它是PHP FastCGI实现的改进,带有更为有用的功能,用于处理高负载的服务器和网站。下面列出其中一些功能: -### 新功能 ### - - - 拥有具有优雅启动/停止选项的高级进程管理能力。 - - 可以以监听不同端口以及使用不同PHP配置的不同用户身份/组身份来运行进程。 - - 错误日志记录。 - - 支持上传加速。 - - 用于在处理一些耗时任务时结束请求和清空所有数据的特别功能。 - - 同时支持动态和静态子进程重生。 - - 支持IP地址限制。 - -在本文中,我将要讨论的是,在运行EA3下CPanel 11.52的CentOS 7服务器上与Nginx和Apache一起安装PHP-FPM,以及如何来通过CPanel管理这些安装好的多个PHP-FPM实例。 -Before going to the installation procedures, let us take a look on the pre-requisites. - -### 先决条件 ### - - 1. 启用 Mod_proxy_fcgi模块 - 2. 启用 MPM_Event - -由于我们要将PHP-FPM安装到一台EA3服务器,我们需要运行EasyApache来编译Apache以启用这些模块。 - -你们可以参考我以前写的,关于如何在Apache服务器上安装Nginx作为反向代理的文档来确认Nginx的安装。 - -这里,我将再次简述那些安装步骤。具体细节,你可以参考我之前写的**(如何在CentOS 7/CPanel服务器上配置Nginx反向代理)**一文。 - - 步骤 1:安装Epel仓库 - 步骤 2:安装nDeploy RPM仓库,这是此次安装中最为**重要**的步骤。 - 步骤 3:使用yum从nDeploy仓库安装nDeploy和Nginx插件。 - 步骤 4:启用/配置Nginx为反向代理。 - -完成这些步骤后,下面为服务器中所有可用PHP版本安装PHP-FPM包,EA3使用remi仓库来安装这些包。你可以运行这个nDeploy脚本来下载所有的包。 - - root@server1 [~]# /opt/nDeploy/scripts/easy_php_setup.sh - Loaded plugins: fastestmirror, tsflags, universal-hooks - EA4 | 2.9 kB 00:00:00 - base | 3.6 kB 00:00:00 - epel/x86_64/metalink | 9.7 kB 00:00:00 - epel | 4.3 kB 00:00:00 - extras | 3.4 kB 00:00:00 - updates | 3.4 kB 00:00:00 - (1/2): epel/x86_64/updateinfo | 460 kB 00:00:00 - (2/2): epel/x86_64/primary_db - -运行该脚本将为PHP 54,PHP 55,PHP 56和PHP 70安装所有这些FPM包。 - - Installed Packages - php54-php-fpm.x86_64 5.4.45-3.el7.remi @remi - php55-php-fpm.x86_64 5.5.31-1.el7.remi @remi - php56-php-fpm.x86_64 5.6.17-1.el7.remi @remi - php70-php-fpm.x86_64 7.0.2-1.el7.remi @remi - -在以上安装完成后,你需要为Apache启用PHP-FPM SAPI。你可以运行下面这个脚本来启用PHP-FPM实例。 - - root@server1 [~]# /opt/nDeploy/scripts/apache_php-fpm_setup.sh enable - mod_proxy_fcgi.c - Please choose one default PHP version from the list below - PHP70 - PHP56 - PHP54 - PHP55 - Provide the exact desired version string here and press ENTER: PHP54 - ConfGen:: lxblogger - ConfGen:: blogr - ConfGen:: saheetha - ConfGen:: satest - which: no cagefsctl in (/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin) - info [rebuildhttpdconf] Missing owner for domain server1.centos7-test.com, force lookup to root - Built /usr/local/apache/conf/httpd.conf OK - Waiting for “httpd” to restart gracefully …waiting for “httpd” to initialize …… - …finished. - -它会问你需要运行哪个PHP版本作为服务器默认版本,你可以输入那些细节内容,然后继续配置并为现存的域生成虚拟主机文件。 - -我选择了PHP 54作为我服务器上的默认PHP-FPM版本。 - -![confirm-php-fpm](http://blog.linoxide.com/wp-content/uploads/2016/01/confirm-php-fpm-1024x525.png) - -虽然服务器配置了PHP-FPM 54,但是我们可以通过CPanel为各个独立的域修改PHP-FPM实例。 - -下面我将通过一些截图来为你们说明一下,怎样通过CPanel为各个独立域修改PHP-FPM实例。 - -Nginx插件的安装将为你的域的CPanel提供一个Nginx Webstack图标,你可以点击该图标来配置你的Web服务器。我已经登陆进了我其中的一个CPanel来配置相应的Web服务器。 - -请看这些截图。 - -![nginx webstack](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx-webstack.png) - -![nginxicon1](http://blog.linoxide.com/wp-content/uploads/2016/01/nginxicon1-1024x253.png) - -现在,你可以根据需要为选中的主域配置web服务器(这里,我已经选择了主域saheetha.com)。我已经继续通过自动化配置选项来进行了,因为我不需要添加任何手动设置。 - -![nginx_auto_proxy](http://blog.linoxide.com/wp-content/uploads/2016/01/nginx_auto_proxy-1024x408.png) - -当Nginx配置完后,你可以在这里为你的域选择PHP-FPM实例。 - -![php-fpm1](http://blog.linoxide.com/wp-content/uploads/2016/01/php-fpm1-1024x408.png) - -![php54](http://blog.linoxide.com/wp-content/uploads/2016/01/php54-1024x169.png) - -![php55](http://blog.linoxide.com/wp-content/uploads/2016/01/php55.png) - -就像你在截图中所看到的,我服务器上的默认PHP-FPM是**PHP 54**,而我正要将我的域的PHP-FPM实例单独修改成**PHP 55**。当你为你的域修改PHP-FPM后,你可以通过访问**phpinfo**页面来确认。 - -谢谢你们参考本文,我相信这篇文章会给你提供不少信息和帮助。我会为你们推荐关于这个内容的有价值的评论 :)。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/enable-multiple-php-fpm-instances-nginx-apache/ - -作者:[Saheetha Shameer][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/saheethas/ From 3d6ed46e76ceda16bd8aeaa480be468e28233443 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 8 Jun 2016 10:20:49 +0800 Subject: [PATCH 1512/1710] PUB:20151210 Getting started with Docker by Dockerizing this Blog.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @su-kaiyao 翻译的不错~ --- ...with Docker by Dockerizing this Blog.md.md | 464 ++++++++++++++++++ ...with Docker by Dockerizing this Blog.md.md | 464 ------------------ 2 files changed, 464 insertions(+), 464 deletions(-) create mode 100644 published/20151210 Getting started with Docker by Dockerizing this Blog.md.md delete mode 100644 translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md diff --git a/published/20151210 Getting started with Docker by Dockerizing this Blog.md.md b/published/20151210 Getting started with Docker by Dockerizing this Blog.md.md new file mode 100644 index 0000000000..7dd950d4a9 --- /dev/null +++ b/published/20151210 Getting started with Docker by Dockerizing this Blog.md.md @@ -0,0 +1,464 @@ +通过 Docker 化一个博客网站来开启我们的 Docker 之旅 +=== + +![](http://bencane.com/static/img/post-bg.jpg) + +> 这篇文章包含 Docker 的基本概念,以及如何通过创建一个定制的 Dockerfile 来 Docker 化(Dockerize)一个应用。 + +Docker 是一个过去两年来从某个 idea 中孕育而生的有趣技术,公司组织们用它在世界上每个角落来部署应用。在今天的文章中,我将讲述如何通过“Docker 化(Dockerize)”一个现有的应用,来开始我们的 Docker 之旅。这里提到的应用指的就是这个博客! + +## 什么是 Docker? + +当我们开始学习 Docker 基本概念时,让我们先去搞清楚什么是 Docker 以及它为什么这么流行。Docker 是一个操作系统容器管理工具,它通过将应用打包在操作系统容器中,来方便我们管理和部署应用。 + +### 容器 vs. 虚拟机 + +容器和虚拟机并不完全相似,它是另外一种提供**操作系统虚拟化**的方式。它和标准的虚拟机还是有所不同。 + +标准的虚拟机一般会包括一个完整的操作系统、操作系统软件包、最后还有一至两个应用。这都得益于为虚拟机提供硬件虚拟化的管理程序。这样一来,一个单一的服务器就可以将许多独立的操作系统作为虚拟客户机运行了。 + +容器和虚拟机很相似,它们都支持在单一的服务器上运行多个操作环境,只是,在容器中,这些环境并不是一个个完整的操作系统。容器一般只包含必要的操作系统软件包和一些应用。它们通常不会包含一个完整的操作系统或者硬件的虚拟化。这也意味着容器比传统的虚拟机开销更少。 + +容器和虚拟机常被误认为是两种对立的技术。虚拟机采用一个物理服务器来提供全功能的操作环境,该环境会和其余虚拟机一起共享这些物理资源。容器一般用来隔离一个单一主机上运行的应用进程,以保证隔离后的进程之间不能相互影响。事实上,容器和 **BSD Jails** 以及 `chroot` 进程的相似度,超过了和完整虚拟机的相似度。 + +### Docker 在容器之上提供了什么 + +Docker 本身不是一个容器运行环境,事实上,只是一个与具体实现无关的容器技术,Docker 正在努力支持 [Solaris Zones](https://blog.docker.com/2015/08/docker-oracle-solaris-zones/) 和 [BSD Jails](https://wiki.freebsd.org/Docker)。Docker 提供了一种管理、打包和部署容器的方式。虽然一定程度上,虚拟机多多少少拥有这些类似的功能,但虚拟机并没有完整拥有绝大多数的容器功能,即使拥有,这些功能用起来都并没有 Docker 来的方便或那么完整。 + +现在,我们应该知道 Docker 是什么了,然后,我们将从安装 Docker,并部署一个公开的预构建好的容器开始,学习 Docker 是如何工作的。 + +## 从安装开始 + +默认情况下,Docker 并不会自动被安装在您的计算机中,所以,第一步就是安装 Docker 软件包;我们的教学机器系统是 Ubuntu 14.0.4,所以,我们将使用 Apt 软件包管理器,来执行安装操作。 + +``` +# apt-get install docker.io +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + aufs-tools cgroup-lite git git-man liberror-perl +Suggested packages: + btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc + git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki + git-svn +The following NEW packages will be installed: + aufs-tools cgroup-lite docker.io git git-man liberror-perl +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +Need to get 7,553 kB of archives. +After this operation, 46.6 MB of additional disk space will be used. +Do you want to continue? [Y/n] y +``` + +为了检查当前是否有容器运行,我们可以执行`docker`命令,加上`ps`选项 + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +``` + +`docker`命令中的`ps`功能类似于 Linux 的`ps`命令。它将显示可找到的 Docker 容器及其状态。由于我们并没有启动任何 Docker 容器,所以命令没有显示任何正在运行的容器。 + +## 部署一个预构建好的 nginx Docker 容器 + +我比较喜欢的 Docker 特性之一就是 Docker 部署预先构建好的容器的方式,就像`yum`和`apt-get`部署包一样。为了更好地解释,我们来部署一个运行着 nginx web 服务器的预构建容器。我们可以继续使用`docker`命令,这次选择`run`选项。 + +``` +# docker run -d nginx +Unable to find image 'nginx' locally +Pulling repository nginx +5c82215b03d1: Download complete +e2a4fb18da48: Download complete +58016a5acc80: Download complete +657abfa43d82: Download complete +dcb2fe003d16: Download complete +c79a417d7c6f: Download complete +abb90243122c: Download complete +d6137c9e2964: Download complete +85e566ddc7ef: Download complete +69f100eb42b5: Download complete +cd720b803060: Download complete +7cc81e9a118a: Download complete +``` + +`docker`命令的`run`选项,用来通知 Docker 去寻找一个指定的 Docker 镜像,然后启动运行着该镜像的容器。默认情况下,Docker 容器运行在前台,这意味着当你运行`docker run`命令的时候,你的 shell 会被绑定到容器的控制台以及运行在容器中的进程。为了能在后台运行该 Docker 容器,我们使用了`-d` (**detach**)标志。 + +再次运行`docker ps`命令,可以看到 nginx 容器正在运行。 + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f6d31ab01fc9 nginx:latest nginx -g 'daemon off 4 seconds ago Up 3 seconds 443/tcp, 80/tcp desperate_lalande +``` + +从上面的输出信息中,我们可以看到正在运行的名为`desperate_lalande`的容器,它是由`nginx:latest image`(LCTT 译注: nginx 最新版本的镜像)构建而来得。 + +### Docker 镜像 + +镜像是 Docker 的核心特征之一,类似于虚拟机镜像。和虚拟机镜像一样,Docker 镜像是一个被保存并打包的容器。当然,Docker 不只是创建镜像,它还可以通过 Docker 仓库发布这些镜像,Docker 仓库和软件包仓库的概念差不多,它让 Docker 能够模仿`yum`部署软件包的方式来部署镜像。为了更好地理解这是怎么工作的,我们来回顾`docker run`执行后的输出。 + +``` +# docker run -d nginx +Unable to find image 'nginx' locally +``` + +我们可以看到第一条信息是,Docker 不能在本地找到名叫 nginx 的镜像。这是因为当我们执行`docker run`命令时,告诉 Docker 运行一个基于 nginx 镜像的容器。既然 Docker 要启动一个基于特定镜像的容器,那么 Docker 首先需要找到那个指定镜像。在检查远程仓库之前,Docker 首先检查本地是否存在指定名称的本地镜像。 + +因为系统是崭新的,不存在 nginx 镜像,Docker 将选择从 Docker 仓库下载之。 + +``` +Pulling repository nginx +5c82215b03d1: Download complete +e2a4fb18da48: Download complete +58016a5acc80: Download complete +657abfa43d82: Download complete +dcb2fe003d16: Download complete +c79a417d7c6f: Download complete +abb90243122c: Download complete +d6137c9e2964: Download complete +85e566ddc7ef: Download complete +69f100eb42b5: Download complete +cd720b803060: Download complete +7cc81e9a118a: Download complete +``` + +这就是第二部分输出信息显示给我们的内容。默认情况下,Docker 会使用 [Docker Hub](https://hub.docker.com/) 仓库,该仓库由 Docker 公司维护。 + +和 Github 一样,在 Docker Hub 创建公共仓库是免费的,私人仓库就需要缴纳费用了。当然,部署你自己的 Docker 仓库也是可以的,事实上只需要简单地运行`docker run registry`命令就行了。但在这篇文章中,我们的重点将不是讲解如何部署一个定制的注册服务。 + +### 关闭并移除容器 + +在我们继续构建定制容器之前,我们先清理一下 Docker 环境,我们将关闭先前的容器,并移除它。 + +我们利用`docker`命令和`run`选项运行一个容器,所以,为了停止同一个容器,我们简单地在执行`docker`命令时,使用`kill`选项,并指定容器名。 + +``` +# docker kill desperate_lalande +desperate_lalande +``` + +当我们再次执行`docker ps`,就不再有容器运行了 + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +``` + +但是,此时,我们这是停止了容器;虽然它不再运行,但仍然存在。默认情况下,`docker ps`只会显示正在运行的容器,如果我们附加`-a` (all) 标识,它会显示所有运行和未运行的容器。 + +``` +# docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f6d31ab01fc9 5c82215b03d1 nginx -g 'daemon off 4 weeks ago Exited (-1) About a minute ago desperate_lalande +``` + +为了能完整地移除容器,我们在用`docker`命令时,附加`rm`选项。 + +``` +# docker rm desperate_lalande +desperate_lalande +``` + +虽然容器被移除了;但是我们仍拥有可用的**nginx**镜像(LCTT 译注:镜像缓存)。如果我们重新运行`docker run -d nginx`,Docker 就无需再次拉取 nginx 镜像即可启动容器。这是因为我们本地系统中已经保存了一个副本。 + +为了列出系统中所有的本地镜像,我们运行`docker`命令,附加`images`选项。 + +``` +# docker images +REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE +nginx latest 9fab4090484a 5 days ago 132.8 MB +``` + +## 构建我们自己的镜像 + +截至目前,我们已经使用了一些基础的 Docker 命令来启动、停止和移除一个预构建好的普通镜像。为了“Docker 化(Dockerize)”这篇博客,我们需要构建我们自己的镜像,也就是创建一个 **Dockerfile**。 + +在大多数虚拟机环境中,如果你想创建一个机器镜像,首先,你需要建立一个新的虚拟机、安装操作系统、安装应用,最后将其转换为一个模板或者镜像。但在 Docker 中,所有这些步骤都可以通过 Dockerfile 实现全自动。Dockerfile 是向 Docker 提供构建指令去构建定制镜像的方式。在这一章节,我们将编写能用来部署这个博客的定制 Dockerfile。 + +### 理解应用 + +我们开始构建 Dockerfile 之前,第一步要搞明白,我们需要哪些东西来部署这个博客。 + +这个博客本质上是由一个静态站点生成器生成的静态 HTML 页面,这个生成器是我编写的,名为 **hamerkop**。这个生成器很简单,它所做的就是生成该博客站点。所有的代码和源文件都被我放在了一个公共的 [Github 仓库](https://github.com/madflojo/blog)。为了部署这篇博客,我们要先从 Github 仓库把这些内容拉取下来,然后安装 **Python** 和一些 **Python** 模块,最后执行`hamerkop`应用。我们还需要安装 **nginx**,来运行生成后的内容。 + +截止目前,这些还是一个简单的 Dockerfile,但它却给我们展示了相当多的 [Dockerfile 语法]((https://docs.docker.com/v1.8/reference/builder/))。我们需要克隆 Github 仓库,然后使用你最喜欢的编辑器编写 Dockerfile,我选择`vi` + +``` +# git clone https://github.com/madflojo/blog.git +Cloning into 'blog'... +remote: Counting objects: 622, done. +remote: Total 622 (delta 0), reused 0 (delta 0), pack-reused 622 +Receiving objects: 100% (622/622), 14.80 MiB | 1.06 MiB/s, done. +Resolving deltas: 100% (242/242), done. +Checking connectivity... done. +# cd blog/ +# vi Dockerfile +``` + +### FROM - 继承一个 Docker 镜像 + +第一条 Dockerfile 指令是`FROM`指令。这将指定一个现存的镜像作为我们的基础镜像。这也从根本上给我们提供了继承其他 Docker 镜像的途径。在本例中,我们还是从刚刚我们使用的 **nginx** 开始,如果我们想从头开始,我们可以通过指定`ubuntu:latest`来使用 **Ubuntu** Docker 镜像。 + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane +``` + +除了`FROM`指令,我还使用了`MAINTAINER`,它用来显示 Dockerfile 的作者。 + +Docker 支持使用`#`作为注释,我将经常使用该语法,来解释 Dockerfile 的部分内容。 + +### 运行一次测试构建 + +因为我们继承了 **nginx** Docker镜像,我们现在的 Dockerfile 也就包括了用来构建 **nginx** 镜像的 [Dockerfile](https://github.com/nginxinc/docker-nginx/blob/08eeb0e3f0a5ee40cbc2bc01f0004c2aa5b78c15/Dockerfile) 中所有指令。这意味着,此时我们可以从该 Dockerfile 中构建出一个 Docker 镜像,然后以该镜像运行一个容器。虽然,最终的镜像和 **nginx** 镜像本质上是一样的,但是我们这次是通过构建 Dockerfile 的形式,然后我们将讲解 Docker 构建镜像的过程。 + +想要从 Dockerfile 构建镜像,我们只需要在运行 `docker` 命令的时候,加上 `build` 选项。 + +``` +# docker build -t blog /root/blog +Sending build context to Docker daemon 23.6 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Running in c97f36450343 + ---> 60a44f78d194 +Removing intermediate container c97f36450343 +Successfully built 60a44f78d194 +``` + +上面的例子,我们使用了`-t` (**tag**)标识给镜像添加“blog”的标签。实质上我们就是在给镜像命名,如果我们不指定标签,就只能通过 Docker 分配的 **Image ID** 来访问镜像了。本例中,从 Docker 构建成功的信息可以看出,**Image ID**值为 `60a44f78d194`。 + +除了`-t`标识外,我还指定了目录`/root/blog`。该目录被称作“构建目录”,它将包含 Dockerfile,以及其它需要构建该容器的文件。 + +现在我们构建成功了,下面我们开始定制该镜像。 + +### 使用 RUN 来执行 apt-get + +用来生成 HTML 页面的静态站点生成器是用 **Python** 语言编写的,所以,在 Dockerfile 中需要做的第一件定制任务是安装 Python。我们将使用 Apt 软件包管理器来安装 Python 软件包,这意味着在 Dockerfile 中我们要指定运行`apt-get update`和`apt-get install python-dev`;为了完成这一点,我们可以使用`RUN`指令。 + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip +``` + +如上所示,我们只是简单地告知 Docker 构建镜像的时候,要去执行指定的`apt-get`命令。比较有趣的是,这些命令只会在该容器的上下文中执行。这意味着,即使在容器中安装了`python-dev`和`python-pip`,但主机本身并没有安装这些。说的更简单点,`pip`命令将只在容器中执行,出了容器,`pip`命令不存在。 + +还有一点比较重要的是,Docker 构建过程中不接受用户输入。这说明任何被`RUN`指令执行的命令必须在没有用户输入的时候完成。由于很多应用在安装的过程中需要用户的输入信息,所以这增加了一点难度。不过我们例子中,`RUN`命令执行的命令都不需要用户输入。 + +### 安装 Python 模块 + +**Python** 安装完毕后,我们现在需要安装 Python 模块。如果在 Docker 外做这些事,我们通常使用`pip`命令,然后参考我的博客 Git 仓库中名叫`requirements.txt`的文件。在之前的步骤中,我们已经使用`git`命令成功地将 Github 仓库“克隆”到了`/root/blog`目录;这个目录碰巧也是我们创建`Dockerfile`的目录。这很重要,因为这意味着 Docker 在构建过程中可以访问这个 Git 仓库中的内容。 + +当我们执行构建后,Docker 将构建的上下文环境设置为指定的“构建目录”。这意味着目录中的所有文件都可以在构建过程中被使用,目录之外的文件(构建环境之外)是不能访问的。 + +为了能安装所需的 Python 模块,我们需要将`requirements.txt`从构建目录拷贝到容器中。我们可以在`Dockerfile`中使用`COPY`指令完成这一需求。 + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip + +## Create a directory for required files +RUN mkdir -p /build/ + +## Add requirements file and run pip +COPY requirements.txt /build/ +RUN pip install -r /build/requirements.txt +``` + +在`Dockerfile`中,我们增加了3条指令。第一条指令使用`RUN`在容器中创建了`/build/`目录。该目录用来拷贝生成静态 HTML 页面所需的一切应用文件。第二条指令是`COPY`指令,它将`requirements.txt`从“构建目录”(`/root/blog`)拷贝到容器中的`/build/`目录。第三条使用`RUN`指令来执行`pip`命令;安装`requirements.txt`文件中指定的所有模块。 + +当构建定制镜像时,`COPY`是条重要的指令。如果在 Dockerfile 中不指定拷贝文件,Docker 镜像将不会包含requirements.txt 这个文件。在 Docker 容器中,所有东西都是隔离的,除非在 Dockerfile 中指定执行,否则容器中不会包括所需的依赖。 + +### 重新运行构建 + +现在,我们让 Docker 执行了一些定制任务,现在我们尝试另一次 blog 镜像的构建。 + +``` +# docker build -t blog /root/blog +Sending build context to Docker daemon 19.52 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Using cache + ---> 8e0f1899d1eb +Step 2 : RUN apt-get update + ---> Using cache + ---> 78b36ef1a1a2 +Step 3 : RUN apt-get install -y python-dev python-pip + ---> Using cache + ---> ef4f9382658a +Step 4 : RUN mkdir -p /build/ + ---> Running in bde05cf1e8fe + ---> f4b66e09fa61 +Removing intermediate container bde05cf1e8fe +Step 5 : COPY requirements.txt /build/ + ---> cef11c3fb97c +Removing intermediate container 9aa8ff43f4b0 +Step 6 : RUN pip install -r /build/requirements.txt + ---> Running in c50b15ddd8b1 +Downloading/unpacking jinja2 (from -r /build/requirements.txt (line 1)) +Downloading/unpacking PyYaml (from -r /build/requirements.txt (line 2)) + +Successfully installed jinja2 PyYaml mistune markdown MarkupSafe +Cleaning up... + ---> abab55c20962 +Removing intermediate container c50b15ddd8b1 +Successfully built abab55c20962 +``` + +上述输出所示,我们可以看到构建成功了,我们还可以看到另外一个有趣的信息` ---> Using cache`。这条信息告诉我们,Docker 在构建该镜像时使用了它的构建缓存。 + +### Docker 构建缓存 + +当 Docker 构建镜像时,它不仅仅构建一个单独的镜像;事实上,在构建过程中,它会构建许多镜像。从上面的输出信息可以看出,在每一“步”执行后,Docker 都在创建新的镜像。 + +``` + Step 5 : COPY requirements.txt /build/ + ---> cef11c3fb97c +``` + +上面片段的最后一行可以看出,Docker 在告诉我们它在创建一个新镜像,因为它打印了**Image ID** : `cef11c3fb97c`。这种方式有用之处在于,Docker能在随后构建这个 **blog** 镜像时将这些镜像作为缓存使用。这很有用处,因为这样, Docker 就能加速同一个容器中新构建任务的构建流程。从上面的例子中,我们可以看出,Docker 没有重新安装`python-dev`和`python-pip`包,Docker 则使用了缓存镜像。但是由于 Docker 并没有找到执行`mkdir`命令的构建缓存,随后的步骤就被一一执行了。 + +Docker 构建缓存一定程度上是福音,但有时也是噩梦。这是因为决定使用缓存或者重新运行指令的因素很少。比如,如果`requirements.txt`文件发生了修改,Docker 会在构建时检测到该变化,然后 Docker 会重新执行该执行那个点往后的所有指令。这得益于 Docker 能查看`requirements.txt`的文件内容。但是,`apt-get`命令的执行就是另一回事了。如果提供 Python 软件包的 **Apt** 仓库包含了一个更新的 python-pip 包;Docker 不会检测到这个变化,转而去使用构建缓存。这会导致之前旧版本的包将被安装。虽然对`python-pip`来说,这不是主要的问题,但对使用了存在某个致命攻击缺陷的软件包缓存来说,这是个大问题。 + +出于这个原因,抛弃 Docker 缓存,定期地重新构建镜像是有好处的。这时,当我们执行 Docker 构建时,我简单地指定`--no-cache=True`即可。 + +## 部署博客的剩余部分 + +Python 软件包和模块安装后,接下来我们将拷贝需要用到的应用文件,然后运行`hamerkop`应用。我们只需要使用更多的`COPY` 和 `RUN`指令就可完成。 + +``` +## Dockerfile that generates an instance of http://bencane.com + +FROM nginx:latest +MAINTAINER Benjamin Cane + +## Install python and pip +RUN apt-get update +RUN apt-get install -y python-dev python-pip + +## Create a directory for required files +RUN mkdir -p /build/ + +## Add requirements file and run pip +COPY requirements.txt /build/ +RUN pip install -r /build/requirements.txt + +## Add blog code nd required files +COPY static /build/static +COPY templates /build/templates +COPY hamerkop /build/ +COPY config.yml /build/ +COPY articles /build/articles + +## Run Generator +RUN /build/hamerkop -c /build/config.yml +``` + +现在我们已经写出了剩余的构建指令,我们再次运行另一次构建,并确保镜像构建成功。 + +``` +# docker build -t blog /root/blog/ +Sending build context to Docker daemon 19.52 MB +Sending build context to Docker daemon +Step 0 : FROM nginx:latest + ---> 9fab4090484a +Step 1 : MAINTAINER Benjamin Cane + ---> Using cache + ---> 8e0f1899d1eb +Step 2 : RUN apt-get update + ---> Using cache + ---> 78b36ef1a1a2 +Step 3 : RUN apt-get install -y python-dev python-pip + ---> Using cache + ---> ef4f9382658a +Step 4 : RUN mkdir -p /build/ + ---> Using cache + ---> f4b66e09fa61 +Step 5 : COPY requirements.txt /build/ + ---> Using cache + ---> cef11c3fb97c +Step 6 : RUN pip install -r /build/requirements.txt + ---> Using cache + ---> abab55c20962 +Step 7 : COPY static /build/static + ---> 15cb91531038 +Removing intermediate container d478b42b7906 +Step 8 : COPY templates /build/templates + ---> ecded5d1a52e +Removing intermediate container ac2390607e9f +Step 9 : COPY hamerkop /build/ + ---> 59efd1ca1771 +Removing intermediate container b5fbf7e817b7 +Step 10 : COPY config.yml /build/ + ---> bfa3db6c05b7 +Removing intermediate container 1aebef300933 +Step 11 : COPY articles /build/articles + ---> 6b61cc9dde27 +Removing intermediate container be78d0eb1213 +Step 12 : RUN /build/hamerkop -c /build/config.yml + ---> Running in fbc0b5e574c5 +Successfully created file /usr/share/nginx/html//2011/06/25/checking-the-number-of-lwp-threads-in-linux +Successfully created file /usr/share/nginx/html//2011/06/checking-the-number-of-lwp-threads-in-linux + +Successfully created file /usr/share/nginx/html//archive.html +Successfully created file /usr/share/nginx/html//sitemap.xml + ---> 3b25263113e1 +Removing intermediate container fbc0b5e574c5 +Successfully built 3b25263113e1 +``` + +### 运行定制的容器 + +成功的一次构建后,我们现在就可以通过运行`docker`命令和`run`选项来运行我们定制的容器,和之前我们启动 nginx 容器一样。 + +``` +# docker run -d -p 80:80 --name=blog blog +5f6c7a2217dcdc0da8af05225c4d1294e3e6bb28a41ea898a1c63fb821989ba1 +``` + +我们这次又使用了`-d` (**detach**)标识来让Docker在后台运行。但是,我们也可以看到两个新标识。第一个新标识是`--name`,这用来给容器指定一个用户名称。之前的例子,我们没有指定名称,因为 Docker 随机帮我们生成了一个。第二个新标识是`-p`,这个标识允许用户从主机映射一个端口到容器中的一个端口。 + +之前我们使用的基础 **nginx** 镜像分配了80端口给 HTTP 服务。默认情况下,容器内的端口通道并没有绑定到主机系统。为了让外部系统能访问容器内部端口,我们必须使用`-p`标识将主机端口映射到容器内部端口。上面的命令,我们通过`-p 8080:80`语法将主机80端口映射到容器内部的80端口。 + +经过上面的命令,我们的容器看起来成功启动了,我们可以通过执行`docker ps`核实。 + +``` +# docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d264c7ef92bd blog:latest nginx -g 'daemon off 3 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:80->80/tcp blog +``` + +## 总结 + +截止目前,我们拥有了一个运行中的定制 Docker 容器。虽然在这篇文章中,我们只接触了一些 Dockerfile 指令用法,但是我们还是要学习所有的指令。我们可以检查 [Docker's reference page](https://docs.docker.com/v1.8/reference/builder/) 来获取所有的 Dockerfile 指令用法,那里对指令的用法说明得很详细。 + +另一个比较好的资源是 [Dockerfile Best Practices page](https://docs.docker.com/engine/articles/dockerfile_best-practices/),它有许多构建定制 Dockerfile 的最佳练习。有些技巧非常有用,比如战略性地组织好 Dockerfile 中的命令。上面的例子中,我们将`articles`目录的`COPY`指令作为 Dockerfile 中最后的`COPY`指令。这是因为`articles`目录会经常变动。所以,将那些经常变化的指令尽可能地放在最后面的位置,来最优化那些可以被缓存的步骤。 + +通过这篇文章,我们涉及了如何运行一个预构建的容器,以及如何构建,然后部署定制容器。虽然关于 Docker 你还有许多需要继续学习的地方,但我想这篇文章给了你如何继续开始的好建议。当然,如果你认为还有一些需要继续补充的内容,在下面评论即可。 + +-------------------------------------- +via: http://bencane.com/2015/12/01/getting-started-with-docker-by-dockerizing-this-blog/ + +作者:Benjamin Cane +译者:[su-kaiyao](https://github.com/su-kaiyao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + diff --git a/translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md b/translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md deleted file mode 100644 index a74af87b6f..0000000000 --- a/translated/tech/20151210 Getting started with Docker by Dockerizing this Blog.md.md +++ /dev/null @@ -1,464 +0,0 @@ -通过Dockerize这篇博客来开启我们的Docker之旅 -=== ->这篇文章将包含Docker的基本概念,以及如何通过创建一个定制的Dockerfile来Dockerize一个应用 ->作者:Benjamin Cane,2015-12-01 10:00:00 - -Docker是2年前从某个idea中孕育而生的有趣技术,世界各地的公司组织都积极使用它来部署应用。在今天的文章中,我将教你如何通过"Dockerize"一个现有的应用,来开始我们的Docker运用。问题中的应用指的就是这篇博客! - -## 什么是Docker? - -当我们开始学习Docker基本概念时,让我们先去搞清楚什么是Docker以及它为什么这么流行。Docker是一个操作系统容器管理工具,它通过将应用打包在操作系统容器中,来方便我们管理和部署应用。 - -### 容器 vs. 虚拟机 - -容器虽和虚拟机并不完全相似,但它也是一种提供**操作系统虚拟化**的方式。但是,它和标准的虚拟机还是有不同之处的。 - -标准虚拟机一般会包括一个完整的操作系统,操作系统包,最后还有一至两个应用。这都得益于为虚拟机提供硬件虚拟化的管理程序。这样一来,一个单一的服务器就可以将许多独立的操作系统作为虚拟客户机运行了。 - -容器和虚拟机很相似,它们都支持在单一的服务器上运行多个操作环境,只是,在容器中,这些环境并不是一个个完整的操作系统。容器一般只包含必要的操作系统包和一些应用。它们通常不会包含一个完整的操作系统或者硬件虚拟化程序。这也意味着容器比传统的虚拟机开销更少。 - -容器和虚拟机常被误认为是两种抵触的技术。虚拟机采用同一个物理服务器,来提供全功能的操作环境,该环境会和其余虚拟机一起共享这些物理资源。容器一般用来隔离运行中的应用进程,运行进程将在单独的主机中运行,以保证隔离后的进程之间不能相互影响。事实上,容器和**BSD Jails**以及`chroot`进程的相似度,超过了和完整虚拟机的相似度。 - -### Docker在容器的上层提供了什么 - -Docker不是一个容器运行环境,事实上,只是一个容器技术,并不包含那些帮助Docker支持[Solaris Zones](https://blog.docker.com/2015/08/docker-oracle-solaris-zones/)和[BSD Jails](https://wiki.freebsd.org/Docker)的技术。Docker提供管理,打包和部署容器的方式。虽然一定程度上,虚拟机多多少少拥有这些类似的功能,但虚拟机并没有完整拥有绝大多数的容器功能,即使拥有,这些功能用起来都并没有Docker来的方便。 - -现在,我们应该知道Docker是什么了,然后,我们将从安装Docker,并部署一个公共的预构建好的容器开始,学习Docker是如何工作的。 - -## 从安装开始 - -默认情况下,Docker并不会自动被安装在您的计算机中,所以,第一步就是安装Docker包;我们的教学机器系统是Ubuntu 14.0.4,所以,我们将使用Apt包管理器,来执行安装操作。 - -``` -# apt-get install docker.io -Reading package lists... Done -Building dependency tree -Reading state information... Done -The following extra packages will be installed: - aufs-tools cgroup-lite git git-man liberror-perl -Suggested packages: - btrfs-tools debootstrap lxc rinse git-daemon-run git-daemon-sysvinit git-doc - git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki - git-svn -The following NEW packages will be installed: - aufs-tools cgroup-lite docker.io git git-man liberror-perl -0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. -Need to get 7,553 kB of archives. -After this operation, 46.6 MB of additional disk space will be used. -Do you want to continue? [Y/n] y -``` - -为了检查当前是否有容器运行,我们可以执行`docker`命令,加上`ps`选项 - -``` -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -``` - -`docker`命令中的`ps`功能类似于Linux的`ps`命令。它将显示可找到的Docker容器以及各自的状态。由于我们并没有开启任何Docker容器,所以命令没有显示任何正在运行的容器。 - -## 部署一个预构建好的nginx Docker容器 - -我比较喜欢的Docker特性之一就是Docker部署预先构建好的容器的方式,就像`yum`和`apt-get`部署包一样。为了更好地解释,我们来部署一个运行着nginx web服务器的预构建容器。我们可以继续使用`docker`命令,这次选择`run`选项。 - -``` -# docker run -d nginx -Unable to find image 'nginx' locally -Pulling repository nginx -5c82215b03d1: Download complete -e2a4fb18da48: Download complete -58016a5acc80: Download complete -657abfa43d82: Download complete -dcb2fe003d16: Download complete -c79a417d7c6f: Download complete -abb90243122c: Download complete -d6137c9e2964: Download complete -85e566ddc7ef: Download complete -69f100eb42b5: Download complete -cd720b803060: Download complete -7cc81e9a118a: Download complete -``` - -`docker`命令的`run`选项,用来通知Docker去寻找一个指定的Docker镜像,然后开启运行着该镜像的容器。默认情况下,Docker容器在前台运行,这意味着当你运行`docker run`命令的时候,你的shell会被绑定到容器的控制台以及运行在容器中的进程。为了能在后台运行该Docker容器,我们可以使用`-d` (**detach**)标志。 - -再次运行`docker ps`命令,可以看到nginx容器正在运行。 - -``` -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -f6d31ab01fc9 nginx:latest nginx -g 'daemon off 4 seconds ago Up 3 seconds 443/tcp, 80/tcp desperate_lalande -``` - -从上面的打印信息中,我们可以看到正在运行的名为`desperate_lalande`的容器,它是由`nginx:latest image`(译者注:nginx最新版本的镜像)构建而来得。 - -### Docker镜像 - -镜像是Docker的核心特征之一,类似于虚拟机镜像。和虚拟机镜像一样,Docker镜像是一个被保存并打包的容器。当然,Docker不只是创建镜像,它还可以通过Docker仓库发布这些镜像,Docker仓库和包仓库的概念差不多,它让Docker能够模仿`yum`部署包的方式来部署镜像。为了更好地理解这是怎么工作的,我们来回顾`docker run`执行后的输出。 - -``` -# docker run -d nginx -Unable to find image 'nginx' locally -``` - -我们可以看到第一条信息是,Docker不能在本地找到名叫nginx的镜像。这是因为当我们执行`docker run`命令时,告诉Docker运行一个基于nginx镜像的容器。既然Docker要启动一个基于特定镜像的容器,那么Docker首先需要知道那个指定镜像。在检查远程仓库之前,Docker首先检查本地是否存在指定名称的本地镜像。 - -因为系统是崭新的,不存在nginx镜像,Docker将选择从Docker仓库下载之。 - -``` -Pulling repository nginx -5c82215b03d1: Download complete -e2a4fb18da48: Download complete -58016a5acc80: Download complete -657abfa43d82: Download complete -dcb2fe003d16: Download complete -c79a417d7c6f: Download complete -abb90243122c: Download complete -d6137c9e2964: Download complete -85e566ddc7ef: Download complete -69f100eb42b5: Download complete -cd720b803060: Download complete -7cc81e9a118a: Download complete -``` - -这就是第二部分打印信息显示给我们的内容。默认,Docker会使用[Docker Hub](https://hub.docker.com/)仓库,该仓库由Docker公司维护。 - -和Github一样,在Docker Hub创建公共仓库是免费的,私人仓库就需要缴纳费用了。当然,部署你自己的Docker仓库也是可以实现的,事实上只需要简单地运行`docker run registry`命令就行了。但在这篇文章中,我们的重点将不是讲解如何部署一个定制的注册服务。 - -### 关闭并移除容器 - -在我们继续构建定制容器之前,我们先清理Docker环境,我们将关闭先前的容器,并移除它。 - -我们利用`docker`命令和`run`选项运行一个容器,所以,为了停止该相同的容器,我们简单地在执行`docker`命令时,使用`kill`选项,并指定容器名。 - -``` -# docker kill desperate_lalande -desperate_lalande -``` - -当我们再次执行`docker ps`,就不再有容器运行了 - -``` -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -``` - -但是,此时,我们这是停止了容器;虽然它不再运行,但仍然存在。默认情况下,`docker ps`只会显示正在运行的容器,如果我们附加`-a` (all) 标识,它会显示所有运行和未运行的容器。 - -``` -# docker ps -a -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -f6d31ab01fc9 5c82215b03d1 nginx -g 'daemon off 4 weeks ago Exited (-1) About a minute ago desperate_lalande -``` - -为了能完整地移除容器,我们在用`docker`命令时,附加`rm`选项。 - -``` -# docker rm desperate_lalande -desperate_lalande -``` - -虽然容器被移除了;但是我们仍拥有可用的**nginx**镜像(译者注:镜像缓存)。如果我们重新运行`docker run -d nginx`,Docker就无需再次拉取nginx镜像,即可启动容器。这是因为我们本地系统中已经保存了一个副本。 - -为了列出系统中所有的本地镜像,我们运行`docker`命令,附加`images`选项。 - -``` -# docker images -REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE -nginx latest 9fab4090484a 5 days ago 132.8 MB -``` - -## 构建我们自己的镜像 - -截至目前,我们已经使用了一些基础的Docker命令来开启,停止和移除一个预构建好的普通镜像。为了"Dockerize"这篇博客,我们需要构建我们自己的镜像,也就是创建一个**Dockerfile**。 - -在大多数虚拟机环境中,如果你想创建一个机器镜像,首先,你需要建立一个新的虚拟机,安装操作系统,安装应用,最后将其转换为一个模板或者镜像。但在Docker中,所有这些步骤都可以通过Dockerfile实现全自动。Dockerfile是向Docker提供构建指令去构建定制镜像的方式。在这一章节,我们将编写能用来部署这篇博客的定制Dockerfile。 - -### 理解应用 - -我们开始构建Dockerfile之前,第一步要搞明白,我们需要哪些东西来部署这篇博客。 - -博客本质上是由静态站点生成器生成的静态HTML页面,这个静态站点是我编写的,名为**hamerkop**。这个生成器很简单,它所做的就是生成该博客站点。所有的博客源码都被我放在了一个公共的[Github仓库](https://github.com/madflojo/blog)。为了部署这篇博客,我们要先从Github仓库把博客内容拉取下来,然后安装**Python**和一些**Python**模块,最后执行`hamerkop`应用。我们还需要安装**nginx**,来运行生成后的内容。 - -截止目前,这些还是一个简单的Dockerfile,但它却给我们展示了相当多的[Dockerfile语法]((https://docs.docker.com/v1.8/reference/builder/))。我们需要克隆Github仓库,然后使用你最喜欢的编辑器编写Dockerfile;我选择`vi` - -``` -# git clone https://github.com/madflojo/blog.git -Cloning into 'blog'... -remote: Counting objects: 622, done. -remote: Total 622 (delta 0), reused 0 (delta 0), pack-reused 622 -Receiving objects: 100% (622/622), 14.80 MiB | 1.06 MiB/s, done. -Resolving deltas: 100% (242/242), done. -Checking connectivity... done. -# cd blog/ -# vi Dockerfile -``` - -### FROM - 继承一个Docker镜像 - -第一条Dockerfile指令是`FROM`指令。这将指定一个现存的镜像作为我们的基础镜像。这也从根本上给我们提供了继承其他Docker镜像的途径。在本例中,我们还是从刚刚我们使用的**nginx**开始,如果我们想重新开始,我们可以通过指定`ubuntu:latest`来使用**Ubuntu** Docker镜像。 - -``` -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane -``` - -除了`FROM`指令,我还使用了`MAINTAINER`,它用来显示Dockerfile的作者。 - -Docker支持使用`#`作为注释,我将经常使用该语法,来解释Dockerfile的部分内容。 - -### 运行一次测试构建 - -因为我们继承了**nginx** Docker镜像,我们现在的Dockerfile也就包括了用来构建**nginx**镜像的[Dockerfile](https://github.com/nginxinc/docker-nginx/blob/08eeb0e3f0a5ee40cbc2bc01f0004c2aa5b78c15/Dockerfile)中所有指令。这意味着,此时我们可以从该Dockerfile中构建出一个Docker镜像,然后从该镜像中运行一个容器。虽然,最终的镜像和**nginx**镜像本质上是一样的,但是我们这次是通过构建Dockerfile的形式,然后我们将讲解Docker构建镜像的过程。 - -想要从Dockerfile构建镜像,我们只需要在运行`docker`命令的时候,加上**build**选项。 - -``` -# docker build -t blog /root/blog -Sending build context to Docker daemon 23.6 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Running in c97f36450343 - ---> 60a44f78d194 -Removing intermediate container c97f36450343 -Successfully built 60a44f78d194 -``` - -上面的例子,我们使用了`-t` (**tag**)标识给镜像添加"blog"的标签。本质上我们只是在给镜像命名,如果我们不指定标签,就只能通过Docker分配的**Image ID**来访问镜像了。本例中,从Docker构建成功的信息可以看出,**Image ID**值为`60a44f78d194`。 - -除了`-t`标识外,我还指定了目录`/root/blog`。该目录被称作"构建目录",它将包含Dockerfile,以及其他需要构建该容器的文件。 - -现在我们构建成功,下面我们开始定制该镜像。 - -### 使用RUN来执行apt-get - -用来生成HTML页面的静态站点生成器是用**Python**语言编写的,所以,在Dockerfile中需要做的第一件定制任务是安装Python。我们将使用Apt包管理器来安装Python包,这意味着在Dockerfile中我们要指定运行`apt-get update`和`apt-get install python-dev`;为了完成这一点,我们可以使用`RUN`指令。 - -``` -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip -``` - -如上所示,我们只是简单地告知Docker构建镜像的时候,要去执行指定的`apt-get`命令。比较有趣的是,这些命令只会在该容器的上下文中执行。这意味着,即使容器中安装了`python-dev`和`python-pip`,但主机本身并没有安装这些。说的更简单点,`pip`命令将只在容器中执行,出了容器,`pip`命令不存在。 - -还有一点比较重要的是,Docker构建过程中不接受用户输入。这说明任何被`RUN`指令执行的命令必须在没有用户输入的时候完成。由于很多应用在安装的过程中需要用户的输入信息,所以这增加了一点难度。我们例子,`RUN`命令执行的命令都不需要用户输入。 - -### 安装Python模块 - -**Python**安装完毕后,我们现在需要安装Python模块。如果在Docker外做这些事,我们通常使用`pip`命令,然后参考博客Git仓库中名叫`requirements.txt`的文件。在之前的步骤中,我们已经使用`git`命令成功地将Github仓库"克隆"到了`/root/blog`目录;这个目录碰巧也是我们创建`Dockerfile`的目录。这很重要,因为这意味着Dokcer在构建过程中可以访问Git仓库中的内容。 - -当我们执行构建后,Docker将构建的上下文环境设置为指定的"构建目录"。这意味着目录中的所有文件都可以在构建过程中被使用,目录之外的文件(构建环境之外)是不能访问的。 - -为了能安装需要的Python模块,我们需要将`requirements.txt`从构建目录拷贝到容器中。我们可以在`Dockerfile`中使用`COPY`指令完成这一需求。 - -``` -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip - -## Create a directory for required files -RUN mkdir -p /build/ - -## Add requirements file and run pip -COPY requirements.txt /build/ -RUN pip install -r /build/requirements.txt -``` - -在`Dockerfile`中,我们增加了3条指令。第一条指令使用`RUN`在容器中创建了`/build/`目录。该目录用来拷贝生成静态HTML页面需要的一切应用文件。第二条指令是`COPY`指令,它将`requirements.txt`从"构建目录"(`/root/blog`)拷贝到容器中的`/build/`目录。第三条使用`RUN`指令来执行`pip`命令;安装`requirements.txt`文件中指定的所有模块。 - -当构建定制镜像时,`COPY`是条重要的指令。如果在Dockerfile中不指定拷贝文件,Docker镜像将不会包含requirements.txt文件。在Docker容器中,所有东西都是隔离的,除非在Dockerfile中指定执行,否则容器中不会包括需要的依赖。 - -### 重新运行构建 - -现在,我们让Docker执行了一些定制任务,现在我们尝试另一次blog镜像的构建。 - -``` -# docker build -t blog /root/blog -Sending build context to Docker daemon 19.52 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Using cache - ---> 8e0f1899d1eb -Step 2 : RUN apt-get update - ---> Using cache - ---> 78b36ef1a1a2 -Step 3 : RUN apt-get install -y python-dev python-pip - ---> Using cache - ---> ef4f9382658a -Step 4 : RUN mkdir -p /build/ - ---> Running in bde05cf1e8fe - ---> f4b66e09fa61 -Removing intermediate container bde05cf1e8fe -Step 5 : COPY requirements.txt /build/ - ---> cef11c3fb97c -Removing intermediate container 9aa8ff43f4b0 -Step 6 : RUN pip install -r /build/requirements.txt - ---> Running in c50b15ddd8b1 -Downloading/unpacking jinja2 (from -r /build/requirements.txt (line 1)) -Downloading/unpacking PyYaml (from -r /build/requirements.txt (line 2)) - -Successfully installed jinja2 PyYaml mistune markdown MarkupSafe -Cleaning up... - ---> abab55c20962 -Removing intermediate container c50b15ddd8b1 -Successfully built abab55c20962 -``` - -上述输出所示,我们可以看到构建成功了,我们还可以看到另外一个有趣的信息` ---> Using cache`。这条信息告诉我们,Docker在构建该镜像时使用了它的构建缓存。 - -### Docker构建缓存 - -当Docker构建镜像时,它不仅仅构建一个单独的镜像;事实上,在构建过程中,它会构建许多镜像。从上面的输出信息可以看出,在每一"步"执行后,Docker都在创建新的镜像。 - -``` - Step 5 : COPY requirements.txt /build/ - ---> cef11c3fb97c -``` - -上面片段的最后一行可以看出,Docker在告诉我们它在创建一个新镜像,因为它打印了**Image ID**;`cef11c3fb97c`。这种方式有用之处在于,Docker能在随后构建**blog**镜像时将这些镜像作为缓存使用。这很有用处,因为这样,Docker就能加速同一个容器中新构建任务的构建流程。从上面的例子中,我们可以看出,Docker没有重新安装`python-dev`和`python-pip`包,Docker则使用了缓存镜像。但是由于Docker并没有找到执行`mkdir`命令的构建缓存,随后的步骤就被一一执行了。 - -Docker构建缓存一定程度上是福音,但有时也是噩梦。这是因为使用缓存或者重新运行指令的决定在一个很狭窄的范围内执行。比如,如果`requirements.txt`文件发生了修改,Docker会在构建时检测到该变化,然后Docker会重新执行该执行那个点往后的所有指令。这得益于Docker能查看`requirements.txt`的文件内容。但是,`apt-get`命令的执行就是另一回事了。如果提供Python包的**Apt** 仓库包含了一个更新的python-pip包;Docker不会检测到这个变化,转而去使用构建缓存。这会导致之前旧版本的包将被安装。虽然对`python-pip`来说,这不是主要的问题,但对使用了某个致命攻击缺陷的包缓存来说,这是个大问题。 - -出于这个原因,抛弃Docker缓存,定期地重新构建镜像是有好处的。这时,当我们执行Docker构建时,我简单地指定`--no-cache=True`即可。 - -## 部署博客的剩余部分 - -Python包和模块安装后,接下来我们将拷贝需要用到的应用文件,然后运行`hamerkop`应用。我们只需要使用更多的`COPY` and `RUN`指令就可完成。 - -``` -## Dockerfile that generates an instance of http://bencane.com - -FROM nginx:latest -MAINTAINER Benjamin Cane - -## Install python and pip -RUN apt-get update -RUN apt-get install -y python-dev python-pip - -## Create a directory for required files -RUN mkdir -p /build/ - -## Add requirements file and run pip -COPY requirements.txt /build/ -RUN pip install -r /build/requirements.txt - -## Add blog code nd required files -COPY static /build/static -COPY templates /build/templates -COPY hamerkop /build/ -COPY config.yml /build/ -COPY articles /build/articles - -## Run Generator -RUN /build/hamerkop -c /build/config.yml -``` - -现在我们已经写出了剩余的构建指令,我们再次运行另一次构建,并确保镜像构建成功。 - -``` -# docker build -t blog /root/blog/ -Sending build context to Docker daemon 19.52 MB -Sending build context to Docker daemon -Step 0 : FROM nginx:latest - ---> 9fab4090484a -Step 1 : MAINTAINER Benjamin Cane - ---> Using cache - ---> 8e0f1899d1eb -Step 2 : RUN apt-get update - ---> Using cache - ---> 78b36ef1a1a2 -Step 3 : RUN apt-get install -y python-dev python-pip - ---> Using cache - ---> ef4f9382658a -Step 4 : RUN mkdir -p /build/ - ---> Using cache - ---> f4b66e09fa61 -Step 5 : COPY requirements.txt /build/ - ---> Using cache - ---> cef11c3fb97c -Step 6 : RUN pip install -r /build/requirements.txt - ---> Using cache - ---> abab55c20962 -Step 7 : COPY static /build/static - ---> 15cb91531038 -Removing intermediate container d478b42b7906 -Step 8 : COPY templates /build/templates - ---> ecded5d1a52e -Removing intermediate container ac2390607e9f -Step 9 : COPY hamerkop /build/ - ---> 59efd1ca1771 -Removing intermediate container b5fbf7e817b7 -Step 10 : COPY config.yml /build/ - ---> bfa3db6c05b7 -Removing intermediate container 1aebef300933 -Step 11 : COPY articles /build/articles - ---> 6b61cc9dde27 -Removing intermediate container be78d0eb1213 -Step 12 : RUN /build/hamerkop -c /build/config.yml - ---> Running in fbc0b5e574c5 -Successfully created file /usr/share/nginx/html//2011/06/25/checking-the-number-of-lwp-threads-in-linux -Successfully created file /usr/share/nginx/html//2011/06/checking-the-number-of-lwp-threads-in-linux - -Successfully created file /usr/share/nginx/html//archive.html -Successfully created file /usr/share/nginx/html//sitemap.xml - ---> 3b25263113e1 -Removing intermediate container fbc0b5e574c5 -Successfully built 3b25263113e1 -``` - -### 运行定制的容器 - -成功的一次构建后,我们现在就可以通过运行`docker`命令和`run`选项来运行我们定制的容器,和之前我们启动nginx容器一样。 - -``` -# docker run -d -p 80:80 --name=blog blog -5f6c7a2217dcdc0da8af05225c4d1294e3e6bb28a41ea898a1c63fb821989ba1 -``` - -我们这次又使用了`-d` (**detach**)标识来让Docker在后台运行。但是,我们也可以看到两个新标识。第一个新标识是`--name`,这用来给容器指定一个用户名称。之前的例子,我们没有指定名称,因为Docker随机帮我们生成了一个。第二个新标识是`-p`,这个标识允许用户从主机映射一个端口到容器中的一个端口。 - -之前我们使用的基础**nginx**镜像分配了80端口给HTTP服务。默认情况下,容器内的端口通道并没有绑定到主机系统。为了让外部系统能访问容器内部端口,我们必须使用`-p`标识将主机端口映射到容器内部端口。上面的命令,我们通过`-p 8080:80`语法将主机80端口映射到容器内部的80端口。 - -经过上面的命令,我们的容器似乎成功启动了,我们可以通过执行`docker ps`核实。 - -``` -# docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -d264c7ef92bd blog:latest nginx -g 'daemon off 3 seconds ago Up 3 seconds 443/tcp, 0.0.0.0:80->80/tcp blog -``` - -## 总结 - -截止目前,我们拥有了正在运行的定制Docker容器。虽然在这篇文章中,我们只接触了一些Dockerfile指令用法,但是我们还是要讨论所有的指令。我们可以检查[Docker's reference page](https://docs.docker.com/v1.8/reference/builder/)来获取所有的Dockerfile指令用法,那里对指令的用法说明得很详细。 - -另一个比较好的资源是[Dockerfile Best Practices page](https://docs.docker.com/engine/articles/dockerfile_best-practices/),它有许多构建定制Dockerfile的最佳练习。有些技巧非常有用,比如战略性地组织好Dockerfile中的命令。上面的例子中,我们将`articles`目录的`COPY`指令作为Dockerfile中最后的`COPY`指令。这是因为`articles`目录会经常变动。所以,将那些经常变化的指令尽可能地放在最后面的位置,来最优化那些可以被缓存的步骤。 - -通过这篇文章,我们涉及了如何运行一个预构建的容器,以及如何构建,然后部署定制容器。虽然关于Docker你还有许多需要继续学习的地方,但我想这篇文章给了你如何继续开始的好建议。当然,如果你认为还有一些需要继续补充的内容,在下面评论即可。 - --------------------------------------- -via:http://bencane.com/2015/12/01/getting-started-with-docker-by-dockerizing-this-blog/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+bencane%2FSAUo+%28Benjamin+Cane%29 - -作者:Benjamin Cane - -译者:[su-kaiyao](https://github.com/su-kaiyao) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - From 6f944b82c58594766434d04943f31d1fd582b779 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 8 Jun 2016 12:25:28 +0800 Subject: [PATCH 1513/1710] PUB:20160601 Apps to Snaps @alim0x --- published/20160601 Apps to Snaps.md | 61 +++++++++++++++++++++++ translated/tech/20160601 Apps to Snaps.md | 61 ----------------------- 2 files changed, 61 insertions(+), 61 deletions(-) create mode 100644 published/20160601 Apps to Snaps.md delete mode 100644 translated/tech/20160601 Apps to Snaps.md diff --git a/published/20160601 Apps to Snaps.md b/published/20160601 Apps to Snaps.md new file mode 100644 index 0000000000..458960f555 --- /dev/null +++ b/published/20160601 Apps to Snaps.md @@ -0,0 +1,61 @@ +将 Linux 软件打包成 Snap 软件包 +================ + +![](https://insights.ubuntu.com/wp-content/uploads/27eb/app-snap.png) + +在 Linux 分发应用不总是那么容易。有各种不同的包格式、基础系统、可用库,随着发行版的一次次发布,所有的这些都让人头疼。然而,现在我们有了更简单的东西:Snap。 + +Snap 是开发者打包他们应用的新途径,它相对于传统包格式,如 .deb,.rpm 等带来了许多优点。Snap 安全,彼此隔离,宿主系统使用了类似 AppArmor 的技术,它们跨平台且自足的,让开发者可以准确地将应用所需要的依赖打包到一起。沙盒隔离也加强了安全,并允许应用和整个基于 snap 的系统,在出现问题的时候可以回滚。Snap 确实是 Linux 应用打包的未来。 + +创建一个 snap 包并不困难。首先,你需要一个 snap 基础运行环境,能够让你的桌面环境认识并运行 snap 软件包,这个工具叫做 snapd ,默认内置于所有 Ubuntu 16.04 系统中。接着你需要创建 snap 的工具 Snapcraft,它可以通过一个简单的命令安装: + +``` +$ sudo apt-get install snapcraft +``` + +这个环境安装好了之后就可以 snap 起来了。 + +Snap 使用一个特定的 YAML 格式的文件 snapcraft.yaml,它定义了应用是如何打包的以及它需要的依赖。用一个简单的应用来演示一下,下面的 YAML 文件是个如何 snap 一个 moon-buggy 游戏的实际例子,该游戏在 Ubuntu 源中提供。 + +``` +name: moon-buggy +version: 1.0.51.11 +summary: Drive a car across the moon +description: | +A simple command-line game where you drive a buggy on the moon +apps: + play: + command: usr/games/moon-buggy +parts: + moon-buggy: + plugin: nil + stage-packages: [moon-buggy] + snap: + – usr/games/moon-buggy +``` + +上面的代码出现了几个新概念。第一部分是关于如何让你的应用可以在商店找到的信息,设置软件包的元数据名称、版本号、摘要、以及描述。apps 部分实现了 play 命令,指向了 moon-buggy 可执行文件位置。parts 部分告诉 snapcraft 用来构建应用所需要的插件以及依赖的包。在这个简单的例子中我们需要的所有东西就是来自 Ubuntu 源中的 moon-buggy 应用本身,snapcraft 负责剩下的工作。 + +在你的 snapcraft.yaml 所在目录下运行 snapcraft ,它会创建 moon-buggy_1.0.51.11_amd64.snap 包,可以通过以下命令来安装它: + +``` +$ snap install moon-buggy_1.0.51.11_amd64.snap +``` + +想了解更复杂一点的 snap 打包操作,比如基于 Electron 的 Simplenote 可以[看这里][1],在线教程在[这里][2],相应的代码在 [Github][3]。更多的例子可以在 Ubuntu 开发者[站点][4]找到。 + +-------------------------------------------------------------------------------- + +via: https://insights.ubuntu.com/2016/06/01/apps-to-snaps/ + +作者:[Jamie][a] +译者:[alim0x](https://github.com/alim0x) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://insights.ubuntu.com/author/jamiebennett/ +[1]: http://www.simplenote.com/ +[2]: http://www.linuxuk.org/post/20160518_snapping_electron_based_applications_simplenote/ +[3]: https://github.com/jamiedbennett/snaps/tree/master/simplenote +[4]: https://developer.ubuntu.com/en/desktop/get-started/ diff --git a/translated/tech/20160601 Apps to Snaps.md b/translated/tech/20160601 Apps to Snaps.md deleted file mode 100644 index 7dbf0784c9..0000000000 --- a/translated/tech/20160601 Apps to Snaps.md +++ /dev/null @@ -1,61 +0,0 @@ -Apps to Snaps -================ - -![](https://insights.ubuntu.com/wp-content/uploads/27eb/app-snap.png) - -在 Linux 分发应用不总是那么容易。你有不同的包格式,基础系统,可用库,以及发行版发布周期,所有的这些都让人头疼。但现在我们有了更简单的东西:Snap。 - -Snap 是开发者打包他们应用的新途径,它相对于传统包格式,如 .deb,.rpm 等带来了许多优点。Snap 安全,互相独立,宿主系统使用类似 AppArmor 的技术,它们跨平台,而且是自足的,让开发者可以准确打包它们应用所需要的依赖。沙盒隔离也加强了安全,并允许应用和整个基于 snap 的系统,在出现问题的时候可以回滚。Snap 确实是 Linux 应用打包的未来。 - -创建一个 snap 包并不困难。首先,你需要一个 snap 基础运行环境,能够在你的桌面理解和运行 snap,这个工具叫做 snapd 并且默认内置于所有 Ubuntu 16.04 系统中。接着你需要创建 snap 的工具,Snapcraft,可以通过一个简单的命令安装: - -``` -$ sudo apt-get install snapcraft -``` - -这个环境安装好了之后就可以 snap 起来了。 - -Snap 使用一个特殊的 YAML 格式文件,称作 snapcraft.yaml,它定义了应用是如何打包的以及它需要的依赖。用一个简单的应用来演示一下,下面的 YAML 文件是个如何 snap 打包 moon-buggy 游戏的实际例子,该游戏在 Ubuntu 源中提供。 - -``` -name: moon-buggy -version: 1.0.51.11 -summary: Drive a car across the moon -description: | -A simple command-line game where you drive a buggy on the moon -apps: -play: -command: usr/games/moon-buggy -parts: -moon-buggy: -plugin: nil -stage-packages: [moon-buggy] -snap: -– usr/games/moon-buggy -``` - -上面的代码演示了几个新概念。第一部分是关于让你的应用可以在商店找到的,设置包元数据名称,版本号,摘要,以及描述。Apps 部分实现了运行命令,指向 moon-buggy 可执行文件位置。Parts 部分告诉 snapcraft 用来构建应用所需要的插件以及依赖的包。在这个简单的例子中我们需要的所有东西就是 Ubuntu 源中的 moon-buggy 应用本身,snapcraft 负责剩下的工作。 - -在你的 snapcraft.yaml 所在目录下运行 snapcraft 会创建 moon-buggy_1.0.51.11_amd64.snap 包,可以通过以下命令来安装它: - -``` -$ snap install moon-buggy_1.0.51.11_amd64.snap -``` - -想了解更复杂一点的 snap 打包,比如基于 Electron 的 Simplenote [看这里][1],在线教程在[这里][2],相应的代码在[Github][3]。更多的例子可以在这里的 Ubuntu 开发者[站点][4]找到。 - --------------------------------------------------------------------------------- - -via: https://insights.ubuntu.com/2016/06/01/apps-to-snaps/ - -作者:[Jamie][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://insights.ubuntu.com/author/jamiebennett/ -[1]: http://www.simplenote.com/ -[2]: http://www.linuxuk.org/post/20160518_snapping_electron_based_applications_simplenote/ -[3]: https://github.com/jamiedbennett/snaps/tree/master/simplenote -[4]: https://developer.ubuntu.com/en/desktop/get-started/ From 4effc2389c16bccf11a056b931a64c600ef5845c Mon Sep 17 00:00:00 2001 From: alim0x Date: Wed, 8 Jun 2016 20:51:36 +0800 Subject: [PATCH 1514/1710] [translating]Android Use Apps Even Without Installing Them --- .../20160518 Android Use Apps Even Without Installing Them.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20160518 Android Use Apps Even Without Installing Them.md b/sources/talk/20160518 Android Use Apps Even Without Installing Them.md index 279e9a5edb..fc63e6c7fc 100644 --- a/sources/talk/20160518 Android Use Apps Even Without Installing Them.md +++ b/sources/talk/20160518 Android Use Apps Even Without Installing Them.md @@ -1,3 +1,5 @@ +alim0x translating + Android’s Next Revolution: Use Apps Even Without Installing Them! =================================================================== From 3535ed015a6863ca7111ced88b663873bf48b8f1 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Thu, 9 Jun 2016 00:20:50 +0800 Subject: [PATCH 1515/1710] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B7=B2=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E7=9A=84=E5=8E=9F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng and Linux Filesystem Troubleshooting.md | 319 ------------------ 1 file changed, 319 deletions(-) delete mode 100644 sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.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 deleted file mode 100644 index 199d65957e..0000000000 --- a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md +++ /dev/null @@ -1,319 +0,0 @@ -LFCS 第十讲:学习简单的 Shell 脚本编程和文件系统故障排除 - -================================================================================ -Linux 基金会发起了 LFCS 认证 (Linux Foundation Certified Sysadmin, Linux 基金会认证系统管理员),这是一个全新的认证体系,主要目标是让全世界任何人都有机会考取认证。认证内容为 Linux 中间系统的管理,主要包括:系统运行和服务的维护、全面监控和分析的能力以及问题来临时何时想上游团队请求帮助的决策能力 - -![Basic Shell Scripting and Filesystem Troubleshooting](http://www.tecmint.com/wp-content/uploads/2014/11/lfcs-Part-10.png) - -LFCS 系列第十讲 - -请看以下视频,这里边介绍了 Linux 基金会认证程序。 - -注:youtube 视频 - - - -本讲是系列教程中的第十讲,主要集中讲解简单的 Shell 脚本编程和文件系统故障排除。这两块内容都是 LFCS 认证中的必备考点。 - -### 理解终端 (Terminals) 和 Shell ### - -首先要声明一些概念。 - -- Shell 是一个程序,它将命令传递给操作系统来执行。 -- Terminal 也是一个程序,作为最终用户,我们需要使用它与 Shell 来交互。比如,下边的图片是 GNOME Terminal。 - -![Gnome Terminal](http://www.tecmint.com/wp-content/uploads/2014/11/Gnome-Terminal.png) - -Gnome Terminal - -启动 Shell 之后,会呈现一个命令提示符 (也称为命令行) 提示我们 Shell 已经做好了准备,接受标准输入设备输入的命令,这个标准输入设备通常是键盘。 - -你可以参考该系列文章的 [第一讲 使用命令创建、编辑和操作文件][1] 来温习一些常用的命令。 - -Linux 为提供了许多可以选用的 Shell,下面列出一些常用的: - -**bash Shell** - -Bash 代表 Bourne Again Shell,它是 GNU 项目默认的 Shell。它借鉴了 Korn shell (ksh) 和 C shell (csh) 中有用的特性,并同时对性能进行了提升。它同时也是 LFCS 认证中所涵盖的风发行版中默认 Shell,也是本系列教程将使用的 Shell。 - -**sh Shell** - -Bash Shell 是一个比较古老的 shell,一次多年来都是多数类 Unix 系统的默认 shell。 - -**ksh Shell** - -Korn SHell (ksh shell) 也是一个 Unix shell,是贝尔实验室 (Bell Labs) 的 David Korn 在 19 世纪 80 年代初的时候开发的。它兼容 Bourne shell ,并同时包含了 C shell 中的多数特性。 - - -一个 shell 脚本仅仅只是一个可执行的文本文件,里边包含一条条可执行命令。 - -### 简单的 Shell 脚本编程 ### - -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. - -### 总结 ### - -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] -译者:[GHLandy](https://github.com/GHLandy) -校对:[校对者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/ From e7501d1ebfc1e09bf17fa79f6bd474f184aacba5 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Thu, 9 Jun 2016 00:23:08 +0800 Subject: [PATCH 1516/1710] =?UTF-8?q?[=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20Part=2010=20-=20LFCS--Understanding=20and=20Learning=20Basi?= =?UTF-8?q?c=20Shell=20Scripting=20and=20Linux=20Filesystem=20Troubleshoot?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng and Linux Filesystem Troubleshooting.md | 316 ++++++++++++++++++ 1 file changed, 316 insertions(+) create mode 100644 translated/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md diff --git a/translated/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md b/translated/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md new file mode 100644 index 0000000000..884ad9055f --- /dev/null +++ b/translated/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md @@ -0,0 +1,316 @@ +LFCS 第十讲:学习简单的 Shell 脚本编程和文件系统故障排除 +================================================================================ +Linux 基金会发起了 LFCS 认证 (Linux Foundation Certified Sysadmin, Linux 基金会认证系统管理员),这是一个全新的认证体系,主要目标是让全世界任何人都有机会考取认证。认证内容为 Linux 中间系统的管理,主要包括:系统运行和服务的维护、全面监控和分析的能力以及问题来临时何时想上游团队请求帮助的决策能力 + +![Basic Shell Scripting and Filesystem Troubleshooting](http://www.tecmint.com/wp-content/uploads/2014/11/lfcs-Part-10.png) + +LFCS 系列第十讲 + +请看以下视频,这里边介绍了 Linux 基金会认证程序。 + + + +本讲是系列教程中的第十讲,主要集中讲解简单的 Shell 脚本编程和文件系统故障排除。这两块内容都是 LFCS 认证中的必备考点。 + +### 理解终端 (Terminals) 和 Shell ### + +首先要声明一些概念。 + +- Shell 是一个程序,它将命令传递给操作系统来执行。 +- Terminal 也是一个程序,作为最终用户,我们需要使用它与 Shell 来交互。比如,下边的图片是 GNOME Terminal。 + +![Gnome Terminal](http://www.tecmint.com/wp-content/uploads/2014/11/Gnome-Terminal.png) + +Gnome Terminal + +启动 Shell 之后,会呈现一个命令提示符 (也称为命令行) 提示我们 Shell 已经做好了准备,接受标准输入设备输入的命令,这个标准输入设备通常是键盘。 + +你可以参考该系列文章的 [第一讲 使用命令创建、编辑和操作文件][1] 来温习一些常用的命令。 + +Linux 为提供了许多可以选用的 Shell,下面列出一些常用的: + +**bash Shell** + +Bash 代表 Bourne Again Shell,它是 GNU 项目默认的 Shell。它借鉴了 Korn shell (ksh) 和 C shell (csh) 中有用的特性,并同时对性能进行了提升。它同时也是 LFCS 认证中所涵盖的风发行版中默认 Shell,也是本系列教程将使用的 Shell。 + +**sh Shell** + +Bash Shell 是一个比较古老的 shell,一次多年来都是多数类 Unix 系统的默认 shell。 + +**ksh Shell** + +Korn SHell (ksh shell) 也是一个 Unix shell,是贝尔实验室 (Bell Labs) 的 David Korn 在 19 世纪 80 年代初的时候开发的。它兼容 Bourne shell ,并同时包含了 C shell 中的多数特性。 + + +一个 shell 脚本仅仅只是一个可执行的文本文件,里边包含一条条可执行命令。 + +### 简单的 Shell 脚本编程 ### + +如前所述,一个 shell 脚本就是一个纯文本文件,因此,可以使用自己喜欢的文本编辑器来创建和编辑。你可以考虑使用 vi/vim (参考本系列 [第二部分 - vi/vim 编辑器的使用][2]),它的语法高亮让我的编辑工作非常方便。 + +输入如下命令来创建一个名为 myscript.sh 的脚本文件: + + # vim myscript.sh + +shell 脚本的第一行 (著名的 [shebang 符](http://smilejay.com/2012/03/linux_shebang/)) 必须如下: + + #!/bin/bash + +这条语句“告诉”操作系统需要用那个解释器来运行这个脚本文件之后命令。 + +现在可以添加需要执行的命令了。通过注释,我们可以声明每一条命令或者整个脚本的具体含义。注意,shell 会忽略掉以井号 (#) 开始的语句。 + + #!/bin/bash + echo 这是关于 LFCS 认证系列的第十部分 + echo 今天是 $(date +%Y-%m-%d) + +编写并保存脚本之后,通过以下命令来是脚本文件称为可执行文件: + + # chmod 755 myscript.sh + +在执行脚本之前,我们需要说一下环境变量 ($PATH),运行: + + echo $PATH + +我们就会看到环境变量 ($PATH) 的具体内容:当输入命令是系统搜索可执行程序的目录,每一项之间使用冒号 (:) 隔开。称它为环境变量,是因为他本是就是 shell 环境的一部分 —— 当 shell 第每次启动时 shell 及其子进程可以获取的一系列信息。 + +当我们输入一个命令并按下回车时,shell 会搜索 $PATH 变量中列出的目录并执行第一个知道的实例。请看如下例子: + +![Linux Environment Variables](http://www.tecmint.com/wp-content/uploads/2014/11/Environment-Variable.png) + +环境变量 + +假如存在两个同名的可执行程序,一个在 /usr/local/bin,另一个在 /usr/bin,则会执行环境变量中最先列出的那个,并忽略另外一个。 + +如果我们自己编写的脚本没有在 $PATH 变量列出目录的其中一个,则需要输入 ./filename 来执行它。而如果存储在 $PATH 变量中的任意一个目录,我们就可以像运行其他命令一样来运行之前编写的脚本了。 + + # 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) + +执行脚本 + +#### if 条件语句 #### + +无论何时,当你需要在脚本中根据某个命令的运行结果来采取相应动作时,你应该使用 if 结构来定义条件。基本语法如下: + + if CONDITION; then + COMMANDS; + else + OTHER-COMMANDS + fi + +其中,CONDITION 为如下情形的任意一项 (仅列出常用的),并且达到以下条件时返回 true: + +- [ -a file ] → 指定文件存在。 +- [ -d file ] → 指定文件存在,并且是一个目录。 +- [ -f file ] → 指定文件存在,并且是一个普通文件。 +- [ -u file ] → 指定文件存在,并设置了 SUID。 +- [ -g file ] → 指定文件存在,并设置了 SGID。 +- [ -k file ] → 指定文件存在,并设置了“黏连 (Sticky)”位。 +- [ -r file ] → 指定文件存在,并且文件可读。 +- [ -s file ] → 指定文件存在,并且文件为空。 +- [ -w file ] → 指定文件存在,并且文件可写入· +- [ -x file ] → 指定文件存在,并且可执行。 +- [ string1 = string2 ] → 字符串相同。 +- [ string1 != string2 ] → 字符串不相同。 + +[ int1 op int2 ] 为前述列表中的一部分,紧跟着的项 (例如: -eq –> int1 与 int2 相同时返回 true) 则是 [ int1 op int2 ] 的一个子项, 其中 op 为以下比较操作符。 + +- -eq –> int1 等于 int2 时返回 true。 +- -ne –> int1 不等于 int2 时返回 true。 +- -lt –> int1 小于 int2 时返回 true。 +- -le –> int1 小于或等于 int2 时返回 true。 +- -gt –> int1 大于 int2 时返回 true。 +- -ge –> int1 大于或等于 int2 时返回 true。 + +#### for 循环语句 #### + +循环语句可以在某个条件下重复执行某个命令。基本语法如下: + + for item in SEQUENCE; do + COMMANDS; + done + +其中,item 为每次执行 COMMANDS 时,在 SEQUENCE 中匹配到的值。 + +#### While 循环语句 #### + +该循环结构会一直执行重复的命令,直到控制命令执行的退出状态值等于 0 时 (即执行成功) 停止。基本语法如下: + + while EVALUATION_COMMAND; do + EXECUTE_COMMANDS; + done + +其中,EVALUATION_COMMAND 可以是任何能够返回成功 (0) 或失败 (0 以外的值) 的退出状态值的命令,EXECUTE_COMMANDS 则可以是任何的程序、脚本或者 shell 结构体,包括其他的嵌套循环。 + +#### 综合使用 #### + +我们会通过以下例子来演示 if 条件语句和 for 循环语句。 + +**在基于 systemd 的发行版中探测某个服务是否在运行** + +先建立一个文件,列出我们想要想要查看的服务名。 + + # 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) + +使用脚本监控 Linux 服务 + +我们编写的脚本看起来应该是这样的: + + #!/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 服务监控脚本 + +**我们来解释一下这个脚本的工作流程** + +1). for 循环每次读取 myservices.txt 文件中的一项记录,每一项纪录表示一个服务的通用变量名。各项记录组成如下: + + # cat myservices.txt + +2). 以上命令由圆括号括着,并在前面添加美元符,表示它需要从 myservices.txt 的记录列表中取值作为变量传递给 for 循环。 + +3). 对于记录列表中的每一项纪录 (即每一项纪录的服务变量),都会这行以下动作: + + # systemctl status $service | grep --quiet "running" + +此时,需要在每个通用变量名 (即每一项纪录的服务变量) 的前面添加美元符,以表明它是作为变量来传递的。其输出则通过管道符传给 grep。 + +其中,-quiet 选项用于阻止 grep 命令将出现 "running" 的行回显到屏幕。当 grep 捕获到 "running" 时,则会返回一个退出状态码 "0" (在 if 结构体表示为 $?),由此确认某个服务正在运行中。 + +如果退出状态码是非零值 (即 systemctl status $service 命令中的回显中没有出现 "running"),则表明某个服务为运行。 + +![Services Monitoring Script](http://www.tecmint.com/wp-content/uploads/2014/11/Services-Monitoring-Script.png) + +服务监控脚本 + +我们可以增加一步,在开始循环之前,先确认 myservices.txt 是否存在。 + + #!/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 + +**Ping 一系列网络或者 Internet 主机名以获取应答数据** + +你可能想把自己维护的主机写入一个文本文件,并使用脚本探测它们是否能够 ping 得通 (脚本中的 myhosts 可以随意替换为你想要的名称)。 + +内置的 read shell 命令将告诉 while 循环一行行的读取 myhosts,并将读取的每行内容传给 host 变量,随后 host 变量传递给 ping 命令。 + + #!/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) + +使用脚本 Ping 服务器 + +扩展阅读: + +- [Learn Shell Scripting: A Guide from Newbies to System Administrator][3] +- [5 Shell Scripts to Learn Shell Programming][4] + +### 文件系统排除 ### + +尽管 Linux 是一个很稳定的操作系统,但仍然会因为某些原因出现崩溃 (比如以外断电等),正好你有一个 (或者更多个) 文件系统未能正确卸载,Linux 重启的时候就会自动检测其中可能发生的错误。 + +此外,每次系统正常启动的时候,都会在文件系统挂载之前校验它们的完整度。而这些全部都依赖于 fsck 工具 ("文件系统校验")。 + +如果对 fsck 进行设定,它除了校验文件系统的完整性之外,还可以尝试修复错误。fsck 能否成功修复错误,取决于文件系统的损伤程度;如果可以修复,被损坏部分的文件会恢复到位于每个文件系统根目录的 lost+found。 + +最后但同样重要的是,我们必须注意,如果拔掉系统正在写入数据的 USB 设备同样会发生错误,甚至可能发生硬件损坏。 + +fsck 的基本用如下: + + # fsck [options] filesystem + +**检查文件系统错误并尝试自动修复** + +想要使用 fsck 检查文件系统,我们需要首先卸载文件系统。 + + # 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) + +检查文件系统错误 + +除了 -y 选项,我们也可以使用 -a 选项来自动修复文件系统错误,而不必做出交互式应答,并在文件系统看起来 "干净" 的情况下强制校验。 + + # fsck -af /dev/sdg1 + +如果只是要找出什么地方发生了错误 (不用再检测到错误的时候修复),我们开使用 -n 选项,这样只会讲文集系统错误输出到标准输出设备。 + + # fsck -n /dev/sdg1 + +根据 fsck 输出的错误信息,我们可以知道是否可以自己修复或者需要将问题提交给工程师团队来做详细的硬件校验。 + +### 总结 ### + +至此,系列教程的十讲就全部结束了,全系列教程涵盖了通过 LFCS 测试所需的基础内容。 + +但显而易见的,本系列的十讲并不足以在单个主题方面做到全面描述,我们希望这一系列教程可以成为你学习的基础素材,并一直保持学习的热情。 + +我们欢迎你提出任何问题或者建议,所以你可以毫不犹豫的通过以下链接联系我们。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-basic-shell-scripting-and-linux-filesystem-troubleshooting/ + +作者:[Gabriel Cánepa][a] +译者:[GHLandy](https://github.com/GHLandy) +校对:[校对者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/ From 0c59b67ae894233247aca5f3de26cbafe7f6ba7b Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 9 Jun 2016 16:08:58 +0800 Subject: [PATCH 1517/1710] [translated]Android Use Apps Even Without Installing Them --- ...d Use Apps Even Without Installing Them.md | 69 ------------------- ...d Use Apps Even Without Installing Them.md | 67 ++++++++++++++++++ 2 files changed, 67 insertions(+), 69 deletions(-) delete mode 100644 sources/talk/20160518 Android Use Apps Even Without Installing Them.md create mode 100644 translated/talk/20160518 Android Use Apps Even Without Installing Them.md diff --git a/sources/talk/20160518 Android Use Apps Even Without Installing Them.md b/sources/talk/20160518 Android Use Apps Even Without Installing Them.md deleted file mode 100644 index fc63e6c7fc..0000000000 --- a/sources/talk/20160518 Android Use Apps Even Without Installing Them.md +++ /dev/null @@ -1,69 +0,0 @@ -alim0x translating - -Android’s Next Revolution: Use Apps Even Without Installing Them! -=================================================================== - - -A new innovation by Google’s Android will let you use apps even if they aren’t installed on your device. A few prototypes have already been made. - -Remember that time when someone sent you a link that required you installing an app in order to view? - -The dilemma of whether you should install the app just to view a one-time link may have frustrated you. Furthermore, the app installation itself may took some of your precious time as well. - -The above scenario has probably been experienced by most, if not all, modern day technology users. Nonetheless, we’ve all came to accept that this is simply the correct and logical way by which things work. - -Or is it? - -To that question Google’s Android division came up with a new, out-of-the-box answer: - -Android Instant Apps - -Android Instant Apps purports to rid you of any such dilemmas in the first place by letting you simply click the link (see opening example) and start using the app straight away. - -Another real life example of a scenario where Instant Apps might come handy, is the case you want to park your car but don’t have the parking meter matching app. - -According to Google, you could simply tap your phone on the meter and the parking app will pop on your screen immediately, ready to be used. - -How Does It Work? - -Instant Apps are basically the same apps you’ve already familiarized yourself with, only with a twist – these apps have been trimmed and modularized in order to supply you only the essential parts required for you to complete a certain task. - -For instance, expanding on the opening scenario as an example, in order to view a link, you don’t have to have a full featured app that can write, send, make coffee or whatever. All you need is the viewing feature – and that’s exactly what you’ll get. - -That way the app could open up rapidly, allowing you to complete the task of which you came for. - -![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/AIA-demo.jpg) ->AIA demo - -![](https://4.bp.blogspot.com/-p5WOrD6wVy8/VzyIpsDqULI/AAAAAAAADD0/xbtQjurJZ6EEji_MPaY1sLK5wVkXSvxJgCKgB/s800/B%2526H%2B-%2BDevice%2B%2528Final%2529.gif) ->B&H Photo (via Google Search) - -![](https://2.bp.blogspot.com/-q5ApCzECuNA/VzyKa9l0t2I/AAAAAAAADEI/nYhhMClDl5Y3qL5-wiOb2J2QjtGWwbF2wCLcB/s800/BuzzFeed-Device-Install%2B%2528Final%2529.gif) ->BuzzFeedVideo (via a shared link) - -![](https://2.bp.blogspot.com/-mVhKMMzhxms/VzyKg25ihBI/AAAAAAAADEM/dJN6_8H7qkwRyulCF7Yr2234-GGUXzC6ACLcB/s800/Park%2Band%2BPay%2B-%2BDevice%2Bwith%2BMeter%2B%2528Final%2529.gif) ->Park and Pay (example) (via NFC) - - -Sounds great, isn’t it? However, there are still many technical aspects need to be addressed. - -For instance, from a security point of view: if any app can theoretically run on your device, even if you haven’t installed it – how will you keep your device safe from malaware attacks? - -Therefore, in order to iron out such risks, Google is still working on the project, currently with a small set of partners which will gradually expand. - -Eventually, Google plans to release AIA (Android Instant Apps) somewhere along next year. - -relate: [Introducing Android Instant Apps][1] - --------------------------------------------------------------------------------- - -via: http://www.iwillfolo.com/androids-next-revolution-use-apps-even-without-installing-them/ - -作者:[iwillfolo][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.iwillfolo.com -[1]: http://android-developers.blogspot.co.il/2016/05/android-instant-apps-evolving-apps.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+blogspot/hsDu+%28Android+Developers+Blog%29 diff --git a/translated/talk/20160518 Android Use Apps Even Without Installing Them.md b/translated/talk/20160518 Android Use Apps Even Without Installing Them.md new file mode 100644 index 0000000000..12fd11ca7e --- /dev/null +++ b/translated/talk/20160518 Android Use Apps Even Without Installing Them.md @@ -0,0 +1,67 @@ +安卓的下一场革命:不安装即可使用应用! +=================================================================== + + +谷歌安卓的一项新创新将让你可以使用没有在你的设备上安装的应用。现在已经有了一些原型了。 + +还记得某人给你发了一个链接,要求你安装一个应用来查看的情形吗? + +是否要安装这个应用来查看一个一次性的链接,这个困境一定让你感到很挫败。而且,应用安装本身也会消耗你不少宝贵的时间。 + +上述场景可能大多数人都经历过,或者说大多数现代科技用户都经历过。尽管如此,我们都接受这是正确且合理的过程。 + +真的吗? + +针对这个问题谷歌的安卓部门给出了一个全新的,开箱即用的答案: + +### Android Instant Apps + +Android Instant Apps 声称第一时间帮你摆脱这样的两难境地,让你简单地点击链接(见打开链接的示例)然后直接开始使用这个应用。 + +另一个真实生活场景的例子,如果你想停车但是没有停车码表的配对应用,有了 Instant Apps 在这种情况下就方便多了。 + +根据谷歌的信息,你可以简单地将你的手机和码表触碰,停车应用就会直接显示在你的屏幕上,并且准备就绪可以使用。 + +#### 它是怎么工作的? + +Instant Apps 和你已经熟悉的应用基本相同,只有一个不同——这些应用为了满足你完成某项任务的需要,只提供给你已经经过**裁剪和模块化**的应用关键部分。 + +例如,展开打开链接的场景作为例子,为了查看一个链接,你不需要拥有一个可以写,发送,做咖啡或其它特性的全功能应用。你所需要的全部就是查看功能——而这就是你所会获取到的部分。 + +这样应用就可以快速打开,让你可以完成你的目标任务。 + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/AIA-demo.jpg) +>AIA 示例 + +![](https://4.bp.blogspot.com/-p5WOrD6wVy8/VzyIpsDqULI/AAAAAAAADD0/xbtQjurJZ6EEji_MPaY1sLK5wVkXSvxJgCKgB/s800/B%2526H%2B-%2BDevice%2B%2528Final%2529.gif) +>B&H 图片(通过谷歌搜索) + +![](https://2.bp.blogspot.com/-q5ApCzECuNA/VzyKa9l0t2I/AAAAAAAADEI/nYhhMClDl5Y3qL5-wiOb2J2QjtGWwbF2wCLcB/s800/BuzzFeed-Device-Install%2B%2528Final%2529.gif) +>BuzzFeedVideo(通过一个共享链接) + +![](https://2.bp.blogspot.com/-mVhKMMzhxms/VzyKg25ihBI/AAAAAAAADEM/dJN6_8H7qkwRyulCF7Yr2234-GGUXzC6ACLcB/s800/Park%2Band%2BPay%2B-%2BDevice%2Bwith%2BMeter%2B%2528Final%2529.gif) +>停车与支付(例)(通过 NFC) + + +听起来很棒,不是吗?但是其中还有很多技术方面的问题需要解决。 + +比如,从安全的观点来说:如果任何应用从理论上来说都能在你的设备上运行,甚至你都不用安装它——你要怎么保证设备远离恶意软件攻击? + +因此,为了消除这类威胁,谷歌还在这个项目上努力,目前只有少数合作伙伴,未来将逐步扩展。 + +谷歌最终计划在明年发布 AIA(Android Instant Apps)。 + +相关:[介绍 Android Instant Apps][1] + +-------------------------------------------------------------------------------- + +via: http://www.iwillfolo.com/androids-next-revolution-use-apps-even-without-installing-them/ + +作者:[iwillfolo][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.iwillfolo.com +[1]: http://android-developers.blogspot.co.il/2016/05/android-instant-apps-evolving-apps.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+blogspot/hsDu+%28Android+Developers+Blog%29 From 45a22407b4bdfe7f058e908565b85df429565af6 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 9 Jun 2016 23:09:36 +0800 Subject: [PATCH 1518/1710] translating --- ...519 The future of sharing: integrating Pydio and ownCloud.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md b/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md index 0461fda34d..b2174b18c2 100644 --- a/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md +++ b/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md @@ -1,3 +1,5 @@ +martin + The future of sharing: integrating Pydio and ownCloud ========================================================= From 53c908f377bb82320be8a5296bb21a63b891211a Mon Sep 17 00:00:00 2001 From: gitfuture Date: Fri, 10 Jun 2016 01:03:36 +0800 Subject: [PATCH 1519/1710] translating by GitFuture --- ...oxManage On Ubuntu 16.04 And Use Its Command line Options.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md b/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md index 85fabacc56..cb7100fd8a 100644 --- a/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md +++ b/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md @@ -1,3 +1,5 @@ +Translating by GitFuture + How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options ====================================================================================== From 3288059be5ee998183a210dcda860623d67f4d31 Mon Sep 17 00:00:00 2001 From: "jianbo.lu" <387852424@qq.com> Date: Fri, 10 Jun 2016 01:06:43 +0800 Subject: [PATCH 1520/1710] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E8=AE=A4=E9=A2=86?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请认领翻译任务 --- sources/tech/20160601 scp command in Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160601 scp command in Linux.md b/sources/tech/20160601 scp command in Linux.md index f2dd409d49..5e4704d40b 100644 --- a/sources/tech/20160601 scp command in Linux.md +++ b/sources/tech/20160601 scp command in Linux.md @@ -1,3 +1,5 @@ +lujianbo + scp command in Linux ======================= From 0afa7d313a0bba190da271fe9b45e06d785640e8 Mon Sep 17 00:00:00 2001 From: "jianbo.lu" <387852424@qq.com> Date: Fri, 10 Jun 2016 14:55:29 +0800 Subject: [PATCH 1521/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4=EF=BC=8C?= =?UTF-8?q?=E7=AD=89=E5=BE=85=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20160601 scp command in Linux.md | 95 +++++++++---------- 1 file changed, 44 insertions(+), 51 deletions(-) diff --git a/sources/tech/20160601 scp command in Linux.md b/sources/tech/20160601 scp command in Linux.md index 5e4704d40b..f4ebfc23c3 100644 --- a/sources/tech/20160601 scp command in Linux.md +++ b/sources/tech/20160601 scp command in Linux.md @@ -1,14 +1,12 @@ -lujianbo - -scp command in Linux +Linux中的scp命令 ======================= ![](https://www.unixmen.com/wp-content/uploads/2016/05/SCP-LOGO-1.jpg) -scp means Secure Copy Protocol, already every Linux/Unix user known about cp command well. scp also works like cp command, cp command copies files or folders from one location i.e source to other location i.e target in local system, but scp copies the files from one host to another host in network. +scp 意味着安全拷贝协议 (Secure Copy Protocol), 和众多Linux/Unix使用者所了解的拷贝(cp)命令一样. scp 的使用方式跟 cp命令是很相似的, cp命令将一个文件或文件夹从本地操作系统的一个位置拷贝到目标位置上,而scp用来将一个文件或者文件夹通过网络传输从一个主机拷贝到另一个主机当中去。 -The usage of the scp command is as follows, here i copy a file named importantfile from local system(10.10.16.147) to Remote system(10.0.0.6) here instead of ip address you can also use System name. +scp命令的使用方法如下所示,在这个例子中,我将一个叫 “imporimposetantfile”的文件从本机(10.10.16.147)拷贝到远程主机(10.0.0.6)中。在这个命令里,你也可以使用主机名字来替代IP地址。 ``` [root@localhost ~]# scp importantfile admin@10.0.0.6:/home/admin/ @@ -22,7 +20,7 @@ importantfile 100% 0 0.0KB/s 00:00 [root@localhost ~]# ``` -Similarly if you want to get a file from remote system you can use scp command as follows +同样的,如果你想从一个远程主机中获取文件,你可以利用如下的scp命令。 ``` [root@localhost ~]# scp root@10.10.16.137:/root/importantfile /home/admin/ @@ -35,55 +33,50 @@ importantfile 100% 0 0.0KB/s 00:00 [root@localhost ~]# ``` -You can also use various options along with scp command like cp command,The man page of the scp command clearly explain about the usage of various options and advantages of that. +你同样可以像cp命令一样,在scp命令中使用不同的选项,scp的man文件详细地阐述了不同选项的用法和优点。 -**Sample Output.** +**简单输出.** ![](https://www.unixmen.com/wp-content/uploads/2016/05/scp.jpg) ``` -The options are as follows: +scp可选参数如下所示: - -B Selects batch mode (prevents asking for passwords or passphrases). + -B 采取批量模式 (prevents asking for passwords or passphrases). - -C Compression enable. Passes the -C to enable compression. + -C 允许压缩. 通过指明-C来开启压缩模式. - -c cipher - Selects the cipher to use for encrypting the data transfer. This - option is directly passed to ssh(1). + -c 加密方式 + 选择在传输过程中用来加密的加密方式 + 这个选项会被直接传递到ssh(1). - -F ssh_config - Specifies an alternative per-user configuration file for ssh. - This option is directly passed to ssh(1). + -F ssh配置 + 为ssh指定一个用来替代默认配置的文件. + 这个选项会被直接传递到ssh(1). - -l limit - Limits the used bandwidth, specified in Kbit/s. + -l 限速 + 限制命令使用的带宽, 默认单位是 Kbit/s. - -P port - Specifies the port to connect to on the remote host. Note that - this option is written with a capital ‘P’, because -p is already - reserved for preserving the times and modes of the file. + -P 端口 + 指定需要的连接的远程主机的端口. + 注意,这个选项使用的是一个大写的"P", 因为小写的 -p 已经用来保留目标文件的时间和模式相关信息。 - -p Preserves modification times, access times, and modes from the - original file. + -p 保留目标文件的修改时间,访问时间以及权限模式. - -q Quiet mode: disables the progress meter as well as warning and - diagnostic messages from ssh(1). + -q 静默模式: 不显示来自ssh(1)命令的进度信息,警告和诊断信息. - -r Recursively copy entire directories. Note that scp follows sym‐ - bolic links encountered in the tree traversal. + -r 递归拷贝整个目录. + 注意,scp命令在树形遍历的时候同样会对符号连接进行相同的处理。 - -v Verbose mode. Causes scp and ssh(1) to print debugging messages - about their progress. This is helpful in debugging connection, - authentication, and configuration problems. + -v 详细模式.scp和ssh(1)将会打印出处理过程中的调试信息.当你要调试连接,认证和配置问题的时候这将会帮助到你。 ``` -The scp command along with -v option you can get detailed information about authentication, debugging information etc. +利用scp命令的-v选项,你可以获得认证,调试相关的处理信息. ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-v.jpg) -Sample output is like when we pass the option `-v` +当我们使用-v选项的时候,一个简单的输出如下所示 ``` [root@localhost ~]# scp -v abc.txt admin@10.0.0.6:/home/admin @@ -118,59 +111,59 @@ debug1: Exit status 0 [root@localhost ~]# ``` -If we need to copy the Directories or folders we can use the option –r. It Recursively copy entire directories +当我们需要拷贝一个目录或者文件夹的时候,我们可以使用-r选项,它会递归拷贝整个目录。 ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-r.jpg) -Quiet mode: +静默模式: -If you want disables the progress meter as well as warning and diagnostic messages pass the argument -q along with scp command. +如果你想要关闭进度信息以及警告和诊断信息,你可以通过使用scp命令中的-q选项. ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-q.jpg) -last time we pass the argument -r only then it shows the information file by file, but when we pass the argument -q it disables the progress meter this time. +上一次我们仅仅使用-r参数,它显示了逐个文件的信息,但这一次当我们使用了-q参数,它就不显示进度信息. -Preserves modification times, access times, and modes from the original file by passing the option -p along with scp. +利用scp的-p选项来保留目标文件的更新时间,访问时间和权限模式. ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-p.jpg) -Specifies the port to connect to on the remote host by using the option -P. -scp uses the ssh to transfer the files between hosts, ssh uses the port number 22 so the scp also uses the same port number 22. +通过 -P 选项来指定远程主机的连接端口。 +scp使用ssh命令来在两个主机之间传输文件,因为ssh使用的是22端口号,所以scp也使用相同的22端口号. -If we want to change the port number we can pass the particular port number along with -P(capital P because small p uses for preserving access time etc.) +如果我们希望改变这个端口号,我们可以使用-P(大写的P,因为小写的p用来保存文件的访问时间等) 选项来指定所需的端口号 -for example if we want to use port number 2222 then the command is as follows +举个例子,如果我们想要使用2222端口号,我们可以使用如下的命令 ``` [root@localhost ~]# scp -P 2222 abcd1 root@10.10.16.137:/root/ ``` -**Limits the used bandwidth, specified in Kbit/s** +**限制命令使用的带宽, 指定的单位是 Kbit/s** -we can limit the bandwidth by using the argument -l option as follows. here i used the limit is 512kbit/s +如下所示,我们可以使用-l参数来指定scp命令所使用的带宽,在此我们将速度限制为512kbit/s ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-l.jpg) -**Compression enable** +**开启压缩** -we can enable the compression mode when we transfer the data through scp command to save tha bandwidth and time as follows +如下所示,我们可以通过开启scp命令的压缩模式来节省传输过程中的带宽和时间 ![](https://www.unixmen.com/wp-content/uploads/2016/05/scp-with-C.jpg) -**Selects the cipher to use for encrypting the data** +**选择加密数据的加密方式** -By default scp uses AES-128, if we want to change the encryption then we can pass the argument -c(small c) along with scp. +scp默认使用 AES-128的加密方式,如果我们想要改变这个加密方式,可以通过-c(小写的c) 参数来指定其他的加密方式 ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-cipher.jpg) -Now you can transfer the files between different nodes in your network securely by using scp(Secure copy). +现在你可以利用scp(Secure copy)命令在你所属网络中的两个结点之间安全地拷贝文件了. -------------------------------------------------------------------------------- via: https://www.unixmen.com/scp-command-linuxunix/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+unixmenhowtos+%28Unixmen+Howtos+%26+Tutorials%29 作者:[Naga Ramesh][a] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/lujianbo) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 99fe7e0194a82f23c9e5a3ddf80744c60a239a0e Mon Sep 17 00:00:00 2001 From: "jianbo.lu" <387852424@qq.com> Date: Fri, 10 Jun 2016 15:26:06 +0800 Subject: [PATCH 1522/1710] =?UTF-8?q?=E9=A2=86=E5=8F=96=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...9 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md b/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md index d532b0b464..9acb54f918 100644 --- a/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md +++ b/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md @@ -1,3 +1,4 @@ +lujianbo LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS ========================================================= From 465d5f834adc0fcbdb66893dc67cbc1c6fa171b9 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 10 Jun 2016 05:16:27 -0500 Subject: [PATCH 1523/1710] =?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 移动目录,补齐译者id --- {sources => translated}/tech/20160601 scp command in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {sources => translated}/tech/20160601 scp command in Linux.md (99%) diff --git a/sources/tech/20160601 scp command in Linux.md b/translated/tech/20160601 scp command in Linux.md similarity index 99% rename from sources/tech/20160601 scp command in Linux.md rename to translated/tech/20160601 scp command in Linux.md index f4ebfc23c3..949409ff44 100644 --- a/sources/tech/20160601 scp command in Linux.md +++ b/translated/tech/20160601 scp command in Linux.md @@ -163,7 +163,7 @@ scp默认使用 AES-128的加密方式,如果我们想要改变这个加密方 via: https://www.unixmen.com/scp-command-linuxunix/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+unixmenhowtos+%28Unixmen+Howtos+%26+Tutorials%29 作者:[Naga Ramesh][a] -译者:[译者ID](https://github.com/lujianbo) +译者:[lujianbo](https://github.com/lujianbo) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f2eae7b83e7f8387ec105cd0d1b1e4ce366755c4 Mon Sep 17 00:00:00 2001 From: "jianbo.lu" <387852424@qq.com> Date: Fri, 10 Jun 2016 23:12:08 +0800 Subject: [PATCH 1524/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=20(#4049)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lation Guide on Ubuntu Server 16.04 LTS.md | 160 ----------------- ...lation Guide on Ubuntu Server 16.04 LTS.md | 162 ++++++++++++++++++ 2 files changed, 162 insertions(+), 160 deletions(-) delete mode 100644 sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md create mode 100644 translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md diff --git a/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md b/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md deleted file mode 100644 index 9acb54f918..0000000000 --- a/sources/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md +++ /dev/null @@ -1,160 +0,0 @@ -lujianbo -LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS -========================================================= - -LAMP stack is a collection of free and open source softwares like **Linux**, Web Server (**Apache**), Database server (**MySQL / MariaDB**) and **PHP** (Scripting Language). LAMP is the platform which is required to install and build dynamic web sites and application like WordPress, Joomla, OpenCart and Drupal. - -In this article i will describe how to install LAMP on Ubuntu Server 16.04 LTS, As We know that Ubuntu is a Linux based Operating system, so it provides the first component of LAMP and i am assuming Ubuntu Server 16.04 is already installed on your system. - -### Installation of Web Server (Apache2) : - -In Ubuntu Linux Web server comes with the name Apache2, Use the beneath apt command to install it. - -``` -linuxtechi@ubuntu:~$ sudo apt update -linuxtechi@ubuntu:~$ sudo apt install apache2 -y -``` - -When Apache2 package is installed then its service is automatically started and enabled across the reboot, In case it is not started and enabled, use the following command : - -``` -linuxtechi@ubuntu:~$ sudo systemctl start apache2.service -linuxtechi@ubuntu:~$ sudo systemctl enable apache2.service -linuxtechi@ubuntu:~$ sudo systemctl status apache2.service -``` - -If Ubuntu firewall (ufw) is active, then allow the Web Server ports (80 and 443) in firewall using below commands. - -``` -linuxtechi@ubuntu:~$ sudo ufw status -Status: active -linuxtechi@ubuntu:~$ sudo ufw allow in 'Apache Full' -Rule added -Rule added (v6) -linuxtechi@ubuntu:~$ -``` - -### Access Web Server now : - -Open the Web browser and type the IP Address or Host name of your server (http://IP_Address_OR_Host_Name), In my Case my server IP is ‘192.168.1.13’ - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Apache2-Ubuntu-server-16.04-1024x955.jpg) - -### Installation of Data Base Server (MySQL Server 5.7) : - -MySQL and MariaDB are the database servers in Ubuntu 16.04. MySQL Server and MariaDB Server’s packages are available in the default repositories and we can install either of the database. Run the following apt command to install MySQL Server from terminal. - -``` -linuxtechi@ubuntu:~$ sudo apt install mysql-server mysql-client -``` - -During the installation, it will prompt us to set the root password of mysql server. - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Enter-root-password-mysql-server-ubuntu-16-04.jpg) - -Confirm root password and click on ‘OK’ - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-root-password-mysql-server-ubuntu-16-04.jpg) - -Installation of MySQL Server is completed Now. MySQL Service will be started and enabled automatically.We can verify the MySQL Server’s service using below systemcl command : - -``` -linuxtechi@ubuntu:~$ sudo systemctl status mysql.service -``` - -### Installation of MariaDB Server : - -Use the beneath command to install MariaDB Server 10.0 from the terminal. - -``` -linuxtechi@ubuntu:~$ sudo apt install mariadb-server -``` - -Run the following command to set root password of mariadb and disable other options like disable remote login. - -``` -linuxtechi@ubuntu:~$ sudo mysql_secure_installation -``` - -### Installation of PHP ( Scripting Language ) : - -PHP 7.0 is available in the Ubuntu repositories. Execute the beneath command from the terminal to install PHP 7 : - -``` -linuxtechi@ubuntu:~$ sudo apt install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 -``` - -Create a sample php page and place it in apache document root (/var/ww/html) - -``` -linuxtechi@ubuntu:~$ vi samplepage.php - -``` - -Save and exit the file. - -``` -linuxtechi@ubuntu:~$ sudo mv samplepage.php /var/www/html/ -``` - -Now Access the sample PHP page from the Web Browser, type : “http:///samplepage.php” , You should get the page like below. - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Sample-PHP-Page-Ubuntu-Server-16-04.jpg) - -Above Page shows that our PHP installation is completed successfully. - -### Installation of phpMyAdmin : - -phpMyAdmin allows us to perform all the database related administrative and other DB operation task from its web interface. Its package is already listed in the Ubuntu server repositories. - -Use the below commands to Install phpMyAdmin on Ubuntu server 16.04 LTS. - -``` -linuxtechi@ubuntu:~$ sudo apt install php-mbstring php7.0-mbstring php-gettext -linuxtechi@ubuntu:~$ sudo systemctl restart apache2.service -linuxtechi@ubuntu:~$ sudo apt install phpmyadmin -``` - -During its installation it will prompt us to choose the Web server to be configured for phpMyAdmin. - -Select Apache2 and Click on OK. - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Web-Server-for-phpMyAdmin-Ubuntu-Server-16-04.jpg) - -Click on ‘Yes’ to Configure database for phpMyAdmin. - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/configure-database-for-phpmyadmin-ubuntu-server-16-04.jpg) - -Specify the password for phpMyAdmin to register with Database Server. - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Select-Password-for-phpMyadmin-ubuntu-16-04-1024x433.jpg) - -Confirm the password for phpMyAdmin and then click on ‘OK’ - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-password-for-phpmyadmin-ubuntu-server-16-04.jpg) - -Now try to access the phpMyAdmin, open the browser type : “http://Server_IP_OR_Host_Name/phpmyadmin” - -Use the user name as ‘root’ and password that we set during the installation. - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-Ubuntu-Server-16-04-1024x557.jpg) - -When we click on ‘Go’, it will redirect the page to ‘phpMyAdmin’ Web interface as shown below. - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-portal-overview-ubuntu-server-16-04-1024x557.jpg) - -That’s it, LAMP stack is successfully installed and is ready for use 🙂 . Please share your feedback and comments. - --------------------------------------------------------------------------------- - -via: http://www.linuxtechi.com/lamp-stack-installation-on-ubuntu-server-16-04/ - -作者:[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/ diff --git a/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md b/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md new file mode 100644 index 0000000000..a687e87a30 --- /dev/null +++ b/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md @@ -0,0 +1,162 @@ +在 Ubuntu Server 16.04 LTS 上安装 LAMP +========================================================= + +LAMP方案是一系列自由和开源软件的集合,包含了 **Linux**, web服务器 (**Apache**), 数据库服务器 (**MySQL / MariaDB**) 和 **PHP** (脚本语言). LAMP是那些需要安装和构建动态网页应用的基础平台,比如WordPress, Joomla, OpenCart and Drupal。 + +在这篇文章中,我将描述如何在Ubuntu Server 16.04 LTS 上安装LAMP,众所周知Ubuntu是一个基于linux的操作系统,因此它构成了LAMP的第一个部分,在接下来的操作中,我将默认你已经安装了 Ubuntu Server 16.04。 + +### Apache2 web服务器的安装 : + +在Ubuntu linux中,web 服务器称之为 Apache2,我们可以利用下面的命令来安装它 + +``` +linuxtechi@ubuntu:~$ sudo apt update +linuxtechi@ubuntu:~$ sudo apt install apache2 -y +``` + +当安装Apache2包之后,Apache2相关的服务将会在重启后变成可用状态和自动运行,在某些情况下,如果你的Apache2服务并没有自动可用和启动,你可以利用如下命令来启用它。 + +``` +linuxtechi@ubuntu:~$ sudo systemctl start apache2.service +linuxtechi@ubuntu:~$ sudo systemctl enable apache2.service +linuxtechi@ubuntu:~$ sudo systemctl status apache2.service +``` + +如果你开启了Ubuntu的防火墙(ufw),那么你可以使用如下的命令来解除web服务器的端口(80和443)限制 + +``` +linuxtechi@ubuntu:~$ sudo ufw status +Status: active +linuxtechi@ubuntu:~$ sudo ufw allow in 'Apache Full' +Rule added +Rule added (v6) +linuxtechi@ubuntu:~$ +``` + +### 现在开始访问你的web服务器 : + +打开浏览器并输入服务器的IP地址或者主机名 +(http://IP_Address_OR_Host_Name),在我的例子中我的服务器IP是‘192.168.1.13’ + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Apache2-Ubuntu-server-16.04-1024x955.jpg) + +### 数据库服务器的安装r (MySQL Server 5.7) : + +MySQL 和 MariaDB 都是 Ubuntu 16.04 中的数据库服务器. MySQL Server 和 MariaDB Server的安装包都可以在Ubuntu的默认软件源中找到,我们可以选择其中的一个来安装.通过下面的命令来在终端中安装mysql服务器 + +``` +linuxtechi@ubuntu:~$ sudo apt install mysql-server mysql-client +``` + +在安装过程中,它会要求你设置mysql服务器root帐户的密码. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Enter-root-password-mysql-server-ubuntu-16-04.jpg) + +确认root帐户的密码,并点击确定 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-root-password-mysql-server-ubuntu-16-04.jpg) + +Mysql 服务器的安装到此已经结束了, MySQL 服务会自动变成可用状态和自动启动.我们可以通过如下的命令来校验Mysql服务的状态 + +``` +linuxtechi@ubuntu:~$ sudo systemctl status mysql.service +``` + +### MariaDB Server的安装 : + +在终端中利用如下的命令来安装 Mariadb 10.0 服务器。 + +``` +linuxtechi@ubuntu:~$ sudo apt install mariadb-server +``` + +运行如下的命令来设置mariadb root帐户的密码,还可以用来关闭某些选项,比如关闭远程登录功能。 + +``` +linuxtechi@ubuntu:~$ sudo mysql_secure_installation +``` + +### PHP脚本语言的安装: + +PHP 7 已经存在于Ubuntu的软件源中了,在终端中执行如下的命令来安装PHP 7: + +``` +linuxtechi@ubuntu:~$ sudo apt install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 +``` + +创建一个简单的php页面,并且将它移动到 apache的文档根目录下 (/var/ww/html) + +``` +linuxtechi@ubuntu:~$ vi samplepage.php + +``` + +在vi中编辑之后,保存并退出该文件。 + +``` +linuxtechi@ubuntu:~$ sudo mv samplepage.php /var/www/html/ +``` + +现在你可以从web浏览器中访问这个页面, +输入 : “http:///samplepage.php” ,你可以看到如下页面. + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Sample-PHP-Page-Ubuntu-Server-16-04.jpg) + +以上的页面向我们展示了PHP已经完全安装成功了 + +### phpMyAdmin的安装: + +phpMyAdmin可以让我们通过它的web界面来执行所有和数据库管理和其他数据库操作相关的任务,这个安装包已经存在于Ubuntu的软件源中 + +利用如下的命令来在Ubuntu server 16.04 LTS中安装phpMyAdmin + +``` +linuxtechi@ubuntu:~$ sudo apt install php-mbstring php7.0-mbstring php-gettext +linuxtechi@ubuntu:~$ sudo systemctl restart apache2.service +linuxtechi@ubuntu:~$ sudo apt install phpmyadmin +``` + +在以下的安装过程中,它会提示我们选择phpMyAdmin运行的目标服务器 + + +选择 Apache2 并点击确定 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Web-Server-for-phpMyAdmin-Ubuntu-Server-16-04.jpg) + +点击确定来配置phpMyAdmin管理的数据库 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/configure-database-for-phpmyadmin-ubuntu-server-16-04.jpg) + +指定phpMyAdmin向数据库服务器注册时所用的密码 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Select-Password-for-phpMyadmin-ubuntu-16-04-1024x433.jpg) + +确认phpMyAdmin所需的密码,并点击确认 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-password-for-phpmyadmin-ubuntu-server-16-04.jpg) + +现在可以开始尝试访问phpMyAdmin, 打开浏览器并输入 : “http://Server_IP_OR_Host_Name/phpmyadmin” + +利用我们安装时设置的 root帐户和密码 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-Ubuntu-Server-16-04-1024x557.jpg) + +当我们点击“Go”的时候,将会重定向到如下所示的 ‘phpMyAdmin’web界面 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-portal-overview-ubuntu-server-16-04-1024x557.jpg) + +到现在,LAMP方案已经被成功安装和使用了,欢迎分享你的反馈和评论。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/lamp-stack-installation-on-ubuntu-server-16-04/ + +作者:[Pradeep Kumar][a] +译者:[陆建波](https://github.com/lujianbo) +校对:[校对者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 27b6798e0af2cb973f4440438f1e7d2c013fc3aa Mon Sep 17 00:00:00 2001 From: gitfuture Date: Sat, 11 Jun 2016 10:56:15 +0800 Subject: [PATCH 1525/1710] Translated by GitFuture --- ... 16.04 And Use Its Command line Options.md | 140 ------------------ ... 16.04 And Use Its Command line Options.md | 138 +++++++++++++++++ 2 files changed, 138 insertions(+), 140 deletions(-) delete mode 100644 sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md create mode 100644 translated/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md diff --git a/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md b/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md deleted file mode 100644 index cb7100fd8a..0000000000 --- a/sources/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md +++ /dev/null @@ -1,140 +0,0 @@ -Translating by GitFuture - -How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options -====================================================================================== - -VirtualBox comes with a suite of command line utilities, and you can use the VirtualBox command line interfaces (CLIs) to manage VMs on a remote headless server. In this tutorial, we will show you how to create and start a VM without VirtualBox GUI using VBoxManage. VBoxManage is the command-line interface to VirtualBox taht you can use to completely control VirtualBox from the command line of your host operating system. VBoxManage supports all the features that the graphical user interface gives you access to, but it supports a lot more than that. It exposes really all the features of the virtualization engine, even those that cannot (yet) be accessed from the GUI. You will need to use the command line if you want to use a different user interface than the main GUI and control some of the more advanced and experimental configuration settings for a VM. - -You will find VBoxManage helpful when you want to create and run virtual machines (VMs) on VirtualBox, but you only have access to a terminal on a remote host machine. This can be a common situation for servers where VMs are managed from remotely. - -### Prerequisites - -Before we start using VBoxManage command line utility, make sure that you have root or sudo user access to your Ubuntu 16.04 server and the Oracle Virtual Box is already installed on it. Then you need to install VirtualBox Extension Pack which is needed to run a VRDE remote desktop server used to access headless VMs. - -### Installing VBoxManage - -You can get your required package by following the link to [Virtual Box Download Page][1] to get the latest extension pack, same version as your installed version of VirtualBox!. - -![](http://linuxpitstop.com/wp-content/uploads/2016/06/12.png) - -You can also make use of below command to get the VBoxManage extension on your system - -``` -$ wget http://download.virtualbox.org/virtualbox/5.0.20/Oracle_VM_VirtualBox_Extension_Pack-5.0.20-106931.vbox-extpack -``` - -![](http://linuxpitstop.com/wp-content/uploads/2016/06/21.png) - -Run the below command to confirm that VBoxManage has been successfully installed. - -``` -$ VBoxManage list extpacks -``` - -![](http://linuxpitstop.com/wp-content/uploads/2016/06/31.png) - -### Using VBoxManage on Ubuntu 16.04 - -Now we are going to use VBoxManage to show you that how easily you can create and manage your virtual machines by using this utility from command line terminal. - -Let’s run the below command to create a virtual machine for Ubuntu OS. - -``` -# VBoxManage createvm --name Ubuntu16.04 --register -``` - -After executing this command it will create virtual machine called “Ubuntu16.vbox” in home folder under “VirtualBox VMs/Ubuntu16/Ubuntu16.04.vbox” . In the above command, “createvm” is used to create a virtual machine and “–name“ defines the name of the virtual machine while “registervm” command is used to register the virtual machine. - -Now, create the hard disk image for the virtual machine using the below command. - -``` -$ VBoxManage createhd --filename Ubuntu16.04 --size 5124 -``` - -Here “createhd” is used to create hard disk image and “–filename” is used to specify the virtual machine’s name, for which the hard disk image is created. Here, “–size” denotes the size of the hard disk image. The size is always given in MB. Here we have specified 5Gb that is 5124MB. - -Next we will set the OS type, if the Linux OS has to be installed, then specify the OS type as Linux or Ubuntu Or Fedora etc using below command. - -``` -$ VBoxManage modifyvm Ubuntu16.04 --ostype Ubuntu -``` - -Use below command to set the memory size for the virtual OS, i.e. the ram size for the virtual OS from the host Machine. - -``` -$ VBoxManage modifyvm Ubuntu10.10 --memory 512 -``` - -![](http://linuxpitstop.com/wp-content/uploads/2016/06/52.png) - -Now we are going to create a storage controller for the virtual machine by using below command. - -``` -$ VBoxManage storagectl Ubuntu16.04 --name IDE --add ide --controller PIIX4 --bootable on -``` - -Here in above command ‘storagectl’ is used to create a storage controller for virtual machine,’–name’ specifies the name of the storage controller that needs to be created, modified or removed from the virtual machine. Then ‘–add’ defines the type of system bus to which the storage controller must be connected. Its available options are ide/sata/scsi/floppy. The ‘–controller’ option allows to choose the type of chipset that is to be emulated for the given storage controller while its available options are LsiLogic / LSILogicSAS / BusLogic / IntelAhci / PIIX3 / PIIX4 / ICH6 / I82078. At the end ‘–bootable’ defines whether this controller is bootable or not. - -The above command creates the storage controller called IDE. Later the virtual media can be attached to the controller using ‘storageattach’ command. - -Now run below command to create a storage controller called SATA, that will be used to attach the hard disk image to this later. - -``` -$ VBoxManage storagectl Ubuntu16.04 --name SATA --add sata --controller IntelAhci --bootable on -``` - -Attach the previously created disk image as well as CD/DVD drive to the IDE controller. Ubuntu installation ISO image which is then inserted to the CD/DVD drive. Now, attach the storage controller to the virtual machine using ‘storageattach’ command. - -``` -$ VBoxManage storageattach Ubuntu16.04 --storagectl SATA --port 0 --device 0 --type hdd --medium "your_iso_filepath" -``` - -This will attach the storage controller SATA to virtual machine Ubuntu16.04 with the medium i.e., to the virtual disk image which is created. - -Run below commands to add some features like networking setup, audio, etc. - -``` -$ VBoxManage modifyvm Ubuntu10.10 --nic1 nat --nictype1 82540EM --cableconnected1 on -$ VBoxManage modifyvm Ubuntu10.10 --vram 128 --accelerate3d on --audio alsa --audiocontroller ac97 -``` - -Now, start the VM by using the below command by specifying the name of the VM that you wish to start. - -``` - $ VBoxManage startvm Ubuntu16.04 -``` - -A new window will be opened where you new VM be booted from your attached file. - -![](http://linuxpitstop.com/wp-content/uploads/2016/06/62.png) - -To stop the virtual machine , you can make use of the following command. - -``` -$ VBoxManage controlvm Ubuntu16.04 poweroff -``` - -The ‘controlvm’ command is used to control the state of the virtual machine. Some of the available options are pause / resume / reset / poweroff / savestate / acpipowerbutton / acpisleepbutton. There are many options in controlvm to see all the options available in it, run below command. - -``` -$VBoxManage controlvm -``` - -![](http://linuxpitstop.com/wp-content/uploads/2016/06/81.png) - -Conclusion - -In this article we have learned about an awesome tool of Oracle Virtual Box that is VBoxManage, that includes its installation and usage on Ubuntu 16.04 Operating system. The article includes a detailed instructions about its useful commands to create and manage your virtual machines using VBoxManage. Hope you find this much helpful, do not forget to share your comments or suggestions. - --------------------------------------------------------------------------------- - -via: http://linuxpitstop.com/install-and-use-command-line-tool-vboxmanage-on-ubuntu-16-04/ - -作者:[Kashif][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/kashif/ -[1]: https://www.virtualbox.org/wiki/Downloads diff --git a/translated/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md b/translated/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md new file mode 100644 index 0000000000..fec5b55c6c --- /dev/null +++ b/translated/tech/20160603 How To Install And Use VBoxManage On Ubuntu 16.04 And Use Its Command line Options.md @@ -0,0 +1,138 @@ +在 Ubuntu 16.04 上安装使用 VBoxManage 以及 VBoxManage 命令行选项的用法 +================= + +VirtualBox 拥有一套命令行工具,然后你可以使用 VirtualBox 的命令行界面 (CLI) 对远端无界面的服务器上的虚拟机进行管理操作。在这篇教程中,你将会学到如何在没有 GUI 的情况下使用 VBoxManage 创建、启动一个虚拟机。VBoxManage 是 VirtualBox 的命令行界面,你可以在你的主机操作系统的命令行中来用它实现对 VirtualBox 的所有操作。VBoxManage 拥有图形化用户界面所支持的全部功能,而且它支持的功能远不止这些。它提供虚拟引擎的所有功能,甚至包含 GUI 还不能实现的那些功能。如果你想尝试不同的用户界面而不仅仅是 GUI,或者更改虚拟机更多高级和实验性的配置,那么你就需要用到命令行。 + +当你想要在 VirtualBox 上创建或运行虚拟机时,你会发现 VBoxManage 非常有用,你只需要使用远程主机的终端就够了。这对于服务器来说是一种常见的情形,因为在服务器上需要进行虚拟机的远程操作。 + +### 准备工作 + +在开始使用 VBoxManage 的命令行工具前,确保在运行着 Ubuntu 16.04 的服务器上,你拥有超级用户的权限或者你能够使用 sudo 命令,而且你已经在服务器上安装了 Oracle Virtual Box。 然后你需要安装 VirtualBox 扩展包,这是运行远程桌面环境,访问无界面启动虚拟机所必须的。(headless的翻译拿不准,翻译为无界面启动) + +### 安装 VBoxManage + +通过 [Virtual Box Download Page][1] 这个链接,你能够获取你所需要的软件扩展包的最新版本,扩展包的版本和你安装的 VirtualBox 版本需要一致! + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/12.png) + +也可以用下面这条命令来获取 VBoxManage 扩展。 + +``` +$ wget http://download.virtualbox.org/virtualbox/5.0.20/Oracle_VM_VirtualBox_Extension_Pack-5.0.20-106931.vbox-extpack +``` + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/21.png) + +运行下面这条命令,确认 VBoxManage 已经成功安装在你的机器上。 + +``` +$ VBoxManage list extpacks +``` + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/31.png) + +### 在 Ubuntu 16.04 上使用 VBoxManage + +接下来我们将要使用 VBoxManage 向你展现通过命令行终端工具来新建和管理虚拟机是多么的简单。 + +运行下面的命令,新建一个将用来安装 Ubuntu 系统的虚拟机。 + +``` +# VBoxManage createvm --name Ubuntu16.04 --register +``` + +在运行了这条命令之后,VBoxMnage 将会新建一个叫 做“Ubuntu16.vbox” 的虚拟机,这个虚拟机的位置是家目录路径下的 “VirtualBox VMs/Ubuntu16/Ubuntu16.04.vbox”。在上面这条命令中,“createvm” 是用来新建虚拟机,“--name” 定义了虚拟机的名字,而 “registervm” 命令是用来注册虚拟机的。 + +现在,使用下面这条命令为虚拟机创建一个硬盘镜像。 + +``` +$ VBoxManage createhd --filename Ubuntu16.04 --size 5124 +``` + +这里,“createhd” 用来创建硬盘镜像,“--filename” 用来指定虚拟机的名称,也就是创建的硬盘镜像名称。“--size” 表示硬盘镜像的空间容量,空间容量的单位总是 MB。我们指定了 5Gb,也就是 5124 MB。 + +接下来我们需要设置操作系统类型,如果要安装 Linux 系的系统,那么用下面这条命令指定系统类型为 Linux 或者 Ubuntu 或者 Fedora 之类的。 + +``` +$ VBoxManage modifyvm Ubuntu16.04 --ostype Ubuntu +``` + +用下面这条命令来设置虚拟系统的内存大小,也就是从主机中分配到虚拟机系统的内存。 + +``` +$ VBoxManage modifyvm Ubuntu10.10 --memory 512 +``` + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/52.png) + +现在用下面这个命令为虚拟机创建一个存储控制器。 + +``` +$ VBoxManage storagectl Ubuntu16.04 --name IDE --add ide --controller PIIX4 --bootable on +``` + +这里的 “storagect1” 是给虚拟机创建存储控制器的,“--name” 指定了虚拟机里需要创建、更改或者移除的存储控制器的名称。“--add” 选项指明系统总线类型,可选的选项有 ide / sata / scsi / floppy,存储控制器必须要连接到系统总线。“--controller” 选择主板的类型,主板需要根据需要的存储控制器选择,可选的选项有 LsiLogic / LSILogicSAS / BusLogic / IntelAhci / PIIX3 / PIIX4 / ICH6 / I82078。最后的 “--bootable” 表示控制器是否可以引导。 + +上面的命令创建了叫做 IDE 的存储控制器。然后虚拟设备就能通过 “storageattach” 命令连接到控制器。 + +然后运行下面这个命令来创建一个叫做 SATA 的存储控制器,它将会连接到硬盘镜像上。 + +``` +$ VBoxManage storagectl Ubuntu16.04 --name SATA --add sata --controller IntelAhci --bootable on +``` + +将之前创建的硬盘镜像和 CD/DVD 驱动器加载到 IDE 控制器。将 Ubuntu 的安装光盘插到 CD/DVD 驱动器上。然后用 “storageattach” 命令连接存储控制器和虚拟机。 + +``` +$ VBoxManage storageattach Ubuntu16.04 --storagectl SATA --port 0 --device 0 --type hdd --medium "your_iso_filepath" +``` + +用媒体把 SATA 存储控制器连接到 Ubuntu16.04 虚拟机中,也就是之前创建的虚拟硬盘镜像里。 + +运行下面的命令添加像网络连接,音频之类的功能。 + +``` +$ VBoxManage modifyvm Ubuntu10.10 --nic1 nat --nictype1 82540EM --cableconnected1 on +$ VBoxManage modifyvm Ubuntu10.10 --vram 128 --accelerate3d on --audio alsa --audiocontroller ac97 +``` + +通过指定你想要启动虚拟机的名称,用下面这个命令启动虚拟机。 + +``` + $ VBoxManage startvm Ubuntu16.04 +``` + +然后会打开一个新窗口,新窗口里虚拟机通过关联文件中引导。 + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/62.png) + +你可以用接下来的命令来关掉虚拟机。 + +``` +$ VBoxManage controlvm Ubuntu16.04 poweroff +``` + +“controlvm” 命令用来控制虚拟机的状态,可选的选项有 pause / resume / reset / poweroff / savestate / acpipowerbutton / acpisleepbutton。controlvm 有很多选项,用下面这个命令来查看它支持的所有选项。 + +``` +$VBoxManage controlvm +``` + +![](http://linuxpitstop.com/wp-content/uploads/2016/06/81.png) + +完结! + +从这篇文章中,我们了解了 Oracle Virtual Box 中一个十分实用的工具,就是 VBoxManage,包含了 VBoxManage 的安装和在 Ubuntu 16.04 系统上的使用。文章包含详细的教程, 通过 VBoxManage 中实用的命令来创建和管理虚拟机。希望这篇文章对你有帮助,另外别忘了分享你的评论或者建议。 + +-------------------------------------------------------------------------------- + +via: http://linuxpitstop.com/install-and-use-command-line-tool-vboxmanage-on-ubuntu-16-04/ + +作者:[Kashif][a] +译者:[GitFuture](https://github.com/GitFuture) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://linuxpitstop.com/author/kashif/ +[1]: https://www.virtualbox.org/wiki/Downloads From 07a89269ec51c6bcf223dbf107e3340134413229 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 11 Jun 2016 11:14:17 +0800 Subject: [PATCH 1526/1710] PUB:20160218 A Linux-powered microwave oven @yuba0604 --- ...20160218 A Linux-powered microwave oven.md | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) rename {translated/tech => published}/20160218 A Linux-powered microwave oven.md (54%) diff --git a/translated/tech/20160218 A Linux-powered microwave oven.md b/published/20160218 A Linux-powered microwave oven.md similarity index 54% rename from translated/tech/20160218 A Linux-powered microwave oven.md rename to published/20160218 A Linux-powered microwave oven.md index 57aaace3a7..4b0c132694 100644 --- a/translated/tech/20160218 A Linux-powered microwave oven.md +++ b/published/20160218 A Linux-powered microwave oven.md @@ -1,9 +1,9 @@ -一个Linux驱动的微波炉 +一个 Linux 驱动的微波炉 ================================================================================ -[linux.conf.au](http://linux.conf.au/)里的人们都有一种想到什么就动手去实现的想法。随着硬件开源运动不断地发展壮大,这种想法越来越多,与现实世界联系的越来越紧密,而不仅仅存在于数字世界中。David Tulloh用他制作的[Linux驱动的微波炉 [WebM]](http://mirror.linux.org.au/linux.conf.au/2016/04_Thursday/D4.303_Costa_Theatre/Linux_driven_microwave.webm)来展示一个差劲的微波炉会多么难用以及说明他的项目可以改造这些微波炉使得它们不那么讨人厌。 +[linux.conf.au](http://linux.conf.au/)里的人们都有一种想到什么就动手去实现的想法。随着硬件开源运动不断地发展壮大,这种想法越来越多,也与现实世界联系的越来越紧密,而不仅仅存在于数字世界中。David Tulloh用他制作的[Linux驱动的微波炉 [WebM]](http://mirror.linux.org.au/linux.conf.au/2016/04_Thursday/D4.303_Costa_Theatre/Linux_driven_microwave.webm)来展示一个差劲的微波炉会多么难用,以及说明他的项目可以改造这些微波炉使得它们不那么讨人厌。 -Tulloh的故事要从他买到了一个公认很便宜的微波炉开始说起,它的用户界面比其它微波炉默认的还要糟糕。设定时间时必须使劲按按钮以至于把微波炉都向后推了一段距离——而事实上必须要用力拉仓门把手才能把微波炉拖回原来的位置,这形成了一个“优雅”的平衡。当然这只是极端情况。Tulloh很郁闷因为这个微波炉近十年来都没有一丁点明显的改善。他可能买到了一个又小又便宜的微波炉,而且特点是大部分人不研究使用手册就不会使用它——和智能手机的对比更加明显:智能手机只需知道一点点的操作指南并且被广泛使用。 +Tulloh的故事要从他买到了一个公认很便宜的微波炉开始说起,它的用户界面比其它微波炉默认的还要糟糕。设定时间时必须使劲按按钮以至于把微波炉都向后推了一段距离——而事实上必须要用力拉仓门把手才能把微波炉拖回原来的位置,这形成了一个“优雅”的平衡。当然这只是极端情况。Tulloh郁闷的是因为这个微波炉近十年来都没有一丁点明显的改善。他可能买到了一个又小又便宜的微波炉,而且特点是大部分人不研究使用手册就不会使用它——和智能手机的对比更加明显:智能手机只需知道一点点的操作指南并且被广泛使用。 改造这个微波炉不一定没有前途,“让微波炉重获新生”——这个想法成为了一个原型,如果Tulloh可以再平衡一下想做的功能和需求之间的关系的话他希望这变成一个众筹项目:一个Linux驱动的微波炉。 @@ -11,35 +11,29 @@ Tulloh的故事要从他买到了一个公认很便宜的微波炉开始说起 ## 加一点新奇的小玩意 +如果把“Linux”和“微波炉”联系在一起的话,你可能会想到给微波炉加上一个智能手机式的触摸屏和网络链接,然后再通过社区做一款微波炉的“革命性”的手机应用,想到这些就像做菜想到分享食谱一样显而易见。但Tulloh的目标和他的原型远远超过这些,他做了两个新奇的功能——热感相机和称量物体质量的称重装置。 +这个热感相机提供一个可以精确到两度的八乘八像素的图像,这足够发现一杯牛奶是否加热到沸腾或者牛排是否解冻到快不能用来烹饪。不论发生哪种情况,都可以减小功率或者关掉它。而且在必要的时候会发出警报。这可能不是第一个可以检测温度的微波炉——GE在十年前就开始卖带温度探针的微波炉了——但是一个一直工作的内置传感器比一个手工探针有用多了,尤其是有一个可用的API支持的时候。 -如果你把“Linux”和“微波炉”联系在一起的话就可能想到给微波炉加上一个智能手机式的触摸屏和网络链接,然后再通过社区做一款微波炉的“革命性”的手机应用,想到这些就像做菜想到分享食谱一样显而易见。但Tulloh的目标和他的原型远远超过这些,他做了两个新奇的功能——热感相机和称量物体质量的称重装置。 +第二个新发明是一个嵌入的称重装置,它可以在加热之前称量食物(和容器)。很多食谱根据质量大小给出指导的烹饪时间,很多微波炉支持你手动输入质量以便它帮你计算。利用内置的称重装置,这一过程可以变成自动化的。在许多微波炉的转盘下面稳固地放置一个称重装置是一个机械方面的挑战,不过Tulloh觉得这个问题不难处理。相反,他对微波炉的设计是基于“平板”或者“平板挂车”的风格——在四角各放置一个传感器,这不仅在机械实现上很简单而且很好的达到了要求。 -这个热感相机提供一个精确度两自由度的八乘八像素的图片,这足够发现一杯牛奶是否加热到沸腾或者牛排是否解冻到快不能用来烹饪。不论发生哪种情况,功率都可以减小或者关掉。而且在必要的时候会发出警报。这可能不是第一个可以检测温度的微波炉——GE在十年前就开始卖带温度探针的微波炉了——但是一个一直工作的内置传感器比一个手工探针有用多了尤其是有一个可用的API支持的时候。 - -第二个新发明是一个嵌入的称重装置,它可以在加热之前称量食物(和容器)。很多食谱根据质量给出指导的烹饪时间,很多微波炉支持你手动输入质量以便它帮你计算。利用内置的称重装置,这一过程可以变成自动化的。在许多微波炉的转盘下面稳固地放置一个称重装置是一个机械方面的挑战不过Tulloh觉得这个问题不难处理。反而他对微波炉的设计是基于“平板”或者“平板挂车”的风格——在四角各放置一个传感器,这不仅在机械实现上很简单而且很好的达到了要求。 - - -[用户界面] -一旦你有了这些额外添加的并与逻辑引擎相连的质量温度传感器,你可以去尝试更多好玩的可能。一杯刚从冰箱里拿出来的冰牛奶的质量温度分布可能会有适度误差。Tulloh发现这种情况可以被检测到而且提供一些有关的像“煮沸”或者“加热”的选项也是容易做到的(下面有一个模拟的界面,可点击操作的版本请点击右边链接 [here](http://mwgui.tulloh.id.au/)) +一旦你有了这些额外添加的并与逻辑引擎相连的质量温度传感器,你可以去尝试更多好玩的可能。一杯刚从冰箱里拿出来的冰牛奶的质量温度分布可能会有适度误差。Tulloh发现可以监检测到这种情况,而且提供一些有关的像“煮沸”或者“加热”的选项也是容易做到的(下面有一个模拟的界面,可点击操作的版本请点击右边链接 [here](http://mwgui.tulloh.id.au/)) ![](https://static.lwn.net/images/2016/lca-ovengui-sm.png) ## 改造陈旧的东西 -除了才开发出来的新功能,Tulloh还想要提升那些原本就提供的功能。可能不是所有微波炉的门把手都像Tulloh那个廉价的一样僵硬,但是很少有微波炉将把手设计的让残疾人也能轻松使用。这些缺陷都是可调整的,尤其是在美国,微波炉应该在仓门关闭的时候给出一个确定关闭的提示。这种确认必须是可靠的以预防那些伪劣产品,所以在仓门闭合时固定的槽位里添加一个短杆以确认仓门开闭状态,不误使微波炉在仓门开着的时候工作。事实上,必须要两个相互联系的机关,如果他们提供的结果不一致, -保险丝必须断开以便启动一个呼叫服务。Tulloh认为提供一个磁力门闩有更大的灵活性(包含简单的软件控制)并且像磁控也同样用于[磁性钥匙锁](https://en.wikipedia.org/wiki/Magnetic_keyed_lock),它可以让磁力门闩确认微波炉门是否关闭。 +除了才开发出来的新功能,Tulloh还想要提升那些原本就提供的功能。可能不是所有微波炉的门把手都像Tulloh那个廉价的一样僵硬,但是很少有微波炉将把手设计的让残疾人也能轻松使用。这些缺陷都是可调整的,尤其是在美国,微波炉应该在仓门关闭的时候给出一个确定关闭的提示。这种确认必须是可靠的以预防那些伪劣产品,所以在仓门闭合时固定的槽位里添加一个短杆以确认仓门开闭状态,不至于误使微波炉在仓门开着的时候工作。事实上,必须要有两个相互联系的机关,如果他们提供的结果不一致,保险丝必须断开以便启动一个呼叫服务。Tulloh认为提供一个磁力门闩有更大的灵活性(包含简单的软件控制)并且像磁控也同样用于[磁性钥匙锁](https://en.wikipedia.org/wiki/Magnetic_keyed_lock),它可以让磁力门闩确认微波炉门是否关闭。 微波炉的另一个痛点是它会发出令人厌烦的声音。Tulloh去掉了蜂鸣器并且使用香蕉派(类似于树莓派的单片机开发板)控制他的微波炉。这可以通过一个把文本转换成语音的系统来用令人愉悦而且可配置的警报来提示和引导使用者。显然,下一步就是装上一个用来控制声音的扩音器。 - -许多微波炉除了定时和设置功率档位之外还可以做更多的事情——它们为烹饪,加热,化冻等提供一系列的功率谱。加上一个精确的温度测量装置感觉会为这个图表大大扩展它们的序列。Andrew Tridgell对一个问题很好奇,加热巧克力——一个需要非常精确的温度控制的过程——是否是可能的。Tulloh没有过这方面的经验,他不敢保证这个一定可以,但是这个实验结果的确值得期待。即使没做成这件事,它也显出了潜在价值——社区接下来可以更进一步去做这件事。 +许多微波炉除了定时和设置功率档位之外还可以做更多的事情——它们为烹饪,加热,化冻等提供一系列的功率档位。加上一个精确的温度测量装置感觉会为这个图表大大扩展这个列表。Andrew Tridgell对一个问题很好奇,加热巧克力——一个需要非常精确的温度控制的过程——是否是可能的。Tulloh没有过这方面的经验,他不敢保证这个一定可以,但是这个实验结果的确值得期待。即使没做成这件事,它也显出了潜在价值——社区接下来可以更进一步去做这件事。 ## 实用性怎么样? Tulloh十分乐意向全世界分享这个linux驱动的微波炉,他希望看到(因为这件事)形成一个社区并且想看到它接下来的走势。买一个现成的微波炉并且替换掉里面的电子元件看起来不是一个可行的点子。最后的结果可能会很糟,而买一个小巧智能的微波炉必然要花掉(比自己改造)更多的钱,但是潜在的顾客不想在他们的厨房里看到乱七八糟又不协调的东西。 -许多零件都是现成的可以买到的(磁电管,处理器板,热传感器等等),像USB接口的热传感器,而且都很容易安装。软件原型当然也开源在[GitHub](https://github.com/lod?tab=repositories)。这个样例和微波炉门有不小的挑战性并且很可能要定制。Tulloh想要通过提供左侧开仓门的微波炉和颜色多样化的选项来转逆境为机遇。 +许多零件都是现成的可以买到的(磁电管,处理器板,热传感器等等),像USB接口的热传感器,而且都很容易安装。软件原型当然也开源在[GitHub](https://github.com/lod?tab=repositories)。微波炉的舱室和门有不小的挑战性并且很可能要定制。Tulloh想要通过提供左侧开仓门的微波炉和颜色多样化的选项来转逆境为机遇。 一个对读者的快速调查:很少有人会贸然承诺他会为了一个全新的升级过的烤箱付出1000澳大利亚元。当然,很难知道是否会有充足的时间和足够多的读者来完成这个调查。这整个项目看起来很有趣。所以Tulloh的[博客](http://david.tulloh.id.au/category/microwave/) (点击这里)也很值得一看。 @@ -48,8 +42,6 @@ Tulloh十分乐意向全世界分享这个linux驱动的微波炉,他希望看 via: https://lwn.net/Articles/674877/ 作者:Neil Brown -译者:yuba0604(https://github.com/yuba0604) - -译者水平有限,敬请指正。(lizhengyu@gmail.com) +译者:[yuba0604](https://github.com/yuba0604) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 0fe147146553e2f6137974c3307633c40791fbe6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 11 Jun 2016 11:28:07 +0800 Subject: [PATCH 1527/1710] PUB:20160218 Top 4 open source issue tracking tools @wyangsun --- ...218 Top 4 open source issue tracking tools.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20160218 Top 4 open source issue tracking tools.md (68%) diff --git a/translated/tech/20160218 Top 4 open source issue tracking tools.md b/published/20160218 Top 4 open source issue tracking tools.md similarity index 68% rename from translated/tech/20160218 Top 4 open source issue tracking tools.md rename to published/20160218 Top 4 open source issue tracking tools.md index 1ffd21a759..03435d1913 100644 --- a/translated/tech/20160218 Top 4 open source issue tracking tools.md +++ b/published/20160218 Top 4 open source issue tracking tools.md @@ -1,13 +1,13 @@ -开源问题跟踪管理工具Top4 +4 个顶级的开源问题跟踪管理工具 ======================================== 生活充满了bug。 -无论怎样小心计划,无论花多少时间去设计,在执行阶段当轮胎压在路上,任何工程都会有未知的问题。也无妨。也许对于任何一个组织的最佳弹性衡量不是他们如何一切都按计划运行地处理事情,而是,当出现磕磕碰碰时他们如何驾驭。 +无论怎样小心计划,无论花多少时间去设计,在执行阶段实际执行时,任何工程都会有未知的问题。也无妨。也许对于任何一个组织的最佳弹性衡量不是他们如何一切都按计划运行地处理事情,而是,当出现磕磕碰碰时他们如何驾驭。 对任何一个项目管理流程来说,特别是在软件开发领域,都需要一个关键工具——问题跟踪管理系统。其基本功能很简单:可以对bug进行查看、追踪,并以协作的方式解决bug,有了它,我们更容易跟随整个过程的进展。除了基本功能,还有很多专注于满足特定需求的选项及功能,使用场景不仅限于软件开发。你可能已经熟悉某些托管版本的工具,像 [GitHub Issues](https://guides.github.com/features/issues/)或者[Launchpad](https://launchpad.net/),其中一些工具已经有了自己的开源社区。 -接下来,这四个bug问题跟踪管理软件的极佳备选,全部开源、易于下载,自己就可以部署。先说好,我们可能没有办法在这里列出每一个问题跟踪工具;相反,我们列出这四个,基于的是其丰富的功能和项目背后的社区规模。当然,肯定还有其他类似软件,如果你喜欢的没有列在这里,如果你有一个好的理由,一定要让我们知道,在下面的评论中使它脱颖而出吧。 +接下来,这四个bug问题跟踪管理软件的极佳备选,全部开源、易于下载,自己就可以部署。先说好,我们可能没有办法在这里列出每一个问题跟踪工具;相反,我们列出这四个,原因基于是其丰富的功能和项目背后的社区规模。当然,肯定还有其他类似软件,如果你喜欢的没有列在这里,如果你有一个好的理由,一定要让我们知道,在下面的评论中使它脱颖而出吧。 ## Redmine @@ -15,7 +15,7 @@ Redmine的设置相当灵活,支持多种数据库后端和几十种语言,还是可定制的,可以向问题(issue)、用户、工程等添加自定义字段。通过社区创建的插件和主题它可以进一步定制。 -如果你想试一试,一个[在线演示](http://demo.redmine.org/)可提供使用。Redmine在开源[GPL版本2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)下许可;开源代码可以在工程的[svn仓库](https://svn.redmine.org/redmine)或在[GitHub](https://github.com/redmine/redmine)镜像上找到。 +如果你想试一试,一个[在线演示](http://demo.redmine.org/)可提供使用。Redmine采用[GPL版本2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)许可证;开源代码可以在工程的[svn仓库](https://svn.redmine.org/redmine)或在[GitHub](https://github.com/redmine/redmine)镜像上找到。 ![](https://opensource.com/sites/default/files/images/business-uploads/issues-redmine.png) @@ -25,7 +25,7 @@ Redmine的设置相当灵活,支持多种数据库后端和几十种语言, 从通知到重复bug检测再到搜索共享,Bugzilla拥有许多高级工具,是一个功能更丰富的选项。Bugzilla拥有一套高级搜索系统以及全面的报表工具,具有生成图表和自动化按计划生成报告的能力。像Redmine一样,Bugzilla是可扩展和可定制的,除了字段本身,还能针对bug创建自定义工作流。它也支持多种后端数据库,和自带的多语言支持。 -Bugzilla在[Mozilla公共许可证](https://en.wikipedia.org/wiki/Mozilla_Public_License)下许可,你可以读取他们的[未来路线图](https://www.bugzilla.org/status/roadmap.html)还有在官网尝试一个[示例服务](https://landfill.bugzilla.org/) +Bugzilla采用[Mozilla公共许可证](https://en.wikipedia.org/wiki/Mozilla_Public_License),你可以读取他们的[未来路线图](https://www.bugzilla.org/status/roadmap.html)还有在官网尝试一个[示例服务](https://landfill.bugzilla.org/) ![](https://opensource.com/sites/default/files/images/business-uploads/issues-bugzilla.png) @@ -35,7 +35,7 @@ Bugzilla在[Mozilla公共许可证](https://en.wikipedia.org/wiki/Mozilla_Public 由python编写的Trac,将其漏洞跟踪能力与它的wiki系统和版本控制系统轻度整合。项目管理能力突出,如生成里程碑和路线图,一个可定制的报表系统,大事记,支持多资源库,内置的垃圾邮件过滤,还可以使用很多通用语言。如其他我们已经看到的漏洞追踪软件,有很多插件可进一步扩展其基本特性。 -Trac是在改进的[BSD许可](http://trac.edgewall.org/wiki/TracLicense)下获得开放源码许可,虽然更老的版本发布在GPL下。你可以在一个[自托管仓库](http://trac.edgewall.org/browser)预览Trac的源码或者查看他们的[路线图](http://trac.edgewall.org/wiki/TracRoadmap)对未来的规划。 +Trac以[改进的BSD许可协议](http://trac.edgewall.org/wiki/TracLicense)开源,虽然更老的版本发布在GPL下。你可以在一个[自托管仓库](http://trac.edgewall.org/browser)预览Trac的源码或者查看他们的[路线图](http://trac.edgewall.org/wiki/TracRoadmap)对未来的规划。 ![](https://opensource.com/sites/default/files/images/business-uploads/issues-trac.png) @@ -43,11 +43,11 @@ Trac是在改进的[BSD许可](http://trac.edgewall.org/wiki/TracLicense)下获 [Mantis](https://www.mantisbt.org/)是这次合集中我们将看到的最后一个工具,基于PHP,且有16年历史。作为另一个支持多种不同版本控制系统和事件驱动通知系统的bug跟踪管理软件,Mantis有一个与其他工具类似的功能设置。虽然它不本身包含wiki,但它整合了很多流行的wiki平台且本地化到多种语言。 -Mantis在[GPL版本2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)下获得开源许可证书;你可以在[GitHub](https://github.com/mantisbt/mantisbt)浏览他的源代码或查看自托管[路线图](https://www.mantisbt.org/bugs/roadmap_page.php?project=mantisbt&version=1.3.x)对未来的规划。一个示例,你可以查看他们的内部[漏洞跟踪](https://www.mantisbt.org/bugs/my_view_page.php)。 +Mantis使用[GPL版本2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)开源许可证书;你可以在[GitHub](https://github.com/mantisbt/mantisbt)浏览他的源代码或查看自托管[路线图](https://www.mantisbt.org/bugs/roadmap_page.php?project=mantisbt&version=1.3.x)对未来的规划。一个示例,你可以查看他们的内部[漏洞跟踪](https://www.mantisbt.org/bugs/my_view_page.php)。 ![](https://opensource.com/sites/default/files/images/business-uploads/issues-mantis.png) -正如我们指出的,这四个不是唯一的选项。想要探索更多?[Apache Bloodhound](https://issues.apache.org/bloodhound/),[Fossil](http://fossil-scm.org/index.html/doc/trunk/www/index.wiki),[The Bug Genie](http://www.thebuggenie.com/),还有很多可替换品都有专注的追随者,每个都有不同的优点和缺点。另外,一些工具在我们[项目管理](https://opensource.com/business/15/1/top-project-management-tools-2015)摘要有问题跟踪功能。所以,哪个是你首选的跟踪和碾压bug的工具? +正如我们指出的,这四个不是唯一的选项。想要探索更多?[Apache Bloodhound](https://issues.apache.org/bloodhound/),[Fossil](http://fossil-scm.org/index.html/doc/trunk/www/index.wiki),[The Bug Genie](http://www.thebuggenie.com/),还有很多可替换品都有自己的忠实追随者,每个都有不同的优点和缺点。另外,一些工具在我们[项目管理](https://opensource.com/business/15/1/top-project-management-tools-2015)摘要有问题跟踪功能。所以,哪个是你首选的跟踪和碾压bug的工具? ------------------------------------------------------------------------------ From 93be2e9320d87459872b485cf2d90fc8136d06f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E5=AE=B6=E6=9C=AA?= Date: Sun, 12 Jun 2016 11:42:54 +0800 Subject: [PATCH 1528/1710] =?UTF-8?q?Translating=20by=20GitFuture=20?= =?UTF-8?q?=E3=80=9020160602=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md --- ...nt your Google Drive on Linux with google-drive-ocamlfuse.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md b/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md index f043e2e92b..25fcda37d8 100644 --- a/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md +++ b/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md @@ -1,3 +1,5 @@ +Translating by GitFuture + How to mount your Google Drive on Linux with google-drive-ocamlfuse ======================================================================== From b27122b38027aa6bf04f1c9fe45a2965350dac90 Mon Sep 17 00:00:00 2001 From: "Fuliang.Li" Date: Sun, 12 Jun 2016 15:49:15 +0800 Subject: [PATCH 1529/1710] =?UTF-8?q?[=E5=BC=80=E5=A7=8B=E7=BF=BB=E8=AF=91?= =?UTF-8?q?]=20Linux=20vs.=20Windows=20device=20driver=20model=20:=20archi?= =?UTF-8?q?tecture,=20APIs=20and=20build=20environment=20comparison?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talk/20160531 Linux vs. Windows device driver model.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20160531 Linux vs. Windows device driver model.md b/sources/talk/20160531 Linux vs. Windows device driver model.md index 2eda1e6927..9def01085b 100644 --- a/sources/talk/20160531 Linux vs. Windows device driver model.md +++ b/sources/talk/20160531 Linux vs. Windows device driver model.md @@ -1,3 +1,5 @@ +GHLandy Translating + Linux vs. Windows device driver model : architecture, APIs and build environment comparison ============================================================================================ @@ -177,7 +179,7 @@ Download this article as ad-free PDF (made possible by [your kind donation][2]): via: http://xmodulo.com/linux-vs-windows-device-driver-model.html 作者:[Dennis Turpitka][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GHLandy](https://github.com/GHLandy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 22254bbc90d60639978a0c712d5fb4889bcd5c07 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 12 Jun 2016 21:22:39 +0800 Subject: [PATCH 1530/1710] =?UTF-8?q?=E6=81=A2=E5=A4=8D=20LFCS=2012/13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @willowyoung ,切勿提交非相关的文件 @oska874 --- ...Installed Help Documentations and Tools.md | 180 +++++++++++++++++ ...leshoot Grand Unified Bootloader (GRUB).md | 185 ++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 sources/tech/LFCS/Part 12 - How to Explore Linux with Installed Help Documentations and Tools.md create mode 100644 sources/tech/LFCS/Part 13 - How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md diff --git a/sources/tech/LFCS/Part 12 - How to Explore Linux with Installed Help Documentations and Tools.md b/sources/tech/LFCS/Part 12 - How to Explore Linux with Installed Help Documentations and Tools.md new file mode 100644 index 0000000000..45ccb57f95 --- /dev/null +++ b/sources/tech/LFCS/Part 12 - How to Explore Linux with Installed Help Documentations and Tools.md @@ -0,0 +1,180 @@ +Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools +================================================================================== + +Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Explore-Linux-with-Documentation-and-Tools.png) +>LFCS: Explore Linux with Installed Documentations and Tools – Part 12 + +Once you get used to working with the command line and feel comfortable doing so, you realize that a regular Linux installation includes all the documentation you need to use and configure the system. + +Another good reason to become familiar with command line help tools is that in the [LFCS][3] and [LFCE][4] exams, those are the only sources of information you can use – no internet browsing and no googling. It’s just you and the command line. + +For that reason, in this article we will give you some tips to effectively use the installed docs and tools in order to prepare to pass the **Linux Foundation Certification** exams. + +### Linux Man Pages + +A man page, short for manual page, is nothing less and nothing more than what the word suggests: a manual for a given tool. It contains the list of options (with explanation) that the command supports, and some man pages even include usage examples as well. + +To open a man page, use the **man command** followed by the name of the tool you want to learn more about. For example: + +``` +# man diff +``` + +will open the manual page for `diff`, a tool used to compare text files line by line (to exit, simply hit the q key.). + +Let’s say we want to compare two text files named `file1` and `file2` in Linux. These files contain the list of packages that are installed in two Linux boxes with the same distribution and version. + +Doing a `diff` between `file1` and `file2` will tell us if there is a difference between those lists: + +``` +# diff file1 file2 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Compare-Two-Text-Files-in-Linux.png) +>Compare Two Text Files in Linux + +where the `<` sign indicates lines missing in `file2`. If there were lines missing in `file1`, they would be indicated by the `>` sign instead. + +On the other hand, **7d6** means line **#7** in file should be deleted in order to match `file2` (same with **24d22** and **41d38**), and 65,67d61 tells us we need to remove lines **65** through **67** in file one. If we make these corrections, both files will then be identical. + +Alternatively, you can display both files side by side using the `-y` option, according to the man page. You may find this helpful to more easily identify missing lines in files: + +``` +# diff -y file1 file2 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Compare-and-List-Difference-of-Two-Files.png) +>Compare and List Difference of Two Files + +Also, you can use `diff` to compare two binary files. If they are identical, `diff` will exit silently without output. Otherwise, it will return the following message: “**Binary files X and Y differ**”. + +### The –help Option + +The `--help` option, available in many (if not all) commands, can be considered a short manual page for that specific command. Although it does not provide a comprehensive description of the tool, it is an easy way to obtain information on the usage of a program and a list of its available options at a quick glance. + +For example, + +``` +# sed --help +``` + +shows the usage of each option available in sed (the stream editor). + +One of the classic examples of using `sed` consists of replacing characters in files. Using the `-i` option (described as “**edit files in place**”), you can edit a file without opening it. If you want to make a backup of the original contents as well, use the `-i` option followed by a SUFFIX to create a separate file with the original contents. + +For example, to replace each occurrence of the word `Lorem` with `Tecmint` (case insensitive) in `lorem.txt` and create a new file with the original contents of the file, do: + +``` +# less lorem.txt | grep -i lorem +# sed -i.orig 's/Lorem/Tecmint/gI' lorem.txt +# less lorem.txt | grep -i lorem +# less lorem.txt.orig | grep -i lorem +``` + +Please note that every occurrence of `Lorem` has been replaced with `Tecmint` in `lorem.txt`, and the original contents of `lorem.txt` has been saved to `lorem.txt.orig`. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Replace-A-String-in-File.png) +>Replace A String in Files + +### Installed Documentation in /usr/share/doc + +This is probably my favorite pick. If you go to `/usr/share/doc` and do a directory listing, you will see lots of directories with the names of the installed tools in your Linux system. + +According to the [Filesystem Hierarchy Standard][5], these directories contain useful information that might not be in the man pages, along with templates and configuration files to make configuration easier. + +For example, let’s consider `squid-3.3.8` (version may vary from distribution to distribution) for the popular HTTP proxy and [squid cache server][6]. + +Let’s `cd` into that directory: + +``` +# cd /usr/share/doc/squid-3.3.8 +``` + +and do a directory listing: + +``` +# ls +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/List-Files-in-Linux.png) +>Linux Directory Listing with ls Command + +You may want to pay special attention to `QUICKSTART` and `squid.conf.documented`. These files contain an extensive documentation about Squid and a heavily commented configuration file, respectively. For other packages, the exact names may differ (as **QuickRef** or **00QUICKSTART**, for example), but the principle is the same. + +Other packages, such as the Apache web server, provide configuration file templates inside `/usr/share/doc`, that will be helpful when you have to configure a standalone server or a virtual host, to name a few cases. + +### GNU info Documentation + +You can think of info documents as man pages on steroids. As such, they not only provide help for a specific tool, but also they do so with hyperlinks (yes, hyperlinks in the command line!) that allow you to navigate from a section to another using the arrow keys and Enter to confirm. + +Perhaps the most illustrative example is: + +``` +# info coreutils +``` + +Since coreutils contains the [basic file, shell and text manipulation utilities][7] which are expected to exist on every operating system, you can reasonably expect a detailed description for each one of those categories in info **coreutils**. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Info-Coreutils.png) +>Info Coreutils + +As it is the case with man pages, you can exit an info document by pressing the `q` key. + +Additionally, GNU info can be used to display regular man pages as well when followed by the tool name. For example: + +``` +# info tune2fs +``` + +will return the man page of **tune2fs**, the ext2/3/4 filesystems management tool. + +And now that we’re at it, let’s review some of the uses of **tune2fs**: + +Display information about the filesystem on top of **/dev/mapper/vg00-vol_backups**: + +``` +# tune2fs -l /dev/mapper/vg00-vol_backups +``` + +Set a filesystem volume name (Backups in this case): + +``` +# tune2fs -L Backups /dev/mapper/vg00-vol_backups +``` + +Change the check intervals and `/` or mount counts (use the `-c` option to set a number of mount counts and `/` or the `-i` option to set a check interval, where **d=days, w=weeks, and m=months**). + +``` +# tune2fs -c 150 /dev/mapper/vg00-vol_backups # Check every 150 mounts +# tune2fs -i 6w /dev/mapper/vg00-vol_backups # Check every 6 weeks +``` + +All of the above options can be listed with the `--help` option, or viewed in the man page. + +### Summary + +Regardless of the method that you choose to invoke help for a given tool, knowing that they exist and how to use them will certainly come in handy in the exam. Do you know of any other tools that can be used to look up documentation? Feel free to share with the Tecmint community using the form below. + +Questions and other comments are more than welcome as well. + +-------------------------------------------------------------------------------- + +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/installing-network-services-and-configuring-services-at-system-boot/ +[3]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[4]: http://www.tecmint.com/installing-network-services-and-configuring-services-at-system-boot/ +[5]: http://www.tecmint.com/linux-directory-structure-and-important-files-paths-explained/ +[6]: http://www.tecmint.com/configure-squid-server-in-linux/ +[7]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[8]: diff --git a/sources/tech/LFCS/Part 13 - How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md b/sources/tech/LFCS/Part 13 - How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md new file mode 100644 index 0000000000..cf24c51b58 --- /dev/null +++ b/sources/tech/LFCS/Part 13 - How to Configure and Troubleshoot Grand Unified Bootloader (GRUB).md @@ -0,0 +1,185 @@ +Part 13 - LFCS: How to Configure and Troubleshoot Grand Unified Bootloader (GRUB) +===================================================================================== + +Because of the changes in the LFCS exam requirements effective Feb. 2, 2016, we are adding the necessary topics to the [LFCS series][1] published here. To prepare for this exam, your are highly encouraged to use the [LFCE series][2] as well. + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Configure-Troubleshoot-Grub-Boot-Loader.png) +>LFCS: Configure and Troubleshoot Grub Boot Loader – Part 13 + +In this article we will introduce you to GRUB and explain why a boot loader is necessary, and how it adds versatility to the system. + +The [Linux boot process][3] from the time you press the power button of your computer until you get a fully-functional system follows this high-level sequence: + +* 1. A process known as **POST** (**Power-On Self Test**) performs an overall check on the hardware components of your computer. +* 2. When **POST** completes, it passes the control over to the boot loader, which in turn loads the Linux kernel in memory (along with **initramfs**) and executes it. The most used boot loader in Linux is the **GRand Unified Boot loader**, or **GRUB** for short. +* 3. The kernel checks and accesses the hardware, and then runs the initial process (mostly known by its generic name “**init**”) which in turn completes the system boot by starting services. + +In Part 7 of this series (“[SysVinit, Upstart, and Systemd][4]”) we introduced the [service management systems and tools][5] used by modern Linux distributions. You may want to review that article before proceeding further. + +### Introducing GRUB Boot Loader + +Two major **GRUB** versions (**v1** sometimes called **GRUB Legacy** and **v2**) can be found in modern systems, although most distributions use **v2** by default in their latest versions. Only **Red Hat Enterprise Linux 6** and its derivatives still use **v1** today. + +Thus, we will focus primarily on the features of **v2** in this guide. + +Regardless of the **GRUB** version, a boot loader allows the user to: + +* 1). modify the way the system behaves by specifying different kernels to use, +* 2). choose between alternate operating systems to boot, and +* 3). add or edit configuration stanzas to change boot options, among other things. + +Today, **GRUB** is maintained by the **GNU** project and is well documented in their website. You are encouraged to use the [GNU official documentation][6] while going through this guide. + +When the system boots you are presented with the following **GRUB** screen in the main console. Initially, you are prompted to choose between alternate kernels (by default, the system will boot using the latest kernel) and are allowed to enter a **GRUB** command line (with `c`) or edit the boot options (by pressing the `e` key). + +![](http://www.tecmint.com/wp-content/uploads/2016/03/GRUB-Boot-Screen.png) +>GRUB Boot Screen + +One of the reasons why you would consider booting with an older kernel is a hardware device that used to work properly and has started “acting up” after an upgrade (refer to [this link][7] in the AskUbuntu forums for an example). + +The **GRUB v2** configuration is read on boot from `/boot/grub/grub.cfg` or `/boot/grub2/grub.cfg`, whereas `/boot/grub/grub.conf` or `/boot/grub/menu.lst` are used in **v1**. These files are NOT to be edited by hand, but are modified based on the contents of `/etc/default/grub` and the files found inside `/etc/grub.d`. + +In a **CentOS 7**, here’s the configuration file that is created when the system is first installed: + +``` +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" +GRUB_DEFAULT=saved +GRUB_DISABLE_SUBMENU=true +GRUB_TERMINAL_OUTPUT="console" +GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet" +GRUB_DISABLE_RECOVERY="true" +``` + +In addition to the online documentation, you can also find the GNU GRUB manual using info as follows: + +``` +# info grub +``` + +If you’re interested specifically in the options available for /etc/default/grub, you can invoke the configuration section directly: + +``` +# info -f grub -n 'Simple configuration' +``` + +Using the command above you will find out that `GRUB_TIMEOUT` sets the time between the moment when the initial screen appears and the system automatic booting begins unless interrupted by the user. When this variable is set to `-1`, boot will not be started until the user makes a selection. + +When multiple operating systems or kernels are installed in the same machine, `GRUB_DEFAULT` requires an integer value that indicates which OS or kernel entry in the GRUB initial screen should be selected to boot by default. The list of entries can be viewed not only in the splash screen shown above, but also using the following command: + +### In CentOS and openSUSE: + +``` +# awk -F\' '$1=="menuentry " {print $2}' /boot/grub2/grub.cfg +``` + +### In Ubuntu: + +``` +# awk -F\' '$1=="menuentry " {print $2}' /boot/grub/grub.cfg +``` + +In the example shown in the below image, if we wish to boot with the kernel version **3.10.0-123.el7.x86_64** (4th entry), we need to set `GRUB_DEFAULT` to `3` (entries are internally numbered beginning with zero) as follows: + +``` +GRUB_DEFAULT=3 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Boot-System-with-Old-Kernel-Version.png) +>Boot System with Old Kernel Version + +One final GRUB configuration variable that is of special interest is `GRUB_CMDLINE_LINUX`, which is used to pass options to the kernel. The options that can be passed through GRUB to the kernel are well documented in the [Kernel Parameters file][8] and in [man 7 bootparam][9]. + +Current options in my **CentOS 7** server are: + +``` +GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet" +``` + +Why would you want to modify the default kernel parameters or pass extra options? In simple terms, there may be times when you need to tell the kernel certain hardware parameters that it may not be able to determine on its own, or to override the values that it would detect. + +This happened to me not too long ago when I tried **Vector Linux**, a derivative of **Slackware**, on my 10-year old laptop. After installation it did not detect the right settings for my video card so I had to modify the kernel options passed through GRUB in order to make it work. + +Another example is when you need to bring the system to single-user mode to perform maintenance tasks. You can do this by appending the word single to `GRUB_CMDLINE_LINUX` and rebooting: + +``` +GRUB_CMDLINE_LINUX="vconsole.keymap=la-latin1 rd.lvm.lv=centos_centos7-2/swap crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_centos7-2/root rhgb quiet single" +``` + +After editing `/etc/defalt/grub`, you will need to run `update-grub` (Ubuntu) or `grub2-mkconfig -o /boot/grub2/grub.cfg` (**CentOS** and **openSUSE**) afterwards to update `grub.cfg` (otherwise, changes will be lost upon boot). + +This command will process the boot configuration files mentioned earlier to update `grub.cfg`. This method ensures changes are permanent, while options passed through GRUB at boot time will only last during the current session. + +### Fixing Linux GRUB Issues + +If you install a second operating system or if your GRUB configuration file gets corrupted due to human error, there are ways you can get your system back on its feet and be able to boot again. + +In the initial screen, press `c` to get a GRUB command line (remember that you can also press `e` to edit the default boot options), and use help to bring the available commands in the GRUB prompt: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Fix-Grub-Issues-in-Linux.png) +>Fix Grub Configuration Issues in Linux + +We will focus on **ls**, which will list the installed devices and filesystems, and we will examine what it finds. In the image below we can see that there are 4 hard drives (`hd0` through `hd3`). + +Only `hd0` seems to have been partitioned (as evidenced by msdos1 and msdos2, where 1 and 2 are the partition numbers and msdos is the partitioning scheme). + +Let’s now examine the first partition on `hd0` (**msdos1**) to see if we can find GRUB there. This approach will allow us to boot Linux and there use other high level tools to repair the configuration file or reinstall GRUB altogether if it is needed: + +``` +# ls (hd0,msdos1)/ +``` + +As we can see in the highlighted area, we found the `grub2` directory in this partition: + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-Grub-Configuration.png) +>Find Grub Configuration + +Once we are sure that GRUB resides in (**hd0,msdos1**), let’s tell GRUB where to find its configuration file and then instruct it to attempt to launch its menu: + +``` +set prefix=(hd0,msdos1)/grub2 +set root=(hd0,msdos1) +insmod normal +normal +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/03/Find-and-Launch-Grub-Menu.png) +>Find and Launch Grub Menu + +Then in the GRUB menu, choose an entry and press **Enter** to boot using it. Once the system has booted you can issue the `grub2-install /dev/sdX` command (change `sdX` with the device you want to install GRUB on). The boot information will then be updated and all related files be restored. + +``` +# grub2-install /dev/sdX +``` + +Other more complex scenarios are documented, along with their suggested fixes, in the [Ubuntu GRUB2 Troubleshooting guide][10]. The concepts explained there are valid for other distributions as well. + +### Summary + +In this article we have introduced you to GRUB, indicated where you can find documentation both online and offline, and explained how to approach an scenario where a system has stopped booting properly due to a bootloader-related issue. + +Fortunately, GRUB is one of the tools that is best documented and you can easily find help either in the installed docs or online using the resources we have shared in this article. + +Do you have questions or comments? Don’t hesitate to let us know using the comment form below. We look forward to hearing from you! + +-------------------------------------------------------------------------------- + +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/installing-network-services-and-configuring-services-at-system-boot/ +[3]: http://www.tecmint.com/linux-boot-process/ +[4]: http://www.tecmint.com/linux-boot-process-and-manage-services/ +[5]: http://www.tecmint.com/best-linux-log-monitoring-and-management-tools/ +[6]: http://www.gnu.org/software/grub/manual/ +[7]: http://askubuntu.com/questions/82140/how-can-i-boot-with-an-older-kernel-version +[8]: https://www.kernel.org/doc/Documentation/kernel-parameters.txt +[9]: http://man7.org/linux/man-pages/man7/bootparam.7.html +[10]: https://help.ubuntu.com/community/Grub2/Troubleshooting From 3ecb54d5c50ef4a1bcdb40dfee10fffe8afabeba Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 12 Jun 2016 22:38:48 +0800 Subject: [PATCH 1531/1710] PUB:Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper @Flowsnow --- ...th Yum RPM Apt Dpkg Aptitude and Zypper.md | 205 ++++++++++++++++ ...th Yum RPM Apt Dpkg Aptitude and Zypper.md | 230 ------------------ 2 files changed, 205 insertions(+), 230 deletions(-) create mode 100644 published/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md delete mode 100644 translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md diff --git a/published/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md b/published/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md new file mode 100644 index 0000000000..cdb0e8aecf --- /dev/null +++ b/published/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md @@ -0,0 +1,205 @@ +LFCS 系列第九讲: 使用 Yum、RPM、Apt、Dpkg、Aptitude 进行 Linux 软件包管理 +================================================================================ + +去年八月, Linux基金会宣布了一个全新的LFCS(Linux Foundation Certified Sysadmin,Linux基金会认证系统管理员)认证计划,这对广大系统管理员来说是一个很好的机会,管理员们可以通过认证考试来表明自己可以成功支持Linux系统的整体运营。 一个Linux基金会认证的系统管理员能有足够的专业知识来确保系统高效运行,提供第一手的故障诊断和监视,并且在需要的情况下将问题提交给工程师支持团队。 + +![Linux Package Management](http://www.tecmint.com/wp-content/uploads/2014/11/lfcs-Part-9.png) + +*Linux基金会认证系统管理员 – 第九讲* + +请观看下面关于Linux基金会认证计划的演示。 + +注:youtube 视频 + + +本文是本系列教程中的第九讲,今天在这篇文章中我们会引导你学习Linux软件包管理,这也是LFCS认证考试所需要的。 + +### 软件包管理 ### + +简单的说,软件包管理是系统中安装和维护软件的一种方法,这里说的维护包含更新和卸载。 + +在Linux早期,程序只以源代码的方式发行,还带有所需的用户使用手册和必备的配置文件,甚至更多。现如今,大多数发行商一般使用预装程序或者被称为软件包的程序集合。用户可以使用这些预装程序或者软件包安装到该发行版中。然而,Linux最伟大的一点是我们仍然能够获得程序的源代码用来学习、改进和编译。 + +####软件包管理系统是如何工作的#### + +如果某一个软件包需要一定的资源,如共享库,或者需要另一个软件包,这就称之为依赖性。所有现在的包管理系统提供了一些解决依赖性的方法,以确保当安装一个软件包时,相关的依赖包也安装好了。 + +####打包系统#### + +几乎所有安装在现代Linux系统上的软件都会能互联网上找到。它要么由发行商通过中央仓库(中央仓库能包含几千个软件包,每个软件包都已经为发行版构建、测试并且维护好了)提供,要么能够直接得到可以下载和手动安装的源代码。 + +由于不同的发行版使用不同的打包系统(Debian的\*.deb文件/CentOS的\*.rpm文件/openSUSE的专门为openSUSE构建的*.rpm文件),因此为一个发行版开发的软件包会与其他发行版不兼容。然而,大多数发行版都属于LFCS认证所涉及的三个发行版家族之一。 + +####高级和低级打包工具#### + +为了有效地进行软件包管理的任务,你需要知道,有两种类型的实用工具:低级工具(能在后端实际安装、升级、卸载软件包文件),以及高级工具(负责确保能很好的执行依赖性解决和元数据检索的任务——元数据也称为数据的数据)。 + + +|发行版|低级工具|高级工具| +|-----|-------|------| +|Debian版及其衍生版|dpkg|apt-get / aptitude| +|CentOS版|rpm|yum| +|openSUSE版|rpm|zypper| + +让我们来看下低级工具和高级工具的描述。 + +dpkg的是基于Debian的系统的一个低级包管理器。它可以安装,删除,提供有关资料,以及建立*.deb包,但它不能自动下载并安装它们相应的依赖包。 + +- 阅读更多: [15个dpkg命令实例][1] + +apt-get是Debian及其衍生版的高级包管理器,并提供命令行方式来从多个来源检索和安装软件包,其中包括解决依赖性。和dpkg不同的是,apt-get不是直接基于.deb文件工作,而是基于软件包的正确名称。 + +- 阅读更多: [25个apt-get命令实力][2] + +Aptitude是基于Debian的系统的另一个高级包管理器,它可用于快速简便的执行管理任务(安装,升级和删除软件包,还可以自动处理解决依赖性)。它在atp-get的基础上提供了更多功能,例如提供对软件包的几个版本的访问。 + +rpm是Linux标准基础(LSB)兼容发行版所使用的一种软件包管理器,用来对软件包进行低级处理。就像dpkg一样,rpm可以查询、安装、检验、升级和卸载软件包,它多数用于基于Fedora的系统,比如RHEL和CentOS。 + +- 阅读更多: [20个rpm命令实例][3] + +相对于基于RPM的系统,yum增加了系统自动更新的功能和带依赖性管理的软件包管理功能。作为一个高级工具,和apt-get或者aptitude相似,yum需要配合仓库工作。 + +- 阅读更多: [20个yum命令实例][4] + +### 低级工具的常见用法 ### + +使用低级工具处理最常见的任务如下。 + +####1. 从已编译(*.deb或*.rpm)的文件安装一个软件包#### + +这种安装方法的缺点是没有提供解决依赖性的方案。当你在发行版本库中无法获得某个软件包并且又不能通过高级工具下载安装时,你很可能会从一个已编译文件安装该软件包。因为低级工具不会解决依赖性问题,所以当安装一个没有解决依赖性的软件包时会出现出错并且退出。 + + # dpkg -i file.deb [Debian版和衍生版] + # rpm -i file.rpm [CentOS版 / openSUSE版] + +**注意**:不要试图在CentOS中安装一个为openSUSE构建的.rpm文件,反之亦然! + +####2. 从已编译文件中更新一个软件包#### + +同样,当某个安装的软件包不在中央仓库中时,你只能手动升级该软件包。 + + # dpkg -i file.deb [Debian版和衍生版] + # rpm -U file.rpm [CentOS版 / openSUSE版] + +####3. 列举安装的软件包#### + +当你第一次接触一个已经在工作中的系统时,很可能你会想知道安装了哪些软件包。 + + # dpkg -l [Debian版和衍生版] + # rpm -qa [CentOS版 / openSUSE版] + +如果你想知道一个特定的软件包安装在哪儿,你可以使用管道命令从以上命令的输出中去搜索,这在这个系列的[第一讲 操作Linux文件][5] 中有介绍。例如我们需要验证mysql-common这个软件包是否安装在Ubuntu系统中: + + # dpkg -l | grep mysql-common + +![Check Installed Packages in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Installed-Package.png) + +*检查安装的软件包* + +另外一种方式来判断一个软件包是否已安装。 + + # dpkg --status package_name [Debian版和衍生版] + # rpm -q package_name [CentOS版 / openSUSE版] + +例如,让我们找出sysdig软件包是否安装在我们的系统。 + + # rpm -qa | grep sysdig + +![Check sysdig Package](http://www.tecmint.com/wp-content/uploads/2014/11/Check-sysdig-Package.png) + +*检查sysdig软件包* + +####4. 查询一个文件是由哪个软件包安装的#### + + # dpkg --search file_name + # rpm -qf file_name + +例如,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) + +*Linux中查询文件* + +### 高级工具的常见用法 ### + +使用高级工具处理最常见的任务如下。 + +####1. 搜索软件包#### + +aptitude的更新操作将会更新可用的软件包列表,而aptitude的搜索操作会根据软件包名进行实际搜索。 + + # aptitude update && aptitude search package_name + +在search all选项中,yum不仅可以通过软件包名还可以通过软件包的描述搜索。 + + # yum search package_name + # yum search all package_name + # yum whatprovides “*/package_name” + +假定我们需要一个名为sysdig文件,想知道我们需要安装哪个软件包才行,那么运行。 + + # yum whatprovides “*/sysdig” + +![Check Package Description in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Package-Description.png) + +*检查软件包描述* + +whatprovides告诉yum搜索一个含有能够匹配上述正则表达式的文件的软件包。 + + # zypper refresh && zypper search package_name [在openSUSE上] + +####2. 从仓库安装一个软件包#### + +当安装一个软件包时,在软件包管理器解决了所有依赖性问题后,可能会提醒你确认安装。需要注意的是运行更新( update)或刷新(refresh)(根据所使用的软件包管理器)不是绝对必要,但是考虑到安全性和依赖性的原因,保持安装的软件包是最新的是系统管理员的一个好经验。 + + # aptitude update && aptitude install package_name [Debian版和衍生版] + # yum update && yum install package_name [CentOS版] + # zypper refresh && zypper install package_name [openSUSE版] + +####3. 卸载软件包#### + +remove选项将会卸载软件包,但把配置文件保留完好,然而purge选项将从系统中完全删去该程序以及相关内容。 + + # aptitude remove / purge package_name + # yum erase package_name + + ---注意要卸载的openSUSE包前面的减号 --- + + # zypper remove -package_name + +在默认情况下,大部分(如果不是全部的话)的软件包管理器会提示你,在你实际卸载之前你是否确定要继续卸载。所以,请仔细阅读屏幕上的信息,以避免陷入不必要的麻烦! + +####4. 显示软件包的信息#### + +下面的命令将会显示birthday这个软件包的信息。 + + # 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) + +*检查包信息* + +### 总结 ### + +作为一个系统管理员,软件包管理器是你不能回避的东西。你应该立即去使用本文中介绍的这些工具。希望你在准备LFCS考试和日常工作中会觉得这些工具好用。欢迎在下面留下您的意见或问题,我们将尽可能快的回复你。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-package-management/ + +作者:[Gabriel Cánepa][a] +译者:[Flowsnow](https://github.com/Flowsnow) +校对:[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/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]:https://linux.cn/article-7161-1.html \ No newline at end of file diff --git a/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md b/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md deleted file mode 100644 index 2781dde63d..0000000000 --- a/translated/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md +++ /dev/null @@ -1,230 +0,0 @@ -Flowsnow translating... -LFCS系列第九讲: 使用Yum, RPM, Apt, Dpkg, Aptitude, Zypper进行Linux包管理 -================================================================================ -去年八月, Linux基金会宣布了一个全新的LFCS(Linux Foundation Certified Sysadmin,Linux基金会认证系统管理员)认证计划,这对广大系统管理员来说是一个很好的机会,管理员们可以通过绩效考试来表明自己可以成功支持Linux系统的整体运营。 当需要的时候一个Linux基金会认证的系统管理员有足够的专业知识来确保系统高效运行,提供第一手的故障诊断和监视,并且为工程师团队在问题升级时提供智能决策。 - -![Linux Package Management](http://www.tecmint.com/wp-content/uploads/2014/11/lfcs-Part-9.png) - -Linux基金会认证系统管理员 – 第九讲 - -请观看下面关于Linux基金会认证计划的演示。 - -注:youtube 视频 - - -本文是本系列十套教程中的第九讲,今天在这篇文章中我们会引导你学习Linux包管理,这也是LFCS认证考试所需要的。 - -### 包管理 ### - -简单的说,包管理是系统中安装和维护软件的一种方法,其中维护也包含更新和卸载。 - -在Linux早期,程序只以源代码的方式发行,还带有所需的用户使用手册和必备的配置文件,甚至更多。现如今,大多数发行商使用默认的预装程序或者被称为包的程序集合。用户使用这些预装程序或者包来安装该发行版本。然而,Linux最伟大的一点是我们仍然能够获得程序的源代码用来学习、改进和编译。 - -**包管理系统是如何工作的** - -如果某一个包需要一定的资源,如共享库,或者需要另一个包,据说就会存在依赖性问题。所有现在的包管理系统提供了一些解决依赖性的方法,以确保当安装一个包时,相关的依赖包也安装好了 - -**打包系统** - -几乎所有安装在现代Linux系统上的软件都会在互联网上找到。它要么能够通过中央库(中央库能包含几千个包,每个包都已经构建、测试并且维护好了)发行商得到,要么能够直接得到可以下载和手动安装的源代码。 - -由于不同的发行版使用不同的打包系统(Debian的*.deb文件/ CentOS的*.rpm文件/ openSUSE的专门为openSUSE构建的*.rpm文件),因此为一个发行版本开发的包会与其他发行版本不兼容。然而,大多数发行版本都可能是LFCS认证的三个发行版本之一。 - -**高级和低级打包工具** - -为了有效地进行包管理的任务,你需要知道,你将有两种类型的实用工具:低级工具(能在后端实际安装,升级,卸载包文件),以及高级工具(负责确保能很好的执行依赖性解决和元数据检索的任务,元数据也称为关于数据的数据)。 - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
发行版低级工具高级工具
 Debian版及其衍生版 dpkg apt-get / aptitude
 CentOS版 rpm yum
 openSUSE版 rpm zypper
- -让我们来看下低级工具和高级工具的描述。 - -dpkg的是基于Debian系统中的一个低级包管理器。它可以安装,删除,提供有关资料,并建立*.deb包,但它不能自动下载并安装它们相应的依赖包。 - -- 阅读更多: [15个dpkg命令实例][1] - -apt-get是Debian和衍生版的高级包管理器,并提供命令行方式从多个来源检索和安装软件包,其中包括解决依赖性。和dpkg不同的是,apt-get不是直接基于.deb文件工作,而是基于包的正确名称。 - -- 阅读更多: [25个apt-get命令实力][2] - -Aptitude是基于Debian的系统的另一个高级包管理器,它可用于快速简便的执行管理任务(安装,升级和删除软件包,还可以自动处理解决依赖性)。与atp-get和额外的包管理器相比,它提供了相同的功能,例如提供对包的几个版本的访问。 - -rpm是Linux标准基础(LSB)兼容发布版使用的一种包管理器,用来对包进行低级处理。就像dpkg,rpm可以查询,安装,检验,升级和卸载软件包,并能被基于Fedora的系统频繁地使用,比如RHEL和CentOS。 - -- 阅读更多: [20个rpm命令实例][3] - -相对于基于RPM的系统,yum增加了系统自动更新的功能和带依赖性管理的包管理功能。作为一个高级工具,和apt-get或者aptitude相似,yum基于库工作。 - -- 阅读更多: [20个yum命令实例][4] -- -### 低级工具的常见用法 ### - -你用低级工具处理最常见的任务如下。 - -**1. 从已编译(*.deb或*.rpm)的文件安装一个包** - -这种安装方法的缺点是没有提供解决依赖性的方案。当你在发行版本库中无法获得某个包并且又不能通过高级工具下载安装时,你很可能会从一个已编译文件安装该包。因为低级工具不需要解决依赖性问题,所以当安装一个没有解决依赖性的包时会出现出错并且退出。 - - # dpkg -i file.deb [Debian版和衍生版] - # rpm -i file.rpm [CentOS版 / openSUSE版] - -**注意**: 不要试图在CentOS中安装一个为openSUSE构建的.rpm文件,反之亦然! - -**2. 从已编译文件中更新一个包** - -同样,当中央库中没有某安装包时,你只能手动升级该包。 - - # dpkg -i file.deb [Debian版和衍生版] - # rpm -U file.rpm [CentOS版 / openSUSE版] - -**3. 列举安装的包** - -当你第一次接触一个已经在工作中的系统时,很可能你会想知道安装了哪些包。 - - # dpkg -l [Debian版和衍生版] - # rpm -qa [CentOS版 / openSUSE版] - -如果你想知道一个特定的包安装在哪儿, 你可以使用管道命令从以上命令的输出中去搜索,这在这个系列的[操作Linux文件 – 第一讲][5] 中有介绍。假定我们需要验证mysql-common这个包是否安装在Ubuntu系统中。 - - # dpkg -l | grep mysql-common - -![Check Installed Packages in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Installed-Package.png) - -检查安装的包 - -另外一种方式来判断一个包是否已安装。 - - # dpkg --status package_name [Debian版和衍生版] - # rpm -q package_name [CentOS版 / openSUSE版] - -例如,让我们找出sysdig包是否安装在我们的系统。 - - # rpm -qa | grep sysdig - -![Check sysdig Package](http://www.tecmint.com/wp-content/uploads/2014/11/Check-sysdig-Package.png) - -检查sysdig包 - -**4. 查询一个文件是由那个包安装的** - - # dpkg --search file_name - # rpm -qf file_name - -例如,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) - -Linux中查询文件 - -### 高级工具的常见用法 ### - -你用高级工具处理最常见的任务如下。 - -**1. 搜索包** - -aptitude更新将会更新可用的软件包列表,并且aptitude搜索会根据包名进行实际性的搜索。 - - # aptitude update && aptitude search package_name - -在搜索所有选项中,yum不仅可以通过包名还可以通过包的描述搜索程序包。 - - # yum search package_name - # yum search all package_name - # yum whatprovides “*/package_name” - -假定我们需要一个名为sysdig的包,要知道的是我们需要先安装然后才能运行。 - - # yum whatprovides “*/sysdig” - -![Check Package Description in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Package-Description.png) - -检查包描述 - -whatprovides告诉yum搜索一个含有能够匹配上述正则表达式的文件的包。 - - # zypper refresh && zypper search package_name [在openSUSE上] - -**2. 从仓库安装一个包** - -当安装一个包时,在包管理器解决了所有依赖性问题后,可能会提醒你确认安装。需要注意的是运行更新或刷新(根据所使用的软件包管理器)不是绝对必要,但是考虑到安全性和依赖性的原因,保持安装的软件包是最新的是一个好的系统管理员的做法。 - - # aptitude update && aptitude install package_name [Debian版和衍生版] - # yum update && yum install package_name [CentOS版] - # zypper refresh && zypper install package_name [openSUSE版] - -**3. 卸载包** - -按选项卸载将会卸载软件包,但把配置文件保留完好,然而清除包从系统中完全删去该程序。 -# aptitude remove / purge package_name -# yum erase package_name - - ---注意要卸载的openSUSE包前面的减号 --- - - # zypper remove -package_name - -在默认情况下,大部分(如果不是全部)的包管理器会提示你,在你实际卸载之前你是否确定要继续卸载。所以,请仔细阅读屏幕上的信息,以避免陷入不必要的麻烦! - -**4. 显示包的信息** - -下面的命令将会显示birthday这个包的信息。 - - # 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) - -检查包信息 - -### 总结 ### - -作为一个系统管理员,包管理器是你不能回避的东西。你应该立即准备使用本文中介绍的这些工具。希望你在准备LFCS考试和日常工作中会觉得这些工具好用。欢迎在下面留下您的意见或问题,我们将尽可能快的回复你。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-package-management/ - -作者:[Gabriel Cánepa][a] -译者:[Flowsnow](https://github.com/Flowsnow) -校对:[校对者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 e1dff486b08997cfc02b5ca07ee61d5f1539f307 Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 13 Jun 2016 04:11:24 +0800 Subject: [PATCH 1532/1710] Translated --- ...sharing: integrating Pydio and ownCloud.md | 67 ------------------- ...sharing: integrating Pydio and ownCloud.md | 65 ++++++++++++++++++ 2 files changed, 65 insertions(+), 67 deletions(-) delete mode 100644 sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md create mode 100644 translated/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md diff --git a/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md b/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md deleted file mode 100644 index b2174b18c2..0000000000 --- a/sources/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md +++ /dev/null @@ -1,67 +0,0 @@ -martin - -The future of sharing: integrating Pydio and ownCloud -========================================================= - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_darwincloud_520x292_0311LL.png?itok=5yWIaEDe) ->Image by : -opensource.com - -The open source file sharing ecosystem accommodates a large variety of projects, each supplying their own solution, and each with a different approach. There are a lot of reasons to choose an open source solution rather than commercial solutions like Dropbox, Google Drive, iCloud, or OneDrive. These solutions offer to take away worries about managing your data but come with certain limitations, including a lack of control and integration into existing infrastructure. - -There are quite a few file sharing and sync alternatives available to users, including ownCloud and Pydio. - -### Pydio - -The Pydio (Put your data in orbit) project was founded by musician Charles du Jeu, who needed a way to share large audio files with his bandmates. [Pydio][1] is a file sharing and sync solution, with multiple storage backends, designed with developers and system administrators in mind. It has over one million downloads worldwide and has been translated into 27 languages. - -Open source from the very start, the project grew organically on [SourceForge][2] and now finds its home on [GitHub][3]. - -The user interface is based on Google's [Material Design][4]. Users can use an existing legacy file infrastructure or set up Pydio with an on-premise approach, and use web, desktop, and mobile applications to manage their assets everywhere. For administrators, the fine-grained access rights are a powerful tool for configuring access to assets.​ - -On the [Pydio community page][5], you will find several resources to get you up to speed quickly. The Pydio website gives some clear guidelines on [how to contribute][6] to the Pydio repositories on GitHub. The [forum][7] includes sections for developers and community. - -### ownCloud - -[ownCloud][8] has over 8 million users worldwide and is an open source, self-hosted file sync and sharing technology. There are sync clients for all major platforms as well as WebDAV through a web interface. ownCloud has an easy to use interface, powerful administrator tools, and extensive sharing and collaboration features—designed to give users control over their data. - -ownCloud's open architecture is extensible via an API and offers a platform for apps. Over 300 applications have been written, featuring capabilities like handling calendar, contacts, mail, music, passwords, notes, and many other types of data. ownCloud provides security, scales from a Raspberry Pi to a cluster with petabytes of storage and millions of users, and is developed by an international community of hundreds of contributors. - -### Federated sharing - -File sharing is starting to shift toward teamwork, and standardization provides a solid basis for such collaboration. - -Federated sharing, a new open standard supported by the [OpenCloudMesh][9] project, is a step in that direction. Among other things, it allows for the sharing of files and folders between servers that support this, like Pydio and ownCloud instances. - -First introduced in ownCloud 7, this server-to-server sharing allows you to mount file shares from remote servers, in effect creating your own cloud of clouds. You can create direct share links with users on other servers that support federated cloud sharing. - -Implementing this new API allows for deeper integration between storage solutions while maintaining the security, control, and attributes of the original platforms. - -"Exchanging and sharing files is something that is essential today and tomorrow," ownCloud founder Frank Karlitschek said. "Because of that, it is important to do this in a federated and distributed way without centralized data silos. The number one design goal [of federated sharing] is to enable sharing in the most seamless and easiest way while protecting the security and privacy of the users." - -### What's next? - -An initiative like OpenCloudMesh will extend this new open standard of file sharing through cooperation of institutions and companies like Pydio and ownCloud. ownCloud 9 has already introduced the ability for federated servers to exchange user lists, enabling the same seamless auto-complete experience you have with users on your own server. In the future, the idea of having a (federated!) set of central address book servers that can be used to search for others' federated cloud IDs might bring inter-cloud collaboration to an even higher level. - -The initiative will undoubtedly contribute to already growing open technical community within which members can easily discuss, develop, and contribute to the "OCM sharing API" as a vendor-neutral protocol. All leading partners of the OCM project are fully committed to the open API design principle and welcome other open source file share and sync communities to participate and join the connected cloud. - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/5/sharing-files-pydio-owncloud - -作者:[ben van 't ende][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/benvantende -[1]: https://pydio.com/ -[2]: https://sourceforge.net/projects/ajaxplorer/ -[3]: https://github.com/pydio/ -[4]: https://www.google.com/design/spec/material-design/introduction.html -[5]: https://pydio.com/en/community -[6]: https://pydio.com/en/community/contribute -[7]: https://pydio.com/forum/f -[8]: https://owncloud.org/ -[9]: https://wiki.geant.org/display/OCM/Open+Cloud+Mesh diff --git a/translated/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md b/translated/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md new file mode 100644 index 0000000000..bf5a25c77e --- /dev/null +++ b/translated/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md @@ -0,0 +1,65 @@ +分享的未来:整合 Pydio 与 ownCloud +========================================================= + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_darwincloud_520x292_0311LL.png?itok=5yWIaEDe) +>图片来源 : +opensource.com + +开源共享生态圈内容纳了许多各异的项目,他们每一个都能提供出自己的解决方案,且每一个都不按套路来。有很多原因导致你选择开源的解决方案,而非 Dropbox、Google Drive、iCloud 或 OneDrive 这些商业的解决方案。这些商业的解决方案虽然能让你不必为如何管理数据担心,但也理所应当的带着种种限制,其中就包含对于原有基础结构的控制和整合不足。 + +对于用户而言仍有相当一部分文件分享和同步的替代品可供选择,其中就包括了 Pydio 和 ownCloud。 + +### Pydio + +Pydio (Put your data in orbit 把你的数据放上轨道) 项目由一位作曲家 Charles du Jeu 发起,起初他也只是需要一种与乐队成员分享大型音频文件的方法。[Pydio][1] 是一种文件分享与同步的解决方案,综合了多存储后端,设计时还同时考虑了开发者和系统管理员两方面。在世界各地有逾百万的下载量,已被翻译成 27 种语言。 + +项目在很开始的时候便开源了,先是在 [SourceForge][2] 上茁壮的成长,现在已在 [GitHub][3] 上安了家.。 + +用户界面基于 Google 的 [Material 设计][4]。用户可以使用现有的传统的文件基础结构或是本地部署 Pydio,并通过 web、桌面和移动端应用随时随地地管理自己的东西。对于管理员来说,细粒度的访问权限绝对是配置访问时的利器。 + +在 [Pydio 社区][5],你可以找到许多让你增速的资源。Pydio 网站 [对于如何为 Pydio GitHub 仓库贡献][6] 给出了明确的指导方案。[论坛][7]中也包含了开发者板块和社区。 + +### ownCloud + +[ownCloud][8] 在世界各地拥有逾 8 百万的用户,并且开源,支持自托管文件同步,且共享技术。同步客户端支持所有主流平台并支持 WebDAV 通过 web 界面实现。ownCloud 拥有简单的使用界面,强大的管理工具,和大规模的共享及协作功能——以满足用户管理数据时的需求。 + +ownCloud 的开放式架构是通过 API 和为应用提供平台来实现可扩展性的。迄今已有逾 300 款应用,功能包括处理像日历、联系人、邮件、音乐、密码、笔记等诸多数据类型。ownCloud 由一个数百位贡献者的国际化的社区开发,安全,并且能做到为小到一个树莓派大到好几百万用户的 PB 级存储集群量身定制。 + +### 联合共享 (Federated sharing) + +文件共享开始转向团队合作时代,而标准化为合作提供了坚实的土壤。 + +联合共享——一个由 [OpenCloudMesh][9] 项目提供的新开放标准,就是在这个方向迈出的一步。先不说别的,在支持该标准的服务端上,可以像 Pydio 和 ownCloud 那样分享文件和文件夹。 + +ownCloud 7 率先引入,这种服务端到服务端的分享方式可以让你挂载远程服务端上共享的文件,实际上就是创建你所有云的云。你可以直接创建共享链接,让用户在其他支持联合云共享的服务端上使用。 + +实现这个新的 API 允许存储解决方案之间更深层次的集成,同时保留了原有平台的安全,控制和属性。 + +“交换和共享文件是当下和未来不可或缺的东西。”ownCloud 的创始人 Frank Karlitschek 说道:“正因如此,采用联合和分布的方式而非集中的数据孤岛就显得至关重要。[联合共享]的设计初衷便是在保证安全和用户隐私的同时追求分享的无缝、至简之道。” + +### 下一步是什么呢? + +正如 OpenCloudMesh 做的那样,将会通过像 Pydio 和 ownCloud 这样的机构和公司,合作推广这一文件共享的新开放标准。ownCloud 9 已经引入联合服务端间交换用户列表的功能,让你的用户在你的服务器上享有和你同样的无缝体验。将来,一个中央地址簿服务(联合!)集合,用以检索其他联合云 ID 的想法可能会把云间合作推向一个新的高度。 + +这一举措无疑有助于日益开放的技术社区中的那些成员方便地讨论,开发,并推动“OCM 分享 API”作为一个厂商中立协议。所有领导 OCM 项目的合作伙伴都全心致力于开放 API 的设计原理,并欢迎其他开源的文件分享和同步社区参与并加入其中。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/16/5/sharing-files-pydio-owncloud + +作者:[ben van 't ende][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/benvantende +[1]: https://pydio.com/ +[2]: https://sourceforge.net/projects/ajaxplorer/ +[3]: https://github.com/pydio/ +[4]: https://www.google.com/design/spec/material-design/introduction.html +[5]: https://pydio.com/en/community +[6]: https://pydio.com/en/community/contribute +[7]: https://pydio.com/forum/f +[8]: https://owncloud.org/ +[9]: https://wiki.geant.org/display/OCM/Open+Cloud+Mesh From 4a3a73351059dd3980090aa48bcf1563c7c168c2 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 13 Jun 2016 09:24:50 +0800 Subject: [PATCH 1533/1710] PUB:20160601 scp command in Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @lujianbo 可以注意一下中文标点符号、中英文间的空格等排版问题。加油! https://linux.cn/article-7456-1.html --- .../20160601 scp command in Linux.md | 87 ++++++++----------- 1 file changed, 38 insertions(+), 49 deletions(-) rename {translated/tech => published}/20160601 scp command in Linux.md (51%) diff --git a/translated/tech/20160601 scp command in Linux.md b/published/20160601 scp command in Linux.md similarity index 51% rename from translated/tech/20160601 scp command in Linux.md rename to published/20160601 scp command in Linux.md index 949409ff44..0a299cbed0 100644 --- a/translated/tech/20160601 scp command in Linux.md +++ b/published/20160601 scp command in Linux.md @@ -1,12 +1,11 @@ -Linux中的scp命令 +在 Linux 下使用 scp 命令 ======================= ![](https://www.unixmen.com/wp-content/uploads/2016/05/SCP-LOGO-1.jpg) +scp 是安全拷贝协议 (Secure Copy Protocol)的缩写,和众多 Linux/Unix 使用者所熟知的拷贝(cp)命令一样。scp 的使用方式类似于 cp 命令,cp 命令将一个文件或文件夹从本地操作系统的一个位置(源)拷贝到目标位置(目的),而 scp 用来将文件或文件夹从网络上的一个主机拷贝到另一个主机当中去。 -scp 意味着安全拷贝协议 (Secure Copy Protocol), 和众多Linux/Unix使用者所了解的拷贝(cp)命令一样. scp 的使用方式跟 cp命令是很相似的, cp命令将一个文件或文件夹从本地操作系统的一个位置拷贝到目标位置上,而scp用来将一个文件或者文件夹通过网络传输从一个主机拷贝到另一个主机当中去。 - -scp命令的使用方法如下所示,在这个例子中,我将一个叫 “imporimposetantfile”的文件从本机(10.10.16.147)拷贝到远程主机(10.0.0.6)中。在这个命令里,你也可以使用主机名字来替代IP地址。 +scp 命令的使用方法如下所示,在这个例子中,我将一个叫 “importantfile” 的文件从本机(10.10.16.147)拷贝到远程主机(10.0.0.6)中。在这个命令里,你也可以使用主机名字来替代IP地址。 ``` [root@localhost ~]# scp importantfile admin@10.0.0.6:/home/admin/ @@ -20,7 +19,7 @@ importantfile 100% 0 0.0KB/s 00:00 [root@localhost ~]# ``` -同样的,如果你想从一个远程主机中获取文件,你可以利用如下的scp命令。 +类似的,如果你想从一个远程主机中取得文件,你可以利用如下的 scp 命令。 ``` [root@localhost ~]# scp root@10.10.16.137:/root/importantfile /home/admin/ @@ -33,50 +32,39 @@ importantfile 100% 0 0.0KB/s 00:00 [root@localhost ~]# ``` -你同样可以像cp命令一样,在scp命令中使用不同的选项,scp的man文件详细地阐述了不同选项的用法和优点。 +你也可以像 cp 命令一样,在 scp 命令中使用不同的选项,scp 的 man 帮助详细地阐述了不同选项的用法和用处。 -**简单输出.** +**示例输出** ![](https://www.unixmen.com/wp-content/uploads/2016/05/scp.jpg) -``` -scp可选参数如下所示: - -B 采取批量模式 (prevents asking for passwords or passphrases). - - -C 允许压缩. 通过指明-C来开启压缩模式. +scp 可选参数如下所示: + -B 采取批量模式(避免询问密码或口令) + -C 启用压缩。通过指明 -C 参数来开启压缩模式。 -c 加密方式 - 选择在传输过程中用来加密的加密方式 - 这个选项会被直接传递到ssh(1). - - -F ssh配置 - 为ssh指定一个用来替代默认配置的文件. - 这个选项会被直接传递到ssh(1). - + 选择在传输过程中用来加密的加密方式 这个选项会被直接传递到 ssh(1)。 + -F ssh 配置 + 给 ssh 指定一个用来替代默认配置的配置文件。这个选项会被直接传递到 ssh(1)。 -l 限速 - 限制命令使用的带宽, 默认单位是 Kbit/s. - + 限制命令使用的带宽,默认单位是 Kbit/s。 -P 端口 - 指定需要的连接的远程主机的端口. - 注意,这个选项使用的是一个大写的"P", 因为小写的 -p 已经用来保留目标文件的时间和模式相关信息。 + 指定需要的连接的远程主机的端口。 + 注意,这个选项使用的是一个大写的“P”,因为小写的“-p”已经用来保留目标文件的时间和模式相关信息。(LCTT 译注:ssh 命令中使用小写的“-p”来指定目标端口。) + -p 保留文件原来的修改时间,访问时间以及权限模式。 + -q 静默模式:不显示来自 ssh(1) 命令的进度信息,警告和诊断信息。 + -r 递归拷贝整个目录。 + 注意,scp 命令在树形遍历的时候同样会跟随符号连接,复制所连接的文件。 + -v 详细模式。scp 和 ssh(1) 将会打印出处理过程中的调试信息。这可以帮助你调试连接、认证和配置方面的问题。 - -p 保留目标文件的修改时间,访问时间以及权限模式. +**详细模式** - -q 静默模式: 不显示来自ssh(1)命令的进度信息,警告和诊断信息. - - -r 递归拷贝整个目录. - 注意,scp命令在树形遍历的时候同样会对符号连接进行相同的处理。 - - -v 详细模式.scp和ssh(1)将会打印出处理过程中的调试信息.当你要调试连接,认证和配置问题的时候这将会帮助到你。 - -``` - -利用scp命令的-v选项,你可以获得认证,调试相关的处理信息. +利用 scp 命令的 -v 选项,你可以得到认证、调试等的相关细节信息。 ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-v.jpg) -当我们使用-v选项的时候,一个简单的输出如下所示 +当我们使用 -v 选项的时候,一个简单的输出如下所示: ``` [root@localhost ~]# scp -v abc.txt admin@10.0.0.6:/home/admin @@ -111,26 +99,27 @@ debug1: Exit status 0 [root@localhost ~]# ``` -当我们需要拷贝一个目录或者文件夹的时候,我们可以使用-r选项,它会递归拷贝整个目录。 +当我们需要拷贝一个目录或者文件夹的时候,我们可以使用 -r 选项,它会递归拷贝整个目录。 ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-r.jpg) -静默模式: +**静默模式** 如果你想要关闭进度信息以及警告和诊断信息,你可以通过使用scp命令中的-q选项. ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-q.jpg) -上一次我们仅仅使用-r参数,它显示了逐个文件的信息,但这一次当我们使用了-q参数,它就不显示进度信息. +上一次我们仅仅使用 -r 参数,它显示了逐个文件的信息,但这一次当我们使用了 -q 参数,它就不显示进度信息。 -利用scp的-p选项来保留目标文件的更新时间,访问时间和权限模式. +利用 scp 的 -p 选项来保留目标文件的更新时间,访问时间和权限模式。 ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-p.jpg) -通过 -P 选项来指定远程主机的连接端口。 -scp使用ssh命令来在两个主机之间传输文件,因为ssh使用的是22端口号,所以scp也使用相同的22端口号. +**通过 -P 选项来指定远程主机的连接端口** -如果我们希望改变这个端口号,我们可以使用-P(大写的P,因为小写的p用来保存文件的访问时间等) 选项来指定所需的端口号 +scp 使用 ssh 命令来在两个主机之间传输文件,因为 ssh 默认使用的是22端口号,所以 scp 也使用相同的22端口号。 + +如果我们希望改变这个端口号,我们可以使用 -P(大写的 P,因为小写的 p 用来保持文件的访问时间等)选项来指定所需的端口号。 举个例子,如果我们想要使用2222端口号,我们可以使用如下的命令 @@ -138,33 +127,33 @@ scp使用ssh命令来在两个主机之间传输文件,因为ssh使用的是22 [root@localhost ~]# scp -P 2222 abcd1 root@10.10.16.137:/root/ ``` -**限制命令使用的带宽, 指定的单位是 Kbit/s** +**限制命令使用的带宽,指定的单位是 Kbit/s** -如下所示,我们可以使用-l参数来指定scp命令所使用的带宽,在此我们将速度限制为512kbit/s +如下所示,我们可以使用 -l 参数来指定 scp 命令所使用的带宽,在此我们将速度限制为512kbit/s。 ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-l.jpg) **开启压缩** -如下所示,我们可以通过开启scp命令的压缩模式来节省传输过程中的带宽和时间 +如下所示,我们可以通过开启 scp 命令的压缩模式来节省传输过程中的带宽和时间。 ![](https://www.unixmen.com/wp-content/uploads/2016/05/scp-with-C.jpg) **选择加密数据的加密方式** -scp默认使用 AES-128的加密方式,如果我们想要改变这个加密方式,可以通过-c(小写的c) 参数来指定其他的加密方式 +scp 默认使用 AES-128 的加密方式,如果我们想要改变这个加密方式,可以通过 -c(小写的 c) 参数来指定其他的加密方式。 ![](http://www.unixmen.com/wp-content/uploads/2016/05/scp-with-cipher.jpg) -现在你可以利用scp(Secure copy)命令在你所属网络中的两个结点之间安全地拷贝文件了. +现在你可以利用 scp(Secure copy)命令在你所属网络中的两个节点之间安全地拷贝文件了。 -------------------------------------------------------------------------------- -via: https://www.unixmen.com/scp-command-linuxunix/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+unixmenhowtos+%28Unixmen+Howtos+%26+Tutorials%29 +via: https://www.unixmen.com/scp-command-linuxunix/ 作者:[Naga Ramesh][a] 译者:[lujianbo](https://github.com/lujianbo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 93e5f6b8e9c4a708310c42d3b55f40d580328c75 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 13 Jun 2016 12:43:55 +0800 Subject: [PATCH 1534/1710] PUB:20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization @geekpi --- ... Should Bring Order to Containerization.md | 48 ++++++++++++++++++ ... Should Bring Order to Containerization.md | 50 ------------------- 2 files changed, 48 insertions(+), 50 deletions(-) create mode 100644 published/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md delete mode 100644 translated/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md diff --git a/published/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md b/published/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md new file mode 100644 index 0000000000..a2084582b3 --- /dev/null +++ b/published/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md @@ -0,0 +1,48 @@ +新的 Docker 数据中心管理套件使容器化变得更加井然有序 +=============================================================================== + +![](https://tctechcrunch2011.files.wordpress.com/2016/02/shutterstock_119411227.jpg?w=738) + +[Docker][1]之前发布了一个新的容器控制中心,称为Docker数据中心(DDC),其设计目的是用于大型和小型企业创建、管理和分发容器的一个集成管理控制台。 + +DDC是由包括Docker Universal Control Plane(也是同时发布的)和Docker Trusted Registry等不同的商业组件组成。它也包括了开源组件比如Docker Engine。这个产品让企业在一个中心管理界面中就可以管理整个Docker化程序的生命周期。 + +负责产品管理的SVP Scott Johnston告诉TechCrunch:“客户催使了这个新工具的产生。公司不仅喜欢Docker给他们带来的敏捷性,它们也希望在创建和分发容器的过程中可以进行对安全和管理进行控制。” + +Johnston说:“公司称这个为容器即服务(Caas),主要是因为当客户来询问这种类型的管理面板时,他们是这样描述的。” + +![](https://tctechcrunch2011.files.wordpress.com/2016/02/screen-shot-2016-02-23-at-7-56-54-am.png?w=680&h=401) + +像许多开源项目那样,Docker首先获得了许多开发者的追随,但是随着它的流行,那些开发者们所在的公司也希望积极推进它的使用。 + +这就是DDC设计的目的。它给开发者创建容器化应用的敏捷性,也让运维变得井井有条。 + +实际上这意味着开发者可以创建一系列容器化的组件,将其部署后就可以访问一个完全认证的镜像库。这可以让开发人员用碎片组成应用而不必每次重新发明轮子。这可以加速应用的开发和部署(理论上提升了容器提供的灵活性)。 + +这方面吸引了Beta客户ADP。这个服务特别喜欢将这个提供给开发人员的中心镜像仓库。 + +ADP的CTO Keith Fulton在声明中称:“作为我们将关键业务微服务化倡议的一部分,ADP正在研究能够让开发人员可以利用IT审核过的中央库和安全的核心服务进行快速迭代的方案。” + +Docker在2010年由dotcloud的Solomon Hykes发布。他在2013年将公司的重心移到Docker上,并在[8月出售了dotCloud][2],2014年完全聚焦在Docker上。 + +根据CrunchBase的消息,公司几年来在5轮融资后势如破竹般获得了1亿8000万美元融资(自从成为Docker后获得了1亿6千8百万美元)。吸引投资者关注的是Docker提供了一种称为容器的现在分发应用的方式,可以构建、管理何分发分布式应用。 + +容器化可以让开发者创建由多个分布在不同服务器上的碎片组成的分布式应用,而不是一个运行在一个单独服务器上的独立应用。 + +DDC服务每月每节点150美金起。 + +-------------------------------------------------------------------------------- + +via: http://techcrunch.com/2016/02/23/new-docker-data-center-admin-suite-should-bring-order-to-containerization/ + +作者:[Ron Miller][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://techcrunch.com/author/ron-miller/ +[1]: https://www.docker.com/ +[2]: http://techcrunch.com/2014/08/04/docker-sells-dotcloud-to-cloudcontrol-to-focus-on-core-container-business/ + + diff --git a/translated/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md b/translated/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md deleted file mode 100644 index 147294c547..0000000000 --- a/translated/tech/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md +++ /dev/null @@ -1,50 +0,0 @@ -新的Docker数据中心管理套件使容器化变得更加井然有序 -=============================================================================== - -![](https://tctechcrunch2011.files.wordpress.com/2016/02/shutterstock_119411227.jpg?w=738) - -[Docker][1]今天宣布了一个新的容器控制中心,称为Docker数据中心(DDC),被设计用于大型和小型企业能够创建、管理和分发容器的一个集成管理控制台。 - -DDC是由包括Docker Universal Control Plane(也是今天发布)和Docker Trusted Registry等不同的商业组件组成。它也包括了开源组件比如Docker Engine。这个主意能让公司能够在一个中心管理界面中就能够管理整个Docker化程序的生命周期。 - -产品SVP Scott Johnston告诉TechCrunch:“客户催使了这个新工具的产生。公司不仅喜欢Docker给他们带来的敏捷性,它们也希望在创建和分发容器的过程中可以进行行政、安全和管理。” - -Johnston说:“公司称这个为容器即服务(Caas),大多是是因为当客户来询问这个管理的类型时,它们是这样描述的。” - -![](https://tctechcrunch2011.files.wordpress.com/2016/02/screen-shot-2016-02-23-at-7-56-54-am.png?w=680&h=401) - ->Docker免费镜像 - -像许多开源项目那样,Docker首先获得了许多开发者的追随,但是它也很快在那些想直接追踪管理它们的开发者的公司中流行。 - -这就是DDC设计的目的。它给开发者创建容器化应用的敏捷性,也让运维变得井井有条。 - -实际中这意味着开发者可以创建一系列容器化的组件,批准部署后就可以获得一个完全认证的镜像。这可以让开发这一系列的程序中拉取他们所需而不必每次重新发明轮子。这可以加速应用的开发和部署(理论上提升了容器提供的灵活性)。 - -这方面吸引了Beta客户ADP。工资服务业巨头特别喜欢让这个中心镜像仓库提供给开发人员。 - -ADP的CTO Keith Fulton在声明中称:“作为我们将关键业务微服务化倡议的一部分,ADP正在研究能够然开发人员可以利用IT审核过的中央库和安全的核心服务进行快速迭代的方案。” - -Docker在2010年由dotcloud的Solomon Hykes发布。他在2013年将公司的重心移到Docker上,并在[8月dotCloud][2],2014年完全聚焦在Docker上。 - -根据CrunchBase的消息,公司几年来在5轮融资后势如破竹般获得了1亿8000万美元融资(自从成为Docker后获得了1亿6千8百万美元)。吸引投资者关注的是Docker提供了一种称为容器的现在分发应用的方式,可以构建、管理何分发分布式应用。 - -容器化可以让开发者创建由多个小的分布在不同服务器上的分布式应用,而不是一个运行在一个单独服务器上的独立应用。 - -DDC每月每节点150美金起。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/calico-virtual-private-networking-docker/ - -作者:[ Ron Miller][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://techcrunch.com/author/ron-miller/ -[1]: https://www.docker.com/ -[2]: http://techcrunch.com/2014/08/04/docker-sells-dotcloud-to-cloudcontrol-to-focus-on-core-container-business/ - - From ff05bbed545ae78329a79613476e60e6ae152a81 Mon Sep 17 00:00:00 2001 From: gitfuture Date: Tue, 14 Jun 2016 12:15:49 +0800 Subject: [PATCH 1535/1710] Translated by GitFuture --- ...ve on Linux with google-drive-ocamlfuse.md | 68 ------------------- ...ve on Linux with google-drive-ocamlfuse.md | 68 +++++++++++++++++++ 2 files changed, 68 insertions(+), 68 deletions(-) delete mode 100644 sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md create mode 100644 translated/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md diff --git a/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md b/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md deleted file mode 100644 index 25fcda37d8..0000000000 --- a/sources/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md +++ /dev/null @@ -1,68 +0,0 @@ -Translating by GitFuture - -How to mount your Google Drive on Linux with google-drive-ocamlfuse -======================================================================== - ->If you're looking for an easy way to mount your Google Drive folders to a Linux box, Jack Wallen shows you how with the help of google-drive-ocamlfuse. - -![](http://tr4.cbsistatic.com/hub/i/2016/05/18/ee5d7b81-e5be-4b24-843d-d3ca99230a63/651be96ac8714698f8100afa6883e64d/linuxcloudhero.jpg) ->Image: Jack Wallen - -Google has yet to release a Linux version of its Google Drive app, though there are plenty of ways to gain access to your Drive files from Linux. - -If you prefer a GUI tool, you've got Insync. If you prefer the command line, there are tools such as Grive2 and the incredibly easy to use FUSE-based system written in Ocaml. I'll show how to use the latter to mount your Google Drive account on your Linux desktop. Although it's done via the command line, you'll be surprised at how easy it is to pull off. It's so easy, anyone can do it. - -This system features: - -- Full read/write access to ordinary files/folders -- Read-only access to Google Docs, sheets, and slides -- Access to your Drive's Trash (.trash) Directory -- Duplicate file handling -- Support for multiple accounts - -Let's walk through the installation and setup of google-drive-ocamlfuse on a Ubuntu 16.04 desktop so you can gain access to your Drive files. - -### Installation - -1. Open a terminal window. -2. Add the necessary PPA with the command sudo add-apt-repository ppa:alessandro-strada/ppa. -3. When prompted, type your sudo password and hit Enter. -4. Update app with the command sudo apt-get update. -5. Install the software by issuing the command sudo apt-get install google-drive-ocamlfuse. - -### Authorization - -The next step is to authorize google-drive-ocamlfuse so it will have access to your Google account. To do this, go back to the terminal window and issue the command google-drive-ocamlfuse. This command will open a browser window that will either prompt you to log into your Google account or, if you're already logged in, ask you to allow google-drive-ocamlfuse access to your Google account. If you've not logged in, do so and then click Allow. The next window (which appeared on a Ubuntu 16.04 desktop, but not an Elementary OS Freya desktop) will ask you to grant permission for both gdfuse and OAuth2 Endpoint to access your Google account. Click Allow again. The next browser screen will inform you to wait until the authorization tokens have downloaded; you can minimize the browser at this point. When your terminal prompt returns (Figure A), you know the tokens have been downloaded, and you're ready to mount. - -**Figure A** - -![](http://tr4.cbsistatic.com/hub/i/r/2016/05/18/a493122b-445f-4aca-8974-5ec41192eede/resize/620x/6ae5907ad2c08dc7620b7afaaa9e389c/googledriveocamlfuse3.png) ->Image: Jack Wallen - -**The app has been authorized, and you're ready to go.** - -### Mounting your Google Drive - -Before you mount your Google Drive, you must create a folder to serve as the mount point. From the terminal, issue the command mkdir ~/google-drive to create a new folder in your home directory. Finally, issue the command google-drive-ocamlfuse ~/google-drive to mount your Google Drive to the google-drive folder. - -At this point, you should see your Google Drive files/folders populate in the google-drive folder. You can work with Google Drive as if it were a local folder system. - -When you want to unmount the google-drive folder, issue the command fusermount -u ~/google-drive. - -### It's no GUI, but it works like a champ - -I find this particular system really handy to use. It's incredibly fast at syncing with Google Drive, and it can make for an elegant means of backing up your Google Drive account locally. - -Give google-drive-ocamlfuse a go, and see what kind of magic you can make with it. - --------------------------------------------------------------------------------- - -via: http://www.techrepublic.com/article/how-to-mount-your-google-drive-on-linux-with-google-drive-ocamlfuse/ - -作者:[Jack Wallen ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.techrepublic.com/search/?a=jack+wallen diff --git a/translated/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md b/translated/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md new file mode 100644 index 0000000000..b64fa51ab0 --- /dev/null +++ b/translated/tech/20160602 How to mount your Google Drive on Linux with google-drive-ocamlfuse.md @@ -0,0 +1,68 @@ +教你用 google-drive-ocamlfuse 在 Linux 上挂载 Google Drive +===================== + +>如果你在找一个方便的方式在 Linux 机器上挂载你的 Google Drive 文件夹, Jack Wallen 将教你怎么使用 google-drive-ocamlfuse 来挂载 Google Drive。 + +![](http://tr4.cbsistatic.com/hub/i/2016/05/18/ee5d7b81-e5be-4b24-843d-d3ca99230a63/651be96ac8714698f8100afa6883e64d/linuxcloudhero.jpg) +>图片来源: Jack Wallen + +Google 还没有发行 Linux 版本的 Google Drive 应用,尽管现在有很多方法从 Linux 中访问你的 Drive 文件。 +(注:不清楚 app 需不需要翻译成应用,这里翻译了) + +如果你喜欢界面化的工具,你可以选择 Insync。如果你喜欢用命令行,这有很多工具,像 Grive2 和用 Ocaml 语言编写的、非常容易使用的、基于 FUSE 的系统(注:there are tools such as Grive2 and the incredibly easy to use FUSE-based system written in Ocaml. 这一句感觉翻译不出来)。我将会用后面这种方式演示如何在 Linux 桌面上挂载你的 Google Drive。尽管这是通过命令行完成的,但是它的用法会简单到让你吃惊。它太简单了以至于谁都能做到。 + +系统特点: + +- 对普通文件/文件夹有完全的读写权限 +- 对于 Google Docs,sheets,slides 这三个应用只读 +- 能够访问 Drive 回收站(.trash) +- 处理重复文件功能 +- 支持多个帐号 + +接下来完成 google-drive-ocamlfuse 在 Ubuntu 16.04 桌面的安装,然后你就能够访问云盘上的文件了。 + +### 安装 + +1. 打开终端。 +2. 用`sudo add-apt-repository ppa:alessandro-strada/ppa`命令添加必要的 PPA +3. 出现提示的时候,输入密码并按下回车。 +4. 用`sudo apt-get update`命令更新应用。 +5. 输入`sudo apt-get install google-drive-ocamlfuse`命令安装软件。 +(注:这里,我把所有的命令加上着重标记了) + +### 授权 + +接下来就是授权 google-drive-ocamlfuse,让它有权限访问你的 Google 账户。先回到终端窗口敲下命令 google-drive-ocamlfuse,这个命令将会打开一个浏览器窗口,它会提示你登陆你的 Google 帐号或者如果你已经登陆了 Google 帐号,它会询问是否允许 google-drive-ocamlfuse 访问 Google 账户。如果你还没有登陆,先登陆然后点击允许。接下来的窗口(在 Ubuntu 16.04 桌面上会出现,但不会出现在基本系统 Freya 桌面上)将会询问你是否授给 gdfuse 和 OAuth2 Endpoint访问你的 Google 账户的权限,再次点击允许。然后出现的窗口就会告诉你等待授权令牌下载完成,这个时候就能最小化浏览器了。当你的终端提示像图 A 一样的内容,你就能知道令牌下载完了,并且你已经可以挂载 Google Drive 了。 + +**图 A** + +![](http://tr4.cbsistatic.com/hub/i/r/2016/05/18/a493122b-445f-4aca-8974-5ec41192eede/resize/620x/6ae5907ad2c08dc7620b7afaaa9e389c/googledriveocamlfuse3.png) +>图片来源: Jack Wallen + +**应用已经得到授权,你可以进行后面的工作。** + +### 挂载 Google Drive + +在挂载 Google Drive 之前,你得先创建一个文件夹,作为挂载点。在终端里,敲下`mkdir ~/google-drive`命令在你的家目录下创建一个新的文件夹。最后敲下命令`google-drive-ocamlfuse ~/google-drive`将你的 Google Drive 挂载到 google-drive 文件夹中。 + +这时你可以查看本地 google-drive 文件夹中包含的 Google Drive 文件/文件夹。你能够把 Google Drive 当作本地文件系统来进行工作。 + +当你想 卸载 google-drive 文件夹,输入命令 `fusermount -u ~/google-drive`。 + +### 没有 GUI,但它特别好用 + +我发现这个特别的系统非常容易使用,在同步 Google Drive 时它出奇的快,并且这可以作为一种巧妙的方式备份你的 Google Drive 账户。 + +试试 google-drive-ocamlfuse,看看你能用它做出什么有趣的事。 + +-------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/article/how-to-mount-your-google-drive-on-linux-with-google-drive-ocamlfuse/ + +作者:[Jack Wallen ][a] +译者:[GitFuture](https://github.com/GitFuture) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.techrepublic.com/search/?a=jack+wallen From 673fcc0656a3100a0df12f69ae16d3f4c4cdcc70 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Jun 2016 13:58:44 +0800 Subject: [PATCH 1536/1710] PUB:20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server @strugglingyouth --- ...ll MariaDB 10 on CentOS 7 CPanel Server.md | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) rename {translated/tech => published}/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md (86%) diff --git a/translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md b/published/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md similarity index 86% rename from translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md rename to published/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md index 8d452af0ad..7bb0c3d00f 100644 --- a/translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md +++ b/published/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md @@ -1,8 +1,7 @@ - 在 CentOS 7 CPanel 服务器上安装 MariaDB 10 ================================================================================ -MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主要由 MariaDB 社区在维护,采用 GPL v2 授权许可。软件的安全性是 MariaDB 开发者的主要焦点。他们保持为 MariaDB 的每个版本发布安全补丁。当有任何安全问题被发现时,开发者会尽快修复并推出 MariaDB 的新版本。 +MariaDB 是一个增强版的、开源的 MySQL 替代品。它主要由 MariaDB 社区在维护,采用 GPL v2 授权许可。软件的安全性是 MariaDB 开发者的主要焦点。他们保持为 MariaDB 的每个版本发布安全补丁。当有任何安全问题被发现时,开发者会尽快修复并推出 MariaDB 的新版本。 ### MariaDB 的优势 ### @@ -12,7 +11,7 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 - 性能更好 - 比 MySQL 的存储引擎多 -在这篇文章中,我将谈论关于如何升级 MySQL5.5 到最新的 MariaDB 在CentOS7 CPanel 服务器上。在安装前先完成以下步骤。 +在这篇文章中,我将谈论关于如何在 CentOS7 CPanel 服务器上升级 MySQL5.5 到最新的 MariaDB 。在安装前先完成以下步骤。 ### 先决条件: ### @@ -62,7 +61,7 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 #### 3. 从服务器上删除和卸载 MySQL 所有的 RPM 包 #### -运行以下命令来禁用 MySQL 的 RPM 的目标。通过运行此命令,cPanel 将不再处理 MySQL 的更新,并在系统上将卸载的标记为 rpm.versions。 +运行以下命令来禁用 MySQL RPM 的目标(target)。通过运行此命令,cPanel 将不再处理 MySQL 的更新,并在系统上将这些 RPM 版本标记为已卸载。 /scripts/update_local_rpm_versions --edit target_settings.MySQL50 uninstalled /scripts/update_local_rpm_versions --edit target_settings.MySQL51 uninstalled @@ -72,7 +71,8 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 现在运行以下命令: /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 -移除服务器上所有已存在的 MySQL rpms 来为 MariaDB 的安装清理环境。请看下面的输出: + +移除服务器上所有已有的 MySQL RPM 来为 MariaDB 的安装清理环境。请看下面的输出: root@server1 [/var/lib/mysql]# /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 [2016-01-31 09:53:59 +0000] @@ -97,9 +97,9 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 [2016-01-31 09:54:04 +0000] Removed symlink /etc/systemd/system/multi-user.target.wants/mysql.service. [2016-01-31 09:54:04 +0000] Restoring service monitoring. -通过这些步骤,我们已经卸载了现有的 MySQL RPMs,并做了标记来防止 MySQL的更新,服务器的环境已经清理然后准备安装 MariaDB。 +通过这些步骤,我们已经卸载了现有的 MySQL RPM,并做了标记来防止 MySQL的更新,服务器的环境已经清理,然后准备安装 MariaDB。 -开始安装吧,我们需要在 CentOS 为 MariaDB 创建一个 yum 软件库。下面是我的做法! +开始安装吧,我们需要根据 CentOS 和 MariaDB 的版本为 MariaDB 创建一个 yum 软件库。下面是我的做法! ### 安装步骤: ### @@ -120,18 +120,20 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 #### 第2步:打开 /etc/yum.conf 并修改如下行: #### -**Remove this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* +**删除这一行:** -**And replace with this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* nsd* proftpd* pure-ftpd* spamassassin* squirrelmail* + exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* -**\*\*\* IMPORTANT \*\*\*** +**替换为:** + + exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* nsd* proftpd* pure-ftpd* spamassassin* squirrelmail* + +**重要** 需要确保我们已经从 exclude 列表中移除了 MySQL 和 PHP。 #### 第3步:运行以下命令来安装 MariaDB 和相关的包。 #### -**yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql** - root@server1 [~]#yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql Dependencies Resolved @@ -174,7 +176,7 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 #### 第5步:运行 mysql_upgrade 命令。 #### -它将检查所有数据库中的所有表与当前安装的版本是否兼容并在必要时会更新系统表采取新的特权或功能,可能会增加当前版本的性能。 +它将检查所有数据库中的所有表与当前安装的版本是否兼容,并在必要时会更新系统表,以赋予当前版本新增加的权限或能力。 root@server1 [~]# mysql_upgrade @@ -254,7 +256,7 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 Phase 6/6: Running 'FLUSH PRIVILEGES' OK -#### 第6步:再次重新启动MySQL的服务,以确保一切都运行完好。 #### +#### 第6步:再次重新启动 MySQL 的服务,以确保一切都运行完好。 #### root@server1 [~]# systemctl restart mysql root@server1 [~]# @@ -274,17 +276,18 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 Jan 31 10:04:11 server1.centos7-test.com mysql[23854]: Starting MySQL. SUCCESS! Jan 31 10:04:11 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. -#### 第7步:运行 EasyApache 用 MariaDB 重建 Apache/PHP,并确保所有 PHP 的模块保持不变。#### +#### 第7步:运行 EasyApache,重建 Apache/PHP 以支持 MariaDB,并确保所有 PHP 的模块保持不变。#### root@server1 [~]#/scripts/easyapache --build - ****IMPORTANT ***** - If you forget to rebuild Apache/PHP after the MariaDB installation, it will report the library error as below: +**重要** + +如果你在安装 MariaDB 之后忘记重建 Apache/PHP,将会报如下库错误: root@server1 [/etc/my.cnf.d]# php -v php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory -#### 第8步:现在验证安装的数据库。 #### +#### 第8步:现在验证安装的程序和数据库。 #### root@server1 [/var/lib/mysql]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. @@ -313,13 +316,14 @@ MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主 10 rows in set (0.00 sec) 就这样 :)。现在,我们该去欣赏 MariaDB 完善和高效的特点了。希望你喜欢阅读本文。希望留下您宝贵的建议和反馈! + -------------------------------------------------------------------------------- via: http://linoxide.com/how-tos/install-mariadb-10-centos-7-cpanel/ 作者:[Saheetha Shameer][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 967ee84bb7e3066208d73fa4e444f727ca6aec36 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Jun 2016 14:09:01 +0800 Subject: [PATCH 1537/1710] PUB:20160218 Getting to Know Linux File Permissions @ynmlml --- ... Getting to Know Linux File Permissions.md | 80 ++++++++----------- 1 file changed, 35 insertions(+), 45 deletions(-) rename {translated/tech => published}/20160218 Getting to Know Linux File Permissions.md (62%) diff --git a/translated/tech/20160218 Getting to Know Linux File Permissions.md b/published/20160218 Getting to Know Linux File Permissions.md similarity index 62% rename from translated/tech/20160218 Getting to Know Linux File Permissions.md rename to published/20160218 Getting to Know Linux File Permissions.md index 2730806d61..99390b69ae 100644 --- a/translated/tech/20160218 Getting to Know Linux File Permissions.md +++ b/published/20160218 Getting to Know Linux File Permissions.md @@ -1,34 +1,29 @@ -初识Linux文件权限 +初识 Linux 文件权限 ================================================================================ -在 Linux 中最基本的任务之一就是设置文件权限。理解如何实现是你进入 LInux 世界的第一步。如您所料,这一基本操作在类 UNIX 操作系统中大同小异。实际上,Linux 文件权限系统就直接取自于 UNIX 文件权限(甚至使用许多相同的工具)。 +在 Linux 中最基本的任务之一就是设置文件权限。理解如何实现是你进入 Linux 世界的第一步。如您所料,这一基本操作在类 UNIX 操作系统中大同小异。实际上,Linux 文件权限系统就直接取自于 UNIX 文件权限(甚至使用许多相同的工具)。 ![](http://www.linux.com/images/stories/66866/files_a.png) 但不要以为理解文件权限需要长时间的学习。事实上会很简单,让我们一起来看看你需要了解哪些内容以及如何使用它们。 -##基础概念 +###基础概念 -你要明白的第一件事是文件权限适用于什么。你做的更有效的就是设置一个分组的权限。当你将其分解,那这个概念就真的简单多了。那到底什么是权限,什么是分组呢? +你要明白的第一件事是文件权限可以用来干什么。当你设置一个分组的权限时发生了什么?让我们将其展开来说,这个概念就真的简单多了。那到底什么是权限,什么是分组呢? 你可以设置的3种权限: -- 读 — 允许该组读文件(用`r`表示) +- 读 — 允许该分组读文件(用`r`表示) +- 写 — 允许该分组写文件(用`w`表示) +- 执行 — 允许该分组执行(运行)文件(用`x`表示) -- 写 — 允许该组写文件(用`w`表示) - -- 执行 — 允许该组执行(运行)文件(用`x`表示) - -为了更好地解释这如何应用于一个分组,例如,你允许一个分组读和写一个文件,但不能执行。或者,你可以允许一个组读和执行一个文件,但不能写。甚至你可以允许一组有读、写、执行全部的权限,也可以删除全部权限来剥夺组权限。 +为了更好地解释这如何应用于一个分组,例如,你允许一个分组可以读写一个文件,但不能执行。或者,你可以允许一个分组读和执行一个文件,但不能写。甚至你可以允许一个分组有读、写、执行全部的权限,也可以删除全部权限来去除该组的权限。 现在,什么是分组呢,有以下4个: - user — 文件实际的拥有者 - -- group — 用户所在的组 - +- group — 用户所在的用户组 - others — 用户组外的其他用户 - - all — 所有用户 大多数情况,你只会对前3组进行操作,`all` 这一组只是作为快捷方式(稍后我会解释)。 @@ -37,103 +32,98 @@ 如果你打开一个终端并运行命令 `ls -l`,你将会看到逐行列出当前工作目录下所有的文件和文件夹的列表(如图1). -你会留意到最左边那列是像 `-rw-rw-r--` 这样的。 +你会留意到最左边那列是像是 `-rw-rw-r--` 这样的。 -实际上这列表该这样看的: +实际上这列表应该这样看: ->rw- rw- r-- +> rw- rw- r-- 正如你所见,列表将其分为如下3部分: - rw- - - rw- - - r-- -权限和组的顺序都很重要,顺序总是: +权限和组的顺序都很重要,顺序总是: - 所属者 所属组 其他人 — 分组 - - 读 写 执行 — 权限 -在我们上面示例的权限列表中,所属者拥有读/写权限,所属组拥有读/写权限,其他人用户仅拥有读权限。这些分组中赋予执行权限的话,就用一个x表示。 +在我们上面示例的权限列表中,所属者拥有读/写权限,所属组拥有读/写权限,其他人用户仅拥有读权限。这些分组中赋予执行权限的话,就用一个 x 表示。 -## 等效数值 +### 等效数值 接下来我们让它更复杂一些,每个权限都可以用一个数字表示。这些数字是: - 读 — 4 - - 写 — 2 - - 执行— 1 数值代替不是一个一个的替换,你不能像这样: ->-42-42-4-- +> -42-42-4-- 你该把每个分组的数值相加,给用户读和写权限,你该用 4 + 2 得到 6。给用户组相同的权限,也是使用相同的数值。假如你只想给其他用户读的权限,那就设置它为4。现在用数值表示为: ->664 +> 664 -如果你想给一个文件664权限,你可以使用chmod命令,如: +如果你想给一个文件664权限,你可以使用 `chmod` 命令,如: ->chmod 664 FILENAME + chmod 664 FILENAME FILENAME 处为文件名。 -## 更改权限 +### 更改权限 -既然你已经理解了文件权限,那是时候学习如何更改这些权限了。就是使用chmod命令来实现。第一步你要知道你能否更改文件权限,你必须是文件的所有者或者有权限编辑文件(或者使用su或sudo进行操作)。正因为这样,你不能随意切换目录和更改文件权限。 +既然你已经理解了文件权限,那是时候学习如何更改这些权限了。就是使用 `chmod` 命令来实现。第一步你要知道你能否更改文件权限,你必须是文件的所有者或者有权限编辑文件(或者通过 `su` 或 `sudo` 得到权限)。正因为这样,你不能随意切换目录和更改文件权限。 继续用我们的例子 (`-rw-rw-r--`)。假设这个文件(命名为 script.sh)实际是个shell脚本,需要被执行,但是你只想让自己有权限执行这个脚本。这个时候,你可能会想:“我需要是文件的权限如 `-rwx-rw-r--`”。为了设置 `x` 权限位,你可以这样使用 `chmod` 命令: ->chmod u+x script.sh + chmod u+x script.sh 这时候,列表中显示的应该是 -rwx-rw-r-- 。 如果你想同时让用户及其所属组同时拥有执行权限,命令应该这样: ->chmod ug+x script.sh + chmod ug+x script.sh 明白这是怎么工作的了吗?下面我们让它更有趣些。不管什么原因,你不小心给了所有分组对文件的执行权限(列表中是这样的 `-rwx-rwx-r-x`)。 如果你想去除其他用户的执行权限,只需运行命令: ->chmod o-x script.sh + chmod o-x script.sh 如果你想完全删除文件的可执行权限,你可以用两种方法: ->chmod ugo-x script.sh + chmod ugo-x script.sh 或者 ->chmod a-x script.sh + chmod a-x script.sh -以上就是所有内容,能使操作更有效率。我希望能避免哪些可能会导致一些问题的操作(例如你不小心对 script.sh 使用 `a-rwx` 这样的chmod命令)。 +以上就是所有内容,能使操作更有效率。我希望能避免哪些可能会导致一些问题的操作(例如你不小心对 script.sh 使用 `a-rwx` 这样的 `chmod` 命令)。 -## 目录权限 +### 目录权限 你也可以对一个目录执行 `chmod` 命令。当你作为用户创建一个新的目录,通常新建目录具有这样的权限: ->drwxrwxr-x +> drwxrwxr-x 注:开头的 `d` 表示这是一个目录。 -正如你所见,用户及其所在组都对文件夹具有操作权限,但这并不意味着在这文件夹中出创建的问价也具有与其相同的权限(创建的文件使用默认系统的权限 `-rw-rw-r--`)。但如果你想在新文件夹中创建文件,并且移除用户组的写权限,你不用切换到该目录下并对所有文件使用chmod命令。你可以用加上参数R(意味着递归)的 `chmod` 命令,同时更改该文件夹及其目录下所有的文件的权限。 +正如你所见,用户及其所在组都对文件夹具有操作权限,但这并不意味着在这文件夹中出创建的文件也具有与其相同的权限(创建的文件使用默认系统的权限 `-rw-rw-r--`)。但如果你想在新文件夹中创建文件,并且移除用户组的写权限,你不用切换到该目录下并对所有文件使用 `chmod` 命令。你可以用加上参数 R(意味着递归)的 `chmod` 命令,同时更改该文件夹及其目录下所有的文件的权限。 现在,假设有一文件夹 TEST,里面有一些脚本,所有这些(包括 TEST 文件夹)拥有权限 `-rwxrwxr-x`。如果你想移除用户组的写权限,你可以运行命令: ->chmod -R g-w TEST + chmod -R g-w TEST 运行命令 `ls -l`,你讲看到列出的 TEST 文件夹的权限信息是 `drwxr-xr-x`。用户组被去除了写权限(其目录下的所有文件也如此)。 -## 总结 +### 总结 -现在,你应该对基本的Linux文件权限有了深入的理解。对于更高级的东西学起来会很轻松,像`setid`,`setuid` 和 `ACLs` 这些。没有良好的基础,你很快就会混淆不清概念的。 +现在,你应该对基本的 Linux 文件权限有了深入的理解。对于更高级的东西学起来会很轻松,像 setgid、setuid 和 ACL 这些。没有良好的基础,你很快就会混淆不清概念的。 -Linux 文件权限从早期到现在没有太大变化,而且很可能以后也不会。 +Linux 文件权限从早期到现在没有太大变化,而且很可能以后也不会变化。 ------------------------------------------------------------------------------ @@ -141,7 +131,7 @@ via: http://www.linux.com/learn/tutorials/885268-getting-to-know-linux-file-perm 作者:[Jack Wallen][a] 译者:[ynmlml](https://github.com/ynmlml) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 74d758d226eb475b9b36d3a541772c211658a322 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 14 Jun 2016 16:41:09 +0800 Subject: [PATCH 1538/1710] =?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 --- ...droid Use Apps Even Without Installing Them.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/translated/talk/20160518 Android Use Apps Even Without Installing Them.md b/translated/talk/20160518 Android Use Apps Even Without Installing Them.md index 12fd11ca7e..a8aecc1d19 100644 --- a/translated/talk/20160518 Android Use Apps Even Without Installing Them.md +++ b/translated/talk/20160518 Android Use Apps Even Without Installing Them.md @@ -1,16 +1,15 @@ 安卓的下一场革命:不安装即可使用应用! =================================================================== +谷歌安卓的一项新创新将可以让你无需安装即可在你的设备上使用应用程序。现在已经初具雏形。 -谷歌安卓的一项新创新将让你可以使用没有在你的设备上安装的应用。现在已经有了一些原型了。 +还记得那时候吗,某人发给你了一个链接,要求你通过安装来查看应用。 -还记得某人给你发了一个链接,要求你安装一个应用来查看的情形吗? - -是否要安装这个应用来查看一个一次性的链接,这个困境一定让你感到很挫败。而且,应用安装本身也会消耗你不少宝贵的时间。 +是否要安装这个应用来查看一个一次性的链接,这种进退两难的选择一定让你感到很沮丧。而且,应用安装本身也会消耗你不少宝贵的时间。 上述场景可能大多数人都经历过,或者说大多数现代科技用户都经历过。尽管如此,我们都接受这是正确且合理的过程。 -真的吗? +事实真的如此吗? 针对这个问题谷歌的安卓部门给出了一个全新的,开箱即用的答案: @@ -24,9 +23,9 @@ Android Instant Apps 声称第一时间帮你摆脱这样的两难境地,让 #### 它是怎么工作的? -Instant Apps 和你已经熟悉的应用基本相同,只有一个不同——这些应用为了满足你完成某项任务的需要,只提供给你已经经过**裁剪和模块化**的应用关键部分。 +Instant Apps 和你已经熟悉的应用基本相同,只有一个不同——这些应用为了满足你完成某项任务的需要,只提供给你已经经过**裁剪和模块化**的应用必要部分。 -例如,展开打开链接的场景作为例子,为了查看一个链接,你不需要拥有一个可以写,发送,做咖啡或其它特性的全功能应用。你所需要的全部就是查看功能——而这就是你所会获取到的部分。 +例如,展开打开链接的场景作为例子,为了查看一个链接,你不需要拥有一个可以写、发送,做咖啡或其它特性的全功能应用。你所需要的全部就是查看功能——而这就是你所会获取到的部分。 这样应用就可以快速打开,让你可以完成你的目标任务。 @@ -59,7 +58,7 @@ via: http://www.iwillfolo.com/androids-next-revolution-use-apps-even-without-ins 作者:[iwillfolo][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 08343597a930eaf3794bb396a3e7d685019c0300 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 14 Jun 2016 18:59:53 +0800 Subject: [PATCH 1539/1710] =?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 --- ...lation Guide on Ubuntu Server 16.04 LTS.md | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md b/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md index a687e87a30..1dc4e1133d 100644 --- a/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md +++ b/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md @@ -1,7 +1,7 @@ 在 Ubuntu Server 16.04 LTS 上安装 LAMP ========================================================= -LAMP方案是一系列自由和开源软件的集合,包含了 **Linux**, web服务器 (**Apache**), 数据库服务器 (**MySQL / MariaDB**) 和 **PHP** (脚本语言). LAMP是那些需要安装和构建动态网页应用的基础平台,比如WordPress, Joomla, OpenCart and Drupal。 +LAMP方案是一系列自由和开源软件的集合,包含了 **Linux**, web服务器 (**Apache**), 数据库服务器 (**MySQL / MariaDB**) 和 **PHP** (脚本语言). LAMP是那些需要安装和构建动态网页应用的基础平台,比如WordPress、Joomla, OpenCart 和 Drupal。 在这篇文章中,我将描述如何在Ubuntu Server 16.04 LTS 上安装LAMP,众所周知Ubuntu是一个基于linux的操作系统,因此它构成了LAMP的第一个部分,在接下来的操作中,我将默认你已经安装了 Ubuntu Server 16.04。 @@ -40,23 +40,23 @@ linuxtechi@ubuntu:~$ ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Apache2-Ubuntu-server-16.04-1024x955.jpg) -### 数据库服务器的安装r (MySQL Server 5.7) : +### 数据库服务器的安装 (MySQL Server 5.7) : -MySQL 和 MariaDB 都是 Ubuntu 16.04 中的数据库服务器. MySQL Server 和 MariaDB Server的安装包都可以在Ubuntu的默认软件源中找到,我们可以选择其中的一个来安装.通过下面的命令来在终端中安装mysql服务器 +MySQL 和 MariaDB 都是 Ubuntu 16.04 中的数据库服务器。 MySQL Server 和 MariaDB Server的安装包都可以在Ubuntu的默认软件源中找到,我们可以选择其中的一个来安装.通过下面的命令来在终端中安装mysql服务器。 ``` linuxtechi@ubuntu:~$ sudo apt install mysql-server mysql-client ``` -在安装过程中,它会要求你设置mysql服务器root帐户的密码. +在安装过程中,它会要求你设置mysql服务器root帐户的密码。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Enter-root-password-mysql-server-ubuntu-16-04.jpg) -确认root帐户的密码,并点击确定 +确认root帐户的密码,并点击确定。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-root-password-mysql-server-ubuntu-16-04.jpg) -Mysql 服务器的安装到此已经结束了, MySQL 服务会自动变成可用状态和自动启动.我们可以通过如下的命令来校验Mysql服务的状态 +Mysql 服务器的安装到此已经结束了, MySQL 服务会自动变成可用状态和自动启动。我们可以通过如下的命令来校验Mysql服务的状态。 ``` linuxtechi@ubuntu:~$ sudo systemctl status mysql.service @@ -84,7 +84,7 @@ PHP 7 已经存在于Ubuntu的软件源中了,在终端中执行如下的命 linuxtechi@ubuntu:~$ sudo apt install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 ``` -创建一个简单的php页面,并且将它移动到 apache的文档根目录下 (/var/ww/html) +创建一个简单的php页面,并且将它移动到 apache 的文档根目录下 (/var/ww/html) ``` linuxtechi@ubuntu:~$ vi samplepage.php @@ -100,17 +100,17 @@ linuxtechi@ubuntu:~$ sudo mv samplepage.php /var/www/html/ ``` 现在你可以从web浏览器中访问这个页面, -输入 : “http:///samplepage.php” ,你可以看到如下页面. +输入 : “http:///samplepage.php” ,你可以看到如下页面。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Sample-PHP-Page-Ubuntu-Server-16-04.jpg) -以上的页面向我们展示了PHP已经完全安装成功了 +以上的页面向我们展示了PHP已经完全安装成功了。 ### phpMyAdmin的安装: -phpMyAdmin可以让我们通过它的web界面来执行所有和数据库管理和其他数据库操作相关的任务,这个安装包已经存在于Ubuntu的软件源中 +phpMyAdmin可以让我们通过它的web界面来执行所有与数据库管理和其他数据库操作相关的任务,这个安装包已经存在于Ubuntu的软件源中。 -利用如下的命令来在Ubuntu server 16.04 LTS中安装phpMyAdmin +利用如下的命令来在Ubuntu server 16.04 LTS中安装phpMyAdmin。 ``` linuxtechi@ubuntu:~$ sudo apt install php-mbstring php7.0-mbstring php-gettext @@ -120,34 +120,33 @@ linuxtechi@ubuntu:~$ sudo apt install phpmyadmin 在以下的安装过程中,它会提示我们选择phpMyAdmin运行的目标服务器 - -选择 Apache2 并点击确定 +选择 Apache2 并点击确定。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Web-Server-for-phpMyAdmin-Ubuntu-Server-16-04.jpg) -点击确定来配置phpMyAdmin管理的数据库 +点击确定来配置phpMyAdmin管理的数据库。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/configure-database-for-phpmyadmin-ubuntu-server-16-04.jpg) -指定phpMyAdmin向数据库服务器注册时所用的密码 +指定phpMyAdmin向数据库服务器注册时所用的密码。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Select-Password-for-phpMyadmin-ubuntu-16-04-1024x433.jpg) -确认phpMyAdmin所需的密码,并点击确认 +确认phpMyAdmin所需的密码,并点击确认。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-password-for-phpmyadmin-ubuntu-server-16-04.jpg) 现在可以开始尝试访问phpMyAdmin, 打开浏览器并输入 : “http://Server_IP_OR_Host_Name/phpmyadmin” -利用我们安装时设置的 root帐户和密码 +使用我们安装时设置的 root 帐户和密码。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-Ubuntu-Server-16-04-1024x557.jpg) -当我们点击“Go”的时候,将会重定向到如下所示的 ‘phpMyAdmin’web界面 +当我们点击“Go”的时候,将会重定向到如下所示的 ‘phpMyAdmin’web界面。 ![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-portal-overview-ubuntu-server-16-04-1024x557.jpg) -到现在,LAMP方案已经被成功安装和使用了,欢迎分享你的反馈和评论。 +到现在,LAMP方案已经被成功安装并可以使用了,欢迎分享你的反馈和评论。 -------------------------------------------------------------------------------- @@ -155,8 +154,8 @@ via: http://www.linuxtechi.com/lamp-stack-installation-on-ubuntu-server-16-04/ 作者:[Pradeep Kumar][a] 译者:[陆建波](https://github.com/lujianbo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [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 5c021ad68c63f02bf1b5d37ed7eaef63327dfcc6 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Jun 2016 19:51:07 +0800 Subject: [PATCH 1540/1710] PUB:20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016 @sarishinohara --- ...LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md | 95 +++++++++---------- 1 file changed, 44 insertions(+), 51 deletions(-) rename {translated/tech => published}/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md (57%) diff --git a/translated/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md b/published/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md similarity index 57% rename from translated/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md rename to published/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md index 24cb248921..57f7b5a314 100644 --- a/translated/tech/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md +++ b/published/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md @@ -1,4 +1,4 @@ -2016年最佳 Linux 图像管理软件 +2016 年最佳 Linux 图像管理软件 ============================================= ![](http://itsfoss.com/wp-content/uploads/2016/05/Best-Linux-Photo-Management-Software.jpg) @@ -11,119 +11,111 @@ 这个列表和我们先前的 [最佳图像程序应用][1] 有些差别,上次我们介绍了图像编辑软件,绘图软件等,而这次的介绍主要集中在图像管理软件上。 -好,下面我们开始介绍。我会详细说明在 Ubuntu 下的安装命令以及衍生的命令,我们只需要打开终端运行这些命令。 +好,下面我们开始介绍。我会详细说明在 Ubuntu 及其衍生版下的安装命令,我们只需要打开终端运行这些命令。 -### [GTHUMB](https://wiki.gnome.org/Apps/gthumb) +### [gThumb](https://wiki.gnome.org/Apps/gthumb) ![](http://itsfoss.com/wp-content/uploads/2016/05/gThumb-1-1024x540.jpg) ->gThumb 图像编辑器 -gThumb 是在 GNOME 桌面环境下的一个轻量级的图像管理应用,它涵盖了基本图像管理功能,编辑图片以及更加高级的操作,gThumb 主要功能如下: +*gThumb 图像编辑器* -- 图片查看:支持所有主流的图片格式(包括gif)和元数据(EXIF, XMP 等)。 +gThumb 是在 GNOME 桌面环境下的一个轻量级的图像管理应用,它涵盖了基本图像管理功能,比如编辑图片以及更加高级的操作等,gThumb 主要功能如下: -- 图片浏览:所有基础的浏览操作(缩略图,移动,复制,删除等)以及书签支持。 +- 图片查看:支持所有主流的图片格式(包括 gif)和元数据(EXIF、 XMP 等)。 +- 图片浏览:所有基础的浏览操作(缩略图、移动、复制、删除等)以及书签支持。 +- 图片管理:使用标签、目录和库来组织图片。从数码相机导入图片,集成了网络相册(Picasa,Flickr,Facebook等)。 +- 图片编辑:基本图像编辑操作、滤镜、格式转换等。 -- 图片管理:使用标签操作图片,目录和图片库。从数码相机,网络相册(Picasa,Flickr,Facebook等)整合,导入图片。 +更多功能请参考官方 [gThumb 功能][2] 列表。如果你使用的是 GNOME 或者基于 GNOME 的桌面环境(如 MATE),那么你一定要试用一下。 -- 图片编辑:基本图像编辑操作,滤镜,格式转换等。 - -- 更多功能请参考官方 [gThumb功能][2] 列表。如果你使用的是 GNOME 或者基于 GNOME 的桌面环境(如 MATE),那么你一定要试用一下。 - -#### GTHUMB 安装 +#### gThumb 安装 ``` sudo apt-get install gthumb ``` -### [DIGIKAM][3] +### [digiKam][3] ![](http://itsfoss.com/wp-content/uploads/2016/05/digiKam-1-1024x540.png) ->digiKam + +*digiKam* digiKam 主要为 KDE 而设计,在其他桌面环境下也可以使用。它有很多很好的图像界面功能,主要功能如下所示: -- 图片管理:相册,子相册,标签,评论,元数据,排序支持。 - -- 图片导入:支持从数码相机,USB设备,网络相册(包括 Picasa 和 Facebook)导入,以及另外一些功能。 - -- 图片输出:支持输出至很多网络在线平台,以及各式转换。 - +- 图片管理:相册、子相册、标签、评论、元数据、排序支持。 +- 图片导入:支持从数码相机、USB设备、网络相册(包括 Picasa 和 Facebook)导入,以及另外一些功能。 +- 图片输出:支持输出至很多网络在线平台,以及格式转换。 - 图片编辑:支持很多图像编辑的操作。 -digiKam 是众多优秀图像管理软件之一。 +毫无疑问,digiKam 如果不是最好的图像管理软件,也是之一。 -#### DIGIKAM 安装 +#### digiKam 安装 ``` sudo apt-get install digikam ``` -### [SHOTWELL][4] +### [Shotwell][4] ![](http://itsfoss.com/wp-content/uploads/2016/05/Shotwell-1-1024x540.png) ->Shotwell + +*Shotwell* Shotwell 图像管理也是为 GNOME 桌面环境设计,虽然功能不及 gThumb 多,但满足了基本需求。主要功能如下: - 从磁盘或数码相机导入图片。 - -- 项目,标签和文件夹管理。 - +- 事件、标签和基于文件夹的图片管理方式。 - 基本图片编辑功能和格式转换。 - - 支持上传至网络平台(Facebook,Flickr,Tumblr 等)。 如果你想要一款功能相对简单的应用,你可以尝试一下这个。 -#### SHOTWELL 安装 +#### Shotwell 安装 ``` sudo apt-get install shotwell ``` -### [KPHOTOALBUM][5] +### [KPhotoAlbum][5] ![](http://itsfoss.com/wp-content/uploads/2016/05/KPhotoAlbum-1-1024x540.png) ->KPhotoAlbum -KPhotoAlbum 是一款在 KDE 桌面环境下的图像管理应用。它有一些独特的功能:分类和基于时间浏览。你可以基于人物,地点,时间分类;另外在用户图形界面底部会显示时间栏。 +*KPhotoAlbum* + +KPhotoAlbum 是一款在 KDE 桌面环境下的图像管理应用。它有一些独特的功能:分类和基于时间浏览。你可以基于人物、地点、时间分类;另外在用户图形界面底部会显示时间栏。 KPhotoAlbum 有很多图像管理和编辑功能,主要功能包括: -- 高级图片操作(目录,子目录,标签,元数据,注释等)。 - +- 高级图片操作(分类、子分类、标签、元数据、注释等等)。 - 图片导入导出功能(包括主流图片分享平台)。 - - 众多编辑功能(包括批量处理)。 -这些高级的功能有它们的缺点,就是用户需要手工操作。但如果你是KDE爱好者,这是个好的选择。它完美适用 KDE,但是你也可以在非 KDE 桌面环境下使用 KPhotoAlbum。 +这些高级的功能有一些缺点,就是用户大多需要手工操作。但如果你是 KDE 爱好者,这是个好的选择。它完美适用 KDE,但是你也可以在非 KDE 桌面环境下使用 KPhotoAlbum。 -#### KPHOTOALBUM 安装 +#### KPhotoAlbum 安装 ``` sudo apt-get install kphotoalbum ``` -### [DARKTABLE][7] +### [Darktable][7] ![](http://itsfoss.com/wp-content/uploads/2016/05/darktable-1-1024x540.png) ->Darktable -Darktable 相较于图像管理更偏向于图像编辑。Darktable 有良好的用户图形界面,对桌面环境没有特殊的要求,以及图像编辑功能。它的基本功能如下: +*Darktable* + +Darktable 与其说是图像管理工具,不如说是图像编辑软件。Darktable 有良好的用户图形界面,对桌面环境没有特殊的要求,这也不会影响到它的图像编辑功能。它的基本功能如下: - 基本图片管理。 - - 众多高级的图片编辑功能。 - - 支持导出至 Picasa 和 Flickr 和格式转换。 如果你喜欢照片编辑和润色,Darktable 是个好的选择。 -> 推荐阅读:[怎样在Ubuntu下通过PPA安装Darktable 2.0][8] +> 推荐阅读:[怎样在 Ubuntu 下通过 PPA 安装 Darktable 2.0][8] -#### DARKTABLE 安装 +#### Darktable 安装 ``` sudo add-apt-repository ppa:pmjdebruijn/darktable-release @@ -133,7 +125,7 @@ sudo apt-get install darktable ### 其它 -如果你想要功能简单的应用,比如从便携设备(相机,手机,便携设备等)中导入照片并存入磁盘,使用 [Rapid Photo Downloader][9],它很适合从便携设备中导入和备份图片,而且安装配置过程简单。 +如果你想要功能简单的应用,比如从便携设备(相机、手机、便携设备等)中导入照片并存入磁盘,毫无疑问该使用 [Rapid Photo Downloader][9],它很适合从便携设备中导入和备份图片,而且安装配置过程简单。 在 Ubuntu 上安装 Rapid Photo Downloade,打开终端输入命令: @@ -142,18 +134,19 @@ sudo apt-get install rapid-photo-downloader ``` 如果你想尝试更多的选择: -- [GNOME Photos][10] (GNOME桌面环境下的图像查看器) -- [Gwenview][11] (KDE桌面环境下的图像查看器) + +- [GNOME Photos][10] (GNOME 桌面环境下的图像查看器) +- [Gwenview][11] (KDE 桌面环境下的图像查看器) - [Picty][12] (开源图像管理器) -那么,你正在使用,或者打算使用其中一款应用吗?你有其它更好的推荐吗?你有最喜欢的 Linux 图像管理软件吗?分享你的观点。 +那么,你正在使用,或者打算使用其中一款应用吗?在 Ubuntu 或其它 Linux 上你有其它更好的推荐吗?你有最喜欢的 Linux 图像管理软件吗?分享你的观点给我们。 ---------- -via: http://itsfoss.com/linux-photo-management-software/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 +via: http://itsfoss.com/linux-photo-management-software/ 作者:[Munif Tanjim][a] 译者:[sarishinohara](https://github.com/sarishinohara) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 448fa76460bbac8177a0ed77c349dfdfbb2b4543 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Jun 2016 20:34:29 +0800 Subject: [PATCH 1541/1710] PUB:20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS @lujianbo --- ...lation Guide on Ubuntu Server 16.04 LTS.md | 159 +++++++++++++++++ ...lation Guide on Ubuntu Server 16.04 LTS.md | 161 ------------------ 2 files changed, 159 insertions(+), 161 deletions(-) create mode 100644 published/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md delete mode 100644 translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md diff --git a/published/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md b/published/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md new file mode 100644 index 0000000000..c74b0eba1b --- /dev/null +++ b/published/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md @@ -0,0 +1,159 @@ +在 Ubuntu Server 16.04 LTS 上安装 LAMP +========================================================= + +LAMP 方案是一系列自由和开源软件的集合,包含了 **Linux**、Web 服务器 (**Apache**)、 数据库服务器 (**MySQL / MariaDB**) 和 **PHP** (脚本语言)。LAMP 是那些需要安装和构建动态网页应用的基础平台,比如WordPress、Joomla、OpenCart 和 Drupal。 + +在这篇文章中,我将描述如何在 Ubuntu Server 16.04 LTS 上安装 LAMP,众所周知 Ubuntu 是一个基于 Linux 的操作系统,因此它构成了 LAMP 的第一个部分,在接下来的操作中,我将默认你已经安装了 Ubuntu Server 16.04。 + +### Apache2 web 服务器的安装 : + +在 Ubuntu linux 中,web 服务器是 Apache2,我们可以利用下面的命令来安装它: + +``` +linuxtechi@ubuntu:~$ sudo apt update +linuxtechi@ubuntu:~$ sudo apt install apache2 -y +``` + +当安装 Apache2 包之后,Apache2 相关的服务是启用的,并在重启后自动运行。在某些情况下,如果你的 Apache2 服务并没有自动运行和启用,你可以利用如下命令来启动和启用它。 + +``` +linuxtechi@ubuntu:~$ sudo systemctl start apache2.service +linuxtechi@ubuntu:~$ sudo systemctl enable apache2.service +linuxtechi@ubuntu:~$ sudo systemctl status apache2.service +``` + +如果你开启了 Ubuntu 的防火墙(ufw),那么你可以使用如下的命令来解除 web 服务器的端口(80和443)限制 + +``` +linuxtechi@ubuntu:~$ sudo ufw status +Status: active +linuxtechi@ubuntu:~$ sudo ufw allow in 'Apache Full' +Rule added +Rule added (v6) +linuxtechi@ubuntu:~$ +``` + +### 现在开始访问你的 web 服务器 : + +打开浏览器并输入服务器的IP地址或者主机名(http://IP\_Address\_OR\_Host\_Name),在我的例子中我的服务器 IP是‘192.168.1.13’ + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Apache2-Ubuntu-server-16.04-1024x955.jpg) + +### 数据库服务器的安装 (MySQL Server 5.7) : + +MySQL 和 MariaDB 都是 Ubuntu 16.04 中的数据库服务器。 MySQL Server 和 MariaDB Server的安装包都可以在Ubuntu 的默认软件源中找到,我们可以选择其中的一个来安装。通过下面的命令来在终端中安装mysql服务器。 + +``` +linuxtechi@ubuntu:~$ sudo apt install mysql-server mysql-client +``` + +在安装过程中,它会要求你设置 mysql 服务器 root 帐户的密码。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Enter-root-password-mysql-server-ubuntu-16-04.jpg) + +确认 root 帐户的密码,并点击确定。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-root-password-mysql-server-ubuntu-16-04.jpg) + +MySQL 服务器的安装到此已经结束了, MySQL 服务会自动启动并启用。我们可以通过如下的命令来校验 MySQL 服务的状态。 + +``` +linuxtechi@ubuntu:~$ sudo systemctl status mysql.service +``` + +### MariaDB Server的安装 : + +在终端中使用如下的命令来安装 Mariadb 10.0 服务器。 + +``` +linuxtechi@ubuntu:~$ sudo apt install mariadb-server +``` + +运行如下的命令来设置 MariaDB root 帐户的密码,还可以用来关闭某些选项,比如关闭远程登录功能。 + +``` +linuxtechi@ubuntu:~$ sudo mysql_secure_installation +``` + +### PHP 脚本语言的安装: + +PHP 7 已经存在于 Ubuntu 的软件源中了,在终端中执行如下的命令来安装 PHP 7: + +``` +linuxtechi@ubuntu:~$ sudo apt install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 +``` + +创建一个简单的 php 页面,并且将它移动到 apache 的文档根目录下 (/var/ww/html) + +``` +linuxtechi@ubuntu:~$ vi samplepage.php + +``` + +在 vi 中编辑之后,保存并退出该文件。 + +``` +linuxtechi@ubuntu:~$ sudo mv samplepage.php /var/www/html/ +``` + +现在你可以从 web 浏览器中访问这个页面, 输入 : “http:///samplepage.php” ,你可以看到如下页面。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Sample-PHP-Page-Ubuntu-Server-16-04.jpg) + +以上的页面向我们展示了 PHP 已经完全安装成功了。 + +### phpMyAdmin 的安装: + +phpMyAdmin 可以让我们通过它的 web 界面来执行所有与数据库管理和其他数据库操作相关的任务,这个安装包已经存在于 Ubuntu 的软件源中。 + +利用如下的命令来在 Ubuntu server 16.04 LTS 中安装 phpMyAdmin。 + +``` +linuxtechi@ubuntu:~$ sudo apt install php-mbstring php7.0-mbstring php-gettext +linuxtechi@ubuntu:~$ sudo systemctl restart apache2.service +linuxtechi@ubuntu:~$ sudo apt install phpmyadmin +``` + +在以下的安装过程中,它会提示我们选择 phpMyAdmin 运行的目标服务器。 + +选择 Apache2 并点击确定。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Web-Server-for-phpMyAdmin-Ubuntu-Server-16-04.jpg) + +点击确定来配置 phpMyAdmin 管理的数据库。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/configure-database-for-phpmyadmin-ubuntu-server-16-04.jpg) + +指定 phpMyAdmin 向数据库服务器注册时所用的密码。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Select-Password-for-phpMyadmin-ubuntu-16-04-1024x433.jpg) + +确认 phpMyAdmin 所需的密码,并点击确认。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-password-for-phpmyadmin-ubuntu-server-16-04.jpg) + +现在可以开始尝试访问 phpMyAdmin,打开浏览器并输入 : “http://Server\_IP\_OR\_Host\_Name/phpmyadmin” + +使用我们安装时设置的 root 帐户和密码。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-Ubuntu-Server-16-04-1024x557.jpg) + +当我们点击“Go”的时候,将会重定向到如下所示的 ‘phpMyAdmin’ web界面。 + +![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-portal-overview-ubuntu-server-16-04-1024x557.jpg) + +到现在,LAMP 方案已经被成功安装并可以使用了,欢迎分享你的反馈和评论。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/lamp-stack-installation-on-ubuntu-server-16-04/ + +作者:[Pradeep Kumar][a] +译者:[陆建波](https://github.com/lujianbo) +校对:[Caroline](https://github.com/carolinewuyan) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.linuxtechi.com/author/pradeep/ diff --git a/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md b/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md deleted file mode 100644 index 1dc4e1133d..0000000000 --- a/translated/tech/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md +++ /dev/null @@ -1,161 +0,0 @@ -在 Ubuntu Server 16.04 LTS 上安装 LAMP -========================================================= - -LAMP方案是一系列自由和开源软件的集合,包含了 **Linux**, web服务器 (**Apache**), 数据库服务器 (**MySQL / MariaDB**) 和 **PHP** (脚本语言). LAMP是那些需要安装和构建动态网页应用的基础平台,比如WordPress、Joomla, OpenCart 和 Drupal。 - -在这篇文章中,我将描述如何在Ubuntu Server 16.04 LTS 上安装LAMP,众所周知Ubuntu是一个基于linux的操作系统,因此它构成了LAMP的第一个部分,在接下来的操作中,我将默认你已经安装了 Ubuntu Server 16.04。 - -### Apache2 web服务器的安装 : - -在Ubuntu linux中,web 服务器称之为 Apache2,我们可以利用下面的命令来安装它 - -``` -linuxtechi@ubuntu:~$ sudo apt update -linuxtechi@ubuntu:~$ sudo apt install apache2 -y -``` - -当安装Apache2包之后,Apache2相关的服务将会在重启后变成可用状态和自动运行,在某些情况下,如果你的Apache2服务并没有自动可用和启动,你可以利用如下命令来启用它。 - -``` -linuxtechi@ubuntu:~$ sudo systemctl start apache2.service -linuxtechi@ubuntu:~$ sudo systemctl enable apache2.service -linuxtechi@ubuntu:~$ sudo systemctl status apache2.service -``` - -如果你开启了Ubuntu的防火墙(ufw),那么你可以使用如下的命令来解除web服务器的端口(80和443)限制 - -``` -linuxtechi@ubuntu:~$ sudo ufw status -Status: active -linuxtechi@ubuntu:~$ sudo ufw allow in 'Apache Full' -Rule added -Rule added (v6) -linuxtechi@ubuntu:~$ -``` - -### 现在开始访问你的web服务器 : - -打开浏览器并输入服务器的IP地址或者主机名 -(http://IP_Address_OR_Host_Name),在我的例子中我的服务器IP是‘192.168.1.13’ - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Apache2-Ubuntu-server-16.04-1024x955.jpg) - -### 数据库服务器的安装 (MySQL Server 5.7) : - -MySQL 和 MariaDB 都是 Ubuntu 16.04 中的数据库服务器。 MySQL Server 和 MariaDB Server的安装包都可以在Ubuntu的默认软件源中找到,我们可以选择其中的一个来安装.通过下面的命令来在终端中安装mysql服务器。 - -``` -linuxtechi@ubuntu:~$ sudo apt install mysql-server mysql-client -``` - -在安装过程中,它会要求你设置mysql服务器root帐户的密码。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Enter-root-password-mysql-server-ubuntu-16-04.jpg) - -确认root帐户的密码,并点击确定。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-root-password-mysql-server-ubuntu-16-04.jpg) - -Mysql 服务器的安装到此已经结束了, MySQL 服务会自动变成可用状态和自动启动。我们可以通过如下的命令来校验Mysql服务的状态。 - -``` -linuxtechi@ubuntu:~$ sudo systemctl status mysql.service -``` - -### MariaDB Server的安装 : - -在终端中利用如下的命令来安装 Mariadb 10.0 服务器。 - -``` -linuxtechi@ubuntu:~$ sudo apt install mariadb-server -``` - -运行如下的命令来设置mariadb root帐户的密码,还可以用来关闭某些选项,比如关闭远程登录功能。 - -``` -linuxtechi@ubuntu:~$ sudo mysql_secure_installation -``` - -### PHP脚本语言的安装: - -PHP 7 已经存在于Ubuntu的软件源中了,在终端中执行如下的命令来安装PHP 7: - -``` -linuxtechi@ubuntu:~$ sudo apt install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 -``` - -创建一个简单的php页面,并且将它移动到 apache 的文档根目录下 (/var/ww/html) - -``` -linuxtechi@ubuntu:~$ vi samplepage.php - -``` - -在vi中编辑之后,保存并退出该文件。 - -``` -linuxtechi@ubuntu:~$ sudo mv samplepage.php /var/www/html/ -``` - -现在你可以从web浏览器中访问这个页面, -输入 : “http:///samplepage.php” ,你可以看到如下页面。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Sample-PHP-Page-Ubuntu-Server-16-04.jpg) - -以上的页面向我们展示了PHP已经完全安装成功了。 - -### phpMyAdmin的安装: - -phpMyAdmin可以让我们通过它的web界面来执行所有与数据库管理和其他数据库操作相关的任务,这个安装包已经存在于Ubuntu的软件源中。 - -利用如下的命令来在Ubuntu server 16.04 LTS中安装phpMyAdmin。 - -``` -linuxtechi@ubuntu:~$ sudo apt install php-mbstring php7.0-mbstring php-gettext -linuxtechi@ubuntu:~$ sudo systemctl restart apache2.service -linuxtechi@ubuntu:~$ sudo apt install phpmyadmin -``` - -在以下的安装过程中,它会提示我们选择phpMyAdmin运行的目标服务器 - -选择 Apache2 并点击确定。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Web-Server-for-phpMyAdmin-Ubuntu-Server-16-04.jpg) - -点击确定来配置phpMyAdmin管理的数据库。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/configure-database-for-phpmyadmin-ubuntu-server-16-04.jpg) - -指定phpMyAdmin向数据库服务器注册时所用的密码。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/Select-Password-for-phpMyadmin-ubuntu-16-04-1024x433.jpg) - -确认phpMyAdmin所需的密码,并点击确认。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/confirm-password-for-phpmyadmin-ubuntu-server-16-04.jpg) - -现在可以开始尝试访问phpMyAdmin, 打开浏览器并输入 : “http://Server_IP_OR_Host_Name/phpmyadmin” - -使用我们安装时设置的 root 帐户和密码。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-Ubuntu-Server-16-04-1024x557.jpg) - -当我们点击“Go”的时候,将会重定向到如下所示的 ‘phpMyAdmin’web界面。 - -![](http://www.linuxtechi.com/wp-content/uploads/2016/05/phpMyAdmin-portal-overview-ubuntu-server-16-04-1024x557.jpg) - -到现在,LAMP方案已经被成功安装并可以使用了,欢迎分享你的反馈和评论。 - --------------------------------------------------------------------------------- - -via: http://www.linuxtechi.com/lamp-stack-installation-on-ubuntu-server-16-04/ - -作者:[Pradeep Kumar][a] -译者:[陆建波](https://github.com/lujianbo) -校对:[Caroline](https://github.com/carolinewuyan) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.linuxtechi.com/author/pradeep/ From 567a02680f7448c265f3fd31cde135b1e37aab08 Mon Sep 17 00:00:00 2001 From: Bestony Date: Tue, 14 Jun 2016 21:01:56 +0800 Subject: [PATCH 1542/1710] Delete 20160516 Scaling Collaboration in DevOps.md --- ...0160516 Scaling Collaboration in DevOps.md | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 sources/tech/20160516 Scaling Collaboration in DevOps.md diff --git a/sources/tech/20160516 Scaling Collaboration in DevOps.md b/sources/tech/20160516 Scaling Collaboration in DevOps.md deleted file mode 100644 index bee9ab5415..0000000000 --- a/sources/tech/20160516 Scaling Collaboration in DevOps.md +++ /dev/null @@ -1,68 +0,0 @@ -Translating by Bestony -Scaling Collaboration in DevOps -================================= - -![](http://devops.com/wp-content/uploads/2016/05/ScalingCollaboration.jpg) - -Those familiar with DevOps generally agree that it is equally as much about culture as it is about technology. There are certainly tools and practices involved in the effective implementation of DevOps, but the foundation of DevOps success is how well [teams and individuals collaborate][1] across the enterprise to get things done more rapidly, efficiently and effectively. - -Most DevOps platforms and tools are designed with scalability in mind. DevOps environments often run in the cloud and tend to be volatile. It’s important for the software that supports DevOps to be able to scale in real time to address spikes and lulls in demand. The same thing is true for the human element as well, but scaling collaboration is a whole different story. - -Collaboration across the enterprise is critical for DevOps success. Great code and development needs to make it over the finish line to production to benefit customers. The challenge organizations face is how to do that seamlessly and with as much speed and automation as possible without sacrificing quality or performance. How can businesses streamline code development and deployment, while maintaining visibility, governance and compliance? - -### Emerging Trends - -First, I want to provide some background and share some data gathered by 451 Research on DevOps and DevOps adoption in general. Cloud, agile and DevOps capabilities are important for organizations today—both in perception and reality. 451 sees enterprise adoption of these things, as well as container technologies, growing—including increased usage in production environments. - -There are a number of advantages to embracing these technologies and methodologies, such as increased flexibility and speed, reduction of costs, improvements in resilience and reliability, and fitness for new or emerging applications. According to 451 Research, organizations also face some barriers including a lack of familiarity and required skills internally, the immaturity of these emerging technologies, and cost and security concerns. - -In the “[Voice of the Enterprise: SDI Q4 2015 survey][2],” 451 Research found that more than half of the respondents (51.7 percent) consider themselves to be late adopters, or even the last adopters of new technology. The flip side of that is that almost half (48.3 percent) label themselves as first or early adopters. - -Those general sentiments are reflected in the survey responses to other questions. When asked about implementation of containers, 50.3 percent stated it is not in their plans at all, while the remaining 49.7 percent are in some state of planning, pilot or active use of container technologies. Nearly two-thirds (65.1 percent) indicated that they use agile development methodologies for application development, but only 39.6 percent responded that they’ve embraced DevOps approaches. Nevertheless, while agile software development has been in the industry for years, 451 notes the impressive adoption of containers and DevOps, given they are emergent trends. - -When asked what the top three IT pain points are, the leading responses were cost or budget, insufficient staff and legacy software issues. As organizations move to cloud, DevOps, and containers issues such as these will need to be addressed, along with how to scale both technologies and collaboration effectively. - -### The Current State - -The industry—driven in large part by the DevOps revolution—is in the midst of a sea change, where software development is becoming more highly integrated across the entire business. The creation of software is less segregated and is more and more a function of collaboration and socialization. - -Concepts and methodologies that were novel or niche just a few years ago have matured quickly to become the mainstream technologies and frameworks that are driving value today. Businesses rely on concepts such as agile, lean, virtualization, cloud, automation and microservices to streamline development and enable them to work more effectively and efficiently at the same time. - -To adapt and evolve, enterprises need to accomplish a number of key tasks. The challenge companies face today is how to accelerate development while reducing costs. Organizations need to eliminate the barriers that exist between IT and the rest of the business, and work cooperatively toward a strategy that provides more effectiveness in a technology-driven, competitive environment. - -Agile, cloud, DevOps and containers all play a role in that process, but the one thing that binds it all is effective collaboration. Each of these technologies and methodologies provides unique benefits, but the real value comes from the organization as a whole—and the tools and platforms used by the organization—being able to collaborate at scale. Successful DevOps implementations also require participation from other stakeholders beyond development and IT operations teams, including security, database, storage and line-of-business teams. - -### Collaboration-as-a-Platform - -There are services and platforms online—such as GitHub—that facilitate and streamline collaboration. The online platform functions as a code repository, but the value extends beyond just providing a place to store code. - -Such a [collaboration platform][4] helps developers and teams collaborate more effectively because it provides a community where the code and process can be shared and discussed. Managers can monitor progress and track what code is shipping next. Developers can experiment with new ideas in a safe environment before taking those experiments to a live production environment, and new ideas and experiments can be effectively communicated to the appropriate teams. - -One of the keys to more agile development and DevOps is to allow developers to test things and gather relevant feedback quickly. The goal is to produce quality code and features faster, not to waste time setting up and managing infrastructure or scheduling more meetings to talk about it. The GitHub platform, for example, enables more effective and scalable collaboration because code review can occur when it is most convenient for the participants. There is no need to try and coordinate and schedule code review meetings, so the developers can continue to work uninterrupted, resulting in greater productivity and job satisfaction. - -Steven Anderson of Sendachi noted that GitHub is a collaboration platform, but it’s also a place for your tools to work with you, too. This means it can help not only with collaboration and continuous integration, but also with code quality. - -One of the benefits of a collaboration platform is that large teams of developers can be broken down into smaller teams that can focus more efficiently on specific components. It also allows things such as document sharing alongside code development to blur the lines between technical and non-technical contributions and enable increased collaboration and visibility. - -### Collaboration is Key - -The importance of collaboration can’t be stressed enough. It is a key tenet of DevOps culture, and it’s vital to agile development and maintaining a competitive edge in today’s world. Executive or management support and internal evangelism are important. Organizations also need to embrace the culture shift—blending skills across functional areas toward a common goal. - -With that culture established, though, effective collaboration is crucial. A collaboration platform is an essential element of collaborating at scale because it streamlines productivity and reduces redundancy and effort, and yields higher quality results at the same time. - - --------------------------------------------------------------------------------- - -via: http://devops.com/2016/05/16/scaling-collaboration-devops/ - -作者:[TONY BRADLEY][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://devops.com/author/tonybsg/ -[1]: http://devops.com/2014/12/15/four-strategies-supporting-devops-collaboration/ -[2]: https://451research.com/ -[3]: https://451research.com/customer-insight-voice-of-the-enterprise-overview -[4]: http://devops.com/events/analytics-of-collaboration-on-github/ From f1b2cb488965bb763231e09c6877fc9000e06fdc Mon Sep 17 00:00:00 2001 From: Bestony Date: Tue, 14 Jun 2016 21:02:44 +0800 Subject: [PATCH 1543/1710] Create 20160516 Scaling Collaboration in DevOps.md --- ...0160516 Scaling Collaboration in DevOps.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 translated/tech/20160516 Scaling Collaboration in DevOps.md diff --git a/translated/tech/20160516 Scaling Collaboration in DevOps.md b/translated/tech/20160516 Scaling Collaboration in DevOps.md new file mode 100644 index 0000000000..8ef18c4592 --- /dev/null +++ b/translated/tech/20160516 Scaling Collaboration in DevOps.md @@ -0,0 +1,70 @@ +Devops的弹性合作 +================================= + +![](http://devops.com/wp-content/uploads/2016/05/ScalingCollaboration.jpg) + +那些熟悉Devops的人普遍认同这样的文化关乎科技。当然,工具和参与是Devops有效实施的必要。但是Devops成功的基础是[团队合作][1]在企业做事更迅速,有效 + + +大多数的DevOps平台和工具的设计具有可扩展性的理念。DevOps环境通常运行在云端,并且容易发生变化。为了支持DevOps实时规模解决需求激增,软件变得很重要。同样的事情是真实的人为因素,但缩放合作是一个完整的不同的故事。 + + +跨企业协同是DevOps成功的关键。好的代码和发展是需要的。面临的挑战是如何做到无缝和尽可能多的速度和自动化,而不牺牲质量或性能。企业如何才能简化代码的开发和部署,同时保持知名度,治理和合规? + +### 新兴趋势 + +首先,我先提供一些背景,分享一些通过451研究公司 关于devops的研究而获取的数据。云、敏捷和Devops 在今天是非常重要的,不管是理念还是现实。451研究公司看到企业通过这些东西,还包括容器技术、增长大量的用在生产环境中。 + +拥抱这些技术和方法有许多优点,比如提高灵活性和速度,降低成本,提高弹性和可靠性,适应新的或新兴的应用。根据451公司的研究,组织也面临着一些障碍,包括缺乏熟悉和所需的技能,这些新兴技术的不成熟,成本和安全问题。 + +在 “[Voice of the Enterprise: SDI Q4 2015 survey][2],” 451公司发行超过一半的受访者者(最后为57.1%)考虑到他们是最终调查者或新兴科技。另一方面,近半受访者(48.3 %)认为自己是第一个或早起的采用者。 + +这些普遍性的情绪表现在对其他问题的调查中。当问起容器的执行情况时,50.3%的人表示这不在他们的计划中。49.7%的人是在进行计划、试点或积极使用容器技术。近2/3(65.1%)的人表示,他们用敏捷开发的应用开发,但是只有39.6%的回应,他们正在积极拥抱DevOps。然而,敏捷软件开发已经在行业内存在了多年,451公司注意到通过容器和Devops的提升给他们了很现实的趋势。 + +当被问及首要的三个痛点是什么,被提及最多的是成本或预算,工作人员和遗留软件问题。随着企业向云,DevOps,和容器等转型,这些都需要加以解决,以及如何规模技术和协作的有效。 + +### 当前状况 + +由Devops革命在很大程度上带动产生巨大变化的行业,使得软件开发变得更加高度集成的整个业务。软件的创造是不分种族的,而且更多是协作和社会化的功能。 + +在推动价值的今天,几年前的概念和方法已经成熟,很快就成为今天的主流技术和框架。企业依靠如敏捷、精益、虚拟化、云计算、自动化等概念来简化开发,同时使工作更加有效。 + +为适应和发展,企业需要完成一系列的关键任务。当今面临的挑战是如何加快发展的同时降低成本。组织需要消除它和其他业务之间存在的障碍,并在一个由技术驱动的竞争环境中提供更多有效的战略合作。 + +敏捷、云计算、Devops和容器在这个过程中起着重要的作用,但是有一件事情,他们都是有效的合作。每一种技术和方法都提供了独特的优势,但真正的价值来自于组织的整体能够进行规模协同和组织所使用的工具和平台。成功的DevOps的实现也需要其他利益相关者的参与,发展IT运营团队,包括安全、数据库、存储和业务队伍。 + +### 合作即平台 + +有一些在线的服务和平台,比如Github,促进了流式合作。它的功能是一个在线代码库,但是所产生的价值远超出了存储代码。 + + +这样一个[协作平台][4] 有助于开发人员和团队合作,因为它提供了一个代码和程序的社区可以共享和讨论。管理者可以监视进度和跟踪下一个代码是什么开发人员可以在一个安全的环境中进行实验,然后把这些实验的生活环境,新的想法和实验可以有效地传达给适当的团队。 + +更敏捷开发和DevOps的关键之一是允许开发人员测试并收集相关的快速反馈。目标是生产高质量的代码和功能,而不是浪费时间建立和管理基础设施或者安排更多的会议来讨论这个问题。比如GitHub平台,能够更有效的和可扩展的协作是因为代码审查可以由参与者最方便的进行。没有必要尝试协调和安排代码审查会议,使开发人员可以继续不间断地工作,从而产生更大的生产力和工作满意度。 + +Sendachi的Steven Anderson 指出,Github是一个协作平台,但它也是一个和你一起工作的工具。这样意味着他不仅可以帮助协作和持续集成,还影响了代码质量 + +合作平台的好处之一是,大型团队的开发人员可以分解成更小的团队,可以更有效地专注于特定的组件。它还允许诸如文件共享、模糊代码开发技术和非技术的贡献,增加了协作和可见性 + +### 合作是关键 + +合作的重要性不言而喻。合作是Devops文化的关键,也是当今世界能够进行敏捷开发和保持竞争优势的重要的一点。执行或管理的支持以及内部的传道是很重要的。组织还需要拥抱文化的转变---朝着目标混合技能跨越职能领域 + +当这样的文化建立起来,有效的合作是至关重要的。一个合作平台是规模合作的必要组件,因为简化了生产活动,并且减少了冗余和尝试,同时还产生了更高质量的结果。 + + +-------------------------------------------------------------------------------- + +via: http://devops.com/2016/05/16/scaling-collaboration-devops/ + +作者:[TONY BRADLEY][a] +译者:[Bestony](https://github.com/Bestony) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://devops.com/author/tonybsg/ +[1]: http://devops.com/2014/12/15/four-strategies-supporting-devops-collaboration/ +[2]: https://451research.com/ +[3]: https://451research.com/customer-insight-voice-of-the-enterprise-overview +[4]: http://devops.com/events/analytics-of-collaboration-on-github/ From 690d39f98cff7b84ff73360c87a0b07df8cfa1e3 Mon Sep 17 00:00:00 2001 From: Bestony Date: Tue, 14 Jun 2016 21:16:54 +0800 Subject: [PATCH 1544/1710] Translating by Bestony Translating by Bestony --- sources/tech/20160512 Rapid prototyping with docker-compose.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20160512 Rapid prototyping with docker-compose.md b/sources/tech/20160512 Rapid prototyping with docker-compose.md index 0c67223697..136eff7a7a 100644 --- a/sources/tech/20160512 Rapid prototyping with docker-compose.md +++ b/sources/tech/20160512 Rapid prototyping with docker-compose.md @@ -1,4 +1,4 @@ - +Translating by Bestony Rapid prototyping with docker-compose ======================================== From 862a7071dbe27ae6d8efa7a9b425de58de34b54d Mon Sep 17 00:00:00 2001 From: "jianbo.lu" <387852424@qq.com> Date: Tue, 14 Jun 2016 23:50:19 +0800 Subject: [PATCH 1545/1710] translating by lujianbo --- ...4 How to Setup Pfsense Firewall and Basic Configuration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 index 821937390a..f6e1b0aaab 100644 --- 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 @@ -1,3 +1,5 @@ +lujianbo + 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. @@ -263,4 +265,4 @@ via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ 本文由 [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 +[1]:http://linoxide.com/firewall/install-pfsense-firewall/ From d19959ac38c251a9928479576d51e2c13d959be4 Mon Sep 17 00:00:00 2001 From: erlinux <1006990314@qq.com> Date: Wed, 15 Jun 2016 18:05:13 +0800 Subject: [PATCH 1546/1710] =?UTF-8?q?erlinux=20=E5=AE=8C=E6=88=90=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Rapid prototyping with docker-compose.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 translated/tech/20160512 Rapid prototyping with docker-compose.md diff --git a/translated/tech/20160512 Rapid prototyping with docker-compose.md b/translated/tech/20160512 Rapid prototyping with docker-compose.md new file mode 100644 index 0000000000..a32f894d4b --- /dev/null +++ b/translated/tech/20160512 Rapid prototyping with docker-compose.md @@ -0,0 +1,141 @@ +使用docker快速组成样品机 +======================================== + +在写前,我们将看看 Node.js 样机 ** 找寻树莓派 PI Zero ** 的供应在英国三个主要销售. + +我写的代码,黑客部署到 Azure Ubuntu 虚拟机一个晚上就可以到位。Docker 和 docker-compose 工具做出调配和更新过程非常快。 + +### 建立链接? + + +如果您已经通过 [动手 Docker 教程指南] [1] 那么你已有在命令行建立 Docker 容器的经验。链接一个Redis 服务器计数器节点在命令行上可能是这样: + +``` +$ docker run -d -P --name redis1 +$ docker run -d hit_counter -p 3000:3000 --link redis1:redis +``` + +现在,假设应用程序中有三个等级 + +- Web 前端 +- 批次层处理长时间运行的任务 +- Redis 或 MongoDB 数据库 + +通过 `--link` 管理几个容器,但可能失效,可以添加多层级或容器到应用程序。 + +### 键入 docker 撰写 + +![](http://blog.alexellis.io/content/images/2016/05/docker-compose-logo-01.png) +>Docker 撰写图标 + +docker-compose 工具是标准的 docker工具箱的一部分,也可以单独下载。它提供了丰富功能,通过一个纯文本YAML文件配置所有应用程序组件。 + +上述提供了一个例子: + +``` +version: "2.0" +services: + redis1: + image: redis + hit_counter: + build: ./hit_counter + ports: + - 3000:3000 +``` + +从Docker 1.10起,我们可以充分利用网络来帮助我们在多个主机进行扩展覆盖。在此之前,仅通过单个主机工作。“docker-compose scale” 命令可用于更多计算能力有需要时。 + +>参考docker.com上关于"docker-compose" + +### 真实例子:树莓派 PI 到货通知 + +![](http://blog.alexellis.io/content/images/2016/05/Raspberry_Pi_Zero_ver_1-3_1_of_3_large.JPG) +>新版树莓派 PI Zero V1.3 图片提供来自Pimoroni + +树莓派 PI Zero - 巨大的轰动一个微型计算机具有一个1GHz 处理器 和 512MB 内存能够运行完整 Linux,Docker,Node.js,Ruby 和许多流行的开源工具。一个关于 PI Zero 的好消息是,成本只有5美元。这也意味着,存量迅速抢购一空。 + +*如果您想尝试Docker 或集群在PI看看下面的教程。* + +>[Docker Swarm on the PI Zero][3] + +### Original site: whereismypizero.com + +I found a webpage which used screen scraping to find whether 4-5 of the most popular outlets had stock. + +- The site contained a static HTML page +- Issued one XMLHttpRequest per outlet accessing /public/api/ +- The server issued the HTTP request to each shop and performed the scraping + +Every call to /public/api/ took 3 seconds to execute and using Apache Bench (ab) I was only able to get through 0.25 requests per second. + +### Reinventing the wheel + +The retailers didn't seem to mind whereismypizero.com scraping their sites for stock, so I set about writing a similar tool from the ground up. I had the intention of handing a much higher amount of requests per second through caching and de-coupling the scrape from the web tier. Redis was the perfect tool for the job. It allowed me to set an automatically expiring key/value pair (i.e. a simple cache) and also to transmit messages between Node processes through pub/sub. + +>Fork or star the code on Github: [alexellis/pi_zero_stock][4] + +If you've worked with Node.js before then you will know it is single-threaded and that any CPU intensive tasks such as parsing HTML or JSON could lead to a slow-down. One way to mitigate that is to use a second worker process and a Redis messaging channel as connective tissue between this and the web tier. + +- Web tier + -Gives 200 for cache hit (Redis key exists for store) + -Gives 202 for cache miss (Redis key doesn't exist, so issues message) + -Since we are only ever reading a Redis key the response time is very quick. +- Stock Fetcher + -Performs HTTP request + -Scrapes for different types of web stores + -Updates a Redis key with a cache expire of 60 seconds + -Also locks a Redis key to prevent too many in-flight HTTP requests to the web stores. +``` +version: "2.0" +services: + web: + build: ./web/ + ports: + - "3000:3000" + stock_fetch: + build: ./stock_fetch/ + redis: + image: redis +``` + +*The docker-compose.yml file from the example.* + +Once I had this working locally deploying to an Ubuntu 16.04 image in the cloud (Azure) took less than 5 minutes. I logged in, cloned the repository and typed in `docker compose up -d`. That was all it took - rapid prototyping a whole system doesn't get much better. Anyone (including the owner of whereismypizero.com) can deploy the new solution with just two lines: + +``` +$ git clone https://github.com/alexellis/pi_zero_stock +$ docker-compose up -d +``` + +Updating the site is easy and just involves a `git pull` followed by a `docker-compose up -d` with the `--build` argument passed along. + +If you are still linking your Docker containers manually, try Docker Compose for yourself or my code below: + +>Fork or star the code on Github: [alexellis/pi_zero_stock][5] + +### Check out the test site + +The test site is currently deployed now using docker-compose. + +>[stockalert.alexellis.io][6] + +![](http://blog.alexellis.io/content/images/2016/05/Screen-Shot-2016-05-16-at-22-34-26-1.png) + +Preview as of 16th of May 2016 + +---------- +via: http://blog.alexellis.io/rapid-prototype-docker-compose/ + +作者:[Alex Ellis][a] +译者:[erlinux](https://github.com/erlinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://blog.alexellis.io/author/alex/ +[1]: http://blog.alexellis.io/handsondocker +[2]: https://docs.docker.com/compose/compose-file/ +[3]: http://blog.alexellis.io/dockerswarm-pizero/ +[4]: https://github.com/alexellis/pi_zero_stock +[5]: https://github.com/alexellis/pi_zero_stock +[6]: http://stockalert.alexellis.io/ From 083b72a64cf6b4bee363e6b190b532c342f63aaa Mon Sep 17 00:00:00 2001 From: alim0x Date: Wed, 15 Jun 2016 22:29:02 +0800 Subject: [PATCH 1547/1710] [translating]Should distributors disable IPv4-mapped IPv6 --- .../20160525 Should distributors disable IPv4-mapped IPv6.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md b/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md index 2ce0bace45..1faf7dab6c 100644 --- a/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md +++ b/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md @@ -1,3 +1,5 @@ +alim0x translating + Should distributors disable IPv4-mapped IPv6? ============================================= From eb2b6d8d4af895c4267f156b3a7190c7aeca6a70 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 15 Jun 2016 23:20:15 +0800 Subject: [PATCH 1548/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=80=89=E9=A2=98?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 选题模板.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/选题模板.txt b/选题模板.txt index fabd1f1dba..a7cd92e614 100644 --- a/选题模板.txt +++ b/选题模板.txt @@ -20,8 +20,7 @@ ### 子一级标题 正文内容 : I have a [dream][1]。 - - + -------------------------------------------------------------------------------- via: 原文地址 @@ -38,4 +37,7 @@ 说明: 1. 标题层级很多时从 “##” 开始 2. 引文链接地址在下方集中写 - +3. 因为 Windows 系统文件名有限制,所以文章名不要有特殊符号,如 `\/:*"<>|`,同时也不推荐全大写,或者其它不利阅读的格式 +4. 正文格式参照中文排版指北(https://github.com/LCTT/TranslateProject/blob/master/%E4%B8%AD%E6%96%87%E6%8E%92%E7%89%88%E6%8C%87%E5%8C%97.md) +5. 我们使用的 markdown 语法和 github 一致,具体语法可参见 https://github.com/guodongxiaren/README 。而实际中使用的都是基本语法,比如链接、包含图片、标题、列表、字体控制和代码高亮。 +6. 选题的内容分为两类: 干货和湿货。干货就是技术文章,比如针对某种技术、工具的介绍、讲解和讨论。湿货则是和技术、开发、计算机文化有关的文章。选题时主要就是根据这两条来选择文章,文章需要对大家有益处,篇幅不宜太短,可以是系列文章,也可以是长篇大论,但是文章要有内容,不能有严重的错误,最好不要选择已经有翻译的原文。 From c57e6cb1b9cb3a308afea0bb9cf0637a5ef4ce13 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 16 Jun 2016 08:02:16 +0800 Subject: [PATCH 1549/1710] PUB:20160304 Image processing at NASA with open source tools @willowyoung --- ...ocessing at NASA with open source tools.md | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) rename {translated/tech => published}/20160304 Image processing at NASA with open source tools.md (81%) diff --git a/translated/tech/20160304 Image processing at NASA with open source tools.md b/published/20160304 Image processing at NASA with open source tools.md similarity index 81% rename from translated/tech/20160304 Image processing at NASA with open source tools.md rename to published/20160304 Image processing at NASA with open source tools.md index a26b96936c..983a5bf50e 100644 --- a/translated/tech/20160304 Image processing at NASA with open source tools.md +++ b/published/20160304 Image processing at NASA with open source tools.md @@ -1,10 +1,10 @@ -# 在NASA中使用开源工具进行图像处理 +在 NASA 使用开源工具进行图像处理 +================== -关键词:NASA,图像处理,Node.js,OpenCV ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/nasa_spitzer_space_pink_spiral.jpg?itok=3XEUstkl) -在刚结束的这个夏天里,我是 [NASA 格伦中心][1] [GVIS][2] 实验室的实习生,我将我对开源的热情带到了那里。我的任务是改进我们实验室对 Dan Schroeder 开发的一个开源流体动力学模拟器的贡献。原本的模拟器可以显示用户用鼠标绘制的障碍物,并建立计算流体动力学模型。我们团队的贡献是加入图像处理的代码,分析实况视频的每一帧以显示特定的物体如何与液体相互作用。而且,我们还要做更多事情。 +在刚结束的这个夏天里,我是 [NASA 格伦中心][1] [GVIS][2] 实验室的实习生,我将我对开源的热情带到了那里。我的任务是改进我们实验室对 Dan Schroeder 开发的一个开源流体动力学模拟器的贡献。原本的[模拟器][3]可以显示用户用鼠标绘制的障碍物,并建立计算流体动力学模型。我们团队的贡献是加入图像处理的代码,分析实况视频的每一帧以显示特定的物体如何与液体相互作用。而且,我们还要做更多事情。 我们想要让图像处理部分更加健壮,所以我致力于改善图像处理库。 @@ -16,33 +16,33 @@ 2. 找寻物体的质心 3. 能对物体中心进行相关的精确转换 -我的导师建议我安装 [Node.js](http://nodejs.org/) 、 [OpenCV](http://opencv.org/) 和 [Node.js bindings for OpenCV](https://github.com/peterbraden/node-opencv)。在等待软件安装的过程中,我查看了 OpenCV 的 [GitHub 主页][3]上的示例源码。我发现示例源码使用 JavaScript 写的,而我还不懂 JavaScript ,所以我在 Codecademy 上学了一些课程。两天后,我对 JavaScript 依旧生疏,不过我还是开始了我的项目…它包含了更多的 JavaScript 。 +我的导师建议我安装 [Node.js](http://nodejs.org/) 、 [OpenCV](http://opencv.org/) 和 [Node.js bindings for OpenCV](https://github.com/peterbraden/node-opencv)。在等待软件安装的过程中,我查看了 OpenCV 的 [GitHub 主页][4]上的示例源码。我发现示例源码使用 JavaScript 写的,而我还不懂 JavaScript ,所以我在 Codecademy 上学了一些课程。两天后,我对 JavaScript 依旧生疏,不过我还是开始了我的项目……它包含了更多的 JavaScript 。 检测轮廓的示例代码工作得很好。事实上,它使得我用几个小时就完成了第一个目标!获取一幅图片的轮廓,它看起来像这样: ![](https://opensource.com/sites/default/files/resize/image_processing_nasa_1-520x293.jpg) -> 包括所有轮廓的原始图, +*包括所有轮廓的原始图* 检测轮廓的示例代码工作得有点好过头了。不仅物体的轮廓被检测到了,整个图片中的轮廓都检测到了。这会导致模拟器要与那些没用的轮廓打交道。这是一个严重的问题,因为它会返回错误的数据。为了避免模拟器接触到不想要的轮廓,我加了一个区域约束。轮廓要位于一定的区域范围内才会被画出来。区域约束使得轮廓变干净了。 ![](https://opensource.com/sites/default/files/resize/image_processing_nasa_2-520x293.jpg) -> 过滤后的轮廓,包含了阴影轮廓 +*过滤后的轮廓,包含了阴影轮廓* 虽然无关的轮廓没有了,但是图像还有个问题。图像本该只有一个轮廓,但是它来回绕了自己两次,没有完整地圈起来。区域在这里不能作为决定因素,所以必须试试其他方式。 -这一次,我不是直接去找寻轮廓,而是先将图片转换成二值图。二值图是转换之后只有黑白像素的图片。为了获取到二值图我先把彩色图转成灰度图。转换之后我再用阈值函数对图片进行处理。阈值函数遍历图片每个像素点的值,如果值小于 30 ,像素的颜色就会改成黑色。否则则反。在原始图片转换成二值图之后,结果变成这样: +这一次,我不是直接去找寻轮廓,而是先将图片转换成二值图。二值图是转换之后只有黑白像素的图片。为了获取到二值图我先把彩色图转成灰度图。转换之后我再用阈值函数对图片进行处理。阈值函数遍历图片每个像素点的值,如果值小于 30 ,像素的颜色就会改成黑色。否则取反。在原始图片转换成二值图之后,结果变成这样: ![](https://opensource.com/sites/default/files/resize/image_processing_nasa_3-520x293.jpg) -> 二值图。 +*二值图* 然后我获取了二值图的轮廓,结果是一个更干净的轮廓,没有了阴影轮廓。 ![](https://opensource.com/sites/default/files/image_processing_nasa_4.jpg) -> 最后的干净轮廓。 +*最后的干净轮廓* 这个时候,我可以获取干净的轮廓、计算质心了。可惜的是,我没有足够的时间去完成质心的相关变换。由于我的实习时间只剩下几天了,我开始考虑我在这段有限时间内能做的其它事情。其中一个就是边界矩形。边界矩形是包含了图片轮廓的最小四边形。边界矩形很重要,因为它是在页面上缩放轮廓的关键。虽然很遗憾我没时间利用边界矩形做更多事情,但是我仍然想学习它,因为它是个很有用的工具。 @@ -50,7 +50,7 @@ ![](https://opensource.com/sites/default/files/resize/image_processing_nasa_5-521x293.jpg) -> 最终图像,红色的边界矩形和质心。 +*最终图像,红色的边界矩形和质心* 当这些图像处理代码写完之后,我用我的代码替代了模拟器中的老代码。令我意外的是,它可以工作。 @@ -60,11 +60,11 @@ ( Youtube 演示视频) -程序有内存泄露,每 1/10 秒泄露 100MB 。我很高兴原因不是我的代码。坏消息是我并不能修复它。好消息是仍然有解决方法。它并非最理想的,但我可以使用。这个方法是不断检查模拟器使用的内存,当使用内存超过 1GB 时,重新启动模拟器。 +程序有内存泄露,每 1/10 秒泄露 100MB 。我很高兴不是因为我的代码。坏消息是我并不能修复它。另一个好消息是仍然有解决方法,虽然并非最理想的,但我可以使用。这个方法是不断检查模拟器使用的内存,当使用内存超过 1GB 时,重新启动模拟器。 在 NASA 实验室,我们会使用很多的开源软件,没有这些开源软件的帮助,我不可能完成这些工作。 -* * * +------- via: [https://opensource.com/life/16/3/image-processing-nasa](https://opensource.com/life/16/3/image-processing-nasa) @@ -76,4 +76,5 @@ via: [https://opensource.com/life/16/3/image-processing-nasa](https://opensource [1]: http://www.nasa.gov/centers/glenn/home/index.html [2]: https://ocio.grc.nasa.gov/gvis/ -[3]: https://github.com/peterbraden/node-opencv +[3]: http://physics.weber.edu/schroeder/fluids/ +[4]: https://github.com/peterbraden/node-opencv From e3b6949443c8ddc77add2ca41e0a9d917c383f24 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 16 Jun 2016 08:23:29 +0800 Subject: [PATCH 1550/1710] PUB:20160524 Test Fedora 24 Beta in an OpenStack cloud @geekpi --- ...st Fedora 24 Beta in an OpenStack cloud.md | 77 ++++++++++++++++++ ...st Fedora 24 Beta in an OpenStack cloud.md | 78 ------------------- 2 files changed, 77 insertions(+), 78 deletions(-) create mode 100644 published/20160524 Test Fedora 24 Beta in an OpenStack cloud.md delete mode 100644 translated/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md diff --git a/published/20160524 Test Fedora 24 Beta in an OpenStack cloud.md b/published/20160524 Test Fedora 24 Beta in an OpenStack cloud.md new file mode 100644 index 0000000000..68c147c5e8 --- /dev/null +++ b/published/20160524 Test Fedora 24 Beta in an OpenStack cloud.md @@ -0,0 +1,77 @@ +在 OpenStack 云中测试 Fedora 24 Beta +=========================================== + +![](https://major.io/wp-content/uploads/2012/01/fedorainfinity.png) + +虽然离 [Fedora 24][1] 还有几周,你现在可以就测试Fedora 24 Beta了。这是一个[窥探新特性][2]的好机会,并且可以帮助他们找出仍需要修复的 bug。 + +[Fedora Cloud][3] 镜像可以从你常用的[本地镜像][4]或者 [Fedora 的服务器][5]中下载。本篇文章我将向你展示如何将这个镜像导入 OpenStack 环境并且测试 Fedora 24 Beta。 + +最后说一下:这还是 beta 软件。目前对我来说是可靠的,但是你的体验可能会不同。我建议你等到正式版发布再在上面部署关键的应用。 + +### 导入镜像 + +旧版的 glance 客户端(版本1)允许你在 OpenStack 环境中导入一个可通过 URL 访问的镜像。由于我 OpenStack 云的连接速度(1 Gbps)比我家 (大约 20 mbps 上传速度)快,这个功能对我很有用。然而,从 URL 导入的功能[在 glance v2 中被移除了]。[OpenStackClient][7] 也不支持这个功能。 + +现在由两个选择: + +- 安装旧版的 glance 客户端 +- 使用 Horizon (网页面板) + +获取旧版本的 glance 是有挑战性的。OpenStack liberty 版本的需求文件[对 glance 客户端没有最高版本上限][8],并且很难找到让旧版客户端工作的依赖文件。 + +让我们使用 Horizon,这就是写这篇文章的原因。 + +### 在 Horizon 中添加一个镜像 + +登录 Horizon 面板,点击 Compute->Image。点击页面右上方的“+ Create Image”,一个新的窗口会显示出来。并且窗口中有这些信息: + +- **Name**: Fedora 24 Cloud Beta +- **Image Source**: 镜像位置 +- **Image Location**: http://mirrors.kernel.org/fedora/releases/test/24_Beta/CloudImages/x86_64/images/Fedora-Cloud-Base-24_Beta-1.6.x86_64.qcow2 +- **Format**: QCOW2 – QEMU 模拟器 +- **Copy Data**: 确保勾选了 + +完成后,你会看到这个: + +![](https://major.io/wp-content/uploads/2016/05/horizon_image.png) + +点击“创建镜像(Creat Image)”,接着镜像列表会显示一段时间的 Saving 信息。一旦切换到 Active,你就可以构建一个实例了。 + +### 构建实例 + +既然我们在使用 Horizon,我们可以在此完成构建过程。 + +在镜像列表页面,找出我们上传的镜像并且点击右边的启动实例(Launch Instance)。一个新的窗口会显示出来。镜像名(Image Name)下拉框中应该已经选择了 Fedora 24 Beta 的镜像。在这里,选择一个实例名,选择一个安全组和密钥对(在 Access & Security 标签中)和网络(在 Networking 标签)。确保选择有足够容量的存储(m1.tiny 不太够)。 + +点击启动(Launch)并且等待实例启动。 + +一旦实例构建完成,你能以用户 fedora 通过 ssh 连接到实例。如果你的[安全组允许连接][9]并且你的密钥对正确配置了,你应该进入到 Fedora 24 Beta 中了! + +还不确定接下来做什么?有下面几点建议: + +- 升级所有的包并且重启(确保你测试的是最新的更新) +- 安装一些熟悉的应用并且验证它们可以正常工作 +- 测试你已有的自动化或者配置管理工具 +- 打开 bug 报告 + +-------------------------------------------------------------------------------- + +via: https://major.io/2016/05/24/test-fedora-24-beta-openstack-cloud/ + +作者:[major.io][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://major.io/about-the-racker-hacker/ +[1]: https://fedoraproject.org/wiki/Releases/24/Schedule +[2]: https://fedoraproject.org/wiki/Releases/24/ChangeSet +[3]: https://getfedora.org/en/cloud/ +[4]: https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora/24/x86_64 +[5]: https://getfedora.org/en/cloud/download/ +[6]: https://wiki.openstack.org/wiki/Glance-v2-v1-client-compatability +[7]: http://docs.openstack.org/developer/python-openstackclient/ +[8]: https://github.com/openstack/requirements/blob/stable/liberty/global-requirements.txt#L159 +[9]: https://major.io/2016/05/16/troubleshooting-openstack-network-connectivity/ diff --git a/translated/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md b/translated/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md deleted file mode 100644 index e32cd43f2e..0000000000 --- a/translated/tech/20160524 Test Fedora 24 Beta in an OpenStack cloud.md +++ /dev/null @@ -1,78 +0,0 @@ -在OpenStack云中测试Fedora 24 Beta -=========================================== - -![](https://major.io/wp-content/uploads/2012/01/fedorainfinity.png) - -虽然离[Fedora 24][1]还有几周,你可以今天就测试Fedora 24 Beta了。这是一个[窥探新特性][2]的好机会,并且可以帮助找出仍需要修复的bug。 - -[Fedora Cloud][3]镜像可以从你最喜欢的[本地镜像][4]或者[Fedora的服务器][5]中下载。本篇文章我将向你展示如何将这个镜像导入Openstack环境并且测试Fedora 24 Beta。 - -最后说一下:这还是beta软件。目前对我来说是可靠的,但是你的体验可能会不同。我建议你等到正式版发布再在上面部署关键的应用。 - -### 导入镜像 - -旧版的glance客户端(版本1)允许你在Openstack环境中导入一个URL镜像。由于我Openstack云的连接速度(1 Gbps)比我家 (大约20 mbps上传速度)快,这个功能对我很有用。然而,从URL导入的功能[在glance v2中被移除了]。[OpenStackClient][7]也不支持这个功能。 - -现在由两个选择: - -- 安装旧版的glance客户端 -- 使用 Horizon (网页面板) - -获取旧版本的glance是有挑战性的。Openstack自由发布的需求文件[对glance客户端没有最高版本上限][8],并且很难找到让旧版客户端工作的依赖文件。 - -让我们使用Horizon,来回到写这篇文章的原因。 - - -### 在Horizon中添加一个镜像 - -登录Horizon面板,点击Compute->Image. 点击页面右上方的“+”创建新镜像,一个新的窗口会显示出来。并且窗口中有这些信息: - -- **Name**: Fedora 24 Cloud Beta -- **Image Source**: Image位置 -- **Image Location**: http://mirrors.kernel.org/fedora/releases/test/24_Beta/CloudImages/x86_64/images/Fedora-Cloud-Base-24_Beta-1.6.x86_64.qcow2 -- **Format**: QCOW2 – QEMU Emulator -- **Copy Data**: 确保勾选了 - -完成后,你会看到这个: - -![](https://major.io/wp-content/uploads/2016/05/horizon_image.png) - -点击创建镜像,接着会显示一段时间的Saving。一旦切换到Active,你可以构建一个实例了。 - -### 构建实例 - -既然我们在Horizon,我们可以完成构建过程了。 - -在镜像列表页面,找出我们上传的镜像并且点击右边的启动实例。一个新的窗口会显示出来。下拉框中应该已经选择了Fedora 24 Beta的镜像。在这里,选择一个实例名,选择一个安全组和密钥对(在Access & Security中)和网络(在Networking标签)。确保选择有足够容量的存储(m1.tiny还不够)。 - -点击启动并且等待实例启动。 - -一旦实例构建完成,你可以作为fedora用户通过ssh连接。如果你的[安全组允许连接][9]并且你的密钥对正确配置了,你应该在Fedora 24 Beta中了! - -还不确定接下来做什么?有下面几点建议: - -- 升级所有的包并且重启(确保你测试的是最新的更新) -- 安装一些相似的应用并且验证它们可以正常工作 -- 测试你已有的自动化或者配置管理工具 -- 打开bug报告 - --------------------------------------------------------------------------------- - -via: https://major.io/2016/05/24/test-fedora-24-beta-openstack-cloud/ - -作者:[major.io][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://major.io/about-the-racker-hacker/ -[1]: https://fedoraproject.org/wiki/Releases/24/Schedule -[2]: https://fedoraproject.org/wiki/Releases/24/ChangeSet -[3]: https://getfedora.org/en/cloud/ -[4]: https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora/24/x86_64 -[5]: https://getfedora.org/en/cloud/download/ -[6]: https://wiki.openstack.org/wiki/Glance-v2-v1-client-compatability -[7]: http://docs.openstack.org/developer/python-openstackclient/ -[8]: https://github.com/openstack/requirements/blob/stable/liberty/global-requirements.txt#L159 -[9]: https://major.io/2016/05/16/troubleshooting-openstack-network-connectivity/ From 2f2c242c0c572f998097c3d648a6e5b334a19d01 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 16 Jun 2016 08:38:10 +0800 Subject: [PATCH 1551/1710] PUB:20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX @alim0x --- ...DERN OPEN SOURCE CODE EDITORS FOR LINUX.md | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) rename {translated/tech => published}/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md (60%) diff --git a/translated/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md b/published/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md similarity index 60% rename from translated/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md rename to published/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md index f3045322f3..f4760a61d5 100644 --- a/translated/tech/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md +++ b/published/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md @@ -3,17 +3,17 @@ Linux 上四个最佳的现代开源代码编辑器 ![](http://itsfoss.com/wp-content/uploads/2015/01/Best_Open_Source_Editors.jpeg) -在寻找 **Linux 上最好的代码编辑器**?如果你问那些老派的 Linux 用户,他们的答案肯定是 Vi,Vim,Emacs,Nano 等等。但我不讨论它们。我要讨论的是最新的,美观,优美强大,功能丰富,能够提高你编程体验的,**最好的 Linux 开源代码编辑器**。 +在寻找 **Linux 上最好的代码编辑器**?如果你问那些老派的 Linux 用户,他们的答案肯定是 Vi,Vim,Emacs,Nano 等等。但我不讨论它们。我要讨论的是崭新、先进、优美、强大、功能丰富,能够提高你编程体验的**最好的 Linux 开源代码编辑器**。 ### Linux 上最佳的现代开源代码编辑器 -我使用 Ubuntu 作为我的主力系统,因此提供的安装说明适用于基于 Ubuntu 的发行版。但这并不会让这个列表变成 **Ubuntu 上的最佳文本编辑器**,因为这些编辑器对所有 Linux 发行版都适用。多说一句,这个清单没有任何先后顺序。 +我使用 Ubuntu 作为我的主力系统,因此提供的安装说明适用于基于 Ubuntu 的发行版。但这并不会让这个列表变成 **Ubuntu 上的最佳文本编辑器**,因为这些编辑器对所有 Linux 发行版都适用。多说一句,这个清单的排名没有任何先后顺序。 ### BRACKETS ![](http://itsfoss.com/wp-content/uploads/2015/01/brackets_UI.jpeg) -[Brackets][1] 是 [Adobe][2] 的一个开源代码编辑器。Brackets 专注于 web 设计师的需求,内置 HTML,CSS 和 JavaScript 支持。它很轻量,也很强大。它提供了行内编辑和实时预览。还有无数可用的插件,进一步加强你在 Brackets 上的体验。 +[Brackets][1] 是来自 [Adobe][2] 的一个开源代码编辑器。Brackets 专注于 web 设计师的需求,内置 HTML、CSS 和 JavaScript 支持。它很轻量,也很强大。它提供了行内编辑和实时预览。还有无数可用的插件,可以进一步加强你在 Brackets 上的体验。 在 Ubuntu 以及基于 Ubuntu 的发行版(比如 Linux Mint)上[安装 Brackets][3] 的话,你可以用这个非官方的 PPA: @@ -25,52 +25,48 @@ sudo apt-get install brackets 至于其它 Linux 发行版,你可以从它的网站上获取到适用于 Linux,OS X 和 Windows 源码和二进制文件。 -[下载 Brackets 源码和二进制包](https://github.com/adobe/brackets/releases) +- [下载 Brackets 源码和二进制包](https://github.com/adobe/brackets/releases) ### ATOM ![](http://itsfoss.com/wp-content/uploads/2014/08/Atom_Editor.jpeg) -[Atom][4] 是另一个给程序员的开源代码编辑器,现代而且美观。Atom 是由 Github 开发的,宣称是“21世纪的可定制文本编辑器”。Atom 的外观看起来类似 Sublime Text,一个在程序员中很流行但是闭源的文本编辑器。 +[Atom][4] 是另一个给程序员的开源代码编辑器,现代而且美观。Atom 是由 Github 开发的,宣称是“面向21世纪的可魔改文本编辑器”。Atom 的外观看起来类似 Sublime Text,那是一个在程序员中很流行但是闭源的文本编辑器。 Atom 最近发布了 .deb 和 .rpm 包,所以你可以轻而易举地在基于 Debian 和 Fedora 的 Linux 发行版上安装它。当然,它也提供了源代码。 - -[下载 Atom .deb](https://atom.io/download/deb) - -[下载 Atom .rpm](https://atom.io/download/rpm) - -[获取 Atom 源码](https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md) +- [下载 Atom .deb](https://atom.io/download/deb) +- [下载 Atom .rpm](https://atom.io/download/rpm) +- [获取 Atom 源码](https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md) ### LIME TEXT ![](http://itsfoss.com/wp-content/uploads/2014/08/LimeTextEditor.jpeg) -你喜欢 Sublime Text 但是你对它是闭源的这一事实感觉不是很舒服?别担心,我们有 [Sublime Text 的开源克隆版][5],叫做 [Lime Text][6]。它是基于 Go,HTML 和 QT 的。克隆 Sublime Text 的原因是 Sublime Text 2 中有无数 bug,而 Sublime Text 3 看起来会永远处于 beta 之中。它的开发过程并不透明,也就无从得知 bug 是否被修复了。 +你喜欢 Sublime Text 但是你对它是闭源的这一事实感觉不是很舒服?别担心,我们有 [Sublime Text 的开源克隆版][5],叫做 [Lime Text][6]。它是基于 Go、HTML 和 QT 的。克隆 Sublime Text 的原因是 Sublime Text 2 中有无数 bug,而 Sublime Text 3 看起来会永远处于 beta 之中,而它的开发过程并不透明,也就无从得知 bug 是否被修复了。 所以开源爱好者们,开心地去下面这个链接下载 Lime Text 的源码吧: -[获取 Lime Text 源码](https://github.com/limetext/lime) +- [获取 Lime Text 源码](https://github.com/limetext/lime) ### LIGHT TABLE ![](http://itsfoss.com/wp-content/uploads/2015/01/Light_Table.jpeg) -[Light Table][7] 是另一个外观现代,功能丰富的开源代码编辑器,标榜“下一代代码编辑器”,它更像一个 IDE 而不仅仅是个文本编辑器。它还有无数扩展用以加强它的功能。也许你会喜欢它的行内求值。你得用用它才会相信 Light Table 有多好用。 +[Light Table][7] 是另一个外观现代、功能丰富的开源代码编辑器,标榜为“下一代代码编辑器”,它更像一个 IDE 而不仅仅是个文本编辑器。它还有无数可以加强它的功能的扩展。也许你会喜欢它的行内求值。你得用用它才会相信 Light Table 有多好用。 -[在 Ubuntu 上安装 Light Table](http://itsfoss.com/install-lighttable-ubuntu/) +- [在 Ubuntu 上安装 Light Table](http://itsfoss.com/install-lighttable-ubuntu/) ### 你的选择是? -不,我们的选择没有限制在这四个 Linux 代码编辑器之中。这个清单只是关于程序员的现代编辑器。当然,你还有很多选择,比如 [Notepad++ 的替代选择 Notepadqq][8] 或 [SciTE][9] 以及更多。那么,上面四个中,在 Linux 上而言你最喜欢哪个代码编辑器? - +不,我们的选择没有限制在这四个 Linux 代码编辑器之中。这个清单只是关于程序员的现代编辑器。当然,你还有很多选择,比如 [Notepad++ 的替代选择 Notepadqq][8] 或 [SciTE][9] 等等。那么,上面四个中,在 Linux 上而言你最喜欢哪个代码编辑器? ---------- -via: http://itsfoss.com/best-modern-open-source-code-editors-for-linux/?utm_source=newsletter&utm_medium=email&utm_campaign=offline_and_portable_linux_apps_and_other_linux_stories +via: http://itsfoss.com/best-modern-open-source-code-editors-for-linux/ 作者:[Abhishek Prakash][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 6577190a20ef7e1ed825a5cd465cd154b6e5a9d8 Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Thu, 16 Jun 2016 14:19:04 +0800 Subject: [PATCH 1552/1710] translated --- ...31 Why Ubuntu-based Distros Are Leaders.md | 65 -------------- ...31 Why Ubuntu-based Distros Are Leaders.md | 85 +++++++++++++++++++ 2 files changed, 85 insertions(+), 65 deletions(-) delete mode 100644 sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md create mode 100644 translated/talk/20160531 Why Ubuntu-based Distros Are Leaders.md diff --git a/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md b/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md deleted file mode 100644 index d038db6cfa..0000000000 --- a/sources/talk/20160531 Why Ubuntu-based Distros Are Leaders.md +++ /dev/null @@ -1,65 +0,0 @@ -vim-kakali translating - -Why Ubuntu-based Distros Are Leaders -========================================= - -Over the years, I've tried a number of great Linux distributions. The distros that had the greatest impact with me personally were those that maintained a strong community. But there's more to a popular distribution than a strong community. Popular Linux distributions tend to appeal to newcomers, often due to features that make using the distro easier. There are obviously exceptions to this, but generally speaking it is true. - -One distribution that comes to mind is [Ubuntu][1]. Built from a solid [Debian][2] base, Ubuntu has not only become an incredibly popular Linux distro, it's also made countless other distributions such as Linux Mint a reality. In this article, I'll explore why I believe Ubuntu wins the Linux distribution wars and how it's influenced Linux on the desktop as a whole. - -### Ubuntu is easy to use - -Before I first tried Ubuntu years ago, I preferred using the KDE desktop. At that time, it was simply the environment I had the most experience with. The main reason is that KDE was the most popular option among various newbie-friendly Linux distributions. Newbie-friendly distros like Knoppix, Simply Mepis, Xandros, Linspire, amongst others and all of them pointed their users towards the welcoming arms of KDE. - -At this time, KDE did what I needed it to do and I felt little reason to explore other desktop environments. Then one day after my Debian installation failed on me (due to my own user error), I decided to try out this "Ubuntu Dapper Drake" everyone was raving about. At that time, I was less than impressed with the screenshots I had seen, but figured it would be fun to try regardless. - -The biggest impression Ubuntu Dapper Drake made on me was how cleanly everything was laid out. Bear in mind, I came from the KDE world where there were fifteen ways to make one menu change. Ubuntu's implementation of GNOME was very minimalist. - -Flash forward to 2016 with the current 16.04 release: we have multiple Ubuntu flavors available, along with tons of distributions based on the Ubuntu base. The core thing all of these Ubuntu flavors and derivative distributions share in common is they're all designed to be easy to use. And when you're trying to grow your user base, stuff like this matters. - -### Ubuntu LTS - -In the past, I've almost always stuck with LTS releases for my main desktop. The x.10 releases were best left to my testing hard drive or perhaps even an old laptop. My reasons for this were simple – I had no interest in playing with short term releases on a production PC. I'm a busy guy and simply don't feel this is the best use of my time. - -Speaking for myself, I think Ubuntu offering LTS releases is one of the big reasons why the distribution has experienced such success. Think about it – offering folks a desktop Linux distro that will be fully supported for a long period of time has its advantages. To be fair, Ubuntu's not alone here, as there are other distros that do this as well. But I think this LTS strategy bundled with a newbie friendly environment has done Ubuntu a world of good. - -### Ubuntu Snap packages - -In the past, users once raved about the ability to get newer software titles onto their systems using PPAs (personal package archives). Unfortunately, this technology has its shortcomings. Issues like PPA abandonment to discovery are both common issues when working with random software titles. - -Then came the concept of [Snap packages][3]. Certainly not a completely new concept, as similar attempts have been made in the past. But what I think Snap will offer Ubuntu users in the long term is the ability to run the latest software without having to run the very latest Ubuntu release. While I still think we're seeing the early days of where Snap packages could end up, I'm excited at the prospect of bleeding edge software on a stable distribution release. - -The obvious downside is how much disk space Snap packages might potentially use if you're running a lot of software. Not only that, but most software for Ubuntu has yet to officially make the switch over from deb packages. The first issue is solved with ample hard drive space while the latter will simply be a waiting game. - -### Ubuntu Community - -I'm among the first to admit that all of the major Linux distributions have great communities. However, I firmly believe that Ubuntu's community might be the most diverse in terms of folks from different walks of life. For example, we have forums ranging from Apple hardware support to gaming. That's a particularly wide variety of specialized discussions. - -Going beyond the forums, Ubuntu also offers a highly defined community structure. This structure includes a council, technical board, [LoCo teams][4], and Developer Membership board. There are others, but these are the areas of the community structure that really stand out to me. - -Then we have [Ask Ubuntu][5]. In my view, this feature should replace seeking help from the forums as I find it to be far more likely you'll get useful information from this area. Not only that, solutions provided that are voted highly accurate might even make it into the official documentation. - -### Ubuntu's future - -I think Ubuntu's Unity interface has done little to increase desktop adoption. I understand why it was implemented, how it's making things easier for Ubuntu developers and whatnot. But in the end, I also believe it's paved the way for Ubuntu MATE and Linux Mint to increase in popularity as well. - -Another area that I wonder about is the future of Ubuntu's IRC and mailing lists. The fact is, neither lend themselves to bettering documentation like Ask Ubuntu can. As for mailing lists, I've always felt this was a painfully dated way to collaborate, but that's just me – others feel different and that's fine. - -What say you? Do you think Ubuntu will remain a major player going into the future? Perhaps you believe Arch, Linux Mint or others will dethrone Ubuntu in terms of popularity. Hit the Comments and give your favorite distribution a shout-out. If your favorite is based on Ubuntu, explain why you prefer it over Ubuntu proper. I think many of us can mutually agree that, if nothing else, Ubuntu makes a pretty popular base from which to build other distributions. - --------------------------------------------------------------------------------- - -via: http://www.datamation.com/open-source/why-ubuntu-based-distros-are-leaders.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.ubuntu.com/ -[2]: https://www.debian.org/ -[3]: http://www.datamation.com/open-source/ubuntu-snap-packages-the-good-the-bad-the-ugly.html -[4]: http://loco.ubuntu.com/ -[5]: http://askubuntu.com/ diff --git a/translated/talk/20160531 Why Ubuntu-based Distros Are Leaders.md b/translated/talk/20160531 Why Ubuntu-based Distros Are Leaders.md new file mode 100644 index 0000000000..9d9ce0f418 --- /dev/null +++ b/translated/talk/20160531 Why Ubuntu-based Distros Are Leaders.md @@ -0,0 +1,85 @@ +为什么 Ubuntu 家族会占据 Linux 发行版的主导地位? +========================================= + +在过去的数年中,我已经尝试了大量的优秀 Linux 发行版。我印象最深刻的是那些被强大的社区维护的发行版。但是这样的发行版却比他们s所属的社区更受人欢迎。流行的 Linux 发行版吸引着更多的人,通常由于这样的特点使得使用该发行版更加容易。这很明显毫无关系,但一般认为这种说法是正确的。 + + +我想到的一个发行版 [Ubuntu][1]。它属于健壮的 [Debian][2]分支,Ubuntu 不可思议的成为了受欢迎的 Linux 发行版,而且它也衍生出了其他的版本,比如 Linux Mint。在本文中,我会探讨我坚信 Ubuntu 会赢得 Linux 发行版战争的原因,以及它在整个 Linux 桌面领域有着怎样的影响力。 + + +### Ubuntu容易使用 + + +多年前我第一次尝试使用Ubuntu,在这之前我更喜欢使用 KED 桌面。在那个时期,我接触的大多是这种 KDE 桌面环境。主要原因还是 KDE 是大多数新手友好的 Linux 发行版中最受欢迎的。新手友好的发行版有 Knoppix,Simply Mepis, Xandros, Linspire等,另外一些发行版和这些发行版都指出他们的用户趋向于使用 KDE。 + + + +现在KDE能满足我的需求,也没有什么理由去折腾其他的桌面环境了。有一天我的 Debian 安装失败了(由于我个人的操作不当),我决定尝试开发代号为「整洁的公鸭(Ubuntu Dapper Drake)」的 Ubuntu 版本【译者注:ubuntu 6.06 - Dapper Drake(整洁的公鸭),发布日期:2006年6月1日】。那个时候,我对于它的印象比一个屏幕截图还要少,但是我认为它很有趣并且毫无顾忌的使用它。 + + + +Ubuntu Dapper Drake 给我的最大的印象是它的操作很简单。记住,我是来自于 KDE 世界的用户,在 KDE 上要想改变菜单的设置就有15钟方法。Ubuntu 图形界面的安装启动极具极简主义。 + +时间来到2016年,最新的版本号是16.04:我们有多种可用的 Ubuntu 衍生版本,许多的都是基于 Ubuntu 的。所有的 Ubuntu 风格和公用发行版的核心都被设计的容易使用。并且发行版想要增大用户基数的时候,这就是最重要的原因。 + + +### Ubuntu LTS + +过去,我几乎一直坚持使用 LTS(Long Term Support)发行版作为我的主要桌面系统。10月份的发行版很适合我测试硬盘驱动器,甚至把它用在一个老旧的手提电脑上。我这样做的原因很简单——我没有兴趣在一个作为实验品的电脑上折腾短期发行版。我是个很忙的家伙,我觉得这样会浪费我的时间。 + + +对于我来说,我认为 Ubuntu 提供 LTS 发行版是 Ubuntu 能够变得流行的原因。这样说吧———提供一个大众的桌面 Linux 发行版,这个发行版能够得到长期的充分支持就是它的优势。事实上,Ubuntu 的优势不只这一点,其他的分支在这一点上也做的很好。长期支持版带有一个对新手的友好环境的策略,我认为这就为 Ubuntu 的普及带来了莫大的好处。 + + +### Ubuntu Snap 包 + + +以前,用户在他们的系统上使用很多 PPA(personal package archive个人软件包档案),他们总会抱怨它获得新的软件名称的能力。不好的是,这种技术也有缺点。它工作的时候带有任意的软件名称,而 PPA 却没有发现,这种情况很常见。 + + +现在有了[Snap 包][3] 。当然这不是一个全新的概念,过去已经进行了类似的尝试。用户不必要在最新的 Ubuntu 发行版上运行最新的软件,我认为这才是 Snap 将要长期提供给 Ubuntu 用户的东西。然而我仍然认为我们将会看到 Snap 淘汰的的那一天,我很期待看到一个在稳定的发行版上运行的优秀软件。 + + + +如果你要运行很多软件,那么 Snap 包实际使用的硬盘空间很明显存在问题。不仅如此,大多数 Ubuntu 软件也是通过由官方开发的 deb 包进行管理的。当后者需要花费一些时间的时候,这个问题可以通过 Snap 使用更大的硬盘驱动器空间得到解决。 + + + +### Ubuntu 社区 + +首先,我承认大多数主要的 Linux 发行版都有强大的社区。然而,我坚信 Ubuntu 社区的成员是最多样化的,他们来自各行各业。例如,我们有一个论坛来分类不同的苹果硬件对于游戏的支持程度。这些大量的专业讨论特别广泛。 + + +除过论坛,Ubuntu 也提供了一个很正式的社区组织。这个组织包括一个委员会,技术板块,[各地的团队LoCo teams][4](Ubuntu Local Community Teams)和开发人员板块。还有很多,但是这些都是我知道的社区组织部分。 + + +我们还有一个[Ubuntu 问答][5]板块。我认为,这种特色可以代替人们从论坛寻求帮助的方式,我发现在这个网站你得到有用信息的可能行更大。不仅如此,那些提供的解决方案中被选出的最精准的答案也会被写入到官方文档中。 + + +### Ubuntu 的未来 + + +我认为 Ubuntu 的 Unity 接口【译者注:Unity 是 Canonical 公司为 Ubuntu 操作系统的 GNOME 桌面环境开发的图形化 shell】在增加桌面舒适性上少有作为。我能理解其中的缘由,现在它主要做一些诸如可以使开发团队的工作更轻松的事情。但是最终,我还是希望 Unity 可以为 Ubuntu MATE 和 Linux Mint 的普及铺平道路。 + + +我最好奇的一点是 Ubuntu's IRC(Internet Relay Chat) 和邮件列表的发展【译者注:可以在 Ubuntu LoCo Teams IRC Chat上提问关于地方团队和计划的事件的问题,也可以和一些不同团队的成员进行交流】。事实是,他们都不能像 Ubuntu 问答板块那样为它们自己增添一些好的文档。至于邮件列表,我一直认为这对于合作是一种很痛苦的过时方法,但这仅仅是我的个人看法——其他人可能有不同的看法,也可能会认为它很好。 + +你说什么?你认为 Ubuntu 将来会剩下一点主要的使用者?也许你相信 Arch 和 Linux Mint 或者其他的发行版会在普及度上打败 Ubuntu 。 既然这样,那请大声说出你最喜爱的发行版。如果这个发行版是 Ubuntu 衍生版 ,说说你为什么更喜欢它而不是 Ubuntu 本身。如果不出意外,Ubuntu 会成为构建其他发行版的基础,我想很多人都是这样认为的。 + + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/why-ubuntu-based-distros-are-leaders.html + +作者:[Matt Hartley][a] +译者:[vim-kakali](https://github.com/vim-kakali) +校对:[校对者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.ubuntu.com/ +[2]: https://www.debian.org/ +[3]: http://www.datamation.com/open-source/ubuntu-snap-packages-the-good-the-bad-the-ugly.html +[4]: http://loco.ubuntu.com/ +[5]: http://askubuntu.com/ From 90dafb1bed18f4e94b73e54be85436e2f392bed6 Mon Sep 17 00:00:00 2001 From: erlinux <1006990314@qq.com> Date: Thu, 16 Jun 2016 17:17:28 +0800 Subject: [PATCH 1553/1710] erlinux translated --- ... Rapid prototyping with docker-compose.md | 142 ------------------ 1 file changed, 142 deletions(-) delete mode 100644 sources/tech/20160512 Rapid prototyping with docker-compose.md diff --git a/sources/tech/20160512 Rapid prototyping with docker-compose.md b/sources/tech/20160512 Rapid prototyping with docker-compose.md deleted file mode 100644 index 136eff7a7a..0000000000 --- a/sources/tech/20160512 Rapid prototyping with docker-compose.md +++ /dev/null @@ -1,142 +0,0 @@ -Translating by Bestony -Rapid prototyping with docker-compose -======================================== - -In this write-up we'll look at a Node.js prototype for **finding stock of the Raspberry PI Zero** from three major outlets in the UK. - -I wrote the code and deployed it to an Ubuntu VM in Azure within a single evening of hacking. Docker and the docker-compose tool made the deployment and update process extremely quick. - -### Remember linking? - -If you've already been through the [Hands-On Docker tutorial][1] then you will have experience linking Docker containers on the command line. Linking a Node hit counter to a Redis server on the command line may look like this: - -``` -$ docker run -d -P --name redis1 -$ docker run -d hit_counter -p 3000:3000 --link redis1:redis -``` - -Now imagine your application has three tiers - -- Web front-end -- Batch tier for processing long running tasks -- Redis or mongo database - -Explicit linking through `--link` is just about manageable with a couple of containers, but can get out of hand as we add more tiers or containers to the application. - -### Enter docker-compose - -![](http://blog.alexellis.io/content/images/2016/05/docker-compose-logo-01.png) ->Docker Compose logo - -The docker-compose tool is part of the standard Docker Toolbox and can also be downloaded separately. It provides a rich set of features to configure all of an application's parts through a plain-text YAML file. - -The above example would look like this: - -``` -version: "2.0" -services: - redis1: - image: redis - hit_counter: - build: ./hit_counter - ports: - - 3000:3000 -``` - -From Docker 1.10 onwards we can take advantage of network overlays to help us scale out across multiple hosts. Prior to this linking only worked across a single host. The `docker-compose scale` command can be used to bring on more computing power as the need arises. - ->View the [docker-compose][2] reference on docker.com - -### Real-world example: Raspberry PI Stock Alert - -![](http://blog.alexellis.io/content/images/2016/05/Raspberry_Pi_Zero_ver_1-3_1_of_3_large.JPG) ->The new Raspberry PI Zero v1.3 image courtesy of Pimoroni - -There is a huge buzz around the Raspberry PI Zero - a tiny microcomputer with a 1GHz CPU and 512MB RAM capable of running full Linux, Docker, Node.js, Ruby and many other popular open-source tools. One of the best things about the PI Zero is that costs only 5 USD. That also means that stock gets snapped up really quickly. - -*If you want to try Docker or Swarm on the PI check out the tutorial below.* - ->[Docker Swarm on the PI Zero][3] - -### Original site: whereismypizero.com - -I found a webpage which used screen scraping to find whether 4-5 of the most popular outlets had stock. - -- The site contained a static HTML page -- Issued one XMLHttpRequest per outlet accessing /public/api/ -- The server issued the HTTP request to each shop and performed the scraping - -Every call to /public/api/ took 3 seconds to execute and using Apache Bench (ab) I was only able to get through 0.25 requests per second. - -### Reinventing the wheel - -The retailers didn't seem to mind whereismypizero.com scraping their sites for stock, so I set about writing a similar tool from the ground up. I had the intention of handing a much higher amount of requests per second through caching and de-coupling the scrape from the web tier. Redis was the perfect tool for the job. It allowed me to set an automatically expiring key/value pair (i.e. a simple cache) and also to transmit messages between Node processes through pub/sub. - ->Fork or star the code on Github: [alexellis/pi_zero_stock][4] - -If you've worked with Node.js before then you will know it is single-threaded and that any CPU intensive tasks such as parsing HTML or JSON could lead to a slow-down. One way to mitigate that is to use a second worker process and a Redis messaging channel as connective tissue between this and the web tier. - -- Web tier - -Gives 200 for cache hit (Redis key exists for store) - -Gives 202 for cache miss (Redis key doesn't exist, so issues message) - -Since we are only ever reading a Redis key the response time is very quick. -- Stock Fetcher - -Performs HTTP request - -Scrapes for different types of web stores - -Updates a Redis key with a cache expire of 60 seconds - -Also locks a Redis key to prevent too many in-flight HTTP requests to the web stores. -``` -version: "2.0" -services: - web: - build: ./web/ - ports: - - "3000:3000" - stock_fetch: - build: ./stock_fetch/ - redis: - image: redis -``` - -*The docker-compose.yml file from the example.* - -Once I had this working locally deploying to an Ubuntu 16.04 image in the cloud (Azure) took less than 5 minutes. I logged in, cloned the repository and typed in `docker compose up -d`. That was all it took - rapid prototyping a whole system doesn't get much better. Anyone (including the owner of whereismypizero.com) can deploy the new solution with just two lines: - -``` -$ git clone https://github.com/alexellis/pi_zero_stock -$ docker-compose up -d -``` - -Updating the site is easy and just involves a `git pull` followed by a `docker-compose up -d` with the `--build` argument passed along. - -If you are still linking your Docker containers manually, try Docker Compose for yourself or my code below: - ->Fork or star the code on Github: [alexellis/pi_zero_stock][5] - -### Check out the test site - -The test site is currently deployed now using docker-compose. - ->[stockalert.alexellis.io][6] - -![](http://blog.alexellis.io/content/images/2016/05/Screen-Shot-2016-05-16-at-22-34-26-1.png) - -Preview as of 16th of May 2016 - ----------- -via: http://blog.alexellis.io/rapid-prototype-docker-compose/ - -作者:[Alex Ellis][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://blog.alexellis.io/author/alex/ -[1]: http://blog.alexellis.io/handsondocker -[2]: https://docs.docker.com/compose/compose-file/ -[3]: http://blog.alexellis.io/dockerswarm-pizero/ -[4]: https://github.com/alexellis/pi_zero_stock -[5]: https://github.com/alexellis/pi_zero_stock -[6]: http://stockalert.alexellis.io/ - From e35fdd50e355d4c8324cb6e2cd0b0c76818b79ee Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Thu, 16 Jun 2016 19:07:45 +0800 Subject: [PATCH 1554/1710] vim-kakali translating --- sources/talk/20160531 The Anatomy of a Linux User.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20160531 The Anatomy of a Linux User.md b/sources/talk/20160531 The Anatomy of a Linux User.md index 00c198712f..b403758f2a 100644 --- a/sources/talk/20160531 The Anatomy of a Linux User.md +++ b/sources/talk/20160531 The Anatomy of a Linux User.md @@ -1,3 +1,5 @@ +vim-kakali translating + The Anatomy of a Linux User ================================ From 3f3c31d191b352e990596e6e5004b0c51db5087c Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 16 Jun 2016 19:16:37 +0800 Subject: [PATCH 1555/1710] [translated]Should distributors disable IPv4-mapped IPv6 --- ...d distributors disable IPv4-mapped IPv6.md | 62 ------------------- ...d distributors disable IPv4-mapped IPv6.md | 60 ++++++++++++++++++ 2 files changed, 60 insertions(+), 62 deletions(-) delete mode 100644 sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md create mode 100644 translated/talk/20160525 Should distributors disable IPv4-mapped IPv6.md diff --git a/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md b/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md deleted file mode 100644 index 1faf7dab6c..0000000000 --- a/sources/talk/20160525 Should distributors disable IPv4-mapped IPv6.md +++ /dev/null @@ -1,62 +0,0 @@ -alim0x translating - -Should distributors disable IPv4-mapped IPv6? -============================================= - -By all accounts, the Internet's transition to IPv6 has been a slow affair. In recent years, though, perhaps inspired by the exhaustion of the IPv4 address space, IPv6 usage has been [on the rise][1]. There is a corresponding interest in ensuring that applications work with both IPv4 and IPv6. But, as a recent discussion on the OpenBSD mailing list has highlighted, a mechanism designed to ease the transition to an IPv6 network may also make the net less secure — and Linux distributions may be configured insecurely by default. - -### Address mapping - -IPv6 may look like IPv4 in many ways, but it is a different protocol with a different address space. Server programs wanting to receive connections using either protocol must thus open separate sockets for the two different address families — AF_INET for IPv4, and AF_INET6 for IPv6. In particular, a program wishing to accept connections to any of a host's interfaces using either protocol will need to create an AF_INET socket bound to the all-zeroes wild-card address (0.0.0.0) and an AF_INET6 socket bound to the IPv6 equivalent (written as "::"). It must then listen for connections on both sockets — or so one would think. - -Many years ago, in [RFC 3493][2], the IETF specified a mechanism by which a program could work with either protocol using a single IPv6 socket. With a socket enabled for this behavior, the program need only bind to :: to receive connections to all interfaces with both protocols. When an IPv4 connection is made to the bound port, the source address will be mapped into IPv6 as described in [RFC 2373][3]. So, for example, a program using this mode would see an incoming connection from 192.168.1.1 as originating from ::ffff:192.168.1.1 (the mixed notation is how such addresses are ordinarily written). The program can also open connections to IPv4 addresses by mapping them in the same manner. - -The RFC calls for this behavior to be implemented by default, so most systems do so. There are exceptions, though, one of which is OpenBSD; there, programs wishing to work with both protocols can only do so by creating two independent sockets. A program that opens two sockets on Linux, though, will run into trouble: both the IPv4 and the IPv6 socket will try to bind to the IPv4 address(es), so whichever attempt comes second will fail. In other words, a program that binds a socket to a given port on :: will be bound to that port on both the IPv6 :: and the IPv4 0.0.0.0. If it then tries to bind an IPv4 socket to the same port on 0.0.0.0, the operation will fail as the port is already bound. - -There is a way around that problem, of course; the program can call setsockopt() to turn on the IPV6_V6ONLY option. A program that opens two sockets and sets IPV6_V6ONLY should be portable across all systems. - -Readers may be less than thoroughly shocked to learn that not every program out there gets all of this right. One of those, it turns out, is the [OpenNTPD][4] implementation of the Network Time Protocol. Brent Cook recently [proposed a small patch][5] adding the requisite setsockopt() call to the upstream OpenNTPD source, which lives within OpenBSD itself. That patch does not look likely to be accepted, though, for the most OpenBSD-like of reasons. - -### Security concerns - -As mentioned above, OpenBSD does not support IPv4-mapped IPv6 sockets at all. Even if a program tries to explicitly enable address mapping by setting the IPV6_V6ONLY option to zero, its author will be disappointed; that setting has no effect on OpenBSD systems. The reasoning behind this decision is that this mapping brings some security concerns with it. There are various types of attack surface that it opens up, but it all comes down to the provision of two different ways to reach the same port, each with its own access-control rules. - -Any given server system may have set up firewall rules describing the allowed access to the port in question. There may also be mechanisms like TCP wrappers or a BPF-based filter in place, or a router on the net could be doing its own stateful connection filtering. The result is likely to be gaps in firewall protection and the potential for all kinds of confusion resulting from the same IPv4 address being reachable via two different protocols. If the address mapping is done at the edge of the network, the situation gets even more complex; see [this draft RFC from 2003][6] for a description of some other attack scenarios that come about if mapped addresses are transmitted between hosts. - -Adapting systems and software to properly handle IPv4-mapped IPv6 addresses can certainly be done. But that adds to the overall complexity of the system, and it's a sure bet that this adaptation has not actually been done anywhere near as widely as it should be. As Theo de Raadt [put it][7]: - - **Sometimes people put a bad idea into an RFC. Later they discover it is impossible to walk the idea back to the garbagebin. The result is concepts so complicated that everyone has to be a fulltime expert, on admin side and coder side**. - -It is not at all clear how many of these full-time experts are actually out there configuring systems and networks where IPv4-mapped IPv6 addresses are in use. - -One might well argue that, while IPv4-mapped IPv6 addresses create security hazards, there should be no harm in changing a program so that it turns off address mapping on systems that implement it. But Theo argues that this should not be done, for a couple of reasons. The first is that there are many broken programs out there, and it will never be possible to fix them all. But the real reason is to put pressure on distributors to turn off address mapping by default. As he put it: "**Eventually someone will understand the damage is systematic, and change the system defaults to 'secure by default'**." - -### Address mapping on Linux - -On Linux systems, address mapping is controlled by a sysctl knob called net.ipv6.bindv6only; it is set to zero (enabling address mapping) by default. Administrators (or distributors) can turn off mapping by setting this knob to one, but they would be well advised to be sure that their applications all work properly before deploying such a system in production. A quick survey suggests that none of the primary distributors change the default for this knob; Debian [changed the default][9] for the "squeeze" release in 2009, but the change broke enough packages ([anything involving Java][10], for example) that it was, [after a certain amount of Debian-style discussion][11], reverted. It would appear that quite a few programs rely on address mapping being enabled by default. - -OpenBSD has the freedom to break things outside of its core system in the name of "secure by default"; Linux distributors tend to have a harder time getting away with such changes. So those distributors, being generally averse to receiving abuse from their users, are unlikely to change the default of the bindv6only knob anytime soon. The good news is that this functionality has been the default for years and stories of exploits are hard to find. But, as we all know, that provides no guarantees that exploits are not possible. - - --------------------------------------------------------------------------------- - -via: https://lwn.net/Articles/688462/ - -作者:[Jonathan Corbet][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://lwn.net/ -[1]: https://www.google.com/intl/en/ipv6/statistics.html -[2]: https://tools.ietf.org/html/rfc3493#section-3.7 -[3]: https://tools.ietf.org/html/rfc2373#page-10 -[4]: https://github.com/openntpd-portable/ -[5]: https://lwn.net/Articles/688464/ -[6]: https://tools.ietf.org/html/draft-itojun-v6ops-v4mapped-harmful-02 -[7]: https://lwn.net/Articles/688465/ -[8]: https://lwn.net/Articles/688466/ -[9]: https://lists.debian.org/debian-devel/2009/10/msg00541.html -[10]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056 -[11]: https://lists.debian.org/debian-devel/2010/04/msg00099.html diff --git a/translated/talk/20160525 Should distributors disable IPv4-mapped IPv6.md b/translated/talk/20160525 Should distributors disable IPv4-mapped IPv6.md new file mode 100644 index 0000000000..8b4f4b4b4f --- /dev/null +++ b/translated/talk/20160525 Should distributors disable IPv4-mapped IPv6.md @@ -0,0 +1,60 @@ +发行版分发者应该禁用 IPv4 映射的 IPv6 地址吗 +============================================= + +大家都说,互联网向 IPv6 的过渡是件很缓慢的事情。不过在最近几年,可能是由于 IPv4 地址资源的枯竭,IPv6 的使用处于[上升态势][1]。相应的,开发者也有兴趣确保软件能在 IPv4 和 IPv6 下工作。但是,正如近期 OpenBSD 邮件列表的讨论所关注的,一个使得向 IPv6 转换更加轻松的机制设计同时也可能导致网络更不安全——并且 Linux 发行版们的默认配置可能并不安全。 + +### 地址映射 + +IPv6 在很多方面看起来可能很像 IPv4,但它是带有不同地址空间的不同的协议。服务器程序想要接受使用二者之中任意一个协议的连接,必须给两个不同的地址族分别打开一个套接字——IPv4 的 AF_INET 和 IPv6 的 AF_INET6。特别是一个程序希望接受使用任意协议到任意主机接口的连接的话,需要创建一个绑定到全零通配符地址(0.0.0.0)的 AF_INET 套接字和一个绑定到 IPv6 等效地址(写作“::”)的 AF_INET6 套接字。它必须在两个套接字上都监听连接——或者有人会这么认为。 + +多年前,在 [RFC 3493][2],IETF 指定了一个机制,程序可以使用一个单独的 IPv6 套接字工作在两个协议之上。有了一个启用这个行为的套接字,程序只需要绑定到 :: 来接受使用这两个协议到达所有接口的连接。当创建了一个 IPv4 连接到绑定端口,源地址会像 [RFC 2373][3] 中描述的那样映射到 IPv6。所以,举个例子,一个使用了这个模式的程序会将一个 192.168.1.1 的传入连接看作来自 ::ffff:192.168.1.1(这个混合的写法就是这种地址通常的写法)。程序也能通过相同的映射方法打开一个到 IPv4 地址的连接。 + +RFC 要求这个行为要默认实现,所以大多数系统这么做了。不过也有些例外,OpenBSD 就是其中之一;在那里,希望在两种协议下工作的程序能做的只能是创建两个独立的套接字。但一个在 Linux 中打开两个套接字的程序会遇到麻烦:IPv4 和 IPv6 套接字都会尝试绑定到 IPv4 地址,所以不论是哪个后者都会失败。换句话说,一个绑定到 :: 指定端口的套接字的程序会同时绑定到 IPv6 :: 和 IPv4 0.0.0.0 地址的那个端口上。如果程序之后尝试绑定一个 IPv4 套接字到 0.0.0.0 的相同端口上时,这个操作会失败,因为这个端口已经被绑定了。 + +当然有个办法可以解决这个问题;程序可以调用 setsockopt() 来打开 IPV6_V6ONLY 选项。一个打开两个套接字并且设置了 IPV6_V6ONLY 的程序应该可以在所有的系统间移植。 + +读者们可能对不是每个程序都能正确处理这一问题没那么震惊。事实证明,这些程序的其中之一是网络时间协议(Network Time Protocol)的 [OpenNTPD][4] 实现。Brent Cook 最近给上游 OpenNTPD 源码[提交了一个小补丁][5],添加了必要的 setsockopt() 调用,它也被提交到了 OpenBSD 中了。尽管那个补丁看起来不大可能被接受,最可能是因为 OpenBSD 式的理由(LCTT 译注:如前文提到的,OpenBSD 并不受这个问题的影响)。 + +### 安全担忧 + +正如上文所提到,OpenBSD 根本不支持 IPv4 映射的 IPv6 套接字。即使一个程序试着通过将 IPV6_V6ONLY 选项设置为 0 显式地启用地址映射,它的作者会感到沮丧,因为这个设置在 OpenBSD 系统中无效。这个决定背后的原因是这个映射带来了一些安全担忧。攻击打开接口的攻击类型有很多种,但它们最后都会回到规定的两个途径到达相同的端口,每个端口都有它自己的控制规则。 + +任何给定的服务器系统可能都设置了防火墙规则,描述端口的允许访问权限。也许还会有适当的机制,比如 TCP wrappers 或一个基于 BPF 的过滤器,或一个网络上的路由可以做连接状态协议过滤。结果可能是导致防火墙保护和潜在的所有类型的混乱连接之间的缺口导致同一 IPv4 地址可以通过两个不同的协议到达。如果地址映射是在网络边界完成的,情况甚至会变得更加复杂;参看[这个 2003 年的 RFC 草案][6],它描述了如果映射地址在主机之间传送,一些随之而来的其它攻击场景。 + +改变系统和软件合适地处理 IPv4 映射的 IPv6 地址当然可以实现。但那增加了系统的整体复杂度,并且可以确定这个改动没有实际完整实现到它应该实现的范围内。如同 Theo de Raadt [说的][7]: + + **有时候人们将一个坏主意放进了 RFC。之后他们发现不可能将这个主意扔回垃圾箱了。结果就是概念变得如此复杂,每个人都得在管理和编码方面是个全职专家。** + +我们也根本不清楚这些全职专家有多少在实际配置使用 IPv4 映射的 IPv6 地址的系统和网络。 + +有人可能会说,尽管 IPv4 映射的 IPv6 地址造成了安全危险,更改一下程序让它关闭部署实现它的系统上的地址映射应该没什么危害。但 Theo 认为不应该这么做,有两个理由。第一个是有许多破损的程序,它们永远不会被修复。但实际的原因是给发行版分发者压力去默认关闭地址映射。正如他说的:“**最终有人会理解这个危害是系统性的,并更改系统默认行为使之‘secure by default’**。” + +### Linux 上的地址映射 + +在 Linux 系统,地址映射由一个叫做 net.ipv6.bindv6only 的 sysctl 开关控制;它默认设置为 0(启用地址映射)。管理员(或发行版分发者)可以通过将它设置为 1 关闭地址映射,但在部署这样一个系统到生产环境之前最好确认软件都能正常工作。一个快速调查显示没有哪个主要发行版分发者改变这个默认值;Debian 在 2009 年的 “squeeze” 中[改变了这个默认值][9],但这个改动破坏了足够多的软件包(比如[任何包含 Java 的][10]),[在经过了一定数量的 Debian 式讨论之后][11],它恢复到了原来的设置。看上去不少程序依赖于默认启用地址映射。 + +OpenBSD 有自由以“secure by default”的名义打破其核心系统之外的东西;Linux 发行版分发者倾向于更难以作出这样的改变。所以那些一般不愿意收到他们用户的不满的发行版分发者,不太可能很快对 bindv6only 的默认设置作出改变。好消息是这个功能作为默认已经很多年了,但很难找到利用的例子。但是,正如我们都知道的,谁都无法保证这样的利用不可能发生。 + + +-------------------------------------------------------------------------------- + +via: https://lwn.net/Articles/688462/ + +作者:[Jonathan Corbet][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://lwn.net/ +[1]: https://www.google.com/intl/en/ipv6/statistics.html +[2]: https://tools.ietf.org/html/rfc3493#section-3.7 +[3]: https://tools.ietf.org/html/rfc2373#page-10 +[4]: https://github.com/openntpd-portable/ +[5]: https://lwn.net/Articles/688464/ +[6]: https://tools.ietf.org/html/draft-itojun-v6ops-v4mapped-harmful-02 +[7]: https://lwn.net/Articles/688465/ +[8]: https://lwn.net/Articles/688466/ +[9]: https://lists.debian.org/debian-devel/2009/10/msg00541.html +[10]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056 +[11]: https://lists.debian.org/debian-devel/2010/04/msg00099.html From 1a7d4549da155a67ba88ffb32d47ec048a7ead40 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 17 Jun 2016 22:23:10 +0800 Subject: [PATCH 1556/1710] =?UTF-8?q?20160617-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 6 Amazing Linux Distributions For Kids.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sources/tech/20160616 6 Amazing Linux Distributions For Kids.md diff --git a/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md b/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md new file mode 100644 index 0000000000..5d0053e2ce --- /dev/null +++ b/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md @@ -0,0 +1,114 @@ +6 Amazing Linux Distributions For Kids +====================================== + +Linux and open source is the future and there is no doubt about that, and to see this come to a reality, a strong foundation has to be lied, by starting from the lowest level possible and that is exposing kids to Linux and teaching them how to use Linux operating systems. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Linux-Distros-For-Kids.png) +>Linux Distros For Kids + +Linux is a very powerful operating system and that is one of the reasons why it powers a lot of servers on the Internet. Though there have been concerns about its user friendliness which has brought about debate of how it will over take Mac OSX and Windows on desktop computers, I think users need to accept Linux as it is to realize its real power. + +Today, Linux powers a lot of machines out there, from mobile phones, to tablets, laptops, workstations, servers, supercomputers, cars, air traffic control systems, refrigerators and many more. With all this and more yet to come in the near future, as I had already stated at the beginning, Linux is the operating system for future computing. + +>Read Also: [30 Big Companies and Devices Running on Linux][1] + +Because the future belongs to the kids of today, then introducing them to technologies that will change the future is the way to go. Therefore they have to be introduced at an early stage to start learning computer technologies and Linux as a special case. + +One thing common to children is curiosity and early learning can help instill the a character of exploration in them when the learning environment is designed to suit them. + +Having looked some quick reasons why kids should learn Linux, let us now go through a list of exciting Linux distributions that you can introduce your kids to, so that they can start using and learning Linux. + +### Sugar on a Stick + +It is a project by Sugar Labs that aims at designing free tools to support learning among children by making them gain skills in exploring, discovering, creating and also reflecting on ideas. It is a non-profit organization led by volunteers. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Sugar-Neighborhood-View.png) +>Sugar Neighborhood View + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Sugar-Activity-Library.png) +>Sugar Activity Library + +You can think of sugar as both a desktop and a collection of learning activities that help encourage active involvement from children who are learning. + +Visit Homepage: + +### Edubuntu + +This is a grassroots project that is based on the most popular Linux distribution today, Ubuntu. It is intended get schools, homes and communities to easily install and use free Ubuntu software. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Edubuntu-Apps.jpg) +>Edubuntu Desktop Apps + +It is supported by different groups of students, teachers, parents, stake holders and also hackers who believe in free learning and sharing of knowledge for self improvement and also community based development. + +The main aim of the project is to assemble a system that can offer free software to enhance learning and education by making it easy for users to install and also maintain software. + +Visit Homepage: + +### Doudou Linux + +It is designed specifically for children to experience ease in using a computer while building creative thinking in them. It provides simple yet educative applications that allows kids to learn and discover new ideas while using it. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Doudou-Linux.png) +>Doudou Linux + +One important thing about Doudou Linux is its content filtering feature, which prevents children from visiting restricted content on the web. For more kids protection, it also includes user privacy on the Internet, automatically removes adds from web pages and many more. + +Visit Homepage: + +### LinuxKidX + +It is a LiveCD based on Slackware Linux with a long list of educational software for kids to learn form. It uses KDE as the default Desktop Environment and includes software such as Ktouch a typing tutor, Kstars as virtual planetaruim, Kalzium a periodic table, KwordQuiz among others. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/LinuxKidX.jpg) +>LinuxKidX + +Visit Homepage: + +### Ubermix + +It is a free software that is built from the ground based on Ubuntu Linux and is intended for educational purposes. It comes with over 60 free software reinstalled and helps to make learning and teaching easy for students and teachers respectively. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/ubermix.png) +>Ubermix Linux + +Some of its features include 5 minutes installation and also few seconds quick recovery mechanism. It should work well well for teenage children. + +Visit Homepage: + +### Qimo + +I have added this to list because many readers are expected to ask about Qimo, but as of this writing, the Qimo for kids development team has retired from the project, therefore no more development it expected. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Qimo-Linux.png) +>Qimo Linux + +But you can still find most of the games for kids in Ubuntu and other Linux distributions. As they have mentioned, they are not done working on an educational software for kids and are developing an android application for children to improve their literacy skills. + +You can read more from their official website and expect more from them in the future. + +Visit Homepage: + +That is it for now, in case there are more Linux operating systems intended for kids or children out there, which I have not included in this list, you can let us know by leaving a comment. + +You can also let us know of what you think of introducing kids to Linux and the future of Linux especially on Desktop computers. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/best-linux-distributions-for-kids/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + + +作者:[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/big-companies-and-devices-running-on-gnulinux/ + + + + + From 948d5243629992102885e53fd86a2f0602dd6908 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 17 Jun 2016 23:17:02 +0800 Subject: [PATCH 1557/1710] =?UTF-8?q?20160617-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ntrol with SELinux or AppArmor in Linux.md | 248 ++++++++++++++++++ 1 file changed, 248 insertions(+) create mode 100644 sources/tech/20160608 Implementing Mandatory Access Control with SELinux or AppArmor in Linux.md diff --git a/sources/tech/20160608 Implementing Mandatory Access Control with SELinux or AppArmor in Linux.md b/sources/tech/20160608 Implementing Mandatory Access Control with SELinux or AppArmor in Linux.md new file mode 100644 index 0000000000..65c8657dff --- /dev/null +++ b/sources/tech/20160608 Implementing Mandatory Access Control with SELinux or AppArmor in Linux.md @@ -0,0 +1,248 @@ +Implementing Mandatory Access Control with SELinux or AppArmor in Linux +=========================================================================== + +To overcome the limitations of and to increase the security mechanisms provided by standard ugo/rwx permissions and [access control lists][1], the United States National Security Agency (NSA) devised a flexible Mandatory Access Control (MAC) method known as SELinux (short for Security Enhanced Linux) in order to restrict among other things, the ability of processes to access or perform other operations on system objects (such as files, directories, network ports, etc) to the least permission possible, while still allowing for later modifications to this model. + +![](http://www.tecmint.com/wp-content/uploads/2016/06/SELinux-AppArmor-Security-Hardening-Linux.png) +>SELinux and AppArmor Security Hardening Linux + +Another popular and widely-used MAC is AppArmor, which in addition to the features provided by SELinux, includes a learning mode that allows the system to “learn” how a specific application behaves, and to set limits by configuring profiles for safe application usage. + +In CentOS 7, SELinux is incorporated into the kernel itself and is enabled in Enforcing mode by default (more on this in the next section), as opposed to openSUSE and Ubuntu which use AppArmor. + +In this article we will explain the essentials of SELinux and AppArmor and how to use one of these tools for your benefit depending on your chosen distribution. + +### Introduction to SELinux and How to Use it on CentOS 7 + +Security Enhanced Linux can operate in two 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. + +SELinux can also be disabled. Although it is not an operation mode itself, it is still an option. However, learning how to use this tool is better than just ignoring it. Keep it in mind! + +To display the current mode of SELinux, use getenforce. If you want to toggle the operation mode, use setenforce 0 (to set it to Permissive) or setenforce 1 (Enforcing). + +Since this change will not survive a reboot, you will need to edit the /etc/selinux/config file and set the SELINUX variable to either enforcing, permissive, or disabled in order to achieve persistence across reboots: + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Enable-Disable-SELinux-Mode.png) +>How to Enable and Disable SELinux Mode + +On a side note, if getenforce returns Disabled, you will have to edit /etc/selinux/config with the desired operation mode and reboot. Otherwise, you will not be able to set (or toggle) the operation mode with setenforce. + +One of the typical uses of setenforce consists of toggling between SELinux modes (from enforcing to permissive or the other way around) to troubleshoot an application that is misbehaving or not working as expected. If it works after you set SELinux to Permissive mode, you can be confident you’re looking at a SELinux permissions issue. + +Two classic cases where we will most likely have to deal with SELinux are: + +- Changing the default port where a daemon listens on. +- Setting the DocumentRoot directive for a virtual host outside of /var/www/html. + +Let’s take a look at these two cases using the following examples. + +#### EXAMPLE 1: Changing the default port for the sshd daemon + +One of the first thing most system administrators do in order to secure their servers is change the port where the SSH daemon listens on, mostly to discourage port scanners and external attackers. To do this, we use the Port directive in `/etc/ssh/sshd_config` followed by the new port number as follows (we will use port 9999 in this case): + +``` +Port 9999 +``` + +After attempting to restart the service and checking its status we will see that it failed to start: + +``` +# systemctl restart sshd +# systemctl status sshd +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Check-sshd-Service-Status.png) +>Check SSH Service Status + +If we take a look at /var/log/audit/audit.log, we will see that sshd was prevented from starting on port 9999 by SELinux because that is a reserved port for the JBoss Management service (SELinux log messages include the word “AVC” so that they might be easily identified from other messages): + +``` +# cat /var/log/audit/audit.log | grep AVC | tail -1 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Check-Linux-Audit-Logs.png) +>Check Linux Audit Logs + +At this point most people would probably disable SELinux but we won’t. We will see that there’s a way for SELinux, and sshd listening on a different port, to live in harmony together. Make sure you have the policycoreutils-python package installed and run: + +``` +# yum install policycoreutils-python +``` + +To view a list of the ports where SELinux allows sshd to listen on. In the following image we can also see that port 9999 was reserved for another service and thus we can’t use it to run another service for the time being: + +``` +# semanage port -l | grep ssh +``` + +Of course we could choose another port for SSH, but if we are certain that we will not need to use this specific machine for any JBoss-related services, we can then modify the existing SELinux rule and assign that port to SSH instead: + +``` +# semanage port -m -t ssh_port_t -p tcp 9999 +``` + +After that, we can use the first semanage command to check if the port was correctly assigned, or the -lC options (short for list custom): + +``` +# semanage port -lC +# semanage port -l | grep ssh +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Assign-Port-to-SSH.png) +>Assign Port to SSH + +We can now restart SSH and connect to the service using port 9999. Note that this change WILL survive a reboot. + +#### EXAMPLE 2: Choosing a DocumentRoot outside /var/www/html for a virtual host + +If you need to [set up a Apache virtual host][2] using a directory other than /var/www/html as DocumentRoot (say, for example, `/websrv/sites/gabriel/public_html`): + +``` +DocumentRoot “/websrv/sites/gabriel/public_html” +``` + +Apache will refuse to serve the content because the index.html has been labeled with the default_t SELinux type, which Apache can’t access: + +``` +# wget http://localhost/index.html +# ls -lZ /websrv/sites/gabriel/public_html/index.html +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Labeled-default_t-SELinux-Type.png) +>Labeled as default_t SELinux Type + +As with the previous example, you can use the following command to verify that this is indeed a SELinux-related issue: + +``` +# cat /var/log/audit/audit.log | grep AVC | tail -1 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Check-Logs-for-SELinux-Issues.png) +>Check Logs for SELinux Issues + +To change the label of /websrv/sites/gabriel/public_html recursively to httpd_sys_content_t, do: + +``` +# semanage fcontext -a -t httpd_sys_content_t "/websrv/sites/gabriel/public_html(/.*)?" +``` + +The above command will grant Apache read-only access to that directory and its contents. + +Finally, to apply the policy (and make the label change effective immediately), do: + +``` +# restorecon -R -v /websrv/sites/gabriel/public_html +``` + +Now you should be able to access the directory: + +``` +# wget http://localhost/index.html +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Access-Apache-Directory.png) +>Access Apache Directory + +For more information on SELinux, refer to the Fedora 22 [SELinux and Administrator guide][3]. + + +### Introduction to AppArmor and How to Use it on OpenSUSE and Ubuntu + +The operation of AppArmor is based on profiles defined in plain text files where the allowed permissions and access control rules are set. Profiles are then used to place limits on how applications interact with processes and files in the system. + +A set of profiles is provided out-of-the-box with the operating system, whereas others can be put in place either automatically by applications when they are installed or manually by the system administrator. + +Like SELinux, AppArmor runs profiles in two modes. In enforce mode, applications are given the minimum permissions that are necessary for them to run, whereas in complain mode AppArmor allows an application to take restricted actions and saves the “complaints” resulting from that operation to a log (/var/log/kern.log, /var/log/audit/audit.log, and other logs inside /var/log/apparmor). + +These logs will show through lines with the word audit in them errors that would occur should the profile be run in enforce mode. Thus, you can try out an application in complain mode and adjust its behavior before running it under AppArmor in enforce mode. + +The current status of AppArmor can be shown using: + +``` +$ sudo apparmor_status +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Check-AppArmor-Status.png) +>Check AppArmor Status + +The image above indicates that the profiles /sbin/dhclient, /usr/sbin/, and /usr/sbin/tcpdump are in enforce mode (that is true by default in Ubuntu). + +Since not all applications include the associated AppArmor profiles, the apparmor-profiles package, which provides other profiles that have not been shipped by the packages they provide confinement for. By default, they are configured to run in complain mode so that system administrators can test them and choose which ones are desired. + +We will make use of apparmor-profiles since writing our own profiles is out of the scope of the LFCS [certification][4]. However, since profiles are plain text files, you can view them and study them in preparation to create your own profiles in the future. + +AppArmor profiles are stored inside /etc/apparmor.d. Let’s take a look at the contents of that directory before and after installing apparmor-profiles: + +``` +$ ls /etc/apparmor.d +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/View-AppArmor-Directory-Content.png) +>View AppArmor Directory Content + +If you execute sudo apparmor_status again, you will see a longer list of profiles in complain mode. You can now perform the following operations: + +To switch a profile currently in enforce mode to complain mode: + +``` +$ sudo aa-complain /path/to/file +``` + +and the other way around (complain –> enforce): + +``` +$ sudo aa-enforce /path/to/file +``` + +Wildcards are allowed in the above cases. For example, + +``` +$ sudo aa-complain /etc/apparmor.d/* +``` + +will place all profiles inside /etc/apparmor.d into complain mode, whereas + +``` +$ sudo aa-enforce /etc/apparmor.d/* +``` + +will switch all profiles to enforce mode. + +To entirely disable a profile, create a symbolic link in the /etc/apparmor.d/disabled directory: + +``` +$ sudo ln -s /etc/apparmor.d/profile.name /etc/apparmor.d/disable/ +``` + +For more information on AppArmor, please refer to the [official AppArmor wiki][5] and to the documentation [provided by Ubuntu][6]. + +### Summary + +In this article we have gone through the basics of SELinux and AppArmor, two well-known MACs. When to use one or the other? To avoid difficulties, you may want to consider sticking with the one that comes with your chosen distribution. In any event, they will help you place restrictions on processes and access to system resources to increase the security in your servers. + +Do you have any questions, comments, or suggestions about this article? Feel free to let us know using the form below. Don’t hesitate to let us know if you have any questions or comments. + + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mandatory-access-control-with-selinux-or-apparmor-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/secure-files-using-acls-in-linux/ +[2]: http://www.tecmint.com/apache-virtual-hosting-in-centos/ +[3]: https://docs.fedoraproject.org/en-US/Fedora/22/html/SELinux_Users_and_Administrators_Guide/index.html +[4]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[5]: http://wiki.apparmor.net/index.php/Main_Page +[6]: https://help.ubuntu.com/community/AppArmor + + + From 10602768d47d0e1f865b8ca57dc445d40346c667 Mon Sep 17 00:00:00 2001 From: tresspassing2 Date: Fri, 17 Jun 2016 23:27:03 +0800 Subject: [PATCH 1558/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=20tresspassing2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译申请 tresspassing2 --- ...Explore Linux with Installed Help Documentations and Tools.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/LFCS/Part 12 - How to Explore Linux with Installed Help Documentations and Tools.md b/sources/tech/LFCS/Part 12 - How to Explore Linux with Installed Help Documentations and Tools.md index 45ccb57f95..60903d5cce 100644 --- a/sources/tech/LFCS/Part 12 - How to Explore Linux with Installed Help Documentations and Tools.md +++ b/sources/tech/LFCS/Part 12 - How to Explore Linux with Installed Help Documentations and Tools.md @@ -1,3 +1,4 @@ +翻译申请 tresspassing2 Part 12 - LFCS: How to Explore Linux with Installed Help Documentations and Tools ================================================================================== From e2c23a39ac822f8e2b9d2770ff44240601a8cbb3 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 17 Jun 2016 23:33:05 +0800 Subject: [PATCH 1559/1710] =?UTF-8?q?20160617-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...User Virtual Console or Terminal in Linux.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md diff --git a/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md b/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md new file mode 100644 index 0000000000..36703d74dc --- /dev/null +++ b/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md @@ -0,0 +1,98 @@ +vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux +======================================================================= + +Virtual consoles are very important features of Linux, and they provide a system user a shell prompt to use the system in a non-graphical setup which you can only use on the physical machine but not remotely. + +A user can use several virtual console sessions at the same time just by switching form one virtual console to another. + +![](http://www.tecmint.com/wp-content/uploads/2016/05/vlock-Lock-User-Terminal-in-Linux.png) +>vlock Lock User Console or Terminal in Linux + +In this how to guide, we shall look at how to lock user virtual console or terminal console in Linux systems using vlock program. + +### What is vlock? + +vlock is a utility used to lock one or several user virtual console sessions. vlock is important on a multi user system, it allows users to lock their own sessions while other users can still use the same system via other virtual consoles. Where necessary, the entire console can be locked down and also switching virtual console disabled. + +vlock primarily works for console sessions and also has support for locking non-console sessions but this has not been tested fully. + +### Installing vlock in Linux + +To install vlock program on your respective Linux systems, use: + +``` +# yum install vlock [On RHEL / CentOS / Fedora] +$ sudo apt-get install vlock [On Ubuntu / Debian / Mint] +``` + +### How to use vlock in Linux + +There are few options that you can use with vlock and the general syntax is: + +``` +# vlock option +# vlock option plugin +# vlock option -t plugin +``` + +#### vlock common options and usage: + +1. To lock current virtual console or terminal session of user, run the following command: + + ``` + # vlock --current + ``` + + ![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-User-Terminal-Session-in-Linux.png) + >Lock User Terminal Session in Linux + + The options -c or --current, means lock the current session and it is the default behavior when you run vlock. + +2. To lock all your virtual console sessions and also disable virtual console switching, run the command below: + + ``` + # vlock --all + ``` + + ![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-All-Linux-Terminal-Sessions.png) + >Lock All Linux Terminal Sessions + + The options -a or --all, when used, it locks all user’s console sessions and also disables virtual console switching. + + These other options can only work when vlock was compiled with plugin support and they include: + +3. The options -n or --new, when invoked, it means switch to a new virtual console before user’s console sessions are locked. + ``` + # vlock --new + ``` + +4. The options -s or --disable-sysrq, it disables the SysRq mechanism while virtual consoles are locked by a user and works only when -a or --all is invoked. + + ``` + # vlock -sa + ``` + +5. The options -t or --timeout , invoked to set a timeout for screensaver plugin. + + ``` + # vlock --timeout 5 + ``` + +You can use `-h` or `--help` and `-v` or `--version` to view help messages and version respectively. + +We shall leave it at that and also know that you can include a `~/.vlockrc` file which is read by vlock program during system startup and [add the environmental variables][1] that you can check in the manaul entry page, especially users of Debian based distros. + +To find out more or add any information which may not be included here, simply drop a message below in the comment section. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/vlock-lock-user-virtual-console-terminal-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[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/set-path-variable-linux-permanently/ From 6726e52f891b1681a5d71e5bd6b5f0b6c827b48d Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 18 Jun 2016 22:39:09 +0800 Subject: [PATCH 1560/1710] =?UTF-8?q?20160618-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n Per-Process and Per-User Basis in Linux.md | 440 ++++++++++++++++++ 1 file changed, 440 insertions(+) create mode 100644 sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md diff --git a/sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md b/sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md new file mode 100644 index 0000000000..b0aa8e68ff --- /dev/null +++ b/sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md @@ -0,0 +1,440 @@ +Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux +=========================================================================== + + +Memory management in terms of monitoring memory usage is one important thing to do on your Linux system, there are many tools available for monitoring your memory usage that you can find on different Linux distributions. But they work in different ways, in this how to guide, we shall take a look at how to install and use one such tool called smem. + +Smem is a command-line memory reporting tool thats gives a user diverse reports on memory usage on a Linux system. There is one unique thing about smem, unlike other traditional memory reporting tools, it reports PSS (Proportional Set Size), a more meaningful representation of memory usage by applications and libraries in a virtual memory setup. + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Smem-Linux-Memory-Reporting-Tool.png) +>Smem – Linux Memory Reporting Tool + +Existing traditional tools focus mainly on reading RSS (Resident Set Size) which is a standard measure to monitor memory usage in a physical memory scheme, but tends to overestimate memory usage by applications. + +PSS on the other hand, gives a reasonable measure by determining the “fair-share” of memory used by applications and libraries in a virtual memory scheme. + +You can read this [guide (about memory RSS and PSS)][1] to understand memory consumption in a Linux system, but let us proceed to looking at some of the features of smem. + +### Features of Smem Tool + +- System overview listing +- Listings and also filtering by process, mappings or user +- Using data from /proc filesystem +- Configurable listing columns from several data sources +- Configurable output units and percentages +- Easy to configure headers and totals in listings +- Using data snapshots from directory mirrors or compressed tar files +- Built-in chart generation mechanism +- Lightweight capture tool used in embedded systems + +### How to Install Smem – Memory Reporting Tool in Linux + +Before you proceed with installation of smem, your system must meet the following requirements: + +- modern kernel (> 2.6.27 or so) +- a recent version of Python (2.4 or so) +- optional [matplotlib][2] library for generation of charts + +Most of the today’s Linux distributions comes with latest Kernel version with Python 2 or 3 support, so the only requirement is to install matplotlib library which is used to generate nice charts. + +#### On RHEL, CentOS and Fedora + +First enable [EPEL (Extra Packages for Enterprise Linux)][3] repository and then install as follows: + +``` +# yum install smem python-matplotlib python-tk +``` + +#### On Debian and Ubuntu + +``` +$ sudo apt-get install smem +``` + +#### On Linux Mint + +``` +$ sudo apt-get install smem python-matplotlib python-tk +``` + +#### on Arch Linux + +Use this [AUR repository][4]. + +### How to Use Smem – Memory Reporting Tool in Linux + +To view a report of memory usage across the whole system, by all system users, run the following command: + +``` +$ sudo smem +``` + +Monitor Memory Usage of Linux System + +``` + PID User Command Swap USS PSS RSS + 6367 tecmint cat 0 100 145 1784 + 6368 tecmint cat 0 100 147 1676 + 2864 tecmint /usr/bin/ck-launch-session 0 144 165 1780 + 7656 tecmint gnome-pty-helper 0 156 178 1832 + 5758 tecmint gnome-pty-helper 0 156 179 1916 + 1441 root /sbin/getty -8 38400 tty2 0 152 184 2052 + 1434 root /sbin/getty -8 38400 tty5 0 156 187 2060 + 1444 root /sbin/getty -8 38400 tty3 0 156 187 2060 + 1432 root /sbin/getty -8 38400 tty4 0 156 188 2124 + 1452 root /sbin/getty -8 38400 tty6 0 164 196 2064 + 2619 root /sbin/getty -8 38400 tty1 0 164 196 2136 + 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 212 224 1540 + 1504 root acpid -c /etc/acpi/events - 0 220 236 1604 + 3311 tecmint syndaemon -i 0.5 -K -R 0 252 292 2556 + 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0 300 326 2548 + 1588 root cron 0 292 333 2344 + 1589 avahi avahi-daemon: chroot helpe 0 124 334 1632 + 1523 root /usr/sbin/irqbalance 0 316 343 2096 + 585 root upstart-socket-bridge --dae 0 328 351 1820 + 3033 tecmint /usr/bin/dbus-launch --exit 0 328 360 2160 + 1346 root upstart-file-bridge --daemo 0 348 371 1776 + 2607 root /usr/bin/xdm 0 188 378 2368 + 1635 kernoops /usr/sbin/kerneloops 0 352 386 2684 + 344 root upstart-udev-bridge --daemo 0 400 427 2132 + 2960 tecmint /usr/bin/ssh-agent /usr/bin 0 480 485 992 + 3468 tecmint /bin/dbus-daemon --config-f 0 344 515 3284 + 1559 avahi avahi-daemon: running [tecm 0 284 517 3108 + 7289 postfix pickup -l -t unix -u -c 0 288 534 2808 + 2135 root /usr/lib/postfix/master 0 352 576 2872 + 2436 postfix qmgr -l -t unix -u 0 360 606 2884 + 1521 root /lib/systemd/systemd-logind 0 600 650 3276 + 2222 nobody /usr/sbin/dnsmasq --no-reso 0 604 669 3288 +.... +``` + +When a normal user runs smem, it displays memory usage by process that the user has started, the processes are arranged in order of increasing PSS. + +Take a look at the output below on my system for memory usage by processes started by user aaronkilik: + +``` +$ smem +``` + +Monitor User Memory Usage in Linux + +``` + PID User Command Swap USS PSS RSS + 6367 tecmint cat 0 100 145 1784 + 6368 tecmint cat 0 100 147 1676 + 2864 tecmint /usr/bin/ck-launch-session 0 144 166 1780 + 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 212 224 1540 + 3311 tecmint syndaemon -i 0.5 -K -R 0 252 292 2556 + 3033 tecmint /usr/bin/dbus-launch --exit 0 328 360 2160 + 3468 tecmint /bin/dbus-daemon --config-f 0 344 515 3284 + 3122 tecmint /usr/lib/gvfs/gvfsd 0 656 801 5552 + 3471 tecmint /usr/lib/at-spi2-core/at-sp 0 708 864 5992 + 3396 tecmint /usr/lib/gvfs/gvfs-mtp-volu 0 804 914 6204 + 3208 tecmint /usr/lib/x86_64-linux-gnu/i 0 892 1012 6188 + 3380 tecmint /usr/lib/gvfs/gvfs-afc-volu 0 820 1024 6396 + 3034 tecmint //bin/dbus-daemon --fork -- 0 920 1081 3040 + 3365 tecmint /usr/lib/gvfs/gvfs-gphoto2- 0 972 1099 6052 + 3228 tecmint /usr/lib/gvfs/gvfsd-trash - 0 980 1153 6648 + 3107 tecmint /usr/lib/dconf/dconf-servic 0 1212 1283 5376 + 6399 tecmint /opt/google/chrome/chrome - 0 144 1409 10732 + 3478 tecmint /usr/lib/x86_64-linux-gnu/g 0 1724 1820 6320 + 7365 tecmint /usr/lib/gvfs/gvfsd-http -- 0 1352 1884 8704 + 6937 tecmint /opt/libreoffice5.0/program 0 1140 2328 5040 + 3194 tecmint /usr/lib/x86_64-linux-gnu/p 0 1956 2405 14228 + 6373 tecmint /opt/google/chrome/nacl_hel 0 2324 2541 8908 + 3313 tecmint /usr/lib/gvfs/gvfs-udisks2- 0 2460 2754 8736 + 3464 tecmint /usr/lib/at-spi2-core/at-sp 0 2684 2823 7920 + 5771 tecmint ssh -p 4521 tecmnt765@212.7 0 2544 2864 6540 + 5759 tecmint /bin/bash 0 2416 2923 5640 + 3541 tecmint /usr/bin/python /usr/bin/mi 0 2584 3008 7248 + 7657 tecmint bash 0 2516 3055 6028 + 3127 tecmint /usr/lib/gvfs/gvfsd-fuse /r 0 3024 3126 8032 + 3205 tecmint mate-screensaver 0 2520 3331 18072 + 3171 tecmint /usr/lib/mate-panel/notific 0 2860 3495 17140 + 3030 tecmint x-session-manager 0 4400 4879 17500 + 3197 tecmint mate-volume-control-applet 0 3860 5226 23736 +... +``` + +There are many options to invoke while using smem, for example, to view system wide memory consumption, run the following command: + +``` +$ sudo smem -w +``` + +Monitor System Wide Memory User Consumption + +``` +Area Used Cache Noncache +firmware/hardware 0 0 0 +kernel image 0 0 0 +kernel dynamic memory 1425320 1291412 133908 +userspace memory 2215368 451608 1763760 +free memory 4424936 4424936 0 +``` + +To view memory usage on a per-user basis, run the command below: + +``` +$ sudo smem -u +``` + +Monitor Memory Consumption Per-User Basis in Linux + +``` +User Count Swap USS PSS RSS +rtkit 1 0 300 326 2548 +kernoops 1 0 352 385 2684 +avahi 2 0 408 851 4740 +postfix 2 0 648 1140 5692 +messagebus 1 0 1012 1173 3320 +syslog 1 0 1396 1419 3232 +www-data 2 0 5100 6572 13580 +mpd 1 0 7416 8302 12896 +nobody 2 0 4024 11305 24728 +root 39 0 323876 353418 496520 +tecmint 64 0 1652888 1815699 2763112 +``` + +You can also report memory usage by mappings as follows: + +``` +$ sudo smem -m +``` + +Monitor Memory Usage by Mappings in Linux + +``` +Map PIDs AVGPSS PSS +/dev/fb0 1 0 0 +/home/tecmint/.cache/fontconfig/7ef2298f 18 0 0 +/home/tecmint/.cache/fontconfig/c57959a1 18 0 0 +/home/tecmint/.local/share/mime/mime.cac 15 0 0 +/opt/google/chrome/chrome_material_100_p 9 0 0 +/opt/google/chrome/chrome_material_200_p 9 0 0 +/usr/lib/x86_64-linux-gnu/gconv/gconv-mo 41 0 0 +/usr/share/icons/Mint-X-Teal/icon-theme. 15 0 0 +/var/cache/fontconfig/0c9eb80ebd1c36541e 20 0 0 +/var/cache/fontconfig/0d8c3b2ac0904cb8a5 20 0 0 +/var/cache/fontconfig/1ac9eb803944fde146 20 0 0 +/var/cache/fontconfig/3830d5c3ddfd5cd38a 20 0 0 +/var/cache/fontconfig/385c0604a188198f04 20 0 0 +/var/cache/fontconfig/4794a0821666d79190 20 0 0 +/var/cache/fontconfig/56cf4f4769d0f4abc8 20 0 0 +/var/cache/fontconfig/767a8244fc0220cfb5 20 0 0 +/var/cache/fontconfig/8801497958630a81b7 20 0 0 +/var/cache/fontconfig/99e8ed0e538f840c56 20 0 0 +/var/cache/fontconfig/b9d506c9ac06c20b43 20 0 0 +/var/cache/fontconfig/c05880de57d1f5e948 20 0 0 +/var/cache/fontconfig/dc05db6664285cc2f1 20 0 0 +/var/cache/fontconfig/e13b20fdb08344e0e6 20 0 0 +/var/cache/fontconfig/e7071f4a29fa870f43 20 0 0 +.... +``` + +There are also options for filtering smem output and we shall look at two examples here. + +To filter output by username, invoke the -u or --userfilter="regex" option as below: + +``` +$ sudo smem -u +``` + +Report Memory Usage by User + +``` +User Count Swap USS PSS RSS +rtkit 1 0 300 326 2548 +kernoops 1 0 352 385 2684 +avahi 2 0 408 851 4740 +postfix 2 0 648 1140 5692 +messagebus 1 0 1012 1173 3320 +syslog 1 0 1400 1423 3236 +www-data 2 0 5100 6572 13580 +mpd 1 0 7416 8302 12896 +nobody 2 0 4024 11305 24728 +root 39 0 323804 353374 496552 +tecmint 64 0 1708900 1871766 2819212 +``` + +To filter output by process name, invoke the -P or --processfilter="regex" option as follows: + +``` +$ sudo smem --processfilter="firefox" +``` + +Report Memory Usage by Process Name + +``` +PID User Command Swap USS PSS RSS + 9212 root sudo smem --processfilter=f 0 1172 1434 4856 + 9213 root /usr/bin/python /usr/bin/sm 0 7368 7793 11984 + 4424 tecmint /usr/lib/firefox/firefox 0 931732 937590 961504 +``` + +Output formatting can be very important, and there are options to help you format memory reports and we shall take a look at few examples below. + +To show desired columns in the report, use -c or --columns option as follows: + +``` +$ sudo smem -c "name user pss rss" +``` + +Report Memory Usage by Columns + +``` +Name User PSS RSS +cat tecmint 145 1784 +cat tecmint 147 1676 +ck-launch-sessi tecmint 165 1780 +gnome-pty-helpe tecmint 178 1832 +gnome-pty-helpe tecmint 179 1916 +getty root 184 2052 +getty root 187 2060 +getty root 187 2060 +getty root 188 2124 +getty root 196 2064 +getty root 196 2136 +sh tecmint 224 1540 +acpid root 236 1604 +syndaemon tecmint 296 2560 +rtkit-daemon rtkit 326 2548 +cron root 333 2344 +avahi-daemon avahi 334 1632 +irqbalance root 343 2096 +upstart-socket- root 351 1820 +dbus-launch tecmint 360 2160 +upstart-file-br root 371 1776 +xdm root 378 2368 +kerneloops kernoops 386 2684 +upstart-udev-br root 427 2132 +ssh-agent tecmint 485 992 +... +``` + +You can invoke the -p option to report memory usage in percentages, as in the command below: + +``` +$ sudo smem -p +``` + +Report Memory Usage by Percentages + +``` + PID User Command Swap USS PSS RSS + 6367 tecmint cat 0.00% 0.00% 0.00% 0.02% + 6368 tecmint cat 0.00% 0.00% 0.00% 0.02% + 9307 tecmint sh -c { sudo /usr/lib/linux 0.00% 0.00% 0.00% 0.02% + 2864 tecmint /usr/bin/ck-launch-session 0.00% 0.00% 0.00% 0.02% + 3544 tecmint sh -c /usr/lib/linuxmint/mi 0.00% 0.00% 0.00% 0.02% + 5758 tecmint gnome-pty-helper 0.00% 0.00% 0.00% 0.02% + 7656 tecmint gnome-pty-helper 0.00% 0.00% 0.00% 0.02% + 1441 root /sbin/getty -8 38400 tty2 0.00% 0.00% 0.00% 0.03% + 1434 root /sbin/getty -8 38400 tty5 0.00% 0.00% 0.00% 0.03% + 1444 root /sbin/getty -8 38400 tty3 0.00% 0.00% 0.00% 0.03% + 1432 root /sbin/getty -8 38400 tty4 0.00% 0.00% 0.00% 0.03% + 1452 root /sbin/getty -8 38400 tty6 0.00% 0.00% 0.00% 0.03% + 2619 root /sbin/getty -8 38400 tty1 0.00% 0.00% 0.00% 0.03% + 1504 root acpid -c /etc/acpi/events - 0.00% 0.00% 0.00% 0.02% + 3311 tecmint syndaemon -i 0.5 -K -R 0.00% 0.00% 0.00% 0.03% + 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0.00% 0.00% 0.00% 0.03% + 1588 root cron 0.00% 0.00% 0.00% 0.03% + 1589 avahi avahi-daemon: chroot helpe 0.00% 0.00% 0.00% 0.02% + 1523 root /usr/sbin/irqbalance 0.00% 0.00% 0.00% 0.03% + 585 root upstart-socket-bridge --dae 0.00% 0.00% 0.00% 0.02% + 3033 tecmint /usr/bin/dbus-launch --exit 0.00% 0.00% 0.00% 0.03% +.... +``` + +The command below will show totals at the end of each column of the output: + +``` +$ sudo smem -t +``` + +Report Total Memory Usage Count + +``` +PID User Command Swap USS PSS RSS + 6367 tecmint cat 0 100 139 1784 + 6368 tecmint cat 0 100 141 1676 + 9307 tecmint sh -c { sudo /usr/lib/linux 0 96 158 1508 + 2864 tecmint /usr/bin/ck-launch-session 0 144 163 1780 + 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 108 170 1540 + 5758 tecmint gnome-pty-helper 0 156 176 1916 + 7656 tecmint gnome-pty-helper 0 156 176 1832 + 1441 root /sbin/getty -8 38400 tty2 0 152 181 2052 + 1434 root /sbin/getty -8 38400 tty5 0 156 184 2060 + 1444 root /sbin/getty -8 38400 tty3 0 156 184 2060 + 1432 root /sbin/getty -8 38400 tty4 0 156 185 2124 + 1452 root /sbin/getty -8 38400 tty6 0 164 193 2064 + 2619 root /sbin/getty -8 38400 tty1 0 164 193 2136 + 1504 root acpid -c /etc/acpi/events - 0 220 232 1604 + 3311 tecmint syndaemon -i 0.5 -K -R 0 260 298 2564 + 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0 300 324 2548 + 1588 root cron 0 292 326 2344 + 1589 avahi avahi-daemon: chroot helpe 0 124 332 1632 + 1523 root /usr/sbin/irqbalance 0 316 340 2096 + 585 root upstart-socket-bridge --dae 0 328 349 1820 + 3033 tecmint /usr/bin/dbus-launch --exit 0 328 359 2160 + 1346 root upstart-file-bridge --daemo 0 348 370 1776 + 2607 root /usr/bin/xdm 0 188 375 2368 + 1635 kernoops /usr/sbin/kerneloops 0 352 384 2684 + 344 root upstart-udev-bridge --daemo 0 400 426 2132 +..... +------------------------------------------------------------------------------- + 134 11 0 2171428 2376266 3587972 +``` + +Further more, there are options for graphical reports that you can also use and we shall dive into them in this sub section. + +You can produce a bar graph of processes and their PSS and RSS values, in the example below, we produce a bar graph of processes owned by the root user. + +The vertical plane shows the PSS and RSS measure of processes and the horizontal plane represents each root user process: + +``` +$ sudo smem --userfilter="root" --bar pid -c"pss rss" +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Linux-Memory-Usage-in-PSS-and-RSS-Values.png) +>Linux Memory Usage in PSS and RSS Values + +You can also produce a pie chart showing processes and their memory consumption based on PSS or RSS values. The command below outputs a pie chart for processes owned by root user measuring values. + +The `--pie` name means label by name and `-s` option helps to sort by PSS value. + +``` +$ sudo smem --userfilter="root" --pie name -s pss +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Linux-Memory-Consumption-by-Processes.png) +>Linux Memory Consumption by Processes + +There are many other known fields apart from PSS and RSS used for labeling charts: + +To get help, simply type, `smem -h` or visit the manual entry page. + +We shall stop here with smem, but to understand it better, use it with many other options that you can find in the man page. As usual you can use the comment section below to express any thoughts or concerns. + +Reference Links: + + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/smem-linux-memory-usage-per-process-per-user/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[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]: https://emilics.com/notebook/enblog/p871.html +[2]: http://matplotlib.org/index.html +[3]: http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[4]: https://www.archlinux.org/packages/community/i686/smem/ + + + + From ec3bef60300361f188524d64f8d8e071356255d4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 18 Jun 2016 22:51:09 +0800 Subject: [PATCH 1561/1710] =?UTF-8?q?20160618-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Awk to Print Fields and Columns in File.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md diff --git a/sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md b/sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md new file mode 100644 index 0000000000..0308690e67 --- /dev/null +++ b/sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md @@ -0,0 +1,108 @@ +How to Use Awk to Print Fields and Columns in File +=================================================== + +In this part of our [Linux Awk command series][1], we shall have a look at one of the most important features of Awk, which is field editing. + +It is good to know that Awk automatically divides input lines provided to it into fields, and a field can be defined as a set of characters that are separated from other fields by an internal field separator. + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Awk-Print-Fields-and-Columns.png) +>Awk Print Fields and Columns + +If you are familiar with the Unix/Linux or do [bash shell programming][2], then you should know what internal field separator (IFS) variable is. The default IFS in Awk are tab and space. + +This is how the idea of field separation works in Awk: when it encounters an input line, according to the IFS defined, the first set of characters is field one, which is accessed using $1, the second set of characters is field two, which is accessed using $2, the third set of characters is field three, which is accessed using $3 and so forth till the last set of character(s). + +To understand this Awk field editing better, let us take a look at the examples below: + +**Example 1**: I have created a text file called tecmintinfo.txt. + +``` +# vi tecmintinfo.txt +# cat tecmintinfo.txt +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Create-File-in-Linux.png) +>Create File in Linux + +Then from the command line, I try to print the first, second and third fields from the file tecmintinfo.txt using the command below: + +``` +$ awk '//{print $1 $2 $3 }' tecmintinfo.txt +TecMint.comisthe +``` + +From the output above, you can see that the characters from the first three fields are printed based on the IFS defined which is space: + +- Field one which is “TecMint.com” is accessed using $1. +- Field two which is “is” is accessed using $2. +- Field three which is “the” is accessed using $3. + +If you have noticed in the printed output, the field values are not separated and this is how print behaves by default. + +To view the output clearly with space between the field values, you need to add (,) operator as follows: + +``` +$ awk '//{print $1, $2, $3; }' tecmintinfo.txt + +TecMint.com is the +``` + +One important thing to note and always remember is that the use of ($) in Awk is different from its use in shell scripting. + +Under shell scripting ($) is used to access the value of variables while in Awk ($) it is used only when accessing the contents of a field but not for accessing the value of variables. + +**Example 2**: Let us take a look at one other example using a file which contains multiple lines called my_shoping.list. + +``` +No Item_Name Unit_Price Quantity Price +1 Mouse #20,000 1 #20,000 +2 Monitor #500,000 1 #500,000 +3 RAM_Chips #150,000 2 #300,000 +4 Ethernet_Cables #30,000 4 #120,000 +``` + +Say you wanted to only print Unit_Price of each item on the shopping list, you will need to run the command below: + +``` +$ awk '//{print $2, $3 }' my_shopping.txt + +Item_Name Unit_Price +Mouse #20,000 +Monitor #500,000 +RAM_Chips #150,000 +Ethernet_Cables #30,000 +``` + +Awk also has a printf command that helps you to format your output is a nice way as you can see the above output is not clear enough. + +Using printf to format output of the Item_Name and Unit_Price: + +``` +$ awk '//{printf "%-10s %s\n",$2, $3 }' my_shopping.txt + +Item_Name Unit_Price +Mouse #20,000 +Monitor #500,000 +RAM_Chips #150,000 +Ethernet_Cables #30,000 +``` + +### Summary + +Field editing is very important when using Awk to filter text or strings, it helps you get particular data in columns in a list. And always remember that the use of ($) operator in Awk is different from that in shell scripting. + +I hope the article was helpful to you and for any additional information required or questions, you can post a comment in the comment section. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/awk-print-fields-columns-with-space-separator/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[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/awk-command/ +[2]: http://www.tecmint.com/category/bash-shell/ From 33fb0fb89e6ecd811ad86204a41a545debdc5d26 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 18 Jun 2016 23:15:48 +0800 Subject: [PATCH 1562/1710] =?UTF-8?q?20160618-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inux desktop and IoT software distribution.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/tech/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md diff --git a/sources/tech/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md b/sources/tech/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md new file mode 100644 index 0000000000..6992f76156 --- /dev/null +++ b/sources/tech/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md @@ -0,0 +1,110 @@ +Ubuntu Snap takes charge of Linux desktop and IoT software distribution +=========================================================================== + +[Canonical][28] and [Ubuntu][29] founder Mark Shuttleworth said in an interview that he hadn't planned on an announcement about Ubuntu's new [Snap app package format][30]. But then in a matter of a few months, developers from multiple Linux distributions and companies announced they would use Snap as a universal Linux package format. + +![](http://zdnet2.cbsistatic.com/hub/i/r/2016/06/14/a9b2a139-3cd4-41bf-8e10-180cb9450134/resize/770xauto/adc7d16a46167565399ecdb027dd1416/ubuntu-snap.jpg) +>Linux distributors, ISVs, and companies are all adopting Ubuntu Snap to distribute and update programs across all Linux varieties. + +Why? Because Snap enables a single binary package to work perfectly and securely on any Linux desktop, server, cloud or device. According to Olli Ries, head of Canonical's Ubuntu client platform products and releases: + +>The [security mechanisms in Snap packages][1] allow us to open up the platform for much faster iteration across all our flavors as Snap applications are isolated from the rest of the system. Users can install a Snap without having to worry whether it will have an impact on their other apps or their system. + +Of course, as Matthew Garrett, a former Linux kernel developer and CoreOS security developer, has pointed out: If you [use Snap with an insecure program, such as the X11][2] window system, you don't actually gain any security. + +Shuttleworth agrees with Garrett but points out that you can control how Snap applications interact with the rest of this system. So, for example, a web browser can be contained within a secure Snap, which uses the Ubuntu packaged [openssl][3] Transport Layer Security (TLS) and Secure Sockets Layer (SSL) library. In addition, even if something does break into the browser instance, it still can't get to the underlying operating system. + +Many companies agree. [Dell][4], [Samsung][5], [Mozilla][6], [Krita][7], [Mycroft][8], and [Horizon Computing][9] are adopting Snap. [Arch Linux][10], [Debian][11], [Gentoo][12], and [OpenWrt][13] developers have also embraced Snaps and are adding it to their Linux distributions + +Snap packages, aka "Snaps", now work natively on Arch, Debian, Fedora, Kubuntu, Lubuntu, Ubuntu GNOME, Ubuntu Kylin, Ubuntu MATE, Ubuntu Unity, and Xubuntu. Snap is being validated on CentOS, Elementary, Gentoo, Mint, OpenSUSE, and Red Hat Enterprise Linux (RHEL), and are easy to enable on other Linux distributions. + +These distributions are adopting Snaps, Shuttleworth explained, because "Snaps bring those apps to every Linux desktop, server, device or cloud machine, giving users freedom to choose any Linux distribution while retaining access to the best apps." + +Taken together these distributions represent the vast majority of common Linux desktop, server and cloud distributions. Why would they switch from their existing package management systems? "One nice feature of Snaps is support for edge and beta channels, which allow users to opt-in to the pre-release developer versions of software or stick with the latest stable versions." explained Tim Jester-Pfadt, an Arch Linux contributor. + +In addition to the Linux distributors, independent software vendors (ISVs) are embracing Snap since it greatly simplifies third-party Linux app distribution and security maintenance. For example, [The Document Foundation][14] will be making the popular open-source office suite [LibreOffice][15] available as a Snap. + +Thorsten Behrens, co-founder of The Document Foundation explained: + +>Our objective is to make LibreOffice easily available to as many users as possible. Snaps enable our users to get the freshest LibreOffice releases across different desktops and distributions quickly, easily and consistently. As a bonus, it should help our release engineers to eventually move away from bespoke, home-grown and ancient Linux build solutions, towards something that is collectively maintained. + +In a statement, Nick Nguyen, Mozilla's [Firefox][16] VP, added: + +>We strive to offer users a great experience and make Firefox available across many platforms, devices and operating systems. With the introduction of Snaps, continually optimizing Firefox will become possible, providing Linux users the most up-to-date features. + +Boudewijn Rempt, project lead at the [Krita Foundation][17], a KDE-based graphics program, said: + +>Maintaining DEB packages in a private repository was complex and time consuming, snaps are much easier to maintain, package and distribute. Putting the snap in the store was particularly simple, this is the most streamlined app store I have published software in. [Krita 3.0][18] has just been released as a snap which will be updated automatically as newer versions become available. + +It's not just Linux desktop programmers who are excited by Snap. Internet of Things (IoT) and embedded developers are also grabbing on to Snap with both hands. + +Because Snaps are isolated from one another to help with data security, and can be updated or rolled back automatically, they are ideal for devices. Multiple vendors have launched snappy IoT devices, enabling a new class of "smart edge" device with IoT app store. Snappy devices receive automatic updates for the base OS, together with updates to the apps installed on the device. + +Dell, which according to Shuttleworth was one of the first IoT vendors to see the power of Snap, will be using Snap in its devices. + +"We believe Snaps address the security risks and manageability challenges associated with deploying and running multiple third party applications on a single IoT Gateway," said Jason Shepherd, Dell's Director of IoT Strategy and Partnerships. "This trusted and universal app format is essential for Dell, our IoT Solutions Partners and commercial customers to build a scalable, IT-ready, and vibrant ecosystem of IoT applications." + +It's simple, explained OpenWrt developer Matteo Croce. "Snaps deliver new applications to OpenWrt while leaving the core OS unchanged.... Snaps are a faster way to deliver a wider range of software to supported OpenWrt access points and routers." + +Shuttleworth doesn't see Snaps replacing existing Linux package systems such as [RPM][19] and [DEB][20]. Instead he sees it as being complementary to them. Snaps will sit alongside the native package. Each distribution has its own mechanisms to provide and update the core operating system and its updates. What Snap brings to the table is universal apps that cannot interfere with the base operating system + +Each Snap is confined using a range of kernel isolation and security mechanisms, tailored to the Snap application's needs. A careful review process ensures that snaps only receive the permissions they require to operate. Users will not have to make complex security decisions when installing the snap. + +Since Snaps are essentially self-contained zip files that can be quickly executed in place, "Snaps are much easier to create than traditional Linux packages, and allow us to evolve dependencies independent of the base operating system, so we can easily provide the very best and latest Chinese Linux apps to users across all distributions," explained Jack Yu, leader of the popular [Chinese Ubuntu Kylin][21] team. + +The snap format, designed by Canonical, is handled by [snapd][22]. Its development work is done on [GitHub][23]. Porting snapd to a wide range of Linux distributions has proven straightforward, and the community has grown to include contributors from a wide range of Linux backgrounds. + +Snap packages are created with the snapcrafttool. The home of the project is [snapcraft.io][24], which includes a tour and step-by-step guides to Snap creation, along with documentation for users and contributors to the project. Snaps can be built from existing distribution packages, but are more commonly built from source for optimization and size efficiency. + +Unless you're an Ubuntu power-user or serious Linux developer you may not have heard of Snap. In the future, anyone who does work with Linux on any platform will know the program. It's well on its way to becoming a major -- perhaps the most important of all -- Linux application installation and upgrade mechanism. + +#### Related Stories: + +- [Linux expert Matthew Garrett: Ubuntu 16.04's new Snap format is a security risk][25] +- [Ubuntu Linux 16.04 is here][26] +- [Microsoft and Canonical partner to bring Ubuntu to Windows 10][27] + + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/ubuntu-snap-takes-charge-of-linux-desktop-and-iot-software-distribution/ + +作者:[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/ +[28]: http://www.canonical.com/ +[29]: http://www.ubuntu.com/ +[30]: https://insights.ubuntu.com/2016/04/13/snaps-for-classic-ubuntu/ +[1]: https://insights.ubuntu.com/2016/04/13/snaps-for-classic-ubuntu/ +[2]: http://www.zdnet.com/article/linux-expert-matthew-garrett-ubuntu-16-04s-new-snap-format-is-a-security-risk/ +[3]: https://www.openssl.org/ +[4]: http://www.dell.com/en-us/ +[5]: http://www.samsung.com/us/ +[6]: http://www.mozilla.com/ +[7]: https://krita.org/en/ +[8]: https://mycroft.ai/ +[9]: http://www.horizon-computing.com/ +[10]: https://www.archlinux.org/ +[11]: https://www.debian.org/ +[12]: https://www.gentoo.org/ +[13]: https://openwrt.org/ +[14]: https://www.documentfoundation.org/ +[15]: https://www.libreoffice.org/download/libreoffice-fresh/ +[16]: https://www.mozilla.org/en-US/firefox/new/ +[17]: https://krita.org/en/about/krita-foundation/ +[18]: https://krita.org/en/item/krita-3-0-released/ +[19]: http://rpm5.org/ +[20]: https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html +[21]: http://www.ubuntu.com/desktop/ubuntu-kylin +[22]: https://launchpad.net/ubuntu/+source/snapd +[23]: https://github.com/snapcore/snapd +[24]: http://snapcraft.io/ +[25]: http://www.zdnet.com/article/linux-expert-matthew-garrett-ubuntu-16-04s-new-snap-format-is-a-security-risk/ +[26]: http://www.zdnet.com/article/ubuntu-linux-16-04-is-here/ +[27]: http://www.zdnet.com/article/microsoft-and-canonical-partner-to-bring-ubuntu-to-windows-10/ + + From 8712043d741a3a9bde7a99d8d994a848472e0590 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 18 Jun 2016 23:17:58 +0800 Subject: [PATCH 1563/1710] =?UTF-8?q?20160618-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit move to talk --- ...ap takes charge of Linux desktop and IoT software distribution.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md (100%) diff --git a/sources/tech/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md b/sources/talk/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md similarity index 100% rename from sources/tech/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md rename to sources/talk/20160614 ​Ubuntu Snap takes charge of Linux desktop and IoT software distribution.md From ca610195212a92a03aa47e2476cb90f47f7f72b5 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 18 Jun 2016 23:27:50 +0800 Subject: [PATCH 1564/1710] =?UTF-8?q?20160618-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...hat Every Linux Newbies Should Remember.md | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md diff --git a/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md b/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md new file mode 100644 index 0000000000..14527107b6 --- /dev/null +++ b/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md @@ -0,0 +1,126 @@ +10 Basic Linux Commands That Every Linux Newbies Should Remember +===================================================================== + +![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/4225072_orig.png) + +[Linux][1] has a big impact on our Lives. At least, your android phone has Linux kernel on it. However, getting started with Linux just make you discomfort for the first time. Because on Linux, you usually should use terminal commands instead of just clicking the launcher icon (as you did on Windows). But don't worry, We will give you 10 basic Linux commands & important commands that will help you get started. + + +### 10 Basic Linux Commands That Help Newbies Get Started + +When We talk about Linux commands, what we are really talking about is the Linux system itself. These small number of 10 Basic Linux commands will not make you a genius or a Linux expert instead, it'll help you get started with Linux. It'll help Linux newbies to perform daily basic tasks in Linux using these Linux basic commands or I should say Linux top commands(because of their usage). + +So let's get started with the list of 10 Linux Basic commands - + +#### 1. sudo + +This SuperUserDo is the most important command Linux newbies will use. Every single command that needs root's permission, need this sudo command. You can use sudo before each command that requires root permissions - + +``` +$ sudo su +``` + +#### 2. ls (list) + +Just like the other, you often want to see anything in your directory. With list command, the terminal will show you all the files and folders of the directory that you're working in. Let's say I'm in the /home folder and I want to see the directories & files in /home. + +``` +/home$ ls +``` + +ls in /home returns the following - + +``` +imad lost+found +``` + +#### 3. cd + +​Changing directory (cd) is the main command that always be in use in terminal. It's one of the most Linux basic commands. Using this is easy. Just type the name of the folder you want to go in from your current directory. If you want to go up just do it by giving double dots (..) as the parameter. +​ +Let's say I'm in /home directory and I want to move in usr directory which is always in the /home. Here is how I can use cd commands - + +``` +/home $ cd usr + +/home/usr $ +``` + +#### 4. mkdir + +Just changing directory is still incomplete. Sometimes you want to create a new folder or subfolder. You can use mkdir command to do that. Just give your folder name after mkdir command in your terminal. + +``` +~$ mkdir folderName +``` + +#### 5. cp + +copy-and-paste is the important task we need to do to organize our files. Using cp will help you to copy-and-paste the file from terminal. First, you determine the file you want to copy and type the destination location to paste the file. + +``` +$ cp src des +``` + +Note: If you're copying files into the directory that requires root permission for any new file, then you'll need to use sudo command. + +#### 6. rm + +rm is a command to remove your file or even your directory. You can use -f if the file need root permission to be removed. And also you can use -r to do recursive removal to remove your folder. + +``` +$ rm myfile.txt +``` + +#### 7. apt-get + +This command differs distro-by-distro. In Debian based Linux distributions, to install, remove and upgrade any package we've Advanced Packaging Tool (APT) package manager. The apt-get command will help you installing the software you need to run in your Linux. It is a powerful command-line tool which can perform installation, upgrade, and even removing your software. + +​In other distributions, such as Fedora, Centos there are different package managers. Fedora used to have yum but now it has dnf. + +``` +$ sudo apt-get update + +$ sudo dnf update +``` + +#### 8. grep + +You need to find a file but you don't remember its exact location or the path. grep will help you to solve this problem. You can use the grep command to help finding the file based on given keywords. + +``` +$ grep user /etc/passwd +``` + +#### 9. cat + +As a user, you often need to view some of text or code from your script. Again, one of the Linux basic commands is cat command. It will show you the text inside your file. + +``` +$ cat CMakeLists.txt +``` + +#### 10. poweroff + +And the last one is poweroff. Sometimes you need to poweroff directly from your terminal. This command will do the task. Don't forget to add sudo at the beginning of the command since it needs root permission to execute poweroff. + +``` +$ sudo poweroff +``` + +### Conclusion + +As I mentioned when I started off the article that these 10 basic Linux commands will not make you a Linux geek immediately. It'll help you to start using Linux at this early stage. With these basic Linux commands, start using Linux and set your target to learn 1-3 commands daily. So it's all for this article. I hope it helped you. Share with us interesting and useful commands in the comment section below and don't forget to share this article with your friends. + +-------------------------------------------------------------------------------- + +via: http://www.linuxandubuntu.com/home/10-basic-linux-commands-that-every-linux-newbies-should-remember + +作者:[Commenti][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.linuxandubuntu.com/home/10-basic-linux-commands-that-every-linux-newbies-should-remember#comments +[1]: http://linuxandubuntu.com/home/category/linux From ac3a8abf8653bd643638e707c597cb0cfc47803e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 19 Jun 2016 09:40:30 +0800 Subject: [PATCH 1565/1710] Translating sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md --- ...0160425 How to Use Awk to Print Fields and Columns in File.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md b/sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md index 0308690e67..127cc061c1 100644 --- a/sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md +++ b/sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Use Awk to Print Fields and Columns in File =================================================== From e13676e5f87c6c0797cf10b8f2fc6d1db9f09e2d Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 19 Jun 2016 10:13:41 +0800 Subject: [PATCH 1566/1710] Translated sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md --- ...20160425 How to Use Awk to Print Fields and Columns in File.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20160425 How to Use Awk to Print Fields and Columns in File.md (100%) diff --git a/sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md b/translated/tech/20160425 How to Use Awk to Print Fields and Columns in File.md similarity index 100% rename from sources/tech/20160425 How to Use Awk to Print Fields and Columns in File.md rename to translated/tech/20160425 How to Use Awk to Print Fields and Columns in File.md From f929f4c796e444fca5e5db972693b6c332ae76a1 Mon Sep 17 00:00:00 2001 From: Ping Yang Date: Sun, 19 Jun 2016 20:22:32 +0800 Subject: [PATCH 1567/1710] [Translating] 10 Basic Linux Commands That Every Linux Newbies Should Remember.md --- ...c Linux Commands That Every Linux Newbies Should Remember.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md b/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md index 14527107b6..998e90d8b1 100644 --- a/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md +++ b/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md @@ -1,3 +1,5 @@ +Translating by Ping + 10 Basic Linux Commands That Every Linux Newbies Should Remember ===================================================================== From a82b3140c6b45bedf3e5d3cc7f440ed4f2d619ae Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 19 Jun 2016 21:54:29 +0800 Subject: [PATCH 1568/1710] =?UTF-8?q?20160619-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160610 Getting started with ReactOS.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 sources/tech/20160610 Getting started with ReactOS.md diff --git a/sources/tech/20160610 Getting started with ReactOS.md b/sources/tech/20160610 Getting started with ReactOS.md new file mode 100644 index 0000000000..d181e2dd5d --- /dev/null +++ b/sources/tech/20160610 Getting started with ReactOS.md @@ -0,0 +1,129 @@ +Getting started with ReactOS +============================== + + +ReactOS is a relatively new open source operating system that resembles the looks of Windows NT and aims to offer similar levels of functionality and application compatibility. Featuring a wine-based user mode, this system doesn't use any of the Unix architecture, but is a rewrite of the NT architecture from scratch, with its very own FAT32 implementation, and completely free of legal implications. That said, this is not yet another Linux distro, but a unique Windows-like system that is a part of the free software world. This quick guide aims at users who want an easy to use, open source replacement for their Windows system. + + +### System Installation + +Before getting started with the installation process, I should point out that the minimum requirements of ReactOS are 500 MB of free disk space and only 96 MB of RAM. I will demonstrate the installation process on a 32-bit virtual machine. + +Navigate with the arrow keys and select the desired language by pressing “Enter”. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_1.png) + +Next, hit “Enter” again to continue with the installation, or “R” to repair an existing install. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_2.png) + +On the third screen, you'll get a warning about the current limitation that applies to this early development version of the OS. Continue with “Enter” again and you'll get a summary of the settings before the final user approval. If all is good, hit “Enter” once again. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_3.png) + +This will take you to the partitioning stage where you may delete the highlighted option by pressing “D”, and then add primary, extended, or logical partitions with “P”, “E”, and “L” respectively. If you choose to add a partition yourself, you will be given the option to set its size by entering a number of MBs and pressing “Enter” to confirm. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_4.png) + +However, if you have already unused space available, hitting “Enter” once again during the partitioning stage will automatically install ReactOS in the selected partition. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_5.png) + +The next step is the selection of the filesystem type which for now is limited to FAT32 only. + + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_6.png) + +Next is the directory selection. I will leave this at the default “/ReactOS” and it should be fine. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_7.png) + +...and we're off + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_8.png) + +Finally, we're about the choose the location of the bootloader. The first option should be the safest if installing on a real disk. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_9.png) + +In general, I could say that the installation of ReactOS is pretty straight forward. The interface may not look friendly or modern at all, but hitting “Enter” in every step will work just fine in most cases. That said, the development version of ReactOS it's fairly simple and easy to install. + +### Setting Up ReactOS + +Once we reboot and get into our new system, we're offered the help of the “Setup Wizard”. This wizard is basically allowing us to set up the language and keyboard layout settings. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_10.png) + +I used this step to add a second keyboard layout. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_11.png) + +I can even set a different key combination for changing the layout. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_12.png) + +Then I add the username... + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_13.png) + +...and an admin pass... + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_14.png) + +After the time settings are also set, ReactOS finalizes its configuration. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_15.png) + +### Inside ReactOS + +When we finally enter ReactOS for the first time, new hardware is detected and we're offered to install the available drivers automatically. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_16.png) + +These are the three devices that were automatically detected by ReactOS in my case: + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_17.png) + +What you're looking at in the above screenshot is ReactOS's “applications manager” which is of course to the standards of Linux systems. You won't find anything Linux-related here, though. Only open source applications that are known to work well with the particular system are offered. That said, some categories are well populated, while others are completely empty. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_18.png) + +I took the liberty to install Firefox through the software center, and Notepad++ by downloading the .exe file and installing it by simply double-clicking the executable. Both worked perfectly well, their desktop icons were created, menu entries added, and Notepad++ was added in the applications manager and in the right category as well. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_19.png) + +I wouldn't try running any modern Windows games, but if you want to setup the Direct 3D settings you can go to “My Computer/Control Panel/WineD3D Options”. There you will find multiple options about the Direct3D which is presumably resembling dx version 8. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_20.png) + +Another good thing with ReactOS is the fact that the Registry entries can be accessed and set as needed through “My Computer” again. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_21.png) + +If you need something handier though, you may find a Registry Editor utility from the applications menu. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_22.png) + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_23.png) + +Finally, if the looks of ReactOS look somewhat outdated to you, right click on the desktop and select “Properties”. Then choose the “Appearance” tab and set the theme and color that you prefer. + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_24.png) + +### Conclusion + +Honestly, I was impressed by the way ReactOS works. It's quite solid, coherent, speedy, and really user-friendly. Leaving aside the negatives that stem from the Windows design (deprecated applications menu, irrational directory structure), ReactOS is almost perfect on what it does. It may not be very rich in terms of application selection, and it may not be very powerful in terms of features yet, but I am sure it's going to flourish. The numbers show great popularity, and I'm sure the community that's going to build up around it will soon be large enough to lead the project to success. Right now, version 0.4.1 looks promising to say the least. If you care about running Windows applications and doing so in an open way, give it a try! + + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/getting-started-with-reactos/ + +作者:[Bill Toulas][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.howtoforge.com/tutorial/getting-started-with-reactos/ + From cb75e5ec3a1c3f3275deeadffdb9dd16f8a1c285 Mon Sep 17 00:00:00 2001 From: Ping Yang Date: Sun, 19 Jun 2016 23:22:50 +0800 Subject: [PATCH 1569/1710] Temp backup to remote repo. --- ...hat Every Linux Newbies Should Remember.md | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md b/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md index 998e90d8b1..f7f7f724b9 100644 --- a/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md +++ b/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md @@ -1,23 +1,33 @@ -Translating by Ping - 10 Basic Linux Commands That Every Linux Newbies Should Remember + +Linux新手必知必会的10条Linux基本命令 ===================================================================== ![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/4225072_orig.png) -[Linux][1] has a big impact on our Lives. At least, your android phone has Linux kernel on it. However, getting started with Linux just make you discomfort for the first time. Because on Linux, you usually should use terminal commands instead of just clicking the launcher icon (as you did on Windows). But don't worry, We will give you 10 basic Linux commands & important commands that will help you get started. +[Linux][1] has a big impact on our Lives. At least, your android phone has Linux kernel on it. However, getting started with Linux just make you discomfort for the first time. + Because on Linux, you usually should use terminal commands instead of just clicking the launcher icon (as you did on Windows). But don't worry, We will give you 10 basic Linux commands & important commands that will help you get started. + +Linux对我们的生活产生了巨大的冲击。至少你的安卓手机使用的就是Linux核心。尽管如此,在第一次开始使用Linux时你还是会感到难以下手。因为在Linux中,通常需要使用终端命令来取代Windows系统中的启动图标点击。但是不必担心,这里我们会介绍10个Linux基本命令来帮助你开启这段神秘之旅。 ### 10 Basic Linux Commands That Help Newbies Get Started +### 帮助新手走出第一步的10个Linux基本命令 -When We talk about Linux commands, what we are really talking about is the Linux system itself. These small number of 10 Basic Linux commands will not make you a genius or a Linux expert instead, it'll help you get started with Linux. It'll help Linux newbies to perform daily basic tasks in Linux using these Linux basic commands or I should say Linux top commands(because of their usage). +When We talk about Linux commands, what we are really talking about is the Linux system itself. These small number of 10 Basic Linux commands will not make you a genius or a Linux expert instead, it'll help you get started with Linux. It'll help Linux newbies to perform daily basic tasks in Linux using these Linux basic commands or I should say Linux top commands(because of their usage)。 + +当我们谈论Linux命令时,实质上是在谈论Linux系统本身。这短短的10个Linux基本命令不会让你变成天才或者Linux专家,但是能帮助你轻松开始Linux之旅。使用这些基本命令会帮助新手们完成Linux日常任务,由于它们的使用频率如此至高,所以我更乐意称他们为Linux命令之王! So let's get started with the list of 10 Linux Basic commands - +让我们开始学习这10条Linux基本命令吧。 + #### 1. sudo This SuperUserDo is the most important command Linux newbies will use. Every single command that needs root's permission, need this sudo command. You can use sudo before each command that requires root permissions - +这条命令的意思是“以超级用户的身份执行”,是 SuperUserDo 的简写,它是新手将要用到的最重要的一条Linux命令。当一条单行命令需要root权限的时候,`sudo`命令就派上用场了。你可以在每一条需要root权限的命令前都加上`sudo`。 + ``` $ sudo su ``` @@ -26,12 +36,16 @@ $ sudo su Just like the other, you often want to see anything in your directory. With list command, the terminal will show you all the files and folders of the directory that you're working in. Let's say I'm in the /home folder and I want to see the directories & files in /home. +跟其他人一样,你肯定也经常想看看目录下都有些什么东西。使用列表命令,终端会把当前工作目录下所有的文件以及文件夹展示给你。比如说,我当前处在 /home 文件夹中,我想看看 /home文件夹中都有哪些文件和目录。 + ``` /home$ ls ``` ls in /home returns the following - +在/home中执行ls命令将会返回以下内容 + ``` imad lost+found ``` @@ -39,9 +53,13 @@ imad lost+found #### 3. cd ​Changing directory (cd) is the main command that always be in use in terminal. It's one of the most Linux basic commands. Using this is easy. Just type the name of the folder you want to go in from your current directory. If you want to go up just do it by giving double dots (..) as the parameter. + +变更目录(cd)是终端中总会被用到的主要命令。他是最常用到的Linux基本命令之一。此命令使用非常简单,你打算从当前目录跳转至哪个文件夹,只需要将此文件夹键入命令之后即可。如果你想跳转至上层目录,只需要在此命令之后键入两个点(..)就可以了。 ​ Let's say I'm in /home directory and I want to move in usr directory which is always in the /home. Here is how I can use cd commands - +举个例子,我现在处在/home目录中,我想移动到/home目录中的usr文件夹下,可以通过以下命令来完成操作。 + ``` /home $ cd usr @@ -52,6 +70,8 @@ Let's say I'm in /home directory and I want to move in usr directory which is al Just changing directory is still incomplete. Sometimes you want to create a new folder or subfolder. You can use mkdir command to do that. Just give your folder name after mkdir command in your terminal. +只是可以切换目录还是不够完美。有时候你会想要建一个文件夹或子文件夹。你可以使用mkdir命令来完成。使用方法很简单,只需要把新的文件夹名跟在mkdir命令之后就好了。 + ``` ~$ mkdir folderName ``` @@ -60,16 +80,22 @@ Just changing directory is still incomplete. Sometimes you want to create a new copy-and-paste is the important task we need to do to organize our files. Using cp will help you to copy-and-paste the file from terminal. First, you determine the file you want to copy and type the destination location to paste the file. +拷贝-粘贴(copy-and-paste)是我们组织文件需要用到的重要命令。使用 cp 命令可以帮助你在终端当中完成拷贝-粘贴操作。首先确定你想要拷贝的文件,然后键入打算粘贴次文件的目标位置。 + ``` $ cp src des ``` Note: If you're copying files into the directory that requires root permission for any new file, then you'll need to use sudo command. +注意:如果目标目录对新建文件需要root权限时,你可以使用sudo命令来完成你的文件拷贝操作。 + #### 6. rm rm is a command to remove your file or even your directory. You can use -f if the file need root permission to be removed. And also you can use -r to do recursive removal to remove your folder. +rm命令可以帮助你移除文件甚至目录。如果文件需要root权限才能移除,可以用-f参数来强制执行。也可以使用-r参数来递归的移除你的文件夹。 + ``` $ rm myfile.txt ``` From b2bd10c920c07e8c342a709b626ce45a7043f6c2 Mon Sep 17 00:00:00 2001 From: Ping Yang Date: Mon, 20 Jun 2016 00:23:25 +0800 Subject: [PATCH 1570/1710] Complete Translating. --- ...hat Every Linux Newbies Should Remember.md | 67 ++++++++----------- 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md b/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md index f7f7f724b9..c69b7a6e54 100644 --- a/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md +++ b/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md @@ -1,30 +1,20 @@ -10 Basic Linux Commands That Every Linux Newbies Should Remember - Linux新手必知必会的10条Linux基本命令 ===================================================================== ![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/4225072_orig.png) -[Linux][1] has a big impact on our Lives. At least, your android phone has Linux kernel on it. However, getting started with Linux just make you discomfort for the first time. - Because on Linux, you usually should use terminal commands instead of just clicking the launcher icon (as you did on Windows). But don't worry, We will give you 10 basic Linux commands & important commands that will help you get started. -Linux对我们的生活产生了巨大的冲击。至少你的安卓手机使用的就是Linux核心。尽管如此,在第一次开始使用Linux时你还是会感到难以下手。因为在Linux中,通常需要使用终端命令来取代Windows系统中的启动图标点击。但是不必担心,这里我们会介绍10个Linux基本命令来帮助你开启这段神秘之旅。 +[Linux][1]对我们的生活产生了巨大的冲击。至少你的安卓手机使用的就是Linux核心。尽管如此,在第一次开始使用Linux时你还是会感到难以下手。因为在Linux中,通常需要使用终端命令来取代Windows系统中的点击启动图标操作。但是不必担心,这里我们会介绍10个Linux基本命令来帮助你开启Linux神秘之旅。 -### 10 Basic Linux Commands That Help Newbies Get Started ### 帮助新手走出第一步的10个Linux基本命令 -When We talk about Linux commands, what we are really talking about is the Linux system itself. These small number of 10 Basic Linux commands will not make you a genius or a Linux expert instead, it'll help you get started with Linux. It'll help Linux newbies to perform daily basic tasks in Linux using these Linux basic commands or I should say Linux top commands(because of their usage)。 - -当我们谈论Linux命令时,实质上是在谈论Linux系统本身。这短短的10个Linux基本命令不会让你变成天才或者Linux专家,但是能帮助你轻松开始Linux之旅。使用这些基本命令会帮助新手们完成Linux日常任务,由于它们的使用频率如此至高,所以我更乐意称他们为Linux命令之王! - -So let's get started with the list of 10 Linux Basic commands - +当我们谈论Linux命令时,实质上是在谈论Linux系统本身。这短短的10个Linux基本命令不会让你变成天才或者Linux专家,但是能帮助你轻松开始Linux之旅。使用这些基本命令会帮助新手们完成Linux的日常任务,由于它们的使用频率如此至高,所以我更乐意称他们为Linux命令之王! 让我们开始学习这10条Linux基本命令吧。 -#### 1. sudo -This SuperUserDo is the most important command Linux newbies will use. Every single command that needs root's permission, need this sudo command. You can use sudo before each command that requires root permissions - +#### 1. sudo 这条命令的意思是“以超级用户的身份执行”,是 SuperUserDo 的简写,它是新手将要用到的最重要的一条Linux命令。当一条单行命令需要root权限的时候,`sudo`命令就派上用场了。你可以在每一条需要root权限的命令前都加上`sudo`。 @@ -32,9 +22,9 @@ This SuperUserDo is the most important command Linux newbies will use. Every sin $ sudo su ``` + #### 2. ls (list) -Just like the other, you often want to see anything in your directory. With list command, the terminal will show you all the files and folders of the directory that you're working in. Let's say I'm in the /home folder and I want to see the directories & files in /home. 跟其他人一样,你肯定也经常想看看目录下都有些什么东西。使用列表命令,终端会把当前工作目录下所有的文件以及文件夹展示给你。比如说,我当前处在 /home 文件夹中,我想看看 /home文件夹中都有哪些文件和目录。 @@ -42,22 +32,18 @@ Just like the other, you often want to see anything in your directory. With list /home$ ls ``` -ls in /home returns the following - -在/home中执行ls命令将会返回以下内容 +在/home中执行`ls`命令将会返回以下内容 ``` imad lost+found ``` + #### 3. cd -​Changing directory (cd) is the main command that always be in use in terminal. It's one of the most Linux basic commands. Using this is easy. Just type the name of the folder you want to go in from your current directory. If you want to go up just do it by giving double dots (..) as the parameter. - -变更目录(cd)是终端中总会被用到的主要命令。他是最常用到的Linux基本命令之一。此命令使用非常简单,你打算从当前目录跳转至哪个文件夹,只需要将此文件夹键入命令之后即可。如果你想跳转至上层目录,只需要在此命令之后键入两个点(..)就可以了。 +变更目录命令(cd)是终端中总会被用到的主要命令。他是最常用到的Linux基本命令之一。此命令使用非常简单,当你打算从当前目录跳转至某个文件夹时,只需要将文件夹键入此命令之后即可。如果你想跳转至上层目录,只需要在此命令之后键入两个点(..)就可以了。 ​ -Let's say I'm in /home directory and I want to move in usr directory which is always in the /home. Here is how I can use cd commands - - 举个例子,我现在处在/home目录中,我想移动到/home目录中的usr文件夹下,可以通过以下命令来完成操作。 ``` @@ -66,45 +52,41 @@ Let's say I'm in /home directory and I want to move in usr directory which is al /home/usr $ ``` + #### 4. mkdir -Just changing directory is still incomplete. Sometimes you want to create a new folder or subfolder. You can use mkdir command to do that. Just give your folder name after mkdir command in your terminal. - -只是可以切换目录还是不够完美。有时候你会想要建一个文件夹或子文件夹。你可以使用mkdir命令来完成。使用方法很简单,只需要把新的文件夹名跟在mkdir命令之后就好了。 +只是可以切换目录还是不够完美。有时候你会想要新建一个文件夹或子文件夹。此时可以使用mkdir命令来完成操作。使用方法很简单,只需要把新的文件夹名跟在mkdir命令之后就好了。 ``` ~$ mkdir folderName ``` + #### 5. cp -copy-and-paste is the important task we need to do to organize our files. Using cp will help you to copy-and-paste the file from terminal. First, you determine the file you want to copy and type the destination location to paste the file. - -拷贝-粘贴(copy-and-paste)是我们组织文件需要用到的重要命令。使用 cp 命令可以帮助你在终端当中完成拷贝-粘贴操作。首先确定你想要拷贝的文件,然后键入打算粘贴次文件的目标位置。 +拷贝-粘贴(copy-and-paste)是我们组织文件需要用到的重要命令。使用 `cp` 命令可以帮助你在终端当中完成拷贝-粘贴操作。首先确定你想要拷贝的文件,然后键入打算粘贴此文件的目标位置。 ``` $ cp src des ``` -Note: If you're copying files into the directory that requires root permission for any new file, then you'll need to use sudo command. +注意:如果目标目录对新建文件需要root权限时,你可以使用`sudo`命令来完成文件拷贝操作。 -注意:如果目标目录对新建文件需要root权限时,你可以使用sudo命令来完成你的文件拷贝操作。 #### 6. rm -rm is a command to remove your file or even your directory. You can use -f if the file need root permission to be removed. And also you can use -r to do recursive removal to remove your folder. - -rm命令可以帮助你移除文件甚至目录。如果文件需要root权限才能移除,可以用-f参数来强制执行。也可以使用-r参数来递归的移除你的文件夹。 +rm命令可以帮助你移除文件甚至目录。如果文件需要root权限才能移除,可以用`-f`参数来强制执行。也可以使用`-r`参数来递归的移除文件夹。 ``` $ rm myfile.txt ``` + #### 7. apt-get -This command differs distro-by-distro. In Debian based Linux distributions, to install, remove and upgrade any package we've Advanced Packaging Tool (APT) package manager. The apt-get command will help you installing the software you need to run in your Linux. It is a powerful command-line tool which can perform installation, upgrade, and even removing your software. +这个命令会依据发行版的不同而有所区别。在基于Debian的发行版中,我们拥有Advanced Packaging Tool(APT)包管理工具来安装、移除和升级包。apt-get命令会帮助你安装需要在Linux系统中运行的软件。它是一个功能强大的命令行,可以用来帮助你对软件执行安装、升级和移除操作。 -​In other distributions, such as Fedora, Centos there are different package managers. Fedora used to have yum but now it has dnf. +在其他发行版中,例如Fedora、Centos,都各自不同的包管理工具。Fedora之前使用的是yum,不过现在dnf成了它默认的包管理工具。 ``` $ sudo apt-get update @@ -112,40 +94,45 @@ $ sudo apt-get update $ sudo dnf update ``` + #### 8. grep -You need to find a file but you don't remember its exact location or the path. grep will help you to solve this problem. You can use the grep command to help finding the file based on given keywords. +当你需要查找一个文件,但是又忘记了它具体的位置和路径时,`grep`命令会帮助你解决这个难题。你可以提供文件的关键字,使用`grep`命令来查找到它。 ``` $ grep user /etc/passwd ``` + #### 9. cat -As a user, you often need to view some of text or code from your script. Again, one of the Linux basic commands is cat command. It will show you the text inside your file. +作为一个用户,你应该会经常需要浏览脚本内的文本或者代码。`cat`命令是Linux系统的基本命令之一,它的用途就是将文件的内容展示给你。 ``` $ cat CMakeLists.txt ``` + #### 10. poweroff -And the last one is poweroff. Sometimes you need to poweroff directly from your terminal. This command will do the task. Don't forget to add sudo at the beginning of the command since it needs root permission to execute poweroff. +最后一个命令是 `poweroff`。有时你需要直接在终端中执行关机操作。此命令可以完成这个任务。由于关机操作需要root权限,所以别忘了在此命令之前添加`sudo`。 ``` $ sudo poweroff ``` -### Conclusion -As I mentioned when I started off the article that these 10 basic Linux commands will not make you a Linux geek immediately. It'll help you to start using Linux at this early stage. With these basic Linux commands, start using Linux and set your target to learn 1-3 commands daily. So it's all for this article. I hope it helped you. Share with us interesting and useful commands in the comment section below and don't forget to share this article with your friends. +### 总结 + +如我在文章开始所言,这10条命令并不会让你立即成为一个Linux大拿。它们会让你在初期快速上手Linux。以这些命令为基础,给自己设置一个目标,每天学习一到三条命令,这就是此文的目的所在。在下方评论区分享有趣并且有用的命令。别忘了跟你的朋友分享此文。 + -------------------------------------------------------------------------------- via: http://www.linuxandubuntu.com/home/10-basic-linux-commands-that-every-linux-newbies-should-remember 作者:[Commenti][a] -译者:[译者ID](https://github.com/译者ID) +译者:[mr-ping](https://github.com/mr-ping) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1d93c3853cb201efb05932dbcbe23181c1802d17 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Jun 2016 06:24:34 +0800 Subject: [PATCH 1571/1710] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @oska874 @martin2011qi --- ...60519 The future of sharing integrating Pydio and ownCloud.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{20160519 The future of sharing: integrating Pydio and ownCloud.md => 20160519 The future of sharing integrating Pydio and ownCloud.md} (100%) diff --git a/translated/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md b/translated/tech/20160519 The future of sharing integrating Pydio and ownCloud.md similarity index 100% rename from translated/tech/20160519 The future of sharing: integrating Pydio and ownCloud.md rename to translated/tech/20160519 The future of sharing integrating Pydio and ownCloud.md From fd1a9e51fd5f3ddca155c9563c78edd6e1d15b5f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Jun 2016 06:51:25 +0800 Subject: [PATCH 1572/1710] PUB:20160218 Linux Systems Patched for Critical glibc Flaw @robot527 --- ...Systems Patched for Critical glibc Flaw.md | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) rename {translated/tech => published}/20160218 Linux Systems Patched for Critical glibc Flaw.md (55%) diff --git a/translated/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md b/published/20160218 Linux Systems Patched for Critical glibc Flaw.md similarity index 55% rename from translated/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md rename to published/20160218 Linux Systems Patched for Critical glibc Flaw.md index 284ac99fa0..e6a008f7bc 100644 --- a/translated/tech/20160218 Linux Systems Patched for Critical glibc Flaw.md +++ b/published/20160218 Linux Systems Patched for Critical glibc Flaw.md @@ -1,39 +1,41 @@ 修补 Linux 系统 glibc 严重漏洞 ================================================= -**谷歌揭露的一个严重漏洞影响主流的 Linux 发行版。glibc 的漏洞可能导致远程代码执行。** +**谷歌披露的一个严重漏洞影响到了主流的 Linux 发行版。glibc 的漏洞可能导致远程代码执行。** -Linux 用户今天都竞相给一个可以使系统暴露在远程代码执行风险中的核心 glibc 开放源码库的严重漏洞打补丁。glibc 的漏洞被确定为 CVE-2015-7547,题为“getaddrinfo 基于堆栈的缓冲区溢出”。 +编者按:这个消息并不是一个新闻,基于技术的原因,我们还是分享给大家。 + +Linux 用户都在竞相给一个可以使系统暴露在远程代码执行风险中的核心 glibc 开放源码库的严重漏洞打补丁。这个 glibc 的漏洞编号被确定为 CVE-2015-7547,题为“getaddrinfo 基于堆栈的缓冲区溢出”。 glibc,或 GNU C 库,是一个开放源码的 C 和 C++ 编程语言库的实现,是每一个主流 Linux 发行版的一部分。谷歌工程师们在他们试图连接到某个主机系统时发生了一个段错误导致连接崩溃,偶然发现了 CVE-2015-7547 问题。进一步的研究表明, glibc 有缺陷而且该崩溃可能实现任意远程代码执行的条件。 -谷歌在一篇博客文章中写道, “当 getaddrinfo() 库函数被使用时,glibc 的 DNS 客户端解析器易受基于堆栈缓冲区溢出的攻击,使用该功能的软件可能被利用为攻击者控制的域名,攻击者控制的 DNS[域名系统] 服务器,或通过中间人攻击。” +谷歌在一篇博客文章中写道, “当 getaddrinfo() 库函数被使用时,glibc 的 DNS 客户端解析器易受基于堆栈缓冲区溢出的攻击,使用该功能的软件可能通过攻击者控制的域名、攻击者控制的 DNS [域名系统] 服务器,或通过中间人攻击方式(MITM)进行破坏。” 其实利用 CVE-2015-7547 问题并不简单,但它是可能的。为了证明这个问题能被利用,谷歌发布了论证一个终端用户或系统是否易受攻击的概念验证(POC)代码到 GitHub 上。 -GitHub 上的 POC 网页声明“服务器代码触发漏洞,因此会使客户端代码崩溃”。 +GitHub 上的 POC 网页说“服务器代码会触发漏洞,因此会使客户端代码崩溃”。 -Duo Security 公司的高级安全研究员 Mark Loveless 解释说 CVE-2015-7547 的主要风险在于 Linux 上依赖于 DNS 响应的基于客户端的应用程序。 +Duo Security 公司的高级安全研究员 Mark Loveless 解释说 CVE-2015-7547 的主要风险在于依赖于 DNS 响应的基于 Linux 客户端的应用程序。 Loveless 告诉 eWEEK “需要一些特定的条件,所以不是每个应用程序都会受到影响,但似乎一些命令行工具,包括流行的 SSH[安全 Shell] 客户端都可能触发该漏洞,我们认为这是严重的,主要是因为对 Linux 系统存在的风险,但也因为潜在的其他问题。” -其他问题可能包括一种触发调用易受攻击的 glibc 库 getaddrinfo() 的基于电子邮件攻击的风险。另外值得注意的是,该漏洞被发现之前已存在于代码之中多年。 +其他问题可能包括一种通过电子邮件触发调用易受攻击的 glibc 库 getaddrinfo() 攻击的风险。另外值得注意的是,该漏洞被发现之前已存在于代码之中多年。 -谷歌的工程师不是第一或唯一发现 glibc 中的安全风险的团体。这个问题于 2015 年 7 月 13 日首先被报告给了 glibc 的 bug[跟踪系统](https://sourceware.org/bugzilla/show_bug.cgi?id=1866)。该缺陷的根源可以更进一步追溯到在 2008 五月发布的 glibc 2.9 的代码提交时首次引入缺陷。 +谷歌的工程师不是第一或唯一发现这个 glibc 安全风险的团体。这个问题于 2015 年 7 月 13 日首先被报告给了 glibc 的 bug[跟踪系统](https://sourceware.org/bugzilla/show_bug.cgi?id=1866)。该缺陷的根源可以更进一步追溯到在 2008 五月发布的 glibc 2.9 的代码提交时首次引入缺陷。 -Linux 厂商红帽也独立找到了 glibc 中的这个 bug,而且在 2016 年 1 月 6 日,谷歌和红帽开发人员证实,他们作为最初与上游 glibc 的维护者私下讨论的部分人员,已经独立在为同一个漏洞工作。 +Linux 厂商红帽也独立找到了 glibc 中的这个 bug,而且是在 2016 年 1 月 6 日,谷歌和红帽开发人员证实,他们作为最初与上游 glibc 的维护者私下讨论的部分人员,已经独立在为同一个漏洞工作。 -红帽产品安全首席软件工程师 Florian Weimer 告诉 eWEEK “一旦确认了两个团队都在为同一个漏洞工作,我们合作进行可能的修复,缓解措施和回归测试,我们还共同努力,使测试覆盖尽可能广,捕捉代码中的任何相关问题,以帮助避免今后更多问题。” +红帽产品安全首席软件工程师 Florian Weimer 告诉 eWEEK “一旦确认了两个团队都在为同一个漏洞工作,我们会合作进行可能的修复,缓解措施和回归测试,我们还会共同努力,使测试覆盖尽可能广,捕捉代码中的任何相关问题,以帮助避免今后更多问题。” 由于缺陷不明显或不易立即显现,我们花了几年时间才发现 glibc 代码有一个安全问题。 -Weimer 说“要诊断一个网络组件的漏洞,如 DNS 解析器,当遇到问题时通常要看被抓数据包的踪迹,在这种情况下这样的抓包不适用,所以需要一些实验来重现触发这个 bug 的确切场景。” +Weimer 说“要诊断一个网络组件的漏洞,如 DNS 解析器,当遇到问题时通常要看抓到的数据包的踪迹,在这种情况下这样的抓包不适用,所以需要一些实验来重现触发这个 bug 的确切场景。” -Weimer 补充说,一旦可以抓取数据包,大量精力投入到验证修复程序中,最终导致回归测试套件一系列的改进,有助于上游 glibc 项目。 +Weimer 补充说,一旦可以抓取数据包,就会投入大量精力到验证修复程序中,最终完成回归测试套件一系列的改进,有助于上游 glibc 项目。 -在许多情况下,安全增强式 Linux (SELinux) 的强制访问安全控制可以减少潜在漏洞风险,除了这个 glibc 的新问题。 +在许多情况下,安全增强式 Linux (SELinux) 的强制访问安全控制可以减少潜在漏洞风险,但是这个 glibc 的新问题例外。 -Weimer 说“由于攻击者提供的任意代码的执行,风险是重要系统功能的一个妥协。一个合适的 SELinux 策略可以遏制一些攻击者可能会做的损害,并限制他们访问系统,但是 DNS 被许多应用程序和系统组件使用,所以 SELinux 策略只提供了针对此问题有限的遏制。” +Weimer 说“由于攻击者提供的任意代码的执行,会对很多重要系统功能带来风险。一个合适的 SELinux 策略可以遏制一些攻击者可能会做的损害,并限制他们访问系统,但是 DNS 被许多应用程序和系统组件使用,所以 SELinux 策略只提供了针对此问题有限的遏制。” 在揭露漏洞的今天,现在有一个可用的补丁来减少 CVE-2015-7547 的潜在风险。 @@ -43,7 +45,7 @@ via: http://www.eweek.com/security/linux-systems-patched-for-critical-glibc-flaw 作者:[Michael Kerner][a] 译者:[robot527](https://github.com/robot527) -校对:[校对者 ID](https://github.com/校对者 ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux 中国](https://linux.cn/) 荣誉推出 From 93e334a0f68ea08e9713d674212aaece94ee3a27 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Jun 2016 07:19:26 +0800 Subject: [PATCH 1573/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B4=A1=E7=8C=AE?= =?UTF-8?q?=E8=80=85=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 82 +++++++++++++++++++++++-------------------------------- 1 file changed, 34 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index e68f260b71..40afd5d30e 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ 简介 ------------------------------- -LCTT是“Linux中国”([https://linux.cn/](https://linux.cn/))的翻译组,负责从国外优秀媒体翻译Linux相关的技术、资讯、杂文等内容。 +LCTT 是“Linux中国”([https://linux.cn/](https://linux.cn/))的翻译组,负责从国外优秀媒体翻译 Linux 相关的技术、资讯、杂文等内容。 -LCTT已经拥有几百名活跃成员,并欢迎更多的Linux志愿者加入我们的团队。 +LCTT 已经拥有几百名活跃成员,并欢迎更多的Linux志愿者加入我们的团队。 ![logo](http://img.linux.net.cn/static/image/common/lctt_logo.png) -LCTT的组成 +LCTT 的组成 ------------------------------- -**选题**,负责选择合适的内容,并将原文转换为markdown格式,提交到LCTT的[TranslateProject](https://github.com/LCTT/TranslateProject) 库中。 +**选题**,负责选择合适的内容,并将原文转换为 markdown 格式,提交到 LCTT 的 [TranslateProject](https://github.com/LCTT/TranslateProject) 库中。 **译者**,负责从选题中选择内容进行翻译。 @@ -21,38 +21,38 @@ LCTT的组成 加入我们 ------------------------------- -请首先加入翻译组的QQ群,群号是:198889102,加群时请说明是“志愿者”。加入后记得修改您的群名片为您的github的ID。 +请首先加入翻译组的 QQ 群,群号是:198889102,加群时请说明是“志愿者”。加入后记得修改您的群名片为您的 GitHub 的 ID。 -加入的成员,请先阅读[WIKI 如何开始](https://github.com/LCTT/TranslateProject/wiki/01-如何开始)。 +加入的成员,请先阅读 [WIKI 如何开始](https://github.com/LCTT/TranslateProject/wiki/01-如何开始)。 如何开始 ------------------------------- -请阅读[WIKI](https://github.com/LCTT/TranslateProject/wiki)。 +请阅读 [WIKI](https://github.com/LCTT/TranslateProject/wiki)。 历史 ------------------------------- * 2013/09/10 倡议并得到了大家的积极响应,成立翻译组。 -* 2013/09/11 采用github进行翻译协作,并开始进行选题翻译。 +* 2013/09/11 采用 GitHub 进行翻译协作,并开始进行选题翻译。 * 2013/09/16 公开发布了翻译组成立消息后,又有新的成员申请加入了。并从此建立见习成员制度。 -* 2013/09/24 鉴于大家使用Github的水平不一,容易导致主仓库的一些错误,因此换成了常规的fork+PR的模式来进行翻译流程。 -* 2013/10/11 根据对LCTT的贡献,划分了Core Translators组,最先的加入成员是vito-L和tinyeyeser。 -* 2013/10/12 取消对LINUX.CN注册用户的依赖,在QQ群内、文章内都采用github的注册ID。 -* 2013/10/18 正式启动man翻译计划。 +* 2013/09/24 鉴于大家使用 GitHub 的水平不一,容易导致主仓库的一些错误,因此换成了常规的 fork+PR 的模式来进行翻译流程。 +* 2013/10/11 根据对 LCTT 的贡献,划分了 Core Translators 组,最先的加入成员是 vito-L 和 tinyeyeser。 +* 2013/10/12 取消对 LINUX.CN 注册用户的依赖,在 QQ 群内、文章内都采用 GitHub 的注册 ID。 +* 2013/10/18 正式启动 man 翻译计划。 * 2013/11/10 举行第一次北京线下聚会。 -* 2014/01/02 增加了Core Translators 成员: geekpi。 -* 2014/05/04 更换了新的QQ群:198889102 -* 2014/05/16 增加了Core Translators 成员: will.qian、vizv。 -* 2014/06/18 由于GOLinux令人惊叹的翻译速度和不错的翻译质量,升级为Core Translators成员。 +* 2014/01/02 增加了 Core Translators 成员: geekpi。 +* 2014/05/04 更换了新的 QQ 群:198889102 +* 2014/05/16 增加了 Core Translators 成员: will.qian、vizv。 +* 2014/06/18 由于 GOLinux 令人惊叹的翻译速度和不错的翻译质量,升级为 Core Translators 成员。 * 2014/09/09 LCTT 一周年,做一年[总结](http://linux.cn/article-3784-1.html)。并将曾任 CORE 的成员分组为 Senior,以表彰他们的贡献。 -* 2014/10/08 提升bazz2为Core Translators成员。 -* 2014/11/04 提升zpl1025为Core Translators成员。 -* 2014/12/25 提升runningwater为Core Translators成员。 +* 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 项目。 -* 2015/06/09 提升ictlyh和dongfengweixiao为Core Translators成员。 -* 2015/11/10 提升strugglingyouth、FSSlc、Vic020、alim0x为Core Translators成员。 -* 2016/05/09 提升PurlingNayuki为校对。 +* 2015/06/09 提升 ictlyh 和 dongfengweixiao 为 Core Translators 成员。 +* 2015/11/10 提升 strugglingyouth、FSSlc、Vic020、alim0x 为 Core Translators 成员。 +* 2016/05/09 提升 PurlingNayuki 为校对。 活跃成员 ------------------------------- @@ -74,16 +74,16 @@ LCTT的组成 - CORE @dongfengweixiao, - CORE @alim0x, - Senior @DeadFire, -- Senior @reinoir, +- Senior @reinoir222, - Senior @tinyeyeser, - Senior @vito-L, - Senior @jasminepeng, - Senior @willqian, - Senior @vizv, - ZTinoZ, -- theo-l, -- luoxcat, - martin2011qi, +- theo-l, +- Luoxcat, - wi-cuckoo, - disylee, - haimingfg, @@ -91,8 +91,8 @@ LCTT的组成 - wwy-hust, - felixonmars, - su-kaiyao, -- ivo-wang, - GHLandy, +- ivo-wang, - cvsher, - wyangsun, - DongShuaike, @@ -119,6 +119,7 @@ LCTT的组成 - blueabysm, - boredivan, - name1e5s, +- StdioA, - yechunxiao19, - l3b2w1, - XLCYun, @@ -134,8 +135,8 @@ LCTT的组成 - 1w2b3l, - JonathanKang, - crowner, -- mtunique, - dingdongnigetou, +- mtunique, - CNprober, - hyaocuk, - szrlee, @@ -146,37 +147,22 @@ LCTT的组成 - xiaoyu33, - guodongxiaren, - ynmlml, -- kylepeng93, +- vim-kakali, - ggaaooppeenngg, - Ricky-Gong, - zky001, -- Flowsnow, - lfzark, - 213edu, -- Tanete, -- liuaiping, - bestony, +- mudongliang, +- liuaiping, - Timeszoro, - rogetfan, -- itsang, - JeffDing, - Yuking-net, -- MikeCoder, -- zhangboyue, -- liaoishere, -- yupmoon, -- Medusar, -- zzlyzq, -- yujianxuechuan, -- ailurus1991, -- tomatoKiller, -- stduolc, -- shaohaolin, -- FineFan, -- kingname, -- CHINAANSHE, -(按提交行数排名前百) + +(按增加行数排名前百) LFS 项目活跃成员有: @@ -188,7 +174,7 @@ LFS 项目活跃成员有: - @KevinSJ - @Yuking-net -(更新于2016/05/09) +(更新于2016/06/20) 谢谢大家的支持! From 6b710a8db52dc0b74fa855eec6558f002da95915 Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 20 Jun 2016 08:32:04 +0800 Subject: [PATCH 1574/1710] Move the location of 10 Basic Linux Command --- ...sic Linux Commands That Every Linux Newbies Should Remember.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md (100%) diff --git a/sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md b/translated/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md similarity index 100% rename from sources/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md rename to translated/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md From 82c4720013e408536e2acdb0eacbb107b0e025ea Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 20 Jun 2016 10:33:09 +0800 Subject: [PATCH 1575/1710] Mark the article --- sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md index 4bef489ade..e7ae6f4105 100644 --- a/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md +++ b/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md @@ -1,4 +1,4 @@ - Vic020 +Translating by Ping How to Add Cron Jobs in Linux and Unix ====================================== From 6ea2b1a6e5558e9ad2b492ba92f3cda366aded56 Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 20 Jun 2016 13:26:06 +0800 Subject: [PATCH 1576/1710] Complete translating --- ... How to Add Cron Jobs in Linux and Unix.md | 180 ----------------- ... How to Add Cron Jobs in Linux and Unix.md | 183 ++++++++++++++++++ 2 files changed, 183 insertions(+), 180 deletions(-) delete mode 100644 sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md create mode 100644 translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md diff --git a/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md deleted file mode 100644 index e7ae6f4105..0000000000 --- a/sources/tech/20160605 How to Add Cron Jobs in Linux and Unix.md +++ /dev/null @@ -1,180 +0,0 @@ -Translating by Ping - -How to Add Cron Jobs in Linux and Unix -====================================== - - -![](https://www.unixmen.com/wp-content/uploads/2016/05/HOW-TO-ADD-CRON-JOBS-IN-LINUX-AND-UNIX-696x334.png) - -### Introduction - -![](http://www.unixmen.com/wp-content/uploads/2016/05/cronjob.gif) - -Cron job are used to schedule commands to be executed periodically. You can setup commands or scripts, which will repeatedly run at a set time. Cron is one of the most useful tool in Linux or UNIX like operating systems. The cron service (daemon) runs in the background and constantly checks the /etc/crontab file, and /etc/cron.*/ directories. It also checks the /var/spool/cron/ directory. - -### Command of crontab - -crontab is the command used to install, deinstall or list the tables (cron configuration file) used to drive the [cron(8)][1] daemon in Vixie Cron. Each user can have their own crontab file, and though these are files in /var/spool/cron/crontabs, they are not intended to be edited directly. You need to use crontab command for editing or setting up your own cron jobs. - -### Types of cron configuration files - -There are different types of configuration files: - -- **The UNIX / Linux system crontab** : Usually, used by system services and critical jobs that requires root like privileges. The sixth field (see below for field description) is the name of a user for the command to run as. This gives the system crontab the ability to run commands as any user. - -- **The user crontabs**: User can install their own cron jobs using the crontab command. The sixth field is the command to run, and all commands run as the user who created the crontab - -**Note**: This faq features cron implementations written by Paul Vixie and included in many [Linux][2] distributions and Unix like systems such as in the popular 4th BSD edition. The syntax is [compatible][3] with various implementations of crond. - -How Do I install or create or edit my own cron jobs? - -To edit your crontab file, type the following command at the UNIX / Linux shell prompt: - -``` -$ crontab -e -``` - -Syntax of crontab (field description) - -The syntax is: - -``` -1 2 3 4 5 /path/to/command arg1 arg2 -``` - -OR - -``` -1 2 3 4 5 /root/ntp_sync.sh -``` - -Where, - -- 1: Minute (0-59) -- 2: Hours (0-23) -- 3: Day (0-31) -- 4: Month (0-12 [12 == December]) -- 5: Day of the week(0-7 [7 or 0 == sunday]) -- /path/to/command – Script or command name to schedule - -Easy to remember format: - -``` -* * * * * command to be executed -– – – – – -| | | | | -| | | | —– Day of week (0 – 7) (Sunday=0 or 7) -| | | ——- Month (1 – 12) -| | ——— Day of month (1 – 31) -| ———– Hour (0 – 23) -————- Minute (0 – 59) -``` - -Example simple crontab. - -```` -## run backupscript 5 minutes 1 time ## -*/5 * * * * /root/backupscript.sh - -## Run backupscript daily on 1:00 am ## - -0 1 * * * /root/backupscript.sh - -## Run backup script monthly on the 1st of month 3:15 am ## - -15 3 1 * * /root/backupscript.sh -``` - -### How do I use operators? - -An operator allows you to specifying multiple values in a field. There are three operators: - -- **The asterisk (*)** : This operator specifies all possible values for a field. For example, an asterisk in the hour time field would be equivalent to every hour or an asterisk in the month field would be equivalent to every month - -- **The comma (,)** : This operator specifies a list of values, for example: “1,5,10,15,20, 25”. - -- **The dash (–)** : This operator specifies a range of values, for example: “5-15” days , which is equivalent to typing “5,6,7,8,9,….,13,14,15” using the comma operator. - -- **The separator (/)** : This operator specifies a step value, for example: “0-23/” can be used in the hours field to specify command execution every other hour. Steps are also permitted after an asterisk, so if you want to say every two hours, just use */2. - - -### Use special string to save time - -Instead of the first five fields, you can use any one of eight special strings. It will not just save your time but it will improve readability. - -Special string | Meaning -|:-- |:-- -@reboot | Run once, at startup. -@yearly | Run once a year, “0 0 1 1 *”. -@annually | (same as @yearly) -@monthly | Run once a month, “0 0 1 * *”. -@weekly | Run once a week, “0 0 * * 0”. -@daily | Run once a day, “0 0 * * *”. -@midnight | (same as @daily) -@hourly | Run once an hour, “0 * * * *”. - - -Examples - -``` -#### Run ntpdate command every hour #### - -@hourly /path/to/ntpdate -``` - - -### More about /etc/crontab file and /etc/cron.d/* directories - -/etc/crontab is system crontabs file. Usually only used by root user or daemons to configure system wide jobs. All individual user must must use crontab command to install and edit their jobs as described above. /var/spool/cron/ or /var/cron/tabs/ is directory for personal user crontab files. It must be backup with users home directory. - -Understanding Default /etc/crontab - -Typical /etc/crontab file entries: - -``` -SHELL=/bin/bash -PATH=/sbin:/bin:/usr/sbin:/usr/bin -MAILTO=root -HOME=/ -# run-parts -01 * * * * root run-parts /etc/cron.hourly -02 4 * * * root run-parts /etc/cron.daily -22 4 * * 0 root run-parts /etc/cron.weekly -42 4 1 * * root run-parts /etc/cron.monthly -``` - -First, the environment must be defined. If the shell line is omitted, cron will use the default, which is sh. If the PATH variable is omitted, no default will be used and file locations will need to be absolute. If HOME is omitted, cron will use the invoking users home directory. - -Additionally, cron reads the files in /etc/cron.d/ directory. Usually system daemon such as sa-update or sysstat places their cronjob here. As a root user or superuser you can use following directories to configure cron jobs. You can directly drop your scripts here. The run-parts command run scripts or programs in a directory via /etc/crontab file: - -Directory |Description -|:-- |:-- -/etc/cron.d/ | Put all scripts here and call them from /etc/crontab file. -/etc/cron.daily/ | Run all scripts once a day -/etc/cron.hourly/ | Run all scripts once an hour -/etc/cron.monthly/ | Run all scripts once a month -/etc/cron.weekly/ | Run all scripts once a week - - -### Backup cronjob - -``` -# crontab -l > /path/to/file - -# crontab -u user -l > /path/to/file -``` - --------------------------------------------------------------------------------- - -via: https://www.unixmen.com/add-cron-jobs-linux-unix/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+unixmenhowtos+%28Unixmen+Howtos+%26+Tutorials%29 - -作者:[Duy NguyenViet][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.unixmen.com/author/duynv/ -[1]: http://www.manpager.com/linux/man8/cron.8.html -[2]: http://www.linuxsecrets.com/ -[3]: http://www.linuxsecrets.com/linux-hardware/ diff --git a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md new file mode 100644 index 0000000000..51935ae54b --- /dev/null +++ b/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md @@ -0,0 +1,183 @@ +如何在Linux及Unix系统中添加定时任务 +====================================== + + +![](https://www.unixmen.com/wp-content/uploads/2016/05/HOW-TO-ADD-CRON-JOBS-IN-LINUX-AND-UNIX-696x334.png) + +### 导言 + +![](http://www.unixmen.com/wp-content/uploads/2016/05/cronjob.gif) + +定时任务是用来定期执行计划命令的。你可以将命令组织到脚本当中,这样就可以在设定的时间将其重复执行。`Cron`是Linux系统或者类Unix系统当中最为实用的工具之一。定时服务(守护进程)在系统后台运行,并且会持续地检查 /etc/crontab 文件和 /etc/cron.*/ 目录。它同样也会检测 /var/spool/cron/ 目录。 + + +### crontab 命令 + +`crontab`是用来安装、卸载或者列出定时配置文件列表的命令。定时配置文件则用于驱动`Vixie Cron`的[cron(8)][1]守护进程。每个用户都可以拥有自己的 crontab 文件,虽然这些文件位于 /var/spool/cron/crontabs 目录中,但这并不意味着你可以直接编辑它们。你需要通过`crontab`命令来编辑或者配置自己的定时任务。 + + +### 定时配置文件的类型 + +配置文件分为以下不同的类型: + +- **UNIX 或 Linux 系统的 crontab** : 此类型通常由类似需要root权限的系统服务或重要任务使用。第六个字段(见下方的字段介绍)为用户名,用来指定此命令以哪个用户身份来执行。如此一来,系统的`crontab`就能够以任意用户的身份来执行操作。 + +- **用户的 crontabs**: 用户可以使用`corntab`命令来安装属于他们自己的定时任务。 第六个字段为需要运行的命令行, 所有的命令行都会以创建 crontab 的用户的身份运行。 + +**Note**: This faq features cron implementations written by Paul Vixie and included in many [Linux][2] distributions and Unix like systems such as in the popular 4th BSD edition. The syntax is [compatible][3] with various implementations of crond. + +**注意**: 这种问答形式的`Cron`实现是由 Paul Vixie 所写的,并且被许多 [Linux][2] 发行版和类Unix系统(如广受欢迎的第四版BSD)包含其中。它的语法被各种计划任务的实现所[兼容][3]。 + +该如何安装、创建或编辑我们自己的定时任务呢? + +在 Linux 或 Unix 的shell提示符后键入以下命令来编辑你的 crontab 文件。 + +``` +$ crontab -e +``` + +`crontab`语法(字段介绍): + +语法为: + +``` +1 2 3 4 5 /path/to/command arg1 arg2 +``` + +或者 + +``` +1 2 3 4 5 /root/ntp_sync.sh +``` + +说明: + +- 1: 分钟 (0-59) +- 2: 小时 (0-23) +- 3: 日期 (0-31) +- 4: 月份 (0-12 [12 == December]) +- 5: 一周当中的某天 (0-7 [7 或 0 == 周日]) +- /path/to/command – 计划执行的脚本或命令名 + +便于记忆的格式: + +``` +* * * * * command to be executed +– – – – – +| | | | | +| | | | —– 一周当中的某天 (0 – 7) (周日=0 or 7) +| | | ——- 月份 (1 – 12) +| | ——— 一月当中的某天 (1 – 31) +| ———– 小时 (0 – 23) +————- 分钟 (0 – 59) +``` + +简单的`crontab`示例: + +```` +## 每隔5分钟运行一次 backupscript 脚本## +*/5 * * * * /root/backupscript.sh + +## 每天的上午1:00运行 backupscript 脚本 ## + +0 1 * * * /root/backupscript.sh + +## 每月的第一个上午3:15 运行 backupscript 脚本 ## + +15 3 1 * * /root/backupscript.sh +``` + + +### 如何使用操作符 + +操作符允许你为一个字段指定多个值,这里有三个操作符可供使用: + +- **星号 (*)** : 此操作符为字段指定所有可用的值。举个例子,在小时字段中,一个星号等同于所有可用的hour值;在月份字段中,一个星号表示所有可用的month值。 + +- **逗号 (,)** : 这个操作符指定了一个包含多个值的列表,例如:`1,5,10,15,20, 25`. + +- **横杠 (–)** : 此操作符指定了一个值的范围,例如:`5-15` 天,等同于使用逗号操作符键入的 `5,6,7,8,9,….,13,14,15`。 + +- **分隔符 (/)** : 此操作符指定了一个步进值,例如: `0-23/` 可以用于小时字段来指定命令行每小时执行一次。步进值也可以跟在星号操作符后边,如果你希望命令行每2小时执行一次,可以这样写 `*/2`。 + + +### 使用特殊字符保存时间 + +你可以使用以下8个特殊字符中的其中一个替代头五个字段。这样不但可以保存时间,也可以提高可读性。 + +特殊字符 | 含义 +|:-- |:-- +@reboot | 在每次启动时运行一次 +@yearly | 每年运行一次, “0 0 1 1 *”. +@annually | (同 @yearly) +@monthly | 每月运行一次, “0 0 1 * *”. +@weekly | 每周运行一次, “0 0 * * 0”. +@daily | 每天运行一次, “0 0 * * *”. +@midnight | (同 @daily) +@hourly | 每小时运行一次, “0 * * * *”. + + +示例: + +``` +#### 每小时运行一次 ntpdate #### + +@hourly /path/to/ntpdate +``` + + +### 关于 /etc/crontab file 和 /etc/cron.d/* 目录的更多内容 + +/etc/crontab 是系统的 corntabs 文件。通常用于root用户和守护进程配置整个系统的任务。每个独立的用户务必遵照以上的介绍,使用`corntab`命令来编辑自己的任务。/var/spool/cron/ 或者 /var/cron/tabs/ 目录存放了个人用户的 corntab 文件,它必定会备份在用户的home目录当中。 + +理解默认的 /etc/crontab + +典型的 /etc/crontab 文件内容: + +``` +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +HOME=/ +# run-parts +01 * * * * root run-parts /etc/cron.hourly +02 4 * * * root run-parts /etc/cron.daily +22 4 * * 0 root run-parts /etc/cron.weekly +42 4 1 * * root run-parts /etc/cron.monthly +``` + +首先,环境必须定义好。如果shell行被忽略了,corn会使用默认的sh shell。如果PATH变量被忽略,就没有默认路径会被使用,并且所有的文件都需要使用绝对路径来定位。如果HOME被忽略,corn会将调用者(用户)的home目录作为默认值使用。 + +另外,corn 会在/etc/cron.d/ 目录中读取文件。通常情况下,像 sa-update 或者 sysstat 这样的系统守护进程会将他们的定时任务存放在此处。作为root用户或者超级用户,你可以使用以下目录来配置你的定时任务。你可以直接将脚本放到这里。`run-parts`命令会通过 /etc/crontab 目录来运行脚本或者程序。 + +目录 |介绍 +|:-- |:-- +/etc/cron.d/ | 将所有的脚本文件放在此处,并从 /etc/crontab 文件中调用它们。 +/etc/cron.daily/ | 每天运行的所有的脚本 +/etc/cron.hourly/ | 每小时运行的所有脚本 +/etc/cron.monthly/ | 每月运行的所有脚本 +/etc/cron.weekly/ | 每周运行的所有脚本 + + +### 备份定时任务 + +``` +# crontab -l > /path/to/file + +# crontab -u user -l > /path/to/file +``` + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/add-cron-jobs-linux-unix/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+unixmenhowtos+%28Unixmen+Howtos+%26+Tutorials%29 + +作者:[Duy NguyenViet][a] +译者:[mr-ping](https://github.com/mr-ping) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.unixmen.com/author/duynv/ +[1]: http://www.manpager.com/linux/man8/cron.8.html +[2]: http://www.linuxsecrets.com/ +[3]: http://www.linuxsecrets.com/linux-hardware/ From 71b52c5a196a72097ba7a670f7f84d47b2cb451b Mon Sep 17 00:00:00 2001 From: J L Date: Mon, 20 Jun 2016 16:29:52 +0800 Subject: [PATCH 1577/1710] =?UTF-8?q?[Translation=20Complete]=20Securi-Pi:?= =?UTF-8?q?=20=E4=BD=BF=E7=94=A8=E6=A0=91=E8=8E=93=E6=B4=BE=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E5=AE=89=E5=85=A8=E8=B7=B3=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...the Raspberry Pi as a Secure Landing Point | 519 ++++++++++++++++++ 1 file changed, 519 insertions(+) create mode 100644 translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point diff --git a/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point b/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point new file mode 100644 index 0000000000..b6705a7b83 --- /dev/null +++ b/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point @@ -0,0 +1,519 @@ +Securi-Pi: 使用树莓派作为安全跳板 +================================================================================ + +像很多 LinuxJournal 的读者一样,我也过上了当今非常普遍的“科技游牧”生活,在网络到网络间,从一个接入点到另一个接入点,我们身处现实世界的不同地方却始终保持统一的互联网接入端。近来我发现越来越多的网络环境开始屏蔽对外的常用端口比如 SMTP(端口25),SSH(端口22)之类的。当你走进一家咖啡馆然后想 SSH 到你的一台服务器上做点事情的时候发现端口22被屏蔽了是一件很烦的事情。 + +不过,我到目前为止还没发现有什么网络环境会把 HTTPS 给墙了(端口443)。在稍微配置了一下家中的树莓派 2之后,我成功地让自己能通过接入树莓派的443接口充当跳板从而让我在各种网络环境下连上想要的目标端口。简而言之,我把家中的树莓派设置成了一个 OpenVPN 的端点,SSH 端点同时也是一个 Apache 服务器——用于监听443端口上的我的接入活动并执行我预先设置好的网络策略。 + + +### 笔记 +此解决方案能搞定大多数有限制的网络环境,但有些防火墙会对外部流量调用深度包检查(Deep packet inspection),它们时常能屏蔽掉用本篇文章里的方式传输的信息。不过我到目前为止还没在这样的防火墙后测试过。同时,尽管我使用了很多基于密码学的工具(OpenVPN,HTTPS,SSH),我并没有非常严格地审计过这套配置方案(译者注:作者的意思是指这套方案能帮你绕过端口限制,但不代表你就是完全安全地连接上了树莓派)。有时候甚至 DNS 服务都会泄露你的信息,很可能在我没有考虑周到的角落里会有遗漏。我强烈不推荐把此跳板配置方案当作是万无一失的隐藏网络流量的办法,此配置只是希望能绕过一些端口限制连上网络,而不是做一些危险的事情。 + +### 起步 + +让我们先从你需要什么说起,我用的是树莓派 2,装载了最新版本的 Raspbian,不过这个配置也应该能在树莓派 Model B 上运行;512MB 的内存对我们来说绰绰有余了,虽然性能可能没有树莓派 2这么好,毕竟Model B只有一颗单核心 CPU 相比于四核心的树莓派 2。我的树莓派在家里的防火墙和路由器之后,所以我还能用这个树莓派作为跳板访问家里的其他电子设备。同时这也意味着我的流量在互联网上看起来仿佛来自我家的ip地址,所以这也算某种意义上保护了我的匿名性。如果你没有树莓派,或者不想从家里运行这个服务,那你完全可以把这个配置放在一台小型云服务器上(译者:比如 IPS )。你只要确保服务器运行着基于 Debian 的 Linux 发行版即可,这份指南依然可用。 + +![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11913f1.jpg) + +图 1 树莓派,即将成为我们的加密网络端点 + + +### 安装并配置 BIND +无论你是用树莓派还是一台服务器,当你成功启动之后你就可以安装 BIND 了,驱动了互联网相当一部分的域名服务软件。你将会把 BIND 仅仅作为缓存域名服务使用,而不用把它配置为用来处理来自互联网的域名请求。安装 BIND 会让你拥有一个可以被 OpenVPN 使用的 DNS 服务器。安装 BIND 十分简单,`apt-get` 就可以直接搞定: + +``` +root@test:~# apt-get install bind9 +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + bind9utils +Suggested packages: + bind9-doc resolvconf ufw +The following NEW packages will be installed: + bind9 bind9utils +0 upgraded, 2 newly installed, 0 to remove and + ↪0 not upgraded. +Need to get 490 kB of archives. +After this operation, 1,128 kB of additional disk + ↪space will be used. +Do you want to continue [Y/n]? y +``` + +在我们能把 BIND 当做缓存域名服务器之前,还有一些小细节需要配置。两个修改都在`/etc/bind/named.conf.options`里完成。首先你要反注释掉 forwarders 这一节内容,同时你还要增加一个可以转发域名请求的目标服务器。作为例子我会用 Google 的 DNS 服务器(8.8.8.8)(译者:国内的话需要找一个替代品);文件的 forwarders 节看上去大致是这样的: + + +``` +forwarders { + 8.8.8.8; +}; +``` + +第二点你需要做的更改是允许来自互联网和本地局域网的 query,直接把这一行加入配置文件的低端,最后一个`}`之前就可以了: + + +``` +allow-query { 192.168.1.0/24; 127.0.0.0/16; }; +``` + +上面那行配置会允许此 DNS 服务器接收来自网络和局域网的请求。下一步,你需要重启一下 BIND 的服务: + +``` +root@test:~# /etc/init.d/bind9 restart +[....] Stopping domain name service...: bind9waiting + ↪for pid 13209 to die +. ok +[ ok ] Starting domain name service...: bind9. +``` + +现在你可以测试一下 `nslookup` 来确保你的服务正常运行了: + + +``` +root@test:~# nslookup +> server localhost +Default server: localhost +Address: 127.0.0.1#53 +> www.google.com +Server: localhost +Address: 127.0.0.1#53 + +Non-authoritative answer: +Name: www.google.com +Address: 173.194.33.176 +Name: www.google.com +Address: 173.194.33.177 +Name: www.google.com +Address: 173.194.33.178 +Name: www.google.com +Address: 173.194.33.179 +Name: www.google.com +Address: 173.194.33.180 +``` + +完美!现在你的系统里已经有一个正常的域名服务在允许了,下一步我们来配置一下OpenVPN。 + + +### 安装并配置 OpenVPN + +OpenVPN 是一个运用 SSL/TLS 作为密钥交换的开源 VPN 解决方案。同时它也非常便于在 Linux 环境下部署。配置 OpenVPN 可能有一点艰巨,不过在此其实你也不需要在默认的配置文件里做太多修改。首先你会需要运行一下 `apt-get` 来安装 OpenVPN: + + +``` +root@test:~# apt-get install openvpn +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + liblzo2-2 libpkcs11-helper1 +Suggested packages: + resolvconf +The following NEW packages will be installed: + liblzo2-2 libpkcs11-helper1 openvpn +0 upgraded, 3 newly installed, 0 to remove and + ↪0 not upgraded. +Need to get 621 kB of archives. +After this operation, 1,489 kB of additional disk + ↪space will be used. +Do you want to continue [Y/n]? y +``` + +现在 OpenVPN 已经安装好了,你需要去配置它了。OpenVPN 是基于 SSL 的,并且它同时依赖于服务端和客户端两方的证书来工作。为了生成这些证书,你需要配置机器上的证书签发(CA)。幸运地,OpenVPN 在安装中自带了一些用于生成证书的脚本比如 “easy-rsa” 来帮助你加快这个过程。你将要创建一个文件目录用于放置 easy-rsa 脚本的模板: + + +``` +root@test:~# mkdir /etc/openvpn/easy-rsa +root@test:~# cp -rpv + ↪/usr/share/doc/openvpn/examples/easy-rsa/2.0/* + ↪/etc/openvpn/easy-rsa/ + ``` + +下一步,把 vars 文件复制一个备份: + + +``` +root@test:/etc/openvpn/easy-rsa# cp vars vars.bak +``` + +接下来,编辑一下 vars 以让其中的信息符合你的状态。我将以我需要编辑的信息作为例子: + + +``` +KEY_SIZE=4096 +KEY_COUNTRY="US" +KEY_PROVINCE="CA" +KEY_CITY="Silicon Valley" +KEY_ORG="Linux Journal" +KEY_EMAIL="bill.childers@linuxjournal.com" +``` + +下一步是 source 一下 vars ,这样系统就能把其中的信息当作环境变量处理了: + + +``` +root@test:/etc/openvpn/easy-rsa# source ./vars +NOTE: If you run ./clean-all, I will be doing a + ↪rm -rf on /etc/openvpn/easy-rsa/keys + ``` + +### 搭建CA(证书签发) + + +接下来你要允许一下 `clean-all` 来确保有一个清理干净的系统工作环境,紧接着你也就要做证书签发了。注意一下我修改了一些 changeme 的跳出的交互提示内容以符合我需要的安装情况: + + +``` +root@test:/etc/openvpn/easy-rsa# ./clean-all +root@test:/etc/openvpn/easy-rsa# ./build-ca +Generating a 4096 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) [Silicon Valley]: +Organization Name (eg, company) [Linux Journal]: +Organizational Unit Name (eg, section) + ↪[changeme]:SecTeam +Common Name (eg, your name or your server's hostname) + ↪[changeme]:test.linuxjournal.com +Name [changeme]:test.linuxjournal.com +Email Address [bill.childers@linuxjournal.com]: +``` + + +### 生成服务端证书 + +一旦CA创建好了,你接着就可以生成客户端的 OpenVPN 证书了: + + +``` +root@test:/etc/openvpn/easy-rsa# + ↪./build-key-server test.linuxjournal.com +Generating a 4096 bit RSA private key +...................................................++ +writing new private key to 'test.linuxjournal.com.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) [Silicon Valley]: +Organization Name (eg, company) [Linux Journal]: +Organizational Unit Name (eg, section) + ↪[changeme]:SecTeam +Common Name (eg, your name or your server's hostname) + ↪[test.linuxjournal.com]: +Name [changeme]:test.linuxjournal.com +Email Address [bill.childers@linuxjournal.com]: + +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/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:'Silicon Valley' +organizationName :PRINTABLE:'Linux Journal' +organizationalUnitName:PRINTABLE:'SecTeam' +commonName :PRINTABLE:'test.linuxjournal.com' +name :PRINTABLE:'test.linuxjournal.com' +emailAddress + ↪:IA5STRING:'bill.childers@linuxjournal.com' +Certificate is to be certified until Sep 1 + ↪06:23:59 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 +``` + +下一步需要用掉一些时间来生成 OpenVPN 服务器需要的 Diffie-Hellman 密钥。这个步骤在一般的桌面级 CPU 上会需要几分钟的时间,但在 ARM 构架的树莓派上,会用掉超级超级长的时间。耐心点,只要终端上的点还在跳,那么一切就在按部就班运行: + + +``` +root@test:/etc/openvpn/easy-rsa# ./build-dh +Generating DH parameters, 4096 bit long safe prime, + ↪generator 2 +This is going to take a long time +....................................................+ + +``` + +### 生成客户端证书 + +现在你要生成一下客户端用于登陆 OpenVPN 的密钥。通常来说 OpenVPN 都会被配置成使用证书验证的加密方式,在这个配置下客户端需要持有由服务端签发的一份证书: + +``` +root@test:/etc/openvpn/easy-rsa# ./build-key + ↪bills-computer +Generating a 4096 bit RSA private key +...................................................++ +...................................................++ +writing new private key to 'bills-computer.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) [Silicon Valley]: +Organization Name (eg, company) [Linux Journal]: +Organizational Unit Name (eg, section) + ↪[changeme]:SecTeam +Common Name (eg, your name or your server's hostname) + ↪[bills-computer]: +Name [changeme]:bills-computer +Email Address [bill.childers@linuxjournal.com]: + +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/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:'Silicon Valley' +organizationName :PRINTABLE:'Linux Journal' +organizationalUnitName:PRINTABLE:'SecTeam' +commonName :PRINTABLE:'bills-computer' +name :PRINTABLE:'bills-computer' +emailAddress + ↪:IA5STRING:'bill.childers@linuxjournal.com' +Certificate is to be certified until + ↪Sep 1 07:35:07 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 +root@test:/etc/openvpn/easy-rsa# +``` + +现在你需要再生成一个 HMAC 代码作为共享密钥来进一步增加整个加密提供的安全性: + + +``` +root@test:~# openvpn --genkey --secret + ↪/etc/openvpn/easy-rsa/keys/ta.key +``` + +### 配置服务器 + +最后,你来到了需要配置 OpenVPN 服务的时候了。你需要创建一个 `/etc/openvpn/server.conf` 文件;这个配置文件的大多数地方都可以套用模板解决。设置 OpenVPN 服务的主要修改在于让它只用 TCP 而不是 UDP 链接。这是下一步所必需的---如果不是 TCP 链接那么你的服务将不能通过 端口443 运作。创建 `/etc/openvpn/server.conf` 然后把下述配置丢进去: + + +``` +port 1194 +proto tcp +dev tun +ca easy-rsa/keys/ca.crt +cert easy-rsa/keys/test.linuxjournal.com.crt ## or whatever + ↪your hostname was +key easy-rsa/keys/test.linuxjournal.com.key ## Hostname key + ↪- This file should be kept secret +management localhost 7505 +dh easy-rsa/keys/dh4096.pem +tls-auth /etc/openvpn/certs/ta.key 0 +server 10.8.0.0 255.255.255.0 # The server will use this + ↪subnet for clients connecting to it +ifconfig-pool-persist ipp.txt +push "redirect-gateway def1 bypass-dhcp" # Forces clients + ↪to redirect all traffic through the VPN +push "dhcp-option DNS 192.168.1.1" # Tells the client to + ↪use the DNS server at 192.168.1.1 for DNS - + ↪replace with the IP address of the OpenVPN + ↪machine and clients will use the BIND + ↪server setup earlier +keepalive 30 240 +comp-lzo # Enable compression +persist-key +persist-tun +status openvpn-status.log +verb 3 +``` + +最后,你将需要在服务器上启用 IP 转发,配置 OpenVPN 为开机启动并立刻启动 OpenVPN 服务: + + +``` +root@test:/etc/openvpn/easy-rsa/keys# echo + ↪"net.ipv4.ip_forward = 1" >> /etc/sysctl.conf +root@test:/etc/openvpn/easy-rsa/keys# sysctl -p + ↪/etc/sysctl.conf +net.core.wmem_max = 12582912 +net.core.rmem_max = 12582912 +net.ipv4.tcp_rmem = 10240 87380 12582912 +net.ipv4.tcp_wmem = 10240 87380 12582912 +net.core.wmem_max = 12582912 +net.core.rmem_max = 12582912 +net.ipv4.tcp_rmem = 10240 87380 12582912 +net.ipv4.tcp_wmem = 10240 87380 12582912 +net.core.wmem_max = 12582912 +net.core.rmem_max = 12582912 +net.ipv4.tcp_rmem = 10240 87380 12582912 +net.ipv4.tcp_wmem = 10240 87380 12582912 +net.ipv4.ip_forward = 0 +net.ipv4.ip_forward = 1 + +root@test:/etc/openvpn/easy-rsa/keys# update-rc.d + ↪openvpn defaults +update-rc.d: using dependency based boot sequencing + +root@test:/etc/openvpn/easy-rsa/keys# + ↪/etc/init.d/openvpn start +[ ok ] Starting virtual private network daemon:. +``` + +### 配置 OpenVPN 客户端 + + +客户端的安装取决于客户端的操作系统,但你总会需要之前生成的证书和密钥,并导入你的 OpenVPN 客户端并新建一个配置文件。每种操作系统下的 OpenVPN 客户端在操作上会有些稍许不同,这也不在这篇文章的覆盖范围内,所以你最好去看看特定操作系统下的 OpenVPN 文档来获取更多信息。参考文档里的 Resources 章节。 + +### 安装 SSLH —— "魔法"多协议工具 + +本文章介绍的解决方案最有趣的部分就是运用 SSLH 了。SSLH 是一个多重协议工具——它可以监听443端口的流量,然后分析他们是以SSH,HTTPS 还是 OpenVPN 的通讯包,并把他们分别转发给正确的系统服务。这就是为何本解决方案可以让你绕过大多数端口封杀——你可以一直使用HTTPS通讯,介于它几乎从来不会被封杀。 + +同样,直接 `apt-get` 安装: + + +``` +root@test:/etc/openvpn/easy-rsa/keys# apt-get + ↪install sslh +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following extra packages will be installed: + apache2 apache2-mpm-worker apache2-utils + ↪apache2.2-bin apache2.2-common + libapr1 libaprutil1 libaprutil1-dbd-sqlite3 + ↪libaprutil1-ldap libconfig9 +Suggested packages: + apache2-doc apache2-suexec apache2-suexec-custom + ↪openbsd-inetd inet-superserver +The following NEW packages will be installed: + apache2 apache2-mpm-worker apache2-utils + ↪apache2.2-bin apache2.2-common + libapr1 libaprutil1 libaprutil1-dbd-sqlite3 + ↪libaprutil1-ldap libconfig9 sslh +0 upgraded, 11 newly installed, 0 to remove + ↪and 0 not upgraded. +Need to get 1,568 kB of archives. +After this operation, 5,822 kB of additional + ↪disk space will be used. +Do you want to continue [Y/n]? y +``` + +在 SSLH 被安装之后,包管理器会询问要在 inetd 还是 standalone 模式下允许。选择 standalone 模式,因为你希望 SSLH 在它自己的进程里运行。如果你没有安装 Apache,apt包管理器会自动帮你下载并安装的,尽管它也不是完全不可或缺。如果你已经有 Apache 了,那你需要确保它只监听 localhost 端口而不是所有的端口(不然的话 SSLH 会无法运行因为 443 端口已经被 Apache 监听占用)。安装后,你会看到一个如下所示的错误信息: + +``` +[....] Starting ssl/ssh multiplexer: sslhsslh disabled, + ↪please adjust the configuration to your needs +[FAIL] and then set RUN to 'yes' in /etc/default/sslh + ↪to enable it. ... failed! +failed! +``` + +这其实并不是错误信息,只是 SSLH 在提醒你它还未被配置所以无法启动,这很正常。配置 SSLH 相对来说比较简单。它的配置文件放置在 `/etc/default/sslh`,你只需要修改 `RUN` 和 `DAEMON_OPTS` 变量就可以了。我的 SSLH 配置文件如下所示: + +``` +# Default options for sslh initscript +# sourced by /etc/init.d/sslh + +# Disabled by default, to force yourself +# to read the configuration: +# - /usr/share/doc/sslh/README.Debian (quick start) +# - /usr/share/doc/sslh/README, at "Configuration" section +# - sslh(8) via "man sslh" for more configuration details. +# Once configuration ready, you *must* set RUN to yes here +# and try to start sslh (standalone mode only) + +RUN=yes + +# binary to use: forked (sslh) or single-thread + ↪(sslh-select) version +DAEMON=/usr/sbin/sslh + +DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh + ↪127.0.0.1:22 --ssl 127.0.0.1:443 --openvpn + ↪127.0.0.1:1194 --pidfile /var/run/sslh/sslh.pid" + ``` + +保存编辑并启动 SSLH: + +``` + root@test:/etc/openvpn/easy-rsa/keys# + ↪/etc/init.d/sslh start +[ ok ] Starting ssl/ssh multiplexer: sslh. +``` + +现在你应该可以从 443 端口 ssh 到你的树莓派了,它会正确地使用 SSLH 转发: + +``` +$ ssh -p 443 root@test.linuxjournal.com +root@test:~# +``` + +SSLH 现在开始监听端口443 并且可以转发流量信息到 SSH,Apache 或者 OpenVPN 取决于抵达流量包的类型。这套系统现已整装待发了! + +### 结论 + +现在你可以启动 OpenVPN 并且配置你的客户端连接到服务器的 443 端口了,然后 SSLH 会从那里把流量转发到服务器的 1194 端口。但介于你正在和服务器的 443 端口通信,你的 VPN 流量不会被封锁。现在你可以舒服地坐在陌生小镇的咖啡店里,畅通无阻地通过树莓派上的 OpenVPN 浏览互联网。你顺便还给你的链接增加了一些安全性,这个额外作用也会让你的链接更安全和私密一些。享受通过安全跳板浏览互联网把! + + +资源: + +安装与配置 OpenVPN: [https://wiki.debian.org/OpenVPN](https://wiki.debian.org/OpenVPN) and [http://cryptotap.com/articles/openvpn](http://cryptotap.com/articles/openvpn) + +OpenVPN 客户端下载: [https://openvpn.net/index.php/open-source/downloads.html](https://openvpn.net/index.php/open-source/downloads.html) + +OpenVPN Client for iOS: [https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8](https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8) + +OpenVPN Client for Android: [https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en](https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en) + +Tunnelblick for Mac OS X (OpenVPN client): [https://tunnelblick.net](https://tunnelblick.net) + +SSLH 介绍: [http://www.rutschle.net/tech/sslh.shtml](http://www.rutschle.net/tech/sslh.shtml) 和 [https://github.com/yrutschle/sslh](https://github.com/yrutschle/sslh) + + +---------- +via: http://www.linuxjournal.com/content/securi-pi-using-raspberry-pi-secure-landing-point?page=0,0 + +作者:[Bill Childers][a] +译者:[jerryling315](https://blog.moelf.xyz) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/bill-childers From cef5325d283bd1d07df0fb65ede1b3bf0ffd94b9 Mon Sep 17 00:00:00 2001 From: J L Date: Mon, 20 Jun 2016 16:30:24 +0800 Subject: [PATCH 1578/1710] Delete 20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md --- ... Raspberry Pi as a Secure Landing Point.md | 497 ------------------ 1 file changed, 497 deletions(-) delete mode 100644 sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md diff --git a/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md b/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md deleted file mode 100644 index 36c28d25d6..0000000000 --- a/sources/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md +++ /dev/null @@ -1,497 +0,0 @@ -Securi-Pi: Using the Raspberry Pi as a Secure Landing Point -================================================================================ - -Like many LJ readers these days, I've been leading a bit of a techno-nomadic lifestyle as of the past few years—jumping from network to network, access point to access point, as I bounce around the real world while maintaining my connection to the Internet and other networks I use on a daily basis. As of late, I've found that more and more networks are starting to block outbound ports like SMTP (port 25), SSH (port 22) and others. It becomes really frustrating when you drop into a local coffee house expecting to be able to fire up your SSH client and get a few things done, and you can't, because the network's blocking you. - -However, I have yet to run across a network that blocks HTTPS outbound (port 443). After a bit of fiddling with a Raspberry Pi 2 I have at home, I was able to get a nice clean solution that lets me hit various services on the Raspberry Pi via port 443—allowing me to walk around blocked ports and hobbled networks so I can do the things I need to do. In a nutshell, I have set up this Raspberry Pi to act as an OpenVPN endpoint, SSH endpoint and Apache server—with all these services listening on port 443 so networks with restrictive policies aren't an issue. - -### Notes -This solution will work on most networks, but firewalls that do deep packet inspection on outbound traffic still can block traffic that's tunneled using this method. However, I haven't been on a network that does that...yet. Also, while I use a lot of cryptography-based solutions here (OpenVPN, HTTPS, SSH), I haven't done a strict security audit of this setup. DNS may leak information, for example, and there may be other things I haven't thought of. I'm not recommending this as a way to hide all your traffic—I just use this so that I can connect to the Internet in an unfettered way when I'm out and about. - -### Getting Started -Let's start off with what you need to put this solution together. I'm using this on a Raspberry Pi 2 at home, running the latest Raspbian, but this should work just fine on a Raspberry Pi Model B, as well. It fits within the 512MB of RAM footprint quite easily, although performance may be a bit slower, because the Raspberry Pi Model B has a single-core CPU as opposed to the Pi 2's quad-core. My Raspberry Pi 2 is behind my home's router/firewall, so I get the added benefit of being able to access my machines at home. This also means that any traffic I send to the Internet appears to come from my home router's IP address, so this isn't a solution designed to protect anonymity. If you don't have a Raspberry Pi, or don't want this running out of your home, it's entirely possible to run this out of a small cloud server too. Just make sure that the server's running Debian or Ubuntu, as these instructions are targeted at Debian-based distributions. - -![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11913f1.jpg) - -Figure 1. The Raspberry Pi, about to become an encrypted network endpoint. - -### Installing and Configuring BIND -Once you have your platform up and running—whether it's a Raspberry Pi or otherwise—next you're going to install BIND, the nameserver that powers a lot of the Internet. You're going to install BIND as a caching nameserver only, and not have it service incoming requests from the Internet. Installing BIND will give you a DNS server to point your OpenVPN clients at, once you get to the OpenVPN step. Installing BIND is easy; it's just a simple `apt-get `command to install it: - -``` -root@test:~# apt-get install bind9 -Reading package lists... Done -Building dependency tree -Reading state information... Done -The following extra packages will be installed: - bind9utils -Suggested packages: - bind9-doc resolvconf ufw -The following NEW packages will be installed: - bind9 bind9utils -0 upgraded, 2 newly installed, 0 to remove and - ↪0 not upgraded. -Need to get 490 kB of archives. -After this operation, 1,128 kB of additional disk - ↪space will be used. -Do you want to continue [Y/n]? y -``` - -There are a couple minor configuration changes that need to be made to one of the config files of BIND before it can operate as a caching nameserver. Both changes are in `/etc/bind/named.conf.options`. First, you're going to uncomment the "forwarders" section of this file, and you're going to add a nameserver on the Internet to which to forward requests. In this case, I'm going to add Google's DNS (8.8.8.8). The "forwarders" section of the file should look like this: - -``` -forwarders { - 8.8.8.8; -}; -``` - -The second change you're going to make allows queries from your internal network and localhost. Simply add this line to the bottom of the configuration file, right before the `}`; that ends the file: - -``` -allow-query { 192.168.1.0/24; 127.0.0.0/16; }; -``` - -That line above allows this DNS server to be queried from the network it's on (in this case, my network behind my firewall) and localhost. Next, you just need to restart BIND: - -``` -root@test:~# /etc/init.d/bind9 restart -[....] Stopping domain name service...: bind9waiting - ↪for pid 13209 to die -. ok -[ ok ] Starting domain name service...: bind9. -``` - -Now you can test `nslookup` to make sure your server works: - -``` -root@test:~# nslookup -> server localhost -Default server: localhost -Address: 127.0.0.1#53 -> www.google.com -Server: localhost -Address: 127.0.0.1#53 - -Non-authoritative answer: -Name: www.google.com -Address: 173.194.33.176 -Name: www.google.com -Address: 173.194.33.177 -Name: www.google.com -Address: 173.194.33.178 -Name: www.google.com -Address: 173.194.33.179 -Name: www.google.com -Address: 173.194.33.180 -``` - -That's it! You've got a working nameserver on this machine. Next, let's move on to OpenVPN. - -### Installing and Configuring OpenVPN - -OpenVPN is an open-source VPN solution that relies on SSL/TLS for its key exchange. It's also easy to install and get working under Linux. Configuration of OpenVPN can be a bit daunting, but you're not going to deviate from the default configuration by much. To start, you're going to run an apt-get command and install OpenVPN: - -``` -root@test:~# apt-get install openvpn -Reading package lists... Done -Building dependency tree -Reading state information... Done -The following extra packages will be installed: - liblzo2-2 libpkcs11-helper1 -Suggested packages: - resolvconf -The following NEW packages will be installed: - liblzo2-2 libpkcs11-helper1 openvpn -0 upgraded, 3 newly installed, 0 to remove and - ↪0 not upgraded. -Need to get 621 kB of archives. -After this operation, 1,489 kB of additional disk - ↪space will be used. -Do you want to continue [Y/n]? y -``` - -Now that OpenVPN is installed, you're going to configure it. OpenVPN is SSL-based, and it relies on both server and client certificates to work. To generate these certificates, you need to configure a Certificate Authority (CA) on the machine. Luckily, OpenVPN ships with some wrapper scripts known as "easy-rsa" that help to bootstrap this process. You'll start by making a directory on the filesystem for the easy-rsa scripts to reside in and by copying the scripts from the template directory there: - -``` -root@test:~# mkdir /etc/openvpn/easy-rsa -root@test:~# cp -rpv - ↪/usr/share/doc/openvpn/examples/easy-rsa/2.0/* - ↪/etc/openvpn/easy-rsa/ - ``` - -Next, copy the vars file to a backup copy: - -``` -root@test:/etc/openvpn/easy-rsa# cp vars vars.bak -``` - -Now, edit vars so it's got information pertinent to your installation. I'm going specify only the lines that need to be edited, with sample data, below: - -``` -KEY_SIZE=4096 -KEY_COUNTRY="US" -KEY_PROVINCE="CA" -KEY_CITY="Silicon Valley" -KEY_ORG="Linux Journal" -KEY_EMAIL="bill.childers@linuxjournal.com" -``` - -The next step is to source the vars file, so that the environment variables in the file are in your current environment: - -``` -root@test:/etc/openvpn/easy-rsa# source ./vars -NOTE: If you run ./clean-all, I will be doing a - ↪rm -rf on /etc/openvpn/easy-rsa/keys - ``` - -### Building the Certificate Authority - -You're now going to run clean-all to ensure a clean working environment, and then you're going to build the CA. Note that I'm changing changeme prompts to something that's appropriate for this installation: - -``` -root@test:/etc/openvpn/easy-rsa# ./clean-all -root@test:/etc/openvpn/easy-rsa# ./build-ca -Generating a 4096 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) [Silicon Valley]: -Organization Name (eg, company) [Linux Journal]: -Organizational Unit Name (eg, section) - ↪[changeme]:SecTeam -Common Name (eg, your name or your server's hostname) - ↪[changeme]:test.linuxjournal.com -Name [changeme]:test.linuxjournal.com -Email Address [bill.childers@linuxjournal.com]: -``` - -### Building the Server Certificate - -Once the CA is created, you need to build the OpenVPN server certificate: - -```root@test:/etc/openvpn/easy-rsa# - ↪./build-key-server test.linuxjournal.com -Generating a 4096 bit RSA private key -...................................................++ -writing new private key to 'test.linuxjournal.com.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) [Silicon Valley]: -Organization Name (eg, company) [Linux Journal]: -Organizational Unit Name (eg, section) - ↪[changeme]:SecTeam -Common Name (eg, your name or your server's hostname) - ↪[test.linuxjournal.com]: -Name [changeme]:test.linuxjournal.com -Email Address [bill.childers@linuxjournal.com]: - -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/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:'Silicon Valley' -organizationName :PRINTABLE:'Linux Journal' -organizationalUnitName:PRINTABLE:'SecTeam' -commonName :PRINTABLE:'test.linuxjournal.com' -name :PRINTABLE:'test.linuxjournal.com' -emailAddress - ↪:IA5STRING:'bill.childers@linuxjournal.com' -Certificate is to be certified until Sep 1 - ↪06:23:59 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 -``` - -The next step may take a while—building the Diffie-Hellman key for the OpenVPN server. This takes several minutes on a conventional desktop-grade CPU, but on the ARM processor of the Raspberry Pi, it can take much, much longer. Have patience, as long as the dots in the terminal are proceeding, the system is building its Diffie-Hellman key (note that many dots are snipped in these examples): - -``` -root@test:/etc/openvpn/easy-rsa# ./build-dh -Generating DH parameters, 4096 bit long safe prime, - ↪generator 2 -This is going to take a long time -....................................................+ - -``` - -### Building the Client Certificate - -Now you're going to generate a client key for your client to use when logging in to the OpenVPN server. OpenVPN is typically configured for certificate-based auth, where the client presents a certificate that was issued by an approved Certificate Authority: - -``` -root@test:/etc/openvpn/easy-rsa# ./build-key - ↪bills-computer -Generating a 4096 bit RSA private key -...................................................++ -...................................................++ -writing new private key to 'bills-computer.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) [Silicon Valley]: -Organization Name (eg, company) [Linux Journal]: -Organizational Unit Name (eg, section) - ↪[changeme]:SecTeam -Common Name (eg, your name or your server's hostname) - ↪[bills-computer]: -Name [changeme]:bills-computer -Email Address [bill.childers@linuxjournal.com]: - -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/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:'Silicon Valley' -organizationName :PRINTABLE:'Linux Journal' -organizationalUnitName:PRINTABLE:'SecTeam' -commonName :PRINTABLE:'bills-computer' -name :PRINTABLE:'bills-computer' -emailAddress - ↪:IA5STRING:'bill.childers@linuxjournal.com' -Certificate is to be certified until - ↪Sep 1 07:35:07 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 -root@test:/etc/openvpn/easy-rsa# -``` - -Now you're going to generate an HMAC code as a shared key to increase the security of the system further: - -``` -root@test:~# openvpn --genkey --secret - ↪/etc/openvpn/easy-rsa/keys/ta.key -``` - -### Configuration of the Server - -Finally, you're going to get to the meat of configuring the OpenVPN server. You're going to create a new file, /etc/openvpn/server.conf, and you're going to stick to a default configuration for the most part. The main change you're going to do is to set up OpenVPN to use TCP rather than UDP. This is needed for the next major step to work—without OpenVPN using TCP for its network communication, you can't get things working on port 443. So, create a new file called /etc/openvpn/server.conf, and put the following configuration in it: Garrick, shrink below. - -``` -port 1194 -proto tcp -dev tun -ca easy-rsa/keys/ca.crt -cert easy-rsa/keys/test.linuxjournal.com.crt ## or whatever - ↪your hostname was -key easy-rsa/keys/test.linuxjournal.com.key ## Hostname key - ↪- This file should be kept secret -management localhost 7505 -dh easy-rsa/keys/dh4096.pem -tls-auth /etc/openvpn/certs/ta.key 0 -server 10.8.0.0 255.255.255.0 # The server will use this - ↪subnet for clients connecting to it -ifconfig-pool-persist ipp.txt -push "redirect-gateway def1 bypass-dhcp" # Forces clients - ↪to redirect all traffic through the VPN -push "dhcp-option DNS 192.168.1.1" # Tells the client to - ↪use the DNS server at 192.168.1.1 for DNS - - ↪replace with the IP address of the OpenVPN - ↪machine and clients will use the BIND - ↪server setup earlier -keepalive 30 240 -comp-lzo # Enable compression -persist-key -persist-tun -status openvpn-status.log -verb 3 -``` - -And last, you're going to enable IP forwarding on the server, configure OpenVPN to start on boot and start the OpenVPN service: - -``` -root@test:/etc/openvpn/easy-rsa/keys# echo - ↪"net.ipv4.ip_forward = 1" >> /etc/sysctl.conf -root@test:/etc/openvpn/easy-rsa/keys# sysctl -p - ↪/etc/sysctl.conf -net.core.wmem_max = 12582912 -net.core.rmem_max = 12582912 -net.ipv4.tcp_rmem = 10240 87380 12582912 -net.ipv4.tcp_wmem = 10240 87380 12582912 -net.core.wmem_max = 12582912 -net.core.rmem_max = 12582912 -net.ipv4.tcp_rmem = 10240 87380 12582912 -net.ipv4.tcp_wmem = 10240 87380 12582912 -net.core.wmem_max = 12582912 -net.core.rmem_max = 12582912 -net.ipv4.tcp_rmem = 10240 87380 12582912 -net.ipv4.tcp_wmem = 10240 87380 12582912 -net.ipv4.ip_forward = 0 -net.ipv4.ip_forward = 1 - -root@test:/etc/openvpn/easy-rsa/keys# update-rc.d - ↪openvpn defaults -update-rc.d: using dependency based boot sequencing - -root@test:/etc/openvpn/easy-rsa/keys# - ↪/etc/init.d/openvpn start -[ ok ] Starting virtual private network daemon:. -``` - -### Setting Up OpenVPN Clients - -Your client installation depends on the host OS of your client, but you'll need to copy your client certs and keys created above to your client, and you'll need to import those certificates and create a configuration for that client. Each client and client OS does it slightly differently and documenting each one is beyond the scope of this article, so you'll need to refer to the documentation for that client to get it running. Refer to the Resources section for OpenVPN clients for each major OS. - -### Installing SSLH—the "Magic" Protocol Multiplexer - -The really interesting piece of this solution is SSLH. SSLH is a protocol multiplexer—it listens on port 443 for traffic, and then it can analyze whether the incoming packet is an SSH packet, HTTPS or OpenVPN, and it can forward that packet onto the proper service. This is what enables this solution to bypass most port blocks—you use the HTTPS port for all of this traffic, since HTTPS is rarely blocked. - -To start, `apt-get` install SSLH: - -``` -root@test:/etc/openvpn/easy-rsa/keys# apt-get - ↪install sslh -Reading package lists... Done -Building dependency tree -Reading state information... Done -The following extra packages will be installed: - apache2 apache2-mpm-worker apache2-utils - ↪apache2.2-bin apache2.2-common - libapr1 libaprutil1 libaprutil1-dbd-sqlite3 - ↪libaprutil1-ldap libconfig9 -Suggested packages: - apache2-doc apache2-suexec apache2-suexec-custom - ↪openbsd-inetd inet-superserver -The following NEW packages will be installed: - apache2 apache2-mpm-worker apache2-utils - ↪apache2.2-bin apache2.2-common - libapr1 libaprutil1 libaprutil1-dbd-sqlite3 - ↪libaprutil1-ldap libconfig9 sslh -0 upgraded, 11 newly installed, 0 to remove - ↪and 0 not upgraded. -Need to get 1,568 kB of archives. -After this operation, 5,822 kB of additional - ↪disk space will be used. -Do you want to continue [Y/n]? y -``` - -After SSLH is installed, the package installer will ask you if you want to run it in inetd or standalone mode. Select standalone mode, because you want SSLH to run as its own process. If you don't have Apache installed, the Debian/Raspbian package of SSLH will pull it in automatically, although it's not strictly required. If you already have Apache running and configured, you'll want to make sure it only listens on localhost's interface and not all interfaces (otherwise, SSLH can't start because it can't bind to port 443). After installation, you'll receive an error that looks like this: - -``` -[....] Starting ssl/ssh multiplexer: sslhsslh disabled, - ↪please adjust the configuration to your needs -[FAIL] and then set RUN to 'yes' in /etc/default/sslh - ↪to enable it. ... failed! -failed! -``` - -This isn't an error, exactly—it's just SSLH telling you that it's not configured and can't start. Configuring SSLH is pretty simple. Its configuration is stored in `/etc/default/sslh`, and you just need to configure the `RUN` and `DAEMON_OPTS` variables. My SSLH configuration looks like this: - -``` -# Default options for sslh initscript -# sourced by /etc/init.d/sslh - -# Disabled by default, to force yourself -# to read the configuration: -# - /usr/share/doc/sslh/README.Debian (quick start) -# - /usr/share/doc/sslh/README, at "Configuration" section -# - sslh(8) via "man sslh" for more configuration details. -# Once configuration ready, you *must* set RUN to yes here -# and try to start sslh (standalone mode only) - -RUN=yes - -# binary to use: forked (sslh) or single-thread - ↪(sslh-select) version -DAEMON=/usr/sbin/sslh - -DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh - ↪127.0.0.1:22 --ssl 127.0.0.1:443 --openvpn - ↪127.0.0.1:1194 --pidfile /var/run/sslh/sslh.pid" - ``` - - Save the file and start SSLH: - -``` - root@test:/etc/openvpn/easy-rsa/keys# - ↪/etc/init.d/sslh start -[ ok ] Starting ssl/ssh multiplexer: sslh. -``` - -Now, you should be able to ssh to port 443 on your Raspberry Pi, and have it forward via SSLH: - -``` -$ ssh -p 443 root@test.linuxjournal.com -root@test:~# -``` - -SSLH is now listening on port 443 and can direct traffic to SSH, Apache or OpenVPN based on the type of packet that hits it. You should be ready to go! - -### Conclusion - -Now you can fire up OpenVPN and set your OpenVPN client configuration to port 443, and SSLH will route it to the OpenVPN server on port 1194. But because you're talking to your server on port 443, your VPN traffic won't get blocked. Now you can land at a strange coffee shop, in a strange town, and know that your Internet will just work when you fire up your OpenVPN and point it at your Raspberry Pi. You'll also gain some encryption on your link, which will improve the privacy of your connection. Enjoy surfing the Net via your new landing point! - -Resources - -Installing and Configuring OpenVPN: [https://wiki.debian.org/OpenVPN](https://wiki.debian.org/OpenVPN) and [http://cryptotap.com/articles/openvpn](http://cryptotap.com/articles/openvpn) - -OpenVPN client downloads: [https://openvpn.net/index.php/open-source/downloads.html](https://openvpn.net/index.php/open-source/downloads.html) - -OpenVPN Client for iOS: [https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8](https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8) - -OpenVPN Client for Android: [https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en](https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en) - -Tunnelblick for Mac OS X (OpenVPN client): [https://tunnelblick.net](https://tunnelblick.net) - -SSLH—Protocol Multiplexer: [http://www.rutschle.net/tech/sslh.shtml](http://www.rutschle.net/tech/sslh.shtml) and [https://github.com/yrutschle/sslh](https://github.com/yrutschle/sslh) - - ----------- -via: http://www.linuxjournal.com/content/securi-pi-using-raspberry-pi-secure-landing-point?page=0,0 - -作者:[Bill Childers][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/users/bill-childers - - From 6039c536d236e5271c420b7dd8f12ff2957935c0 Mon Sep 17 00:00:00 2001 From: Rubik Date: Tue, 21 Jun 2016 21:52:32 +0800 Subject: [PATCH 1579/1710] [Translating by HaohongWANG] --- sources/tech/20160616 6 Amazing Linux Distributions For Kids.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md b/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md index 5d0053e2ce..4d6ecdfd8f 100644 --- a/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md +++ b/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md @@ -1,3 +1,4 @@ +[HaohongWANG Translating] 6 Amazing Linux Distributions For Kids ====================================== From 81ee8887f1a3df866524897a3b918212d40bfb11 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 22 Jun 2016 08:56:40 +0800 Subject: [PATCH 1580/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 超期回收 @cposture --- ...cryption.md => 20160518 Python 3 - An Intro to Encryption.md} | 1 - 1 file changed, 1 deletion(-) rename sources/tech/{20160518 Python 3: An Intro to Encryption.md => 20160518 Python 3 - An Intro to Encryption.md} (99%) diff --git a/sources/tech/20160518 Python 3: An Intro to Encryption.md b/sources/tech/20160518 Python 3 - An Intro to Encryption.md similarity index 99% rename from sources/tech/20160518 Python 3: An Intro to Encryption.md rename to sources/tech/20160518 Python 3 - An Intro to Encryption.md index f80702a771..43c042d5c1 100644 --- a/sources/tech/20160518 Python 3: An Intro to Encryption.md +++ b/sources/tech/20160518 Python 3 - An Intro to Encryption.md @@ -1,4 +1,3 @@ -[Translating by cposture] Python 3: An Intro to Encryption =================================== From fdef562b72fc1af5bb2df00908a86e38c0ebc3cc Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 22 Jun 2016 09:37:00 +0800 Subject: [PATCH 1581/1710] =?UTF-8?q?20160622-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ndroid 4.4 port with Big Endian support.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md diff --git a/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md b/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md new file mode 100644 index 0000000000..c803d30e6c --- /dev/null +++ b/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md @@ -0,0 +1,108 @@ +PowerPC gains an Android 4.4 port with Big Endian support +=========================================================== + +eInfochips has ported Android 4.4 to the PowerPC architecture on behalf of an avionics customer that will use it for an HMI that monitors engine health. + +eInfochips has developed the first Android port to the PowerPC CPU architecture using a modern Android build and featuring Big Endian support. The port is based on Android Open Source Project (AOSP) code for Android 4.4 (KitKat) and features Kernel 3.12.19. + +Android emerged around the same time that PowerPC was already in decline and quickly losing market share to ARM. Customers with high-end networking and other enterprise-oriented embedded gear running on PowerPC processors such as Freescale’s PowerQUICC and QorIQ, instead depended on Linux. Several Android ports have been attempted, however. In 2009, Freescale and Embedded Alley — now part of the Linux team at Mentor Graphics — [announced a port][15] for PowerQUICC and QorIQ chips, which are now built by NXP. Another project claiming the same feat emerged called [Android-PowerPC][16]. + +Not much came of these efforts, however, and when an avionics firm asked eInfochips to look into an Android application for adding an improved HMI to its PowerPC-based engine monitoring system, the company found that these earlier ports were not up to par. They would have to start from scratch. + +The main problem with the previous ports was that they were for a much older, and very different, Android. Embedded Alley’s port was for Android 1.5 (Cupcake), released in 2009 and based on a Linux 2.6.28 kernel, and the last port from the Android-PowerPC project appears to be for Android 2.2 (Froyo), which was released in 2010 and based on Linux 2.6.32. The avionics customer also needed other technologies such as support for Big Endian, a legacy memory access scheme still used in the networking and telecom world. The other ports supported only Little Endian memory access. + + +### New PowerPC port from eInfochips + +eInfochips, which is known around here mostly for its ARM/Snapdragon-based boards such as the [Eragon 600][17] computer-on-module, has now completed the Android 4.4 QorIQ port and has posted a white paper describing the project. The avionics customer using the technology remains unnamed, however, and it’s unclear to what extent the port will be publicly shared. + + +![](http://hackerboards.com/files/einfochips_porting_android_on_powerpc-sm.jpg) +>Image from eInfochips blog post + +- The new PowerPC Android project includes: +- Bionic customization for PowerPC [e5500][1] +- Big Endian support in Android KitKat +- Tool chain development with GCC version 5.2 +- PowerPC support in Android 4.4 framework +- Android Kernel 3.12.19 for PowerPC e5500 + +According to eInfochips marketing manager, Sooryanarayanan Balasubramanian, the avionics customer wanted Android primarily for its familiar interface, which reduces training time, as well as the ease in updating the system with new applications. “By successful Android porting they can allow more modifications at the application layer without undergoing the tedious certification process at all layers,” explained Balasubramanian. “This was the first time any such attempt has been made in the aerospace industry, which requires due diligence in designs.” + +Porting Android to PowerPC required major modifications to the framework, core libraries, toolchain development, run-time linker, object linker, and open source compiler support, according to the white paper. When generating byte code, the porting team decided to use portable mode rather than fast interpreter mode. There is no fast interpreter available for Android on PowerPC, whereas portable mode uses the open source [libffi][18] for interpretation, which does support PowerPC. + +The team also needed to choose between Android Run Time (ART) and Dalvik Virtual Machine (DVM). They found that portable mode for ART was untested and poorly documented, so they went with DVM in portable mode. + +The white paper goes on to explain other challenges in the port, including developing a toolchain from scratch and rewriting scripts to overcome the problem of AOSP’s “non-standard” use of compiler flags. The finished port offers 37 services, and features a headless Android deployment along with an emulated UI in user space. + + +### Target hardware + +Thanks to an image (shown farther above) in an [eInfochips blog post][2] about the company’s Android PowerPC port, we were able to identify the project’s target hardware. The board turns out to be the [X-ES Xpedite 6101][3], which is a rugged XMC/PrPMC mezzanine module. + +Thanks to an image (shown farther above) in an eInfochips blog post about the company’s Android PowerPC port, we were able to identify the project’s target hardware. The board turns out to be the X-ES Xpedite 6101, which is a rugged XMC/PrPMC mezzanine module. + +![](http://hackerboards.com/files/xes_xpedite6101-sm.jpg) +>X-ES Xpedite 6101 photo and block diagram + +The X-ES Xpedite 6101 ships with a choice of NXP QorIQ-based T Series communications processors — the T2081, T1042, and T1022 — which integrate 8, 4, and 2 e6500 cores, respectively, running at up to 1.8GHz (T2081) or 1.4GHz (T1042/22). Each core integrates an AltiVec SIMD engine, said to offer DSP-level floating point performance. All three X-ES board models support up to 8GB of DDR3-1600 ECC SDRAM memory, plus up to 512MB of NOR and 32GB of NAND flash storage. + +![](http://hackerboards.com/files/nxp_qoriq_t2081_block-sm.jpg) +>NXP T2081 block diagram + +The board’s I/O includes a x4 PCI Express Gen2 channel, along with dual helpings of Gigabit Ethernet, RS232/422/485 serial, and SATA 3.0 ports. In addition to its choice of three QorIQ processors, the Xpedite 6101 is offered with support for three [X-ES ruggedization levels][19], rated for operation over 0 to 55°C, -40 to 70°C, or -40 to 85°C respectively, along with three categories of shock and vibration resistance. + +Other X-ES QorIQ-based XMC/PrPMC boards we’ve covered include the [XPedite6401 and XPedite6370][20], which are supported with off-the-shelf BSPs for Linux, Wind River VxWorks, and Green Hills Integrity. + + +### Further information + +The eInfochips Android PowerPC porting whitepaper is available for download [here][4] (requires free registration). + +### Related posts: + +- [Commercial embedded Linux distro boosts virtualization][5] +- [Freescale unveils first ARM-based QorIQ SoCs][6] +- [High-end boards run Linux on 64-bit ARM QorIQ SoCs][7] +- [Free, Open Enea Linux taps Yocto Project and Linaro code][8] +- [LynuxWorks reverts to its LynxOS roots, changes name][9] +- [First quad- and octa-core QorIQ SoCs unveiled][10] +- [Free white paper shows how Linux won embedded][11] +- [Quad-core Snapdragon COM offers three dev kit options][12] +- [Tiny COM runs Linux on quad-core 64-bit Snapdragon 410][13] +- [PowerPC based IoT gateway COM ships with Linux BSP][14] + + +-------------------------------------------------------------------------------- + +via: http://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ + +作者:[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://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ +[1]: http://linuxdevices.linuxgizmos.com/low-cost-powerquicc-chips-offer-flexible-interconnect-options/ +[2]: https://www.einfochips.com/blog/k2-categories/aerospace/presenting-a-case-for-porting-android-on-powerpc-architecture.html +[3]: http://www.xes-inc.com/products/processor-mezzanines/xpedite6101/ +[4]: http://biz.einfochips.com/portingandroidonpowerpc +[5]: http://hackerboards.com/commercial-embedded-linux-distro-boosts-virtualization/ +[6]: http://hackerboards.com/freescale-unveils-first-arm-based-qoriq-socs/ +[7]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ +[8]: http://hackerboards.com/free-open-enea-linux-taps-yocto-and-linaro-code/ +[9]: http://hackerboards.com/lynuxworks-reverts-to-its-lynxos-roots-changes-name/ +[10]: http://hackerboards.com/first-quad-and-octa-core-qoriq-socs-unveiled/ +[11]: http://hackerboards.com/free-white-paper-shows-how-linux-won-embedded/ +[12]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ +[13]: http://hackerboards.com/tiny-com-runs-linux-and-android-on-quad-core-64-bit-snapdragon-410/ +[14]: http://hackerboards.com/powerpc-based-iot-gateway-com-ships-with-linux-bsp/ +[15]: http://linuxdevices.linuxgizmos.com/android-ported-to-powerpc/ +[16]: http://www.androidppc.com/ +[17]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ +[18]: https://sourceware.org/libffi/ +[19]: http://www.xes-inc.com/capabilities/ruggedization/ +[20]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ + + From 9d40f603877a387cb7249a18940323002466a0b0 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 22 Jun 2016 09:52:26 +0800 Subject: [PATCH 1582/1710] =?UTF-8?q?20160622-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nux Networking Commands You Should Know.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 sources/tech/20160621 Basic Linux Networking Commands You Should Know.md diff --git a/sources/tech/20160621 Basic Linux Networking Commands You Should Know.md b/sources/tech/20160621 Basic Linux Networking Commands You Should Know.md new file mode 100644 index 0000000000..56ecdb9664 --- /dev/null +++ b/sources/tech/20160621 Basic Linux Networking Commands You Should Know.md @@ -0,0 +1,145 @@ +Basic Linux Networking Commands You Should Know +================================================== + +![](https://itsfoss.com/wp-content/uploads/2016/06/Basic-Networking-Commands-Linux.jpg) + +Brief: A collection of most important and yet basic Linux networking commands an aspiring Linux SysAdmin and Linux enthusiasts must know. + +It’s not every day at It’s FOSS that we talk about the “command line side” of Linux. Basically, I focus more on the desktop side of Linux. But as some of you readers pointed out in the internal survey (exclusive for It’s FOSS newsletter subscribers), that you would like to learn some command line tricks as well. Cheat sheets were also liked and encouraged by most readers. + +For this purpose, I have compiled a list of the basic networking commands in Linux. It’s not a tutorial that teaches you how to use these commands, rather, it’s a collection of commands and their short explanation. So if you already have some experience with these commands, you can use it for quickly remembering the commands. + +You can bookmark this page for quick reference or even download all the commands in PDF for offline access. + +I had this list of Linux networking commands when I was a student of Communication System Engineering. It helped me to get the top score in Computer Networks course. I hope it helps you in the same way. + +>Exclusive bonus: [Download Linux Networking Commands Cheat Sheet][1] for future reference. You can print it or save it for offline viewing. + +### List of basic networking commands in Linux + +I used FreeBSD in the computer networking course but the UNIX commands should work the same in Linux also. + +#### Connectivity: + +- ping —- sends an ICMP echo message (one packet) to a host. This may go continually until you hit Control-C. Ping means a packet was sent from your machine via ICMP, and echoed at the IP level. ping tells you if the other Host is Up. + +- telnet host —- talk to “hosts” at the given port number. By default, the telnet port is port 23. Few other famous ports are: +``` + 7 – echo port, + 25 – SMTP, use to send mail + 79 – Finger, provides information on other users of the network +``` + +Use control-] to get out of telnet. + +#### Arp: + +Arp is used to translate IP addresses into Ethernet addresses. Root can add and delete arp entries. Deleting them can be useful if an arp entry is malformed or just wrong. Arp entries explicitly added by root are permanent — they can also be by proxy. The arp table is stored in the kernel and manipulated dynamically. Arp entries are cached and will time out and are deleted normally in 20 minutes. + +- arp –a : Prints the arp table +- arp –s [pub] to add an entry in the table +- arp –a –d to delete all the entries in the ARP table + +#### Routing: + +- netstat –r —- Print routing tables. The routing tables are stored in the kernel and used by ip to route packets to non-local networks. +- route add —- The route command is used for setting a static (non-dynamic by hand route) route path in the route tables. All the traffic from this PC to that IP/SubNet will go through the given Gateway IP. It can also be used for setting a default route; i.e., send all packets to a particular gateway, by using 0.0.0.0 in the pace of IP/SubNet. +- routed —– The BSD daemon that does dynamic routing. Started at boot. This runs the RIP routing protocol. ROOT ONLY. You won’t be able to run this without root access. +- gated —– Gated is an alternative routing daemon to RIP. It uses the OSPF, EGP, and RIP protocols in one place. ROOT ONLY. +- traceroute —- Useful for tracing the route of IP packets. The packet causes messages to be sent back from all gateways in between the source and destination by increasing the number of hopes by 1 each time. +- netstat –rnf inet : it displays the routing tables of IPv4 +- sysctl net.inet.ip.forwarding=1 : to enable packets forwarding (to turn a host into a router) +- route add|delete [-net|-host] (ex. route add 192.168.20.0/24 192.168.30.4) to add a route +- route flush : it removes all the routes +- route add -net 0.0.0.0 192.168.10.2 : to add a default route +- routed -Pripv2 –Pno_rdisc –d [-s|-q] to execute routed daemon with RIPv2 protocol, without ICMP auto-discovery, in foreground, in supply or in quiet mode +- route add 224.0.0.0/4 127.0.0.1 : it defines the route used from RIPv2 +- rtquery –n : to query the RIP daemon on a specific host (manually update the routing table) + +#### Others: + +- nslookup —- Makes queries to the DNS server to translate IP to a name, or vice versa. eg. nslookup facebook.com will gives you the IP of facebook.com +- ftp water —– Transfer files to host. Often can use login=“anonymous” , p/w=“guest” +- rlogin -l —– Logs into the host with a virtual terminal like telnet + +#### Important Files: + +``` +/etc/hosts —- names to ip addresses +/etc/networks —- network names to ip addresses +/etc/protocols —– protocol names to protocol numbers +/etc/services —- tcp/udp service names to port numbers +``` + +#### Tools and network performance analysis + +- ifconfig
[up] : start the interface +- ifconfig [down|delete] : stop the interface +- ethereal & : it allows you open ethereal background not foreground +- tcpdump –i -vvv : tool to capture and analyze packets +- netstat –w [seconds] –I [interface] : display network settings and statistics +- udpmt –p [port] –s [bytes] target_host : it creates UDP traffic +- udptarget –p [port] : it’s able to receive UDP traffic +- tcpmt –p [port] –s [bytes] target_host : it creates TCP traffic +- tcptarget –p [port] it’s able to receive TCP traffic +- ifconfig netmask [up] : it allows to subnet the sub-networks + + + +#### Switching: + +- ifconfig sl0 srcIP dstIP : configure a serial interface (do “slattach –l /dev/ttyd0” before, and “sysctl net.inet.ip.forwarding=1“ after) +- telnet 192.168.0.254 : to access the switch from a host in its subnetwork +- sh ru or show running-configuration : to see the current configurations +- configure terminal : to enter in configuration mode +- exit : in order to go to the lower configuration mode + +#### VLAN: + +- vlan n : it creates a VLAN with ID n +- no vlan N : it deletes the VLAN with ID N +- untagged Y : it adds the port Y to the VLAN N +- ifconfig vlan0 create : it creates vlan0 interface +- ifconfig vlan0 vlan ID vlandev em0 : it associates vlan0 interface on top of em0, and set the tags to ID +- ifconfig vlan0 [up] : to turn on the virtual interface +- tagged Y : it adds to the port Y the support of tagged frames for the current VLAN + +#### UDP/TCP + +- socklab udp – it executes socklab with udp protocol +- sock – it creates a udp socket, it’s equivalent to type sock udp and bind +- sendto – emission of data packets +- recvfrom – it receives data from socket +- socklab tcp – it executes socklab with tcp protocol +- passive – it creates a socket in passive mode, it’s equivalent to socklab, sock tcp, bind, listen +- accept – it accepts an incoming connection (it can be done before or after creating the incoming connection) +- connect – these two commands are equivalent to socklab, sock tcp, bind, connect +- close – it closes the connection +- read – to read bytes on the socket +- write (ex. write ciao, ex. write #10) to write “ciao” or to write 10 bytes on the socket + +#### NAT/Firewall + +- rm /etc/resolv.conf – it prevent address resolution and make sure your filtering and firewall rules works properly +- ipnat –f file_name – it writes filtering rules into file_name +- ipnat –l – it gives the list of active rules +- ipnat –C –F – it re-initialize the rules table +- map em0 192.168.1.0/24 -> 195.221.227.57/32 em0 : mapping IP addresses to the interface +- map em0 192.168.1.0/24 -> 195.221.227.57/32 portmap tcp/udp 20000:50000 : mapping with port +- ipf –f file_name : it writes filtering rules into file_name +- ipf –F –a : it resets the rule table +- ipfstat –I : it grants access to a few information on filtered packets, as well as active filtering rules + + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/basic-linux-networking-commands/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Abhishek Prakash][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[1]: https://drive.google.com/open?id=0By49_3Av9sT1cDdaZnh4cHB4aEk From 2ebc5a38e9201294ed2fd5bb79e344f44681fc6f Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 22 Jun 2016 09:57:28 +0800 Subject: [PATCH 1583/1710] =?UTF-8?q?20160622-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...meet the IT needs of today and tomorrow.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/talk/20160620 Training vs. hiring to meet the IT needs of today and tomorrow.md diff --git a/sources/talk/20160620 Training vs. hiring to meet the IT needs of today and tomorrow.md b/sources/talk/20160620 Training vs. hiring to meet the IT needs of today and tomorrow.md new file mode 100644 index 0000000000..e4d511c5bd --- /dev/null +++ b/sources/talk/20160620 Training vs. hiring to meet the IT needs of today and tomorrow.md @@ -0,0 +1,62 @@ +Training vs. hiring to meet the IT needs of today and tomorrow +================================================================ + +![](https://enterprisersproject.com/sites/default/files/styles/620x350/public/images/cio_talent_4.png?itok=QLhyS_Xf) + +In the digital era, IT skills requirements are in a constant state of flux thanks to the constant change of the tools and technologies companies need to keep pace. It’s not easy for companies to find and hire talent with coveted skills that will enable them to innovate. Meanwhile, training internal staff to take on new skills and challenges takes time that is often in short supply. + +[Sandy Hill][1] is quite familiar with the various skills required across a variety of IT disciplines. As the director of IT for [Pegasystems][2], she is responsible for IT teams involved in areas ranging from application development to data center operations. What’s more, Pegasystems develops applications to help sales, marketing, service and operations teams streamline operations and connect with customers, which means she has to grasp the best way to use IT resources internally, and the IT challenges the company’s customers face. + +![](https://enterprisersproject.com/sites/default/files/CIO_Q%20and%20A_0.png) + +**The Enterprisers Project (TEP): How has the emphasis you put on training changed in recent years?** + +**Hill**: We’ve been growing exponentially over the past couple of years so now we’re implementing more global processes and procedures. With that comes the training aspect of making sure everybody is on the same page. + +Most of our focus has shifted to training staff on new products and tools that get implemented to drive innovation and enhance end user productivity. For example, we’ve implemented an asset management system; we didn’t have one before. So we had to do training globally instead of hiring someone who already knew the product. As we’re growing, we’re also trying to maintain a tight budget and flat headcount. So we’d rather internally train than try to hire new people. + +**TEP: Describe your approach to training. What are some of the ways you help employees evolve their skills?** + +**Hill**: I require each staff member to have a technical and non-technical training goal, which are tracked and reported on as part of their performance review. Their technical goal needs to align within their job function, and the non-technical goal can be anything from focusing on sharpening one of their soft skills to learning something outside of their area of expertise. I perform yearly staff evaluations to see where the gaps and shortages are so that teams remain well-rounded. + +**TEP: To what extent have your training initiatives helped quell recruitment and retention issues?** + +**Hill**: Keeping our staff excited about learning new technologies keeps their skill sets sharp. Having the staff know that we value them, and we are vested in their professional growth and development motivates them. + +**TEP: What sorts of training have you found to be most effective?** + +**Hill**: We use several different training methods that we’ve found to be effective. With new or special projects, we try to incorporate a training curriculum led by the vendor as part of the project rollout. If that’s not an option, we use off-site training. We also purchase on-line training packages, and I encourage my staff to attend at least one conference per year to keep up with what’s new in the industry. + +**TEP**: For what sorts of skills have you found it’s better to hire new people than train existing staff? + +**Hill**: It depends on the project. In one recent initiative, trying to implement OpenStack, we didn’t have internal expertise at all. So we aligned with a consulting firm that specialized in that area. We utilized their expertise on-site to help run the project and train internal team members. It was a massive undertaking to get internal people to learn the skills they needed while also doing their day-to-day jobs. + +The consultant helped us determine the headcount we needed to be proficient. This allowed us to assess our staff to see if gaps remained, which would require additional training or hiring. And we did end up hiring some of the contractors. But the alternative was to send some number of FTEs (full-time employees) for 6 to 8 weeks of training, and our pipeline of projects wouldn’t allow that. + +**TEP: In thinking about some of your most recent hires, what skills did they have that are especially attractive to you?** + +**Hill**: In recent hires, I’ve focused on soft skills. In addition to having solid technical skills, they need to be able to communicate effectively, work in teams and have the ability to persuade, negotiate and resolve conflicts. + +IT people in general kind of keep to themselves; they’re often not the most social people. Now, where IT is more integrated throughout the organization, the ability to give useful updates and status reports to other business units is critical to show that IT is an active presence and to be successful. + + + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ + +作者:[ Paul Desmond][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://enterprisersproject.com/user/paul-desmond +[1]: https://enterprisersproject.com/user/sandy-hill +[2]: https://www.pega.com/pega-can?&utm_source=google&utm_medium=cpc&utm_campaign=900.US.Evaluate&utm_term=pegasystems&gloc=9009726&utm_content=smAXuLA4U|pcrid|102822102849|pkw|pegasystems|pmt|e|pdv|c| + + + + + + From 47c03d6c30b7396500cff84efd075c59edaa6d75 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Tue, 21 Jun 2016 22:01:54 -0500 Subject: [PATCH 1584/1710] Update and rename sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md to translated/tech/20160511 An introduction to data processing with Cassandra and Spark.md --- ...ata processing with Cassandra and Spark.md | 51 ------------------- ...ata processing with Cassandra and Spark.md | 49 ++++++++++++++++++ 2 files changed, 49 insertions(+), 51 deletions(-) delete mode 100644 sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md create mode 100644 translated/tech/20160511 An introduction to data processing with Cassandra and Spark.md diff --git a/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md b/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md deleted file mode 100644 index 46331a9ae5..0000000000 --- a/sources/tech/20160511 An introduction to data processing with Cassandra and Spark.md +++ /dev/null @@ -1,51 +0,0 @@ -Translating KevinSJ -An introduction to data processing with Cassandra and Spark -============================================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc_520x292_opendata_0613mm.png?itok=mzC0Tb28) - - -There's been a huge surge of interest around the Apache Cassandra database due to the increasing uptime and performance demands of modern cloud applications. - -So, what is Apache Cassandra? A distributed OLTP database built for high availability and linear scalability. When people ask what Cassandra is used for, think about the type of system you want close to the customer. This is ultimately the system that our users interact with. Applications that must always be available: product catalogs, IoT, medical systems, and mobile applications. In these categories downtime can mean loss of revenue or even more dire outcomes depending on your specific use case. Netflix was one of the earliest adopters of this project, which was open sourced in 2008, and their contributions, along with successes, put it on the radar of the masses. - -Cassandra became a top level Apache Software Foundation project in 2010 and has been riding the wave in popularity since then. Now even knowledge in Cassandra gets you serious returns in the job market. It's both crazy and awesome to consider a NoSQL and open source technology could perform this sort of disruption next to the giants of enterprise SQL. This begs the question, what makes it so popular? - -Cassandra has the ability to be always on in spite of massive hardware and network failures by utilizing a design first widely discussed in [the Dynamo paper from Amazon][1]. By using a peer to peer model, with no single point of failure, we can survive rack failure and even complete network partitions. We can deal with an entire data center failure without impacting our customer's experience. A distributed system that plans for failure is a properly planned distributed system, because frankly, failures are just going to happen. With Cassandra, we accept that cruel fact of life, and bake it into the database's architecture and functionality. - -We know what you’re thinking, "But, I’m coming from a relational background, isn't this going to be a daunting transition?" The answer is somewhat yes and no. Data modeling with Cassandra will feel familiar to developers coming from the relational world. We use tables to model our data, and CQL, the Cassandra Query Language, to query the database. However, unlike SQL, Cassandra supports more complex data structures such as nested and user defined types. For instance, instead of creating a dedicated table to store likes on a cat photo, we can store that data in a collection with the photo itself enabling faster, sequential lookups. That's expressed very naturally in CQL. In our photo table we may want to track the name, URL, and the people that liked the photo. - -![](https://opensource.com/sites/default/files/resize/screen_shot_2016-05-06_at_7.17.33_am-350x198.png) - -In a high performance system milliseconds matter for both user experience and for customer retention. Expensive JOIN operations limit our ability to scale out by adding unpredictable network calls. By denormalizing our data so it can be fetched in as few requests as possible, we profit from the trend of decreasing costs in disk space and in return get predictable, high performance applications. We embrace the concept of denormalization with Cassandra because it offers a pretty appealing tradeoff. - -We're obviously not just limited to storing likes on cat photos. Cassandra is a optimized for high write throughput. This makes it the perfect solution for big data applications where we’re constantly ingesting data. Time series and IoT use cases are growing at a steady rate in both demand and appearance in the market, and we're continuously finding ways to utilize the data we collect to improve our technological application. - -This brings us to the next step, we've talked about storing our data in a modern, cost-effective fashion, but how do we get even more horsepower? Meaning, once we've collected all that data, what do we do with it? How can we analyze hundreds of terabytes efficiently? How can we react to information we're receiving in real-time, making decisions in seconds rather than hours? Enter Apache Spark. - -Spark is the next step in the evolution of big data processing. Hadoop and MapReduce were revolutionary projects, giving the big data world an opportunity to crunch all the data we've collected. Spark takes our big data analysis to the next level by drastically improving performance and massively decreasing code complexity. Through Spark, we can perform massive batch processing calculations, react quickly to stream processing, make smart decisions through machine learning, and understand complex, recursive relationships through graph traversals. It’s not just about offering your customers a fast and reliable connection to their application (which is what Cassandra offers), it's also about being able to leverage insights from the data Cassandra stores to make more intelligent business decisions and better cater to customer needs. - -You can check out the [Spark-Cassandra Connector][2] (open source) and give it a shot. To learn more about both technologies, we highly recommend the free self-paced courses on [DataStax Academy][3]. - -Have fun digging in and learning some killer new technology! If you want to learn more, check out our [OSCON tutorial][4], with a hands on exploration into the worlds of both Cassandra and Spark. - -We also love taking questions on Twitter, so give us a shout and we’ll try to help: [Dani][5] and [Jon][6]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/5/basics-cassandra-and-spark-data-processing - -作者:[Jon Haddad][a],[Dani Traphagen][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twitter.com/rustyrazorblade -[b]: https://opensource.com/users/dtrapezoid -[1]: http://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf -[2]: https://github.com/datastax/spark-cassandra-connector -[3]: https://academy.datastax.com/ -[4]: http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/49162 -[5]: https://twitter.com/dtrapezoid -[6]: https://twitter.com/rustyrazorblade diff --git a/translated/tech/20160511 An introduction to data processing with Cassandra and Spark.md b/translated/tech/20160511 An introduction to data processing with Cassandra and Spark.md new file mode 100644 index 0000000000..0786996e39 --- /dev/null +++ b/translated/tech/20160511 An introduction to data processing with Cassandra and Spark.md @@ -0,0 +1,49 @@ +Cassandra 和 Spark 数据处理入门 +============================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc_520x292_opendata_0613mm.png?itok=mzC0Tb28) + +Apache Cassandra 数据库近来引起了很多的兴趣,这主要源于现代云端软件对于可用性及性能方面的要求。 + +那么,Apache Cassandra 是什么?它是一种为高可用性及线性可扩展性优化的分布式的联机交易处理 (OLTP) 数据库。当人们想知道 Cassandra 的用途时,可以想想你想要的离客户近的系统。这j最终是我们的用户进行交互的系统。需要保证实时可用的程序:产品目录,IoT,医疗系统,以及移动应用。对这些程序而言,下线时间意味着利润降低甚至导致其他更坏的结果。Netfilix 是这个于2008年开源的项目的早期使用者,他们对此项目的贡献以及带来的成功让这个项目名声大噪。 + +Cassandra 于2010年成为了 Apache 软件基金会的顶级项目,在这之后就开始变得流行。现在,只要你有 Cassadra 的相关知识,找工作时就能轻松不少。光是想想一个 NoSQL 语言和开源技术能达到如此企业级 SQL 的高度就觉得这是十分疯狂而又不可思议的。这引出了一个问题。是什么让它如此的流行? + +因为采用了首先在[亚马逊发表的 Dynamo 论文][1]提出的设计,Cassandra 有能力在大规模的硬件及网络故障时保持实时在线。由于采用了点对点模式,在没有单点故障的情况下,我们能幸免于机架故障甚至完全网络分区。我们能在不影响用户体验的前提下处理数据中心故障。一个能考虑到故障的分布式系统才是一个没有后顾之忧的分布式系统,因为老实说,故障是迟早会发生的。有了 Cassandra, 我们可疑直面残酷的生活并将之融入数据库的结构和功能中。 + + + +我们能猜到你现在在想什么,“但我只有关系数据库相关背景,难道这样的转变不会很困难吗?"这问题的答案介于是和不是之间。使用 Cassandra 建立数据模型对有关系数据库背景的开发者而言是轻车熟路。我们使用表格来建立数据模型,并使用 CQL 或者 Cassandra 查询语言来查询数据库。然而,与 SQL 不同的是,Cassandra 支持更加复杂的数据结构,例如多重和用户自定义类型。举个例子,当要储存对一个小猫照片的点赞数目时,我们可以将整个数据储存在一个包含照片本身的集合之中从而获得更快的顺序查找而不是建立一个独立的表。这样的表述在 CQL 中十分的自然。在我们照片表中,我们需要记录名字,URL以及给此照片点赞过的人。 + +![](https://opensource.com/sites/default/files/resize/screen_shot_2016-05-06_at_7.17.33_am-350x198.png) + +在一个高性能系统中,毫秒对用户体验和客户保留都能产生影响。昂贵的 JOIN 制约了我们通过增加不可预见的网络调用而扩容的能力。当我们将数据反规范化使其能在尽可能少的请求中被获取到时,我们即可从磁盘空间花费的降低中获益并获得可预测的,高性能应用。我们将反规范化同 Cassandra 一同介绍是因为它提供了很有吸引力的的折衷方案。 + +很明显,我们不会局限于对于小猫照片的点赞数量。Canssandra 是一款个为并发高写入优化的方案。这使其成为需要时常吞吐数据的大数据应用的理想解决方案。市场上的时序和 IoT 的使用场景正在以稳定的速度在需求和亮相方面增加,我们也在不断探寻优化我们所收集到的数据以求提升我们的技术应用(注:这句翻的非常别扭,求校队) + + +这就引出了我们的下一步,我们已经提到了如何以一种现代的,性价比高的方式储存数据,但我们应该如何获得更多的马力呢?具体而言,当我们收集到了所需的数据,我们应该怎样处理呢?如何才能有效的分析几百 TB 的数据呢?如何才能在实时的对我们所收集到的信息进行反馈并在几秒而不是几小时的时间利作出决策呢?Apache Spark 将给我们答案。 + + +Spark 是大数据变革中的下一步。 Hadoop 和 MapReduce 都是革命性的产品,他们让大数据界获得了分析所有我们所取得的数据的机会。Spark 对性能的大幅提升及对代码复杂度的大幅降低则将大数据分析提升到了另一个高度。通过 Spark,我们能大批量的处理计算,对流处理进行快速反映,通过机器学习作出决策并理解通过对图的遍历理解复杂的递归关系。这并非只是为你的客户提供与快捷可靠的应用程序连接(Cassandra 已经提供了这样的功能),这更是能一探 Canssandra 所储存的数据并作出更加合理的商业决策同时更好地满足客户需求。 + +你可以看看 [Spark-Cassandra Connector][2] (open source) 并动手试试。若想了解更多关于这两种技术的信息,我们强烈推荐名为 [DataStax Academy][3] 的自学课程 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/5/basics-cassandra-and-spark-data-processing + +作者:[Jon Haddad][a],[Dani Traphagen][b] +译者:[KevinSJ](https://github.com/KevinSJ) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twitter.com/rustyrazorblade +[b]: https://opensource.com/users/dtrapezoid +[1]: http://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf +[2]: https://github.com/datastax/spark-cassandra-connector +[3]: https://academy.datastax.com/ +[4]: http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/49162 +[5]: https://twitter.com/dtrapezoid +[6]: https://twitter.com/rustyrazorblade From d9d76e817d11d83608cca1ff3441c0cfe66d089a Mon Sep 17 00:00:00 2001 From: "Cathon.ZHD" Date: Wed, 22 Jun 2016 13:17:16 +0800 Subject: [PATCH 1585/1710] Cathon translating --- ... 65% of companies are contributing to open source projects.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20160510 65% of companies are contributing to open source projects.md b/sources/talk/20160510 65% of companies are contributing to open source projects.md index ad3b4ef680..886c3399b9 100644 --- a/sources/talk/20160510 65% of companies are contributing to open source projects.md +++ b/sources/talk/20160510 65% of companies are contributing to open source projects.md @@ -1,5 +1,6 @@ 65% of companies are contributing to open source projects ========================================================== +[Cathon is translating...] ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUSINESS_openseries.png?itok=s7lXChId) From 86af7681a2e4f155230abe16b3a677091010457f Mon Sep 17 00:00:00 2001 From: J L Date: Wed, 22 Jun 2016 13:48:56 +0800 Subject: [PATCH 1586/1710] =?UTF-8?q?[Translating]=20Mark=20Shuttleworth?= =?UTF-8?q?=20=E2=80=93=20The=20Man=20Behind=20Ubuntu=20Operating=20System?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-The Man Behind Ubuntu Operating System.md | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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 index 3390c232ac..508b68c176 100644 --- 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 @@ -1,3 +1,5 @@ +Translating by [jerryling315](https://github.com/jerryling315) + Mark Shuttleworth – The Man Behind Ubuntu Operating System ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Mark-Shuttleworth-652x445.jpg) @@ -9,7 +11,7 @@ Mark also founded **Thawte** in 1996, the Internet commerce security company, wh 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. @@ -17,7 +19,7 @@ In 2002, he flew to International Space Station as member of their crew of Soyuz 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 ### @@ -27,7 +29,7 @@ As we mentioned above, Mark was born in Welkom, South Africa’s Orange Free Sta 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 ### @@ -37,7 +39,7 @@ Mark founded Thawte in 1995, which was specialized in the digital certificates a 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 ### @@ -51,7 +53,7 @@ In 2004, Mark returned to free software world by funding software development of 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. @@ -67,7 +69,7 @@ In 2012, Mark and Kenneth Rogoff took part together in debate opposite Peter Thi 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 ### @@ -81,7 +83,7 @@ While in space, Mark had radio conversation with Nelson Mandela and another 14 y 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 ### @@ -93,7 +95,7 @@ Mark has his private jet, Bombardier Global Express that is often referred to as 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. @@ -116,4 +118,4 @@ via: http://www.unixmen.com/mark-shuttleworth-man-behind-ubuntu-operating-system 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/pirat9/ \ No newline at end of file +[a]:http://www.unixmen.com/author/pirat9/ From 9476fe9f90229ad9480bc98e0659d09f8ea401e6 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 22 Jun 2016 23:31:14 +0800 Subject: [PATCH 1587/1710] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @jerryling315 --- ...ecuri-Pi--Using the Raspberry Pi as a Secure Landing Point.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point => 20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md} (100%) diff --git a/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point b/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md similarity index 100% rename from translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point rename to translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md From 5694ee51483375e8c837caaba8d9eb85b986ed65 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 23 Jun 2016 06:58:23 +0800 Subject: [PATCH 1588/1710] PUB:20160228 Two Outstanding All-in-One Linux Servers @wyangsun --- ...wo Outstanding All-in-One Linux Servers.md | 97 +++++++++++++++++ ...wo Outstanding All-in-One Linux Servers.md | 103 ------------------ 2 files changed, 97 insertions(+), 103 deletions(-) create mode 100644 published/20160228 Two Outstanding All-in-One Linux Servers.md delete mode 100644 translated/tech/20160228 Two Outstanding All-in-One Linux Servers.md diff --git a/published/20160228 Two Outstanding All-in-One Linux Servers.md b/published/20160228 Two Outstanding All-in-One Linux Servers.md new file mode 100644 index 0000000000..48370eca23 --- /dev/null +++ b/published/20160228 Two Outstanding All-in-One Linux Servers.md @@ -0,0 +1,97 @@ +两个出色的一体化 Linux 服务器软件 +================================================ + +回到2000年那时,微软发布小型商务服务器(SBS:Small Business Server)。这个产品改变了很多人们对科技在商务领域的看法。你可以部署一个单独的服务器,它能处理邮件,日历,文件共享,目录服务,VPN,以及更多,而不是很多机器处理不同的任务。对很多小型公司来说,这是实实在在的好处,但是对于一些公司来说 Windows SMB 是昂贵的。对于另外一些人,根本不会考虑使用这种微软设计的单一服务器的想法。 + +对于后者也有替代方案。事实上,在 Linux 和开源领域里,你可以选择许多稳定的平台,它可以作为一站式服务商店服务于你的小型企业。如果你的小型企业有10到50员工,一体化服务器也许是你所需的理想方案。 + +这里,我将要展示两个 Linux 一体化服务器,你可以看看它们哪个能完美适用于你的公司。 + +记住,这些服务器不适用于(不管是哪种方式)大型商务或企业。大公司无法依靠一体化服务器,那是因为一台服务器不能负担得起企业所需的期望。也就是说,Linux 一体化服务器适合于小型企业。 + +### ClearOS + +[ClearOS][1] 最初发布于 2009 年,那时名为 ClarkConnect,是一个路由和网关的发行版。从那以后,ClearOS 增加了所有一体化服务器必要的特性。CearOS 提供的不仅仅是一个软件,你可以购买一个 [ClearBox 100][2] 或 [ClearBox 300][3]。这些服务器搭载了完整的 ClearOS,作为一个 IT 设备被销售。在[这里][4]查看特性比对/价格矩阵。 + +如果你已经有响应的硬件,你可以下载这些之一: + +- [ClearOS 社区版][5] — 社区(免费)版的 ClearOS +- [ClearOS 家庭版][6] — 理想的家庭办公室(详细的功能和订阅费用,见[这里][12]) +- [ClearOS商务][7] — 理想的小型企业(详细的功能和订阅费用,见[这里][13]) + +使用 ClearOS 能给你你带来什么?你得到了一个商业级的服务器,带有单一的精美 Web 界面。是什么让 ClearOS 从标准的服务器所提供的一大堆功能中脱颖而出?除了那些基础的部分,你可以从 [Clear 市场][8] 中增加功能。在这个市场里,你可以安装免费或付费的应用来扩展 ClearOS 服务器的特性。这里你可以找到支持 Windows 服务器活动目录,OpenLDAP,Flexshares,Antimalware,云,Web 访问控制,内容过滤等等很多的补充插件。你甚至可以找到一些第三方组件,比如谷歌应用同步,Zarafa 合作平台,卡巴斯基杀毒。 + +ClearOS 的安装就像其他的 Linux 发行版一样(基于红帽的 Anaconda 安装程序)。安装完成后,系统将提示您设置网络接口,这个地址用来供你的浏览器(需要与 ClearOS 服务器在同一个网络里)访问。地址格式如下: + + https://IP_OF_CLEAROS_SERVER:81 + +IP_OF_CLEAROS_SERVER 就是服务器的真实 IP 地址。注:当你第一次在浏览器访问这个服务器时,你将收到一个“Connection is not private”的警告。继续访问,以便你可以继续设置。 + +当浏览器最终连接上之后,就会提示你 root 用户认证(在初始化安装中你设置的 root 用户密码)。一通过认证,你将看到 ClearOS 的安装向导(图1) + +![](http://www.linux.com/images/stories/66866/jack-clear_a.png) + +*图1: ClearOS安装向导。* + +点击下一步按钮,开始设置你的 ClearOS 服务器。这个向导无需加以说明,在最后还会问你想用那个版本的 ClearOS。点击“社区”,“家庭”,或者“商业”。选择之后,你就被要求注册一个账户。创建了一个账户并注册了你的服务器后,你可以开始更新服务器,配置服务器,从市场添加模块(图2)。 + +![](http://www.linux.com/images/stories/66866/jack-clear_b.png) + +*图2: 从市场安装模块。* + +此时,一切准备就绪,可以开始深入挖掘配置你的 ClearOS 小型商务服务器了。 + +### Zentyal + +[Zentyal][10] 是一个基于 Ubuntu 的小型商务服务器,有段时期的名字是 eBox。Zentyal 提供了大量的服务器/服务来适应你的小型商务需求: + +- 电子邮件 — 网页邮件;支持原生的微软 Exchange 协议和活动目录;日历和通讯录;手机设备电子邮件同步;反病毒/反垃圾;IMAP,POP,SMTP,CalDAV,和 CardDAV 支持。 +- 域和目录 — 中央域目录管理;多个组织部门;单点登录身份验证;文件共享;ACL,高级域管理,打印机管理。 +- 网络和防火墙 — 支持静态和 DHCP 接口;对象和服务;包过滤;端口转发。 +- 基础设施 — DNS;DHCP;NTP;认证中心;VPN。 +- 防火墙 + +安装 Zentyal 很像Ubuntu服务器的安装,基于文本界面而且很简单:从安装镜像启动,做一些简单的选择,然后等待安装完成。当这个最初的基于文本的安装完成之后,就会显示桌面 GUI,提供选择软件包的向导程序。你可以选择所有你想安装的包,让安装程序继续完成这些工作。 + +最终,你可以通过网页界面来访问 Zentyal 服务器(浏览器访问 https://IP_OF_SERVER:8443 - 这里 IP_OF_SERVER是你的 Zentyal 服务器的局域网地址)或使用独立的桌面 GUI 程序来管理服务器(Zentyal 包括一个可以快速访问管理员和用户控制台的 Zentyal 管理控制台)。当真系统已经保存并启动,你将看到 Zentyal 面板(图3)。 + +![](http://www.linux.com/images/stories/66866/jack-zentyal_a.png) + +*图3: Zentyal活动面板。* + +这个面板允许你控制服务器所有方面,比如更新,管理服务器/服务,获取服务器的敏捷状态更新。您也可以进入组件区域,然后安装在部署过程中没有选择的组件或更新当前的软件包列表。点击“软件管理” > “系统更新”并选择你想更新的(图4),然后在屏幕最底端点击“更新”按钮。 + +![](http://www.linux.com/images/stories/66866/jack-zentyal_b.png) + +*图4: 更新你的Zentyal服务器很简单。* + +### 那个服务器适合你? + +回答这个问题要看你有什么需求。Zentyal 是一个不可思议的服务器,它可以很好的胜任你的小型商务网络。如果你需要更多,如群件,我觉得你可以试试 ClearOS。如果你不需要群件,其它的服务器也不错。 + +我强烈建议你安装一下这两个一体化的服务器,看看哪个更适合你的小公司。 + +------------------------------------------------------------------------------ + +via: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers + +作者:[Jack Wallen][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.linux.com/community/forums/person/93 +[1]: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers#clearfoundation-overview +[2]: https://www.clearos.com/products/hardware/clearbox-100-series +[3]: https://www.clearos.com/products/hardware/clearbox-300-series +[4]: https://www.clearos.com/products/hardware/clearbox-overview +[5]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso +[6]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso +[7]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso +[8]: https://www.clearos.com/products/purchase/clearos-marketplace-overview +[9]: https://ip_of_clearos_server:81/ +[10]: http://www.zentyal.org/server/ +[11]: https://ip_of_server:8443/ +[12]: https://www.clearos.com/products/clearos-editions/clearos-7-home +[13]: https://www.clearos.com/products/clearos-editions/clearos-7-business diff --git a/translated/tech/20160228 Two Outstanding All-in-One Linux Servers.md b/translated/tech/20160228 Two Outstanding All-in-One Linux Servers.md deleted file mode 100644 index a60b23aea1..0000000000 --- a/translated/tech/20160228 Two Outstanding All-in-One Linux Servers.md +++ /dev/null @@ -1,103 +0,0 @@ -两个杰出的一体化Linux服务器 -================================================ - -关键词:Linux服务器,SMB,clearos,Zentyal - -![](http://www.linux.com/images/stories/66866/jack-clear_a.png) - ->图1: ClearOS安装向导。 - -回到2000年,微软发布小型商务服务器。这个产品改变了很多人们对科技在商务领域的看法。你可以部署一个单独的服务器,它能处理邮件,日历,文件共享,目录服务,VPN,以及更多,而不是很多机器处理不同的任务。对很多小型商务来说,这是非常好的恩惠,但是Windows SMB的一些花费是昂贵的。对于其他人,微软设计的依赖于一个服务器的想法,根本不是一个选项。 - -对于最近的用户群,有些替代品。事实上,在Linux和开源领域里,你可以选择许多稳定的平台,它可以作为一站式服务商店服务于你的小型企业。如果你的小型企业有10到50员工,一体化服务器也许是你所需的理想方案。 - -这里,我将要看看两个Linux一体化服务器,所以你可以查看他们哪个能完美适用于你的公司。 - -记住,这些服务器不能,以任何方式,适用于大型商务或企业。大公司无法依靠一体化服务器,仅仅是因为一台服务器不能负荷在企业内所需的企望。除此之外,这就是小型企业可以从Linux一体化服务器期待什么。 - -### ClearOS - -[ClearOS][1]是在2009年在ClarkConnect下发行的,作为一个路由和网关的分支。从那以后,ClearOS已经增加了所有一体化服务器必要的特性。CearOS提供的不仅仅是一个软件。你可以购买一个[ClearBox 100][2] 或[ClearBox 300][3]。这些服务器搭载完整的ClearOS作为一个IT设备被销售。在[这里][4]查看特性比对/价格矩阵。 - -家里已经有这些硬件,你可以下载这些之一: - -- [ClearOS社区][5] — 社区(免费)版的ClearOS - -- [ClearOS家庭][6] — 理想的家庭办公室(详细的功能和订阅费用,见这里) - -- [ClearOS商务][7] — 理想的小型商务(详细的功能和订阅费用,见这里) - -使用ClearOS你得到了什么?你得到了一个单机的业务合作服务器,设计精美的网页。ClearOS独特的是什么?你可以在基础服务中得到很多特性。除了这个,你必须从 [Clear Marketplace][8]增加特性。在市场上,你可以安装免费或付费的应用程序,扩展集的ClearOS服务器的特性。这里你可以找到附加的Windows服务器活动目录,OpenLDAP,Flexshares,Antimalware,云,Web访问控制,内容过滤,还有更多。你甚至可以找到一些第三方组件像谷歌应用同步,Zarafa合作平台,卡巴斯基杀毒。 - -ClearOS的安装像其他Linux发行版(基于红帽的Anaconda安装程序)。安装完成后,系统将提示您设置网络接口就是提供你浏览器访问的地址(与ClearOS服务器在同一个网络里)。地址格式如下: - -[https://IP_OF_CLEAROS_SERVER:81][9] - -IP_OF_CLEAROS_SERVER就是服务器的真实IP地址。注:当你第一次在浏览器访问这个服务器时,你将收到一个“Connection is not private”的警告。继续访问这个地址你才能继续设置。 - -当浏览器连接上,就会提示你root用户认证(在初始化安装中你设置的root用户密码)。一通过认证,你将看到ClearOS的安装向导(上图1) - -点击下一步按钮,开始设置你的ClearOS服务器。这个向导无需加以说明,在最后还会问你想用那个版本的ClearOS。点击社区,家庭,或者商业。一旦选择,你就需要注册一个账户。创建了一个账户注册了服务器后,你可以开始更新服务器,配置服务器,从市场添加模块(图2)。 - -![](http://www.linux.com/images/stories/66866/jack-clear_b.png) - ->图2: 从市场安装模块。 - -此时,你已经准备开始深入挖掘配置你的ClearOS小型商务服务器了。 - -### Zentyal - -[Zentyal][10]是一个基于Ubuntu的小型商务服务器,现在,发布在eBox域名下。Zentyal提供了大量的服务器/服务来适应你的小型商务需求: - -- 电子邮件 — 网页邮件;原生微软邮件协议和活动目录支持;日历和通讯录;手机设备电子邮件同步;反病毒/反垃圾;IMAP,POP,SMTP,CalDAV,和CardDAV支持。 - -- 域和目录 — 核心域目录管理;多个组织单元;单点登录身份验证;文件共享;ACLs,高级域名管理,打印机管理。 - -- 网络和防火墙 — 静态和DHCP接口;对象和服务;包过滤;端口转发。 - -- 基础设施 — DNS;DHCP;NTP;认证中心;VPN。 - -- 防火墙 - -安装Zentyal很像Ubuntu服务器的文本安装而且很简单:启动安装镜像,做一些选择,等待安装完成。一旦初始化,完成基于文本安装,就提供给你桌面GUI,向导程序提供选择包。选择所有你想安装的包,让安装程序完成这些工作。 - -最终,你可以通过网页接口来访问Zentyal服务器(浏览器访问[https://IP_OF_SERVER:8443][11] - IP_OF_SERVER是Zentyal服务器的内网地址)或使用独立的桌面GUI来管理服务器(Zentyal包括快速访问管理员和用户控制台就像Zentyal管理控制台)。当全部系统已经保存开启,你将看到Zentyal面板(图3)。 - -![](http://www.linux.com/images/stories/66866/jack-zentyal_a.png) - ->图3: Zentyal活动面板. - -这个面板允许你控制服务器所有方面,比如更新,管理服务器/服务,获取服务器的敏捷状态更新。您也可以进入组件领域,然后安装部署过程中选择出来的组件或更新当前的软件包列表。点击 软件管理 > 系统更新 并选择你想更新的(图4),然后在屏幕最底端点击更新按钮。 - -![](http://www.linux.com/images/stories/66866/jack-zentyal_b.png) - ->图4: 更新你的Zentyal服务器很简单。 - -### 那个服务器适合你? - -回答这个问题要看你有什么需求。Zentyal是一个不可思议的服务器,它很好的胜任于你的小型商务网络中。如果你需要更多,如组合软件,你最好赌在ClearOS上。如果你不需要组合软件,任意的服务器将表现杰出的工作。 - -我强烈建议安装这两个一体化的服务器,看看哪个是你的小公司所需的最好服务。 - ------------------------------------------------------------------------------- - -via: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers - -作者:[Jack Wallen][a] -译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.linux.com/community/forums/person/93 -[1]: http://www.linux.com/learn/tutorials/882146-two-outstanding-all-in-one-linux-servers#clearfoundation-overview -[2]: https://www.clearos.com/products/hardware/clearbox-100-series -[3]: https://www.clearos.com/products/hardware/clearbox-300-series -[4]: https://www.clearos.com/products/hardware/clearbox-overview -[5]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso -[6]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso -[7]: http://mirror.clearos.com/clearos/7/iso/x86_64/ClearOS-DVD-x86_64.iso -[8]: https://www.clearos.com/products/purchase/clearos-marketplace-overview -[9]: https://ip_of_clearos_server:81/ -[10]: http://www.zentyal.org/server/ -[11]: https://ip_of_server:8443/ From c05b87e7f064fa12657a1aaa7957ad33506a0c7b Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 23 Jun 2016 07:27:11 +0800 Subject: [PATCH 1589/1710] PUB:20160513 How to Set Up 2-Factor Authentication for Login and sudo @ictlyh --- ...actor Authentication for Login and sudo.md | 67 +++++++------------ 1 file changed, 26 insertions(+), 41 deletions(-) rename {translated/tech => published}/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md (53%) diff --git a/translated/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md b/published/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md similarity index 53% rename from translated/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md rename to published/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md index 1ed524c4d4..12012c9045 100644 --- a/translated/tech/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md +++ b/published/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md @@ -1,12 +1,11 @@ -如何为登录和 sudo 设置双重认证 +如何为登录和 sudo 设置双因子认证 ========================================================== ![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_crop.png?itok=z_cdYZZf) ->[Used with permission][1] -安全就是一切。我们生活的当今世界,数据具有令人难以置信的价值,而你也一直处于数据丢失的风险之中。因此,你必须想尽办法保证你桌面系统和服务器中东西的安全。结果,管理员和用户就会创建极其复杂的密码、使用密码管理器甚至其它更复杂的东西。但是,如果我告诉你你可以只需要一步-至多两步就能登录到你的 Linux 服务器或桌面系统中呢?多亏了 [Google Authenticator][2],现在你可以做到了。在这之上配置也极其简单。 +安全就是一切。我们生活的当今世界,数据具有令人难以置信的价值,而你也一直处于数据丢失的风险之中。因此,你必须想尽办法保证你桌面系统和服务器中数据的安全。结果,管理员和用户就会创建极其复杂的密码、使用密码管理器甚至其它更复杂的东西。但是,如果我告诉你你可以只需要一步,至多两步就能登录到你的 Linux 服务器或桌面系统中呢?多亏了 [Google 身份验证器][2],现在你可以做到了。并且,配置也极其简单。 -我会给你简要介绍为登录和 sudo 设值双重认证的步骤。我基于 Ubuntu 16.04 桌面系统进行介绍,但这些步骤也适用于其它服务器。为了做到双重认证,我会使用 Google Authenticator。 +我会给你简要介绍为登录和 sudo 设置双因子认证的步骤。我基于 Ubuntu 16.04 桌面系统进行介绍,但这些步骤也适用于其它服务器。为了实现双因子认证,我会使用 Google 身份验证器。 这里有个非常重要的警告:一旦你设置了认证,没有一个从认证器中获得的由 6 个数字组成的验证码你就不可能登录账户(或者执行 sudo 命令)。这也给你增加了一步额外的操作,因此如果你不想每次登录到 Linux 服务器(或者使用 sudo)的时候都要拿出你的智能手机,这个方案就不适合你。但你也要记住,这额外的一个步骤也给你带来一层其它方法无法给予的保护。 @@ -14,38 +13,28 @@ ### 安装必要的组件 -安装 Google 认证,首先要解决两个问题。一是安装智能机应用。下面是如何从 Google 应用商店安装的方法: +安装 Google 身份验证器(Google Authenticator),首先要解决两个问题。一是安装智能机应用。下面是如何从 Google 应用商店安装的方法: 1. 在你的安卓设备中打开 Google 应用商店 - -2. 搜索 google 认证 - -3. 找到并点击有 Google 标识的应用 - +2. 搜索 google 身份验证器 +3. 找到并点击有 Google Inc. 标识的应用 4. 点击安装 - -5. 点击 接受 - +5. 点击“接受” 6. 等待安装完成 -接下来,我们继续在你的 Linux 机器上安装认证。步骤如下: +接下来,我们继续在你的 Linux 机器上安装这个认证器。步骤如下: 1. 打开一个终端窗口 - 2. 输入命令 sudo apt-get install google-authenticator - 3. 输入你的 sudo 密码并敲击回车 - 4. 如果有弹窗提示,输入 y 并敲击回车 - 5. 等待安装完成 接下来配置使用 google-authenticator 进行登录。 ### 配置 -要为登录和 sudo 添加两阶段认证只需要编辑一个文件。也就是 /etc/pam.d/common-auth。打开并找到如下一行: -Just one file must be edited to add two-step authentication for both login and sudo usage. The file is /etc/pam.d/common-auth. Open it and look for the line +要为登录和 sudo 添加双因子认证只需要编辑一个文件,即 /etc/pam.d/common-auth。打开并找到如下一行: ``` auth [success=1 default=ignore] pam_unix.so nullok_secure @@ -59,57 +48,53 @@ auth required pam_google_authenticator.so 保存并关闭文件。 -下一步就是为系统中的每个用户设置 google-authenticator(否则会不允许他们登录)。为了简单起见,我们假设你的系统中有两个用户:jack 和 olivia。首先为 jack 设置(我们假设这是我们一直使用的账户)。 +下一步就是为系统中的每个用户设置 google-authenticator(否则他们就不能登录了)。为了简单起见,我们假设你的系统中有两个用户:jack 和 olivia。首先为 jack 设置(我们假设这是我们一直使用的账户)。 打开一个终端窗口并输入命令 google-authenticator。之后会问你一系列的问题(每个问题你都应该用 y 回答)。问题包括: * 是否允许更新你的 "/home/jlwallen/.google_authenticator" 文件 (y/n) y - * 是否禁止多个用户使用同一个认证令牌?这会限制你每 30 秒内只能登录一次,但能增加你注意到甚至防止中间人攻击的可能 (y/n) +* 默认情况下令牌时长为 30 秒即可,为了补偿客户端和服务器之间可能出现的时间偏差,我们允许使用当前时间之前或之后的其它令牌。如果你无法进行时间同步,你可以把这个时间窗口由默认的 1:30 分钟增加到 4 分钟。是否希望如此 (y/n) +* 如果你尝试登录的计算机没有针对暴力破解进行加固,你可以为验证模块启用速率限制。默认情况下,限制攻击者每 30 秒不能尝试登陆超过 3 次。是否启用速率限制 (y/n) -* 默认情况下令牌时长为 30 秒即可,为了补偿客户端和服务器之间可能出现的时间偏差,我们允许添加一个当前时间之前或之后的令牌。如果你无法进行时间同步,你可以把时间窗口由默认的 1:30 分钟增加到 4 分钟。是否希望如此 (y/n) - -* 如果你尝试登陆的计算机没有针对蛮力登陆进行加固,你可以为验证模块启用速率限制。默认情况下,限制攻击者每 30 秒不能尝试登陆超过 3 次。是否启用速率限制 (y/n) - -一旦完成了问题回答,你就会看到你的密钥、验证码以及 5 个紧急刮码。把刮码输出保存起来。你可以在无法使用手机的时候使用它们(每个刮码仅限使用一次)。密钥用于你在 Google Authenticator 上设置账户,验证码是你能立即使用(如果需要)的一次性验证码。 +一旦完成了问题回答,你就会看到你的密钥、验证码以及 5 个紧急刮码(emergency scratch code)。把这些刮码打印出来并保存。你可以在无法使用手机的时候使用它们(每个刮码仅限使用一次)。密钥用于你在 Google 身份验证器上设置账户,验证码是你能当下就能够立即使用(如果需要)的一次性验证码。 ### 设置应用 -现在你已经配置好了用户 jack。在设置用户 olivia 之前,你需要在 Google Authenticator 应用上为 jack 添加账户。在主屏幕上打开应用,点击 菜单 按钮(右上角三个竖排点)。点击添加账户然后输入提供的密钥。在下一个窗口(示意图1),你需要输入你运行 google-authenticator 应用时提供的 16 个数字的密钥。给账户取个名字(以便你记住这用于哪个账户),然后点击添加。 +现在你已经配置好了用户 jack。在设置用户 olivia 之前,你需要在 Google 身份验证器应用上为 jack 添加账户(LCTT 译注:实际操作情形中,是为 jack 的手机上安装的该应用创建一个账户)。在打开应用,点击“菜单”按钮(右上角三个竖排点)。点击“添加账户”然后点击“输入提供的密钥”。在下一个窗口(图1),你需要输入你运行 google-authenticator 应用时提供的 16 个数字的密钥。给账户取个名字(以便你记住这用于哪个账户),然后点击“添加”。 ![](https://www.linux.com/sites/lcom/files/styles/floated_images/public/auth_a.png?itok=xSMkd-Mf) ->Figure 1: 在 Google Authenticator 应用上新建账户 + +*图1: 在 Google Authenticator 应用上新建账户* + +(LCTT 译注:Google 身份验证器也可以扫描你在服务器上设置时显示的二维码,而不用手工输入密钥) 添加完账户之后,你就会看到一个 6 个数字的密码,你每次登录或者使用 sudo 的时候都会需要这个密码。 最后,在系统上设置其它账户。正如之前提到的,我们会设置一个叫 olivia 的账户。步骤如下: 1. 打开一个终端窗口 - 2. 输入命令 sudo su olivia - -3. 在智能机上打开 Google Authenticator - -4. 在终端窗口(示意图2)中输入(应用提供的) 6 位数字验证码并敲击回车 - +3. 在智能机上打开 Google 身份验证器 +4. 在终端窗口(图2)中输入(应用提供的) 6 位数字验证码并敲击回车 5. 输入你的 sudo 密码并敲击回车 - 6. 以新用户输入命令 google-authenticator,回答问题并记录生成的密钥和验证码。 -成功为 olivia 用户设置好之后,用 google-authenticator 命令,在 Google Authenticator 应用上根据用户信息(和之前为第一个用户添加账户相同)添加一个新的账户。现在你在 Google Authenticator 应用上就会有 jack 和 olivia 两个账户了。 +成功为 olivia 用户设置好之后,用 google-authenticator 命令,在 Google 身份验证器应用上根据用户信息(和之前为第一个用户添加账户相同)添加一个新的账户。现在你在 Google 身份验证器应用上就会有 jack 和 olivia 两个账户了。(LCTT 译注:在实际操作情形中,通常是为 jack 和 olivia 两个人的手机分别设置。) ![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_b.png?itok=FH36V1r0) ->Figure 2: 为 sudo 输入 6位数字验证码 -好了,就是这些。每次你尝试登陆系统(或者使用 sudo) 的时候,在你输入用户密码之前,都会要求你输入提供的 6 位数字验证码。现在你的 Linux 机器就比添加双重认证之前安全多了。虽然有些人会认为这非常麻烦,我仍然推荐使用,尤其是那些保存了敏感数据的机器。 +*图2: 为 sudo 输入 6位数字验证码* + +好了,就是这些。每次你尝试登录系统(或者使用 sudo) 的时候,在你输入用户密码之前,都会要求你输入提供的 6 位数字验证码。现在你的 Linux 机器就比添加双因子认证之前安全多了。虽然有些人会认为这非常麻烦,我仍然推荐使用,尤其是那些保存了敏感数据的机器。 -------------------------------------------------------------------------------- -via: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/auth_b.png?itok=FH36V1r0 +via: https://www.linux.com/learn/how-set-2-factor-authentication-login-and-sudo 作者:[JACK WALLEN][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) [a]: https://www.linux.com/users/jlwallen [1]: https://www.linux.com/licenses/category/used-permission From ebd21bcc86b46fa8239355db9e7ea2db84fc9514 Mon Sep 17 00:00:00 2001 From: jiwenkang <1006990314@qq.com> Date: Thu, 23 Jun 2016 08:06:28 -0500 Subject: [PATCH 1590/1710] =?UTF-8?q?erlinux=20=E5=AE=8C=E6=88=90=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=20(#4084)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * erlinux translating * erlinux translated * erlinux translated --- ...Driving cars into the future with Linux.md | 74 ++++++------ ...Driving cars into the future with Linux.md | 108 ++++++++++++++++++ 2 files changed, 147 insertions(+), 35 deletions(-) create mode 100644 translated/talk/20160523 Driving cars into the future with Linux.md diff --git a/sources/talk/20160523 Driving cars into the future with Linux.md b/sources/talk/20160523 Driving cars into the future with Linux.md index 38ef546789..9b9d69d68c 100644 --- a/sources/talk/20160523 Driving cars into the future with Linux.md +++ b/sources/talk/20160523 Driving cars into the future with Linux.md @@ -1,81 +1,85 @@ -Driving cars into the future with Linux + +驾车通往未来Linux =========================================== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/open-snow-car-osdc-lead.png?itok=IgYZ6mNY) -I don't think much about it while I'm driving, but I sure do love that my car is equipped with a system that lets me use a few buttons and my voice to call my wife, mom, and children. That same system allows me to choose whether I listen to music streaming from the cloud, satellite radio, or the more traditional AM/FM radio. I also get weather updates and can direct my in-vehicle GPS to find the fastest route to my next destination. [In-vehicle infotainment][1], or IVI as it's known in the industry, has become ubiquitous in today's newest automobiles. -A while ago, I had to travel hundreds of miles by plane and then rent a car. Happily, I discovered that my rental vehicle was equipped with IVI technology similar to my own car. In no time, I was connected via Bluetooth, had uploaded my contacts into the system, and was calling home to let my family know I arrived safely and my hosts to let them know I was en route to their home. +当我开车的时候不认为和 Linux 有多大联系,但是我肯定我是喜欢一个配备有系统的车子,让我按几个按钮语音就可以传给我的妻子母亲以及孩子。同样,这样的系统可以让我选择是否从云端流媒体收听音乐,卫星广播,以及传统的 AM/FM 收音机。我也会得到天气更新以及可以给我的车载信息娱乐 GPS 找到最快的下一个目的地[In-vehicle infotainment][1],以及 IVI 作为行业知名产业,已经普及到最新的汽车生产商。 -In a recent [news roundup][2], Scott Nesbitt cited an article that said Ford Motor Company is getting substantial backing from a rival automaker for its open source [Smart Device Link][3] (SDL) middleware framework, which supports mobile phones. SDL is a project of the [GENIVI Alliance][4], a nonprofit committed to building middleware to support open source in-vehicle infotainment systems. According to [Steven Crumb][5], executive director of GENIVI, their [membership][6] is broad and includes Daimler Group, Hyundai, Volvo, Nissan, Honda, and 170 others. +前段时间,我不得坐飞机飞跃数百英里,租一辆车。令人愉快的是,我发现我的租凭车配置了 IVI 技术。任何时候,我只要通过蓝牙连接,上传联系人到系统中,打电话回家给我的家人,让他们知道我已经安全到家了。然后“主人“会知道我再途中还是已经到他们家了。 -In order to remain competitive in the industry, automotive companies need a middleware system that can support the various human machine interface technologies available to consumers today. Whether you own an Android, iOS, or other device, automotive OEMs want their units to be able to support these systems. Furthermore, these IVI systems must be adaptable enough to support the ever decreasing half-life of mobile technology. OEMs want to provide value and add services in their IVI stacks that will support a variety of options for their customers. Enter Linux and open source software. +在最近的 [news roundup][2],Scott Nesbitt 引用一篇文章,说福特汽车公司是由它的开源 [Smart Device Link][3](SDL)中间设备框架,对手汽车制造商,支持那个移动手机获得大量的支持。 SDL 是 [GENIVI Alliance][4] 的项目,一个非营利性的致力于建设中间件支持开源的车载信息娱乐系统。根据文献 [[Steven Crumb][5],GENIVI 执行董事,他们 [membership][6] 很广,包括 Daimler 集团,现代,沃尔沃,日产,本田等等 170 个。 -In addition to GENIVI's efforts, the [Linux Foundation][7] sponsors the [Automotive Grade Linux][8] (AGL) workgroup, a software foundation dedicated to finding open source solutions for automotive applications. Although AGL will initially focus on IVI systems, they envision branching out to include [telematics][9], heads up displays, and other control systems. AGL has over 50 members at this time, including Jaguar, Toyota, and Nissan, and in a [recent press release][10] announced that Ford, Mazda, Mitsubishi, and Subaru have joined. +为了在同行业中保持竞争力,汽车企业需要一个中间设备系统,可以支持当今消费者提供的各种人机界面技术。无论您拥有 Android,iOS 或其他设备,汽车 OEM 厂商希望自己的系统单位能够支持这些。此外,这些的 IVI 系统必须有足够适应能力以支持移动技术的不断下降,半衰期。 OEM 厂商要提供价值服务,并在他们的 IVI 堆栈支持各种为他们的客户添加选择。进入 Linux 和开源软件。 -To find out more, we interviewed two leaders in this emerging field. Specifically, we wanted to know how Linux and open source software are being used and if they are in fact changing the face of the automotive industry. First, we talk to [Alison Chaiken][11], a software engineer at Peloton Technology and an expert on automotive Linux, cybersecurity, and transparency. She previously worked for Mentor Graphics, Nokia, and the Stanford Linear Accelerator. Then, we chat with [Steven Crumb][12], executive director of GENIVI, who got started in open source in high-performance computing environments (supercomputers and early cloud computing). He says that though he's not a coder anymore, he loves to help organizations solve real business problems with open source software. +除了 GENIVI 的努力下,[Linux Foundation][7] 赞助 [Automotive Grade Linux][8](AGL)工作组,一个软件基金会,致力于寻找针对汽车应用的开源解决方案。虽然 AGL 初期将侧重于 IVI 系统,他们展望不同的分歧,包括 [telematics][9],小心显示器和其他控制系统。 AGL 有超过 50 名成员在这个时候,包括捷豹,丰田,日产,并在 [recent press release][10] 宣布福特、马自达、三菱、和斯巴鲁加入。 -### Interview with Alison Chaiken (by [Deb Nicholson][13]) -#### How did you get interested in the automotive software space? +为了了解更多信息,我们在这一新鲜兴领域采访了两位领导人。明确地来说,我们想知道是如何被使用的 Linux 和开源软件,如果它们实际上是改变汽车行业的面貌。首先,我们谈谈 [Alison Chaiken][11],在大集团技术的软件工程师和汽车 Linux 专家,网络安全和透明度。她曾任职于 [Alison Chaiken][11] 公司,诺基亚和斯坦福直线性加速器。然后我们用 [Steven Crumb][12],GENIVI 执行董事,谁得到了在开源环境高性能计算(超级计算机和早期的云计算)开始聊天。他说,虽然他再不是一个程序员了,但是他喜欢帮助企业解决开源软件的实际业务问题。 -I was working on [MeeGo][14] in phones at Nokia in 2009 when the project was cancelled. I thought, what's next? A colleague was working on [MeeGo-IVI][15], an early automotive Linux distribution. "Linux is going to be big in cars," I thought, so I headed in that direction. +### 采访 Alison Chaiken (by [Deb Nicholson][13]) -#### Can you tell us what aspects you're working on these days? +#### 你是如何开始对汽车软件空间感兴趣的? -I'm currently working for a startup on an advanced cruise control system that uses real-time Linux to increase the safety and fuel economy of big-rig trucks. I love working in this area, as no one would disagree that trucking can be improved. +我是在诺基亚手机产品时, 2009 年该项目被取消。我想,下一步是什么?一位同事正在对 [MeeGo-IVI][15],早期的汽车 Linux 发行版。 “Linux 在汽车是大了,” 我想,所以我在朝着这个方向努力。 -#### There have been a few stories about hacked cars in recent years. Can open source solutions help address this issue? +#### 你能告诉我们你这些日子工作在哪些方面? + +我目前正在启动为使用 Linux 系统增加大货车钻机的安全性和燃油经济性的先进巡航控制。我喜欢在这方面的工作,因为没有人会反对卡车得以提升。 + +#### 目前关于汽车已在近年来砍死几个人故事。开源代码方案可以帮助解决这个问题吗? I presented a talk on precisely this topic, on how Linux can (and cannot) contribute to security solutions in automotive at Southern California Linux Expo 2016 ([Slides][16]). Notably, GENIVI and Automotive Grade Linux have published their code and both projects take patches via Git. Please send your fixes upstream! Many eyes make all bugs shallow. +我提出的谈话正是这一主题,就如何 Linux 可以(或不可以)在南加州 2016 年世博会作出贡献的安全解决方案的 Linux汽车([Slides][16])。值得注意的是,GENIVI 和汽车级 Linux 已经公布了他们的代码,这两个项目的 Git 通过采取补丁。请上游发送您的修复!许多眼睛都盯着肤浅的bugs。 -#### Law enforcement agencies and insurance companies could find plenty of uses for data about drivers. How easy will it be for them to obtain this information? +#### 执法机构和保险公司可以找到很多有关数据用途的驱动程序。它将如何容易成为他们获取这些信息? -Good question. The Dedicated Short Range Communication Standard (IEEE-1609) takes great pains to keep drivers participating in Wi-Fi safety messaging anonymous. Still, if you're posting to Twitter from your car, someone will be able to track you. +好问题。该专用短程通信标准(IEEE-1609),以保持匿名的 Wi-Fi 安全消息驱动程序。不过,如果你从你的车张贴到 Twitter,有人能够跟踪你。 -#### What can developers and private citizens do to make sure civil liberties are protected as automotive technology evolves? +#### 有什么可以开发人员和公民个人一起完成,以确保公民自由受到保护作为汽车技术发展的? -The Electronic Frontier Foundation (EFF) has done an excellent job of keeping on top of automotive issues, having commented through official channels on what data may be stored in automotive "black boxes" and on how DMCA's Provision 1201 applies to cars. +电子前沿基金会(EFF)一样对汽车保持的问题上,通过什么样的数据可以存储在汽车 “黑盒子”,并在 DMCA 的规定 1201 如何应用于汽车官方渠道评论已经出色的工作了。 -#### What are some of the exciting things you see coming for drivers in the next few years? +#### 在未来几年令人兴奋的事情上,那些是你看到的驱动因素? -Adaptive cruise control and collision avoidance systems are enough of an advance to save lives. As they roll out through vehicle fleets, I truly believe that fatalities will decline. If that's not exciting, I don't know what is. Furthermore, capabilities like automated parking assist will make cars easier to drive and reduce fender-benders. +自适应巡航控制和防撞系统有足够的预付款来挽救生命。当他们通过运输车队的推出,我真的相信死亡人数会下降。如果这还不是令人兴奋的,我不知道是什么。此外,像自动化停车辅助功能,将会使汽车更容易驾驶,减少汽车相撞事故。 -#### What needs to be built and how can people get involved? +#### 有什么是需要人参与以及如何建造? -Automotive Grade Linux is developed in the open and runs on cheap hardware (e.g. Raspberry Pi 2 and moderately priced Renesas Porter board) that anyone can buy. GENIVI automotive Linux middleware consortium has lots of software publicly available via Git. Furthermore, there is the ultra cool [OSVehicle open hardware][17] automotive platform. +汽车 Linux 级开发是开放源代码的,运行在廉价硬件(如树莓派 Pi 2 和中等价位的 Renesas Porter board),任何人都可以购买。 GENIVI 汽车 Linux 的中间设备联盟有很多软件通过 Git 的公开。此外,还有很酷的 [OSVehicle open hardware][17] 汽车平台。 -#### There are many ways for Linux software and open hardware folks with moderate budgets to get involved. Join us at #automotive on Freenode IRC if you have questions. +#### 这里是 Linux 软件和开放硬件,许多方面具有中等人数预算的参与。如果您有任何疑问,加入我们在 Freenode 上 IRC#automotive。 -### Interview with Steven Crumb (by Don Watkins) +### 采访 Steven Crumb (by Don Watkins) -#### What's so huge about GENIVI's approach to IVI? +#### 关于GENIVI's 对 IVI 为什么那么大 ? -GENIVI filled a huge gap in the automotive industry by pioneering the use of free and open source software, including Linux, for non-safety-critical automotive software like in-vehicle infotainment (IVI) systems. As consumers came to expect the same functionality in their vehicles as on their smartphones, the amount of software required to support IVI functions grew exponentially. The increased amount of software has also increased the costs of building the IVI systems and thus slowed time to market. +GENIVI 率先通过使用自由和开源软件,包括 Linux,像车载信息娱乐(IVI)系统的非安全关键汽车软件填补了汽车行业的巨大差距。作为消费者来到期望在他们的车辆相同的功能在智能手机上的软件,以支持 IVI 功能所需的量成倍增长。软件增加量也增加了建设 IVI 系统的成本,从而延缓了上市时间。 -GENIVI's use of open source software and a community development model has saved automakers and their software suppliers significant amounts of money while significantly reducing the time to market. I'm excited about GENIVI because we've been fortunate to lead a revolution of sorts in the automotive industry by slowly evolving organizations from a highly structured and proprietary methodology to a community-based approach. We're not done yet, but it's been a privilege to take part in a transformation that is yielding real benefits. +GENIVI 的使用开源软件和社区发展模式节省了汽车制造商和他们的软件提供商显著大量的资金,而显著减少了产品上市时间。我很兴奋,因为 GENIVI 我们很幸运慢慢从高度结构化和专有的方法来社区为基础的方法不断发展的组织​​领导排序在汽车行业的一场革命。我们还没有完成,但它一直是一个荣幸参加正在产生实实在在的好处的转换。 -#### How do your major members drive the direction of GENIVI? +#### 你的庞大会员怎么才可以驱动 GENIVI 方向? -GENIVI has a lot of members and non-members contributing to our work. As with many open source projects, any company can influence the technical output by simply contributing code, patches, and time to test. With that said, BMW, Mercedes-Benz, Hyundai Motor, Jaguar Land Rover, PSA, Renault/Nissan, and Volvo are all active adopters of and contributors to GENIVI—and many other OEMs have IVI solutions in their cars that extensively use GENIVI's software. +GENIVI 有很多会员和非会员促进我们的工作。与许多开源项目,任何公司都可以通过简单地贡献代码,修补程序和时间来检验影响的技术输出。随着中说,宝马,奔驰,现代汽车,捷豹路虎,标致雪铁龙,雷诺 / 日产和沃尔沃是所有积极采用者和贡献者 GENIVI 和其他许多 OEM 厂商已经在他们的汽车 IVI 解决方案,广泛使用 GENIVI 的软件。 -#### What licenses cover the contributed code? +#### 贡献的代码使用了什么许可证? -GENIVI employs a number of licenses ranging from (L)GPLv2 to MPLv2 to Apache 2.0. Some of our tools use the Eclipse license. We have a [public licensing policy][18] that details our licensing preferences. +GENIVI 采用数量的许可证从(L)GPLv2 许可,以 MPLv2 到 Apache2.0。我们的一些工具使用 Eclipse 许可证。我们有一个[public licensing policy][18],详细说明我们的许可偏好。 -#### How does a person or group get involved? How important are community contributions to the ongoing success of the project? +#### 一个人或一群人如何参与其中?重要的是如何对项目的持续成功的社区贡献? -GENIVI does its development completely in the open ([projects.genivi.org][19]) and thus, anyone interested in using open software in automotive is welcome to participate. That said, the alliance can fund its continued development in the open through companies [joining GENIVI][20] as members. GENIVI members enjoy a wide variety of benefits, not the least of which is participation in the global community of 140 companies that has been developed over the last six years. +GENIVI 完全做它开放发展的在([projects.genivi.org][19]),因此,有兴趣的人在汽车使用开源软件,欢迎参加。这就是说,该联盟能够通过公司 [joining GENIVI][20] 作为成员不断发展的开放基金。 GENIVI 会员享受各种各样的福利,而不是其中最重要的是在已经发展了近六年来 140 家公司全球社区参与。 -Community is hugely important to GENIVI, and we could not have produced and maintained the valuable software we developed over the years without an active community of contributors. We've worked hard to make contributing to GENIVI as simple as joining an [email list][21] and connecting to the people in the various software projects. We use standard practices employed by many open source projects and provide high-quality tools and infrastructure to help developers feel at home and be productive. +社区是 GENIVI 非常重要的,我们不可能生产和维护我们发展了很多年没有贡献者一个活跃的社区有价值的软件。我们努力做出贡献 GENIVI 简单,只要加入一个 [邮件列表] [21] 并连接到人们在不同的软件项目。我们使用许多开源项目采用的标准做法,并提供高质量的工具和基础设施,以帮助开发人员有宾至如归的感觉,并富有成效。 -Regardless of someone's familiarity with the automotive software, they are welcome to join our community. People have modified cars for years, so for many people there is a natural draw to anything automotive. Software is the new domain for cars, and GENIVI wants to be the open door for anyone interested in working with automotive, open source software. +无论在汽车软件某人的熟悉,欢迎他们加入我们的社区。人们已经改装车多年,所以对于许多人来说,是一种天然的抽奖,任何汽车。软件是汽车的新域,GENIVI 希望成为敞开的门有兴趣的人与汽车,开源软件的工作。 ------------------------------- via: https://opensource.com/business/16/5/interview-alison-chaiken-steven-crumb 作者:[Don Watkins][a] -译者:[译者ID](https://github.com/译者ID) +译者:[erlinux](https://github.com/erlinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/talk/20160523 Driving cars into the future with Linux.md b/translated/talk/20160523 Driving cars into the future with Linux.md new file mode 100644 index 0000000000..9b9d69d68c --- /dev/null +++ b/translated/talk/20160523 Driving cars into the future with Linux.md @@ -0,0 +1,108 @@ + +驾车通往未来Linux +=========================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/open-snow-car-osdc-lead.png?itok=IgYZ6mNY) + + +当我开车的时候不认为和 Linux 有多大联系,但是我肯定我是喜欢一个配备有系统的车子,让我按几个按钮语音就可以传给我的妻子母亲以及孩子。同样,这样的系统可以让我选择是否从云端流媒体收听音乐,卫星广播,以及传统的 AM/FM 收音机。我也会得到天气更新以及可以给我的车载信息娱乐 GPS 找到最快的下一个目的地[In-vehicle infotainment][1],以及 IVI 作为行业知名产业,已经普及到最新的汽车生产商。 + +前段时间,我不得坐飞机飞跃数百英里,租一辆车。令人愉快的是,我发现我的租凭车配置了 IVI 技术。任何时候,我只要通过蓝牙连接,上传联系人到系统中,打电话回家给我的家人,让他们知道我已经安全到家了。然后“主人“会知道我再途中还是已经到他们家了。 + +在最近的 [news roundup][2],Scott Nesbitt 引用一篇文章,说福特汽车公司是由它的开源 [Smart Device Link][3](SDL)中间设备框架,对手汽车制造商,支持那个移动手机获得大量的支持。 SDL 是 [GENIVI Alliance][4] 的项目,一个非营利性的致力于建设中间件支持开源的车载信息娱乐系统。根据文献 [[Steven Crumb][5],GENIVI 执行董事,他们 [membership][6] 很广,包括 Daimler 集团,现代,沃尔沃,日产,本田等等 170 个。 + +为了在同行业中保持竞争力,汽车企业需要一个中间设备系统,可以支持当今消费者提供的各种人机界面技术。无论您拥有 Android,iOS 或其他设备,汽车 OEM 厂商希望自己的系统单位能够支持这些。此外,这些的 IVI 系统必须有足够适应能力以支持移动技术的不断下降,半衰期。 OEM 厂商要提供价值服务,并在他们的 IVI 堆栈支持各种为他们的客户添加选择。进入 Linux 和开源软件。 + +除了 GENIVI 的努力下,[Linux Foundation][7] 赞助 [Automotive Grade Linux][8](AGL)工作组,一个软件基金会,致力于寻找针对汽车应用的开源解决方案。虽然 AGL 初期将侧重于 IVI 系统,他们展望不同的分歧,包括 [telematics][9],小心显示器和其他控制系统。 AGL 有超过 50 名成员在这个时候,包括捷豹,丰田,日产,并在 [recent press release][10] 宣布福特、马自达、三菱、和斯巴鲁加入。 + + +为了了解更多信息,我们在这一新鲜兴领域采访了两位领导人。明确地来说,我们想知道是如何被使用的 Linux 和开源软件,如果它们实际上是改变汽车行业的面貌。首先,我们谈谈 [Alison Chaiken][11],在大集团技术的软件工程师和汽车 Linux 专家,网络安全和透明度。她曾任职于 [Alison Chaiken][11] 公司,诺基亚和斯坦福直线性加速器。然后我们用 [Steven Crumb][12],GENIVI 执行董事,谁得到了在开源环境高性能计算(超级计算机和早期的云计算)开始聊天。他说,虽然他再不是一个程序员了,但是他喜欢帮助企业解决开源软件的实际业务问题。 + +### 采访 Alison Chaiken (by [Deb Nicholson][13]) + +#### 你是如何开始对汽车软件空间感兴趣的? + +我是在诺基亚手机产品时, 2009 年该项目被取消。我想,下一步是什么?一位同事正在对 [MeeGo-IVI][15],早期的汽车 Linux 发行版。 “Linux 在汽车是大了,” 我想,所以我在朝着这个方向努力。 + +#### 你能告诉我们你这些日子工作在哪些方面? + +我目前正在启动为使用 Linux 系统增加大货车钻机的安全性和燃油经济性的先进巡航控制。我喜欢在这方面的工作,因为没有人会反对卡车得以提升。 + +#### 目前关于汽车已在近年来砍死几个人故事。开源代码方案可以帮助解决这个问题吗? + +I presented a talk on precisely this topic, on how Linux can (and cannot) contribute to security solutions in automotive at Southern California Linux Expo 2016 ([Slides][16]). Notably, GENIVI and Automotive Grade Linux have published their code and both projects take patches via Git. Please send your fixes upstream! Many eyes make all bugs shallow. +我提出的谈话正是这一主题,就如何 Linux 可以(或不可以)在南加州 2016 年世博会作出贡献的安全解决方案的 Linux汽车([Slides][16])。值得注意的是,GENIVI 和汽车级 Linux 已经公布了他们的代码,这两个项目的 Git 通过采取补丁。请上游发送您的修复!许多眼睛都盯着肤浅的bugs。 + +#### 执法机构和保险公司可以找到很多有关数据用途的驱动程序。它将如何容易成为他们获取这些信息? + +好问题。该专用短程通信标准(IEEE-1609),以保持匿名的 Wi-Fi 安全消息驱动程序。不过,如果你从你的车张贴到 Twitter,有人能够跟踪你。 + +#### 有什么可以开发人员和公民个人一起完成,以确保公民自由受到保护作为汽车技术发展的? + +电子前沿基金会(EFF)一样对汽车保持的问题上,通过什么样的数据可以存储在汽车 “黑盒子”,并在 DMCA 的规定 1201 如何应用于汽车官方渠道评论已经出色的工作了。 + +#### 在未来几年令人兴奋的事情上,那些是你看到的驱动因素? + +自适应巡航控制和防撞系统有足够的预付款来挽救生命。当他们通过运输车队的推出,我真的相信死亡人数会下降。如果这还不是令人兴奋的,我不知道是什么。此外,像自动化停车辅助功能,将会使汽车更容易驾驶,减少汽车相撞事故。 + +#### 有什么是需要人参与以及如何建造? + +汽车 Linux 级开发是开放源代码的,运行在廉价硬件(如树莓派 Pi 2 和中等价位的 Renesas Porter board),任何人都可以购买。 GENIVI 汽车 Linux 的中间设备联盟有很多软件通过 Git 的公开。此外,还有很酷的 [OSVehicle open hardware][17] 汽车平台。 + +#### 这里是 Linux 软件和开放硬件,许多方面具有中等人数预算的参与。如果您有任何疑问,加入我们在 Freenode 上 IRC#automotive。 + +### 采访 Steven Crumb (by Don Watkins) + +#### 关于GENIVI's 对 IVI 为什么那么大 ? + +GENIVI 率先通过使用自由和开源软件,包括 Linux,像车载信息娱乐(IVI)系统的非安全关键汽车软件填补了汽车行业的巨大差距。作为消费者来到期望在他们的车辆相同的功能在智能手机上的软件,以支持 IVI 功能所需的量成倍增长。软件增加量也增加了建设 IVI 系统的成本,从而延缓了上市时间。 + +GENIVI 的使用开源软件和社区发展模式节省了汽车制造商和他们的软件提供商显著大量的资金,而显著减少了产品上市时间。我很兴奋,因为 GENIVI 我们很幸运慢慢从高度结构化和专有的方法来社区为基础的方法不断发展的组织​​领导排序在汽车行业的一场革命。我们还没有完成,但它一直是一个荣幸参加正在产生实实在在的好处的转换。 + +#### 你的庞大会员怎么才可以驱动 GENIVI 方向? + +GENIVI 有很多会员和非会员促进我们的工作。与许多开源项目,任何公司都可以通过简单地贡献代码,修补程序和时间来检验影响的技术输出。随着中说,宝马,奔驰,现代汽车,捷豹路虎,标致雪铁龙,雷诺 / 日产和沃尔沃是所有积极采用者和贡献者 GENIVI 和其他许多 OEM 厂商已经在他们的汽车 IVI 解决方案,广泛使用 GENIVI 的软件。 + +#### 贡献的代码使用了什么许可证? + +GENIVI 采用数量的许可证从(L)GPLv2 许可,以 MPLv2 到 Apache2.0。我们的一些工具使用 Eclipse 许可证。我们有一个[public licensing policy][18],详细说明我们的许可偏好。 + +#### 一个人或一群人如何参与其中?重要的是如何对项目的持续成功的社区贡献? + +GENIVI 完全做它开放发展的在([projects.genivi.org][19]),因此,有兴趣的人在汽车使用开源软件,欢迎参加。这就是说,该联盟能够通过公司 [joining GENIVI][20] 作为成员不断发展的开放基金。 GENIVI 会员享受各种各样的福利,而不是其中最重要的是在已经发展了近六年来 140 家公司全球社区参与。 + +社区是 GENIVI 非常重要的,我们不可能生产和维护我们发展了很多年没有贡献者一个活跃的社区有价值的软件。我们努力做出贡献 GENIVI 简单,只要加入一个 [邮件列表] [21] 并连接到人们在不同的软件项目。我们使用许多开源项目采用的标准做法,并提供高质量的工具和基础设施,以帮助开发人员有宾至如归的感觉,并富有成效。 + +无论在汽车软件某人的熟悉,欢迎他们加入我们的社区。人们已经改装车多年,所以对于许多人来说,是一种天然的抽奖,任何汽车。软件是汽车的新域,GENIVI 希望成为敞开的门有兴趣的人与汽车,开源软件的工作。 + +------------------------------- +via: https://opensource.com/business/16/5/interview-alison-chaiken-steven-crumb + +作者:[Don Watkins][a] +译者:[erlinux](https://github.com/erlinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[1]: https://en.wikipedia.org/wiki/In_car_entertainment +[2]: https://opensource.com/life/16/1/weekly-news-jan-9 +[3]: http://projects.genivi.org/smartdevicelink/home +[4]: http://www.genivi.org/ +[5]: https://www.linkedin.com/in/stevecrumb +[6]: http://www.genivi.org/genivi-members +[7]: http://www.linuxfoundation.org/ +[8]: https://www.automotivelinux.org/ +[9]: https://en.wikipedia.org/wiki/Telematics +[10]: https://www.automotivelinux.org/news/announcement/2016/01/ford-mazda-mitsubishi-motors-and-subaru-join-linux-foundation-and +[11]: https://www.linkedin.com/in/alison-chaiken-3ba456b3 +[12]: https://www.linkedin.com/in/stevecrumb +[13]: https://opensource.com/users/eximious +[14]: https://en.wikipedia.org/wiki/MeeGo +[15]: http://webinos.org/deliverable-d026-target-platform-requirements-and-ipr/automotive/ +[16]: http://she-devel.com/Chaiken_automotive_cybersecurity.pdf +[17]: https://www.osvehicle.com/ +[18]: http://projects.genivi.org/how +[19]: http://projects.genivi.org/ +[20]: http://genivi.org/join +[21]: http://lists.genivi.org/mailman/listinfo/genivi-projects From 8c2d63ac7dd0766b638584521c6b0b53519e8c28 Mon Sep 17 00:00:00 2001 From: J L Date: Thu, 23 Jun 2016 21:10:33 +0800 Subject: [PATCH 1591/1710] =?UTF-8?q?[Translation=20Complete]=20Mark=20Shu?= =?UTF-8?q?ttleworth=20=E2=80=93=20Ubuntu=20=E6=93=8D=E4=BD=9C=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E8=83=8C=E5=90=8E=E7=9A=84=E4=BA=BA=20(#4082)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Translation Complete] Mark Shuttleworth – Ubuntu 操作系统背后的人 * Revert "[Translation Complete] Mark Shuttleworth – Ubuntu 操作系统背后的人" This reverts commit 340e5cfbb029298d49752be82de8cb029968e639. * Revert "Revert "[Translation Complete] Mark Shuttleworth – Ubuntu 操作系统背后的人"" This reverts commit 2cca4b38823f93e61947c2e4b347fdf584d4331f. * [Translation Complete] Mark Shuttleworth – Ubuntu 操作系统背后的人 --- ...-The Man Behind Ubuntu Operating System.md | 121 ----------------- ...-The Man Behind Ubuntu Operating System.md | 126 ++++++++++++++++++ 2 files changed, 126 insertions(+), 121 deletions(-) delete mode 100644 sources/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md create mode 100644 translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.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 deleted file mode 100644 index 508b68c176..0000000000 --- a/sources/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md +++ /dev/null @@ -1,121 +0,0 @@ -Translating by [jerryling315](https://github.com/jerryling315) - -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/ diff --git a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md b/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md new file mode 100644 index 0000000000..009641458c --- /dev/null +++ b/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md @@ -0,0 +1,126 @@ +Mark Shuttleworth – Ubuntu 操作系统背后的人 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Mark-Shuttleworth-652x445.jpg) + +**Mark Richard Shuttleworth** 是 Ubuntu 的创始人,他也有事被称作是 Debian 背后的那个人。他出生于1973年的 Welkom,南非。他不仅是个企业家,还是个太空游客——他是第一个前往太空旅行的独立非洲国家公民。 + +Mark 还在1996年成立了 **Thawte**,一家互联网安全企业,那是他还只是 University of Cape Town 的一名金融/IT学生。 + +在2000年,Mark 创立了 HBD,一家投资公司,同时他还创立了 Shuttleworth基金会,致力于给社会中有创新性的领袖提供资助——以奖金和投资等形式。 + + +> "移动设备对于个人电脑行业的未来而言至关重要。比如就在这个月,数据清晰地表明相对于平板电脑的发展,传统 PC 行业正在萎缩。所以如果我们想和个人电脑行业有关系,我们必须和移动设备行业有产生联系。移动互联网行业之所以有趣,还因为在这里没有盗版 Windows 操作系统。所以如果你为你的操作系统赢得了一台设备的市场份额,这台设备会持续使用你的操作系统。在传统 PC 行业,我们时不时得和 ‘免费 Windows’ 产生竞争,这一竞争困难的非常微妙。所以我们现在的目标是围绕 Ubuntu 和移动设备——手机和平板——为用户打造更深度的生态环境。" +> +> — Mark Shuttleworth + +在2002年,在俄罗斯的 Star City 接收完为期一年的训练后,他作为 Soyuz 任务代号 TM-34 的一员飞往了国际空间站。再后来,在面向有志于航空航天或者其科学相关的南非学生群体中,内完成了推广科学,编程,数学的演讲后,Mark 创立了 **Canonical Ltd**。此后直至2013年,他一直在领导 Ubuntu 操作系统的开发。 + + +现今,Shuttleworth 有英国与南非双重国籍并和18只可爱的鸭子住在英国的 Isle of Man 小岛上一处花园,一同的还有他一样可爱的女友 Claire,2 条黑母狗以及时不时经过的羊群。 + + +> "电脑不再只是一台电子设备了。他现在是你思维的延续,以及通向他人的入口。" +> +> — Mark Shuttleworth + +### Mark Shuttleworth 的早年生活### +正如我们之前提到的,Mark 出生在 Welkom,南非的橙色自由州。他是一名外科医生和护士学校教师的孩子。Mark 在 Western Province Preparatory School 就读并在1986年成为了学生会主席,一个学期后就读于 Rondebosch 男子高中,再之后入学 Bishops/Diocesan 学院并在1991年再次成为那里的学生会主席。 + +Mark 在 University of Cape Town 拿到了 Bachelor of Business Science degree in the Finance and Information Systems (译者:商业科学里的双学士学位,两个学科分别是金融和信息系统),他在学校就读是住在 Smuts Hall。他,作为学生,也在那里帮助安装了学校的第一条宿舍网络。 + +>“有无数的企业和国家佐证,引入开源政策能提高竞争力和效率。在不同层面上创造生产力对于公司和国家而言都是至关重要的。” +> +> — Mark Shuttleworth + +### Mark Shuttleworth 的职业生涯 ### + +Mark 在1995年创立 Thawte,公司专注于数字证书和互联网安全,然后他在1999年把公司卖给了 VeriSign,赚取了大约 5.75 亿美元。 + +2000年的时候,Mark 创立了 HBD 风险资本公司,这项事业成为了投资方和项目孵化器。2004年的时候,他创立了 Canonical Ltd. 以支持和鼓励自由软件开发项目的商业化,特别是 Ubuntu 操作系统的项目。直到2009年,Mark 才从 Canonical CEO 的位置上退下。 + +> “在 [DDC](https://en.wikipedia.org/wiki/DCC_Alliance) (译者:一个 Debian Gnu/Linux 开发者联盟) 的早期,我更倾向于让开发者做些他们自己的(内核开发)工作看看能弄出些什么。现在我们基本上已经完成了这个开发阶段了。” +> +> — Mark Shuttleworth + +### Linux、免费开源软件 与 Mark Shuttleworth ### + +在90年代末,Mark 作为 Debian 系统开发者的一员参与了项目。 + +2001年,Mark 创立了 Shuttleworth 基金会,这是个扎根南非的,非赢利性,专注于赞助社会创新,免费/教育用途开源软件的基金会,赞助过的项目包括 Freedom Toaster。 + +2004年的时候,Mark 通过出资开发 基于 Debian 的 Ubuntu 操作系统回归了免费软件界,这一切也经由他的公司,Canonical,完成。 + +2005年,Mark 出资建立了 Ubuntu 基金会并投入了一千万美元作为启动资金。在 Ubuntu 项目内,Mark 经常被一个朗朗上口的名字称呼——“**SABDFL (Self-Appointed Benevolent Dictator for Life)**”。为了能够找到足够多的能手开发这个巨大的项目,Mark 花费了6个月的时间在 Debian 的邮件列表里找到能手,这一切都是在他乘坐在南极洲的一艘破冰船——Kapitan Khlebnikov——上完成的。2005年,Mark 买下了 Impi Linux 65% 的股份。 + + +> “我呼吁电信公司的掌权者们尽快开发出跨洲际的高效信息传输服务。” +> +> — Mark Shuttleworth + +2006年,KDE 宣布 Shuttleworth 成为第一位 **patron** 级别赞助者——彼时 KDE 最高级别的赞助。这一赞助协议终止与2012年,取而代之的是 Kubuntu——一个运用 KDE 作为默认桌面环境的 Ubuntu 变种——的资金。 + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/shuttleworth-kde.jpg) + +2009年,Shuttleworth 宣布他会从 CEO 退位以更好的关注与合作伙伴,产品设计和顾客体验。Jane Silber ——2004年起公司的COO——晋升CEO。 + +2010年,Mark 由于 Ubuntu 项目从 Open University 收到了荣誉学位。 + +2012年,Mark 和 Kenneth Rogoff 一同在牛津大学与 Peter Thiel 和 Garry Kasparov 就 **创新悖论**(The Innovation Enigma)展开辩论。 + +2013年,Mark 和 Ubuntu 一同被授予 **澳大利亚反个人隐私老大哥监控奖**(Austrian anti-privacy Big Brother Award),理由为把 Ubuntu 会把 Unity 桌面的搜索框的搜索结果发往 Canonical 服务器(译者:因此侵犯了个人隐私)。而一年前的2012年,Mark 曾经申明过这一过程极具匿名性。 + + +> “所有主流 PC 厂家现在都提供 Ubuntu 预安装选项。所以我们和业界的合作已经相当紧密了。但那些 PC 厂家对于给买家推广新东西这件事都很紧张。如果我们可以让买家习惯 Ubuntu 的桌面/平板/手机操作系统的体验,那他们也应该更愿意买预装 Ubuntu 的设备。因为没有哪个操作系统是通过抄袭模仿获得成功的。Android 很棒,如果我们想成功的话我们必须给市场带去更新更好的东西。整个环境都有停滞发展的危险,如果我们中没有人追寻未来的话。但如果你尝试去追寻未来了,那你必须接受不是所有人对未来的预见都和你一样这一事实。” +> +> — Mark Shuttleworth + +### Mark Shuttleworth 的太空之旅 ### + +Mark 在2002年由于作为世界第二名自费太空游客而闻名世界,同时他也是南非第一个旅行太空的人。这趟旅行 Mark 作为俄罗斯 Soyuz TM-34 的一名航空参与者加入,并支付了约两千万美元。2天后,Soyuz 太空梭抵达了国际空间站,在那里 Mark 呆了8天并参与了 AIDS 和 GENOME 研究的相关实验。2002年的晚些时候,Mark 乘坐 Soyuz TM-33 返回了地球。为了参与这趟旅行,Mark 花了一年时间准备与训练,包括7个月居住在俄罗斯的 Start City。 + + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Mark-Shuttleworth1.jpg) + +在太空中,Mark 与 Nelson Mandela 和另一个南非女孩 Michelle Foster (她问 Mark 要不要娶她)通过无线电进行了交谈。Mark 回避了结婚问题,在换话题之前他说他感到很荣幸。身患绝症的 Forster 和 Nelson Mandela 通过 Dream 基金会的赞助获得了与 Mark 交谈的机会。 + +归来后,Mark 在世界各地做了旅行,并和各地的学生就太空之旅发表了感言。 + + +>“粗略的统计数据表明 Ubuntu 的实际用户依然在增长。而我们的合作方——Dell,HP,Lenovo 和其他硬件生产商,以及游戏厂商 EA,Valve 都在加入我们——这让我觉得我们在引导一项很有意义的事业。” +> +> — Mark Shuttleworth + +### Mark Shuttleworth 的交通工具 ### + +Mark 有他自己的私人客机,Bombardier Global Express,经常被称为 Canonical 一号,但事实上此飞机是通过 HBD 风险投资公司注册拥有的。飞机侧面的喷绘龙图案是 HBD 风投公司的吉祥物,Norman。 + +### 与南非储蓄银行的法律冲突 ### + +在从南非转移25亿南非兰特去往 Isle of Man 的过程中,南非储蓄银行征收了 2.5 亿南非兰特的税金。Mark 上诉了,经过冗长的法庭唇枪舌战,南非储蓄银行被勒令返还 2.5 亿征税,以及其利息。Mark 宣布他会把这 2.5 亿存入信托基金,以用于帮助上诉宪法法院的案子。 + + +> “离境征税倒也不和宪法冲突。但离境征税的主要目的不是为了提高税收,而是通过监管资金流出来保护本国经济。” +> +> — 法官 Dikgang Moseneke + +2015年,南非宪法法院修正了低级法院的判决结果,并宣布了上述对于离岸征税的理解。 + +### Mark Shuttleworth 喜欢的东西 ### + +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 不喜欢的东西 ### + +Admin, salary negotiations, legalese, and public speaking. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/mark-shuttleworth-man-behind-ubuntu-operating-system/ + +作者:[M.el Khamlichi][a] +译者:[jerryling315](https://blog.moelf.xyz) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/pirat9/ From 9b03998194c7224f40ed6ac07762056f315281a9 Mon Sep 17 00:00:00 2001 From: "Cathon.ZHD" Date: Thu, 23 Jun 2016 23:08:26 +0800 Subject: [PATCH 1592/1710] translated --- ...re contributing to open source projects.md | 64 ------------------- ...re contributing to open source projects.md | 62 ++++++++++++++++++ 2 files changed, 62 insertions(+), 64 deletions(-) delete mode 100644 sources/talk/20160510 65% of companies are contributing to open source projects.md create mode 100644 translated/talk/20160510 65% of companies are contributing to open source projects.md diff --git a/sources/talk/20160510 65% of companies are contributing to open source projects.md b/sources/talk/20160510 65% of companies are contributing to open source projects.md deleted file mode 100644 index 886c3399b9..0000000000 --- a/sources/talk/20160510 65% of companies are contributing to open source projects.md +++ /dev/null @@ -1,64 +0,0 @@ -65% of companies are contributing to open source projects -========================================================== -[Cathon is translating...] - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUSINESS_openseries.png?itok=s7lXChId) - -This year marks the 10th annual Future of Open Source Survey to examine trends in open source, hosted by Black Duck and North Bridge. The big takeaway from the survey this year centers around the mainstream acceptance of open source today and how much has changed over the last decade. - -The [2016 Future of Open Source Survey][1] analyzed responses from nearly 3,400 professionals. Developers made their voices heard in the survey this year, comprising roughly 70% of the participants. The group that showed exponential growth were security professionals, whose participation increased by over 450%. Their participation shows the increasing interest in ensuring that the open source community pays attention to security issues in open source software and securing new technologies as they emerge. - -Black Duck's [Open Source Rookies][2] of the Year awards identify some of these emerging technologies, like Docker and Kontena in containers. Containers themselves have seen huge growth this year–76% of respondents say their company has some plans to use containers. And an amazing 59% of respondents are already using containers in a variety of deployments, from development and testing to internal and external production environment. The developer community has embraced containers as a way to get their code out quickly and easily. - -It's not surprising that the survey shows a miniscule number of organizations having no developers contributing to open source software. When large corporations like Microsoft and Apple open source some of their solutions, developers gain new opportunities to participate in open source. I certainly hope this trend will continue, with more software developers contributing to open source projects at work and outside of work. - -### Highlights from the 2016 survey - -#### Business value - -* Open source is an essential element in development strategy with more than 65% of respondents relying on open source to speed development. -* More than 55% leverage open source within their production environments. - -#### Engine for innovation - -* Respondents reported use of open source to drive innovation through faster, more agile development; accelerated time to market and vastly superior interoperability. -* Additional innovation is afforded by open source's quality of solutions; competitive features and technical capabilities; and ability to customize. - -#### Proliferation of open source business models and investment - -* More diverse business models are emerging that promise to deliver more value to open source companies than ever before. They are not as dependent on SaaS and services/support. -* Open source private financing has increased almost 4x in five years. - -#### Security and management - -The development of best-in-class open source security and management practices has not kept pace with growth in adoption. Despite a proliferation of expensive, high-profile open source breaches in recent years, the survey revealed that: - -* 50% of companies have no formal policy for selecting and approving open source code. -* 47% of companies don’t have formal processes in place to track open source code, limiting their visibility into their open source and therefore their ability to control it. -* More than one-third of companies have no process for identifying, tracking or remediating known open source vulnerabilities. - -#### Open source participation on the rise - -The survey revealed an active corporate open source community that spurs innovation, delivers exponential value and shares camaraderie: - -* 67% of respondents report actively encouraging developers to engage in and contribute to open source projects. -* 65% of companies are contributing to open source projects. -* One in three companies have a fulltime resource dedicated to open source projects. -* 59% of respondents participate in open source projects to gain competitive edge. - -Black Duck and North Bridge learned a great deal this year about security, policy, business models and more from the survey, and we’re excited to share these findings. Thank you to our many collaborators and all the respondents for taking the time to take the survey. It’s been a great ten years, and I am happy that we can safely say that the future of open source is full of possibilities. - -Learn more, see the [full results][3]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/5/2016-future-open-source-survey - -作者:[Haidee LeClair][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -[a]: https://opensource.com/users/blackduck2016 -[1]: http://www.slideshare.net/blackducksoftware/2016-future-of-open-source-survey-results -[2]: https://info.blackducksoftware.com/OpenSourceRookies2015.html -[3]: http://www.slideshare.net/blackducksoftware/2016-future-of-open-source-survey-results%C2%A0 diff --git a/translated/talk/20160510 65% of companies are contributing to open source projects.md b/translated/talk/20160510 65% of companies are contributing to open source projects.md new file mode 100644 index 0000000000..03290b0e97 --- /dev/null +++ b/translated/talk/20160510 65% of companies are contributing to open source projects.md @@ -0,0 +1,62 @@ +65% 的企业正致力于开源项目 +========================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUSINESS_openseries.png?itok=s7lXChId) + +今年 Black Duck 和 North Bridge 发布了第十届年度开源软件前景调查,来检验开源软件的发展趋势。今年这份调查的亮点在于,当前主流社会对开源软件的接受程度以及过去的十年中人们对开源软件态度的变化。 + +[2016 年的开源软件前景调查][1],分析了来自约3400位专家的反馈。今年的调查中,开发者发表了他们的看法,包括了大约 70% 的参与者。数据显示,安全专家的参与人数呈指数级增长,增长超过 450% 。他们的参与表明,开源社区开始逐渐关注开源软件中存在的安全问题,以及当新的技术出现时确保它们的安全性。 + +Black Duck 的年度 [开源新秀奖][2] 涉及到一些新出现的技术,如 Docker 和 Kontena 容器。容器技术这一年有了巨大的发展 ———— 76% 的受访者表示,他们的企业有一些使用容器技术的规划。而 59% 的受访者正准备使用容器技术完成大量的部署,从开发与测试,到内部与外部的生产环境部署。开发者社区已经把容器技术作为一种简单快速开发的方法。 + +调查显示,几乎每个组织都有开发者致力于开源软件,这一点毫不惊讶。当像微软和苹果这样的大公司将它们的一些解决方案开源时,开发者就获得了更多的机会来参与开源项目。我非常希望这样的趋势会延续下去,让更多的软件开发者无论在工作中,还是工作之余都可以致力于开源项目。 + +### 2016 年调查结果中的一些要点 + +#### 商业价值 + +* 开源软件是发展战略中的一个重要元素,超过 65% 的受访者使用开源软件来加速软件开发的进度。 +* 超过 55% 的受访者在生产环境中使用开源软件。 + +#### 创新的原动力 + +* 受访者表示,开源软件的使用让软件开发更加快速灵活,从而推进了创新;同时加速了软件推向市场的时间,也极大地减少了与上司沟通的时间。 +* 开源软件的优质解决方案,富有竞争力的特性,技术能力,以及可定制化的能力,也促进了更多的创新。 + +#### 开源商业模式与投资的激增 + +* 更多不同商业模式的出现给开源企业带来了前所未有的价值。这些价值并不依赖于云服务和技术支持。 +* 开源的私募融资在过去的五年内,已增长了将近四倍。 + +#### 安全和管理 + +一流的开源安全与管理实践的发展,并没有跟上人们使用开源不断增长的步伐。尽管备受关注的开源项目近年来爆炸式地增长,调查结果却指出: + +* 50% 的企业在选择和批准开源代码这方面没有出台正式的政策。 +* 47% 的企业没有正式的流程来跟踪开源代码,这就限制了它们对开源代码的了解,以及控制开源代码的能力。 +* 超过三分之一的企业没有用于识别,跟踪,和修复重大开源安全漏洞的流程。 + +#### 不断增长的开源参与者 + +调查结果显示,一个活跃的企业开源社区,激励创新,提供价值,共享情谊: + +* 67% 的受访者表示,它们积极鼓励开发者参与开源项目。 +* 65% 的企业正致力于开源项目。 +* 约三分之一的企业有专门为开源项目设置的全职岗位。 +* 59% 的受访者参与开源项目以获得竞争优势。 + +Black Duck 和 North Bridge 从今年的调查中了解了很多,如安全,政策,商业模式等。我们很兴奋能够分享这些新发现。感谢我们的合作者,以及所有参与我们调查的受访者。这是一个伟大的十年,我很高兴我们可以肯定地说,开源的未来充满了无限可能。 + +想要了解更多内容,可以查看完整的[调查结果][3]。 +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/16/5/2016-future-open-source-survey + +作者:[Haidee LeClair][a] +译者:[Cathon](https://github.com/Cathon) +校对:[校对者ID](https://github.com/校对者ID) + +[a]: https://opensource.com/users/blackduck2016 +[1]: http://www.slideshare.net/blackducksoftware/2016-future-of-open-source-survey-results +[2]: https://info.blackducksoftware.com/OpenSourceRookies2015.html +[3]: http://www.slideshare.net/blackducksoftware/2016-future-of-open-source-survey-results%C2%A0 From bdc220e1cea94b96a3938a792357fa1a142572b6 Mon Sep 17 00:00:00 2001 From: Ping Date: Thu, 23 Jun 2016 17:34:38 +0800 Subject: [PATCH 1593/1710] Finished the Translating. --- ... 5 open source command shells for Linux.md | 90 ------------------- ... 5 open source command shells for Linux.md | 86 ++++++++++++++++++ 2 files changed, 86 insertions(+), 90 deletions(-) delete mode 100644 sources/tech/20160303 Top 5 open source command shells for Linux.md create mode 100644 translated/tech/20160303 Top 5 open source command shells for Linux.md diff --git a/sources/tech/20160303 Top 5 open source command shells for Linux.md b/sources/tech/20160303 Top 5 open source command shells for Linux.md deleted file mode 100644 index 8705ad2981..0000000000 --- a/sources/tech/20160303 Top 5 open source command shells for Linux.md +++ /dev/null @@ -1,90 +0,0 @@ -翻译中;by ping -Top 5 open source command shells for Linux -=============================================== - -keyword: shell , Linux , bash , zsh , fish , ksh , tcsh , license - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/terminal_blue_smoke_command_line_0.jpg?itok=u2mRRqOa) - -There are two kinds of Linux users: the cautious and the adventurous. - -On one side is the user who almost reflexively tries out ever new option which hits the scene. They’ve tried handfuls of window managers, dozens of distributions, and every new desktop widget they can find. - -On the other side is the user who finds something they like and sticks with it. They tend to like their distribution’s defaults. If they’re passionate about a text editor, it’s whichever one they mastered first. - -As a Linux user, both on the server and the desktop, for going on fifteen years now, I am definitely more in the second category than the first. I have a tendency to use what’s presented to me, and I like the fact that this means more often than not I can find thorough documentation and examples of most any use case I can dream up. If I used something non-standard, the switch was carefully researched and often predicated by a strong pitch from someone I trust. - -But that doesn’t mean I don’t like to sometimes try and see what I’m missing. So recently, after years of using the bash shell without even giving it a thought, I decided to try out four alternative shells: ksh, tcsh, zsh, and fish. All four were easy installs from my default repositories in Fedora, and they’re likely already packaged for your distribution of choice as well. - -Here’s a little bit on each option and why you might choose it to be your next Linux command-line interpreter. - -### bash - -First, let’s take a look back at the familiar. [GNU Bash][1], the Bourne Again Shell, has been the default in pretty much every Linux distribution I’ve used through the years. Originally released in 1989, bash has grown to easily become the most used shell across the Linux world, and it is commonly found in other unix-like operating systems as well. - -Bash is a perfectly respectable shell, and as you look for documentation of how to do various things across the Internet, almost invariably you’ll find instructions which assume you are using a bash shell. But bash has some shortcomings, as anyone who has ever written a bash script that’s more than a few lines can attest to. It’s not that you can’t do something, it’s that it’s not always particularly intuitive (or at least elegant) to read and write. For some examples, see this list of [common bash pitfalls][2]. - -That said, bash is probably here to stay for at least the near future, with its enormous install base and legions of both casual and professional system administrators who are already attuned to its usage, and quirks. The bash project is available under a [GPLv3][3] license. - -### ksh - -[KornShell][4], also known by its command invocation, ksh, is an alternative shell that grew out of Bell Labs in the 1980s, written by David Korn. While originally proprietary software, later versions were released under the [Eclipse Public License][5]. - -Proponents of ksh list a number of ways in which they feel it is superior, including having a better loop syntax, cleaner exit codes from pipes, an easier way to repeat commands, and associative arrays. It's also capable of emulating many of the behaviors of vi or emacs, so if you are very partial to a text editor, it may be worth giving a try. Overall, I found it to be very similar to bash for basic input, although for advanced scripting it would surely be a different experience. - -### tcsh - -[Tcsh][6] is a derivative of csh, the Berkely Unix C shell, and sports a very long lineage back to the early days of Unix and computing itself. - -The big selling point for tcsh is its scripting language, which should look very familiar to anyone who has programmed in C. Tcsh's scripting is loved by some and hated by others. But it has other features as well, including adding arguments to aliases, and various defaults that might appeal to your preferences, including the way autocompletion with tab and history tab completion work. - -You can find tcsh under a [BSD license][7]. - -### zsh - -[Zsh][8] is another shell which has similarities to bash and ksh. Originating in the early 90s, zsh sports a number of useful features, including spelling correction, theming, namable directory shortcuts, sharing your command history across multiple terminals, and various other slight tweaks from the original Bourne shell. - -The code and binaries for zsh can be distributed under an MIT-like license, though portions are under the GPL; check the [actual license][9] for details. - -### fish - -I knew I was going to like the Friendly Interactive Shell, [fish][10], when I visited the website and found it described tongue-in-cheek with "Finally, a command line shell for the 90s"—fish was written in 2005. - -The authors of fish offer a number of reasons to make the switch, all invoking a bit of humor and poking a bit of fun at shells that don't quite live up. Features include autosuggestions ("Watch out, Netscape Navigator 4.0"), support of the "astonishing" 256 color palette of VGA, but some actually quite helpful features as well including command completion based on the man pages on your machine, clean scripting, and a web-based configuration. - -Fish is licensed primarily unde the GPL version 2 but with portions under other licenses; check the repository for [complete information][11]. - -*** - -Looking for a more detailed rundown on the precise differences between each option? [This site][12] ought to help you out. - -So where did I land? Well, ultimately, I’m probably going back to bash, because the differences were subtle enough that someone who mostly used the command line interactively as opposed to writing advanced scripts really wouldn't benefit much from the switch, and I'm already pretty comfortable in bash. - -But I’m glad I decided to come out of my shell (ha!) and try some new options. And I know there are many, many others out there. Which shells have you tried, and which one do you prefer? Let us know in the comments! - - - - -via: https://opensource.com/business/16/3/top-linux-shells - -作者:[Jason Baker][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/jason-baker - -[1]: https://www.gnu.org/software/bash/ -[2]: http://mywiki.wooledge.org/BashPitfalls -[3]: http://www.gnu.org/licenses/gpl.html -[4]: http://www.kornshell.org/ -[5]: https://www.eclipse.org/legal/epl-v10.html -[6]: http://www.tcsh.org/Welcome -[7]: https://en.wikipedia.org/wiki/BSD_licenses -[8]: http://www.zsh.org/ -[9]: https://sourceforge.net/p/zsh/code/ci/master/tree/LICENCE -[10]: https://fishshell.com/ -[11]: https://github.com/fish-shell/fish-shell/blob/master/COPYING -[12]: http://hyperpolyglot.org/unix-shells - diff --git a/translated/tech/20160303 Top 5 open source command shells for Linux.md b/translated/tech/20160303 Top 5 open source command shells for Linux.md new file mode 100644 index 0000000000..d40eb58b54 --- /dev/null +++ b/translated/tech/20160303 Top 5 open source command shells for Linux.md @@ -0,0 +1,86 @@ +最牛的五个Linux开源command shell +=============================================== + +关键字: shell , Linux , bash , zsh , fish , ksh , tcsh , license + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/terminal_blue_smoke_command_line_0.jpg?itok=u2mRRqOa) + +这个世界上有两种Linux用户:敢于冒险的和态度谨慎的。 + +其中一类用户总是本能的去尝试任何能够戳中其痛点的新选择。他们尝试过不计其数的窗口管理器、系统发行版和几乎所有能找到的桌面插件。 + +另一类用户找到他们喜欢的东西后,会一直使用下去。他们往往喜欢所使用的系统发行版的默认选项。最先熟练掌握的文本编辑器会成为他们最钟爱的那一个。 + +作为一个使用桌面版和服务器版十五年之久的Linux用户,比起第一类来,我无疑属于第二类用户。我更倾向于使用现成的东西,如此一来,很多时候我就可以通过文档和示例方便地找到我所需要的使用案例。如果我决定选择使用非费标准的东西,这个切换过程一定会基于细致的研究,并且前提是来自挚友的大力推荐。 + +但这并不意味着我不喜欢尝试新事物并且查漏补失。所以最近一段时间,在我不假思索的使用了bash shell多年之后,决定尝试一下另外四个shell工具:ksh, tcsh, zsh, 和 fish. 这四个shell都可以通过我所以用的Fedora系统的默认库轻松安装,并且他们可能已经内置在你所使用的系统发行版当中了。 + +这里对每个选择都稍作介绍,并且阐述下它适合做为你的下一个Linux命令行解释器的原因所在。 + +### bash + +首先,我们回顾一下最为熟悉的一个。 [GNU Bash][1],又名 Bourne Again Shell,它是我这些年使用过的众多Linux发行版的默认选择。它最初发布于1989年,并且轻松成长为Linux世界中使用最广泛的shell,甚至常见于其他一些类Unix系统当中。 + +Bash是一个广受赞誉的shell,当你通过互联网寻找各种事情解决方法所需的文档时,总能够无一例外的发现这些文档都默认你使用的是bash shell。但Bash也有一些缺点存在,如果你写过Bash脚本就会发现我们写的代码总是得比真正所需要的多那么几行。这并不是说有什么事情是它做不到的,而是说它读写起来并不总是那么直观,至少是不够优雅。 + +如上所述,基于其巨大的安装量,并且考虑到各类专业和非专业系统管理员已经适应了它的使用方式和独特之处,至少在将来一段时间内,bash或许会一直存在。 + +### ksh + +[KornShell][4],或许你对这个名字并不熟悉,但是你一定知道它的调用命令 ksh。这个替代性的shell于80年代起源于贝尔实验室,由David Korn所写。虽然最初是一个专有软件,但是后期版本是在[Eclipse Public 许可][5]下发布的。 + +ksh的拥趸们列出了他们觉得其优越的诸多理由,包括更好的循环语法,清晰的管道退出代码,更简单的方式来处理重复命令和关联数组。它能够模拟vi和emacs的许多行为,所以如果你是一个重度文本编辑器患者,它值得你一试。最后,我发现它虽然在高级脚本方面拥有不同的体验,但在基本输入方面与bash如出一辙。 + +### tcsh + +[Tcsh][6]衍生于csh(Berkely Unix C shell),并且可以追溯到早期的Unix和计算本身。 + +Tcsh最大的卖点在于它的脚本语言,对于熟悉C语言编程的人来说,看起来会非常亲切。Tcsh的脚本编写有人喜欢,有人憎恶。但是它也有其他的技术特色,包括可以为aliases添加参数,各种可能迎合你偏好的默认行为,包括tab自动完成和将tab完成的工作记录下来以备后查。 + +你可以在[BSD 许可][7]下找到tcsh。 + +### zsh + +[Zsh][8]是另外一个与bash和ksh有着相似之处的shell。产生于90年代初,zsh支持众多有用的新技术,包括拼写纠正,主题化,可命名的目录快捷键,在多个终端中分享命令历史信息和各种相对于original Bourne shell的轻微调整。 + +虽然部分需要遵照GPL许可,但zsh的代码和二进制文件可以在MIT-like许可下进行分发; 你可以在 [actual license][9] 中查看细节。 + +### fish + +之前我访问了[fish][10]的主页,当看到 “好了,这是一个为90年代而生的命令行shell” 这条略带调侃的介绍时(fish完成于2005年),我就意识到我会爱上这个交互友好的shell的。 + +Fish的作者提供了若干切换过来的理由,shell中所有的不太实用的调用都有点小幽默并且能戳中笑点。这些特性包括自动建议("Watch out, Netscape Navigator 4.0"),支持“惊人”的256色VGA调色,不过也有真正有用的特性,包括根据机器的man页面自动补全命令,清除脚本和基于web的配置。 + +Fish的许可主要基于第二版GPL,但有些部分是在其他许可下的。你可以查看资源库来了解[完整信息][11] + +*** + +如果你想要寻找关于每个选择确切不同之处的详尽纲要,[这个网站][12]应该可以帮到你。 + +我的立场到底是怎样的呢?好吧,最终我应该还是会重新投入bash的怀抱,因为对于大多数时间都在使用命令行交互的人来说,切换过程对于高级脚本能带来的好处微乎其微,并且我已经习惯于使用bash了。 + +但是我很庆幸做出了敞开大门并且尝试新选择的决定。我知道门外还有许许多多其他的东西。你尝试过哪些shell,更中意哪一个?请在评论里告诉我们。 + +本文来源: https://opensource.com/business/16/3/top-linux-shells + +作者:[Jason Baker][a] +译者:[mr-ping](https://github.com/mr-ping) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jason-baker + +[1]: https://www.gnu.org/software/bash/ +[2]: http://mywiki.wooledge.org/BashPitfalls +[3]: http://www.gnu.org/licenses/gpl.html +[4]: http://www.kornshell.org/ +[5]: https://www.eclipse.org/legal/epl-v10.html +[6]: http://www.tcsh.org/Welcome +[7]: https://en.wikipedia.org/wiki/BSD_licenses +[8]: http://www.zsh.org/ +[9]: https://sourceforge.net/p/zsh/code/ci/master/tree/LICENCE +[10]: https://fishshell.com/ +[11]: https://github.com/fish-shell/fish-shell/blob/master/COPYING +[12]: http://hyperpolyglot.org/unix-shells + From 908d469fa8127ab910a190c684594dd9949e5d9b Mon Sep 17 00:00:00 2001 From: Ping Date: Fri, 24 Jun 2016 10:50:31 +0800 Subject: [PATCH 1594/1710] Add some translated content --- ... How to Add Cron Jobs in Linux and Unix.md | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md index 51935ae54b..01ca7eb428 100644 --- a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md +++ b/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md @@ -24,8 +24,6 @@ - **用户的 crontabs**: 用户可以使用`corntab`命令来安装属于他们自己的定时任务。 第六个字段为需要运行的命令行, 所有的命令行都会以创建 crontab 的用户的身份运行。 -**Note**: This faq features cron implementations written by Paul Vixie and included in many [Linux][2] distributions and Unix like systems such as in the popular 4th BSD edition. The syntax is [compatible][3] with various implementations of crond. - **注意**: 这种问答形式的`Cron`实现是由 Paul Vixie 所写的,并且被许多 [Linux][2] 发行版和类Unix系统(如广受欢迎的第四版BSD)包含其中。它的语法被各种计划任务的实现所[兼容][3]。 该如何安装、创建或编辑我们自己的定时任务呢? @@ -101,6 +99,45 @@ $ crontab -e - **分隔符 (/)** : 此操作符指定了一个步进值,例如: `0-23/` 可以用于小时字段来指定命令行每小时执行一次。步进值也可以跟在星号操作符后边,如果你希望命令行每2小时执行一次,可以这样写 `*/2`。 +### 如何将邮件显示出来? + +默认情况下,命令行或者脚本的输出内容(如果有的话)会发送到你的本地邮箱账户中。若想停止收到`crontab`发送的邮件,需要添加 `>/dev/null 2>&1` 这段内容,例如: + +``` +0 3 * * * /root/backup.sh >/dev/null 2>&1 +``` + +如果想要将输出内容发送到指定的邮件账户中,你得定义一个MAILTO变量,假设我们要发送至 vivek@nixcraft.in ,代码如下所示: + +``` +MAILTO="vivek@nixcraft.in" +0 3 * * * /root/backup.sh >/dev/null 2>&1 +``` + +访问 “[使用Crontab命令显示邮件提示](http://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/)” 查看更多信息。 + + +### 任务:列出你所有的定时任务 + +键入以下命令: + +``` +# crontab -l +# crontab -u username -l +``` + +使用如下命令删除所有的定时任务: + +``` +# 删除当前定时任务 # +crontab -r +``` + +``` +## 删除某用户名下的定时任务,此命令需以root用户身份执行 ## +crontab -r -u username +``` + ### 使用特殊字符保存时间 你可以使用以下8个特殊字符中的其中一个替代头五个字段。这样不但可以保存时间,也可以提高可读性。 From 71b6731b47503fe781bfe9b80d55b851ac9d9a4e Mon Sep 17 00:00:00 2001 From: hkurj <663831938@qq.com> Date: Sat, 25 Jun 2016 00:13:04 +0800 Subject: [PATCH 1595/1710] translate --- .../20160621 Basic Linux Networking Commands You Should Know.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160621 Basic Linux Networking Commands You Should Know.md b/sources/tech/20160621 Basic Linux Networking Commands You Should Know.md index 56ecdb9664..48d12dd363 100644 --- a/sources/tech/20160621 Basic Linux Networking Commands You Should Know.md +++ b/sources/tech/20160621 Basic Linux Networking Commands You Should Know.md @@ -1,3 +1,4 @@ +translating by hkurj Basic Linux Networking Commands You Should Know ================================================== From 14511b3657b3aa0aa5b6b8c190e937247b9c45cf Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 24 Jun 2016 17:28:28 +0800 Subject: [PATCH 1596/1710] =?UTF-8?q?20160624-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inux Package Managers for Linux Newbies.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/talk/20160620 5 Best Linux Package Managers for Linux Newbies.md diff --git a/sources/talk/20160620 5 Best Linux Package Managers for Linux Newbies.md b/sources/talk/20160620 5 Best Linux Package Managers for Linux Newbies.md new file mode 100644 index 0000000000..dadf1e1fb0 --- /dev/null +++ b/sources/talk/20160620 5 Best Linux Package Managers for Linux Newbies.md @@ -0,0 +1,117 @@ +5 Best Linux Package Managers for Linux Newbies +===================================================== + + +One thing a new Linux user will get to know as he/she progresses in using it is the existence of several Linux distributions and the different ways they manage packages. + +Package management is very important in Linux, and knowing how to use multiple package managers can proof life saving for a power user, since downloading or installing software from repositories, plus updating, handling dependencies and uninstalling software is very vital and a critical section in Linux system Administration. + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Best-Linux-Package-Managers.png) +>Best Linux Package Managers + +Therefore to become a Linux power user, it is significant to understand how the major Linux distributions actually handle packages and in this article, we shall take a look at some of the best package managers you can find in Linux. + +Here, our main focus is on relevant information about some of the best package managers, but not how to use them, that is left to you to discover more. But I will provide meaningful links that point out usage guides and many more. + +### 1. DPKG – Debian Package Management System + +Dpkg is a base package management system for the Debian Linux family, it is used to install, remove, store and provide information about `.deb` packages. + +It is a low-level tool and there are front-end tools that help users to obtain packages from remote repositories and/or handle complex package relations and these include: + +Don’t Miss: [15 Practical Examples of “dpkg commands” for Debian Based Distros][1] + +#### APT (Advanced Packaging Tool) + +It is a very popular, free, powerful and more so, useful command line package management system that is a front end for dpkg package management system. + +Users of Debian or its derivatives such as Ubuntu and Linux Mint should be familiar with this package management tool. + +To understand how it actually works, you can go over these how to guides: + +Don’t Miss: [15 Examples of How to Use New Advanced Package Tool (APT) in Ubuntu/Debian][2] + +Don’t Miss: [25 Useful Basic Commands of APT-GET and APT-CACHE for Package Management][3] + +#### Aptitude Package Manager + +This is also a popular command line front-end package management tool for Debian Linux family, it works similar to APT and there have been a lot of comparisons between the two, but above all, testing out both can make you understand which one actually works better. + +It was initially built for Debian and its derivatives but now its functionality stretches to RHEL family as well. You can refer to this guide for more understanding of APT and Aptitude: + +Don’t Miss: [What is APT and Aptitude? and What’s real Difference Between Them?][4] + +#### Synaptic Package Manager + +Synaptic is a GUI package management tool for APT based on GTK+ and it works fine for users who may not want to get their hands dirty on a command line. It implements the same features as apt-get command line tool. + +### 2. RPM (Red Hat Package Manager) + +This is the Linux Standard Base packing format and a base package management system created by RedHat. Being the underlying system, there several front-end package management tools that you can use with it and but we shall only look at the best and that is: + +#### YUM (Yellowdog Updater, Modified) + +It is an open source and popular command line package manager that works as a interface for users to RPM. You can compare it to APT under Debian Linux systems, it incorporates the common functionalities that APT has. You can get a clear understanding of YUM with examples from this how to guide: + +Don’t Miss: [20 Linux YUM Commands for Package Management][5] + +#### DNF – Dandified Yum + +It is also a package manager for the RPM-based distributions, introduced in Fedora 18 and it is the next generation of version of YUM. + +If you have been using Fedora 22 onwards, you must have realized that it is the default package manager. Here are some links that will provide you more information about DNF and how to use it: + +Don’t Miss: [DNF – The Next Generation Package Management for RPM Based Distributions][6] + +Don’t Miss: [27 ‘DNF’ Commands Examples to Manage Fedora Package Management][7] + +### 3. Pacman Package Manager – Arch Linux + +It is a popular and powerful yet simple package manager for Arch Linux and some little known Linux distributions, it provides some of the fundamental functionalities that other common package managers provide including installing, automatic dependency resolution, upgrading, uninstalling and also downgrading software. + +But most effectively, it is built to be simple for easy package management by Arch users. You can read this [Pacman overview][8] which explains into details some of its functions mentioned above. + +### 4. Zypper Package Manager – openSUSE + +It is a command line package manager on OpenSUSE Linux and makes use of the libzypp library, its common functionalities include repository access, package installation, resolution of dependencies issues and many more. + +Importantly, it can also handle repository extensions such as patterns, patches, and products. New OpenSUSE user can refer to this following guide to master it. + +Don’t Miss: [45 Zypper Commands to Master OpenSUSE Package Management][9] + +### 5. Portage Package Manager – Gentoo + +It is a package manager for Gentoo, a less popular Linux distribution as of now, but this won’t limit it as one of the best package managers in Linux. + +The main aim of the Portage project is to make a simple and trouble free package management system to include functionalities such as backwards compatibility, automation plus many more. + +For better understanding, try reading [Portage project page][10]. + +### Concluding Remarks + +As I already hinted at the beginning, the main purpose of this guide was to provide Linux users a list of the best package managers but knowing how to use them can be done by following the necessary links provided and trying to test them out. + +Users of the different Linux distributions will have to learn more on their own to better understand the different package managers mentioned above. + + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-package-managers/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[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/dpkg-command-examples/ +[2]: http://www.tecmint.com/apt-advanced-package-command-examples-in-ubuntu/ +[3]: http://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/ +[4]: http://www.tecmint.com/difference-between-apt-and-aptitude/ +[5]: http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[6]: http://www.tecmint.com/dnf-next-generation-package-management-utility-for-linux/ +[7]: http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ +[8]: https://wiki.archlinux.org/index.php/Pacman +[9]: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-management/ +[10]: https://wiki.gentoo.org/wiki/Project:Portage From 35d263dd3bf30633a2034b4b263451f559ecfb5d Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 24 Jun 2016 19:04:42 +0800 Subject: [PATCH 1597/1710] Translating --- ...Smart Way to Lock User Virtual Console or Terminal in Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md b/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md index 36703d74dc..9e940ab235 100644 --- a/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md +++ b/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md @@ -1,3 +1,5 @@ +martin + vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux ======================================================================= From b0408dbfef57ccedfc5e0ada37add6f1e792283d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E9=A3=8E=E5=94=AF=E7=AC=91?= Date: Fri, 24 Jun 2016 22:07:00 +0800 Subject: [PATCH 1598/1710] translating by dongfengweixiao --- ... PowerPC gains an Android 4.4 port with Big Endian support.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md b/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md index c803d30e6c..5e2acd0659 100644 --- a/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md +++ b/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md @@ -1,3 +1,4 @@ +translating(东风唯笑)这个是大坑啊 PowerPC gains an Android 4.4 port with Big Endian support =========================================================== From 4b97e66865dad5947251054de455ad6a957048d6 Mon Sep 17 00:00:00 2001 From: Rubik Date: Fri, 24 Jun 2016 23:41:08 +0800 Subject: [PATCH 1599/1710] =?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 翻译新人,若有不当烦请指正,多谢。 --- ... 6 Amazing Linux Distributions For Kids.md | 71 ++++++++++--------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md b/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md index 4d6ecdfd8f..7a8169cd6a 100644 --- a/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md +++ b/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md @@ -1,98 +1,99 @@ -[HaohongWANG Translating] -6 Amazing Linux Distributions For Kids +[Translated by HaohongWANG] +//校对爸爸辛苦了!>_< +惊艳!6款面向儿童的 Linux 发行版 ====================================== -Linux and open source is the future and there is no doubt about that, and to see this come to a reality, a strong foundation has to be lied, by starting from the lowest level possible and that is exposing kids to Linux and teaching them how to use Linux operating systems. +毫无疑问未来是属于 Linux 和开源的。为了实现这样的未来、使Linux占据一席之地,人们已经着手从尽可能低的水平开始开发面向儿童的Linux发行版,并尝试教授他们如何使用Linux操作系统。 ![](http://www.tecmint.com/wp-content/uploads/2016/05/Linux-Distros-For-Kids.png) ->Linux Distros For Kids +>面向儿童的 Linux 发行版 -Linux is a very powerful operating system and that is one of the reasons why it powers a lot of servers on the Internet. Though there have been concerns about its user friendliness which has brought about debate of how it will over take Mac OSX and Windows on desktop computers, I think users need to accept Linux as it is to realize its real power. +Linux 是一款非常强大的操作系统,原因之一便是它驱动了互联网上绝大多数的服务器。但出于对其用户友好性的担忧,坊间时常展开有关于 Linux 应如何取代 Mac OS X 或 Windows 的辩论。而我认为用户应该接受 Linux 来见识它真正的威力。 -Today, Linux powers a lot of machines out there, from mobile phones, to tablets, laptops, workstations, servers, supercomputers, cars, air traffic control systems, refrigerators and many more. With all this and more yet to come in the near future, as I had already stated at the beginning, Linux is the operating system for future computing. +如今,Linux 运行在绝大多数设备上,从智能手机到平板电脑,笔记本电脑,工作站,服务器,超级计算机,再到汽车,航空管制系统,甚至电冰箱,都有 Linux 的身影。正如我在开篇所说,有了这一切, Linux 是未来的操作系统。 ->Read Also: [30 Big Companies and Devices Running on Linux][1] +>参考阅读: [30 Big Companies and Devices Running on Linux][1] -Because the future belongs to the kids of today, then introducing them to technologies that will change the future is the way to go. Therefore they have to be introduced at an early stage to start learning computer technologies and Linux as a special case. +未来是属于孩子们的,教育要从娃娃抓起。所以,要让小孩子尽早地学习计算机、了解 Linux 、接触科学技术。这是改变未来图景的最好方法。 -One thing common to children is curiosity and early learning can help instill the a character of exploration in them when the learning environment is designed to suit them. +一个常见的现象是,当儿童在一个适合他的环境中学习时,好奇心和早期学习的能力会使他自己养成喜好探索的性格。 -Having looked some quick reasons why kids should learn Linux, let us now go through a list of exciting Linux distributions that you can introduce your kids to, so that they can start using and learning Linux. +说了这么多儿童应该学习 Linux 的原因,接下来我就列出这些令人激动的发行版。你可以把它们推荐给小孩子来帮助他们开始学习使用 Linux 。 ### Sugar on a Stick -It is a project by Sugar Labs that aims at designing free tools to support learning among children by making them gain skills in exploring, discovering, creating and also reflecting on ideas. It is a non-profit organization led by volunteers. +Sugar on a Stick (译注:“糖在棒上”)是 Sugar Labs 旗下的工程,Sugar Labs 是一个由志愿者领导的非盈利组织。这一发行版旨在设计大量的免费工具来使儿童在探索、发现、创造中认知自己的思想。 ![](http://www.tecmint.com/wp-content/uploads/2016/05/Sugar-Neighborhood-View.png) ->Sugar Neighborhood View +>Sugar Neighborhood 界面 ![](http://www.tecmint.com/wp-content/uploads/2016/05/Sugar-Activity-Library.png) ->Sugar Activity Library +>Sugar 应用程序 -You can think of sugar as both a desktop and a collection of learning activities that help encourage active involvement from children who are learning. +你既可以将 Sugar 看作是普通的桌面环境,也可以把它当做是帮助鼓励孩子学习、提高参与活动的积极性的一款应用合集。 -Visit Homepage: +访问主页: ### Edubuntu -This is a grassroots project that is based on the most popular Linux distribution today, Ubuntu. It is intended get schools, homes and communities to easily install and use free Ubuntu software. +Edubuntu 是基于当下最流行的发行版 Ubuntu 而开发的一款草根发行版。主要致力于降低学校、家庭和社区安装、使用 Ubuntu 自由软件的难度。 ![](http://www.tecmint.com/wp-content/uploads/2016/05/Edubuntu-Apps.jpg) ->Edubuntu Desktop Apps +>Edubuntu 桌面应用 -It is supported by different groups of students, teachers, parents, stake holders and also hackers who believe in free learning and sharing of knowledge for self improvement and also community based development. +它的桌面应用由来自不同组织的学生、教师、家长、一些利益相关者甚至黑客来提供。他们都笃信社区的发展和知识的共享是自由学习和自由分享的基石。 -The main aim of the project is to assemble a system that can offer free software to enhance learning and education by making it easy for users to install and also maintain software. +该项目的主要目标是组建一款安装、管理软件难度低的操作系统以增长使用 Linux 学习和教育的用户数量。 -Visit Homepage: +访问主页: ### Doudou Linux -It is designed specifically for children to experience ease in using a computer while building creative thinking in them. It provides simple yet educative applications that allows kids to learn and discover new ideas while using it. +Doudou Linux 是专为方便儿童使用而设计的发行版,能在构建中激发儿童的创造性思维。它提供了简单但是颇具教育意义的应用来使儿童在应用过程中学习发现新的知识。 ![](http://www.tecmint.com/wp-content/uploads/2016/05/Doudou-Linux.png) >Doudou Linux -One important thing about Doudou Linux is its content filtering feature, which prevents children from visiting restricted content on the web. For more kids protection, it also includes user privacy on the Internet, automatically removes adds from web pages and many more. +其最引人注目的一点便是内容过滤功能,顾名思义,它能够阻止孩童访问网络上的禁止内容。如果想要更进一步的儿童保护功能,Doudou Linux 还提供了互联网用户隐私功能,能够去除网页中的特定加载内容。 -Visit Homepage: +访问主页: ### LinuxKidX -It is a LiveCD based on Slackware Linux with a long list of educational software for kids to learn form. It uses KDE as the default Desktop Environment and includes software such as Ktouch a typing tutor, Kstars as virtual planetaruim, Kalzium a periodic table, KwordQuiz among others. +这是一款整合了许多专为儿童的教育类软件的 Slackware Linux 的 LiveCD。它使用 KDE 作为默认桌面环境并配置了诸如 Ktouch 打字指导,Kstars 虚拟天文台,Kalzium 元素周期表和 KwordQuiz 单词测试等应用。 ![](http://www.tecmint.com/wp-content/uploads/2016/05/LinuxKidX.jpg) >LinuxKidX -Visit Homepage: +访问主页: ### Ubermix -It is a free software that is built from the ground based on Ubuntu Linux and is intended for educational purposes. It comes with over 60 free software reinstalled and helps to make learning and teaching easy for students and teachers respectively. +Ubermix 基于 Ubuntu 构建,同样以教学为目的。默认配备了超过60款应用,帮助学生更好地学习,同时给教师教学提供便利。 ![](http://www.tecmint.com/wp-content/uploads/2016/05/ubermix.png) >Ubermix Linux -Some of its features include 5 minutes installation and also few seconds quick recovery mechanism. It should work well well for teenage children. +Ubermix 还具有5分钟快速安装和快速恢复等功能,可以给小孩子更好的帮助。 -Visit Homepage: +访问主页: ### Qimo -I have added this to list because many readers are expected to ask about Qimo, but as of this writing, the Qimo for kids development team has retired from the project, therefore no more development it expected. +因为很多读者曾向我询问过 Qimo 发行版的情况,所以我把它写进这篇文章。但是截止发稿时,Qimo 儿童版的开发已经终止,不再提供更新。 ![](http://www.tecmint.com/wp-content/uploads/2016/05/Qimo-Linux.png) >Qimo Linux -But you can still find most of the games for kids in Ubuntu and other Linux distributions. As they have mentioned, they are not done working on an educational software for kids and are developing an android application for children to improve their literacy skills. +你仍然可以在 Ubuntu 或者其他的 Linux 发行版中找到大多数儿童游戏。正如这些开发商所说,他们不仅在为儿童制作教育软件,同时也在开发增长儿童文化水平的安卓应用。 -You can read more from their official website and expect more from them in the future. +如果你想进一步了解,可以移步他们的官方网站。 -Visit Homepage: +访问主页: -That is it for now, in case there are more Linux operating systems intended for kids or children out there, which I have not included in this list, you can let us know by leaving a comment. +以上这些便是我所知道的面向儿童的Linux发行版,或有缺漏,欢迎评论补充。 -You can also let us know of what you think of introducing kids to Linux and the future of Linux especially on Desktop computers. +如果你想探讨桌面 Linux 的发展前景或是如何引导儿童接触 Linux ,欢迎与我联系。 -------------------------------------------------------------------------------- @@ -100,7 +101,7 @@ via: http://www.tecmint.com/best-linux-distributions-for-kids/?utm_source=feedbu 作者:[Aaron Kili][a] -译者:[译者ID](https://github.com/译者ID) +译者:[HaohongWANG](https://github.com/HaohongWANG) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From dccd09633121b6ca06ae952af5a15fe5d880c515 Mon Sep 17 00:00:00 2001 From: Jeff Tsang Date: Fri, 24 Jun 2016 23:59:15 +0800 Subject: [PATCH 1600/1710] translating by itsang --- sources/tech/20160511 4 Container Networking Tools to Know.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160511 4 Container Networking Tools to Know.md b/sources/tech/20160511 4 Container Networking Tools to Know.md index 5b80791c6f..220d41644d 100644 --- a/sources/tech/20160511 4 Container Networking Tools to Know.md +++ b/sources/tech/20160511 4 Container Networking Tools to Know.md @@ -1,3 +1,4 @@ +[Translating by itsang] 4 Container Networking Tools to Know ======================================= From 4f9718703ef7e1129453f5ad4ea4ba8b4d93abf4 Mon Sep 17 00:00:00 2001 From: pengkai Date: Sat, 25 Jun 2016 00:02:34 +0800 Subject: [PATCH 1601/1710] kylepeng93 is translating --- ... A newcomer's guide to navigating OpenStack Infrastructure.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md b/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md index 4fa50b0a45..25dc193fdc 100644 --- a/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md +++ b/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md @@ -1,3 +1,4 @@ +translating by kylepeng93 A newcomer's guide to navigating OpenStack Infrastructure =========================================================== From d37d301d979ce840ffcfcde676e69dea072f2940 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 25 Jun 2016 10:53:54 +0800 Subject: [PATCH 1602/1710] Translated --- ...User Virtual Console or Terminal in Linux.md | 100 ------------------ ...User Virtual Console or Terminal in Linux.md | 99 +++++++++++++++++ 2 files changed, 99 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md create mode 100644 translated/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md diff --git a/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md b/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md deleted file mode 100644 index 9e940ab235..0000000000 --- a/sources/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md +++ /dev/null @@ -1,100 +0,0 @@ -martin - -vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux -======================================================================= - -Virtual consoles are very important features of Linux, and they provide a system user a shell prompt to use the system in a non-graphical setup which you can only use on the physical machine but not remotely. - -A user can use several virtual console sessions at the same time just by switching form one virtual console to another. - -![](http://www.tecmint.com/wp-content/uploads/2016/05/vlock-Lock-User-Terminal-in-Linux.png) ->vlock Lock User Console or Terminal in Linux - -In this how to guide, we shall look at how to lock user virtual console or terminal console in Linux systems using vlock program. - -### What is vlock? - -vlock is a utility used to lock one or several user virtual console sessions. vlock is important on a multi user system, it allows users to lock their own sessions while other users can still use the same system via other virtual consoles. Where necessary, the entire console can be locked down and also switching virtual console disabled. - -vlock primarily works for console sessions and also has support for locking non-console sessions but this has not been tested fully. - -### Installing vlock in Linux - -To install vlock program on your respective Linux systems, use: - -``` -# yum install vlock [On RHEL / CentOS / Fedora] -$ sudo apt-get install vlock [On Ubuntu / Debian / Mint] -``` - -### How to use vlock in Linux - -There are few options that you can use with vlock and the general syntax is: - -``` -# vlock option -# vlock option plugin -# vlock option -t plugin -``` - -#### vlock common options and usage: - -1. To lock current virtual console or terminal session of user, run the following command: - - ``` - # vlock --current - ``` - - ![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-User-Terminal-Session-in-Linux.png) - >Lock User Terminal Session in Linux - - The options -c or --current, means lock the current session and it is the default behavior when you run vlock. - -2. To lock all your virtual console sessions and also disable virtual console switching, run the command below: - - ``` - # vlock --all - ``` - - ![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-All-Linux-Terminal-Sessions.png) - >Lock All Linux Terminal Sessions - - The options -a or --all, when used, it locks all user’s console sessions and also disables virtual console switching. - - These other options can only work when vlock was compiled with plugin support and they include: - -3. The options -n or --new, when invoked, it means switch to a new virtual console before user’s console sessions are locked. - ``` - # vlock --new - ``` - -4. The options -s or --disable-sysrq, it disables the SysRq mechanism while virtual consoles are locked by a user and works only when -a or --all is invoked. - - ``` - # vlock -sa - ``` - -5. The options -t or --timeout , invoked to set a timeout for screensaver plugin. - - ``` - # vlock --timeout 5 - ``` - -You can use `-h` or `--help` and `-v` or `--version` to view help messages and version respectively. - -We shall leave it at that and also know that you can include a `~/.vlockrc` file which is read by vlock program during system startup and [add the environmental variables][1] that you can check in the manaul entry page, especially users of Debian based distros. - -To find out more or add any information which may not be included here, simply drop a message below in the comment section. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/vlock-lock-user-virtual-console-terminal-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 - -作者:[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/set-path-variable-linux-permanently/ diff --git a/translated/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md b/translated/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md new file mode 100644 index 0000000000..26c74b019e --- /dev/null +++ b/translated/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md @@ -0,0 +1,99 @@ +vlock – 一个锁定 Linux 用户虚拟控制台或终端的好方法 +======================================================================= + +虚拟控制台是 Linux 非常重要的功能,他们为使用系统的用户提供了 shell 提示符,以保证用户在登录和远程登录一个未安装图形界面的系统时仍能使用。 + +一个用户可以同时操作多个虚拟控制台会话,只需在虚拟控制台间来回切换即可。 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/vlock-Lock-User-Terminal-in-Linux.png) +>用 vlock 锁定 Linux 用户控制台或终端 + +这篇使用指导,旨在教会大家如何使用 vlock 来锁定用户虚拟控制台和终端。 + +### vlock 是什么? + +vlock 是一个用于锁定一个或多个用户虚拟控制台用户会话的工具。在多用户系统中 vlock 是扮演着重要的角色,他让用户可以在锁住自己会话的同时不影响其他用户通过其他虚拟控制台操作同一个系统。必要时,还可以锁定所有的控制台,同时禁止在虚拟控制台间切换。 + +vlock 的主要功能面向控制台会话方面,同时也支持非控制台会话的锁定,但该功能的测试还不完全。 + +### 在 Linux 上安装 vlock + +根据你的 Linux 系统选择 vlock 安装指令: + +``` +# yum install vlock [On RHEL / CentOS / Fedora] +$ sudo apt-get install vlock [On Ubuntu / Debian / Mint] +``` + +### 在 Linux 上使用 vlock + +vlock 操作选项的常规语法: + +``` +# vlock option +# vlock option plugin +# vlock option -t plugin +``` + +#### vlock 常用选项及用法: + +1. 锁定用户的当前虚拟控制台或终端会话,如下: + + ``` + # vlock --current + ``` + + ![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-User-Terminal-Session-in-Linux.png) + >锁定 Linux 用户终端会话 + + 选项 -c 或 --current,锁定当前的会话,该参数为运行 vlock 时的默认行为。 + +2. 锁定所有你的虚拟控制台会话,并禁用虚拟控制台间切换,命令如下: + + ``` + # vlock --all + ``` + + ![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-All-Linux-Terminal-Sessions.png) + >锁定所有 Linux 终端会话 + + 选项 -a 或 --all,锁定所有用户的控制台会话,并禁用虚拟控制台间切换。 + + 其他的选项只有在编译 vlock 时编入了相关插件支持及其引用后,才能发挥作用: + +3. 选项 -n 或 --new,调用时后,会在锁定用户的控制台会话前切换到一个新的虚拟控制台。 + + ``` + # vlock --new + ``` + +4. 选项 -s 或 --disable-sysrq,在禁用虚拟控制台的同时禁用 SysRq 功能,只有在与 -a 或 --all 同时使用时才起作用。 + + ``` + # vlock -sa + ``` + +5. 选项 -t 或 --timeout ,用以设定屏幕保护插件的 timeout 值。 + + ``` + # vlock --timeout 5 + ``` + +你可以使用 `-h` 或 `--help` 和 `-v` 或 `--version` 分别查看帮助消息和版本信息。 + +我们的介绍就到这了,提示一点,你可以将 vlock 的 `~/.vlockrc` 文件包含到系统启动中并参考入门手册[添加环境变量][1],特别是 Debian 系的用户。 + +想要找到更多或是补充一些这里没有提及的信息,可以直接在写在下方评论区。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/vlock-lock-user-virtual-console-terminal-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[Aaron Kili][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者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/set-path-variable-linux-permanently/ From 5deb1ca72c641dd031c67adcf884bf48da401c48 Mon Sep 17 00:00:00 2001 From: miaolin Date: Sat, 25 Jun 2016 11:31:49 +0800 Subject: [PATCH 1603/1710] Update 20160620 5 Best Linux Package Managers for Linux Newbies.md --- .../20160620 5 Best Linux Package Managers for Linux Newbies.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20160620 5 Best Linux Package Managers for Linux Newbies.md b/sources/talk/20160620 5 Best Linux Package Managers for Linux Newbies.md index dadf1e1fb0..a92c5265e5 100644 --- a/sources/talk/20160620 5 Best Linux Package Managers for Linux Newbies.md +++ b/sources/talk/20160620 5 Best Linux Package Managers for Linux Newbies.md @@ -1,3 +1,4 @@ +transalting by ynmlml 5 Best Linux Package Managers for Linux Newbies ===================================================== From bc969d4f2ad456b111b8b9392e0ae789d93a93b6 Mon Sep 17 00:00:00 2001 From: "Cathon.ZHD" Date: Sat, 25 Jun 2016 13:41:26 +0800 Subject: [PATCH 1604/1710] Cathon is translating 20160518 Python 3 - An Intro to Encryption --- sources/tech/20160518 Python 3 - An Intro to Encryption.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160518 Python 3 - An Intro to Encryption.md b/sources/tech/20160518 Python 3 - An Intro to Encryption.md index 43c042d5c1..3a840114d3 100644 --- a/sources/tech/20160518 Python 3 - An Intro to Encryption.md +++ b/sources/tech/20160518 Python 3 - An Intro to Encryption.md @@ -1,3 +1,5 @@ +[Cathon is Translating...] + Python 3: An Intro to Encryption =================================== From 48d23cb787ab53b1f6302b903233d7a56bacb042 Mon Sep 17 00:00:00 2001 From: Yu Haixin <836401406@qq.com> Date: Sat, 25 Jun 2016 19:26:10 +0800 Subject: [PATCH 1605/1710] Update 20160610 Getting started with ReactOS.md --- sources/tech/20160610 Getting started with ReactOS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160610 Getting started with ReactOS.md b/sources/tech/20160610 Getting started with ReactOS.md index d181e2dd5d..b6dca8f9b5 100644 --- a/sources/tech/20160610 Getting started with ReactOS.md +++ b/sources/tech/20160610 Getting started with ReactOS.md @@ -1,3 +1,4 @@ +name1e5s translating... Getting started with ReactOS ============================== From d5d18990a68da44cb88bedae0a0e29e97092eb6a Mon Sep 17 00:00:00 2001 From: ezio Date: Sat, 25 Jun 2016 19:37:13 +0800 Subject: [PATCH 1606/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AF=91=E8=80=85?= =?UTF-8?q?=20jerryling315=20=E4=B8=BA=20Moelf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- ...estions Survey Results Surface Top Open Source Projects.md | 4 ++-- ...nux Birthday-- A 22 Years of Journey and Still Counting.md | 2 +- ...e an AP in Ubuntu 15.04 to connect to Android or iPhone.md | 2 +- .../201601/20101020 19 Years of KDE History--Step by Step.md | 2 +- ...rk Shuttleworth--The Man Behind Ubuntu Operating System.md | 2 +- ...ri-Pi--Using the Raspberry Pi as a Secure Landing Point.md | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 40afd5d30e..bbc3753a39 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ LCTT 的组成 - KnightJoker, - Xuanwo, - nd0104, -- jerryling315, +- Moelf, - xiaoyu33, - guodongxiaren, - ynmlml, diff --git a/published/201502/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/published/201502/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index 9430f11ada..4cfe259dd0 100644 --- a/published/201502/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/published/201502/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -19,7 +19,7 @@ LinuxQuestions 问卷调查揭晓最佳开源项目 via: http://ostatic.com/blog/linuxquestions-survey-results-surface-top-open-source-projects 作者:[Sam Dean][a] -译者:[jerryling315](https://github.com/jerryling315) +译者:[Moelf](https://github.com/Moelf) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -29,4 +29,4 @@ via: http://ostatic.com/blog/linuxquestions-survey-results-surface-top-open-sour [2]:http://www.linuxquestions.org/questions/linux-news-59/2014-linuxquestions-org-members-choice-award-winners-4175532948/ [3]:http://www.linuxquestions.org/questions/2014mca.php [4]:http://ostatic.com/blog/lq-members-choice-award-winners-announced -[5]:http://www.linuxquestions.org/questions/2014mca.php \ No newline at end of file +[5]:http://www.linuxquestions.org/questions/2014mca.php diff --git a/published/201509/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 index e14e0ba320..f82f43ccf1 100644 --- a/published/201509/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 @@ -98,7 +98,7 @@ Debian 在 Linux 生态环境中的贡献是难以用语言描述的。 如果 D via: http://www.tecmint.com/happy-birthday-to-debian-gnu-linux/ 作者:[Avishek Kumar][a] -译者:[jerryling315](http://moelf.xyz) +译者:[Moelf](https://github.com/Moelf) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/201509/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 index e7ee7d760d..af5c90e7f7 100644 --- a/published/201509/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 @@ -69,7 +69,7 @@ b、 一旦你保存了这个文件,你应该能在 Wifi 菜单里看到你刚 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) +译者:[Moelf](https://github.com/Moelf) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/201601/20101020 19 Years of KDE History--Step by Step.md b/published/201601/20101020 19 Years of KDE History--Step by Step.md index 50cfff73fb..a13d468b7d 100644 --- a/published/201601/20101020 19 Years of KDE History--Step by Step.md +++ b/published/201601/20101020 19 Years of KDE History--Step by Step.md @@ -222,7 +222,7 @@ KDE Plasma 5 – 第五代 KDE。大幅改进了设计和系统,新的默认 via: [https://tlhp.cf/kde-history/](https://tlhp.cf/kde-history/) 作者:[Pavlo Rudyi][a] -译者:[jerryling315](https://github.com/jerryling315) +译者:[Moelf](https://github.com/Moelf) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md b/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md index 009641458c..0d3547aeb9 100644 --- a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md +++ b/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md @@ -118,7 +118,7 @@ Admin, salary negotiations, legalese, and public speaking. via: http://www.unixmen.com/mark-shuttleworth-man-behind-ubuntu-operating-system/ 作者:[M.el Khamlichi][a] -译者:[jerryling315](https://blog.moelf.xyz) +译者:[Moelf](https://github.com/Moelf) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md b/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md index b6705a7b83..fc489163ef 100644 --- a/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md +++ b/translated/tech/20151215 Securi-Pi--Using the Raspberry Pi as a Secure Landing Point.md @@ -511,7 +511,7 @@ SSLH 介绍: [http://www.rutschle.net/tech/sslh.shtml](http://www.rutschle.net/t via: http://www.linuxjournal.com/content/securi-pi-using-raspberry-pi-secure-landing-point?page=0,0 作者:[Bill Childers][a] -译者:[jerryling315](https://blog.moelf.xyz) +译者:[Moelf](https://github.com/Moelf) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 1520cb88686d7acf8da0eae5168be757b900004f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=AE=8F=E7=BE=BD=28Dee=2EH=2EY=29?= Date: Sat, 25 Jun 2016 22:34:41 +0800 Subject: [PATCH 1607/1710] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91:?= =?UTF-8?q?20160620=20PowerPC=20gains=20an=20Android=204.4=20port=20with?= =?UTF-8?q?=20Big=20Endian=20support.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ndroid 4.4 port with Big Endian support.md | 109 ------------------ ...ndroid 4.4 port with Big Endian support.md | 103 +++++++++++++++++ 2 files changed, 103 insertions(+), 109 deletions(-) delete mode 100644 sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md create mode 100644 translated/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md diff --git a/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md b/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md deleted file mode 100644 index 5e2acd0659..0000000000 --- a/sources/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md +++ /dev/null @@ -1,109 +0,0 @@ -translating(东风唯笑)这个是大坑啊 -PowerPC gains an Android 4.4 port with Big Endian support -=========================================================== - -eInfochips has ported Android 4.4 to the PowerPC architecture on behalf of an avionics customer that will use it for an HMI that monitors engine health. - -eInfochips has developed the first Android port to the PowerPC CPU architecture using a modern Android build and featuring Big Endian support. The port is based on Android Open Source Project (AOSP) code for Android 4.4 (KitKat) and features Kernel 3.12.19. - -Android emerged around the same time that PowerPC was already in decline and quickly losing market share to ARM. Customers with high-end networking and other enterprise-oriented embedded gear running on PowerPC processors such as Freescale’s PowerQUICC and QorIQ, instead depended on Linux. Several Android ports have been attempted, however. In 2009, Freescale and Embedded Alley — now part of the Linux team at Mentor Graphics — [announced a port][15] for PowerQUICC and QorIQ chips, which are now built by NXP. Another project claiming the same feat emerged called [Android-PowerPC][16]. - -Not much came of these efforts, however, and when an avionics firm asked eInfochips to look into an Android application for adding an improved HMI to its PowerPC-based engine monitoring system, the company found that these earlier ports were not up to par. They would have to start from scratch. - -The main problem with the previous ports was that they were for a much older, and very different, Android. Embedded Alley’s port was for Android 1.5 (Cupcake), released in 2009 and based on a Linux 2.6.28 kernel, and the last port from the Android-PowerPC project appears to be for Android 2.2 (Froyo), which was released in 2010 and based on Linux 2.6.32. The avionics customer also needed other technologies such as support for Big Endian, a legacy memory access scheme still used in the networking and telecom world. The other ports supported only Little Endian memory access. - - -### New PowerPC port from eInfochips - -eInfochips, which is known around here mostly for its ARM/Snapdragon-based boards such as the [Eragon 600][17] computer-on-module, has now completed the Android 4.4 QorIQ port and has posted a white paper describing the project. The avionics customer using the technology remains unnamed, however, and it’s unclear to what extent the port will be publicly shared. - - -![](http://hackerboards.com/files/einfochips_porting_android_on_powerpc-sm.jpg) ->Image from eInfochips blog post - -- The new PowerPC Android project includes: -- Bionic customization for PowerPC [e5500][1] -- Big Endian support in Android KitKat -- Tool chain development with GCC version 5.2 -- PowerPC support in Android 4.4 framework -- Android Kernel 3.12.19 for PowerPC e5500 - -According to eInfochips marketing manager, Sooryanarayanan Balasubramanian, the avionics customer wanted Android primarily for its familiar interface, which reduces training time, as well as the ease in updating the system with new applications. “By successful Android porting they can allow more modifications at the application layer without undergoing the tedious certification process at all layers,” explained Balasubramanian. “This was the first time any such attempt has been made in the aerospace industry, which requires due diligence in designs.” - -Porting Android to PowerPC required major modifications to the framework, core libraries, toolchain development, run-time linker, object linker, and open source compiler support, according to the white paper. When generating byte code, the porting team decided to use portable mode rather than fast interpreter mode. There is no fast interpreter available for Android on PowerPC, whereas portable mode uses the open source [libffi][18] for interpretation, which does support PowerPC. - -The team also needed to choose between Android Run Time (ART) and Dalvik Virtual Machine (DVM). They found that portable mode for ART was untested and poorly documented, so they went with DVM in portable mode. - -The white paper goes on to explain other challenges in the port, including developing a toolchain from scratch and rewriting scripts to overcome the problem of AOSP’s “non-standard” use of compiler flags. The finished port offers 37 services, and features a headless Android deployment along with an emulated UI in user space. - - -### Target hardware - -Thanks to an image (shown farther above) in an [eInfochips blog post][2] about the company’s Android PowerPC port, we were able to identify the project’s target hardware. The board turns out to be the [X-ES Xpedite 6101][3], which is a rugged XMC/PrPMC mezzanine module. - -Thanks to an image (shown farther above) in an eInfochips blog post about the company’s Android PowerPC port, we were able to identify the project’s target hardware. The board turns out to be the X-ES Xpedite 6101, which is a rugged XMC/PrPMC mezzanine module. - -![](http://hackerboards.com/files/xes_xpedite6101-sm.jpg) ->X-ES Xpedite 6101 photo and block diagram - -The X-ES Xpedite 6101 ships with a choice of NXP QorIQ-based T Series communications processors — the T2081, T1042, and T1022 — which integrate 8, 4, and 2 e6500 cores, respectively, running at up to 1.8GHz (T2081) or 1.4GHz (T1042/22). Each core integrates an AltiVec SIMD engine, said to offer DSP-level floating point performance. All three X-ES board models support up to 8GB of DDR3-1600 ECC SDRAM memory, plus up to 512MB of NOR and 32GB of NAND flash storage. - -![](http://hackerboards.com/files/nxp_qoriq_t2081_block-sm.jpg) ->NXP T2081 block diagram - -The board’s I/O includes a x4 PCI Express Gen2 channel, along with dual helpings of Gigabit Ethernet, RS232/422/485 serial, and SATA 3.0 ports. In addition to its choice of three QorIQ processors, the Xpedite 6101 is offered with support for three [X-ES ruggedization levels][19], rated for operation over 0 to 55°C, -40 to 70°C, or -40 to 85°C respectively, along with three categories of shock and vibration resistance. - -Other X-ES QorIQ-based XMC/PrPMC boards we’ve covered include the [XPedite6401 and XPedite6370][20], which are supported with off-the-shelf BSPs for Linux, Wind River VxWorks, and Green Hills Integrity. - - -### Further information - -The eInfochips Android PowerPC porting whitepaper is available for download [here][4] (requires free registration). - -### Related posts: - -- [Commercial embedded Linux distro boosts virtualization][5] -- [Freescale unveils first ARM-based QorIQ SoCs][6] -- [High-end boards run Linux on 64-bit ARM QorIQ SoCs][7] -- [Free, Open Enea Linux taps Yocto Project and Linaro code][8] -- [LynuxWorks reverts to its LynxOS roots, changes name][9] -- [First quad- and octa-core QorIQ SoCs unveiled][10] -- [Free white paper shows how Linux won embedded][11] -- [Quad-core Snapdragon COM offers three dev kit options][12] -- [Tiny COM runs Linux on quad-core 64-bit Snapdragon 410][13] -- [PowerPC based IoT gateway COM ships with Linux BSP][14] - - --------------------------------------------------------------------------------- - -via: http://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ - -作者:[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://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ -[1]: http://linuxdevices.linuxgizmos.com/low-cost-powerquicc-chips-offer-flexible-interconnect-options/ -[2]: https://www.einfochips.com/blog/k2-categories/aerospace/presenting-a-case-for-porting-android-on-powerpc-architecture.html -[3]: http://www.xes-inc.com/products/processor-mezzanines/xpedite6101/ -[4]: http://biz.einfochips.com/portingandroidonpowerpc -[5]: http://hackerboards.com/commercial-embedded-linux-distro-boosts-virtualization/ -[6]: http://hackerboards.com/freescale-unveils-first-arm-based-qoriq-socs/ -[7]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ -[8]: http://hackerboards.com/free-open-enea-linux-taps-yocto-and-linaro-code/ -[9]: http://hackerboards.com/lynuxworks-reverts-to-its-lynxos-roots-changes-name/ -[10]: http://hackerboards.com/first-quad-and-octa-core-qoriq-socs-unveiled/ -[11]: http://hackerboards.com/free-white-paper-shows-how-linux-won-embedded/ -[12]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ -[13]: http://hackerboards.com/tiny-com-runs-linux-and-android-on-quad-core-64-bit-snapdragon-410/ -[14]: http://hackerboards.com/powerpc-based-iot-gateway-com-ships-with-linux-bsp/ -[15]: http://linuxdevices.linuxgizmos.com/android-ported-to-powerpc/ -[16]: http://www.androidppc.com/ -[17]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ -[18]: https://sourceware.org/libffi/ -[19]: http://www.xes-inc.com/capabilities/ruggedization/ -[20]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ - - diff --git a/translated/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md b/translated/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md new file mode 100644 index 0000000000..3b450cb603 --- /dev/null +++ b/translated/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md @@ -0,0 +1,103 @@ +PowerPC 获得大端 Android 4.4 系统的移植 +=========================================================== + +eInfochips(一家软件厂商) 已将将 Android 4.4 系统移植到 PowerPC 架构,它将作为一家航空电子客户的人机界面(HMI:Human Machine Interface)用来监视引擎的建康状况。 + +eInfochips 已经开发了第一个面向 PowerPC 架构的 CPU 的 Android 移植版本,它使用较新的大端 Android 系统。此移植基于 Android 开源项目[Android Open Source Project (AOSP)] 中 Android 4.4 (KitKat) 的代码,其功能内核的版本号为 3.12.19。 + +Android 开始兴起的时候,PowerPC正在快速失去和 ARM 架构共通角逐的市场。高端的网络客户和以市场为导向的嵌入式工具大多运行在诸如飞思卡尔(Freescale)的 PowerQUICC 和 QorIQ 上,而不取决于 Linux 系统。一些 Android 的移植计划最终失败,然而在 2009 年,飞思卡尔和 Embedded Alley(一家软件厂商,当前是 Mentor Graphics 的 Linux 团队的一部分)[宣布了针对 PowerQUICC 和 QorIQ 芯片的移植版本][15],当前由 NXP 公司构建。另一个名为[Android-PowerPC][16] 的项目也作出了相似的工作。 + +这些努力来的都并不容易,然而,当航空公司找到 eInfochips,希望能够为他们那些基于 PowerPC 的引擎监控系统添加 Android 应用程序以改善人机界面。此公司找出了这些早期的移植版本,然而,他们都很难达到标准。所以,他们不得不从头开始新的移植。 + +最主要的问题是这些移植的 Android 版本实在是太老了,且 very different。Embedded Alley 移植的版本为 Android 1.5 (Cupcake),它于 2009 年发布,Linux 内核版本为 2.6.28。最后一版的移植为 Android-PowerPC 项目的 Android 2.2 (Froyo)它于 2010 年发布,内核版本为 2.6.32。此外,航空公司还有一些额外的技术诉求,例如对大端的支持. 现有的存储器接入方案仍旧应用于网络通信和电信行业。然而那些早期的移植版本仅能够支持小端的存储器访问。 + +### 来自 eInfochips 的全新 PowerPC 架构移植 + +eInfochips, 它最为出名的应该是那些基于 ARM/骁龙处理器的模块计算机板卡,例如 [Eragon 600][17]。 它已经完成了基于 QorIQ 的 Android 4.4 系统移植,且发布了白皮书描述了此项目。采用该项目的航空电子设备客户仍旧不愿透露姓名,目前仍旧不清楚什么时候会公开此该移植版本。 + + +![](http://hackerboards.com/files/einfochips_porting_android_on_powerpc-sm.jpg) +>图片来自 eInfochips 的博客日志 + +- 全新的 PowerPC Android 项目包括: +- 基于 PowerPC [e5500][1] 深度定制(bionic 定制不知道什么鬼,校对的时候也可以想想怎么处理) +- 基于 Android KitKat 的大端序支持 +- 开发工具链为 Gcc 5.2 +- Android 4.4 框架的 PowerPC 支持 +- PowerPC e5500 的 Android 内核版本为 3.12.19 + +根据 eInfochips 的销售经理 Sooryanarayanan Balasubramanian 描述,航空电子客户想要使用 Android 主要是因为熟悉的界面能够缩减培训的时间,并且让程序更新和提供新的程序变得更加容易。他继续解释说:“这次成功的移植了 Android,使得今后的工作仅仅需要在应用层作出修修改改,而不再向以前一样需要在所有层之间作相互的校验。”“这是第一次在航空航天工业作出这些尝试,这需要在设计时作出尽职的调查。” + +通过白皮书,可以知道将 Android 移植到 PowerPC 上需要对框架,核心库,开发工具链,运行时链接器,对象链接器和开源编译工具作出大量的修改。在字节码生成阶段,移植团队决定使用便携模式而不是快速的解释模式。这是因为,还没有 PowerPC 可用的快速解释模式,而使用 [libffi][18] 的便携模式能够支持 PowerPC。 + +同时,团队还面临在 Android 运行时 (ART) 环境和 Dalvik 虚拟机 (DVM) 环境之间的选择。他们发现,ART 环境下的便携模式还未经测试且缺乏良好的文档支持,所以最终选择了 DVM 环境下的便携模式。 + +白皮书中还提及了其它的一些在移植过程中遇到的困难,包括重新开发工具链,重写脚本以解决 AOSP “非标准”的使用编译器标志的问题。最终,移植提供了 37 个服务,and features a headless Android deployment along with an emulated UI in user space. + + +### 目标硬件 + +感谢来自 [eInfochips 博客日志][2] 的图片(如下图所示),我们能够确认此 PowerPC 的 Android 移植项目的硬件平台。这个板卡为 [X-ES Xpedite 6101][3],它是固实的 XMC/PrPMC 夹层模组。 + +![](http://hackerboards.com/files/xes_xpedite6101-sm.jpg) +>X-ES Xpedite 6101 照片和框图 + +X-ES Xpedite 6101 板卡拥有可选择的 NXP 公司基于 QorIQ T系列通信处理器 T2081, T1042, 和 T1022,他们分别拥有 8 个,4 个和 2 个 e6500 核心,稍有不同的是,T2081 的处理器主频为 1.8GHz,T1042/22 的处理器主频为 1.4GHz。所有的核心都集成了 AltiVec SIMD 引擎,这也就意味着它能够提供 DSP 级别的浮点运算性能。所有以上 3 款 X-ES 板卡都能够支持最高 8GB 的 DDR3-1600 ECC SDRAM 内存。外加 512MB NOR 和 32GB 的 NAND 闪存。 + +![](http://hackerboards.com/files/nxp_qoriq_t2081_block-sm.jpg) +>NXP T2081 框图 + +板卡的 I/O 包括一个 x4 PCI Express Gen2 通到,along with dual helpings of Gigabit Ethernet, RS232/422/485 串口和 SATA 3.0 接口。此外,它可选 3 款 QorIQ 处理器,Xpedite 6101 提供了三种[X-ES 加固等级][19],分别是额定工作温度 0 ~ 55°C, -40 ~ 70°C, 或者是 -40 ~ 85°C,且包含 3 类冲击和抗振类别。 + +此外,我们已经介绍过的基于 X-ES QorIQ 的 XMC/PrPMC 板卡包括[XPedite6401 和 XPedite6370][20],它们支持已有的板卡级 Linux Linux,Wind River VxWorks(一种实时操作系统) 和 Green Hills Integrity(也是一种操作系统)。 + + +### 更多信息 + +eInfochips Android PowerPC 移植白皮书可以[在此[4]下载(需要先免费注册)。 + +### Related posts: + +- [Commercial embedded Linux distro boosts virtualization][5] +- [Freescale unveils first ARM-based QorIQ SoCs][6] +- [High-end boards run Linux on 64-bit ARM QorIQ SoCs][7] +- [Free, Open Enea Linux taps Yocto Project and Linaro code][8] +- [LynuxWorks reverts to its LynxOS roots, changes name][9] +- [First quad- and octa-core QorIQ SoCs unveiled][10] +- [Free white paper shows how Linux won embedded][11] +- [Quad-core Snapdragon COM offers three dev kit options][12] +- [Tiny COM runs Linux on quad-core 64-bit Snapdragon 410][13] +- [PowerPC based IoT gateway COM ships with Linux BSP][14] + + +-------------------------------------------------------------------------------- + +via: http://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ + +作者:[Eric Brown][a] +译者:[dongfengweixiao](https://github.com/dongfengweixiao) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ +[1]: http://linuxdevices.linuxgizmos.com/low-cost-powerquicc-chips-offer-flexible-interconnect-options/ +[2]: https://www.einfochips.com/blog/k2-categories/aerospace/presenting-a-case-for-porting-android-on-powerpc-architecture.html +[3]: http://www.xes-inc.com/products/processor-mezzanines/xpedite6101/ +[4]: http://biz.einfochips.com/portingandroidonpowerpc +[5]: http://hackerboards.com/commercial-embedded-linux-distro-boosts-virtualization/ +[6]: http://hackerboards.com/freescale-unveils-first-arm-based-qoriq-socs/ +[7]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ +[8]: http://hackerboards.com/free-open-enea-linux-taps-yocto-and-linaro-code/ +[9]: http://hackerboards.com/lynuxworks-reverts-to-its-lynxos-roots-changes-name/ +[10]: http://hackerboards.com/first-quad-and-octa-core-qoriq-socs-unveiled/ +[11]: http://hackerboards.com/free-white-paper-shows-how-linux-won-embedded/ +[12]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ +[13]: http://hackerboards.com/tiny-com-runs-linux-and-android-on-quad-core-64-bit-snapdragon-410/ +[14]: http://hackerboards.com/powerpc-based-iot-gateway-com-ships-with-linux-bsp/ +[15]: http://linuxdevices.linuxgizmos.com/android-ported-to-powerpc/ +[16]: http://www.androidppc.com/ +[17]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ +[18]: https://sourceware.org/libffi/ +[19]: http://www.xes-inc.com/capabilities/ruggedization/ +[20]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ From 0b8be3b493894e984366952ee0d8916902e01234 Mon Sep 17 00:00:00 2001 From: Yu Haixin <836401406@qq.com> Date: Sat, 25 Jun 2016 10:08:00 -0500 Subject: [PATCH 1608/1710] [Translated]20160610 Getting started with ReactOS.md (#4098) * [Translated]20160610 Getting started with ReactOS.md * ... --- .../20160610 Getting started with ReactOS.md | 130 ------------------ .../20160610 Getting started with ReactOS.md | 129 +++++++++++++++++ 2 files changed, 129 insertions(+), 130 deletions(-) delete mode 100644 sources/tech/20160610 Getting started with ReactOS.md create mode 100644 translated/tech/20160610 Getting started with ReactOS.md diff --git a/sources/tech/20160610 Getting started with ReactOS.md b/sources/tech/20160610 Getting started with ReactOS.md deleted file mode 100644 index b6dca8f9b5..0000000000 --- a/sources/tech/20160610 Getting started with ReactOS.md +++ /dev/null @@ -1,130 +0,0 @@ -name1e5s translating... -Getting started with ReactOS -============================== - - -ReactOS is a relatively new open source operating system that resembles the looks of Windows NT and aims to offer similar levels of functionality and application compatibility. Featuring a wine-based user mode, this system doesn't use any of the Unix architecture, but is a rewrite of the NT architecture from scratch, with its very own FAT32 implementation, and completely free of legal implications. That said, this is not yet another Linux distro, but a unique Windows-like system that is a part of the free software world. This quick guide aims at users who want an easy to use, open source replacement for their Windows system. - - -### System Installation - -Before getting started with the installation process, I should point out that the minimum requirements of ReactOS are 500 MB of free disk space and only 96 MB of RAM. I will demonstrate the installation process on a 32-bit virtual machine. - -Navigate with the arrow keys and select the desired language by pressing “Enter”. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_1.png) - -Next, hit “Enter” again to continue with the installation, or “R” to repair an existing install. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_2.png) - -On the third screen, you'll get a warning about the current limitation that applies to this early development version of the OS. Continue with “Enter” again and you'll get a summary of the settings before the final user approval. If all is good, hit “Enter” once again. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_3.png) - -This will take you to the partitioning stage where you may delete the highlighted option by pressing “D”, and then add primary, extended, or logical partitions with “P”, “E”, and “L” respectively. If you choose to add a partition yourself, you will be given the option to set its size by entering a number of MBs and pressing “Enter” to confirm. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_4.png) - -However, if you have already unused space available, hitting “Enter” once again during the partitioning stage will automatically install ReactOS in the selected partition. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_5.png) - -The next step is the selection of the filesystem type which for now is limited to FAT32 only. - - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_6.png) - -Next is the directory selection. I will leave this at the default “/ReactOS” and it should be fine. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_7.png) - -...and we're off - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_8.png) - -Finally, we're about the choose the location of the bootloader. The first option should be the safest if installing on a real disk. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_9.png) - -In general, I could say that the installation of ReactOS is pretty straight forward. The interface may not look friendly or modern at all, but hitting “Enter” in every step will work just fine in most cases. That said, the development version of ReactOS it's fairly simple and easy to install. - -### Setting Up ReactOS - -Once we reboot and get into our new system, we're offered the help of the “Setup Wizard”. This wizard is basically allowing us to set up the language and keyboard layout settings. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_10.png) - -I used this step to add a second keyboard layout. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_11.png) - -I can even set a different key combination for changing the layout. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_12.png) - -Then I add the username... - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_13.png) - -...and an admin pass... - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_14.png) - -After the time settings are also set, ReactOS finalizes its configuration. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_15.png) - -### Inside ReactOS - -When we finally enter ReactOS for the first time, new hardware is detected and we're offered to install the available drivers automatically. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_16.png) - -These are the three devices that were automatically detected by ReactOS in my case: - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_17.png) - -What you're looking at in the above screenshot is ReactOS's “applications manager” which is of course to the standards of Linux systems. You won't find anything Linux-related here, though. Only open source applications that are known to work well with the particular system are offered. That said, some categories are well populated, while others are completely empty. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_18.png) - -I took the liberty to install Firefox through the software center, and Notepad++ by downloading the .exe file and installing it by simply double-clicking the executable. Both worked perfectly well, their desktop icons were created, menu entries added, and Notepad++ was added in the applications manager and in the right category as well. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_19.png) - -I wouldn't try running any modern Windows games, but if you want to setup the Direct 3D settings you can go to “My Computer/Control Panel/WineD3D Options”. There you will find multiple options about the Direct3D which is presumably resembling dx version 8. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_20.png) - -Another good thing with ReactOS is the fact that the Registry entries can be accessed and set as needed through “My Computer” again. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_21.png) - -If you need something handier though, you may find a Registry Editor utility from the applications menu. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_22.png) - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_23.png) - -Finally, if the looks of ReactOS look somewhat outdated to you, right click on the desktop and select “Properties”. Then choose the “Appearance” tab and set the theme and color that you prefer. - -![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_24.png) - -### Conclusion - -Honestly, I was impressed by the way ReactOS works. It's quite solid, coherent, speedy, and really user-friendly. Leaving aside the negatives that stem from the Windows design (deprecated applications menu, irrational directory structure), ReactOS is almost perfect on what it does. It may not be very rich in terms of application selection, and it may not be very powerful in terms of features yet, but I am sure it's going to flourish. The numbers show great popularity, and I'm sure the community that's going to build up around it will soon be large enough to lead the project to success. Right now, version 0.4.1 looks promising to say the least. If you care about running Windows applications and doing so in an open way, give it a try! - - --------------------------------------------------------------------------------- - -via: https://www.howtoforge.com/tutorial/getting-started-with-reactos/ - -作者:[Bill Toulas][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.howtoforge.com/tutorial/getting-started-with-reactos/ - diff --git a/translated/tech/20160610 Getting started with ReactOS.md b/translated/tech/20160610 Getting started with ReactOS.md new file mode 100644 index 0000000000..3cbc2ac9ae --- /dev/null +++ b/translated/tech/20160610 Getting started with ReactOS.md @@ -0,0 +1,129 @@ +ReactOS 新手指南 +==================================== + + +ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windows NT 类似的图形界面,并且它的目标也是提供一个与 NT 功能和应用程序兼容性差不多的系统。这个项目在没有使用任何 Unix 的情况下实现了一个类似 Wine 的用户模式。它的开发者们从头实现了NT 的架构以及对于 FAT32 的兼容,因此它也不需要负任何法律责任。这也就是说,它不是又双叒叕一个 Linux 发行版,而是一个类似 Windows 的独特的系统,它也是开源世界的一部分。这份快速指南是给那些想要一个使用简单的 Windows 的开源替代品的人准备的。 + + +### 安装系统 + +在开始安装这个系统之前,我需要说明一下,ReactOS 的最低硬件要求是 500MB 硬盘以及仅仅 96MB 内存。我会在一个 32 位的虚拟机里面演示安装过程。 + +现在,你需要使用箭头键来选择语言,而后通过回车键来选中你中意的语言, + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_1.png) + +之后,再次敲击回车键来继续安装。你也可以选择按“R”键来修复现有的系统。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_2.png) + +在第三屏中,你将看到一个警告说这个系统还是早期开发版本。再次敲击回车键,你将看到一个需要你最后确认的配置概览。如果你认为都不错,就按回车。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_3.png) + +然后,我们就到了分区这一步,在这里,你可以使用“D”键删除高亮分区,分别使用“P”键,“E”键,以及“L”键来添加一个主分区或拓展分区或逻辑分区。如果你想要自己添加一个分区的话,你需要输入这个分区的大小(以 MB 为单位),然后通过回车来确认。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_4.png) + +但是,如果你有没有使用的硬盘空间,在分区阶段在此敲击回车键将会自动在你选中的分区上安装 ReactOS。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_5.png) + +下一步是选择分区的格式,但是现在我们只能选择 FAT32. + + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_6.png) + +再下一步是选择安装文件夹。我就使用默认的“/ReactOS”了,应该没有问题。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_7.png) + +然后就是等待... + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_8.png) + +最后,我们要选择启动程序的安装位置。如果你是在实机上操作的话,第一个选项应该是最安全的。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_9.png) + +总之,我认为这个 ReactOS 的安装向导很直接。尽管安装程序的界面可能看起来一点也不现代,不友好,但是大多数情况下作为用户的我们只需要狂敲回车就能安个差不多。这就是说,ReactOS 的开发版安装起来也是相对简单方便的。 + +### 设置 ReactOS + +在我们重启进入新系统之后,“设置向导”会帮助你设置系统。目前,这个向导仅支持设置语言和键盘格式。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_10.png) + +我在这里选择了第二个键盘格式。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_11.png) + +我还可以设置一个改变键盘格式的快捷键。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_12.png) + +之后我添加了用户名... + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_13.png) + +...以及管理员密码... + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_14.png) + +在设置好时间之后,我们就算完全了设置。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_15.png) + +### ReactOS 之内 + +当我们最终第一次进入 ReactOS 的界面时,系统会检测硬件然后自动帮助我们安装驱动。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_16.png) + +这是我这里被自动检测出来的三个硬件: + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_17.png) + +在上一张图片里你看到的是 ReactOS 的“应用管理器”,这东西很 Linux。尽管你不会在这里找到任何与 LInux 有关系的东西。只有在这个系统里工作良好的开源软件才会在这个管理器中出现。这就导致了管理器中有的分类下挤的满满当当,有的分类却冷清异常。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_18.png) + +我试着通过软件中心安装了 Firefox 以及通过直接下载exe文件双击安装 Notepad++。这两个应用都能完美运行:它们的图标出现在了桌面上,在菜单中也出现了它们的名字,Notepad ++ 也出现在了软件中心右侧的分类栏里。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_19.png) + +我没有尝试运行任何现代的 Windows 游戏,如果你想配置 Direct 3D 的话你可以转到 “我的电脑/控制选项/WineD3D 配置”。在那里,你能看到很多和 dx 8 相似的Direct3D 选项。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_20.png) + +ReactOS 还有一个好啊,就是我们可以通过“我的电脑”来操控注册表。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_21.png) + +如果你需要一个简单点的工具,你可以在停用菜单里打开注册表编辑器。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_22.png) + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_23.png) + +最后,如果你认为 ReactOS 看起来有点过时了的话,你可以在桌面右击选择“属性”,之后在“外观”那里选择你喜欢的主题和颜色。 + +![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_24.png) + +### 结论 + +老实说,我对 ReactOS 的工作方式印象深刻。它相当稳定,连贯,快速,真正人性化。抛开 Windows 的阴影(过时的应用菜单,不合理的菜单结构)不谈的话,ReactOS 几乎做到了尽善尽美。它可能不会有太多应用可供选择,现有的功能也可能不够强大,但是我确信它以后会有自己的一席之地。关于它的数据显示出了它的人气,我确定将要围绕它建立起来的社区将会很快就壮大到能把这个项目带往成功之路的地步。如今,ReactOS 的最新版本是 0.4.1。如果想要以开源的方式运行 Windows 的应用,那么它就是你的菜! + + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/getting-started-with-reactos/ + +作者:[Bill Toulas][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.howtoforge.com/tutorial/getting-started-with-reactos/ + From 01d7494aa10a84ae30c8944d7daf74dc932a07c0 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Sat, 25 Jun 2016 23:43:03 +0800 Subject: [PATCH 1609/1710] Proofread 20160610 Getting started with ReactOS --- .../20160610 Getting started with ReactOS.md | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/translated/tech/20160610 Getting started with ReactOS.md b/translated/tech/20160610 Getting started with ReactOS.md index 3cbc2ac9ae..ffeeb9021f 100644 --- a/translated/tech/20160610 Getting started with ReactOS.md +++ b/translated/tech/20160610 Getting started with ReactOS.md @@ -2,14 +2,14 @@ ReactOS 新手指南 ==================================== -ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windows NT 类似的图形界面,并且它的目标也是提供一个与 NT 功能和应用程序兼容性差不多的系统。这个项目在没有使用任何 Unix 的情况下实现了一个类似 Wine 的用户模式。它的开发者们从头实现了NT 的架构以及对于 FAT32 的兼容,因此它也不需要负任何法律责任。这也就是说,它不是又双叒叕一个 Linux 发行版,而是一个类似 Windows 的独特的系统,它也是开源世界的一部分。这份快速指南是给那些想要一个使用简单的 Windows 的开源替代品的人准备的。 +ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windows NT 类似的图形界面,并且它的目标也是提供一个与 NT 功能和应用程序兼容性差不多的系统。这个项目在没有使用任何 Unix 的情况下实现了一个类似 Wine 的用户模式。它的开发者们从头实现了 NT 的架构以及对于 FAT32 的兼容,因此它也不需要负任何法律责任。这也就是说,它不是又双叒叕一个 Linux 发行版,而是一个独特的类 Windows 系统,并且是开源世界的一部分。这份快速指南是给那些想要一个易于使用的 Windows 的开源替代品的人准备的。 ### 安装系统 在开始安装这个系统之前,我需要说明一下,ReactOS 的最低硬件要求是 500MB 硬盘以及仅仅 96MB 内存。我会在一个 32 位的虚拟机里面演示安装过程。 -现在,你需要使用箭头键来选择语言,而后通过回车键来选中你中意的语言, +现在,你需要使用箭头键来选择你想要语言,而后通过回车键来确认。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_1.png) @@ -17,19 +17,19 @@ ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windo ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_2.png) -在第三屏中,你将看到一个警告说这个系统还是早期开发版本。再次敲击回车键,你将看到一个需要你最后确认的配置概览。如果你认为都不错,就按回车。 +在第三屏中,你将看到一个警告说这个系统还是早期开发版本。再次敲击回车键,你将看到一个需要你最后确认的配置概览。如果你认为没问题,就按回车。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_3.png) -然后,我们就到了分区这一步,在这里,你可以使用“D”键删除高亮分区,分别使用“P”键,“E”键,以及“L”键来添加一个主分区或拓展分区或逻辑分区。如果你想要自己添加一个分区的话,你需要输入这个分区的大小(以 MB 为单位),然后通过回车来确认。 +然后,我们就到了分区这一步,在这里,你可以使用“D”键删除高亮分区,分别使用“P”键、“E”键以及“L”键来添加一个主分区、拓展分区或逻辑分区。如果你想要自己添加一个分区,你需要输入这个分区的大小(以 MB 为单位),然后通过回车来确认。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_4.png) -但是,如果你有没有使用的硬盘空间,在分区阶段在此敲击回车键将会自动在你选中的分区上安装 ReactOS。 +但是,如果你有未使用的硬盘空间,在分区过程直接敲击回车键可以自动在你选中的分区上安装 ReactOS。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_5.png) -下一步是选择分区的格式,但是现在我们只能选择 FAT32. +下一步是选择分区的格式,不过现在我们只能选择 FAT32。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_6.png) @@ -46,7 +46,7 @@ ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windo ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_9.png) -总之,我认为这个 ReactOS 的安装向导很直接。尽管安装程序的界面可能看起来一点也不现代,不友好,但是大多数情况下作为用户的我们只需要狂敲回车就能安个差不多。这就是说,ReactOS 的开发版安装起来也是相对简单方便的。 +总地来说,我认为 ReactOS 的安装向导很直接。尽管安装程序的界面可能看起来一点也不现代、不友好,但是大多数情况下作为用户的我们只需要狂敲回车就能安个差不多。这就是说,ReactOS 的开发版安装起来也是相对简单方便的。 ### 设置 ReactOS @@ -58,25 +58,25 @@ ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windo ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_11.png) -我还可以设置一个改变键盘格式的快捷键。 +我还可以设置一个改变键盘布局的快捷键。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_12.png) -之后我添加了用户名... +之后我添加了用户名… ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_13.png) -...以及管理员密码... +…以及管理员密码… ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_14.png) -在设置好时间之后,我们就算完全了设置。 +在设置好时间之后,我们就算完成了系统设置。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_15.png) ### ReactOS 之内 -当我们最终第一次进入 ReactOS 的界面时,系统会检测硬件然后自动帮助我们安装驱动。 +当我们历经千辛万苦,终于首次进入 ReactOS 的界面时,系统会检测硬件并自动帮助我们安装驱动。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_16.png) @@ -84,23 +84,23 @@ ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windo ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_17.png) -在上一张图片里你看到的是 ReactOS 的“应用管理器”,这东西很 Linux。尽管你不会在这里找到任何与 LInux 有关系的东西。只有在这个系统里工作良好的开源软件才会在这个管理器中出现。这就导致了管理器中有的分类下挤的满满当当,有的分类却冷清异常。 +在上一张图片里你看到的是 ReactOS 的“应用管理器”,这东西是 Linux 的标配。不过你不会在这里找到任何与 Linux 有关系的东西。只有在这个系统里工作良好的开源软件才会在这个管理器中出现。这就导致了管理器中有的分类下挤得满满当当,有的却冷清异常。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_18.png) -我试着通过软件中心安装了 Firefox 以及通过直接下载exe文件双击安装 Notepad++。这两个应用都能完美运行:它们的图标出现在了桌面上,在菜单中也出现了它们的名字,Notepad ++ 也出现在了软件中心右侧的分类栏里。 +我试着通过软件中心安装了 Firefox 以及通过直接下载 exe 文件双击安装 Notepad++。这两个应用都能完美运行:它们的图标出现在了桌面上,在菜单中也出现了它们的名字,Notepad++ 也出现在了软件中心右侧的分类栏里。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_19.png) -我没有尝试运行任何现代的 Windows 游戏,如果你想配置 Direct 3D 的话你可以转到 “我的电脑/控制选项/WineD3D 配置”。在那里,你能看到很多和 dx 8 相似的Direct3D 选项。 +我没有尝试运行任何现代的 Windows 游戏,如果你想配置 Direct 3D 的话,你可以转到 “我的电脑/控制选项/WineD3D 配置”。在那里,你能看到很多 Direct3D 选项,大致与 dx 8 的选项类似。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_20.png) -ReactOS 还有一个好啊,就是我们可以通过“我的电脑”来操控注册表。 +ReactOS 还有一个好啊,就是我们可以通过“我的电脑”来操作注册表。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_21.png) -如果你需要一个简单点的工具,你可以在停用菜单里打开注册表编辑器。 +如果你需要一个简单点的工具,你可以在应用菜单里打开注册表编辑器。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_22.png) @@ -112,7 +112,7 @@ ReactOS 还有一个好啊,就是我们可以通过“我的电脑”来操控 ### 结论 -老实说,我对 ReactOS 的工作方式印象深刻。它相当稳定,连贯,快速,真正人性化。抛开 Windows 的阴影(过时的应用菜单,不合理的菜单结构)不谈的话,ReactOS 几乎做到了尽善尽美。它可能不会有太多应用可供选择,现有的功能也可能不够强大,但是我确信它以后会有自己的一席之地。关于它的数据显示出了它的人气,我确定将要围绕它建立起来的社区将会很快就壮大到能把这个项目带往成功之路的地步。如今,ReactOS 的最新版本是 0.4.1。如果想要以开源的方式运行 Windows 的应用,那么它就是你的菜! +老实说,我对 ReactOS 的工作方式印象深刻。它相当稳定、连贯、快速,并且真正人性化。抛开 Windows 的阴影(过时的应用菜单,不合理的菜单结构)不谈的话,ReactOS 几乎做到了尽善尽美。它可能不会有太多应用可供选择,现有的功能也可能不够强大,但是我确信它将会繁荣壮大。关于它的数据显示出了它的人气,我确定将要围绕它建立起来的社区将会很快就壮大到能把这个项目带往成功之路的地步。如今,ReactOS 的最新版本是 0.4.1。如果想要以开源的方式运行 Windows 的应用,那么它就是你的菜! -------------------------------------------------------------------------------- @@ -121,9 +121,8 @@ via: https://www.howtoforge.com/tutorial/getting-started-with-reactos/ 作者:[Bill Toulas][a] 译者:[name1e5s](https://github.com/name1e5s) -校对:[校对者ID](https://github.com/校对者ID) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://www.howtoforge.com/tutorial/getting-started-with-reactos/ - From edb0dd9eb39e38c0c18467b65f6424d00a007ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E9=A3=8E=E5=94=AF=E7=AC=91?= Date: Sun, 26 Jun 2016 00:00:04 +0800 Subject: [PATCH 1610/1710] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=9A=84=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成文档的翻译 --- ...n Per-Process and Per-User Basis in Linux.md | 535 +++++++++--------- 1 file changed, 265 insertions(+), 270 deletions(-) diff --git a/sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md b/sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md index b0aa8e68ff..befcdb5d31 100644 --- a/sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md +++ b/sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md @@ -1,396 +1,395 @@ -Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux +Smem – Linux 下基于进程和用户的内存占用报告程序 =========================================================================== -Memory management in terms of monitoring memory usage is one important thing to do on your Linux system, there are many tools available for monitoring your memory usage that you can find on different Linux distributions. But they work in different ways, in this how to guide, we shall take a look at how to install and use one such tool called smem. +Linux 系统的内存管理工作中,内存使用情况的监控是十分重要的,不同的 Linux 发行版可能会提供不同的工具。但是它们的工作方式多种多样,这里,我们将会介绍如何安装和使用这样的一个名为 SMEM 的工具软件。 -Smem is a command-line memory reporting tool thats gives a user diverse reports on memory usage on a Linux system. There is one unique thing about smem, unlike other traditional memory reporting tools, it reports PSS (Proportional Set Size), a more meaningful representation of memory usage by applications and libraries in a virtual memory setup. +Smem 是一款命令行下的内存使用情况报告工具。和其它传统的内存报告工具不同个,它仅做这一件事情——报告 PPS(实际使用的物理内存[比例分配共享库占用的内存]),这种内存使用量表示方法对于那些在虚拟内存中的应用和库更有意义。 ![](http://www.tecmint.com/wp-content/uploads/2016/06/Smem-Linux-Memory-Reporting-Tool.png) ->Smem – Linux Memory Reporting Tool +>Smem – Linux 内存报告工具 -Existing traditional tools focus mainly on reading RSS (Resident Set Size) which is a standard measure to monitor memory usage in a physical memory scheme, but tends to overestimate memory usage by applications. +已有的传统工具会将目光主要集中于读取 RSS(实际使用物理内存[包含共享库占用的内存]),这种方法对于恒量那些使用物理内存方案的使用情况来说是标准方法,但是应用程序往往会高估内存的使用情况。 -PSS on the other hand, gives a reasonable measure by determining the “fair-share” of memory used by applications and libraries in a virtual memory scheme. +PSS 从另一个侧面,为那些使用虚拟内存方案的应用和库提供了给出了确定内存“公评分担”的合理措施。 -You can read this [guide (about memory RSS and PSS)][1] to understand memory consumption in a Linux system, but let us proceed to looking at some of the features of smem. +你可以 [阅读此指南了解 (关于内存的 RSS 和 PSS)][1] Linux 系统中的内存占用。 -### Features of Smem Tool +### Smem 这一工具的特点 -- System overview listing -- Listings and also filtering by process, mappings or user -- Using data from /proc filesystem -- Configurable listing columns from several data sources -- Configurable output units and percentages -- Easy to configure headers and totals in listings -- Using data snapshots from directory mirrors or compressed tar files -- Built-in chart generation mechanism -- Lightweight capture tool used in embedded systems +- 系统概览列表 +- 以进程,映射和用户来显示或者是过滤 +- 从 /proc 文件系统中得到数据 +- 从多个数据源配置显示条目 +- 可配置输出单元和百分比 +- 易于配置列表标题和汇总 +- 从镜像文件夹或者是压缩的 tar 文件中获得数据快照 +- 内置的图表生成机制 +- 在嵌入式系统中使用轻量级的捕获工具 -### How to Install Smem – Memory Reporting Tool in Linux +### 如何安装 Smem - Linux 下的内存使用情况报告工具 -Before you proceed with installation of smem, your system must meet the following requirements: +安装之前,需要确保满足以下的条件: -- modern kernel (> 2.6.27 or so) -- a recent version of Python (2.4 or so) -- optional [matplotlib][2] library for generation of charts +- 现代内存 (版本号高于 2.6.27) +- 较新的 Python 版本 (2.4 及以后版本) +- 可选的 [matplotlib][2] 库用于生成图表 -Most of the today’s Linux distributions comes with latest Kernel version with Python 2 or 3 support, so the only requirement is to install matplotlib library which is used to generate nice charts. +对于当今的大多数的 Linux 发行版而言,内核版本和 Python 的版本都能够 满足需要,所以仅需要为生成良好的图表安装 matplotlib 库。 -#### On RHEL, CentOS and Fedora +#### RHEL, CentOS 和 Fedora -First enable [EPEL (Extra Packages for Enterprise Linux)][3] repository and then install as follows: +首先启用 [EPEL (Extra Packages for Enterprise Linux)][3] 软件源然后按照下列步骤操作: ``` # yum install smem python-matplotlib python-tk ``` -#### On Debian and Ubuntu +#### Debian 和 Ubuntu ``` $ sudo apt-get install smem ``` -#### On Linux Mint +#### Linux Mint ``` $ sudo apt-get install smem python-matplotlib python-tk ``` -#### on Arch Linux +#### Arch Linux -Use this [AUR repository][4]. +使用此 [AUR repository][4]。 -### How to Use Smem – Memory Reporting Tool in Linux +### 如何使用 Smem – Linux 下的内存使用情况报告工具 -To view a report of memory usage across the whole system, by all system users, run the following command: +为了查看整个系统所有用户的内存使用情况,运行以下的命令: ``` -$ sudo smem +$ sudo smem ``` -Monitor Memory Usage of Linux System +监视 Linux 系统中的内存使用情况 ``` - PID User Command Swap USS PSS RSS - 6367 tecmint cat 0 100 145 1784 - 6368 tecmint cat 0 100 147 1676 - 2864 tecmint /usr/bin/ck-launch-session 0 144 165 1780 - 7656 tecmint gnome-pty-helper 0 156 178 1832 - 5758 tecmint gnome-pty-helper 0 156 179 1916 - 1441 root /sbin/getty -8 38400 tty2 0 152 184 2052 - 1434 root /sbin/getty -8 38400 tty5 0 156 187 2060 - 1444 root /sbin/getty -8 38400 tty3 0 156 187 2060 - 1432 root /sbin/getty -8 38400 tty4 0 156 188 2124 - 1452 root /sbin/getty -8 38400 tty6 0 164 196 2064 - 2619 root /sbin/getty -8 38400 tty1 0 164 196 2136 - 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 212 224 1540 - 1504 root acpid -c /etc/acpi/events - 0 220 236 1604 - 3311 tecmint syndaemon -i 0.5 -K -R 0 252 292 2556 - 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0 300 326 2548 - 1588 root cron 0 292 333 2344 - 1589 avahi avahi-daemon: chroot helpe 0 124 334 1632 - 1523 root /usr/sbin/irqbalance 0 316 343 2096 - 585 root upstart-socket-bridge --dae 0 328 351 1820 - 3033 tecmint /usr/bin/dbus-launch --exit 0 328 360 2160 - 1346 root upstart-file-bridge --daemo 0 348 371 1776 - 2607 root /usr/bin/xdm 0 188 378 2368 - 1635 kernoops /usr/sbin/kerneloops 0 352 386 2684 - 344 root upstart-udev-bridge --daemo 0 400 427 2132 - 2960 tecmint /usr/bin/ssh-agent /usr/bin 0 480 485 992 - 3468 tecmint /bin/dbus-daemon --config-f 0 344 515 3284 - 1559 avahi avahi-daemon: running [tecm 0 284 517 3108 - 7289 postfix pickup -l -t unix -u -c 0 288 534 2808 - 2135 root /usr/lib/postfix/master 0 352 576 2872 - 2436 postfix qmgr -l -t unix -u 0 360 606 2884 - 1521 root /lib/systemd/systemd-logind 0 600 650 3276 - 2222 nobody /usr/sbin/dnsmasq --no-reso 0 604 669 3288 + PID User Command Swap USS PSS RSS + 6367 tecmint cat 0 100 145 1784 + 6368 tecmint cat 0 100 147 1676 + 2864 tecmint /usr/bin/ck-launch-session 0 144 165 1780 + 7656 tecmint gnome-pty-helper 0 156 178 1832 + 5758 tecmint gnome-pty-helper 0 156 179 1916 + 1441 root /sbin/getty -8 38400 tty2 0 152 184 2052 + 1434 root /sbin/getty -8 38400 tty5 0 156 187 2060 + 1444 root /sbin/getty -8 38400 tty3 0 156 187 2060 + 1432 root /sbin/getty -8 38400 tty4 0 156 188 2124 + 1452 root /sbin/getty -8 38400 tty6 0 164 196 2064 + 2619 root /sbin/getty -8 38400 tty1 0 164 196 2136 + 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 212 224 1540 + 1504 root acpid -c /etc/acpi/events - 0 220 236 1604 + 3311 tecmint syndaemon -i 0.5 -K -R 0 252 292 2556 + 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0 300 326 2548 + 1588 root cron 0 292 333 2344 + 1589 avahi avahi-daemon: chroot helpe 0 124 334 1632 + 1523 root /usr/sbin/irqbalance 0 316 343 2096 + 585 root upstart-socket-bridge --dae 0 328 351 1820 + 3033 tecmint /usr/bin/dbus-launch --exit 0 328 360 2160 + 1346 root upstart-file-bridge --daemo 0 348 371 1776 + 2607 root /usr/bin/xdm 0 188 378 2368 + 1635 kernoops /usr/sbin/kerneloops 0 352 386 2684 + 344 root upstart-udev-bridge --daemo 0 400 427 2132 + 2960 tecmint /usr/bin/ssh-agent /usr/bin 0 480 485 992 + 3468 tecmint /bin/dbus-daemon --config-f 0 344 515 3284 + 1559 avahi avahi-daemon: running [tecm 0 284 517 3108 + 7289 postfix pickup -l -t unix -u -c 0 288 534 2808 + 2135 root /usr/lib/postfix/master 0 352 576 2872 + 2436 postfix qmgr -l -t unix -u 0 360 606 2884 + 1521 root /lib/systemd/systemd-logind 0 600 650 3276 + 2222 nobody /usr/sbin/dnsmasq --no-reso 0 604 669 3288 .... ``` -When a normal user runs smem, it displays memory usage by process that the user has started, the processes are arranged in order of increasing PSS. +当常规用户运行 smem,将会显示由用户启用的进程的占用情况,其中进程按照 PSS 的值升序排列。 -Take a look at the output below on my system for memory usage by processes started by user aaronkilik: +下面的输出为用户 “aaronkilik” 启用的进程的使用情况: ``` $ smem ``` -Monitor User Memory Usage in Linux +监视 Linux 系统中的内存使用情况 ``` - PID User Command Swap USS PSS RSS - 6367 tecmint cat 0 100 145 1784 - 6368 tecmint cat 0 100 147 1676 - 2864 tecmint /usr/bin/ck-launch-session 0 144 166 1780 - 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 212 224 1540 - 3311 tecmint syndaemon -i 0.5 -K -R 0 252 292 2556 - 3033 tecmint /usr/bin/dbus-launch --exit 0 328 360 2160 - 3468 tecmint /bin/dbus-daemon --config-f 0 344 515 3284 - 3122 tecmint /usr/lib/gvfs/gvfsd 0 656 801 5552 - 3471 tecmint /usr/lib/at-spi2-core/at-sp 0 708 864 5992 - 3396 tecmint /usr/lib/gvfs/gvfs-mtp-volu 0 804 914 6204 - 3208 tecmint /usr/lib/x86_64-linux-gnu/i 0 892 1012 6188 - 3380 tecmint /usr/lib/gvfs/gvfs-afc-volu 0 820 1024 6396 - 3034 tecmint //bin/dbus-daemon --fork -- 0 920 1081 3040 - 3365 tecmint /usr/lib/gvfs/gvfs-gphoto2- 0 972 1099 6052 - 3228 tecmint /usr/lib/gvfs/gvfsd-trash - 0 980 1153 6648 - 3107 tecmint /usr/lib/dconf/dconf-servic 0 1212 1283 5376 - 6399 tecmint /opt/google/chrome/chrome - 0 144 1409 10732 - 3478 tecmint /usr/lib/x86_64-linux-gnu/g 0 1724 1820 6320 - 7365 tecmint /usr/lib/gvfs/gvfsd-http -- 0 1352 1884 8704 - 6937 tecmint /opt/libreoffice5.0/program 0 1140 2328 5040 - 3194 tecmint /usr/lib/x86_64-linux-gnu/p 0 1956 2405 14228 - 6373 tecmint /opt/google/chrome/nacl_hel 0 2324 2541 8908 - 3313 tecmint /usr/lib/gvfs/gvfs-udisks2- 0 2460 2754 8736 - 3464 tecmint /usr/lib/at-spi2-core/at-sp 0 2684 2823 7920 - 5771 tecmint ssh -p 4521 tecmnt765@212.7 0 2544 2864 6540 - 5759 tecmint /bin/bash 0 2416 2923 5640 - 3541 tecmint /usr/bin/python /usr/bin/mi 0 2584 3008 7248 - 7657 tecmint bash 0 2516 3055 6028 - 3127 tecmint /usr/lib/gvfs/gvfsd-fuse /r 0 3024 3126 8032 - 3205 tecmint mate-screensaver 0 2520 3331 18072 - 3171 tecmint /usr/lib/mate-panel/notific 0 2860 3495 17140 - 3030 tecmint x-session-manager 0 4400 4879 17500 - 3197 tecmint mate-volume-control-applet 0 3860 5226 23736 + PID User Command Swap USS PSS RSS + 6367 tecmint cat 0 100 145 1784 + 6368 tecmint cat 0 100 147 1676 + 2864 tecmint /usr/bin/ck-launch-session 0 144 166 1780 + 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 212 224 1540 + 3311 tecmint syndaemon -i 0.5 -K -R 0 252 292 2556 + 3033 tecmint /usr/bin/dbus-launch --exit 0 328 360 2160 + 3468 tecmint /bin/dbus-daemon --config-f 0 344 515 3284 + 3122 tecmint /usr/lib/gvfs/gvfsd 0 656 801 5552 + 3471 tecmint /usr/lib/at-spi2-core/at-sp 0 708 864 5992 + 3396 tecmint /usr/lib/gvfs/gvfs-mtp-volu 0 804 914 6204 + 3208 tecmint /usr/lib/x86_64-linux-gnu/i 0 892 1012 6188 + 3380 tecmint /usr/lib/gvfs/gvfs-afc-volu 0 820 1024 6396 + 3034 tecmint //bin/dbus-daemon --fork -- 0 920 1081 3040 + 3365 tecmint /usr/lib/gvfs/gvfs-gphoto2- 0 972 1099 6052 + 3228 tecmint /usr/lib/gvfs/gvfsd-trash - 0 980 1153 6648 + 3107 tecmint /usr/lib/dconf/dconf-servic 0 1212 1283 5376 + 6399 tecmint /opt/google/chrome/chrome - 0 144 1409 10732 + 3478 tecmint /usr/lib/x86_64-linux-gnu/g 0 1724 1820 6320 + 7365 tecmint /usr/lib/gvfs/gvfsd-http -- 0 1352 1884 8704 + 6937 tecmint /opt/libreoffice5.0/program 0 1140 2328 5040 + 3194 tecmint /usr/lib/x86_64-linux-gnu/p 0 1956 2405 14228 + 6373 tecmint /opt/google/chrome/nacl_hel 0 2324 2541 8908 + 3313 tecmint /usr/lib/gvfs/gvfs-udisks2- 0 2460 2754 8736 + 3464 tecmint /usr/lib/at-spi2-core/at-sp 0 2684 2823 7920 + 5771 tecmint ssh -p 4521 tecmnt765@212.7 0 2544 2864 6540 + 5759 tecmint /bin/bash 0 2416 2923 5640 + 3541 tecmint /usr/bin/python /usr/bin/mi 0 2584 3008 7248 + 7657 tecmint bash 0 2516 3055 6028 + 3127 tecmint /usr/lib/gvfs/gvfsd-fuse /r 0 3024 3126 8032 + 3205 tecmint mate-screensaver 0 2520 3331 18072 + 3171 tecmint /usr/lib/mate-panel/notific 0 2860 3495 17140 + 3030 tecmint x-session-manager 0 4400 4879 17500 + 3197 tecmint mate-volume-control-applet 0 3860 5226 23736 ... ``` -There are many options to invoke while using smem, for example, to view system wide memory consumption, run the following command: +使用 smem 是还有一些参数可以选用,例如当参看整个系统的内存占用情况,运行以下的命令: ``` $ sudo smem -w ``` - -Monitor System Wide Memory User Consumption +监视 Linux 系统中的内存使用情况 ``` -Area Used Cache Noncache -firmware/hardware 0 0 0 -kernel image 0 0 0 -kernel dynamic memory 1425320 1291412 133908 -userspace memory 2215368 451608 1763760 -free memory 4424936 4424936 0 +Area Used Cache Noncache +firmware/hardware 0 0 0 +kernel image 0 0 0 +kernel dynamic memory 1425320 1291412 133908 +userspace memory 2215368 451608 1763760 +free memory 4424936 4424936 0 ``` -To view memory usage on a per-user basis, run the command below: +如果想要查看每一个用户的内存使用情况,运行以下的命令: ``` $ sudo smem -u ``` -Monitor Memory Consumption Per-User Basis in Linux +Linux 下以用户为单位监控内存占用情况 ``` -User Count Swap USS PSS RSS -rtkit 1 0 300 326 2548 -kernoops 1 0 352 385 2684 -avahi 2 0 408 851 4740 -postfix 2 0 648 1140 5692 -messagebus 1 0 1012 1173 3320 -syslog 1 0 1396 1419 3232 -www-data 2 0 5100 6572 13580 -mpd 1 0 7416 8302 12896 -nobody 2 0 4024 11305 24728 -root 39 0 323876 353418 496520 -tecmint 64 0 1652888 1815699 2763112 +User Count Swap USS PSS RSS +rtkit 1 0 300 326 2548 +kernoops 1 0 352 385 2684 +avahi 2 0 408 851 4740 +postfix 2 0 648 1140 5692 +messagebus 1 0 1012 1173 3320 +syslog 1 0 1396 1419 3232 +www-data 2 0 5100 6572 13580 +mpd 1 0 7416 8302 12896 +nobody 2 0 4024 11305 24728 +root 39 0 323876 353418 496520 +tecmint 64 0 1652888 1815699 2763112 ``` -You can also report memory usage by mappings as follows: +你也可以按照映射显示内存使用情况: ``` $ sudo smem -m ``` -Monitor Memory Usage by Mappings in Linux +Linux 下以映射为单位监控内存占用情况 ``` -Map PIDs AVGPSS PSS -/dev/fb0 1 0 0 -/home/tecmint/.cache/fontconfig/7ef2298f 18 0 0 -/home/tecmint/.cache/fontconfig/c57959a1 18 0 0 -/home/tecmint/.local/share/mime/mime.cac 15 0 0 -/opt/google/chrome/chrome_material_100_p 9 0 0 -/opt/google/chrome/chrome_material_200_p 9 0 0 -/usr/lib/x86_64-linux-gnu/gconv/gconv-mo 41 0 0 -/usr/share/icons/Mint-X-Teal/icon-theme. 15 0 0 -/var/cache/fontconfig/0c9eb80ebd1c36541e 20 0 0 -/var/cache/fontconfig/0d8c3b2ac0904cb8a5 20 0 0 -/var/cache/fontconfig/1ac9eb803944fde146 20 0 0 -/var/cache/fontconfig/3830d5c3ddfd5cd38a 20 0 0 -/var/cache/fontconfig/385c0604a188198f04 20 0 0 -/var/cache/fontconfig/4794a0821666d79190 20 0 0 -/var/cache/fontconfig/56cf4f4769d0f4abc8 20 0 0 -/var/cache/fontconfig/767a8244fc0220cfb5 20 0 0 -/var/cache/fontconfig/8801497958630a81b7 20 0 0 -/var/cache/fontconfig/99e8ed0e538f840c56 20 0 0 -/var/cache/fontconfig/b9d506c9ac06c20b43 20 0 0 -/var/cache/fontconfig/c05880de57d1f5e948 20 0 0 -/var/cache/fontconfig/dc05db6664285cc2f1 20 0 0 -/var/cache/fontconfig/e13b20fdb08344e0e6 20 0 0 -/var/cache/fontconfig/e7071f4a29fa870f43 20 0 0 +Map PIDs AVGPSS PSS +/dev/fb0 1 0 0 +/home/tecmint/.cache/fontconfig/7ef2298f 18 0 0 +/home/tecmint/.cache/fontconfig/c57959a1 18 0 0 +/home/tecmint/.local/share/mime/mime.cac 15 0 0 +/opt/google/chrome/chrome_material_100_p 9 0 0 +/opt/google/chrome/chrome_material_200_p 9 0 0 +/usr/lib/x86_64-linux-gnu/gconv/gconv-mo 41 0 0 +/usr/share/icons/Mint-X-Teal/icon-theme. 15 0 0 +/var/cache/fontconfig/0c9eb80ebd1c36541e 20 0 0 +/var/cache/fontconfig/0d8c3b2ac0904cb8a5 20 0 0 +/var/cache/fontconfig/1ac9eb803944fde146 20 0 0 +/var/cache/fontconfig/3830d5c3ddfd5cd38a 20 0 0 +/var/cache/fontconfig/385c0604a188198f04 20 0 0 +/var/cache/fontconfig/4794a0821666d79190 20 0 0 +/var/cache/fontconfig/56cf4f4769d0f4abc8 20 0 0 +/var/cache/fontconfig/767a8244fc0220cfb5 20 0 0 +/var/cache/fontconfig/8801497958630a81b7 20 0 0 +/var/cache/fontconfig/99e8ed0e538f840c56 20 0 0 +/var/cache/fontconfig/b9d506c9ac06c20b43 20 0 0 +/var/cache/fontconfig/c05880de57d1f5e948 20 0 0 +/var/cache/fontconfig/dc05db6664285cc2f1 20 0 0 +/var/cache/fontconfig/e13b20fdb08344e0e6 20 0 0 +/var/cache/fontconfig/e7071f4a29fa870f43 20 0 0 .... ``` -There are also options for filtering smem output and we shall look at two examples here. +还有其它的选项用于 smem 的输出,下面将会举两个例子。 -To filter output by username, invoke the -u or --userfilter="regex" option as below: +要按照用户名筛选输出的信息,调用 -u 或者是 --userfilter="regex" 选项,就像下面的命令这样: ``` $ sudo smem -u ``` -Report Memory Usage by User +按照用户报告内存使用情况 ``` -User Count Swap USS PSS RSS -rtkit 1 0 300 326 2548 -kernoops 1 0 352 385 2684 -avahi 2 0 408 851 4740 -postfix 2 0 648 1140 5692 -messagebus 1 0 1012 1173 3320 -syslog 1 0 1400 1423 3236 -www-data 2 0 5100 6572 13580 -mpd 1 0 7416 8302 12896 -nobody 2 0 4024 11305 24728 -root 39 0 323804 353374 496552 -tecmint 64 0 1708900 1871766 2819212 +User Count Swap USS PSS RSS +rtkit 1 0 300 326 2548 +kernoops 1 0 352 385 2684 +avahi 2 0 408 851 4740 +postfix 2 0 648 1140 5692 +messagebus 1 0 1012 1173 3320 +syslog 1 0 1400 1423 3236 +www-data 2 0 5100 6572 13580 +mpd 1 0 7416 8302 12896 +nobody 2 0 4024 11305 24728 +root 39 0 323804 353374 496552 +tecmint 64 0 1708900 1871766 2819212 ``` -To filter output by process name, invoke the -P or --processfilter="regex" option as follows: +要按照进程名称筛选输出信息,调用 -P 或者是 --processfilter="regex" 选项,就像下面的命令这样: ``` $ sudo smem --processfilter="firefox" ``` -Report Memory Usage by Process Name +按照进程名称报告内存使用情况 ``` -PID User Command Swap USS PSS RSS - 9212 root sudo smem --processfilter=f 0 1172 1434 4856 - 9213 root /usr/bin/python /usr/bin/sm 0 7368 7793 11984 - 4424 tecmint /usr/lib/firefox/firefox 0 931732 937590 961504 +PID User Command Swap USS PSS RSS + 9212 root sudo smem --processfilter=f 0 1172 1434 4856 + 9213 root /usr/bin/python /usr/bin/sm 0 7368 7793 11984 + 4424 tecmint /usr/lib/firefox/firefox 0 931732 937590 961504 ``` - -Output formatting can be very important, and there are options to help you format memory reports and we shall take a look at few examples below. -To show desired columns in the report, use -c or --columns option as follows: +输出的格式有时候也很重要,smem 提供了一些参数帮助您格式化内存使用报告,我们将举出几个例子。 + +设置哪些列在报告中,使用 -c 或者是 --columns选项,就像下面的命令这样: ``` $ sudo smem -c "name user pss rss" ``` -Report Memory Usage by Columns +按列报告内存使用情况 ``` -Name User PSS RSS -cat tecmint 145 1784 -cat tecmint 147 1676 -ck-launch-sessi tecmint 165 1780 -gnome-pty-helpe tecmint 178 1832 -gnome-pty-helpe tecmint 179 1916 -getty root 184 2052 -getty root 187 2060 -getty root 187 2060 -getty root 188 2124 -getty root 196 2064 -getty root 196 2136 -sh tecmint 224 1540 -acpid root 236 1604 -syndaemon tecmint 296 2560 -rtkit-daemon rtkit 326 2548 -cron root 333 2344 -avahi-daemon avahi 334 1632 -irqbalance root 343 2096 -upstart-socket- root 351 1820 -dbus-launch tecmint 360 2160 -upstart-file-br root 371 1776 -xdm root 378 2368 -kerneloops kernoops 386 2684 -upstart-udev-br root 427 2132 -ssh-agent tecmint 485 992 +Name User PSS RSS +cat tecmint 145 1784 +cat tecmint 147 1676 +ck-launch-sessi tecmint 165 1780 +gnome-pty-helpe tecmint 178 1832 +gnome-pty-helpe tecmint 179 1916 +getty root 184 2052 +getty root 187 2060 +getty root 187 2060 +getty root 188 2124 +getty root 196 2064 +getty root 196 2136 +sh tecmint 224 1540 +acpid root 236 1604 +syndaemon tecmint 296 2560 +rtkit-daemon rtkit 326 2548 +cron root 333 2344 +avahi-daemon avahi 334 1632 +irqbalance root 343 2096 +upstart-socket- root 351 1820 +dbus-launch tecmint 360 2160 +upstart-file-br root 371 1776 +xdm root 378 2368 +kerneloops kernoops 386 2684 +upstart-udev-br root 427 2132 +ssh-agent tecmint 485 992 ... ``` -You can invoke the -p option to report memory usage in percentages, as in the command below: +也可以调用 -p 选项以百分比的形式报告内存使用情况,就像下面的命令这样: ``` $ sudo smem -p ``` -Report Memory Usage by Percentages +按百分比报告内存使用情况 ``` - PID User Command Swap USS PSS RSS - 6367 tecmint cat 0.00% 0.00% 0.00% 0.02% - 6368 tecmint cat 0.00% 0.00% 0.00% 0.02% - 9307 tecmint sh -c { sudo /usr/lib/linux 0.00% 0.00% 0.00% 0.02% - 2864 tecmint /usr/bin/ck-launch-session 0.00% 0.00% 0.00% 0.02% - 3544 tecmint sh -c /usr/lib/linuxmint/mi 0.00% 0.00% 0.00% 0.02% - 5758 tecmint gnome-pty-helper 0.00% 0.00% 0.00% 0.02% - 7656 tecmint gnome-pty-helper 0.00% 0.00% 0.00% 0.02% - 1441 root /sbin/getty -8 38400 tty2 0.00% 0.00% 0.00% 0.03% - 1434 root /sbin/getty -8 38400 tty5 0.00% 0.00% 0.00% 0.03% - 1444 root /sbin/getty -8 38400 tty3 0.00% 0.00% 0.00% 0.03% - 1432 root /sbin/getty -8 38400 tty4 0.00% 0.00% 0.00% 0.03% - 1452 root /sbin/getty -8 38400 tty6 0.00% 0.00% 0.00% 0.03% - 2619 root /sbin/getty -8 38400 tty1 0.00% 0.00% 0.00% 0.03% - 1504 root acpid -c /etc/acpi/events - 0.00% 0.00% 0.00% 0.02% - 3311 tecmint syndaemon -i 0.5 -K -R 0.00% 0.00% 0.00% 0.03% - 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0.00% 0.00% 0.00% 0.03% - 1588 root cron 0.00% 0.00% 0.00% 0.03% - 1589 avahi avahi-daemon: chroot helpe 0.00% 0.00% 0.00% 0.02% - 1523 root /usr/sbin/irqbalance 0.00% 0.00% 0.00% 0.03% - 585 root upstart-socket-bridge --dae 0.00% 0.00% 0.00% 0.02% - 3033 tecmint /usr/bin/dbus-launch --exit 0.00% 0.00% 0.00% 0.03% + PID User Command Swap USS PSS RSS + 6367 tecmint cat 0.00% 0.00% 0.00% 0.02% + 6368 tecmint cat 0.00% 0.00% 0.00% 0.02% + 9307 tecmint sh -c { sudo /usr/lib/linux 0.00% 0.00% 0.00% 0.02% + 2864 tecmint /usr/bin/ck-launch-session 0.00% 0.00% 0.00% 0.02% + 3544 tecmint sh -c /usr/lib/linuxmint/mi 0.00% 0.00% 0.00% 0.02% + 5758 tecmint gnome-pty-helper 0.00% 0.00% 0.00% 0.02% + 7656 tecmint gnome-pty-helper 0.00% 0.00% 0.00% 0.02% + 1441 root /sbin/getty -8 38400 tty2 0.00% 0.00% 0.00% 0.03% + 1434 root /sbin/getty -8 38400 tty5 0.00% 0.00% 0.00% 0.03% + 1444 root /sbin/getty -8 38400 tty3 0.00% 0.00% 0.00% 0.03% + 1432 root /sbin/getty -8 38400 tty4 0.00% 0.00% 0.00% 0.03% + 1452 root /sbin/getty -8 38400 tty6 0.00% 0.00% 0.00% 0.03% + 2619 root /sbin/getty -8 38400 tty1 0.00% 0.00% 0.00% 0.03% + 1504 root acpid -c /etc/acpi/events - 0.00% 0.00% 0.00% 0.02% + 3311 tecmint syndaemon -i 0.5 -K -R 0.00% 0.00% 0.00% 0.03% + 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0.00% 0.00% 0.00% 0.03% + 1588 root cron 0.00% 0.00% 0.00% 0.03% + 1589 avahi avahi-daemon: chroot helpe 0.00% 0.00% 0.00% 0.02% + 1523 root /usr/sbin/irqbalance 0.00% 0.00% 0.00% 0.03% + 585 root upstart-socket-bridge --dae 0.00% 0.00% 0.00% 0.02% + 3033 tecmint /usr/bin/dbus-launch --exit 0.00% 0.00% 0.00% 0.03% .... ``` -The command below will show totals at the end of each column of the output: +下面的额命令将会在输出的最后输出一行汇总信息: ``` $ sudo smem -t ``` -Report Total Memory Usage Count +报告内存占用合计 ``` -PID User Command Swap USS PSS RSS - 6367 tecmint cat 0 100 139 1784 - 6368 tecmint cat 0 100 141 1676 - 9307 tecmint sh -c { sudo /usr/lib/linux 0 96 158 1508 - 2864 tecmint /usr/bin/ck-launch-session 0 144 163 1780 - 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 108 170 1540 - 5758 tecmint gnome-pty-helper 0 156 176 1916 - 7656 tecmint gnome-pty-helper 0 156 176 1832 - 1441 root /sbin/getty -8 38400 tty2 0 152 181 2052 - 1434 root /sbin/getty -8 38400 tty5 0 156 184 2060 - 1444 root /sbin/getty -8 38400 tty3 0 156 184 2060 - 1432 root /sbin/getty -8 38400 tty4 0 156 185 2124 - 1452 root /sbin/getty -8 38400 tty6 0 164 193 2064 - 2619 root /sbin/getty -8 38400 tty1 0 164 193 2136 - 1504 root acpid -c /etc/acpi/events - 0 220 232 1604 - 3311 tecmint syndaemon -i 0.5 -K -R 0 260 298 2564 - 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0 300 324 2548 - 1588 root cron 0 292 326 2344 - 1589 avahi avahi-daemon: chroot helpe 0 124 332 1632 - 1523 root /usr/sbin/irqbalance 0 316 340 2096 - 585 root upstart-socket-bridge --dae 0 328 349 1820 - 3033 tecmint /usr/bin/dbus-launch --exit 0 328 359 2160 - 1346 root upstart-file-bridge --daemo 0 348 370 1776 - 2607 root /usr/bin/xdm 0 188 375 2368 - 1635 kernoops /usr/sbin/kerneloops 0 352 384 2684 - 344 root upstart-udev-bridge --daemo 0 400 426 2132 +PID User Command Swap USS PSS RSS + 6367 tecmint cat 0 100 139 1784 + 6368 tecmint cat 0 100 141 1676 + 9307 tecmint sh -c { sudo /usr/lib/linux 0 96 158 1508 + 2864 tecmint /usr/bin/ck-launch-session 0 144 163 1780 + 3544 tecmint sh -c /usr/lib/linuxmint/mi 0 108 170 1540 + 5758 tecmint gnome-pty-helper 0 156 176 1916 + 7656 tecmint gnome-pty-helper 0 156 176 1832 + 1441 root /sbin/getty -8 38400 tty2 0 152 181 2052 + 1434 root /sbin/getty -8 38400 tty5 0 156 184 2060 + 1444 root /sbin/getty -8 38400 tty3 0 156 184 2060 + 1432 root /sbin/getty -8 38400 tty4 0 156 185 2124 + 1452 root /sbin/getty -8 38400 tty6 0 164 193 2064 + 2619 root /sbin/getty -8 38400 tty1 0 164 193 2136 + 1504 root acpid -c /etc/acpi/events - 0 220 232 1604 + 3311 tecmint syndaemon -i 0.5 -K -R 0 260 298 2564 + 3143 rtkit /usr/lib/rtkit/rtkit-daemon 0 300 324 2548 + 1588 root cron 0 292 326 2344 + 1589 avahi avahi-daemon: chroot helpe 0 124 332 1632 + 1523 root /usr/sbin/irqbalance 0 316 340 2096 + 585 root upstart-socket-bridge --dae 0 328 349 1820 + 3033 tecmint /usr/bin/dbus-launch --exit 0 328 359 2160 + 1346 root upstart-file-bridge --daemo 0 348 370 1776 + 2607 root /usr/bin/xdm 0 188 375 2368 + 1635 kernoops /usr/sbin/kerneloops 0 352 384 2684 + 344 root upstart-udev-bridge --daemo 0 400 426 2132 ..... ------------------------------------------------------------------------------- - 134 11 0 2171428 2376266 3587972 + 134 11 0 2171428 2376266 3587972 ``` -Further more, there are options for graphical reports that you can also use and we shall dive into them in this sub section. +另外,smem 也提供了选项以图形的形式报告内存的使用情况,我们将会在下一小节深入介绍。 -You can produce a bar graph of processes and their PSS and RSS values, in the example below, we produce a bar graph of processes owned by the root user. +比如,你可以生成一张进程的 PSS 和 RSS 值的条状图。在下面的例子中,我们会生成属于 root 用户的进程的内存占用图。 -The vertical plane shows the PSS and RSS measure of processes and the horizontal plane represents each root user process: +纵坐标为每一个进程的 PSS 和 RSS 值,横坐标为 root 用户的所有进程: ``` $ sudo smem --userfilter="root" --bar pid -c"pss rss" @@ -399,9 +398,9 @@ $ sudo smem --userfilter="root" --bar pid -c"pss rss" ![](http://www.tecmint.com/wp-content/uploads/2016/06/Linux-Memory-Usage-in-PSS-and-RSS-Values.png) >Linux Memory Usage in PSS and RSS Values -You can also produce a pie chart showing processes and their memory consumption based on PSS or RSS values. The command below outputs a pie chart for processes owned by root user measuring values. +也可以生成进程及其 PSS 和 RSS 占用量的饼状图。以下的命令将会输出一张 root 用户的所有进程的饼状。 -The `--pie` name means label by name and `-s` option helps to sort by PSS value. +`--pie` name 意思为以各个进程名字为标签,`-s` 选项帮助以 PSS 的值排序。 ``` $ sudo smem --userfilter="root" --pie name -s pss @@ -410,13 +409,13 @@ $ sudo smem --userfilter="root" --pie name -s pss ![](http://www.tecmint.com/wp-content/uploads/2016/06/Linux-Memory-Consumption-by-Processes.png) >Linux Memory Consumption by Processes -There are many other known fields apart from PSS and RSS used for labeling charts: +它们还提供了一些其它与 PSS 和 RSS 相关的字段用于图表的标签: -To get help, simply type, `smem -h` or visit the manual entry page. +假如需要获得帮助,非常简单,仅需要输入 `smem -h` 或者是浏览帮助页面。 -We shall stop here with smem, but to understand it better, use it with many other options that you can find in the man page. As usual you can use the comment section below to express any thoughts or concerns. +关于 smem 的介绍到底为止,不过想要更好的了解它,可以通过 man 手册获得更多的选项,然后一一实践。有什么想法或者疑惑,都可以跟帖评价。 -Reference Links: +参考链接: -------------------------------------------------------------------------------- @@ -424,7 +423,7 @@ Reference Links: via: http://www.tecmint.com/smem-linux-memory-usage-per-process-per-user/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 作者:[Aaron Kili][a] -译者:[译者ID](https://github.com/译者ID) +译者:[dongfengweixiao](https://github.com/dongfengweixiao) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -434,7 +433,3 @@ via: http://www.tecmint.com/smem-linux-memory-usage-per-process-per-user/?utm_so [2]: http://matplotlib.org/index.html [3]: http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ [4]: https://www.archlinux.org/packages/community/i686/smem/ - - - - From 1daf527a827ca6f0cb75f626180b11af4640c570 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Sun, 26 Jun 2016 00:03:39 +0800 Subject: [PATCH 1611/1710] Move translated file to corresponding directory --- ...ts Memory Consumption Per-Process and Per-User Basis in Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md (100%) diff --git a/sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md b/translated/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md similarity index 100% rename from sources/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md rename to translated/tech/20160604 Smem – Reports Memory Consumption Per-Process and Per-User Basis in Linux.md From 9b8d751da4e8a0e7bbaf12c8cda438eaf1c986f4 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 26 Jun 2016 09:48:37 +0800 Subject: [PATCH 1612/1710] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E5=AE=8C=E6=88=90?= =?UTF-8?q?=20(#4100)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How to Add Cron Jobs in Linux and Unix.md | 131 ++++++------------ 1 file changed, 42 insertions(+), 89 deletions(-) diff --git a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md index 01ca7eb428..d445be5b51 100644 --- a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md +++ b/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md @@ -1,40 +1,37 @@ -如何在Linux及Unix系统中添加定时任务 +如何在 Linux 及 Unix 系统中添加 cron 任务 ====================================== - ![](https://www.unixmen.com/wp-content/uploads/2016/05/HOW-TO-ADD-CRON-JOBS-IN-LINUX-AND-UNIX-696x334.png) ### 导言 ![](http://www.unixmen.com/wp-content/uploads/2016/05/cronjob.gif) -定时任务是用来定期执行计划命令的。你可以将命令组织到脚本当中,这样就可以在设定的时间将其重复执行。`Cron`是Linux系统或者类Unix系统当中最为实用的工具之一。定时服务(守护进程)在系统后台运行,并且会持续地检查 /etc/crontab 文件和 /etc/cron.*/ 目录。它同样也会检测 /var/spool/cron/ 目录。 - +定时任务 (Cron job) 被用于安排那些需要被周期性执行的命令。利用它,你可以配置某些命令或者脚本,让它们在某个设定的时间周期性地运行。`Cron` 是 Linux 或者类 Unix 系统中最为实用的工具之一。cron 服务(守护进程)在系统后台运行,并且会持续地检查 `/etc/crontab` 文件和 `/etc/cron.*/ `目录。它同样也会检测 `/var/spool/cron/` 目录。 ### crontab 命令 -`crontab`是用来安装、卸载或者列出定时配置文件列表的命令。定时配置文件则用于驱动`Vixie Cron`的[cron(8)][1]守护进程。每个用户都可以拥有自己的 crontab 文件,虽然这些文件位于 /var/spool/cron/crontabs 目录中,但这并不意味着你可以直接编辑它们。你需要通过`crontab`命令来编辑或者配置自己的定时任务。 - +`crontab` 是用来安装、卸载或者列出 cron 配置文件列表的命令。cron 配置文件则用于驱动 `Vixie Cron` 的 [cron(8)][1] 守护进程。每个用户都可以拥有自己的 crontab 文件,虽然这些文件都位于 `/var/spool/cron/crontabs` 目录中,但并不意味着你可以直接编辑它们。你需要通过 `crontab` 命令来编辑或者配置你自己的定时任务。 ### 定时配置文件的类型 配置文件分为以下不同的类型: -- **UNIX 或 Linux 系统的 crontab** : 此类型通常由类似需要root权限的系统服务或重要任务使用。第六个字段(见下方的字段介绍)为用户名,用来指定此命令以哪个用户身份来执行。如此一来,系统的`crontab`就能够以任意用户的身份来执行操作。 +- **UNIX 或 Linux 系统的 crontab** : 此类型通常由那些需要 root 或类似权限的系统服务和重要任务使用。第六个字段(见下方的字段介绍)为用户名,用来指定此命令以哪个用户身份来执行。如此一来,系统的 `crontab` 就能够以任意用户的身份来执行操作。 -- **用户的 crontabs**: 用户可以使用`corntab`命令来安装属于他们自己的定时任务。 第六个字段为需要运行的命令行, 所有的命令行都会以创建 crontab 的用户的身份运行。 +- **用户的 crontabs**: 用户可以使用 `corntab` 命令来安装属于他们自己的定时任务。 第六个字段为需要运行的命令, 所有的命令都会以创建该 crontab 任务的用户的身份运行。 -**注意**: 这种问答形式的`Cron`实现是由 Paul Vixie 所写的,并且被许多 [Linux][2] 发行版和类Unix系统(如广受欢迎的第四版BSD)包含其中。它的语法被各种计划任务的实现所[兼容][3]。 +**注意**: 这种问答形式的 `Cron` 实现由 Paul Vixie 所写,并且被包含在许多 [Linux][2] 发行版和类 Unix 系统(如广受欢迎的第四版 BSD)中。它的语法被各种 crond 的实现所[兼容][3]。 -该如何安装、创建或编辑我们自己的定时任务呢? +那么我该如何安装、创建或者编辑我自己的定时任务呢? -在 Linux 或 Unix 的shell提示符后键入以下命令来编辑你的 crontab 文件。 +要编辑你的 crontab 文件,需要在 Linux 或 Unix 的 shell 提示符后键入以下命令: ``` $ crontab -e ``` -`crontab`语法(字段介绍): +`crontab` 语法(字段介绍) 语法为: @@ -48,14 +45,14 @@ $ crontab -e 1 2 3 4 5 /root/ntp_sync.sh ``` -说明: +其中: - 1: 分钟 (0-59) - 2: 小时 (0-23) - 3: 日期 (0-31) -- 4: 月份 (0-12 [12 == December]) -- 5: 一周当中的某天 (0-7 [7 或 0 == 周日]) -- /path/to/command – 计划执行的脚本或命令名 +- 4: 月份 (0-12 [12 代表 December]) +- 5: 一周当中的某天 (0-7 [7 或 0 代表星期天]) +- /path/to/command – 计划执行的脚本或命令的名称 便于记忆的格式: @@ -63,113 +60,70 @@ $ crontab -e * * * * * command to be executed – – – – – | | | | | -| | | | —– 一周当中的某天 (0 – 7) (周日=0 or 7) +| | | | —– 一周当中的某天 (0 – 7) (周日为 0 或 7) | | | ——- 月份 (1 – 12) | | ——— 一月当中的某天 (1 – 31) | ———– 小时 (0 – 23) ————- 分钟 (0 – 59) ``` -简单的`crontab`示例: +简单的 `crontab` 示例: ```` -## 每隔5分钟运行一次 backupscript 脚本## +## 每隔 5 分钟运行一次 backupscript 脚本 ## */5 * * * * /root/backupscript.sh -## 每天的上午1:00运行 backupscript 脚本 ## +## 每天的凌晨 1 点运行 backupscript 脚本 ## 0 1 * * * /root/backupscript.sh -## 每月的第一个上午3:15 运行 backupscript 脚本 ## +## 每月的第一个凌晨 3:15 运行 backupscript 脚本 ## 15 3 1 * * /root/backupscript.sh ``` - ### 如何使用操作符 操作符允许你为一个字段指定多个值,这里有三个操作符可供使用: -- **星号 (*)** : 此操作符为字段指定所有可用的值。举个例子,在小时字段中,一个星号等同于所有可用的hour值;在月份字段中,一个星号表示所有可用的month值。 +- **星号 (*)** : 此操作符为字段指定所有可用的值。举个例子,在小时字段中,一个星号等同于每个小时;在月份字段中,一个星号则等同于每月。 -- **逗号 (,)** : 这个操作符指定了一个包含多个值的列表,例如:`1,5,10,15,20, 25`. +- **逗号 (,)** : 这个操作符指定了一个包含多个值的列表,例如:`1,5,10,15,20,25`. -- **横杠 (–)** : 此操作符指定了一个值的范围,例如:`5-15` 天,等同于使用逗号操作符键入的 `5,6,7,8,9,….,13,14,15`。 +- **横杠 (–)** : 此操作符指定了一个值的范围,例如:`5-15` ,等同于使用逗号操作符键入的 `5,6,7,8,9,….,13,14,15`。 -- **分隔符 (/)** : 此操作符指定了一个步进值,例如: `0-23/` 可以用于小时字段来指定命令行每小时执行一次。步进值也可以跟在星号操作符后边,如果你希望命令行每2小时执行一次,可以这样写 `*/2`。 +- **分隔符 (/)** : 此操作符指定了一个步进值,例如: `0-23/` 可以用于小时字段来指定某个命令每小时被执行一次。步进值也可以跟在星号操作符后边,如果你希望命令行每 2 小时执行一次,则可以使用 `*/2`。 +### 使用特殊字符节省时间 -### 如何将邮件显示出来? - -默认情况下,命令行或者脚本的输出内容(如果有的话)会发送到你的本地邮箱账户中。若想停止收到`crontab`发送的邮件,需要添加 `>/dev/null 2>&1` 这段内容,例如: - -``` -0 3 * * * /root/backup.sh >/dev/null 2>&1 -``` - -如果想要将输出内容发送到指定的邮件账户中,你得定义一个MAILTO变量,假设我们要发送至 vivek@nixcraft.in ,代码如下所示: - -``` -MAILTO="vivek@nixcraft.in" -0 3 * * * /root/backup.sh >/dev/null 2>&1 -``` - -访问 “[使用Crontab命令显示邮件提示](http://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/)” 查看更多信息。 - - -### 任务:列出你所有的定时任务 - -键入以下命令: - -``` -# crontab -l -# crontab -u username -l -``` - -使用如下命令删除所有的定时任务: - -``` -# 删除当前定时任务 # -crontab -r -``` - -``` -## 删除某用户名下的定时任务,此命令需以root用户身份执行 ## -crontab -r -u username -``` - -### 使用特殊字符保存时间 - -你可以使用以下8个特殊字符中的其中一个替代头五个字段。这样不但可以保存时间,也可以提高可读性。 +你可以使用以下 8 个特殊字符中的其中一个替代头五个字段,这样不但可以节省你的时间,还可以提高可读性。 特殊字符 | 含义 |:-- |:-- @reboot | 在每次启动时运行一次 @yearly | 每年运行一次, “0 0 1 1 *”. -@annually | (同 @yearly) -@monthly | 每月运行一次, “0 0 1 * *”. +@annually | (同 @yearly) +@monthly | 每月运行一次, “0 0 1 * *”. @weekly | 每周运行一次, “0 0 * * 0”. @daily | 每天运行一次, “0 0 * * *”. -@midnight | (同 @daily) +@midnight | (同 @daily) @hourly | 每小时运行一次, “0 * * * *”. - 示例: -``` -#### 每小时运行一次 ntpdate #### +#### 每小时运行一次 ntpdate 命令 #### +``` @hourly /path/to/ntpdate ``` +### 关于 `/etc/crontab` 文件和 `/etc/cron.d/*` 目录的更多内容 -### 关于 /etc/crontab file 和 /etc/cron.d/* 目录的更多内容 +** /etc/crontab ** 是系统的 corntabs 文件。通常只被 root 用户或守护进程用于配置系统级别的任务。每个独立的用户必须像上面介绍的那样使用 `corntab` 命令来安装和编辑自己的任务。`/var/spool/cron/` 或者 `/var/cron/tabs/` 目录存放了个人用户的 corntab 文件,它必定会备份在用户的家目录当中。 -/etc/crontab 是系统的 corntabs 文件。通常用于root用户和守护进程配置整个系统的任务。每个独立的用户务必遵照以上的介绍,使用`corntab`命令来编辑自己的任务。/var/spool/cron/ 或者 /var/cron/tabs/ 目录存放了个人用户的 corntab 文件,它必定会备份在用户的home目录当中。 +### 理解默认的 `/etc/crontab` -理解默认的 /etc/crontab - -典型的 /etc/crontab 文件内容: +典型的 `/etc/crontab` 文件内容是这样的: ``` SHELL=/bin/bash @@ -183,19 +137,18 @@ HOME=/ 42 4 1 * * root run-parts /etc/cron.monthly ``` -首先,环境必须定义好。如果shell行被忽略了,corn会使用默认的sh shell。如果PATH变量被忽略,就没有默认路径会被使用,并且所有的文件都需要使用绝对路径来定位。如果HOME被忽略,corn会将调用者(用户)的home目录作为默认值使用。 +首先,环境变量必须被定义。如果 shell 行被忽略,corn 会使用默认的 sh shell。如果 PATH 变量被忽略,就没有默认路径会被使用,所有的文件都需要使用绝对路径来定位。如果 HOME 变量被忽略,corn 会使用调用者(用户)的家目录。 -另外,corn 会在/etc/cron.d/ 目录中读取文件。通常情况下,像 sa-update 或者 sysstat 这样的系统守护进程会将他们的定时任务存放在此处。作为root用户或者超级用户,你可以使用以下目录来配置你的定时任务。你可以直接将脚本放到这里。`run-parts`命令会通过 /etc/crontab 目录来运行脚本或者程序。 +另外,corn 会读取 `/etc/cron.d/`目录中的文件。通常情况下,像 sa-update 或者 sysstat 这样的系统守护进程会将他们的定时任务存放在此处。作为 root 用户或者超级用户,你可以使用以下目录来配置你的定时任务。你可以直接将脚本放到这里。`run-parts`命令会通过 `/etc/crontab` 文件来运行位于某个目录中的脚本或者程序。 -目录 |介绍 +目录 |描述 |:-- |:-- -/etc/cron.d/ | 将所有的脚本文件放在此处,并从 /etc/crontab 文件中调用它们。 -/etc/cron.daily/ | 每天运行的所有的脚本 -/etc/cron.hourly/ | 每小时运行的所有脚本 -/etc/cron.monthly/ | 每月运行的所有脚本 -/etc/cron.weekly/ | 每周运行的所有脚本 +/etc/cron.d/ | 将所有的脚本文件放在此处,并从 /etc/crontab 文件中调用它们。 +/etc/cron.daily/ | 运行需要每天运行一次的脚本 +/etc/cron.hourly/ | 运行需要每小时运行一次的脚本 +/etc/cron.monthly/ | 运行需要每月运行一次的脚本 +/etc/cron.weekly/ | 运行需要每周运行一次的脚本 - ### 备份定时任务 ``` @@ -210,7 +163,7 @@ via: https://www.unixmen.com/add-cron-jobs-linux-unix/?utm_source=feedburner&utm 作者:[Duy NguyenViet][a] 译者:[mr-ping](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) +校对:[FSSlc](https://github.com/FSSlc) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 57c1b76e48969ceafc1f50d797964da79522c550 Mon Sep 17 00:00:00 2001 From: ezio Date: Sun, 26 Jun 2016 19:47:17 +0800 Subject: [PATCH 1613/1710] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...minism and increasing diversity in tech.md | 1 + ...151117 How bad a boss is Linus Torvalds.md | 1 - ...mart Devices Security Concerns and More.md | 1 + ...Driving cars into the future with Linux.md | 108 ------------------ ...ginx as Reverse Proxy on Centos7 CPanel.md | 2 - ...inux developers think of Git and GitHub.md | 2 - ...n IoT Development Suite, is now Zerynth.md | 35 ------ .../20160314 15 podcasts for FOSS fans.md | 1 - sources/tech/20160314 Healthy Open Source.md | 1 - .../tech/20160512 Bitmap in Linux Kernel.md | 1 - ...P 2.0 Support for Nginx on Ubuntu 16.04.md | 2 - 11 files changed, 2 insertions(+), 153 deletions(-) delete mode 100644 sources/talk/20160523 Driving cars into the future with Linux.md delete mode 100644 sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.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 index 10a30119e1..57faa7998f 100644 --- 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 @@ -1,5 +1,6 @@ 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] 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 7ebba90483..d593dcf697 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 @@ -1,4 +1,3 @@ -sonofelice translating How bad a boss is Linus Torvalds? ================================================================================ ![linus torvalds](http://images.techhive.com/images/article/2015/08/linus_torvalds-100600260-primary.idge.jpg) diff --git a/sources/talk/20160506 Linus Torvalds Talks IoT Smart Devices Security Concerns and More.md b/sources/talk/20160506 Linus Torvalds Talks IoT Smart Devices Security Concerns and More.md index e17c33bd81..8744d5d38c 100644 --- a/sources/talk/20160506 Linus Torvalds Talks IoT Smart Devices Security Concerns and More.md +++ b/sources/talk/20160506 Linus Torvalds Talks IoT Smart Devices Security Concerns and More.md @@ -44,3 +44,4 @@ via: https://www.linux.com/news/linus-torvalds-talks-iot-smart-devices-security- [a]: https://www.linux.com/users/ericstephenbrown [0]: http://events.linuxfoundation.org/events/embedded-linux-conference [1]: http://go.linuxfoundation.org/elc-openiot-summit-2016-videos?utm_source=lf&utm_medium=blog&utm_campaign=linuxcom + diff --git a/sources/talk/20160523 Driving cars into the future with Linux.md b/sources/talk/20160523 Driving cars into the future with Linux.md deleted file mode 100644 index 9b9d69d68c..0000000000 --- a/sources/talk/20160523 Driving cars into the future with Linux.md +++ /dev/null @@ -1,108 +0,0 @@ - -驾车通往未来Linux -=========================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/open-snow-car-osdc-lead.png?itok=IgYZ6mNY) - - -当我开车的时候不认为和 Linux 有多大联系,但是我肯定我是喜欢一个配备有系统的车子,让我按几个按钮语音就可以传给我的妻子母亲以及孩子。同样,这样的系统可以让我选择是否从云端流媒体收听音乐,卫星广播,以及传统的 AM/FM 收音机。我也会得到天气更新以及可以给我的车载信息娱乐 GPS 找到最快的下一个目的地[In-vehicle infotainment][1],以及 IVI 作为行业知名产业,已经普及到最新的汽车生产商。 - -前段时间,我不得坐飞机飞跃数百英里,租一辆车。令人愉快的是,我发现我的租凭车配置了 IVI 技术。任何时候,我只要通过蓝牙连接,上传联系人到系统中,打电话回家给我的家人,让他们知道我已经安全到家了。然后“主人“会知道我再途中还是已经到他们家了。 - -在最近的 [news roundup][2],Scott Nesbitt 引用一篇文章,说福特汽车公司是由它的开源 [Smart Device Link][3](SDL)中间设备框架,对手汽车制造商,支持那个移动手机获得大量的支持。 SDL 是 [GENIVI Alliance][4] 的项目,一个非营利性的致力于建设中间件支持开源的车载信息娱乐系统。根据文献 [[Steven Crumb][5],GENIVI 执行董事,他们 [membership][6] 很广,包括 Daimler 集团,现代,沃尔沃,日产,本田等等 170 个。 - -为了在同行业中保持竞争力,汽车企业需要一个中间设备系统,可以支持当今消费者提供的各种人机界面技术。无论您拥有 Android,iOS 或其他设备,汽车 OEM 厂商希望自己的系统单位能够支持这些。此外,这些的 IVI 系统必须有足够适应能力以支持移动技术的不断下降,半衰期。 OEM 厂商要提供价值服务,并在他们的 IVI 堆栈支持各种为他们的客户添加选择。进入 Linux 和开源软件。 - -除了 GENIVI 的努力下,[Linux Foundation][7] 赞助 [Automotive Grade Linux][8](AGL)工作组,一个软件基金会,致力于寻找针对汽车应用的开源解决方案。虽然 AGL 初期将侧重于 IVI 系统,他们展望不同的分歧,包括 [telematics][9],小心显示器和其他控制系统。 AGL 有超过 50 名成员在这个时候,包括捷豹,丰田,日产,并在 [recent press release][10] 宣布福特、马自达、三菱、和斯巴鲁加入。 - - -为了了解更多信息,我们在这一新鲜兴领域采访了两位领导人。明确地来说,我们想知道是如何被使用的 Linux 和开源软件,如果它们实际上是改变汽车行业的面貌。首先,我们谈谈 [Alison Chaiken][11],在大集团技术的软件工程师和汽车 Linux 专家,网络安全和透明度。她曾任职于 [Alison Chaiken][11] 公司,诺基亚和斯坦福直线性加速器。然后我们用 [Steven Crumb][12],GENIVI 执行董事,谁得到了在开源环境高性能计算(超级计算机和早期的云计算)开始聊天。他说,虽然他再不是一个程序员了,但是他喜欢帮助企业解决开源软件的实际业务问题。 - -### 采访 Alison Chaiken (by [Deb Nicholson][13]) - -#### 你是如何开始对汽车软件空间感兴趣的? - -我是在诺基亚手机产品时, 2009 年该项目被取消。我想,下一步是什么?一位同事正在对 [MeeGo-IVI][15],早期的汽车 Linux 发行版。 “Linux 在汽车是大了,” 我想,所以我在朝着这个方向努力。 - -#### 你能告诉我们你这些日子工作在哪些方面? - -我目前正在启动为使用 Linux 系统增加大货车钻机的安全性和燃油经济性的先进巡航控制。我喜欢在这方面的工作,因为没有人会反对卡车得以提升。 - -#### 目前关于汽车已在近年来砍死几个人故事。开源代码方案可以帮助解决这个问题吗? - -I presented a talk on precisely this topic, on how Linux can (and cannot) contribute to security solutions in automotive at Southern California Linux Expo 2016 ([Slides][16]). Notably, GENIVI and Automotive Grade Linux have published their code and both projects take patches via Git. Please send your fixes upstream! Many eyes make all bugs shallow. -我提出的谈话正是这一主题,就如何 Linux 可以(或不可以)在南加州 2016 年世博会作出贡献的安全解决方案的 Linux汽车([Slides][16])。值得注意的是,GENIVI 和汽车级 Linux 已经公布了他们的代码,这两个项目的 Git 通过采取补丁。请上游发送您的修复!许多眼睛都盯着肤浅的bugs。 - -#### 执法机构和保险公司可以找到很多有关数据用途的驱动程序。它将如何容易成为他们获取这些信息? - -好问题。该专用短程通信标准(IEEE-1609),以保持匿名的 Wi-Fi 安全消息驱动程序。不过,如果你从你的车张贴到 Twitter,有人能够跟踪你。 - -#### 有什么可以开发人员和公民个人一起完成,以确保公民自由受到保护作为汽车技术发展的? - -电子前沿基金会(EFF)一样对汽车保持的问题上,通过什么样的数据可以存储在汽车 “黑盒子”,并在 DMCA 的规定 1201 如何应用于汽车官方渠道评论已经出色的工作了。 - -#### 在未来几年令人兴奋的事情上,那些是你看到的驱动因素? - -自适应巡航控制和防撞系统有足够的预付款来挽救生命。当他们通过运输车队的推出,我真的相信死亡人数会下降。如果这还不是令人兴奋的,我不知道是什么。此外,像自动化停车辅助功能,将会使汽车更容易驾驶,减少汽车相撞事故。 - -#### 有什么是需要人参与以及如何建造? - -汽车 Linux 级开发是开放源代码的,运行在廉价硬件(如树莓派 Pi 2 和中等价位的 Renesas Porter board),任何人都可以购买。 GENIVI 汽车 Linux 的中间设备联盟有很多软件通过 Git 的公开。此外,还有很酷的 [OSVehicle open hardware][17] 汽车平台。 - -#### 这里是 Linux 软件和开放硬件,许多方面具有中等人数预算的参与。如果您有任何疑问,加入我们在 Freenode 上 IRC#automotive。 - -### 采访 Steven Crumb (by Don Watkins) - -#### 关于GENIVI's 对 IVI 为什么那么大 ? - -GENIVI 率先通过使用自由和开源软件,包括 Linux,像车载信息娱乐(IVI)系统的非安全关键汽车软件填补了汽车行业的巨大差距。作为消费者来到期望在他们的车辆相同的功能在智能手机上的软件,以支持 IVI 功能所需的量成倍增长。软件增加量也增加了建设 IVI 系统的成本,从而延缓了上市时间。 - -GENIVI 的使用开源软件和社区发展模式节省了汽车制造商和他们的软件提供商显著大量的资金,而显著减少了产品上市时间。我很兴奋,因为 GENIVI 我们很幸运慢慢从高度结构化和专有的方法来社区为基础的方法不断发展的组织​​领导排序在汽车行业的一场革命。我们还没有完成,但它一直是一个荣幸参加正在产生实实在在的好处的转换。 - -#### 你的庞大会员怎么才可以驱动 GENIVI 方向? - -GENIVI 有很多会员和非会员促进我们的工作。与许多开源项目,任何公司都可以通过简单地贡献代码,修补程序和时间来检验影响的技术输出。随着中说,宝马,奔驰,现代汽车,捷豹路虎,标致雪铁龙,雷诺 / 日产和沃尔沃是所有积极采用者和贡献者 GENIVI 和其他许多 OEM 厂商已经在他们的汽车 IVI 解决方案,广泛使用 GENIVI 的软件。 - -#### 贡献的代码使用了什么许可证? - -GENIVI 采用数量的许可证从(L)GPLv2 许可,以 MPLv2 到 Apache2.0。我们的一些工具使用 Eclipse 许可证。我们有一个[public licensing policy][18],详细说明我们的许可偏好。 - -#### 一个人或一群人如何参与其中?重要的是如何对项目的持续成功的社区贡献? - -GENIVI 完全做它开放发展的在([projects.genivi.org][19]),因此,有兴趣的人在汽车使用开源软件,欢迎参加。这就是说,该联盟能够通过公司 [joining GENIVI][20] 作为成员不断发展的开放基金。 GENIVI 会员享受各种各样的福利,而不是其中最重要的是在已经发展了近六年来 140 家公司全球社区参与。 - -社区是 GENIVI 非常重要的,我们不可能生产和维护我们发展了很多年没有贡献者一个活跃的社区有价值的软件。我们努力做出贡献 GENIVI 简单,只要加入一个 [邮件列表] [21] 并连接到人们在不同的软件项目。我们使用许多开源项目采用的标准做法,并提供高质量的工具和基础设施,以帮助开发人员有宾至如归的感觉,并富有成效。 - -无论在汽车软件某人的熟悉,欢迎他们加入我们的社区。人们已经改装车多年,所以对于许多人来说,是一种天然的抽奖,任何汽车。软件是汽车的新域,GENIVI 希望成为敞开的门有兴趣的人与汽车,开源软件的工作。 - -------------------------------- -via: https://opensource.com/business/16/5/interview-alison-chaiken-steven-crumb - -作者:[Don Watkins][a] -译者:[erlinux](https://github.com/erlinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[1]: https://en.wikipedia.org/wiki/In_car_entertainment -[2]: https://opensource.com/life/16/1/weekly-news-jan-9 -[3]: http://projects.genivi.org/smartdevicelink/home -[4]: http://www.genivi.org/ -[5]: https://www.linkedin.com/in/stevecrumb -[6]: http://www.genivi.org/genivi-members -[7]: http://www.linuxfoundation.org/ -[8]: https://www.automotivelinux.org/ -[9]: https://en.wikipedia.org/wiki/Telematics -[10]: https://www.automotivelinux.org/news/announcement/2016/01/ford-mazda-mitsubishi-motors-and-subaru-join-linux-foundation-and -[11]: https://www.linkedin.com/in/alison-chaiken-3ba456b3 -[12]: https://www.linkedin.com/in/stevecrumb -[13]: https://opensource.com/users/eximious -[14]: https://en.wikipedia.org/wiki/MeeGo -[15]: http://webinos.org/deliverable-d026-target-platform-requirements-and-ipr/automotive/ -[16]: http://she-devel.com/Chaiken_automotive_cybersecurity.pdf -[17]: https://www.osvehicle.com/ -[18]: http://projects.genivi.org/how -[19]: http://projects.genivi.org/ -[20]: http://genivi.org/join -[21]: http://lists.genivi.org/mailman/listinfo/genivi-projects diff --git a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md index dc21bc0b23..ba986b25b3 100644 --- a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md +++ b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md @@ -1,5 +1,3 @@ -zky001开始翻译 - How to Set Nginx as Reverse Proxy on Centos7 CPanel ================================================================================ diff --git a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md index b444b0958c..9002025820 100644 --- a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md +++ b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md @@ -1,5 +1,3 @@ -@4357 翻译中 - What do Linux developers think of Git and GitHub? ===================================================== diff --git a/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md b/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md deleted file mode 100644 index f732382bc6..0000000000 --- a/sources/tech/20160301 Viper, the Python IoT Development Suite, is now Zerynth.md +++ /dev/null @@ -1,35 +0,0 @@ -(翻译中 by runningwater) -Viper, the Python IoT Development Suite, is now Zerynth -============================================================ - - -![](http://www.open-electronics.org/wp-content/uploads/2016/02/Logo_Zerynth-636x144.png) - - -The startup that launched the tools to develop embedded solutions in Python language announced the brand change along with the first official release. - ->Exactly one year after the Kickstarter launch of the suite for developing Internet of Things solutions in Python language, **Viper becomes Zerynth**. It is definitely a big day for the startup that created a radically new way to approach the world of microcontrollers and connected devices, making professionals and makers able to design interactive solutions with reduced efforts and shorter time. - ->“We really believe in the uniqueness of our tools, this is why they deserve an adequate recognition. Viper was a great name for a product, but other notable companies had the same feeling many decades ago, with the result that this term was shared with too many other actors out there. We are grown now, and ready to take off fast and light, like the design processes that our tools are enabling”, says the Viper (now Zerynth), co-founders. - ->**Thousands of users** developed amazing connected solutions in just 9 months of life in Beta version. Built to be cross-platform, Zerynth’s tools are meant for high-level design of Internet/cloud-connected devices, interactive objects, artistic installations. They are: **Zerynth Studio**, a browser-based IDE for programming embedded devices in Python with cloud sync and board management features; **Zerynth Virtual Machine**: a multithreaded real-time OS that provides real hardware independence allowing code reuse on the entire ARM architecture; **Zerynth App**, a general purpose interface that turns any mobile into the controller and display for smart objects and IoT systems. - ->This modular set of tools, adaptable to different hardware and cloud infrastructures, can dramatically reduce the time to market and the overall development costs for makers, professionals and companies. - ->Now Zerynth celebrates its new name launching the **first official release** of the toolkit. Check it here [www.zerynth.com][1] - -![](http://www.open-electronics.org/wp-content/uploads/2016/02/Zerynth-Press-Release_Studio-Img-768x432.png) - --------------------------------------------------------------------------------- - -via: http://www.open-electronics.org/viper-the-python-iot-development-suite-is-now-zerynth/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+OpenElectronics+%28Open+Electronics%29 - -作者:[Staff ][a] -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.open-electronics.org/author/staff/ -[1]: http://www.zerynth.com/ - diff --git a/sources/tech/20160314 15 podcasts for FOSS fans.md b/sources/tech/20160314 15 podcasts for FOSS fans.md index eae53102ad..222861427e 100644 --- a/sources/tech/20160314 15 podcasts for FOSS fans.md +++ b/sources/tech/20160314 15 podcasts for FOSS fans.md @@ -1,4 +1,3 @@ -zpl1025 15 podcasts for FOSS fans ============================= diff --git a/sources/tech/20160314 Healthy Open Source.md b/sources/tech/20160314 Healthy Open Source.md index 57dd559284..b36b516758 100644 --- a/sources/tech/20160314 Healthy Open Source.md +++ b/sources/tech/20160314 Healthy Open Source.md @@ -1,4 +1,3 @@ -Translating by yuba0604 Healthy Open Source ============================ diff --git a/sources/tech/20160512 Bitmap in Linux Kernel.md b/sources/tech/20160512 Bitmap in Linux Kernel.md index 06297fa204..b7e832ba0a 100644 --- a/sources/tech/20160512 Bitmap in Linux Kernel.md +++ b/sources/tech/20160512 Bitmap in Linux Kernel.md @@ -1,4 +1,3 @@ -[Translating By cposture 20160520] Data Structures in the Linux Kernel ================================================================================ diff --git a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md index ef713fff0f..e6b143cc00 100644 --- a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md +++ b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md @@ -1,5 +1,3 @@ -Translating by strugglingyouth - Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04 ===================================================================================== From 440139b97139a05fdfa1c6cdea68a7b1b7ed1886 Mon Sep 17 00:00:00 2001 From: ezio Date: Sun, 26 Jun 2016 19:49:08 +0800 Subject: [PATCH 1614/1710] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/news/README.md | 1 - sources/share/README.md | 1 - translated/news/README.md | 1 - translated/share/README.md | 1 - 4 files changed, 4 deletions(-) delete mode 100644 sources/news/README.md delete mode 100644 sources/share/README.md delete mode 100644 translated/news/README.md delete mode 100644 translated/share/README.md diff --git a/sources/news/README.md b/sources/news/README.md deleted file mode 100644 index 98d53847b1..0000000000 --- a/sources/news/README.md +++ /dev/null @@ -1 +0,0 @@ -这里放新闻类文章,要求时效性 diff --git a/sources/share/README.md b/sources/share/README.md deleted file mode 100644 index e5e225858e..0000000000 --- a/sources/share/README.md +++ /dev/null @@ -1 +0,0 @@ -这里放分享类文章,包括各种软件的简单介绍、有用的书籍和网站等。 diff --git a/translated/news/README.md b/translated/news/README.md deleted file mode 100644 index 98d53847b1..0000000000 --- a/translated/news/README.md +++ /dev/null @@ -1 +0,0 @@ -这里放新闻类文章,要求时效性 diff --git a/translated/share/README.md b/translated/share/README.md deleted file mode 100644 index e5e225858e..0000000000 --- a/translated/share/README.md +++ /dev/null @@ -1 +0,0 @@ -这里放分享类文章,包括各种软件的简单介绍、有用的书籍和网站等。 From be96e7a42a34337abd5162996ccb71031478a3f7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 26 Jun 2016 22:24:08 +0800 Subject: [PATCH 1615/1710] =?UTF-8?q?20160226-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...621 Building Serverless App with Docker.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20160621 Building Serverless App with Docker.md diff --git a/sources/tech/20160621 Building Serverless App with Docker.md b/sources/tech/20160621 Building Serverless App with Docker.md new file mode 100644 index 0000000000..9791ee5aa6 --- /dev/null +++ b/sources/tech/20160621 Building Serverless App with Docker.md @@ -0,0 +1,99 @@ +BUILDING SERVERLESS APPS WITH DOCKER +====================================== + +Every now and then, there are waves of technology that threaten to make the previous generation of technology obsolete. There has been a lot of talk about a technique called “serverless” for writing apps. The idea is to deploy your application as a series of functions, which are called on-demand when they need to be run. You don’t need to worry about managing servers, and these functions scale as much as you need, because they are called on-demand and run on a cluster. + +But serverless doesn’t mean there is no Docker – in fact, Docker is serverless. You can use Docker to containerize these functions, then run them on-demand on a Swarm. Serverless is a technique for building distributed apps and Docker is the perfect platform for building them on. + +### From servers to serverless + +So how might we write applications like this? Let’s take our example [a voting application consisting of 5 services][1]: + +![](https://blog.docker.com/wp-content/uploads/Picture1.png) + +This consists of: + +- Two web frontends +- A worker for processing votes in the background +- A message queue for processing votes +- A database + +The background processing of votes is a very easy target for conversion to a serverless architecture. In the voting app, we can run a bit of code like this to run the background task: + +``` +import dockerrun +client = dockerrun.from_env() +client.run("bfirsh/serverless-record-vote-task", [voter_id, vote], detach=True) +``` + +The worker and message queue can be replaced with a Docker container that is run on-demand on a Swarm, automatically scaling to demand. + +We can even eliminate the web frontends. We can replace them with Docker containers that serve up a single HTTP request, triggered by a lightweight HTTP server that spins up Docker containers for each HTTP request. The heavy lifting has now moved the long-running HTTP server to Docker containers that run on-demand, so they can automatically scale to handle load. + +Our new architecture looks something like this: + +![](https://blog.docker.com/wp-content/uploads/Picture2.png) + +The red blocks are the continually running services and the green blocks are Docker containers that are run on-demand. This application has fewer long-running services that need managing, and by its very nature scales up automatically in response to demand (up to the size of your Swarm!). + +### So what can we do with this? + +There are three useful techniques here which you can use in your apps: + +1. Run functions in your code as on-demand Docker containers +2. Use a Swarm to run these on a cluster +3. Run containers from containers, by passing a Docker API socket + + +With the combination of these techniques, this opens up loads of possibilities about how you can architect your applications. Running background work is a great example of something that works well, but a whole load of other things are possible too, for example: + +- Launching a container to serve user-facing HTTP requests is probably not practical due to the latency. However – you could write a load balancer which knew how to auto-scale its own web frontends by running containers on a Swarm. +- A MongoDB container which could introspect the structure of a Swarm and launch the correct shards and replicas. + +### What’s next + +We’ve got all these radically new tools and abstractions for building apps, and we’ve barely scratched the surface of what is possible with them. We’re still building applications like we have servers that stick around for a long time, not for the future where we have Swarms that can run code on-demand anywhere in your infrastructure. + +This hopefully gives you some ideas about what you can build, but we also need your help. We have all the fundamentals to be able to start building these applications, but its still in its infrancy – we need better tooling, libraries, example apps, documentation, and so on. + +[This GitHub repository has links off to tools, libraries, examples, and blog posts][3]. Head over there if you want to learn more, and please contribute any links you have there so we can start working together on this. + +Get involved, and happy hacking! + +### Learn More about Docker + +- New to Docker? Try our 10 min [online tutorial][4] +- Share images, automate builds, and more with [a free Docker Hub account][5] +- Read the Docker [1.12 Release Notes][6] +- Subscribe to [Docker Weekly][7] +- Sign up for upcoming [Docker Online Meetups][8] +- Attend upcoming [Docker Meetups][9] +- Watch [DockerCon EU 2015 videos][10] +- Start [contributing to Docker][11] + + +-------------------------------------------------------------------------------- + +via: https://blog.docker.com/2016/06/building-serverless-apps-with-docker/ + +作者:[Ben Firshman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://blog.docker.com/author/bfirshman/ + +[1]: https://github.com/docker/example-voting-app +[3]: https://github.com/bfirsh/serverless-docker +[4]: https://docs.docker.com/engine/understanding-docker/ +[5]: https://hub.docker.com/ +[6]: https://docs.docker.com/release-notes/ +[7]: https://www.docker.com/subscribe_newsletter/ +[8]: http://www.meetup.com/Docker-Online-Meetup/ +[9]: https://www.docker.com/community/meetup-groups +[10]: https://www.youtube.com/playlist?list=PLkA60AVN3hh87OoVra6MHf2L4UR9xwJkv +[11]: https://docs.docker.com/contributing/contributing/ + + + From 7b59b637e3c1e67f4854d2ac9998996712db988a Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 26 Jun 2016 22:39:10 +0800 Subject: [PATCH 1616/1710] =?UTF-8?q?20160626-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tacenter in AWS and Azure in Few Clicks.md | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 sources/tech/20160621 Docker Datacenter in AWS and Azure in Few Clicks.md diff --git a/sources/tech/20160621 Docker Datacenter in AWS and Azure in Few Clicks.md b/sources/tech/20160621 Docker Datacenter in AWS and Azure in Few Clicks.md new file mode 100644 index 0000000000..aa4a317103 --- /dev/null +++ b/sources/tech/20160621 Docker Datacenter in AWS and Azure in Few Clicks.md @@ -0,0 +1,138 @@ +DOCKER DATACENTER IN AWS AND AZURE IN A FEW CLICKS +==================================================== + +Introducing Docker Datacenter AWS Quickstart and Azure Marketplace Templates production-ready, high availability deployments in just a few clicks. + +The Docker Datacenter AWS Quickstart uses a CloudFormation templates and pre-built templates on Azure Marketplace to make it easier than ever to deploy an enterprise CaaS Docker environment on public cloud infrastructures. + +The Docker Datacenter Container as a Service (CaaS) platform for agile application development provides container and cluster orchestration and management that is simple, secure and scalable for enterprises of any size. With our new cloud templates pre-built for Docker Datacenter, developers and IT operations can frictionlessly move dockerized applications to an Amazon EC2 or Microsoft Azure environment without any code changes. Now businesses can quickly realize greater efficiency of computing and operations resources and Docker supported container management and orchestration in just a few steps. + +### What is Docker Datacenter? + +Docker Datacenter includes Docker Universal Control Plane, Docker Trusted Registry (DTR), CS Docker Engine with commercial support & subscription to align to your application SLAs: + +- Docker Universal Control Plane (UCP), an enterprise-grade cluster management solution that helps you manage your whole cluster from a single pane of glass +- Docker Trusted Registry (DTR), an image storage solution that helps securely store and manage the Docker images. +- Commercially Supported (CS) Docker Engines + +![](http://img.scoop.it/lVraAJgJbjAKqfWCLtLuZLnTzqrqzN7Y9aBZTaXoQ8Q=) + +### Deploy on AWS in a single click with the Docker Datacenter AWS Quick Start + +With AWS Quick Start reference deployments you can rapidly deploy Docker containers on the AWS cloud, adhering to Docker and AWS best practices. The Docker Datacenter Quick Start uses CloudFormation templates that are modular and customizable so you can layer additional functionality on top or modify them for your own Docker deployments. + +[Docker Datacenter for AWS Quickstart](https://youtu.be/aUx7ZdFSkXU) + +#### Architecture + +![](http://img.scoop.it/sZ3_TxLba42QB-r_6vuApLnTzqrqzN7Y9aBZTaXoQ8Q=) + +The AWS Cloudformation starts the installation process by creating all the required AWS resources such as the VPC, security groups, public and private subnets, internet gateways, NAT gateways, and S3 bucket. + +It then launches the first UCP controller instances and goes through the installation process of Docker engine and UCP containers. It backs the Root CAs created by the first UCP controllers to S3. Once the first UCP controller is up and running, the process of creating the other UCP controllers, the UCP cluster nodes, and the first DTR replica is triggered. Similar to the first UCP controller node, all other nodes are started by installing Docker Commercially Supported engine, followed by running the UCP and DTR containers to join the cluster. Two ELBs, one for UCP and one for DTR, are launched and automatically configured to provide resilient load balancing across the two AZs. + +Additionally, UCP controllers and nodes are launched in an ASG to provide scaling functionality if needed. This architecture ensures that both UCP and DTR instances are spread across both AZs to ensure resiliency and high-availability. Route53 is used to dynamically register and configure UCP and DTR in your private or public HostedZone. + +![](http://img.scoop.it/HM7Ag6RFvMXvZ_iBxRgKo7nTzqrqzN7Y9aBZTaXoQ8Q=) + +### Key functionality of this Quickstart templates includes the following: + +- Creates a New VPC, Private and Public Subnets in different AZs, ELBs, NAT Gateways, Internet Gateways, AutoScaling Groups- all based on AWS best practices +- Creates an S3 bucket for DDC to be used for cert backup and DTR image storage ( requires additional configuration in DTR ) +- Deploys 3 UCP Controllers across multiple AZs within your VPC +- Creates a UCP ELB with preconfigured health checks +- Creates a DNS record and attaches it to UCP ELB +- Deploys a scalable cluster of UCP nodes +- Backs up UCP Root CAs to S3 +- Create a 3 DTR Replicas across multiple AZs within your VPC +- Creates a DTR with preconfigured health checks +- Creates a DNS record and attaches it to DTR ELB + +[Download the AWS Quick Start Guide to Learn More](https://s3.amazonaws.com/quickstart-reference/docker/latest/doc/docker-datacenter-on-the-aws-cloud.pdf) + +### Getting Started with Docker Datacenter for AWS + +1. Go to [Docker Store][1] to get your [30 day free trial][2] or [contact sales][4]. +2. At confirmation, you’ll be prompted to “Launch Stack” and you’ll be directed to the AWS Cloudformation portal. +3. Confirm your AWS Region that you’d like to launch this stack in +4. Provide the required parameters +5. Confirm and Launch. +6. Once complete, click on outputs tab to see the URLs of UCP/DTR, default username, and password, and S3 bucket name. + +[Request up to $2000 AWS credit for Docker Datacenter](https://aws.amazon.com/mp/contactdocker/) + +### Deploy on Azure with pre-built templates on Azure Marketplace + +Docker Datacenter is available as pre-built template on Azure Marketplace for you to run instantly on Azure across various datacenters globally. Customers can choose to deploy Docker Datacenter from various VM choices offered on Azure as it fits their needs. + +#### Architecture + +![](http://img.scoop.it/V9SpuBCoAnUnkRL3J-FRFLnTzqrqzN7Y9aBZTaXoQ8Q=) + +The Azure deployment process begins by entering some basic information about the user including, the admin username for ssh-ing into all the nodes (OS level admin user) and the name of the resource group. You can think of the resource group as a collection of resources that has a lifecycle and deployment boundary. You can read more about resource groups here: + +Next you will enter the details of the cluster, including: VM size for UCP controllers, Number of Controllers (default is 3), VM size for UCP nodes, Number of UCP nodes (default is 1, max of 10), VM size for DTR nodes, Number of DTR nodes (default is 3), Virtual Network Name and Address (ex. 10.0.0.1/19). Regarding networking, you will have 2 subnets: the first subnet is for the UCP controller nodes and the second subnet is for the DTR and UCP nodes. + +Lastly you will click OK to complete deployment. Provisioning should take about 15-19 minutes for small clusters with a few additional minutes for larger ones. + +![](http://img.scoop.it/DXPM5-GXP0j2kEhno0kdRLnTzqrqzN7Y9aBZTaXoQ8Q=) + +![](http://img.scoop.it/321ElkCf6rqb7u_-nlGPtrnTzqrqzN7Y9aBZTaXoQ8Q=) + +#### How to Deploy in Azure + +1. Register for [a 30 day free trial][5] license of Docker Datacenter or [contact sales][6]. +2. [Go to Docker Datacenter on the Microsoft Azure Marketplace][7] +3. [Review Deployment Documents][8] + +Get Started by registering for a Docker Datacenter license and you’ll be prompted with the ability to launch either the AWS or Azure templates. + +- [Get a 30 day trial license][9] +- [Understand Docker Datacenter architecture with this video][10] +- [Watch demo videos][11] +- [Get $75 AWS credit torwards your deployment][12] + +### Learn More about Docker + +- New to Docker? Try our 10 min [online tutorial][20] +- Share images, automate builds, and more with [a free Docker Hub account][21] +- Read the Docker [1.12 Release Notes][22] +- Subscribe to [Docker Weekly][23] +- Sign up for upcoming [Docker Online Meetups][24] +- Attend upcoming [Docker Meetups][25] +- Watch [DockerCon EU 2015 videos][26] +- Start [contributing to Docker][27] + + + +-------------------------------------------------------------------------------- + +via: https://blog.docker.com/2016/06/docker-datacenter-aws-azure-cloud/ + +作者:[Trisha McCanna][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://blog.docker.com/author/trisha/ +[1]: https://store.docker.com/login?next=%2Fbundles%2Fdocker-datacenter%2Fpurchase?plan=free-trial +[2]: https://store.docker.com/login?next=%2Fbundles%2Fdocker-datacenter%2Fpurchase?plan=free-trial +[4]: https://goto.docker.com/contact-us.html +[5]: https://store.docker.com/login?next=%2Fbundles%2Fdocker-datacenter%2Fpurchase?plan=free-trial +[6]: https://goto.docker.com/contact-us.html +[7]: https://azure.microsoft.com/en-us/marketplace/partners/docker/dockerdatacenterdocker-datacenter/ +[8]: https://success.docker.com/Datacenter/Apply/Docker_Datacenter_on_Azure +[9]: http://www.docker.com/trial +[10]: https://www.youtube.com/playlist?list=PLkA60AVN3hh8tFH7xzI5Y-vP48wUiuXfH +[11]: https://www.youtube.com/playlist?list=PLkA60AVN3hh8a8JaIOA5Q757KiqEjPKWr +[12]: https://aws.amazon.com/quickstart/promo/ +[20]: https://docs.docker.com/engine/understanding-docker/ +[21]: https://hub.docker.com/ +[22]: https://docs.docker.com/release-notes/ +[23]: https://www.docker.com/subscribe_newsletter/ +[24]: http://www.meetup.com/Docker-Online-Meetup/ +[25]: https://www.docker.com/community/meetup-groups +[26]: https://www.youtube.com/playlist?list=PLkA60AVN3hh87OoVra6MHf2L4UR9xwJkv +[27]: https://docs.docker.com/contributing/contributing/ + From 5f2eddc889610745744c365fdb7b83b113ec1ddf Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 26 Jun 2016 22:46:37 +0800 Subject: [PATCH 1617/1710] =?UTF-8?q?20160626-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...manently mount a Windows share on Linux.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 sources/tech/20160624 How to permanently mount a Windows share on Linux.md diff --git a/sources/tech/20160624 How to permanently mount a Windows share on Linux.md b/sources/tech/20160624 How to permanently mount a Windows share on Linux.md new file mode 100644 index 0000000000..015bf5f231 --- /dev/null +++ b/sources/tech/20160624 How to permanently mount a Windows share on Linux.md @@ -0,0 +1,125 @@ +How to permanently mount a Windows share on Linux +================================================== + +>If you get tired of having to remount Windows shares when you reboot your Linux box, read about an easy way to make those shares permanently mount. + +![](http://tr2.cbsistatic.com/hub/i/2016/06/02/e965310b-b38d-43e6-9eac-ea520992138b/68fd9ec5d6731cc405bdd27f2f42848d/linuxadminhero.jpg) +>Image: Jack Wallen + +It has never been easier for Linux to interact within a Windows network. And considering how many businesses are adopting Linux, those two platforms have to play well together. Fortunately, with the help of a few tools, you can easily map Windows network drives onto a Linux machine, and even ensure they are still there upon rebooting the Linux machine. + +### Before we get started + +For this to work, you will be using the command line. The process is pretty simple, but you will be editing the /etc/fstab file, so do use caution. +Also, I assume you already have Samba working properly so you can manually mount shares from a Windows network to your Linux box, and that you know the IP address of the machine hosting the share. + +Are you ready? Let's go. + +### Create your mount point + +The first thing we're going to do is create a folder that will serve as the mount point for the share. For the sake of simplicity, we'll name this folder share and we'll place it in /media. Open your terminal window and issue the command: + +``` +sudo mkdir /media/share +``` + +### A few installations + +Now we have to install the system that allows for cross-platform file sharing; this system is cifs-utils. From the terminal window, issue the command: + +``` +sudo apt-get install cifs-utils +``` + +This command will also install all of the dependencies for cifs-utils. + +Once this is installed, open up the file /etc/nsswitch.conf and look for the line: + +``` +hosts: files mdns4_minimal [NOTFOUND=return] dns +``` + +Edit that line so it looks like: + +``` +hosts: files mdns4_minimal [NOTFOUND=return] wins dns +``` + +Now you must install windbind so that your Linux machine can resolve Windows computer names on a DHCP network. From the terminal, issue this command: + +``` +sudo apt-get install libnss-windbind windbind +``` + +Restart networking with the command: + +``` +sudo service networking restart +``` + +### Mount the network drive + +Now we're going to map the network drive. This is where we must edit the /etc/fstab file. Before you make that first edit, back up the file with this command: + +``` +sudo cp /etc/fstab /etc/fstab.old +``` + +If you need to restore that file, issue the command: + +``` +sudo mv /etc/fstab.old /etc/fstab +``` + +Create a credentials file in your home directory called .smbcredentials. In that file, add your username and password, like so (USER is the actual username and password is the actual password): + +``` +username=USER + +password=PASSWORD +``` + +You now have to know the Group ID (GID) and User ID (UID) of the user that will be mounting the drive. Issue the command: + +``` +id USER +``` + +USER is the actual username, and you should see something like: + +``` +uid=1000(USER) gid=1000(GROUP) +``` + +USER is the actual username, and GROUP is the group name. The numbers before (USER) and (GROUP) will be used in the /etc/fstab file. + +It's time to edit the /etc/fstab file. Open that file in your editor and add the following line to the end (replace everything in ALL CAPS and the IP address of the remote machine): + +``` +//192.168.1.10/SHARE /media/share cifs credentials=/home/USER/.smbcredentials,iocharset=uft8,gid=GID,udi=UID,file_mode=0777,dir_mode=0777 0 0 +``` + +**Note**: The above should be on a single line. + +Save and close that file. Issue the command sudo mount -a and the share will be mounted. Check in /media/share and you should see the files and folders on the network share. + +### Sharing made easy + +Thanks to cifs-utils and Samba, mapping network shares is incredibly easy on a Linux machine. And now, you won't have to manually remount those shares every time your machine boots. + +For more networking tips and tricks, sign up for our Data Center newsletter. +[SUBSCRIBE](https://secure.techrepublic.com/user/login/?regSource=newsletter-button&position=newsletter-button&appId=true&redirectUrl=http%3A%2F%2Fwww.techrepublic.com%2Farticle%2Fhow-to-permanently-mount-a-windows-share-on-linux%2F&) + +-------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/article/how-to-permanently-mount-a-windows-share-on-linux/ + +作者:[Jack Wallen][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.techrepublic.com/search/?a=jack+wallen + + From 29330c4379929666ac3d2fc1840ecd87bb833c97 Mon Sep 17 00:00:00 2001 From: Rubik Date: Sun, 26 Jun 2016 22:49:55 +0800 Subject: [PATCH 1618/1710] =?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 已将文件移动至trasnlated/tech/下。 多谢指正。 --- .../tech/20160616 6 Amazing Linux Distributions For Kids.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20160616 6 Amazing Linux Distributions For Kids.md (100%) diff --git a/sources/tech/20160616 6 Amazing Linux Distributions For Kids.md b/translated/tech/20160616 6 Amazing Linux Distributions For Kids.md similarity index 100% rename from sources/tech/20160616 6 Amazing Linux Distributions For Kids.md rename to translated/tech/20160616 6 Amazing Linux Distributions For Kids.md From 825307798075d686f763aac759a72ce1cb922f12 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 26 Jun 2016 22:56:30 +0800 Subject: [PATCH 1619/1710] =?UTF-8?q?20160626-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...g may prevent the demise of Moore's Law.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/techmd20160604 Microfluidic cooling may prevent the demise of Moore's Law.md diff --git a/sources/techmd20160604 Microfluidic cooling may prevent the demise of Moore's Law.md b/sources/techmd20160604 Microfluidic cooling may prevent the demise of Moore's Law.md new file mode 100644 index 0000000000..66548921e2 --- /dev/null +++ b/sources/techmd20160604 Microfluidic cooling may prevent the demise of Moore's Law.md @@ -0,0 +1,67 @@ +Microfluidic cooling may prevent the demise of Moore's Law +============================================================ + +![](http://tr1.cbsistatic.com/hub/i/r/2015/12/09/a7cb82d1-96e8-43b5-bfbd-d4593869b230/resize/620x/9607388a284e3a61a39f4399a9202bd7/networkingistock000042544852agsandrew.jpg) +>Image: iStock/agsandrew + +Existing technology's inability to keep microchips cool is fast becoming the number one reason why [Moore's Law][1] may soon meet its demise. + +In the ongoing need for digital speed, scientists and engineers are working hard to squeeze more transistors and support circuitry onto an already-crowded piece of silicon. However, as complex as that seems, it pales in comparison to the [problem of heat buildup][2]. + +"Right now, we're limited in the power we can put into microchips," says John Ditri, principal investigator at Lockheed Martin in [this press release][3]. "One of the biggest challenges is managing the heat. If you can manage the heat, you can use fewer chips, and that means using less material, which results in cost savings as well as reduced system size and weight. If you manage the heat and use the same number of chips, you'll get even greater performance in your system." + +Resistance to the flow of electrons through silicon causes the heat, and packing so many transistors in such a small space creates enough heat to destroy components. One way to eliminate heat buildup is to reduce the flow of electrons by [using photonics at the chip level][4]. However, photonic technology is not without its set of problems. + +SEE: [Silicon photonics will revolutionize data centers in 2015][5] + +### Microfluid cooling might be the answer + +To seek out other solutions, the Defense Advanced Research Projects Agency (DARPA) has initiated a program called [ICECool Applications][6] (Intra/Interchip Enhanced Cooling). "ICECool is exploring disruptive thermal technologies that will mitigate thermal limitations on the operation of military electronic systems while significantly reducing the size, weight, and power consumption," explains the [GSA website FedBizOpps.gov][7]. + +What is unique about this method of cooling is the push to use a combination of intra- and/or inter-chip microfluidic cooling and on-chip thermal interconnects. + +![](http://tr4.cbsistatic.com/hub/i/r/2016/05/25/fd3d0d17-bd86-4d25-a89a-a7050c4d59c4/resize/300x/e9c18034bde66526310c667aac92fbf5/microcooling-1.png) +>MicroCooling 1 Image: DARPA + +The [DARPA ICECool Application announcement][8] notes, "Such miniature intra- and/or inter-chip passages (see right) may take the form of axial micro-channels, radial passages, and/or cross-flow passages, and may involve micro-pores and manifolded structures to distribute and re-direct liquid flow, including in the form of localized liquid jets, in the most favorable manner to meet the specified heat flux and heat density metrics." + +Using the above technology, engineers at Lockheed Martin have experimentally demonstrated how on-chip cooling is a significant improvement. "Phase I of the ICECool program verified the effectiveness of Lockheed's embedded microfluidic cooling approach by showing a four-times reduction in thermal resistance while cooling a thermal demonstration die dissipating 1 kW/cm2 die-level heat flux with multiple local 30 kW/cm2 hot spots," mentions the Lockheed Martin press release. + +In phase II of the Lockheed Martin project, the engineers focused on RF amplifiers. The press release continues, "Utilizing its ICECool technology, the team has been able to demonstrate greater than six times increase in RF output power from a given amplifier while still running cooler than its conventionally cooled counterpart." + +### Moving to production + +Confident of the technology, Lockheed Martin is already designing and building a functional microfluidic cooled transmit antenna. Lockheed Martin is also collaborating with Qorvo to integrate its thermal solution with Qorvo's high-performance [GaN process][9]. + +The authors of the research paper [DARPA's Intra/Interchip Enhanced Cooling (ICECool) Program][10] suggest ICECool Applications will produce a paradigm shift in the thermal management of electronic systems. "ICECool Apps performers will define and demonstrate intra-chip and inter-chip thermal management approaches that are tailored to specific applications and this approach will be consistent with the materials sets, fabrication processes, and operating environment of the intended application." + +If this microfluidic technology is as successful as scientists and engineers suggest, it seems Moore's Law does have a fighting chance. + +For more about networking, subscribe to our Data Centers newsletter. + +[SUBSCRIBE](https://secure.techrepublic.com/user/login/?regSource=newsletter-button&position=newsletter-button&appId=true&redirectUrl=http%3A%2F%2Fwww.techrepublic.com%2Farticle%2Fmicrofluidic-cooling-may-prevent-the-demise-of-moores-law%2F&) + +-------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/article/microfluidic-cooling-may-prevent-the-demise-of-moores-law/ + +作者:[Michael Kassner][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.techrepublic.com/search/?a=michael+kassner +[1]: http://www.intel.com/content/www/us/en/history/museum-gordon-moore-law.html +[2]: https://books.google.com/books?id=mfec2Zw_b7wC&pg=PA154&lpg=PA154&dq=does+heat+destroy+transistors&source=bl&ots=-aNdbMD7FD&sig=XUUiaYG_6rcxHncx4cI4Cqe3t20&hl=en&sa=X&ved=0ahUKEwif4M_Yu_PMAhVL7oMKHW3GC3cQ6AEITTAH#v=onepage&q=does%20heat%20destroy%20transis +[3]: http://www.lockheedmartin.com/us/news/press-releases/2016/march/160308-mst-cool-technology-turns-down-the-heat-on-high-tech-equipment.html +[4]: http://www.techrepublic.com/article/silicon-photonics-will-revolutionize-data-centers-in-2015/ +[5]: http://www.techrepublic.com/article/silicon-photonics-will-revolutionize-data-centers-in-2015/ +[6]: https://www.fbo.gov/index?s=opportunity&mode=form&id=0be99f61fbac0501828a9d3160883b97&tab=core&_cview=1 +[7]: https://www.fbo.gov/index?s=opportunity&mode=form&id=0be99f61fbac0501828a9d3160883b97&tab=core&_cview=1 +[8]: https://www.fbo.gov/index?s=opportunity&mode=form&id=0be99f61fbac0501828a9d3160883b97&tab=core&_cview=1 +[9]: http://electronicdesign.com/communications/what-s-difference-between-gaas-and-gan-rf-power-amplifiers +[10]: http://www.csmantech.org/Digests/2013/papers/050.pdf + + + From f0900d07751c54ddd181ccd93da17e8b0715e1b9 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 26 Jun 2016 22:57:05 +0800 Subject: [PATCH 1620/1710] =?UTF-8?q?20160626-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Microfluidic cooling may prevent the demise of Moore's Law.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{techmd20160604 Microfluidic cooling may prevent the demise of Moore's Law.md => tech/20160604 Microfluidic cooling may prevent the demise of Moore's Law.md} (100%) diff --git a/sources/techmd20160604 Microfluidic cooling may prevent the demise of Moore's Law.md b/sources/tech/20160604 Microfluidic cooling may prevent the demise of Moore's Law.md similarity index 100% rename from sources/techmd20160604 Microfluidic cooling may prevent the demise of Moore's Law.md rename to sources/tech/20160604 Microfluidic cooling may prevent the demise of Moore's Law.md From 1c1ae275750be8502a4ed8c4bff08ed7efcda69a Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 26 Jun 2016 23:04:07 +0800 Subject: [PATCH 1621/1710] =?UTF-8?q?20160626-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...C builds on Raspberry Pi Compute Module.md | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sources/tech/20160624 Industrial SBC builds on Raspberry Pi Compute Module.md diff --git a/sources/tech/20160624 Industrial SBC builds on Raspberry Pi Compute Module.md b/sources/tech/20160624 Industrial SBC builds on Raspberry Pi Compute Module.md new file mode 100644 index 0000000000..17874b2cf3 --- /dev/null +++ b/sources/tech/20160624 Industrial SBC builds on Raspberry Pi Compute Module.md @@ -0,0 +1,71 @@ +Industrial SBC builds on Raspberry Pi Compute Module +===================================================== + +![](http://hackerboards.com/files/embeddedmicro_mypi-thm.jpg) + +On Kickstarter, a “MyPi” industrial SBC using the RPi Compute Module offers a mini-PCIe slot, serial port, wide-range power, and modular expansion. + +You might wonder why in 2016 someone would introduce a sandwich-style single board computer built around the aging, ARM11 based COM version of the original Raspberry Pi, the [Raspberry Pi Compute Module][1]. First off, there are still plenty of industrial applications that don’t need much CPU horsepower, and second, the Compute Module is still the only COM based on Raspberry Pi hardware, although the cheaper, somewhat COM-like [Raspberry Pi Zero][2], which has the same 700MHz processor, comes close. + +![](http://hackerboards.com/files/embeddedmicro_mypi-sm.jpg) + +![](http://hackerboards.com/files/embeddedmicro_mypi_encl-sm.jpg) + +>MyPi with COM and I/O add-ons (left), and in its optional industrial enclosure + +In addition, Embedded Micro Technology says its SBC is also designed to support a swap-in for a promised Raspberry Pi Compute Module upgrade built around the Raspberry Pi 3’s quad-core, Cortex-A53 Broadcom BCM2837 SoC. Since this product could arrive any week now, it’s unclear how that all sorts out for Kickstarter backers. Still, it’s nice to know you’re somewhat futureproof, even if you have to pay for the upgrade. + +The MyPi is not the only new commercial embedded device based on the Raspberry Pi Compute Module. Pigeon Computers launched a [Pigeon RB100][3] industrial automation controller based on the COM in May. Most such devices arrived in 2014, however, shortly after the COM arrived, including the [Techbase Modberry][4]. + +The MyPi is over a third of the way toward its $21,696 funding goal with 30 days to go. An early bird package starts at $119, with shipments in September. Other kit options include a $187 version that includes the $30 Raspberry Pi Compute Module, as well as various cables. Kits are also available with add-on boards and an industrial enclosure. + +![](http://hackerboards.com/files/embeddedmicro_mypi_baseboard-sm.jpg) + +![](http://hackerboards.com/files/embeddedmicro_mypi_detail-sm.jpg) + +>MyPi baseboard without COM or add-ons (left) and its port details + +The Raspberry Pi Compute Module starts the MyPi off with the Broadcom BCM2835 SoC, 512MB RAM, and 4GB eMMC flash. The MyPi adds to this with a microSD card slot, an HDMI port, two USB 2.0 ports, a 10/100 Ethernet port, and a similarly coastline RS232 port (via USB). + +![](http://hackerboards.com/files/embeddedmicro_mypi_angle1-sm.jpg) + +![](http://hackerboards.com/files/embeddedmicro_mypi_angle2.jpg) + +>Two views of the MyPi board with RPi and mini-PCIe modules installed + +The MyPi is further equipped with a mini-PCIe socket, which is said to be “USB only and intended for use of modems available in the mPCIe form factor.” A SIM card slot is also available. Dual standard Raspberry Pi camera connectors are onboard along with an audio out interface, a battery-backed RTC, and LEDs. The SBC has a wide-range, 9-23V DC input. + +The MyPi is designed for Raspberry Pi hackers who have stacked so many HAT add-on boards, they can no longer work with them effectively or stuff them inside and industrial enclosure, says Embedded Micro. The MyPi supports HATs, but also offers the company’s own “ASIO” (Application Specific I/O) add-on modules, which route their I/O back to the carrier board, which, in turn, connects it to the 8-pin, green, Phoenix-style, industrial I/O connector (labeled “ASIO Out”) on the board’s edge, as illustrated in the diagram below. + +![](http://hackerboards.com/files/embeddedmicro_mypi_io-sm.jpg) +>MyPi’s modular expansion interface + +As the Kickstarter page explains it: “Rather than have a plug in HAT card with IO signal connectors poking out on all sides, instead we take these same IO signals back down a second output connector which is directly connected to the green industrial connector.” Additionally, “by simply using extended length interface pins on the card (raising it up) you can expand the IO set further — all without using any cable assemblies!” says Embedded Micro. + +![](http://hackerboards.com/files/embeddedmicro_mypi_with_iocards-sm.jpg) +>MyPi and its optional I/O add-on cards + +The company offers a line of hardened ASIO plug-in cards for the MyPi, as shown above. These initially include CAN-Bus, 4-20mA transducer signals, RS485, Narrow Band RF, and more. + +### Further information + +The MyPi is available on Kickstarter starting at a 79-Pound ($119) early bird package (without the Raspberry Pi Compute Module) through July 23, with shipments due in September. More information may be found on the [MyPi Kickstarter page][5] and the [Embedded Micro Technology website][6]. + + +-------------------------------------------------------------------------------- + +via: http://hackerboards.com/industrial-sbc-builds-on-rpi-compute-module/ + +作者:[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://hackerboards.com/industrial-sbc-builds-on-rpi-compute-module/ +[1]: http://hackerboards.com/raspberry-pi-morphs-into-30-dollar-com/ +[2]: http://hackerboards.com/pi-zero-tweak-adds-camera-connector-keeps-5-price/ +[3]: http://hackerboards.com/automation-controller-runs-linux-on-raspberry-pi-com/ +[4]: http://hackerboards.com/automation-controller-taps-raspberry-pi-compute-module/ +[5]: https://www.kickstarter.com/projects/410598173/mypi-industrial-strength-raspberry-pi-for-iot-proj +[6]: http://www.embeddedpi.com/ From d0750c98059062f279b0e833bf9de29e8df685dc Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 26 Jun 2016 23:13:08 +0800 Subject: [PATCH 1622/1710] =?UTF-8?q?20160626-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... the cloud runs on Linux. Any questions.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/talk/20160624 IT runs on the cloud and the cloud runs on Linux. Any questions.md diff --git a/sources/talk/20160624 IT runs on the cloud and the cloud runs on Linux. Any questions.md b/sources/talk/20160624 IT runs on the cloud and the cloud runs on Linux. Any questions.md new file mode 100644 index 0000000000..2a575c1a31 --- /dev/null +++ b/sources/talk/20160624 IT runs on the cloud and the cloud runs on Linux. Any questions.md @@ -0,0 +1,62 @@ +IT runs on the cloud, and the cloud runs on Linux. Any questions? +=================================================================== + +>IT is moving to the cloud. And, what powers the cloud? Linux. When even Microsoft's Azure has embraced Linux, you know things have changed. + +![](http://zdnet1.cbsistatic.com/hub/i/r/2016/06/24/7d2b00eb-783d-4202-bda2-ca65d45c460a/resize/770xauto/732db8df725ede1cc38972788de71a0b/linux-owns-cloud.jpg) +>Image: ZDNet + +Like it or lump it, the cloud is taking over IT. We've seen [the rise of the cloud over in-house IT][1] for years now. And, what powers the cloud? Linux. + +A recent survey by the [Uptime Institute][2] of 1,000 IT executives found that 50 percent of senior enterprise IT executives expect the [majority of IT workloads to reside off-premise in cloud][3] or colocation sites in the future. Of those surveyed, 23 percent expect the shift to happen next year, and 70 percent expect that shift to occur within the next four years. + +This comes as no surprise. Much as many of us still love our physical servers and racks, it often doesn't make financial sense to run your own data center. + +It's really very simple. Just compare your [capital expense (CAPEX) of running your own hardware versus the operational expenses (OPEX)][4] of using a cloud. Now, that's not to say you want to outsource everything and the kitchen sink, but most of the time and for many of your jobs you'll want to move to the cloud. + +In turn, if you're going to make the best use of the cloud, you need to know Linux. + +[Amazon Web Services][5], [Apache CloudStack][6], [Rackspace][7], [Google Cloud Platform][8], and [OpenStack][9] all run Linux at their hearts. The result? By 2014, [Linux server application deployments had risen to 79 percent][10] of all businesses, while Windows server app deployments had fallen to 36 percent. Linux has only gained more momentum since then. + +Even Microsoft understands this. + +In the past year alone, Azure Chief Technology Officer Mark Russinovich said, Microsoft has gone from [one in four of its Azure virtual machines running Linux][11] to [nearly one in three][12]. + +Think about that. Microsoft, which is switching to the [cloud for its main source of revenue][13], is relying on Linux for a third of its cloud business. + +Even now, both those who love Microsoft and those who hate it have trouble getting their minds around the fundamental shift of [Microsoft from a proprietary software company to an open-source][14], cloud-based service business. + +Linux's penetration into the proprietary server room is even deeper than it first appears. For example, [Docker recently announced a public beta of its Windows 10 and Mac OS X releases][15]. So, does that mean [Docker][16] is porting its eponymous container service to Windows 10 and the Mac? Nope. + +On both platforms, Docker runs within a Linux virtual machine. HyperKit on Mac OS and Hyper-V on Windows. Your interface may look like just another Mac or Windows application, but at heart your containers will still be running on Linux. + +So, just as the vast majority of Android phone and Chromebook users have no clue they're running Linux, so too will IT users continue to quietly move to Linux and the cloud. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/it-runs-on-the-cloud-and-the-cloud-runs-on-linux-any-questions/#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://www.zdnet.com/article/2014-the-year-the-cloud-killed-the-datacenter/ +[2]: https://uptimeinstitute.com/ +[3]: http://www.zdnet.com/article/move-to-cloud-accelerating-faster-than-thought-survey-finds/ +[4]: http://www.zdnet.com/article/rethinking-capex-and-opex-in-a-cloud-centric-world/ +[5]: https://aws.amazon.com/ +[6]: https://cloudstack.apache.org/ +[7]: https://www.rackspace.com/en-us +[8]: https://cloud.google.com/ +[9]: http://www.openstack.org/ +[10]: http://www.zdnet.com/article/linux-foundation-finds-enterprise-linux-growing-at-windows-expense/ +[11]: http://news.microsoft.com/bythenumbers/azure-virtual +[12]: http://www.zdnet.com/article/microsoft-nearly-one-in-three-azure-virtual-machines-now-are-running-linux/ +[13]: http://www.zdnet.com/article/microsofts-q3-azure-commercial-cloud-strong-but-earnings-revenue-light/ +[14]: http://www.zdnet.com/article/why-microsoft-is-turning-into-an-open-source-company/ +[15]: http://www.zdnet.com/article/new-docker-betas-for-azure-windows-10-now-available/ +[16]: http://www.docker.com/ + From dbc142932f9b4ad5c22527cfa64285a097af861f Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 26 Jun 2016 23:35:56 +0800 Subject: [PATCH 1623/1710] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E7=82=B9=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How to Add Cron Jobs in Linux and Unix.md | 79 ++++++++++++++----- 1 file changed, 59 insertions(+), 20 deletions(-) diff --git a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md index d445be5b51..0b5ee53439 100644 --- a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md +++ b/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md @@ -1,4 +1,4 @@ -如何在 Linux 及 Unix 系统中添加 cron 任务 +如何在 Linux 及 Unix 系统中添加定时任务 ====================================== ![](https://www.unixmen.com/wp-content/uploads/2016/05/HOW-TO-ADD-CRON-JOBS-IN-LINUX-AND-UNIX-696x334.png) @@ -7,11 +7,11 @@ ![](http://www.unixmen.com/wp-content/uploads/2016/05/cronjob.gif) -定时任务 (Cron job) 被用于安排那些需要被周期性执行的命令。利用它,你可以配置某些命令或者脚本,让它们在某个设定的时间周期性地运行。`Cron` 是 Linux 或者类 Unix 系统中最为实用的工具之一。cron 服务(守护进程)在系统后台运行,并且会持续地检查 `/etc/crontab` 文件和 `/etc/cron.*/ `目录。它同样也会检测 `/var/spool/cron/` 目录。 +定时任务 (cron job) 被用于安排那些需要被周期性执行的命令。利用它,你可以配置某些命令或者脚本,让它们在某个设定的时间周期性地运行。`cron` 是 Linux 或者类 Unix 系统中最为实用的工具之一。cron 服务(守护进程)在系统后台运行,并且会持续地检查 `/etc/crontab` 文件和 `/etc/cron.*/ `目录。它同样也会检查 `/var/spool/cron/` 目录。 ### crontab 命令 -`crontab` 是用来安装、卸载或者列出 cron 配置文件列表的命令。cron 配置文件则用于驱动 `Vixie Cron` 的 [cron(8)][1] 守护进程。每个用户都可以拥有自己的 crontab 文件,虽然这些文件都位于 `/var/spool/cron/crontabs` 目录中,但并不意味着你可以直接编辑它们。你需要通过 `crontab` 命令来编辑或者配置你自己的定时任务。 +`crontab` 是用来安装、卸载或者列出定时任务列表的命令。cron 配置文件则用于驱动 `Vixie Cron` 的 [cron(8)][1] 守护进程。每个用户都可以拥有自己的 crontab 文件,虽然这些文件都位于 `/var/spool/cron/crontabs` 目录中,但并不意味着你可以直接编辑它们。你需要通过 `crontab` 命令来编辑或者配置你自己的定时任务。 ### 定时配置文件的类型 @@ -19,9 +19,9 @@ - **UNIX 或 Linux 系统的 crontab** : 此类型通常由那些需要 root 或类似权限的系统服务和重要任务使用。第六个字段(见下方的字段介绍)为用户名,用来指定此命令以哪个用户身份来执行。如此一来,系统的 `crontab` 就能够以任意用户的身份来执行操作。 -- **用户的 crontabs**: 用户可以使用 `corntab` 命令来安装属于他们自己的定时任务。 第六个字段为需要运行的命令, 所有的命令都会以创建该 crontab 任务的用户的身份运行。 +- **用户的 crontab**: 用户可以使用 `corntab` 命令来安装属于他们自己的定时任务。 第六个字段为需要运行的命令, 所有的命令都会以创建该 crontab 任务的用户的身份运行。 -**注意**: 这种问答形式的 `Cron` 实现由 Paul Vixie 所写,并且被包含在许多 [Linux][2] 发行版和类 Unix 系统(如广受欢迎的第四版 BSD)中。它的语法被各种 crond 的实现所[兼容][3]。 +**注意**: 这种问答形式的 `Cron` 实现由 Paul Vixie 所写,并且被包含在许多 [Linux][2] 发行版本和类 Unix 系统(如广受欢迎的第四版 BSD)中。它的语法被各种 crond 的实现所[兼容][3]。 那么我该如何安装、创建或者编辑我自己的定时任务呢? @@ -57,7 +57,7 @@ $ crontab -e 便于记忆的格式: ``` -* * * * * command to be executed +* * * * * 要执行的命令 – – – – – | | | | | | | | | —– 一周当中的某天 (0 – 7) (周日为 0 或 7) @@ -94,20 +94,59 @@ $ crontab -e - **分隔符 (/)** : 此操作符指定了一个步进值,例如: `0-23/` 可以用于小时字段来指定某个命令每小时被执行一次。步进值也可以跟在星号操作符后边,如果你希望命令行每 2 小时执行一次,则可以使用 `*/2`。 -### 使用特殊字符节省时间 +### 如何禁用邮件输出 + +默认情况下,某个命令或者脚本的输出内容(如果有的话)会发送到你的本地邮箱账户中。若想停止收到 `crontab` 发送的邮件,需要添加 `>/dev/null 2>&1` 这段内容,例如: + +``` +0 3 * * * /root/backup.sh >/dev/null 2>&1 +``` + +如果想将输出内容发送到特定的邮件账户中,比如说 vivek@nixcraft.in 这个邮箱, 则你需要像下面这样定义一个 MAILTO 变量: + +``` +MAILTO="vivek@nixcraft.in" +0 3 * * * /root/backup.sh >/dev/null 2>&1 +``` + +访问 “[禁用 Crontab 命令的邮件提示](http://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/)” 查看更多信息。 + + +### 任务:列出你所有的定时任务 + +键入以下命令: + +``` +# crontab -l +# crontab -u username -l +``` + +要删除所有的定时任务,可以使用如下命令: + +``` +# 删除当前定时任务 # +crontab -r +``` + +``` +## 删除某用户名下的定时任务,此命令需以 root 用户身份执行 ## +crontab -r -u username +``` + +### 使用特殊字符来节省时间 你可以使用以下 8 个特殊字符中的其中一个替代头五个字段,这样不但可以节省你的时间,还可以提高可读性。 -特殊字符 | 含义 +特殊字符 |含义 |:-- |:-- @reboot | 在每次启动时运行一次 -@yearly | 每年运行一次, “0 0 1 1 *”. +@yearly | 每年运行一次,等同于 “0 0 1 1 *”. @annually | (同 @yearly) -@monthly | 每月运行一次, “0 0 1 * *”. -@weekly | 每周运行一次, “0 0 * * 0”. -@daily | 每天运行一次, “0 0 * * *”. +@monthly | 每月运行一次, 等同于 “0 0 1 * *”. +@weekly | 每周运行一次, 等同于 “0 0 * * 0”. +@daily | 每天运行一次, 等同于 “0 0 * * *”. @midnight | (同 @daily) -@hourly | 每小时运行一次, “0 * * * *”. +@hourly | 每小时运行一次, 等同于 “0 * * * *”. 示例: @@ -121,7 +160,7 @@ $ crontab -e ** /etc/crontab ** 是系统的 corntabs 文件。通常只被 root 用户或守护进程用于配置系统级别的任务。每个独立的用户必须像上面介绍的那样使用 `corntab` 命令来安装和编辑自己的任务。`/var/spool/cron/` 或者 `/var/cron/tabs/` 目录存放了个人用户的 corntab 文件,它必定会备份在用户的家目录当中。 -### 理解默认的 `/etc/crontab` +### 理解默认的 `/etc/crontab` 文件 典型的 `/etc/crontab` 文件内容是这样的: @@ -141,13 +180,13 @@ HOME=/ 另外,corn 会读取 `/etc/cron.d/`目录中的文件。通常情况下,像 sa-update 或者 sysstat 这样的系统守护进程会将他们的定时任务存放在此处。作为 root 用户或者超级用户,你可以使用以下目录来配置你的定时任务。你可以直接将脚本放到这里。`run-parts`命令会通过 `/etc/crontab` 文件来运行位于某个目录中的脚本或者程序。 -目录 |描述 +目录 |描述 |:-- |:-- /etc/cron.d/ | 将所有的脚本文件放在此处,并从 /etc/crontab 文件中调用它们。 -/etc/cron.daily/ | 运行需要每天运行一次的脚本 -/etc/cron.hourly/ | 运行需要每小时运行一次的脚本 -/etc/cron.monthly/ | 运行需要每月运行一次的脚本 -/etc/cron.weekly/ | 运行需要每周运行一次的脚本 +/etc/cron.daily/ | 运行需要 每天 运行一次的脚本 +/etc/cron.hourly/ | 运行需要 每小时 运行一次的脚本 +/etc/cron.monthly/ | 运行需要 每月 运行一次的脚本 +/etc/cron.weekly/ | 运行需要 每周 运行一次的脚本 ### 备份定时任务 @@ -170,4 +209,4 @@ via: https://www.unixmen.com/add-cron-jobs-linux-unix/?utm_source=feedburner&utm [a]: https://www.unixmen.com/author/duynv/ [1]: http://www.manpager.com/linux/man8/cron.8.html [2]: http://www.linuxsecrets.com/ -[3]: http://www.linuxsecrets.com/linux-hardware/ +[3]: http://www.linuxsecrets.com/linux-hardware/ \ No newline at end of file From 7da5326c247fc7923f1ce18d1bbe4bfb93961ff3 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 18:04:56 +0800 Subject: [PATCH 1624/1710] =?UTF-8?q?20160627-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o Write and Tune Shell Scripts – Part 2.md | 284 ++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md diff --git a/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md b/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md new file mode 100644 index 0000000000..bcce4c143e --- /dev/null +++ b/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md @@ -0,0 +1,284 @@ +Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2 +=============================================================================== + +In the previous article of this [Python series][1] we shared a brief introduction to Python, its command-line shell, and the IDLE. We also demonstrated how to perform arithmetic calculations, how to store values in variables, and how to print back those values to the screen. Finally, we explained the concepts of methods and properties in the context of Object Oriented Programming through a practical example. + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Write-Shell-Scripts-in-Python-Programming.png) +>Write Linux Shell Scripts in Python Programming + +In this guide we will discuss control flow (to choose different courses of action depending on information entered by a user, the result of a calculation, or the current value of a variable) and loops (to automate repetitive tasks) and then apply what we have learned so far to write a simple shell script that will display the operating system type, the hostname, the kernel release, version, and the machine hardware name. + +This example, although basic, will help us illustrate how we can leverage Python OOP’s capabilities to write shell scripts easier than using regular bash tools. + +In other words, we want to go from + +``` +# uname -snrvm +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Hostname-of-Linux.png) +>Check Hostname of Linux + +to + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Linux-Hostname-Using-Python-Script.png) +>Check Linux Hostname Using Python Script + +or + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Script-to-Check-Linux-System-Information.png) +>Script to Check Linux System Information + +Looks pretty, doesn’t it? Let’s roll up our sleeves and make it happen. + +### Control flow in Python + +As we said earlier, control flow allows us to choose different outcomes depending on a given condition. Its most simple implementation in Python is an if / else clause. + +The basic syntax is: + +``` +if condition: + # action 1 +else: + # action 2 +``` + +When condition evaluates to true, the code block below will be executed (represented by `# action 1`. Otherwise, the code under else will be run. +A condition can be any statement that can evaluate to either true or false. + +For example: + +1. 1 < 3 # true + +2. firstName == “Gabriel” # true for me, false for anyone not named Gabriel + + - In the first example we compared two values to determine if one is greater than the other. + - In the second example we compared firstName (a variable) to determine if, at the current execution point, its value is identical to “Gabriel” + - The condition and the else statement must be followed by a colon (:) + - Indentation is important in Python. Lines with identical indentation are considered to be in the same code block. + +Please note that the if / else statement is only one of the many control flow tools available in Python. We reviewed it here since we will use it in our script later. You can learn more about the rest of the tools in the [official docs][2]. + +### Loops in Python + +Simply put, a loop is a sequence of instructions or statements that are executed in order as long as a condition is true, or once per item in a list. + +The most simple loop in Python is represented by the for loop iterates over the items of a given list or string beginning with the first item and ending with the last. + +Basic syntax: + +``` +for x in example: + # do this +``` + +Here example can be either a list or a string. If the former, the variable named x represents each item in the list; if the latter, x represents each character in the string: + +``` +>>> rockBands = [] +>>> rockBands.append("Roxette") +>>> rockBands.append("Guns N' Roses") +>>> rockBands.append("U2") +>>> for x in rockBands: + print(x) +or +>>> firstName = "Gabriel" +>>> for x in firstName: + print(x) +``` + +The output of the above examples is shown in the following image: + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Loops-in-Python.png) +>Learn Loops in Python + +### Python Modules + +For obvious reasons, there must be a way to save a sequence of Python instructions and statements in a file that can be invoked when it is needed. + +That is precisely what a module is. Particularly, the os module provides an interface to the underlying operating system and allows us to perform many of the operations we usually do in a command-line prompt. + +As such, it incorporates several methods and properties that can be called as we explained in the previous article. However, we need to import (or include) it in our environment using the import keyword: + +``` +>>> import os +``` + +Let’s print the current working directory: + +``` +>>> os.getcwd() +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Modules.png) +>Learn Python Modules + +Let’s now put all of this together (along with the concepts discussed in the previous article) to write the desired script. + +### Python Script + +It is considered good practice to start a script with a statement that indicates the purpose of the script, the license terms under which it is released, and a revision history listing the changes that have been made. Although this is more of a personal preference, it adds a professional touch to our work. + +Here’s the script that produces the output we shown at the top of this article. It is heavily commented so that you can understand what’s happening. + +Take a few minutes to go through it before proceeding. Note how we use an if / else structure to determine whether the length of each field caption is greater than the value of the field itself. + +Based on the result, we use empty characters to fill in the space between a field caption and the next. Also, we use the right number of dashes as separator between the field caption and its value below. + +``` +#!/usr/bin/python3 +# Change the above line to #!/usr/bin/python if you don't have Python 3 installed + +# Script name: uname.py +# Purpose: Illustrate Python's OOP capabilities to write shell scripts more easily +# License: GPL v3 (http://www.gnu.org/licenses/gpl.html) + +# Copyright (C) 2016 Gabriel Alejandro Cánepa +# ​Facebook / Skype / G+ / Twitter / Github: gacanepa +# Email: gacanepa (at) gmail (dot) com + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# REVISION HISTORY +# DATE VERSION AUTHOR CHANGE DESCRIPTION +# ---------- ------- -------------- +# 2016-05-28 1.0 Gabriel Cánepa Initial version + +# Import the os module +import os + +# Assign the output of os.uname() to the the systemInfo variable +# os.uname() returns a 5-string tuple (sysname, nodename, release, version, machine) +# Documentation: https://docs.python.org/3.2/library/os.html#module-os +systemInfo = os.uname() + +# This is a fixed array with the desired captions in the script output +headers = ["Operating system","Hostname","Release","Version","Machine"] + +# Initial value of the index variable. It is used to define the +# index of both systemInfo and headers in each step of the iteration. +index = 0 + +# Initial value of the caption variable. +caption = "" + +# Initial value of the values variable +values = "" + +# Initial value of the separators variable +separators = "" + +# Start of the loop +for item in systemInfo: + if len(item) < len(headers[index]): + # A string containing dashes to the length of item[index] or headers[index] + # To repeat a character(s), enclose it within quotes followed + # by the star sign (*) and the desired number of times. + separators = separators + "-" * len(headers[index]) + " " + caption = caption + headers[index] + " " + values = values + systemInfo[index] + " " * (len(headers[index]) - len(item)) + " " + else: + separators = separators + "-" * len(item) + " " + caption = caption + headers[index] + " " * (len(item) - len(headers[index]) + 1) + values = values + item + " " + # Increment the value of index by 1 + index = index + 1 +# End of the loop + +# Print the variable named caption converted to uppercase +print(caption.upper()) + +# Print separators +print(separators) + +# Print values (items in systemInfo) +print(values) + +# INSTRUCTIONS: +# 1) Save the script as uname.py (or another name of your choosing) and give it execute permissions: +# chmod +x uname.py +# 2) Execute it: +# ./uname.py +``` + +Once you have saved the above script to a file, give it execute permissions and run it as indicated at the bottom of the code: + +``` +# chmod +x uname.py +# ./uname.py +``` + +If you get the following error while attempting to execute the script: + +``` +-bash: ./uname.py: /usr/bin/python3: bad interpreter: No such file or directory +``` + +It means you don’t have Python 3 installed. If that is the case, you can either install the package or replace the interpreter line (pay special attention and be very careful if you followed the steps to update the symbolic links to the Python binaries as outlined in the previous article): + +``` +#!/usr/bin/python3 +``` + +with + +``` +#!/usr/bin/python +``` + +which will cause the installed version of Python 2 to execute the script instead. + +**Note**: This script has been tested successfully both in Python 2.x and 3.x. + +Although somewhat rudimentary, you can think of this script as a Python module. This means that you can open it in the IDLE (File → Open… → Select file): + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Open-Python-in-IDLE.png) +>Open Python in IDLE + +A new window will open with the contents of the file. Then go to Run → Run module (or just press F5). The output of the script will be shown in the original shell: + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Run-Python-Script.png) +>Run Python Script + +If you want to obtain the same results with a script written purely in Bash, you would need to use a combination of [awk][3], [sed][4], and resort to complex methods to store and retrieve items in a list (not to mention the use of tr to convert lowercase letters to uppercase). + +In addition, Python provides portability in that all Linux systems ship with at least one Python version (either 2.x or 3.x, sometimes both). Should you need to rely on a shell to accomplish the same goal, you would need to write different versions of the script based on the shell. + +This goes to show that Object Oriented Programming features can become strong allies of system administrators. + +**Note**: You can find [this python script][5] (and others) in one of my GitHub repositories. + +### Summary + +In this article we have reviewed the concepts of control flow, loops / iteration, and modules in Python. We have shown how to leverage OOP methods and properties in Python to simplify otherwise complex shell scripts. + +Do you have any other ideas you would like to test? Go ahead and write your own Python scripts and let us know if you have any questions. Don’t hesitate to drop us a line using the comment form below, and we will get back to you as soon as we can. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/learn-python-programming-to-write-linux-shell-scripts/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[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/learn-python-programming-and-scripting-in-linux/ +[2]: http://please%20note%20that%20the%20if%20/%20else%20statement%20is%20only%20one%20of%20the%20many%20control%20flow%20tools%20available%20in%20Python.%20We%20reviewed%20it%20here%20since%20we%20will%20use%20it%20in%20our%20script%20later.%20You%20can%20learn%20more%20about%20the%20rest%20of%20the%20tools%20in%20the%20official%20docs. +[3]: http://www.tecmint.com/use-linux-awk-command-to-filter-text-string-in-files/ +[4]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[5]: https://github.com/gacanepa/scripts/blob/master/python/uname.py From 4c4245d3aecc8665b2b942728a450567eb63d7da Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 21:50:27 +0800 Subject: [PATCH 1625/1710] =?UTF-8?q?20160627-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Filter Text or String in Files - part 1.md | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 sources/tech/awk/How to Use Awk and Regular Expressions to Filter Text or String in Files - part 1.md diff --git a/sources/tech/awk/How to Use Awk and Regular Expressions to Filter Text or String in Files - part 1.md b/sources/tech/awk/How to Use Awk and Regular Expressions to Filter Text or String in Files - part 1.md new file mode 100644 index 0000000000..f254098f14 --- /dev/null +++ b/sources/tech/awk/How to Use Awk and Regular Expressions to Filter Text or String in Files - part 1.md @@ -0,0 +1,210 @@ +How to Use Awk and Regular Expressions to Filter Text or String in Files +============================================================================= + +When we run certain commands in Unix/Linux to read or edit text from a string or file, we most times try to filter output to a given section of interest. This is where using regular expressions comes in handy. + +### What are Regular Expressions? + +A regular expression can be defined as a strings that represent several sequence of characters. One of the most important things about regular expressions is that they allow you to filter the output of a command or file, edit a section of a text or configuration file and so on. + +### Features of Regular Expression + +Regular expressions are made of: + +- Ordinary characters such as space, underscore(_), A-Z, a-z, 0-9. +- Meta characters that are expanded to ordinary characters, they include: + - `(.)` it matches any single character except a newline. + - `(*)` it matches zero or more existences of the immediate character preceding it. + - `[ character(s) ]` it matches any one of the characters specified in character(s), one can also use a hyphen (-) to mean a range of characters such as [a-f], [1-5], and so on. + - `^` it matches the beginning of a line in a file. + - `$` matches the end of line in a file. + - `\` it is an escape character. + +In order to filter text, one has to use a text filtering tool such as awk. You can think of awk as a programming language of its own. But for the scope of this guide to using awk, we shall cover it as a simple command line filtering tool. + +The general syntax of awk is: + +``` +# awk 'script' filename +``` + +Where `'script'` is a set of commands that are understood by awk and are execute on file, filename. + +It works by reading a given line in the file, makes a copy of the line and then executes the script on the line. This is repeated on all the lines in the file. + +The `'script'` is in the form `'/pattern/ action'` where pattern is a regular expression and the action is what awk will do when it finds the given pattern in a line. + +### How to Use Awk Filtering Tool in Linux + +In the following examples, we shall focus on the meta characters that we discussed above under the features of awk. + +#### A simple example of using awk: + +The example below prints all the lines in the file /etc/hosts since no pattern is given. + +``` +# awk '//{print}'/etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Awk-Command-Example.gif) +>Awk Prints all Lines in a File + +#### Use Awk with Pattern: + +I the example below, a pattern `localhost` has been given, so awk will match line having localhost in the `/etc/hosts` file. + +``` +# awk '/localhost/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-Command-with-Pattern.gif) +>Awk Print Given Matching Line in a File + +#### Using Awk with (.) wild card in a Pattern + +The `(.)` will match strings containing loc, localhost, localnet in the example below. + +That is to say *** l some_single_character c ***. + +``` +# awk '/l.c/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-with-Wild-Cards.gif) +>Use Awk to Print Matching Strings in a File + +#### Using Awk with (*) Character in a Pattern + +It will match strings containing localhost, localnet, lines, capable, as in the example below: + +``` +# awk '/l*c/{print}' /etc/localhost +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Match-Strings-in-File.gif) +>Use Awk to Match Strings in File + +You will also realize that `(*)` tries to a get you the longest match possible it can detect. + +Let look at a case that demonstrates this, take the regular expression `t*t` which means match strings that start with letter `t` and end with `t` in the line below: + +``` +this is tecmint, where you get the best good tutorials, how to's, guides, tecmint. +``` + +You will get the following possibilities when you use the pattern `/t*t/`: + +``` +this is t +this is tecmint +this is tecmint, where you get t +this is tecmint, where you get the best good t +this is tecmint, where you get the best good tutorials, how t +this is tecmint, where you get the best good tutorials, how tos, guides, t +this is tecmint, where you get the best good tutorials, how tos, guides, tecmint +``` + +And `(*)` in `/t*t/` wild card character allows awk to choose the the last option: + +``` +this is tecmint, where you get the best good tutorials, how to's, guides, tecmint +``` + +#### Using Awk with set [ character(s) ] + +Take for example the set [al1], here awk will match all strings containing character a or l or 1 in a line in the file /etc/hosts. + +``` +# awk '/[al1]/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Matching-Character.gif) +>Use-Awk to Print Matching Character in File + +The next example matches strings starting with either `K` or `k` followed by `T`: + +``` +# awk '/[Kk]T/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Matched-String-in-File.gif) +>Use Awk to Print Matched String in File + +#### Specifying Characters in a Range + +Understand characters with awk: + +- `[0-9]` means a single number +- `[a-z]` means match a single lower case letter +- `[A-Z]` means match a single upper case letter +- `[a-zA-Z]` means match a single letter +- `[a-zA-Z 0-9]` means match a single letter or number + +Lets look at an example below: + +``` +# awk '/[0-9]/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-To-Print-Matching-Numbers-in-File.gif) +>Use Awk To Print Matching Numbers in File + +All the line from the file /etc/hosts contain at least a single number [0-9] in the above example. + +#### Use Awk with (^) Meta Character + +It matches all the lines that start with the pattern provided as in the example below: + +``` +# awk '/^fe/{print}' /etc/hosts +# awk '/^ff/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-All-Matching-Lines-with-Pattern.gif) +>Use Awk to Print All Matching Lines with Pattern + +#### Use Awk with ($) Meta Character + +It matches all the lines that end with the pattern provided: + +``` +# awk '/ab$/{print}' /etc/hosts +# awk '/ost$/{print}' /etc/hosts +# awk '/rs$/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Given-Pattern-String.gif) +>Use Awk to Print Given Pattern String + +#### Use Awk with (\) Escape Character + +It allows you to take the character following it as a literal that is to say consider it just as it is. + +In the example below, the first command prints out all line in the file, the second command prints out nothing because I want to match a line that has $25.00, but no escape character is used. + +The third command is correct since a an escape character has been used to read $ as it is. + +``` +# awk '//{print}' deals.txt +# awk '/$25.00/{print}' deals.txt +# awk '/\$25.00/{print}' deals.txt +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-with-Escape-Character.gif) +>Use Awk with Escape Character + +### Summary + +That is not all with the awk command line filtering tool, the examples above a the basic operations of awk. In the next parts we shall be advancing on how to use complex features of awk. Thanks for reading through and for any additions or clarifications, post a comment in the comments section. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/use-linux-awk-command-to-filter-text-string-in-files/ + +作者:[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/ From 07305e624e1c15a2c2c2761c258d82eb78ef93f7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 21:51:17 +0800 Subject: [PATCH 1626/1710] =?UTF-8?q?20160627-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... and Regular Expressions to Filter Text or String in Files.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/awk/{How to Use Awk and Regular Expressions to Filter Text or String in Files - part 1.md => Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md} (100%) diff --git a/sources/tech/awk/How to Use Awk and Regular Expressions to Filter Text or String in Files - part 1.md b/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md similarity index 100% rename from sources/tech/awk/How to Use Awk and Regular Expressions to Filter Text or String in Files - part 1.md rename to sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md From c57e2f3b1a271371dc5c448ce5ca8f8b497edc0a Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 21:57:29 +0800 Subject: [PATCH 1627/1710] =?UTF-8?q?20160627-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Awk to Print Fields and Columns in File.md | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md diff --git a/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md b/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md new file mode 100644 index 0000000000..f4f38d727e --- /dev/null +++ b/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md @@ -0,0 +1,106 @@ +How to Use Awk to Print Fields and Columns in File +====================================================== + +In this part of our Linux Awk command series, we shall have a look at one of the most important features of Awk, which is field editing. + +It is good to know that Awk automatically divides input lines provided to it into fields, and a field can be defined as a set of characters that are separated from other fields by an internal field separator. + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Awk-Print-Fields-and-Columns.png) +>Awk Print Fields and Columns + +If you are familiar with the Unix/Linux or do [bash shell programming][1], then you should know what internal field separator (IFS) variable is. The default IFS in Awk are tab and space. + +This is how the idea of field separation works in Awk: when it encounters an input line, according to the IFS defined, the first set of characters is field one, which is accessed using $1, the second set of characters is field two, which is accessed using $2, the third set of characters is field three, which is accessed using $3 and so forth till the last set of character(s). + +To understand this Awk field editing better, let us take a look at the examples below: + +**Example 1**: I have created a text file called tecmintinfo.txt. + +``` +# vi tecmintinfo.txt +# cat tecmintinfo.txt +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Create-File-in-Linux.png) +>Create File in Linux + +Then from the command line, I try to print the first, second and third fields from the file tecmintinfo.txt using the command below: + +``` +$ awk '//{print $1 $2 $3 }' tecmintinfo.txt +TecMint.comisthe +``` + +From the output above, you can see that the characters from the first three fields are printed based on the IFS defined which is space: + +- Field one which is “TecMint.com” is accessed using `$1`. +- Field two which is “is” is accessed using `$2`. +- Field three which is “the” is accessed using `$3`. + +If you have noticed in the printed output, the field values are not separated and this is how print behaves by default. + +To view the output clearly with space between the field values, you need to add (,) operator as follows: + +``` +$ awk '//{print $1, $2, $3; }' tecmintinfo.txt + +TecMint.com is the +``` + +One important thing to note and always remember is that the use of `($)` in Awk is different from its use in shell scripting. + +Under shell scripting `($)` is used to access the value of variables while in Awk `($)` it is used only when accessing the contents of a field but not for accessing the value of variables. + +**Example 2**: Let us take a look at one other example using a file which contains multiple lines called my_shoping.list. + +``` +No Item_Name Unit_Price Quantity Price +1 Mouse #20,000 1 #20,000 +2 Monitor #500,000 1 #500,000 +3 RAM_Chips #150,000 2 #300,000 +4 Ethernet_Cables #30,000 4 #120,000 +``` + +Say you wanted to only print `Unit_Price` of each item on the shopping list, you will need to run the command below: + +``` +$ awk '//{print $2, $3 }' my_shopping.txt + +Item_Name Unit_Price +Mouse #20,000 +Monitor #500,000 +RAM_Chips #150,000 +Ethernet_Cables #30,000 +``` + +Awk also has a `printf` command that helps you to format your output is a nice way as you can see the above output is not clear enough. + +Using `printf` to format output of the Item_Name and Unit_Price: + +``` +$ awk '//{printf "%-10s %s\n",$2, $3 }' my_shopping.txt + +Item_Name Unit_Price +Mouse #20,000 +Monitor #500,000 +RAM_Chips #150,000 +Ethernet_Cables #30,000 +``` + +### Summary +Field editing is very important when using Awk to filter text or strings, it helps you get particular data in columns in a list. And always remember that the use of `($)` operator in Awk is different from that in shell scripting. + +I hope the article was helpful to you and for any additional information required or questions, you can post a comment in the comment section. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/awk-print-fields-columns-with-space-separator/ + +作者:[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/category/bash-shell/ From d685fa5cc01dd234da1269938511c3706ee620df Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 22:02:13 +0800 Subject: [PATCH 1628/1710] =?UTF-8?q?20160627-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Strings Using Pattern Specific Actions.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 sources/tech/awk/Part3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md diff --git a/sources/tech/awk/Part3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md b/sources/tech/awk/Part3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md new file mode 100644 index 0000000000..f6aeb69e57 --- /dev/null +++ b/sources/tech/awk/Part3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md @@ -0,0 +1,83 @@ +How to Use Awk to Filter Text or Strings Using Pattern Specific Actions +========================================================================= + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Filter-Text-or-Strings-Using-Pattern.png) + +In the third part of the Awk command series, we shall take a look at filtering text or strings based on specific patterns that a user can define. + +Sometimes, when filtering text, you want to indicate certain lines from an input file or lines of strings based on a given condition or using a specific pattern that can be matched. Doing this with Awk is very easy, it is one of the great features of Awk that you will find helpful. + +Let us take a look at an example below, say you have a shopping list for food items that you want to buy, called food_prices.list. It has the following list of food items and their prices. + +``` +$ cat food_prices.list +No Item_Name Quantity Price +1 Mangoes 10 $2.45 +2 Apples 20 $1.50 +3 Bananas 5 $0.90 +4 Pineapples 10 $3.46 +5 Oranges 10 $0.78 +6 Tomatoes 5 $0.55 +7 Onions 5 $0.45 +``` + +And then, you want to indicate a `(*)` sign on food items whose price is greater than $2, this can be done by running the following command: + +``` +$ awk '/ *\$[2-9]\.[0-9][0-9] */ { print $1, $2, $3, $4, "*" ; } / *\$[0-1]\.[0-9][0-9] */ { print ; }' food_prices.list +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Text-Using-Awk.gif) +>Print Items Whose Price is Greater Than $2 + +From the output above, you can see that the there is a `(*)` sign at the end of the lines having food items, mangoes and pineapples. If you check their prices, they are above $2. + +In this example, we have used used two patterns: + +- the first: `/ *\$[2-9]\.[0-9][0-9] */` gets the lines that have food item price greater than $2 and +- the second: `/*\$[0-1]\.[0-9][0-9] */` looks for lines with food item price less than $2. + +This is what happens, there are four fields in the file, when pattern one encounters a line with food item price greater than $2, it prints all the four fields and a `(*)` sign at the end of the line as a flag. + +The second pattern simply prints the other lines with food price less than $2 as they appear in the input file, food_prices.list. + +This way you can use pattern specific actions to filter out food items that are priced above $2, though there is a problem with the output, the lines that have the `(*)` sign are not formatted out like the rest of the lines making the output not clear enough. + +We saw the same problem in Part 2 of the awk series, but we can solve it in two ways: + +1. Using printf command which is a long and boring way using the command below: + +``` +$ awk '/ *\$[2-9]\.[0-9][0-9] */ { printf "%-10s %-10s %-10s %-10s\n", $1, $2, $3, $4 "*" ; } / *\$[0-1]\.[0-9][0-9] */ { printf "%-10s %-10s %-10s %-10s\n", $1, $2, $3, $4; }' food_prices.list +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Items-Using-Awk-and-Printf.gif) +>Filter and Print Items Using Awk and Printf + +2. Using $0 field. Awk uses the variable 0 to store the whole input line. This is handy for solving the problem above and it is simple and fast as follows: + +``` +$ awk '/ *\$[2-9]\.[0-9][0-9] */ { print $0 "*" ; } / *\$[0-1]\.[0-9][0-9] */ { print ; }' food_prices.list +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Items-Using-Awk-and-Variable.gif) +>Filter and Print Items Using Awk and Variable + +Conclusion +That’s it for now and these are simple ways of filtering text using pattern specific action that can help in flagging lines of text or strings in a file using Awk command. + +Hope you find this article helpful and remember to read the next part of the series which will focus on using comparison operators using awk tool. + + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/awk-filter-text-or-string-using-patterns/ + +作者:[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/ + From fcdc1f812af8bad263e3a3494366d29b46071e8a Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 22:04:34 +0800 Subject: [PATCH 1629/1710] =?UTF-8?q?20160627-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加配图 --- ...and Regular Expressions to Filter Text or String in Files.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md b/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md index f254098f14..27aee1c0c7 100644 --- a/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md +++ b/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md @@ -1,6 +1,8 @@ How to Use Awk and Regular Expressions to Filter Text or String in Files ============================================================================= +![](http://www.tecmint.com/wp-content/uploads/2016/04/Linux-Awk-Command-Examples.png) + When we run certain commands in Unix/Linux to read or edit text from a string or file, we most times try to filter output to a given section of interest. This is where using regular expressions comes in handy. ### What are Regular Expressions? From f58a7b7109df6f0a393543199966e558c61f5a2c Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 22:09:30 +0800 Subject: [PATCH 1630/1710] =?UTF-8?q?20160627-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Comparison Operators with Awk in Linux.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md diff --git a/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md b/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md new file mode 100644 index 0000000000..7f3a46360f --- /dev/null +++ b/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md @@ -0,0 +1,95 @@ +How to Use Comparison Operators with Awk in Linux +=================================================== + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Use-Comparison-Operators-with-AWK.png) + +When dealing with numerical or string values in a line of text, filtering text or strings using comparison operators comes in handy for Awk command users. + +In this part of the Awk series, we shall take a look at how you can filter text or strings using comparison operators. If you are a programmer then you must already be familiar with comparison operators but those who are not, let me explain in the section below. + +### What are Comparison operators in Awk? + +Comparison operators in Awk are used to compare the value of numbers or strings and they include the following: + +- `>` – greater than +- `<` – less than +- `>=` – greater than or equal to +- `<=` – less than or equal to +- `==` – equal to +- `!=` – not equal to +- `some_value ~ / pattern/` – true if some_value matches pattern +- `some_value !~ / pattern/` – true if some_value does not match pattern + +Now that we have looked at the various comparison operators in Awk, let us understand them better using an example. + +In this example, we have a file named food_list.txt which is a shopping list for different food items and I would like to flag food items whose quantity is less than or equal 20 by adding `(**)` at the end of each line. + +``` +File – food_list.txt +No Item_Name Quantity Price +1 Mangoes 45 $3.45 +2 Apples 25 $2.45 +3 Pineapples 5 $4.45 +4 Tomatoes 25 $3.45 +5 Onions 15 $1.45 +6 Bananas 30 $3.45 +``` + +The general syntax for using comparison operators in Awk is: + +``` +# expression { actions; } +``` + +To achieve the above goal, I will have to run the command below: + +``` +# awk '$3 <= 30 { printf "%s\t%s\n", $0,"**" ; } $3 > 30 { print $0 ;}' food_list.txt + +No Item_Name` Quantity Price +1 Mangoes 45 $3.45 +2 Apples 25 $2.45 ** +3 Pineapples 5 $4.45 ** +4 Tomatoes 25 $3.45 ** +5 Onions 15 $1.45 ** +6 Bananas 30 $3.45 ** +``` + +In the above example, there are two important things that happen: + +- The first expression `{ action ; }` combination, `$3 <= 30 { printf “%s\t%s\n”, $0,”**” ; }` prints out lines with quantity less than or equal to 30 and adds a `(**)` at the end of each line. The value of quantity is accessed using `$3` field variable. +- The second expression `{ action ; }` combination, `$3 > 30 { print $0 ;}` prints out lines unchanged since their quantity is greater then `30`. + +One more example: + +``` +# awk '$3 <= 20 { printf "%s\t%s\n", $0,"TRUE" ; } $3 > 20 { print $0 ;} ' food_list.txt + +No Item_Name Quantity Price +1 Mangoes 45 $3.45 +2 Apples 25 $2.45 +3 Pineapples 5 $4.45 TRUE +4 Tomatoes 25 $3.45 +5 Onions 15 $1.45 TRUE +6 Bananas 30 $3.45 +``` + +In this example, we want to indicate lines with quantity less or equal to 20 with the word (TRUE) at the end. + +### Summary + +This is an introductory tutorial to comparison operators in Awk, therefore you need to try out many other options and discover more. + +In case of any problems you face or any additions that you have in mind, then drop a comment in the comment section below. Remember to read the next part of the Awk series where I will take you through compound expressions. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/comparison-operators-in-awk/ + +作者:[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/ From a5ea2893858516b49edb3dd19194051df737522f Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 22:13:37 +0800 Subject: [PATCH 1631/1710] =?UTF-8?q?20160627-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Compound Expressions with Awk in Linux.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md diff --git a/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md b/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md new file mode 100644 index 0000000000..f709dca1d7 --- /dev/null +++ b/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md @@ -0,0 +1,79 @@ +How to Use Compound Expressions with Awk in Linux +==================================================== + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Use-Compound-Expressions-with-Awk.png) + +All along, we have been looking at simple expressions when checking whether a condition has been meet or not. What if you want to use more then one expression to check for a particular condition in? + +In this article, we shall take a look at the how you can combine multiple expressions referred to as compound expressions to check for a condition when filtering text or strings. + +In Awk, compound expressions are built using the `&&` referred to as `(and)` and the `||` referred to as `(or)` compound operators. + +The general syntax for compound expressions is: + +``` +( first_expression ) && ( second_expression ) +``` + +Here, `first_expression` and `second_expression` must be true to make the whole expression true. + +``` +( first_expression ) || ( second_expression) +``` + +Here, one of the expressions either `first_expression` or `second_expression` must be true for the whole expression to be true. + +**Caution**: Remember to always include the parenthesis. + +The expressions can be built using the comparison operators that we looked at in Part 4 of the awk series. + +Let us now get a clear understanding using an example below: + +In this example, a have a text file named `tecmint_deals.txt`, which contains a list of some amazing random Tecmint deals, it includes the name of the deal, the price and type. + +``` +TecMint Deal List +No Name Price Type +1 Mac_OS_X_Cleanup_Suite $9.99 Software +2 Basics_Notebook $14.99 Lifestyle +3 Tactical_Pen $25.99 Lifestyle +4 Scapple $19.00 Unknown +5 Nano_Tool_Pack $11.99 Unknown +6 Ditto_Bluetooth_Altering_Device $33.00 Tech +7 Nano_Prowler_Mini_Drone $36.99 Tech +``` + +Say that we want only print and flag deals that are above $20 and of type “Tech” using the (**) sign at the end of each line. + +We shall need to run the command below. + +``` +# awk '($3 ~ /^\$[2-9][0-9]*\.[0-9][0-9]$/) && ($4=="Tech") { printf "%s\t%s\n",$0,"*"; } ' tecmint_deals.txt + +6 Ditto_Bluetooth_Altering_Device $33.00 Tech * +7 Nano_Prowler_Mini_Drone $36.99 Tech * +``` + +In this example, we have used two expressions in a compound expression: + +- First expression, `($3 ~ /^\$[2-9][0-9]*\.[0-9][0-9]$/)` ; checks the for lines with deals with price above `$20`, and it is only true if the value of $3 which is the price matches the pattern `/^\$[2-9][0-9]*\.[0-9][0-9]$/` +- And the second expression, `($4 == “Tech”)` ; checks whether the deal is of type “`Tech`” and it is only true if the value of `$4` equals to “`Tech`”. +Remember, a line will only be flagged with the `(**)`, if first expression and second expression are true as states the principle of the `&&` operator. + +### Summary + +Some conditions always require building compound expressions for you to match exactly what you want. When you understand the use of comparison and compound expression operators then, filtering text or strings based on some difficult conditions will become easy. + +Hope you find this guide useful and for any questions or additions, always remember to leave a comment and your concern will be solved accordingly. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/combine-multiple-expressions-in-awk/ + +作者:[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/ From e60381a49526a39d3d1fad177c023a8c83a943f9 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 22:18:11 +0800 Subject: [PATCH 1632/1710] =?UTF-8?q?20160627-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to Use ‘next’ Command with Awk in Linux.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md diff --git a/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md b/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md new file mode 100644 index 0000000000..f272dabcce --- /dev/null +++ b/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md @@ -0,0 +1,76 @@ +How to Use ‘next’ Command with Awk in Linux +============================================= + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Use-next-Command-with-Awk-in-Linux.png) + +In this sixth part of Awk series, we shall look at using `next` command, which tells Awk to skip all remaining patterns and expressions that you have provided, but instead read the next input line. + +The `next` command helps you to prevent executing what I would refer to as time-wasting steps in a command execution. + +To understand how it works, let us consider a file called food_list.txt that looks like this: + +``` +Food List Items +No Item_Name Price Quantity +1 Mangoes $3.45 5 +2 Apples $2.45 25 +3 Pineapples $4.45 55 +4 Tomatoes $3.45 25 +5 Onions $1.45 15 +6 Bananas $3.45 30 +``` + +Consider running the following command that will flag food items whose quantity is less than or equal to 20 with a `(*)` sign at the end of each line: + +``` +# awk '$4 <= 20 { printf "%s\t%s\n", $0,"*" ; } $4 > 20 { print $0 ;} ' food_list.txt + +No Item_Name Price Quantity +1 Mangoes $3.45 5 * +2 Apples $2.45 25 +3 Pineapples $4.45 55 +4 Tomatoes $3.45 25 +5 Onions $1.45 15 * +6 Bananas $3.45 30 +``` + +The command above actually works as follows: + +- First, it checks whether the quantity, fourth field of each input line is less than or equal to 20, if a value meets that condition, it is printed and flagged with the `(*)` sign at the end using expression one: `$4 <= 20` +- Secondly, it checks if the fourth field of each input line is greater than 20, and if a line meets the condition it gets printed using expression two: `$4 > 20` + +But there is one problem here, when the first expression is executed, a line that we want to flag is printed using: `{ printf "%s\t%s\n", $0,"**" ; }` and then in the same step, the second expression is also checked which becomes a time wasting factor. + +So there is no need to execute the second expression, `$4 > 20` again after printing already flagged lines that have been printed using the first expression. + +To deal with this problem, you have to use the `next` command as follows: + +``` +# awk '$4 <= 20 { printf "%s\t%s\n", $0,"*" ; next; } $4 > 20 { print $0 ;} ' food_list.txt + +No Item_Name Price Quantity +1 Mangoes $3.45 5 * +2 Apples $2.45 25 +3 Pineapples $4.45 55 +4 Tomatoes $3.45 25 +5 Onions $1.45 15 * +6 Bananas $3.45 30 +``` + +After a single input line is printed using `$4 <= 20` `{ printf "%s\t%s\n", $0,"*" ; next ; }`, the `next` command included will help skip the second expression `$4 > 20` `{ print $0 ;}`, so execution goes to the next input line without having to waste time on checking whether the quantity is greater than 20. + +The next command is very important is writing efficient commands and where necessary, you can always use to speed up the execution of a script. Prepare for the next part of the series where we shall look at using standard input (STDIN) as input for Awk. + +Hope you find this how to guide helpful and you can as always put your thoughts in writing by leaving a comment in the comment section below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/use-next-command-with-awk-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/ From 6f06fbb32b1fd3d2db0024adff7936f3b3fdae03 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 22:22:45 +0800 Subject: [PATCH 1633/1710] =?UTF-8?q?20160627-7=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...w to Read Awk Input from STDIN in Linux.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md diff --git a/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md b/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md new file mode 100644 index 0000000000..5bcd4bc26c --- /dev/null +++ b/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md @@ -0,0 +1,70 @@ +How to Read Awk Input from STDIN in Linux +============================================ + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Read-Awk-Input-from-STDIN.png) + +In the previous parts of the Awk tool series, we looked at reading input mostly from a file(s), but what if you want to read input from STDIN. +In this Part 7 of Awk series, we shall look at few examples where you can filter the output of other commands instead of reading input from a file. + +We shall start with the [dir utility][1] that works similar to [ls command][2], in the first example below, we use the output of `dir -l` command as input for Awk to print owner’s username, groupname and the files he/she owns in the current directory: + +``` +# dir -l | awk '{print $3, $4, $9;}' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/List-Files-Owned-By-User-in-Directory.png) +>List Files Owned By User in Directory + +Take a look at another example where we [employ awk expressions][3], here, we want to print files owned by the root user by using an expression to filter strings as in the awk command below: + +``` +# dir -l | awk '$3=="root" {print $1,$3,$4, $9;} ' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/List-Files-Owned-by-Root-User.png) +>List Files Owned by Root User + +The command above includes the `(==)` comparison operator to help us filter out files in the current directory which are owned by the root user. This is achieved using the expression `$3==”root”`. + +Let us look at another example of where we use a [awk comparison operator][4] to match a certain string. + +Here, we have used the [cat utility][5] to view the contents of a file named tecmint_deals.txt and we want to view the deals of type Tech only, so we shall run the following commands: + +``` +# cat tecmint_deals.txt +# cat tecmint_deals.txt | awk '$4 ~ /tech/{print}' +# cat tecmint_deals.txt | awk '$4 ~ /Tech/{print}' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Use-Comparison-Operator-to-Match-String.png) +>Use Awk Comparison Operator to Match String + +In the example above, we have used the value `~ /pattern/` comparison operator, but there are two commands to try and bring out something very important. + +When you run the command with pattern tech nothing is printed out because there is no deal of that type, but with Tech, you get deals of type Tech. + +So always be careful when using this comparison operator, it is case sensitive as we have seen above. + +You can always use the output of another command instead as input for awk instead of reading input from a file, this is very simple as we have looked at in the examples above. + +Hope the examples were clear enough for you to understand, if you have any concerns, you can express them through the comment section below and remember to check the next part of the series where we shall look at awk features such as variables, numeric expressions and assignment operators. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/read-awk-input-from-stdin-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/linux-dir-command-usage-with-examples/ +[2]: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[3]: http://www.tecmint.com/combine-multiple-expressions-in-awk +[4]: http://www.tecmint.com/comparison-operators-in-awk +[5]: http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ + + + From ad29066aa4552701962a163adf795af6b00db1a8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 27 Jun 2016 22:23:41 +0800 Subject: [PATCH 1634/1710] =?UTF-8?q?20160627-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新标题 --- ...k to Filter Text or Strings Using Pattern Specific Actions.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/awk/{Part3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md => Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md} (100%) diff --git a/sources/tech/awk/Part3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md b/sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md similarity index 100% rename from sources/tech/awk/Part3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md rename to sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md From 33f967bc7460efa92457f9808f5a9380b3d55669 Mon Sep 17 00:00:00 2001 From: wwy Date: Mon, 27 Jun 2016 22:59:11 +0800 Subject: [PATCH 1635/1710] [Translating] How to Use Awk and Regular Expressions to Filter Text or String in Files --- ...and Regular Expressions to Filter Text or String in Files.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md b/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md index 27aee1c0c7..6871673536 100644 --- a/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md +++ b/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md @@ -1,3 +1,5 @@ +translating by wwy-hust + How to Use Awk and Regular Expressions to Filter Text or String in Files ============================================================================= From ab1197b3e407a863546a0191c52d1e543657b8db Mon Sep 17 00:00:00 2001 From: "Cathon.ZHD" Date: Mon, 27 Jun 2016 23:00:26 +0800 Subject: [PATCH 1636/1710] Cathon is translating awk part 2 --- ...art 2 - How to Use Awk to Print Fields and Columns in File.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md b/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md index f4f38d727e..50212c7931 100644 --- a/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md +++ b/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md @@ -1,3 +1,4 @@ +[Cathon is translating] How to Use Awk to Print Fields and Columns in File ====================================================== From dc12db48abf2bd859c86071cdeefdea94c45fd5e Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Mon, 27 Jun 2016 23:00:44 +0800 Subject: [PATCH 1637/1710] vim-kakali translating --- .../awk/Part 7 - How to Read Awk Input from STDIN in Linux.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md b/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md index 5bcd4bc26c..157716481a 100644 --- a/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md +++ b/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md @@ -1,3 +1,6 @@ +vim-kakali translating + + How to Read Awk Input from STDIN in Linux ============================================ From 3f20f559fdd8d2064995cfd1e2748a80fee9065b Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 27 Jun 2016 23:06:15 +0800 Subject: [PATCH 1638/1710] [translating]How to permanently mount a Windows share on Linux --- ...0160624 How to permanently mount a Windows share on Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160624 How to permanently mount a Windows share on Linux.md b/sources/tech/20160624 How to permanently mount a Windows share on Linux.md index 015bf5f231..30b2cf71f8 100644 --- a/sources/tech/20160624 How to permanently mount a Windows share on Linux.md +++ b/sources/tech/20160624 How to permanently mount a Windows share on Linux.md @@ -1,3 +1,5 @@ +alim0x translating + How to permanently mount a Windows share on Linux ================================================== From 873d1c5130554484d911b2c064f2aa2658ca4390 Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 27 Jun 2016 10:21:52 -0500 Subject: [PATCH 1639/1710] translating (#4108) --- ...art 5 - How to Use Compound Expressions with Awk in Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md b/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md index f709dca1d7..db9a863484 100644 --- a/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md +++ b/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md @@ -1,3 +1,5 @@ +martin + How to Use Compound Expressions with Awk in Linux ==================================================== From 998669fea344356d03cdbb27dcf46bf0b483ec90 Mon Sep 17 00:00:00 2001 From: Dongliang Mu Date: Mon, 27 Jun 2016 18:06:42 -0400 Subject: [PATCH 1640/1710] Update 20160218 What do Linux developers think of Git and GitHub.md --- ...20160218 What do Linux developers think of Git and GitHub.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md index 9002025820..c0de7f4e6a 100644 --- a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md +++ b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md @@ -1,3 +1,5 @@ +translated by mudongliang + What do Linux developers think of Git and GitHub? ===================================================== From b06ad99c39b63fa30b29708f0c70953ee63f9c26 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Mon, 27 Jun 2016 20:08:19 -0500 Subject: [PATCH 1641/1710] Update 20160516 Linux will be the major operating system of 21st century cars.md (#4109) [Translating] Linux will be the major operating system of 21st century cars --- ...ux will be the major operating system of 21st century cars.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20160516 Linux will be the major operating system of 21st century cars.md b/sources/talk/20160516 Linux will be the major operating system of 21st century cars.md index ec7a33aaa6..dbde68bda8 100644 --- a/sources/talk/20160516 Linux will be the major operating system of 21st century cars.md +++ b/sources/talk/20160516 Linux will be the major operating system of 21st century cars.md @@ -1,3 +1,4 @@ +KevinSJ Translating Linux will be the major operating system of 21st century cars =============================================================== From b9f9bcd95662ccd1fba2933ccced6203ef33536d Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 28 Jun 2016 10:03:07 +0800 Subject: [PATCH 1642/1710] =?UTF-8?q?20160628-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng is a File” and Types of Files in Linux.md | 275 ++++++++++++++++++ 1 file changed, 275 insertions(+) create mode 100644 sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md diff --git a/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md b/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md new file mode 100644 index 0000000000..3198183667 --- /dev/null +++ b/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md @@ -0,0 +1,275 @@ +Explanation of “Everything is a File” and Types of Files in Linux +==================================================================== + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Everything-is-a-File-in-Linux.png) +>Everything is a File and Types of Files in Linux + +That is in fact true although it is just a generalization concept, in Unix and its derivatives such as Linux, everything is considered as a file. If something is not a file, then it must be running as a process on the system. + +To understand this, take for example the amount of space on your root (/) directory is always consumed by different types of Linux files. When you create a file or transfer a file to your system, it occupies some space on the physical disk and it is considered to be in a specific format (file type). + +And also the Linux system does not differentiate between files and directories, but directories do one important job, that is store other files in groups in a hierarchy for easy location. All your hardware components are represented as files and the system communicates with them using these files. + +The idea is an important description of a great property of Linux, where input/output resources such as your documents, directories (folders in Mac OS X and Windows), keyboard, monitor, hard-drives, removable media, printers, modems, virtual terminals and also inter-process and network communication are streams of bytes defined by file system space. + +A notable advantage of everything being a file is that the same set of Linux tools, utilities and APIs can be used on the above input/output resources. + +Although everything in Linux is a file, there are certain special files that are more than just a file for example [sockets and named pipes][1]. + +### What are the different types of files in Linux? + +In Linux there are basically three types of files: + +- Ordinary/Regular files +- Special files +- Directories + +#### Ordinary/Regular Files + +These are files data contain text, data or program instructions and they are the most common type of files you can expect to find on a Linux system and they include: + +- Readable files +- Binary files +- Image files +- Compressed files and so on. + +#### Special Files + +Special files include the following: + +Block files : These are device files that provide buffered access to system hardware components. They provide a method of communication with device drivers through the file system. + +One important aspect about block files is that they can transfer a large block of data and information at a given time. + +Listing block files sockets in a directory: + +``` +# ls -l /dev | grep "^b" +``` + +Sample Output + +``` +brw-rw---- 1 root disk 7, 0 May 18 10:26 loop0 +brw-rw---- 1 root disk 7, 1 May 18 10:26 loop1 +brw-rw---- 1 root disk 7, 2 May 18 10:26 loop2 +brw-rw---- 1 root disk 7, 3 May 18 10:26 loop3 +brw-rw---- 1 root disk 7, 4 May 18 10:26 loop4 +brw-rw---- 1 root disk 7, 5 May 18 10:26 loop5 +brw-rw---- 1 root disk 7, 6 May 18 10:26 loop6 +brw-rw---- 1 root disk 7, 7 May 18 10:26 loop7 +brw-rw---- 1 root disk 1, 0 May 18 10:26 ram0 +brw-rw---- 1 root disk 1, 1 May 18 10:26 ram1 +brw-rw---- 1 root disk 1, 10 May 18 10:26 ram10 +brw-rw---- 1 root disk 1, 11 May 18 10:26 ram11 +brw-rw---- 1 root disk 1, 12 May 18 10:26 ram12 +brw-rw---- 1 root disk 1, 13 May 18 10:26 ram13 +brw-rw---- 1 root disk 1, 14 May 18 10:26 ram14 +brw-rw---- 1 root disk 1, 15 May 18 10:26 ram15 +brw-rw---- 1 root disk 1, 2 May 18 10:26 ram2 +brw-rw---- 1 root disk 1, 3 May 18 10:26 ram3 +brw-rw---- 1 root disk 1, 4 May 18 10:26 ram4 +brw-rw---- 1 root disk 1, 5 May 18 10:26 ram5 +... +``` + +Character files : These are also device files that provide unbuffered serial access to system hardware components. They work by providing a way of communication with devices by transferring data one character at a time. + +Listing character files sockets in a directory: + +``` +# ls -l /dev | grep "^c" +``` + +Sample Output + +``` +crw------- 1 root root 10, 235 May 18 15:54 autofs +crw------- 1 root root 10, 234 May 18 15:54 btrfs-control +crw------- 1 root root 5, 1 May 18 10:26 console +crw------- 1 root root 10, 60 May 18 10:26 cpu_dma_latency +crw------- 1 root root 10, 203 May 18 15:54 cuse +crw------- 1 root root 10, 61 May 18 10:26 ecryptfs +crw-rw---- 1 root video 29, 0 May 18 10:26 fb0 +crw-rw-rw- 1 root root 1, 7 May 18 10:26 full +crw-rw-rw- 1 root root 10, 229 May 18 10:26 fuse +crw------- 1 root root 251, 0 May 18 10:27 hidraw0 +crw------- 1 root root 10, 228 May 18 10:26 hpet +crw-r--r-- 1 root root 1, 11 May 18 10:26 kmsg +crw-rw----+ 1 root root 10, 232 May 18 10:26 kvm +crw------- 1 root root 10, 237 May 18 10:26 loop-control +crw------- 1 root root 10, 227 May 18 10:26 mcelog +crw------- 1 root root 249, 0 May 18 10:27 media0 +crw------- 1 root root 250, 0 May 18 10:26 mei0 +crw-r----- 1 root kmem 1, 1 May 18 10:26 mem +crw------- 1 root root 10, 57 May 18 10:26 memory_bandwidth +crw------- 1 root root 10, 59 May 18 10:26 network_latency +crw------- 1 root root 10, 58 May 18 10:26 network_throughput +crw-rw-rw- 1 root root 1, 3 May 18 10:26 null +crw-r----- 1 root kmem 1, 4 May 18 10:26 port +crw------- 1 root root 108, 0 May 18 10:26 ppp +crw------- 1 root root 10, 1 May 18 10:26 psaux +crw-rw-rw- 1 root tty 5, 2 May 18 17:40 ptmx +crw-rw-rw- 1 root root 1, 8 May 18 10:26 random +``` + +Symbolic link files : A symbolic link is a reference to another file on the system. Therefore, symbolic link files are files that point to other files, and they can either be directories or regular files. + +Listing symbolic link sockets in a directory: + +``` +# ls -l /dev/ | grep "^l" +``` + +Sample Output + +``` +lrwxrwxrwx 1 root root 3 May 18 10:26 cdrom -> sr0 +lrwxrwxrwx 1 root root 11 May 18 15:54 core -> /proc/kcore +lrwxrwxrwx 1 root root 13 May 18 15:54 fd -> /proc/self/fd +lrwxrwxrwx 1 root root 4 May 18 10:26 rtc -> rtc0 +lrwxrwxrwx 1 root root 8 May 18 10:26 shm -> /run/shm +lrwxrwxrwx 1 root root 15 May 18 15:54 stderr -> /proc/self/fd/2 +lrwxrwxrwx 1 root root 15 May 18 15:54 stdin -> /proc/self/fd/0 +lrwxrwxrwx 1 root root 15 May 18 15:54 stdout -> /proc/self/fd/1 +``` + +You can make symbolic links using the `ln` utility in Linux as in the example below. + +``` +# touch file1.txt +# ln -s file1.txt /home/tecmint/file1.txt [create symbolic link] +# ls -l /home/tecmint/ | grep "^l" [List symbolic links] +``` + +In the above example, I created a file called `file1.txt` in `/tmp` directory, then created the symbolic link, `/home/tecmint/file1.txt` to point to `/tmp/file1.txt`. + +Pipes or Named pipes : These are files that allow inter-process communication by connecting the output of one process to the input of another. + +A named pipe is actually a file that is used by two process to communicate with each and it acts as a Linux pipe. + +Listing pipes sockets in a directory: + +``` +# ls -l | grep "^p" +``` + +Sample Output + +``` +prw-rw-r-- 1 tecmint tecmint 0 May 18 17:47 pipe1 +prw-rw-r-- 1 tecmint tecmint 0 May 18 17:47 pipe2 +prw-rw-r-- 1 tecmint tecmint 0 May 18 17:47 pipe3 +prw-rw-r-- 1 tecmint tecmint 0 May 18 17:47 pipe4 +prw-rw-r-- 1 tecmint tecmint 0 May 18 17:47 pipe5 +``` + +You can use the mkfifo utility to create a named pipe in Linux as follows. + +``` +# mkfifo pipe1 +# echo "This is named pipe1" > pipe1 +``` + +In the above example, I created a named pipe called pipe1, then I passed some data to it using the [echo command][2], after that the shell became un-interactive while processing the input. + +Then I opened another shell and run the another command to print out what was passed to pipe. + +``` +# while read line ;do echo "This was passed-'$line' "; done Date: Tue, 28 Jun 2016 10:19:57 +0800 Subject: [PATCH 1643/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20ru?= =?UTF-8?q?nningwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...on of “Everything is a File” and Types of Files in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md b/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md index 3198183667..e1c3ee4661 100644 --- a/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md +++ b/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) Explanation of “Everything is a File” and Types of Files in Linux ==================================================================== @@ -265,7 +266,7 @@ You can add more to this by reading more about the individual file types and the via: http://www.tecmint.com/explanation-of-everything-is-a-file-and-types-of-files-in-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 作者:[Aaron Kili][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 3ed2496be424e0d0dd449bce37e9e705dd16506e Mon Sep 17 00:00:00 2001 From: "Cathon.ZHD" Date: Tue, 28 Jun 2016 11:39:49 +0800 Subject: [PATCH 1644/1710] translated --- ...Awk to Print Fields and Columns in File.md | 107 ------------------ ...Awk to Print Fields and Columns in File.md | 106 +++++++++++++++++ 2 files changed, 106 insertions(+), 107 deletions(-) delete mode 100644 sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md create mode 100644 translated/tech/Part 2 - How to Use Awk to Print Fields and Columns in File.md diff --git a/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md b/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md deleted file mode 100644 index 50212c7931..0000000000 --- a/sources/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md +++ /dev/null @@ -1,107 +0,0 @@ -[Cathon is translating] -How to Use Awk to Print Fields and Columns in File -====================================================== - -In this part of our Linux Awk command series, we shall have a look at one of the most important features of Awk, which is field editing. - -It is good to know that Awk automatically divides input lines provided to it into fields, and a field can be defined as a set of characters that are separated from other fields by an internal field separator. - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Awk-Print-Fields-and-Columns.png) ->Awk Print Fields and Columns - -If you are familiar with the Unix/Linux or do [bash shell programming][1], then you should know what internal field separator (IFS) variable is. The default IFS in Awk are tab and space. - -This is how the idea of field separation works in Awk: when it encounters an input line, according to the IFS defined, the first set of characters is field one, which is accessed using $1, the second set of characters is field two, which is accessed using $2, the third set of characters is field three, which is accessed using $3 and so forth till the last set of character(s). - -To understand this Awk field editing better, let us take a look at the examples below: - -**Example 1**: I have created a text file called tecmintinfo.txt. - -``` -# vi tecmintinfo.txt -# cat tecmintinfo.txt -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Create-File-in-Linux.png) ->Create File in Linux - -Then from the command line, I try to print the first, second and third fields from the file tecmintinfo.txt using the command below: - -``` -$ awk '//{print $1 $2 $3 }' tecmintinfo.txt -TecMint.comisthe -``` - -From the output above, you can see that the characters from the first three fields are printed based on the IFS defined which is space: - -- Field one which is “TecMint.com” is accessed using `$1`. -- Field two which is “is” is accessed using `$2`. -- Field three which is “the” is accessed using `$3`. - -If you have noticed in the printed output, the field values are not separated and this is how print behaves by default. - -To view the output clearly with space between the field values, you need to add (,) operator as follows: - -``` -$ awk '//{print $1, $2, $3; }' tecmintinfo.txt - -TecMint.com is the -``` - -One important thing to note and always remember is that the use of `($)` in Awk is different from its use in shell scripting. - -Under shell scripting `($)` is used to access the value of variables while in Awk `($)` it is used only when accessing the contents of a field but not for accessing the value of variables. - -**Example 2**: Let us take a look at one other example using a file which contains multiple lines called my_shoping.list. - -``` -No Item_Name Unit_Price Quantity Price -1 Mouse #20,000 1 #20,000 -2 Monitor #500,000 1 #500,000 -3 RAM_Chips #150,000 2 #300,000 -4 Ethernet_Cables #30,000 4 #120,000 -``` - -Say you wanted to only print `Unit_Price` of each item on the shopping list, you will need to run the command below: - -``` -$ awk '//{print $2, $3 }' my_shopping.txt - -Item_Name Unit_Price -Mouse #20,000 -Monitor #500,000 -RAM_Chips #150,000 -Ethernet_Cables #30,000 -``` - -Awk also has a `printf` command that helps you to format your output is a nice way as you can see the above output is not clear enough. - -Using `printf` to format output of the Item_Name and Unit_Price: - -``` -$ awk '//{printf "%-10s %s\n",$2, $3 }' my_shopping.txt - -Item_Name Unit_Price -Mouse #20,000 -Monitor #500,000 -RAM_Chips #150,000 -Ethernet_Cables #30,000 -``` - -### Summary -Field editing is very important when using Awk to filter text or strings, it helps you get particular data in columns in a list. And always remember that the use of `($)` operator in Awk is different from that in shell scripting. - -I hope the article was helpful to you and for any additional information required or questions, you can post a comment in the comment section. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/awk-print-fields-columns-with-space-separator/ - -作者:[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/category/bash-shell/ diff --git a/translated/tech/Part 2 - How to Use Awk to Print Fields and Columns in File.md b/translated/tech/Part 2 - How to Use Awk to Print Fields and Columns in File.md new file mode 100644 index 0000000000..c0b526b925 --- /dev/null +++ b/translated/tech/Part 2 - How to Use Awk to Print Fields and Columns in File.md @@ -0,0 +1,106 @@ +如何使用 Awk 输出文本中的字段和列 +====================================================== + +在 Awk 系列的这一节中,我们将看到 Awk 最重要的特性之一,字段编辑。 + +需要知道的是,Awk 能够自动将输入的行,分隔为若干字段。每一个字段就是一组字符,它们和其他的字段由一个内部字段分隔符分隔开来。 + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Awk-Print-Fields-and-Columns.png) +>Awk Print Fields and Columns + +如果你熟悉 Unix/Linux 或者使用 [bash 脚本][1]编过程,那么你应该知道什么是内部字段分隔符(IFS)变量。Awk 中默认的 IFS 是制表符和空格。 + +Awk 中的字段分隔符的工作流程如下:当读到一行输入时,将它按照指定的 IFS 分割为不同字段,第一组字符就是字段一,可以通过 $1 来访问,第二组字符就是字段二,可以通过 $2 来访问,第三组字符就是字段三,可以通过 $3 来访问,以此类推,直到最后一组字符。 + +为了更好地理解 Awk 的字段编辑,让我们看一个下面的例子: + +**例 1**:我创建了一个名为 tecmintinfo.txt 的文本文件。 + +``` +# vi tecmintinfo.txt +# cat tecmintinfo.txt +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Create-File-in-Linux.png) +>在 Linux 上创建一个文件 + +然后在命令行中,我试着使用下面的命令从文本 tecmintinfo.txt 中输出第一个,第二个,以及第三个字段。 + +``` +$ awk '//{print $1 $2 $3 }' tecmintinfo.txt +TecMint.comisthe +``` + +从上面的输出中你可以看到,前三个字段的字符是以空格为分隔符输出的: + +- 字段一是 “TecMint.com”,可以通过 `$1` 来访问。 +- 字段二是 “is”,可以通过 `$2` 来访问。 +- 字段三是 “the”,可以通过 `$3` 来访问。 + +如果你注意观察输出的话可以发现,输出的字段值并没有被分隔开,这是 print 函数默认的行为。 + +为了使输出看得更清楚,输出的字段值之间使用空格分开,你需要添加 (,) 操作符。 + +``` +$ awk '//{print $1, $2, $3; }' tecmintinfo.txt + +TecMint.com is the +``` + +需要记住而且非常重要的是,`($)` 在 Awk 和在 shell 脚本中的使用是截然不同的! + +在 shell 脚本中,`($)` 被用来获取变量的值。而在 Awk 中,`($)` 只有在获取字段的值时才会用到,不能用于获取变量的值。 + +**例 2**:让我们再看一个例子,用到了一个名为 my_shoping.list 的包含多行的文件。 +``` +No Item_Name Unit_Price Quantity Price +1 Mouse #20,000 1 #20,000 +2 Monitor #500,000 1 #500,000 +3 RAM_Chips #150,000 2 #300,000 +4 Ethernet_Cables #30,000 4 #120,000 +``` + +如果你只想输出购物清单上每一个物品的`单价`,你只需运行下面的命令: + +``` +$ awk '//{print $2, $3 }' my_shopping.txt + +Item_Name Unit_Price +Mouse #20,000 +Monitor #500,000 +RAM_Chips #150,000 +Ethernet_Cables #30,000 +``` + +可以看到上面的输出不够清晰,Awk 还有一个 `printf` 的命令,可以帮助你将输出格式化。 + +使用 `printf` 来格式化 Item_Name 和 Unit_Price 的输出: + +``` +$ awk '//{printf "%-10s %s\n",$2, $3 }' my_shopping.txt + +Item_Name Unit_Price +Mouse #20,000 +Monitor #500,000 +RAM_Chips #150,000 +Ethernet_Cables #30,000 +``` + +### 总结 + +使用 Awk 过滤文本或字符串时,字段编辑的功能是非常重要的。它能够帮助你从一个表的数据中得到特定的列。一定要记住的是,Awk 中 `($)` 操作符的用法与其在 shell 脚本中的用法是不同的! + +希望这篇文章对您有所帮助。如有任何疑问,可以在评论区域发表评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/awk-print-fields-columns-with-space-separator/ + +作者:[Aaron Kili][a] +译者:[Cathon](https://github.com/Cathon) +校对:[校对者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/category/bash-shell/ From 79fe28f60e4d1674de25b82d1c7e0b0eeb7b49f5 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 28 Jun 2016 13:09:03 +0800 Subject: [PATCH 1645/1710] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0awk?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Part 2 - How to Use Awk to Print Fields and Columns in File.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{ => awk}/Part 2 - How to Use Awk to Print Fields and Columns in File.md (100%) diff --git a/translated/tech/Part 2 - How to Use Awk to Print Fields and Columns in File.md b/translated/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md similarity index 100% rename from translated/tech/Part 2 - How to Use Awk to Print Fields and Columns in File.md rename to translated/tech/awk/Part 2 - How to Use Awk to Print Fields and Columns in File.md From 7c97b53cf24884a53f7c0e74aa3aa49a7f07c12e Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Tue, 28 Jun 2016 13:33:53 +0800 Subject: [PATCH 1646/1710] translating by wi-cuckoo --- ...ol Flow and Loops to Write and Tune Shell Scripts – Part 2.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md b/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md index bcce4c143e..6a65df8d49 100644 --- a/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md +++ b/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md @@ -1,3 +1,4 @@ +translating by wi-cuckoo Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2 =============================================================================== From f9c2c5705cbc4a73b9daa01ca7e7eea0fe7f5464 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Jun 2016 15:56:56 +0800 Subject: [PATCH 1647/1710] PUB:20160605 How to Add Cron Jobs in Linux and Unix @mr-ping @FSSlc --- ... How to Add Cron Jobs in Linux and Unix.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) rename {translated/tech => published}/20160605 How to Add Cron Jobs in Linux and Unix.md (76%) diff --git a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md b/published/20160605 How to Add Cron Jobs in Linux and Unix.md similarity index 76% rename from translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md rename to published/20160605 How to Add Cron Jobs in Linux and Unix.md index 0b5ee53439..139084225a 100644 --- a/translated/tech/20160605 How to Add Cron Jobs in Linux and Unix.md +++ b/published/20160605 How to Add Cron Jobs in Linux and Unix.md @@ -19,9 +19,9 @@ - **UNIX 或 Linux 系统的 crontab** : 此类型通常由那些需要 root 或类似权限的系统服务和重要任务使用。第六个字段(见下方的字段介绍)为用户名,用来指定此命令以哪个用户身份来执行。如此一来,系统的 `crontab` 就能够以任意用户的身份来执行操作。 -- **用户的 crontab**: 用户可以使用 `corntab` 命令来安装属于他们自己的定时任务。 第六个字段为需要运行的命令, 所有的命令都会以创建该 crontab 任务的用户的身份运行。 +- **用户的 crontab**: 用户可以使用 `crontab` 命令来安装属于他们自己的定时任务。 第六个字段为需要运行的命令, 所有的命令都会以创建该 crontab 任务的用户的身份运行。 -**注意**: 这种问答形式的 `Cron` 实现由 Paul Vixie 所写,并且被包含在许多 [Linux][2] 发行版本和类 Unix 系统(如广受欢迎的第四版 BSD)中。它的语法被各种 crond 的实现所[兼容][3]。 +**注意**: 这种问答形式的 `Cron` 实现由 Paul Vixie 所编写,并且被包含在许多 [Linux][2] 发行版本和类 Unix 系统(如广受欢迎的第四版 BSD)中。它的语法被各种 crond 的实现所[兼容][3]。 那么我该如何安装、创建或者编辑我自己的定时任务呢? @@ -47,24 +47,24 @@ $ crontab -e 其中: -- 1: 分钟 (0-59) -- 2: 小时 (0-23) -- 3: 日期 (0-31) -- 4: 月份 (0-12 [12 代表 December]) -- 5: 一周当中的某天 (0-7 [7 或 0 代表星期天]) -- /path/to/command – 计划执行的脚本或命令的名称 +- 第1个字段:分钟 (0-59) +- 第2个字段:小时 (0-23) +- 第3个字段:日期 (0-31) +- 第4个字段:月份 (0-12 [12 代表 December]) +- 第5个字段:一周当中的某天 (0-7 [7 或 0 代表星期天]) +- /path/to/command - 计划执行的脚本或命令的名称 便于记忆的格式: ``` * * * * * 要执行的命令 -– – – – – +---------------- | | | | | -| | | | —– 一周当中的某天 (0 – 7) (周日为 0 或 7) -| | | ——- 月份 (1 – 12) -| | ——— 一月当中的某天 (1 – 31) -| ———– 小时 (0 – 23) -————- 分钟 (0 – 59) +| | | | ---- 周当中的某天 (0 - 7) (周日为 0 或 7) +| | | ------ 月份 (1 - 12) +| | -------- 一月当中的某天 (1 - 31) +| ---------- 小时 (0 - 23) +------------ 分钟 (0 - 59) ``` 简单的 `crontab` 示例: @@ -90,13 +90,13 @@ $ crontab -e - **逗号 (,)** : 这个操作符指定了一个包含多个值的列表,例如:`1,5,10,15,20,25`. -- **横杠 (–)** : 此操作符指定了一个值的范围,例如:`5-15` ,等同于使用逗号操作符键入的 `5,6,7,8,9,….,13,14,15`。 +- **横杠 (-)** : 此操作符指定了一个值的范围,例如:`5-15` ,等同于使用逗号操作符键入的 `5,6,7,8,9,...,13,14,15`。 - **分隔符 (/)** : 此操作符指定了一个步进值,例如: `0-23/` 可以用于小时字段来指定某个命令每小时被执行一次。步进值也可以跟在星号操作符后边,如果你希望命令行每 2 小时执行一次,则可以使用 `*/2`。 ### 如何禁用邮件输出 -默认情况下,某个命令或者脚本的输出内容(如果有的话)会发送到你的本地邮箱账户中。若想停止收到 `crontab` 发送的邮件,需要添加 `>/dev/null 2>&1` 这段内容,例如: +默认情况下,某个命令或者脚本的输出内容(如果有的话)会发送到你的本地邮箱账户中。若想停止收到 `crontab` 发送的邮件,需要添加 `>/dev/null 2>&1` 这段内容到执行的命令的后面,例如: ``` 0 3 * * * /root/backup.sh >/dev/null 2>&1 @@ -133,9 +133,9 @@ crontab -r crontab -r -u username ``` -### 使用特殊字符来节省时间 +### 使用特殊字符串来节省时间 -你可以使用以下 8 个特殊字符中的其中一个替代头五个字段,这样不但可以节省你的时间,还可以提高可读性。 +你可以使用以下 8 个特殊字符串中的其中一个替代头五个字段,这样不但可以节省你的时间,还可以提高可读性。 特殊字符 |含义 |:-- |:-- @@ -158,9 +158,9 @@ crontab -r -u username ### 关于 `/etc/crontab` 文件和 `/etc/cron.d/*` 目录的更多内容 -** /etc/crontab ** 是系统的 corntabs 文件。通常只被 root 用户或守护进程用于配置系统级别的任务。每个独立的用户必须像上面介绍的那样使用 `corntab` 命令来安装和编辑自己的任务。`/var/spool/cron/` 或者 `/var/cron/tabs/` 目录存放了个人用户的 corntab 文件,它必定会备份在用户的家目录当中。 +** /etc/crontab ** 是系统的 crontab 文件。通常只被 root 用户或守护进程用于配置系统级别的任务。每个独立的用户必须像上面介绍的那样使用 `crontab` 命令来安装和编辑自己的任务。`/var/spool/cron/` 或者 `/var/cron/tabs/` 目录存放了个人用户的 crontab 文件,它必定会备份在用户的家目录当中。 -### 理解默认的 `/etc/crontab` 文件 +###理解默认的 `/etc/crontab` 文件 典型的 `/etc/crontab` 文件内容是这样的: @@ -176,9 +176,9 @@ HOME=/ 42 4 1 * * root run-parts /etc/cron.monthly ``` -首先,环境变量必须被定义。如果 shell 行被忽略,corn 会使用默认的 sh shell。如果 PATH 变量被忽略,就没有默认路径会被使用,所有的文件都需要使用绝对路径来定位。如果 HOME 变量被忽略,corn 会使用调用者(用户)的家目录。 +首先,环境变量必须被定义。如果 SHELL 行被忽略,cron 会使用默认的 sh shell。如果 PATH 变量被忽略,就没有默认的搜索路径,所有的文件都需要使用绝对路径来定位。如果 HOME 变量被忽略,cron 会使用调用者(用户)的家目录替代。 -另外,corn 会读取 `/etc/cron.d/`目录中的文件。通常情况下,像 sa-update 或者 sysstat 这样的系统守护进程会将他们的定时任务存放在此处。作为 root 用户或者超级用户,你可以使用以下目录来配置你的定时任务。你可以直接将脚本放到这里。`run-parts`命令会通过 `/etc/crontab` 文件来运行位于某个目录中的脚本或者程序。 +另外,cron 会读取 `/etc/cron.d/`目录中的文件。通常情况下,像 sa-update 或者 sysstat 这样的系统守护进程会将他们的定时任务存放在此处。作为 root 用户或者超级用户,你可以使用以下目录来配置你的定时任务。你可以直接将脚本放到这里。`run-parts`命令会通过 `/etc/crontab` 文件来运行位于某个目录中的脚本或者程序。 目录 |描述 |:-- |:-- @@ -198,7 +198,7 @@ HOME=/ -------------------------------------------------------------------------------- -via: https://www.unixmen.com/add-cron-jobs-linux-unix/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+unixmenhowtos+%28Unixmen+Howtos+%26+Tutorials%29 +via: https://www.unixmen.com/add-cron-jobs-linux-unix/ 作者:[Duy NguyenViet][a] 译者:[mr-ping](https://github.com/mr-ping) From b2190e70927dfb7d39fe949b43f88bc7a6d1fe12 Mon Sep 17 00:00:00 2001 From: flankershen Date: Tue, 28 Jun 2016 16:31:25 +0800 Subject: [PATCH 1648/1710] =?UTF-8?q?=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申领 --- ...ginx as Reverse Proxy on Centos7 CPanel.md | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md index ba986b25b3..7e0c87cd80 100644 --- a/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md +++ b/sources/tech/20160218 How to Set Nginx as Reverse Proxy on Centos7 CPanel.md @@ -1,3 +1,9 @@ + + +【flankershen翻译中】 + + + How to Set Nginx as Reverse Proxy on Centos7 CPanel ================================================================================ @@ -22,9 +28,9 @@ First of all, we need to install the EPEL repo to start-up with the process. --> Running transaction check ---> Package epel-release.noarch 0:7-5 will be installed --> Finished Dependency Resolution - + Dependencies Resolved - + =============================================================================================================================================== Package Arch Version Repository Size =============================================================================================================================================== @@ -42,9 +48,9 @@ First of all, we need to install the EPEL repo to start-up with the process. --> Running transaction check ---> Package nDeploy-release-centos.noarch 0:1.0-1 will be installed --> Finished Dependency Resolution - + Dependencies Resolved - + =============================================================================================================================================== Package Arch Version Repository Size =============================================================================================================================================== @@ -61,9 +67,9 @@ First of all, we need to install the EPEL repo to start-up with the process. (1/4): ndeploy/7/x86_64/primary_db | 14 kB 00:00:00 (2/4): epel/x86_64/group_gz | 169 kB 00:00:00 (3/4): epel/x86_64/primary_db | 3.7 MB 00:00:02 - + Dependencies Resolved - + =============================================================================================================================================== Package Arch Version Repository Size =============================================================================================================================================== @@ -76,7 +82,7 @@ First of all, we need to install the EPEL repo to start-up with the process. memcached x86_64 1.4.15-9.el7 base 84 k python-inotify noarch 0.9.4-4.el7 base 49 k python-lxml x86_64 3.2.1-4.el7 base 758 k - + Transaction Summary =============================================================================================================================================== Install 2 Packages (+5 Dependent packages) @@ -87,7 +93,7 @@ With these steps, we've completed with the installation of Nginx plugin in our s root@server1 [/usr]# /opt/nDeploy/scripts/cpanel-nDeploy-setup.sh enable Modifying apache http and https port in cpanel - + httpd restarted successfully. Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service. Created symlink from /etc/systemd/system/multi-user.target.wants/ndeploy_watcher.service to /usr/lib/systemd/system/ndeploy_watcher.service. @@ -107,7 +113,7 @@ As you can see these script will modify the Apache port from 80 to another port Main PID: 24760 (httpd) CGroup: /system.slice/httpd.service ‣ 24760 /usr/local/apache/bin/httpd -k start - + Jan 18 06:34:23 server1.centos7-test.com systemd[1]: Starting Apache Web Server... Jan 18 06:34:23 server1.centos7-test.com apachectl[25606]: httpd (pid 24760) already running Jan 18 06:34:23 server1.centos7-test.com systemd[1]: Started Apache Web Server. @@ -125,7 +131,7 @@ As you can see these script will modify the Apache port from 80 to another port ├─25473 nginx: worker process ├─25474 nginx: worker process └─25475 nginx: cache manager process - + Jan 17 17:18:29 server1.centos7-test.com systemd[1]: Starting nginx-nDeploy - high performance web server... Jan 17 17:18:29 server1.centos7-test.com nginx[3804]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok Jan 17 17:18:29 server1.centos7-test.com nginx[3804]: nginx: configuration file /etc/nginx/nginx.conf test is successful @@ -157,14 +163,14 @@ The virtualhost entries created for the existing users as located in the folder listen 45.79.183.73:80; #CPIPVSIX:80; - + # ServerNames server_name saheetha.com www.saheetha.com; access_log /usr/local/apache/domlogs/saheetha.com main; access_log /usr/local/apache/domlogs/saheetha.com-bytes_log bytes_log; - + include /etc/nginx/sites-enabled/saheetha.com.include; - + } We can confirm the working of the web server status by calling a website in the browser. Please see the web server information on my server after the installation. @@ -198,4 +204,4 @@ via: http://linoxide.com/linux-how-to/set-nginx-reverse-proxy-centos-7-cpanel/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/saheethas/ +[a]: http://linoxide.com/author/saheethas/ From 5b7e6604092c38ebad6a1a528f006c6c9ed27304 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Jun 2016 17:14:24 +0800 Subject: [PATCH 1649/1710] PUB:20160518 Android Use Apps Even Without Installing Them @alim0x @carolinewuyan --- ...d Use Apps Even Without Installing Them.md | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) rename {translated/talk => published}/20160518 Android Use Apps Even Without Installing Them.md (68%) diff --git a/translated/talk/20160518 Android Use Apps Even Without Installing Them.md b/published/20160518 Android Use Apps Even Without Installing Them.md similarity index 68% rename from translated/talk/20160518 Android Use Apps Even Without Installing Them.md rename to published/20160518 Android Use Apps Even Without Installing Them.md index a8aecc1d19..40cf217035 100644 --- a/translated/talk/20160518 Android Use Apps Even Without Installing Them.md +++ b/published/20160518 Android Use Apps Even Without Installing Them.md @@ -3,23 +3,23 @@ 谷歌安卓的一项新创新将可以让你无需安装即可在你的设备上使用应用程序。现在已经初具雏形。 -还记得那时候吗,某人发给你了一个链接,要求你通过安装来查看应用。 +还记得那时候吗,某人发给你了一个链接,要求你通过安装一个应用才能查看。 -是否要安装这个应用来查看一个一次性的链接,这种进退两难的选择一定让你感到很沮丧。而且,应用安装本身也会消耗你不少宝贵的时间。 +是否要安装这个应用就为了看一下链接,这种进退两难的选择一定让你感到很沮丧。而且,安装应用这个事也会消耗你不少宝贵的时间。 -上述场景可能大多数人都经历过,或者说大多数现代科技用户都经历过。尽管如此,我们都接受这是正确且合理的过程。 +上述场景可能大多数人都经历过,或者说大多数现代科技用户都经历过。尽管如此,我们都接受,认为这是天经地义的事情。 事实真的如此吗? -针对这个问题谷歌的安卓部门给出了一个全新的,开箱即用的答案: +针对这个问题谷歌的安卓部门给出了一个全新的、开箱即用的答案: -### Android Instant Apps +### Android Instant Apps (AIA) -Android Instant Apps 声称第一时间帮你摆脱这样的两难境地,让你简单地点击链接(见打开链接的示例)然后直接开始使用这个应用。 +Android Instant Apps 声称可以从一开始就帮你摆脱这样的两难境地,让你简单地点击链接(见打开链接的示例)然后直接开始使用这个应用。 -另一个真实生活场景的例子,如果你想停车但是没有停车码表的配对应用,有了 Instant Apps 在这种情况下就方便多了。 +另一个真实生活场景的例子,如果你想停车但是没有停车码表的相应应用,有了 Instant Apps 在这种情况下就方便多了。 -根据谷歌的信息,你可以简单地将你的手机和码表触碰,停车应用就会直接显示在你的屏幕上,并且准备就绪可以使用。 +根据谷歌提供的信息,你可以简单地将你的手机和码表触碰,停车应用就会直接显示在你的屏幕上,并且准备就绪可以使用。 #### 它是怎么工作的? @@ -30,21 +30,25 @@ Instant Apps 和你已经熟悉的应用基本相同,只有一个不同—— 这样应用就可以快速打开,让你可以完成你的目标任务。 ![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/AIA-demo.jpg) ->AIA 示例 + +*AIA 示例* ![](https://4.bp.blogspot.com/-p5WOrD6wVy8/VzyIpsDqULI/AAAAAAAADD0/xbtQjurJZ6EEji_MPaY1sLK5wVkXSvxJgCKgB/s800/B%2526H%2B-%2BDevice%2B%2528Final%2529.gif) ->B&H 图片(通过谷歌搜索) + +*B&H 图片(通过谷歌搜索)* ![](https://2.bp.blogspot.com/-q5ApCzECuNA/VzyKa9l0t2I/AAAAAAAADEI/nYhhMClDl5Y3qL5-wiOb2J2QjtGWwbF2wCLcB/s800/BuzzFeed-Device-Install%2B%2528Final%2529.gif) ->BuzzFeedVideo(通过一个共享链接) + +*BuzzFeedVideo(通过一个共享链接)* ![](https://2.bp.blogspot.com/-mVhKMMzhxms/VzyKg25ihBI/AAAAAAAADEM/dJN6_8H7qkwRyulCF7Yr2234-GGUXzC6ACLcB/s800/Park%2Band%2BPay%2B-%2BDevice%2Bwith%2BMeter%2B%2528Final%2529.gif) ->停车与支付(例)(通过 NFC) + +*停车与支付(例)(通过 NFC)* 听起来很棒,不是吗?但是其中还有很多技术方面的问题需要解决。 -比如,从安全的观点来说:如果任何应用从理论上来说都能在你的设备上运行,甚至你都不用安装它——你要怎么保证设备远离恶意软件攻击? +比如,从安全的观点来说:从理论上来说,如果任何应用都能在你的设备上运行,甚至你都不用安装它——你要怎么保证设备远离恶意软件攻击? 因此,为了消除这类威胁,谷歌还在这个项目上努力,目前只有少数合作伙伴,未来将逐步扩展。 From 2dec6e3903ae2e540674b51551a9778b7d856cf1 Mon Sep 17 00:00:00 2001 From: Purling Nayuki Date: Tue, 28 Jun 2016 17:56:47 +0800 Subject: [PATCH 1650/1710] Proofread 20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System --- ...-The Man Behind Ubuntu Operating System.md | 71 ++++++++++--------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md b/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md index 0d3547aeb9..a9cd35e7ca 100644 --- a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md +++ b/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md @@ -1,117 +1,118 @@ Mark Shuttleworth – Ubuntu 操作系统背后的人 ================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Mark-Shuttleworth-652x445.jpg) +![](http://www.unixmen.com/wp-content/uploads/2015/10/Mark-Shuttleworth-652x445.jpg) -**Mark Richard Shuttleworth** 是 Ubuntu 的创始人,他也有事被称作是 Debian 背后的那个人。他出生于1973年的 Welkom,南非。他不仅是个企业家,还是个太空游客——他是第一个前往太空旅行的独立非洲国家公民。 +**Mark Richard Shuttleworth** 是 Ubuntu 的创始人,有时也被称作 Debian 背后的人。他于 1973 年出生在南非的 Welkom。他不仅是个企业家,还是个太空游客——他是第一个前往太空旅行的独立非洲国家公民。 -Mark 还在1996年成立了 **Thawte**,一家互联网安全企业,那是他还只是 University of Cape Town 的一名金融/IT学生。 +Mark 曾在 1996 年成立了 **Thawte**,一家互联网安全企业,那时他还只是 University of Cape Town(开普敦大学)的一名金融/IT学生。 -在2000年,Mark 创立了 HBD,一家投资公司,同时他还创立了 Shuttleworth基金会,致力于给社会中有创新性的领袖提供资助——以奖金和投资等形式。 +2000 年,Mark 创立了 HBD,一家投资公司,同时他还创立了 Shuttleworth 基金会,致力于给社会中有创新性的领袖以奖金和投资等形式提供资助。 -> "移动设备对于个人电脑行业的未来而言至关重要。比如就在这个月,数据清晰地表明相对于平板电脑的发展,传统 PC 行业正在萎缩。所以如果我们想和个人电脑行业有关系,我们必须和移动设备行业有产生联系。移动互联网行业之所以有趣,还因为在这里没有盗版 Windows 操作系统。所以如果你为你的操作系统赢得了一台设备的市场份额,这台设备会持续使用你的操作系统。在传统 PC 行业,我们时不时得和 ‘免费 Windows’ 产生竞争,这一竞争困难的非常微妙。所以我们现在的目标是围绕 Ubuntu 和移动设备——手机和平板——为用户打造更深度的生态环境。" +> "移动设备对于个人电脑行业的未来而言至关重要。比如就在这个月,相对于平板电脑的发展而言,传统 PC 行业很明显正在萎缩。所以如果我们想要涉足个人电脑产业,我们必须首先涉足移动行业。移动产业之所以有趣,还因为在这里没有盗版 Windows 操作系统。所以如果你为你的操作系统赢得了一台设备的市场份额,这台设备会持续使用你的操作系统。在传统 PC 行业,我们时不时得和“免费”的 Windows 产生竞争,这是一种非常微妙的挑战。所以我们现在的重心是围绕 Ubuntu 和移动设备——手机和平板——以图与普通用户建立更深层次的联系。" > > — Mark Shuttleworth -在2002年,在俄罗斯的 Star City 接收完为期一年的训练后,他作为 Soyuz 任务代号 TM-34 的一员飞往了国际空间站。再后来,在面向有志于航空航天或者其科学相关的南非学生群体中,内完成了推广科学,编程,数学的演讲后,Mark 创立了 **Canonical Ltd**。此后直至2013年,他一直在领导 Ubuntu 操作系统的开发。 +2002 年,他在俄罗斯的 Star City 接受了为期一年的训练,随后作为联盟号 TM-34 任务组的一员飞往了国际空间站。再后来,在发起面向有志于航空航天或者其相关学科的南非学生群体中推广科学、编程及数学的运动后,Mark 创立了 **Canonical Ltd**。此后直至2013年,他一直在领导 Ubuntu 操作系统的开发。 -现今,Shuttleworth 有英国与南非双重国籍并和18只可爱的鸭子住在英国的 Isle of Man 小岛上一处花园,一同的还有他一样可爱的女友 Claire,2 条黑母狗以及时不时经过的羊群。 +现今,Shuttleworth 拥有英国与南非双重国籍并和 18 只可爱的鸭子住在英国的 Isle of Man 小岛上的一处花园,一同的还有他可爱的女友 Claire,两条黑母狗以及时不时经过的羊群。 -> "电脑不再只是一台电子设备了。他现在是你思维的延续,以及通向他人的入口。" +> "电脑不仅仅是一台电子设备了。它现在是你思维的延续,以及通向他人的大门。" > > — Mark Shuttleworth ### Mark Shuttleworth 的早年生活### -正如我们之前提到的,Mark 出生在 Welkom,南非的橙色自由州。他是一名外科医生和护士学校教师的孩子。Mark 在 Western Province Preparatory School 就读并在1986年成为了学生会主席,一个学期后就读于 Rondebosch 男子高中,再之后入学 Bishops/Diocesan 学院并在1991年再次成为那里的学生会主席。 +正如我们之前提到的,Mark 出生在南非的橙色自由州 Welkom。他是一名外科医生和护士学校教师的孩子。他在 Western Province Preparatory School 就读并在 1986 年成为了学生会主席,一个学期后就读于 Rondebosch 男子高中,再之后入学 Bishops/Diocesan 学院并在 1991 年再次成为那里的学生会主席。 -Mark 在 University of Cape Town 拿到了 Bachelor of Business Science degree in the Finance and Information Systems (译者:商业科学里的双学士学位,两个学科分别是金融和信息系统),他在学校就读是住在 Smuts Hall。他,作为学生,也在那里帮助安装了学校的第一条宿舍网络。 +Mark 在 University of Cape Town 拿到了 Bachelor of Business Science degree in the Finance and Information Systems (译注:商业科学里的双学士学位,两个学科分别是金融和信息系统),他在学校就读时住在 Smuts Hall。作为学生,他也在那里帮助安装了学校的第一条宿舍网络。 ->“有无数的企业和国家佐证,引入开源政策能提高竞争力和效率。在不同层面上创造生产力对于公司和国家而言都是至关重要的。” +>“无数的企业和国家已经证明,引入开源政策能提高竞争力和效率。在不同层面上创造生产力对于公司和国家而言都是至关重要的。” > > — Mark Shuttleworth ### Mark Shuttleworth 的职业生涯 ### -Mark 在1995年创立 Thawte,公司专注于数字证书和互联网安全,然后他在1999年把公司卖给了 VeriSign,赚取了大约 5.75 亿美元。 +Mark 在 1995 年创立了 Thawte,公司专注于数字证书和互联网安全,然后在 1999 年把公司卖给了 VeriSign,赚取了大约 5.75 亿美元。 -2000年的时候,Mark 创立了 HBD 风险资本公司,这项事业成为了投资方和项目孵化器。2004年的时候,他创立了 Canonical Ltd. 以支持和鼓励自由软件开发项目的商业化,特别是 Ubuntu 操作系统的项目。直到2009年,Mark 才从 Canonical CEO 的位置上退下。 +2000 年,Mark 创立了 HBD 风险资本公司,这项事业成为了投资方和项目孵化器。2004 年,他创立了 Canonical Ltd. 以支持和鼓励自由软件开发项目的商业化,特别是 Ubuntu 操作系统的项目。直到 2009 年,Mark 才从 Canonical CEO 的位置上退下。 -> “在 [DDC](https://en.wikipedia.org/wiki/DCC_Alliance) (译者:一个 Debian Gnu/Linux 开发者联盟) 的早期,我更倾向于让开发者做些他们自己的(内核开发)工作看看能弄出些什么。现在我们基本上已经完成了这个开发阶段了。” +> “在 [DDC](https://en.wikipedia.org/wiki/DCC_Alliance) (译者:一个 Debian GNU/Linux 开发者联盟) 的早期,我更倾向于让拥护者放手去做,看看能发展出什么。” > > — Mark Shuttleworth ### Linux、免费开源软件 与 Mark Shuttleworth ### -在90年代末,Mark 作为 Debian 系统开发者的一员参与了项目。 +在 90 年代末,Mark 曾作为一名开发者参与 Debian 操作系统项目。 -2001年,Mark 创立了 Shuttleworth 基金会,这是个扎根南非的,非赢利性,专注于赞助社会创新,免费/教育用途开源软件的基金会,赞助过的项目包括 Freedom Toaster。 +2001 年,Mark 创立了 Shuttleworth 基金会,这是个扎根南非的、非赢利性的基金会,专注于赞助社会创新、免费/教育用途开源软件,曾赞助过 Freedom Toaster。 -2004年的时候,Mark 通过出资开发 基于 Debian 的 Ubuntu 操作系统回归了免费软件界,这一切也经由他的公司,Canonical,完成。 +2004 年,Mark 通过出资开发基于 Debian 的 Ubuntu 操作系统回归了自由软件界,这一切也经由他的 Canonical 公司完成。 -2005年,Mark 出资建立了 Ubuntu 基金会并投入了一千万美元作为启动资金。在 Ubuntu 项目内,Mark 经常被一个朗朗上口的名字称呼——“**SABDFL (Self-Appointed Benevolent Dictator for Life)**”。为了能够找到足够多的能手开发这个巨大的项目,Mark 花费了6个月的时间在 Debian 的邮件列表里找到能手,这一切都是在他乘坐在南极洲的一艘破冰船——Kapitan Khlebnikov——上完成的。2005年,Mark 买下了 Impi Linux 65% 的股份。 +2005 年,Mark 出资建立了 Ubuntu 基金会并投入了一千万美元作为启动资金。在 Ubuntu 项目内,Mark 经常被一个朗朗上口的名字称呼——“**SABDFL (Self-Appointed Benevolent Dictator for Life)**”。为了能够找到足够多的能手开发这个巨大的项目,Mark 花费了 6 个月的时间从 Debian 邮件列表里找到能手,这一切都是在他乘坐在南极洲的一艘破冰船——Kapitan Khlebnikov——上完成的。同年,Mark 买下了 Impi Linux 65% 的股份。 > “我呼吁电信公司的掌权者们尽快开发出跨洲际的高效信息传输服务。” > > — Mark Shuttleworth -2006年,KDE 宣布 Shuttleworth 成为第一位 **patron** 级别赞助者——彼时 KDE 最高级别的赞助。这一赞助协议终止与2012年,取而代之的是 Kubuntu——一个运用 KDE 作为默认桌面环境的 Ubuntu 变种——的资金。 +2006 年,KDE 宣布 Shuttleworth 成为第一位 **patron** 级别赞助者——彼时 KDE 最高级别的赞助。这一赞助协议在 2012 年终止,取而代之的是一个使用 KDE 作为默认桌面环境的 Ubuntu 变种——Kubuntu 的资金。 -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/shuttleworth-kde.jpg) +![](http://www.unixmen.com/wp-content/uploads/2015/10/shuttleworth-kde.jpg) -2009年,Shuttleworth 宣布他会从 CEO 退位以更好的关注与合作伙伴,产品设计和顾客体验。Jane Silber ——2004年起公司的COO——晋升CEO。 +2009 年,Shuttleworth 宣布他会从 CEO 退位以更好地关注合作伙伴,产品设计和顾客体验。从 2004 年起担任公司 COO 的 Jane Silber 晋升为 CEO。 -2010年,Mark 由于 Ubuntu 项目从 Open University 收到了荣誉学位。 +2010 年,Mark 由于 Ubuntu 项目从 Open University 获得了荣誉学位。 -2012年,Mark 和 Kenneth Rogoff 一同在牛津大学与 Peter Thiel 和 Garry Kasparov 就 **创新悖论**(The Innovation Enigma)展开辩论。 +2012 年,Mark 和 Kenneth Rogoff 一同在牛津大学与 Peter Thiel 和 Garry Kasparov 就**创新悖论**(The Innovation Enigma)展开辩论。 -2013年,Mark 和 Ubuntu 一同被授予 **澳大利亚反个人隐私老大哥监控奖**(Austrian anti-privacy Big Brother Award),理由为把 Ubuntu 会把 Unity 桌面的搜索框的搜索结果发往 Canonical 服务器(译者:因此侵犯了个人隐私)。而一年前的2012年,Mark 曾经申明过这一过程极具匿名性。 +2013 年,Mark 和 Ubuntu 一同被授予**澳大利亚反个人隐私老大哥监控奖**(Austrian anti-privacy Big Brother Award),理由是 Ubuntu 会把 Unity 桌面的搜索框的搜索结果发往 Canonical 服务器(译注:因此侵犯了个人隐私)。而一年前,Mark 曾经申明过这一过程进行了匿名化处理。 -> “所有主流 PC 厂家现在都提供 Ubuntu 预安装选项。所以我们和业界的合作已经相当紧密了。但那些 PC 厂家对于给买家推广新东西这件事都很紧张。如果我们可以让买家习惯 Ubuntu 的桌面/平板/手机操作系统的体验,那他们也应该更愿意买预装 Ubuntu 的设备。因为没有哪个操作系统是通过抄袭模仿获得成功的。Android 很棒,如果我们想成功的话我们必须给市场带去更新更好的东西。整个环境都有停滞发展的危险,如果我们中没有人追寻未来的话。但如果你尝试去追寻未来了,那你必须接受不是所有人对未来的预见都和你一样这一事实。” +> “所有主流 PC 厂家现在都提供 Ubuntu 预安装选项。所以我们和业界的合作已经相当紧密了。但那些 PC 厂家对于给买家推广新东西这件事都很紧张。如果我们可以让买家习惯 Ubuntu 的桌面/平板/手机操作系统的体验,那他们也应该更愿意买预装 Ubuntu 的设备。因为没有哪个操作系统是通过抄袭模仿获得成功的。Android 很棒,但如果我们想成功的话我们必须给市场带去更新更好的东西(校注:而不是改进或者模仿 Android)。如果我们中没有人追寻未来的话,我们将陷入停滞不前的危险。但如果你尝试去追寻未来了,那你必须接受不是所有人对未来的预见都和你一样这一事实。” > > — Mark Shuttleworth ### Mark Shuttleworth 的太空之旅 ### -Mark 在2002年由于作为世界第二名自费太空游客而闻名世界,同时他也是南非第一个旅行太空的人。这趟旅行 Mark 作为俄罗斯 Soyuz TM-34 的一名航空参与者加入,并支付了约两千万美元。2天后,Soyuz 太空梭抵达了国际空间站,在那里 Mark 呆了8天并参与了 AIDS 和 GENOME 研究的相关实验。2002年的晚些时候,Mark 乘坐 Soyuz TM-33 返回了地球。为了参与这趟旅行,Mark 花了一年时间准备与训练,包括7个月居住在俄罗斯的 Start City。 +Mark 在 2002 年作为世界第二名自费太空游客而闻名世界,同时他也是南非第一个旅行太空的人。这趟旅行中,Mark 作为俄罗斯联盟号 TM-34 任务的一名航空参与者加入,并为此支付了约两千万美元。2 天后,联盟号宇宙飞船抵达了国际空间站,在那里 Mark 呆了 8 天并参与了艾滋病和基因组研究的相关实验。同年晚些时候,Mark 随联盟号 TM-33 任务返回了地球。为了参与这趟旅行,Mark 花了一年时间准备与训练,其中有 7 个月居住在俄罗斯的 Start City。 -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Mark-Shuttleworth1.jpg) +![](http://www.unixmen.com/wp-content/uploads/2015/10/Mark-Shuttleworth1.jpg) 在太空中,Mark 与 Nelson Mandela 和另一个南非女孩 Michelle Foster (她问 Mark 要不要娶她)通过无线电进行了交谈。Mark 回避了结婚问题,在换话题之前他说他感到很荣幸。身患绝症的 Forster 和 Nelson Mandela 通过 Dream 基金会的赞助获得了与 Mark 交谈的机会。 归来后,Mark 在世界各地做了旅行,并和各地的学生就太空之旅发表了感言。 ->“粗略的统计数据表明 Ubuntu 的实际用户依然在增长。而我们的合作方——Dell,HP,Lenovo 和其他硬件生产商,以及游戏厂商 EA,Valve 都在加入我们——这让我觉得我们在引导一项很有意义的事业。” +>“粗略的统计数据表明 Ubuntu 的实际用户依然在增长。而我们的合作方——Dell、HP、Lenovo 和其他硬件生产商,以及游戏厂商 EA、Valve 都在加入我们——这让我觉得我们在关键的领域继续领先。” > > — Mark Shuttleworth ### Mark Shuttleworth 的交通工具 ### -Mark 有他自己的私人客机,Bombardier Global Express,经常被称为 Canonical 一号,但事实上此飞机是通过 HBD 风险投资公司注册拥有的。飞机侧面的喷绘龙图案是 HBD 风投公司的吉祥物,Norman。 +Mark 有他自己的私人客机 Bombardier Global Express。虽然它经常被称为 Canonical 一号,但事实上此飞机是通过 HBD 风险投资公司注册拥有的。飞机侧面的龙图案涂装是 HBD 风投公司的吉祥物 Norman。 ### 与南非储蓄银行的法律冲突 ### -在从南非转移25亿南非兰特去往 Isle of Man 的过程中,南非储蓄银行征收了 2.5 亿南非兰特的税金。Mark 上诉了,经过冗长的法庭唇枪舌战,南非储蓄银行被勒令返还 2.5 亿征税,以及其利息。Mark 宣布他会把这 2.5 亿存入信托基金,以用于帮助上诉宪法法院的案子。 +在从南非转移 25 亿南非兰特去往 Isle of Man 的过程中,南非储蓄银行征收了 2.5 亿南非兰特的税金。Mark 上诉了,经过冗长的法庭唇枪舌战,南非储蓄银行被勒令返还 2.5 亿征税,以及其利息。Mark 宣布他会把这 2.5 亿存入信托基金,以用于帮助上诉宪法法院的案子。 -> “离境征税倒也不和宪法冲突。但离境征税的主要目的不是为了提高税收,而是通过监管资金流出来保护本国经济。” +> “离境征税倒也不和宪法冲突。但离境征税的主要目的不是提高税收,而是通过监管资金流出来保护本国经济。” > -> — 法官 Dikgang Moseneke +> — Dikgang Moseneke 法官 -2015年,南非宪法法院修正了低级法院的判决结果,并宣布了上述对于离岸征税的理解。 +2015 年,南非宪法法院修正了低级法院的判决结果,并宣布了上述对于离岸征税的理解。 ### Mark Shuttleworth 喜欢的东西 ### -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. +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 不喜欢的东西 ### Admin, salary negotiations, legalese, and public speaking. +(校对:和程序猿不喜欢 PM 一个道理?) -------------------------------------------------------------------------------- @@ -119,7 +120,7 @@ via: http://www.unixmen.com/mark-shuttleworth-man-behind-ubuntu-operating-system 作者:[M.el Khamlichi][a] 译者:[Moelf](https://github.com/Moelf) -校对:[校对者ID](https://github.com/校对者ID) +校对:[PurlingNayuki](https://github.com/PurlingNayuki) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e2c29ecd550f2484476d29e66e7344948ebbb5a5 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Jun 2016 20:53:08 +0800 Subject: [PATCH 1651/1710] PUB:20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method @alim0x --- ...Passwords With A New Trust-Based Authentication Method.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename {translated/talk => published}/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md (96%) diff --git a/translated/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md b/published/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md similarity index 96% rename from translated/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md rename to published/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md index 7e0e85d688..ba14bf8742 100644 --- a/translated/talk/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md +++ b/published/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md @@ -14,7 +14,8 @@ 基于这个信任分,一个需要登录认证的应用可以验证你确实可以授权登录,从而不会提示需要密码。 ![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/05/Abacus-to-Trust-API.jpg) ->Abacus 到 Trust API + +*Abacus 到 Trust API* ### 需要思考的地方 @@ -31,7 +32,7 @@ via: http://www.iwillfolo.com/will-google-replace-passwords-with-a-new-trust-bas 作者:[iWillFolo][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d5373fa7ec5bfdc41fc4a6aef67bb21b951741ca Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Jun 2016 21:04:27 +0800 Subject: [PATCH 1652/1710] =?UTF-8?q?PUB:20160611=20vlock=20=E2=80=93=20A?= =?UTF-8?q?=20Smart=20Way=20to=20Lock=20User=20Virtual=20Console=20or=20Te?= =?UTF-8?q?rminal=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @martin2011qi --- ...User Virtual Console or Terminal in Linux.md | 102 ++++++++++++++++++ ...User Virtual Console or Terminal in Linux.md | 99 ----------------- 2 files changed, 102 insertions(+), 99 deletions(-) create mode 100644 published/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md delete mode 100644 translated/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md diff --git a/published/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md b/published/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md new file mode 100644 index 0000000000..99c1da66ab --- /dev/null +++ b/published/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md @@ -0,0 +1,102 @@ +vlock – 一个锁定 Linux 用户虚拟控制台或终端的好方法 +======================================================================= + +虚拟控制台是 Linux 上非常重要的功能,它们给系统用户提供了 shell 提示符,以保证用户在登录和远程登录一个未安装图形界面的系统时仍能使用。 + +一个用户可以同时操作多个虚拟控制台会话,只需在虚拟控制台间来回切换即可。 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/vlock-Lock-User-Terminal-in-Linux.png) + +*用 vlock 锁定 Linux 用户控制台或终端* + +这篇使用指导旨在教会大家如何使用 vlock 来锁定用户虚拟控制台和终端。 + +### vlock 是什么? + +vlock 是一个用于锁定一个或多个用户虚拟控制台用户会话的工具。在多用户系统中 vlock 扮演着重要的角色,它让用户可以在锁住自己会话的同时不影响其他用户通过其他虚拟控制台操作同一个系统。必要时,还可以锁定所有的控制台,同时禁止在虚拟控制台间切换。 + +vlock 的主要功能面向控制台会话方面,同时也支持非控制台会话的锁定,但该功能的测试还不完全。 + +### 在 Linux 上安装 vlock + +根据你的 Linux 系统选择 vlock 安装指令: + +``` +# yum install vlock [On RHEL / CentOS / Fedora] +$ sudo apt-get install vlock [On Ubuntu / Debian / Mint] +``` + +### 在 Linux 上使用 vlock + +vlock 操作选项的常规语法: + +``` +# vlock option +# vlock option plugin +# vlock option -t plugin +``` + +#### vlock 常用选项及用法: + +1、 锁定用户的当前虚拟控制台或终端会话,如下: + +``` +# vlock --current +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-User-Terminal-Session-in-Linux.png) + +*锁定 Linux 用户终端会话* + +选项 -c 或 --current,用于锁定当前的会话,该参数为运行 vlock 时的默认行为。 + +2、 锁定所有你的虚拟控制台会话,并禁用虚拟控制台间切换,命令如下: + +``` +# vlock --all +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-All-Linux-Terminal-Sessions.png) + +*锁定所有 Linux 终端会话* + +选项 -a 或 --all,用于锁定所有用户的控制台会话,并禁用虚拟控制台间切换。 + +其他的选项只有在编译 vlock 时编入了相关插件支持和引用后,才能发挥作用: + +3、 选项 -n 或 --new,调用时后,会在锁定用户的控制台会话前切换到一个新的虚拟控制台。 + +``` +# vlock --new +``` + +4、 选项 -s 或 --disable-sysrq,在禁用虚拟控制台的同时禁用 SysRq 功能,只有在与 -a 或 --all 同时使用时才起作用。 + +``` +# vlock -sa +``` + +5、 选项 -t 或 --timeout ,用以设定屏幕保护插件的 timeout 值。 + +``` +# vlock --timeout 5 +``` + +你可以使用 `-h` 或 `--help` 和 `-v` 或 `--version` 分别查看帮助消息和版本信息。 + +我们的介绍就到这了,提示一点,你可以将 vlock 的 `~/.vlockrc` 文件包含到系统启动中,并参考入门手册[添加环境变量][1],特别是 Debian 系的用户。 + +想要找到更多或是补充一些这里没有提及的信息,可以直接在写在下方评论区。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/vlock-lock-user-virtual-console-terminal-linux/ + +作者:[Aaron Kili][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[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/set-path-variable-linux-permanently/ diff --git a/translated/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md b/translated/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md deleted file mode 100644 index 26c74b019e..0000000000 --- a/translated/tech/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md +++ /dev/null @@ -1,99 +0,0 @@ -vlock – 一个锁定 Linux 用户虚拟控制台或终端的好方法 -======================================================================= - -虚拟控制台是 Linux 非常重要的功能,他们为使用系统的用户提供了 shell 提示符,以保证用户在登录和远程登录一个未安装图形界面的系统时仍能使用。 - -一个用户可以同时操作多个虚拟控制台会话,只需在虚拟控制台间来回切换即可。 - -![](http://www.tecmint.com/wp-content/uploads/2016/05/vlock-Lock-User-Terminal-in-Linux.png) ->用 vlock 锁定 Linux 用户控制台或终端 - -这篇使用指导,旨在教会大家如何使用 vlock 来锁定用户虚拟控制台和终端。 - -### vlock 是什么? - -vlock 是一个用于锁定一个或多个用户虚拟控制台用户会话的工具。在多用户系统中 vlock 是扮演着重要的角色,他让用户可以在锁住自己会话的同时不影响其他用户通过其他虚拟控制台操作同一个系统。必要时,还可以锁定所有的控制台,同时禁止在虚拟控制台间切换。 - -vlock 的主要功能面向控制台会话方面,同时也支持非控制台会话的锁定,但该功能的测试还不完全。 - -### 在 Linux 上安装 vlock - -根据你的 Linux 系统选择 vlock 安装指令: - -``` -# yum install vlock [On RHEL / CentOS / Fedora] -$ sudo apt-get install vlock [On Ubuntu / Debian / Mint] -``` - -### 在 Linux 上使用 vlock - -vlock 操作选项的常规语法: - -``` -# vlock option -# vlock option plugin -# vlock option -t plugin -``` - -#### vlock 常用选项及用法: - -1. 锁定用户的当前虚拟控制台或终端会话,如下: - - ``` - # vlock --current - ``` - - ![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-User-Terminal-Session-in-Linux.png) - >锁定 Linux 用户终端会话 - - 选项 -c 或 --current,锁定当前的会话,该参数为运行 vlock 时的默认行为。 - -2. 锁定所有你的虚拟控制台会话,并禁用虚拟控制台间切换,命令如下: - - ``` - # vlock --all - ``` - - ![](http://www.tecmint.com/wp-content/uploads/2016/05/Lock-All-Linux-Terminal-Sessions.png) - >锁定所有 Linux 终端会话 - - 选项 -a 或 --all,锁定所有用户的控制台会话,并禁用虚拟控制台间切换。 - - 其他的选项只有在编译 vlock 时编入了相关插件支持及其引用后,才能发挥作用: - -3. 选项 -n 或 --new,调用时后,会在锁定用户的控制台会话前切换到一个新的虚拟控制台。 - - ``` - # vlock --new - ``` - -4. 选项 -s 或 --disable-sysrq,在禁用虚拟控制台的同时禁用 SysRq 功能,只有在与 -a 或 --all 同时使用时才起作用。 - - ``` - # vlock -sa - ``` - -5. 选项 -t 或 --timeout ,用以设定屏幕保护插件的 timeout 值。 - - ``` - # vlock --timeout 5 - ``` - -你可以使用 `-h` 或 `--help` 和 `-v` 或 `--version` 分别查看帮助消息和版本信息。 - -我们的介绍就到这了,提示一点,你可以将 vlock 的 `~/.vlockrc` 文件包含到系统启动中并参考入门手册[添加环境变量][1],特别是 Debian 系的用户。 - -想要找到更多或是补充一些这里没有提及的信息,可以直接在写在下方评论区。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/vlock-lock-user-virtual-console-terminal-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 - -作者:[Aaron Kili][a] -译者:[martin2011qi](https://github.com/martin2011qi) -校对:[校对者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/set-path-variable-linux-permanently/ From d009439a06283b0fefda6806dc9dd13a92da702b Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 28 Jun 2016 23:19:55 +0800 Subject: [PATCH 1653/1710] =?UTF-8?q?20160628-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n All Distributions – Are They Any Good.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/talk/20160627 Linux Applications That Works On All Distributions – Are They Any Good.md diff --git a/sources/talk/20160627 Linux Applications That Works On All Distributions – Are They Any Good.md b/sources/talk/20160627 Linux Applications That Works On All Distributions – Are They Any Good.md new file mode 100644 index 0000000000..98967d866b --- /dev/null +++ b/sources/talk/20160627 Linux Applications That Works On All Distributions – Are They Any Good.md @@ -0,0 +1,90 @@ +Linux Applications That Works On All Distributions – Are They Any Good? +============================================================================ + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/06/Bundled-applications.jpg) + + +A revisit of Linux community’s latest ambitions – promoting decentralized applications in order to tackle distribution fragmentation. + +Following last week’s article: [Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful][1]?, a couple of new opinions rose to the surface which may contain crucial information about the usefulness of such apps. + +### The Con Side + +Commenting on the subject [here][2], a [Gentoo][3] user who goes by the name Till, gave rise to a few points which hasn’t been addressed to the fullest the last time we covered the issue. + +While previously we settled on merely calling it bloat, Till here on the other hand, is dissecting that bloat further so to help us better understand both its components and its consequences. + +Referring to such apps as “bundled applications” – for the way they work on all distributions is by containing dependencies together with the apps themselves, Till says: + +>“bundles ship a lot of software that now needs to be maintained by the application developer. If library X has a security problem and needs an update, you rely on every single applications to ship correct updates in order to make your system save.” + +Essentially, Till raises an important security point. However, it isn’t necessarily has to be tied to security alone, but can also be linked to other aspects such as system maintenance, atomic updates, etc… + +Furthermore, if we take that notion one step further and assume that dependencies developers may cooperate, therefore releasing their software in correlation with the apps who use them (an utopic situation), we shall then get an overall slowdown of the entire platform development. + +Another problem that arises from the same point made above is dependencies-transparency becomes obscure, that is, if you’d want to know which libraries are bundled with a certain app, you’ll have to rely on the developer to publish such data. + +Or, as Till puts it: “Questions like, did package XY already include the updated library Z, will be your daily bread”. + +For comparison, with the standard methods available on Linux nowadays (both binary and source distributions), you can easily notice which libraries are being updated upon a system update. + +And you can also rest assure that all other apps on the system will use it, freeing you from the need to check each app individually. + +Other cons that may be deduced from the term bloat include: bigger package size (each app is bundled with dependencies), higher memory usage (no more library sharing) and also – + +One less filter mechanism to prevent malicious software – distributions package maintainers also serve as a filter between developers and users, helping to assure users get quality software. + +With bundled apps this may no longer be the case. + +As a finalizing general point, Till asserts that although useful in some cases, for the most part, bundled apps weakens the free software position in distributions (as proprietary vendors will now be able to deliver software without sharing it on public repositories). + +And apart from that, it introduces many other issues. Many problems are simply moved towards the developers. + +### The Pro Side + +In contrast, another comment by a person named Sven tries to contradict common claims that basically go against the use of bundled applications, hence justifying and promoting the use of it. + +“waste of space” – Sven claims that in today’s world we have many other things that wastes disk space, such as movies stored on hard drive, installed locals, etc… + +Ultimately, these things are infinitely more wasteful than a mere “100 MB to run a program you use all day … Don’t be ridiculous.” + +“waste of RAM” – the major points in favor are: + +- Shared libraries waste significantly less RAM compared to application runtime data. +- RAM is cheap today. + +“security nightmare” – not every application you run is actually security-critical. + +Also, many applications never even see any security updates, unless on a ‘rolling distro’. + +In addition to Sven’s opinions, who try to stick to the pragmatic side, a few advantages were also pointed by Till who admits that bundled apps has their merits in certain cases: + +- Proprietary vendors who want to keep their code out of the public repositories will be able to do so more easily. +- Niche applications, which are not packaged by your distribution, will now be more readily available. +- Testing on binary distributions which do not have beta packages will become easier. +- Freeing users from solving dependencies problems. + +### Final Thoughts + +Although shedding new light onto the matter, it seems that one conclusion still stands and accepted by all parties – bundled apps has their niche to fill in the Linux ecosystem. + +Nevertheless, the role that niche should take, whether main or marginal one, appears to be a lot clearer now, at least from a theoretical point of view. + +Users who are looking to make their system optimized as possible, should, in the majority of cases, avoid using bundled apps. + +Whereas, users that are after ease-of-use, meaning – doing the least of work in order to maintain their systems, should and probably would feel very comfortable adopting the new method. + +-------------------------------------------------------------------------------- + +via: http://www.iwillfolo.com/linux-applications-that-works-on-all-distributions-are-they-any-good/ + +作者:[Editorials][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.iwillfolo.com/category/editorials/ +[1]: http://www.iwillfolo.com/ubuntus-snap-red-hats-flatpack-and-is-one-fits-all-linux-packages-useful/ +[2]: http://www.proli.net/2016/06/25/gnulinux-bundled-application-ramblings/ +[3]: http://www.iwillfolo.com/5-reasons-use-gentoo-linux/ From 4dd996a6a8e9c1891a1ae329a0001ea65b2e87f8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 28 Jun 2016 23:23:31 +0800 Subject: [PATCH 1654/1710] =?UTF-8?q?20160628-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...And Is ‘One Fits All’ Linux Packages Useful.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/talk/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md diff --git a/sources/talk/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md b/sources/talk/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md new file mode 100644 index 0000000000..35088e4be1 --- /dev/null +++ b/sources/talk/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md @@ -0,0 +1,110 @@ +Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful? +================================================================================= + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/06/Flatpak-and-Snap-Packages.jpg) + +An in-depth look into the new generation of packages starting to permeate the Linux ecosystem. + + +Lately we’ve been hearing more and more about Ubuntu’s Snap packages and Flatpak (formerly referred to as xdg-app) created by Red Hat’s employee Alexander Larsson. + +These 2 types of next generation packages are in essence having the same goal and characteristics which are: being standalone packages that doesn’t rely on 3rd-party system libraries in order to function. + +This new technology direction which Linux seems to be headed is automatically giving rise to questions such as, what are the advantages / disadvantages of standalone packages? does this lead us to a better Linux overall? what are the motives behind it? + +To answer these questions and more, let us explore the things we know about Snap and Flatpak so far. + +### The Motive + +According to both [Flatpak][1] and [Snap][2] statements, the main motive behind them is to be able to bring one and the same version of application to run across multiple Linux distributions. + +>“From the very start its primary goal has been to allow the same application to run across a myriad of Linux distributions and operating systems.” Flatpak + +>“… ‘snap’ universal Linux package format, enabling a single binary package to work perfectly and securely on any Linux desktop, server, cloud or device.” Snap + +To be more specific, the guys behind Snap and Flatpak (S&F) believe that there’s a barrier of fragmentation on the Linux platform. + +A barrier which holds back the platform advancement by burdening developers with more, perhaps unnecessary, work to get their software run on the many distributions out there. + +Therefore, as leading Linux distributions (Ubuntu & Red Hat), they wish to eliminate the barrier and strengthen the platform in general. + +But what are the more personal gains which motivate the development of S&F? + +#### Personal Gains? + +Although not officially stated anywhere, it may be assumed that by leading the efforts of creating a unified package that could potentially be adopted by the vast majority of Linux distros (if not all of them), the captains of these projects could assume a key position in determining where the Linux ship sails. + +### The Advantages + +The benefits of standalone packages are diverse and can depend on different factors. + +Basically however, these factors can be categorized under 2 distinct criteria: + +#### User Perspective + ++ From a Linux user point of view, Snap and Flatpak both bring the possibility of installing any package (software / app) on any distribution the user is using. + +That is, for instance, if you’re using a not so popular distribution which has only a scarce supply of packages available in their repo, due to workforce limitations probably, you’ll now be able to easily and significantly increase the amount of packages available to you – which is a great thing. + ++ Also, users of popular distributions that do have many packages available in their repos, will enjoy the ability of installing packages that might not have behaved with their current set of installed libraries. + +For example, a Debian user who wants to install a package from ‘testing branch’ will not have to convert his entire system into ‘testing’ (in order for the package to run against newer libraries), rather, that user will simply be able to install only the package he wants from whichever branch he likes and on whatever branch he’s on. + +The latter point, was already basically possible for users who were compiling their packages straight from source, however, unless using a source based distribution such as Gentoo, most users will see this as just an unworthily hassle. + ++ The advanced user, or perhaps better put, the security aware user might feel more comfortable with this type of packages as long as they come from a reliable source as they tend to provide another layer of isolation since they are generally isolated from system packages. + +* Both S&F are being developed with enhanced security in mind, which generally makes use of “sandboxing” i.e isolation in order to prevent cases where they carry a virus which can infect the entire system, similar to the way .exe files on MS Windows may. (More on MS and S&F later) + +#### Developer Perspective + +For developers, the advantages of developing S&F packages will probably be a lot clearer than they are to the average user, some of these were already hinted in a previous section of this post. + +Nonetheless, here they are: + ++ S&F will make it easier on devs who want to develop for more than one Linux distribution by unifying the process of development, therefore minimizing the amount of work a developer needs to do in order to get his app running on multiple distributions. + +++ Developers could therefore gain easier access to a wider range of distributions. + ++ S&F allow devs to privately distribute their packages without being dependent on distribution maintainers to stabilize their package for each and every distro. + +++ Through the above, devs may gain access to direct statistics of user adoption / engagement for their software. + +++ Also through the above, devs could get more directly involved with users, rather than having to do so through a middleman, in this case, the distribution. + +### The Downsides + +– Bloat. Simple as that. Flatpak and Snap aren’t just magic making dependencies evaporate into thin air. Rather, instead of relying on the target system to provide the required dependencies, S&F comes with the dependencies prebuilt into them. + +As the saying goes “if the mountain won’t come to Muhammad, Muhammad must go to the mountain…” + +– Just as the security-aware user might enjoy S&F packages extra layer of isolation, as long they come from a trusted source. The less knowledgeable user on the hand, might be prone to the other side of the coin hazard which is using a package from an unknown source which may contain malicious software. + +The above point can be said to be valid even with today’s popular methods, as PPAs, overlays, etc might also be maintained by untrusted sources. + +However, with S&F packages the risk increases since malicious software developers need to create only one version of their program in order to infect a large number of distributions, whereas, without it they’d needed to create multiple versions in order to adjust their malware to other distributions. + +Was Microsoft Right All Along? + +With all that’s mentioned above in mind, it’s pretty clear that for the most part, the advantages of using S&F packages outweighs the drawbacks. + +At the least for users of binary-based distributions, or, non lightweight focused distros. + +Which eventually lead me to asking the above question – could it be that Microsoft was right all along? if so and S&F becomes the Linux standard, would you still consider Linux a Unix-like variant? + +Well apparently, the best one to answer those questions is probably time. + +Nevertheless, I’d argue that even if not entirely right, MS certainly has a good point to their credit, and having all these methods available here on Linux out of the box is certainly a plus in my book. + + +-------------------------------------------------------------------------------- + +via: http://www.iwillfolo.com/ubuntus-snap-red-hats-flatpack-and-is-one-fits-all-linux-packages-useful/ + +作者:[Editorials][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.iwillfolo.com/category/editorials/ From 7b4d8e5cacdadb4141e56992fae127d6eab120d4 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jun 2016 00:21:09 +0800 Subject: [PATCH 1655/1710] =?UTF-8?q?=E4=BA=8C=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-The Man Behind Ubuntu Operating System.md | 108 +++++++++--------- 1 file changed, 55 insertions(+), 53 deletions(-) diff --git a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md b/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md index a9cd35e7ca..b40048201b 100644 --- a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md +++ b/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md @@ -1,102 +1,100 @@ -Mark Shuttleworth – Ubuntu 操作系统背后的人 +马克·沙特尔沃思 – Ubuntu 背后的那个男人 ================================================================================ + ![](http://www.unixmen.com/wp-content/uploads/2015/10/Mark-Shuttleworth-652x445.jpg) -**Mark Richard Shuttleworth** 是 Ubuntu 的创始人,有时也被称作 Debian 背后的人。他于 1973 年出生在南非的 Welkom。他不仅是个企业家,还是个太空游客——他是第一个前往太空旅行的独立非洲国家公民。 +**马克·理查德·沙特尔沃思(马克Richard Shuttleworth)** 是 Ubuntu 的创始人,也被称作 [Debian 背后的人][1]([之一][2])。他于 1973 年出生在南非的韦尔科姆(Welkom)。他不仅是个企业家,还是个太空游客——他是第一个前往太空旅行的非洲独立国家的公民。 -Mark 曾在 1996 年成立了 **Thawte**,一家互联网安全企业,那时他还只是 University of Cape Town(开普敦大学)的一名金融/IT学生。 +马克曾在 1996 年成立了一家名为 **Thawte** 的互联网商务安全公司,那时他还在开普敦大学( University of Cape Town)的学习金融和信息技术。 -2000 年,Mark 创立了 HBD,一家投资公司,同时他还创立了 Shuttleworth 基金会,致力于给社会中有创新性的领袖以奖金和投资等形式提供资助。 +2000 年,马克创立了 HBD(Here be Dragons (此处有龙/危险)的缩写,所以其吉祥物是一只龙),这是一家投资公司,同时他还创立了沙特尔沃思基金会(Shuttleworth Foundation),致力于给社会中有创新性的领袖以奖金和投资等形式提供资助。 - -> "移动设备对于个人电脑行业的未来而言至关重要。比如就在这个月,相对于平板电脑的发展而言,传统 PC 行业很明显正在萎缩。所以如果我们想要涉足个人电脑产业,我们必须首先涉足移动行业。移动产业之所以有趣,还因为在这里没有盗版 Windows 操作系统。所以如果你为你的操作系统赢得了一台设备的市场份额,这台设备会持续使用你的操作系统。在传统 PC 行业,我们时不时得和“免费”的 Windows 产生竞争,这是一种非常微妙的挑战。所以我们现在的重心是围绕 Ubuntu 和移动设备——手机和平板——以图与普通用户建立更深层次的联系。" +> "移动设备对于个人电脑行业的未来而言至关重要。比如就在这个月,相对于平板电脑的发展而言,传统 PC 行业很明显正在萎缩。所以如果我们想要涉足个人电脑产业,我们必须首先涉足移动行业。移动产业之所以有趣,是因为在这里没有盗版 Windows 操作系统的市场。所以如果你为你的操作系统赢得了一台设备的市场份额,这台设备会一直使用你的操作系统。在传统 PC 行业,我们时不时得和“免费”的 Windows 产生竞争,这是一种非常微妙的挑战。所以我们现在的重心是围绕 Ubuntu 和移动设备——手机和平板——以图与普通用户建立更深层次的联系。" > -> — Mark Shuttleworth +> — 马克·沙特尔沃思 -2002 年,他在俄罗斯的 Star City 接受了为期一年的训练,随后作为联盟号 TM-34 任务组的一员飞往了国际空间站。再后来,在发起面向有志于航空航天或者其相关学科的南非学生群体中推广科学、编程及数学的运动后,Mark 创立了 **Canonical Ltd**。此后直至2013年,他一直在领导 Ubuntu 操作系统的开发。 - - -现今,Shuttleworth 拥有英国与南非双重国籍并和 18 只可爱的鸭子住在英国的 Isle of Man 小岛上的一处花园,一同的还有他可爱的女友 Claire,两条黑母狗以及时不时经过的羊群。 +2002 年,他在俄罗斯的星城(Star City)接受了为期一年的训练,随后作为联盟号 TM-34 任务组的一员飞往了国际空间站。再后来,在面向有志于航空航天或者其相关学科的南非学生群体发起了推广科学、编程及数学的运动后,马克 创立了 **Canonical Ltd**。此后直至2013年,他一直在领导 Ubuntu 操作系统的开发。 +现今,Shuttleworth 拥有英国与南非双重国籍并和 18 只可爱的鸭子住在英国的 Isle of Man 小岛上的一处花园,一同的还有他可爱的女友 Claire,两条黑色母狗以及时不时经过的羊群。 > "电脑不仅仅是一台电子设备了。它现在是你思维的延续,以及通向他人的大门。" > -> — Mark Shuttleworth +> — 马克·沙特尔沃思 -### Mark Shuttleworth 的早年生活### -正如我们之前提到的,Mark 出生在南非的橙色自由州 Welkom。他是一名外科医生和护士学校教师的孩子。他在 Western Province Preparatory School 就读并在 1986 年成为了学生会主席,一个学期后就读于 Rondebosch 男子高中,再之后入学 Bishops/Diocesan 学院并在 1991 年再次成为那里的学生会主席。 +### 马克·沙特尔沃思的早年生活### -Mark 在 University of Cape Town 拿到了 Bachelor of Business Science degree in the Finance and Information Systems (译注:商业科学里的双学士学位,两个学科分别是金融和信息系统),他在学校就读时住在 Smuts Hall。作为学生,他也在那里帮助安装了学校的第一条宿舍网络。 +正如我们之前提到的,马克出生在南非的奥兰治自由邦(Orange Free State)的韦尔科姆(Welkom)。他是一名外科医生和护士学校教师的孩子。他在西部省预科学校就读并在 1986 年成为了学生会主席,一个学期后就读于 Rondebosch 男子高中,再之后入学 Bishops Diocesan 学院并在 1991 年再次成为那里的学生会主席。 + +马克在开普敦大学( University of Cape Town)拿到了金融和信息系统的商业科学双学士学位,他在学校就读时住在 Smuts Hall。作为学生,他也在那里帮助安装了学校的第一条宿舍互联网接入。 >“无数的企业和国家已经证明,引入开源政策能提高竞争力和效率。在不同层面上创造生产力对于公司和国家而言都是至关重要的。” > -> — Mark Shuttleworth +> — 马克·沙特尔沃思 -### Mark Shuttleworth 的职业生涯 ### +### 马克·沙特尔沃思的职业生涯 ### -Mark 在 1995 年创立了 Thawte,公司专注于数字证书和互联网安全,然后在 1999 年把公司卖给了 VeriSign,赚取了大约 5.75 亿美元。 +马克在 1995 年创立了 Thawte,公司专注于数字证书和互联网安全,然后在 1999 年把公司卖给了 VeriSign,赚取了大约 5.75 亿美元。 -2000 年,Mark 创立了 HBD 风险资本公司,这项事业成为了投资方和项目孵化器。2004 年,他创立了 Canonical Ltd. 以支持和鼓励自由软件开发项目的商业化,特别是 Ubuntu 操作系统的项目。直到 2009 年,Mark 才从 Canonical CEO 的位置上退下。 +2000 年,马克创立了 HBD 风险资本公司,成为了商业投资人和项目孵化器。2004 年,他创立了 Canonical Ltd. 以支持和鼓励自由软件开发项目的商业化,特别是 Ubuntu 操作系统的项目。直到 2009 年,马克才从 Canonical CEO 的位置上退下。 -> “在 [DDC](https://en.wikipedia.org/wiki/DCC_Alliance) (译者:一个 Debian GNU/Linux 开发者联盟) 的早期,我更倾向于让拥护者放手去做,看看能发展出什么。” +> “在 [DDC](https://en.wikipedia.org/wiki/DCC_Alliance) (LCTT 译注:一个 Debian GNU/Linux 开发者联盟) 的早期,我更倾向于让拥护者们放手去做,看看能发展出什么。” > -> — Mark Shuttleworth +> — 马克·沙特尔沃思 -### Linux、免费开源软件 与 Mark Shuttleworth ### +### Linux、免费开源软件与马克·沙特尔沃思 ### -在 90 年代末,Mark 曾作为一名开发者参与 Debian 操作系统项目。 +在 90 年代后期,马克曾作为一名开发者参与 Debian 操作系统项目。 -2001 年,Mark 创立了 Shuttleworth 基金会,这是个扎根南非的、非赢利性的基金会,专注于赞助社会创新、免费/教育用途开源软件,曾赞助过 Freedom Toaster。 +2001 年,马克创立了沙特尔沃思基金会,这是个扎根南非的、非赢利性的基金会,专注于赞助社会创新、免费/教育用途开源软件,曾赞助过[自由烤面包机][3](Freedom Toaster)(LCTT 译注:自由烤面包机是一个可以给用户带来的 CD/DVD 上刻录自由软件的公共信息亭)。 -2004 年,Mark 通过出资开发基于 Debian 的 Ubuntu 操作系统回归了自由软件界,这一切也经由他的 Canonical 公司完成。 +2004 年,马克通过出资开发基于 Debian 的 Ubuntu 操作系统返回了自由软件界,这一切也经由他的 Canonical 公司完成。 -2005 年,Mark 出资建立了 Ubuntu 基金会并投入了一千万美元作为启动资金。在 Ubuntu 项目内,Mark 经常被一个朗朗上口的名字称呼——“**SABDFL (Self-Appointed Benevolent Dictator for Life)**”。为了能够找到足够多的能手开发这个巨大的项目,Mark 花费了 6 个月的时间从 Debian 邮件列表里找到能手,这一切都是在他乘坐在南极洲的一艘破冰船——Kapitan Khlebnikov——上完成的。同年,Mark 买下了 Impi Linux 65% 的股份。 +2005 年,马克出资建立了 Ubuntu 基金会并投入了一千万美元作为启动资金。在 Ubuntu 项目内,马克经常被一个朗朗上口的名字称呼——“**SABDFL :自封的生命之仁慈独裁者(Self-Appointed Benevolent Dictator for Life)**”。为了能够找到足够多的高手开发这个巨大的项目,马克花费了 6 个月的时间从 Debian 邮件列表里寻找,这一切都是在他乘坐在南极洲的一艘破冰船——赫列布尼科夫船长号(Kapitan Khlebnikov)——上完成的。同年,马克买下了 Impi Linux 65% 的股份。 > “我呼吁电信公司的掌权者们尽快开发出跨洲际的高效信息传输服务。” > -> — Mark Shuttleworth +> — 马克·沙特尔沃思 -2006 年,KDE 宣布 Shuttleworth 成为第一位 **patron** 级别赞助者——彼时 KDE 最高级别的赞助。这一赞助协议在 2012 年终止,取而代之的是一个使用 KDE 作为默认桌面环境的 Ubuntu 变种——Kubuntu 的资金。 +2006 年,KDE 宣布沙特尔沃思成为 KDE 的**第一赞助人(first patron)**——彼时 KDE 最高级别的赞助。这一赞助协议在 2012 年终止,取而代之的是对 Kubuntu 的资金支持,这是一个使用 KDE 作为默认桌面环境的 Ubuntu 变种。 ![](http://www.unixmen.com/wp-content/uploads/2015/10/shuttleworth-kde.jpg) -2009 年,Shuttleworth 宣布他会从 CEO 退位以更好地关注合作伙伴,产品设计和顾客体验。从 2004 年起担任公司 COO 的 Jane Silber 晋升为 CEO。 +2009 年,Shuttleworth 宣布他会从 Canonical 的 CEO 上退位以更好地关注合作关系、产品设计和客户。从 2004 年起担任公司 COO 的珍妮·希比尔(Jane Silber)晋升为 CEO。 -2010 年,Mark 由于 Ubuntu 项目从 Open University 获得了荣誉学位。 +2010 年,马克由于其贡献而被开放大学(Open University)授予了荣誉学位。 -2012 年,Mark 和 Kenneth Rogoff 一同在牛津大学与 Peter Thiel 和 Garry Kasparov 就**创新悖论**(The Innovation Enigma)展开辩论。 +2012 年,马克和肯尼斯·罗格夫(Kenneth Rogoff)一同在牛津大学与彼得·蒂尔(Peter Thiel)和加里·卡斯帕罗夫(Garry Kasparov)就**创新悖论**(The Innovation Enigma)展开辩论。 -2013 年,Mark 和 Ubuntu 一同被授予**澳大利亚反个人隐私老大哥监控奖**(Austrian anti-privacy Big Brother Award),理由是 Ubuntu 会把 Unity 桌面的搜索框的搜索结果发往 Canonical 服务器(译注:因此侵犯了个人隐私)。而一年前,Mark 曾经申明过这一过程进行了匿名化处理。 +2013 年,马克和 Ubuntu 一同被授予**澳大利亚反个人隐私大哥奖**(Austrian anti-privacy Big Brother Award),理由是默认情况下, Ubuntu 会把 Unity 桌面的搜索框的搜索结果发往 Canonical 服务器(LCTT 译注:因此侵犯了个人隐私)。而一年前,马克曾经申明过这一过程进行了匿名化处理。 - -> “所有主流 PC 厂家现在都提供 Ubuntu 预安装选项。所以我们和业界的合作已经相当紧密了。但那些 PC 厂家对于给买家推广新东西这件事都很紧张。如果我们可以让买家习惯 Ubuntu 的桌面/平板/手机操作系统的体验,那他们也应该更愿意买预装 Ubuntu 的设备。因为没有哪个操作系统是通过抄袭模仿获得成功的。Android 很棒,但如果我们想成功的话我们必须给市场带去更新更好的东西(校注:而不是改进或者模仿 Android)。如果我们中没有人追寻未来的话,我们将陷入停滞不前的危险。但如果你尝试去追寻未来了,那你必须接受不是所有人对未来的预见都和你一样这一事实。” +> “所有主流 PC 厂家现在都提供 Ubuntu 预安装选项,所以我们和业界的合作已经相当紧密了。但那些 PC 厂家对于给买家推广新东西这件事都很紧张。如果我们可以让 PC 买家习惯 Ubuntu 的平板/手机操作系统的体验,那他们也应该更愿意买预装 Ubuntu 的 PC。没有哪个操作系统是通过抄袭模仿获得成功的,Android 很棒,但如果我们想成功的话我们必须给市场带去更新更好的东西(LCTT 译注:而不是改进或者模仿 Android)。如果我们中没有人追寻未来的话,我们将陷入停滞不前的危险。但如果你尝试去追寻未来了,那你必须接受不是所有人对未来的预见都和你一样这一事实。” > -> — Mark Shuttleworth +> — 马克·沙特尔沃思 -### Mark Shuttleworth 的太空之旅 ### - -Mark 在 2002 年作为世界第二名自费太空游客而闻名世界,同时他也是南非第一个旅行太空的人。这趟旅行中,Mark 作为俄罗斯联盟号 TM-34 任务的一名航空参与者加入,并为此支付了约两千万美元。2 天后,联盟号宇宙飞船抵达了国际空间站,在那里 Mark 呆了 8 天并参与了艾滋病和基因组研究的相关实验。同年晚些时候,Mark 随联盟号 TM-33 任务返回了地球。为了参与这趟旅行,Mark 花了一年时间准备与训练,其中有 7 个月居住在俄罗斯的 Start City。 +### 马克·沙特尔沃思的太空之旅 ### +马克在 2002 年作为世界第二名自费太空游客而闻名世界,同时他也是南非第一个旅行太空的人。这趟旅行中,马克作为俄罗斯联盟号 TM-34 任务的一名乘员加入,并为此支付了约两千万美元。2 天后,联盟号宇宙飞船抵达了国际空间站,在那里马克呆了 8 天并参与了艾滋病和基因组研究的相关实验。同年晚些时候,马克随联盟号 TM-33 任务返回了地球。为了参与这趟旅行,马克花了一年时间准备与训练,其中有 7 个月居住在俄罗斯的星城。 ![](http://www.unixmen.com/wp-content/uploads/2015/10/Mark-Shuttleworth1.jpg) -在太空中,Mark 与 Nelson Mandela 和另一个南非女孩 Michelle Foster (她问 Mark 要不要娶她)通过无线电进行了交谈。Mark 回避了结婚问题,在换话题之前他说他感到很荣幸。身患绝症的 Forster 和 Nelson Mandela 通过 Dream 基金会的赞助获得了与 Mark 交谈的机会。 +在太空中,马克与纳尔逊·曼德拉(Nelson Mandela)和另一个 14 岁的南非女孩米歇尔·福斯特(Michelle Foster) (她问马克要不要娶她)通过无线电进行了交谈。马克礼貌地回避了这个结婚问题,在巧妙地改换话题之前他说他感到很荣幸。身患绝症的女孩福斯特通过梦想基金会( Dream foundation)的赞助获得了与马克和纳尔逊·曼德拉交谈的机会。 -归来后,Mark 在世界各地做了旅行,并和各地的学生就太空之旅发表了感言。 +归来后,马克在世界各地做了旅行,并和各地的学生就太空之旅发表了感言。 - ->“粗略的统计数据表明 Ubuntu 的实际用户依然在增长。而我们的合作方——Dell、HP、Lenovo 和其他硬件生产商,以及游戏厂商 EA、Valve 都在加入我们——这让我觉得我们在关键的领域继续领先。” +>“粗略的统计数据表明 Ubuntu 的实际用户依然在增长。而我们的合作方——戴尔、惠普、联想和其他硬件生产商,以及游戏厂商 EA、Valve 都在加入我们——这让我觉得我们在关键的领域继续领先。” > -> — Mark Shuttleworth +> — 马克·沙特尔沃思 -### Mark Shuttleworth 的交通工具 ### +### 马克·沙特尔沃思的交通工具 ### -Mark 有他自己的私人客机 Bombardier Global Express。虽然它经常被称为 Canonical 一号,但事实上此飞机是通过 HBD 风险投资公司注册拥有的。飞机侧面的龙图案涂装是 HBD 风投公司的吉祥物 Norman。 +马克有他自己的私人客机庞巴迪全球特快(Bombardier Global Express),虽然它经常被称为 Canonical 一号,但事实上此飞机是通过 HBD 风险投资公司注册拥有的。涂画在飞机侧面的龙图案是 HBD 风投公司的吉祥物 ,名叫 Norman。 -### 与南非储蓄银行的法律冲突 ### +![](http://www.leader.co.za/leadership/logos/logomarkshuttleworthdirectory_31ce.gif) -在从南非转移 25 亿南非兰特去往 Isle of Man 的过程中,南非储蓄银行征收了 2.5 亿南非兰特的税金。Mark 上诉了,经过冗长的法庭唇枪舌战,南非储蓄银行被勒令返还 2.5 亿征税,以及其利息。Mark 宣布他会把这 2.5 亿存入信托基金,以用于帮助上诉宪法法院的案子。 +### 与南非储备银行的法律冲突 ### + +在从南非转移 25 亿南非兰特去往 Isle of Man 的过程中,南非储备银行征收了 2.5 亿南非兰特的税金。马克上诉了,经过冗长的法庭唇枪舌战,南非储备银行被勒令返还 2.5 亿征税,以及其利息。马克宣布他会把这 2.5 亿存入信托基金,以用于帮助那些上诉到宪法法院的案子。 > “离境征税倒也不和宪法冲突。但离境征税的主要目的不是提高税收,而是通过监管资金流出来保护本国经济。” @@ -105,14 +103,15 @@ Mark 有他自己的私人客机 Bombardier Global Express。虽然它经常被 2015 年,南非宪法法院修正了低级法院的判决结果,并宣布了上述对于离岸征税的理解。 -### Mark Shuttleworth 喜欢的东西 ### +### 马克·沙特尔沃思喜欢的东西 ### -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. +Cesária Évora、mp3、春天、切尔西(Chelsea)、“恍然大悟”(finally seeing something obvious for first time)、回家、辛纳屈(Sinatra)、白日梦、暮后小酌、挑逗、苔丝(d’Urberville)、弦理论、Linux、粒子物理、Python、转世、米格-29、雪、旅行、Mozilla、酸橙果酱、激情代价(body shots)、非洲丛林、豹、拉贾斯坦邦、俄罗斯桑拿、单板滑雪、失重、Iain m 银行、宽度、阿拉斯泰尔·雷诺兹(Alastair Reynolds)、化装舞会服装、裸泳、灵机一动、肾上腺素激情消退、莫名(the inexplicable)、活动顶篷式汽车、Clifton、国家公路、国际空间站、机器学习、人工智能、维基百科、Slashdot、风筝冲浪(kitesurfing)和 Manx lanes。 -### Shuttleworth 不喜欢的东西 ### -Admin, salary negotiations, legalese, and public speaking. -(校对:和程序猿不喜欢 PM 一个道理?) + +### 马克·沙特尔沃思不喜欢的东西 ### + +行政、涨工资、法律术语和公众演讲。 -------------------------------------------------------------------------------- @@ -120,8 +119,11 @@ via: http://www.unixmen.com/mark-shuttleworth-man-behind-ubuntu-operating-system 作者:[M.el Khamlichi][a] 译者:[Moelf](https://github.com/Moelf) -校对:[PurlingNayuki](https://github.com/PurlingNayuki) +校对:[PurlingNayuki](https://github.com/PurlingNayuki), [wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/pirat9/ +[1]:https://wiki.debian.org/PeopleBehindDebian +[2]:https://raphaelhertzog.com/2011/11/17/people-behind-debian-mark-shuttleworth-ubuntus-founder/ +[3]:https://en.wikipedia.org/wiki/Freedom_Toaster \ No newline at end of file From 3d20813c1ba8ba15bd78c6e7010116fca05d6117 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jun 2016 06:10:30 +0800 Subject: [PATCH 1656/1710] =?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 --- ...Raspberry Pi projects for the classroom.md | 98 ------------------- 1 file changed, 98 deletions(-) delete mode 100644 translated/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md diff --git a/translated/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/translated/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md deleted file mode 100644 index 06191d551c..0000000000 --- a/translated/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md +++ /dev/null @@ -1,98 +0,0 @@ -5 个适合课堂教学的树莓派项目 -================================================================================ -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png) - -图片来源 : opensource.com - -### 1. Minecraft Pi ### - -![](https://opensource.com/sites/default/files/lava.png) - -上图由树莓派基金会提供。遵循 [CC BY-SA 4.0.][1] 协议。 - -Minecraft(我的世界)几乎是世界上每个青少年都极其喜爱的游戏 —— 在吸引年轻人注意力方面,它也是最具创意的游戏之一。伴随着每一个树莓派的游戏版本不仅仅是一个关于创造性思维的建筑游戏,它还带有一个编程接口,允许使用者通过 Python 代码来与 Minecraft 世界进行互动。 - -对于教师来说,Minecraft: Pi 版本是一个鼓励学生们解决遇到的问题以及通过书写代码来执行特定任务的极好方式。你可以使用 Python API - 来建造一所房子,让它跟随你到任何地方;或在你所到之处修建一座桥梁;又或者是下一场岩溶雨;或在天空中显示温度;以及其他任何你能想像到的事物。 - -可在 "[Minecraft Pi 入门][2]" 中了解更多相关内容。 - -### 2. 反应游戏和交通指示灯 ### - -![](https://opensource.com/sites/default/files/pi_traffic_installed_yellow_led_on.jpg) - -上图由 [Low Voltage Labs][3] 提供。遵循 [CC BY-SA 4.0][1] 协议。 - -在树莓派上进行物理计算是非常容易的 —— 只需将 LED 灯 和按钮连接到 GPIO 针脚上,再加上少量的代码,你就可以点亮 LED 灯并通过按按钮来控制物体。一旦你知道来执行基本操作的代码,下一步就可以随你的想像那样去做了! - -假如你知道如何让一盏灯闪烁,你就可以让三盏灯闪烁。选出三盏交通灯颜色的 LED 灯,你就可以编程出交通灯闪烁序列。假如你知道如何使用一个按钮来触发一个事件,然后你就有一个人行横道了!同时,你还可以找到诸如 [PI-TRAFFIC][4]、[PI-STOP][5]、[Traffic HAT][6] 等预先构建好的交通灯插件。 - -这不总是关于代码的 —— 它还可以被用来作为一个的练习,用以理解真实世界中的系统是如何被设计出来的。计算思维在生活中的各种情景中都是一个有用的技能。 - -![](https://opensource.com/sites/default/files/reaction-game.png) - -上图由树莓派基金会提供。遵循 [CC BY-SA 4.0][1] 协议。 - -下面尝试将两个按钮和一个 LED 灯连接起来,来制作一个二人制反应游戏 —— 让灯在一段随机的时间中点亮,然后看谁能够先按到按钮! - -想了解更多的话,请查看 [GPIO 新手指南][7]。你所需要的尽在 [CamJam EduKit 1][8]。 - -### 3. Sense HAT 像素宠物 ### - -Astro Pi— 一个增强版的树莓派 —将于今年 12 月(注:应该是去年的事了。)问世,但你并没有错过让你的手玩弄硬件的机会。Sense HAT 是一个用在 Astro Pi 任务中的感应器主板插件,且任何人都可以买到。你可以用它来做数据收集、科学实验、游戏或者更多。 观看下面这个由树莓派的 Carrie Anne 带来的 Gurl Geek Diaries 录像来开始一段美妙的旅程吧 —— 通过在 Sense HAT 的显示器上展现出你自己设计的一个动物像素宠物: - -注:youtube 视频 - - -在 "[探索 Sense HAT][9]" 中可以学到更多。 - -### 4. 红外鸟箱 ### - -![](https://opensource.com/sites/default/files/ir-bird-box.png) -上图由 [Low Voltage Labs][3] 提供。遵循 [CC BY-SA 4.0][1] 协议。 - -让全班所有同学都能够参与进来的一个好的练习是 —— 在一个鸟箱中沿着某些红外线放置一个树莓派和 NoIR 照相模块,这样你就可以在黑暗中观看,然后通过网络或在网络中你可以从树莓派那里获取到视频流。等鸟进入笼子,然后你就可以在不打扰到它们的情况下观察它们。 - -在这期间,你可以学习到所有关于红外和光谱的知识,以及如何用软件来调整摄像头的焦距和控制它。 - -在 "[制作一个红外鸟箱][10]" 中你可以学到更多。 - -### 5. 机器人 ### - -![](https://opensource.com/sites/default/files/edukit3_1500-alex-eames-sm.jpg) - -上图由 Low Voltage Labs 提供。遵循 [CC BY-SA 4.0][1] 协议。 - -拥有一个树莓派,一些感应器和一个感应器控制电路板,你就可以构建你自己的机器人。你可以制作各种类型的机器人,从用透明胶带和自制底盘组合在一起的简易四驱车,一直到由游戏控制器驱动的具有自我意识,带有传感器和摄像头的金属马儿。 - -学习如何直接去控制单个的发动机,例如通过 RTK Motor Controller Board (£8/$12),或者尝试新的 CamJam robotics kit (£17/$25) ,它带有发动机、轮胎和一系列的感应器 — 这些都很有价值并很有学习的潜力。 - -另外,如何你喜欢更为骨灰级别的东西,可以尝试 PiBorg 的 [4Borg][11] (£99/$150) 或 [DiddyBorg][12] (£180/$273) 或者一干到底,享受他们的 DoodleBorg 金属版 (£250/$380) — 并构建一个他们声名远扬的 [DoodleBorg tank][13](很不幸的时,这个没有卖的) 的迷你版。 - -另外请参考 [CamJam robotics kit worksheets][14]。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/education/15/12/5-great-raspberry-pi-projects-classroom - -作者:[Ben Nuttall][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/bennuttall -[1]:https://creativecommons.org/licenses/by-sa/4.0/ -[2]:https://opensource.com/life/15/5/getting-started-minecraft-pi -[3]:http://lowvoltagelabs.com/ -[4]:http://lowvoltagelabs.com/products/pi-traffic/ -[5]:http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390 -[6]:https://ryanteck.uk/hats/1-traffichat-0635648607122.html -[7]:http://pythonhosted.org/gpiozero/recipes/ -[8]:http://camjam.me/?page_id=236 -[9]:https://opensource.com/life/15/10/exploring-raspberry-pi-sense-hat -[10]:https://www.raspberrypi.org/learning/infrared-bird-box/ -[11]:https://www.piborg.org/4borg -[12]:https://www.piborg.org/diddyborg -[13]:https://www.piborg.org/doodleborg -[14]:http://camjam.me/?page_id=1035#worksheets From 43f4e88ce27b1d9f9b518309eb93d8fbd4af4cb6 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jun 2016 06:31:25 +0800 Subject: [PATCH 1657/1710] PUB:20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE @alim0x --- ...- NEW GENERATION OF LINUX APPS ARE HERE.md | 60 ++++++++----------- 1 file changed, 26 insertions(+), 34 deletions(-) rename {translated/tech => published}/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md (62%) diff --git a/translated/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md b/published/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md similarity index 62% rename from translated/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md rename to published/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md index cc212e7a4c..4f31e9ed63 100644 --- a/translated/tech/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md +++ b/published/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md @@ -5,19 +5,19 @@ ORB:新一代 Linux 应用 我们之前讨论过[在 Ubuntu 上离线安装应用][1]。我们现在要再次讨论它。 -[Orbital Apps][2] 给我们带来了新的软件包类型,**ORB**,它带有便携软件,交互式安装向导支持,以及离线使用的能力。 +[Orbital Apps][2] 给我们带来了一种新的软件包类型 **ORB**,它具有便携软件、交互式安装向导支持,以及离线使用的能力。 -便携软件很方便。主要是因为它们能够无需任何管理员权限直接运行,也能够带着所有的设置和数据随U盘存储。而交互式的安装向导也能让我们轻松地安装应用。 +便携软件很方便。主要是因为它们能够无需任何管理员权限直接运行,也能够带着所有的设置和数据随 U 盘存储。而交互式的安装向导也能让我们轻松地安装应用。 -### 开放可运行包 OPEN RUNNABLE BUNDLE (ORB) +### 开放式可运行的打包(OPEN RUNNABLE BUNDLE) (ORB) -ORB 是一个免费和开源的包格式,它和其它包格式在很多方面有所不同。ORB 的一些特性: +ORB 是一个自由开源的包格式,它和其它包格式在很多方面有所不同。ORB 的一些特性: -- **压缩**:所有的包经过压缩,使用 squashfs,体积最多减少 60%。 -- **便携模式**:如果一个便携 ORB 应用是从可移动设备运行的,它会把所有设置和数据存储在那之上。 +- **压缩**:所有的包都经过 squashfs 压缩,体积最多可减少 60%。 +- **便携模式**:如果一个便携 ORB 应用是在可移动设备上运行的,它会把所有设置和数据存储在那之上。 - **安全**:所有的 ORB 包使用 PGP/RSA 签名,通过 TLS 1.2 分发。 - **离线**:所有的依赖都打包进软件包,所以不再需要下载依赖。 -- **开放包**:ORB 包可以作为 ISO 镜像挂载。 +- **开放式软件包**:ORB 软件包可以作为 ISO 镜像挂载。 ### 种类 @@ -26,77 +26,69 @@ ORB 应用现在有两种类别: - 便携软件 - SuperDEB -#### 1. 便携 ORB 软件 +### 1. 便携 ORB 软件 -便携 ORB 软件可以立即运行而不需要任何的事先安装。那意味着它不需要管理员权限和依赖!你可以直接从 Orbital Apps 网站下载下来就能使用。 +便携 ORB 软件可以立即运行而不需要任何的事先安装。这意味着它不需要管理员权限,也没有依赖!你可以直接从 Orbital Apps 网站下载下来就能使用。 -并且由于它支持便携模式,你可以将它拷贝到U盘携带。它所有的设置和数据会和它一起存储在U盘。只需将U盘连接到任何运行 Ubuntu 16.04 的机器上就行了。 +并且由于它支持便携模式,你可以将它拷贝到 U 盘携带。它所有的设置和数据会和它一起存储在 U 盘。只需将 U 盘连接到任何运行 Ubuntu 16.04 的机器上就行了。 -##### 可用便携软件 +#### 可用便携软件 目前有超过 35 个软件以便携包的形式提供,包括一些十分流行的软件,比如:[Deluge][3],[Firefox][4],[GIMP][5],[Libreoffice][6],[uGet][7] 以及 [VLC][8]。 完整的可用包列表可以查阅 [便携 ORB 软件列表][9]。 -##### 使用便携软件 +#### 使用便携软件 按照以下步骤使用便携 ORB 软件: - 从 Orbital Apps 网站下载想要的软件包。 -- 将其移动到想要的位置(本地磁盘/U盘)。 +- 将其移动到想要的位置(本地磁盘/U 盘)。 - 打开存储 ORB 包的目录。 -![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-1-1024x576.jpg) - + ![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-1-1024x576.jpg) - 打开 ORB 包的属性。 -![](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-2.jpg) ->给 ORB 包添加运行权限 + ![给 ORB 包添加运行权限](http://itsfoss.com/wp-content/uploads/2016/05/using-portable-orb-app-2.jpg) - 在权限标签页添加运行权限。 - 双击打开它。 等待几秒,让它准备好运行。大功告成。 -#### 2. SuperDEB +### 2. SuperDEB 另一种类型的 ORB 软件是 SuperDEB。SuperDEB 很简单,交互式安装向导能够让软件安装过程顺利得多。如果你不喜欢从终端或软件中心安装软件,superDEB 就是你的菜。 最有趣的部分是你安装时不需要一个互联网连接,因为所有的依赖都由安装向导打包了。 -##### 可用的 SuperDEB +#### 可用的 SuperDEB 超过 60 款软件以 SuperDEB 的形式提供。其中一些流行的有:[Chromium][10],[Deluge][3],[Firefox][4],[GIMP][5],[Libreoffice][6],[uGet][7] 以及 [VLC][8]。 完整的可用 SuperDEB 列表,参阅 [SuperDEB 列表][11]。 -##### 使用 SuperDEB 安装向导 +#### 使用 SuperDEB 安装向导 - 从 Orbital Apps 网站下载需要的 SuperDEB。 - 像前面一样给它添加**运行权限**(属性 > 权限)。 - 双击 SuperDEB 安装向导并按下列说明操作: -![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-1.png) ->点击 OK + ![点击 OK](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-1.png) -![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-2.png) ->输入你的密码并继续 + ![输入你的密码并继续](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-2.png) -![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-3.png) ->它会开始安装… + ![它会开始安装…](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-3.png) -![](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-4.png) ->一会儿他就完成了… + ![一会儿它就完成了…](http://itsfoss.com/wp-content/uploads/2016/05/Using-SuperDEB-Installer-4.png) - 完成安装之后,你就可以正常使用了。 ### ORB 软件兼容性 -从 Orbital Apps 可知,它们完全适配 Ubuntu 16.04 [64 bit]。 +从 Orbital Apps 可知,它们完全适配 Ubuntu 16.04 [64 位]。 ->阅读建议:[如何在 Ubuntu 获知你的是电脑 32 位还是 64 位的][12]。 - -至于其它发行版兼容性不受保证。但我们可以说,它在所有 Ubuntu 16.04 衍生版(UbuntuMATE,UbuntuGNOME,Lubuntu,Xubuntu 等)以及基于 Ubuntu 16.04 的发行版(比如即将到来的 Linux Mint 18)上都适用。我们现在还不清楚 Orbital Apps 是否有计划拓展它的支持到其它版本 Ubuntu 或 Linux 发行版上。 +至于其它发行版兼容性则不受保证。但我们可以说,它在所有 Ubuntu 16.04 衍生版(UbuntuMATE,UbuntuGNOME,Lubuntu,Xubuntu 等)以及基于 Ubuntu 16.04 的发行版(比如即将到来的 Linux Mint 18)上都适用。我们现在还不清楚 Orbital Apps 是否有计划拓展它的支持到其它版本 Ubuntu 或 Linux 发行版上。 如果你在你的系统上经常使用便携 ORB 软件,你可以考虑安装 ORB 启动器。它不是必需的,但是推荐安装它以获取更佳的体验。最简短的 ORB 启动器安装流程是打开终端输入以下命令: @@ -116,11 +108,11 @@ wget -O - https://www.orbital-apps.com/orb.sh | bash ---------------------------------- -via: http://itsfoss.com/orb-linux-apps/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 +via: http://itsfoss.com/orb-linux-apps/ 作者:[Munif Tanjim][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 01ae32507b400e0096ad041392ef4d0daedb63da Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 29 Jun 2016 07:10:36 +0800 Subject: [PATCH 1658/1710] [bazz2 translating]Building Serverless App with Docker --- sources/tech/20160621 Building Serverless App with Docker.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160621 Building Serverless App with Docker.md b/sources/tech/20160621 Building Serverless App with Docker.md index 9791ee5aa6..efedc85ffd 100644 --- a/sources/tech/20160621 Building Serverless App with Docker.md +++ b/sources/tech/20160621 Building Serverless App with Docker.md @@ -1,3 +1,4 @@ +[bazz222222222] BUILDING SERVERLESS APPS WITH DOCKER ====================================== From 24fb3deab47cbe2d233d6fa4c71f242adc06503e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jun 2016 08:17:32 +0800 Subject: [PATCH 1659/1710] PUB:20160510 65% of companies are contributing to open source projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Cathon 翻译的不错,语言组织很好。 --- ...es are contributing to open source projects.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) rename {translated/talk => published}/20160510 65% of companies are contributing to open source projects.md (70%) diff --git a/translated/talk/20160510 65% of companies are contributing to open source projects.md b/published/20160510 65% of companies are contributing to open source projects.md similarity index 70% rename from translated/talk/20160510 65% of companies are contributing to open source projects.md rename to published/20160510 65% of companies are contributing to open source projects.md index 03290b0e97..46939a4e3a 100644 --- a/translated/talk/20160510 65% of companies are contributing to open source projects.md +++ b/published/20160510 65% of companies are contributing to open source projects.md @@ -3,11 +3,11 @@ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUSINESS_openseries.png?itok=s7lXChId) -今年 Black Duck 和 North Bridge 发布了第十届年度开源软件前景调查,来检验开源软件的发展趋势。今年这份调查的亮点在于,当前主流社会对开源软件的接受程度以及过去的十年中人们对开源软件态度的变化。 +今年 Black Duck 和 North Bridge 发布了第十届年度开源软件前景调查,来调查开源软件的发展趋势。今年这份调查的亮点在于,当前主流社会对开源软件的接受程度以及过去的十年中人们对开源软件态度的变化。 -[2016 年的开源软件前景调查][1],分析了来自约3400位专家的反馈。今年的调查中,开发者发表了他们的看法,包括了大约 70% 的参与者。数据显示,安全专家的参与人数呈指数级增长,增长超过 450% 。他们的参与表明,开源社区开始逐渐关注开源软件中存在的安全问题,以及当新的技术出现时确保它们的安全性。 +[2016 年的开源软件前景调查][1],分析了来自约3400位专家的反馈。今年的调查中,开发者发表了他们的看法,大约 70% 的参与者是开发者。数据显示,安全专家的参与人数呈指数级增长,增长超过 450% 。他们的参与表明,开源社区开始逐渐关注开源软件中存在的安全问题,以及当新的技术出现时确保它们的安全性。 -Black Duck 的年度 [开源新秀奖][2] 涉及到一些新出现的技术,如 Docker 和 Kontena 容器。容器技术这一年有了巨大的发展 ———— 76% 的受访者表示,他们的企业有一些使用容器技术的规划。而 59% 的受访者正准备使用容器技术完成大量的部署,从开发与测试,到内部与外部的生产环境部署。开发者社区已经把容器技术作为一种简单快速开发的方法。 +Black Duck 的[年度开源新秀奖][2] 涉及到一些新出现的技术,如容器方面的 Docker 和 Kontena。容器技术这一年有了巨大的发展 ———— 76% 的受访者表示,他们的企业有一些使用容器技术的规划。而 59% 的受访者正准备使用容器技术完成大量的部署,从开发与测试,到内部与外部的生产环境部署。开发者社区已经把容器技术作为一种简单快速开发的方法。 调查显示,几乎每个组织都有开发者致力于开源软件,这一点毫不惊讶。当像微软和苹果这样的大公司将它们的一些解决方案开源时,开发者就获得了更多的机会来参与开源项目。我非常希望这样的趋势会延续下去,让更多的软件开发者无论在工作中,还是工作之余都可以致力于开源项目。 @@ -30,11 +30,11 @@ Black Duck 的年度 [开源新秀奖][2] 涉及到一些新出现的技术, #### 安全和管理 -一流的开源安全与管理实践的发展,并没有跟上人们使用开源不断增长的步伐。尽管备受关注的开源项目近年来爆炸式地增长,调查结果却指出: +一流的开源安全与管理实践的发展,也没有跟上人们使用开源不断增长的步伐。尽管备受关注的开源项目近年来爆炸式地增长,调查结果却指出: * 50% 的企业在选择和批准开源代码这方面没有出台正式的政策。 * 47% 的企业没有正式的流程来跟踪开源代码,这就限制了它们对开源代码的了解,以及控制开源代码的能力。 -* 超过三分之一的企业没有用于识别,跟踪,和修复重大开源安全漏洞的流程。 +* 超过三分之一的企业没有用于识别、跟踪和修复重大开源安全漏洞的流程。 #### 不断增长的开源参与者 @@ -45,16 +45,17 @@ Black Duck 的年度 [开源新秀奖][2] 涉及到一些新出现的技术, * 约三分之一的企业有专门为开源项目设置的全职岗位。 * 59% 的受访者参与开源项目以获得竞争优势。 -Black Duck 和 North Bridge 从今年的调查中了解了很多,如安全,政策,商业模式等。我们很兴奋能够分享这些新发现。感谢我们的合作者,以及所有参与我们调查的受访者。这是一个伟大的十年,我很高兴我们可以肯定地说,开源的未来充满了无限可能。 +Black Duck 和 North Bridge 从今年的调查中了解到了很多,如安全,政策,商业模式等。我们很兴奋能够分享这些新发现。感谢我们的合作者,以及所有参与我们调查的受访者。这是一个伟大的十年,我很高兴我们可以肯定地说,开源的未来充满了无限可能。 想要了解更多内容,可以查看完整的[调查结果][3]。 + -------------------------------------------------------------------------------- via: https://opensource.com/business/16/5/2016-future-open-source-survey 作者:[Haidee LeClair][a] 译者:[Cathon](https://github.com/Cathon) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) [a]: https://opensource.com/users/blackduck2016 [1]: http://www.slideshare.net/blackducksoftware/2016-future-of-open-source-survey-results From a221770db74f303f528d0f1d2a1b27813ace74d8 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 29 Jun 2016 08:56:30 +0800 Subject: [PATCH 1660/1710] [translated] Building Serverless App with Docker --- ...621 Building Serverless App with Docker.md | 100 ------------------ ...621 Building Serverless App with Docker.md | 98 +++++++++++++++++ 2 files changed, 98 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20160621 Building Serverless App with Docker.md create mode 100644 translated/tech/20160621 Building Serverless App with Docker.md diff --git a/sources/tech/20160621 Building Serverless App with Docker.md b/sources/tech/20160621 Building Serverless App with Docker.md deleted file mode 100644 index efedc85ffd..0000000000 --- a/sources/tech/20160621 Building Serverless App with Docker.md +++ /dev/null @@ -1,100 +0,0 @@ -[bazz222222222] -BUILDING SERVERLESS APPS WITH DOCKER -====================================== - -Every now and then, there are waves of technology that threaten to make the previous generation of technology obsolete. There has been a lot of talk about a technique called “serverless” for writing apps. The idea is to deploy your application as a series of functions, which are called on-demand when they need to be run. You don’t need to worry about managing servers, and these functions scale as much as you need, because they are called on-demand and run on a cluster. - -But serverless doesn’t mean there is no Docker – in fact, Docker is serverless. You can use Docker to containerize these functions, then run them on-demand on a Swarm. Serverless is a technique for building distributed apps and Docker is the perfect platform for building them on. - -### From servers to serverless - -So how might we write applications like this? Let’s take our example [a voting application consisting of 5 services][1]: - -![](https://blog.docker.com/wp-content/uploads/Picture1.png) - -This consists of: - -- Two web frontends -- A worker for processing votes in the background -- A message queue for processing votes -- A database - -The background processing of votes is a very easy target for conversion to a serverless architecture. In the voting app, we can run a bit of code like this to run the background task: - -``` -import dockerrun -client = dockerrun.from_env() -client.run("bfirsh/serverless-record-vote-task", [voter_id, vote], detach=True) -``` - -The worker and message queue can be replaced with a Docker container that is run on-demand on a Swarm, automatically scaling to demand. - -We can even eliminate the web frontends. We can replace them with Docker containers that serve up a single HTTP request, triggered by a lightweight HTTP server that spins up Docker containers for each HTTP request. The heavy lifting has now moved the long-running HTTP server to Docker containers that run on-demand, so they can automatically scale to handle load. - -Our new architecture looks something like this: - -![](https://blog.docker.com/wp-content/uploads/Picture2.png) - -The red blocks are the continually running services and the green blocks are Docker containers that are run on-demand. This application has fewer long-running services that need managing, and by its very nature scales up automatically in response to demand (up to the size of your Swarm!). - -### So what can we do with this? - -There are three useful techniques here which you can use in your apps: - -1. Run functions in your code as on-demand Docker containers -2. Use a Swarm to run these on a cluster -3. Run containers from containers, by passing a Docker API socket - - -With the combination of these techniques, this opens up loads of possibilities about how you can architect your applications. Running background work is a great example of something that works well, but a whole load of other things are possible too, for example: - -- Launching a container to serve user-facing HTTP requests is probably not practical due to the latency. However – you could write a load balancer which knew how to auto-scale its own web frontends by running containers on a Swarm. -- A MongoDB container which could introspect the structure of a Swarm and launch the correct shards and replicas. - -### What’s next - -We’ve got all these radically new tools and abstractions for building apps, and we’ve barely scratched the surface of what is possible with them. We’re still building applications like we have servers that stick around for a long time, not for the future where we have Swarms that can run code on-demand anywhere in your infrastructure. - -This hopefully gives you some ideas about what you can build, but we also need your help. We have all the fundamentals to be able to start building these applications, but its still in its infrancy – we need better tooling, libraries, example apps, documentation, and so on. - -[This GitHub repository has links off to tools, libraries, examples, and blog posts][3]. Head over there if you want to learn more, and please contribute any links you have there so we can start working together on this. - -Get involved, and happy hacking! - -### Learn More about Docker - -- New to Docker? Try our 10 min [online tutorial][4] -- Share images, automate builds, and more with [a free Docker Hub account][5] -- Read the Docker [1.12 Release Notes][6] -- Subscribe to [Docker Weekly][7] -- Sign up for upcoming [Docker Online Meetups][8] -- Attend upcoming [Docker Meetups][9] -- Watch [DockerCon EU 2015 videos][10] -- Start [contributing to Docker][11] - - --------------------------------------------------------------------------------- - -via: https://blog.docker.com/2016/06/building-serverless-apps-with-docker/ - -作者:[Ben Firshman][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://blog.docker.com/author/bfirshman/ - -[1]: https://github.com/docker/example-voting-app -[3]: https://github.com/bfirsh/serverless-docker -[4]: https://docs.docker.com/engine/understanding-docker/ -[5]: https://hub.docker.com/ -[6]: https://docs.docker.com/release-notes/ -[7]: https://www.docker.com/subscribe_newsletter/ -[8]: http://www.meetup.com/Docker-Online-Meetup/ -[9]: https://www.docker.com/community/meetup-groups -[10]: https://www.youtube.com/playlist?list=PLkA60AVN3hh87OoVra6MHf2L4UR9xwJkv -[11]: https://docs.docker.com/contributing/contributing/ - - - diff --git a/translated/tech/20160621 Building Serverless App with Docker.md b/translated/tech/20160621 Building Serverless App with Docker.md new file mode 100644 index 0000000000..9af6c5d7aa --- /dev/null +++ b/translated/tech/20160621 Building Serverless App with Docker.md @@ -0,0 +1,98 @@ +用 docker 创建 serverless 应用 +====================================== + +当今世界会时不时地出现一波科技浪潮,将以前的技术拍死在海滩上。针对 serverless 应用的概念我们已经谈了很多,它是指将你的应用程序按功能来部署,这些功能在被用到时才会启动。你不用费心去管理服务器和程序规模,因为它们会在需要的时候在一个集群中启动并运行。 + +但是 serverless 并不意味着没有 Docker 什么事儿,事实上 Docker 就是 serverless 的。你可以使用 Docker 来容器化这些功能,然后在 Swarm 中按需求来运行它们。Serverless 是一项构建分布式应用的技术,而 Docker 是它们完美的构建平台。 + +### 从 servers 到 serverless + +那如何才能写一个 serverless 应用呢?来看一下我们的例子,[5个服务组成的投票系统][1]: + +![](https://blog.docker.com/wp-content/uploads/Picture1.png) + +投票系统由下面5个服务组成: + +- 两个 web 前端 +- 一个后台处理投票的进程 +- 一个计票的消息队列 +- 一个数据库 + +后台处理投票的进程很容易转换成 serverless 构架,我们可以使用以下代码来实现: + +``` +import dockerrun +client = dockerrun.from_env() +client.run("bfirsh/serverless-record-vote-task", [voter_id, vote], detach=True) +``` + +这个投票处理进程和消息队列可以用运行在 Swarm 上的 Docker 容器来代替,并实现按需自动部署。 + +我们也可以用容器替换 web 前端,使用一个轻量级 HTTP 服务器来触发容器响应一个 HTTP 请求。Docker 容器代替长期运行的 HTTP 服务器来挑起响应请求的重担,这些容器可以自动扩容来支撑大访问量。 + +新的架构就像这样: + +![](https://blog.docker.com/wp-content/uploads/Picture2.png) + +红色框内是持续运行的服务,绿色框内是按需启动的容器。这个架构提供更少的长期运行服务让你管理,并且可以自动扩容(最大容量由你的 Swarm 决定)。 + +### 我们可以做点什么? + +你可以在你的应用中使用3种技术: + +1. 在 Docker 容器中按需运行代码。 +2. 使用 Swarm 来部署集群。 +3. 通过使用 Docker API 套接字在容器中运行容器。 + +结合这3种技术,你可以有很多方法搭建你的应用架构。用这种方法来部署后台环境真是非常有效,而在另一些场景,也可以这么玩,比如说: + +- 由于存在延时,使用容器实现面向用户的 HTTP 请求可能不是很合适,但你可以写一个负载均衡器,使用 Swarm 来对自己的 web 前端进行自动扩容。 +- 实现一个 MongoDB 容器,可以自检 Swarm 并且启动正确的分片和副本(LCTT 译注:分片技术为大规模并行检索提供支持,副本技术则是为数据提供冗余)。 + +### 下一步怎么做 + +我们提供了这些前卫的工具和概念来构建应用,并没有深入发掘它们的功能。我们的架构里还是存在长期运行的服务,将来我们需要使用 Swarm 来把所有服务都用按需扩容的方式实现 + +希望本文能在你搭建架构时给你一些启发,但我们还是需要你的帮助。我们提供了所有的基本工具,但它们还不是很完善,我们需要更多更好的工具、库、应用案例、文档以及其他资料。 + +[我们在这里发布了工具、库和文档][3]。如果想了解更多,请移步到那里,另外请贡献一些链接给我们,这样我们就能一直工作了。 + +玩得愉快。 + +### 更多关于 Docker 的资料 + +- New to Docker? Try our 10 min [online tutorial][4] +- Share images, automate builds, and more with [a free Docker Hub account][5] +- Read the Docker [1.12 Release Notes][6] +- Subscribe to [Docker Weekly][7] +- Sign up for upcoming [Docker Online Meetups][8] +- Attend upcoming [Docker Meetups][9] +- Watch [DockerCon EU 2015 videos][10] +- Start [contributing to Docker][11] + + +-------------------------------------------------------------------------------- + +via: https://blog.docker.com/2016/06/building-serverless-apps-with-docker/ + +作者:[Ben Firshman][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://blog.docker.com/author/bfirshman/ + +[1]: https://github.com/docker/example-voting-app +[3]: https://github.com/bfirsh/serverless-docker +[4]: https://docs.docker.com/engine/understanding-docker/ +[5]: https://hub.docker.com/ +[6]: https://docs.docker.com/release-notes/ +[7]: https://www.docker.com/subscribe_newsletter/ +[8]: http://www.meetup.com/Docker-Online-Meetup/ +[9]: https://www.docker.com/community/meetup-groups +[10]: https://www.youtube.com/playlist?list=PLkA60AVN3hh87OoVra6MHf2L4UR9xwJkv +[11]: https://docs.docker.com/contributing/contributing/ + + + From 9d63106e2b0aceae38d4ad550ba0a66d206175d5 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 29 Jun 2016 09:44:46 +0800 Subject: [PATCH 1661/1710] =?UTF-8?q?20160629-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o record your terminal session on Linux.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/tech/20160609 How to record your terminal session on Linux.md diff --git a/sources/tech/20160609 How to record your terminal session on Linux.md b/sources/tech/20160609 How to record your terminal session on Linux.md new file mode 100644 index 0000000000..787bafea6d --- /dev/null +++ b/sources/tech/20160609 How to record your terminal session on Linux.md @@ -0,0 +1,101 @@ +How to record your terminal session on Linux +================================================= + +Recording a terminal session may be important in helping someone learn a process, sharing information in an understandable way, and also presenting a series of commands in a proper manner. Whatever the purpose, there are many times when copy-pasting text from the terminal won't be very helpful while capturing a video of the process is quite far-fetched and may not be always possible. In this quick guide, we will take a look at the easiest way to record and share a terminal session in .gif format. + +### Prerequisites + +If you just want to record your terminal sessions and be able to play the recording in your terminal, or share them with people who will use a terminal for playback, then the only tool that you'll need is called “ttyrec”. Ubuntu users may install it by inserting the following command on a terminal: + +``` +sudo apt-get install ttyrec +``` + +If you want to produce a .gif file from the recording and be able to share it with people who don't use the terminal, publish it on websites, or simply keep a .gif handy for when you'll need it instead of written commands, you will have to install two additional packages. The first one is “imagemagick” which you can install with: + +``` +sudo apt-get install imagemagick +``` + +and the second one is “tty2gif” which can be downloaded from here. The latter has a dependency that can be satisfied with: +sudo apt-get install python-opster + +### Capturing + +To start capturing the terminal session, all you need to do is simply start with “ttyrec” + enter. This will launch the real-time recording tool which will run in the background until we enter “exit” or we press “Ctrl+D”. By default, ttyrec creates a file named “ttyrecord” on the destination of the terminal session which by default is “Home”. + +![](https://www.howtoforge.com/images/how-to-record-your-terminal-session-on-linux/pic_1.jpg) + +![](https://www.howtoforge.com/images/how-to-record-your-terminal-session-on-linux/pic_2.jpg) + +![](https://www.howtoforge.com/images/how-to-record-your-terminal-session-on-linux/pic_3.jpg) + +### Playing + +Playing the file is as simple as opening a terminal on the destination of the “ttyrecord” file and using the “ttyplay” command followed by the name of the recording (in our case it's ttyrecord but you may change this into whatever you want). + +![](https://www.howtoforge.com/images/how-to-record-your-terminal-session-on-linux/pic_4.jpg) + +This will result in the playback of the recorded session, in real-time, and with typing corrections included (all actions are recorded). This will look like a completely normal automated terminal session, but the commands and their apparent execution are obviously not really applied to the system, as they are only reproduced as a recording. + +It is also important to note that the playback of the terminal session recording is completely controllable. You may double the playback speed by hitting the “+” button, slow it down with the “-” button, pause it with “0”, and resume it in normal speed with “1”. + +### Converting into a .gif + +For reasons of convenience, many of us would like to convert the recorded session into a .gif file, and that is very easy to do. Here's how: + +First, untar the downloaded “tty2gif.tar.bz2” by opening a terminal in the download location and entering the following command: + +``` +tar xvfj tty2gif.tar.bz2 +``` + +Next, copy the resulting “tty2gif.py file onto the destination of the “ttyrecord” file (or whatever the name you've specified is), and then open a terminal on that destination and type the command: + +``` +python tty2gif.py typing ttyrecord +``` + +If you are getting errors in this step, check that you have installed the “python-opster” package. If errors persist, give the following two commands consecutively: + +``` +sudo apt-get install xdotool +export WINDOWID=$(xdotool getwindowfocus) +``` + +then repeat the “python tty2gif.py typing ttyrecord ” and you should now see a number of gif files that were created on the location of the “ttyrecord” + +![](https://www.howtoforge.com/images/how-to-record-your-terminal-session-on-linux/pic_5.jpg) + +The next step is to unify all these gifs that correspond to individual terminal session actions into one final .gif file using the imagemagick utility. To do this, open a terminal on the destination and insert the following command: + +``` +convert -delay 25 -loop 0 *.gif example.gif +``` + +![](https://www.howtoforge.com/images/how-to-record-your-terminal-session-on-linux/pic_6.jpg) + +You may name the resulting file as you like (I used “example.gif”), and you may change the delay and loop settings as needed. Here is the resulting file of this quick tutorial: + +![](https://www.howtoforge.com/images/how-to-record-your-terminal-session-on-linux/example.gif) + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/how-to-record-your-terminal-session-on-linux/ + +作者:[Bill Toulas][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twitter.com/howtoforgecom + + + + + + + + + From dd518199f8bb4eec6cdfd1c473a6b3011820b36c Mon Sep 17 00:00:00 2001 From: Chunyang Wen Date: Wed, 29 Jun 2016 09:56:39 +0800 Subject: [PATCH 1662/1710] chunyang-wen translating --- ...art 4 - How to Use Comparison Operators with Awk in Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md b/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md index 7f3a46360f..1d0ef007af 100644 --- a/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md +++ b/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md @@ -1,3 +1,5 @@ +chunyang-wen translating + How to Use Comparison Operators with Awk in Linux =================================================== From b3bdf02802b0a892b687d8101b23706e5d1d88e2 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Wed, 29 Jun 2016 10:21:02 +0800 Subject: [PATCH 1663/1710] Update Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ... to Filter Text or Strings Using Pattern Specific Actions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md b/sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md index f6aeb69e57..acdfe66167 100644 --- a/sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md +++ b/sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md @@ -1,3 +1,5 @@ +FSSlc translating + How to Use Awk to Filter Text or Strings Using Pattern Specific Actions ========================================================================= From e0f40f33d812b7909173bf8a6bb9e84e5a8218dc Mon Sep 17 00:00:00 2001 From: kokialoves <498497353@qq.com> Date: Wed, 29 Jun 2016 11:09:16 +0800 Subject: [PATCH 1664/1710] =?UTF-8?q?Update=20Part=206=20-=20How=20to=20Us?= =?UTF-8?q?e=20=E2=80=98next=E2=80=99=20Command=20with=20Awk=20in=20Linux.?= =?UTF-8?q?md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md b/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md index f272dabcce..5ae8cca086 100644 --- a/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md +++ b/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md @@ -1,4 +1,4 @@ -How to Use ‘next’ Command with Awk in Linux +[translating]How to Use ‘next’ Command with Awk in Linux ============================================= ![](http://www.tecmint.com/wp-content/uploads/2016/06/Use-next-Command-with-Awk-in-Linux.png) From e3803263a8902b17072cdb09ac545ca2c1a6216c Mon Sep 17 00:00:00 2001 From: wwy Date: Wed, 29 Jun 2016 12:06:59 +0800 Subject: [PATCH 1665/1710] [Translated] Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files (#4120) * finish translation * check again * remove source --- ...sions to Filter Text or String in Files.md | 214 ------------------ ...sions to Filter Text or String in Files.md | 212 +++++++++++++++++ 2 files changed, 212 insertions(+), 214 deletions(-) delete mode 100644 sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md create mode 100644 translated/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md diff --git a/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md b/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md deleted file mode 100644 index 6871673536..0000000000 --- a/sources/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md +++ /dev/null @@ -1,214 +0,0 @@ -translating by wwy-hust - -How to Use Awk and Regular Expressions to Filter Text or String in Files -============================================================================= - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Linux-Awk-Command-Examples.png) - -When we run certain commands in Unix/Linux to read or edit text from a string or file, we most times try to filter output to a given section of interest. This is where using regular expressions comes in handy. - -### What are Regular Expressions? - -A regular expression can be defined as a strings that represent several sequence of characters. One of the most important things about regular expressions is that they allow you to filter the output of a command or file, edit a section of a text or configuration file and so on. - -### Features of Regular Expression - -Regular expressions are made of: - -- Ordinary characters such as space, underscore(_), A-Z, a-z, 0-9. -- Meta characters that are expanded to ordinary characters, they include: - - `(.)` it matches any single character except a newline. - - `(*)` it matches zero or more existences of the immediate character preceding it. - - `[ character(s) ]` it matches any one of the characters specified in character(s), one can also use a hyphen (-) to mean a range of characters such as [a-f], [1-5], and so on. - - `^` it matches the beginning of a line in a file. - - `$` matches the end of line in a file. - - `\` it is an escape character. - -In order to filter text, one has to use a text filtering tool such as awk. You can think of awk as a programming language of its own. But for the scope of this guide to using awk, we shall cover it as a simple command line filtering tool. - -The general syntax of awk is: - -``` -# awk 'script' filename -``` - -Where `'script'` is a set of commands that are understood by awk and are execute on file, filename. - -It works by reading a given line in the file, makes a copy of the line and then executes the script on the line. This is repeated on all the lines in the file. - -The `'script'` is in the form `'/pattern/ action'` where pattern is a regular expression and the action is what awk will do when it finds the given pattern in a line. - -### How to Use Awk Filtering Tool in Linux - -In the following examples, we shall focus on the meta characters that we discussed above under the features of awk. - -#### A simple example of using awk: - -The example below prints all the lines in the file /etc/hosts since no pattern is given. - -``` -# awk '//{print}'/etc/hosts -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Awk-Command-Example.gif) ->Awk Prints all Lines in a File - -#### Use Awk with Pattern: - -I the example below, a pattern `localhost` has been given, so awk will match line having localhost in the `/etc/hosts` file. - -``` -# awk '/localhost/{print}' /etc/hosts -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-Command-with-Pattern.gif) ->Awk Print Given Matching Line in a File - -#### Using Awk with (.) wild card in a Pattern - -The `(.)` will match strings containing loc, localhost, localnet in the example below. - -That is to say *** l some_single_character c ***. - -``` -# awk '/l.c/{print}' /etc/hosts -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-with-Wild-Cards.gif) ->Use Awk to Print Matching Strings in a File - -#### Using Awk with (*) Character in a Pattern - -It will match strings containing localhost, localnet, lines, capable, as in the example below: - -``` -# awk '/l*c/{print}' /etc/localhost -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Match-Strings-in-File.gif) ->Use Awk to Match Strings in File - -You will also realize that `(*)` tries to a get you the longest match possible it can detect. - -Let look at a case that demonstrates this, take the regular expression `t*t` which means match strings that start with letter `t` and end with `t` in the line below: - -``` -this is tecmint, where you get the best good tutorials, how to's, guides, tecmint. -``` - -You will get the following possibilities when you use the pattern `/t*t/`: - -``` -this is t -this is tecmint -this is tecmint, where you get t -this is tecmint, where you get the best good t -this is tecmint, where you get the best good tutorials, how t -this is tecmint, where you get the best good tutorials, how tos, guides, t -this is tecmint, where you get the best good tutorials, how tos, guides, tecmint -``` - -And `(*)` in `/t*t/` wild card character allows awk to choose the the last option: - -``` -this is tecmint, where you get the best good tutorials, how to's, guides, tecmint -``` - -#### Using Awk with set [ character(s) ] - -Take for example the set [al1], here awk will match all strings containing character a or l or 1 in a line in the file /etc/hosts. - -``` -# awk '/[al1]/{print}' /etc/hosts -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Matching-Character.gif) ->Use-Awk to Print Matching Character in File - -The next example matches strings starting with either `K` or `k` followed by `T`: - -``` -# awk '/[Kk]T/{print}' /etc/hosts -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Matched-String-in-File.gif) ->Use Awk to Print Matched String in File - -#### Specifying Characters in a Range - -Understand characters with awk: - -- `[0-9]` means a single number -- `[a-z]` means match a single lower case letter -- `[A-Z]` means match a single upper case letter -- `[a-zA-Z]` means match a single letter -- `[a-zA-Z 0-9]` means match a single letter or number - -Lets look at an example below: - -``` -# awk '/[0-9]/{print}' /etc/hosts -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-To-Print-Matching-Numbers-in-File.gif) ->Use Awk To Print Matching Numbers in File - -All the line from the file /etc/hosts contain at least a single number [0-9] in the above example. - -#### Use Awk with (^) Meta Character - -It matches all the lines that start with the pattern provided as in the example below: - -``` -# awk '/^fe/{print}' /etc/hosts -# awk '/^ff/{print}' /etc/hosts -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-All-Matching-Lines-with-Pattern.gif) ->Use Awk to Print All Matching Lines with Pattern - -#### Use Awk with ($) Meta Character - -It matches all the lines that end with the pattern provided: - -``` -# awk '/ab$/{print}' /etc/hosts -# awk '/ost$/{print}' /etc/hosts -# awk '/rs$/{print}' /etc/hosts -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Given-Pattern-String.gif) ->Use Awk to Print Given Pattern String - -#### Use Awk with (\) Escape Character - -It allows you to take the character following it as a literal that is to say consider it just as it is. - -In the example below, the first command prints out all line in the file, the second command prints out nothing because I want to match a line that has $25.00, but no escape character is used. - -The third command is correct since a an escape character has been used to read $ as it is. - -``` -# awk '//{print}' deals.txt -# awk '/$25.00/{print}' deals.txt -# awk '/\$25.00/{print}' deals.txt -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-with-Escape-Character.gif) ->Use Awk with Escape Character - -### Summary - -That is not all with the awk command line filtering tool, the examples above a the basic operations of awk. In the next parts we shall be advancing on how to use complex features of awk. Thanks for reading through and for any additions or clarifications, post a comment in the comments section. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/use-linux-awk-command-to-filter-text-string-in-files/ - -作者:[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/ diff --git a/translated/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md b/translated/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md new file mode 100644 index 0000000000..791c349f56 --- /dev/null +++ b/translated/tech/awk/Part 1 - How to Use Awk and Regular Expressions to Filter Text or String in Files.md @@ -0,0 +1,212 @@ +如何使用Awk和正则表达式过滤文本或文件中的字符串 +============================================================================= + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Linux-Awk-Command-Examples.png) + +当我们在 Unix/Linux 下使用特定的命令从字符串或文件中读取或编辑文本时,我们经常会尝试过滤输出以得到感兴趣的部分。这时正则表达式就派上用场了。 + +### 什么是正则表达式? + +正则表达式可以定义为代表若干个字符序列的字符串。它最重要的功能就是它允许你过滤一条命令或一个文件的输出,编辑文本或配置等文件的一部分。 + +### 正则表达式的特点 + +正则表达式由以下内容组合而成: + +- 普通的字符,例如空格、下划线、A-Z、a-z、0-9。 +- 可以扩展为普通字符的元字符,它们包括: + - `(.)` 它匹配除了换行符外的任何单个字符。 + - `(*)` 它匹配零个或多个在其之前的立即字符。 + - `[ character(s) ]` 它匹配任何由 character(s) 指定的一个字符,你可以使用连字符(-)代表字符区间,例如 [a-f]、[1-5]等。 + - `^` 它匹配文件中一行的开头。 + - `$` 它匹配文件中一行的结尾。 + - `\` 这是一个转义字符。 + +你必须使用类似 awk 这样的文本过滤工具来过滤文本。你还可以把 awk 当作一个用于自身的编程语言。但由于这个指南的适用范围是关于使用 awk 的,我会按照一个简单的命令行过滤工具来介绍它。 + +awk 的一般语法如下: + +``` +# awk 'script' filename +``` + +此处 `'script'` 是一个由 awk 使用并应用于 filename 的命令集合。 + +它通过读取文件中的给定的一行,复制该行的内容并在该行上执行脚本的方式工作。这个过程会在该文件中的所有行上重复。 + +该脚本 `'script'` 中内容的格式是 `'/pattern/ action'`,其中 `pattern` 是一个正则表达式,而 `action` 是当 awk 在该行中找到此模式时应当执行的动作。 + +### 如何在 Linux 中使用 Awk 过滤工具 + +在下面的例子中,我们将聚焦于之前讨论过的元字符。 + +#### 一个使用 awk 的简单示例: + +下面的例子打印文件 /etc/hosts 中的所有行,因为没有指定任何的模式。 + +``` +# awk '//{print}'/etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Awk-Command-Example.gif) +>Awk 打印文件中的所有行 + +#### 结合模式使用 Awk + +在下面的示例中,指定了模式 `localhost`,因此 awk 将匹配文件 `/etc/hosts` 中有 `localhost` 的那些行。 + +``` +# awk '/localhost/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-Command-with-Pattern.gif) +>Awk 打印文件中匹配模式的行 + +#### 在 Awk 模式中使用通配符 (.) + +在下面的例子中,符号 `(.)` 将匹配包含 loc、localhost、localnet 的字符串。 + +这里的意思是匹配 *** l 一些单个字符 c ***。 + +``` +# awk '/l.c/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-with-Wild-Cards.gif) +>使用 Awk 打印文件中匹配模式的字符串 + +#### 在 Awk 模式中使用字符 (*) + +在下面的例子中,将匹配包含 localhost、localnet、lines, capable 的字符串。 + +``` +# awk '/l*c/{print}' /etc/localhost +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Match-Strings-in-File.gif) +>使用 Awk 匹配文件中的字符串 + +你可能也意识到 `(*)` 将会尝试匹配它可能检测到的最长的匹配。 + +让我们看一看可以证明这一点的例子,正则表达式 `t*t` 的意思是在下面的行中匹配以 `t` 开始和 `t` 结束的字符串: + +``` +this is tecmint, where you get the best good tutorials, how to's, guides, tecmint. +``` + +当你使用模式 `/t*t/` 时,会得到如下可能的结果: + +``` +this is t +this is tecmint +this is tecmint, where you get t +this is tecmint, where you get the best good t +this is tecmint, where you get the best good tutorials, how t +this is tecmint, where you get the best good tutorials, how tos, guides, t +this is tecmint, where you get the best good tutorials, how tos, guides, tecmint +``` + +在 `/t*t/` 中的通配符 `(*)` 将使得 awk 选择匹配的最后一项: + +``` +this is tecmint, where you get the best good tutorials, how to's, guides, tecmint +``` + +#### 结合集合 [ character(s) ] 使用 Awk + +以集合 [al1] 为例,awk 将匹配文件 /etc/hosts 中所有包含字符 a 或 l 或 1 的字符串。 + +``` +# awk '/[al1]/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Matching-Character.gif) +>使用 Awk 打印文件中匹配的字符 + +下一个例子匹配以 `K` 或 `k` 开始头,后面跟着一个 `T` 的字符串: + +``` +# awk '/[Kk]T/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Matched-String-in-File.gif) +>使用 Awk 打印文件中匹配的字符 + +#### 以范围的方式指定字符 + +awk 所能理解的字符: + +- `[0-9]` 代表一个单独的数字 +- `[a-z]` 代表一个单独的小写字母 +- `[A-Z]` 代表一个单独的大写字母 +- `[a-zA-Z]` 代表一个单独的字母 +- `[a-zA-Z 0-9]` 代表一个单独的字母或数字 + +让我们看看下面的例子: + +``` +# awk '/[0-9]/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-To-Print-Matching-Numbers-in-File.gif) +>使用 Awk 打印文件中匹配的数字 + +在上面的例子中,文件 /etc/hosts 中的所有行都至少包含一个单独的数字 [0-9]。 + +#### 结合元字符 (\^) 使用 Awk + +在下面的例子中,它匹配所有以给定模式开头的行: + +``` +# awk '/^fe/{print}' /etc/hosts +# awk '/^ff/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-All-Matching-Lines-with-Pattern.gif) +>使用 Awk 打印与模式匹配的行 + +#### 结合元字符 ($) 使用 Awk + +它将匹配所有以给定模式结尾的行: + +``` +# awk '/ab$/{print}' /etc/hosts +# awk '/ost$/{print}' /etc/hosts +# awk '/rs$/{print}' /etc/hosts +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Print-Given-Pattern-String.gif) +>使用 Awk 打印与模式匹配的字符串 + +#### 结合转义字符 (\\) 使用 Awk + +它允许你将该转义字符后面的字符作为文字,即理解为其字面的意思。 + +在下面的例子中,第一个命令打印出文件中的所有行,第二个命令中我想匹配具有 $25.00 的一行,但我并未使用转义字符,因而没有打印出任何内容。 + +第三个命令是正确的,因为一个这里使用了一个转义字符以转义 $,以将其识别为 '$'(而非元字符)。 + +``` +# awk '//{print}' deals.txt +# awk '/$25.00/{print}' deals.txt +# awk '/\$25.00/{print}' deals.txt +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-with-Escape-Character.gif) +>结合转义字符使用 Awk + +### 总结 + +以上内容并不是 Awk 命令用做过滤工具的全部,上述的示例均是 awk 的基础操作。在下面的章节中,我将进一步介绍如何使用 awk 的高级功能。感谢您的阅读,请在评论区贴出您的评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/use-linux-awk-command-to-filter-text-string-in-files/ + +作者:[Aaron Kili][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/aaronkili/ From 97bf6bf4c369dffe7d241e6b4e84aff02c4005fc Mon Sep 17 00:00:00 2001 From: kokialoves <498497353@qq.com> Date: Wed, 29 Jun 2016 16:11:16 +0800 Subject: [PATCH 1666/1710] merge (#4124) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Delete Part 6 - How to Use ‘next’ Command with Awk in Linux.md * Add files via upload * Create Part 6 - How to Use ‘next’ Command with Awk in Linux.md --- ...to Use ‘next’ Command with Awk in Linux.md | 76 ------------------- ...to Use ‘next’ Command with Awk in Linux.md | 76 +++++++++++++++++++ 2 files changed, 76 insertions(+), 76 deletions(-) delete mode 100644 sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md create mode 100644 translated/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md diff --git a/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md b/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md deleted file mode 100644 index 5ae8cca086..0000000000 --- a/sources/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md +++ /dev/null @@ -1,76 +0,0 @@ -[translating]How to Use ‘next’ Command with Awk in Linux -============================================= - -![](http://www.tecmint.com/wp-content/uploads/2016/06/Use-next-Command-with-Awk-in-Linux.png) - -In this sixth part of Awk series, we shall look at using `next` command, which tells Awk to skip all remaining patterns and expressions that you have provided, but instead read the next input line. - -The `next` command helps you to prevent executing what I would refer to as time-wasting steps in a command execution. - -To understand how it works, let us consider a file called food_list.txt that looks like this: - -``` -Food List Items -No Item_Name Price Quantity -1 Mangoes $3.45 5 -2 Apples $2.45 25 -3 Pineapples $4.45 55 -4 Tomatoes $3.45 25 -5 Onions $1.45 15 -6 Bananas $3.45 30 -``` - -Consider running the following command that will flag food items whose quantity is less than or equal to 20 with a `(*)` sign at the end of each line: - -``` -# awk '$4 <= 20 { printf "%s\t%s\n", $0,"*" ; } $4 > 20 { print $0 ;} ' food_list.txt - -No Item_Name Price Quantity -1 Mangoes $3.45 5 * -2 Apples $2.45 25 -3 Pineapples $4.45 55 -4 Tomatoes $3.45 25 -5 Onions $1.45 15 * -6 Bananas $3.45 30 -``` - -The command above actually works as follows: - -- First, it checks whether the quantity, fourth field of each input line is less than or equal to 20, if a value meets that condition, it is printed and flagged with the `(*)` sign at the end using expression one: `$4 <= 20` -- Secondly, it checks if the fourth field of each input line is greater than 20, and if a line meets the condition it gets printed using expression two: `$4 > 20` - -But there is one problem here, when the first expression is executed, a line that we want to flag is printed using: `{ printf "%s\t%s\n", $0,"**" ; }` and then in the same step, the second expression is also checked which becomes a time wasting factor. - -So there is no need to execute the second expression, `$4 > 20` again after printing already flagged lines that have been printed using the first expression. - -To deal with this problem, you have to use the `next` command as follows: - -``` -# awk '$4 <= 20 { printf "%s\t%s\n", $0,"*" ; next; } $4 > 20 { print $0 ;} ' food_list.txt - -No Item_Name Price Quantity -1 Mangoes $3.45 5 * -2 Apples $2.45 25 -3 Pineapples $4.45 55 -4 Tomatoes $3.45 25 -5 Onions $1.45 15 * -6 Bananas $3.45 30 -``` - -After a single input line is printed using `$4 <= 20` `{ printf "%s\t%s\n", $0,"*" ; next ; }`, the `next` command included will help skip the second expression `$4 > 20` `{ print $0 ;}`, so execution goes to the next input line without having to waste time on checking whether the quantity is greater than 20. - -The next command is very important is writing efficient commands and where necessary, you can always use to speed up the execution of a script. Prepare for the next part of the series where we shall look at using standard input (STDIN) as input for Awk. - -Hope you find this how to guide helpful and you can as always put your thoughts in writing by leaving a comment in the comment section below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/use-next-command-with-awk-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/ diff --git a/translated/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md b/translated/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md new file mode 100644 index 0000000000..8ead60bd44 --- /dev/null +++ b/translated/tech/awk/Part 6 - How to Use ‘next’ Command with Awk in Linux.md @@ -0,0 +1,76 @@ + +如何使用AWK的‘next’命令 +============================================= + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Use-next-Command-with-Awk-in-Linux.png) + +在Awk 系列的第六章, 我们来看一下`next`命令 ,它告诉 Awk 跳过你所提供的表达式而是读取下一个输入行. +`next` 命令帮助你阻止运行多余的步骤. + +要明白它是如何工作的, 让我们来分析一下food_list.txt它看起来像这样 : + +``` +Food List Items +No Item_Name Price Quantity +1 Mangoes $3.45 5 +2 Apples $2.45 25 +3 Pineapples $4.45 55 +4 Tomatoes $3.45 25 +5 Onions $1.45 15 +6 Bananas $3.45 30 +``` + +运行下面的命令,它将在每个食物数量小于或者等于20的行后面标一个星号: + +``` +# awk '$4 <= 20 { printf "%s\t%s\n", $0,"*" ; } $4 > 20 { print $0 ;} ' food_list.txt + +No Item_Name Price Quantity +1 Mangoes $3.45 5 * +2 Apples $2.45 25 +3 Pineapples $4.45 55 +4 Tomatoes $3.45 25 +5 Onions $1.45 15 * +6 Bananas $3.45 30 +``` + +上面的命令实际运行如下: + +- 首先, 它用`$4 <= 20`表达式检查每个输入行的第四列是否小于或者等于20,如果满足条件, 它将在末尾打一个星号 `(*)` . +- 接着, 它用`$4 > 20`表达式检查每个输入行的第四列是否大于20,如果满足条件,显示出来. + +但是这里有一个问题, 当第一个表达式用`{ printf "%s\t%s\n", $0,"**" ; }`命令进行标注的时候在同样的步骤第二个表达式也进行了判断这样就浪费了时间. + +因此当我们已经用第一个表达式打印标志行的时候就不在需要用第二个表达式`$4 > 20`再次打印. + +要处理这个问题, 我们需要用到`next` 命令: + +``` +# awk '$4 <= 20 { printf "%s\t%s\n", $0,"*" ; next; } $4 > 20 { print $0 ;} ' food_list.txt + +No Item_Name Price Quantity +1 Mangoes $3.45 5 * +2 Apples $2.45 25 +3 Pineapples $4.45 55 +4 Tomatoes $3.45 25 +5 Onions $1.45 15 * +6 Bananas $3.45 30 +``` + +当输入行用`$4 <= 20` `{ printf "%s\t%s\n", $0,"*" ; next ; }`命令打印以后,`next`命令 将跳过第二个`$4 > 20` `{ print $0 ;}`表达式, 继续判断下一个输入行,而不是浪费时间继续判断一下是不是当前输入行还大于20. + +next命令在编写高效的命令脚本时候是非常重要的, 它可以很大的提高脚本速度. 下面我们准备来学习Awk的下一个系列了. + +希望这篇文章对你有帮助,你可以给我们留言. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/use-next-command-with-awk-in-linux/ + +作者:[Aaron Kili][a] +译者:[kokialoves](https://github.com/kokialoves) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.tecmint.com/author/aaronkili/ From 51d14dd0b753206579be37ebff71c03fca0bf772 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jun 2016 16:43:20 +0800 Subject: [PATCH 1667/1710] PUB:20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System @Moelf @PurlingNayuki --- ...th--The Man Behind Ubuntu Operating System.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/talk => published}/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md (80%) diff --git a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md b/published/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md similarity index 80% rename from translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md rename to published/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md index b40048201b..b5923ca86a 100644 --- a/translated/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md +++ b/published/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md @@ -3,21 +3,21 @@ ![](http://www.unixmen.com/wp-content/uploads/2015/10/Mark-Shuttleworth-652x445.jpg) -**马克·理查德·沙特尔沃思(马克Richard Shuttleworth)** 是 Ubuntu 的创始人,也被称作 [Debian 背后的人][1]([之一][2])。他于 1973 年出生在南非的韦尔科姆(Welkom)。他不仅是个企业家,还是个太空游客——他是第一个前往太空旅行的非洲独立国家的公民。 +**马克·理查德·沙特尔沃思(Mark Richard Shuttleworth)** 是 Ubuntu 的创始人,也被称作 [Debian 背后的人][1]([之一][2])。他于 1973 年出生在南非的韦尔科姆(Welkom)。他不仅是个企业家,还是个太空游客——他是第一个前往太空旅行的非洲独立国家的公民。 马克曾在 1996 年成立了一家名为 **Thawte** 的互联网商务安全公司,那时他还在开普敦大学( University of Cape Town)的学习金融和信息技术。 -2000 年,马克创立了 HBD(Here be Dragons (此处有龙/危险)的缩写,所以其吉祥物是一只龙),这是一家投资公司,同时他还创立了沙特尔沃思基金会(Shuttleworth Foundation),致力于给社会中有创新性的领袖以奖金和投资等形式提供资助。 +2000 年,马克创立了 HBD(Here be Dragons (此处有龙/危险)的缩写,所以其吉祥物是一只龙),这是一家投资公司,同时他还创立了沙特尔沃思基金会(Shuttleworth Foundation),致力于以奖金和投资等形式给社会中有创新性的领袖提供资助。 -> "移动设备对于个人电脑行业的未来而言至关重要。比如就在这个月,相对于平板电脑的发展而言,传统 PC 行业很明显正在萎缩。所以如果我们想要涉足个人电脑产业,我们必须首先涉足移动行业。移动产业之所以有趣,是因为在这里没有盗版 Windows 操作系统的市场。所以如果你为你的操作系统赢得了一台设备的市场份额,这台设备会一直使用你的操作系统。在传统 PC 行业,我们时不时得和“免费”的 Windows 产生竞争,这是一种非常微妙的挑战。所以我们现在的重心是围绕 Ubuntu 和移动设备——手机和平板——以图与普通用户建立更深层次的联系。" +> “移动设备对于个人电脑行业的未来而言至关重要。比如就在这个月,相对于平板电脑的发展而言,传统 PC 行业很明显正在萎缩。所以如果我们想要涉足个人电脑产业,我们必须首先涉足移动行业。移动产业之所以有趣,是因为在这里没有盗版 Windows 操作系统的市场。所以如果你为你的操作系统赢得了一台设备的市场份额,这台设备会一直使用你的操作系统。在传统 PC 行业,我们时不时得和“免费”的 Windows 产生竞争,这是一种非常微妙的挑战。所以我们现在的重心是围绕 Ubuntu 和移动设备——手机和平板——以图与普通用户建立更深层次的联系。” > > — 马克·沙特尔沃思 2002 年,他在俄罗斯的星城(Star City)接受了为期一年的训练,随后作为联盟号 TM-34 任务组的一员飞往了国际空间站。再后来,在面向有志于航空航天或者其相关学科的南非学生群体发起了推广科学、编程及数学的运动后,马克 创立了 **Canonical Ltd**。此后直至2013年,他一直在领导 Ubuntu 操作系统的开发。 -现今,Shuttleworth 拥有英国与南非双重国籍并和 18 只可爱的鸭子住在英国的 Isle of Man 小岛上的一处花园,一同的还有他可爱的女友 Claire,两条黑色母狗以及时不时经过的羊群。 +现今,沙特尔沃思拥有英国与南非双重国籍并和 18 只可爱的鸭子住在英国的 Isle of Man 小岛上的一处花园,一同的还有他可爱的女友 Claire,两条黑色母狗以及时不时经过的羊群。 -> "电脑不仅仅是一台电子设备了。它现在是你思维的延续,以及通向他人的大门。" +> “电脑不仅仅是一台电子设备了。它现在是你思维的延续,以及通向他人的大门。” > > — 马克·沙特尔沃思 @@ -41,7 +41,7 @@ > > — 马克·沙特尔沃思 -### Linux、免费开源软件与马克·沙特尔沃思 ### +### Linux、自由开源软件与马克·沙特尔沃思 ### 在 90 年代后期,马克曾作为一名开发者参与 Debian 操作系统项目。 @@ -49,7 +49,7 @@ 2004 年,马克通过出资开发基于 Debian 的 Ubuntu 操作系统返回了自由软件界,这一切也经由他的 Canonical 公司完成。 -2005 年,马克出资建立了 Ubuntu 基金会并投入了一千万美元作为启动资金。在 Ubuntu 项目内,马克经常被一个朗朗上口的名字称呼——“**SABDFL :自封的生命之仁慈独裁者(Self-Appointed Benevolent Dictator for Life)**”。为了能够找到足够多的高手开发这个巨大的项目,马克花费了 6 个月的时间从 Debian 邮件列表里寻找,这一切都是在他乘坐在南极洲的一艘破冰船——赫列布尼科夫船长号(Kapitan Khlebnikov)——上完成的。同年,马克买下了 Impi Linux 65% 的股份。 +2005 年,马克出资建立了 Ubuntu 基金会并投入了一千万美元作为启动资金。在 Ubuntu 项目内,人们经常用一个朗朗上口的名字称呼他——“**SABDFL :自封的生命之仁慈独裁者(Self-Appointed Benevolent Dictator for Life)**”。为了能够找到足够多的高手开发这个巨大的项目,马克花费了 6 个月的时间从 Debian 邮件列表里寻找,这一切都是在他乘坐在南极洲的一艘破冰船——赫列布尼科夫船长号(Kapitan Khlebnikov)——上完成的。同年,马克买下了 Impi Linux 65% 的股份。 > “我呼吁电信公司的掌权者们尽快开发出跨洲际的高效信息传输服务。” @@ -78,7 +78,7 @@ ![](http://www.unixmen.com/wp-content/uploads/2015/10/Mark-Shuttleworth1.jpg) -在太空中,马克与纳尔逊·曼德拉(Nelson Mandela)和另一个 14 岁的南非女孩米歇尔·福斯特(Michelle Foster) (她问马克要不要娶她)通过无线电进行了交谈。马克礼貌地回避了这个结婚问题,在巧妙地改换话题之前他说他感到很荣幸。身患绝症的女孩福斯特通过梦想基金会( Dream foundation)的赞助获得了与马克和纳尔逊·曼德拉交谈的机会。 +在太空中,马克与纳尔逊·曼德拉(Nelson Mandela)和另一个 14 岁的南非女孩米歇尔·福斯特(Michelle Foster) (她问马克要不要娶她)通过无线电进行了交谈。马克礼貌地回避了这个结婚问题,但在巧妙地改换话题之前他说他感到很荣幸。身患绝症的女孩福斯特通过梦想基金会( Dream foundation)的赞助获得了与马克和纳尔逊·曼德拉交谈的机会。 归来后,马克在世界各地做了旅行,并和各地的学生就太空之旅发表了感言。 From 812a4ecc6f6e40645e5ea1d7fa0fa11383c3cb33 Mon Sep 17 00:00:00 2001 From: cposture Date: Wed, 29 Jun 2016 22:01:21 +0800 Subject: [PATCH 1668/1710] Translating by cposture --- sources/tech/20160512 Bitmap in Linux Kernel.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160512 Bitmap in Linux Kernel.md b/sources/tech/20160512 Bitmap in Linux Kernel.md index b7e832ba0a..adffc9d049 100644 --- a/sources/tech/20160512 Bitmap in Linux Kernel.md +++ b/sources/tech/20160512 Bitmap in Linux Kernel.md @@ -1,3 +1,4 @@ +[Translating by cposture 2016.06.29] Data Structures in the Linux Kernel ================================================================================ From 537488f5505cf31ae41038f3df9809134cc39c9f Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Jun 2016 06:38:45 +0800 Subject: [PATCH 1669/1710] PUB:20160621 Building Serverless App with Docker @bazz2 --- ...160621 Building Serverless App with Docker.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20160621 Building Serverless App with Docker.md (81%) diff --git a/translated/tech/20160621 Building Serverless App with Docker.md b/published/20160621 Building Serverless App with Docker.md similarity index 81% rename from translated/tech/20160621 Building Serverless App with Docker.md rename to published/20160621 Building Serverless App with Docker.md index 9af6c5d7aa..0b5409fc89 100644 --- a/translated/tech/20160621 Building Serverless App with Docker.md +++ b/published/20160621 Building Serverless App with Docker.md @@ -1,9 +1,9 @@ -用 docker 创建 serverless 应用 +用 Docker 创建 serverless 应用 ====================================== -当今世界会时不时地出现一波科技浪潮,将以前的技术拍死在海滩上。针对 serverless 应用的概念我们已经谈了很多,它是指将你的应用程序按功能来部署,这些功能在被用到时才会启动。你不用费心去管理服务器和程序规模,因为它们会在需要的时候在一个集群中启动并运行。 +当今世界会时不时地出现一波波科技浪潮,将以前的技术拍死在海滩上。针对 serverless 应用的概念我们已经谈了很多,它是指将你的应用程序按功能来部署,这些功能在被用到时才会启动。你不用费心去管理服务器和程序规模,因为它们会在需要的时候在一个集群中启动并运行。 -但是 serverless 并不意味着没有 Docker 什么事儿,事实上 Docker 就是 serverless 的。你可以使用 Docker 来容器化这些功能,然后在 Swarm 中按需求来运行它们。Serverless 是一项构建分布式应用的技术,而 Docker 是它们完美的构建平台。 +但是 serverless 并不意味着没有 Docker 什么事儿,事实上 Docker 就是 serverless 的。你可以使用 Docker 来容器化这些功能,然后在 Swarm 中按需求来运行它们。serverless 是一项构建分布式应用的技术,而 Docker 是它们完美的构建平台。 ### 从 servers 到 serverless @@ -28,13 +28,13 @@ client.run("bfirsh/serverless-record-vote-task", [voter_id, vote], detach=True) 这个投票处理进程和消息队列可以用运行在 Swarm 上的 Docker 容器来代替,并实现按需自动部署。 -我们也可以用容器替换 web 前端,使用一个轻量级 HTTP 服务器来触发容器响应一个 HTTP 请求。Docker 容器代替长期运行的 HTTP 服务器来挑起响应请求的重担,这些容器可以自动扩容来支撑大访问量。 +我们也可以用容器替换 web 前端,使用一个轻量级 HTTP 服务器来触发容器响应一个 HTTP 请求。Docker 容器代替长期运行的 HTTP 服务器来挑起响应请求的重担,这些容器可以自动扩容来支撑更大访问量。 新的架构就像这样: ![](https://blog.docker.com/wp-content/uploads/Picture2.png) -红色框内是持续运行的服务,绿色框内是按需启动的容器。这个架构提供更少的长期运行服务让你管理,并且可以自动扩容(最大容量由你的 Swarm 决定)。 +红色框内是持续运行的服务,绿色框内是按需启动的容器。这个架构里需要你来管理的长期运行服务更少,并且可以自动扩容(最大容量由你的 Swarm 决定)。 ### 我们可以做点什么? @@ -51,11 +51,11 @@ client.run("bfirsh/serverless-record-vote-task", [voter_id, vote], detach=True) ### 下一步怎么做 -我们提供了这些前卫的工具和概念来构建应用,并没有深入发掘它们的功能。我们的架构里还是存在长期运行的服务,将来我们需要使用 Swarm 来把所有服务都用按需扩容的方式实现 +我们提供了这些前卫的工具和概念来构建应用,并没有深入发掘它们的功能。我们的架构里还是存在长期运行的服务,将来我们需要使用 Swarm 来把所有服务都用按需扩容的方式实现。 希望本文能在你搭建架构时给你一些启发,但我们还是需要你的帮助。我们提供了所有的基本工具,但它们还不是很完善,我们需要更多更好的工具、库、应用案例、文档以及其他资料。 -[我们在这里发布了工具、库和文档][3]。如果想了解更多,请移步到那里,另外请贡献一些链接给我们,这样我们就能一直工作了。 +[我们在这里发布了工具、库和文档][3]。如果想了解更多,请贡献给我们一些你知道的资源,以便我们能够完善这篇文章。 玩得愉快。 @@ -77,7 +77,7 @@ via: https://blog.docker.com/2016/06/building-serverless-apps-with-docker/ 作者:[Ben Firshman][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 11180e4a7325b5ca739fc23f77d296066c377b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E5=AE=B6=E6=9C=AA?= Date: Thu, 30 Jun 2016 09:36:00 +0800 Subject: [PATCH 1670/1710] Translating by GitFuture --- ... 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md index e6b143cc00..acb98b2d20 100644 --- a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md +++ b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md @@ -1,3 +1,5 @@ +Translating by GitFuture + Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04 ===================================================================================== From 6ee0c8807948f541cddfa3d4005ccb410a3c19c5 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 30 Jun 2016 10:08:09 +0800 Subject: [PATCH 1671/1710] =?UTF-8?q?20160630-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Flatpak brings standalone apps to Linux.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sources/tech/20160621 Flatpak brings standalone apps to Linux.md diff --git a/sources/tech/20160621 Flatpak brings standalone apps to Linux.md b/sources/tech/20160621 Flatpak brings standalone apps to Linux.md new file mode 100644 index 0000000000..5441627710 --- /dev/null +++ b/sources/tech/20160621 Flatpak brings standalone apps to Linux.md @@ -0,0 +1,34 @@ +Flatpak brings standalone apps to Linux +=== + +![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/flatpak-945x400.jpg) + +The development team behind [Flatpak][1] has [just announced the general availability][2] of the Flatpak desktop application framework. Flatpak (which was also known during development as xdg-app) provides the ability for an application — bundled as a Flatpak — to be installed and run easily and consistently on many different Linux distributions. Applications bundled as Flatpaks also have the ability to be sandboxed for security, isolating them from your operating system, and other applications. Check out the [Flatpak website][3], and the [press release][4] for more information on the tech that makes up the Flatpak framework. + +### Installing Flatpak on Fedora + +For users wanting to run applications bundled as Flatpaks, installation on Fedora is easy, with Flatpak already available in the official Fedora 23 and Fedora 24 repositories. The Flatpak website has [full details on installation on Fedora][5], as well as how to install on Arch, Debian, Mageia, and Ubuntu. [Many applications][6] have builds already bundled with Flatpak — including LibreOffice, and nightly builds of popular graphics applications Inkscape and GIMP. + +### For Application Developers + +If you are an application developer, the Flatpak website also contains some great resources on getting started [bundling and distributing your applications with Flatpak][7]. These resources contain information on using Flakpak SDKs to build standalone, sandboxed Flatpak applications. + + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/introducing-flatpak/ + +作者:[Ryan Lerch][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/introducing-flatpak/ +[1]: http://flatpak.org/ +[2]: http://flatpak.org/press/2016-06-21-flatpak-released.html +[3]: http://flatpak.org/ +[4]: http://flatpak.org/press/2016-06-21-flatpak-released.html +[5]: http://flatpak.org/getting.html +[6]: http://flatpak.org/apps.html +[7]: http://flatpak.org/developer.html From 62d8ec64c4bbda8951040ef2eb3c457845449cb0 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 30 Jun 2016 10:14:34 +0800 Subject: [PATCH 1672/1710] =?UTF-8?q?20160630-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... technologies in Fedora: systemd-nspawn.md | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sources/tech/20160621 Container technologies in Fedora: systemd-nspawn.md diff --git a/sources/tech/20160621 Container technologies in Fedora: systemd-nspawn.md b/sources/tech/20160621 Container technologies in Fedora: systemd-nspawn.md new file mode 100644 index 0000000000..1ec72a3c90 --- /dev/null +++ b/sources/tech/20160621 Container technologies in Fedora: systemd-nspawn.md @@ -0,0 +1,106 @@ +Container technologies in Fedora: systemd-nspawn +=== + +Welcome to the “Container technologies in Fedora” series! This is the first article in a series of articles that will explain how you can use the various container technologies available in Fedora. This first article will deal with `systemd-nspawn`. + +### What is a container? + +A container is a user-space instance which can be used to run a program or an operating system in isolation from the system hosting the container (called the host system). The idea is very similar to a `chroot` or a [virtual machine][1]. The processes running in a container are managed by the same kernel as the host operating system, but they are isolated from the host file system, and from the other processes. + + +### What is systemd-nspawn? + +The systemd project considers container technologies as something that should fundamentally be part of the desktop and that should integrate with the rest of the user’s systems. To this end, systemd provides `systemd-nspawn`, a tool which is able to create containers using various Linux technologies. It also provides some container management tools. + +In many ways, `systemd-nspawn` is similar to `chroot`, but is much more powerful. It virtualizes the file system, process tree, and inter-process communication of the guest system. Much of its appeal lies in the fact that it provides a number of tools, such as `machinectl`, for managing containers. Containers run by `systemd-nspawn` will integrate with the systemd components running on the host system. As an example, journal entries can be logged from a container in the host system’s journal. + +In Fedora 24, `systemd-nspawn` has been split out from the systemd package, so you’ll need to install the `systemd-container` package. As usual, you can do that with a `dnf install systemd-container`. + +### Creating the container + +Creating a container with `systemd-nspawn` is easy. Let’s say you have an application made for Debian, and it doesn’t run well anywhere else. That’s not a problem, we can make a container! To set up a container with the latest version of Debian (at this point in time, Jessie), you need to pick a directory to set up your system in. I’ll be using `~/DebianJessie` for now. + +Once the directory has been created, you need to run `debootstrap`, which you can install from the Fedora repositories. For Debian Jessie, you run the following command to initialize a Debian file system. + +``` +$ debootstrap --arch=amd64 stable ~/DebianJessie +``` + +This assumes your architecture is x86_64. If it isn’t, you must change `amd64` to the name of your architecture. You can find your machine’s architecture with `uname -m`. + +Once your root directory is set up, you will start your container with the following command. + +``` +$ systemd-nspawn -bD ~/DebianJessie +``` + +You’ll be up and running within seconds. You’ll notice something as soon as you try to log in: you can’t use any accounts on your system. This is because systemd-nspawn virtualizes users. The fix is simple: remove -b from the previous command. You’ll boot directly to the root shell in the container. From there, you can just use passwd to set a password for root, or you can use adduser to add a new user. As soon as you’re done with that, go ahead and put the -b flag back. You’ll boot to the familiar login console and you log in with the credentials you set. + +All of this applies for any distribution you would want to run in the container, but you need to create the system using the correct package manager. For Fedora, you would use DNF instead of debootstrap. To set up a minimal Fedora system, you can run the following command, replacing the absolute path with wherever you want the container to be. + +``` +$ sudo dnf --releasever=24 --installroot=/absolute/path/ install systemd passwd dnf fedora-release +``` + +![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Screenshot-from-2016-06-17-15-04-14.png) + +### Setting up the network + +You’ll notice an issue if you attempt to start a service that binds to a port currently in use on your host system. Your container is using the same network interface. Luckily, `systemd-nspawn` provides several ways to achieve separate networking from the host machine. + +#### Local networking + +The first method uses the `--private-network` flag, which only creates a loopback device by default. This is ideal for environments where you don’t need networking, such as build systems and other continuous integration systems. + +#### Multiple networking interfaces + +If you have multiple network devices, you can give one to the container with the `--network-interface` flag. To give `eno1` to my container, I would add the flag `--network-interface=eno1`. While an interface is assigned to a container, the host can’t use it at the same time. When the container is completely shut down, it will be available to the host again. + +#### Sharing network interfaces + +For those of us who don’t have spare network devices, there are other options for providing access to the container. One of those is the `--port` flag. This forwards a port on the container to the host. The format is `protocol:host:container`, where protocol is either `tcp` or `udp`, `host` is a valid port number on the host, and `container` is a valid port on the container. You can omit the protocol and specify only `host:container`. I often use something similar to `--port=2222:22`. + +You can enable complete, host-only networking with the `--network-veth` flag, which creates a virtual Ethernet interface between the host and the container. You can also bridge two connections with `--network-bridge`. + +### Using systemd components + +If the system in your container has D-Bus, you can use systemd’s provided utilities to control and monitor your container. Debian doesn’t include dbus in the base install. If you want to use it with Debian Jessie, you’ll want to run `apt install dbus`. + +#### machinectl + +To easily manage containers, systemd provides the machinectl utility. Using machinectl, you can log in to a container with machinectl login name, check the status with machinectl status name, reboot with machinectl reboot name, or power it off with machinectl poweroff name. + +### Other systemd commands + +Most systemd commands, such as journalctl, systemd-analyze, and systemctl, support containers with the `--machine` option. For example, if you want to see the journals of a container named “foobar”, you can use journalctl `--machine=foobar`. You can also see the status of a service running in this container with `systemctl --machine=foobar` status service. + +![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Screenshot-from-2016-06-17-15-09-25.png) + +### Working with SELinux + +If you’re running with SELinux enforcing (the default in Fedora), you’ll need to set the SELinux context for your container. To do that, you need to run the following two commands on the host system. + +``` +$ semanage fcontext -a -t svirt_sandbox_file_t "/path/to/container(/.*)?" +$ restorecon -R /path/to/container/ +``` + +Make sure you replace “/path/to/container” with the path to your container. For my container, “DebianJessie”, I would run the following: + +``` +$ semanage fcontext -a -t svirt_sandbox_file_t "/home/johnmh/DebianJessie(/.*)?" +$ restorecon -R /home/johnmh/DebianJessie/ +``` + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/set-nginx-reverse-proxy-centos-7-cpanel/ + +作者:[John M. Harris, Jr.][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/linux-how-to/set-nginx-reverse-proxy-centos-7-cpanel/ +[1]: https://en.wikipedia.org/wiki/Virtual_machine From c3b14933f388d9921ae1c3fd5fd4f1e267233dad Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 30 Jun 2016 10:22:15 +0800 Subject: [PATCH 1673/1710] =?UTF-8?q?20160630-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160620 Monitor Linux With Netdata.md | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 sources/tech/20160620 Monitor Linux With Netdata.md diff --git a/sources/tech/20160620 Monitor Linux With Netdata.md b/sources/tech/20160620 Monitor Linux With Netdata.md new file mode 100644 index 0000000000..95156ef108 --- /dev/null +++ b/sources/tech/20160620 Monitor Linux With Netdata.md @@ -0,0 +1,113 @@ +Monitor Linux With Netdata +=== + +Netdata is a real-time resource monitoring tool with a friendly web front-end developed and maintained by [FireHOL][1]. With this tool, you can read charts representing resource utilization of things like CPUs, RAM, disks, network, Apache, Postfix and more. It is similar to other monitoring software like Nagios; however, Netdata is only for real-time monitoring via a web interface. + + +### Understanding Netdata + +There’s currently no authentication, so if you’re concerned about someone getting information about the applications you’re running on your system, you should restrict who has access via a firewall policy. The UI is simplified in a way anyone could look at the graphs and understand what they’re seeing, or at least be impressed by your flashy setup. + +The web front-end is very responsive and requires no Flash plugin. The UI doesn’t clutter things up with unneeded features, but sticks to what it does. At first glance, it may seem a bit much with the hundreds of charts you have access to, but luckily the most commonly needed charts (i.e. CPU, RAM, network, and disk) are at the top. If you wish to drill deeper into the graphical data, all you have to do is scroll down or click on the item in the menu to the right. Netdata even allows you to control the chart with play, reset, zoom and resize with the controls on the bottom right of each chart. + +![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture-1.png) +>Netdata chart control + +When it comes down to system resources, the software doesn’t need too much either. The creators choose to write the software in C. Netdata doesn’t use much more than ~40MB of RAM. + +![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture.png) +>Netdata memory usage + +### Download Netdata + +To download this software, you can head over to [Netdata GitHub page][2]. Then click the “Clone or download” green button on the left of the page. You should then be presented with two options. + +#### Via the ZIP file + +One option is to download the ZIP file. This will include everything in the repository; however, if the repository is updated then you will need to download the ZIP file again. Once you download the ZIP file, you can use the `unzip` tool in the command line to extract the contents. Running the following command will extract the contents of the ZIP file into a “`netdata`” folder. + +``` +$ cd ~/Downloads +$ unzip netdata-master.zip +``` + +![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture-2.png) +>Netdata unzipped + +ou don’t need to add the `-d` option in unzip because their content is inside a folder at the root of the ZIP file. If they didn’t have that folder at the root, unzip would have extracted the contents in the current directory (which can be messy). + +#### Via git + +The next option is to download the repository via git. You will, of course, need git installed on your system. This is usually installed by default on Fedora. If not, you can install git from the command line with the following command. + +``` +$ sudo dnf install git +``` + +After installing git, you will need to “clone” the repository to your system. To do this, run the following command. + +``` +$ git clone https://github.com/firehol/netdata.git +``` + +This will then clone (or make a copy of) the repository in the current working directory. + +### Install Netdata + +There are some packages you will need to build Netdata successfully. Luckily, it’s a single line to install the things you need ([as stated in their installation guide][3]). Running the following command in the terminal will install all of the dependencies you need to use Netdata. + +``` +$ dnf install zlib-devel libuuid-devel libmnl-devel gcc make git autoconf autogen automake pkgconfig +``` + +Once the required packages are installed, you will need to cd into the netdata/ directory and run the netdata-installer.sh script. + +``` +$ sudo ./netdata-installer.sh +``` + +You will then be prompted to press enter to build and install the program. If you wish to continue, press enter to be on your way! + +![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Capture-3-600x341.png) +>Netdata install. + +If all goes well, you will have Netdata built, installed, and running on your system. The installer will also add an uninstall script in the same folder as the installer called `netdata-uninstaller.sh`. If you change your mind later, running this script will remove it from your system. + +You can see it running by checking its status via systemctl. + +``` +$ sudo systemctl status netdata +``` + +### Accessing Netdata + +Now that we have Netdata installed and running, you can access the web interface via port 19999. I have it running on a test machine, as shown in the screenshot below. + +![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Capture-4-768x458.png) +>An overview of what Netdata running on your system looks like + +Congratulations! You now have successfully installed and have access to beautiful displays, graphs, and advanced statistics on the performance of your machine. Whether it’s for a personal machine so you can show it off to your friends or for getting deeper insight into the performance of your server, Netdata delivers on performance reporting for any system you choose. + + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/monitor-linux-netdata/ + +作者:[Martino Jones][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/monitor-linux-netdata/ +[1]: https://firehol.org/ +[2]: https://github.com/firehol/netdata +[3]: https://github.com/firehol/netdata/wiki/Installation + + + + + + + + From 67d0d2a7cca68e6a72ace06fa5e1a489dbfacd98 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Jun 2016 12:11:13 +0800 Subject: [PATCH 1674/1710] PUB:20160523 Driving cars into the future with Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @erlinux 翻译的不够认真,请下次提交译文时自己多读几遍。或者可以选择更短更简单一些的稿件。 --- ...Driving cars into the future with Linux.md | 106 +++++++++++++++++ ...Driving cars into the future with Linux.md | 108 ------------------ 2 files changed, 106 insertions(+), 108 deletions(-) create mode 100644 published/20160523 Driving cars into the future with Linux.md delete mode 100644 translated/talk/20160523 Driving cars into the future with Linux.md diff --git a/published/20160523 Driving cars into the future with Linux.md b/published/20160523 Driving cars into the future with Linux.md new file mode 100644 index 0000000000..fad7ca99f2 --- /dev/null +++ b/published/20160523 Driving cars into the future with Linux.md @@ -0,0 +1,106 @@ +与 Linux 一同驾车奔向未来 +=========================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/open-snow-car-osdc-lead.png?itok=IgYZ6mNY) + +当我驾车的时候并没有这么想过,但是我肯定喜欢一个配有这样系统的车子,它可以让我按下几个按钮就能与我的妻子、母亲以及孩子们语音通话。这样的系统也可以让我选择是否从云端、卫星广播、以及更传统的 AM/FM 收音机收听音乐流媒体。我也会得到最新的天气情况,以及它可以引导我的车载 GPS 找到抵达下一个目的地的最快路线。[车载娱乐系统(In-vehicle infotainment)][1],业界常称作 IVI,它已经普及出现在最新的汽车上了。 + +前段时间,我乘坐飞机跨越了数百英里,然后租了一辆汽车。令人愉快的是,我发现我租赁的汽车上配置了类似我自己车上同样的 IVI 技术。毫不犹豫地,我就通过蓝牙连接把我的联系人上传到了系统当中,然后打电话回家给我的家人,让他们知道我已经安全抵达了,然后我的主机会让他们知道我正在去往他们家的路上。 + +在最近的[新闻综述][2]中,Scott Nesbitt 引述了一篇文章,说福特汽车公司因其开源的[智能设备连接(Smart Device Link)][3](SDL)从竞争对手汽车制造商中得到了足够多的回报,这个中间件框架可以用于支持移动电话。 SDL 是 [GENIVI 联盟][4]的一个项目,这个联盟是一个非营利性组织,致力于建设支持开源车载娱乐系统的中间件。据 GENIVI 的执行董事 [Steven Crumb][5] 称,他们的[成员][6]有很多,包括戴姆勒集团、现代、沃尔沃、日产、本田等等 170 个企业。 + +为了在同行业间保持竞争力,汽车生产企业需要一个中间设备系统,以支持现代消费者所使用的各种人机界面技术。无论您使用的是 Android、iOS 还是其他设备,汽车 OEM 厂商都希望自己的产品能够支持这些。此外,这些的 IVI 系统必须有足够适应能力以支持日益变化的移动技术。OEM 厂商希望提供有价值的服务,并可以在他们的 IVI 之上增加服务,以满足他们客户的各种需求。 + +### 步入 Linux 和开源软件 + +除了 GENIVI 在努力之外,[Linux 基金会][7]也赞助支持了[车载 Linux(Automotive Grade Linux)][8](AGL)工作组,这是一个致力于为汽车应用寻求开源解决方案的软件基金会。虽然 AGL 初期将侧重于 IVI 系统,但是未来他们希望发展到不同的方向,包括[远程信息处理(telematics)][9]、抬头显示器(HUD)及其他控制系统等等。 现在 AGL 已经有超过 50 名成员,包括捷豹、丰田、日产,并在其[最近发布的一篇公告][10]中宣称福特、马自达、三菱、和斯巴鲁也加入了。 + +为了了解更多信息,我们采访了这一新兴领域的两位领导人。具体来说,我们想知道 Linux 和开源软件是如何被使用的,并且它们是如何事实上改变了汽车行业的面貌。首先,我们将与 [Alison Chaiken][11] 谈谈,她是一位任职于 Peloton Technology 的软件工程师,也是一位在车载 Linux 、网络安全和信息透明化方面的专家。她曾任职于 [Alison Chaiken][11] 公司、诺基亚和斯坦福直线性加速器。然后我们和 [Steven Crumb][12] 进行了交谈,他是 GENIVI 执行董事,他之前从事于高性能计算环境(超级计算机和早期的云计算)的开源工作。他说,虽然他再不是一个程序员了,但是他乐于帮助企业解决在使用开源软件时的实际业务问题。 + +### 采访 Alison Chaiken (by [Deb Nicholson][13]) + +#### 你是如何开始对汽车软件领域感兴趣的? + +我曾在诺基亚从事于手机上的 [MeeGo][14] 产品,2009 年该项目被取消了。我想,我下一步怎么办?其时,我的一位同事正在从事于 [MeeGo-IVI][15],这是一个早期的车载 Linux 发行版。 “Linux 在汽车方面将有很大发展,” 我想,所以我就朝着这个方向努力。 + +#### 你能告诉我们你在这些日子里工作在哪些方面吗? + +我目前正在启动一个高级巡航控制系统的项目,它用在大型卡车上,使用实时 Linux 以提升安全性和燃油经济性。我喜欢在这方面的工作,因为没有人会反对提升货运的能力。 + +#### 近几年有几则汽车被黑的消息。开源代码方案可以帮助解决这个问题吗? + +我恰好针对这一话题准备了一次讲演,我会在南加州 Linux 2016 博览会上就 Linux 能否解决汽车上的安全问题做个讲演 ([讲演稿在此][16])。值得注意的是,GENIVI 和车载 Linux 项目已经公开了他们的代码,这两个项目可以通过 Git 提交补丁。(如果你有补丁的话),请给上游发送您的补丁!许多眼睛都盯着,bug 将无从遁形。 + +#### 执法机构和保险公司可以找到很多汽车上的数据的用途。他们获取这些信息很容易吗? + +好问题。IEEE-1609 专用短程通信标准(Dedicated Short Range Communication Standard)就是为了让汽车的 WiFi 消息可以安全、匿名地传递。不过,如果你从你的车上发推,那可能就有人能够跟踪到你。 + +#### 开发人员和公民个人可以做些什么,以在汽车技术进步的同时确保公民自由得到保护? + +电子前沿基金会( Electronic Frontier Foundation)(EFF)在关注汽车问题方面做了出色的工作,包括对哪些数据可以存储在汽车 “黑盒子”里通过官方渠道发表了看法,以及 DMCA 规定 1201 如何应用于汽车上。 + +#### 在未来几年,你觉得在汽车方面会发生哪些令人激动的发展? + +可以拯救生命的自适应巡航控制系统和防撞系统将取得长足发展。当它们大量进入汽车里面时,我相信这会使得(因车祸而导致的)死亡人数下降。如果这都不令人激动,我不知道还有什么会更令人激动。此外,像自动化停车辅助功能,将会使汽车更容易驾驶,减少汽车磕碰事故。 + +#### 我们需要做什么?人们怎样才能参与? + +车载 Linux 开发是以开源的方式开发,它运行在每个人都能买得起的廉价硬件上(如树莓派 2 和中等价位的 Renesas Porter 主板)。 GENIVI 汽车 Linux 中间件联盟通过 Git 开源了很多软件。此外,还有很酷的 [OSVehicle 开源硬件][17]汽车平台。 + +只需要不太多的预算,人们就可以参与到 Linux 软件和开放硬件中。如果您感兴趣,请加入我们在 Freenode 上的IRC #automotive 吧。 + +### 采访 Steven Crumb (by Don Watkins) + +#### GENIVI 在 IVI 方面做了哪些巨大贡献? + +GENIVI 率先通过使用自由开源软件填补了汽车行业的巨大空白,这包括 Linux、非安全关键性汽车软件(如车载娱乐系统(IVI))等。作为消费者,他们很期望在车辆上有和智能手机一样的功能,对这种支持 IVI 功能的软件的需求量成倍地增长。不过不断提升的软件数量也增加了建设 IVI 系统的成本,从而延缓了其上市时间。 + +GENIVI 使用开源软件和社区开发的模式为汽车制造商及其软件提供商节省了大量资金,从而显著地缩短了产品面市时间。我为 GENIVI 而感到激动,我们有幸引导了一场革命,在缓慢进步的汽车行业中,从高度结构化和专有的解决方案转换为以社区为基础的开发方式。我们还没有完全达成目标,但是我们很荣幸在这个可以带来实实在在好处的转型中成为其中的一份子。 + +#### 你们的主要成员怎样推动了 GENIVI 的发展方向? + +GENIVI 有很多成员和非成员致力于我们的工作。在许多开源项目中,任何公司都可以通过通过技术输出而发挥影响,包括简单地贡献代码、补丁、花点时间测试。前面说过,宝马、奔驰、现代汽车、捷豹路虎、标致雪铁龙、雷诺/日产和沃尔沃都是 GENIVI 积极的参与者和贡献者,其他的许多 OEM 厂商也在他们的汽车中采用了 IVI 解决方案,广泛地使用了 GENIVI 的软件。 + +#### 这些贡献的代码使用了什么许可证? + +GENIVI 采用了一些许可证,包括从(L)GPLv2 到 MPLv2 和 Apache2.0。我们的一些工具使用的是 Eclipse 许可证。我们有一个[公开许可策略][18],详细地说明了我们的许可证偏好。 + +#### 个人或团体如何参与其中?社区的参与对于这个项目迈向成功有多重要? + +GENIVI 的开发完全是开放的([projects.genivi.org][19]),因此,欢迎任何有兴趣在汽车中使用开源软件的人参加。也就是说,公司可以通过成员的方式[加入该联盟][20],联盟以开放的方式资助其不断进行开发。GENIVI 的成员可以享受各种各样的便利,在过去六年中,已经有多达 140 家公司参与到这个全球性的社区当中。 + +社区对于 GENIVI 是非常重要的,没有一个活跃的贡献者社区,我们不可能在这些年开发和维护了这么多有价值的软件。我们努力让参与到 GENIVI 更加简单,现在只要加入一个[邮件列表][21]就可以接触到各种软件项目中的人们。我们使用了许多开源项目采用的标准做法,并提供了高品质的工具和基础设施,以帮助开发人员宾至如归而富有成效。 + +无论你是否熟悉汽车软件,都欢迎你加入我们的社区。人们已经对汽车改装了许多年,所以对于许多人来说,在汽车上修修改改是自热而然的做法。对于汽车来说,软件是一个新的领域,GENIVI 希望能为对汽车和开源软件有兴趣的人打开这扇门。 + +------------------------------- +via: https://opensource.com/business/16/5/interview-alison-chaiken-steven-crumb + +作者:[Don Watkins][a] +译者:[erlinux](https://github.com/erlinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[1]: https://en.wikipedia.org/wiki/In_car_entertainment +[2]: https://opensource.com/life/16/1/weekly-news-jan-9 +[3]: http://projects.genivi.org/smartdevicelink/home +[4]: http://www.genivi.org/ +[5]: https://www.linkedin.com/in/stevecrumb +[6]: http://www.genivi.org/genivi-members +[7]: http://www.linuxfoundation.org/ +[8]: https://www.automotivelinux.org/ +[9]: https://en.wikipedia.org/wiki/Telematics +[10]: https://www.automotivelinux.org/news/announcement/2016/01/ford-mazda-mitsubishi-motors-and-subaru-join-linux-foundation-and +[11]: https://www.linkedin.com/in/alison-chaiken-3ba456b3 +[12]: https://www.linkedin.com/in/stevecrumb +[13]: https://opensource.com/users/eximious +[14]: https://en.wikipedia.org/wiki/MeeGo +[15]: http://webinos.org/deliverable-d026-target-platform-requirements-and-ipr/automotive/ +[16]: http://she-devel.com/Chaiken_automotive_cybersecurity.pdf +[17]: https://www.osvehicle.com/ +[18]: http://projects.genivi.org/how +[19]: http://projects.genivi.org/ +[20]: http://genivi.org/join +[21]: http://lists.genivi.org/mailman/listinfo/genivi-projects diff --git a/translated/talk/20160523 Driving cars into the future with Linux.md b/translated/talk/20160523 Driving cars into the future with Linux.md deleted file mode 100644 index 9b9d69d68c..0000000000 --- a/translated/talk/20160523 Driving cars into the future with Linux.md +++ /dev/null @@ -1,108 +0,0 @@ - -驾车通往未来Linux -=========================================== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/open-snow-car-osdc-lead.png?itok=IgYZ6mNY) - - -当我开车的时候不认为和 Linux 有多大联系,但是我肯定我是喜欢一个配备有系统的车子,让我按几个按钮语音就可以传给我的妻子母亲以及孩子。同样,这样的系统可以让我选择是否从云端流媒体收听音乐,卫星广播,以及传统的 AM/FM 收音机。我也会得到天气更新以及可以给我的车载信息娱乐 GPS 找到最快的下一个目的地[In-vehicle infotainment][1],以及 IVI 作为行业知名产业,已经普及到最新的汽车生产商。 - -前段时间,我不得坐飞机飞跃数百英里,租一辆车。令人愉快的是,我发现我的租凭车配置了 IVI 技术。任何时候,我只要通过蓝牙连接,上传联系人到系统中,打电话回家给我的家人,让他们知道我已经安全到家了。然后“主人“会知道我再途中还是已经到他们家了。 - -在最近的 [news roundup][2],Scott Nesbitt 引用一篇文章,说福特汽车公司是由它的开源 [Smart Device Link][3](SDL)中间设备框架,对手汽车制造商,支持那个移动手机获得大量的支持。 SDL 是 [GENIVI Alliance][4] 的项目,一个非营利性的致力于建设中间件支持开源的车载信息娱乐系统。根据文献 [[Steven Crumb][5],GENIVI 执行董事,他们 [membership][6] 很广,包括 Daimler 集团,现代,沃尔沃,日产,本田等等 170 个。 - -为了在同行业中保持竞争力,汽车企业需要一个中间设备系统,可以支持当今消费者提供的各种人机界面技术。无论您拥有 Android,iOS 或其他设备,汽车 OEM 厂商希望自己的系统单位能够支持这些。此外,这些的 IVI 系统必须有足够适应能力以支持移动技术的不断下降,半衰期。 OEM 厂商要提供价值服务,并在他们的 IVI 堆栈支持各种为他们的客户添加选择。进入 Linux 和开源软件。 - -除了 GENIVI 的努力下,[Linux Foundation][7] 赞助 [Automotive Grade Linux][8](AGL)工作组,一个软件基金会,致力于寻找针对汽车应用的开源解决方案。虽然 AGL 初期将侧重于 IVI 系统,他们展望不同的分歧,包括 [telematics][9],小心显示器和其他控制系统。 AGL 有超过 50 名成员在这个时候,包括捷豹,丰田,日产,并在 [recent press release][10] 宣布福特、马自达、三菱、和斯巴鲁加入。 - - -为了了解更多信息,我们在这一新鲜兴领域采访了两位领导人。明确地来说,我们想知道是如何被使用的 Linux 和开源软件,如果它们实际上是改变汽车行业的面貌。首先,我们谈谈 [Alison Chaiken][11],在大集团技术的软件工程师和汽车 Linux 专家,网络安全和透明度。她曾任职于 [Alison Chaiken][11] 公司,诺基亚和斯坦福直线性加速器。然后我们用 [Steven Crumb][12],GENIVI 执行董事,谁得到了在开源环境高性能计算(超级计算机和早期的云计算)开始聊天。他说,虽然他再不是一个程序员了,但是他喜欢帮助企业解决开源软件的实际业务问题。 - -### 采访 Alison Chaiken (by [Deb Nicholson][13]) - -#### 你是如何开始对汽车软件空间感兴趣的? - -我是在诺基亚手机产品时, 2009 年该项目被取消。我想,下一步是什么?一位同事正在对 [MeeGo-IVI][15],早期的汽车 Linux 发行版。 “Linux 在汽车是大了,” 我想,所以我在朝着这个方向努力。 - -#### 你能告诉我们你这些日子工作在哪些方面? - -我目前正在启动为使用 Linux 系统增加大货车钻机的安全性和燃油经济性的先进巡航控制。我喜欢在这方面的工作,因为没有人会反对卡车得以提升。 - -#### 目前关于汽车已在近年来砍死几个人故事。开源代码方案可以帮助解决这个问题吗? - -I presented a talk on precisely this topic, on how Linux can (and cannot) contribute to security solutions in automotive at Southern California Linux Expo 2016 ([Slides][16]). Notably, GENIVI and Automotive Grade Linux have published their code and both projects take patches via Git. Please send your fixes upstream! Many eyes make all bugs shallow. -我提出的谈话正是这一主题,就如何 Linux 可以(或不可以)在南加州 2016 年世博会作出贡献的安全解决方案的 Linux汽车([Slides][16])。值得注意的是,GENIVI 和汽车级 Linux 已经公布了他们的代码,这两个项目的 Git 通过采取补丁。请上游发送您的修复!许多眼睛都盯着肤浅的bugs。 - -#### 执法机构和保险公司可以找到很多有关数据用途的驱动程序。它将如何容易成为他们获取这些信息? - -好问题。该专用短程通信标准(IEEE-1609),以保持匿名的 Wi-Fi 安全消息驱动程序。不过,如果你从你的车张贴到 Twitter,有人能够跟踪你。 - -#### 有什么可以开发人员和公民个人一起完成,以确保公民自由受到保护作为汽车技术发展的? - -电子前沿基金会(EFF)一样对汽车保持的问题上,通过什么样的数据可以存储在汽车 “黑盒子”,并在 DMCA 的规定 1201 如何应用于汽车官方渠道评论已经出色的工作了。 - -#### 在未来几年令人兴奋的事情上,那些是你看到的驱动因素? - -自适应巡航控制和防撞系统有足够的预付款来挽救生命。当他们通过运输车队的推出,我真的相信死亡人数会下降。如果这还不是令人兴奋的,我不知道是什么。此外,像自动化停车辅助功能,将会使汽车更容易驾驶,减少汽车相撞事故。 - -#### 有什么是需要人参与以及如何建造? - -汽车 Linux 级开发是开放源代码的,运行在廉价硬件(如树莓派 Pi 2 和中等价位的 Renesas Porter board),任何人都可以购买。 GENIVI 汽车 Linux 的中间设备联盟有很多软件通过 Git 的公开。此外,还有很酷的 [OSVehicle open hardware][17] 汽车平台。 - -#### 这里是 Linux 软件和开放硬件,许多方面具有中等人数预算的参与。如果您有任何疑问,加入我们在 Freenode 上 IRC#automotive。 - -### 采访 Steven Crumb (by Don Watkins) - -#### 关于GENIVI's 对 IVI 为什么那么大 ? - -GENIVI 率先通过使用自由和开源软件,包括 Linux,像车载信息娱乐(IVI)系统的非安全关键汽车软件填补了汽车行业的巨大差距。作为消费者来到期望在他们的车辆相同的功能在智能手机上的软件,以支持 IVI 功能所需的量成倍增长。软件增加量也增加了建设 IVI 系统的成本,从而延缓了上市时间。 - -GENIVI 的使用开源软件和社区发展模式节省了汽车制造商和他们的软件提供商显著大量的资金,而显著减少了产品上市时间。我很兴奋,因为 GENIVI 我们很幸运慢慢从高度结构化和专有的方法来社区为基础的方法不断发展的组织​​领导排序在汽车行业的一场革命。我们还没有完成,但它一直是一个荣幸参加正在产生实实在在的好处的转换。 - -#### 你的庞大会员怎么才可以驱动 GENIVI 方向? - -GENIVI 有很多会员和非会员促进我们的工作。与许多开源项目,任何公司都可以通过简单地贡献代码,修补程序和时间来检验影响的技术输出。随着中说,宝马,奔驰,现代汽车,捷豹路虎,标致雪铁龙,雷诺 / 日产和沃尔沃是所有积极采用者和贡献者 GENIVI 和其他许多 OEM 厂商已经在他们的汽车 IVI 解决方案,广泛使用 GENIVI 的软件。 - -#### 贡献的代码使用了什么许可证? - -GENIVI 采用数量的许可证从(L)GPLv2 许可,以 MPLv2 到 Apache2.0。我们的一些工具使用 Eclipse 许可证。我们有一个[public licensing policy][18],详细说明我们的许可偏好。 - -#### 一个人或一群人如何参与其中?重要的是如何对项目的持续成功的社区贡献? - -GENIVI 完全做它开放发展的在([projects.genivi.org][19]),因此,有兴趣的人在汽车使用开源软件,欢迎参加。这就是说,该联盟能够通过公司 [joining GENIVI][20] 作为成员不断发展的开放基金。 GENIVI 会员享受各种各样的福利,而不是其中最重要的是在已经发展了近六年来 140 家公司全球社区参与。 - -社区是 GENIVI 非常重要的,我们不可能生产和维护我们发展了很多年没有贡献者一个活跃的社区有价值的软件。我们努力做出贡献 GENIVI 简单,只要加入一个 [邮件列表] [21] 并连接到人们在不同的软件项目。我们使用许多开源项目采用的标准做法,并提供高质量的工具和基础设施,以帮助开发人员有宾至如归的感觉,并富有成效。 - -无论在汽车软件某人的熟悉,欢迎他们加入我们的社区。人们已经改装车多年,所以对于许多人来说,是一种天然的抽奖,任何汽车。软件是汽车的新域,GENIVI 希望成为敞开的门有兴趣的人与汽车,开源软件的工作。 - -------------------------------- -via: https://opensource.com/business/16/5/interview-alison-chaiken-steven-crumb - -作者:[Don Watkins][a] -译者:[erlinux](https://github.com/erlinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[1]: https://en.wikipedia.org/wiki/In_car_entertainment -[2]: https://opensource.com/life/16/1/weekly-news-jan-9 -[3]: http://projects.genivi.org/smartdevicelink/home -[4]: http://www.genivi.org/ -[5]: https://www.linkedin.com/in/stevecrumb -[6]: http://www.genivi.org/genivi-members -[7]: http://www.linuxfoundation.org/ -[8]: https://www.automotivelinux.org/ -[9]: https://en.wikipedia.org/wiki/Telematics -[10]: https://www.automotivelinux.org/news/announcement/2016/01/ford-mazda-mitsubishi-motors-and-subaru-join-linux-foundation-and -[11]: https://www.linkedin.com/in/alison-chaiken-3ba456b3 -[12]: https://www.linkedin.com/in/stevecrumb -[13]: https://opensource.com/users/eximious -[14]: https://en.wikipedia.org/wiki/MeeGo -[15]: http://webinos.org/deliverable-d026-target-platform-requirements-and-ipr/automotive/ -[16]: http://she-devel.com/Chaiken_automotive_cybersecurity.pdf -[17]: https://www.osvehicle.com/ -[18]: http://projects.genivi.org/how -[19]: http://projects.genivi.org/ -[20]: http://genivi.org/join -[21]: http://lists.genivi.org/mailman/listinfo/genivi-projects From f94c66337bc58cb829b7d3bbb321a08f7f944c37 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 1 Jul 2016 09:22:57 +0800 Subject: [PATCH 1675/1710] [Translated] Awk Part 3 (#4127) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Translated] Awk Part 3 * 移动翻译后的文章 --- ... Strings Using Pattern Specific Actions.md | 85 ------------------- ... Strings Using Pattern Specific Actions.md | 82 ++++++++++++++++++ 2 files changed, 82 insertions(+), 85 deletions(-) delete mode 100644 sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md create mode 100644 translated/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md diff --git a/sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md b/sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md deleted file mode 100644 index acdfe66167..0000000000 --- a/sources/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md +++ /dev/null @@ -1,85 +0,0 @@ -FSSlc translating - -How to Use Awk to Filter Text or Strings Using Pattern Specific Actions -========================================================================= - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Filter-Text-or-Strings-Using-Pattern.png) - -In the third part of the Awk command series, we shall take a look at filtering text or strings based on specific patterns that a user can define. - -Sometimes, when filtering text, you want to indicate certain lines from an input file or lines of strings based on a given condition or using a specific pattern that can be matched. Doing this with Awk is very easy, it is one of the great features of Awk that you will find helpful. - -Let us take a look at an example below, say you have a shopping list for food items that you want to buy, called food_prices.list. It has the following list of food items and their prices. - -``` -$ cat food_prices.list -No Item_Name Quantity Price -1 Mangoes 10 $2.45 -2 Apples 20 $1.50 -3 Bananas 5 $0.90 -4 Pineapples 10 $3.46 -5 Oranges 10 $0.78 -6 Tomatoes 5 $0.55 -7 Onions 5 $0.45 -``` - -And then, you want to indicate a `(*)` sign on food items whose price is greater than $2, this can be done by running the following command: - -``` -$ awk '/ *\$[2-9]\.[0-9][0-9] */ { print $1, $2, $3, $4, "*" ; } / *\$[0-1]\.[0-9][0-9] */ { print ; }' food_prices.list -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Text-Using-Awk.gif) ->Print Items Whose Price is Greater Than $2 - -From the output above, you can see that the there is a `(*)` sign at the end of the lines having food items, mangoes and pineapples. If you check their prices, they are above $2. - -In this example, we have used used two patterns: - -- the first: `/ *\$[2-9]\.[0-9][0-9] */` gets the lines that have food item price greater than $2 and -- the second: `/*\$[0-1]\.[0-9][0-9] */` looks for lines with food item price less than $2. - -This is what happens, there are four fields in the file, when pattern one encounters a line with food item price greater than $2, it prints all the four fields and a `(*)` sign at the end of the line as a flag. - -The second pattern simply prints the other lines with food price less than $2 as they appear in the input file, food_prices.list. - -This way you can use pattern specific actions to filter out food items that are priced above $2, though there is a problem with the output, the lines that have the `(*)` sign are not formatted out like the rest of the lines making the output not clear enough. - -We saw the same problem in Part 2 of the awk series, but we can solve it in two ways: - -1. Using printf command which is a long and boring way using the command below: - -``` -$ awk '/ *\$[2-9]\.[0-9][0-9] */ { printf "%-10s %-10s %-10s %-10s\n", $1, $2, $3, $4 "*" ; } / *\$[0-1]\.[0-9][0-9] */ { printf "%-10s %-10s %-10s %-10s\n", $1, $2, $3, $4; }' food_prices.list -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Items-Using-Awk-and-Printf.gif) ->Filter and Print Items Using Awk and Printf - -2. Using $0 field. Awk uses the variable 0 to store the whole input line. This is handy for solving the problem above and it is simple and fast as follows: - -``` -$ awk '/ *\$[2-9]\.[0-9][0-9] */ { print $0 "*" ; } / *\$[0-1]\.[0-9][0-9] */ { print ; }' food_prices.list -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Items-Using-Awk-and-Variable.gif) ->Filter and Print Items Using Awk and Variable - -Conclusion -That’s it for now and these are simple ways of filtering text using pattern specific action that can help in flagging lines of text or strings in a file using Awk command. - -Hope you find this article helpful and remember to read the next part of the series which will focus on using comparison operators using awk tool. - - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/awk-filter-text-or-string-using-patterns/ - -作者:[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/ - diff --git a/translated/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md b/translated/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md new file mode 100644 index 0000000000..ef91e93575 --- /dev/null +++ b/translated/tech/awk/Part 3 - How to Use Awk to Filter Text or Strings Using Pattern Specific Actions.md @@ -0,0 +1,82 @@ +如何使用 Awk 来筛选文本或字符串 +========================================================================= + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Use-Awk-to-Filter-Text-or-Strings-Using-Pattern.png) + +作为 Awk 命令系列的第三部分,这次我们将看一看如何基于用户定义的特定模式来筛选文本或字符串。 + +在筛选文本时,有时你可能想根据某个给定的条件或使用一个特定的可被匹配的模式,去标记某个文件或数行字符串中的某几行。使用 Awk 来完成这个任务是非常容易的,这也正是 Awk 中可能对你有所帮助的几个特色之一。 + +让我们看一看下面这个例子,比方说你有一个写有你想要购买的食物的购物清单,其名称为 food_prices.list,它所含有的食物名称及相应的价格如下所示: + +``` +$ cat food_prices.list +No Item_Name Quantity Price +1 Mangoes 10 $2.45 +2 Apples 20 $1.50 +3 Bananas 5 $0.90 +4 Pineapples 10 $3.46 +5 Oranges 10 $0.78 +6 Tomatoes 5 $0.55 +7 Onions 5 $0.45 +``` + +然后,你想使用一个 `(*)` 符号去标记那些单价大于 $2 的食物,那么你可以通过运行下面的命令来达到此目的: + +``` +$ awk '/ *\$[2-9]\.[0-9][0-9] */ { print $1, $2, $3, $4, "*" ; } / *\$[0-1]\.[0-9][0-9] */ { print ; }' food_prices.list +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Text-Using-Awk.gif) +>打印出单价大于 $2 的项目 + +从上面的输出你可以看到在含有 芒果(mangoes) 和 菠萝(pineapples) 的那行末尾都已经有了一个 `(*)` 标记。假如你检查它们的单价,你可以看到它们的单价的确超过了 $2 。 + +在这个例子中,我们已经使用了两个模式: + +- 第一个模式: `/ *\$[2-9]\.[0-9][0-9] */` 将会得到那些含有食物单价大于 $2 的行, +- 第二个模式: `/*\$[0-1]\.[0-9][0-9] */` 将查找那些食物单价小于 $2 的那些行。 + +上面的命令具体做了什么呢?这个文件有四个字段,当模式一匹配到含有食物单价大于 $2 的行时,它便会输出所有的四个字段并在该行末尾加上一个 `(*)` 符号来作为标记。 + +第二个模式只是简单地输出其他含有食物单价小于 $2 的行,因为它们出现在输入文件 food_prices.list 中。 + +这样你就可以使用模式来筛选出那些价格超过 $2 的食物项目,尽管上面的输出还有些问题,带有 `(*)` 符号的那些行并没有像其他行那样被格式化输出,这使得输出显得不够清晰。 + +我们在 Awk 系列的第二部分中也看到了同样的问题,但我们可以使用下面的两种方式来解决: + +1. 可以像下面这样使用 printf 命令,但这样使用又长又无聊: + +``` +$ awk '/ *\$[2-9]\.[0-9][0-9] */ { printf "%-10s %-10s %-10s %-10s\n", $1, $2, $3, $4 "*" ; } / *\$[0-1]\.[0-9][0-9] */ { printf "%-10s %-10s %-10s %-10s\n", $1, $2, $3, $4; }' food_prices.list +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Items-Using-Awk-and-Printf.gif) +>使用 Awk 和 Printf 来筛选和输出项目 + +2. 使用 `$0` 字段。Awk 使用变量 **0** 来存储整个输入行。对于上面的问题,这种方式非常方便,并且它还简单、快速: + +``` +$ awk '/ *\$[2-9]\.[0-9][0-9] */ { print $0 "*" ; } / *\$[0-1]\.[0-9][0-9] */ { print ; }' food_prices.list +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/04/Filter-and-Print-Items-Using-Awk-and-Variable.gif) +>使用 Awk 和变量来筛选和输出项目 + +### 结论 + +这就是全部内容了,使用 Awk 命令你便可以通过几种简单的方法去利用模式匹配来筛选文本,帮助你在一个文件中对文本或字符串的某些行做标记。 + +希望这篇文章对你有所帮助。记得阅读这个系列的下一部分,我们将关注在 awk 工具中使用比较运算符。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/awk-filter-text-or-string-using-patterns/ + +作者:[Aaron Kili][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/aaronkili/ \ No newline at end of file From b0d645d5dd92daf67acdfb00f5c59e55abd47a13 Mon Sep 17 00:00:00 2001 From: kokialoves <498497353@qq.com> Date: Fri, 1 Jul 2016 11:01:06 +0800 Subject: [PATCH 1676/1710] merge (#4128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Delete Part 6 - How to Use ‘next’ Command with Awk in Linux.md * Add files via upload * Create Part 6 - How to Use ‘next’ Command with Awk in Linux.md From 6ef12a2d7ac686988f7f375e8b19829920eb81ab Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 Jul 2016 11:04:54 +0800 Subject: [PATCH 1677/1710] =?UTF-8?q?=E5=BD=92=E6=A1=A3201606?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...3 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md | 0 ...210 Getting started with Docker by Dockerizing this Blog.md.md | 0 ...0160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md | 0 ...w to Enable Multiple PHP-FPM Instances with Nginx or Apache.md | 0 .../20160218 7 Steps to Start Your Linux SysAdmin Career.md | 0 .../20160218 9 Key Trends in Hybrid Cloud Computing.md | 0 published/{ => 201606}/20160218 A Linux-powered microwave oven.md | 0 .../20160218 Getting to Know Linux File Permissions.md | 0 .../20160218 Linux Systems Patched for Critical glibc Flaw.md | 0 .../20160218 Top 4 open source issue tracking tools.md | 0 ...eils a tiny 64-bit ARM processor for the Internet of Things.md | 0 ...a Center Admin Suite Should Bring Order to Containerization.md | 0 .../20160228 Two Outstanding All-in-One Linux Servers.md | 0 .../20160304 Image processing at NASA with open source tools.md | 0 ...0 65% of companies are contributing to open source projects.md | 0 ...13 How to Set Up 2-Factor Authentication for Login and sudo.md | 0 .../20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md | 0 .../20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md | 0 .../20160518 Android Use Apps Even Without Installing Them.md | 0 .../20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md | 0 .../20160523 Driving cars into the future with Linux.md | 0 .../20160524 Test Fedora 24 Beta in an OpenStack cloud.md | 0 .../20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md | 0 ...29 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md | 0 published/{ => 201606}/20160601 Apps to Snaps.md | 0 published/{ => 201606}/20160601 scp command in Linux.md | 0 .../20160605 How to Add Cron Jobs in Linux and Unix.md | 0 ...lace Passwords With A New Trust-Based Authentication Method.md | 0 ...A Smart Way to Lock User Virtual Console or Terminal in Linux.md | 0 .../{ => 201606}/20160621 Building Serverless App with Docker.md | 0 30 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201606}/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md (100%) rename published/{ => 201606}/20151210 Getting started with Docker by Dockerizing this Blog.md.md (100%) rename published/{ => 201606}/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md (100%) rename published/{ => 201606}/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md (100%) rename published/{ => 201606}/20160218 7 Steps to Start Your Linux SysAdmin Career.md (100%) rename published/{ => 201606}/20160218 9 Key Trends in Hybrid Cloud Computing.md (100%) rename published/{ => 201606}/20160218 A Linux-powered microwave oven.md (100%) rename published/{ => 201606}/20160218 Getting to Know Linux File Permissions.md (100%) rename published/{ => 201606}/20160218 Linux Systems Patched for Critical glibc Flaw.md (100%) rename published/{ => 201606}/20160218 Top 4 open source issue tracking tools.md (100%) rename published/{ => 201606}/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md (100%) rename published/{ => 201606}/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md (100%) rename published/{ => 201606}/20160228 Two Outstanding All-in-One Linux Servers.md (100%) rename published/{ => 201606}/20160304 Image processing at NASA with open source tools.md (100%) rename published/{ => 201606}/20160510 65% of companies are contributing to open source projects.md (100%) rename published/{ => 201606}/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md (100%) rename published/{ => 201606}/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md (100%) rename published/{ => 201606}/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md (100%) rename published/{ => 201606}/20160518 Android Use Apps Even Without Installing Them.md (100%) rename published/{ => 201606}/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md (100%) rename published/{ => 201606}/20160523 Driving cars into the future with Linux.md (100%) rename published/{ => 201606}/20160524 Test Fedora 24 Beta in an OpenStack cloud.md (100%) rename published/{ => 201606}/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md (100%) rename published/{ => 201606}/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md (100%) rename published/{ => 201606}/20160601 Apps to Snaps.md (100%) rename published/{ => 201606}/20160601 scp command in Linux.md (100%) rename published/{ => 201606}/20160605 How to Add Cron Jobs in Linux and Unix.md (100%) rename published/{ => 201606}/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md (100%) rename published/{ => 201606}/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md (100%) rename published/{ => 201606}/20160621 Building Serverless App with Docker.md (100%) diff --git a/published/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md b/published/201606/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md similarity index 100% rename from published/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md rename to published/201606/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md diff --git a/published/20151210 Getting started with Docker by Dockerizing this Blog.md.md b/published/201606/20151210 Getting started with Docker by Dockerizing this Blog.md.md similarity index 100% rename from published/20151210 Getting started with Docker by Dockerizing this Blog.md.md rename to published/201606/20151210 Getting started with Docker by Dockerizing this Blog.md.md diff --git a/published/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md b/published/201606/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md similarity index 100% rename from published/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md rename to published/201606/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md diff --git a/published/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md b/published/201606/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md similarity index 100% rename from published/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md rename to published/201606/20160217 How to Enable Multiple PHP-FPM Instances with Nginx or Apache.md diff --git a/published/20160218 7 Steps to Start Your Linux SysAdmin Career.md b/published/201606/20160218 7 Steps to Start Your Linux SysAdmin Career.md similarity index 100% rename from published/20160218 7 Steps to Start Your Linux SysAdmin Career.md rename to published/201606/20160218 7 Steps to Start Your Linux SysAdmin Career.md diff --git a/published/20160218 9 Key Trends in Hybrid Cloud Computing.md b/published/201606/20160218 9 Key Trends in Hybrid Cloud Computing.md similarity index 100% rename from published/20160218 9 Key Trends in Hybrid Cloud Computing.md rename to published/201606/20160218 9 Key Trends in Hybrid Cloud Computing.md diff --git a/published/20160218 A Linux-powered microwave oven.md b/published/201606/20160218 A Linux-powered microwave oven.md similarity index 100% rename from published/20160218 A Linux-powered microwave oven.md rename to published/201606/20160218 A Linux-powered microwave oven.md diff --git a/published/20160218 Getting to Know Linux File Permissions.md b/published/201606/20160218 Getting to Know Linux File Permissions.md similarity index 100% rename from published/20160218 Getting to Know Linux File Permissions.md rename to published/201606/20160218 Getting to Know Linux File Permissions.md diff --git a/published/20160218 Linux Systems Patched for Critical glibc Flaw.md b/published/201606/20160218 Linux Systems Patched for Critical glibc Flaw.md similarity index 100% rename from published/20160218 Linux Systems Patched for Critical glibc Flaw.md rename to published/201606/20160218 Linux Systems Patched for Critical glibc Flaw.md diff --git a/published/20160218 Top 4 open source issue tracking tools.md b/published/201606/20160218 Top 4 open source issue tracking tools.md similarity index 100% rename from published/20160218 Top 4 open source issue tracking tools.md rename to published/201606/20160218 Top 4 open source issue tracking tools.md diff --git a/published/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md b/published/201606/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md similarity index 100% rename from published/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md rename to published/201606/20160221 NXP unveils a tiny 64-bit ARM processor for the Internet of Things.md diff --git a/published/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md b/published/201606/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md similarity index 100% rename from published/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md rename to published/201606/20160223 New Docker Data Center Admin Suite Should Bring Order to Containerization.md diff --git a/published/20160228 Two Outstanding All-in-One Linux Servers.md b/published/201606/20160228 Two Outstanding All-in-One Linux Servers.md similarity index 100% rename from published/20160228 Two Outstanding All-in-One Linux Servers.md rename to published/201606/20160228 Two Outstanding All-in-One Linux Servers.md diff --git a/published/20160304 Image processing at NASA with open source tools.md b/published/201606/20160304 Image processing at NASA with open source tools.md similarity index 100% rename from published/20160304 Image processing at NASA with open source tools.md rename to published/201606/20160304 Image processing at NASA with open source tools.md diff --git a/published/20160510 65% of companies are contributing to open source projects.md b/published/201606/20160510 65% of companies are contributing to open source projects.md similarity index 100% rename from published/20160510 65% of companies are contributing to open source projects.md rename to published/201606/20160510 65% of companies are contributing to open source projects.md diff --git a/published/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md b/published/201606/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md similarity index 100% rename from published/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md rename to published/201606/20160513 How to Set Up 2-Factor Authentication for Login and sudo.md diff --git a/published/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md b/published/201606/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md similarity index 100% rename from published/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md rename to published/201606/20160514 NODEOS - LINUX DISTRIBUTION FOR NODE LOVERS.md diff --git a/published/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md b/published/201606/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md similarity index 100% rename from published/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md rename to published/201606/20160516 4 BEST MODERN OPEN SOURCE CODE EDITORS FOR LINUX.md diff --git a/published/20160518 Android Use Apps Even Without Installing Them.md b/published/201606/20160518 Android Use Apps Even Without Installing Them.md similarity index 100% rename from published/20160518 Android Use Apps Even Without Installing Them.md rename to published/201606/20160518 Android Use Apps Even Without Installing Them.md diff --git a/published/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md b/published/201606/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md similarity index 100% rename from published/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md rename to published/201606/20160520 ORB - NEW GENERATION OF LINUX APPS ARE HERE.md diff --git a/published/20160523 Driving cars into the future with Linux.md b/published/201606/20160523 Driving cars into the future with Linux.md similarity index 100% rename from published/20160523 Driving cars into the future with Linux.md rename to published/201606/20160523 Driving cars into the future with Linux.md diff --git a/published/20160524 Test Fedora 24 Beta in an OpenStack cloud.md b/published/201606/20160524 Test Fedora 24 Beta in an OpenStack cloud.md similarity index 100% rename from published/20160524 Test Fedora 24 Beta in an OpenStack cloud.md rename to published/201606/20160524 Test Fedora 24 Beta in an OpenStack cloud.md diff --git a/published/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md b/published/201606/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md similarity index 100% rename from published/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md rename to published/201606/20160526 BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016.md diff --git a/published/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md b/published/201606/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md similarity index 100% rename from published/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md rename to published/201606/20160529 LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS.md diff --git a/published/20160601 Apps to Snaps.md b/published/201606/20160601 Apps to Snaps.md similarity index 100% rename from published/20160601 Apps to Snaps.md rename to published/201606/20160601 Apps to Snaps.md diff --git a/published/20160601 scp command in Linux.md b/published/201606/20160601 scp command in Linux.md similarity index 100% rename from published/20160601 scp command in Linux.md rename to published/201606/20160601 scp command in Linux.md diff --git a/published/20160605 How to Add Cron Jobs in Linux and Unix.md b/published/201606/20160605 How to Add Cron Jobs in Linux and Unix.md similarity index 100% rename from published/20160605 How to Add Cron Jobs in Linux and Unix.md rename to published/201606/20160605 How to Add Cron Jobs in Linux and Unix.md diff --git a/published/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md b/published/201606/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md similarity index 100% rename from published/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md rename to published/201606/20160605 Will Google Replace Passwords With A New Trust-Based Authentication Method.md diff --git a/published/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md b/published/201606/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md similarity index 100% rename from published/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md rename to published/201606/20160611 vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux.md diff --git a/published/20160621 Building Serverless App with Docker.md b/published/201606/20160621 Building Serverless App with Docker.md similarity index 100% rename from published/20160621 Building Serverless App with Docker.md rename to published/201606/20160621 Building Serverless App with Docker.md From 6ce3fa40c5b991e0733da9db77d59d730974c5f4 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 Jul 2016 11:06:17 +0800 Subject: [PATCH 1678/1710] PUB:20160531 Why Ubuntu-based Distros Are Leaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @vim-kakali 总体翻译的不错。个别地方理解有误,语句组织需调整。加油! --- ...31 Why Ubuntu-based Distros Are Leaders.md | 63 ++++++++++++++ ...31 Why Ubuntu-based Distros Are Leaders.md | 85 ------------------- 2 files changed, 63 insertions(+), 85 deletions(-) create mode 100644 published/20160531 Why Ubuntu-based Distros Are Leaders.md delete mode 100644 translated/talk/20160531 Why Ubuntu-based Distros Are Leaders.md diff --git a/published/20160531 Why Ubuntu-based Distros Are Leaders.md b/published/20160531 Why Ubuntu-based Distros Are Leaders.md new file mode 100644 index 0000000000..c909e753f7 --- /dev/null +++ b/published/20160531 Why Ubuntu-based Distros Are Leaders.md @@ -0,0 +1,63 @@ +为什么 Ubuntu 家族会占据 Linux 发行版的主导地位? +========================================= + +在过去的数年中,我体验了一些优秀的 Linux 发行版。给我印象最深刻的是那些由强大的社区维护的发行版,而流行的发行版比强大的社区给我的印象更深。流行的 Linux 发行版往往能吸引新用户,这通常是由于其流行而使得使用该发行版会更加容易。并非绝对如此,但一般来说是这样的。 + +说到这里,首先映入我脑海的一个发行版是 [Ubuntu][1]。其基于健壮的 [Debian][2] 发行版构建,它不仅成为了一个非常受欢迎的 Linux 发行版,而且它也衍生出了不可计数的其他分支,比如 Linux Mint 就是一个例子。在本文中,我会探讨为何我认为 Ubuntu 会赢得 Linux 发行版之战的原因,以及它是怎样影响到了整个 Linux 桌面领域。 + +### Ubuntu 易于使用 + +在我几年前首次尝试使用 Ubuntu 前,我更喜欢使用 KED 桌面。在那个时期,我接触的大多是这种 KDE 桌面环境。主要原因还是 KDE 是大多数新手容易入手的 Linux 发行版中最受欢迎的。这些新手友好的发行版有 Knoppix、Simply Mepis、Xandros、Linspire 以及其它的发行版等等,这些发行版都推荐他们的用户去使用广受欢迎的 KDE。 + +现在 KDE 能满足我的需求,我也没有什么理由去折腾其他的桌面环境。有一天我的 Debian 安装失败了(由于我个人的操作不当),我决定尝试开发代号为 Dapper Drake 的 Ubuntu 版本(LCTT 译注:Ubuntu 6.06 - Dapper Drake,发布日期:2006 年 6 月 1 日),每个人都对它赞不绝口。那个时候,我对于它的印象仅限于屏幕截图,但是我想试试也挺有趣的。 + +Ubuntu Dapper Drake 给我的最大的印象是它让我很清楚地知道每个东西都在哪儿。记住,我是来自于 KDE 世界的用户,在 KDE 上要想改变菜单的设置就有 15 种方法 !而 Ubuntu 上的 GNOME 实现极具极简主义的。 + +时间来到 2016 年,最新的版本号是 16.04:我们有了好几种 Ubuntu 特色版本,也有一大堆基于 Ubuntu 的发行版。所有的 Ubuntu 特色版和衍生发行版的共同具有的核心都是为易用而设计。发行版想要增大用户基数时,这就是最重要的原因。 + +### Ubuntu LTS + +过去,我几乎一直坚持使用 LTS(Long Term Support)发行版作为我的主要桌面系统。10月份的发行版很适合我测试硬盘驱动器,甚至把它用在一个老旧的手提电脑上。我这样做的原因很简单——我没有兴趣在一个正式使用的电脑上折腾短期发行版。我是个很忙的家伙,我觉得这样会浪费我的时间。 + +对于我来说,我认为 Ubuntu 提供 LTS 发行版是 Ubuntu 能够变得流行的最大的原因。这样说吧———给普罗大众提供一个桌面 Linux 发行版,这个发行版能够得到长期的有效支持就是它的优势。事实上,不只 Ubuntu 是这样,其他的分支在这一点上也做的很好。长期支持策略以及对新手的友好环境,我认为这就为 Ubuntu 的普及带来了莫大的好处。 + +### Ubuntu Snap 软件包 + +以前,用户会夸赞可以在他们的系统上使用 PPA(personal package archive 个人软件包档案)获得新的软件。不好的是,这种技术也有缺点。当它用在各种软件名称时, PPA 经常会找不到,这种情况很常见。 + +现在有了 [Snap 软件包][3] 。当然这不是一个全新的概念,过去已经进行了类似的尝试。用户可以在一个长期支持版本上运行最新的软件,而不必去使用最新的 Ubuntu 发行版。虽然我认为目前还处于 Snap 软件包的早期,但是我很期待可以在一个稳定的发行版上运行的崭新的软件。 + +最明显的问题是,如果你要运行很多软件,那么 Snap 包实际会占用很多硬盘空间。不仅如此,大多数 Ubuntu 软件仍然需要由官方从 deb 包进行转换。第一个问题可以通过使用更大的硬盘空间得到解决,而后一个问题的解决则需要等待。 + +### Ubuntu 社区 + +首先,我承认大多数主要的 Linux 发行版都有强大的社区。然而,我坚信 Ubuntu 社区的成员是最多样化的,他们来自各行各业。例如,我们的论坛包括从苹果硬件支持到游戏等不同分类。特别是这些专业的讨论话题还非常广泛。 + +除过论坛,Ubuntu 也提供了一个很正式的社区组织。这个组织包括一个理事会、技术委员会、[本地社区团队][4]和开发者成员委员会。还有很多,但是这些都是我知道的社区组织部分。 + +我们还有一个 [Ubuntu 问答][5]版块。我认为,这种功能可以代替人们从论坛寻求帮助的方式,我发现在这个网站你得到有用信息的可能性更大。不仅如此,那些提供的解决方案中被选出的最精准的答案也会被写入到官方文档中。 + +### Ubuntu 的未来 + +我认为 Ubuntu 的 Unity 界面(LCTT 译注:Unity 是 Canonical 公司为 Ubuntu 操作系统的 GNOME 桌面环境开发的图形化界面)在提升桌面占有率上少有作为。我能理解其中的缘由,现在它主要做一些诸如可以使开发团队的工作更轻松的事情。但是最终,我还是认为 Unity 为 Ubuntu MATE 和 Linux Mint 的普及铺平道路。 + +我最好奇的一点是 Ubuntu's IRC 和邮件列表的发展(LCTT 译注:可以在 Ubuntu LoCo Teams 的 IRC Chat 上提问关于地方团队和计划的事件的问题,也可以和一些不同团队的成员进行交流)。事实是,他们都不能像 Ubuntu 问答板块那样文档化。至于邮件列表,我一直认为这对于合作是一种很痛苦的过时方法,但这仅仅是我的个人看法——其他人可能有不同的看法,也可能会认为它很好。 + +你怎么看?你认为 Ubuntu 将来会占据主要的份额吗?也许你会认为 Arch 和 Linux Mint 或者其他的发行版会在普及度上打败 Ubuntu? 既然这样,那请大声说出你最喜爱的发行版。如果这个发行版是 Ubuntu 衍生版 ,说说你为什么更喜欢它而不是 Ubuntu 本身。如果不出意外,Ubuntu 会成为构建其他发行版的基础,我想很多人都是这样认为的。 + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/why-ubuntu-based-distros-are-leaders.html + +作者:[Matt Hartley][a] +译者:[vim-kakali](https://github.com/vim-kakali) +校对:[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.ubuntu.com/ +[2]: https://www.debian.org/ +[3]: http://www.datamation.com/open-source/ubuntu-snap-packages-the-good-the-bad-the-ugly.html +[4]: http://loco.ubuntu.com/ +[5]: http://askubuntu.com/ diff --git a/translated/talk/20160531 Why Ubuntu-based Distros Are Leaders.md b/translated/talk/20160531 Why Ubuntu-based Distros Are Leaders.md deleted file mode 100644 index 9d9ce0f418..0000000000 --- a/translated/talk/20160531 Why Ubuntu-based Distros Are Leaders.md +++ /dev/null @@ -1,85 +0,0 @@ -为什么 Ubuntu 家族会占据 Linux 发行版的主导地位? -========================================= - -在过去的数年中,我已经尝试了大量的优秀 Linux 发行版。我印象最深刻的是那些被强大的社区维护的发行版。但是这样的发行版却比他们s所属的社区更受人欢迎。流行的 Linux 发行版吸引着更多的人,通常由于这样的特点使得使用该发行版更加容易。这很明显毫无关系,但一般认为这种说法是正确的。 - - -我想到的一个发行版 [Ubuntu][1]。它属于健壮的 [Debian][2]分支,Ubuntu 不可思议的成为了受欢迎的 Linux 发行版,而且它也衍生出了其他的版本,比如 Linux Mint。在本文中,我会探讨我坚信 Ubuntu 会赢得 Linux 发行版战争的原因,以及它在整个 Linux 桌面领域有着怎样的影响力。 - - -### Ubuntu容易使用 - - -多年前我第一次尝试使用Ubuntu,在这之前我更喜欢使用 KED 桌面。在那个时期,我接触的大多是这种 KDE 桌面环境。主要原因还是 KDE 是大多数新手友好的 Linux 发行版中最受欢迎的。新手友好的发行版有 Knoppix,Simply Mepis, Xandros, Linspire等,另外一些发行版和这些发行版都指出他们的用户趋向于使用 KDE。 - - - -现在KDE能满足我的需求,也没有什么理由去折腾其他的桌面环境了。有一天我的 Debian 安装失败了(由于我个人的操作不当),我决定尝试开发代号为「整洁的公鸭(Ubuntu Dapper Drake)」的 Ubuntu 版本【译者注:ubuntu 6.06 - Dapper Drake(整洁的公鸭),发布日期:2006年6月1日】。那个时候,我对于它的印象比一个屏幕截图还要少,但是我认为它很有趣并且毫无顾忌的使用它。 - - - -Ubuntu Dapper Drake 给我的最大的印象是它的操作很简单。记住,我是来自于 KDE 世界的用户,在 KDE 上要想改变菜单的设置就有15钟方法。Ubuntu 图形界面的安装启动极具极简主义。 - -时间来到2016年,最新的版本号是16.04:我们有多种可用的 Ubuntu 衍生版本,许多的都是基于 Ubuntu 的。所有的 Ubuntu 风格和公用发行版的核心都被设计的容易使用。并且发行版想要增大用户基数的时候,这就是最重要的原因。 - - -### Ubuntu LTS - -过去,我几乎一直坚持使用 LTS(Long Term Support)发行版作为我的主要桌面系统。10月份的发行版很适合我测试硬盘驱动器,甚至把它用在一个老旧的手提电脑上。我这样做的原因很简单——我没有兴趣在一个作为实验品的电脑上折腾短期发行版。我是个很忙的家伙,我觉得这样会浪费我的时间。 - - -对于我来说,我认为 Ubuntu 提供 LTS 发行版是 Ubuntu 能够变得流行的原因。这样说吧———提供一个大众的桌面 Linux 发行版,这个发行版能够得到长期的充分支持就是它的优势。事实上,Ubuntu 的优势不只这一点,其他的分支在这一点上也做的很好。长期支持版带有一个对新手的友好环境的策略,我认为这就为 Ubuntu 的普及带来了莫大的好处。 - - -### Ubuntu Snap 包 - - -以前,用户在他们的系统上使用很多 PPA(personal package archive个人软件包档案),他们总会抱怨它获得新的软件名称的能力。不好的是,这种技术也有缺点。它工作的时候带有任意的软件名称,而 PPA 却没有发现,这种情况很常见。 - - -现在有了[Snap 包][3] 。当然这不是一个全新的概念,过去已经进行了类似的尝试。用户不必要在最新的 Ubuntu 发行版上运行最新的软件,我认为这才是 Snap 将要长期提供给 Ubuntu 用户的东西。然而我仍然认为我们将会看到 Snap 淘汰的的那一天,我很期待看到一个在稳定的发行版上运行的优秀软件。 - - - -如果你要运行很多软件,那么 Snap 包实际使用的硬盘空间很明显存在问题。不仅如此,大多数 Ubuntu 软件也是通过由官方开发的 deb 包进行管理的。当后者需要花费一些时间的时候,这个问题可以通过 Snap 使用更大的硬盘驱动器空间得到解决。 - - - -### Ubuntu 社区 - -首先,我承认大多数主要的 Linux 发行版都有强大的社区。然而,我坚信 Ubuntu 社区的成员是最多样化的,他们来自各行各业。例如,我们有一个论坛来分类不同的苹果硬件对于游戏的支持程度。这些大量的专业讨论特别广泛。 - - -除过论坛,Ubuntu 也提供了一个很正式的社区组织。这个组织包括一个委员会,技术板块,[各地的团队LoCo teams][4](Ubuntu Local Community Teams)和开发人员板块。还有很多,但是这些都是我知道的社区组织部分。 - - -我们还有一个[Ubuntu 问答][5]板块。我认为,这种特色可以代替人们从论坛寻求帮助的方式,我发现在这个网站你得到有用信息的可能行更大。不仅如此,那些提供的解决方案中被选出的最精准的答案也会被写入到官方文档中。 - - -### Ubuntu 的未来 - - -我认为 Ubuntu 的 Unity 接口【译者注:Unity 是 Canonical 公司为 Ubuntu 操作系统的 GNOME 桌面环境开发的图形化 shell】在增加桌面舒适性上少有作为。我能理解其中的缘由,现在它主要做一些诸如可以使开发团队的工作更轻松的事情。但是最终,我还是希望 Unity 可以为 Ubuntu MATE 和 Linux Mint 的普及铺平道路。 - - -我最好奇的一点是 Ubuntu's IRC(Internet Relay Chat) 和邮件列表的发展【译者注:可以在 Ubuntu LoCo Teams IRC Chat上提问关于地方团队和计划的事件的问题,也可以和一些不同团队的成员进行交流】。事实是,他们都不能像 Ubuntu 问答板块那样为它们自己增添一些好的文档。至于邮件列表,我一直认为这对于合作是一种很痛苦的过时方法,但这仅仅是我的个人看法——其他人可能有不同的看法,也可能会认为它很好。 - -你说什么?你认为 Ubuntu 将来会剩下一点主要的使用者?也许你相信 Arch 和 Linux Mint 或者其他的发行版会在普及度上打败 Ubuntu 。 既然这样,那请大声说出你最喜爱的发行版。如果这个发行版是 Ubuntu 衍生版 ,说说你为什么更喜欢它而不是 Ubuntu 本身。如果不出意外,Ubuntu 会成为构建其他发行版的基础,我想很多人都是这样认为的。 - - --------------------------------------------------------------------------------- - -via: http://www.datamation.com/open-source/why-ubuntu-based-distros-are-leaders.html - -作者:[Matt Hartley][a] -译者:[vim-kakali](https://github.com/vim-kakali) -校对:[校对者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.ubuntu.com/ -[2]: https://www.debian.org/ -[3]: http://www.datamation.com/open-source/ubuntu-snap-packages-the-good-the-bad-the-ugly.html -[4]: http://loco.ubuntu.com/ -[5]: http://askubuntu.com/ From f4f3e69fde76733524282f676ace4df6a6c7f7e6 Mon Sep 17 00:00:00 2001 From: vim-kakali <1799225723@qq.com> Date: Fri, 1 Jul 2016 11:21:25 +0800 Subject: [PATCH 1679/1710] =?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 --- ...w to Read Awk Input from STDIN in Linux.md | 73 ------------------ ...w to Read Awk Input from STDIN in Linux.md | 76 +++++++++++++++++++ 2 files changed, 76 insertions(+), 73 deletions(-) delete mode 100644 sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md create mode 100644 translated/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md diff --git a/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md b/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md deleted file mode 100644 index 157716481a..0000000000 --- a/sources/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md +++ /dev/null @@ -1,73 +0,0 @@ -vim-kakali translating - - -How to Read Awk Input from STDIN in Linux -============================================ - -![](http://www.tecmint.com/wp-content/uploads/2016/06/Read-Awk-Input-from-STDIN.png) - -In the previous parts of the Awk tool series, we looked at reading input mostly from a file(s), but what if you want to read input from STDIN. -In this Part 7 of Awk series, we shall look at few examples where you can filter the output of other commands instead of reading input from a file. - -We shall start with the [dir utility][1] that works similar to [ls command][2], in the first example below, we use the output of `dir -l` command as input for Awk to print owner’s username, groupname and the files he/she owns in the current directory: - -``` -# dir -l | awk '{print $3, $4, $9;}' -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/06/List-Files-Owned-By-User-in-Directory.png) ->List Files Owned By User in Directory - -Take a look at another example where we [employ awk expressions][3], here, we want to print files owned by the root user by using an expression to filter strings as in the awk command below: - -``` -# dir -l | awk '$3=="root" {print $1,$3,$4, $9;} ' -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/06/List-Files-Owned-by-Root-User.png) ->List Files Owned by Root User - -The command above includes the `(==)` comparison operator to help us filter out files in the current directory which are owned by the root user. This is achieved using the expression `$3==”root”`. - -Let us look at another example of where we use a [awk comparison operator][4] to match a certain string. - -Here, we have used the [cat utility][5] to view the contents of a file named tecmint_deals.txt and we want to view the deals of type Tech only, so we shall run the following commands: - -``` -# cat tecmint_deals.txt -# cat tecmint_deals.txt | awk '$4 ~ /tech/{print}' -# cat tecmint_deals.txt | awk '$4 ~ /Tech/{print}' -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/06/Use-Comparison-Operator-to-Match-String.png) ->Use Awk Comparison Operator to Match String - -In the example above, we have used the value `~ /pattern/` comparison operator, but there are two commands to try and bring out something very important. - -When you run the command with pattern tech nothing is printed out because there is no deal of that type, but with Tech, you get deals of type Tech. - -So always be careful when using this comparison operator, it is case sensitive as we have seen above. - -You can always use the output of another command instead as input for awk instead of reading input from a file, this is very simple as we have looked at in the examples above. - -Hope the examples were clear enough for you to understand, if you have any concerns, you can express them through the comment section below and remember to check the next part of the series where we shall look at awk features such as variables, numeric expressions and assignment operators. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/read-awk-input-from-stdin-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/linux-dir-command-usage-with-examples/ -[2]: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ -[3]: http://www.tecmint.com/combine-multiple-expressions-in-awk -[4]: http://www.tecmint.com/comparison-operators-in-awk -[5]: http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ - - - diff --git a/translated/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md b/translated/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md new file mode 100644 index 0000000000..0d0d499d00 --- /dev/null +++ b/translated/tech/awk/Part 7 - How to Read Awk Input from STDIN in Linux.md @@ -0,0 +1,76 @@ + + +在 Linux 上怎么读取标准输入(STDIN)作为 Awk 的输入 +============================================ + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Read-Awk-Input-from-STDIN.png) + + +在 Awk 工具系列的前几节,我们看到大多数操作都是从一个文件或多个文件读取输入,或者你想要把标准输入作为 Awk 的输入. +在 Awk 系列的第7节中,我们将会看到几个例子,这些例子都是关于你可以筛选其他命令的输出代替从一个文件读取输入作为 awk 的输入. + + +我们开始使用 [dir utility][1] , dir 命令和 [ls 命令][2] 相似,在第一个例子下面,我们使用 'dir -l' 命令的输出作为 Awk 命令的输入,这样就可以打印出文件拥有者的用户名,所属组组名以及在当前路径下他/她拥有的文件. +``` +# dir -l | awk '{print $3, $4, $9;}' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/List-Files-Owned-By-User-in-Directory.png) +>列出当前路径下的用户文件 + + +看另一个例子,我们 [使用 awk 表达式][3] ,在这里,我们想要在 awk 命令里使用一个表达式筛选出字符串,通过这样来打印出 root 用户的文件.命令如下: +``` +# dir -l | awk '$3=="root" {print $1,$3,$4, $9;} ' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/List-Files-Owned-by-Root-User.png) +>列出 root 用户的文件 + + +上面的命令包含了 '(==)' 来进行比较操作,这帮助我们在当前路径下筛选出 root 用户的文件.这种方法的实现是通过使用 '$3=="root"' 表达式. + +让我们再看另一个例子,我们使用一个 [awk 比较运算符][4] 来匹配一个确定的字符串. + + +现在,我们已经用了 [cat utility][5] 来浏览文件名为 tecmint_deals.txt 的文件内容,并且我们想要仅仅查看有字符串 Tech 的部分,所以我们会运行下列命令: +``` +# cat tecmint_deals.txt +# cat tecmint_deals.txt | awk '$4 ~ /tech/{print}' +# cat tecmint_deals.txt | awk '$4 ~ /Tech/{print}' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Use-Comparison-Operator-to-Match-String.png) +>用 Awk 比较运算符匹配字符串 + + +在上面的例子中,我们已经用了参数为 `~ /匹配字符/` 的比较操作,但是上面的两个命令给我们展示了一些很重要的问题. + +当你运行带有 tech 字符串的命令时终端没有输出,因为在文件中没有 tech 这种字符串,但是运行带有 Tech 字符串的命令,你却会得到包含 Tech 的输出. + +所以你应该在进行这种比较操作的时候时刻注意这种问题,正如我们在上面看到的那样, awk 对大小写很敏感. + + +你可以一直使用另一个命令的输出作为 awk 命令的输入来代替从一个文件中读取输入,这就像我们在上面看到的那样简单. + + +希望这些例子足够简单可以使你理解 awk 的用法,如果你有任何问题,你可以在下面的评论区提问,记得查看 awk 系列接下来的章节内容,我们将关注 awk 的一些功能,比如变量,数字表达式以及赋值运算符. +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/read-awk-input-from-stdin-in-linux/ + +作者:[Aaron Kili][a] +译者:[vim-kakali](https://github.com/vim-kakali) +校对:[校对者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/linux-dir-command-usage-with-examples/ +[2]: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[3]: http://www.tecmint.com/combine-multiple-expressions-in-awk +[4]: http://www.tecmint.com/comparison-operators-in-awk +[5]: http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ + + + From b4bc04b6caa15c7a921d018dfb498698a30c1c9e Mon Sep 17 00:00:00 2001 From: Markgolzh Date: Fri, 1 Jul 2016 12:41:59 +0800 Subject: [PATCH 1680/1710] =?UTF-8?q?=E6=AD=A3=E5=9C=A8=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译中 --- .../tech/20160621 Flatpak brings standalone apps to Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160621 Flatpak brings standalone apps to Linux.md b/sources/tech/20160621 Flatpak brings standalone apps to Linux.md index 5441627710..c2c1b51e7b 100644 --- a/sources/tech/20160621 Flatpak brings standalone apps to Linux.md +++ b/sources/tech/20160621 Flatpak brings standalone apps to Linux.md @@ -1,3 +1,4 @@ +翻译中:by zky001 Flatpak brings standalone apps to Linux === @@ -19,7 +20,7 @@ If you are an application developer, the Flatpak website also contains some grea via: https://fedoramagazine.org/introducing-flatpak/ 作者:[Ryan Lerch][a] -译者:[译者ID](https://github.com/译者ID) +译者:[zky001](https://github.com/zky001) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3b7b5a5758b05e2e64f5b87cce775f12b82bd148 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 2 Jul 2016 14:15:18 +0800 Subject: [PATCH 1681/1710] PUB:20160303 Top 5 open source command shells for Linux @mr-ping --- ... 5 open source command shells for Linux.md | 86 +++++++++++++++++++ ... 5 open source command shells for Linux.md | 86 ------------------- 2 files changed, 86 insertions(+), 86 deletions(-) create mode 100644 published/20160303 Top 5 open source command shells for Linux.md delete mode 100644 translated/tech/20160303 Top 5 open source command shells for Linux.md diff --git a/published/20160303 Top 5 open source command shells for Linux.md b/published/20160303 Top 5 open source command shells for Linux.md new file mode 100644 index 0000000000..ec6aa3517a --- /dev/null +++ b/published/20160303 Top 5 open source command shells for Linux.md @@ -0,0 +1,86 @@ +Linux 下五个顶级的开源命令行 Shell +=============================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/terminal_blue_smoke_command_line_0.jpg?itok=u2mRRqOa) + +这个世界上有两种 Linux 用户:敢于冒险的和态度谨慎的。 + +其中一类用户总是本能的去尝试任何能够戳中其痛点的新选择。他们尝试过不计其数的窗口管理器、系统发行版和几乎所有能找到的桌面插件。 + +另一类用户找到他们喜欢的东西后,会一直使用下去。他们往往喜欢所使用的系统发行版的默认配置。最先熟练掌握的文本编辑器会成为他们最钟爱的那一个。 + +作为一个使用桌面版和服务器版十五年之久的 Linux 用户,比起第一类来,我无疑属于第二类用户。我更倾向于使用现成的东西,如此一来,很多时候我就可以通过文档和示例方便地找到我所需要的使用案例。如果我决定选择使用非费标准的东西,这个切换过程一定会基于细致的研究,并且前提是来自好基友的大力推荐。 + +但这并不意味着我不喜欢尝试新事物并且查漏补失。所以最近一段时间,在我不假思索的使用了 bash shell 多年之后,决定尝试一下另外四个 shell 工具:ksh、tcsh、zsh 和 fish。这四个 shell 都可以通过我所用的 Fedora 系统的默认库轻松安装,并且他们可能已经内置在你所使用的系统发行版当中了。 + +这里对它们每个选择都稍作介绍,并且阐述下它适合做为你的下一个 Linux 命令行解释器的原因所在。 + +### bash + +首先,我们回顾一下最为熟悉的一个。 [GNU Bash][1],又名 Bourne Again Shell,它是我这些年使用过的众多 Linux 发行版的默认选择。它最初发布于 1989 年,并且轻松成长为 Linux 世界中使用最广泛的 shell,甚至常见于其他一些类 Unix 系统当中。 + +Bash 是一个广受赞誉的 shell,当你通过互联网寻找各种事情解决方法所需的文档时,总能够无一例外的发现这些文档都默认你使用的是 bash shell。但 bash 也有一些缺点存在,如果你写过 Bash 脚本就会发现我们写的代码总是得比真正所需要的多那么几行。这并不是说有什么事情是它做不到的,而是说它读写起来并不总是那么直观,至少是不够优雅。 + +如上所述,基于其巨大的安装量,并且考虑到各类专业和非专业系统管理员已经适应了它的使用方式和独特之处,至少在将来一段时间内,bash 或许会一直存在。 + +### ksh + +[KornShell][4],或许你对这个名字并不熟悉,但是你一定知道它的调用命令 ksh。这个替代性的 shell 于 80 年代起源于贝尔实验室,由 David Korn 所写。虽然最初是一个专有软件,但是后期版本是在 [Eclipse Public 许可][5]下发布的。 + +ksh 的拥趸们列出了他们觉得其优越的诸多理由,包括更好的循环语法,清晰的管道退出代码,处理重复命令和关联数组的更简单的方式。它能够模拟 vi 和 emacs 的许多行为,所以如果你是一个重度文本编辑器患者,它值得你一试。最后,我发现它虽然在高级脚本方面拥有不同的体验,但在基本输入方面与 bash 如出一辙。 + +### tcsh + +[tcsh][6] 衍生于 csh(Berkely Unix C shell),并且可以追溯到早期的 Unix 和计算机时代开始。 + +tcsh 最大的卖点在于它的脚本语言,对于熟悉 C 语言编程的人来说,看起来会非常亲切。tcsh 的脚本编写有人喜欢,有人憎恶。但是它也有其他的技术特色,包括可以为 aliases 添加参数,各种可能迎合你偏好的默认行为,包括 tab 自动完成和将 tab 完成的工作记录下来以备后查。 + +tcsh 以 [BSD 许可][7]发布。 + +### zsh + +[zsh][8] 是另外一个与 bash 和 ksh 有着相似之处的 shell。诞生于 90 年代初,zsh 支持众多有用的新技术,包括拼写纠正、主题化、可命名的目录快捷键,在多个终端中共享同一个命令历史信息和各种相对于原来的 bash 的轻微调整。 + +虽然部分需要遵照 GPL 许可,但 zsh 的代码和二进制文件可以在一个类似 MIT 许可证的许可下进行分发; 你可以在 [actual license][9] 中查看细节。 + +### fish + +之前我访问了 [fish][10] 的主页,当看到 “好了,这是一个为 90 后而生的命令行 shell” 这条略带调侃的介绍时(fish 完成于 2005 年),我就意识到我会爱上这个交互友好的 shell 的。 + +fish 的作者提供了若干切换过来的理由,这些理由有点小幽默并且能戳中笑点,不过还真是那么回事。这些特性包括自动建议(“注意, Netscape Navigator 4.0 来了”,LCTT 译注:NN4 是一个重要版本。),支持“惊人”的 256 色 VGA 调色,不过也有真正有用的特性,包括根据你机器上的 man 页面自动补全命令,清除脚本和基于 web 界面的配置方式。 + +fish 的许可主要基于 GPLv2,但有些部分是在其他许可下的。你可以查看资源库来了解[完整信息][11]。 + +*** + +如果你想要寻找关于每个选择确切不同之处的详尽纲要,[这个网站][12]应该可以帮到你。 + +我的立场到底是怎样的呢?好吧,最终我应该还是会重新投入 bash 的怀抱,因为对于大多数时间都在使用命令行交互的人来说,切换过程对于编写高级的脚本能带来的好处微乎其微,并且我已经习惯于使用 bash 了。 + +但是我很庆幸做出了敞开大门并且尝试新选择的决定。我知道门外还有许许多多其他的东西。你尝试过哪些 shell,更中意哪一个?请在评论里告诉我们。 + +--- + +via: https://opensource.com/business/16/3/top-linux-shells + +作者:[Jason Baker][a] +译者:[mr-ping](https://github.com/mr-ping) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jason-baker + +[1]: https://www.gnu.org/software/bash/ +[2]: http://mywiki.wooledge.org/BashPitfalls +[3]: http://www.gnu.org/licenses/gpl.html +[4]: http://www.kornshell.org/ +[5]: https://www.eclipse.org/legal/epl-v10.html +[6]: http://www.tcsh.org/Welcome +[7]: https://en.wikipedia.org/wiki/BSD_licenses +[8]: http://www.zsh.org/ +[9]: https://sourceforge.net/p/zsh/code/ci/master/tree/LICENCE +[10]: https://fishshell.com/ +[11]: https://github.com/fish-shell/fish-shell/blob/master/COPYING +[12]: http://hyperpolyglot.org/unix-shells + diff --git a/translated/tech/20160303 Top 5 open source command shells for Linux.md b/translated/tech/20160303 Top 5 open source command shells for Linux.md deleted file mode 100644 index d40eb58b54..0000000000 --- a/translated/tech/20160303 Top 5 open source command shells for Linux.md +++ /dev/null @@ -1,86 +0,0 @@ -最牛的五个Linux开源command shell -=============================================== - -关键字: shell , Linux , bash , zsh , fish , ksh , tcsh , license - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/terminal_blue_smoke_command_line_0.jpg?itok=u2mRRqOa) - -这个世界上有两种Linux用户:敢于冒险的和态度谨慎的。 - -其中一类用户总是本能的去尝试任何能够戳中其痛点的新选择。他们尝试过不计其数的窗口管理器、系统发行版和几乎所有能找到的桌面插件。 - -另一类用户找到他们喜欢的东西后,会一直使用下去。他们往往喜欢所使用的系统发行版的默认选项。最先熟练掌握的文本编辑器会成为他们最钟爱的那一个。 - -作为一个使用桌面版和服务器版十五年之久的Linux用户,比起第一类来,我无疑属于第二类用户。我更倾向于使用现成的东西,如此一来,很多时候我就可以通过文档和示例方便地找到我所需要的使用案例。如果我决定选择使用非费标准的东西,这个切换过程一定会基于细致的研究,并且前提是来自挚友的大力推荐。 - -但这并不意味着我不喜欢尝试新事物并且查漏补失。所以最近一段时间,在我不假思索的使用了bash shell多年之后,决定尝试一下另外四个shell工具:ksh, tcsh, zsh, 和 fish. 这四个shell都可以通过我所以用的Fedora系统的默认库轻松安装,并且他们可能已经内置在你所使用的系统发行版当中了。 - -这里对每个选择都稍作介绍,并且阐述下它适合做为你的下一个Linux命令行解释器的原因所在。 - -### bash - -首先,我们回顾一下最为熟悉的一个。 [GNU Bash][1],又名 Bourne Again Shell,它是我这些年使用过的众多Linux发行版的默认选择。它最初发布于1989年,并且轻松成长为Linux世界中使用最广泛的shell,甚至常见于其他一些类Unix系统当中。 - -Bash是一个广受赞誉的shell,当你通过互联网寻找各种事情解决方法所需的文档时,总能够无一例外的发现这些文档都默认你使用的是bash shell。但Bash也有一些缺点存在,如果你写过Bash脚本就会发现我们写的代码总是得比真正所需要的多那么几行。这并不是说有什么事情是它做不到的,而是说它读写起来并不总是那么直观,至少是不够优雅。 - -如上所述,基于其巨大的安装量,并且考虑到各类专业和非专业系统管理员已经适应了它的使用方式和独特之处,至少在将来一段时间内,bash或许会一直存在。 - -### ksh - -[KornShell][4],或许你对这个名字并不熟悉,但是你一定知道它的调用命令 ksh。这个替代性的shell于80年代起源于贝尔实验室,由David Korn所写。虽然最初是一个专有软件,但是后期版本是在[Eclipse Public 许可][5]下发布的。 - -ksh的拥趸们列出了他们觉得其优越的诸多理由,包括更好的循环语法,清晰的管道退出代码,更简单的方式来处理重复命令和关联数组。它能够模拟vi和emacs的许多行为,所以如果你是一个重度文本编辑器患者,它值得你一试。最后,我发现它虽然在高级脚本方面拥有不同的体验,但在基本输入方面与bash如出一辙。 - -### tcsh - -[Tcsh][6]衍生于csh(Berkely Unix C shell),并且可以追溯到早期的Unix和计算本身。 - -Tcsh最大的卖点在于它的脚本语言,对于熟悉C语言编程的人来说,看起来会非常亲切。Tcsh的脚本编写有人喜欢,有人憎恶。但是它也有其他的技术特色,包括可以为aliases添加参数,各种可能迎合你偏好的默认行为,包括tab自动完成和将tab完成的工作记录下来以备后查。 - -你可以在[BSD 许可][7]下找到tcsh。 - -### zsh - -[Zsh][8]是另外一个与bash和ksh有着相似之处的shell。产生于90年代初,zsh支持众多有用的新技术,包括拼写纠正,主题化,可命名的目录快捷键,在多个终端中分享命令历史信息和各种相对于original Bourne shell的轻微调整。 - -虽然部分需要遵照GPL许可,但zsh的代码和二进制文件可以在MIT-like许可下进行分发; 你可以在 [actual license][9] 中查看细节。 - -### fish - -之前我访问了[fish][10]的主页,当看到 “好了,这是一个为90年代而生的命令行shell” 这条略带调侃的介绍时(fish完成于2005年),我就意识到我会爱上这个交互友好的shell的。 - -Fish的作者提供了若干切换过来的理由,shell中所有的不太实用的调用都有点小幽默并且能戳中笑点。这些特性包括自动建议("Watch out, Netscape Navigator 4.0"),支持“惊人”的256色VGA调色,不过也有真正有用的特性,包括根据机器的man页面自动补全命令,清除脚本和基于web的配置。 - -Fish的许可主要基于第二版GPL,但有些部分是在其他许可下的。你可以查看资源库来了解[完整信息][11] - -*** - -如果你想要寻找关于每个选择确切不同之处的详尽纲要,[这个网站][12]应该可以帮到你。 - -我的立场到底是怎样的呢?好吧,最终我应该还是会重新投入bash的怀抱,因为对于大多数时间都在使用命令行交互的人来说,切换过程对于高级脚本能带来的好处微乎其微,并且我已经习惯于使用bash了。 - -但是我很庆幸做出了敞开大门并且尝试新选择的决定。我知道门外还有许许多多其他的东西。你尝试过哪些shell,更中意哪一个?请在评论里告诉我们。 - -本文来源: https://opensource.com/business/16/3/top-linux-shells - -作者:[Jason Baker][a] -译者:[mr-ping](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/jason-baker - -[1]: https://www.gnu.org/software/bash/ -[2]: http://mywiki.wooledge.org/BashPitfalls -[3]: http://www.gnu.org/licenses/gpl.html -[4]: http://www.kornshell.org/ -[5]: https://www.eclipse.org/legal/epl-v10.html -[6]: http://www.tcsh.org/Welcome -[7]: https://en.wikipedia.org/wiki/BSD_licenses -[8]: http://www.zsh.org/ -[9]: https://sourceforge.net/p/zsh/code/ci/master/tree/LICENCE -[10]: https://fishshell.com/ -[11]: https://github.com/fish-shell/fish-shell/blob/master/COPYING -[12]: http://hyperpolyglot.org/unix-shells - From 3ceeaa9bcff79f20da48d20ca1605b07c7b47918 Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Sat, 2 Jul 2016 04:21:55 -0500 Subject: [PATCH 1682/1710] translated by wi-cuckoo (#4131) * translated by wi-cuckoo * translated by wi-cuckoo --- ...o Write and Tune Shell Scripts – Part 2.md | 285 ------------------ ...o Write and Tune Shell Scripts – Part 2.md | 285 ++++++++++++++++++ 2 files changed, 285 insertions(+), 285 deletions(-) delete mode 100644 sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md create mode 100644 translated/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md diff --git a/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md b/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md deleted file mode 100644 index 6a65df8d49..0000000000 --- a/sources/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md +++ /dev/null @@ -1,285 +0,0 @@ -translating by wi-cuckoo -Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2 -=============================================================================== - -In the previous article of this [Python series][1] we shared a brief introduction to Python, its command-line shell, and the IDLE. We also demonstrated how to perform arithmetic calculations, how to store values in variables, and how to print back those values to the screen. Finally, we explained the concepts of methods and properties in the context of Object Oriented Programming through a practical example. - -![](http://www.tecmint.com/wp-content/uploads/2016/06/Write-Shell-Scripts-in-Python-Programming.png) ->Write Linux Shell Scripts in Python Programming - -In this guide we will discuss control flow (to choose different courses of action depending on information entered by a user, the result of a calculation, or the current value of a variable) and loops (to automate repetitive tasks) and then apply what we have learned so far to write a simple shell script that will display the operating system type, the hostname, the kernel release, version, and the machine hardware name. - -This example, although basic, will help us illustrate how we can leverage Python OOP’s capabilities to write shell scripts easier than using regular bash tools. - -In other words, we want to go from - -``` -# uname -snrvm -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Hostname-of-Linux.png) ->Check Hostname of Linux - -to - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Linux-Hostname-Using-Python-Script.png) ->Check Linux Hostname Using Python Script - -or - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Script-to-Check-Linux-System-Information.png) ->Script to Check Linux System Information - -Looks pretty, doesn’t it? Let’s roll up our sleeves and make it happen. - -### Control flow in Python - -As we said earlier, control flow allows us to choose different outcomes depending on a given condition. Its most simple implementation in Python is an if / else clause. - -The basic syntax is: - -``` -if condition: - # action 1 -else: - # action 2 -``` - -When condition evaluates to true, the code block below will be executed (represented by `# action 1`. Otherwise, the code under else will be run. -A condition can be any statement that can evaluate to either true or false. - -For example: - -1. 1 < 3 # true - -2. firstName == “Gabriel” # true for me, false for anyone not named Gabriel - - - In the first example we compared two values to determine if one is greater than the other. - - In the second example we compared firstName (a variable) to determine if, at the current execution point, its value is identical to “Gabriel” - - The condition and the else statement must be followed by a colon (:) - - Indentation is important in Python. Lines with identical indentation are considered to be in the same code block. - -Please note that the if / else statement is only one of the many control flow tools available in Python. We reviewed it here since we will use it in our script later. You can learn more about the rest of the tools in the [official docs][2]. - -### Loops in Python - -Simply put, a loop is a sequence of instructions or statements that are executed in order as long as a condition is true, or once per item in a list. - -The most simple loop in Python is represented by the for loop iterates over the items of a given list or string beginning with the first item and ending with the last. - -Basic syntax: - -``` -for x in example: - # do this -``` - -Here example can be either a list or a string. If the former, the variable named x represents each item in the list; if the latter, x represents each character in the string: - -``` ->>> rockBands = [] ->>> rockBands.append("Roxette") ->>> rockBands.append("Guns N' Roses") ->>> rockBands.append("U2") ->>> for x in rockBands: - print(x) -or ->>> firstName = "Gabriel" ->>> for x in firstName: - print(x) -``` - -The output of the above examples is shown in the following image: - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Loops-in-Python.png) ->Learn Loops in Python - -### Python Modules - -For obvious reasons, there must be a way to save a sequence of Python instructions and statements in a file that can be invoked when it is needed. - -That is precisely what a module is. Particularly, the os module provides an interface to the underlying operating system and allows us to perform many of the operations we usually do in a command-line prompt. - -As such, it incorporates several methods and properties that can be called as we explained in the previous article. However, we need to import (or include) it in our environment using the import keyword: - -``` ->>> import os -``` - -Let’s print the current working directory: - -``` ->>> os.getcwd() -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Modules.png) ->Learn Python Modules - -Let’s now put all of this together (along with the concepts discussed in the previous article) to write the desired script. - -### Python Script - -It is considered good practice to start a script with a statement that indicates the purpose of the script, the license terms under which it is released, and a revision history listing the changes that have been made. Although this is more of a personal preference, it adds a professional touch to our work. - -Here’s the script that produces the output we shown at the top of this article. It is heavily commented so that you can understand what’s happening. - -Take a few minutes to go through it before proceeding. Note how we use an if / else structure to determine whether the length of each field caption is greater than the value of the field itself. - -Based on the result, we use empty characters to fill in the space between a field caption and the next. Also, we use the right number of dashes as separator between the field caption and its value below. - -``` -#!/usr/bin/python3 -# Change the above line to #!/usr/bin/python if you don't have Python 3 installed - -# Script name: uname.py -# Purpose: Illustrate Python's OOP capabilities to write shell scripts more easily -# License: GPL v3 (http://www.gnu.org/licenses/gpl.html) - -# Copyright (C) 2016 Gabriel Alejandro Cánepa -# ​Facebook / Skype / G+ / Twitter / Github: gacanepa -# Email: gacanepa (at) gmail (dot) com - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# REVISION HISTORY -# DATE VERSION AUTHOR CHANGE DESCRIPTION -# ---------- ------- -------------- -# 2016-05-28 1.0 Gabriel Cánepa Initial version - -# Import the os module -import os - -# Assign the output of os.uname() to the the systemInfo variable -# os.uname() returns a 5-string tuple (sysname, nodename, release, version, machine) -# Documentation: https://docs.python.org/3.2/library/os.html#module-os -systemInfo = os.uname() - -# This is a fixed array with the desired captions in the script output -headers = ["Operating system","Hostname","Release","Version","Machine"] - -# Initial value of the index variable. It is used to define the -# index of both systemInfo and headers in each step of the iteration. -index = 0 - -# Initial value of the caption variable. -caption = "" - -# Initial value of the values variable -values = "" - -# Initial value of the separators variable -separators = "" - -# Start of the loop -for item in systemInfo: - if len(item) < len(headers[index]): - # A string containing dashes to the length of item[index] or headers[index] - # To repeat a character(s), enclose it within quotes followed - # by the star sign (*) and the desired number of times. - separators = separators + "-" * len(headers[index]) + " " - caption = caption + headers[index] + " " - values = values + systemInfo[index] + " " * (len(headers[index]) - len(item)) + " " - else: - separators = separators + "-" * len(item) + " " - caption = caption + headers[index] + " " * (len(item) - len(headers[index]) + 1) - values = values + item + " " - # Increment the value of index by 1 - index = index + 1 -# End of the loop - -# Print the variable named caption converted to uppercase -print(caption.upper()) - -# Print separators -print(separators) - -# Print values (items in systemInfo) -print(values) - -# INSTRUCTIONS: -# 1) Save the script as uname.py (or another name of your choosing) and give it execute permissions: -# chmod +x uname.py -# 2) Execute it: -# ./uname.py -``` - -Once you have saved the above script to a file, give it execute permissions and run it as indicated at the bottom of the code: - -``` -# chmod +x uname.py -# ./uname.py -``` - -If you get the following error while attempting to execute the script: - -``` --bash: ./uname.py: /usr/bin/python3: bad interpreter: No such file or directory -``` - -It means you don’t have Python 3 installed. If that is the case, you can either install the package or replace the interpreter line (pay special attention and be very careful if you followed the steps to update the symbolic links to the Python binaries as outlined in the previous article): - -``` -#!/usr/bin/python3 -``` - -with - -``` -#!/usr/bin/python -``` - -which will cause the installed version of Python 2 to execute the script instead. - -**Note**: This script has been tested successfully both in Python 2.x and 3.x. - -Although somewhat rudimentary, you can think of this script as a Python module. This means that you can open it in the IDLE (File → Open… → Select file): - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Open-Python-in-IDLE.png) ->Open Python in IDLE - -A new window will open with the contents of the file. Then go to Run → Run module (or just press F5). The output of the script will be shown in the original shell: - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Run-Python-Script.png) ->Run Python Script - -If you want to obtain the same results with a script written purely in Bash, you would need to use a combination of [awk][3], [sed][4], and resort to complex methods to store and retrieve items in a list (not to mention the use of tr to convert lowercase letters to uppercase). - -In addition, Python provides portability in that all Linux systems ship with at least one Python version (either 2.x or 3.x, sometimes both). Should you need to rely on a shell to accomplish the same goal, you would need to write different versions of the script based on the shell. - -This goes to show that Object Oriented Programming features can become strong allies of system administrators. - -**Note**: You can find [this python script][5] (and others) in one of my GitHub repositories. - -### Summary - -In this article we have reviewed the concepts of control flow, loops / iteration, and modules in Python. We have shown how to leverage OOP methods and properties in Python to simplify otherwise complex shell scripts. - -Do you have any other ideas you would like to test? Go ahead and write your own Python scripts and let us know if you have any questions. Don’t hesitate to drop us a line using the comment form below, and we will get back to you as soon as we can. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/learn-python-programming-to-write-linux-shell-scripts/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 - -作者:[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/learn-python-programming-and-scripting-in-linux/ -[2]: http://please%20note%20that%20the%20if%20/%20else%20statement%20is%20only%20one%20of%20the%20many%20control%20flow%20tools%20available%20in%20Python.%20We%20reviewed%20it%20here%20since%20we%20will%20use%20it%20in%20our%20script%20later.%20You%20can%20learn%20more%20about%20the%20rest%20of%20the%20tools%20in%20the%20official%20docs. -[3]: http://www.tecmint.com/use-linux-awk-command-to-filter-text-string-in-files/ -[4]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ -[5]: https://github.com/gacanepa/scripts/blob/master/python/uname.py diff --git a/translated/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md b/translated/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md new file mode 100644 index 0000000000..d7b6bf6c2e --- /dev/null +++ b/translated/tech/20160601 Learn Python Control Flow and Loops to Write and Tune Shell Scripts – Part 2.md @@ -0,0 +1,285 @@ +学习使用 python 控制流和循环来编写和执行 Shell 脚本 —— Part 2 +====================================================================================== + +在[Python series][1]之前的文章里,我们分享了 Python的一个简介,它的命令行 shell 和 IDLE(译者注:python 自带的一个IDE)。我们也演示了如何进行数值运算,如何用变量存储值,还有如何打印那些值到屏幕上。最后,我们通过一个练习示例讲解了面向对象编程中方法和属性概念。 + +![](http://www.tecmint.com/wp-content/uploads/2016/06/Write-Shell-Scripts-in-Python-Programming.png) +>在 Python 编程中写 Linux Shell 脚本 + +本篇中,我嫩会讨论控制流(根据用户输入的信息,计算的结果,或者一个变量的当前值选择不同的动作行为)和循环(自动重复执行任务),接着应用到我们目前所学东西中,编写一个简单的 shell 脚本,这个脚本会显示操作系统类型,主机名,内核发行版,版本号和机器硬件名字。 + +这个例子尽管很基础,但是会帮助我们证明,比起使用一些 bash 工具写 shell 脚本,我们可以使得用 Python OOP 的兼容特性来编写 shell 脚本会更简单些。 + +换句话说,我们想从这里出发 + +``` +# uname -snrvm +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Hostname-of-Linux.png) +> 检查 Linux 的主机号 + +到 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Linux-Hostname-Using-Python-Script.png) +> 用 Python 脚本来检查 Linux 的主机号 + +或者 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Script-to-Check-Linux-System-Information.png) +> 用脚本检查 Linux 系统信息 + +看着不错,不是吗?那我们就挽起袖子,开干吧。 + +### Python 中的控制流 + +如我们刚说那样,控制流允许我们根据一个给定的条件,选择不同的输出结果。在 Python 中最简单的实现就是一个 if/else 语句。 + +基本语法是这样的: + +``` +if condition: + # action 1 +else: + # action 2 +``` + +当 condition 求值为真(true),下面的代码块就会被执行(`# action 1`代表的部分)。否则,else 下面的代码就会运行。 +condition 可以是任何表达式,只要可以求得值为真或者假。 + +举个例子: + +1. 1 < 3 # 真 + +2. firstName == "Gabriel" # 对 firstName 为 Gabriel 的人是真,对其他不叫 Gabriel 的人为假 + + - 在第一个例子中,我们比较了两个值,判断 1 是否小于 3。 + - 在第二个例子中,我们比较了 firstName(一个变量)与字符串 “Gabriel”,看在当前执行的位置,firstName 的值是否等于该字符串。 + - 条件和 else 表达式都必须带着一个冒号(:)。 + - 缩进在 Python 非常重要。同样缩进下的行被认为是相同的代码块。 + +请注意,if/else 表达式只是 Python 中许多控制流工具的一个而已。我们先在这里了解以下,后面会用在我们的脚本中。你可以在[官方文档][2]中学到更多工具。 + +### Python 中的循环 + +简单来说,一个循环就是一组指令或者表达式序列,可以按顺序一直执行,只要一个条件为真,或者在一个列表里一次执行一个条目。 + +Python 中最简单的循环,就是 for 循环迭代一个给定列表的元素,或者一个字符串从第一个字符开始到最后一个字符结束。 + +基本语句: + +``` +for x in example: + # do this +``` + +这里的 example 可以是一个列表或者一个字符串。如果是列表,变量 x 就代表列表中每个元素;如果是字符串,x 就代表字符串中每个字符。 + +``` +>>> rockBands = [] +>>> rockBands.append("Roxette") +>>> rockBands.append("Guns N' Roses") +>>> rockBands.append("U2") +>>> for x in rockBands: + print(x) +or +>>> firstName = "Gabriel" +>>> for x in firstName: + print(x) +``` + +上面例子的输出如下图所示: + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Loops-in-Python.png) +>学习 Python 中的循环 + +### Python 模块 + +很明显,必须有个途径可以保存一系列的 Python 指令和表达式到文件里,然后需要的时候再取出来。 + +准确来说模块就是这样的。特别地,os 模块提供了一个接口到操作系统的底层,允许我们做许多通常在命令行下的操作。 + +没错,os 模块包含了许多方法和属性,可以用来调用,就如我们之前文章里讲解的那样。尽管如此,我们需要使用 import 关键词导入(或者叫包含)模块到开发环境里来: + +``` +>>> import os +``` + +我们来打印出当前的工作目录: + +``` +>>> os.getcwd() +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Learn-Python-Modules.png) +>学习 Python 模块 + +现在,让我们把所有结合在一起(包括之前文章里讨论的概念),编写需要的脚本。 + +### Python 脚本 + +以一个声明开始一个脚本是个不错的想法,表明脚本的目的,发行所依据的证书,和一个修订历史列出所做的修改。尽管这主要是个人喜好,但这会让我们的工作看起来比较专业。 + +这里有个脚本,可以输出这篇文章最前面展示的那样。脚本做了大量的注释,为了让大家可以理解发生了什么。 + +在进行下一步之前,花点时间来理解它。注意,我们是如何使用一个 if/else 结构,判断每个字段标题的长度是否比字段本身的值还大。 + +基于这个结果,我们用空字符去填充一个字段标题和下一个之间的空格。同时,我们使用一定数量的短线作为字段标题与其值之间的分割符。 + +``` +#!/usr/bin/python3 +# Change the above line to #!/usr/bin/python if you don't have Python 3 installed + +# Script name: uname.py +# Purpose: Illustrate Python's OOP capabilities to write shell scripts more easily +# License: GPL v3 (http://www.gnu.org/licenses/gpl.html) + +# Copyright (C) 2016 Gabriel Alejandro Cánepa +# ​Facebook / Skype / G+ / Twitter / Github: gacanepa +# Email: gacanepa (at) gmail (dot) com + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# REVISION HISTORY +# DATE VERSION AUTHOR CHANGE DESCRIPTION +# ---------- ------- -------------- +# 2016-05-28 1.0 Gabriel Cánepa Initial version + +# Import the os module +import os + +# Assign the output of os.uname() to the the systemInfo variable +# os.uname() returns a 5-string tuple (sysname, nodename, release, version, machine) +# Documentation: https://docs.python.org/3.2/library/os.html#module-os +systemInfo = os.uname() + +# This is a fixed array with the desired captions in the script output +headers = ["Operating system","Hostname","Release","Version","Machine"] + +# Initial value of the index variable. It is used to define the +# index of both systemInfo and headers in each step of the iteration. +index = 0 + +# Initial value of the caption variable. +caption = "" + +# Initial value of the values variable +values = "" + +# Initial value of the separators variable +separators = "" + +# Start of the loop +for item in systemInfo: + if len(item) < len(headers[index]): + # A string containing dashes to the length of item[index] or headers[index] + # To repeat a character(s), enclose it within quotes followed + # by the star sign (*) and the desired number of times. + separators = separators + "-" * len(headers[index]) + " " + caption = caption + headers[index] + " " + values = values + systemInfo[index] + " " * (len(headers[index]) - len(item)) + " " + else: + separators = separators + "-" * len(item) + " " + caption = caption + headers[index] + " " * (len(item) - len(headers[index]) + 1) + values = values + item + " " + # Increment the value of index by 1 + index = index + 1 +# End of the loop + +# Print the variable named caption converted to uppercase +print(caption.upper()) + +# Print separators +print(separators) + +# Print values (items in systemInfo) +print(values) + +# INSTRUCTIONS: +# 1) Save the script as uname.py (or another name of your choosing) and give it execute permissions: +# chmod +x uname.py +# 2) Execute it: +# ./uname.py +``` + +如果你已经保存上面的脚本到一个文件里,给文件执行权限,并且运行它,像代码底部描述的那样: + +``` +# chmod +x uname.py +# ./uname.py +``` + +如果试图运行脚本时,你得到了如下的错误: + +``` +-bash: ./uname.py: /usr/bin/python3: bad interpreter: No such file or directory +``` + +这意味着你没有安装 Python3。如果那样的话,你要么安装 Python3 的包,要么替换解释器那行(如果你跟着下面的步骤去更新 Python 执行文件的软连接,如之前文章里概述的那样,要特别注意并且非常小心): + +``` +#!/usr/bin/python3 +``` + +为 + +``` +#!/usr/bin/python +``` + +这样会导致使用安装好的 Python 2 版本去执行该脚本。 + +**注意**: 该脚本在 Python 2.x 与 Pyton 3.x 上都测试成功过了。 + +尽管比较粗糙,你可以认为该脚本就是一个 Python 模块。这意味着你可以在 IDLE 中打开它(File → Open… → Select file): + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Open-Python-in-IDLE.png) +>在 IDLE 中打开 Python + +一个包含有文件内容的新窗口就会打开。然后执行 Run → Run module(或者按 F5)。脚本的输出就会在原 Shell 里显示出来: + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Run-Python-Script.png) +>执行 Python 脚本 + +如果你想纯粹用 bash 写一个脚本,也获得同样的结果,你可能需要结合使用 [awk][3],[sed][4],并且借助复杂的方法来存储与获得列表中的元素(忘了提醒使用 tr 命令将小写字母转为大写) + +另外,Python 在所有的 Linux 系统版本中集成了至少一个 Python 版本(2.x 或者 3.x,或者两者都有)。你还需要依赖 shell 去完成同样的目标吗,那样你可能会为不同的 shell 编写不同的版本。 + +这里演示了面向对象编程的特性,会成为一个系统管理员得力的助手。 + +**注意**:你可以在我的 Github 仓库里获得 [这个 python 脚本][5](或者其他的)。 + +### 总结 + +这篇文章里,我们讲解了 Python 中控制流,循环/迭代,和模块的概念。我们也演示了如何利用 Python 中 OOP 的方法和属性,来简化复杂的 shell 脚本。 + +你有任何其他希望去验证的想法吗?开始吧,写出自己的 Python 脚本,如果有任何问题可以咨询我们。不必犹豫,在分割线下面留下评论,我们会尽快回复你。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/learn-python-programming-to-write-linux-shell-scripts/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[Gabriel Cánepa][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/gacanepa/ +[1]: http://www.tecmint.com/learn-python-programming-and-scripting-in-linux/ +[2]: http://please%20note%20that%20the%20if%20/%20else%20statement%20is%20only%20one%20of%20the%20many%20control%20flow%20tools%20available%20in%20Python.%20We%20reviewed%20it%20here%20since%20we%20will%20use%20it%20in%20our%20script%20later.%20You%20can%20learn%20more%20about%20the%20rest%20of%20the%20tools%20in%20the%20official%20docs. +[3]: http://www.tecmint.com/use-linux-awk-command-to-filter-text-string-in-files/ +[4]: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[5]: https://github.com/gacanepa/scripts/blob/master/python/uname.py + From dc6ee9092447215559f875a3a2b872933601d082 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 3 Jul 2016 10:44:46 +0800 Subject: [PATCH 1683/1710] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rename for windows --- ...20160621 Container technologies in Fedora - systemd-nspawn.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/{20160621 Container technologies in Fedora: systemd-nspawn.md => 20160621 Container technologies in Fedora - systemd-nspawn.md} (100%) diff --git a/sources/tech/20160621 Container technologies in Fedora: systemd-nspawn.md b/sources/tech/20160621 Container technologies in Fedora - systemd-nspawn.md similarity index 100% rename from sources/tech/20160621 Container technologies in Fedora: systemd-nspawn.md rename to sources/tech/20160621 Container technologies in Fedora - systemd-nspawn.md From 00d5430e9f33cf89bd71d24e4d1bd4de1acb0671 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 3 Jul 2016 14:19:32 +0800 Subject: [PATCH 1684/1710] Translated translated/tech/20160425 How to Use Awk to Print Fields and Columns in File.md --- ...Awk to Print Fields and Columns in File.md | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/translated/tech/20160425 How to Use Awk to Print Fields and Columns in File.md b/translated/tech/20160425 How to Use Awk to Print Fields and Columns in File.md index 127cc061c1..94b914cd3d 100644 --- a/translated/tech/20160425 How to Use Awk to Print Fields and Columns in File.md +++ b/translated/tech/20160425 How to Use Awk to Print Fields and Columns in File.md @@ -1,21 +1,20 @@ -ictlyh Translating -How to Use Awk to Print Fields and Columns in File +如何使用 Awk 打印文件中的字段和列 =================================================== -In this part of our [Linux Awk command series][1], we shall have a look at one of the most important features of Awk, which is field editing. +在 [Linux Awk 命令系列介绍][1] 的这部分,我们来看一下 awk 最重要的功能之一,字段编辑。 -It is good to know that Awk automatically divides input lines provided to it into fields, and a field can be defined as a set of characters that are separated from other fields by an internal field separator. +首先我们要知道 Awk 会自动把输入的行切分为字段,字段可以定义为是一些字符集,这些字符集和其它字段被内部字段分隔符分离。 ![](http://www.tecmint.com/wp-content/uploads/2016/04/Awk-Print-Fields-and-Columns.png) ->Awk Print Fields and Columns +>Awk 输出字段和列 -If you are familiar with the Unix/Linux or do [bash shell programming][2], then you should know what internal field separator (IFS) variable is. The default IFS in Awk are tab and space. +如果你熟悉 Unix/Linux 或者懂得 [bash shell 编程][2],那么你也应该知道内部字段分隔符(IFS)变量。Awk 默认的 IFS 是 tab 和空格。 -This is how the idea of field separation works in Awk: when it encounters an input line, according to the IFS defined, the first set of characters is field one, which is accessed using $1, the second set of characters is field two, which is accessed using $2, the third set of characters is field three, which is accessed using $3 and so forth till the last set of character(s). +Awk 字段切分的工作原理如下:当获得一行输入时,根据定义的 IFS,第一个字符集是字段一,用 $1 表示,第二个字符集是字段二,用 $2 表示,第三个字符集是字段三,用 $3 表示,以此类推直到最后一个字符集。 -To understand this Awk field editing better, let us take a look at the examples below: +为了更好的理解 Awk 的字段编辑,让我们来看看下面的例子: -**Example 1**: I have created a text file called tecmintinfo.txt. +**事例 1:**: 我创建了一个名为 tecmintinfo.txt 的文件。 ``` # vi tecmintinfo.txt @@ -23,24 +22,23 @@ To understand this Awk field editing better, let us take a look at the examples ``` ![](http://www.tecmint.com/wp-content/uploads/2016/04/Create-File-in-Linux.png) ->Create File in Linux +>在 Linux 中创建文件 -Then from the command line, I try to print the first, second and third fields from the file tecmintinfo.txt using the command below: +然后在命令行中使用以下命令打印 tecmintinfo.txt 文件中的第一、第二和第三个字段。 ``` $ awk '//{print $1 $2 $3 }' tecmintinfo.txt TecMint.comisthe ``` +从上面的输出中你可以看到,三个字段中的第一个是按照定义的 IFS,也就是空格,打印的。 -From the output above, you can see that the characters from the first three fields are printed based on the IFS defined which is space: +- 字段一 “TecMint.com” 使用 $1 访问。 +- 字段二 “is” 通过 $2 访问。 +- 字段三 “the” 通过 $3 访问。 -- Field one which is “TecMint.com” is accessed using $1. -- Field two which is “is” is accessed using $2. -- Field three which is “the” is accessed using $3. +如果你注意打印的输出,可以看到字段值之间并没有分隔开,这是 print 默认的方式。 -If you have noticed in the printed output, the field values are not separated and this is how print behaves by default. - -To view the output clearly with space between the field values, you need to add (,) operator as follows: +为了在字段值之间加入空格,你需要像下面这样添加(,)分隔符: ``` $ awk '//{print $1, $2, $3; }' tecmintinfo.txt @@ -48,11 +46,11 @@ $ awk '//{print $1, $2, $3; }' tecmintinfo.txt TecMint.com is the ``` -One important thing to note and always remember is that the use of ($) in Awk is different from its use in shell scripting. +很重要而且必须牢记的一点是,Awk 中 ($) 的使用和在 shell 脚本中不一样。 -Under shell scripting ($) is used to access the value of variables while in Awk ($) it is used only when accessing the contents of a field but not for accessing the value of variables. +在 shell 脚本中 ($) 用于获取变量的值,而在 Awk 中 ($) 只用于获取一个字段的内容,而不能用于获取变量的值。 -**Example 2**: Let us take a look at one other example using a file which contains multiple lines called my_shoping.list. +**事例2**: 让我们再看一个使用多行文件 my_shoping.list 的例子。 ``` No Item_Name Unit_Price Quantity Price @@ -62,7 +60,7 @@ No Item_Name Unit_Price Quantity Price 4 Ethernet_Cables #30,000 4 #120,000 ``` -Say you wanted to only print Unit_Price of each item on the shopping list, you will need to run the command below: +假设你只想打印购物清单中每个物品的 Unit_Price,你需要允许下面的命令: ``` $ awk '//{print $2, $3 }' my_shopping.txt @@ -74,9 +72,9 @@ RAM_Chips #150,000 Ethernet_Cables #30,000 ``` -Awk also has a printf command that helps you to format your output is a nice way as you can see the above output is not clear enough. +Awk 也有一个 printf 命令,它能帮助你用更好的方式格式化输出,正如你可以看到上面的输出并不清晰。 -Using printf to format output of the Item_Name and Unit_Price: +使用 printf 格式化输出 Item_Name 和 Unit_Price: ``` $ awk '//{printf "%-10s %s\n",$2, $3 }' my_shopping.txt @@ -88,18 +86,18 @@ RAM_Chips #150,000 Ethernet_Cables #30,000 ``` -### Summary +### 总结 -Field editing is very important when using Awk to filter text or strings, it helps you get particular data in columns in a list. And always remember that the use of ($) operator in Awk is different from that in shell scripting. +使用 Awk 进行文本和字符串过滤时字段编辑功能非常重要,它能帮助你从列表中获取列的特定数据。同时需要记住 Awk 中 ($) 操作符和 shell 脚本中不一样。 -I hope the article was helpful to you and for any additional information required or questions, you can post a comment in the comment section. +我希望这篇文章能对你有所帮助,如果你需要获取其它信息或者有任何疑问,都可以在下面的评论框中告诉我们。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/awk-print-fields-columns-with-space-separator/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 作者:[Aaron Kili][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 aeebb76494651b04e75d8f325873d2ed17949ba8 Mon Sep 17 00:00:00 2001 From: pspkforever Date: Sun, 3 Jul 2016 20:52:08 +0800 Subject: [PATCH 1685/1710] Update 20160621 Docker Datacenter in AWS and Azure in Few Clicks.md --- ...0160621 Docker Datacenter in AWS and Azure in Few Clicks.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160621 Docker Datacenter in AWS and Azure in Few Clicks.md b/sources/tech/20160621 Docker Datacenter in AWS and Azure in Few Clicks.md index aa4a317103..d9431155ff 100644 --- a/sources/tech/20160621 Docker Datacenter in AWS and Azure in Few Clicks.md +++ b/sources/tech/20160621 Docker Datacenter in AWS and Azure in Few Clicks.md @@ -1,5 +1,6 @@ +translated by pspkforever DOCKER DATACENTER IN AWS AND AZURE IN A FEW CLICKS -==================================================== +=================================================== Introducing Docker Datacenter AWS Quickstart and Azure Marketplace Templates production-ready, high availability deployments in just a few clicks. From 2a1976bbaffed5e9a4b5c13d501d3a54b3fec30f Mon Sep 17 00:00:00 2001 From: chenxinlong <237448382@qq.com> Date: Sun, 3 Jul 2016 21:01:54 +0800 Subject: [PATCH 1686/1710] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E4=B8=AD]20160624?= =?UTF-8?q?=20IT=20runs=20on=20the=20cloud=20and=20the=20cloud=20runs=20on?= =?UTF-8?q?=20Linux.Any=20questions=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... on the cloud and the cloud runs on Linux. Any questions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20160624 IT runs on the cloud and the cloud runs on Linux. Any questions.md b/sources/talk/20160624 IT runs on the cloud and the cloud runs on Linux. Any questions.md index 2a575c1a31..94f0a8af2f 100644 --- a/sources/talk/20160624 IT runs on the cloud and the cloud runs on Linux. Any questions.md +++ b/sources/talk/20160624 IT runs on the cloud and the cloud runs on Linux. Any questions.md @@ -1,3 +1,4 @@ +chenxinlong translating IT runs on the cloud, and the cloud runs on Linux. Any questions? =================================================================== @@ -37,7 +38,7 @@ So, just as the vast majority of Android phone and Chromebook users have no clue via: http://www.zdnet.com/article/it-runs-on-the-cloud-and-the-cloud-runs-on-linux-any-questions/#ftag=RSSbaffb68 作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) +译者:[chenxinlong](https://github.com/chenxinlong) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9fe021efe27c6148ff98b52ef20c1561d9b0f83f Mon Sep 17 00:00:00 2001 From: crazyLinuxer <958983476@qq.com> Date: Sun, 3 Jul 2016 21:32:46 +0800 Subject: [PATCH 1687/1710] finish translating by kylepeng93 (#4135) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add files via upload * Delete 给学习OpenStack基础设施的新手的入门指南.md * Delete 20160416 A newcomer's guide to navigating OpenStack Infrastructure.md * Add files via upload * Delete 给学习OpenStack基础设施的新手的入门指南.md * translated by kylepeng93 --- ... to navigating OpenStack Infrastructure.md | 88 ------------------- ... to navigating OpenStack Infrastructure.md | 65 ++++++++++++++ 2 files changed, 65 insertions(+), 88 deletions(-) delete mode 100644 sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md create mode 100644 translated/tech/A newcomer's guide to navigating OpenStack Infrastructure.md diff --git a/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md b/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md deleted file mode 100644 index 25dc193fdc..0000000000 --- a/sources/tech/20160416 A newcomer's guide to navigating OpenStack Infrastructure.md +++ /dev/null @@ -1,88 +0,0 @@ -translating by kylepeng93 -A newcomer's guide to navigating OpenStack Infrastructure -=========================================================== - -New contributors to OpenStack are welcome, but having a road map for navigating within this maturing, fast-paced open source community doesn't hurt. At OpenStack Summit in Austin, [Paul Belanger][1] (Red Hat, Inc.), [Elizabeth K. Joseph][2] (HPE), and [Christopher Aedo][3] (IBM) will lead a session on [OpenStack Infrastructure for Beginners][4]. In this interview, they offer tips and resources to help onboard new OpenStack contributors. - -![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) - -**Your talk description says you'll be "diving into the heart of infrastructure and explain everything you need to know about the systems that keep OpenStack working." That's a tall order for a 40-minute time slot. What are the top things beginners should know about OpenStack infrastructure?** - -**Elizabeth K. Joseph (EKJ)**: We don't use GitHub for OpenStack patches. This is something that trips up a lot of new contributors because we do maintain mirrors of all our repositories on GitHub for historical reasons. Instead we use a fully open source code review and continuous integration (CI) system maintained by the OpenStack Infrastructure team. Relatedly, since we run a CI system, every change proposed to OpenStack is tested before merging. - -**Paul Belanger (PB)**: A lot of passionate people in the project, so don't get discouraged if your patch gets a -1. - -**Christopher Aedo (CA)**: The community wants to help you succeed, don't be afraid to ask questions or ask for pointers to more information to improve your understanding. - -### Which online resources would you recommend for beginners to fill in the holes for what you can't cover in your talk? - -**PB**: Definitely our [OpenStack Project Infrastructure documentation][5]. At lot of effort has been taken to keep it up to date as much as possible. Every system used in running OpenStack as a project has a dedicated page, even the OpenStack cloud the Infrastructure teams is bringing online. - -**EKJ**: I'll echo what Paul said about the Infrastructure documentation, and add that we love seeing patches from folks who are learning. We often don't realize what we're missing in terms of documentation until someone asks. So read, learn, and then help us fill in the gaps. You can ask questions on the [openstack-infra mailing list][6] or in our IRC channel at #openstack-infra on Freenode. - -**CA**: I love [this detailed post][7] about building images, by Ian Wienand. - -### Which "gotchas" should new OpenStack contributors look out for? - -**EKJ**: Contributing is not just about submitting new code and new features; the OpenStack community places a very high value on doing code reviews. If you want people to look at a patch you submitted, consider reviewing some of the work of others and providing clear and constructive feedback. The more your fellow contributors know about your work and see you doing reviews, the more likely you'll get your code reviewed in a timely manner. - -**CA**: I see a lot of newcomers getting tripped up with [Gerrit][8]. Read through the [developer workflow][9] in the Developers Guide, and then maybe read through it one more time. If you're not used to Gerrit, it can seem confusing and overwhelming at first, but walking through a few code reviews usually makes it all come together. Also, I'm a big fan of IRC. It can be a great place to get help, but it's best if you can maintain a persistent presence so people can answer your questions even if you're not "there" at that particular moment. (Read [IRC, the secret to success in open source][10].) You don't need to be "always on," but the ability to easily scroll back in a channel and catch up on a conversation can be invaluable. - -**PB**: I agree with both Elizabeth and Chris—Gerrit is what to look out for. It is going to be the hub of your development effort. Not only will you be submitting code for people to review, but you'll also be reviewing other contributors' code. Watch out for the Gerrit UI; it can be confusing at times. I'd recommend trying out [Gertty][11], which is a console-based interface to the Gerrit Code Review system, which happens to be a project driven by OpenStack Infrastructure. - -### What resources do you recommend for beginners to help them network with other OpenStack contributors? - -**PB**: For me, it was using IRC and joining the #openstack-infra channel on Freenode ([IRC logs][12]). There is a lot of fantastic information and people in that channel. You get to see the day-to-day operations of the OpenStack project, and once you know how the project works, you'll have a better understanding on how to contribute to its future. - -**CA**: I want to second that note for IRC; staying on IRC throughout the day made a huge difference for me in terms of feeling informed and connected. It's also such a great way to get help when you're stuck with someone on one of the projects—the ones with active IRC channels always have someone around willing to get your issues sorted out. - -**EKJ**: The [openstack-dev mailing list][13] is quite important for staying up to date with news about projects you're working on inside of OpenStack, so I recommend subscribing to that. The mailing list uses subject tags to separate projects, so you can instruct your email client to use those and focus on threads that impact projects you care about. Beyond online resources, many OpenStack groups have popped up all over the world that serve the needs of both users and contributors to OpenStack, and many of them routinely have talks and events with key OpenStack contributors. You can search on Meetup.com in your area, or search on [groups.openstack.org][14] to see if there is an OpenStack group in your area. Finally, there are the [OpenStack Summits][15], which happen every six months, and where we'll be giving our Infrastructure talk. In their current format, the summits consist of both a user conference and a developer conference in one space to talk about everything related to OpenStack, past, present, and future. - -### In which areas does OpenStack need to improve to become more beginner-friendly? - -**PB**: I think our [account-setup][16] process could be made easier for new contributors, especially how many steps are needed to submit your first patch. There is a large cost to enroll into OpenStack development model, which maybe be too much for contributors; however, once enrolled, the model works fantastic for developers. - -**CA**: We have a very pro-developer community, but the focus is on developing OpenStack itself, with less consideration given to the users of OpenStack clouds. We need to bring in application developers and encourage more people to develop things that run beautifully on OpenStack clouds, and encourage them to share those apps in the [Community App Catalog][17]. We can do this by continuing to improve our API standards and by ensuring different libraries (like libcloud, phpopencloud, and others) continue to work reliably for developers. Oh, also by sponsoring more OpenStack hackathons! All these things can ease entry for newcomers, which will lead to them sticking around. - -**EKJ**: I've worked on open source software for many years, but for a large number of OpenStack developers, this is the first open source project they've every worked on. I've found that their proprietary software background doesn't prepare them for the open source ideals, methodologies, and collaboration techniques used in an open source project. I'd love to see us do a better job of welcoming people who have this proprietary software background and working with them so they can truly understand the value of what they're working on in the open source software community. - -### I think 2016 is shaping up to be the Year of the Open Source Haiku. Explain OpenStack to beginners via Haiku. - -**PB**: OpenStack runs clouds If you enjoy free software Submit your first patch - -**CA**: In the near future OpenStack will rule the world Help make it happen! - -**EKJ**: OpenStack is free Deploy on your own servers And run your own cloud! - -*Paul, Elizabeth*, and Christopher will be [speaking at OpenStack Summit][18] in Austin on Monday, April 25, starting at 11:15am. - - ------------------------------------------------------------------------------- - -via: https://opensource.com/business/16/4/interview-openstack-infrastructure-beginners - -作者:[linux.com][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://rikkiendsley.com/ -[1]: https://twitter.com/pabelanger -[2]: https://twitter.com/pleia2 -[3]: https://twitter.com/docaedo -[4]: https://www.openstack.org/summit/austin-2016/summit-schedule/events/7337 -[5]: http://docs.openstack.org/infra/system-config/ -[6]: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra -[7]: https://www.technovelty.org/openstack/image-building-in-openstack-ci.html -[8]: https://code.google.com/p/gerrit/ -[9]: http://docs.openstack.org/infra/manual/developers.html#development-workflow -[10]: https://developer.ibm.com/opentech/2015/12/20/irc-the-secret-to-success-in-open-source/ -[11]: https://pypi.python.org/pypi/gertty -[12]: http://eavesdrop.openstack.org/irclogs/%23openstack-infra/ -[13]: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev -[14]: https://groups.openstack.org/ -[15]: https://www.openstack.org/summit/ -[16]: http://docs.openstack.org/infra/manual/developers.html#account-setup -[17]: https://apps.openstack.org/ -[18]: https://www.openstack.org/summit/austin-2016/summit-schedule/events/7337 diff --git a/translated/tech/A newcomer's guide to navigating OpenStack Infrastructure.md b/translated/tech/A newcomer's guide to navigating OpenStack Infrastructure.md new file mode 100644 index 0000000000..b22d5e1fd5 --- /dev/null +++ b/translated/tech/A newcomer's guide to navigating OpenStack Infrastructure.md @@ -0,0 +1,65 @@ +translating by kylepeng93 +给学习OpenStack基础设施的新手的入门指南 +=========================================================== + +任何一个为OpenStack贡献源码的人会受到社区的欢迎,但是,对于一个发展趋近成熟并且快速迭代的开源社区而言,能够拥有一个新手指南并不是 +件坏事。在奥斯汀举办的OpenStack峰会上,[Paul Belanger][1] (红帽公司), [Elizabeth K. Joseph][2] (HPE公司),和[Christopher Aedo][3] (IBM公司)将会就针对新人的OpenStack基础设施作一场专门的会谈。在这次采访中,他们将会提供一些建议和资源来帮助新人成为OpenStack贡献者中的一员。 +![](https://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) + +**你在谈话中表示你将“投入全部身心于基础设施并解释你需要知道的有关于维持OpenStack正常工作的系统的每一件事情”。这是一个持续了40分钟的的艰巨任务。那么,对于学习OpenStack基础设施的新手来说最需要知道那些事情呢?** +**Elizabeth K. Joseph (EKJ)**: 我们没有为OpenStack使用GitHub这种提交补丁的方式,这是因为这样做会对新手造成巨大的困扰,尽管由于历史原因我们还是保留了所有原先就在GitHub上的所有库的镜像。相反,我们使用了一种完全开源的复查形式,并通过OpenStack基础设施团队来持续的维持系统集成(CI)。相关的,自从我们使用了CI系统,每一个提交给OpenStack的改变都会在被合并之前进行测试。 +**Paul Belanger (PB)**: 这个项目中的大多数都是富有激情的人,因此当你提交的补丁被某个人否定时不要感到沮丧。 +**Christopher Aedo (CA)**:社区很想帮助你取得成功,因此不要害怕提问或者寻求更多的那些能够促进你理解某些事物的引导者。 + +### 在你的讲话中,对于一些你无法涉及到的方面,你会向新手推荐哪些在线资源来让他们更加容易入门? +**PB**:当然是我们的[OpenStack项目基础设施文档][5]。我们已经花了足够大的努力来尽可能让这些文档能够随时保持最新状态。我们对每个运行OpenStack项目并投入使用的系统都有制作专门的页面来进行说明。甚至于连OpenStack云基础设施团队也即将上线。 + +**EKJ**:我对于将基础设施文档作为新手入门教程这件事上的观点和Paul是一致的,另外,我们十分乐意看到来自那些folk了我们项目的学习者提交上来的补丁。我们通常不会意识到我们忽略了文档中的某些内容,除非它们恰好被人问起。因此,阅读,学习,然后帮助我们修补这些知识上的漏洞。你可以在[OpenStack基础设施邮件清单]提出你的问题,或者在我们位于FreeNode上的#OpenStack-infra的IRC专栏发起你的提问。 +**CA**:我喜欢[这个详细的发布][7],它是由Ian Wienand写的一篇关于构建图片的文章。 +### "gotchas" 会是OpenStack新的代码贡献者苦苦寻找的吗? +**EKJ**:向项目作出贡献并不仅仅是提交新的代码和新的特性;OpenStack社区高度重视代码复查。如果你想要别人查看你的补丁,那你最好先看看其他人是如何做的,然后参考他们的风格,最后一步布做到你也能够向其他人一样提交清晰且结构分明的代码补丁。你越是能让你的同伴了解你的工作并知道你正在做的复查,那他们也就更有可能形成及时复查你的代码的风格。 +**CA**:我看到过大量的新手在面对Gerrit时受挫,阅读开发者引导中的[开发者工作步骤][9]时,可能只是将他通读了一遍。如果你没有经常使用Gerrit,那你最初对它的感觉可能是困惑和无力的。但是,如果你随后做了一些代码复查的工作,那么你马上就能轻松应对它。同样,我是IRC的忠实粉丝。它可能是一个获得帮助的好地方,但是,你最好保持一个长期保留的状态,这样,尽管你在某个时候没有出现,人们也可以回答你的问题。(阅读[IRC,开源界的成功秘诀][10]。)你不必总是在线,但是你最好能够轻松的在一个通道中进行回滚操作,以此来跟上最新的动态,这种能力非常重要。 +**PB**:我同意Elizabeth和Chris—Gerrit关于寻求何种方式来学习的观点。每个开发人员所作出的努力都将让社区变得更加美好。你不仅仅要提交代码给别人去复查,同时,你也要能够复查其他人的代码。留意Gerrit的用户接口,你可能一时会变的很疑惑。我推荐新手去尝试[Gertty][11],它是一个基于控制台的终端接口,用于Gerrit代码复查系统,而它恰好也是OpenStack基础设施所驱动的一个项目。 +### 你对于OpenStack新手如何通过网络与其他贡献者交流方面有什么好的建议? +**PB**:对我来说,是通过IRC以及在Freenode上参加#OpenStack-infra专栏([IRC logs][12]).这专栏上面有很多对新手来说很有价值的资源。你可以看到OpenStack项目日复一日的运作情况,同时,一旦你知道了OpenStack项目的工作原理,你将更好的知道如何为OpenStack的未来发展作出贡献。 +**CA**:我想要为IRC再次说明一点,在IRC上保持一整天的在线记录对我来说有非常重大的意义,因为我会感觉到被重视并且时刻保持连接。这也是一种非常好的获得帮助的方式,特别是当你卡在了项目中出现的某一个难题的时候,而在专栏中,总会有一些人很乐意为你解决问题。 +**EKJ**:[OpenStack开发邮件列表][13]对于能够时刻查看到你所致力于的OpenStack项目的最新情况是非常重要的。因此,我推荐一定要订阅它。邮件列表使用课题标签来区分项目,因此你可以设置你的邮件客户端来使用它,并且集中精力于你所关心的项目。除了在线资源之外,全世界范围内也成立了一些OpenStack小组,他们被用来为OpenStack的用户和贡献者提供服务。这些小组可能会定期举行座谈和针对OpenStack主要贡献者的一些活动。你可以在MeetUp.com上搜素你所在地域的贡献者活动聚会,或者在[groups.openstack.org]上查看你所在的地域是否存在OpenStack小组。最后,还有一个每六个月举办一次的OpenStack峰会,这个峰会上会作一些关于基础设施的演说。当前状态下,这个峰会包含了用户会议和开发者会议,会议内容都是和OpenStack相关的东西,包括它的过去,现在和未来。 +### OpenStack需要在那些方面得到提升来让新手更加容易学会并掌握? +**PB**: 我认为我们的[account-setup][16]过程对于新的贡献者已经做的比较容易了,特别是教他们如何提交他们的第一个补丁。真正参与到OpenStack开发者模式的过程是需要花费很大的努力的,可能对于开发者来说已经显得非常多了;然而,一旦融入进去了,这个模式将会运转的十分高效和令人满意。 +**CA**: 我们拥有一个由专业开发者组成的社区,而且我们的关注点都是发展OpenStack本身,同时,我们致力于让用户付出更小的代价去使用OpenStack云基础设施平台。我们需要发掘更多的应用开发者,并且鼓励更多的人去开发能在OpenStack云上完美运行的云应用程序,我们还鼓励他们在[社区App目录]上去贡献那些由他们开发的app。我们可以通过提升我们的API标准和保证我们不同的库(比如libcloud,phpopencloud已经其他一些库),并让他们持续的为开发者提供可信赖的支持来实现这一目标。还有一点就是通过倡导更多的OpenStack黑客加入进来。所有的这些事情都可以降低新人的学习门槛,这样也能引导他们与这个社区之间的关系更加紧密。y. +**EKJ**: 我已经致力于开源软件很多年了。但是,对于大量的OpenStack开发者而言,这是一个他们每个人都在从事的第一个开源项目。我发现他们之前使用私有软件的背景并没有为他们塑造开源的观念和方法论,还有在开源项目中需要具备的合作技巧。我乐于看到我们能够让那些曾经一直在使用私有软件工作的人能够真正的明白他们在开源如软件社区所从事的事情的巨大价值。 +### 我认为2016年对于开源Haiku的进一步增长是具有重大意义的一年。通过Haiku来向新手解释OpenStack。 +**PB**: 如果你喜欢自由软件,你可以向OpenStack提交你的第一个补丁。 +**CA**: 在不久的未来,OpenStack将以统治世界的姿态让这个世界变得更好。 +**EKJ**: OpenStack是一个可以免费部署在你的服务器上面并且运行你自己的云的一个软件。 +*Paul,Elizabeth和Christopher将会在4月25号星期一上午11:15于奥斯汀举办的OpenStack峰会上进行演说。 + +------------------------------------------------------------------------------ + +via: https://opensource.com/business/16/4/interview-openstack-infrastructure-beginners + +作者:[linux.com][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://rikkiendsley.com/ +[1]: https://twitter.com/pabelanger +[2]: https://twitter.com/pleia2 +[3]: https://twitter.com/docaedo +[4]: https://www.openstack.org/summit/austin-2016/summit-schedule/events/7337 +[5]: http://docs.openstack.org/infra/system-config/ +[6]: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra +[7]: https://www.technovelty.org/openstack/image-building-in-openstack-ci.html +[8]: https://code.google.com/p/gerrit/ +[9]: http://docs.openstack.org/infra/manual/developers.html#development-workflow +[10]: https://developer.ibm.com/opentech/2015/12/20/irc-the-secret-to-success-in-open-source/ +[11]: https://pypi.python.org/pypi/gertty +[12]: http://eavesdrop.openstack.org/irclogs/%23openstack-infra/ +[13]: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev +[14]: https://groups.openstack.org/ +[15]: https://www.openstack.org/summit/ +[16]: http://docs.openstack.org/infra/manual/developers.html#account-setup +[17]: https://apps.openstack.org/ +[18]: https://www.openstack.org/summit/austin-2016/summit-schedule/events/7337 From d3c75bbbfb30f512a5351f365437a81082ffe532 Mon Sep 17 00:00:00 2001 From: Chunyang Wen Date: Mon, 4 Jul 2016 14:41:26 +0800 Subject: [PATCH 1688/1710] Finish tranlating Awk-Part4 by chunyang-wen (#4138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * âFinish tranlating awk series part4 * Update Part 4 - How to Use Comparison Operators with Awk in Linux.md --- ... Comparison Operators with Awk in Linux.md | 97 ------------------- ... Comparison Operators with Awk in Linux.md | 95 ++++++++++++++++++ 2 files changed, 95 insertions(+), 97 deletions(-) delete mode 100644 sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md create mode 100644 translated/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md diff --git a/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md b/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md deleted file mode 100644 index 1d0ef007af..0000000000 --- a/sources/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md +++ /dev/null @@ -1,97 +0,0 @@ -chunyang-wen translating - -How to Use Comparison Operators with Awk in Linux -=================================================== - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Use-Comparison-Operators-with-AWK.png) - -When dealing with numerical or string values in a line of text, filtering text or strings using comparison operators comes in handy for Awk command users. - -In this part of the Awk series, we shall take a look at how you can filter text or strings using comparison operators. If you are a programmer then you must already be familiar with comparison operators but those who are not, let me explain in the section below. - -### What are Comparison operators in Awk? - -Comparison operators in Awk are used to compare the value of numbers or strings and they include the following: - -- `>` – greater than -- `<` – less than -- `>=` – greater than or equal to -- `<=` – less than or equal to -- `==` – equal to -- `!=` – not equal to -- `some_value ~ / pattern/` – true if some_value matches pattern -- `some_value !~ / pattern/` – true if some_value does not match pattern - -Now that we have looked at the various comparison operators in Awk, let us understand them better using an example. - -In this example, we have a file named food_list.txt which is a shopping list for different food items and I would like to flag food items whose quantity is less than or equal 20 by adding `(**)` at the end of each line. - -``` -File – food_list.txt -No Item_Name Quantity Price -1 Mangoes 45 $3.45 -2 Apples 25 $2.45 -3 Pineapples 5 $4.45 -4 Tomatoes 25 $3.45 -5 Onions 15 $1.45 -6 Bananas 30 $3.45 -``` - -The general syntax for using comparison operators in Awk is: - -``` -# expression { actions; } -``` - -To achieve the above goal, I will have to run the command below: - -``` -# awk '$3 <= 30 { printf "%s\t%s\n", $0,"**" ; } $3 > 30 { print $0 ;}' food_list.txt - -No Item_Name` Quantity Price -1 Mangoes 45 $3.45 -2 Apples 25 $2.45 ** -3 Pineapples 5 $4.45 ** -4 Tomatoes 25 $3.45 ** -5 Onions 15 $1.45 ** -6 Bananas 30 $3.45 ** -``` - -In the above example, there are two important things that happen: - -- The first expression `{ action ; }` combination, `$3 <= 30 { printf “%s\t%s\n”, $0,”**” ; }` prints out lines with quantity less than or equal to 30 and adds a `(**)` at the end of each line. The value of quantity is accessed using `$3` field variable. -- The second expression `{ action ; }` combination, `$3 > 30 { print $0 ;}` prints out lines unchanged since their quantity is greater then `30`. - -One more example: - -``` -# awk '$3 <= 20 { printf "%s\t%s\n", $0,"TRUE" ; } $3 > 20 { print $0 ;} ' food_list.txt - -No Item_Name Quantity Price -1 Mangoes 45 $3.45 -2 Apples 25 $2.45 -3 Pineapples 5 $4.45 TRUE -4 Tomatoes 25 $3.45 -5 Onions 15 $1.45 TRUE -6 Bananas 30 $3.45 -``` - -In this example, we want to indicate lines with quantity less or equal to 20 with the word (TRUE) at the end. - -### Summary - -This is an introductory tutorial to comparison operators in Awk, therefore you need to try out many other options and discover more. - -In case of any problems you face or any additions that you have in mind, then drop a comment in the comment section below. Remember to read the next part of the Awk series where I will take you through compound expressions. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/comparison-operators-in-awk/ - -作者:[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/ diff --git a/translated/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md b/translated/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md new file mode 100644 index 0000000000..86649a52d5 --- /dev/null +++ b/translated/tech/awk/Part 4 - How to Use Comparison Operators with Awk in Linux.md @@ -0,0 +1,95 @@ +在 Linux 下如何使用 Awk 比较操作符 +=================================================== + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Use-Comparison-Operators-with-AWK.png) + +对于 Awk 命令的用户来说,处理一行文本中的数字或者字符串时,使用比较运算符来过滤文本和字符串是十分方便的。 + +在 Awk 系列的此部分中,我们将探讨一下如何使用比较运算符来过滤文本或者字符串。如果你是程序员,那么你应该已经熟悉比较运算符;对于其它人,下面的部分将介绍比较运算符。 + +### Awk 中的比较运算符是什么? + +Awk 中的比较运算符用于比较字符串和或者数值,包括以下类型: + +- `>` – 大于 +- `<` – 小于 +- `>=` – 大于等于 +- `<=` – 小于等于 +- `==` – 等于 +- `!=` – 不等于 +- `some_value ~ / pattern/` – 如果some_value匹配模式pattern,则返回true +- `some_value !~ / pattern/` – 如果some_value不匹配模式pattern,则返回true + +现在我们通过例子来熟悉 Awk 中各种不同的比较运算符。 + +在这个例子中,我们有一个文件名为 food_list.txt 的文件,里面包括不同食物的购买列表。我想给食物数量小于或等于30的物品所在行的后面加上`(**)` + +``` +File – food_list.txt +No Item_Name Quantity Price +1 Mangoes 45 $3.45 +2 Apples 25 $2.45 +3 Pineapples 5 $4.45 +4 Tomatoes 25 $3.45 +5 Onions 15 $1.45 +6 Bananas 30 $3.45 +``` + +Awk 中使用比较运算符的通用语法如下: + +``` +# expression { actions; } +``` + +为了实现刚才的目的,执行下面的命令: + +``` +# awk '$3 <= 30 { printf "%s\t%s\n", $0,"**" ; } $3 > 30 { print $0 ;}' food_list.txt + +No Item_Name` Quantity Price +1 Mangoes 45 $3.45 +2 Apples 25 $2.45 ** +3 Pineapples 5 $4.45 ** +4 Tomatoes 25 $3.45 ** +5 Onions 15 $1.45 ** +6 Bananas 30 $3.45 ** +``` + +在刚才的例子中,发生如下两件重要的事情: + +- 第一个表达式 `{ action ; }` 组合, `$3 <= 30 { printf “%s\t%s\n”, $0,”**” ; }` 打印出数量小于等于30的行,并且在后面增加`(**)`。物品的数量是通过 `$3`这个域变量获得的。 +- 第二个表达式 `{ action ; }` 组合, `$3 > 30 { print $0 ;}` 原样输出数量小于等于 `30` 的行。 + +再举一个例子: + +``` +# awk '$3 <= 20 { printf "%s\t%s\n", $0,"TRUE" ; } $3 > 20 { print $0 ;} ' food_list.txt + +No Item_Name Quantity Price +1 Mangoes 45 $3.45 +2 Apples 25 $2.45 +3 Pineapples 5 $4.45 TRUE +4 Tomatoes 25 $3.45 +5 Onions 15 $1.45 TRUE +6 Bananas 30 $3.45 +``` + +在这个例子中,我们想通过在行的末尾增加 (TRUE) 来标记数量小于等于20的行。 + +### 总结 + +这是一篇对 Awk 中的比较运算符介绍性的指引,因此你需要尝试其他选项,发现更多使用方法。 + +如果你遇到或者想到任何问题,请在下面评论区留下评论。请记得阅读 Awk 系列下一部分的文章,那里我将介绍组合表达式。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/comparison-operators-in-awk/ + +作者:[Aaron Kili][a] +译者:[chunyang-wen](https://github.com/chunyang-wen) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.tecmint.com/author/aaronkili/ From 707906d8c929f69366da0a5bdb59fe3f9ae2c5fe Mon Sep 17 00:00:00 2001 From: Dongliang Mu Date: Mon, 4 Jul 2016 02:41:54 -0400 Subject: [PATCH 1689/1710] translated (#4137) * translated * move to translated directory --- ...inux developers think of Git and GitHub.md | 95 ------------------- ...inux developers think of Git and GitHub.md | 93 ++++++++++++++++++ 2 files changed, 93 insertions(+), 95 deletions(-) delete mode 100644 sources/tech/20160218 What do Linux developers think of Git and GitHub.md create mode 100644 translated/tech/20160218 What do Linux developers think of Git and GitHub.md diff --git a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md b/sources/tech/20160218 What do Linux developers think of Git and GitHub.md deleted file mode 100644 index c0de7f4e6a..0000000000 --- a/sources/tech/20160218 What do Linux developers think of Git and GitHub.md +++ /dev/null @@ -1,95 +0,0 @@ -translated by mudongliang - -What do Linux developers think of Git and GitHub? -===================================================== - -**Also in today’s open source roundup: DistroWatch reviews XStream Desktop 153, and Street Fighter V is coming to Linux and SteamOS in the spring** - -## What do Linux developers think of Git and GitHub? - -The popularity of Git and GitHub among Linux developers is well established. But what do developers think of them? And should GitHub really be synonymous with Git itself? A Linux redditor recently asked about this and got some very interesting answers. - -Dontwakemeup46 asked his question: - ->I am learning Git and Github. What I am interested in is how these two are viewed by the community. That git and github are used extensively, is something I know. But are there serious issues with either Git or Github? Something that the community would love to change? - -[More at Reddit](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580413015211&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=https%3A%2F%2Fwww.reddit.com%2Fr%2Flinux%2Fcomments%2F45jy59%2Fthe_popularity_of_git_and_github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20Reddit) - -His fellow Linux redditors responded with their thoughts about Git and GitHub: - ->Derenir: ”Github is not affliated with Git. - ->Git is made by Linus Torvalds. - ->Github hardly supports Linux. - ->Github is a corporate bordelo that tries to make money from Git. - ->[https://desktop.github.com/](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580415025712&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&type=U&out=https%3A%2F%2Fdesktop.github.com%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=https%3A%2F%2Fdesktop.github.com%2F) see here no Linux Support.” - ->**Bilog78**: ”A minor update: git hasn't been “made by Linus Torvalds” for a while. The maintainer is Junio C Hamano and the main contributors after him are Jeff King and Shawn O. Pearce.” - ->**Fearthefuture**: ”I like git but can't understand why people even use github anymore. From my point of view the only thing it does better than bitbucket are user statistics and the larger userbase. Bitbucket has unlimited free private repos, much better UI and very good integration with other services such as Jenkins.” - ->**Thunger**: ”Gitlab.com is also nice, especially since you can host your own instance on your own servers.” - ->**Takluyver**: ”Lots of people are familiar with the UI of Github and associated services like Travis, and lots of people already have Github accounts, so it's a good place for projects to be. People also use their Github profile as a kind of portfolio, so they're motivated to put more projects on there. Github is a de facto standard for hosting open source projects.” - ->**Tdammers**: ”Serious issue with git would be the UI, which is kind of counterintuitive, to the point that many users just stick with a handful of memorized incantations. - -Github: most serious issue here is that it's a proprietary hosted solution; you buy convenience, and the price is that your code is on someone else's server and not under your control anymore. Another common criticism of github is that its workflow isn't in line with the spirit of git itself, particularly the way pull requests work. And finally, github is monopolizing the code hosting landscape, and that's bad for diversity, which in turn is crucial for a thriving free software community.” - ->**Dies**: ”How is that the case? More importantly, if that is the case, then what's done is done and I guess we're stuck with Github since they control so many projects.” - ->**Tdammers**: ”The code is hosted on someone else's server, "someone else" in this case being github. Which, for an open-source project, is not typically a huge problem, but still, you don't control it. If you have a private project on github, then the only assurance you have that it will remain private is github's word for it. If you decide to delete things, then you can never be sure whether it's been deleted, or just hidden. - -Github doesn't control the projects themselves (you can always take your code and host it elsewhere, declaring the new location the "official" one), it just has deeper access to the code than the developers themselves.” - ->**Drelos**: ”I have read a lot of praises and bad stuff about Github ([here's an example](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580428524613&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fwww.wired.com%2F2015%2F06%2Fproblem-putting-worlds-code-github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=here%27s%20an%20example)) but my simple noob question is why aren't efforts towards a free and open "version" ?” - ->**Twizmwazin**: ”GitLab is sorta pushing there.” - -[More at Reddit](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580429720714&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=https%3A%2F%2Fwww.reddit.com%2Fr%2Flinux%2Fcomments%2F45jy59%2Fthe_popularity_of_git_and_github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20Reddit) - -## DistroWatch reviews XStream Desktop 153 - -XStreamOS is a version of Solaris created by Sonicle. XStream Desktop brings the power of Solaris to desktop users, and distrohoppers might be interested in checking it out. DistroWatch did a full review of XStream Desktop 153 and found that it performed fairly well. - -Jesse Smith reports for DistroWatch: - ->I think XStream Desktop does a lot of things well. Admittedly, my trial got off to a rocky start when the operating system would not boot on my hardware and I could not get the desktop to use my display's full screen resolution when running in VirtualBox. However, after that, XStream performed fairly well. The installer works well, the operating system automatically sets up and uses boot environments, insuring we can recover the system if something goes wrong. The package management tools work well and XStream ships with a useful collection of software. - ->I did run into a few problems playing media, specifically getting audio to work. I am not sure if that is another hardware compatibility issue or a problem with the media software that ships with the operating system. On the other hand, tools such as the web browser, e-mail, productivity suite and configuration tools all worked well. - ->What I appreciate about XStream the most is that the operating system is a branch of the OpenSolaris family that is being kept up to date. Other derivatives of OpenSolaris tend to lag behind, at least with desktop software, but XStream is still shipping recent versions of Firefox and LibreOffice. - ->For me personally, XStream is missing a few components, like a printer manager, multimedia support and drivers for my specific hardware. Other aspects of the operating system are quite attractive. I like the way the developers have set up LXDE, I like the default collection of software and I especially like the way file system snapshots and boot environments are enabled out of the box. Most Linux distributions, openSUSE aside, have not caught on to the usefulness of boot environments yet and I hope it is a technology that is picked up by more projects. - -[More at DistroWatch](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580434172315&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fdistrowatch.com%2Fweekly.php%3Fissue%3D20160215%23xstreamos&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20DistroWatch) - -## Street Fighter V and SteamOS - -Street Fighter is one of the most well known game franchises of all time, and now [Capcom has announced](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580435418216&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fsteamcommunity.com%2Fgames%2F310950%2Fannouncements%2Fdetail%2F857177755595160250&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=Capcom%20has%20announced) that Street Fighter V will be coming to Linux and SteamOS in the spring. This is great news for Linux gamers. - -Joe Parlock reports for Destructoid: - ->Are you one of the less than one percent of Steam users who play on a Linux-based system? Are you part of the even smaller percentage of people who play on Linux and are excited for Street Fighter V? Well, I’ve got some good news for you. - ->Capcom has announced via Steam that Street Fighter V will be coming to SteamOS and other Linux operating systems sometime this spring. It’ll come at no extra cost, so those who already own the PC build of the game will just be able to install it on Linux and be good to go. - -[More at Destructoid](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580435418216&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fsteamcommunity.com%2Fgames%2F310950%2Fannouncements%2Fdetail%2F857177755595160250&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=Capcom%20has%20announced) - -Did you miss a roundup? Check the [Eye On Open home page](http://www.infoworld.com/blog/eye-on-open/) to get caught up with the latest news about open source and Linux. - ------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/3033059/linux/what-do-linux-developers-think-of-git-and-github.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.infoworld.com/author/Jim-Lynch/ - diff --git a/translated/tech/20160218 What do Linux developers think of Git and GitHub.md b/translated/tech/20160218 What do Linux developers think of Git and GitHub.md new file mode 100644 index 0000000000..a0eb63506e --- /dev/null +++ b/translated/tech/20160218 What do Linux developers think of Git and GitHub.md @@ -0,0 +1,93 @@ +Linux 开发者如何看待 Git 和 Github? +===================================================== + +**同样在今日的开源摘要: DistroWatch 评估 XStream 桌面 153 版本,街头霸王 V 即将在这个春天进入 Linux 和 SteamOS** + +## Linux 开发者如何看待 Git 和 Github? + +Git 和 Github 在 Linux 开发者中有很高的知名度。但是开发者如何看待它们呢?另外,Github 是不是真的和 Git 是一个意思?一个 Linux reddit 用户最近问到了这个问题,并且得到了很有意思的答案。 + +Dontwakemeup46 提问: + +> 我正在学习 Git 和 Github。我感兴趣的是社区如何看待两者?据我所知,Git 和 Github 应用十分广泛。但是 Git 或 Github 有没有严重的,社区喜欢去修改的问题呢? + +[更多见 Reddit](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580413015211&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=https%3A%2F%2Fwww.reddit.com%2Fr%2Flinux%2Fcomments%2F45jy59%2Fthe_popularity_of_git_and_github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20Reddit) + +与他志同道合的 Linux reddit 用户回答了他们对于 Git 和 Github的想法: + +>Derenir: “Github 并不隶属于 Git。 + +>Git 是由 Linus Torvalds 开发的。 + +>Github 几乎不支持 Linux。 + +>Github 是一家唯利是图的,企图借助 Git 赚钱的公司。 + +>[https://desktop.github.com/](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580415025712&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&type=U&out=https%3A%2F%2Fdesktop.github.com%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=https%3A%2F%2Fdesktop.github.com%2F) 并没有支持 Linux。” + +>**Bilog78**: “一个简单的更新: Linus Torvalds 已经不再维护 Git了。维护者是 Junio C Hamano,以及 Linus 之后的主要贡献者是Jeff King 和 Shawn O. Pearce。” + +>**Fearthefuture**: “我喜欢 Git,但是不明白人们为什么还要使用 Github。从我的角度,Github 比 Bitbucket 好的一点是用户统计和更大的用户基础。Bitbucket 有无限的免费私有库,更好的 UI,以及更好地继承其他服务,比如说 Jenkins。” + +>**Thunger**: “Gitlab.com 也很不错,特别是你可以在自己的服务器上架设自己的实例。” + +>**Takluyver**: “很多人熟悉 Github 的 UI 以及相关联的服务,像 Travis 。并且很多人都有 Github 账号,所以它是一个很好地存储项目的地方。人们也使用他们的 Github 简况作为一种求职用的作品选辑,所以他们很积极地将更多的项目放在这里。Github 是一个事实上的,存放开源项目的标准。” + +>**Tdammers**: “Git 严重问题在于 UI,它有些违反直觉,到很多用户只使用一些容易记住的咒语程度。” + +Github:最严重的问题在于它是私人拥有的解决方案;你买了方便,但是代价是你的代码在别人的服务器上面,已经不在你的掌控范围之内了。另一个对于 Github 的普遍批判是它的工作流和 Git 本身的精神不符,特别是 pull requests 工作的方式。最后, Github 垄断代码的托管环境,同时对于多样性是很不好的,这反过来对于旺盛的免费软件社区很重要。” + +>**Dies**: “更重要的是,如果一旦是这样,做过的都做过了,并且我猜我们会被 Github 所困,因为它们控制如此多的项目。” + +>**Tdammers**: “代码托管在别人的服务器上,别人指的是 Github。这对于开源项目来说,并不是什么太大的问题,但是仍然,你无法控制它。如果你在 Github 上有私有项目,唯一的保险在于它将保持私有是 Github 的承诺。如果你决定删除东西,你不能确定东西是否被删除了,或者只是隐藏了。 + +Github 并不自己控制这些项目(你总是可以拿走你的代码,然后托管到别的地方,声明新位置是“官方”的),它只是有比开发者本身有更深的使用权。” + +>**Drelos**: “我已经读了大量的关于 Github 的赞美与批评。(这里有一个[例子](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580428524613&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fwww.wired.com%2F2015%2F06%2Fproblem-putting-worlds-code-github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=here%27s%20an%20example)),但是我的新手问题是为什么不向一个免费开源的版本努力呢?” + +>**Twizmwazin**: “Gitlab 的源码就存在这里” + +[更多见 Reddit](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580429720714&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=https%3A%2F%2Fwww.reddit.com%2Fr%2Flinux%2Fcomments%2F45jy59%2Fthe_popularity_of_git_and_github%2F&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20Reddit) + +## DistroWatch 评估 XStream 桌面 153 版本 + +XStreamOS 是一个由 Sonicle 创建的 Solaris 的一个版本。XStream 桌面将 Solaris 的强大带给了桌面用户,同时新手用户很可能有兴趣体验一下。DistroWatch 对于 XStream 桌面 153 版本做了一个很全面的评估,并且发现它运行相当好。 + +Jesse Smith 为 DistroWatch 报道: + +> 我认为 XStream 桌面做好了很多事情。无可否认地,我的实验陷入了头晕目眩的状态当操作系统无法在我的硬件上启动。同时,当运行在 VirtualBox 中我无法使得桌面使用我显示器的完整分辨率。 + +> 我确实在播放多媒体文件时遇见一些问题,特别是使声卡工作。我不确定是不是另外一个硬件兼容问题,或者一个关于操作系统自带的多媒体软件的问题。另一方面,像 Web 浏览器,电子邮件,生产工具套件以及配置工具这样的工作都工作的很好。 + +> 我最欣赏 XStream 的地方是这个操作系统是 OpenSolaris 家族的一个使用保持最新的分支。OpenSolaris 的其他衍生系统有落后的倾向,至少在桌面软件上,但是 XStream 仍然搭载最新版本的火狐和 LibreOffice。 + +>对我个人来说,XStream 缺少一些组件,比如打印机管理器,多媒体支持和我特定硬件的驱动。这个操作系统的其他方面也是相当吸引人的。我喜欢开发者搭建 LXDE 的方式,软件的默认组合,以及我最喜欢文件系统快照和启动环境开箱即用的方式。大多数的 Linux 发行版,openSUSE 除外,并没有使得启动环境的有用性流行起来。我希望它是一个被更多项目采用的技术。 + +[更多见 DistroWatch](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580434172315&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fdistrowatch.com%2Fweekly.php%3Fissue%3D20160215%23xstreamos&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=More%20at%20DistroWatch) + +## 街头霸王 V 和 SteamOS + +街头霸王是最出名的游戏之一,并且 [Capcom 已经宣布](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580435418216&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fsteamcommunity.com%2Fgames%2F310950%2Fannouncements%2Fdetail%2F857177755595160250&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=Capcom%20has%20announced) 街头霸王 V 将会在这个春天进入 Linux 和 StreamOS。这对于 Linux 游戏者是非常好的消息。 + +Joe Parlock 为 Destructoid 报道: + +>你是少于 1% 的,在 Linux 系统上玩游戏的 Stream 用户吗?你是更少百分比的,在 Linux 平台上玩游戏,同时很喜欢街头霸王 V 的人之一吗?是的话,我有一些好消息要告诉你。 + +>Capcom 已经宣布,这个春天街头霸王 V 通过 Stream 进入 StreamOS 以及其他 Linux 发行版。它无需任何额外的成本,所以那些已经个人电脑建立的游戏的人可以很容易在 Linux 上安装它,并且运行良好。 + +[更多 Destructoid](http://api.viglink.com/api/click?format=go&jsonp=vglnk_145580435418216&key=0a7039c08493c7c51b759e3d13019dbe&libId=iksc5hc8010113at000DL3yrsuvp7&loc=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F3033059%2Flinux%2Fwhat-do-linux-developers-think-of-git-and-github.html&v=1&out=http%3A%2F%2Fsteamcommunity.com%2Fgames%2F310950%2Fannouncements%2Fdetail%2F857177755595160250&ref=http%3A%2F%2Fwww.linux.com%2Fnews%2Fsoftware%2Fapplications%2F886008-what-do-linux-developers-think-of-git-and-github&title=What%20do%20Linux%20developers%20think%20of%20Git%20and%20GitHub%3F%20%7C%20InfoWorld&txt=Capcom%20has%20announced) + +你是否错过了摘要?检查 [Eye On Open home page](http://www.infoworld.com/blog/eye-on-open/) 来获得关于 Linux 和开源的最新的新闻。 + +------------------------------------------------------------------------------ + +via: http://www.infoworld.com/article/3033059/linux/what-do-linux-developers-think-of-git-and-github.html + +作者:[Jim Lynch][a] +译者:[mudongliang](https://github.com/mudongliang) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Jim-Lynch/ + From ca31a2b5decd7fde3da794d258d931e19fb33a00 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 4 Jul 2016 15:21:06 +0800 Subject: [PATCH 1690/1710] PUB:20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX @alim0x --- ... HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md | 51 ++++++++++--------- 1 file changed, 28 insertions(+), 23 deletions(-) rename {translated/tech => published}/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md (72%) diff --git a/translated/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md b/published/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md similarity index 72% rename from translated/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md rename to published/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md index c08efbc683..e6287d62e9 100644 --- a/translated/tech/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md +++ b/published/20160531 HOW TO USE WEBP IMAGES IN UBUNTU LINUX.md @@ -1,14 +1,15 @@ -在 Ubuntu Linux 中使用 WEBP 图片 +在 Ubuntu Linux 中使用 WebP 图片 ========================================= ![](http://itsfoss.com/wp-content/uploads/2016/05/support-webp-ubuntu-linux.jpg) ->简介:这篇指南会向你展示如何在 Linux 下查看 WebP 图片以及将 WebP 图片转换为 JPEG 或 PNG 格式。 -### 什么是 WEBP? +> 简介:这篇指南会向你展示如何在 Linux 下查看 WebP 图片以及将 WebP 图片转换为 JPEG 或 PNG 格式。 -Google 为图片推出 [WebP 文件格式][0]已经超过五年了。Google 说,WebP 提供有损和无损压缩,相比 JPEG 压缩,WebP 压缩文件大小能更小约 25%。 +### 什么是 WebP? -Google 的目标是让 WebP 成为 web 图片的新标准,但是我没能看到这一切发生。已经五年过去了,除了谷歌的生态系统以外它仍未被接受成为一个标准。但正如我们所知的,Google 对它的技术很有进取心。几个月前 Google 将 Google Plus 的所有图片改为了 WebP 格式。 +自从 Google 推出 [WebP 图片格式][0],已经过去五年了。Google 说,WebP 提供有损和无损压缩,相比 JPEG 压缩,WebP 压缩文件大小,能更小约 25%。 + +Google 的目标是让 WebP 成为 web 图片的新标准,但是并没有成为现实。已经五年过去了,除了谷歌的生态系统以外它仍未被接受成为一个标准。但正如我们所知的,Google 对它的技术很有进取心。几个月前 Google 将 Google Plus 的所有图片改为了 WebP 格式。 如果你用 Google Chrome 从 Google Plus 上下载那些图片,你会得到 WebP 图片,不论你之前上传的是 PNG 还是 JPEG。这都不是重点。真正的问题在于当你尝试着在 Ubuntu 中使用默认的 GNOME 图片查看器打开它时你会看到如下错误: @@ -17,7 +18,8 @@ Google 的目标是让 WebP 成为 web 图片的新标准,但是我没能看 > **Unrecognized image file format(未识别文件格式)** ![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-1.png) ->GNOME 图片查看器不支持 WebP 图片 + +*GNOME 图片查看器不支持 WebP 图片* 在这个教程里,我们会看到 @@ -41,7 +43,8 @@ sudo apt-get install gthumb 一旦安装完成,你就可以简单地右键点击 WebP 图片,选择 gThumb 来打开它。你现在应该可以看到如下画面: ![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-2.jpeg) ->gThumb 中显示的 WebP 图片 + +*gThumb 中显示的 WebP 图片* ### 让 gThumb 成为 Ubuntu 中 WebP 图片的默认应用 @@ -50,28 +53,30 @@ sudo apt-get install gthumb #### 步骤 1:右键点击 WebP 文件选择属性。 ![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-3.png) ->从右键菜单中选择属性 + +*从右键菜单中选择属性* #### 步骤 2:转到打开方式标签,选择 gThumb 并点击设置为默认。 ![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-4.png) ->让 gThumb 成为 Ubuntu 中 WebP 图片的默认应用 + +*让 gThumb 成为 Ubuntu 中 WebP 图片的默认应用* ### 让 gThumb 成为所有图片的默认应用 -gThumb 的功能比图片查看器更多。举个例子,你可以做一些简单的编辑,给图片添加滤镜等。添加滤镜的效率没有 XnRetro(在[ Linux 下添加类似 Instagram 滤镜效果][5]的专用工具)那么高,但它还是有一些基础的滤镜可以用。 +gThumb 的功能比图片查看器更多。举个例子,你可以做一些简单的图片编辑,给图片添加滤镜等。添加滤镜的效率没有 XnRetro(在[ Linux 下添加类似 Instagram 滤镜效果][5]的专用工具)那么高,但它还是有一些基础的滤镜可以用。 -我非常喜欢 gThumb 并且决定让它成为默认的图片查看器。如果你也想在 Ubuntu 中让 gThumb 成为所有图片的默认默认应用,遵照以下步骤操作: +我非常喜欢 gThumb 并且决定让它成为默认的图片查看器。如果你也想在 Ubuntu 中让 gThumb 成为所有图片的默认应用,遵照以下步骤操作: -#### 步骤1:打开系统设置 +步骤1:打开系统设置 ![](http://itsfoss.com/wp-content/uploads/2014/04/System_Settings_ubuntu_1404.jpeg) -#### 步骤2:转到详情(Details) +步骤2:转到详情(Details) ![](http://itsfoss.com/wp-content/uploads/2013/11/System_settings_Ubuntu_1.jpeg) -#### 步骤3:在这里将 gThumb 设置为图片的默认应用 +步骤3:在这里将 gThumb 设置为图片的默认应用 ![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-5.png) @@ -100,7 +105,7 @@ sudo apt-get install webp ##### 将 JPEG/PNG 转换为 WebP -我们将使用 cwebp 命令(它代表压缩为 WebP 吗?)来将 JPEG 或 PNG 文件转换为 WebP。命令格式是这样的: +我们将使用 cwebp 命令(它代表转换为 WebP 的意思吗?)来将 JPEG 或 PNG 文件转换为 WebP。命令格式是这样的: ``` cwebp -q [图片质量] [JPEG/PNG_文件名] -o [WebP_文件名] @@ -132,7 +137,7 @@ dwebp example.webp -o example.png [下载 XnConvert][1] -XnConvert 是个强大的工具,你可以用它来批量修改图片尺寸。但在这个教程里,我们只能看到如何将单个 WebP 图片转换为 PNG/JPEG。 +XnConvert 是个强大的工具,你可以用它来批量修改图片尺寸。但在这个教程里,我们只介绍如何将单个 WebP 图片转换为 PNG/JPEG。 打开 XnConvert 并选择输入文件: @@ -148,24 +153,24 @@ XnConvert 是个强大的工具,你可以用它来批量修改图片尺寸。 也许你一点都不喜欢 WebP 图片格式,也不想在 Linux 仅仅为了查看 WebP 图片而安装一个新软件。如果你不得不将 WebP 文件转换以备将来使用,这会是件更痛苦的事情。 -一个解决这个问题更简单,不那么痛苦的途径是安装一个 Chrome 扩展 Save Image as PNG。有了这个插件,你可以右键点击 WebP 图片并直接存储为 PNG 格式。 +解决这个问题的一个更简单、不那么痛苦的途径是安装一个 Chrome 扩展 Save Image as PNG。有了这个插件,你可以右键点击 WebP 图片并直接存储为 PNG 格式。 ![](http://itsfoss.com/wp-content/uploads/2016/05/WebP-images-Ubuntu-Linux-8.png) ->在 Google Chrome 中将 WebP 图片保存为 PNG 格式 -[获取 Save Image as PNG 扩展][2] +*在 Google Chrome 中将 WebP 图片保存为 PNG 格式* + +- [获取 Save Image as PNG 扩展][2] ### 你的选择是? -我希望这个详细的教程能够帮你在 Linux 上获取 WebP 支持并帮你转换 WebP 图片。你在 Linux 怎么处理 WebP 图片?你使用哪个工具?以上描述的方法中,你最喜欢哪一个? - +我希望这个详细的教程能够帮你在 Linux 上支持 WebP 并帮你转换 WebP 图片。你在 Linux 怎么处理 WebP 图片?你使用哪个工具?以上描述的方法中,你最喜欢哪一个? ---------------------- -via: http://itsfoss.com/webp-ubuntu-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 +via: http://itsfoss.com/webp-ubuntu-linux/ 作者:[Abhishek Prakash][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8c55d2a65499b237aa7d3792f7ea5ff3e712cd86 Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 4 Jul 2016 19:01:38 +0800 Subject: [PATCH 1691/1710] [translated]How to permanently mount a Windows share on Linux --- ...manently mount a Windows share on Linux.md | 127 ------------------ ...manently mount a Windows share on Linux.md | 122 +++++++++++++++++ 2 files changed, 122 insertions(+), 127 deletions(-) delete mode 100644 sources/tech/20160624 How to permanently mount a Windows share on Linux.md create mode 100644 translated/tech/20160624 How to permanently mount a Windows share on Linux.md diff --git a/sources/tech/20160624 How to permanently mount a Windows share on Linux.md b/sources/tech/20160624 How to permanently mount a Windows share on Linux.md deleted file mode 100644 index 30b2cf71f8..0000000000 --- a/sources/tech/20160624 How to permanently mount a Windows share on Linux.md +++ /dev/null @@ -1,127 +0,0 @@ -alim0x translating - -How to permanently mount a Windows share on Linux -================================================== - ->If you get tired of having to remount Windows shares when you reboot your Linux box, read about an easy way to make those shares permanently mount. - -![](http://tr2.cbsistatic.com/hub/i/2016/06/02/e965310b-b38d-43e6-9eac-ea520992138b/68fd9ec5d6731cc405bdd27f2f42848d/linuxadminhero.jpg) ->Image: Jack Wallen - -It has never been easier for Linux to interact within a Windows network. And considering how many businesses are adopting Linux, those two platforms have to play well together. Fortunately, with the help of a few tools, you can easily map Windows network drives onto a Linux machine, and even ensure they are still there upon rebooting the Linux machine. - -### Before we get started - -For this to work, you will be using the command line. The process is pretty simple, but you will be editing the /etc/fstab file, so do use caution. -Also, I assume you already have Samba working properly so you can manually mount shares from a Windows network to your Linux box, and that you know the IP address of the machine hosting the share. - -Are you ready? Let's go. - -### Create your mount point - -The first thing we're going to do is create a folder that will serve as the mount point for the share. For the sake of simplicity, we'll name this folder share and we'll place it in /media. Open your terminal window and issue the command: - -``` -sudo mkdir /media/share -``` - -### A few installations - -Now we have to install the system that allows for cross-platform file sharing; this system is cifs-utils. From the terminal window, issue the command: - -``` -sudo apt-get install cifs-utils -``` - -This command will also install all of the dependencies for cifs-utils. - -Once this is installed, open up the file /etc/nsswitch.conf and look for the line: - -``` -hosts: files mdns4_minimal [NOTFOUND=return] dns -``` - -Edit that line so it looks like: - -``` -hosts: files mdns4_minimal [NOTFOUND=return] wins dns -``` - -Now you must install windbind so that your Linux machine can resolve Windows computer names on a DHCP network. From the terminal, issue this command: - -``` -sudo apt-get install libnss-windbind windbind -``` - -Restart networking with the command: - -``` -sudo service networking restart -``` - -### Mount the network drive - -Now we're going to map the network drive. This is where we must edit the /etc/fstab file. Before you make that first edit, back up the file with this command: - -``` -sudo cp /etc/fstab /etc/fstab.old -``` - -If you need to restore that file, issue the command: - -``` -sudo mv /etc/fstab.old /etc/fstab -``` - -Create a credentials file in your home directory called .smbcredentials. In that file, add your username and password, like so (USER is the actual username and password is the actual password): - -``` -username=USER - -password=PASSWORD -``` - -You now have to know the Group ID (GID) and User ID (UID) of the user that will be mounting the drive. Issue the command: - -``` -id USER -``` - -USER is the actual username, and you should see something like: - -``` -uid=1000(USER) gid=1000(GROUP) -``` - -USER is the actual username, and GROUP is the group name. The numbers before (USER) and (GROUP) will be used in the /etc/fstab file. - -It's time to edit the /etc/fstab file. Open that file in your editor and add the following line to the end (replace everything in ALL CAPS and the IP address of the remote machine): - -``` -//192.168.1.10/SHARE /media/share cifs credentials=/home/USER/.smbcredentials,iocharset=uft8,gid=GID,udi=UID,file_mode=0777,dir_mode=0777 0 0 -``` - -**Note**: The above should be on a single line. - -Save and close that file. Issue the command sudo mount -a and the share will be mounted. Check in /media/share and you should see the files and folders on the network share. - -### Sharing made easy - -Thanks to cifs-utils and Samba, mapping network shares is incredibly easy on a Linux machine. And now, you won't have to manually remount those shares every time your machine boots. - -For more networking tips and tricks, sign up for our Data Center newsletter. -[SUBSCRIBE](https://secure.techrepublic.com/user/login/?regSource=newsletter-button&position=newsletter-button&appId=true&redirectUrl=http%3A%2F%2Fwww.techrepublic.com%2Farticle%2Fhow-to-permanently-mount-a-windows-share-on-linux%2F&) - --------------------------------------------------------------------------------- - -via: http://www.techrepublic.com/article/how-to-permanently-mount-a-windows-share-on-linux/ - -作者:[Jack Wallen][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.techrepublic.com/search/?a=jack+wallen - - diff --git a/translated/tech/20160624 How to permanently mount a Windows share on Linux.md b/translated/tech/20160624 How to permanently mount a Windows share on Linux.md new file mode 100644 index 0000000000..a205923fe0 --- /dev/null +++ b/translated/tech/20160624 How to permanently mount a Windows share on Linux.md @@ -0,0 +1,122 @@ +如何在 Linux 上永久挂载一个 Windows 共享 +================================================== + +> 如果你已经厌倦了每次重启 Linux 就得重新挂载 Windows 共享,读读这个让共享永久挂载的简单方法。 + +![](http://tr2.cbsistatic.com/hub/i/2016/06/02/e965310b-b38d-43e6-9eac-ea520992138b/68fd9ec5d6731cc405bdd27f2f42848d/linuxadminhero.jpg) +>图片: Jack Wallen + +在 Linux 上和一个 Windows 网络进行交互从来就不是件轻松的事情。想想多少企业正在采用 Linux,这两个平台不得不一起好好协作。幸运的是,有了一些工具的帮助,你可以轻松地将 Windows 网络驱动器映射到一台 Linux 机器上,甚至可以确保在重启 Linux 机器之后共享还在。 + +### 在我们开始之前 + +要实现这个,你需要用到命令行。过程十分简单,但你需要编辑 /etc/fstab 文件,所以小心操作。还有,我假设你已经有正常工作的 Samba 了,可以手动从 Windows 网络挂载共享到你的 Linux 机器,还知道这个共享的主机 IP 地址。 + +准备好了吗?那就开始吧。 + +### 创建你的挂载点 + +我们要做的第一件事是创建一个文件夹,他将作为共享的挂载点。为了简单起见,我们将这个文件夹命名为 share,放在 /media 之下。打开你的终端执行以下命令: + +``` +sudo mkdir /media/share +``` + +### 一些安装 + +现在我们得安装允许跨平台文件共享的系统;这个系统是 cifs-utils。在终端窗口输入: + +``` +sudo apt-get install cifs-utils +``` + +这个命令同时还会安装 cifs-utils 所有的依赖。 + +安装完成之后,打开文件 /etc/nsswitch.conf 并找到这一行: + +``` +hosts: files mdns4_minimal [NOTFOUND=return] dns +``` + +编辑这一行,让它看起来像这样: + +``` +hosts: files mdns4_minimal [NOTFOUND=return] wins dns +``` + +现在你必须安装 windbind 让你的 Linux 机器可以在 DHCP 网络中解析 Windows 机器名。在终端里执行: + +``` +sudo apt-get install libnss-windbind windbind +``` + +用这个命令重启网络服务: + +``` +sudo service networking restart +``` + +### 挂载网络驱动器 + +现在我们要映射网络驱动器。这里我们必须编辑 /etc/fstab 文件。在你做第一次编辑之前,用这个命令备份以下这个文件: + +``` +sudo cp /etc/fstab /etc/fstab.old +``` + +如果你需要恢复这个文件,执行以下命令: + +``` +sudo mv /etc/fstab.old /etc/fstab +``` + +在你的主目录创建一个认证信息文件 .smbcredentials。在这个文件里添加你的用户名和密码,就像这样(USER 和 PASSWORD 是实际的用户名和密码): + +``` +username=USER + +password=PASSWORD +``` + +你需要知道挂载这个驱动器的用户的组 ID(GID)和用户 ID(UID)。执行命令: + +``` +id USER +``` + +USER 是实际的用户名,你应该会看到类似这样的信息: + +``` +uid=1000(USER) gid=1000(GROUP) +``` + +USER 是实际的用户名,GROUP 是组名。在(USER)和(GROUP)之前的数字将会被用在 /etc/fstab 文件之中。 + +是时候编辑 /etc/fstab 文件了。在你的编辑器中打开那个文件并添加下面这行到文件末尾(替换以下全大写字段以及远程机器的 IP 地址): + +``` +//192.168.1.10/SHARE /media/share cifs credentials=/home/USER/.smbcredentials,iocharset=uft8,gid=GID,udi=UID,file_mode=0777,dir_mode=0777 0 0 +``` + +**注意**:上面这些内容应该在同一行上。 + +保存并关闭那个文件。执行 sudo mount -a 命令,共享将被挂载。检查一下 /media/share,你应该能看到那个网络共享上的文件和文件夹了。 + +### 共享很简单 + +有了 cifs-utils 和 Samba,映射网络共享在一台 Linux 机器上简单得让人难以置信。现在,你再也不用在每次机器启动的时候手动重新挂载那些共享了。 + +更多网络提示和技巧,订阅我们的 Data Center 消息吧。 +[订阅](https://secure.techrepublic.com/user/login/?regSource=newsletter-button&position=newsletter-button&appId=true&redirectUrl=http%3A%2F%2Fwww.techrepublic.com%2Farticle%2Fhow-to-permanently-mount-a-windows-share-on-linux%2F&) + +-------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/article/how-to-permanently-mount-a-windows-share-on-linux/ + +作者:[Jack Wallen][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.techrepublic.com/search/?a=jack+wallen From d37b8ed2443acda0425cd583081bfac88aa6e506 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 4 Jul 2016 22:13:40 +0800 Subject: [PATCH 1692/1710] =?UTF-8?q?20160704-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...MATE 1.14 IN UBUNTU MATE 16.04 VIA PPA.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/tech/20160609 INSTALL MATE 1.14 IN UBUNTU MATE 16.04 VIA PPA.md diff --git a/sources/tech/20160609 INSTALL MATE 1.14 IN UBUNTU MATE 16.04 VIA PPA.md b/sources/tech/20160609 INSTALL MATE 1.14 IN UBUNTU MATE 16.04 VIA PPA.md new file mode 100644 index 0000000000..07b0f4e5a3 --- /dev/null +++ b/sources/tech/20160609 INSTALL MATE 1.14 IN UBUNTU MATE 16.04 VIA PPA.md @@ -0,0 +1,64 @@ +INSTALL MATE 1.14 IN UBUNTU MATE 16.04 (XENIAL XERUS) VIA PPA +================================================================= + +MATE Desktop 1.14 is now available for Ubuntu MATE 16.04 (Xenial Xerus). According to the release [announcement][1], it took about 2 months to release MATE Desktop 1.14 in a PPA because everything has been well tested, so you shouldn't encounter any issues. + +![](https://2.bp.blogspot.com/-v38tLvDAxHg/V1k7beVd5SI/AAAAAAAAX7A/1X72bmQ3ia42ww6kJ_61R-CZ6yrYEBSpgCLcB/s400/mate114-ubuntu1604.png) + +**The PPA currently provides MATE 1.14.1 (Ubuntu MATE 16.04 ships with MATE 1.12.x by default), which includes changes such as:** + +- client-side decoration apps now render correctly in all themes; +- touchpad configuration now supports edge and two-finger scrolling independently; +- python extensions in Caja can now be managed separately; +- all three window focus modes are selectable; +- MATE Panel now has the ability to change icon sizes for menubar and menu items; +- volume and Brightness OSD can now be enabled/disabled; +- many other improvements and bug fixes. + +MATE 1.14 also includes improved support for GTK+3 across the entire desktop, as well as various other GTK+3 tweaks however, the PPA packages are built with GTK+2 "to ensure compatibility with Ubuntu MATE 16.04 and all the 3rd party MATE applets, plugins and extensions", mentions the Ubuntu MATE blog. + +A complete MATE 1.14 changelog can be found [HERE][2]. + +### Upgrade to MATE Desktop 1.14.x in Ubuntu MATE 16.04 + +To upgrade to the latest MATE Desktop 1.14.x in Ubuntu MATE 16.04 using the official Xenial MATE PPA, open a terminal and use the following commands: + +``` +sudo apt-add-repository ppa:ubuntu-mate-dev/xenial-mate +sudo apt update +sudo apt dist-upgrade +``` + +**Note**: mate-netspeed applet will be removed when upgrading. That's because the applet is now part of the mate-applets package, so it's still available. + +Once the upgrade finishes, restart your system. That's it! + +### How to revert the changes + +If you're not satisfied with MATE 1.14, you encountered some bugs, etc., and you want to go back to the MATE version available in the official repositories, you can purge the PPA and downgrade the packages. + +To do this, use the following commands: + +``` +sudo apt install ppa-purge +sudo ppa-purge ppa:ubuntu-mate-dev/xenial-mate +``` + +After all the MATE packages are downgraded, restart the system. + +via [Ubuntu MATE blog][3] + +-------------------------------------------------------------------------------- + +via: http://www.webupd8.org/2016/06/install-mate-114-in-ubuntu-mate-1604.html + +作者:[Andrew][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.webupd8.org/p/about.html +[1]: https://ubuntu-mate.org/blog/mate-desktop-114-for-xenial-xerus/ +[2]: http://mate-desktop.com/blog/2016-04-08-mate-1-14-released/ +[3]: https://ubuntu-mate.org/blog/mate-desktop-114-for-xenial-xerus/ From f0c0375835f7eb5614c71cf09d1c259bb9bb3ca2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 4 Jul 2016 22:20:09 +0800 Subject: [PATCH 1693/1710] =?UTF-8?q?20160704-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...3 Advanced Image Processing with Python.md | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 sources/tech/20160623 Advanced Image Processing with Python.md diff --git a/sources/tech/20160623 Advanced Image Processing with Python.md b/sources/tech/20160623 Advanced Image Processing with Python.md new file mode 100644 index 0000000000..b431eb72f4 --- /dev/null +++ b/sources/tech/20160623 Advanced Image Processing with Python.md @@ -0,0 +1,122 @@ +Advanced Image Processing with Python +====================================== + +![](http://www.cuelogic.com/blog/wp-content/uploads/2016/06/Image-Search-Engine.png) + +Building an image processing search engine is no easy task. There are several concepts, tools, ideas and technologies that go into it. One of the major image-processing concepts is reverse image querying (RIQ) or reverse image search. Google, Cloudera, Sumo Logic and Birst are among the top organizations to use reverse image search. Great for analyzing images and making use of mined data, RIQ provides a very good insight into analytics. + +### Top Companies and Reverse Image Search + +There are many top tech companies that are using RIQ to best effect. For example, Pinterest first brought in visual search in 2014. It subsequently released a white paper in 2015, revealing the architecture. Reverse image search enabled Pinterest to obtain visual features from fashion objects and display similar product recommendations. + +As is generally known, Google images uses reverse image search allowing users to upload an image and then search for connected images. The submitted image is analyzed and a mathematical model made out of it, by advanced algorithm use. The image is then compared with innumerable others in the Google databases before results are matched and similar results obtained. + +**Here is a graph representation from the OpenCV 2.4.9 Features Comparison Report:** + +![](http://www.cuelogic.com/blog/wp-content/uploads/2016/06/search-engine-graph.jpg) + +### Algorithms & Python Libraries + +Before we get down to the workings of it, let us rush through the main elements that make building an image processing search engine with Python possible: + +### Patented Algorithms + +#### SIFT (Scale-Invariant Feature Transform) Algorithm + +1. A patented technology with nonfree functionality that uses image identifiers in order to identify a similar image, even those clicked from different angles, sizes, depths and scale, that they are included in the search results. Check the detailed video on SIFT here. +2. SIFT correctly matches the search criteria with a large database of features from many images. +3. Matching same images with different viewpoints and matching invariant features to obtain search results is another SIFT feature. Read more about scale-invariant keypoints here. + +#### SURF (Speeded Up Robust Features) Algorithm + +1. [SURF][1] is also patented with nonfree functionality and a more ‘speeded’ up version of SIFT. Unlike SIFT, SURF approximates Laplacian of Gaussian (unlike SIFT) with Box Filter. + +2. SURF relies on the determinant of Hessian Matrix for both its location and scale. + +3. Rotation invariance is not a requisite in many applications. So not finding this orientation speeds up the process. + +4. SURF includes several features that the speed improved in each step. Three times faster than SIFT, SURF is great with rotation and blurring. It is not as great in illumination and viewpoint change though. + +5. Open CV, a programming function library provides SURF functionalities. SURF.compute() and SURF. Detect() can be used to find descriptors and keypoints. Read more about SURF [here][2]. + +### Open Source Algorithms + +#### KAZE Algorithm + +1.KAZE is a open source 2D multiscale and novel feature detection and description algorithm in nonlinear scale spaces. Efficient techniques in Additive Operator Splitting (AOS) and variable conductance diffusion is used to build the nonlinear scale space. + +2. Multiscale image processing basics are simple – Creating an image’s scale space while filtering original image with right function over enhancing time or scale. + +#### AKAZE (Accelerated-KAZE) Algorithm + +1. As the name suggests, this is a faster mode to image search, finding matching keypoints between two images. AKAZE uses a binary descriptor and nonlinear scale space that balances accuracy and speed. + +#### BRISK (Binary Robust Invariant Scalable Keypoints) Algorithm + +1. BRISK is great for description, keypoint detection and matching. + +2. An algorithm that is highly adaptive, scale-space FAST-based detector along with a bit-string descriptor, helps speed up the search significantly. + +3. Scale-space keypoint detection and keypoint description helps optimize the performance with relation to the task at hand. + +#### FREAK (Fast Retina Keypoint) + +1. This is a novel keypoint descriptor inspired by the human eye.A binary strings cascade is efficiently computed by an image intensity comparison. The FREAK algorithm allows faster computing with lower memory load as compared to BRISK, SURF and SIFT. + +#### ORB (Oriented FAST and Rotated BRIEF) + +1.A fast binary descriptor, ORB is resistant to noise and rotation invariant. ORB builds on the FAST keypoint detector and the BRIEF descriptor, elements attributed to its low cost and good performance. + +2. Apart from the fast and precise orientation component, efficiently computing the oriented BRIEF, analyzing variance and co-relation of oriented BRIEF features, is another ORB feature. + +### Python Libraries + +#### Open CV + +1. OpenCV is available for both academic and commercial use. A open source machine learning and computer vision library, OpenCV makes it easy for organizations to utilize and modify code. + +2. Over 2500 optimized algorithms, including state-of-the-art machine learning and computer vision algorithms serve various image search purposes – face detection, object identification, camera movement tracking, finding similar images from image database, following eye movements, scenery recognition, etc. + +3. Top companies like Google, IBM, Yahoo, IBM, Sony, Honda, Microsoft and Intel make wide use of OpenCV. + +4. OpenCV uses Python, Java, C, C++ and MATLAB interfaces while supporting Windows, Linux, Mac OS and Android. + +#### Python Imaging Library (PIL) + +1. The Python Imaging Library (PIL) supports several file formats while providing image processing and graphics solutions.The open source PIL adds image processing capabilities to your Python interpreter. +2. The standard procedure for image manipulation include image enhancing, transparency and masking handling, image filtering, per-pixel manipulation, etc. + +For detailed statistics and graphs, view the OpenCV 2.4.9 Features Comparison Report [here][3]. + +### Building an Image Search Engine + +An image search engine helps pick similar images from a prepopulated set of image base. The most popular among these is Google’s well known image search engine. For starters, there are various approaches to build a system like this. To mention a few: + +1.Using image extraction, image description extraction, meta data extraction and search result extraction to build an image search engine. +2. Define your image descriptor, dataset indexing, define your similarity metric and then search and rank. +3. Select image to be searched, select directory for carrying out search, search directory for all pictures, create picture feature index, evaluate same feature for search picture, match pictures in search and obtain matched pictures. + +Our approach basically began with comparing grayscaled versions of the images, gradually moving on to complex feature matching algorithms like SIFT and SURF, and then finally settling down to am open source solution called BRISK. All these algorithms give efficient results with minor changes in performance and latency. An engine built on these algorithms have numerous applications like analyzing graphic data for popularity statistics, identification of objects in graphic contents, and many more. + +**Example**: An image search engine needs to be build by an IT company for a client. So if a brand logo image is submitted in the search, all related brand image searches show up as results. The obtained results can also be used for analytics by the client, allowing them to estimate the brand popularity as per the geographic location. Its still early days though, RIQ or reverse image search has not been exploited to its full extent yet. + +This concludes our article on building an image search engine using Python. Check our blog section out for the latest on technology and programming. + +Statistics Source: OpenCV 2.4.9 Features Comparison Report (computer-vision-talks.com) + +(Guidance and additional inputs by Ananthu Nair.) + +-------------------------------------------------------------------------------- + +via: http://www.cuelogic.com/blog/advanced-image-processing-with-python/ + +作者:[Snehith Kumbla][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.cuelogic.com/blog/author/snehith-kumbla/ +[1]: http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_surf_intro/py_surf_intro.html +[2]: http://www.vision.ee.ethz.ch/~surf/eccv06.pdf +[3]: https://docs.google.com/spreadsheets/d/1gYJsy2ROtqvIVvOKretfxQG_0OsaiFvb7uFRDu5P8hw/edit#gid=10 From 2208862a8be7c82c9a062f74c4aa51568d1b2448 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 4 Jul 2016 22:23:58 +0800 Subject: [PATCH 1694/1710] =?UTF-8?q?20160704-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...29 USE TASK MANAGER EQUIVALENT IN LINUX.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md diff --git a/sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md b/sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md new file mode 100644 index 0000000000..91488f82cf --- /dev/null +++ b/sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md @@ -0,0 +1,52 @@ +USE TASK MANAGER EQUIVALENT IN LINUX +==================================== + +![](https://itsfoss.com/wp-content/uploads/2016/06/Task-Manager-in-Linux.jpg) + +These are some of the most frequently asked questions by Linux beginners, “**is there a task manager for Linux**“, “how do you open task manager in Linux” ? + +People who are coming from Windows know how useful is the task manager. You press the Ctrl+Alt+Del to get to task manager in Windows. This task manager shows you all the running processes and their memory consumption. You can choose to end a process from this task manager application. + +When you have just begun with Linux, you look for a **task manager equivalent in Linux** as well. An expert Linux user prefers the command line way to find processes and memory consumption etc but you don’t have to go that way, at least not when you are just starting with Linux. + +All major Linux distributions have a task manager equivalent. Mostly, **it is called System Monitor** but it actually depends on your Linux distribution and the [desktop environment][1] it uses. + +In this article, we’ll see how to find and use the task manager in Linux with GNOME as the [desktop environment][2]. + +### TASK MANAGER EQUIVALENT IN LINUX WITH GNOME DESKTOP + +While using GNOME, press super key (Windows Key) and look for System Monitor: + +![](https://itsfoss.com/wp-content/uploads/2016/06/system-monitor-gnome-fedora.png) + +When you start the System Monitor, it shows you all the running processes and the memory consumption by them. + +![](https://itsfoss.com/wp-content/uploads/2016/06/fedora-system-monitor.jpeg) + +You can select a process and click on End process to kill it. + +![](https://itsfoss.com/wp-content/uploads/2016/06/kill-process-fedora.png) + +You can also see some statistics about your system in the Resources tab such as CPU consumption per core basis, memory usage, network usage etc. + +![](https://itsfoss.com/wp-content/uploads/2016/06/system-stats-fedora.png) + +This was the graphical way. If you want to go command line way, just run the command ‘top’ in terminal and you can see all the running processes and their memory consumption. You can easily [kill processes in Linux][3] command line. + +This all you need to know about task manager equivalent in Fedora Linux. I hope you find this quick tutorial helpful. If you have questions or suggestions, feel free to ask. + + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/task-manager-linux/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[Abhishek Prakash][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[1]: https://wiki.archlinux.org/index.php/desktop_environment +[2]: https://itsfoss.com/best-linux-desktop-environments/ +[3]: https://itsfoss.com/how-to-find-the-process-id-of-a-program-and-kill-it-quick-tip/ From 210ed0daf4ee349b1529045b827068ff97e57276 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 4 Jul 2016 22:27:27 +0800 Subject: [PATCH 1695/1710] =?UTF-8?q?20160704-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DERING TO DROP 32 BIT SUPPORT IN UBUNTU.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sources/tech/20160701 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md diff --git a/sources/tech/20160701 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md b/sources/tech/20160701 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md new file mode 100644 index 0000000000..c7a3e8a499 --- /dev/null +++ b/sources/tech/20160701 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md @@ -0,0 +1,42 @@ +CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU +======================================================== + +![](https://itsfoss.com/wp-content/uploads/2016/06/Ubuntu-32-bit-goes-for-a-toss-.jpg) + +Yesterday, developer [Dimitri John Ledkov][1] wrote a message on the [Ubuntu Mailing list][2] calling for the end of i386 support by Ubuntu 18.10. Ledkov argues that more software is being developed with 64-bit support. He is also concerned that it will be difficult to provide security support for the aging i386 architecture. + +Ledkov also argues that building i386 images is not free, but takes quite a bit of Canonical’s resources. + +>Building i386 images is not “for free”, it comes at the cost of utilizing our build farm, QA and validation time. Whilst we have scalable build-farms, i386 still requires all packages, autopackage tests, and ISOs to be revalidated across our infrastructure. As well as take up mirror space & bandwidth. + +Ledkov offers a plan where the 16.10, 17.04, and 17.10 versions of Ubuntu will continue to have i386 kernels, netboot installers, and cloud images, but drop i386 ISO for desktop and server. The 18.04 LTS would then drop support for i386 kernels, netboot installers, and cloud images, but still provide the ability for i386 programs to run on 64-bit architecture. Then, 18.10 would end the i386 port and limit legacy 32-bit applications to snaps, containers, and virtual machines. + +Ledkov’s plan had not been accepted yet, but it shows a definite push toward eliminating 32-bit support. + +### GOOD NEWS + +Don’t despair yet. this will not affect the distros used to resurrect your old system. [Martin Wimpress][3], the creator of [Ubuntu MATE][4], revealed during a discussion on Googl+ that these changes will only affect mainline Ubuntu. + +>The i386 archive will continue to exist into 18.04 and flavours can continue to elect to build i386 isos. There is however a security concern, in that some larger applications (Firefox, Chromium, LibreOffice) are already presenting challenges in terms of applying some security patches to older LTS releases. So flavours are being asked to be mindful of the support period they can reasonably be expected to support i386 versions for. + +### THOUGHTS + +I understand why they need to make this move from a security standpoint, but it’s going to make people move away from mainline Ubuntu to either one of the flavors or a different architecture. Thankfully, we have alternative [lightweight Linux distributions][5]. + + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-32-bit-support-drop/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 + +作者:[John Paul][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/john/ +[1]: https://plus.google.com/+DimitriJohnLedkov +[2]: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2016-June/016661.html +[3]: https://twitter.com/m_wimpress +[4]: http://ubuntu-mate.org/ +[5]: https://itsfoss.com/lightweight-linux-beginners/ From 1c334e4618c06e82310b0da30c42e79f28a05a62 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 4 Jul 2016 22:32:24 +0800 Subject: [PATCH 1696/1710] =?UTF-8?q?20160704-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Command Line History by Going Incognito.md | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 sources/tech/20160625 How to Hide Linux Command Line History by Going Incognito.md diff --git a/sources/tech/20160625 How to Hide Linux Command Line History by Going Incognito.md b/sources/tech/20160625 How to Hide Linux Command Line History by Going Incognito.md new file mode 100644 index 0000000000..274ff3b175 --- /dev/null +++ b/sources/tech/20160625 How to Hide Linux Command Line History by Going Incognito.md @@ -0,0 +1,124 @@ +How to Hide Linux Command Line History by Going Incognito +================================================================ + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/06/commandline-history-featured.jpg) + +If you’re a Linux command line user, you’ll agree that there are times when you do not want certain commands you run to be recorded in the command line history. There could be many reasons for this. For example, you’re at a certain position in your company, and you have some privileges that you don’t want others to abuse. Or, there are some critical commands that you don’t want to run accidentally while you’re browsing the history list. + +But is there a way to control what goes into the history list and what doesn’t? Or, in other words, can we turn on a web browser-like incognito mode in the Linux command line? The answer is yes, and there are many ways to achieve this, depending on what exactly you want. In this article we will discuss some of the popular solutions available. + +Note: all the commands presented in this article have been tested on Ubuntu. + +### Different ways available + +The first two ways we’ll describe here have already been covered in [one of our previous articles][1]. If you are already aware of them, you can skip over these. However, if you aren’t aware, you’re advised to go through them carefully. + +#### 1. Insert space before command + +Yes, you read it correctly. Insert a space in the beginning of a command, and it will be ignored by the shell, meaning the command won’t be recorded in history. However, there’s a dependency – the said solution will only work if the HISTCONTROL environment variable is set to “ignorespace” or “ignoreboth,” which is by default in most cases. + +So, a command like the following: + +``` +[space]echo "this is a top secret" +``` + +Won’t appear in the history if you’ve already done this command: + +``` +export HISTCONTROL = ignorespace +``` + +The below screenshot is an example of this behavior. + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/06/commandline-history-bash-command-space.png) + +The fourth “echo” command was not recorded in the history as it was run with a space in the beginning. + +#### 2. Disable the entire history for the current session + +If you want to disable the entire history for a session, you can easily do that by unsetting the HISTSIZE environment variable before you start with your command line work. To unset the variable run the following command: + +``` +export HISTFILE=0 +``` + +HISTFILE is the number of lines (or commands) that can be stored in the history list for an ongoing bash session. By default, this variable has a set value – for example, 1000 in my case. + +So, the command mentioned above will set the environment variable’s value to zero, and consequently nothing will be stored in the history list until you close the terminal. Keep in mind that you’ll also not be able to see the previously run commands by pressing the up arrow key or running the history command. + +#### 3. Erase the entire history after you’re done + +This can be seen as an alternative to the solution mentioned in the previous section. The only difference is that in this case you run a command AFTER you’re done with all your work. Thh following is the command in question: + +``` +history -cw +``` + +As already mentioned, this will have the same effect as the HISTFILE solution mentioned above. + +#### 4. Turn off history only for the work you do + +While the solutions (2 and 3) described above do the trick, they erase the entire history, something which might be undesired in many situations. There might be cases in which you want to retain the history list up until the point you start your command line work. For situations like these you need to run the following command before starting with your work: + +``` +[space]set +o history +``` + +Note: [space] represents a blank space. + +The above command will disable the history temporarily, meaning whatever you do after running this command will not be recorded in history, although all the stuff executed prior to the above command will be there as it is in the history list. + +To re-enable the history, run the following command: + +``` +[Space]set -o history +``` + +This brings things back to normal again, meaning any command line work done after the above command will show up in the history. + +#### 5. Delete specific commands from history + +Now suppose the history list already contains some commands that you didn’t want to be recorded. What can be done in this case? It’s simple. You can go ahead and remove them. The following is how to accomplish this: + +``` +[space]history | grep "part of command you want to remove" +``` + +The above command will output a list of matching commands (that are there in the history list) with a number [num] preceding each of them. + +Once you’ve identified the command you want to remove, just run the following command to remove that particular entry from the history list: + +``` +history -d [num] +``` + +The following screenshot is an example of this. + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/06/commandline-history-delete-specific-commands.png) + +The second ‘echo’ command was removed successfully. + +Alternatively, you can just press the up arrow key to take a walk back through the history list, and once the command of your interest appears on the terminal, just press “Ctrl + U” to totally blank the line, effectively removing it from the list. + +### Conclusion + +There are multiple ways in which you can manipulate the Linux command line history to suit your needs. Keep in mind, however, that it’s usually not a good practice to hide or remove a command from history, although it’s also not wrong, per se, but you should be aware of what you’re doing and what effects it might have. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/linux-command-line-history-incognito/?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+maketecheasier + +作者:[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://www.maketecheasier.com/command-line-history-linux/ + + + + + From c4d1ef7fb577612467d2ec614dbb56a75c42537b Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 4 Jul 2016 22:48:22 +0800 Subject: [PATCH 1697/1710] =?UTF-8?q?20160704-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ervices with Python RabbitMQ and Nameko.md | 279 ++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 sources/tech/20160304 Microservices with Python RabbitMQ and Nameko.md diff --git a/sources/tech/20160304 Microservices with Python RabbitMQ and Nameko.md b/sources/tech/20160304 Microservices with Python RabbitMQ and Nameko.md new file mode 100644 index 0000000000..5048465904 --- /dev/null +++ b/sources/tech/20160304 Microservices with Python RabbitMQ and Nameko.md @@ -0,0 +1,279 @@ +Microservices with Python RabbitMQ and Nameko +============================================== + +>"Micro-services is the new black" - Splitting the project in to independently scalable services is the currently the best option to ensure the evolution of the code. In Python there is a Framework called "Nameko" which makes it very easy and powerful. + +### Micro services + +>The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. - M. Fowler + +I recommend reading the [Fowler's posts][1] to understand the theory behind it. + +#### Ok I so what does it mean? + +In brief a Micro Service Architecture exists when your system is divided in small (single context bound) responsibilities blocks, those blocks doesn't know each other, they only have a common point of communication, generally a message queue, and does know the communication protocol and interfaces. + +#### Give me a real-life example + +>The code is available on github: take a look at service and api folders for more info. + +Consider you have an REST API, that API has an endpoint receiving some data and you need to perform some kind of computation with that data, instead of blocking the caller you can do it asynchronously, return an status "OK - Your request will be processed" to the caller and do it in a background task. + +Also you want to send an email notification when the computation is finished without blocking the main computing process, so it is better to delegate the "email sending" to another service. + +#### Scenario + +![](http://brunorocha.org/static/media/microservices/micro_services.png) + +### Show me the code! + +Lets create the system to understand it in practice. + +#### Environment + +We need an environment with: + +- A running RabbitMQ +- Python VirtualEnv for services +- Python VirtualEnv for API + +#### Rabbit + +The easiest way to have a RabbitMQ in development environment is running its official docker container, considering you have Docker installed run: + +``` +docker run -d --hostname my-rabbit --name some-rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3-management +``` + +Go to the browser and access using credentials guest:guest if you can login to RabbitMQ dashboard it means you have it running locally for development. + +![](http://brunorocha.org/static/media/microservices/RabbitMQManagement.png) + +#### The Service environment + +Now lets create the Micro Services to consume our tasks. We'll have a service for computing and another for mail, follow the steps. + +In a shell create the root project directory + +``` +$ mkdir myproject +$ cd myproject +``` + +Create and activate a virtualenv (you can also use virtualenv-wrapper) + +``` +$ virtualenv service_env +$ source service_env/bin/activate +``` + +Install nameko framework and yagmail + +``` +(service_env)$ pip install nameko +(service_env)$ pip install yagmail +``` + +#### The service code + +Now having that virtualenv prepared (consider you can run service in a server and API in another) lets code the nameko RPC Services. + +We are going to put both services in a single python module, but you can also split in separate modules and also run them in separate servers if needed. + +In a file called `service.py` + +``` +import yagmail +from nameko.rpc import rpc, RpcProxy + + +class Mail(object): + name = "mail" + + @rpc + def send(self, to, subject, contents): + yag = yagmail.SMTP('myname@gmail.com', 'mypassword') + # read the above credentials from a safe place. + # Tip: take a look at Dynaconf setting module + yag.send(to=to.encode('utf-8), + subject=subject.encode('utf-8), + contents=[contents.encode('utf-8)]) + + +class Compute(object): + name = "compute" + mail = RpcProxy('mail') + + @rpc + def compute(self, operation, value, other, email): + operations = {'sum': lambda x, y: int(x) + int(y), + 'mul': lambda x, y: int(x) * int(y), + 'div': lambda x, y: int(x) / int(y), + 'sub': lambda x, y: int(x) - int(y)} + try: + result = operations[operation](value, other) + except Exception as e: + self.mail.send.async(email, "An error occurred", str(e)) + raise + else: + self.mail.send.async( + email, + "Your operation is complete!", + "The result is: %s" % result + ) + return result +``` + +Now with the above services definition we need to run it as a Nameko RPC service. + +>NOTE: We are going to run it in a console and leave it running, but in production it is recommended to put the service to run using supervisord or an alternative. + +Run the service and let it running in a shell + +``` +(service_env)$ nameko run service --broker amqp://guest:guest@localhost +starting services: mail, compute +Connected to amqp://guest:**@127.0.0.1:5672// +Connected to amqp://guest:**@127.0.0.1:5672// +``` + +#### Testing it + +Go to another shell (with the same virtenv) and test it using nameko shell + +``` +(service_env)$ nameko shell --broker amqp://guest:guest@localhost +Nameko Python 2.7.9 (default, Apr 2 2015, 15:33:21) +[GCC 4.9.2] shell on linux2 +Broker: amqp://guest:guest@localhost +>>> +``` + +You are now in the RPC client testing shell exposing the n.rpc object, play with it + +``` +>>> n.rpc.mail.send("name@email.com", "testing", "Just testing") +``` + +The above should sent an email and we can also call compute service to test it, note that it also spawns an async mail sending with result. + +``` +>>> n.rpc.compute.compute('sum', 30, 10, "name@email.com") +40 +>>> n.rpc.compute.compute('sub', 30, 10, "name@email.com") +20 +>>> n.rpc.compute.compute('mul', 30, 10, "name@email.com") +300 +>>> n.rpc.compute.compute('div', 30, 10, "name@email.com") +3 +``` + +### Calling the micro-service through the API + +In a different shell (or even a different server) prepare the API environment + +Create and activate a virtualenv (you can also use virtualenv-wrapper) + +``` +$ virtualenv api_env +$ source api_env/bin/activate +``` + +Install Nameko, Flask and Flasgger + +``` +(api_env)$ pip install nameko +(api_env)$ pip install flask +(api_env)$ pip install flasgger +``` + +>NOTE: In api you dont need the yagmail because it is service responsability + +Lets say you have the following code in a file `api.py` + +``` +from flask import Flask, request +from flasgger import Swagger +from nameko.standalone.rpc import ClusterRpcProxy + +app = Flask(__name__) +Swagger(app) +CONFIG = {'AMQP_URI': "amqp://guest:guest@localhost"} + + +@app.route('/compute', methods=['POST']) +def compute(): + """ + Micro Service Based Compute and Mail API + This API is made with Flask, Flasgger and Nameko + --- + parameters: + - name: body + in: body + required: true + schema: + id: data + properties: + operation: + type: string + enum: + - sum + - mul + - sub + - div + email: + type: string + value: + type: integer + other: + type: integer + responses: + 200: + description: Please wait the calculation, you'll receive an email with results + """ + operation = request.json.get('operation') + value = request.json.get('value') + other = request.json.get('other') + email = request.json.get('email') + msg = "Please wait the calculation, you'll receive an email with results" + subject = "API Notification" + with ClusterRpcProxy(CONFIG) as rpc: + # asynchronously spawning and email notification + rpc.mail.send.async(email, subject, msg) + # asynchronously spawning the compute task + result = rpc.compute.compute.async(operation, value, other, email) + return msg, 200 + +app.run(debug=True) +``` + +Put the above API to run in a different shell or server + +``` +(api_env) $ python api.py + * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) +``` + +and then access the url you will see the Flasgger UI and you can interact with the api and start producing tasks on queue to the service to consume. + +![](http://brunorocha.org/static/media/microservices/Flasgger_API_documentation.png) + +>NOTE: You can see the shell where service is running for logging, prints and error messages. You can also access the RabbitMQ dashboard to see if there is some message in process there. + +There is a lot of more advanced things you can do with Nameko framework you can find more information on + +Let's Micro Serve! + + +-------------------------------------------------------------------------------- + +via: http://brunorocha.org/python/microservices-with-python-rabbitmq-and-nameko.html + +作者: [Bruno Rocha][a] +译者: [译者ID](https://github.com/译者ID) +校对: [校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://facebook.com/rochacbruno +[1]:http://martinfowler.com/articles/microservices.html From 0b346375d6a8e41c231f5708917daf7de5a63d20 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 4 Jul 2016 23:03:33 +0800 Subject: [PATCH 1698/1710] =?UTF-8?q?20160704-7=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20 Detecting cats in images with OpenCV.md | 231 ++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 sources/tech/20160620 Detecting cats in images with OpenCV.md diff --git a/sources/tech/20160620 Detecting cats in images with OpenCV.md b/sources/tech/20160620 Detecting cats in images with OpenCV.md new file mode 100644 index 0000000000..37a3ce7fc2 --- /dev/null +++ b/sources/tech/20160620 Detecting cats in images with OpenCV.md @@ -0,0 +1,231 @@ +Detecting cats in images with OpenCV +======================================= + +![](http://www.pyimagesearch.com/wp-content/uploads/2016/05/cat_face_detector_result_04.jpg) + +Did you know that OpenCV can detect cat faces in images…right out-of-the-box with no extras? + +I didn’t either. + +But after [Kendrick Tan broke the story][1], I had to check it out for myself…and do a little investigative work to see how this cat detector seemed to sneak its way into the OpenCV repository without me noticing (much like a cat sliding into an empty cereal box, just waiting to be discovered). + +In the remainder of this blog post, I’ll demonstrate how to use OpenCV’s cat detector to detect cat faces in images. This same technique can be applied to video streams as well. + +>Looking for the source code to this post? [Jump right to the downloads section][2]. + + +### Detecting cats in images with OpenCV + +If you take a look at the [OpenCV repository][3], specifically within the [haarcascades directory][4] (where OpenCV stores all its pre-trained Haar classifiers to detect various objects, body parts, etc.), you’ll notice two files: + +- haarcascade_frontalcatface.xml +- haarcascade_frontalcatface_extended.xml + +Both of these Haar cascades can be used detecting “cat faces” in images. In fact, I used these very same cascades to generate the example image at the top of this blog post. + +Doing a little investigative work, I found that the cascades were trained and contributed to the OpenCV repository by the legendary [Joseph Howse][5] who’s authored a good many tutorials, books, and talks on computer vision. + +In the remainder of this blog post, I’ll show you how to utilize Howse’s Haar cascades to detect cats in images. + +Cat detection code + +Let’s get started detecting cats in images with OpenCV. Open up a new file, name it cat_detector.py , and insert the following code: + +### Detecting cats in images with OpenCVPython + +``` +# import the necessary packages +import argparse +import cv2 + +# construct the argument parse and parse the arguments +ap = argparse.ArgumentParser() +ap.add_argument("-i", "--image", required=True, + help="path to the input image") +ap.add_argument("-c", "--cascade", + default="haarcascade_frontalcatface.xml", + help="path to cat detector haar cascade") +args = vars(ap.parse_args()) +``` + +Lines 2 and 3 import our necessary Python packages while Lines 6-12 parse our command line arguments. We only require a single argument here, the input `--image` that we want to detect cat faces in using OpenCV. + +We can also (optionally) supply a path our Haar cascade via the `--cascade` switch. We’ll default this path to `haarcascade_frontalcatface.xml` and assume you have the `haarcascade_frontalcatface.xml` file in the same directory as your cat_detector.py script. + +Note: I’ve conveniently included the code, cat detector Haar cascade, and example images used in this tutorial in the “Downloads” section of this blog post. If you’re new to working with Python + OpenCV (or Haar cascades), I would suggest downloading the provided .zip file to make it easier to follow along. + +Next, let’s detect the cats in our input image: + +``` +# load the input image and convert it to grayscale +image = cv2.imread(args["image"]) +gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + +# load the cat detector Haar cascade, then detect cat faces +# in the input image +detector = cv2.CascadeClassifier(args["cascade"]) +rects = detector.detectMultiScale(gray, scaleFactor=1.3, + minNeighbors=10, minSize=(75, 75)) +``` + +On Lines 15 and 16 we load our input image from disk and convert it to grayscale (a normal pre-processing step before passing the image to a Haar cascade classifier, although not strictly required). + +Line 20 loads our Haar cascade from disk (in this case, the cat detector) and instantiates the cv2.CascadeClassifier object. + +Detecting cat faces in images with OpenCV is accomplished on Lines 21 and 22 by calling the detectMultiScale method of the detector object. We pass four parameters to the detectMultiScale method, including: + +1. Our image, gray , that we want to detect cat faces in. +2.A scaleFactor of our [image pyramid][6] used when detecting cat faces. A larger scale factor will increase the speed of the detector, but could harm our true-positive detection accuracy. Conversely, a smaller scale will slow down the detection process, but increase true-positive detections. However, this smaller scale can also increase the false-positive detection rate as well. See the “A note on Haar cascades” section of this blog post for more information. +3. The minNeighbors parameter controls the minimum number of detected bounding boxes in a given area for the region to be considered a “cat face”. This parameter is very helpful in pruning false-positive detections. +4. Finally, the minSize parameter is pretty self-explanatory. This value ensures that each detected bounding box is at least width x height pixels (in this case, 75 x 75). + +The detectMultiScale function returns rects , a list of 4-tuples. These tuples contain the (x, y)-coordinates and width and height of each detected cat face. + +Finally, let’s draw a rectangle surround each cat face in the image: + +``` +# loop over the cat faces and draw a rectangle surrounding each +for (i, (x, y, w, h)) in enumerate(rects): + cv2.rectangle(image, (x, y), (x + w, y + h), (0, 0, 255), 2) + cv2.putText(image, "Cat #{}".format(i + 1), (x, y - 10), + cv2.FONT_HERSHEY_SIMPLEX, 0.55, (0, 0, 255), 2) + +# show the detected cat faces +cv2.imshow("Cat Faces", image) +cv2.waitKey(0) +``` + +Given our bounding boxes (i.e., rects ), we loop over each of them individually on Line 25. + +We then draw a rectangle surrounding each cat face on Line 26, while Lines 27 and 28 displays an integer, counting the number of cats in the image. + +Finally, Lines 31 and 32 display the output image to our screen. + +### Cat detection results + +To test our OpenCV cat detector, be sure to download the source code to this tutorial using the “Downloads” section at the bottom of this post. + +Then, after you have unzipped the archive, you should have the following three files/directories: + +1. cat_detector.py : Our Python + OpenCV script used to detect cats in images. +2. haarcascade_frontalcatface.xml : The cat detector Haar cascade. +3. images : A directory of testing images that we’re going to apply the cat detector cascade to. + +From there, execute the following command: + +Detecting cats in images with OpenCVShell + +``` +$ python cat_detector.py --image images/cat_01.jpg +``` + +![](http://www.pyimagesearch.com/wp-content/uploads/2016/05/cat_face_detector_result_01.jpg) +>Figure 1: Detecting a cat face in an image, even with parts of the cat occluded + +Notice that we have been able to detect the cat face in the image, even though the rest of its body is obscured. + +Let’s try another image: + +``` +python cat_detector.py --image images/cat_02.jpg +``` + +![](http://www.pyimagesearch.com/wp-content/uploads/2016/05/cat_face_detector_result_02.jpg) +>Figure 2: A second example of detecting a cat in an image with OpenCV, this time the cat face is slightly different + +This cat’s face is clearly different from the other one, as it’s in the middle of a “meow”. In either case, the cat detector cascade is able to correctly find the cat face in the image. + +The same is true for this image as well: + +``` +$ python cat_detector.py --image images/cat_03.jpg +``` + +![](http://www.pyimagesearch.com/wp-content/uploads/2016/05/cat_face_detector_result_03.jpg) +>Figure 3: Cat detection with OpenCV and Python + +Our final example demonstrates detecting multiple cats in an image using OpenCV and Python: + +``` +$ python cat_detector.py --image images/cat_04.jpg +``` + +![](http://www.pyimagesearch.com/wp-content/uploads/2016/05/cat_face_detector_result_04.jpg) +>Figure 4: Detecting multiple cats in the same image with OpenCV + +Note that the Haar cascade can return bounding boxes in an order that you may not like. In this case, the middle cat is actually labeled as the third cat. You can resolve this “issue” by sorting the bounding boxes according to their (x, y)-coordinates for a consistent ordering. + +#### A quick note on accuracy + +It’s important to note that in the comments section of the .xml files, Joseph Howe details that the cat detector Haar cascades can report cat faces where there are actually human faces. + +In this case, he recommends performing both face detection and cat detection, then discarding any cat bounding boxes that overlap with the face bounding boxes. + +#### A note on Haar cascades + +First published in 2001 by Paul Viola and Michael Jones, [Rapid Object Detection using a Boosted Cascade of Simple Features][7], this original work has become one of the most cited papers in computer vision. + +This algorithm is capable of detecting objects in images, regardless of their location and scale. And perhaps most intriguing, the detector can run in real-time on modern hardware. + +In their paper, Viola and Jones focused on training a face detector; however, the framework can also be used to train detectors for arbitrary “objects”, such as cars, bananas, road signs, etc. + +#### The problem? + +The biggest problem with Haar cascades is getting the detectMultiScale parameters right, specifically scaleFactor and minNeighbors . You can easily run into situations where you need to tune both of these parameters on an image-by-image basis, which is far from ideal when utilizing an object detector. + +The scaleFactor variable controls your [image pyramid][8] used to detect objects at various scales of an image. If your scaleFactor is too large, then you’ll only evaluate a few layers of the image pyramid, potentially leading to you missing objects at scales that fall in between the pyramid layers. + +On the other hand, if you set scaleFactor too low, then you evaluate many pyramid layers. This will help you detect more objects in your image, but it (1) makes the detection process slower and (2) substantially increases the false-positive detection rate, something that Haar cascades are known for. + +To remember this, we often apply [Histogram of Oriented Gradients + Linear SVM detection][9] instead. + +The HOG + Linear SVM framework parameters are normally much easier to tune — and best of all, HOG + Linear SVM enjoys a much smaller false-positive detection rate. The only downside is that it’s harder to get HOG + Linear SVM to run in real-time. + +### Interested in learning more about object detection? + +![](http://www.pyimagesearch.com/wp-content/uploads/2016/05/custom_object_detector_example.jpg) +>Figure 5: Learn how to build custom object detectors inside the PyImageSearch Gurus course. + +If you’re interested in learning how to train your own custom object detectors, be sure to take a look at the PyImageSearch Gurus course. + +Inside the course, I have 15 lessons covering 168 pages of tutorials dedicated to teaching you how to build custom object detectors from scratch. You’ll discover how to detect road signs, faces, cars (and nearly any other object) in images by applying the HOG + Linear SVM framework for object detection. + +To learn more about the PyImageSearch Gurus course (and grab 10 FREE sample lessons), just click the button below: + +### Summary + +In this blog post, we learned how to detect cats in images using the default Haar cascades shipped with OpenCV. These Haar cascades were trained and contributed to the OpenCV project by [Joseph Howse][9], and were originally brought to my attention [in this post][10] by Kendrick Tan. + +While Haar cascades are quite useful, we often use HOG + Linear SVM instead, as it’s a bit easier to tune the detector parameters, and more importantly, we can enjoy a much lower false-positive detection rate. + +I detail how to build custom HOG + Linear SVM object detectors to recognize various objects in images, including cars, road signs, and much more [inside the PyImageSearch Gurus course][11]. + +Anyway, I hope you enjoyed this blog post! + +Before you go, be sure to signup for the PyImageSearch Newsletter using the form below to be notified when new blog posts are published. + +-------------------------------------------------------------------------------- + +via: http://www.pyimagesearch.com/2016/06/20/detecting-cats-in-images-with-opencv/ + +作者:[Adrian Rosebrock][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.pyimagesearch.com/author/adrian/ +[1]: http://kendricktan.github.io/find-cats-in-photos-using-computer-vision.html +[2]: http://www.pyimagesearch.com/2016/06/20/detecting-cats-in-images-with-opencv/# +[3]: https://github.com/Itseez/opencv +[4]: https://github.com/Itseez/opencv/tree/master/data/haarcascades +[5]: http://nummist.com/ +[6]: http://www.pyimagesearch.com/2015/03/16/image-pyramids-with-python-and-opencv/ +[7]: https://www.cs.cmu.edu/~efros/courses/LBMV07/Papers/viola-cvpr-01.pdf +[8]: http://www.pyimagesearch.com/2015/03/16/image-pyramids-with-python-and-opencv/ +[9]: http://www.pyimagesearch.com/2014/11/10/histogram-oriented-gradients-object-detection/ +[10]: http://kendricktan.github.io/find-cats-in-photos-using-computer-vision.html +[11]: https://www.pyimagesearch.com/pyimagesearch-gurus/ + + + From 65d69dc85245aa256e43c3b2ec8c8f7a22ca0f8b Mon Sep 17 00:00:00 2001 From: Chunyang Wen Date: Tue, 5 Jul 2016 10:25:36 +0800 Subject: [PATCH 1699/1710] Translating: How to Hide Linux Command Line History by Going Incognito chunyang-wen (#4140) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * âFinish tranlating awk series part4 * Update Part 4 - How to Use Comparison Operators with Awk in Linux.md * translating: How to Hide Linux Command Line History by Going Incognito --- ... How to Hide Linux Command Line History by Going Incognito.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160625 How to Hide Linux Command Line History by Going Incognito.md b/sources/tech/20160625 How to Hide Linux Command Line History by Going Incognito.md index 274ff3b175..0d5ce6e6e1 100644 --- a/sources/tech/20160625 How to Hide Linux Command Line History by Going Incognito.md +++ b/sources/tech/20160625 How to Hide Linux Command Line History by Going Incognito.md @@ -1,3 +1,4 @@ +chunyang-wen translating How to Hide Linux Command Line History by Going Incognito ================================================================ From 79c2a31368988fdd76532ee653585b8ceba5bd49 Mon Sep 17 00:00:00 2001 From: Johnny Liao Date: Tue, 5 Jul 2016 10:44:43 +0800 Subject: [PATCH 1700/1710] Update 20160623 Advanced Image Processing with Python.md [Translating] Advanced Image Processing with Python --- sources/tech/20160623 Advanced Image Processing with Python.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160623 Advanced Image Processing with Python.md b/sources/tech/20160623 Advanced Image Processing with Python.md index b431eb72f4..0a3a722845 100644 --- a/sources/tech/20160623 Advanced Image Processing with Python.md +++ b/sources/tech/20160623 Advanced Image Processing with Python.md @@ -1,3 +1,5 @@ +Johnny-Liao translating... + Advanced Image Processing with Python ====================================== From ac384892ccaa5920a5585ab3661c2f461393d26f Mon Sep 17 00:00:00 2001 From: Xin Wang <2650454635@qq.com> Date: Tue, 5 Jul 2016 11:04:17 +0800 Subject: [PATCH 1701/1710] Update 20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md --- sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md b/sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md index 91488f82cf..aa1e999f50 100644 --- a/sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md +++ b/sources/tech/20160629 USE TASK MANAGER EQUIVALENT IN LINUX.md @@ -1,3 +1,4 @@ +xinglianfly translate USE TASK MANAGER EQUIVALENT IN LINUX ==================================== From 10e5d95d9c2eb23efbd600fac4495a6e9011f6f5 Mon Sep 17 00:00:00 2001 From: gitfuture Date: Tue, 5 Jul 2016 12:39:34 +0800 Subject: [PATCH 1702/1710] finish translating by GitFuture --- ...P 2.0 Support for Nginx on Ubuntu 16.04.md | 304 ------------------ ...P 2.0 Support for Nginx on Ubuntu 16.04.md | 302 +++++++++++++++++ 2 files changed, 302 insertions(+), 304 deletions(-) delete mode 100644 sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md create mode 100644 translated/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md diff --git a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md b/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md deleted file mode 100644 index acb98b2d20..0000000000 --- a/sources/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md +++ /dev/null @@ -1,304 +0,0 @@ -Translating by GitFuture - -Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04 -===================================================================================== - - -The LEMP stack is an acronym which represents is a group of packages (Linux OS, Nginx web server, MySQL\MariaDB database and PHP server-side dynamic programming language) which are used to deploy dynamic web applications and web pages. - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-Nginx-with-FastCGI-on-Ubuntu-16.04.png) ->Install Nginx with MariaDB 10, PHP 7 and HTTP 2.0 Support on Ubuntu 16.04 - -This tutorial will guide you on how to install a LEMP stack (Nginx with MariaDB and PHP7) on Ubuntu 16.04 server. - -Requirements - -[Installation of Ubuntu 16.04 Server Edition][1] - -### Step 1: Install the Nginx Web Server - -#### 1. Nginx is a modern and resources efficient web server used to display web pages to visitors on the internet. We’ll start by installing Nginx web server from Ubuntu official repositories by using the [apt command line][2]. - -``` -$ sudo apt-get install nginx -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-Nginx-on-Ubuntu-16.04.png) ->Install Nginx on Ubuntu 16.04 - -#### 2. Next, issue the [netstat][3] and [systemctl][4] commands in order to confirm if Nginx is started and binds on port 80. - -``` -$ netstat -tlpn -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Network-Port-Connection.png) ->Check Nginx Network Port Connection - -``` -$ sudo systemctl status nginx.service -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Service-Status.png) ->Check Nginx Service Status - -Once you have the confirmation that the server is started you can open a browser and navigate to your server IP address or DNS record using HTTP protocol in order to visit Nginx default web page. - -``` -http://IP-Address -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Verify-Nginx-Webpage.png) ->Verify Nginx Webpage - -### Step 2: Enable Nginx HTTP/2.0 Protocol - -#### 3. The HTTP/2.0 protocol which is build by default in the latest release of Nginx binaries on Ubuntu 16.04 works only in conjunction with SSL and promises a huge speed improvement in loading web SSL web pages. - -To enable the protocol in Nginx on Ubuntu 16.04, first navigate to Nginx available sites configuration files and backup the default configuration file by issuing the below command. - -``` -$ cd /etc/nginx/sites-available/ -$ sudo mv default default.backup -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Backup-Nginx-Sites-Configuration-File.png) ->Backup Nginx Sites Configuration File - -#### 4. Then, using a text editor create a new default page with the below instructions: - -``` -server { - listen 443 ssl http2 default_server; - listen [::]:443 ssl http2 default_server; - - root /var/www/html; - - index index.html index.htm index.php; - - server_name 192.168.1.13; - - location / { - try_files $uri $uri/ =404; - } - - ssl_certificate /etc/nginx/ssl/nginx.crt; - ssl_certificate_key /etc/nginx/ssl/nginx.key; - - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; - ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; - ssl_dhparam /etc/nginx/ssl/dhparam.pem; - ssl_session_cache shared:SSL:20m; - ssl_session_timeout 180m; - resolver 8.8.8.8 8.8.4.4; - add_header Strict-Transport-Security "max-age=31536000; - #includeSubDomains" always; - - - location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php7.0-fpm.sock; - } - - location ~ /\.ht { - deny all; - } - -} - -server { - listen 80; - listen [::]:80; - server_name 192.168.1.13; - return 301 https://$server_name$request_uri; -} -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Enable-Nginx-HTTP-2-Protocol.png) ->Enable Nginx HTTP 2 Protocol - -The above configuration snippet enables the use of `HTTP/2.0` by adding the http2 parameter to all SSL listen directives. - -Also, the last part of the excerpt enclosed in server directive is used to redirect all non-SSL traffic to SSL/TLS default host. Also, replace the `server_name` directive to match your own IP address or DNS record (FQDN preferably). - -#### 5. Once you finished editing Nginx default configuration file with the above settings, generate and list the SSL certificate file and key by executing the below commands. - -Fill the certificate with your own custom settings and pay attention to Common Name setting to match your DNS FQDN record or your server IP address that will be used to access the web page. - -``` -$ sudo mkdir /etc/nginx/ssl -$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -$ ls /etc/nginx/ssl/ -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Generate-SSL-Certificate-and-Key.png) ->Generate SSL Certificate and Key for Nginx - -#### 6. Also, create a strong DH cypher, which was changed on the above configuration file on `ssl_dhparam` instruction line, by issuing the below command: - -``` -$ sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Create-Diffie-Hellman-Key.png) ->Create Diffie-Hellman Key - -#### 7. Once the `Diffie-Hellman` key has been created, verify if Nginx configuration file is correctly written and can be applied by Nginx web server and restart the daemon to reflect changes by running the below commands. - -``` -$ sudo nginx -t -$ sudo systemctl restart nginx.service -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Configuration.png) ->Check Nginx Configuration - -#### 8. In order to test if Nginx uses HTTP/2.0 protocol issue the below command. The presence of `h2` advertised protocol confirms that Nginx has been successfully configured to use HTTP/2.0 protocol. All modern up-to-date browsers should support this protocol by default. - -``` -$ openssl s_client -connect localhost:443 -nextprotoneg '' -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Test-Nginx-HTTP-2-Protocol.png) ->Test Nginx HTTP 2.0 Protocol - -### Step 3: Install PHP 7 Interpreter - -Nginx can be used with PHP dynamic processing language interpreter to generate dynamic web content with the help of FastCGI process manager obtained by installing the php-fpm binary package from Ubuntu official repositories. - -#### 9. In order to grab PHP7.0 and the additional packages that will allow PHP to communicate with Nginx web server issue the below command on your server console: - -``` -$ sudo apt install php7.0 php7.0-fpm -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-PHP-7-PHP-FPM-for-Ngin.png) ->Install PHP 7 and PHP-FPM for Ngin - -#### 10. Once the PHP7.0 interpreter has been successfully installed on your machine, start and check php7.0-fpm daemon by issuing the below command: - -``` -$ sudo systemctl start php7.0-fpm -$ sudo systemctl status php7.0-fpm -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Start-Verify-php-fpm-Service.png) ->Start and Verify php-fpm Service - -#### 11. The current configuration file of Nginx is already configured to use PHP FastCGI process manager in order to server dynamic content. - -The server block that enables Nginx to use PHP interpreter is presented on the below excerpt, so no further modifications of default Nginx configuration file are required. - -``` -location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php7.0-fpm.sock; - } -``` - -Below is a screenshot of what instructions you need to uncomment and modify is case of an original Nginx default configuration file. - - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Enable-PHP-FastCGI-for-Nginx.png) ->Enable PHP FastCGI for Nginx - -#### 12. To test Nginx web server relation with PHP FastCGI process manager create a PHP `info.php` test configuration file by issuing the below command and verify the settings by visiting this configuration file using the below address: `http://IP_or domain/info.php`. - -``` -$ sudo su -c 'echo "" |tee /var/www/html/info.php' -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Create-PHP-Info-File.png) ->Create PHP Info File - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Verify-PHP-FastCGI-Info.png) ->Verify PHP FastCGI Info - -Also check if HTTP/2.0 protocol is advertised by the server by locating the line `$_SERVER[‘SERVER_PROTOCOL’]` on PHP Variables block as illustrated on the below screenshot. - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-HTTP-2.0-Protocol-Info.png) ->Check HTTP 2.0 Protocol Info - -#### 13. In order to install extra PHP7.0 modules use the `apt search php7.0` command to find a PHP module and install it. - -Also, try to install the following PHP modules which can come in handy in case you are planning to [install WordPress][5] or other CMS. - -``` -$ sudo apt install php7.0-mcrypt php7.0-mbstring -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-PHP-7-Modules.png) ->Install PHP 7 Modules - -#### 14. To register the PHP extra modules just restart PHP-FPM daemon by issuing the below command. - -``` -$ sudo systemctl restart php7.0-fpm.service -``` - -### Step 4: Install MariaDB Database - -#### 15. Finally, in order to complete our LEMP stack we need the MariaDB database component to store and manage website data. - -Install MariaDB database management system by running the below command and restart PHP-FPM service in order to use MySQL module to access the database. - -``` -$ sudo apt install mariadb-server mariadb-client php7.0-mysql -$ sudo systemctl restart php7.0-fpm.service -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-MariaDB-for-Nginx.png) ->Install MariaDB for Nginx - -#### 16. To secure the MariaDB installation, run the security script provided by the binary package from Ubuntu repositories which will ask you set a root password, remove anonymous users, disable root login remotely and remove test database. - -Run the script by issuing the below command and answer all questions with yes. Use the below screenshot as a guide. - -``` -$ sudo mysql_secure_installation -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Secure-MariaDB-Installation-for-Nginx.png) ->Secure MariaDB Installation for Nginx - -#### 17. To configure MariaDB so that ordinary users can access the database without system sudo privileges, go to MySQL command line interface with root privileges and run the below commands on MySQL interpreter: - -``` -$ sudo mysql -MariaDB> use mysql; -MariaDB> update user set plugin=’‘ where User=’root’; -MariaDB> flush privileges; -MariaDB> exit -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/MariaDB-User-Permissions.png) ->MariaDB User Permissions - -Finally, login to MariaDB database and run an arbitrary command without root privileges by executing the below command: - -``` -$ mysql -u root -p -e 'show databases' -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-MariaDB-Databases.png) ->Check MariaDB Databases - -That’ all! Now you have a **LEMP** stack configured on **Ubuntu 16.04** server that allows you to deploy complex dynamic web applications that can interact with databases. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-nginx-mariadb-php7-http2-on-ubuntu-16-04/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 - -作者:[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/installation-of-ubuntu-16-04-server-edition/ -[2]: http://www.tecmint.com/apt-advanced-package-command-examples-in-ubuntu/ -[3]: http://www.tecmint.com/20-netstat-commands-for-linux-network-management/ -[4]: http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ -[5]: http://www.tecmint.com/install-wordpress-using-lamp-or-lemp-on-rhel-centos-fedora/ diff --git a/translated/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md b/translated/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md new file mode 100644 index 0000000000..f432833a50 --- /dev/null +++ b/translated/tech/20160530 Install LEMP with MariaDB 10, PHP 7 and HTTP 2.0 Support for Nginx on Ubuntu 16.04.md @@ -0,0 +1,302 @@ +在 Ubuntu 16.04 为 Nginx 服务器安装 LEMP 环境(MariaDB, PHP 7 并且支持 HTTP 2.0) +===================== + +LEMP 是字首组合词,代表一组软件包(Linux OS,Nginx 网络服务器,MySQL\MariaDB 数据库和 PHP 服务端动态编程语言),它被用来搭建动态的网络应用和网页。 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-Nginx-with-FastCGI-on-Ubuntu-16.04.png) +>在 Ubuntu 16.04 安装 Nginx 以及 MariaDB,PHP7 并且支持 HTTP 2.0 + +这篇教程会教你怎么在 Ubuntu 16.04 的服务器上安装 LEMP (Nginx 和 MariaDB 以及 PHP7)。 + +准备 + +[安装 Ubuntu 16.04 服务器版本][1] + +### 步骤 1:安装 Nginx 服务器 + +#### 1. Nginx 是一个先进的、资源优化的网络服务器程序,用来向因特网上的访客展示网页。我们从 Nginx 服务器的安装开始介绍,使用 [apt 命令][2] 从 Ubuntu 的官方软件仓库中获取 Nginx 程序。 + +``` +$ sudo apt-get install nginx +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-Nginx-on-Ubuntu-16.04.png) +>在 Ubuntu 16.04 安装 Nginx + +#### 2. 然后输入 [netstat][3] 和 [systemctl][4] 命令,确认 Nginx 进程已经启动并且绑定在 80 端口。 + +``` +$ netstat -tlpn +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Network-Port-Connection.png) +>检查 Nginx 网络端口连接 + +``` +$ sudo systemctl status nginx.service +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Service-Status.png) +>检查 Nginx 服务状态 + +当你确认服务进程已经启动了,你可以打开一个浏览器,使用 HTTP 协议访问你的服务器 IP 地址或者域名,浏览 Nginx 的默认网页。 + +``` +http://IP-Address +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Verify-Nginx-Webpage.png) +>验证 Nginx 网页 + +### 步骤 2:启用 Nginx HTTP/2.0 协议 + +#### 3. HTTP/2.0 协议默认包含在 Ubuntu 16.04 最新发行版的 Nginx 二进制文件中,它只能通过 SSL 连接并且保证加载网页的速度有巨大提升。 + +要启用Nginx 的这个协议,首先找到 Nginx 提供的网站配置文件,输入下面这个命令备份配置文件。 + +``` +$ cd /etc/nginx/sites-available/ +$ sudo mv default default.backup +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Backup-Nginx-Sites-Configuration-File.png) +>备份 Nginx 的网站配置文件 + +#### 4. 然后,用文本编辑器新建一个默认文件,输入以下内容: + +``` +server { + listen 443 ssl http2 default_server; + listen [::]:443 ssl http2 default_server; + + root /var/www/html; + + index index.html index.htm index.php; + + server_name 192.168.1.13; + + location / { + try_files $uri $uri/ =404; + } + + ssl_certificate /etc/nginx/ssl/nginx.crt; + ssl_certificate_key /etc/nginx/ssl/nginx.key; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; + ssl_dhparam /etc/nginx/ssl/dhparam.pem; + ssl_session_cache shared:SSL:20m; + ssl_session_timeout 180m; + resolver 8.8.8.8 8.8.4.4; + add_header Strict-Transport-Security "max-age=31536000; + #includeSubDomains" always; + + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + } + + location ~ /\.ht { + deny all; + } + +} + +server { + listen 80; + listen [::]:80; + server_name 192.168.1.13; + return 301 https://$server_name$request_uri; +} +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Enable-Nginx-HTTP-2-Protocol.png) +>启用 Nginx HTTP 2 协议 + +上面的配置片段向所有的 SSL 监听指令中添加 http2 参数来启用 `HTTP/2.0`。 + +添加到服务器配置的最后一段,是用来将所有非 SSL 的流量重定向到 SSL/TLS 默认主机。然后用你主机的 IP 地址或者 DNS 记录(优先 FQDN)替换掉 `server_name` 选项。 (directive 的翻译是指令,但我觉得翻译成选项更好) + +#### 5. 当你按照以上步骤编辑完 Nginx 的默认配置文件之后,用下面这些命令来生成、查看 SSL 证书和密钥。 + +用你自定义的设置完成证书的制作,注意常用名设置成和你的 DNS FQDN 记录或者服务器 IP 地址相匹配,DNS 记录或者 IP 地址是用来访问网页的。 + + +``` +$ sudo mkdir /etc/nginx/ssl +$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt +$ ls /etc/nginx/ssl/ +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Generate-SSL-Certificate-and-Key.png) +>生成 Nginx 的 SSL 证书和密钥 + +#### 6. 通过输入以下命令使用一个强 DH 加密算法,在之前的配置文件 `ssl_dhparam` 这一行中进行修改。 + +``` +$ sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Create-Diffie-Hellman-Key.png) +>创建 Diffie-Hellman 密钥 + +#### 7. 当 `Diffie-Hellman` 密钥生成之后,验证 Nginx 的配置文件是否正确、能否被 Nginx 网络服务程序应用。然后运行以下命令重启守护进程来观察有什么变化。 + +``` +$ sudo nginx -t +$ sudo systemctl restart nginx.service +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-Nginx-Configuration.png) +>检查 Nginx 的配置 + +#### 8. 键入下面的命令来测试 Nginx 使用的是 HTTP/2.0 协议。看到协议中有 `h2` 的话,表明 Nginx 已经成功配置使用 HTTP/2.0 协议。所有最新的浏览器默认都能够支持这个协议。 + +``` +$ openssl s_client -connect localhost:443 -nextprotoneg '' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Test-Nginx-HTTP-2-Protocol.png) +>测试 Nginx HTTP 2.0 协议 + +### 第 3 步:安装 PHP 7 解释器 + +通过 FastCGI 进程管理程序的协助,Nginx 能够使用 PHP 动态语言解释器生成动态网络内容。FastCGI 能够从 Ubuntu 官方仓库中安装 php-fpm 二进制包来获取。 + +#### 9. 在你的服务器控制台里输入下面的命令来获取 PHP7.0 和扩展包,这能够让 PHP 与 Nginx 网络服务进程通信, + +``` +$ sudo apt install php7.0 php7.0-fpm +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-PHP-7-PHP-FPM-for-Ngin.png) +>安装 PHP 7 以及 PHP-FPM + +#### 10. 当 PHP7.0 解释器安装成功后,输入以下命令启动或者检查 php7.0-fpm 守护进程: + +``` +$ sudo systemctl start php7.0-fpm +$ sudo systemctl status php7.0-fpm +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Start-Verify-php-fpm-Service.png) +>开启、验证 php-fpm 服务 + +#### 11. 当前的 Nginx 配置文件已经配置了使用 PHP FPM 来提供动态内容。 + +下面给出的这部分服务器配置让 Nginx 能够使用 PHP 解释器,所以不需要对 Nginx 配置文件作别的修改。 + +``` +location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + } +``` + +下面是的截图是 Nginx 默认配置文件的内容。你可能需要对其中的代码进行修改或者取消注释。 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Enable-PHP-FastCGI-for-Nginx.png) +>启用 PHP FastCGI + +#### 12. 要测试启用了 PHP-FPM 的 Nginx 服务器,用下面的命令创建一个 PHP 测试配置文件 `info.php`。接着用 `http://IP_or domain/info.php` 这个网址来查看配置。 + +``` +$ sudo su -c 'echo "" |tee /var/www/html/info.php' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Create-PHP-Info-File.png) +>创建 PHP Info 文件 + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Verify-PHP-FastCGI-Info.png) +>检查 PHP FastCGI 的信息 + +检查服务器是否应用 HTTP/2.0 协议,定位到 PHP 变量区域中的 `$_SERVER[‘SERVER_PROTOCOL’]` 就像下面这张截图一样。(advertised by server 翻译不清楚,这里翻译成服务器应用了 HTTP/2.0 协议) + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-HTTP-2.0-Protocol-Info.png) +>检查 HTTP2.0 协议信息 + +#### 13. 为了安装其它的 PHP7.0 模块,使用 `apt search php7.0` 命令查找 php 的模块然后安装。 + +如果你想要 [安装 WordPress][5] 或者别的 CMS,需要安装以下的 PHP 模块,这些模块迟早有用。 + +``` +$ sudo apt install php7.0-mcrypt php7.0-mbstring +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-PHP-7-Modules.png) +>安装 PHP 7 模块 + +#### 14. 注册 PHP 额外的模块,输入下面的命令重启 PHP-FPM 守护进程。 + +``` +$ sudo systemctl restart php7.0-fpm.service +``` + +### 第 4 步:安装 MariaDB 数据库 + +#### 15. 最后,我们需要 MariaDB 数据库来存储、管理网站数据来完成搭建 LEMP + +运行下面的命令安装 MariaDB 数据库管理系统,重启 PHP-FPM 服务使用 MySQL 模块与数据库通信。 + +``` +$ sudo apt install mariadb-server mariadb-client php7.0-mysql +$ sudo systemctl restart php7.0-fpm.service +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Install-MariaDB-for-Nginx.png) +>安装 MariaDB + +#### 16. 为了保证 MariaDB 的安装,运行来自 Ubuntu 软件仓库中的二进制包提供的安全脚本,这会询问你设置一个根用户密码,移除匿名用户,禁用根用户远程登陆,移除测试数据库。 + +输入下面的命令运行脚本,并且确认所有的选择。参照下面的截图。 + +``` +$ sudo mysql_secure_installation +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Secure-MariaDB-Installation-for-Nginx.png) +>MariaDB 的安全安装 + + +#### 17. 配置 MariaDB 以便普通用户能够不使用 系统的 sudo 权限来访问数据库。用根用户权限打开 MySQL 命令行界面,运行下面的命令: + +``` +$ sudo mysql +MariaDB> use mysql; +MariaDB> update user set plugin=’‘ where User=’root’; +MariaDB> flush privileges; +MariaDB> exit +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/MariaDB-User-Permissions.png) +>MariaDB 的用户权限 + +最后登陆到 MariaDB 数据库,通过以下命令不使用 root 权限执行任意一个命令: + +``` +$ mysql -u root -p -e 'show databases' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Check-MariaDB-Databases.png) +>查看 MariaDB 数据库 + +好了!现在你拥有了配置在 **Ubuntu 16.04** 服务器上的 **LEMP** 环境,你能够部署能够与数据库交互的复杂动态网络应用。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-nginx-mariadb-php7-http2-on-ubuntu-16-04/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29 + +作者:[Matei Cezar ][a] +译者:[GitFuture](https://github.com/GitFuture) +校对:[校对者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/installation-of-ubuntu-16-04-server-edition/ +[2]: http://www.tecmint.com/apt-advanced-package-command-examples-in-ubuntu/ +[3]: http://www.tecmint.com/20-netstat-commands-for-linux-network-management/ +[4]: http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ +[5]: http://www.tecmint.com/install-wordpress-using-lamp-or-lemp-on-rhel-centos-fedora/ From c1984135e0fe5ba67cc39442f562b7d0c8aa0ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E5=AE=B6=E6=9C=AA?= Date: Tue, 5 Jul 2016 13:20:24 +0800 Subject: [PATCH 1703/1710] Translating by GitFuture --- sources/tech/20160620 Monitor Linux With Netdata.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160620 Monitor Linux With Netdata.md b/sources/tech/20160620 Monitor Linux With Netdata.md index 95156ef108..dfe6920639 100644 --- a/sources/tech/20160620 Monitor Linux With Netdata.md +++ b/sources/tech/20160620 Monitor Linux With Netdata.md @@ -1,3 +1,5 @@ +Translating by GitFuture + Monitor Linux With Netdata === From 5ee075fddd06778e15b0b87a3c3e69492f8cb489 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 5 Jul 2016 19:04:26 +0800 Subject: [PATCH 1704/1710] PUB:20160610 Getting started with ReactOS @name1e5s @PurlingNayuki --- .../20160610 Getting started with ReactOS.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) rename {translated/tech => published}/20160610 Getting started with ReactOS.md (92%) diff --git a/translated/tech/20160610 Getting started with ReactOS.md b/published/20160610 Getting started with ReactOS.md similarity index 92% rename from translated/tech/20160610 Getting started with ReactOS.md rename to published/20160610 Getting started with ReactOS.md index ffeeb9021f..8d04902798 100644 --- a/translated/tech/20160610 Getting started with ReactOS.md +++ b/published/20160610 Getting started with ReactOS.md @@ -1,9 +1,7 @@ ReactOS 新手指南 ==================================== - -ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windows NT 类似的图形界面,并且它的目标也是提供一个与 NT 功能和应用程序兼容性差不多的系统。这个项目在没有使用任何 Unix 的情况下实现了一个类似 Wine 的用户模式。它的开发者们从头实现了 NT 的架构以及对于 FAT32 的兼容,因此它也不需要负任何法律责任。这也就是说,它不是又双叒叕一个 Linux 发行版,而是一个独特的类 Windows 系统,并且是开源世界的一部分。这份快速指南是给那些想要一个易于使用的 Windows 的开源替代品的人准备的。 - +ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windows NT 类似的图形界面,并且它的目标也是提供一个与 NT 功能和应用程序兼容性差不多的系统。这个项目在没有使用任何 Unix 架构的情况下实现了一个类似 Wine 的用户模式。它的开发者们从头实现了 NT 的架构以及对于 FAT32 的兼容,因此它也不需要负任何法律责任。这也就是说,它不是又双叒叕一个 Linux 发行版,而是一个独特的类 Windows 系统,并且是开源世界的一部分。这份快速指南是给那些想要一个易于使用的 Windows 的开源替代品的人准备的。 ### 安装系统 @@ -31,7 +29,6 @@ ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windo 下一步是选择分区的格式,不过现在我们只能选择 FAT32。 - ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_6.png) 再下一步是选择安装文件夹。我就使用默认的“/ReactOS”了,应该没有问题。 @@ -96,7 +93,7 @@ ReactOS 是一个比较年轻的开源操作系统,它提供了一个和 Windo ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_20.png) -ReactOS 还有一个好啊,就是我们可以通过“我的电脑”来操作注册表。 +ReactOS 还有一个好的地方,就是我们可以通过“我的电脑”来操作注册表。 ![](https://www.howtoforge.com/images/getting-started-with-eeactos/pic_21.png) From c51449deb46e6a5b8aef7afde9da31ab95e6109d Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 5 Jul 2016 19:48:11 +0800 Subject: [PATCH 1705/1710] PUB:20160620 PowerPC gains an Android 4.4 port with Big Endian support @dongfengweixiao --- ...ndroid 4.4 port with Big Endian support.md | 106 ++++++++++++++++++ ...ndroid 4.4 port with Big Endian support.md | 103 ----------------- 2 files changed, 106 insertions(+), 103 deletions(-) create mode 100644 published/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md delete mode 100644 translated/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md diff --git a/published/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md b/published/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md new file mode 100644 index 0000000000..7ad127370b --- /dev/null +++ b/published/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md @@ -0,0 +1,106 @@ +Android 4.4 移植到了 PowerPC 架构,支持大端架构 +=========================================================== + +eInfochips(一家软件厂商) 已将将 Android 4.4 系统移植到 PowerPC 架构,它将用于一家航空电子客户用来监视引擎的健康状况的人机界面(HMI:Human Machine Interface)。 + +eInfochips 已经开发了第一个面向 PowerPC 架构的 CPU 的 Android 移植版本,并支持大端(Big Endian)架构。此移植基于 Android 开源项目 [Android Open Source Project (AOSP)] 中 Android 4.4 (KitKat) 的代码,其功能内核的版本号为 3.12.19。 + +Android 开始兴起的时候,PowerPC 正在快速丢失和 ARM 架构共同角逐的市场。高端的网络客户和其它的企业级的嵌入式工具大多运行在诸如飞思卡尔(Freescale)的 PowerQUICC 和 QorIQ 这样的 PowerPC 处理器上,但是并不是 Linux 系统。不过,有几个 Android 的移植计划。在 2009 年,飞思卡尔和 Embedded Alley(一家软件厂商,当前是 Mentor Graphics 的 Linux 团队的一部分)[宣布了针对 PowerQUICC 和 QorIQ 芯片的移植版本][15],当前由 NXP 公司构建。另一个名为 [Android-PowerPC][16] 的项目也作出了相似的工作。 + +这些努力来的都并不容易,然而,当航空公司找到 eInfochips,希望能够为他们那些基于 PowerPC 的引擎监控系统添加 Android 应用程序以改善人机界面。该公司找出了这些早期的移植版本,然而,它们都相距甚远。所以,他们不得不从头开始新的移植。 + +最主要的问题是这些移植的 Android 版本实在是太老了,和现在的 Android 差别太大了。Embedded Alley 移植的版本为 Android 1.5 (Cupcake),它于 2009 年发布,Linux 内核版本为 2.6.28。而 Android-PowerPC 项目最后一版的移植是 Android 2.2 (Froyo),它于 2010 年发布,内核版本为 2.6.32。此外,航空公司还有一些额外的技术诉求,例如对大端架构(Big Endian)的支持,这种老式的内存访问方式仍旧应用于网络通信和电信行业。然而那些早期的移植版本仅能够支持小端(Little Endian)的内存访问。 + +### 来自 eInfochips 的全新 PowerPC 架构移植 + +eInfochips, 它最为出名的应该是那些基于 ARM/骁龙处理器的模块计算机板卡,例如 [Eragon 600][17]。 它已经完成了基于 QorIQ 的 Android 4.4 系统移植,且发布了白皮书介绍了该项目。采用该项目的航空电子设备客户仍旧不愿透露名称,目前仍旧不清楚什么时候会公开此该移植版本。 + +![](http://files.linuxgizmos.com/einfochips_porting_android_on_powerpc.jpg) + +*图片来自 eInfochips 的博客日志* + +全新的 PowerPC Android 项目包括: + +- 基于 PowerPC [e5500][1] 仿生定制 +- 基于 Android KitKat 的大端支持 +- 使用 GCC 5.2 工具链开发 +- Android 4.4 框架的 PowerPC 支持 +- PowerPC e5500 的 Android 内核版本为 3.12.19 + +根据 eInfochips 的销售经理 Sooryanarayanan Balasubramanian 描述,该航空电子客户想要使用 Android 主要是因为熟悉的界面能够缩减培训的时间,并且让程序更新和增加新程序变得更加容易。他继续解释说:“这次成功的移植了 Android,使得今后的工作仅仅需要在应用层作出修修改改,而不再向以前一样需要在所有层面之间作相互的校验。”,“这是第一次在航空航天工业作出这些尝试,这需要在设计时尽量认真。” + +通过白皮书,可以知道将 Android 移植到 PowerPC 上需要对框架、核心库、开发工具链、运行时链接器、对象链接器和开源编译工具作出大量的修改。在字节码生成阶段,移植团队决定使用便携模式(portable mode)而不是快速解释模式(fast interpreter mode)。这是因为还没有 PowerPC 可用的快速解释模式,而使用开源的 [libffi][18] 的便携模式能够支持 PowerPC。 + +同时,团队还面临着在 Android 运行时 (ART) 环境和 Dalvik 虚拟机 (DVM) 环境之间的选择。他们发现,ART 环境下的便携模式还未经测试且缺乏良好的文档支持,所以最终选择了 DVM 环境下的便携模式。 + +白皮书中还提及了其它的一些在移植过程中遇到的困难,包括重新开发工具链,重写脚本以解决 AOSP 对编译器标志“非标准”使用的问题。最终完成的移植版本提供了 37 个服务,以及提供了无界面的 Android 部署,在前端使用用户空间的模拟 UI。 + + +### 目标硬件 + +感谢来自 [eInfochips 博客日志][2] 的图片(如下图所示),让我们能够确认此 PowerPC 的 Android 移植项目的硬件平台。这个板卡为 [X-ES Xpedite 6101][3],它是一个加固级 XMC/PrPMC 夹层模组。 + +![](http://hackerboards.com/files/xes_xpedite6101-sm.jpg) + +*X-ES Xpedite 6101 照片和框图* + +X-ES Xpedite 6101 板卡拥有一个可选的 NXP 公司基于 QorIQ T 系列通信处理器(T2081、T1042 和 T1022),它们分别集成了 8 个、4 个和 2 个 e6500 核心,稍有不同的是,T2081 的处理器主频为 1.8GHz,T1042/22 的处理器主频为 1.4GHz。所有的核心都集成了 AltiVec SIMD 引擎,这也就意味着它能够提供 DSP 级别的浮点运算性能。所有以上 3 款 X-ES 板卡都能够支持最高 8GB 的 DDR3-1600 ECC SDRAM 内存。外加 512MB NOR 和 32GB 的 NAND 闪存。 + +![](http://hackerboards.com/files/nxp_qoriq_t2081_block-sm.jpg) + +*NXP T2081 框图* + +板卡的 I/O 包括一个 x4 PCI Express Gen2 通道,以及双工的千兆级网卡、 RS232/422/485 串口和 SATA 3.0 接口。此外,它可选 3 款 QorIQ 处理器,Xpedite 6101 提供了三种 [X-ES 加固等级][19],分别是额定工作温度 0 ~ 55°C, -40 ~ 70°C, 或者是 -40 ~ 85°C,且包含 3 类冲击和抗振类别。 + +此外,我们已经介绍过的基于 X-ES QorIQ 的 XMC/PrPMC 板卡包括 [XPedite6401 和 XPedite6370][20],它们支持已有的板卡级 Linux 、风河的 VxWorks(一种实时操作系统) 和 Green Hills 的 Integrity(也是一种操作系统)。 + + +### 更多信息 + +eInfochips Android PowerPC 移植白皮书可以[在此][4]下载(需要先免费注册)。 + +### 相关资料 + +- [Commercial embedded Linux distro boosts virtualization][5] +- [Freescale unveils first ARM-based QorIQ SoCs][6] +- [High-end boards run Linux on 64-bit ARM QorIQ SoCs][7] +- [Free, Open Enea Linux taps Yocto Project and Linaro code][8] +- [LynuxWorks reverts to its LynxOS roots, changes name][9] +- [First quad- and octa-core QorIQ SoCs unveiled][10] +- [Free white paper shows how Linux won embedded][11] +- [Quad-core Snapdragon COM offers three dev kit options][12] +- [Tiny COM runs Linux on quad-core 64-bit Snapdragon 410][13] +- [PowerPC based IoT gateway COM ships with Linux BSP][14] + + +-------------------------------------------------------------------------------- + +via: http://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ + +作者:[Eric Brown][a] +译者:[dongfengweixiao](https://github.com/dongfengweixiao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ +[1]: http://linuxdevices.linuxgizmos.com/low-cost-powerquicc-chips-offer-flexible-interconnect-options/ +[2]: https://www.einfochips.com/blog/k2-categories/aerospace/presenting-a-case-for-porting-android-on-powerpc-architecture.html +[3]: http://www.xes-inc.com/products/processor-mezzanines/xpedite6101/ +[4]: http://biz.einfochips.com/portingandroidonpowerpc +[5]: http://hackerboards.com/commercial-embedded-linux-distro-boosts-virtualization/ +[6]: http://hackerboards.com/freescale-unveils-first-arm-based-qoriq-socs/ +[7]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ +[8]: http://hackerboards.com/free-open-enea-linux-taps-yocto-and-linaro-code/ +[9]: http://hackerboards.com/lynuxworks-reverts-to-its-lynxos-roots-changes-name/ +[10]: http://hackerboards.com/first-quad-and-octa-core-qoriq-socs-unveiled/ +[11]: http://hackerboards.com/free-white-paper-shows-how-linux-won-embedded/ +[12]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ +[13]: http://hackerboards.com/tiny-com-runs-linux-and-android-on-quad-core-64-bit-snapdragon-410/ +[14]: http://hackerboards.com/powerpc-based-iot-gateway-com-ships-with-linux-bsp/ +[15]: http://linuxdevices.linuxgizmos.com/android-ported-to-powerpc/ +[16]: http://www.androidppc.com/ +[17]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ +[18]: https://sourceware.org/libffi/ +[19]: http://www.xes-inc.com/capabilities/ruggedization/ +[20]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ diff --git a/translated/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md b/translated/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md deleted file mode 100644 index 3b450cb603..0000000000 --- a/translated/tech/20160620 PowerPC gains an Android 4.4 port with Big Endian support.md +++ /dev/null @@ -1,103 +0,0 @@ -PowerPC 获得大端 Android 4.4 系统的移植 -=========================================================== - -eInfochips(一家软件厂商) 已将将 Android 4.4 系统移植到 PowerPC 架构,它将作为一家航空电子客户的人机界面(HMI:Human Machine Interface)用来监视引擎的建康状况。 - -eInfochips 已经开发了第一个面向 PowerPC 架构的 CPU 的 Android 移植版本,它使用较新的大端 Android 系统。此移植基于 Android 开源项目[Android Open Source Project (AOSP)] 中 Android 4.4 (KitKat) 的代码,其功能内核的版本号为 3.12.19。 - -Android 开始兴起的时候,PowerPC正在快速失去和 ARM 架构共通角逐的市场。高端的网络客户和以市场为导向的嵌入式工具大多运行在诸如飞思卡尔(Freescale)的 PowerQUICC 和 QorIQ 上,而不取决于 Linux 系统。一些 Android 的移植计划最终失败,然而在 2009 年,飞思卡尔和 Embedded Alley(一家软件厂商,当前是 Mentor Graphics 的 Linux 团队的一部分)[宣布了针对 PowerQUICC 和 QorIQ 芯片的移植版本][15],当前由 NXP 公司构建。另一个名为[Android-PowerPC][16] 的项目也作出了相似的工作。 - -这些努力来的都并不容易,然而,当航空公司找到 eInfochips,希望能够为他们那些基于 PowerPC 的引擎监控系统添加 Android 应用程序以改善人机界面。此公司找出了这些早期的移植版本,然而,他们都很难达到标准。所以,他们不得不从头开始新的移植。 - -最主要的问题是这些移植的 Android 版本实在是太老了,且 very different。Embedded Alley 移植的版本为 Android 1.5 (Cupcake),它于 2009 年发布,Linux 内核版本为 2.6.28。最后一版的移植为 Android-PowerPC 项目的 Android 2.2 (Froyo)它于 2010 年发布,内核版本为 2.6.32。此外,航空公司还有一些额外的技术诉求,例如对大端的支持. 现有的存储器接入方案仍旧应用于网络通信和电信行业。然而那些早期的移植版本仅能够支持小端的存储器访问。 - -### 来自 eInfochips 的全新 PowerPC 架构移植 - -eInfochips, 它最为出名的应该是那些基于 ARM/骁龙处理器的模块计算机板卡,例如 [Eragon 600][17]。 它已经完成了基于 QorIQ 的 Android 4.4 系统移植,且发布了白皮书描述了此项目。采用该项目的航空电子设备客户仍旧不愿透露姓名,目前仍旧不清楚什么时候会公开此该移植版本。 - - -![](http://hackerboards.com/files/einfochips_porting_android_on_powerpc-sm.jpg) ->图片来自 eInfochips 的博客日志 - -- 全新的 PowerPC Android 项目包括: -- 基于 PowerPC [e5500][1] 深度定制(bionic 定制不知道什么鬼,校对的时候也可以想想怎么处理) -- 基于 Android KitKat 的大端序支持 -- 开发工具链为 Gcc 5.2 -- Android 4.4 框架的 PowerPC 支持 -- PowerPC e5500 的 Android 内核版本为 3.12.19 - -根据 eInfochips 的销售经理 Sooryanarayanan Balasubramanian 描述,航空电子客户想要使用 Android 主要是因为熟悉的界面能够缩减培训的时间,并且让程序更新和提供新的程序变得更加容易。他继续解释说:“这次成功的移植了 Android,使得今后的工作仅仅需要在应用层作出修修改改,而不再向以前一样需要在所有层之间作相互的校验。”“这是第一次在航空航天工业作出这些尝试,这需要在设计时作出尽职的调查。” - -通过白皮书,可以知道将 Android 移植到 PowerPC 上需要对框架,核心库,开发工具链,运行时链接器,对象链接器和开源编译工具作出大量的修改。在字节码生成阶段,移植团队决定使用便携模式而不是快速的解释模式。这是因为,还没有 PowerPC 可用的快速解释模式,而使用 [libffi][18] 的便携模式能够支持 PowerPC。 - -同时,团队还面临在 Android 运行时 (ART) 环境和 Dalvik 虚拟机 (DVM) 环境之间的选择。他们发现,ART 环境下的便携模式还未经测试且缺乏良好的文档支持,所以最终选择了 DVM 环境下的便携模式。 - -白皮书中还提及了其它的一些在移植过程中遇到的困难,包括重新开发工具链,重写脚本以解决 AOSP “非标准”的使用编译器标志的问题。最终,移植提供了 37 个服务,and features a headless Android deployment along with an emulated UI in user space. - - -### 目标硬件 - -感谢来自 [eInfochips 博客日志][2] 的图片(如下图所示),我们能够确认此 PowerPC 的 Android 移植项目的硬件平台。这个板卡为 [X-ES Xpedite 6101][3],它是固实的 XMC/PrPMC 夹层模组。 - -![](http://hackerboards.com/files/xes_xpedite6101-sm.jpg) ->X-ES Xpedite 6101 照片和框图 - -X-ES Xpedite 6101 板卡拥有可选择的 NXP 公司基于 QorIQ T系列通信处理器 T2081, T1042, 和 T1022,他们分别拥有 8 个,4 个和 2 个 e6500 核心,稍有不同的是,T2081 的处理器主频为 1.8GHz,T1042/22 的处理器主频为 1.4GHz。所有的核心都集成了 AltiVec SIMD 引擎,这也就意味着它能够提供 DSP 级别的浮点运算性能。所有以上 3 款 X-ES 板卡都能够支持最高 8GB 的 DDR3-1600 ECC SDRAM 内存。外加 512MB NOR 和 32GB 的 NAND 闪存。 - -![](http://hackerboards.com/files/nxp_qoriq_t2081_block-sm.jpg) ->NXP T2081 框图 - -板卡的 I/O 包括一个 x4 PCI Express Gen2 通到,along with dual helpings of Gigabit Ethernet, RS232/422/485 串口和 SATA 3.0 接口。此外,它可选 3 款 QorIQ 处理器,Xpedite 6101 提供了三种[X-ES 加固等级][19],分别是额定工作温度 0 ~ 55°C, -40 ~ 70°C, 或者是 -40 ~ 85°C,且包含 3 类冲击和抗振类别。 - -此外,我们已经介绍过的基于 X-ES QorIQ 的 XMC/PrPMC 板卡包括[XPedite6401 和 XPedite6370][20],它们支持已有的板卡级 Linux Linux,Wind River VxWorks(一种实时操作系统) 和 Green Hills Integrity(也是一种操作系统)。 - - -### 更多信息 - -eInfochips Android PowerPC 移植白皮书可以[在此[4]下载(需要先免费注册)。 - -### Related posts: - -- [Commercial embedded Linux distro boosts virtualization][5] -- [Freescale unveils first ARM-based QorIQ SoCs][6] -- [High-end boards run Linux on 64-bit ARM QorIQ SoCs][7] -- [Free, Open Enea Linux taps Yocto Project and Linaro code][8] -- [LynuxWorks reverts to its LynxOS roots, changes name][9] -- [First quad- and octa-core QorIQ SoCs unveiled][10] -- [Free white paper shows how Linux won embedded][11] -- [Quad-core Snapdragon COM offers three dev kit options][12] -- [Tiny COM runs Linux on quad-core 64-bit Snapdragon 410][13] -- [PowerPC based IoT gateway COM ships with Linux BSP][14] - - --------------------------------------------------------------------------------- - -via: http://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ - -作者:[Eric Brown][a] -译者:[dongfengweixiao](https://github.com/dongfengweixiao) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://hackerboards.com/powerpc-gains-android-4-4-port-with-big-endian-support/ -[1]: http://linuxdevices.linuxgizmos.com/low-cost-powerquicc-chips-offer-flexible-interconnect-options/ -[2]: https://www.einfochips.com/blog/k2-categories/aerospace/presenting-a-case-for-porting-android-on-powerpc-architecture.html -[3]: http://www.xes-inc.com/products/processor-mezzanines/xpedite6101/ -[4]: http://biz.einfochips.com/portingandroidonpowerpc -[5]: http://hackerboards.com/commercial-embedded-linux-distro-boosts-virtualization/ -[6]: http://hackerboards.com/freescale-unveils-first-arm-based-qoriq-socs/ -[7]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ -[8]: http://hackerboards.com/free-open-enea-linux-taps-yocto-and-linaro-code/ -[9]: http://hackerboards.com/lynuxworks-reverts-to-its-lynxos-roots-changes-name/ -[10]: http://hackerboards.com/first-quad-and-octa-core-qoriq-socs-unveiled/ -[11]: http://hackerboards.com/free-white-paper-shows-how-linux-won-embedded/ -[12]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ -[13]: http://hackerboards.com/tiny-com-runs-linux-and-android-on-quad-core-64-bit-snapdragon-410/ -[14]: http://hackerboards.com/powerpc-based-iot-gateway-com-ships-with-linux-bsp/ -[15]: http://linuxdevices.linuxgizmos.com/android-ported-to-powerpc/ -[16]: http://www.androidppc.com/ -[17]: http://hackerboards.com/quad-core-snapdragon-com-offers-three-dev-kit-options/ -[18]: https://sourceware.org/libffi/ -[19]: http://www.xes-inc.com/capabilities/ruggedization/ -[20]: http://hackerboards.com/high-end-boards-run-linux-on-64-bit-arm-qoriq-socs/ From 9ad8f6b22e8b087be9024c94f2e62e3b80f957a0 Mon Sep 17 00:00:00 2001 From: runningwater Date: Tue, 5 Jul 2016 21:59:33 +0800 Subject: [PATCH 1706/1710] =?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 --- ...ng is a File” and Types of Files in Linux.md | 123 +++++++++--------- 1 file changed, 62 insertions(+), 61 deletions(-) rename {sources => translated}/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md (52%) mode change 100644 => 100755 diff --git a/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md b/translated/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md old mode 100644 new mode 100755 similarity index 52% rename from sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md rename to translated/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md index e1c3ee4661..c9a1b243ff --- a/sources/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md +++ b/translated/talk/20160615 Explanation of “Everything is a File” and Types of Files in Linux.md @@ -1,54 +1,53 @@ -(翻译中 by runningwater) -Explanation of “Everything is a File” and Types of Files in Linux +诠释 Linux 中“一切都是文件”概念和相应的文件类型 ==================================================================== ![](http://www.tecmint.com/wp-content/uploads/2016/05/Everything-is-a-File-in-Linux.png) ->Everything is a File and Types of Files in Linux +>Linux 系统中一切都是文件并有相应的文件类型 -That is in fact true although it is just a generalization concept, in Unix and its derivatives such as Linux, everything is considered as a file. If something is not a file, then it must be running as a process on the system. +在 Unix 和它衍生的比如 Linux 系统中,一切都可以看做文件。虽然它仅仅只是一个泛泛的概念,但这是事实。如果有不是文件的,那它一定是正运行的进程。 -To understand this, take for example the amount of space on your root (/) directory is always consumed by different types of Linux files. When you create a file or transfer a file to your system, it occupies some space on the physical disk and it is considered to be in a specific format (file type). +要理解这点,可以举个例子,您的根目录(/) 的空间是由不同类型的 Linux 文件所占据的。当您创建一个文件或向系统传一个文件时,它在物理磁盘上占据的一些空间,可以认为是一个特定的格式(文件类型)。 -And also the Linux system does not differentiate between files and directories, but directories do one important job, that is store other files in groups in a hierarchy for easy location. All your hardware components are represented as files and the system communicates with them using these files. +虽然 Linux 系统中文件和目录没有什么不同,但目录还有一个重要的功能,那就是有结构性的分组存储其它文件,以方便查找访问。所有的硬件部件都表示为文件,系统使用这些文件来与硬件通信。 -The idea is an important description of a great property of Linux, where input/output resources such as your documents, directories (folders in Mac OS X and Windows), keyboard, monitor, hard-drives, removable media, printers, modems, virtual terminals and also inter-process and network communication are streams of bytes defined by file system space. +这些思想是对伟大的 Linux 财产的重要阐述,因此像文档、目录(Mac OS X 和 Windows 系统下是文件夹)、键盘、监视器、硬盘、可移动媒体设备、打印机、调制解调器、虚拟终端,还有进程间通信(IPC)和网络通信等输入/输出资源都在定义在文件系统空间下的字节流。 -A notable advantage of everything being a file is that the same set of Linux tools, utilities and APIs can be used on the above input/output resources. +一切都可看作是文件,其最显著的好处是对于上面所列出的输入/输出资源,只需要相同的一套 Linux 工具、实用程序和 API。 -Although everything in Linux is a file, there are certain special files that are more than just a file for example [sockets and named pipes][1]. +虽然在 Linux 中一切都可看作是文件,但也有一些特殊的文件,比如[套接字和命令管道][1]。 -### What are the different types of files in Linux? +### Linux 文件类型的不同之处? -In Linux there are basically three types of files: +Linux 系统中有三种基本的文件类型: -- Ordinary/Regular files -- Special files -- Directories +- 普通/常规文件 +- 特殊文件 +- 目录文件 -#### Ordinary/Regular Files +#### 普通/常规文件 -These are files data contain text, data or program instructions and they are the most common type of files you can expect to find on a Linux system and they include: +它们是包含文本、数据、程序指令等数据的文件,其在 Linux 系统中是最常见的一种。包括如下: -- Readable files -- Binary files -- Image files -- Compressed files and so on. +- 只读文件 +- 二进制文件 +- 图像文件 +- 压缩文件等等 -#### Special Files +#### 特殊文件 -Special files include the following: +特殊文件包括以下几种: -Block files : These are device files that provide buffered access to system hardware components. They provide a method of communication with device drivers through the file system. +块文件:设备文件,对访问系统硬件部件提供了缓存接口。他们提供了一种使用文件系统与设备驱动通信的方法。 -One important aspect about block files is that they can transfer a large block of data and information at a given time. +有关于块文件一个重要的性能就是它们能在指定时间内传输大块的数据和信息。 -Listing block files sockets in a directory: +列出某目录下的块文件: ``` # ls -l /dev | grep "^b" ``` -Sample Output +输出例子 ``` brw-rw---- 1 root disk 7, 0 May 18 10:26 loop0 @@ -74,15 +73,15 @@ brw-rw---- 1 root disk 1, 5 May 18 10:26 ram5 ... ``` -Character files : These are also device files that provide unbuffered serial access to system hardware components. They work by providing a way of communication with devices by transferring data one character at a time. +字符文件: 也是设备文件,对访问系统硬件组件提供了非缓冲串行接口。它们与设备的通信工作方式是一次只传输一个字符的数据。 -Listing character files sockets in a directory: +列出某目录下的字符文件: ``` # ls -l /dev | grep "^c" ``` -Sample Output +输出例子 ``` crw------- 1 root root 10, 235 May 18 15:54 autofs @@ -114,15 +113,15 @@ crw-rw-rw- 1 root tty 5, 2 May 18 17:40 ptmx crw-rw-rw- 1 root root 1, 8 May 18 10:26 random ``` -Symbolic link files : A symbolic link is a reference to another file on the system. Therefore, symbolic link files are files that point to other files, and they can either be directories or regular files. +符号链接文件 : 符号链接是指向系统上其他文件的引用。因此,符号链接文件是指向其它文件的文件,也可以是目录或常规文件。 -Listing symbolic link sockets in a directory: +列出某目录下的符号链接文件: ``` # ls -l /dev/ | grep "^l" ``` -Sample Output +输出例子 ``` lrwxrwxrwx 1 root root 3 May 18 10:26 cdrom -> sr0 @@ -135,27 +134,27 @@ lrwxrwxrwx 1 root root 15 May 18 15:54 stdin -> /proc/self/fd/0 lrwxrwxrwx 1 root root 15 May 18 15:54 stdout -> /proc/self/fd/1 ``` -You can make symbolic links using the `ln` utility in Linux as in the example below. +Linux 中使用 `ln` 工具就可以创建一个符号链接文件,如下所示: ``` # touch file1.txt -# ln -s file1.txt /home/tecmint/file1.txt [create symbolic link] -# ls -l /home/tecmint/ | grep "^l" [List symbolic links] +# ln -s file1.txt /home/tecmint/file1.txt [创建符号链接文件] +# ls -l /home/tecmint/ | grep "^l" [列出符号链接文件] ``` -In the above example, I created a file called `file1.txt` in `/tmp` directory, then created the symbolic link, `/home/tecmint/file1.txt` to point to `/tmp/file1.txt`. +在上面的例子中,首先我们在 `/tmp` 目录创建了一个名叫 `file1.txt` 的文件,然后创建符号链接文件,所以 `/home/tecmint/file1.txt` 指向 `/tmp/file1.txt` 文件。 -Pipes or Named pipes : These are files that allow inter-process communication by connecting the output of one process to the input of another. +套接字和命令管道 : 连接一个进行的输出和另一个进程的输入,允许进程间通信的文件。 -A named pipe is actually a file that is used by two process to communicate with each and it acts as a Linux pipe. +命名管道实际上是一个文件,用来使两个进程彼此通信,就像一个 Linux pipe(管道) 命令一样。 -Listing pipes sockets in a directory: +列出某目录下的管道文件: ``` # ls -l | grep "^p" ``` -Sample Output +输出例子 ``` prw-rw-r-- 1 tecmint tecmint 0 May 18 17:47 pipe1 @@ -165,62 +164,64 @@ prw-rw-r-- 1 tecmint tecmint 0 May 18 17:47 pipe4 prw-rw-r-- 1 tecmint tecmint 0 May 18 17:47 pipe5 ``` -You can use the mkfifo utility to create a named pipe in Linux as follows. +在 Linux 中可以使用 `mkfifo` 工具来创建一个命名管道,如下所示: ``` # mkfifo pipe1 # echo "This is named pipe1" > pipe1 ``` -In the above example, I created a named pipe called pipe1, then I passed some data to it using the [echo command][2], after that the shell became un-interactive while processing the input. +在上的例子中,我们创建了一个名叫 `pipe1` 的命名管道,然后使用 [echo 命令][2] 加入一些数据,在这操作后,要使用这些输入数据就要用非交互的 shell 了。 -Then I opened another shell and run the another command to print out what was passed to pipe. + + +然后,我们打开另外的 shell 终端,运行另外的命令来打印出刚加入管道的数据。 ``` # while read line ;do echo "This was passed-'$line' "; done Date: Wed, 6 Jul 2016 02:18:11 +0800 Subject: [PATCH 1707/1710] translated --- ... Compound Expressions with Awk in Linux.md | 81 ------------------- ... Compound Expressions with Awk in Linux.md | 79 ++++++++++++++++++ 2 files changed, 79 insertions(+), 81 deletions(-) delete mode 100644 sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md create mode 100644 translated/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md diff --git a/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md b/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md deleted file mode 100644 index db9a863484..0000000000 --- a/sources/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md +++ /dev/null @@ -1,81 +0,0 @@ -martin - -How to Use Compound Expressions with Awk in Linux -==================================================== - -![](http://www.tecmint.com/wp-content/uploads/2016/05/Use-Compound-Expressions-with-Awk.png) - -All along, we have been looking at simple expressions when checking whether a condition has been meet or not. What if you want to use more then one expression to check for a particular condition in? - -In this article, we shall take a look at the how you can combine multiple expressions referred to as compound expressions to check for a condition when filtering text or strings. - -In Awk, compound expressions are built using the `&&` referred to as `(and)` and the `||` referred to as `(or)` compound operators. - -The general syntax for compound expressions is: - -``` -( first_expression ) && ( second_expression ) -``` - -Here, `first_expression` and `second_expression` must be true to make the whole expression true. - -``` -( first_expression ) || ( second_expression) -``` - -Here, one of the expressions either `first_expression` or `second_expression` must be true for the whole expression to be true. - -**Caution**: Remember to always include the parenthesis. - -The expressions can be built using the comparison operators that we looked at in Part 4 of the awk series. - -Let us now get a clear understanding using an example below: - -In this example, a have a text file named `tecmint_deals.txt`, which contains a list of some amazing random Tecmint deals, it includes the name of the deal, the price and type. - -``` -TecMint Deal List -No Name Price Type -1 Mac_OS_X_Cleanup_Suite $9.99 Software -2 Basics_Notebook $14.99 Lifestyle -3 Tactical_Pen $25.99 Lifestyle -4 Scapple $19.00 Unknown -5 Nano_Tool_Pack $11.99 Unknown -6 Ditto_Bluetooth_Altering_Device $33.00 Tech -7 Nano_Prowler_Mini_Drone $36.99 Tech -``` - -Say that we want only print and flag deals that are above $20 and of type “Tech” using the (**) sign at the end of each line. - -We shall need to run the command below. - -``` -# awk '($3 ~ /^\$[2-9][0-9]*\.[0-9][0-9]$/) && ($4=="Tech") { printf "%s\t%s\n",$0,"*"; } ' tecmint_deals.txt - -6 Ditto_Bluetooth_Altering_Device $33.00 Tech * -7 Nano_Prowler_Mini_Drone $36.99 Tech * -``` - -In this example, we have used two expressions in a compound expression: - -- First expression, `($3 ~ /^\$[2-9][0-9]*\.[0-9][0-9]$/)` ; checks the for lines with deals with price above `$20`, and it is only true if the value of $3 which is the price matches the pattern `/^\$[2-9][0-9]*\.[0-9][0-9]$/` -- And the second expression, `($4 == “Tech”)` ; checks whether the deal is of type “`Tech`” and it is only true if the value of `$4` equals to “`Tech`”. -Remember, a line will only be flagged with the `(**)`, if first expression and second expression are true as states the principle of the `&&` operator. - -### Summary - -Some conditions always require building compound expressions for you to match exactly what you want. When you understand the use of comparison and compound expression operators then, filtering text or strings based on some difficult conditions will become easy. - -Hope you find this guide useful and for any questions or additions, always remember to leave a comment and your concern will be solved accordingly. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/combine-multiple-expressions-in-awk/ - -作者:[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/ diff --git a/translated/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md b/translated/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md new file mode 100644 index 0000000000..ed1ba4aa7c --- /dev/null +++ b/translated/tech/awk/Part 5 - How to Use Compound Expressions with Awk in Linux.md @@ -0,0 +1,79 @@ +如何使用 Awk 复合表达式 +==================================================== + +![](http://www.tecmint.com/wp-content/uploads/2016/05/Use-Compound-Expressions-with-Awk.png) + +一直以来在查对条件是否匹配时,我们寻求的都是简单的表达式。那如果你想用超过一个表达式,来查对特定的条件呢? + +本文,我们将看看如何在过滤文本和字符串时,结合多个表达式,即复合表达式,用以查对条件。 + +Awk 的复合表达式可由表示`与`的组合操作符 `&&` 和表示`或`的 `||` 构成。 + +复合表达式的常规写法如下: + +``` +( first_expression ) && ( second_expression ) +``` + +为了保证整个表达式的正确,在这里必须确保 `first_expression` 和 `second_expression` 是正确的。 + +``` +( first_expression ) || ( second_expression) +``` + +为了保证整个表达式的正确,在这里必须确保 `first_expression` 或 `second_expression` 是正确的。 + +**注意**:切记要加括号。 + +表达式可以由比较操作符构成,具体可查看 awk 系列的第四部分。 + +现在让我们通过一个例子来加深理解: + +此例中,有一个文本文件 `tecmint_deals.txt`,文本中包含着一张随机的 Tecmint 交易清单,其中包含了名称、价格和种类。 + +``` +TecMint Deal List +No Name Price Type +1 Mac_OS_X_Cleanup_Suite $9.99 Software +2 Basics_Notebook $14.99 Lifestyle +3 Tactical_Pen $25.99 Lifestyle +4 Scapple $19.00 Unknown +5 Nano_Tool_Pack $11.99 Unknown +6 Ditto_Bluetooth_Altering_Device $33.00 Tech +7 Nano_Prowler_Mini_Drone $36.99 Tech +``` + +我们只想打印出价格超过 $20 的物品,并在其中种类为 “Tech” 的物品的行末用 (**) 打上标记。 + +我们将要执行以下命令。 + +``` +# awk '($3 ~ /^\$[2-9][0-9]*\.[0-9][0-9]$/) && ($4=="Tech") { printf "%s\t%s\n",$0,"*"; } ' tecmint_deals.txt + +6 Ditto_Bluetooth_Altering_Device $33.00 Tech * +7 Nano_Prowler_Mini_Drone $36.99 Tech * +``` + +此例,在复合表达式中我们使用了两个表达式: + +- 表达式 1:`($3 ~ /^\$[2-9][0-9]*\.[0-9][0-9]$/)` ;查找交易价格超过 `$20` 的行,即只有当 `$3` 也就是价格满足 `/^\$[2-9][0-9]*\.[0-9][0-9]$/` 时值才为 true。 +- 表达式 2:`($4 == “Tech”)` ;查找是否有种类为 “`Tech`”的交易,即只有当 `$4` 等于 “`Tech`” 时值才为 true。 +切记,只有当 `&&` 操作符的两端状态,也就是两个表达式都是 true 的情况下,这一行才会被打上 `(**)` 标志。 + +### 总结 + +有些时候为了匹配你的真实想法,就不得不用到复合表达式。当你掌握了比较和复合表达式操作符的用法之后,在难的文本或字符串过滤条件也能轻松解决。 + +希望本向导对你有所帮助,如果你有任何问题或者补充,可以在下方发表评论,你的问题将会得到相应的解释。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/combine-multiple-expressions-in-awk/ + +作者:[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/ From 152232980f6b3ecf536dfe8d4e543d76920e9d59 Mon Sep 17 00:00:00 2001 From: runningwater Date: Wed, 6 Jul 2016 09:59:41 +0800 Subject: [PATCH 1708/1710] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160701 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md b/sources/tech/20160701 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md index c7a3e8a499..ad51164ed4 100644 --- a/sources/tech/20160701 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md +++ b/sources/tech/20160701 CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) CANONICAL CONSIDERING TO DROP 32 BIT SUPPORT IN UBUNTU ======================================================== @@ -29,7 +30,7 @@ I understand why they need to make this move from a security standpoint, but it via: https://itsfoss.com/ubuntu-32-bit-support-drop/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29 作者:[John Paul][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 06a314e359903d5b08a6b4aa9403f58c76fd2a71 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 6 Jul 2016 18:54:48 +0800 Subject: [PATCH 1709/1710] PUB:20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember @mr-ping --- ...hat Every Linux Newbies Should Remember.md | 141 ++++++++++++++++++ ...hat Every Linux Newbies Should Remember.md | 141 ------------------ 2 files changed, 141 insertions(+), 141 deletions(-) create mode 100644 published/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md delete mode 100644 translated/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md diff --git a/published/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md b/published/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md new file mode 100644 index 0000000000..50ec85acaa --- /dev/null +++ b/published/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md @@ -0,0 +1,141 @@ +Linux 新手必知必会的 10 条 Linux 基本命令 +===================================================================== + +![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/4225072_orig.png) + + +Linux 对我们的生活产生了巨大的冲击。至少你的安卓手机使用的就是 Linux 核心。尽管如此,在第一次开始使用 Linux 时你还是会感到难以下手。因为在 Linux 中,通常需要使用终端命令来取代 Windows 系统中的点击启动图标操作。但是不必担心,这里我们会介绍 10 个 Linux 基本命令来帮助你开启 Linux 神秘之旅。 + + +### 帮助新手走出第一步的 10 个 Linux 基本命令 + +当我们谈论 Linux 命令时,实质上是在谈论 Linux 系统本身。这短短的 10 个 Linux 基本命令不会让你变成天才或者 Linux 专家,但是能帮助你轻松开始 Linux 之旅。使用这些基本命令会帮助新手们完成 Linux 的日常任务,由于它们的使用频率如此至高,所以我更乐意称他们为 Linux 命令之王! + +让我们开始学习这 10 条 Linux 基本命令吧。 + + +#### 1. sudo + +这条命令的意思是“以超级用户的身份执行”,是 SuperUserDo 的简写,它是新手将要用到的最重要的一条 Linux 命令。当一条单行命令需要 root 权限的时候,`sudo`命令就派上用场了。你可以在每一条需要 root 权限的命令前都加上`sudo`。 + +``` +$ sudo su +``` + + +#### 2. ls (list) + + +跟其他人一样,你肯定也经常想看看目录下都有些什么东西。使用列表命令,终端会把当前工作目录下所有的文件以及文件夹展示给你。比如说,我当前处在 /home 文件夹中,我想看看 /home 文件夹中都有哪些文件和目录。 + +``` +/home$ ls +``` + + +在 /home 中执行`ls`命令将会返回类似下面的内容: + +``` +imad lost+found +``` + + +#### 3. cd + +变更目录命令(cd)是终端中总会被用到的主要命令。它是最常用到的 Linux 基本命令之一。此命令使用非常简单,当你打算从当前目录跳转至某个文件夹时,只需要将文件夹键入此命令之后即可。如果你想跳转至上层目录,只需要在此命令之后键入两个点 (..) 就可以了。 +​ +举个例子,我现在处在 /home 目录中,我想移动到 /home 目录中的 usr 文件夹下,可以通过以下命令来完成操作。 + +``` +/home $ cd usr + +/home/usr $ +``` + + +#### 4. mkdir + +只是可以切换目录还是不够完美。有时候你会想要新建一个文件夹或子文件夹。此时可以使用 mkdir 命令来完成操作。使用方法很简单,只需要把新的文件夹名跟在 mkdir 命令之后就好了。 + +``` +~$ mkdir folderName +``` + + +#### 5. cp + +拷贝-粘贴(copy-and-paste)是我们组织文件需要用到的重要命令。使用 `cp` 命令可以帮助你在终端当中完成拷贝-粘贴操作。首先确定你想要拷贝的文件,然后键入打算粘贴此文件的目标位置。 + +``` +$ cp src des +``` + +注意:如果目标目录对新建文件需要 root 权限时,你可以使用 `sudo` 命令来完成文件拷贝操作。 + + +#### 6. rm + +rm 命令可以帮助你移除文件甚至目录。如果不希望每删除一个文件都提示确认一次,可以用`-f`参数来强制执行。也可以使用 `-r` 参数来递归的移除文件夹。 + +``` +$ rm myfile.txt +``` + + +#### 7. apt-get + +这个命令会依据发行版的不同而有所区别。在基于 Debian 的发行版中,我们拥有 Advanced Packaging Tool(APT)包管理工具来安装、移除和升级包。apt-get 命令会帮助你安装需要在 Linux 系统中运行的软件。它是一个功能强大的命令行,可以用来帮助你对软件执行安装、升级和移除操作。 + +在其他发行版中,例如 Fedora、Centos,都各自不同的包管理工具。Fedora 之前使用的是 yum,不过现在 dnf 成了它默认的包管理工具。 + +``` +$ sudo apt-get update + +$ sudo dnf update +``` + + +#### 8. grep + +当你需要查找一个文件,但是又忘记了它具体的位置和路径时,`grep` 命令会帮助你解决这个难题。你可以提供文件的关键字,使用`grep`命令来查找到它。 + +``` +$ grep user /etc/passwd +``` + + +#### 9. cat + +作为一个用户,你应该会经常需要浏览脚本内的文本或者代码。`cat`命令是 Linux 系统的基本命令之一,它的用途就是将文件的内容展示给你。 + +``` +$ cat CMakeLists.txt +``` + + +#### 10. poweroff + +最后一个命令是 `poweroff`。有时你需要直接在终端中执行关机操作。此命令可以完成这个任务。由于关机操作需要 root 权限,所以别忘了在此命令之前添加`sudo`。 + +``` +$ sudo poweroff +``` + + +### 总结 + +如我在文章开始所言,这 10 条命令并不会让你立即成为一个 Linux 大拿,但它们会让你在初期快速上手 Linux。以这些命令为基础,给自己设置一个目标,每天学习一到三条命令,这就是此文的目的所在。在下方评论区分享有趣并且有用的命令。别忘了跟你的朋友分享此文。 + + +-------------------------------------------------------------------------------- + +via: http://www.linuxandubuntu.com/home/10-basic-linux-commands-that-every-linux-newbies-should-remember + +作者:[Commenti][a] +译者:[mr-ping](https://github.com/mr-ping) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.linuxandubuntu.com/home/10-basic-linux-commands-that-every-linux-newbies-should-remember#comments +[1]: http://linuxandubuntu.com/home/category/linux diff --git a/translated/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md b/translated/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md deleted file mode 100644 index c69b7a6e54..0000000000 --- a/translated/tech/20160616 10 Basic Linux Commands That Every Linux Newbies Should Remember.md +++ /dev/null @@ -1,141 +0,0 @@ -Linux新手必知必会的10条Linux基本命令 -===================================================================== - -![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/4225072_orig.png) - - -[Linux][1]对我们的生活产生了巨大的冲击。至少你的安卓手机使用的就是Linux核心。尽管如此,在第一次开始使用Linux时你还是会感到难以下手。因为在Linux中,通常需要使用终端命令来取代Windows系统中的点击启动图标操作。但是不必担心,这里我们会介绍10个Linux基本命令来帮助你开启Linux神秘之旅。 - - -### 帮助新手走出第一步的10个Linux基本命令 - -当我们谈论Linux命令时,实质上是在谈论Linux系统本身。这短短的10个Linux基本命令不会让你变成天才或者Linux专家,但是能帮助你轻松开始Linux之旅。使用这些基本命令会帮助新手们完成Linux的日常任务,由于它们的使用频率如此至高,所以我更乐意称他们为Linux命令之王! - -让我们开始学习这10条Linux基本命令吧。 - - -#### 1. sudo - -这条命令的意思是“以超级用户的身份执行”,是 SuperUserDo 的简写,它是新手将要用到的最重要的一条Linux命令。当一条单行命令需要root权限的时候,`sudo`命令就派上用场了。你可以在每一条需要root权限的命令前都加上`sudo`。 - -``` -$ sudo su -``` - - -#### 2. ls (list) - - -跟其他人一样,你肯定也经常想看看目录下都有些什么东西。使用列表命令,终端会把当前工作目录下所有的文件以及文件夹展示给你。比如说,我当前处在 /home 文件夹中,我想看看 /home文件夹中都有哪些文件和目录。 - -``` -/home$ ls -``` - - -在/home中执行`ls`命令将会返回以下内容 - -``` -imad lost+found -``` - - -#### 3. cd - -变更目录命令(cd)是终端中总会被用到的主要命令。他是最常用到的Linux基本命令之一。此命令使用非常简单,当你打算从当前目录跳转至某个文件夹时,只需要将文件夹键入此命令之后即可。如果你想跳转至上层目录,只需要在此命令之后键入两个点(..)就可以了。 -​ -举个例子,我现在处在/home目录中,我想移动到/home目录中的usr文件夹下,可以通过以下命令来完成操作。 - -``` -/home $ cd usr - -/home/usr $ -``` - - -#### 4. mkdir - -只是可以切换目录还是不够完美。有时候你会想要新建一个文件夹或子文件夹。此时可以使用mkdir命令来完成操作。使用方法很简单,只需要把新的文件夹名跟在mkdir命令之后就好了。 - -``` -~$ mkdir folderName -``` - - -#### 5. cp - -拷贝-粘贴(copy-and-paste)是我们组织文件需要用到的重要命令。使用 `cp` 命令可以帮助你在终端当中完成拷贝-粘贴操作。首先确定你想要拷贝的文件,然后键入打算粘贴此文件的目标位置。 - -``` -$ cp src des -``` - -注意:如果目标目录对新建文件需要root权限时,你可以使用`sudo`命令来完成文件拷贝操作。 - - -#### 6. rm - -rm命令可以帮助你移除文件甚至目录。如果文件需要root权限才能移除,可以用`-f`参数来强制执行。也可以使用`-r`参数来递归的移除文件夹。 - -``` -$ rm myfile.txt -``` - - -#### 7. apt-get - -这个命令会依据发行版的不同而有所区别。在基于Debian的发行版中,我们拥有Advanced Packaging Tool(APT)包管理工具来安装、移除和升级包。apt-get命令会帮助你安装需要在Linux系统中运行的软件。它是一个功能强大的命令行,可以用来帮助你对软件执行安装、升级和移除操作。 - -在其他发行版中,例如Fedora、Centos,都各自不同的包管理工具。Fedora之前使用的是yum,不过现在dnf成了它默认的包管理工具。 - -``` -$ sudo apt-get update - -$ sudo dnf update -``` - - -#### 8. grep - -当你需要查找一个文件,但是又忘记了它具体的位置和路径时,`grep`命令会帮助你解决这个难题。你可以提供文件的关键字,使用`grep`命令来查找到它。 - -``` -$ grep user /etc/passwd -``` - - -#### 9. cat - -作为一个用户,你应该会经常需要浏览脚本内的文本或者代码。`cat`命令是Linux系统的基本命令之一,它的用途就是将文件的内容展示给你。 - -``` -$ cat CMakeLists.txt -``` - - -#### 10. poweroff - -最后一个命令是 `poweroff`。有时你需要直接在终端中执行关机操作。此命令可以完成这个任务。由于关机操作需要root权限,所以别忘了在此命令之前添加`sudo`。 - -``` -$ sudo poweroff -``` - - -### 总结 - -如我在文章开始所言,这10条命令并不会让你立即成为一个Linux大拿。它们会让你在初期快速上手Linux。以这些命令为基础,给自己设置一个目标,每天学习一到三条命令,这就是此文的目的所在。在下方评论区分享有趣并且有用的命令。别忘了跟你的朋友分享此文。 - - --------------------------------------------------------------------------------- - -via: http://www.linuxandubuntu.com/home/10-basic-linux-commands-that-every-linux-newbies-should-remember - -作者:[Commenti][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://www.linuxandubuntu.com/home/10-basic-linux-commands-that-every-linux-newbies-should-remember#comments -[1]: http://linuxandubuntu.com/home/category/linux From 9095deb4f7fdbc910100e8ccdae643ca21c5a63e Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 7 Jul 2016 10:00:13 +0800 Subject: [PATCH 1710/1710] PUB:20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7 @HaohongWANG --- ... Web server on Ubuntu 15.04 or CentOS 7.md | 213 ++++++++++++++++++ ... Web server on Ubuntu 15.04 or CentOS 7.md | 210 ----------------- 2 files changed, 213 insertions(+), 210 deletions(-) create mode 100644 published/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md delete mode 100644 translated/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md diff --git a/published/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md b/published/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md new file mode 100644 index 0000000000..3db9318138 --- /dev/null +++ b/published/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md @@ -0,0 +1,213 @@ +如何在 Ubuntu 15.04/CentOS 7 中安装 Lighttpd Web 服务器 +================================================================================= + +Lighttpd 是一款开源 Web 服务器软件。Lighttpd 安全快速,符合行业标准,适配性强并且针对高配置环境进行了优化。相对于其它的 Web 服务器而言,Lighttpd 占用内存更少;因其对 CPU 占用小和对处理速度的优化而在效率和速度方面从众多 Web 服务器中脱颖而出。而 Lighttpd 诸如 FastCGI、CGI、认证、输出压缩、URL 重写等高级功能更是那些面临性能压力的服务器的福音。 + +以下便是我们在运行 Ubuntu 15.04 或 CentOS 7 Linux 发行版的机器上安装 Lighttpd Web 服务器的简要流程。 + +### 安装Lighttpd + +#### 使用包管理器安装 + +这里我们通过使用包管理器这种最简单的方法来安装 Lighttpd。只需以 sudo 模式在终端或控制台中输入下面的指令即可。 + +**CentOS 7** + +由于 CentOS 7.0 官方仓库中并没有提供 Lighttpd,所以我们需要在系统中安装额外的软件源 epel 仓库。使用下面的 yum 指令来安装 epel。 + + # yum install epel-release + +然后,我们需要更新系统及为 Lighttpd 的安装做前置准备。 + + # yum update + # yum install lighttpd + +![Install Lighttpd Centos](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-centos.png) + +**Ubuntu 15.04** + +Ubuntu 15.04 官方仓库中包含了 Lighttpd,所以只需更新本地仓库索引并使用 apt-get 指令即可安装 Lighttpd。 + + # apt-get update + # apt-get install lighttpd + +![Install lighttpd ubuntu](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-ubuntu.png) + +#### 从源代码安装 Lighttpd + +如果想从 Lighttpd 源码安装最新版本(例如 1.4.39),我们需要在本地编译源码并进行安装。首先我们要安装编译源码所需的依赖包。 + + # cd /tmp/ + # wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.39.tar.gz + +下载完成后,执行下面的指令解压缩。 + + # tar -zxvf lighttpd-1.4.39.tar.gz + +然后使用下面的指令进行编译。 + + # cd lighttpd-1.4.39 + # ./configure + # make + +**注:**在这份教程中,我们安装的是默认配置的 Lighttpd。其他拓展功能,如对 SSL 的支持,mod_rewrite,mod_redirect 等,需自行配置。 + +当编译完成后,我们就可以把它安装到系统中了。 + + # make install + +### 设置 Lighttpd + +如果有更高的需求,我们可以通过修改默认设置文件,如`/etc/lighttpd/lighttpd.conf`,来对 Lighttpd 进行进一步设置。 而在这份教程中我们将使用默认设置,不对设置文件进行修改。如果你曾做过修改并想检查设置文件是否出错,可以执行下面的指令。 + + # lighttpd -t -f /etc/lighttpd/lighttpd.conf + +#### 使用 CentOS 7 + +在 CentOS 7 中,我们需创建一个在 Lighttpd 默认配置文件中设置的 webroot 文件夹,例如`/src/www/htdocs`。 + + # mkdir -p /srv/www/htdocs/ + +而后将默认欢迎页面从`/var/www/lighttpd`复制至刚刚新建的目录中: + + # cp -r /var/www/lighttpd/* /srv/www/htdocs/ + +### 开启服务 + +现在,通过执行 systemctl 指令来重启 Web 服务。 + + # systemctl start lighttpd + +然后我们将它设置为伴随系统启动自动运行。 + + # systemctl enable lighttpd + +### 设置防火墙 + +如要让我们运行在 Lighttpd 上的网页或网站能在 Internet 或同一个网络内被访问,我们需要在防火墙程序中设置打开 80 端口。由于 CentOS 7 和 Ubuntu15.04 都附带 Systemd 作为默认初始化系统,所以我们默认用的都是 firewalld。如果要打开 80 端口或 http 服务,我们只需执行下面的命令: + + # firewall-cmd --permanent --add-service=http + success + # firewall-cmd --reload + success + +### 连接至 Web 服务器 + +在将 80 端口设置为默认端口后,我们就可以直接访问 Lighttpd 的默认欢迎页了。我们需要根据运行 Lighttpd 的设备来设置浏览器的 IP 地址和域名。在本教程中,我们令浏览器访问 [http://lighttpd.linoxide.com/](http://lighttpd.linoxide.com/) ,同时将该子域名指向上述 IP 地址。如此一来,我们就可以在浏览器中看到如下的欢迎页面了。 + +![Lighttpd Welcome Page](http://blog.linoxide.com/wp-content/uploads/2016/02/lighttpd-welcome-page.png) + +此外,我们可以将网站的文件添加到 webroot 目录下,并删除 Lighttpd 的默认索引文件,使我们的静态网站可以在互联网上访问。 + +如果想在 Lighttpd Web 服务器中运行 PHP 应用,请参考下面的步骤: + +### 安装 PHP5 模块 + +在 Lighttpd 成功安装后,我们需要安装 PHP 及相关模块,以在 Lighttpd 中运行 PHP5 脚本。 + +#### 使用 Ubuntu 15.04 + + # apt-get install php5 php5-cgi php5-fpm php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-mcrypt php5-memcache php-pear + +#### 使用 CentOS 7 + + # yum install php php-cgi php-fpm php-mysql php-curl php-gd php-intl php-pecl-imagick php-mcrypt php-memcache php-pear lighttpd-fastcgi + +### 设置 Lighttpd 的 PHP 服务 + +如要让 PHP 与 Lighttpd 协同工作,我们只要根据所使用的发行版执行如下对应的指令即可。 + +#### 使用 CentOS 7 + +首先要做的便是使用文件编辑器编辑 php 设置文件(例如`/etc/php.ini`)并取消掉对**cgi.fix_pathinfo=1**这一行的注释。 + + # nano /etc/php.ini + +完成上面的步骤之后,我们需要把 PHP-FPM 进程的所有权从 Apache 转移至 Lighttpd。要完成这些,首先用文件编辑器打开`/etc/php-fpm.d/www.conf`文件。 + + # nano /etc/php-fpm.d/www.conf + +然后在文件中增加下面的语句: + + user = lighttpd + group = lighttpd + +做完这些,我们保存并退出文本编辑器。然后从`/etc/lighttpd/modules.conf`设置文件中添加 FastCGI 模块。 + + # nano /etc/lighttpd/modules.conf + +然后,去掉下面语句前面的`#`来取消对它的注释。 + + include "conf.d/fastcgi.conf" + +最后我们还需在文本编辑器设置 FastCGI 的设置文件。 + + # nano /etc/lighttpd/conf.d/fastcgi.conf + +在文件尾部添加以下代码: + + fastcgi.server += ( ".php" => + (( + "host" => "127.0.0.1", + "port" => "9000", + "broken-scriptfilename" => "enable" + )) + ) + +在编辑完成后保存并退出文本编辑器即可。 + +#### 使用 Ubuntu 15.04 + +如需启用 Lighttpd 的 FastCGI,只需执行下列代码: + + # lighttpd-enable-mod fastcgi + + Enabling fastcgi: ok + Run /etc/init.d/lighttpd force-reload to enable changes + + # lighttpd-enable-mod fastcgi-php + + Enabling fastcgi-php: ok + Run `/etc/init.d/lighttpd` force-reload to enable changes + +然后,执行下列命令来重启 Lighttpd。 + + # systemctl force-reload lighttpd + +### 检测 PHP 工作状态 + +如需检测 PHP 是否按预期工作,我们需在 Lighttpd 的 webroot 目录下新建一个 php 文件。本教程中,在 Ubuntu 下 /var/www/html 目录,CentOS 下 /src/www/htdocs 目录下使用文本编辑器创建并打开 info.php。 + +**使用 CentOS 7** + + # nano /var/www/info.php + +**使用 Ubuntu 15.04** + + # nano /srv/www/htdocs/info.php + +然后只需将下面的语句添加到文件里即可。 + + + +在编辑完成后保存并推出文本编辑器即可。 + +现在,我们需根据路径 [http://lighttpd.linoxide.com/info.php](http://lighttpd.linoxide.com/info.php) 下的 info.php 文件的 IP 地址或域名,来让我们的网页浏览器指向系统上运行的 Lighttpd。如果一切都按照以上说明进行,我们将看到如下图所示的 PHP 页面信息。 + +![phpinfo lighttpd](http://blog.linoxide.com/wp-content/uploads/2016/02/phpinfo-lighttpd.png) + +### 总结 + +至此,我们已经在 CentOS 7 和 Ubuntu 15.04 Linux 发行版上成功安装了轻巧快捷并且安全的 Lighttpd Web 服务器。现在,我们已经可以上传网站文件到网站根目录、配置虚拟主机、启用 SSL、连接数据库,在我们的 Lighttpd Web 服务器上运行 Web 应用等功能了。 如果你有任何疑问,建议或反馈请在下面的评论区中写下来以让我们更好的改良 Lighttpd。谢谢! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-lighttpd-web-server-ubuntu-15-04-centos-7/ + +作者:[Arun Pyasi][a] +译者:[HaohongWANG](https://github.com/HaohongWANG) +校对:[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/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md b/translated/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md deleted file mode 100644 index 8840e8b973..0000000000 --- a/translated/tech/20160219 How to Setup Lighttpd Web server on Ubuntu 15.04 or CentOS 7.md +++ /dev/null @@ -1,210 +0,0 @@ -[Translated] Haohong Wang -如何在Ubuntu 15.04/CentOS 7中安装Lighttpd Web server -================================================================================= -Lighttpd 是一款开源Web服务器软件。Lighttpd 安全快速,符合行业标准,适配性强并且针对高配置环境进行了优化。Lighttpd因其CPU、内存占用小,针对小型CPU加载的快速适配以及出色的效率和速度而从众多Web服务器中脱颖而出。 而Lighttpd诸如FastCGI,CGI,Auth,Out-Compression,URL-Rewriting等高级功能更是那些低配置的服务器的福音。 - -以下便是在我们运行Ubuntu 15.04 或CentOS 7 Linux发行版的机器上安装Lighttpd Web服务器的简要流程。 - -### 安装Lighttpd - -#### 使用包管理器安装 - -这里我们通过使用包管理器这种最简单的方法来安装Lighttpd。只需以sudo模式在终端或控制台中输入下面的指令即可。 - -**CentOS 7** - -由于CentOS 7.0官方repo中并没有提供Lighttpd,所以我们需要在系统中安装额外的软件源epel repo。使用下面的yum指令来安装epel。 - - # yum install epel-release - -然后,我们需要更新系统及进程为Lighttpd的安装做准备。 - - # yum update - # yum install lighttpd - -![Install Lighttpd Centos](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-centos.png) - -**Ubuntu 15.04** - -Ubuntu 15.04官方repo中包含了Lighttpd,所以只需更新本地repo并使用apt-get指令即可安装Lighttpd。 - - # apt-get update - # apt-get install lighttpd - -![Install lighttpd ubuntu](http://blog.linoxide.com/wp-content/uploads/2016/02/install-lighttpd-ubuntu.png) - -#### 从源代码安装Lighttpd - -如果想从Lighttpd源码安装最新版本(例如1.4.39),我们需要在本地编译源码并进行安装。首先我们要安装编译源码所需的依赖包。 - - # cd /tmp/ - # wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.39.tar.gz - -下载完成后,执行下面的指令解压缩。 - - # tar -zxvf lighttpd-1.4.39.tar.gz - -然后使用下面的指令进行编译。 - - # cd lighttpd-1.4.39 - # ./configure - # make - -**注:**在这份教程中,我们安装的是默认配置的Lighttpd。其他诸如高级功能或拓展功能,如对SSL的支持,mod_rewrite,mod_redirect等,需自行配置。 - -当编译完成后,我们就可以把它安装到系统中了。 - - # make install - -### 设置Lighttpd - -如果有更高的需求,我们可以通过修改默认设置文件,如`/etc/lighttpd/lighttpd.conf`,来对Lighttpd进行进一步设置。 而在这份教程中我们将使用默认设置,不对设置文件进行修改。如果你曾做过修改并想检查设置文件是否出错,可以执行下面的指令。 - - # lighttpd -t -f /etc/lighttpd/lighttpd.conf - -#### 使用 CentOS 7 - -在CentOS 7中,我们需在Lighttpd默认设置中创设一个例如`/src/www/htdocs`的webroot文件夹。 - - # mkdir -p /srv/www/htdocs/ - -而后将默认欢迎页面从`/var/www/lighttpd`复制至刚刚新建的目录中: - - # cp -r /var/www/lighttpd/* /srv/www/htdocs/ - -### 开启服务 - -现在,通过执行systemctl指令来重启数据库服务。 - - # systemctl start lighttpd - -然后我们将它设置为伴随系统启动自动运行。 - - # systemctl enable lighttpd - -### 设置防火墙 - -如要让我们运行在Lighttpd上的网页和网站能在Internet或相似的网络上被访问,我们需要在防火墙程序中设置打开80端口。由于CentOS 7和Ubuntu15.04都附带Systemd作为默认初始化系统,所以我们安装firewalld作为解决方案。如果要打开80端口或http服务,我们只需执行下面的命令: - - # firewall-cmd --permanent --add-service=http - success - # firewall-cmd --reload - success - -### 连接至Web Server -在将80端口设置为默认端口后,我们就可以默认直接访问Lighttpd的欢迎页了。我们需要根据运行Lighttpd的设备来设置浏览器的IP地址和域名。在本教程中,我们令浏览器指向 [http://lighttpd.linoxide.com/](http://lighttpd.linoxide.com/) 同时将子域名指向它的IP地址。如此一来,我们就可以在浏览器中看到如下的欢迎页面了。 - -![Lighttpd Welcome Page](http://blog.linoxide.com/wp-content/uploads/2016/02/lighttpd-welcome-page.png) - -此外,我们可以将网站的文件添加到webroot目录下,并删除lighttpd的默认索引文件,使我们的静态网站链接至互联网上。 - -如果想在Lighttpd Web Server中运行PHP应用,请参考下面的步骤: - -### 安装PHP5模块 -在Lighttpd成功安装后,我们需要安装PHP及相关模块以在Lighttpd中运行PHP5脚本。 - -#### 使用 Ubuntu 15.04 - - # apt-get install php5 php5-cgi php5-fpm php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-mcrypt php5-memcache php-pear - -#### 使用 CentOS 7 - - # yum install php php-cgi php-fpm php-mysql php-curl php-gd php-intl php-pecl-imagick php-mcrypt php-memcache php-pear lighttpd-fastcgi - -### 设置Lighttpd的PHP服务 - -如要让PHP与Lighttpd协同工作,我们只要根据所使用的发行版执行如下对应的指令即可。 - -#### 使用 CentOS 7 - -首先要做的便是使用文件编辑器编辑php设置文件(例如`/etc/php.ini`)并取消掉对**cgi.fix_pathinfo=1**的注释。 - - # nano /etc/php.ini - -完成上面的步骤之后,我们需要把PHP-FPM进程的所有权从Apache转移至Lighttpd。要完成这些,首先用文件编辑器打开`/etc/php-fpm.d/www.conf`文件。 - - # nano /etc/php-fpm.d/www.conf - -然后在文件中增加下面的语句: - - user = lighttpd - group = lighttpd - -做完这些,我们保存并退出文本编辑器。然后从`/etc/lighttpd/modules.conf`设置文件中添加FastCGI模块。 - - # nano /etc/lighttpd/modules.conf - -然后,去掉下面语句前面的`#`来取消对它的注释。 - - include "conf.d/fastcgi.conf" - -最后我们还需在文本编辑器设置FastCGI的设置文件。 - - # nano /etc/lighttpd/conf.d/fastcgi.conf - -在文件尾部添加以下代码: - - fastcgi.server += ( ".php" => - (( - "host" => "127.0.0.1", - "port" => "9000", - "broken-scriptfilename" => "enable" - )) - ) - -在编辑完成后保存并退出文本编辑器即可。 - -#### 使用 Ubuntu 15.04 - -如需启用Lighttpd的FastCGI,只需执行下列代码: - - # lighttpd-enable-mod fastcgi - - Enabling fastcgi: ok - Run /etc/init.d/lighttpd force-reload to enable changes - - # lighttpd-enable-mod fastcgi-php - - Enabling fastcgi-php: ok - Run `/etc/init.d/lighttpd` force-reload to enable changes - -然后,执行下列命令来重启Lighttpd。 - - # systemctl force-reload lighttpd - -### 检测PHP工作状态 - -如需检测PHP是否按预期工作,我们需在Lighttpd的webroot目录下新建一个php文件。本教程中,在Ubuntu下/var/www/html 目录,CentOS下/src/www/htdocs目录下使用文本编辑器创建并打开info.php。 - -**使用 CentOS 7** - - # nano /var/www/info.php - -**使用 Ubuntu 15.04** - - # nano /srv/www/htdocs/info.php - -然后只需将下面的语句添加到文件里即可。 - - - -在编辑完成后保存并推出文本编辑器即可。 - -现在,我们需根据路径 [http://lighttpd.linoxide.com/info.php](http://lighttpd.linoxide.com/info.php) 下的info.php文件的IP地址或域名,来让我们的网页浏览器指向系统上运行的Lighttpd。如果一切都按照以上说明进行,我们将看到如下图所示的PHP页面信息。 - -![phpinfo lighttpd](http://blog.linoxide.com/wp-content/uploads/2016/02/phpinfo-lighttpd.png) - -### 总结 - -至此,我们已经在CentOS 7和Ubuntu 15.04 Linux 发行版上成功安装了轻巧快捷并且安全的Lighttpd Web服务器。现在,我们已经可以利用Lighttpd Web服务器来实现上传网站文件到网站根目录,配置虚拟主机,启用SSL,连接数据库,运行Web应用等功能了。 如果你有任何疑问,建议或反馈请在下面的评论区中写下来以让我们更好的改良Lighttpd。谢谢!(译注:评论网址 http://linoxide.com/linux-how-to/setup-lighttpd-web-server-ubuntu-15-04-centos-7/ ) --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-lighttpd-web-server-ubuntu-15-04-centos-7/ - -作者:[Arun Pyasi][a] -译者:[HaohongWANG](https://github.com/HaohongWANG) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/